@workday/canvas-kit-mcp 14.3.16 → 14.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/action-bar.html +1 -1
- package/dist/apps/breadcrumbs.html +1 -1
- package/dist/apps/form-field.html +1 -1
- package/dist/apps/menu.html +1 -1
- package/dist/apps/modal.html +1 -1
- package/dist/apps/multiselect.html +1 -1
- package/dist/apps/select.html +1 -1
- package/dist/apps/tabs.html +1 -1
- package/dist/cli.js +67 -67
- package/dist/cli.js.map +2 -2
- package/dist/index.js +67 -67
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
package/dist/apps/menu.html
CHANGED
|
@@ -315,7 +315,7 @@ ${s}
|
|
|
315
315
|
*/(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})()})(qU);var Gae=qU.exports;const Qn=Zv(Gae),Hae={lightest:"lightest",lighter:"lighter",light:"light",main:"base",dark:"dark",darkest:"darkest",contrast:"accent"},Vae=Eu({[dn.alertInner]:is,[dn.alertOuter]:os,[dn.errorInner]:$w,[dn.focusOutline]:yw,[Xn.accent]:ot,[Xn.darkest]:Bw,[Xn.dark]:jw,[Xn.base]:Fw,[Xn.light]:zw,[Xn.lighter]:Uw,[Xn.lightest]:Pw,[Er.accent]:ot,[Er.darkest]:Rw,[Er.dark]:xw,[Er.base]:Tw,[Er.light]:Iw,[Er.lighter]:kw,[Er.lightest]:ww,[yr.accent]:ot,[yr.darkest]:Mw,[yr.dark]:Dw,[yr.base]:Lw,[yr.light]:Ow,[yr.lighter]:Cw,[yr.lightest]:Nw,[Sr.accent]:Aw,[Sr.darkest]:gw,[Sr.dark]:os,[Sr.base]:is,[Sr.light]:mw,[Sr.lighter]:fw,[Sr.lightest]:pw,[ut.accent]:ot,[ut.darkest]:_w,[ut.dark]:Ew,[ut.base]:Sw,[ut.light]:vw,[ut.lighter]:bw,[ut.lightest]:hw,[xU.primary]:`linear-gradient(90deg, ${ut.base} 0%, ${ut.dark} 100%)`}),Wae=(e,t)=>{const n=OU(e),a=(t.className||"").split(" ").concat(Vae).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=>{i.common[s]!==or.palette.common[s]&&(r[dn.focusOutline]=Pa(i.common.focusOutline),r[dn.alertInner]=Pa(i.common.alertInner),r[dn.alertOuter]=Pa(i.common.alertOuter),r[dn.errorInner]=Pa(i.common.errorInner))}),["lightest","lighter","light","main","dark","darkest","contrast"].forEach(s=>{i[o][s]!==or.palette[o][s]&&(r[Pre[o][Hae[s]]]=Pa(i[o][s]))})}),{...t,className:a,style:r}};function Zae(e){return e.length?e[e.length-1]:null}function GU(e,t){const{min:n,max:a}=Vw.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(GU(a,t))})}function Yae(e,t){let n=e;do{const a=t.find(r=>r.element===n);if(a)return a.element}while(n=n.parentElement)}function Kae(e,t){return t.filter(a=>a.owner).map(a=>({element:a.element,parent:Yae(a.owner,t)})).filter(a=>a.parent===e.element)}function HU(e,t){const n=t.split("."),a=n.splice(0,1)[0];return n.length&&e[a]?HU(e[a],n.join(".")):e[a]}function VU(e,t,n){const a=t.split("."),r=a.splice(0,1)[0];return a.length?(e[r]===void 0&&(e[r]={}),VU(e[r],a.join("."),n)):e[r]=n,n}typeof window<"u"&&(window.workday=window.workday||{});const WU=e=>{if(typeof window<"u")return HU(window,e)},ZU=(e,t)=>{typeof window<"u"&&VU(window,e,t)},YN=(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},Vw=WU("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:GU},_adapter:{}};ZU("workday.__popupStack",Vw);const er=WU("workday.__popupStackOfStacks")||[Vw];er.description="Global stack of popup stacks from @workday/canvas-kit/popup-stack";ZU("workday.__popupStackOfStacks",er);function Yn(){return er[er.length-1]}const Et={createContainer(){var n;const e=Yn();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=Yn();if((n=t._adapter)!=null&&n.add){t._adapter.add(e);return}t.items.push(e),YN(t,e.owner).appendChild(e.element),Lb(Et.getElements())},remove(e){var n;const t=er.find(a=>!!Et.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),YN(t,a==null?void 0:a.owner).removeChild(e),Lb(Et.getElements(t))}},isTopmost(e){var a;const t=Yn();if((a=t._adapter)!=null&&a.isTopmost)return t._adapter.isTopmost(e);const n=Zae(t.items);return n?n.element===e:!1},getElements(e){var n;const t=e||Yn();return(n=t._adapter)!=null&&n.getElements?t._adapter.getElements():t.items.map(a=>a.element)},bringToTop(e){var a;const t=Yn();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],Kae(n,t.items).forEach(r=>{Et.bringToTop(r.element)}),Lb(Et.getElements());else{const r=new Error;console.warn("Could not find item",r.stack)}},contains(e,t){var i;const n=Yn();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=Yn();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:{}};er.push(n)},popStackContext(e){var n,a;const t=Yn();if((n=t._adapter)!=null&&n.popStackContext)return t._adapter.popStackContext(e);((a=t.container)==null?void 0:a.call(t))===e&&er.length>1&&er.pop()},transferToCurrentContext(e){var a;const t=Yn();if((a=t._adapter)!=null&&a.transferToCurrentContext)return t._adapter.transferToCurrentContext(e);if(t.items.find(r=>r.element===e.element))return;er.find(r=>!!r.items.find(i=>i.element===e.element))&&Et.remove(e.element),Et.add(e)}};let Ql=null;Qn.isEnabled&&Qn.on("change",()=>{Qn.isFullscreen?Qn.element&&(Ql=Qn.element,Et.pushStackContext(Ql)):Ql&&Et.popStackContext(Ql)});const Db=Gr({defaultConfig:{id:"",initialVisibility:"hidden"}})(e=>{const t=Wd(e.id),[n,a]=F.useState(e.initialVisibility||"hidden");return{state:{id:t,visibility:n},events:{show(o){a("visible")},hide(o){a("hidden")}}}}),KN=()=>{},ea=Gr({defaultContext:{state:{},events:{show:KN,hide:KN}},defaultConfig:{...Db.defaultConfig,returnFocusRef:void 0,initialFocusRef:void 0},requiredConfig:Db.requiredConfig})(e=>{const t=Q.useRef(null),n=Q.useRef(null),[a,r]=Q.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 YU=Me()(e=>{const t=F.useCallback(a=>{e.state.stackRef.current&&document.contains(a.target)&&!Et.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]),{}}),KU=Me()(e=>{const t=F.useCallback(a=>{(a.key==="Esc"||a.key==="Escape")&&Et.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]),{}}),Xae=Me()(e=>{const t=F.useCallback(a=>{Qn.isFullscreen||e.events.hide(a)},[e.events]),n=e.state.visibility!=="hidden";return F.useEffect(()=>{if(n&&Qn.isEnabled)return Qn.on("change",t),()=>{Qn.off("change",t)}},[t,n]),{}});function XU(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:XU(e.parentElement)}const Jae=Me()(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=XU(a),i=new IntersectionObserver(n,{root:r,threshold:.5});return i.observe(e.state.targetRef.current),()=>{i.disconnect()}},[n,e.state.targetRef,t]),{}}),Qae=Me()(e=>{const t=F.useCallback(a=>{if(e.state.stackRef.current&&a.key==="Tab"){const r=Bae(e.state.stackRef.current),i=qae(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]),{}}),eie=Me()(({state:e,events:t},n)=>{const a=Yi(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}}),tie=(e,t)=>{const{elementRef:n,localRef:a}=Yd(e),r=F.useContext(dw),{style:i}=Wae(r,{}),o=F.useRef(!0),[s]=F.useState(()=>{if(o.current){const l=Et.createContainer();return n(l),o.current=!1,l}return a.current});return 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 Et.add({element:u,owner:l}),()=>{Et.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,m=a.current;u=(p&&m&&!m.contains(p)?p:document.body).closest("[dir]")??document.documentElement}if(u){const p=u.getAttribute("dir");(p!=null?p.toLowerCase()==="rtl":$U(u))?(c=a.current)==null||c.setAttribute("dir","rtl"):(d=a.current)==null||d.setAttribute("dir","ltr")}},[a,t]),F.useLayoutEffect(()=>{const l=a.current,u=Object.keys(i);if(l&&r){for(const c of u)l.style.setProperty(c,i[c]);return()=>{for(const c of u)l.style.removeProperty(c)}}},[a,i,r]),a},nie=Me()(({events:e,state:t},n)=>({ref:Yi(n,t.targetRef),onClick:r=>{t.targetRef.current instanceof Element||(t.targetRef.current=r.currentTarget),t.visibility!=="hidden"?e.hide(r):e.show(r)}})),rie=Me()(({events:e,state:t},n)=>({ref:Yi(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 JU(e){if(e===document.body||!e.parentElement)return e;const t=getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"?e:JU(e.parentElement)}function QU(e){return e===null||e===document.body||!e.parentElement?null:jae(e)?e:QU(e.parentElement)}function XN(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 aie=Me()(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&&(Et.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=JU(o).getBoundingClientRect(),u={left:0,top:0,right:window.innerWidth,bottom:window.innerHeight};if(n.current&&QU(n.current)||XN(o,l)||XN(o,u)){n.current=null;return}document.activeElement!==document.body&&e.state.stackRef.current&&document.activeElement instanceof Element&&!Et.contains(e.state.stackRef.current,document.activeElement)||a.current?qN(o):requestAnimationFrame(()=>{qN(o)}),n.current=null}},[e.state.returnFocusRef,e.state.targetRef,t,i,r,e.state.stackRef]),{}}),iie=e=>bae[e]||qn(e),oie=e=>yae[e],sie=e=>vae[e]||qn(e),lie=e=>Sae[e]||qn(e),uie=e=>Gw.properties.fontFamilies[e]||qn(e),cie=e=>Gw.properties.fontSizes[e]||qn(e),die=e=>Gw.properties.fontWeights[e]||qn(e);function ht(e){return e.reduce((t={},n)=>{const a=r=>n.properties.reduce((i={},o)=>{if(n.system==="color")return{...i,[o]:iie(r)};if(n.system==="depth"){const s=oie(r);return{...i,...s}}return n.system==="font"?{...i,[o]:uie(r)}:n.system==="fontSize"?{...i,[o]:cie(r)}:n.system==="fontWeight"?{...i,[o]:die(r)}:n.system==="shape"?{...i,[o]:sie(r)}:n.system==="space"?{...i,[o]:lie(r)}:{...i,[o]:r}},{});return{...t,[n.name]:a}},{})}function rn(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 ez=[{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"}],pie=ht(ez),fie=rn(pie),tz=[{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"}],mie=ht(tz),nz=[{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"}],gie=ht(nz),rz=[{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"}],hie=ht(rz),az=[{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"}],bie=ht(az),iz=[{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"}],vie=ht(iz),yie=rn({...mie,...gie,...hie,...bie,...vie}),Sie=[...tz,...nz,...rz,...az,...iz],oz=[{name:"backgroundColor",properties:["backgroundColor"],system:"color"},{name:"color",properties:["color"],system:"color"},{name:"opacity",properties:["opacity"],system:"none"}],Eie=ht(oz),_ie=rn(Eie),sz=[{name:"boxShadow",properties:["boxShadow"],system:"none"},{name:"depth",properties:["boxShadow"],system:"depth"}],wie=ht(sz),kie=rn(wie),lz=[{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"}],Iie=ht(lz),Tie=rn(Iie),uz=[{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"}],xie=ht(uz),Rie=rn(xie),cz=[{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"}],Aie=ht(cz),Nie=rn(Aie),dz=[{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"}],Cie=ht(dz),Oie=rn(Cie),pz=[{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"}],$ie=ht(pz),Lie=rn($ie),fz=[{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"}],Die=ht(fz),Mie=rn(Die),mz=[{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"}],Pie=ht(mz),Uie=rn(Pie),zie=["display","color","height","overflow","width","border","background","fontSize","fontWeight","fontFamily","letterSpacing","lineHeight","textAlign","opacity","textDecoration","textOverflow","textTransform","textShadow","whiteSpace","wordBreak"],Fie=e=>cU(e)&&!zie.includes(e),Ww=e=>[{boxSizing:"border-box"},fie,yie,_ie,kie,Tie,Rie,Nie,Oie,Lie,Mie,Uie].reduce((t,n)=>{const a=typeof n=="function"?n(e):n;for(const r in a)t[r]=a[r];return t},{}),jie=as("div",{shouldForwardProp:Fie})(Ww),Bie=as("div")(Ww),qie=qe("div")({displayName:"Box",Component:({children:e,...t},n,a)=>{const r=DU(()=>typeof a=="string"?jie:Bie);return v.jsx(r,{as:a,ref:n,...ka(t),children:e})}}),gz=[{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"}],Gie=ht(gz),Hie=rn(Gie),hz=[{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"}],Vie=ht(hz),Wie=rn(Vie),Zie=[...ez,...Sie,...oz,...sz,...gz,...lz,...hz,...uz,...cz,...dz,...pz,...fz,...mz].reduce((e,t)=>(e[t.name]=!0,e),{});function Yie(e){return Zie[e]||!1}function st(e,t){const n={};let a=!1;const r=Object.keys(e).reduce((o,s)=>(Yie(s)?(a=!0,n[s]=e[s]):o[s]=e[s],o),{});let i={};return a&&(i={...Ww(n),...Hie(n),...Wie(n)}),ka(r,[t,i])}const Ia=at({base:{},modifiers:{typeLevel:{"title.large":{...We.title.large,color:G.text.strong},"title.medium":{...We.title.medium,color:G.text.strong},"title.small":{...We.title.small,color:G.text.strong},"heading.large":{...We.heading.large,color:G.text.strong},"heading.medium":{...We.heading.medium,color:G.text.strong},"heading.small":{...We.heading.small,color:G.text.strong},"body.large":{...We.body.large,color:G.text.default},"body.medium":{...We.body.medium,color:G.text.default},"body.small":{...We.body.small,color:G.text.default},"subtext.large":{...We.subtext.large,color:G.text.default},"subtext.medium":{...We.subtext.medium,color:G.text.default},"subtext.small":{...We.subtext.small,color:G.text.default}},variant:{error:{color:G.text.critical.default},hint:{color:G.text.hint},inverse:{color:G.text.inverse}}}});qe("span")({displayName:"Text",Component:({children:e,typeLevel:t,variant:n,...a},r,i)=>v.jsx(i,{ref:r,...st(a,Ia({typeLevel:t,variant:n})),children:e})});const Kie=at({extends:Ia,base:{}});qe("p")({displayName:"Subtext",Component:({size:e,variant:t,...n},a,r)=>{const i=`subtext.${e}`;return v.jsx(r,{ref:a,...st(n,Kie({typeLevel:i,variant:t}))})}});const Xie=at({extends:Ia,base:{}}),Ta=qe("p")({displayName:"BodyText",Component:({size:e,variant:t,...n},a,r)=>{const i=`body.${e}`;return v.jsx(r,{ref:a,...st(n,Xie({typeLevel:i,variant:t}))})}}),Jie=at({extends:Ia,base:{}});qe("h2")({displayName:"Heading",Component:({size:e,variant:t,...n},a,r)=>{const i=`heading.${e}`;return v.jsx(r,{ref:a,...st(n,Jie({typeLevel:i,variant:t}))})}});const Qie=at({extends:Ia,base:{}});qe("h1")({displayName:"Title",Component:({size:e,variant:t,...n},a,r)=>{const i=`title.${e}`;return v.jsx(r,{ref:a,...st(n,Qie({typeLevel:i,variant:t}))})}});const eoe=at({extends:Ia,base:{color:G.fg.strong,fontWeight:Jr.bold,marginBlock:W.zero},defaultModifiers:{typeLevel:"body.large"}}),toe=qe("h3")({displayName:"Card.Heading",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...st(t,eoe()),children:e})}),noe=at({extends:Ia,base:{},defaultModifiers:{typeLevel:"subtext.large"}}),roe=qe("div")({displayName:"Card.Body",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...st(t,noe()),children:e})}),aoe=at({base:{display:"flex",flexDirection:"column",gap:W.x6,padding:W.x8,backgroundColor:G.bg.default,borderRadius:El.x2,border:`${ze(1)} solid ${G.border.container}`},modifiers:{variant:{borderless:{borderColor:"transparent"},filled:{backgroundColor:G.bg.alt.soft,borderColor:G.border.transparent}}}}),ioe=qe("div")({displayName:"Card",Component:({children:e,variant:t,...n},a,r)=>v.jsx(r,{ref:a,...st(n,aoe({variant:t})),children:e}),subComponents:{Heading:toe,Body:roe}}),bz=e=>{const[t,n]=e.split("-");return{vertical:t==="top"?"bottom":t==="bottom"||n==="end"?"top":n==="start"?"bottom":"center",horizontal:t==="left"?"right":t==="right"||n==="end"?"left":n==="start"?"right":"center"}};var vz={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.Accent="accent",t.Applet="applet",t.Expressive="expressive",t.System="system",t.Graphic="graphic"}(e.CanvasIconTypes||(e.CanvasIconTypes={}))})(vz);function ooe(e,t){if(e.type!==t)throw`${e.name}: Icon type "${e.type}" does not match expected type "${t}"`}const yz=at({vars:{width:"",height:"",size:""},base:({width:e,height:t,size:n})=>({display:"inline-block","> svg":{display:"block",width:z(e,n),height:z(t,n)}}),modifiers:{shouldMirror:{true:{transform:"scaleX(-1)"}},shouldMirrorInRTL:{true:{"&:dir(rtl)":{transform:"scaleX(-1)"}}}}}),Wr=e=>e&&e in UN?z(UN[e]):e!=null&&e.startsWith("--")?z(e):e,soe=qe("span")({displayName:"Svg",Component:({shouldMirror:e,shouldMirrorInRTL:t,src:n,type:a,...r},i,o)=>{try{ooe(n,a)}catch(s){return console.error(s),null}return v.jsx(o,{ref:i,dangerouslySetInnerHTML:{__html:n.svg},...st(r,yz({shouldMirror:e,shouldMirrorInRTL:t}))})}}),tr=Qr("colorHover","fillHover","accentHover","backgroundHover"),Je=at({extends:yz,vars:{color:"",accentColor:"",backgroundColor:""},base:({size:e,width:t,height:n,accentColor:a,backgroundColor:r,color:i})=>({"& svg":{width:z(t,z(e,W.x6)),height:z(n,z(e,W.x6))},"& .wd-icon-fill":{fill:z(i,G.icon.default)},"& .wd-icon-accent, & .wd-icon-accent2":{fill:z(a,z(i,G.fg.default))},"& .wd-icon-background":{fill:z(r,"transparent")},"&:where(:hover, .hover) .wd-icon-fill":{fill:z(tr.fillHover,z(tr.colorHover,z(i,G.fg.default)))},"&:where(:hover, .hover) .wd-icon-accent, & .wd-icon-accent2":{fill:z(tr.accentHover,z(tr.colorHover,z(a,z(i,G.fg.default))))},"&:where(:hover, .hover) .wd-icon-background":{fill:z(tr.backgroundHover,z(r,"transparent"))},"@media (prefers-contrast: more)":{".wd-icon-fill, .wd-icon-accent":{color:"currentColor",fill:"currentColor"}}}),modifiers:{}}),Zw=qe("span")({displayName:"SystemIcon",Component:({size:e,background:t,backgroundHover:n,color:a,colorHover:r,icon:i,accent:o,accentHover:s,fill:l,fillHover:u,...c},d,p)=>v.jsx(soe,{as:p,src:i,type:vz.CanvasIconTypes.System,ref:d,...ka(c,[Je({size:typeof e=="number"?ze(e):e,color:Wr(l||a),accentColor:Wr(o||a),backgroundColor:Wr(t)}),{[tr.colorHover]:r&&Wr(r),[tr.fillHover]:u&&Wr(u),[tr.accentHover]:s&&Wr(s),[tr.backgroundHover]:n&&Wr(n)}])})}),loe={extraSmall:18,small:20,medium:20,large:24},uoe=qe("span")({Component:({icon:e,size:t="medium",shouldMirrorIcon:n=!1,shouldMirrorIconInRTL:a=!1,...r},i,o)=>{if(e===void 0)return null;const s=loe[t];return v.jsx(Zw,{ref:i,as:o,size:s,icon:e,width:ze(s),height:ze(s),display:"inline-block",shouldMirror:n,shouldMirrorInRTL:a,...r})}}),coe=sX(qie.as("span"))({position:"relative",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}),doe=qe("span")({displayName:"ButtonLabel",Component:({children:e,...t},n,a)=>v.jsx(coe,{as:a,ref:n,...t,children:e})}),ie={default:Qr("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),focus:Qr("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),hover:Qr("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),active:Qr("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius"),disabled:Qr("background","border","boxShadowInner","boxShadowOuter","icon","label","opacity","borderRadius")},ue=at({vars:{background:"",border:"",boxShadowInner:"",boxShadowOuter:"",label:"",opacity:"",borderRadius:""},base:({background:e,border:t,boxShadowInner:n,boxShadowOuter:a,label:r,opacity:i,borderRadius:o})=>({fontFamily:'"Roboto", "Helvetica Neue", "Helvetica", Arial, sans-serif',fontSize:"0.875rem",lineHeight:"normal",letterSpacing:"0.015rem",fontWeight:Jr.bold,backgroundColor:z(ie.default.background,z(e,"transparent")),color:z(ie.default.label,z(r,G.fg.strong)),borderWidth:ze(1),borderStyle:"solid",gap:W.x2,borderColor:z(ie.default.border,z(t,"transparent")),cursor:"pointer",display:"inline-flex",boxShadow:"none",alignItems:"center",justifyContent:"center",boxSizing:"border-box",outline:`${ze(2)} transparent`,whiteSpace:"nowrap",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",borderRadius:z(ie.default.borderRadius,z(o,El.round)),position:"relative",verticalAlign:"middle",overflow:"hidden",[Je.vars.color]:z(ie.default.icon,G.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:z(ie.default.opacity,z(i,oc.full))},"&:focus-visible, &.focus":{backgroundColor:z(ie.focus.background,z(e,"transparent")),borderColor:z(ie.focus.border,z(t,"transparent")),color:z(ie.focus.label,z(r,G.fg.strong)),[Je.vars.color]:z(ie.focus.icon,G.fg.strong),outline:`${ze(2)} solid transparent`,outlineOffset:ze(2),...hae({width:2,separation:2,innerColor:z(ie.focus.boxShadowInner,z(n,z(G.border.inverse,ot))),outerColor:z(ie.focus.boxShadowOuter,z(a,dn.focusOutline))})},"&:hover, &.hover":{backgroundColor:z(ie.hover.background,z(e,G.bg.contrast.strong)),borderColor:z(ie.hover.border,z(t,"transparent")),color:z(ie.hover.label,z(r,G.fg.stronger)),[Je.vars.color]:z(ie.hover.icon,G.fg.stronger)},"&:hover:active":{transitionDuration:"40ms"},"&:active, &.active":{backgroundColor:z(ie.active.background,z(e,"transparent")),borderColor:z(ie.active.border,z(t,"transparent")),color:z(ie.active.label,z(r,G.fg.strong)),[Je.vars.color]:z(ie.active.icon,G.fg.strong)},"&:disabled, &.disabled":{backgroundColor:z(ie.disabled.background,z(e,"transparent")),borderColor:z(ie.disabled.border,z(t,"transparent")),color:z(ie.disabled.label,z(r,G.fg.strong)),[Je.vars.color]:z(ie.disabled.icon,G.fg.strong)},"@media (prefers-contrast: more)":{'&[aria-pressed="true"]':{outline:`${ze(2)} solid transparent`,outlineOffset:`-${ze(1)}`},'&[aria-pressed="true"]:focus-visible, &[aria-pressed="true"].focus':{outline:`${ze(4)} double transparent`,outlineOffset:0}},svg:{pointerEvents:"none"}}),modifiers:{size:{large:{...We.body.small,fontWeight:Jr.bold,height:ze(48),paddingInline:W.x8,minWidth:ze(112)},medium:{...We.subtext.large,fontWeight:Jr.bold,minWidth:ze(96),paddingInline:W.x6,height:W.x10},small:{...We.subtext.large,fontWeight:Jr.bold,height:W.x8,minWidth:W.x20,paddingInline:W.x4,gap:W.x1},extraSmall:{...We.subtext.medium,fontWeight:Jr.bold,height:W.x6,minWidth:"auto",paddingInline:W.x3,gap:W.x1}},grow:{true:{width:"100%",maxWidth:"100%"}},iconPosition:{only:{padding:W.zero},start:{},end:{}}},compound:[{modifiers:{size:"large",iconPosition:"only"},styles:{minWidth:Ot.multiply(W.x4,3)}},{modifiers:{size:"large",iconPosition:"start"},styles:{paddingInlineStart:W.x6,paddingInlineEnd:W.x8}},{modifiers:{size:"large",iconPosition:"end"},styles:{paddingInlineStart:W.x8,paddingInlineEnd:W.x6}},{modifiers:{size:"medium",iconPosition:"only"},styles:{minWidth:W.x10}},{modifiers:{size:"medium",iconPosition:"start"},styles:{paddingInlineStart:Ot.multiply(W.x1,5),paddingInlineEnd:W.x6}},{modifiers:{size:"medium",iconPosition:"end"},styles:{paddingInlineStart:W.x6,paddingInlineEnd:Ot.multiply(W.x1,5)}},{modifiers:{size:"small",iconPosition:"only"},styles:{minWidth:W.x8}},{modifiers:{size:"small",iconPosition:"start"},styles:{paddingInlineStart:W.x3,paddingInlineEnd:W.x4}},{modifiers:{size:"small",iconPosition:"end"},styles:{paddingInlineStart:W.x4,paddingInlineEnd:W.x3}},{modifiers:{size:"extraSmall",iconPosition:"only"},styles:{minWidth:W.x6}},{modifiers:{size:"extraSmall",iconPosition:"start"},styles:{paddingInlineStart:W.x2,paddingInlineEnd:W.x3}},{modifiers:{size:"extraSmall",iconPosition:"end"},styles:{paddingInlineStart:W.x3,paddingInlineEnd:W.x2}}]}),eu=qe("button")({displayName:"BaseButton",Component:({children:e,size:t,fillIcon:n,grow:a,iconPosition:r,icon:i,colors:o,...s},l,u)=>v.jsx(u,{ref:l,type:"button",...st(s,[ue({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:uoe,Label:doe}});var xa={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.Accent="accent",t.Applet="applet",t.System="system",t.Graphic="graphic"}(e.CanvasIconTypes||(e.CanvasIconTypes={}))})(xa);var poe={name:"checkSmall",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-check-small wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="m10.34 14.043 5.101-5.936a.287.287 0 0 1 .432-.017l.974.827a.344.344 0 0 1 .03.463l-6.13 7.237a.285.285 0 0 1-.407.04l-3.237-2.614a.344.344 0 0 1-.021-.469l.853-1.03a.296.296 0 0 1 .436-.026z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-check-small.svg",category:"Core",tags:["success","complete","check mark","check box"]},foe={name:"chevronRightSmall",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-chevron-right-small wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="M13.703 12 9.128 7.39a.44.44 0 0 1 0-.62l.635-.64a.44.44 0 0 1 .622-.002l.002.002 5.482 5.523a.44.44 0 0 1 .127.347.44.44 0 0 1-.127.347l-5.482 5.523a.44.44 0 0 1-.622.002l-.002-.002-.635-.64a.44.44 0 0 1 0-.62z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-chevron-right-small.svg",category:"Core",tags:["navigation","arrow"]},moe={name:"setup",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-setup wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path d="M4 6h4v4H4Zm12 1h4v4h-4Zm-6 7h4v4h-4Z" class="wd-icon-background"/><path d="M17 6V3.491c0-.263.226-.491.505-.491h.99c.291 0 .505.22.505.491V6h1.509c.271 0 .491.228.491.491v5.018a.496.496 0 0 1-.491.491h-5.018a.496.496 0 0 1-.491-.491V6.491c0-.271.228-.491.491-.491zm2 2h-2v2h2zm-6 11v1.505c0 .28-.226.495-.505.495h-.99a.493.493 0 0 1-.505-.495V19H9.491A.496.496 0 0 1 9 18.509v-5.018c0-.271.228-.491.491-.491h5.018c.271 0 .491.228.491.491v5.018a.496.496 0 0 1-.491.491zM5 5V3.495c0-.28.226-.495.505-.495h.99c.291 0 .505.222.505.495V5h1.509C8.78 5 9 5.228 9 5.491v5.018a.496.496 0 0 1-.491.491H3.491A.496.496 0 0 1 3 10.509V5.491C3 5.22 3.228 5 3.491 5zm0 2v2h2V7zm0 5h2v8.49c0 .288-.226.51-.505.51h-.99A.5.5 0 0 1 5 20.49zm6 3v2h2v-2zm.505-12h.99a.5.5 0 0 1 .505.51V12h-2V3.51c0-.288.226-.51.505-.51ZM17 13h2v7.497c0 .27-.226.503-.505.503h-.99a.497.497 0 0 1-.505-.503z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-setup.svg",category:"Core",tags:["settings","setting","control","options","preferences"]},JN={name:"taskContact",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-task-contact wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><rect width="11" height="18" x="8" y="3" class="wd-icon-background"/><path d="M19.504 2c.274 0 .496.225.496.494v19.012a.5.5 0 0 1-.496.494H4.496A.497.497 0 0 1 4 21.506V2.494C4 2.221 4.226 2 4.496 2zM18 4H9v16h9zM7 4H6v16h1z" class="wd-icon-fill"/><path d="M14.5 11.5c.828 0 1.5.666 1.5 1.5v1.5h-5V13c0-.828.674-1.5 1.5-1.5zm-1-3c.78 0 1.42.59 1.493 1.355L15 10c0 .78-.59 1.42-1.355 1.493l-.145.007c-.828 0-1.5-.666-1.5-1.5 0-.78.59-1.42 1.355-1.493z" class="wd-icon-accent"/></g></svg>',filename:"wd-icon-task-contact.svg",category:"Profile",tags:["profile","identity","i.d.","id","phonebook","contacts"]},QN={name:"uploadCloud",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-upload-cloud wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g fill-rule="evenodd" class="wd-icon-container"><path fill-rule="nonzero" d="M9.642 5c1.56 0 3.002.69 4.007 1.842a3.6 3.6 0 0 1 1.753-.454c1.862 0 3.392 1.41 3.659 3.238C20.766 10.11 22 11.718 22 13.603c0 2.395-1.827 5.033-4.005 5.033H5.754C3.705 18.636 2 16.113 2 13.864c0-1.565.912-2.944 2.257-3.545C4.381 7.367 6.737 5 9.642 5Zm0 1.818c-1.965 0-3.571 1.669-3.571 3.744q0 .168.013.332l.067.797-.783.167c-.89.19-1.55 1.022-1.55 2.006 0 1.36 1.077 2.954 1.936 2.954h12.241c1.002 0 2.187-1.712 2.187-3.215 0-1.228-.91-2.23-2.053-2.301l-.909-.058.06-.909q.003-.07.004-.14c0-1.106-.85-1.989-1.882-1.989-.49 0-.95.199-1.3.552l-.827.836-.601-1.01c-.65-1.093-1.788-1.766-3.032-1.766ZM13 13.814v3.006h-2v-2.992L9.77 15.06a.497.497 0 0 1-.713-.002l-.7-.7a.496.496 0 0 1-.002-.712L12 10l3.66 3.645a.497.497 0 0 1-.003.712l-.7.7a.496.496 0 0 1-.712.002z" class="wd-icon-fill"/></g></svg>',filename:"wd-icon-upload-cloud.svg",category:"Core",tags:["storage","store"]},goe={name:"user",type:xa.CanvasIconTypes.System,svg:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="wd-icon-user wd-icon" focusable="false" role="presentation" viewBox="0 0 24 24"><g class="wd-icon-container"><path fill-rule="evenodd" d="M20 20.496a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-1.5C4 16 6.246 13.8 8.756 12.684 7.682 11.674 7 10.174 7 8.499 7 5.462 9.239 3 12 3s5 2.462 5 5.499c0 1.675-.68 3.175-1.755 4.183C17.758 13.797 20 15.995 20 18.996z" class="wd-icon-background" clip-rule="evenodd"/><path fill-rule="evenodd" d="M20 20.496a.5.5 0 0 1-.5.5h-15a.5.5 0 0 1-.5-.5v-1.5C4 16 6.246 13.8 8.756 12.684 7.682 11.674 7 10.174 7 8.499 7 5.462 9.239 3 12 3s5 2.462 5 5.499c0 1.675-.68 3.175-1.755 4.183C17.758 13.797 20 15.995 20 18.996zm-13.917-1.5H18c0-2.996-2.5-4.999-6-4.999s-6 2.003-5.917 5ZM12 11.998c1.657 0 3-1.567 3-3.5C15 6.567 13.657 5 12 5S9 6.566 9 8.499c0 1.932 1.343 3.499 3 3.499Z" class="wd-icon-fill" clip-rule="evenodd"/></g></svg>',filename:"wd-icon-user.svg",category:"Core",tags:["person","people","profile","avatar"]};const hoe=qe("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 v.jsxs(eu,{as:u,ref:l,size:o,icon:t,colors:n,iconPosition:c,...s,children:[t&&c==="start"&&v.jsx(eu.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i}),e&&v.jsx(eu.Label,{children:e}),t&&c&&["only","end"].includes(c)&&v.jsx(eu.Icon,{size:o,icon:t,shouldMirrorIcon:r,shouldMirrorIconInRTL:i})]})}}),boe=at({extends:ue,base:{[ue.vars.background]:G.bg.transparent.default,[ue.vars.borderRadius]:El.round,[ue.vars.border]:G.border.input.default,[ue.vars.label]:G.fg.strong,[Je.vars.color]:z(ie.default.icon,"currentColor"),"&:focus-visible, &.focus":{[ue.vars.background]:G.bg.default,[ue.vars.label]:G.fg.stronger,[ue.vars.boxShadowInner]:z(G.border.inverse,ot),[ue.vars.boxShadowOuter]:dn.focusOutline,[Je.vars.color]:z(ie.focus.icon,"currentColor")},"&:hover, &.hover":{[ue.vars.background]:TU,[ue.vars.label]:G.fg.stronger,[ue.vars.border]:G.border.input.strong,[Je.vars.color]:z(ie.hover.icon,"currentColor")},"&:active, &.active":{[ue.vars.background]:G.bg.alt.strong,[ue.vars.label]:G.fg.stronger,[ue.vars.border]:G.border.input.strong,[Je.vars.color]:z(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[ue.vars.background]:G.bg.transparent.default,[ue.vars.label]:G.fg.stronger,[ue.vars.opacity]:oc.disabled,[Je.vars.color]:z(ie.disabled.icon,"currentColor")}},modifiers:{variant:{inverse:{[ue.vars.background]:"transparent",[ue.vars.border]:z(G.border.inverse,ot),[ue.vars.label]:G.fg.inverse,[Je.vars.color]:z(ie.default.icon,"currentColor"),"&:hover, &.hover":{[ue.vars.background]:G.bg.transparent.strong,[ue.vars.border]:z(G.border.inverse,ot),[ue.vars.label]:G.fg.inverse,[Je.vars.color]:z(ie.hover.icon,"currentColor")},"&:focus-visible, &.focus":{[ue.vars.background]:G.bg.translucent,[ue.vars.border]:"transparent",[ue.vars.label]:G.fg.inverse,[ue.vars.boxShadowInner]:G.border.contrast.default,[ue.vars.boxShadowOuter]:z(G.border.inverse,ot),[Je.vars.color]:z(ie.focus.icon,"currentColor")},"&:active, &.active":{[ue.vars.background]:G.bg.transparent.stronger,[ue.vars.border]:z(G.border.inverse,ot),[ue.vars.label]:G.fg.inverse,[Je.vars.color]:z(ie.active.icon,"currentColor")},"&:disabled, &.disabled":{[ue.vars.background]:"transparent",[ue.vars.border]:z(G.border.inverse,ot),[ue.vars.label]:G.fg.inverse,[Je.vars.color]:z(ie.disabled.icon,"currentColor")}}}}}),Sz=qe("button")({displayName:"SecondaryButton",Component:({children:e,variant:t,size:n,iconPosition:a,grow:r,cs:i,...o},s,l)=>v.jsx(hoe,{as:l,ref:s,iconPosition:a,size:n,grow:r,cs:[boe({variant:t,iconPosition:a,grow:r,size:n}),i],...o,children:e})});var hn="top",An="bottom",Nn="right",bn="left",Yw="auto",_l=[hn,An,Nn,bn],Ti="start",Kw="end",voe="clippingParents",Ez="viewport",po="popper",yoe="reference",eC=_l.reduce(function(e,t){return e.concat([t+"-"+Ti,t+"-"+Kw])},[]),_z=[].concat(_l,[Yw]).reduce(function(e,t){return e.concat([t,t+"-"+Ti,t+"-"+Kw])},[]),Soe="beforeRead",Eoe="read",_oe="afterRead",woe="beforeMain",koe="main",Ioe="afterMain",Toe="beforeWrite",xoe="write",Roe="afterWrite",Aoe=[Soe,Eoe,_oe,woe,koe,Ioe,Toe,xoe,Roe];function Cn(e){return e?(e.nodeName||"").toLowerCase():null}function On(e){if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ls(e){var t=On(e).Element;return e instanceof t||e instanceof Element}function Gn(e){var t=On(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Noe(e){var t=On(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Coe(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];!Gn(i)||!Cn(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 Ooe(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},{});!Gn(r)||!Cn(r)||(Object.assign(r.style,s),Object.keys(i).forEach(function(l){r.removeAttribute(l)}))})}}const $oe={name:"applyStyles",enabled:!0,phase:"write",fn:Coe,effect:Ooe,requires:["computeStyles"]};function Bn(e){return e.split("-")[0]}function Xw(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function wz(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Noe(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function sr(e){return On(e).getComputedStyle(e)}function Loe(e){return["table","td","th"].indexOf(Cn(e))>=0}function br(e){return((ls(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kd(e){return Cn(e)==="html"?e:e.assignedSlot||e.parentNode||e.host||br(e)}function tC(e){if(!Gn(e)||sr(e).position==="fixed")return null;var t=e.offsetParent;if(t){var n=br(t);if(Cn(t)==="body"&&sr(t).position==="static"&&sr(n).position!=="static")return n}return t}function Doe(e){for(var t=Kd(e);Gn(t)&&["html","body"].indexOf(Cn(t))<0;){var n=sr(t);if(n.transform!=="none"||n.perspective!=="none"||n.willChange&&n.willChange!=="auto")return t;t=t.parentNode}return null}function wl(e){for(var t=On(e),n=tC(e);n&&Loe(n)&&sr(n).position==="static";)n=tC(n);return n&&Cn(n)==="body"&&sr(n).position==="static"?t:n||Doe(e)||t}function Jw(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _u(e,t,n){return Math.max(e,Math.min(t,n))}function kz(){return{top:0,right:0,bottom:0,left:0}}function Iz(e){return Object.assign(Object.assign({},kz()),e)}function Tz(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}function Moe(e){var t,n=e.state,a=e.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,o=Bn(n.placement),s=Jw(o),l=[bn,Nn].indexOf(o)>=0,u=l?"height":"width";if(!(!r||!i)){var c=n.modifiersData[a+"#persistent"].padding,d=Xw(r),p=s==="y"?hn:bn,m=s==="y"?An:Nn,b=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],S=i[s]-n.rects.reference[s],I=wl(r),h=I?s==="y"?I.clientHeight||0:I.clientWidth||0:0,f=b/2-S/2,g=c[p],y=h-d[u]-c[m],w=h/2-d[u]/2+f,_=_u(g,w,y),k=s;n.modifiersData[a]=(t={},t[k]=_,t.centerOffset=_-w,t)}}function Poe(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)||wz(t.elements.popper,i)&&(t.elements.arrow=i,t.modifiersData[a+"#persistent"]={padding:Iz(typeof s!="number"?s:Tz(s,_l))}))}const Uoe={name:"arrow",enabled:!0,phase:"main",fn:Moe,effect:Poe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var zoe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Foe(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 nC(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=Foe(i),c=u.x,d=u.y,p=i.hasOwnProperty("x"),m=i.hasOwnProperty("y"),b=bn,S=hn,I=window;if(l){var h=wl(n);h===On(n)&&(h=br(n)),r===hn&&(S=An,d-=h.clientHeight-a.height,d*=s?1:-1),r===bn&&(b=Nn,c-=h.clientWidth-a.width,c*=s?1:-1)}var f=Object.assign({position:o},l&&zoe);if(s){var g;return Object.assign(Object.assign({},f),{},(g={},g[S]=m?"0":"",g[b]=p?"0":"",g.transform=(I.devicePixelRatio||1)<2?"translate("+c+"px, "+d+"px)":"translate3d("+c+"px, "+d+"px, 0)",g))}return Object.assign(Object.assign({},f),{},(t={},t[S]=m?d+"px":"",t[b]=p?c+"px":"",t.transform="",t))}function joe(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:Bn(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),nC(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),nC(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 Boe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:joe,data:{}};var tu={passive:!0};function qoe(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=On(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",n.update,tu)}),s&&l.addEventListener("resize",n.update,tu),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",n.update,tu)}),s&&l.removeEventListener("resize",n.update,tu)}}const Goe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qoe,data:{}};var Hoe={left:"right",right:"left",bottom:"top",top:"bottom"};function wu(e){return e.replace(/left|right|bottom|top/g,function(t){return Hoe[t]})}var Voe={start:"end",end:"start"};function rC(e){return e.replace(/start|end/g,function(t){return Voe[t]})}function us(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 Qw(e){var t=On(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function ek(e){return us(br(e)).left+Qw(e).scrollLeft}function Woe(e){var t=On(e),n=br(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+ek(e),y:s}}function Zoe(e){var t=br(e),n=Qw(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+ek(e),s=-n.scrollTop;return sr(a||t).direction==="rtl"&&(o+=Math.max(t.clientWidth,a?a.clientWidth:0)-r),{width:r,height:i,x:o,y:s}}function tk(e){var t=sr(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function xz(e){return["html","body","#document"].indexOf(Cn(e))>=0?e.ownerDocument.body:Gn(e)&&tk(e)?e:xz(Kd(e))}function Co(e,t){t===void 0&&(t=[]);var n=xz(e),a=Cn(n)==="body",r=On(n),i=a?[r].concat(r.visualViewport||[],tk(n)?n:[]):n,o=t.concat(i);return a?o:o.concat(Co(Kd(i)))}function Hv(e){return Object.assign(Object.assign({},e),{},{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yoe(e){var t=us(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 aC(e,t){return t===Ez?Hv(Woe(e)):Gn(t)?Yoe(t):Hv(Zoe(br(e)))}function Koe(e){var t=Co(Kd(e)),n=["absolute","fixed"].indexOf(sr(e).position)>=0,a=n&&Gn(e)?wl(e):e;return ls(a)?t.filter(function(r){return ls(r)&&wz(r,a)&&Cn(r)!=="body"}):[]}function Xoe(e,t,n){var a=t==="clippingParents"?Koe(e):[].concat(t),r=[].concat(a,[n]),i=r[0],o=r.reduce(function(s,l){var u=aC(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},aC(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 cs(e){return e.split("-")[1]}function Rz(e){var t=e.reference,n=e.element,a=e.placement,r=a?Bn(a):null,i=a?cs(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 An:l={x:o,y:t.y+t.height};break;case Nn: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?Jw(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case Ti:l[u]=Math.floor(l[u])-Math.floor(t[c]/2-n[c]/2);break;case Kw:l[u]=Math.floor(l[u])+Math.ceil(t[c]/2-n[c]/2);break}}return l}function xi(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?voe:i,s=n.rootBoundary,l=s===void 0?Ez:s,u=n.elementContext,c=u===void 0?po:u,d=n.altBoundary,p=d===void 0?!1:d,m=n.padding,b=m===void 0?0:m,S=Iz(typeof b!="number"?b:Tz(b,_l)),I=c===po?yoe:po,h=e.elements.reference,f=e.rects.popper,g=e.elements[p?I:c],y=Xoe(ls(g)?g:g.contextElement||br(e.elements.popper),o,l),w=us(h),_=Rz({reference:w,element:f,placement:r}),k=Hv(Object.assign(Object.assign({},f),_)),A=c===po?k:w,C={top:y.top-A.top+S.top,bottom:A.bottom-y.bottom+S.bottom,left:y.left-A.left+S.left,right:A.right-y.right+S.right},L=e.modifiersData.offset;if(c===po&&L){var H=L[r];Object.keys(C).forEach(function(ee){var te=[Nn,An].indexOf(ee)>=0?1:-1,ve=[hn,An].indexOf(ee)>=0?"y":"x";C[ee]+=H[ve]*te})}return C}function Joe(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?_z:l,c=cs(a),d=c?s?eC:eC.filter(function(b){return cs(b)===c}):_l,p=d.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=d);var m=p.reduce(function(b,S){return b[S]=xi(e,{placement:S,boundary:r,rootBoundary:i,padding:o})[Bn(S)],b},{});return Object.keys(m).sort(function(b,S){return m[b]-m[S]})}function Qoe(e){if(Bn(e)===Yw)return[];var t=wu(e);return[rC(e),t,rC(t)]}function ese(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,m=n.flipVariations,b=m===void 0?!0:m,S=n.allowedAutoPlacements,I=t.options.placement,h=Bn(I),f=h===I,g=l||(f||!b?[wu(I)]:Qoe(I)),y=[I].concat(g).reduce(function(ge,Ne){return ge.concat(Bn(Ne)===Yw?Joe(t,{placement:Ne,boundary:c,rootBoundary:d,padding:u,flipVariations:b,allowedAutoPlacements:S}):Ne)},[]),w=t.rects.reference,_=t.rects.popper,k=new Map,A=!0,C=y[0],L=0;L<y.length;L++){var H=y[L],ee=Bn(H),te=cs(H)===Ti,ve=[hn,An].indexOf(ee)>=0,_e=ve?"width":"height",me=xi(t,{placement:H,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),we=ve?te?Nn:bn:te?An:hn;w[_e]>_[_e]&&(we=wu(we));var $=wu(we),j=[];if(i&&j.push(me[ee]<=0),s&&j.push(me[we]<=0,me[$]<=0),j.every(function(ge){return ge})){C=H,A=!1;break}k.set(H,j)}if(A)for(var B=b?3:1,V=function(Ne){var Oe=y.find(function(Xe){var an=k.get(Xe);if(an)return an.slice(0,Ne).every(function(Ra){return Ra})});if(Oe)return C=Oe,"break"},Y=B;Y>0;Y--){var He=V(Y);if(He==="break")break}t.placement!==C&&(t.modifiersData[a]._skip=!0,t.placement=C,t.reset=!0)}}const tse={name:"flip",enabled:!0,phase:"main",fn:ese,requiresIfExists:["offset"],data:{_skip:!1}};function iC(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 oC(e){return[hn,Nn,An,bn].some(function(t){return e[t]>=0})}function nse(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=xi(t,{elementContext:"reference"}),s=xi(t,{altBoundary:!0}),l=iC(o,a),u=iC(s,r,i),c=oC(l),d=oC(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 rse={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nse};function ase(e,t,n){var a=Bn(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,Nn].indexOf(a)>=0?{x:s,y:o}:{x:o,y:s}}function ise(e){var t=e.state,n=e.options,a=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=_z.reduce(function(c,d){return c[d]=ase(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 ose={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ise};function sse(e){var t=e.state,n=e.name;t.modifiersData[n]=Rz({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const lse={name:"popperOffsets",enabled:!0,phase:"read",fn:sse,data:{}};function use(e){return e==="x"?"y":"x"}function cse(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,m=p===void 0?!0:p,b=n.tetherOffset,S=b===void 0?0:b,I=xi(t,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),h=Bn(t.placement),f=cs(t.placement),g=!f,y=Jw(h),w=use(y),_=t.modifiersData.popperOffsets,k=t.rects.reference,A=t.rects.popper,C=typeof S=="function"?S(Object.assign(Object.assign({},t.rects),{},{placement:t.placement})):S,L={x:0,y:0};if(_){if(i){var H=y==="y"?hn:bn,ee=y==="y"?An:Nn,te=y==="y"?"height":"width",ve=_[y],_e=_[y]+I[H],me=_[y]-I[ee],we=m?-A[te]/2:0,$=f===Ti?k[te]:A[te],j=f===Ti?-A[te]:-k[te],B=t.elements.arrow,V=m&&B?Xw(B):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:kz(),He=Y[H],ge=Y[ee],Ne=_u(0,k[te],V[te]),Oe=g?k[te]/2-we-Ne-He-C:$-Ne-He-C,Xe=g?-k[te]/2+we+Ne+ge+C:j+Ne+ge+C,an=t.elements.arrow&&wl(t.elements.arrow),Ra=an?y==="y"?an.clientTop||0:an.clientLeft||0:0,Aa=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,Na=_[y]+Oe-Aa-Ra,ep=_[y]+Xe-Aa,Ca=_u(m?Math.min(_e,Na):_e,ve,m?Math.max(me,ep):me);_[y]=Ca,L[y]=Ca-ve}if(s){var tF=y==="x"?hn:bn,nF=y==="x"?An:Nn,Il=_[w],rF=Il+I[tF],aF=Il-I[nF],ck=_u(rF,Il,aF);_[w]=ck,L[w]=ck-Il}t.modifiersData[a]=L}}const dse={name:"preventOverflow",enabled:!0,phase:"main",fn:cse,requiresIfExists:["offset"]};function pse(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fse(e){return e===On(e)||!Gn(e)?Qw(e):pse(e)}function mse(e,t,n){n===void 0&&(n=!1);var a=br(t),r=us(e),i=Gn(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(i||!i&&!n)&&((Cn(t)!=="body"||tk(a))&&(o=fse(t)),Gn(t)?(s=us(t),s.x+=t.clientLeft,s.y+=t.clientTop):a&&(s.x=ek(a))),{x:r.left+o.scrollLeft-s.x,y:r.top+o.scrollTop-s.y,width:r.width,height:r.height}}function gse(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 hse(e){var t=gse(e);return Aoe.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function bse(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function vse(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 sC={placement:"bottom",modifiers:[],strategy:"absolute"};function lC(){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 yse(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,i=r===void 0?sC:r;return function(s,l,u){u===void 0&&(u=i);var c={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},sC),i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],p=!1,m={state:c,setOptions:function(h){S(),c.options=Object.assign(Object.assign(Object.assign({},i),c.options),h),c.scrollParents={reference:ls(s)?Co(s):s.contextElement?Co(s.contextElement):[],popper:Co(l)};var f=hse(vse([].concat(a,c.options.modifiers)));return c.orderedModifiers=f.filter(function(g){return g.enabled}),b(),m.update()},forceUpdate:function(){if(!p){var h=c.elements,f=h.reference,g=h.popper;if(lC(f,g)){c.rects={reference:mse(f,wl(g),c.options.strategy==="fixed"),popper:Xw(g)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var y=0;y<c.orderedModifiers.length;y++){if(c.reset===!0){c.reset=!1,y=-1;continue}var w=c.orderedModifiers[y],_=w.fn,k=w.options,A=k===void 0?{}:k,C=w.name;typeof _=="function"&&(c=_({state:c,options:A,name:C,instance:m})||c)}}}},update:bse(function(){return new Promise(function(I){m.forceUpdate(),I(c)})}),destroy:function(){S(),p=!0}};if(!lC(s,l))return m;m.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,g=f===void 0?{}:f,y=I.effect;if(typeof y=="function"){var w=y({state:c,name:h,instance:m,options:g}),_=function(){};d.push(w||_)}})}function S(){d.forEach(function(I){return I()}),d=[]}return m}}var Sse=[Goe,lse,Boe,$oe,ose,tse,dse,Uoe,rse],Ese=yse({defaultModifiers:Sse});const _se=["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"],wse=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=_se.find(r=>r.includes(`${a}-${n}`))??a),a},Az=(e,t,n)=>{if(e.length===0||e[0].split("-")[0]==="auto")return n;const{reference:a,popper:r}=t.rects,i=xi({...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]:Az(e.slice(1),t,n)},uC="fallbackModifier",cC={name:uC,enabled:!0,phase:"main",data:{_skip:!1},fn({state:e,options:t}){const n=e.options.placement,{fallbackPlacements:a}=t,r=[n,wse(n),...a||[]],i=Az(r,e,n);e.placement!==i&&(e.modifiersData[uC]._skip=!0,e.placement=i,e.reset=!0)}},Nz=["top","right","bottom","left"],nk=Q.forwardRef(({portal:e=!0,open:t=!0,...n},a)=>t?v.jsx(Tse,{ref:a,portal:e,...n}):null),kse=e=>{if(e!==null)return"current"in e?e.current||void 0:e},Ise={},Tse=Q.forwardRef(({anchorElement:e,getAnchorClientRect:t,popperOptions:n=Ise,placement:a="bottom",fallbackPlacements:r=Nz,onPlacementChange:i,children:o,portal:s,popperInstanceRef:l},u)=>{const c=Q.useRef(!0),{localRef:d,elementRef:p}=Yd(l),[m,b]=Q.useState(a),S=tie(u,e),I=Q.useRef(a);I.current=m;const h=Q.useMemo(()=>({name:"setPlacement",enabled:!0,phase:"afterWrite",fn({state:g}){b(g.placement),i==null||i(g.placement)}}),[b,i]);Q.useLayoutEffect(()=>{const g=t?{getBoundingClientRect:t}:kse(e??null);if(!g){console.warn("Popper: neither anchorElement or getAnchorClientRect was defined. A valid anchorElement or getAnchorClientRect callback must be provided to render a Popper");return}if(S.current){const y=Ese(g,S.current,{placement:a,...n,modifiers:[h,{...cC,options:{fallbackPlacements:r}},...n.modifiers||[]]});return p(y),()=>{y==null||y.destroy()}}},[e,t,S]),Q.useLayoutEffect(()=>{var g;c.current||(g=d.current)==null||g.setOptions({placement:a,...n,modifiers:[h,{...cC,options:{fallbackPlacements:r}},...n.modifiers||[]]}),c.current=!1},[n,a,r,h,d]);const f=v.jsx(v.Fragment,{children:xse(o)?o({placement:m}):o});return s?By.createPortal(f,S.current):f});function xse(e){return typeof e=="function"}function Da(e,t,n){let a=n.initialDeps??[],r;function i(){var o,s,l,u;let c;n.key&&((o=n.debug)!=null&&o.call(n))&&(c=Date.now());const d=e();if(!(d.length!==a.length||d.some((b,S)=>a[S]!==b)))return r;a=d;let m;if(n.key&&((s=n.debug)!=null&&s.call(n))&&(m=Date.now()),r=t(...d),n.key&&((l=n.debug)!=null&&l.call(n))){const b=Math.round((Date.now()-c)*100)/100,S=Math.round((Date.now()-m)*100)/100,I=S/16,h=(f,g)=>{for(f=String(f);f.length<g;)f=" "+f;return f};console.info(`%c⏱ ${h(S,5)} /${h(b,5)} ms`,`
|
|
316
316
|
font-size: .6rem;
|
|
317
317
|
font-weight: bold;
|
|
318
|
-
color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,r),r}return i.updateDeps=o=>{a=o},i}function dC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Rse=(e,t)=>Math.abs(e-t)<=1,Ase=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},pC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Nse=e=>e,Cse=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},Ose=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(pC(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(pC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},fC={passive:!0},mC=typeof window>"u"?!0:"onscrollend"in window,$se=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&mC?()=>{}:Ase(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:d,isRtl:p}=e.options;r=d?n.scrollLeft*(p&&-1||1):n.scrollTop,i(),t(r,c)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,fC);const u=e.options.useScrollendEvent&&mC;return u&&n.addEventListener("scrollend",l,fC),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},Lse=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Dse=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class Mse{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Nse,rangeExtractor:Cse,onChange:()=>{},measureElement:Lse,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Da(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Da(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Da(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=i(c),p=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),m=p?p.end+this.options.gap:a+r,b=s.get(d),S=typeof b=="number"?b:this.options.estimateSize(c),I=m+S,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:m,size:S,end:I,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Da(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?Pse({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Da(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Da(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return dC(a[Cz(0,a.length-1,r=>dC(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const u=this.getOffsetForIndex(n,s);if(!u)return;const[c]=u,d=this.getScrollOffset();Rse(c,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const Cz=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function Pse({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=Cz(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(c=>c<n+t);){const c=e[s];l[c.lane]=c.end,s++}const u=Array(a).fill(n+t);for(;o>=0&&u.some(c=>c>=n);){const c=e[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const gC=typeof document<"u"?Q.useLayoutEffect:Q.useEffect;function Use(e){const t=Q.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?By.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=Q.useState(()=>new Mse(n));return a.setOptions(n),gC(()=>a._didMount(),[]),gC(()=>a._willUpdate()),a}function zse(e){return Use({observeElementRect:Ose,observeElementOffset:$se,scrollToFn:Dse,...e})}const Mb=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Pb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",Fse={items:[]},nu=Gr({defaultConfig:{...Fse,id:"",getId:Mb,getTextValue:Pb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Wd(e.id),n=F.useRef(Mb),a=F.useRef(Pb);n.current=e.getId||Mb,a.current=e.getTextValue||e.getId||Pb;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,g)=>({id:n.current(f),index:g,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),m=zse({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:m,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(g=>g.concat({...f,value:f,index:g.length}))},unregisterItem(f){p(g=>g.find(y=>y.id===f.id)?g.filter(y=>y.id!==f.id):g)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),jse=e=>e,Xd=()=>0,Jd=(e,{state:t})=>t.items.length-1,Bse=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return Xd()},qse=(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 Jd(e,{state:t})},Gse=(e,{state:t})=>t.columnCount?e%t.columnCount:Xd(),Hse=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:Jd(e,{state:t}),Vse=(e,{state:t})=>t.items.find(n=>n.id===e),Wse=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",uc=(e,t)=>e.cursorId&&typeof e.cursorId=="string"?e.cursorId===t:e.cursorId.includes(t),So=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return Xd();if(e===-1)return Jd(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?So(e)(i,{state:n},a-1):i},Zse=jse({getFirst:Xd,getLast:Jd,getItem:Vse,getNext:So(1),getNextRow:(e,{state:t})=>So(t.columnCount)(e,{state:t}),getPrevious:So(-1),getPreviousRow:(e,{state:t})=>So(-t.columnCount)(e,{state:t}),getPreviousPage:Gse,getNextPage:Hse,getFirstOfRow:Bse,getLastOfRow:qse}),ru=Gr({defaultConfig:{...nu.defaultConfig,initialCursorId:"",columnCount:0,navigation:Zse,pageSize:0},requiredConfig:nu.requiredConfig,contextOverride:nu.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=nu(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const m=((b=u.items[p])==null?void 0:b.id)||"";n(m)};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 m=u.items.findIndex(b=>b.id===p.id);l(m)},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}}),Yse=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),Oz={select(e){return{selectedIds:[e],unselectedIds:[]}}},Kse={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:[]}}},Ub=Gr({defaultConfig:{...ru.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:Oz},requiredConfig:ru.requiredConfig,contextOverride:ru.Context})(e=>{const t=ru(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}}),Xa=Gr({defaultConfig:{UNSTABLE_parentModel:void 0,...Ub.defaultConfig},requiredConfig:Ub.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Ub(e)})),ku=F.createContext({});function Xse(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 v.jsx(ku.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 v.jsx(ku.Provider,{value:{item:a},children:r},a.id||a.index)}):v.jsx(ku.Provider,{value:{},children:t})}const Qd=Me()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(ku),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Yd(Yi(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return $ae(()=>{var S;if((o==null?void 0:o.index)===0&&((S=u.current)!=null&&S.clientHeight),i)return;const p=a.indexRef.current,m=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===m))return;const b={id:m,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(m),()=>{r.unregisterItem({id:m})}}),{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:UU(`${a.id}-${s}`)}}),Vv={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"}},Jse={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},hC={...Vv.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},zb={Home:"goToFirst",End:"goToLast"},bC=(e,t)=>e.hasOwnProperty(t);function Qse(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in zb)if(bC(zb,l)&&e.key===l)return(i=(r=t.events)[zb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?hC:Vv[t.state.orientation],a=$U(e.currentTarget);for(const l in n)if(bC(n,l)&&(a?e.key===Jse[l]:e.key===l)){const u=t.state.columnCount>0?hC[l]:Vv[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const $z=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>$z(e,t-1)),n==null||n("Retry timeout")},ele=(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="${CU(`${u}-${o.id}`)}"]`);$z(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),Lz=Me()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&ele(e,Wse(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){Qse(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":UU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&uc(e.state,n["data-id"])?0:-1:0}}),tle=Me()(({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})}}}),nle=Me()((e,t,n={})=>{const a=n["data-id"]||"";return{className:uc(e.state,a)?"focus":""}}),rle=nn("li")({displayName:"Item",modelHook:Xa,elemPropsHook:Qd})((e,t)=>v.jsx(t,{...st(e)})),ale=Me()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),ile=at({base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlockStart:W.zero,marginBlockEnd:W.zero}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),ole=Zd("ul")({displayName:"ListBox",modelHook:Xa,elemPropsHook:ale,subComponents:{Item:rle}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>v.jsx("div",{ref:l.state.containerRef,...ka({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},ile({orientation:l.state.orientation})),children:v.jsx(s,{...st(o),"data-part":"list",children:Xse(l,o.children)})})),Pt=Gr({defaultConfig:{...Xa.defaultConfig,...ea.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Xa.requiredConfig,...ea.requiredConfig},contextOverride:ea.Context})(e=>{const t=Xa(Xa.mergeConfig(e,{selection:e.mode==="single"?Oz:Kse})),n=ea(ea.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));YU(n),KU(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}}),Dz=eie,Mz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},sle=nn("div")({modelHook:Pt,elemPropsHook:Dz})(({children:e,...t})=>v.jsx(nk,{placement:"bottom-start",popperOptions:Mz,...t,children:e})),Pz=Me()(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)}}})),lle=Ki(Pz,nie),ule=Ki(Pz,rie),cle=nn(Sz)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:lle})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),dle=nn(Sz)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:ule})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),vC={vertical:"bottom",horizontal:"center"},Wv=Qr("positionX","positionY"),ple=lae({"0%":{opacity:0,transform:`translate(${Wv.positionX}, ${Wv.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),fle=at({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({...We.subtext.medium,display:"inline-flex",position:"relative",padding:W.x3,color:G.text.inverse,animationName:ple,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:G.text.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:El.x1,outline:`${ze(1)} solid transparent`,outlineOffset:`-${ze(1)}`,zIndex:-1,margin:W.x1,backgroundColor:G.bg.translucent,position:"absolute",top:0,left:0,right:0,bottom:0},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Ot.negate(W.x1)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Ot.negate(W.x1)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Ot.negate(W.x1)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Ot.negate(W.x1)}}),modifiers:{elementHasFocus:{true:{padding:Ot.subtract(W.x4,Ot.divide(W.x1,2)),"&:before":{margin:Ot.add(W.x1,Ot.divide(W.x1,2))}}}}}),mle=qe("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=vC,elementHasFocus:n=!1,...a},r,i)=>{const o=Rae(t||vC,z(W.x2));return v.jsx(i,{ref:r,...st(a,[fle({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),Wv({positionX:o.x,positionY:o.y})]),children:e})}}),yC=(e,t=0)=>{const n=Q.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return Q.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},gle=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 hle({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=Q.useRef(!1),i=ea(),[o,s]=Q.useState(null),l=Wd(),u=yC(i.events.hide,a),c=yC(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},m=f=>{s(f.currentTarget),p()},b=f=>{r.current||m(f),r.current=!1},S=f=>{r.current=!0,gle(f.currentTarget)&&i.events.hide()};KU(i),YU(i),Xae(i),Jae(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:m,onMouseLeave:d,onMouseDown:S,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 Uz=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=Uz(e.children[n]);if(a)return a}return null}return null},zz=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=zz(e.children[n]);if(a)return a}return null},SC=e=>{const t=zz(e)||Uz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function ble(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=LU(t[r],e[r]):a[r]=t[r],a),{})}const rk=({placement:e="top",fallbackPlacements:t=Nz,children:n,...a})=>{const[r,i]=Q.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=hle({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),SC(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),SC(p)&&o.onFocus(d)};return v.jsxs(Q.Fragment,{children:[Q.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...ble({...o,onMouseEnter:u,onFocus:c},n.props)}),v.jsx(nk,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=bz(d);return v.jsx(mle,{transformOrigin:p,...l,...a,children:r})}})]})},kl=at({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({...We.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:W.x4,padding:`${W.x2} ${W.x4}`,boxSizing:"border-box",cursor:"pointer",color:G.fg.default,borderWidth:0,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:W.x10,overflowWrap:"anywhere",[Je.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:oc.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:ut.dark,backgroundColor:ut.lightest,[`& :where(${n})`]:{opacity:oc.full},"&:where(.focus, :focus-visible)":{[Je.vars.color]:ut.accent,outline:"none",backgroundColor:ut.base,color:Je.vars.color}},"&:is(.hover, :hover)":{color:G.fg.strong,backgroundColor:Xn.lightest},"&:is(.focus, :focus-visible)":{color:ut.accent,backgroundColor:ut.base,outline:`${ze(2)} solid transparent`,outlineOffset:`-${ze(2)}`},"&:is(:disabled, [aria-disabled=true])":{color:G.fg.disabled,cursor:"default","&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:ut.light}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),vle=e=>v.jsx(Zw,{...kl.parts.icon,...e}),Fz=qe("span")({Component:({...e},t,n)=>v.jsx(n,{ref:t,...kl.parts.text,...ka(e)})}),jz=qe("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>v.jsx(r,{ref:a,"aria-disabled":t,...st(n,kl({})),children:typeof e=="string"?v.jsx(Fz,{children:e}):e})}),Bz=Me()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),qz=Me()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Yd(t),i=n["data-id"];return Q.useLayoutEffect(()=>{e.state.mode==="single"&&uc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:uc(e.state,n["data-id"])?"focus":void 0}});function Gz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),Gz(e.UNSTABLE_parentModel))}const yle=Ki(Me()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),Gz(e))}:void 0})),qz,Bz,tle,Lz,Qd),Ri=nn("button")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:yle,subComponents:{Icon:vle,Text:Fz}})(({children:e,...t},n)=>v.jsx(rk,{placement:"left",children:v.jsx(jz,{as:n,...t,children:e})})),Sle=at({vars:{minWidth:ze(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({...We.subtext.large,color:G.text.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:W.zero,maxWidth:Ot.subtract("100vw",W.x8),boxShadow:Dre[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Ele=Me()(()=>({})),Hz=nn("div")({displayName:"Menu.Card",modelHook:Pt,elemPropsHook:Ele})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=Q.useMemo(()=>bz(r.state.placement||"bottom"),[r.state.placement]);return v.jsx(ioe,{as:a,...st(n,Sle({minWidth:typeof e=="number"?ze(e):e,maxHeight:typeof t=="number"?ze(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),_le=Ki(Me()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),aie,Qae),wle=at({base:{background:G.bg.default,borderRadius:El.zero,padding:W.zero,gap:W.zero},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Vz=nn("div")({displayName:"Menu.List",modelHook:Pt,elemPropsHook:_le})(({children:e,...t},n,a)=>v.jsx(ole,{as:n,model:a,marginY:z(W.x2),...ka(t,wle({orientation:a.state.orientation})),children:e})),kle=at({base:{display:"block",height:ze(1),border:W.zero,borderTop:`${ze(1)} solid ${G.border.divider}`,margin:`${W.x2} ${W.zero}`}}),Wz=qe("hr")({displayName:"Menu.Divider",Component({...e},t,n){return v.jsx(n,{ref:t,...ka(e,kle())})}}),Zz=qe("span")({Component:({...e},t,n)=>v.jsxs(v.Fragment,{children:[v.jsx(Ri.Text,{ref:t,as:n,...e}),v.jsx(Zw,{...kl.parts.selected,icon:poe})]})}),Ile=qe("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...st(t,kl()),children:typeof e=="string"?v.jsx(Zz,{children:e}):e})}),Tle=Ki(Me()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Yse(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),nle,Qd),Yz=nn("li")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:Tle,subComponents:{Icon:Ri.Icon,Text:Zz}})(({children:e,...t},n)=>v.jsx(rk,{placement:"left",children:v.jsx(Ile,{as:n,...t,children:e})})),Kz=Gr({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Wd(e.id)},events:{}})),xle=at({base:{...We.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:W.x4,padding:`${W.x2} ${W.x4}`,boxSizing:"border-box",fontWeight:Jr.bold}}),Rle=Me()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Ale=Me()(e=>({id:e.state.id})),EC=nn("div")({modelHook:Kz,elemPropsHook:Ale})(({children:e,...t},n)=>v.jsx(rk,{children:v.jsx(n,{...st(t,xle()),children:e})})),Xz=Zd("div")({displayName:"Menu.Group",modelHook:Kz,elemPropsHook:Rle,subComponents:{Heading:EC}})(({children:e,title:t,...n},a)=>v.jsxs(a,{...st(n),children:[t?v.jsx(EC,{children:t}):null,e]})),Nle=nn("div")({modelHook:Pt,elemPropsHook:Dz})(({children:e,...t})=>v.jsx(nk,{placement:"right-start",popperOptions:Mz,...t,children:e})),Cle=(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}},Ole=Ki(Jl(e=>e.UNSTABLE_parentModel,qz),Jl(e=>e.UNSTABLE_parentModel,Bz),Jl(e=>e.UNSTABLE_parentModel,Lz),Me()((e,t)=>({ref:Yi(t,e.state.targetRef)})),Jl(e=>e.UNSTABLE_parentModel,Qd),Me()(e=>{const t=F.useRef(),n=Cle(()=>{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}}}})),$le=nn("button")({modelHook:Pt,elemPropsHook:Ole})(({children:e,...t},n)=>v.jsxs(jz,{as:n,...t,children:[typeof e=="string"?v.jsx(Ri.Text,{children:e}):e,v.jsx(Ri.Icon,{icon:foe})]})),Lle=nn()({modelHook:Pt,subComponents:{Card:Hz,List:Vz,Item:Ri,TargetItem:$le,Group:Xz,Option:Yz,Divider:Wz,Popper:Nle}})(({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 v.jsx(o.Provider,{value:i,children:e})}),U=Zd()({displayName:"Menu",modelHook:Pt,subComponents:{Target:cle,Card:Hz,List:Vz,Item:Ri,Group:Xz,Option:Yz,Divider:Wz,TargetContext:dle,Popper:sle,Submenu:Lle}})(({children:e})=>v.jsx(v.Fragment,{children:e})),ak=()=>{const[e,t]=F.useState("");return v.jsxs(U,{onSelect:n=>t(n.id),children:[v.jsx(U.Target,{children:"Open Menu"}),v.jsx(U.Popper,{children:v.jsx(U.Card,{children:v.jsxs(U.List,{children:[v.jsx(U.Item,{children:"First Item"}),v.jsx(U.Item,{children:"Second Item"}),v.jsx(U.Divider,{}),v.jsx(U.Item,{children:"Third Item (with a really, really, really long label)"}),v.jsx(U.Item,{"aria-disabled":!0,children:"Fourth Item"})]})})}),v.jsxs(Ta,{size:"small",marginTop:"s",children:["Selected: ",v.jsx("span",{"data-testid":"output",children:e})]})]})};ak.__RAW__=`import React from 'react';
|
|
318
|
+
color: hsl(${Math.max(0,Math.min(120-120*I,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(u=n==null?void 0:n.onChange)==null||u.call(n,r),r}return i.updateDeps=o=>{a=o},i}function dC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Rse=(e,t)=>Math.abs(e-t)<=1,Ase=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},pC=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Nse=e=>e,Cse=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},Ose=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:s,height:l}=o;t({width:Math.round(s),height:Math.round(l)})};if(r(pC(n)),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const s=()=>{const l=o[0];if(l!=null&&l.borderBoxSize){const u=l.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(pC(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},fC={passive:!0},mC=typeof window>"u"?!0:"onscrollend"in window,$se=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=e.options.useScrollendEvent&&mC?()=>{}:Ase(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=c=>()=>{const{horizontal:d,isRtl:p}=e.options;r=d?n.scrollLeft*(p&&-1||1):n.scrollTop,i(),t(r,c)},s=o(!0),l=o(!1);l(),n.addEventListener("scroll",s,fC);const u=e.options.useScrollendEvent&&mC;return u&&n.addEventListener("scrollend",l,fC),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},Lse=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Dse=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class Mse{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{const o=()=>{this._measureElement(i.target,i)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})}));return{disconnect:()=>{var r;(r=a())==null||r.disconnect(),n=null},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r>"u"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Nse,rangeExtractor:Cse,onChange:()=>{},measureElement:Lse,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var a,r;(r=(a=this.options).onChange)==null||r.call(a,this,n)},this.maybeNotify=Da(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const a=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==a){if(this.cleanup(),!a){this.maybeNotify();return}this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,i)=>{this.scrollAdjustments=0,this.scrollDirection=i?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=i,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const s=n[o];if(r.has(s.lane))continue;const l=i.get(s.lane);if(l==null||s.end>l.end?i.set(s.lane,s):s.end<l.end&&r.set(s.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,s)=>o.end===s.end?o.index-s.index:o.end-s.end)[0]:void 0},this.getMeasurementOptions=Da(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,a,r,i,o)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o}),{key:!1}),this.getMeasurements=Da(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i,enabled:o},s)=>{if(!o)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const d=i(c),p=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),m=p?p.end+this.options.gap:a+r,b=s.get(d),S=typeof b=="number"?b:this.options.estimateSize(c),I=m+S,h=p?p.lane:c%this.options.lanes;u[c]={index:c,start:m,size:S,end:I,key:d,lane:h}}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Da(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,a,r,i)=>this.range=n.length>0&&a>0?Pse({measurements:n,outerSize:a,scrollOffset:r,lanes:i}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Da(()=>{let n=null,a=null;const r=this.calculateRange();return r&&(n=r.startIndex,a=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,a]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,a]},(n,a,r,i,o)=>i===null||o===null?[]:n({startIndex:i,endIndex:o,overscan:a,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.indexFromElement(n),i=this.measurementsCache[r];if(!i)return;const o=i.key,s=this.elementsCache.get(o);s!==n&&(s&&this.observer.unobserve(s),this.observer.observe(n),this.elementsCache.set(o,n)),n.isConnected&&this.resizeItem(r,this.options.measureElement(n,a,this))},this.resizeItem=(n,a)=>{const r=this.measurementsCache[n];if(!r)return;const i=this.itemSizeCache.get(r.key)??r.size,o=a-i;o!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,o,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,a)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}this._measureElement(n,void 0)},this.getVirtualItems=Da(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const s=n[i],l=a[s];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();if(a.length!==0)return dC(a[Cz(0,a.length-1,r=>dC(a[r]).start,n)])},this.getOffsetForAlignment=(n,a,r=0)=>{const i=this.getSize(),o=this.getScrollOffset();a==="auto"&&(a=n>=o+i?"end":"start"),a==="center"?n+=(r-i)/2:a==="end"&&(n-=i);const s=this.getTotalSize()-i;return Math.max(Math.min(s,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=this.measurementsCache[n];if(!r)return;const i=this.getSize(),o=this.getScrollOffset();if(a==="auto")if(r.end>=o+i-this.options.scrollPaddingEnd)a="end";else if(r.start<=o+this.options.scrollPaddingStart)a="start";else return[o,a];const s=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,a,r.size),a]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const i=this.getOffsetForIndex(n,a);if(!i)return;const[o,s]=i;this._scrollToOffset(o,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(n))){const u=this.getOffsetForIndex(n,s);if(!u)return;const[c]=u,d=this.getScrollOffset();Rse(c,d)||this.scrollToIndex(n,{align:s,behavior:r})}else this.scrollToIndex(n,{align:s,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var n;const a=this.getMeasurements();let r;if(a.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((n=a[a.length-1])==null?void 0:n.end)??0;else{const i=Array(this.options.lanes).fill(null);let o=a.length-1;for(;o>=0&&i.some(s=>s===null);){const s=a[o];i[s.lane]===null&&(i[s.lane]=s.end),o--}r=Math.max(...i.filter(s=>s!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const Cz=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function Pse({measurements:e,outerSize:t,scrollOffset:n,lanes:a}){const r=e.length-1,i=l=>e[l].start;if(e.length<=a)return{startIndex:0,endIndex:r};let o=Cz(0,r,i,n),s=o;if(a===1)for(;s<r&&e[s].end<n+t;)s++;else if(a>1){const l=Array(a).fill(0);for(;s<r&&l.some(c=>c<n+t);){const c=e[s];l[c.lane]=c.end,s++}const u=Array(a).fill(n+t);for(;o>=0&&u.some(c=>c>=n);){const c=e[o];u[c.lane]=c.start,o--}o=Math.max(0,o-o%a),s=Math.min(r,s+(a-1-s%a))}return{startIndex:o,endIndex:s}}const gC=typeof document<"u"?Q.useLayoutEffect:Q.useEffect;function Use(e){const t=Q.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?By.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=Q.useState(()=>new Mse(n));return a.setOptions(n),gC(()=>a._didMount(),[]),gC(()=>a._willUpdate()),a}function zse(e){return Use({observeElementRect:Ose,observeElementOffset:$se,scrollToFn:Dse,...e})}const Mb=e=>e===void 0?"":typeof e=="string"?e:e.id||"",Pb=e=>typeof e=="string"?e:e===void 0?"":e.text||"",Fse={items:[]},nu=Gr({defaultConfig:{...Fse,id:"",getId:Mb,getTextValue:Pb,nonInteractiveIds:[],orientation:"vertical",defaultItemHeight:50,shouldVirtualize:!0}})(e=>{var h;const t=Wd(e.id),n=F.useRef(Mb),a=F.useRef(Pb);n.current=e.getId||Mb,a.current=e.getTextValue||e.getId||Pb;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,g)=>({id:n.current(f),index:g,value:f,textValue:a.current(f)})),[e.items]),[d,p]=F.useState([]),m=zse({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:m,UNSTABLE_defaultItemHeight:i,containerRef:u,id:t,orientation:r,indexRef:l,nonInteractiveIds:e.nonInteractiveIds||[],isVirtualized:s},events:{registerItem(f){l.current++,p(g=>g.concat({...f,value:f,index:g.length}))},unregisterItem(f){p(g=>g.find(y=>y.id===f.id)?g.filter(y=>y.id!==f.id):g)},updateItemHeight(f){o(f.value)}},getId:e.getId,getTextValue:e.getTextValue}}),jse=e=>e,Xd=()=>0,Jd=(e,{state:t})=>t.items.length-1,Bse=(e,{state:t})=>{if(t.columnCount){const n=e%t.columnCount;return e-n}return Xd()},qse=(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 Jd(e,{state:t})},Gse=(e,{state:t})=>t.columnCount?e%t.columnCount:Xd(),Hse=(e,{state:t})=>t.columnCount?t.items.length-t.columnCount+e%t.columnCount:Jd(e,{state:t}),Vse=(e,{state:t})=>t.items.find(n=>n.id===e),Wse=e=>typeof e.cursorId=="string"?e.cursorId:e.cursorId.slice(-1)[0]||"",uc=(e,t)=>{const{cursorId:n}=e;return n==null||n===""?!1:typeof n=="string"?n===t:n.includes(t)},So=e=>(t,{state:n},a=n.items.length)=>{if(Number.isNaN(t)){if(e===1)return Xd();if(e===-1)return Jd(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?So(e)(i,{state:n},a-1):i},Zse=jse({getFirst:Xd,getLast:Jd,getItem:Vse,getNext:So(1),getNextRow:(e,{state:t})=>So(t.columnCount)(e,{state:t}),getPrevious:So(-1),getPreviousRow:(e,{state:t})=>So(-t.columnCount)(e,{state:t}),getPreviousPage:Gse,getNextPage:Hse,getFirstOfRow:Bse,getLastOfRow:qse}),ru=Gr({defaultConfig:{...nu.defaultConfig,initialCursorId:"",columnCount:0,navigation:Zse,pageSize:0},requiredConfig:nu.requiredConfig,contextOverride:nu.Context})(e=>{var d;const[t,n]=F.useState(e.initialCursorId),a=F.useRef(e.pageSize),r=e.columnCount||0,i=nu(e),o=e.navigation,s=F.useRef(-1),l=p=>{var b;const m=((b=u.items[p])==null?void 0:b.id)||"";n(m)};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 m=u.items.findIndex(b=>b.id===p.id);l(m)},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}}),Yse=(e,{selectedIds:t,unselectedIds:n})=>t==="all"?!n.includes(e):t.includes(e),Oz={select(e){return{selectedIds:[e],unselectedIds:[]}}},Kse={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:[]}}},Ub=Gr({defaultConfig:{...ru.defaultConfig,initialSelectedIds:[],initialUnselectedIds:[],selection:Oz},requiredConfig:ru.requiredConfig,contextOverride:ru.Context})(e=>{const t=ru(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}}),Xa=Gr({defaultConfig:{UNSTABLE_parentModel:void 0,...Ub.defaultConfig},requiredConfig:Ub.requiredConfig})(e=>({UNSTABLE_parentModel:e.UNSTABLE_parentModel,...Ub(e)})),ku=F.createContext({});function Xse(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 v.jsx(ku.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 v.jsx(ku.Provider,{value:{item:a},children:r},a.id||a.index)}):v.jsx(ku.Provider,{value:{},children:t})}const Qd=Me()((e,t,n={})=>{const{state:a,events:r}=e,{item:i,virtual:o}=F.useContext(ku),[s,l]=F.useState(n["data-id"]||(i==null?void 0:i.id)||""),{localRef:u,elementRef:c}=Yd(Yi(t,o?e.state.UNSTABLE_virtual.measureElement:null)),d=o?{position:"absolute",top:0,left:0,transform:`translateY(${o.start}px)`}:{};return $ae(()=>{var S;if((o==null?void 0:o.index)===0&&((S=u.current)!=null&&S.clientHeight),i)return;const p=a.indexRef.current,m=s||(n["data-has-children"]?`${a.id}-`:"")+String(p);if(a.items.find(I=>I.id===m))return;const b={id:m,textValue:n["data-text"]?n["data-text"]:typeof n.children=="string"?n.children:""};return r.registerItem(b),l(m),()=>{r.unregisterItem({id:m})}}),{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:UU(`${a.id}-${s}`)}}),Vv={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"}},Jse={ArrowLeft:"ArrowRight",Left:"Right",ArrowRight:"ArrowLeft",Right:"Left",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",Home:"Home",End:"End",PageDown:"PageDown",PageUp:"PageUp"},hC={...Vv.horizontal,Home:"goToFirstOfRow",End:"goToLastOfRow",ArrowUp:"goToPreviousRow",Up:"goToPreviousRow",ArrowDown:"goToNextRow",Down:"goToNextRow"},zb={Home:"goToFirst",End:"goToLast"},bC=(e,t)=>e.hasOwnProperty(t);function Qse(e,t){var r,i,o,s;if(e.ctrlKey){for(const l in zb)if(bC(zb,l)&&e.key===l)return(i=(r=t.events)[zb[l]])==null||i.call(r),!0}const n=t.state.columnCount>0?hC:Vv[t.state.orientation],a=$U(e.currentTarget);for(const l in n)if(bC(n,l)&&(a?e.key===Jse[l]:e.key===l)){const u=t.state.columnCount>0?hC[l]:Vv[t.state.orientation][l];if(t.events[u])return(s=(o=t.events)[u])==null||s.call(o),!0}return!1}const $z=(e,t,n)=>{e()===!1&&t>1&&requestAnimationFrame(()=>$z(e,t-1)),n==null||n("Retry timeout")},ele=(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="${CU(`${u}-${o.id}`)}"]`);$z(()=>{const u=l(i)||l(e.state.id);return u&&(u.focus(),a(u)),!!u},5,r)}}),Lz=Me()((e,t,n={})=>{const a=F.useRef(e.state);a.current=e.state;const r=F.useRef(null);return F.useEffect(()=>{r.current&&ele(e,Wse(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){Qse(i,e)&&(i.preventDefault(),r.current=i.currentTarget)},onClick(){e.events.goTo({id:n["data-id"]})},"data-focus-id":UU(`${e.state.id}-${n["data-id"]}`),tabIndex:e.state.cursorId?n["data-id"]&&uc(e.state,n["data-id"])?0:-1:0}}),tle=Me()(({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})}}}),nle=Me()((e,t,n={})=>{const a=n["data-id"]||"";return{className:uc(e.state,a)?"focus":""}}),rle=nn("li")({displayName:"Item",modelHook:Xa,elemPropsHook:Qd})((e,t)=>v.jsx(t,{...st(e)})),ale=Me()(e=>({style:{position:"relative",height:e.state.isVirtualized?e.state.UNSTABLE_virtual.getTotalSize():void 0}})),ile=at({base:{'& :where([data-part="list"])':{display:"flex",flexDirection:"column",marginBlockStart:W.zero,marginBlockEnd:W.zero}},modifiers:{orientation:{vertical:{overflowY:"auto"},horizontal:{overflowY:void 0,'& :where([data-part="list"])':{flexDirection:"row"}}}}}),ole=Zd("ul")({displayName:"ListBox",modelHook:Xa,elemPropsHook:ale,subComponents:{Item:rle}})(({height:e,maxHeight:t,marginY:n,marginBottom:a,overflowY:r,marginTop:i,...o},s,l)=>v.jsx("div",{ref:l.state.containerRef,...ka({style:{height:e,maxHeight:t,marginBottom:a??n,marginTop:i??n}},ile({orientation:l.state.orientation})),children:v.jsx(s,{...st(o),"data-part":"list",children:Xse(l,o.children)})})),Pt=Gr({defaultConfig:{...Xa.defaultConfig,...ea.defaultConfig,mode:"single",shouldVirtualize:!1},requiredConfig:{...Xa.requiredConfig,...ea.requiredConfig},contextOverride:ea.Context})(e=>{const t=Xa(Xa.mergeConfig(e,{selection:e.mode==="single"?Oz:Kse})),n=ea(ea.mergeConfig(e,{id:t.state.id,onHide(){t.state.indexRef.current=0}}));YU(n),KU(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}}),Dz=eie,Mz={modifiers:[{name:"offset",options:{offset:()=>[0,4]}}]},sle=nn("div")({modelHook:Pt,elemPropsHook:Dz})(({children:e,...t})=>v.jsx(nk,{placement:"bottom-start",popperOptions:Mz,...t,children:e})),Pz=Me()(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)}}})),lle=Ki(Pz,nie),ule=Ki(Pz,rie),cle=nn(Sz)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:lle})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),dle=nn(Sz)({displayName:"Menu.Target",modelHook:Pt,elemPropsHook:ule})(({children:e,...t},n)=>v.jsx(n,{...t,children:e})),vC={vertical:"bottom",horizontal:"center"},Wv=Qr("positionX","positionY"),ple=lae({"0%":{opacity:0,transform:`translate(${Wv.positionX}, ${Wv.positionY})`},"100%":{opacity:1,transform:"translate(0)"}}),fle=at({vars:{tooltipTransformOriginHorizontal:"",tooltipTransformOriginVertical:""},base:({tooltipTransformOriginHorizontal:e,tooltipTransformOriginVertical:t})=>({...We.subtext.medium,display:"inline-flex",position:"relative",padding:W.x3,color:G.text.inverse,animationName:ple,animationDuration:"150ms",animationTimingFunction:"ease-out",transformOrigin:`${t} ${e}`,a:{color:G.text.inverse,textDecoration:"underline"},"&:before":{content:'""',borderRadius:El.x1,outline:`${ze(1)} solid transparent`,outlineOffset:`-${ze(1)}`,zIndex:-1,margin:W.x1,backgroundColor:G.bg.translucent,position:"absolute",top:0,left:0,right:0,bottom:0},"[data-popper-reference-hidden] &":{visibility:"hidden",pointerEvents:"none"},'[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &':{left:Ot.negate(W.x1)},'[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &':{right:Ot.negate(W.x1)},'[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &':{top:Ot.negate(W.x1)},'[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &':{bottom:Ot.negate(W.x1)}}),modifiers:{elementHasFocus:{true:{padding:Ot.subtract(W.x4,Ot.divide(W.x1,2)),"&:before":{margin:Ot.add(W.x1,Ot.divide(W.x1,2))}}}}}),mle=qe("div")({displayName:"TooltipContainer",Component:({children:e,transformOrigin:t=vC,elementHasFocus:n=!1,...a},r,i)=>{const o=Rae(t||vC,z(W.x2));return v.jsx(i,{ref:r,...st(a,[fle({tooltipTransformOriginHorizontal:t==null?void 0:t.horizontal,tooltipTransformOriginVertical:t==null?void 0:t.vertical,elementHasFocus:n}),Wv({positionX:o.x,positionY:o.y})]),children:e})}}),yC=(e,t=0)=>{const n=Q.useRef(),a=()=>{n.current=window.setTimeout(e,t)},r=()=>{window.clearTimeout(n.current),n.current=void 0};return Q.useEffect(()=>()=>{window.clearTimeout(n.current)},[n]),{start:a,clear:r}},gle=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 hle({type:e="label",titleText:t="",showDelay:n=300,hideDelay:a=100}={}){const r=Q.useRef(!1),i=ea(),[o,s]=Q.useState(null),l=Wd(),u=yC(i.events.hide,a),c=yC(i.events.show,n),d=()=>{u.start(),c.clear()},p=()=>{c.start(),u.clear()},m=f=>{s(f.currentTarget),p()},b=f=>{r.current||m(f),r.current=!1},S=f=>{r.current=!0,gle(f.currentTarget)&&i.events.hide()};KU(i),YU(i),Xae(i),Jae(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:m,onMouseLeave:d,onMouseDown:S,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 Uz=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=Uz(e.children[n]);if(a)return a}return null}return null},zz=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=zz(e.children[n]);if(a)return a}return null},SC=e=>{const t=zz(e)||Uz(e);return t?t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight:!1};function ble(e,t,n=Object.keys(t)){return n.reduce((a,r)=>(typeof e[r]=="function"?a[r]=LU(t[r],e[r]):a[r]=t[r],a),{})}const rk=({placement:e="top",fallbackPlacements:t=Nz,children:n,...a})=>{const[r,i]=Q.useState(""),{targetProps:o,popperProps:s,tooltipProps:l}=hle({type:"muted"}),u=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),SC(p)&&o.onMouseEnter(d)},c=d=>{const p=d.currentTarget;i(p instanceof HTMLElement?p.innerText:""),SC(p)&&o.onFocus(d)};return v.jsxs(Q.Fragment,{children:[Q.cloneElement(n,{...o,onMouseEnter:u,onFocus:c,"aria-label":void 0,...ble({...o,onMouseEnter:u,onFocus:c},n.props)}),v.jsx(nk,{placement:e,fallbackPlacements:t,...s,children:({placement:d})=>{const p=bz(d);return v.jsx(mle,{transformOrigin:p,...l,...a,children:r})}})]})},kl=at({parts:{text:"menu-item-text",icon:"menu-item-icon",selected:"menu-item-selected"},base:({textPart:e,iconPart:t,selectedPart:n})=>({...We.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:W.x4,padding:`${W.x2} ${W.x4}`,boxSizing:"border-box",cursor:"pointer",color:G.fg.default,borderWidth:0,textAlign:"start",transition:"background-color 80ms, color 80ms",backgroundColor:"inherit",minHeight:W.x10,overflowWrap:"anywhere",[Je.vars.color]:"currentColor",[`& :where(${n})`]:{transition:"opacity 80ms linear",opacity:oc.zero},"&:where(:has(span))":{display:"flex"},"&[aria-selected=true]":{color:ut.dark,backgroundColor:ut.lightest,[`& :where(${n})`]:{opacity:oc.full},"&:where(.focus, :focus-visible)":{[Je.vars.color]:ut.accent,outline:"none",backgroundColor:ut.base,color:Je.vars.color}},"&:is(.hover, :hover)":{color:G.fg.strong,backgroundColor:Xn.lightest},"&:is(.focus, :focus-visible)":{color:ut.accent,backgroundColor:ut.base,outline:`${ze(2)} solid transparent`,outlineOffset:`-${ze(2)}`},"&:is(:disabled, [aria-disabled=true])":{color:G.fg.disabled,cursor:"default","&:where(.hover, :hover, [aria-selected=true])":{background:"none"},"&:where(.focus, :focus-visible)":{backgroundColor:ut.light}},[`& :where(${e})`]:{flexGrow:1,alignSelf:"center"},[`& :where(${t})`]:{alignSelf:"start"}})}),vle=e=>v.jsx(Zw,{...kl.parts.icon,...e}),Fz=qe("span")({Component:({...e},t,n)=>v.jsx(n,{ref:t,...kl.parts.text,...ka(e)})}),jz=qe("button")({displayName:"MenuItem",Component:({children:e,isDisabled:t,...n},a,r)=>v.jsx(r,{ref:a,"aria-disabled":t,...st(n,kl({})),children:typeof e=="string"?v.jsx(Fz,{children:e}):e})}),Bz=Me()(e=>({onKeyDown(t){const n=getComputedStyle(t.currentTarget);t.key==="ArrowLeft"&&n.direction==="ltr"&&e.UNSTABLE_parentModel&&e.events.hide(t)}})),qz=Me()((e,t,n={"data-id":""})=>{const{localRef:a,elementRef:r}=Yd(t),i=n["data-id"];return Q.useLayoutEffect(()=>{e.state.mode==="single"&&uc(e.state,i)&&requestAnimationFrame(()=>{var o;(o=a.current)==null||o.focus()})},[i,a,e.state.cursorId,e.state.mode]),{ref:r,className:uc(e.state,n["data-id"])?"focus":void 0}});function Gz(e){e.UNSTABLE_parentModel&&(e.UNSTABLE_parentModel.events.hide(),Gz(e.UNSTABLE_parentModel))}const yle=Ki(Me()(e=>({role:"menuitem",onMouseDown(t){e.events.goTo({id:t.currentTarget.getAttribute("data-id")})},onClick:e.state.mode==="single"?t=>{t.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.hide(t),Gz(e))}:void 0})),qz,Bz,tle,Lz,Qd),Ri=nn("button")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:yle,subComponents:{Icon:vle,Text:Fz}})(({children:e,...t},n)=>v.jsx(rk,{placement:"left",children:v.jsx(jz,{as:n,...t,children:e})})),Sle=at({vars:{minWidth:ze(1),transformOriginVertical:"top",transformOriginHorizontal:"left",maxHeight:""},base:({transformOriginVertical:e,transformOriginHorizontal:t,minWidth:n,maxHeight:a})=>({...We.subtext.large,color:G.text.default,position:"relative",display:"flex",flexDirection:"column",transition:"transform ease-out 150ms",padding:W.zero,maxWidth:Ot.subtract("100vw",W.x8),boxShadow:Dre[3],minWidth:n,maxHeight:a,transformOrigin:`${e} ${t}`,".wd-no-animation &":{animation:"none"}})}),Ele=Me()(()=>({})),Hz=nn("div")({displayName:"Menu.Card",modelHook:Pt,elemPropsHook:Ele})(({minWidth:e,maxHeight:t,...n},a,r)=>{const i=Q.useMemo(()=>bz(r.state.placement||"bottom"),[r.state.placement]);return v.jsx(ioe,{as:a,...st(n,Sle({minWidth:typeof e=="number"?ze(e):e,maxHeight:typeof t=="number"?ze(t):t,transformOriginVertical:i.vertical,transformOriginHorizontal:i.horizontal})),children:n.children})}),_le=Ki(Me()(e=>({role:"menu","aria-labelledby":e.state.id,"aria-orientation":e.state.orientation})),aie,Qae),wle=at({base:{background:G.bg.default,borderRadius:El.zero,padding:W.zero,gap:W.zero},modifiers:{orientation:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),Vz=nn("div")({displayName:"Menu.List",modelHook:Pt,elemPropsHook:_le})(({children:e,...t},n,a)=>v.jsx(ole,{as:n,model:a,marginY:z(W.x2),...ka(t,wle({orientation:a.state.orientation})),children:e})),kle=at({base:{display:"block",height:ze(1),border:W.zero,borderTop:`${ze(1)} solid ${G.border.divider}`,margin:`${W.x2} ${W.zero}`}}),Wz=qe("hr")({displayName:"Menu.Divider",Component({...e},t,n){return v.jsx(n,{ref:t,...ka(e,kle())})}}),Zz=qe("span")({Component:({...e},t,n)=>v.jsxs(v.Fragment,{children:[v.jsx(Ri.Text,{ref:t,as:n,...e}),v.jsx(Zw,{...kl.parts.selected,icon:poe})]})}),Ile=qe("li")({displayName:"MenuOption",Component:({children:e,...t},n,a)=>v.jsx(a,{ref:n,...st(t,kl()),children:typeof e=="string"?v.jsx(Zz,{children:e}):e})}),Tle=Ki(Me()((e,t,n={})=>{const a=n["data-id"]||"";return{role:"option","aria-selected":Yse(a,e.state),onMouseDown:o=>{o.button===0&&o.currentTarget.getAttribute("aria-disabled")!=="true"&&(e.events.select({id:a}),e.state.mode==="single"&&e.events.hide(o)),o.preventDefault()}}}),nle,Qd),Yz=nn("li")({displayName:"Menu.Item",modelHook:Pt,elemPropsHook:Tle,subComponents:{Icon:Ri.Icon,Text:Zz}})(({children:e,...t},n)=>v.jsx(rk,{placement:"left",children:v.jsx(Ile,{as:n,...t,children:e})})),Kz=Gr({defaultConfig:{id:void 0},requiredConfig:{}})(e=>({state:{id:Wd(e.id)},events:{}})),xle=at({base:{...We.subtext.large,display:"flex",alignItems:"center",width:"100%",gap:W.x4,padding:`${W.x2} ${W.x4}`,boxSizing:"border-box",fontWeight:Jr.bold}}),Rle=Me()(e=>({"data-type":"group",role:"group","aria-labelledby":e.state.id})),Ale=Me()(e=>({id:e.state.id})),EC=nn("div")({modelHook:Kz,elemPropsHook:Ale})(({children:e,...t},n)=>v.jsx(rk,{children:v.jsx(n,{...st(t,xle()),children:e})})),Xz=Zd("div")({displayName:"Menu.Group",modelHook:Kz,elemPropsHook:Rle,subComponents:{Heading:EC}})(({children:e,title:t,...n},a)=>v.jsxs(a,{...st(n),children:[t?v.jsx(EC,{children:t}):null,e]})),Nle=nn("div")({modelHook:Pt,elemPropsHook:Dz})(({children:e,...t})=>v.jsx(nk,{placement:"right-start",popperOptions:Mz,...t,children:e})),Cle=(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}},Ole=Ki(Jl(e=>e.UNSTABLE_parentModel,qz),Jl(e=>e.UNSTABLE_parentModel,Bz),Jl(e=>e.UNSTABLE_parentModel,Lz),Me()((e,t)=>({ref:Yi(t,e.state.targetRef)})),Jl(e=>e.UNSTABLE_parentModel,Qd),Me()(e=>{const t=F.useRef(),n=Cle(()=>{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}}}})),$le=nn("button")({modelHook:Pt,elemPropsHook:Ole})(({children:e,...t},n)=>v.jsxs(jz,{as:n,...t,children:[typeof e=="string"?v.jsx(Ri.Text,{children:e}):e,v.jsx(Ri.Icon,{icon:foe})]})),Lle=nn()({modelHook:Pt,subComponents:{Card:Hz,List:Vz,Item:Ri,TargetItem:$le,Group:Xz,Option:Yz,Divider:Wz,Popper:Nle}})(({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 v.jsx(o.Provider,{value:i,children:e})}),U=Zd()({displayName:"Menu",modelHook:Pt,subComponents:{Target:cle,Card:Hz,List:Vz,Item:Ri,Group:Xz,Option:Yz,Divider:Wz,TargetContext:dle,Popper:sle,Submenu:Lle}})(({children:e})=>v.jsx(v.Fragment,{children:e})),ak=()=>{const[e,t]=F.useState("");return v.jsxs(U,{onSelect:n=>t(n.id),children:[v.jsx(U.Target,{children:"Open Menu"}),v.jsx(U.Popper,{children:v.jsx(U.Card,{children:v.jsxs(U.List,{children:[v.jsx(U.Item,{children:"First Item"}),v.jsx(U.Item,{children:"Second Item"}),v.jsx(U.Divider,{}),v.jsx(U.Item,{children:"Third Item (with a really, really, really long label)"}),v.jsx(U.Item,{"aria-disabled":!0,children:"Fourth Item"})]})})}),v.jsxs(Ta,{size:"small",marginTop:"s",children:["Selected: ",v.jsx("span",{"data-testid":"output",children:e})]})]})};ak.__RAW__=`import React from 'react';
|
|
319
319
|
|
|
320
320
|
import {Menu} from '@workday/canvas-kit-react/menu';
|
|
321
321
|
import {BodyText} from '@workday/canvas-kit-react/text';
|