@leostera/evalkit 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cli.mjs +641 -172
- package/dist/cli.mjs.map +1 -1
- package/dist/dashboard/assets/index-CMr4aulR.css +2 -0
- package/dist/dashboard/assets/{index-BYSEeNaZ.js → index-CVd_Np_w.js} +7 -7
- package/dist/dashboard/index.html +2 -2
- package/package.json +1 -1
- package/dist/dashboard/assets/index-fUDsY6z-.css +0 -2
|
@@ -16,15 +16,15 @@ https://kumo.cfops.it/utilities/link-provider
|
|
|
16
16
|
|
|
17
17
|
Migration example:
|
|
18
18
|
Before: <Link to="/page">…</Link>
|
|
19
|
-
After: <Link href="/page">…</Link>`)},[]);let o={"data-kumo-component":`Link`,className:J(Ti({variant:t}),`group/link inline-flex items-center gap-[0.1875em] has-[>[data-kumo-component=Badge]]:rounded-full`)};return xi({render:n??(0,Y.jsx)(a,{}),ref:i,props:Qr(o,r,{className:e})})});Ei.displayName=`Link`;var Di=Object.assign(Ei,{ExternalIcon:Si}),Oi={size:{sm:{value:16,description:`Small loader for inline use`},base:{value:24,description:`Default loader size`},lg:{value:32,description:`Large loader for prominent loading states`}}},ki={size:`base`};function Ai({size:e=ki.size}={}){return typeof e==`number`?e:vr(Oi.size,e,ki.size).value}var ji=({className:e,size:t=ki.size,"aria-label":n=`Loading`})=>{let r=Ai({size:t});return(0,Y.jsxs)(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,className:e,role:`status`,"aria-label":n,children:[(0,Y.jsxs)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,Y.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`2s`,repeatCount:`indefinite`}),(0,Y.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`0 150;42 150;42 150`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`}),(0,Y.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0;-16;-59`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`})]}),(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,opacity:.1,strokeWidth:`2`,strokeLinecap:`round`})]})},Mi=(0,_.createContext)(null);function Ni(){return(0,_.useContext)(Mi)}var X=typeof document<`u`?_.useLayoutEffect:()=>{},Pi={..._},Fi=c(m(),1);function Ii(){return typeof window<`u`}function Li(e){return Bi(e)?(e.nodeName||``).toLowerCase():`#document`}function Ri(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){return((Bi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Bi(e){return Ii()?e instanceof Node||e instanceof Ri(e).Node:!1}function Vi(e){return Ii()?e instanceof Element||e instanceof Ri(e).Element:!1}function Hi(e){return Ii()?e instanceof HTMLElement||e instanceof Ri(e).HTMLElement:!1}function Ui(e){return!Ii()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ri(e).ShadowRoot}function Wi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gi(e){return/^(table|td|th)$/.test(Li(e))}function Ki(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qi=/transform|translate|scale|rotate|perspective|filter/,Ji=/paint|layout|strict|content/,Yi=e=>!!e&&e!==`none`,Xi;function Zi(e){let t=Vi(e)?ta(e):e;return Yi(t.transform)||Yi(t.translate)||Yi(t.scale)||Yi(t.rotate)||Yi(t.perspective)||!$i()&&(Yi(t.backdropFilter)||Yi(t.filter))||qi.test(t.willChange||``)||Ji.test(t.contain||``)}function Qi(e){let t=ra(e);for(;Hi(t)&&!ea(t);){if(Zi(t))return t;if(Ki(t))return null;t=ra(t)}return null}function $i(){return Xi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Xi}function ea(e){return/^(html|body|#document)$/.test(Li(e))}function ta(e){return Ri(e).getComputedStyle(e)}function na(e){return Vi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ra(e){if(Li(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ui(e)&&e.host||zi(e);return Ui(t)?t.host:t}function ia(e){let t=ra(e);return ea(t)?(e.ownerDocument||e).body:Hi(t)&&Wi(t)?t:ia(t)}function aa(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ia(e),i=r===e.ownerDocument?.body,a=Ri(r);if(i){let e=oa(a);return t.concat(a,a.visualViewport||[],Wi(r)?r:[],e&&n?aa(e):[])}return t.concat(r,aa(r,[],n))}function oa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var sa=Math.min,ca=Math.max,la=Math.round,ua=Math.floor,da=e=>({x:e,y:e}),fa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function pa(e,t,n){return ca(e,sa(t,n))}function ma(e,t){return typeof e==`function`?e(t):e}function ha(e){return e.split(`-`)[0]}function ga(e){return e.split(`-`)[1]}function _a(e){return e===`x`?`y`:`x`}function va(e){return e===`y`?`height`:`width`}function ya(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ba(e){return _a(ya(e))}function xa(e,t,n){n===void 0&&(n=!1);let r=ga(e),i=ba(e),a=va(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Aa(o)),[o,Aa(o)]}function Sa(e){let t=Aa(e);return[Ca(e),t,Ca(t)]}function Ca(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var wa=[`left`,`right`],Ta=[`right`,`left`],Ea=[`top`,`bottom`],Da=[`bottom`,`top`];function Oa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ta:wa:t?wa:Ta;case`left`:case`right`:return t?Ea:Da;default:return[]}}function ka(e,t,n,r){let i=ga(e),a=Oa(ha(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ca)))),a}function Aa(e){let t=ha(e);return fa[t]+e.slice(t.length)}function ja(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ma(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ja(e)}function Na(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Pa(e,t,n){let{reference:r,floating:i}=e,a=ya(t),o=ba(t),s=va(o),c=ha(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ga(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Fa(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ma(t,e),p=Ma(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Na(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ia=50,La=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Fa},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Pa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ia&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Pa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ra=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ma(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ha(r),_=ya(o),v=ha(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Aa(o)]:Sa(o)),x=p!==`none`;!d&&x&&b.push(...ka(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=xa(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ya(t)||T.every(e=>ya(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ya(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},za=new Set([`left`,`top`]);async function Ba(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ha(n),s=ga(n),c=ya(n)===`y`,l=za.has(o)?-1:1,u=a&&c?-1:1,d=ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Va=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ba(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ha=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ma(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ya(i),p=_a(f),m=u[p],h=u[f],g=(e,t)=>pa(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ua=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ma(e,t),u={x:n,y:r},d=ya(i),f=_a(d),p=u[f],m=u[d],h=ma(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=za.has(ha(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wa=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ma(e,t),c=await i.detectOverflow(t,s),l=ha(n),u=ga(n),d=ya(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=sa(p-c[m],g),y=sa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ca(c.left,c.right):S=p-2*ca(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ga(e){let t=ta(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Hi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=la(n)!==a||la(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ka(e){return Vi(e)?e:e.contextElement}function qa(e){let t=Ka(e);if(!Hi(t))return da(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ga(t),o=(a?la(n.width):n.width)/r,s=(a?la(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ja=da(0);function Ya(e){let t=Ri(e);return!$i()||!t.visualViewport?Ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xa(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ri(e)}function Za(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ka(e),o=da(1);t&&(r?Vi(r)&&(o=qa(r)):o=qa(e));let s=Xa(a,n,r)?Ya(a):da(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ri(a),t=Vi(r)?Ri(r):r,n=e,i=oa(n);for(;i&&t!==n;){let e=qa(i),t=i.getBoundingClientRect(),r=ta(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ri(i),i=oa(n)}}return Na({width:u,height:d,x:c,y:l})}function Qa(e,t){let n=na(e).scrollLeft;return t?t.left+n:Za(zi(e)).left+n}function $a(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qa(e,n),y:n.top+t.scrollTop}}function eo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=zi(r),s=t?Ki(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=da(1),u=da(0),d=Hi(r);if((d||!a)&&((Li(r)!==`body`||Wi(o))&&(c=na(r)),d)){let e=Za(r);l=qa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$a(o,c):da(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function to(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function no(e){let t=na(e),n=e.ownerDocument.body,r=ca(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ca(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qa(e),o=-t.scrollTop;return ta(n).direction===`rtl`&&(a+=ca(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ro=25;function io(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ri(e),a=zi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!$i()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qa(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ro&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ao(e,t){let n=Za(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qa(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function oo(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=io(e,n,t);else if(t===`document`)r=no(zi(e));else if(Vi(t))r=ao(t,n);else{let n=Ya(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Na(r)}function so(e,t){let n=t.get(e);if(n)return n;let r=aa(e,[],!1).filter(e=>Vi(e)&&Li(e)!==`body`),i=null,a=ta(e).position===`fixed`,o=a?ra(e):e;for(;Vi(o)&&!ea(o);){let e=ta(o),t=Zi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ra(o)}return t.set(e,r),r}function co(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ki(t)?[]:so(t,this._c):[].concat(n),r],o=oo(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=oo(t,a[e],i);s=ca(n.top,s),c=sa(n.right,c),l=sa(n.bottom,l),u=ca(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function lo(e){let{width:t,height:n}=Ga(e);return{width:t,height:n}}function uo(e,t,n){let r=Hi(t),i=zi(t),a=n===`fixed`,o=Za(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=da(0);if((r||!a)&&((Li(t)!==`body`||Wi(i))&&(s=na(t)),r)){let e=Za(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qa(i));let l=i&&!r&&!a?$a(i,s):da(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function fo(e){return ta(e).position===`static`}function po(e,t){if(!Hi(e)||ta(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function mo(e,t){let n=Ri(e);if(Ki(e))return n;if(!Hi(e)){let t=ra(e);for(;t&&!ea(t);){if(Vi(t)&&!fo(t))return t;t=ra(t)}return n}let r=po(e,t);for(;r&&Gi(r)&&fo(r);)r=po(r,t);return r&&ea(r)&&fo(r)&&!Zi(r)?n:r||Qi(e)||n}var ho=async function(e){let t=this.getOffsetParent||mo,n=this.getDimensions,r=await n(e.floating);return{reference:uo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function go(e){return ta(e).direction===`rtl`}var _o={convertOffsetParentRelativeRectToViewportRelativeRect:eo,getDocumentElement:zi,getClippingRect:co,getOffsetParent:mo,getElementRects:ho,getClientRects:to,getDimensions:lo,getScale:qa,isElement:Vi,isRTL:go};function vo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yo(e,t,n){let r=null,i,a=zi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ua(d),h=ua(a.clientWidth-(u+f)),g=ua(a.clientHeight-(d+p)),_=ua(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ca(0,sa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!vo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ri(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ka(e),u=i||a?[...l?aa(l):[],...t?aa(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?yo(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Za(e):null;c&&g();function g(){let t=Za(e);h&&!vo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xo=Va,So=Ha,Co=Ra,wo=Wa,To=Ua,Eo=(e,t,n)=>{let r=new Map,i=n??{},a={..._o,...i.platform,_c:r};return La(e,t,{...i,platform:a})},Do=typeof document<`u`?_.useLayoutEffect:function(){};function Oo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Oo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Oo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ko(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(e,t){let n=ko(e);return Math.round(t*n)/n}function jo(e){let t=_.useRef(e);return Do(()=>{t.current=e}),t}function Mo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Oo(f,r)||p(r);let[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=_.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||g,C=_.useRef(null),w=_.useRef(null),T=_.useRef(u),E=c!=null,D=jo(c),O=jo(i),k=jo(l),A=_.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Eo(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Oo(T.current,t)&&(T.current=t,Fi.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Do(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=_.useRef(!1);Do(()=>(j.current=!0,()=>{j.current=!1}),[]),Do(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=_.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=_.useMemo(()=>({reference:x,floating:S}),[x,S]),P=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Ao(N.floating,u.x),r=Ao(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ko(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var No=(e,t)=>{let n=xo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Po=(e,t)=>{let n=So(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fo=(e,t)=>({fn:To(e).fn,options:[e,t]}),Io=(e,t)=>{let n=Co(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lo=(e,t)=>{let n=wo(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ro(){if(typeof navigator>`u`)return{userAgent:``,platform:``,maxTouchPoints:0};{let e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `),platform:e.platform??navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:zo,platform:Bo,maxTouchPoints:Vo}=Ro(),Ho=zo.toLowerCase(),Uo=Bo.toLowerCase(),Wo=/^i(os$|p)/.test(Uo)||Uo===`macintel`&&Vo>1,Go=`android`,Ko=Uo===Go||Ho.includes(Go),qo=!Wo&&Uo.startsWith(`mac`);Uo.startsWith(`win`),!Ko&&/^(linux|chrome os)/.test(Uo);var Jo=qo||Wo,Yo=/jsdom|happydom/.test(Ho);function Xo(e){e.preventDefault(),e.stopPropagation()}function Zo(e){return`nativeEvent`in e}function Qo(e){return e.pointerType===``&&e.isTrusted?!0:Ko&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function $o(e){return Yo?!1:!Ko&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ko||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function es(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ts(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function ns(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ui(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function rs(e,t){let n=e;for(;n;){if(Vi(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ui(n)?n.host:null)}return null}function is(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var as=`data-base-ui-focusable`,os=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ss=`ArrowLeft`,cs=`ArrowRight`,ls=`ArrowUp`,us=`ArrowDown`,ds=`data-starting-style`,fs=`data-ending-style`,ps={[ds]:``},ms={[fs]:``},hs={transitionStatus(e){return e===`starting`?ps:e===`ending`?ms:null}},gs=`data-open`,_s=`data-closed`,vs=`data-anchor-hidden`,ys=`data-popup-open`,bs=`data-pressed`,xs={[ys]:``},Ss={[ys]:``,[bs]:``},Cs={[gs]:``},ws={[_s]:``},Ts={[vs]:``},Es={open(e){return e?xs:null}},Ds={open(e){return e?Ss:null}},Os={open(e){return e?Cs:ws},anchorHidden(e){return e?Ts:null}},ks={...Os,...hs},As=`data-trigger-disabled`;function js(e,t){if(!Vi(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(As);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(As);return!1}function Ms(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ns(e){return e.matches(`html,body`)}function Ps(e){return Hi(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Fs(e){return rs(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${os}`)!=null}function Is(e){return e?e.getAttribute(`role`)===`combobox`&&Ps(e):!1}function Ls(e){if(!e||Yo)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Rs(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function zs(e){return e?.ownerDocument||document}function Bs(e,t){return t<0||t>=e.length}function Vs(e,t){return Ws(e.current,{disabledIndices:t})}function Hs(e,t){return Ws(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Us(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Ws(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Bs(e,u)?-1:u,wrapped:d}}function Ws(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Gs(e,a,r));return a}function Gs(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!qs(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ks(e){return e.visibility===`hidden`||e.visibility===`collapse`}function qs(e,t=e?ta(e):null){return!e||!e.isConnected||!t||Ks(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Js=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ys(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ui(n)?n.host:null}function Xs(e){for(let t of Array.from(e.children))if(Li(t)===`summary`)return t;return null}function Zs(e,t){let n=Xs(t);return!!n&&(e===n||Z(n,e))}function Qs(e){let t=e?Li(e):``;return e!=null&&e.matches(Js)&&(t!==`summary`||e.parentElement!=null&&Li(e.parentElement)===`details`&&Xs(e.parentElement)===e)&&(t!==`details`||Xs(e)==null)&&(t!==`input`||e.type!==`hidden`)}function $s(e){if(!Qs(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ys(t)){let n=t!==e,r=Li(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Li(t)===`details`&&!t.open&&!Zs(e,t)||t.hasAttribute(`hidden`)||!r&&!ec(t,n))return!1}return!0}function ec(e,t){let n=ta(e);return t?n.display!==`none`:qs(e,n)}function tc(e){let t=e.tabIndex;if(t<0){let t=Li(e);if(t===`details`||t===`audio`||t===`video`||Hi(e)&&e.isContentEditable)return 0}return t}function nc(e){if(Li(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function rc(e,t){let n=nc(e);if(!n)return!0;let r=t.find(e=>{let t=nc(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=nc(e);return t?.name===n.name&&t.form===n.form})===n}function ic(e){if(Hi(e)&&Li(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Hi(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ac(e,t){ic(e).forEach(e=>{Qs(e)&&t.push(e),ac(e,t)})}function oc(e,t,n){ic(e).forEach(e=>{Hi(e)&&e.matches(t)&&n.push(e),oc(e,t,n)})}function sc(e){return $s(e)&&tc(e)>=0}function cc(e){let t=[];return ac(e,t),t.filter($s)}function lc(e){let t=cc(e);return t.filter(e=>tc(e)>=0&&rc(e,t))}function uc(e,t){let n=lc(e),r=n.length;if(r===0)return;let i=ns(zs(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function dc(e){return uc(zs(e).body,1)||e}function fc(e){return uc(zs(e).body,-1)||e}function pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function mc(e){lc(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function hc(e){let t=[];oc(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var gc=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!gc&&Ho.includes(`firefox`),!gc&&Ho.includes(`chrom`);function _c(e,t,n,r){let i=!1,a=!1,o=r??qr;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var vc=`none`,yc=`trigger-press`,bc=`trigger-hover`,xc=`trigger-focus`,Sc=`outside-press`,Cc=`item-press`,wc=`focus-out`,Tc=`escape-key`,Ec=`list-navigation`,Dc=`cancel-open`,Oc=`disabled`,kc=`imperative-action`,Ac=`window-resize`;function jc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Mc(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Nc=Pi.useInsertionEffect,Pc=Nc&&Nc!==Pi.useLayoutEffect?Nc:e=>e();function Q(e){let t=jr(Fc).current;return t.next=e,Pc(t.effect),t.trampoline}function Fc(){let e={next:void 0,callback:Ic,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ic(){throw Error(`Base UI: Cannot call an event handler while rendering.`)}var Lc={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Rc={...Lc,position:`fixed`,margin:0,top:0,left:0},zc={...Lc,position:`absolute`};function Bc(){let[,e]=_.useState({});return _.useCallback(()=>{e({})},[])}var Vc=0;function Hc(e,t=`mui`){let n=_.useRef(void 0),r=Bc(),i=e??n.current;return _.useEffect(()=>{n.current??(Vc+=1,n.current=`${t}-${Vc}`,e??r())},[e,t,r]),i}var Uc=Pi.useId;function Wc(e,t){if(Uc!==void 0){let n=Uc();return e??(t?`${t}-${n}`:n)}return Hc(e,t)}function Gc(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Kc=_.createContext(null);Kc.displayName=`FloatingNodeContext`;var qc=_.createContext(null);qc.displayName=`FloatingTreeContext`;var Jc=()=>_.useContext(Kc)?.id||null,Yc=e=>{let t=_.useContext(qc);return e??t},Xc=o((e=>{var t=f();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Zc=o(((e,t)=>{t.exports=Xc()})),Qc=o((e=>{var t=f(),n=Zc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),$c=o(((e,t)=>{t.exports=Qc()})),el=Zc(),tl=$c(),nl=[],rl=void 0;function il(){return rl}function al(e){nl.push(e)}function ol(e){let t=(t,n)=>{let r=jr(cl).current,i;try{rl=r;for(let e of nl)e.before(r);i=e(t,n);for(let e of nl)e.after(r);r.didInitialize=!0}finally{rl=void 0}return i};return t.displayName=e.displayName||e.name,t}function sl(e){return _.forwardRef(ol(e))}function cl(){return{didInitialize:!1}}var ll=Jo,ul=_.forwardRef(function(e,t){let[n,r]=_.useState();X(()=>{ll&&gc&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:Rc,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});ul.displayName=`FocusGuard`;function dl(e){return`data-base-ui-${e}`}var fl={style:{transition:`none`}},pl={fallbackAxisSide:`none`},ml={fallbackAxisSide:`end`},hl={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},gl=_.createContext(null);gl.displayName=`PortalContext`;var _l=()=>_.useContext(gl),vl=dl(`portal`);function yl(e={}){let{ref:t,container:n,componentProps:r=qr,elementProps:i}=e,a=Wc(),o=_l()?.portalNode,[s,c]=_.useState(null),[l,u]=_.useState(null),d=Q(e=>{e!==null&&u(e)}),f=_.useRef(null);X(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Bi(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=di(`div`,r,{ref:[t,d],props:[{id:a,[vl]:``},i]}),m=s&&p?Fi.createPortal(p,s):null;return{node:l,nodeId:_.isValidElement(p)?p.props.id:void 0,subtree:m}}var bl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=yl({container:o,ref:t,componentProps:e,elementProps:c}),f=_.useRef(null),p=_.useRef(null),m=_.useRef(null),h=_.useRef(null),[g,v]=_.useState(null),y=_.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;_.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&pc(e)&&(e.type===`focusin`?y.current&&=(hc(l),!1):(mc(l),y.current=!0))}return Mc(jc(l,`focusin`,e,!0),jc(l,`focusout`,e,!0))},[l,b]),X(()=>{l&&x===!0&&y.current&&(hc(l),y.current=!1)},[x,l]);let C=_.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:v}),[l]);return(0,Y.jsxs)(_.Fragment,{children:[d,(0,Y.jsxs)(gl.Provider,{value:C,children:[S&&l&&(0,Y.jsx)(ul,{"data-type":`outside`,ref:f,onFocus:e=>{pc(e,l)?m.current?.focus():fc(g?g.domReference:null)?.focus()}}),S&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:hl}),l&&Fi.createPortal(a,l),S&&l&&(0,Y.jsx)(ul,{"data-type":`outside`,ref:p,onFocus:e=>{pc(e,l)?h.current?.focus():(dc(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,_c(`focus-out`,e.nativeEvent)))}})]})]})});bl.displayName=`FloatingPortal`;var xl;function Sl(e){xl??=new WeakMap;let t=xl.get(e);return t||(t=new WeakMap,xl.set(e,t)),t}var Cl=class{idMap=new Map;add(e,t){{let n=Sl(this),r=n.get(t);if(r!==void 0&&r!==e)throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`);let i=this.idMap.get(e);i!==void 0&&i!==t&&n.delete(i),n.set(t,e)}this.idMap.set(e,t)}delete(e){{let t=this.idMap.get(e);t!==void 0&&xl?.get(this)?.delete(t)}this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},wl=zr(19)?Dl:Ol;function Tl(e,t,n,r,i){return wl(e,t,n,r,i)}function El(e,t,n,r,i){let a=_.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,el.useSyncExternalStore)(e.subscribe,a,a)}al({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,el.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Dl(e,t,n,r,i){let a=il();if(!a)return El(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Ol(e,t,n,r,i){return(0,tl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var kl=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Tl(this,e,t,n,r)}},Al=class extends kl{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){_.useDebugValue(e);let n=this;X(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;X(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;{_.useDebugValue(e,e=>Object.keys(e));let t=_.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}X(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){_.useDebugValue(e);let n=this,r=t!==void 0;X(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r]);{let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${n?``:`un`}controlled state of ${e.toString()} to be ${n?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return _.useDebugValue(e),Tl(this,this.selectors[e],t,n,r)}useContextCallback(e,t){_.useDebugValue(e);let n=Q(t??Gr);this.context[e]=n}useStateSetter(e){let t=_.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jl={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Ml=class extends Al{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Gc(),nested:n,triggerElements:i},jl),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ts(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Nl(e){_.useEffect(e,Kr)}var Pl=0,Fl=class e{static create(){return new e}currentId=Pl;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Pl,t()},e)}isStarted(){return this.currentId!==Pl}clear=()=>{this.currentId!==Pl&&(clearTimeout(this.currentId),this.currentId=Pl)};disposeEffect=()=>this.clear};function Il(){let e=jr(Fl.create).current;return Nl(e.disposeEffect),e}function Ll(e){let t=jr(Rl,e).current;return t.next=e,X(t.effect),t}function Rl(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var zl=null,Bl=globalThis.requestAnimationFrame,Vl=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=Bl!==requestAnimationFrame&&(Bl=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Hl=class e{static create(){return new e}static request(e){return Vl.request(e)}static cancel(e){return Vl.cancel(e)}currentId=zl;request(e){this.cancel(),this.currentId=Vl.request(()=>{this.currentId=zl,e()})}cancel=()=>{this.currentId!==zl&&(Vl.cancel(this.currentId),this.currentId=zl)};disposeEffect=()=>this.cancel};function Ul(){let e=jr(Hl.create).current;return Nl(e.disposeEffect),e}function Wl(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}function Gl(e){return e==null?e:`current`in e?e.current:e}var Kl=null;function ql(e){if(!Kl){let e=[];Kl=e,queueMicrotask(()=>{Kl=null,Fi.flushSync(()=>{for(let t of e)t()})})}Kl.push(e)}function Jl(e,t=!1,n=!1){let r=Ul();return Q((i,a=null)=>{r.cancel();let o=Gl(e);if(o==null)return;let s=o,c=()=>{n?ql(()=>{a?.aborted||i()}):Fi.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Wl(s).map(e=>e.finished.then(Gr))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Wl(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ds;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Yl(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Q(a),s=Jl(r,n,i);_.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Xl(e,t=!1,n=!1,r=!1){let[i,a]=_.useState(e&&t?`idle`:void 0),[o,s]=_.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),X(()=>{if(!e&&o&&i!==`ending`&&n){let e=Hl.request(()=>{a(`ending`)});return()=>{Hl.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=Hl.request(()=>{a(void 0)});return()=>{Hl.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Hl.request(()=>{a(`idle`)});return()=>{Hl.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Zl(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Zl(e,t.id,n)])}function Ql(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function $l(){return!1}function eu(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function tu(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=$l,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Yc(c),m=Q(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,v=Q(()=>a),{escapeKey:y,outsidePress:b}=eu(s),x=_.useRef(!1),S=_.useRef(!1),C=_.useRef(!1),w=_.useRef(!1),T=_.useRef(!1),E=_.useRef(``),D=_.useRef(null),O=Il(),k=Il(),A=Il(),j=Q(()=>{k.clear(),d.current.insideReactTree=!1}),M=Q(e=>{let t=d.current.floatingContext?.nodeId;return(p?Zl(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=Q(t=>Ms(t,e.select(`floatingElement`))||Ms(t,e.select(`domReferenceElement`))),P=Q(t=>{o()&&e.setOpen(!1,_c(yc,t.nativeEvent))}),F=Q(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Zo(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&M(`__escapeKeyBubbles`))return;let a=_c(Tc,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),I=Q(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=Q(t=>{if(!l||!n||t.button!==0)return;let r=is(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),R=Q(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});_.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),_.useEffect(()=>j,[j]),_.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=y,d.current.__outsidePressBubbles=b;let t=new Fl,i=zs(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(gc?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function _(e){let t=d.current.floatingContext?.nodeId,n=p&&Zl(p.nodesRef.current,t).some(t=>Ms(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=is(n),i=`[${dl(`inert`)}]`,a=Vi(r)?r.getRootNode():null,o=Array.from((Ui(a)?a:zs(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Vi(r)?r:null;for(;c&&!ea(c);){let e=ra(c);if(ea(e)||!Vi(e))break;c=e}if(!(o.length&&Vi(r)&&!Ns(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Hi(r)&&!(`touches`in n)){let e=ea(r),t=ta(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!_(n)){if(f()===`intentional`){if(n.detail!==0&&!Qo(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,_c(Sc,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=is(e);if(!n)return;let r=jc(n,e.type,()=>{t(e),r()})}function R(e){E.current=`touch`,L(e,I)}function z(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function B(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():_(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function V(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function H(e){L(e,V)}function U(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function ee(e){L(e,U)}let te=Mc(r&&Mc(jc(i,`keydown`,F),jc(i,`compositionstart`,a),jc(i,`compositionend`,o)),g&&Mc(jc(i,`click`,z,!0),jc(i,`pointerdown`,z,!0),jc(i,`pointerup`,B,!0),jc(i,`pointercancel`,B,!0),jc(i,`mousedown`,z,!0),jc(i,`mouseup`,B,!0),jc(i,`touchstart`,R,{capture:!0,passive:!0}),jc(i,`touchmove`,H,{capture:!0,passive:!0}),jc(i,`touchend`,ee,{capture:!0,passive:!0})));return()=>{te(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,y,b,F,j,v,M,N,p,e,O,A]);let z=_.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),B=_.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return _.useMemo(()=>n?{reference:z,floating:B,trigger:z}:{},[n,z,B])}function nu(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),X(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Vi(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function ru(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Q(i),{mounted:c,setMounted:l,transitionStatus:u}=Xl(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=_.useRef(c),p=_.useRef(!1),m=Bc(),h=()=>{f.current=!1,l(!1),a()};X(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Q(()=>{f.current&&(t?(p.current=!0,m()):h())});return Yl({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var iu={tabIndex:-1,[as]:``};function au(e,t=!1){let n=Wc(),r=Jc()!=null,i=jr(()=>e(n,r)).current;return nu({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ou({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function su(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function cu(e,t){let n=_.useRef(null);return Q(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),su(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),su(t))})}function lu(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function uu(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function du(e,t,n,r={}){let i=n.reason,a=i===bc,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=uu(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=lu(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Fi.flushSync(l):l()}function fu(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=cu(e,n),o=Q(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Q(e=>{a(e),e&&o(e)});return X(()=>(s(t.current),()=>s(null)),[s,t,n,e]),X(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function pu(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=_.useRef(null),i=e.useState(`open`);X(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=_c(vc);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function mu(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=ru({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return jr(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function hu(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:qr,inactiveTriggerProps:qr,popupProps:qr})},[e])}function gu(e,t){return t!=null&&!es(t)?0:typeof e==`function`?e():e}function _u(e,t,n){let r=gu(e,n);return typeof r==`number`?r:r?.[t]}function vu(e){return typeof e==`function`?e():e}function yu(e,t){return t||e===`click`||e===`mousedown`}function bu(e){return e?.includes(`mouse`)&&e!==`mousedown`}var xu=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Fl;restTimeout=new Fl;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Su=new WeakMap;function Cu(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Su.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Su.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function wu(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Su.get(n);a&&a!==e&&Cu(a),Cu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Su.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Tu(e){let t=e.context.dataRef.current,n=jr(()=>t.hoverInteractionState??xu.create()).current;return t.hoverInteractionState||=n,Nl(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Eu(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=Yc(),u=Jc(),d=Tu(e),f=Il(),p=Q(()=>yu(c.current.openEvent?.type,d.interactedInside)),m=Q(()=>bu(c.current.openEvent?.type)),h=Q(()=>{Cu(d)});X(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),_.useEffect(()=>h,[h]),X(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Vi(s)&&o){let e=s,t=o,n=zs(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??rs(e,`[data-rootownerid]`)??n.body;return wu(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),_.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Zl(l.nodesRef.current,u).length>0)}function a(t){let n=_u(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,_c(bc,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=is(e);Fs(t)?d.interactedInside=rs(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(js(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&Vi(o)&&Zl(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,_c(bc,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Mc(y&&jc(y,`mouseenter`,g),y&&jc(y,`mouseleave`,_),y&&jc(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Du={current:null};function Ou(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Du,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,v=Yc(l),y=Tu(e),b=_.useRef(!1),x=Ll(i),S=Ll(r),C=Ll(o),w=Ll(n),T=Ll(p),E=Ll(f),D=Q(()=>yu(h.current.openEvent?.type,y.interactedInside)),O=Q(()=>T.current?.()!==!1),k=Q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!Vi(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),A=Q(()=>{y.handler&&=(zs(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),j=Q(()=>{Cu(y)});return u&&(y.handleCloseOptions=i?.__options),_.useEffect(()=>A,[A]),_.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===bc,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,y,A]),_.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=_u(S.current,`close`,y.pointerType);r?y.openChangeTimeout.start(r,()=>{e.setOpen(!1,_c(bc,t)),v?.events.emit(`floating.closed`,t)}):n&&(y.openChangeTimeout.clear(),e.setOpen(!1,_c(bc,t)),v?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Vi(r))return;function i(t){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!es(y.pointerType))return;let n=vu(C.current),r=_u(S.current,`open`,y.pointerType),i=is(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Vi(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Vi(o)&&Vi(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&b.current,p=!l&&Vi(c)&&Vi(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,_c(bc,t,c)):m||(r?y.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,_c(bc,t,c))}):g&&O()&&e.setOpen(!0,_c(bc,t,c)))}function o(n){if(D()){j();return}A();let r=zs(e.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!js(n.relatedTarget,e.context.triggerElements)){if(x.current&&i){e.select(`open`)||y.openChangeTimeout.clear();let a=c.current;y.handler=x.current({...i,tree:v,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,y.handler),y.handler(n)}else y.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let f=m?jc(r,`mouseout`,l):void 0;return s?Mc(jc(r,`mousemove`,i,{once:!0}),jc(r,`mouseenter`,i),jc(r,`mouseleave`,o),f):Mc(jc(r,`mouseenter`,i),jc(r,`mouseleave`,o),f)},[A,j,h,S,e,n,x,y,u,k,D,a,s,C,c,v,w,d,E,O,m]),_.useMemo(()=>{if(!n)return;function t(e){y.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!es(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=y.handleCloseOptions?.getScope?.()??r.ownerDocument.body;wu(y,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=vu(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,D())return;let t=e.select(`open`);!y.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,_c(bc,n,r))}y.pointerType===`touch`?Fi.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[n,y,D,k,a,e,C,O])}var ku=.1,Au=ku*ku,ju=.5;function Mu(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Nu(e,t,n,r,i,a,o,s,c,l){let u=!1;return Mu(e,t,n,r,i,a)&&(u=!u),Mu(e,t,i,a,o,s)&&(u=!u),Mu(e,t,o,s,c,l)&&(u=!u),Mu(e,t,c,l,n,r)&&(u=!u),u}function Pu(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Fu(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Iu(e={}){let{blockPointerEvents:t=!1}=e,n=new Fl,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Au;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=is(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Vi(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Zl(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Fu(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Fu(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Fu(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Fu(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!Pu(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?ju/2:ju*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+ju+1,o=C||T?S.bottom-ju:S.top,s=C?T?S.bottom-ju:S.top:S.bottom-ju;M=Nu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?ju/2:ju*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-ju,o=C||T?S.top+ju:S.bottom,s=C?T?S.top+ju:S.bottom:S.top+ju;M=Nu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?ju/2:ju*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+ju+1,o=w||E?S.right-ju:S.left,s=w?E?S.right-ju:S.left:S.right-ju;M=Nu(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?ju/2:ju*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-ju,o=w||E?S.left+ju:S.right,s=w?E?S.left+ju:S.right:S.left+ju;M=Nu(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Lu(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ml({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:qr,inactiveTriggerProps:qr,popupProps:qr}}var Ru=e=>e.triggerIdProp??e.activeTriggerId,zu=e=>e.openProp??e.open,Bu=e=>(e.popupElement?.id??e.floatingId)||void 0;function Vu(e,t){return t!==void 0&&zu(e)&&Ru(e)===t}function Hu(e,t){return Vu(e,t)?!0:t!==void 0&&zu(e)&&Ru(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Uu={open:zu,mounted:e=>e.mounted,transitionStatus:e=>zu(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Ru,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Bu,isTriggerActive:(e,t)=>t!==void 0&&Ru(e)===t,isOpenedByTrigger:(e,t)=>Vu(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Ru(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Hu(e,t)?Bu(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Wu(e){let t=_.useCallback(t=>e===void 0?Gr:e.subscribeStore(t),[e]),n=_.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,el.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Gu=qo&&gc;function Ku(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=_.useRef(!1),s=_.useRef(null),c=_.useRef(!0),l=Il();_.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ri(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Hi(t)&&t===ns(zs(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Mc(jc(r,`blur`,i),Gu&&jc(r,`keydown`,a,!0),Gu&&jc(r,`pointerdown`,l,!0))},[e,n]),_.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Vi(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=_.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=is(n.nativeEvent);if(Vi(a)){if(Gu&&!n.relatedTarget){if(!c.current&&!Ps(a))return}else if(!Ls(a))return}let u=js(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,_c(xc,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,_c(xc,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Vi(r)&&r.hasAttribute(dl(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=ns(zs(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||js(r??n,e.context.triggerElements)||e.setOpen(!1,_c(xc,i))})}}},[a,r,e,l]);return _.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}function qu(e){return Wc(e,`base-ui`)}var Ju=_.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=yl({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(_.Fragment,{children:[l,c&&Fi.createPortal(n,c)]})});Ju.displayName=`FloatingPortalLite`;var Yu=_.createContext(void 0);Yu.displayName=`DirectionContext`;function Xu(){return _.useContext(Yu)?.direction??`ltr`}function Zu(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=_.useState(null),d=_.useRef(null),f=Yc(n),p=_.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Mo({...e,elements:{...p,...l&&{reference:l}}}),h=_.useCallback(e=>{let t=Vi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=_.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),v=_.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),y=_.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:v,nodeId:t,rootStore:r}),[m,g,v,t,r,s,c]);return X(()=>{o&&(d.current=o)},[o]),X(()=>{r.context.dataRef.current.floatingContext=y;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),_.useMemo(()=>({...m,context:y,refs:g,elements:v,rootStore:r}),[m,g,v,y,r])}var Qu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ma(e,t)||{};if(l==null)return{};let d=Ma(u),f={x:n,y:r},p=ba(i),m=va(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=pa(D,k,O),j=!c.arrow&&ga(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),$u=(e,t)=>{let{name:n,fn:r}=Qu(e);return{name:n,fn:r,options:[e,t]}},ed={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},td={sideX:`left`,sideY:`top`},nd=`--available-width`,rd=`--available-height`,id=`--anchor-width`,ad=`--anchor-height`,od=`--transform-origin`,sd=nd,cd=rd;function ld(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function ud(e,t,n){let{rects:r,placement:i}=e;return{side:ld(t,ha(i),n),align:ga(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dd(e){return fd(e,Zu)}function fd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:v,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=v.side||`flip`,T=v.align||`flip`,E=v.fallbackAxisSide||`end`,D=y?.crossAxis??!1,O=y?.rootBoundary,k=typeof n==`function`?n:void 0,A=Q(k),j=k?A:n,M=Ll(n),N=Ll(g),P=Xu()===`rtl`,[F,I]=_.useState(null);!g&&F!==null&&I(null);let L=S===`placement`,R=F?ha(F):null,z=F&&L?ga(F)||`center`:null,B=R||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],V=z||o,H=V===`center`?B:`${B}-${V}`,U=l;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let ee=+(i===`bottom`),te=+(i===`top`),W=+(i===`right`),ne=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:U},ie=_.useRef(null),ae=Ll(a),G=Ll(s),K=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,se=[];p&&se.push(p),se.push(No(e=>{let t=ud(e,i,P),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof G.current==`function`?G.current(t):G.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[K,oe,P,i]));let ce=T===`none`&&w!==`shift`,le=!ce&&(u||D||w===`shift`),ue=w===`none`?null:Io({...re,padding:{top:U.top+1+ee,right:U.right+1+ne,bottom:U.bottom+1+te,left:U.left+1+W},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),q=ce?null:Po({...re,rootBoundary:O,mainAxis:T!==`none`,crossAxis:le,limiter:u||D?void 0:Fo(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=ya(ha(e.placement)),i=r===`y`?t:n,a=r===`y`?U.left+U.right:U.top+U.bottom;return{offset:i/2+a/2}})},[re,u,D,O,U,T]);w===`shift`||T===`shift`||V===`center`?se.push(q,ue):se.push(ue,q),se.push(Lo({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(sd,`${t}px`),i.setProperty(cd,`${n}px`);let a=Ri(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(id,`${u}px`),i.setProperty(ad,`${d}px`)}}),$u(e=>({element:ie.current||zs(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=ha(r),u=ga(r),d=ya(l)===`y`,f=ie.current,p=typeof a==`function`?a(ud(e,i,P)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return le&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(od,d?`${m} ${h}`:`${h} ${m}`),{}}},ed,x),X(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let de=_.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:fe,elements:pe,x:me,y:he,middlewareData:ge,update:_e,placement:ve,context:ye,isPositioned:be,floatingStyles:xe}=t({rootContext:h,open:m?g:void 0,placement:H,middleware:se,strategy:r,whileElementsMounted:m?void 0:(...e)=>bo(...e,de),nodeId:b,externalTree:C}),{sideX:Se,sideY:Ce}=ge.adaptiveOrigin||td,we=be?r:`fixed`,Te=_.useMemo(()=>{let e;return e=be?x?{position:we,[Se]:me,[Ce]:he}:{...xe,position:we}:{position:we,top:0,left:0},e[sd]=`100vw`,e[cd]=`100vh`,be||(e.opacity=0),e},[x,we,Se,me,Ce,he,xe,be]),Ee=_.useRef(null);X(()=>{if(!g)return;let e=M.current,t=typeof e==`function`?e():e,n=(pd(t)?t.current:t)||null;n!==Ee.current&&(fe.setPositionReference(n),Ee.current=n)},[g,fe,j,M]),_.useEffect(()=>{if(!g)return;let e=M.current;typeof e!=`function`&&pd(e)&&e.current!==Ee.current&&(fe.setPositionReference(e.current),Ee.current=e.current)},[g,fe,j,M]),_.useEffect(()=>{if(m&&g&&pe.reference&&pe.floating)return bo(pe.reference,pe.floating,_e,de)},[m,g,pe,_e,de]);let De=ha(ve),Oe=ld(i,De,P),ke=ga(ve)||`center`,Ae=!!ge.hide?.referenceHidden;X(()=>{S&&g&&be&&(De!==B||L&&ke!==V)&&I(ve)},[S,L,g,be,ve,De,ke,B,V]);let je=_.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return _.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ie,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:fe,context:ye,isPositioned:be,update:_e}),[Te,je,ie,Me,Oe,ke,De,Ae,fe,ye,be,_e])}function pd(e){return e!=null&&`current`in e}function md(e){return e===`starting`?fl:qr}function hd(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),di(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},md(r),i],stateAttributesMapping:Os})}var gd=_.createContext(void 0);gd.displayName=`TooltipRootContext`;function _d(e){let t=_.useContext(gd);if(t===void 0&&!e)throw Error(`Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.`);return t}var vd=_.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Fl,currentIdRef:{current:null},currentContextRef:{current:null}});vd.displayName=`FloatingDelayGroupContext`;function yd(e,t){e.current=t.current}function bd(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=_.useRef(n),a=_.useRef(n),o=_.useRef(null),s=_.useRef(null),c=Il();return X(()=>{a.current=n,o.current?i.current={open:_u(i.current,`open`),close:_u(n,`close`)}:i.current=n},[n,o,i,a]),(0,Y.jsx)(vd.Provider,{value:_.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function xd(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=_.useContext(vd),[d,f]=_.useState(!1),p=_.useRef(n);return X(()=>{p.current=n},[n]),X(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),X(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:_u(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,_c(vc))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),X(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,yd(a,s),u.clear()}},[c,i,a,r,s,u]),_.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Sd(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Cd(e){return e!=null&&e.clientX!=null}function wd(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=_.useRef(!1),l=_.useRef(null),[u,d]=_.useState(),[f,p]=_.useState([]),m=Q(t=>{e.set(`positionReference`,t)}),h=Q((t,n,i)=>{c.current||(!s.current.openEvent||Cd(s.current.openEvent))&&e.set(`positionReference`,Sd(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Q(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),v=es(u)?a:i;_.useEffect(()=>{if(!n){m(o);return}if(!v)return;function e(){l.current?.(),l.current=null}let t=Ri(a);function r(t){let n=is(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Cd(s.current.openEvent)?l.current=jc(t,`mousemove`,r):m(o),e},[v,n,a,s,o,e,h,m,f]),_.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),_.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),_.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let y=_.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return _.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var Td={...Uu,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Ed=class extends Al{constructor(e,t,n){let r=new Cl;super(Dd(e,r,t,n),Od(r),Td)}setOpen=(e,t)=>{du(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,_c(yc,e))}};function Dd(e,t,n,r=!1){return{...Lu(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Od(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var kd=ol(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=au((e,t)=>new Ed({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),v=p.useState(`mounted`),y=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),pu(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=mu(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=_.useRef(null);X(()=>{m&&t&&p.setOpen(!1,_c(Oc))},[m,t,p]),X(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),X(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),_.useImperativeHandle(o,()=>({unmount:b,close:()=>p.setOpen(!1,_c(kc))}),[b,p]);let E=h||v||!t&&a!==`none`;return(0,Y.jsxs)(gd.Provider,{value:p,children:[l&&(0,Y.jsx)(ou,{handle:l,store:p}),E&&(0,Y.jsx)(Ad,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:y}):f]})});kd.displayName=`TooltipRoot`;function Ad({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=tu(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=wd(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=_.useMemo(()=>Qr(a.reference,i.reference),[a.reference,i.reference]);return hu(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??qr}),null}var jd=_.createContext(void 0);jd.displayName=`TooltipProviderContext`;function Md(){return _.useContext(jd)}var Nd=`data-base-ui-tooltip-trigger`;function Pd(e){let t=is(e);return Vi(t)?t:null}var Fd=sl(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=_d(!0),m=Wu(a)??p;if(!m)throw Error(`Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.`);let h=qu(d),g=m.useState(`isTriggerActive`,h),v=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=_.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=fu(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Md(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=xd(y,{open:v}),k=Tu(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Ll(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=_.useRef(!1),I=Il(),L=_.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=b.current;if(!t||!e)return!1;let n=rs(e,`[${Nd}]`);return n!==null&&n!==t&&Z(t,n)}function B(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let V=Ou(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Iu():null,restMs:R,delay(){return u==null&&O?{close:_u(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),H=Ku(y,{enabled:!j}).reference,U=e=>{let t=F.current,n=Pd(e),r=B(n),i=b.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,_c(bc,e));else if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&es(L.current)){let t=()=>{F.current||M.current||m.select(`open`)||m.setOpen(!0,_c(bc,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},ee=m.useState(`appliedTriggerProps`,C||N!==`none`);return di(`button`,e,{state:{open:v},ref:[t,S,b],props:[V,H,ee,{onMouseOver(e){U(e.nativeEvent)},onFocus(e){z(Pd(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[As]:j?``:void 0,[Nd]:j?void 0:``},f],stateAttributesMapping:Es})});Fd.displayName=`TooltipTrigger`;var Id=_.createContext(void 0);Id.displayName=`TooltipPortalContext`;function Ld(){let e=_.useContext(Id);if(e===void 0)throw Error(`Base UI: <Tooltip.Portal> is missing.`);return e}var Rd=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _d().useState(`mounted`)||n?(0,Y.jsx)(Id.Provider,{value:n,children:(0,Y.jsx)(Ju,{ref:t,...r})}):null});Rd.displayName=`TooltipPortal`;var zd=_.createContext(void 0);zd.displayName=`TooltipPositionerContext`;function Bd(){let e=_.useContext(zd);if(e===void 0)throw Error(`Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.`);return e}var Vd=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ml,style:g,...v}=e,y=_d(),b=Ld(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`trackCursorAxis`),w=y.useState(`disableHoverablePopup`),T=y.useState(`floatingRootContext`),E=y.useState(`instantType`),D=y.useState(`transitionStatus`),O=dd({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,adaptiveOrigin:y.useState(`adaptiveOrigin`)}),k=hd(e,_.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,Y.jsx)(zd.Provider,{value:O,children:k})});Vd.displayName=`TooltipPositioner`;var Hd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_d(),{side:s,align:c}=Bd(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Yl({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Eu(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return di(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[iu,f,md(d),a],stateAttributesMapping:ks})});Hd.displayName=`TooltipPopup`;var Ud=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_d(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Bd();return di(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Os})});Ud.displayName=`TooltipArrow`;var Wd=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=_.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(jd.Provider,{value:t,children:(0,Y.jsx)(bd,{delay:i,timeoutMs:r,children:e.children})})};Wd.displayName=`TooltipProvider`;var Gd=Wd;function Kd({content:e,children:t,align:n,asChild:r,render:i,side:a,className:o,container:s,closeDelay:c,delay:l,...u}){let d=Ni(),f=s??d??void 0,p=i??(r?t:void 0),m=p!==void 0;return(0,Y.jsxs)(kd,{...u,children:[(0,Y.jsx)(Fd,{closeDelay:c,delay:l,className:J(!m&&`m-0 inline-flex h-auto min-h-0 items-center border-none bg-transparent p-0 shadow-none`,`cursor-default`,o),render:p,children:r?void 0:t}),(0,Y.jsx)(Rd,{container:f,children:(0,Y.jsx)(Vd,{align:n,side:a,sideOffset:10,className:`max-w-[var(--available-width)]`,children:(0,Y.jsxs)(Hd,{className:J(`flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default`,`shadow-md outline outline-kumo-line`,`transition-[transform,scale,opacity] duration-150`,`data-[starting-style]:scale-90 data-[starting-style]:opacity-0`,`data-[ending-style]:scale-90 data-[ending-style]:opacity-0`,`data-[instant]:duration-0`,`kumo-tooltip-popup`),children:[(0,Y.jsx)(Ud,{className:J(`flex`,`data-[side=bottom]:top-[-8px]`,`data-[side=left]:right-[-13px] data-[side=left]:rotate-90`,`data-[side=right]:left-[-13px] data-[side=right]:-rotate-90`,`data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`),children:(0,Y.jsx)(qd,{})}),e]})})})]})}function qd(e){return(0,Y.jsxs)(`svg`,{width:`20`,height:`10`,viewBox:`0 0 20 10`,fill:`none`,...e,children:[(0,Y.jsx)(`path`,{d:`M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z`,className:`fill-kumo-base`}),(0,Y.jsx)(`path`,{d:`M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z`,className:`fill-kumo-arrow-edge`}),(0,Y.jsx)(`path`,{d:`M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z`,className:`fill-kumo-arrow-stroke`})]})}var Jd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),Yd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L137,128ZM57,128l71.52-71.51a12,12,0,0,0-17-17l-80,80a12,12,0,0,0,0,17l80,80a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48V208l-80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M203.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,208,208V48A8,8,0,0,0,203.06,40.61ZM192,188.69,131.31,128,192,67.31Zm-66.34,13.65a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L51.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,48V208a8,8,0,0,1-13.66,5.66L128,147.31V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,128,48v60.69l66.34-66.35A8,8,0,0,1,208,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L128.49,128ZM48.49,128l75.75-75.76a6,6,0,0,0-8.48-8.48l-80,80a6,6,0,0,0,0,8.48l80,80a6,6,0,1,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L125.66,128ZM45.66,128l77.17-77.17a4,4,0,0,0-5.66-5.66l-80,80a4,4,0,0,0,0,5.66l80,80a4,4,0,1,0,5.66-5.66Z`}))]]),Xd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144.49,136.49l-80,80a12,12,0,0,1-17-17L119,128,47.51,56.49a12,12,0,0,1,17-17l80,80A12,12,0,0,1,144.49,136.49Zm80-17-80-80a12,12,0,1,0-17,17L199,128l-71.52,71.51a12,12,0,0,0,17,17l80-80A12,12,0,0,0,224.49,119.51Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,128,56,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M141.66,122.34l-80-80A8,8,0,0,0,48,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,141.66,122.34ZM64,188.69V67.31L124.69,128Zm157.66-55-80,80a8,8,0,0,1-11.32-11.32L204.69,128,130.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,221.66,133.66Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L127.51,128,51.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,140.24,132.24Zm80-8.48-80-80a6,6,0,0,0-8.48,8.48L207.51,128l-75.75,75.76a6,6,0,1,0,8.48,8.48l80-80A6,6,0,0,0,220.24,123.76Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M138.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L130.34,128,53.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,138.83,130.83Zm80-5.66-80-80a4,4,0,0,0-5.66,5.66L210.34,128l-77.17,77.17a4,4,0,0,0,5.66,5.66l80-80A4,4,0,0,0,218.83,125.17Z`}))]]),Zd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Qd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),$d=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),ef=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),tf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),nf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),rf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z`}))]]),af=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),of=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z`}))]]),sf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z`}))]]),cf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]]),lf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z`}))]]),uf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),df=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),ff=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z`}))]]),pf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z`}))]]),mf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80l-96,56L32,80l96-56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z`}),_.createElement(`path`,{d:`M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z`}),_.createElement(`path`,{d:`M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z`}))]]),hf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),gf=(0,_.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),_f=_.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=_.useContext(gf);return _.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&_.createElement(`title`,null,n),s,c.get(a??f))});_f.displayName=`IconBase`;var vf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:Jd}));vf.displayName=`ArrowRightIcon`;var yf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:Yd}));yf.displayName=`CaretDoubleLeftIcon`;var bf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:Xd}));bf.displayName=`CaretDoubleRightIcon`;var xf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:Zd}));xf.displayName=`CaretDownIcon`;var Sf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:Qd}));Sf.displayName=`CaretLeftIcon`;var Cf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:$d}));Cf.displayName=`CaretRightIcon`;var wf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:ef}));wf.displayName=`CaretUpIcon`;var Tf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:tf}));Tf.displayName=`CaretUpDownIcon`;var Ef=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:nf}));Ef.displayName=`CheckIcon`;var Df=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:rf}));Df.displayName=`ClockCounterClockwiseIcon`;var Of=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:af}));Of.displayName=`CopyIcon`;var kf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:of}));kf.displayName=`FileIcon`;var Af=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:sf}));Af.displayName=`FolderIcon`;var jf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:cf}));jf.displayName=`FolderOpenIcon`;var Mf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:lf}));Mf.displayName=`FunnelIcon`;var Nf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:uf}));Nf.displayName=`InfoIcon`;var Pf=Nf,Ff=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:df}));Ff.displayName=`MinusIcon`;var If=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:ff}));If.displayName=`PlayIcon`;var Lf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:pf}));Lf.displayName=`RobotIcon`;var Rf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:mf}));Rf.displayName=`StackIcon`;var zf=_.forwardRef((e,t)=>_.createElement(_f,{ref:t,...e,weights:hf}));zf.displayName=`XIcon`;var Bf={shape:{base:{classes:``,description:`Default rectangular button shape`},square:{classes:`items-center justify-center p-0`,description:`Square button for icon-only actions`},circle:{classes:`items-center justify-center p-0 rounded-full`,description:`Circular button for icon-only actions`}},size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small button for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small button for secondary actions`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default button size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large button for primary CTAs`}},compactSize:{xs:{classes:`size-3.5`},sm:{classes:`size-6.5`},base:{classes:`size-9`},lg:{classes:`size-10`}},variant:{primary:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`High-emphasis button for primary actions`},secondary:{classes:`bg-kumo-base !text-kumo-default ring not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Default button style for most actions`},ghost:{classes:`text-kumo-default hover:bg-kumo-tint shadow-none bg-inherit`,description:`Minimal button with no background`},destructive:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`Danger button for destructive actions like delete`},"secondary-destructive":{classes:`bg-kumo-base !text-kumo-danger ring not-disabled:hover:!text-kumo-danger not-disabled:hover:ring-kumo-danger/30 disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Secondary button with destructive text for less prominent dangerous actions`},outline:{classes:`bg-transparent text-kumo-default ring ring-kumo-line transition-colors not-disabled:hover:text-kumo-strong not-disabled:hover:ring-kumo-focus/25`,description:`Bordered button with transparent background`}}},Vf={shape:`base`,size:`base`,variant:`secondary`};function Hf({variant:e=Vf.variant,size:t=Vf.size,shape:n=Vf.shape}={}){let r=n===`square`||n===`circle`;return J(`group flex w-max shrink-0 items-center font-medium select-none`,`border-0 shadow-xs`,`focus:ring-kumo-focus/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand`,`cursor-pointer`,`disabled:cursor-not-allowed disabled:text-kumo-subtle`,vr(Bf.size,t,Vf.size).classes,vr(Bf.shape,n,Vf.shape).classes,r&&vr(Bf.compactSize,t,Vf.size).classes,vr(Bf.variant,e,Vf.variant).classes)}var Uf={xs:`pb-px [--kumo-button-text-lift:0.5px]`,sm:`pb-px [--kumo-button-text-lift:0.5px]`,base:`pb-0.5 [--kumo-button-text-lift:1px]`,lg:`pb-0.5 [--kumo-button-text-lift:1px]`},Wf={xs:`pl-1`,sm:`pl-1.5`,base:`pl-2.5`,lg:`pl-3.5`},Gf=`[&>svg:first-child]:translate-y-(--kumo-button-text-lift) [&>span.relative>svg:first-child]:translate-y-(--kumo-button-text-lift)`,Kf=(e,t,n,r)=>{let i=_.Children.toArray(r).some(e=>e!==``);if(e===`base`&&i)return J(Uf[t],n!=null&&[Wf[t],Gf])},qf=e=>e?_.isValidElement(e)?e:(0,Y.jsx)(e,{}):null,Jf=e=>{if(e===`primary`)return`var(--color-kumo-brand)`;if(e===`destructive`)return`var(--color-kumo-danger)`},Yf=e=>{let t=Jf(e);if(t)return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${t}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${t}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${t}, white 15%)`,"--kumo-button-emphasis-gradient-end":t}},Xf=new Set([`href`,`target`,`rel`,`download`,`hrefLang`,`media`,`ping`,`referrerPolicy`,`linksExternal`]),Zf=e=>{let t={...e};for(let e of Object.keys(t))(e.startsWith(`on`)||Xf.has(e))&&delete t[e];return t},Qf=(e,t,n)=>{let r=n==null?null:(0,Y.jsx)(`span`,{className:`contents`,children:n});return Jf(e)?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 rounded-[inherit] bg-linear-to-b from-(--kumo-button-emphasis-gradient-start) to-(--kumo-button-emphasis-gradient-end) shadow-[inset_0_1px_0_0_var(--kumo-button-emphasis-bg)] group-hover:from-(--kumo-button-emphasis-bg)`}),(0,Y.jsxs)(`span`,{className:`relative flex items-center gap-1.5`,children:[t,r]})]}):(0,Y.jsxs)(Y.Fragment,{children:[t,r]})},$f=e=>{if(typeof e==`string`)return e;if(typeof e==`number`)return String(e)},ep=_.forwardRef(({children:e,className:t,disabled:n,loading:r,shape:i=`base`,size:a=`base`,variant:o=`secondary`,icon:s,style:c,title:l,...u},d)=>{let{type:f,...p}=u,m=Yf(o),h=$f(l),g={...p,...!_.Children.count(e)&&!p[`aria-label`]&&!p[`aria-labelledby`]&&h&&{"aria-label":h}},v=r?(0,Y.jsx)(ji,{size:a===`lg`?16:14}):qf(s),y=(0,Y.jsx)(`button`,{ref:d,"data-kumo-component":`Button`,className:J(Hf({variant:o,size:a,shape:i}),Kf(i,a,v,e),n&&`cursor-not-allowed opacity-50`,t),disabled:r||n,style:m?{...m,...c}:c,type:f??`button`,...g,children:Qf(o,v,e)});return l&&(n||r)?(0,Y.jsx)(Kd,{content:l,render:(0,Y.jsx)(`span`,{className:`inline-flex`}),children:y}):l?(0,Y.jsx)(Kd,{content:l,render:y}):y});ep.displayName=`Button`;var tp=_.forwardRef(({children:e,className:t,disabled:n=!1,external:r,href:i,shape:a=`base`,size:o=`base`,variant:s=`ghost`,icon:c,style:l,title:u,...d},f)=>{let p=Or(),m=Yf(s),h=r?{target:`_blank`,rel:`noopener noreferrer`}:{};if(n)return(0,Y.jsx)(ep,{...Zf(d),className:J(`select-text`,t),"data-kumo-component":`LinkButton`,disabled:!0,icon:c,shape:a,size:o,style:l,title:u,variant:s,children:e});let g=qf(c),_=(0,Y.jsx)(p,{ref:f,"data-kumo-component":`LinkButton`,className:J(Hf({variant:s,size:o,shape:a}),Kf(a,o,g,e),`flex items-center no-underline! select-text`,t),href:i,style:m?{...m,...l}:l,to:typeof i==`string`?i:void 0,...h,...d,children:Qf(s,g,e)});return u?(0,Y.jsx)(Kd,{content:u,render:_}):_});tp.displayName=`LinkButton`;var np=(0,_.createContext)({variant:`default`,size:`sm`}),rp={default:{accent:`var(--color-kumo-info)`,secondary:`text-inherit ring-kumo-info/50 fill-kumo-info hover:!text-inherit hover:!ring-kumo-info/50 hover:bg-kumo-info/10`,ghost:`text-inherit fill-kumo-info hover:bg-kumo-info/10`},alert:{accent:`var(--color-kumo-warning)`,secondary:`text-inherit ring-kumo-warning/50 fill-kumo-warning hover:!text-inherit hover:!ring-kumo-warning/50 hover:bg-kumo-warning/10`,ghost:`text-inherit fill-kumo-warning hover:bg-kumo-warning/10`},error:{accent:`var(--color-kumo-danger)`,secondary:`text-inherit ring-kumo-danger/50 fill-kumo-danger hover:!text-inherit hover:!ring-kumo-danger/50 hover:bg-kumo-danger/10`,ghost:`text-inherit fill-kumo-danger hover:bg-kumo-danger/10`},secondary:{accent:`var(--color-neutral-700, oklch(37.1% 0 0))`,secondary:`text-inherit ring-kumo-focus/20 fill-kumo-subtle hover:!text-inherit hover:!ring-kumo-focus/20 hover:bg-kumo-contrast/10`,ghost:`text-inherit fill-kumo-subtle hover:bg-kumo-contrast/10`}};function ip(e){return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${e}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${e}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${e}, white 15%)`,"--kumo-button-emphasis-gradient-end":e}}var ap=(0,_.forwardRef)(function({variant:e=`primary`,className:t,style:n,...r},i){let a=(0,_.useContext)(np),o=rp[a.variant];return(0,Y.jsx)(ep,{ref:i,variant:e===`secondary`?`outline`:e,size:a.size,className:J(e!==`primary`&&o[e],t),style:e===`primary`?{...ip(o.accent),...n}:n,...r})});ap.displayName=`Banner.Action`;var op=`flex w-full`,sp={variant:{default:{classes:`bg-kumo-info-tint text-kumo-info`,iconClasses:`fill-kumo-info`,description:`Informational banner for general messages`},alert:{classes:`bg-kumo-warning-tint text-kumo-warning`,iconClasses:`fill-kumo-warning`,description:`Warning banner for cautionary messages`},error:{classes:`bg-kumo-danger-tint text-kumo-danger`,iconClasses:`fill-kumo-danger`,description:`Error banner for critical issues`},secondary:{classes:`bg-kumo-contrast/5 text-kumo-default/70`,iconClasses:`fill-kumo-interact`,description:`Neutral banner for secondary messages`}},size:{base:{classes:`items-start gap-3 rounded-lg px-4 py-3 text-base`,description:`Default banner size`},sm:{classes:`items-center gap-2 rounded-md px-3 py-2 text-sm`,description:`Compact banner for dialogs and tight spaces`}}},cp={variant:`default`,size:`base`},lp={base:{row:`gap-3`,icon:`h-[1.375em]`,description:`text-sm`,action:`sm`},sm:{row:`gap-2`,icon:`h-[1.25em]`,description:`text-sm`,action:`xs`}};function up({variant:e=cp.variant,size:t=cp.size}={}){let n=vr(sp.variant,e,cp.variant),r=vr(sp.size,t,cp.size);return J(op,n.classes,r.classes)}var dp=(0,_.forwardRef)(function({icon:e,title:t,description:n,action:r,children:i,text:a,variant:o=cp.variant,size:s=cp.size,className:c,...l},u){let d=vr(sp.variant,o,cp.variant),f=lp[s],p=s===`sm`,m=p&&(0,_.isValidElement)(r)&&r.type===Di;if(t||n)return(0,Y.jsx)(np.Provider,{value:{variant:o,size:f.action},children:(0,Y.jsxs)(`div`,{ref:u,className:J(up({variant:o,size:s}),c),...l,children:[e&&(0,Y.jsx)(`span`,{className:J(`flex shrink-0 items-center`,f.icon,d.iconClasses),children:e}),(0,Y.jsxs)(`div`,{className:J(`flex min-w-0 flex-1 items-center justify-between`,f.row,!t&&`pt-px`),children:[p?(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5`,children:[t&&(0,Y.jsxs)(`span`,{className:`leading-snug font-medium`,children:[t,!n&&m&&(0,Y.jsx)(`span`,{className:`ml-1.5 [&_[data-kumo-component=Link]]:inline`,children:r})]}),n&&(0,Y.jsxs)(`span`,{className:J(f.description,`leading-snug`),children:[n,m&&(0,Y.jsx)(`span`,{className:`ml-1.5 [&_[data-kumo-component=Link]]:inline`,children:r})]})]}):(0,Y.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[t&&(0,Y.jsx)(`p`,{className:`leading-snug font-medium`,children:t}),n&&(0,Y.jsx)(`div`,{className:J(f.description,`leading-snug`),children:(0,_.isValidElement)(n)?n:(0,Y.jsx)(`p`,{children:n})})]}),!m&&r!=null&&(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r})]})]})});let h=i??a,g=(0,_.isValidElement)(h)?h:(0,Y.jsx)(`p`,{children:h});return(0,Y.jsx)(np.Provider,{value:{variant:o,size:f.action},children:(0,Y.jsxs)(`div`,{ref:u,className:J(up({variant:o,size:s}),c),...l,children:[e&&(0,Y.jsx)(`span`,{className:J(`shrink-0`,d.iconClasses),children:e}),g]})})});dp.displayName=`Banner`;var fp=Object.assign(dp,{Action:ap}),pp=(0,_.createContext)({label:{optional:`(optional)`,tooltip:`More information`},layerDialog:{close:`Close`,cancel:`Cancel`}});function mp(){return(0,_.useContext)(pp)}function hp(e={}){return J(`m-0 text-base font-medium text-kumo-default`)}function gp(){return J(`inline-flex items-center gap-1`)}function _p({children:e,showOptional:t=!1,optionalLabel:n,tooltip:r,tooltipAriaLabel:i,className:a,htmlFor:o,asContent:s=!1}){let{label:c}=mp(),l=n===void 0?c.optional:n,u=i??c.tooltip,d=(0,Y.jsxs)(Y.Fragment,{children:[e,t&&(0,Y.jsx)(`span`,{className:`font-normal text-kumo-subtle`,children:l}),r&&(0,Y.jsx)(Kd,{content:r,render:(0,Y.jsx)(ep,{variant:`ghost`,size:`xs`,shape:`square`,"aria-label":u,children:(0,Y.jsx)(Pf,{className:`size-4`})})})]});return s?(0,Y.jsx)(`span`,{className:J(gp(),a),children:d}):(0,Y.jsx)(`label`,{htmlFor:o,className:J(hp(),gp(),a),children:d})}_p.displayName=`Label`;var vp=_.createContext(void 0);vp.displayName=`FieldsetRootContext`;function yp(e=!1){let t=_.useContext(vp);if(!t&&!e)throw Error(`Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.`);return t}function bp(e,t){let n=qu(e);return X(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}var xp=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,...o}=e,[s,c]=_.useState(void 0),l=yp(!0)?.disabled||a,u=di(`fieldset`,e,{ref:t,state:{disabled:l},props:[{"aria-labelledby":s,disabled:l},o]}),d=_.useMemo(()=>({legendId:s,setLegendId:c,disabled:l}),[s,c,l]);return(0,Y.jsx)(vp.Provider,{value:d,children:u})});xp.displayName=`FieldsetRoot`;var Sp=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{disabled:s,setLegendId:c}=yp(),l=bp(a,c);return di(`div`,e,{state:{disabled:s},ref:t,props:[{id:l},o]})});Sp.displayName=`FieldsetLegend`;var Cp=`data-valid`,wp=`data-invalid`,Tp={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ep={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Dp={valid(e){return e===null?null:e?{[Cp]:``}:{[wp]:``}}},Op={invalid:void 0,name:void 0,validityData:{state:Tp,errors:[],error:``,value:``,initialValue:null},setValidityData:Gr,disabled:void 0,setTouched:Gr,setDirty:Gr,setFilled:Gr,setFocused:Gr,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ep,registerFieldControl:Gr,validation:{getValidationProps:(e,t=qr)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Gr,getInputControl:()=>null,commit:async()=>{},change:Gr}},kp=_.createContext(Op);kp.displayName=`FieldRootContext`;function Ap(e=!0){let t=_.useContext(kp);if(t.setValidityData===Gr&&!e)throw Error(`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}var jp=_.createContext({controlId:void 0,registerControlId:Gr,resetControlId:Gr,labelId:void 0,setLabelId:Gr,messageIds:[],setMessageIds:Gr,getDescriptionProps:e=>e});jp.displayName=`LabelableContext`;function Mp(){return _.useContext(jp)}var Np=_.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Gr,validationMode:`onSubmit`,submitCountRef:{current:0}});Np.displayName=`FormContext`;function Pp(){return _.useContext(Np)}function Fp(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=Mp(),c=bp(t,Q(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=Ip(e.currentTarget,l);Hi(t)&&Lp(t)}function d(e){rs(is(e.nativeEvent),`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function Ip(e,t){let n=e.getRootNode();for(;Ui(n);){let e=n.getElementById(t);if(e)return e;n=n.host.getRootNode()}return zs(e).getElementById(t)}function Lp(e){e.focus({focusVisible:!0})}function Rp(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var zp=Object.keys(Tp);function Bp(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}function Vp(e,t){let n=null;for(let r of e.keys())if(Bp(r,t)){if(!r.validity.valid)return r;n??=r}return n}function Hp(e){return{...Tp,valid:!e,customError:e}}function Up(e){return e&&e.validationMessage?[e.validationMessage]:[]}function Wp(e){let{elementRef:t,formRef:n}=Pp(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,shouldValidateOnChange:u,validationMode:d,registeredFieldIdRef:f}=e,{controlId:p,getDescriptionProps:m}=Mp(),h=Il(),g=_.useRef(null),v=jr(()=>new Map).current,y=_.useRef(0),b=_.useRef(null),x=_.useCallback((e,t)=>(v.set(e,t),()=>{v.delete(e)}),[v]),S=Q(()=>{let e=Vp(v,t.current);return e&&v.get(e)?.controlRef.current||null}),C=Q(async(e,o=!1)=>{y.current+=1;let m=y.current;function _(e,t=s){let r=f.current??p;if(r==null)return;let i=n.current.fields.get(r);if(!i)return;let a=Rp(e,t);n.current.fields.set(r,{...i,validityData:a})}function x(t,n){let r=t.valid===!1?n:[];return{value:e,state:t,error:r[0]??``,errors:r,initialValue:a.initialValue}}function S(e,t){let n=e.validity.customError?e.validationMessage:``,r=t.replace(/\r\n?/g,`
|
|
20
|
-
`);e.setCustomValidity(r),b.current=[e,r,n]}function C(){let e=b.current;b.current=null,e&&(!e[0].willValidate||e[0].validationMessage===e[1])&&e[0].setCustomValidity(e[2])}function w(e,t,n){let i=x(e,t);_(i,n),r(i)}function T(e){let t=
|
|
21
|
-
`))):A=
|
|
22
|
-
`))},[r,n,e]);let{current:a}=_.useRef(t);_.useEffect(()=>{!i&&
|
|
23
|
-
`))},[t])}return[s,_.useCallback(e=>{i||o(e)},[])]}function rm(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}function im(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var am=_.createContext(void 0);am.displayName=`CheckboxGroupContext`;function om(){return _.useContext(am)}function sm(e){let{allValues:t=Kr,value:n,onValueChange:r}=e,i=_.useRef(n),a=_.useRef(new Map),[o,s]=_.useState(`mixed`),[c,l]=_.useState(()=>({registry:new Map})),u=n.length===t.length,d=n.length!==t.length&&n.length>0,f=Q(r),p=Q((e,t)=>{let n=c.registry;return n.set(e,(n.get(e)??Kr).concat(t)),l({registry:n}),()=>{let r=(n.get(e)??Kr).filter(e=>e!==t);r.length===0?n.delete(e):n.set(e,r),l({registry:n})}}),m=_.useCallback(()=>({indeterminate:d,checked:u,"aria-controls":t.flatMap(e=>c.registry.get(e)??Kr).join(` `)||void 0,onCheckedChange(e,r){let c=i.current,l=t.filter(e=>a.current.get(e)&&c.includes(e)),u=t.filter(e=>!a.current.get(e)||c.includes(e));if(c.length===u.length||c.length===0){n.length===u.length?f(l,r):f(u,r);return}let d=`mixed`,p=c;o===`mixed`?(d=`on`,p=u):o===`on`&&(d=`off`,p=l),f(p,r),r.isCanceled||s(d)}}),[t,u,c,d,f,o,n.length]),h=_.useCallback(e=>({checked:n.includes(e),onCheckedChange(t,r){let a=n.slice();t?a.push(e):a.splice(a.indexOf(e),1),f(a,r),r.isCanceled||(i.current=a,s(`mixed`))}}),[f,n]);return _.useMemo(()=>({getParentProps:m,getChildProps:h,registerChildId:p,disabledStatesRef:a}),[m,h,p])}var cm=_.forwardRef(function(e,t){let{allValues:n,className:r,defaultValue:i,disabled:a=!1,id:o,onValueChange:s,render:c,value:l,style:u,...d}=e,{disabled:f,name:p,state:m,validation:h,setFilled:g,setDirty:v,validityData:y}=Ap(),{labelId:b,registerControlId:x,getDescriptionProps:S}=Mp(),{clearErrors:C,elementRef:w}=Pp(),T=f||a,[E,D]=nm({controlled:l,default:i??Kr,name:`CheckboxGroup`,state:`value`}),O=Q((e,t)=>{s?.(e,t),!t.isCanceled&&D(e)}),k=sm({allValues:n,value:E,onValueChange:O});$p({id:null});let A=qu(o),j=h.getInputControl;em(_.useMemo(()=>({get current(){return j()}}),[j]),A,E,Q(()=>{let e=w.current;if(!e)return E;let t=new Set;for(let[n,r]of h.registeredInputs)r.value!==void 0&&n.checked&&Bp(n,e)&&t.add(r.value);return E.filter(e=>t.has(e))}),!!p&&!T,p),X(()=>{g(E.length>0)},[E,g]),tm(E,()=>{p&&C(p);let e=Array.isArray(y.initialValue)?y.initialValue:Kr;v(!im(E,e)),h.change(E)});let M={...m,disabled:T},N=_.useMemo(()=>({allValues:n,value:E,setValue:O,parent:k,disabled:T,validation:h,registerControlId:x}),[n,E,O,k,T,h,x]),P=di(`div`,e,{state:M,ref:t,props:[{id:o,role:`group`,"aria-labelledby":b},d,S],stateAttributesMapping:Dp});return(0,Y.jsx)(am.Provider,{value:N,children:P})});cm.displayName=`CheckboxGroup`;function lm(e,t,n,r=!0,i,a){let[o,s]=_.useState(),c=qu(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return X(()=>{let i=e||t||l||!r?void 0:um(n.current,c);o!==i&&s(i)}),u}function um(e,t){let n=dm(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function dm(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function fm(e,t,n){let{setFocused:r,focusOwnerRef:i}=Ap(),a=Q(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return X(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var pm=_.createContext(void 0);pm.displayName=`CompositeRootContext`;function mm(e=!1){let t=_.useContext(pm);if(t===void 0&&!e)throw Error(`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function hm(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Ri(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function gm(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:_.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function _m(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=_.useRef(null),s=mm(!0),c=a??s!==void 0,{props:l}=gm({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i});_.useEffect(()=>{if(!o.current)return;let e=vm(o.current);i?e||Gp(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${Pi.captureOwnerStack?.()||``}`):e&&Gp(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${Pi.captureOwnerStack?.()||``}`)},[i]);let u=_.useCallback(()=>{let e=o.current;vm(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return X(u,[u]),{getButtonProps:_.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Qr({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ci(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=vm(r),s=!i&&ym(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),hm(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),hm(r,e)))},onKeyUp(e){t||(ci(e),a?.(e),e.target===e.currentTarget&&i&&c&&vm(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),hm(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Q(e=>{o.current=e,u()})}}function vm(e){return Hi(e)&&e.tagName===`BUTTON`}function ym(e){return Hi(e)&&e.tagName===`A`&&!!e.href}function bm(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var xm=`data-checked`,Sm=`data-unchecked`;function Cm(e){return{checked(t){return e.indeterminate?{}:t?{[xm]:``}:{[Sm]:``}},...Dp}}var wm=_.createContext(void 0);wm.displayName=`CheckboxRootContext`;function Tm(){let e=_.useContext(wm);if(e===void 0)throw Error(`Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.`);return e}var Em=`data-parent`,Dm=_.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:v,value:y,nativeButton:b=!1,style:x,...S}=e,{clearErrors:C}=Pp(),{disabled:w,name:T,setDirty:E,setFilled:D,setTouched:O,state:k,validationMode:A,validityData:j,validation:M}=Ap(),N=qp(),{labelId:P,registerControlId:F,getDescriptionProps:I}=Mp(),L=om(),R=L?.allValues===void 0?void 0:L.parent,z=R!==void 0,B=w||N.disabled||L?.disabled||o,V=T??d,H=y??V,U=qu(),ee=L?.registerControlId!==F,te=$p({id:c||void 0,enabled:ee}),W=b?te:U,ne={};z&&(p?ne=R.getParentProps():H!==void 0&&(ne=R.getChildProps(H)));let{checked:re=n,indeterminate:ie=l,onCheckedChange:ae,...G}=ne,K=L?.value,oe=_.useRef(null),se=fm(B,oe),{getButtonProps:ce,buttonRef:le}=_m({disabled:B,native:b}),ue=L?.validation??M,[q,de]=nm({controlled:H!==void 0&&K!==void 0&&!p?K.includes(H):re,default:i,name:`Checkbox`,state:`checked`}),fe=z?!!re:q,pe=z&&ie||l;em(oe,U,q,void 0,!L&&!B,d);let me=R?.registerChildId,he=_.useRef(null),ge=ue.registerInput,_e=L?H:void 0,ve=_.useCallback(e=>ge(e,{controlRef:oe,value:_e}),[ge,_e]),ye=Mr(u,he,p?void 0:ve),be=lm(a,P,he,!b,te,S[`aria-label`]);X(()=>{he.current&&(he.current.indeterminate=pe),L||D(q)},[q,pe,L,D]),tm(q,()=>{L||(C(V),E(q!==j.initialValue),ue.change(q))});let xe=Qr({checked:q,disabled:B,form:s,name:p?void 0:V,id:b?void 0:te,required:g,ref:ye,style:V?zc:Rc,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=_c(vc,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(ae?.(t,n),!n.isCanceled&&(de(t),H!==void 0&&L!==void 0&&!p&&!z))){let e=t?[...L.value,H]:L.value.filter(e=>e!==H);L.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){oe.current?.focus()}},y===void 0?qr:{value:(L?q&&y:y)||``},I,e=>ue.getValidationProps(B,e));_.useEffect(()=>{if(!R||H===void 0)return;let e=R.disabledStatesRef.current;return e.set(H,B),()=>{e.delete(H)}},[R,B,H]);let Se=_.useMemo(()=>({...k,checked:fe,disabled:B,readOnly:m,required:g,indeterminate:pe}),[k,fe,B,m,g,pe]),Ce=Cm(Se),we=di(`span`,e,{state:Se,ref:[le,oe,t],props:[{id:W,role:`checkbox`,"aria-checked":pe?`mixed`:fe,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":be,[Em]:p?``:void 0,onFocus(){se(!0)},onBlur(){let e=he.current;e&&(O(!0),se(!1),A===`onBlur`&&ue.commit(L?K:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=he.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ri(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||bm(t)?.click()})},onClick(e){if(m||B)return;e.preventDefault();let t=he.current;t&&hm(t,e)}},S,G,ce,I,e=>ue.getValidationProps(B,e)],stateAttributesMapping:Ce}),Te=we.props.id;return X(()=>{if(me&&!p&&H!==void 0&&Te!==void 0)return me(H,Te)},[me,p,H,Te]),(0,Y.jsxs)(wm.Provider,{value:Se,children:[we,!q&&!L&&V&&!p&&v!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:s,name:V,value:v,disabled:B}),(0,Y.jsx)(`input`,{...xe,suppressHydrationWarning:!0})]})});Dm.displayName=`CheckboxRoot`;var Om=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Tm(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Xl(c),f=_.useRef(null),p={...s,transitionStatus:u};Yl({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Cm(s),...hs},h=a||l,g=di(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});Om.displayName=`CheckboxIndicator`;var km=(0,_.createContext)({controlFirst:void 0,appearance:`default`,orientation:null}),Am=(0,_.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:r,variant:i=`default`,label:a,labelTooltip:o,controlFirst:s=!0,onCheckedChange:c,required:l,name:u,...d},f)=>{{let e=!!a,t=!!d[`aria-label`],n=!!d[`aria-labelledby`];e||t||n||console.warn(`[Kumo Checkbox]: Checkbox must have an accessible name. Provide either:
|
|
19
|
+
After: <Link href="/page">…</Link>`)},[]);let o={"data-kumo-component":`Link`,className:J(Ti({variant:t}),`group/link inline-flex items-center gap-[0.1875em] has-[>[data-kumo-component=Badge]]:rounded-full`)};return xi({render:n??(0,Y.jsx)(a,{}),ref:i,props:Qr(o,r,{className:e})})});Ei.displayName=`Link`;var Di=Object.assign(Ei,{ExternalIcon:Si}),Oi={size:{sm:{value:16,description:`Small loader for inline use`},base:{value:24,description:`Default loader size`},lg:{value:32,description:`Large loader for prominent loading states`}}},ki={size:`base`};function Ai({size:e=ki.size}={}){return typeof e==`number`?e:vr(Oi.size,e,ki.size).value}var ji=({className:e,size:t=ki.size,"aria-label":n=`Loading`})=>{let r=Ai({size:t});return(0,Y.jsxs)(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,stroke:`currentColor`,className:e,role:`status`,"aria-label":n,children:[(0,Y.jsxs)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,strokeWidth:`2`,strokeLinecap:`round`,children:[(0,Y.jsx)(`animateTransform`,{attributeName:`transform`,type:`rotate`,from:`0 12 12`,to:`360 12 12`,dur:`2s`,repeatCount:`indefinite`}),(0,Y.jsx)(`animate`,{attributeName:`stroke-dasharray`,values:`0 150;42 150;42 150`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`}),(0,Y.jsx)(`animate`,{attributeName:`stroke-dashoffset`,values:`0;-16;-59`,keyTimes:`0;0.5;1`,dur:`1.5s`,repeatCount:`indefinite`})]}),(0,Y.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9.5`,fill:`none`,opacity:.1,strokeWidth:`2`,strokeLinecap:`round`})]})},Mi=(0,_.createContext)(null);function Ni(){return(0,_.useContext)(Mi)}var X=typeof document<`u`?_.useLayoutEffect:()=>{},Pi={..._},Fi=c(m(),1);function Ii(){return typeof window<`u`}function Li(e){return Bi(e)?(e.nodeName||``).toLowerCase():`#document`}function Ri(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){return((Bi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Bi(e){return Ii()?e instanceof Node||e instanceof Ri(e).Node:!1}function Vi(e){return Ii()?e instanceof Element||e instanceof Ri(e).Element:!1}function Hi(e){return Ii()?e instanceof HTMLElement||e instanceof Ri(e).HTMLElement:!1}function Ui(e){return!Ii()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ri(e).ShadowRoot}function Wi(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ta(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gi(e){return/^(table|td|th)$/.test(Li(e))}function Ki(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qi=/transform|translate|scale|rotate|perspective|filter/,Ji=/paint|layout|strict|content/,Yi=e=>!!e&&e!==`none`,Xi;function Zi(e){let t=Vi(e)?ta(e):e;return Yi(t.transform)||Yi(t.translate)||Yi(t.scale)||Yi(t.rotate)||Yi(t.perspective)||!$i()&&(Yi(t.backdropFilter)||Yi(t.filter))||qi.test(t.willChange||``)||Ji.test(t.contain||``)}function Qi(e){let t=ra(e);for(;Hi(t)&&!ea(t);){if(Zi(t))return t;if(Ki(t))return null;t=ra(t)}return null}function $i(){return Xi??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Xi}function ea(e){return/^(html|body|#document)$/.test(Li(e))}function ta(e){return Ri(e).getComputedStyle(e)}function na(e){return Vi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ra(e){if(Li(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ui(e)&&e.host||zi(e);return Ui(t)?t.host:t}function ia(e){let t=ra(e);return ea(t)?(e.ownerDocument||e).body:Hi(t)&&Wi(t)?t:ia(t)}function aa(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ia(e),i=r===e.ownerDocument?.body,a=Ri(r);if(i){let e=oa(a);return t.concat(a,a.visualViewport||[],Wi(r)?r:[],e&&n?aa(e):[])}return t.concat(r,aa(r,[],n))}function oa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var sa=Math.min,ca=Math.max,la=Math.round,ua=Math.floor,da=e=>({x:e,y:e}),fa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function pa(e,t,n){return ca(e,sa(t,n))}function ma(e,t){return typeof e==`function`?e(t):e}function ha(e){return e.split(`-`)[0]}function ga(e){return e.split(`-`)[1]}function _a(e){return e===`x`?`y`:`x`}function va(e){return e===`y`?`height`:`width`}function ya(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ba(e){return _a(ya(e))}function xa(e,t,n){n===void 0&&(n=!1);let r=ga(e),i=ba(e),a=va(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Aa(o)),[o,Aa(o)]}function Sa(e){let t=Aa(e);return[Ca(e),t,Ca(t)]}function Ca(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var wa=[`left`,`right`],Ta=[`right`,`left`],Ea=[`top`,`bottom`],Da=[`bottom`,`top`];function Oa(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ta:wa:t?wa:Ta;case`left`:case`right`:return t?Ea:Da;default:return[]}}function ka(e,t,n,r){let i=ga(e),a=Oa(ha(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ca)))),a}function Aa(e){let t=ha(e);return fa[t]+e.slice(t.length)}function ja(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ma(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ja(e)}function Na(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Pa(e,t,n){let{reference:r,floating:i}=e,a=ya(t),o=ba(t),s=va(o),c=ha(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=ga(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Fa(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=ma(t,e),p=Ma(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Na(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ia=50,La=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Fa},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Pa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ia&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Pa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ra=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=ma(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ha(r),_=ya(o),v=ha(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Aa(o)]:Sa(o)),x=p!==`none`;!d&&x&&b.push(...ka(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=xa(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ya(t)||T.every(e=>ya(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ya(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},za=new Set([`left`,`top`]);async function Ba(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ha(n),s=ga(n),c=ya(n)===`y`,l=za.has(o)?-1:1,u=a&&c?-1:1,d=ma(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Va=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ba(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ha=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ma(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ya(i),p=_a(f),m=u[p],h=u[f],g=(e,t)=>pa(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Ua=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ma(e,t),u={x:n,y:r},d=ya(i),f=_a(d),p=u[f],m=u[d],h=ma(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=za.has(ha(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Wa=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=ma(e,t),c=await i.detectOverflow(t,s),l=ha(n),u=ga(n),d=ya(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=sa(p-c[m],g),y=sa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ca(c.left,c.right):S=p-2*ca(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Ga(e){let t=ta(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Hi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=la(n)!==a||la(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ka(e){return Vi(e)?e:e.contextElement}function qa(e){let t=Ka(e);if(!Hi(t))return da(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ga(t),o=(a?la(n.width):n.width)/r,s=(a?la(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ja=da(0);function Ya(e){let t=Ri(e);return!$i()||!t.visualViewport?Ja:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xa(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ri(e)}function Za(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ka(e),o=da(1);t&&(r?Vi(r)&&(o=qa(r)):o=qa(e));let s=Xa(a,n,r)?Ya(a):da(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ri(a),t=Vi(r)?Ri(r):r,n=e,i=oa(n);for(;i&&t!==n;){let e=qa(i),t=i.getBoundingClientRect(),r=ta(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ri(i),i=oa(n)}}return Na({width:u,height:d,x:c,y:l})}function Qa(e,t){let n=na(e).scrollLeft;return t?t.left+n:Za(zi(e)).left+n}function $a(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qa(e,n),y:n.top+t.scrollTop}}function eo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=zi(r),s=t?Ki(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=da(1),u=da(0),d=Hi(r);if((d||!a)&&((Li(r)!==`body`||Wi(o))&&(c=na(r)),d)){let e=Za(r);l=qa(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$a(o,c):da(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function to(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function no(e){let t=na(e),n=e.ownerDocument.body,r=ca(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ca(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Qa(e),o=-t.scrollTop;return ta(n).direction===`rtl`&&(a+=ca(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ro=25;function io(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ri(e),a=zi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!$i()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Qa(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ro&&(s-=o)}return{width:s,height:c,x:l,y:u}}function ao(e,t){let n=Za(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=qa(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function oo(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=io(e,n,t);else if(t===`document`)r=no(zi(e));else if(Vi(t))r=ao(t,n);else{let n=Ya(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Na(r)}function so(e,t){let n=t.get(e);if(n)return n;let r=aa(e,[],!1).filter(e=>Vi(e)&&Li(e)!==`body`),i=null,a=ta(e).position===`fixed`,o=a?ra(e):e;for(;Vi(o)&&!ea(o);){let e=ta(o),t=Zi(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ra(o)}return t.set(e,r),r}function co(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ki(t)?[]:so(t,this._c):[].concat(n),r],o=oo(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=oo(t,a[e],i);s=ca(n.top,s),c=sa(n.right,c),l=sa(n.bottom,l),u=ca(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function lo(e){let{width:t,height:n}=Ga(e);return{width:t,height:n}}function uo(e,t,n){let r=Hi(t),i=zi(t),a=n===`fixed`,o=Za(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=da(0);if((r||!a)&&((Li(t)!==`body`||Wi(i))&&(s=na(t)),r)){let e=Za(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Qa(i));let l=i&&!r&&!a?$a(i,s):da(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function fo(e){return ta(e).position===`static`}function po(e,t){if(!Hi(e)||ta(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function mo(e,t){let n=Ri(e);if(Ki(e))return n;if(!Hi(e)){let t=ra(e);for(;t&&!ea(t);){if(Vi(t)&&!fo(t))return t;t=ra(t)}return n}let r=po(e,t);for(;r&&Gi(r)&&fo(r);)r=po(r,t);return r&&ea(r)&&fo(r)&&!Zi(r)?n:r||Qi(e)||n}var ho=async function(e){let t=this.getOffsetParent||mo,n=this.getDimensions,r=await n(e.floating);return{reference:uo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function go(e){return ta(e).direction===`rtl`}var _o={convertOffsetParentRelativeRectToViewportRelativeRect:eo,getDocumentElement:zi,getClippingRect:co,getOffsetParent:mo,getElementRects:ho,getClientRects:to,getDimensions:lo,getScale:qa,isElement:Vi,isRTL:go};function vo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yo(e,t,n){let r=null,i,a=zi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ua(d),h=ua(a.clientWidth-(u+f)),g=ua(a.clientHeight-(d+p)),_=ua(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ca(0,sa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!vo(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ri(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ka(e),u=i||a?[...l?aa(l):[],...t?aa(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?yo(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Za(e):null;c&&g();function g(){let t=Za(e);h&&!vo(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var xo=Va,So=Ha,Co=Ra,wo=Wa,To=Ua,Eo=(e,t,n)=>{let r=new Map,i=n??{},a={..._o,...i.platform,_c:r};return La(e,t,{...i,platform:a})},Do=typeof document<`u`?_.useLayoutEffect:function(){};function Oo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Oo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Oo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ko(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(e,t){let n=ko(e);return Math.round(t*n)/n}function jo(e){let t=_.useRef(e);return Do(()=>{t.current=e}),t}function Mo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=_.useState(r);Oo(f,r)||p(r);let[m,h]=_.useState(null),[g,v]=_.useState(null),y=_.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=_.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||g,C=_.useRef(null),w=_.useRef(null),T=_.useRef(u),E=c!=null,D=jo(c),O=jo(i),k=jo(l),A=_.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Eo(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Oo(T.current,t)&&(T.current=t,Fi.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Do(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=_.useRef(!1);Do(()=>(j.current=!0,()=>{j.current=!1}),[]),Do(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=_.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=_.useMemo(()=>({reference:x,floating:S}),[x,S]),P=_.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Ao(N.floating,u.x),r=Ao(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ko(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return _.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var No=(e,t)=>{let n=xo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Po=(e,t)=>{let n=So(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fo=(e,t)=>({fn:To(e).fn,options:[e,t]}),Io=(e,t)=>{let n=Co(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lo=(e,t)=>{let n=wo(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Ro(){if(typeof navigator>`u`)return{userAgent:``,platform:``,maxTouchPoints:0};{let e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return{userAgent:e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `),platform:e.platform??navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}return{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:zo,platform:Bo,maxTouchPoints:Vo}=Ro(),Ho=zo.toLowerCase(),Uo=Bo.toLowerCase(),Wo=/^i(os$|p)/.test(Uo)||Uo===`macintel`&&Vo>1,Go=`android`,Ko=Uo===Go||Ho.includes(Go),qo=!Wo&&Uo.startsWith(`mac`);Uo.startsWith(`win`),!Ko&&/^(linux|chrome os)/.test(Uo);var Jo=qo||Wo,Yo=/jsdom|happydom/.test(Ho);function Xo(e){e.preventDefault(),e.stopPropagation()}function Zo(e){return`nativeEvent`in e}function Qo(e){return e.pointerType===``&&e.isTrusted?!0:Ko&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function $o(e){return Yo?!1:!Ko&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ko||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function es(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ts(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function ns(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ui(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function rs(e,t){let n=e;for(;n;){if(Vi(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ui(n)?n.host:null)}return null}function is(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var as=`data-base-ui-focusable`,os=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ss=`ArrowLeft`,cs=`ArrowRight`,ls=`ArrowUp`,us=`ArrowDown`,ds=`data-starting-style`,fs=`data-ending-style`,ps={[ds]:``},ms={[fs]:``},hs={transitionStatus(e){return e===`starting`?ps:e===`ending`?ms:null}},gs=`data-open`,_s=`data-closed`,vs=`data-anchor-hidden`,ys=`data-popup-open`,bs=`data-pressed`,xs={[ys]:``},Ss={[ys]:``,[bs]:``},Cs={[gs]:``},ws={[_s]:``},Ts={[vs]:``},Es={open(e){return e?xs:null}},Ds={open(e){return e?Ss:null}},Os={open(e){return e?Cs:ws},anchorHidden(e){return e?Ts:null}},ks={...Os,...hs},As=`data-trigger-disabled`;function js(e,t){if(!Vi(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(As);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(As);return!1}function Ms(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ns(e){return e.matches(`html,body`)}function Ps(e){return Hi(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Fs(e){return rs(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${os}`)!=null}function Is(e){return e?e.getAttribute(`role`)===`combobox`&&Ps(e):!1}function Ls(e){if(!e||Yo)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Rs(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function zs(e){return e?.ownerDocument||document}function Bs(e,t){return t<0||t>=e.length}function Vs(e,t){return Ws(e.current,{disabledIndices:t})}function Hs(e,t){return Ws(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Us(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Ws(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Bs(e,u)?-1:u,wrapped:d}}function Ws(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Gs(e,a,r));return a}function Gs(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!qs(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Ks(e){return e.visibility===`hidden`||e.visibility===`collapse`}function qs(e,t=e?ta(e):null){return!e||!e.isConnected||!t||Ks(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Js=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ys(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ui(n)?n.host:null}function Xs(e){for(let t of Array.from(e.children))if(Li(t)===`summary`)return t;return null}function Zs(e,t){let n=Xs(t);return!!n&&(e===n||Z(n,e))}function Qs(e){let t=e?Li(e):``;return e!=null&&e.matches(Js)&&(t!==`summary`||e.parentElement!=null&&Li(e.parentElement)===`details`&&Xs(e.parentElement)===e)&&(t!==`details`||Xs(e)==null)&&(t!==`input`||e.type!==`hidden`)}function $s(e){if(!Qs(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ys(t)){let n=t!==e,r=Li(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Li(t)===`details`&&!t.open&&!Zs(e,t)||t.hasAttribute(`hidden`)||!r&&!ec(t,n))return!1}return!0}function ec(e,t){let n=ta(e);return t?n.display!==`none`:qs(e,n)}function tc(e){let t=e.tabIndex;if(t<0){let t=Li(e);if(t===`details`||t===`audio`||t===`video`||Hi(e)&&e.isContentEditable)return 0}return t}function nc(e){if(Li(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function rc(e,t){let n=nc(e);if(!n)return!0;let r=t.find(e=>{let t=nc(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=nc(e);return t?.name===n.name&&t.form===n.form})===n}function ic(e){if(Hi(e)&&Li(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Hi(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ac(e,t){ic(e).forEach(e=>{Qs(e)&&t.push(e),ac(e,t)})}function oc(e,t,n){ic(e).forEach(e=>{Hi(e)&&e.matches(t)&&n.push(e),oc(e,t,n)})}function sc(e){return $s(e)&&tc(e)>=0}function cc(e){let t=[];return ac(e,t),t.filter($s)}function lc(e){let t=cc(e);return t.filter(e=>tc(e)>=0&&rc(e,t))}function uc(e,t){let n=lc(e),r=n.length;if(r===0)return;let i=ns(zs(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function dc(e){return uc(zs(e).body,1)||e}function fc(e){return uc(zs(e).body,-1)||e}function pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function mc(e){lc(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function hc(e){let t=[];oc(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var gc=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!gc&&Ho.includes(`firefox`),!gc&&Ho.includes(`chrom`);function _c(e,t,n,r){let i=!1,a=!1,o=r??qr;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var vc=`none`,yc=`trigger-press`,bc=`trigger-hover`,xc=`trigger-focus`,Sc=`outside-press`,Cc=`item-press`,wc=`focus-out`,Tc=`escape-key`,Ec=`list-navigation`,Dc=`cancel-open`,Oc=`disabled`,kc=`imperative-action`,Ac=`window-resize`;function jc(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Mc(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var Nc=Pi.useInsertionEffect,Pc=Nc&&Nc!==Pi.useLayoutEffect?Nc:e=>e();function Q(e){let t=jr(Fc).current;return t.next=e,Pc(t.effect),t.trampoline}function Fc(){let e={next:void 0,callback:Ic,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Ic(){throw Error(`Base UI: Cannot call an event handler while rendering.`)}var Lc={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},Rc={...Lc,position:`fixed`,margin:0,top:0,left:0},zc={...Lc,position:`absolute`};function Bc(){let[,e]=_.useState({});return _.useCallback(()=>{e({})},[])}var Vc=0;function Hc(e,t=`mui`){let n=_.useRef(void 0),r=Bc(),i=e??n.current;return _.useEffect(()=>{n.current??(Vc+=1,n.current=`${t}-${Vc}`,e??r())},[e,t,r]),i}var Uc=Pi.useId;function Wc(e,t){if(Uc!==void 0){let n=Uc();return e??(t?`${t}-${n}`:n)}return Hc(e,t)}function Gc(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Kc=_.createContext(null);Kc.displayName=`FloatingNodeContext`;var qc=_.createContext(null);qc.displayName=`FloatingTreeContext`;var Jc=()=>_.useContext(Kc)?.id||null,Yc=e=>{let t=_.useContext(qc);return e??t},Xc=o((e=>{var t=f();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Zc=o(((e,t)=>{t.exports=Xc()})),Qc=o((e=>{var t=f(),n=Zc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),$c=o(((e,t)=>{t.exports=Qc()})),el=Zc(),tl=$c(),nl=[],rl=void 0;function il(){return rl}function al(e){nl.push(e)}function ol(e){let t=(t,n)=>{let r=jr(cl).current,i;try{rl=r;for(let e of nl)e.before(r);i=e(t,n);for(let e of nl)e.after(r);r.didInitialize=!0}finally{rl=void 0}return i};return t.displayName=e.displayName||e.name,t}function sl(e){return _.forwardRef(ol(e))}function cl(){return{didInitialize:!1}}var ll=Jo,ul=_.forwardRef(function(e,t){let[n,r]=_.useState();X(()=>{ll&&gc&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,Y.jsx)(`span`,{...e,ref:t,style:Rc,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});ul.displayName=`FocusGuard`;function dl(e){return`data-base-ui-${e}`}var fl={style:{transition:`none`}},pl={fallbackAxisSide:`none`},ml={fallbackAxisSide:`end`},hl={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},gl=_.createContext(null);gl.displayName=`PortalContext`;var _l=()=>_.useContext(gl),vl=dl(`portal`);function yl(e={}){let{ref:t,container:n,componentProps:r=qr,elementProps:i}=e,a=Wc(),o=_l()?.portalNode,[s,c]=_.useState(null),[l,u]=_.useState(null),d=Q(e=>{e!==null&&u(e)}),f=_.useRef(null);X(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Bi(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=di(`div`,r,{ref:[t,d],props:[{id:a,[vl]:``},i]}),m=s&&p?Fi.createPortal(p,s):null;return{node:l,nodeId:_.isValidElement(p)?p.props.id:void 0,subtree:m}}var bl=_.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=yl({container:o,ref:t,componentProps:e,elementProps:c}),f=_.useRef(null),p=_.useRef(null),m=_.useRef(null),h=_.useRef(null),[g,v]=_.useState(null),y=_.useRef(!1),b=g?.modal,x=g?.open,S=!!g&&!g.modal&&g.open&&!!l;_.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&pc(e)&&(e.type===`focusin`?y.current&&=(hc(l),!1):(mc(l),y.current=!0))}return Mc(jc(l,`focusin`,e,!0),jc(l,`focusout`,e,!0))},[l,b]),X(()=>{l&&x===!0&&y.current&&(hc(l),y.current=!1)},[x,l]);let C=_.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:v}),[l]);return(0,Y.jsxs)(_.Fragment,{children:[d,(0,Y.jsxs)(gl.Provider,{value:C,children:[S&&l&&(0,Y.jsx)(ul,{"data-type":`outside`,ref:f,onFocus:e=>{pc(e,l)?m.current?.focus():fc(g?g.domReference:null)?.focus()}}),S&&l&&(0,Y.jsx)(`span`,{role:s,"aria-owns":u,style:hl}),l&&Fi.createPortal(a,l),S&&l&&(0,Y.jsx)(ul,{"data-type":`outside`,ref:p,onFocus:e=>{pc(e,l)?h.current?.focus():(dc(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,_c(`focus-out`,e.nativeEvent)))}})]})]})});bl.displayName=`FloatingPortal`;var xl;function Sl(e){xl??=new WeakMap;let t=xl.get(e);return t||(t=new WeakMap,xl.set(e,t)),t}var Cl=class{idMap=new Map;add(e,t){{let n=Sl(this),r=n.get(t);if(r!==void 0&&r!==e)throw Error(`Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.`);let i=this.idMap.get(e);i!==void 0&&i!==t&&n.delete(i),n.set(t,e)}this.idMap.set(e,t)}delete(e){{let t=this.idMap.get(e);t!==void 0&&xl?.get(this)?.delete(t)}this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},wl=zr(19)?Dl:Ol;function Tl(e,t,n,r,i){return wl(e,t,n,r,i)}function El(e,t,n,r,i){let a=_.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,el.useSyncExternalStore)(e.subscribe,a,a)}al({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,el.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Dl(e,t,n,r,i){let a=il();if(!a)return El(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Ol(e,t,n,r,i){return(0,tl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var kl=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Tl(this,e,t,n,r)}},Al=class extends kl{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){_.useDebugValue(e);let n=this;X(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;X(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;{_.useDebugValue(e,e=>Object.keys(e));let t=_.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error(`ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.`)}X(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){_.useDebugValue(e);let n=this,r=t!==void 0;X(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r]);{let t=this.controlledValues??=new Map;t.has(e)||t.set(e,r);let n=t.get(e);n!==void 0&&n!==r&&console.error(`A component is changing the ${n?``:`un`}controlled state of ${e.toString()} to be ${n?`un`:``}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return _.useDebugValue(e),Tl(this,this.selectors[e],t,n,r)}useContextCallback(e,t){_.useDebugValue(e);let n=Q(t??Gr);this.context[e]=n}useStateSetter(e){let t=_.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jl={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Ml=class extends Al{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Gc(),nested:n,triggerElements:i},jl),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ts(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Nl(e){_.useEffect(e,Kr)}var Pl=0,Fl=class e{static create(){return new e}currentId=Pl;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Pl,t()},e)}isStarted(){return this.currentId!==Pl}clear=()=>{this.currentId!==Pl&&(clearTimeout(this.currentId),this.currentId=Pl)};disposeEffect=()=>this.clear};function Il(){let e=jr(Fl.create).current;return Nl(e.disposeEffect),e}function Ll(e){let t=jr(Rl,e).current;return t.next=e,X(t.effect),t}function Rl(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var zl=null,Bl=globalThis.requestAnimationFrame,Vl=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;let n=Bl!==requestAnimationFrame&&(Bl=requestAnimationFrame,!0);return(!this.isScheduled||n)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Hl=class e{static create(){return new e}static request(e){return Vl.request(e)}static cancel(e){return Vl.cancel(e)}currentId=zl;request(e){this.cancel(),this.currentId=Vl.request(()=>{this.currentId=zl,e()})}cancel=()=>{this.currentId!==zl&&(Vl.cancel(this.currentId),this.currentId=zl)};disposeEffect=()=>this.cancel};function Ul(){let e=jr(Hl.create).current;return Nl(e.disposeEffect),e}function Wl(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}function Gl(e){return e==null?e:`current`in e?e.current:e}var Kl=null;function ql(e){if(!Kl){let e=[];Kl=e,queueMicrotask(()=>{Kl=null,Fi.flushSync(()=>{for(let t of e)t()})})}Kl.push(e)}function Jl(e,t=!1,n=!1){let r=Ul();return Q((i,a=null)=>{r.cancel();let o=Gl(e);if(o==null)return;let s=o,c=()=>{n?ql(()=>{a?.aborted||i()}):Fi.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Wl(s).map(e=>e.finished.then(Gr))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Wl(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ds;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Yl(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=Q(a),s=Jl(r,n,i);_.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Xl(e,t=!1,n=!1,r=!1){let[i,a]=_.useState(e&&t?`idle`:void 0),[o,s]=_.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),X(()=>{if(!e&&o&&i!==`ending`&&n){let e=Hl.request(()=>{a(`ending`)});return()=>{Hl.cancel(e)}}},[e,o,i,n]),X(()=>{if(!e||t||i===void 0)return;let n=Hl.request(()=>{a(void 0)});return()=>{Hl.cancel(n)}},[t,e,i]),X(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Hl.request(()=>{a(`idle`)});return()=>{Hl.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Zl(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Zl(e,t.id,n)])}function Ql(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function $l(){return!1}function eu(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function tu(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=$l,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Yc(c),m=Q(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,v=Q(()=>a),{escapeKey:y,outsidePress:b}=eu(s),x=_.useRef(!1),S=_.useRef(!1),C=_.useRef(!1),w=_.useRef(!1),T=_.useRef(!1),E=_.useRef(``),D=_.useRef(null),O=Il(),k=Il(),A=Il(),j=Q(()=>{k.clear(),d.current.insideReactTree=!1}),M=Q(e=>{let t=d.current.floatingContext?.nodeId;return(p?Zl(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=Q(t=>Ms(t,e.select(`floatingElement`))||Ms(t,e.select(`domReferenceElement`))),P=Q(t=>{o()&&e.setOpen(!1,_c(yc,t.nativeEvent))}),F=Q(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Zo(t)?t.nativeEvent:t;if(T.current||i.isComposing||!y&&M(`__escapeKeyBubbles`))return;let a=_c(Tc,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!y&&!a.isPropagationAllowed&&t.stopPropagation()}),I=Q(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=Q(t=>{if(!l||!n||t.button!==0)return;let r=is(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(x.current||(x.current=!0,S.current=!1))}),R=Q(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});_.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),_.useEffect(()=>j,[j]),_.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=y,d.current.__outsidePressBubbles=b;let t=new Fl,i=zs(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(gc?5:0,()=>{T.current=!1})}function s(){C.current=!0,t.start(0,()=>{C.current=!1})}function c(){x.current=!1,S.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function _(e){let t=d.current.floatingContext?.nodeId,n=p&&Zl(p.nodesRef.current,t).some(t=>Ms(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),C.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=is(n),i=`[${dl(`inert`)}]`,a=Vi(r)?r.getRootNode():null,o=Array.from((Ui(a)?a:zs(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Z(e,r))))return;let c=Vi(r)?r:null;for(;c&&!ea(c);){let e=ra(c);if(ea(e)||!Vi(e))break;c=e}if(!(o.length&&Vi(r)&&!Ns(r)&&!Z(r,e.select(`floatingElement`))&&o.every(e=>!Z(c,e)))){if(Hi(r)&&!(`touches`in n)){let e=ea(r),t=ta(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!_(n)){if(f()===`intentional`){if(n.detail!==0&&!Qo(n)&&!w.current)return;if(C.current){t.clear(),C.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,_c(Sc,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=is(e);if(!n)return;let r=jc(n,e.type,()=>{t(e),r()})}function R(e){E.current=`touch`,L(e,I)}function z(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function B(e){if(e.type===`pointercancel`&&(w.current=!1),!x.current)return;let n=S.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():_(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),C.current=!0,j())))}function V(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function H(e){L(e,V)}function U(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function ee(e){L(e,U)}let te=Mc(r&&Mc(jc(i,`keydown`,F),jc(i,`compositionstart`,a),jc(i,`compositionend`,o)),g&&Mc(jc(i,`click`,z,!0),jc(i,`pointerdown`,z,!0),jc(i,`pointerup`,B,!0),jc(i,`pointercancel`,B,!0),jc(i,`mousedown`,z,!0),jc(i,`mouseup`,B,!0),jc(i,`touchstart`,R,{capture:!0,passive:!0}),jc(i,`touchmove`,H,{capture:!0,passive:!0}),jc(i,`touchend`,ee,{capture:!0,passive:!0})));return()=>{te(),t.clear(),c(),C.current=!1}},[d,u,r,g,h,l,n,y,b,F,j,v,M,N,p,e,O,A]);let z=_.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),B=_.useMemo(()=>({onKeyDown:F,onPointerDown:R,onMouseDown:R,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,R]);return _.useMemo(()=>n?{reference:z,floating:B,trigger:z}:{},[n,z,B])}function nu(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),X(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Vi(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function ru(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=Q(i),{mounted:c,setMounted:l,transitionStatus:u}=Xl(t,!1,!1,o),d=!t&&r;X(()=>{t&&s(!1)},[t,s]);let f=_.useRef(c),p=_.useRef(!1),m=Bc(),h=()=>{f.current=!1,l(!1),a()};X(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=Q(()=>{f.current&&(t?(p.current=!0,m()):h())});return Yl({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var iu={tabIndex:-1,[as]:``};function au(e,t=!1){let n=Wc(),r=Jc()!=null,i=jr(()=>e(n,r)).current;return nu({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ou({handle:e,store:t}){return X(()=>e.attachStore(t),[e,t]),null}function su(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function cu(e,t){let n=_.useRef(null);return Q(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),su(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),su(t))})}function lu(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function uu(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function du(e,t,n,r={}){let i=n.reason,a=i===bc,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=uu(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=lu(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Fi.flushSync(l):l()}function fu(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=cu(e,n),o=Q(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=Q(e=>{a(e),e&&o(e)});return X(()=>(s(t.current),()=>s(null)),[s,t,n,e]),X(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function pu(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=_.useRef(null),i=e.useState(`open`);X(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=_c(vc);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function mu(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=ru({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return jr(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function hu(e,t){e.useSyncedValues(t),X(()=>()=>{e.update({activeTriggerProps:qr,inactiveTriggerProps:qr,popupProps:qr})},[e])}function gu(e,t){return t!=null&&!es(t)?0:typeof e==`function`?e():e}function _u(e,t,n){let r=gu(e,n);return typeof r==`number`?r:r?.[t]}function vu(e){return typeof e==`function`?e():e}function yu(e,t){return t||e===`click`||e===`mousedown`}function bu(e){return e?.includes(`mouse`)&&e!==`mousedown`}var xu=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Fl;restTimeout=new Fl;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Su=new WeakMap;function Cu(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Su.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Su.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function wu(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Su.get(n);a&&a!==e&&Cu(a),Cu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Su.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Tu(e){let t=e.context.dataRef.current,n=jr(()=>t.hoverInteractionState??xu.create()).current;return t.hoverInteractionState||=n,Nl(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Eu(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=Yc(),u=Jc(),d=Tu(e),f=Il(),p=Q(()=>yu(c.current.openEvent?.type,d.interactedInside)),m=Q(()=>bu(c.current.openEvent?.type)),h=Q(()=>{Cu(d)});X(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),_.useEffect(()=>h,[h]),X(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Vi(s)&&o){let e=s,t=o,n=zs(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??rs(e,`[data-rootownerid]`)??n.body;return wu(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),_.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Zl(l.nodesRef.current,u).length>0)}function a(t){let n=_u(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,_c(bc,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=is(e);Fs(t)?d.interactedInside=rs(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(js(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&Vi(o)&&Zl(l.nodesRef.current,r,!1).some(e=>Z(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,_c(bc,n)),l.events.emit(`floating.closed`,n)})}let y=o;return Mc(y&&jc(y,`mouseenter`,g),y&&jc(y,`mouseleave`,_),y&&jc(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Du={current:null};function Ou(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Du,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,v=Yc(l),y=Tu(e),b=_.useRef(!1),x=Ll(i),S=Ll(r),C=Ll(o),w=Ll(n),T=Ll(p),E=Ll(f),D=Q(()=>yu(h.current.openEvent?.type,y.interactedInside)),O=Q(()=>T.current?.()!==!1),k=Q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Z(t,n);if(!Vi(r))return!1;let a=r;return i.hasMatchingElement(e=>Z(e,a))&&(!t||!Z(t,a))}),A=Q(()=>{y.handler&&=(zs(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,y.handler),void 0)}),j=Q(()=>{Cu(y)});return u&&(y.handleCloseOptions=i?.__options),_.useEffect(()=>A,[A]),_.useEffect(()=>{if(!n)return;function e(e){e.open?b.current=!1:(b.current=e.reason===bc,A(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,y,A]),_.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=_u(S.current,`close`,y.pointerType);r?y.openChangeTimeout.start(r,()=>{e.setOpen(!1,_c(bc,t)),v?.events.emit(`floating.closed`,t)}):n&&(y.openChangeTimeout.clear(),e.setOpen(!1,_c(bc,t)),v?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Vi(r))return;function i(t){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,a&&!es(y.pointerType))return;let n=vu(C.current),r=_u(S.current,`open`,y.pointerType),i=is(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Vi(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Z(t,i)){c=t;break}}Vi(o)&&Vi(s)&&!e.context.triggerElements.hasElement(o)&&Z(o,s)&&(c=s);let l=c!=null&&k(s,c,i),u=e.select(`open`),d=E.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&b.current,p=!l&&Vi(c)&&Vi(s)&&Z(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?O()&&e.setOpen(!0,_c(bc,t,c)):m||(r?y.openChangeTimeout.start(r,()=>{g&&O()&&e.setOpen(!0,_c(bc,t,c))}):g&&O()&&e.setOpen(!0,_c(bc,t,c)))}function o(n){if(D()){j();return}A();let r=zs(e.select(`domReferenceElement`));y.restTimeout.clear(),y.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!js(n.relatedTarget,e.context.triggerElements)){if(x.current&&i){e.select(`open`)||y.openChangeTimeout.clear();let a=c.current;y.handler=x.current({...i,tree:v,x:n.clientX,y:n.clientY,onClose(){j(),A(),w.current&&!D()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,y.handler),y.handler(n)}else y.pointerType===`touch`&&Z(e.select(`floatingElement`),n.relatedTarget)||t(n)}}function l(e){Z(r,e.relatedTarget)||(y.openChangeTimeout.clear(),y.restTimeout.clear(),y.restTimeoutPending=!1)}let f=m?jc(r,`mouseout`,l):void 0;return s?Mc(jc(r,`mousemove`,i,{once:!0}),jc(r,`mouseenter`,i),jc(r,`mouseleave`,o),f):Mc(jc(r,`mouseenter`,i),jc(r,`mouseleave`,o),f)},[A,j,h,S,e,n,x,y,u,k,D,a,s,C,c,v,w,d,E,O,m]),_.useMemo(()=>{if(!n)return;function t(e){y.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=k(i,r,t.target);if(a&&!es(y.pointerType))return;if(o&&s&&y.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=y.handleCloseOptions?.getScope?.()??r.ownerDocument.body;wu(y,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=vu(C.current);if(o&&!s||c===0||!s&&y.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;y.restTimeout.clear();function l(){if(y.restTimeoutPending=!1,D())return;let t=e.select(`open`);!y.blockMouseMove&&(!t||s)&&O()&&e.setOpen(!0,_c(bc,n,r))}y.pointerType===`touch`?Fi.flushSync(()=>{l()}):s&&o?l():(y.restTimeoutPending=!0,y.restTimeout.start(c,l))}}},[n,y,D,k,a,e,C,O])}var ku=.1,Au=ku*ku,ju=.5;function Mu(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Nu(e,t,n,r,i,a,o,s,c,l){let u=!1;return Mu(e,t,n,r,i,a)&&(u=!u),Mu(e,t,i,a,o,s)&&(u=!u),Mu(e,t,o,s,c,l)&&(u=!u),Mu(e,t,c,l,n,r)&&(u=!u),u}function Pu(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Fu(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Iu(e={}){let{blockPointerEvents:t=!1}=e,n=new Fl,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Au;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=is(r),g=r.type===`mouseleave`,_=Z(u,h),v=Z(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Vi(r.relatedTarget)&&Z(u,r.relatedTarget))return;function y(){return!!(s&&Zl(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=Fu(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=Fu(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=Fu(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=Fu(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!Pu(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?ju/2:ju*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+ju+1,o=C||T?S.bottom-ju:S.top,s=C?T?S.bottom-ju:S.top:S.bottom-ju;M=Nu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?ju/2:ju*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-ju,o=C||T?S.top+ju:S.bottom,s=C?T?S.top+ju:S.bottom:S.top+ju;M=Nu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?ju/2:ju*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+ju+1,o=w||E?S.right-ju:S.left,s=w?E?S.right-ju:S.left:S.right-ju;M=Nu(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?ju/2:ju*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-ju,o=w||E?S.left+ju:S.right,s=w?E?S.left+ju:S.right:S.left+ju;M=Nu(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function Lu(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ml({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:qr,inactiveTriggerProps:qr,popupProps:qr}}var Ru=e=>e.triggerIdProp??e.activeTriggerId,zu=e=>e.openProp??e.open,Bu=e=>(e.popupElement?.id??e.floatingId)||void 0;function Vu(e,t){return t!==void 0&&zu(e)&&Ru(e)===t}function Hu(e,t){return Vu(e,t)?!0:t!==void 0&&zu(e)&&Ru(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Uu={open:zu,mounted:e=>e.mounted,transitionStatus:e=>zu(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Ru,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Bu,isTriggerActive:(e,t)=>t!==void 0&&Ru(e)===t,isOpenedByTrigger:(e,t)=>Vu(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Ru(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Hu(e,t)?Bu(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Wu(e){let t=_.useCallback(t=>e===void 0?Gr:e.subscribeStore(t),[e]),n=_.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,el.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Gu=qo&&gc;function Ku(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=_.useRef(!1),s=_.useRef(null),c=_.useRef(!0),l=Il();_.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=Ri(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&Hi(t)&&t===ns(zs(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return Mc(jc(r,`blur`,i),Gu&&jc(r,`keydown`,a,!0),Gu&&jc(r,`pointerdown`,l,!0))},[e,n]),_.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);Vi(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=_.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=is(n.nativeEvent);if(Vi(a)){if(Gu&&!n.relatedTarget){if(!c.current&&!Ps(a))return}else if(!Ls(a))return}let u=js(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,_c(xc,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,_c(xc,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=Vi(r)&&r.hasAttribute(dl(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=ns(zs(t));!r&&n===t||Z(a.current.floatingContext?.refs.floating.current,n)||Z(t,n)||o||js(r??n,e.context.triggerElements)||e.setOpen(!1,_c(xc,i))})}}},[a,r,e,l]);return _.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}function qu(e){return Wc(e,`base-ui`)}var Ju=_.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=yl({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,Y.jsxs)(_.Fragment,{children:[l,c&&Fi.createPortal(n,c)]})});Ju.displayName=`FloatingPortalLite`;var Yu=_.createContext(void 0);Yu.displayName=`DirectionContext`;function Xu(){return _.useContext(Yu)?.direction??`ltr`}function Zu(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=_.useState(null),d=_.useRef(null),f=Yc(n),p=_.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=Mo({...e,elements:{...p,...l&&{reference:l}}}),h=_.useCallback(e=>{let t=Vi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=_.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),v=_.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),y=_.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:v,nodeId:t,rootStore:r}),[m,g,v,t,r,s,c]);return X(()=>{o&&(d.current=o)},[o]),X(()=>{r.context.dataRef.current.floatingContext=y;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),_.useMemo(()=>({...m,context:y,refs:g,elements:v,rootStore:r}),[m,g,v,y,r])}var Qu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=ma(e,t)||{};if(l==null)return{};let d=Ma(u),f={x:n,y:r},p=ba(i),m=va(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=pa(D,k,O),j=!c.arrow&&ga(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),$u=(e,t)=>{let{name:n,fn:r}=Qu(e);return{name:n,fn:r,options:[e,t]}},ed={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},td={sideX:`left`,sideY:`top`},nd=`--available-width`,rd=`--available-height`,id=`--anchor-width`,ad=`--anchor-height`,od=`--transform-origin`,sd=nd,cd=rd;function ld(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function ud(e,t,n){let{rects:r,placement:i}=e;return{side:ld(t,ha(i),n),align:ga(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dd(e){return fd(e,Zu)}function fd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:v,shift:y,nodeId:b,adaptiveOrigin:x,lazyFlip:S=!1,externalTree:C}=e,w=v.side||`flip`,T=v.align||`flip`,E=v.fallbackAxisSide||`end`,D=y?.crossAxis??!1,O=y?.rootBoundary,k=typeof n==`function`?n:void 0,A=Q(k),j=k?A:n,M=Ll(n),N=Ll(g),P=Xu()===`rtl`,[F,I]=_.useState(null);!g&&F!==null&&I(null);let L=S===`placement`,R=F?ha(F):null,z=F&&L?ga(F)||`center`:null,B=R||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":P?`left`:`right`,"inline-start":P?`right`:`left`}[i],V=z||o,H=V===`center`?B:`${B}-${V}`,U=l;typeof U==`number`?U={top:U,right:U,bottom:U,left:U}:U&&={top:U.top||0,right:U.right||0,bottom:U.bottom||0,left:U.left||0};let ee=+(i===`bottom`),te=+(i===`top`),W=+(i===`right`),ne=+(i===`left`),re={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:U},ie=_.useRef(null),ae=Ll(a),G=Ll(s),K=typeof a==`function`?0:a,oe=typeof s==`function`?0:s,se=[];p&&se.push(p),se.push(No(e=>{let t=ud(e,i,P),n=typeof ae.current==`function`?ae.current(t):ae.current,r=typeof G.current==`function`?G.current(t):G.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[K,oe,P,i]));let ce=T===`none`&&w!==`shift`,le=!ce&&(u||D||w===`shift`),ue=w===`none`?null:Io({...re,padding:{top:U.top+1+ee,right:U.right+1+ne,bottom:U.bottom+1+te,left:U.left+1+W},mainAxis:!D&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),q=ce?null:Po({...re,rootBoundary:O,mainAxis:T!==`none`,crossAxis:le,limiter:u||D?void 0:Fo(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=ya(ha(e.placement)),i=r===`y`?t:n,a=r===`y`?U.left+U.right:U.top+U.bottom;return{offset:i/2+a/2}})},[re,u,D,O,U,T]);w===`shift`||T===`shift`||V===`center`?se.push(q,ue):se.push(ue,q),se.push(Lo({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!N.current)return;let i=e.style;i.setProperty(sd,`${t}px`),i.setProperty(cd,`${n}px`);let a=Ri(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(id,`${u}px`),i.setProperty(ad,`${d}px`)}}),$u(e=>({element:ie.current||zs(e.elements.floating).createElement(`div`),padding:ie.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=ha(r),u=ga(r),d=ya(l)===`y`,f=ie.current,p=typeof a==`function`?a(ud(e,i,P)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return le&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(od,d?`${m} ${h}`:`${h} ${m}`),{}}},ed,x),X(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let de=_.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:fe,elements:pe,x:me,y:he,middlewareData:ge,update:_e,placement:ve,context:ye,isPositioned:be,floatingStyles:xe}=t({rootContext:h,open:m?g:void 0,placement:H,middleware:se,strategy:r,whileElementsMounted:m?void 0:(...e)=>bo(...e,de),nodeId:b,externalTree:C}),{sideX:Se,sideY:Ce}=ge.adaptiveOrigin||td,we=be?r:`fixed`,Te=_.useMemo(()=>{let e;return e=be?x?{position:we,[Se]:me,[Ce]:he}:{...xe,position:we}:{position:we,top:0,left:0},e[sd]=`100vw`,e[cd]=`100vh`,be||(e.opacity=0),e},[x,we,Se,me,Ce,he,xe,be]),Ee=_.useRef(null);X(()=>{if(!g)return;let e=M.current,t=typeof e==`function`?e():e,n=(pd(t)?t.current:t)||null;n!==Ee.current&&(fe.setPositionReference(n),Ee.current=n)},[g,fe,j,M]),_.useEffect(()=>{if(!g)return;let e=M.current;typeof e!=`function`&&pd(e)&&e.current!==Ee.current&&(fe.setPositionReference(e.current),Ee.current=e.current)},[g,fe,j,M]),_.useEffect(()=>{if(m&&g&&pe.reference&&pe.floating)return bo(pe.reference,pe.floating,_e,de)},[m,g,pe,_e,de]);let De=ha(ve),Oe=ld(i,De,P),ke=ga(ve)||`center`,Ae=!!ge.hide?.referenceHidden;X(()=>{S&&g&&be&&(De!==B||L&&ke!==V)&&I(ve)},[S,L,g,be,ve,De,ke,B,V]);let je=_.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return _.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ie,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:fe,context:ye,isPositioned:be,update:_e}),[Te,je,ie,Me,Oe,ke,De,Ae,fe,ye,be,_e])}function pd(e){return e!=null&&`current`in e}function md(e){return e===`starting`?fl:qr}function hd(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),di(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},md(r),i],stateAttributesMapping:Os})}var gd=_.createContext(void 0);gd.displayName=`TooltipRootContext`;function _d(e){let t=_.useContext(gd);if(t===void 0&&!e)throw Error(`Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.`);return t}var vd=_.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Fl,currentIdRef:{current:null},currentContextRef:{current:null}});vd.displayName=`FloatingDelayGroupContext`;function yd(e,t){e.current=t.current}function bd(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=_.useRef(n),a=_.useRef(n),o=_.useRef(null),s=_.useRef(null),c=Il();return X(()=>{a.current=n,o.current?i.current={open:_u(i.current,`open`),close:_u(n,`close`)}:i.current=n},[n,o,i,a]),(0,Y.jsx)(vd.Provider,{value:_.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function xd(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=_.useContext(vd),[d,f]=_.useState(!1),p=_.useRef(n);return X(()=>{p.current=n},[n]),X(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),X(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:_u(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,_c(vc))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),X(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,yd(a,s),u.clear()}},[c,i,a,r,s,u]),_.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}function Sd(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Cd(e){return e!=null&&e.clientX!=null}function wd(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=_.useRef(!1),l=_.useRef(null),[u,d]=_.useState(),[f,p]=_.useState([]),m=Q(t=>{e.set(`positionReference`,t)}),h=Q((t,n,i)=>{c.current||(!s.current.openEvent||Cd(s.current.openEvent))&&e.set(`positionReference`,Sd(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=Q(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),v=es(u)?a:i;_.useEffect(()=>{if(!n){m(o);return}if(!v)return;function e(){l.current?.(),l.current=null}let t=Ri(a);function r(t){let n=is(t);Z(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||Cd(s.current.openEvent)?l.current=jc(t,`mousemove`,r):m(o),e},[v,n,a,s,o,e,h,m,f]),_.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),_.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),_.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let y=_.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return _.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var Td={...Uu,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Ed=class extends Al{constructor(e,t,n){let r=new Cl;super(Dd(e,r,t,n),Od(r),Td)}setOpen=(e,t)=>{du(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,_c(yc,e))}};function Dd(e,t,n,r=!1){return{...Lu(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Od(e){return{popupRef:_.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var kd=ol(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=au((e,t)=>new Ed({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),v=p.useState(`mounted`),y=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),pu(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:b,transitionStatus:x}=mu(h,p),S=p.useState(`isInstantPhase`),C=p.useState(`instantType`),w=p.useState(`lastOpenChangeReason`),T=_.useRef(null);X(()=>{m&&t&&p.setOpen(!1,_c(Oc))},[m,t,p]),X(()=>{x===`ending`&&w===`none`||x!==`ending`&&S?(C!==`delay`&&(T.current=C),p.set(`instantType`,`delay`)):T.current!==null&&(p.set(`instantType`,T.current),T.current=null)},[x,S,w,C,p]),X(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),_.useImperativeHandle(o,()=>({unmount:b,close:()=>p.setOpen(!1,_c(kc))}),[b,p]);let E=h||v||!t&&a!==`none`;return(0,Y.jsxs)(gd.Provider,{value:p,children:[l&&(0,Y.jsx)(ou,{handle:l,store:p}),E&&(0,Y.jsx)(Ad,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:y}):f]})});kd.displayName=`TooltipRoot`;function Ad({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=tu(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=wd(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=_.useMemo(()=>Qr(a.reference,i.reference),[a.reference,i.reference]);return hu(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??qr}),null}var jd=_.createContext(void 0);jd.displayName=`TooltipProviderContext`;function Md(){return _.useContext(jd)}var Nd=`data-base-ui-tooltip-trigger`;function Pd(e){let t=is(e);return Vi(t)?t:null}var Fd=sl(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=_d(!0),m=Wu(a)??p;if(!m)throw Error(`Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.`);let h=qu(d),g=m.useState(`isTriggerActive`,h),v=m.useState(`isOpenedByTrigger`,h),y=m.useState(`floatingRootContext`),b=_.useRef(null),x=u??0,{registerTrigger:S,isMountedByThisTrigger:C}=fu(h,b,m,{payload:o,closeOnClick:l,closeDelay:x}),w=Md(),{activeIdRef:T,delayRef:E,isInstantPhase:D,hasProvider:O}=xd(y,{open:v}),k=Tu(y);m.useSyncedValue(`isInstantPhase`,D);let A=m.useState(`disabled`),j=s??A,M=Ll(j),N=m.useState(`trackCursorAxis`),P=m.useState(`disableHoverablePopup`),F=_.useRef(!1),I=Il(),L=_.useRef(void 0);function R(){return O&&T.current!=null?0:c??w??600}function z(e){let t=b.current;if(!t||!e)return!1;let n=rs(e,`[${Nd}]`);return n!==null&&n!==t&&Z(t,n)}function B(e){let t=z(e);return F.current=t,t&&(k.openChangeTimeout.clear(),k.restTimeout.clear(),k.restTimeoutPending=!1,I.clear()),t}let V=Ou(y,{enabled:!j,mouseOnly:!0,move:!1,handleClose:!P&&N!==`both`?Iu():null,restMs:R,delay(){return u==null&&O?{close:_u(E.current,`close`)}:{close:x}},triggerElementRef:b,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!F.current}}),H=Ku(y,{enabled:!j}).reference,U=e=>{let t=F.current,n=Pd(e),r=B(n),i=b.current,a=i&&n&&Z(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,_c(bc,e));else if(t&&!r&&a&&!M.current&&!m.select(`open`)&&i&&es(L.current)){let t=()=>{F.current||M.current||m.select(`open`)||m.setOpen(!0,_c(bc,e,i))},n=R();n===0?(I.clear(),t()):I.start(n,t)}},ee=m.useState(`appliedTriggerProps`,C||N!==`none`);return di(`button`,e,{state:{open:v},ref:[t,S,b],props:[V,H,ee,{onMouseOver(e){U(e.nativeEvent)},onFocus(e){z(Pd(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){F.current=!1,I.clear(),L.current=void 0},onPointerEnter(e){L.current=e.pointerType},onPointerDown(e){L.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[As]:j?``:void 0,[Nd]:j?void 0:``},f],stateAttributesMapping:Es})});Fd.displayName=`TooltipTrigger`;var Id=_.createContext(void 0);Id.displayName=`TooltipPortalContext`;function Ld(){let e=_.useContext(Id);if(e===void 0)throw Error(`Base UI: <Tooltip.Portal> is missing.`);return e}var Rd=_.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _d().useState(`mounted`)||n?(0,Y.jsx)(Id.Provider,{value:n,children:(0,Y.jsx)(Ju,{ref:t,...r})}):null});Rd.displayName=`TooltipPortal`;var zd=_.createContext(void 0);zd.displayName=`TooltipPositionerContext`;function Bd(){let e=_.useContext(zd);if(e===void 0)throw Error(`Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.`);return e}var Vd=_.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ml,style:g,...v}=e,y=_d(),b=Ld(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`trackCursorAxis`),w=y.useState(`disableHoverablePopup`),T=y.useState(`floatingRootContext`),E=y.useState(`instantType`),D=y.useState(`transitionStatus`),O=dd({anchor:i,positionMethod:a,floatingRootContext:T,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:b,collisionAvoidance:h,adaptiveOrigin:y.useState(`adaptiveOrigin`)}),k=hd(e,_.useMemo(()=>({open:x,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:C===`none`?E:`tracking-cursor`}),[x,O.side,O.align,O.anchorHidden,C,E]),{styles:O.positionerStyles,transitionStatus:D,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x||C===`both`||w});return(0,Y.jsx)(zd.Provider,{value:O,children:k})});Vd.displayName=`TooltipPositioner`;var Hd=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_d(),{side:s,align:c}=Bd(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);Yl({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),Eu(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return di(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[iu,f,md(d),a],stateAttributesMapping:ks})});Hd.displayName=`TooltipPopup`;var Ud=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_d(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Bd();return di(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Os})});Ud.displayName=`TooltipArrow`;var Wd=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=_.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Y.jsx)(jd.Provider,{value:t,children:(0,Y.jsx)(bd,{delay:i,timeoutMs:r,children:e.children})})};Wd.displayName=`TooltipProvider`;var Gd=Wd;function Kd({content:e,children:t,align:n,asChild:r,render:i,side:a,className:o,container:s,closeDelay:c,delay:l,...u}){let d=Ni(),f=s??d??void 0,p=i??(r?t:void 0),m=p!==void 0;return(0,Y.jsxs)(kd,{...u,children:[(0,Y.jsx)(Fd,{closeDelay:c,delay:l,className:J(!m&&`m-0 inline-flex h-auto min-h-0 items-center border-none bg-transparent p-0 shadow-none`,`cursor-default`,o),render:p,children:r?void 0:t}),(0,Y.jsx)(Rd,{container:f,children:(0,Y.jsx)(Vd,{align:n,side:a,sideOffset:10,className:`max-w-[var(--available-width)]`,children:(0,Y.jsxs)(Hd,{className:J(`flex origin-[var(--transform-origin)] flex-col rounded-md bg-kumo-base px-2.5 py-1.5 text-sm text-kumo-default`,`shadow-md outline outline-kumo-line`,`transition-[transform,scale,opacity] duration-150`,`data-[starting-style]:scale-90 data-[starting-style]:opacity-0`,`data-[ending-style]:scale-90 data-[ending-style]:opacity-0`,`data-[instant]:duration-0`,`kumo-tooltip-popup`),children:[(0,Y.jsx)(Ud,{className:J(`flex`,`data-[side=bottom]:top-[-8px]`,`data-[side=left]:right-[-13px] data-[side=left]:rotate-90`,`data-[side=right]:left-[-13px] data-[side=right]:-rotate-90`,`data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180`),children:(0,Y.jsx)(qd,{})}),e]})})})]})}function qd(e){return(0,Y.jsxs)(`svg`,{width:`20`,height:`10`,viewBox:`0 0 20 10`,fill:`none`,...e,children:[(0,Y.jsx)(`path`,{d:`M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z`,className:`fill-kumo-base`}),(0,Y.jsx)(`path`,{d:`M8.99542 1.85876C9.75604 1.17425 10.9106 1.17422 11.6713 1.85878L16.5281 6.22989C17.0789 6.72568 17.7938 7.00001 18.5349 7.00001L15.89 7L11.0023 2.60207C10.622 2.2598 10.0447 2.2598 9.66436 2.60207L4.77734 7L2.13171 7.00001C2.87284 7.00001 3.58774 6.72568 4.13861 6.22989L8.99542 1.85876Z`,className:`fill-kumo-arrow-edge`}),(0,Y.jsx)(`path`,{d:`M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z`,className:`fill-kumo-arrow-stroke`})]})}var Jd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),Yd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L137,128ZM57,128l71.52-71.51a12,12,0,0,0-17-17l-80,80a12,12,0,0,0,0,17l80,80a12,12,0,0,0,17-17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48V208l-80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M203.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,208,208V48A8,8,0,0,0,203.06,40.61ZM192,188.69,131.31,128,192,67.31Zm-66.34,13.65a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L51.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,48V208a8,8,0,0,1-13.66,5.66L128,147.31V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,128,48v60.69l66.34-66.35A8,8,0,0,1,208,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L128.49,128ZM48.49,128l75.75-75.76a6,6,0,0,0-8.48-8.48l-80,80a6,6,0,0,0,0,8.48l80,80a6,6,0,1,0,8.48-8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L125.66,128ZM45.66,128l77.17-77.17a4,4,0,0,0-5.66-5.66l-80,80a4,4,0,0,0,0,5.66l80,80a4,4,0,1,0,5.66-5.66Z`}))]]),Xd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M144.49,136.49l-80,80a12,12,0,0,1-17-17L119,128,47.51,56.49a12,12,0,0,1,17-17l80,80A12,12,0,0,1,144.49,136.49Zm80-17-80-80a12,12,0,1,0-17,17L199,128l-71.52,71.51a12,12,0,0,0,17,17l80-80A12,12,0,0,0,224.49,119.51Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,128,56,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M141.66,122.34l-80-80A8,8,0,0,0,48,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,141.66,122.34ZM64,188.69V67.31L124.69,128Zm157.66-55-80,80a8,8,0,0,1-11.32-11.32L204.69,128,130.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,221.66,133.66Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L127.51,128,51.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,140.24,132.24Zm80-8.48-80-80a6,6,0,0,0-8.48,8.48L207.51,128l-75.75,75.76a6,6,0,1,0,8.48,8.48l80-80A6,6,0,0,0,220.24,123.76Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M138.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L130.34,128,53.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,138.83,130.83Zm80-5.66-80-80a4,4,0,0,0-5.66,5.66L210.34,128l-77.17,77.17a4,4,0,0,0,5.66,5.66l80-80A4,4,0,0,0,218.83,125.17Z`}))]]),Zd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Qd=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M160,48V208L80,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z`}))]]),$d=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),ef=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),tf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M80,176h96l-48,48ZM128,32,80,80h96Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z`}))]]),nf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z`}))]]),rf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z`}))]]),af=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,40V168H168V88H88V40Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z`}))]]),of=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z`}))]]),sf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,68H133.39l-26-29.29a20,20,0,0,0-15-6.71H40A20,20,0,0,0,20,52V200.62A19.41,19.41,0,0,0,39.38,220H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68ZM44,56H90.61l10.67,12H44ZM212,196H44V92H212Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,80H32V56a8,8,0,0,1,8-8H92.69a8,8,0,0,1,5.65,2.34Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM92.69,56l16,16H40V56ZM216,200H40V88H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.88,15.88,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.41,15.41,0,0,0,39.39,216h177.5A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,74H130.49l-27.9-27.9a13.94,13.94,0,0,0-9.9-4.1H40A14,14,0,0,0,26,56V200.62A13.39,13.39,0,0,0,39.38,214H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74ZM40,54H92.69a2,2,0,0,1,1.41.59L113.51,74H38V56A2,2,0,0,1,40,54ZM218,200.89a1.11,1.11,0,0,1-1.11,1.11H39.38A1.4,1.4,0,0,1,38,200.62V86H216a2,2,0,0,1,2,2Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,76H129.66L101.17,47.52A11.9,11.9,0,0,0,92.69,44H40A12,12,0,0,0,28,56V200.62A11.4,11.4,0,0,0,39.38,212H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76ZM36,56a4,4,0,0,1,4-4H92.69a4,4,0,0,1,2.82,1.17L118.34,76H36ZM220,200.89a3.12,3.12,0,0,1-3.11,3.11H39.38A3.39,3.39,0,0,1,36,200.62V84H216a4,4,0,0,1,4,4Z`}))]]),cf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M248.23,112.31A20,20,0,0,0,232,104H220V88a20,20,0,0,0-20-20H132L105.34,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V208a12,12,0,0,0,12,12H211.1a12,12,0,0,0,11.33-8l28.49-81.47.06-.17A20,20,0,0,0,248.23,112.31ZM92,68l28.8,21.6A12,12,0,0,0,128,92h68v12H69.77a20,20,0,0,0-18.94,13.58L44,137.15V68ZM202.59,196H48.89l23.72-68H226.37Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,88v24H69.77a8,8,0,0,0-7.59,5.47L32,208V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h72A8,8,0,0,1,208,88Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M243.36,111.81A14,14,0,0,0,232,106H214V88a14,14,0,0,0-14-14H130L101.74,52.8a14.06,14.06,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V208a6,6,0,0,0,6,6H211.1a6,6,0,0,0,5.69-4.1l28.49-85.47A14,14,0,0,0,243.36,111.81ZM40,62H93.34a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h72a2,2,0,0,1,2,2v18H69.77a14,14,0,0,0-13.28,9.57L38,171V64A2,2,0,0,1,40,62Zm193.9,58.63L206.78,202H40.33l27.54-82.63a2,2,0,0,1,1.9-1.37H232a2,2,0,0,1,1.9,2.63Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M245,110.64A16,16,0,0,0,232,104H216V88a16,16,0,0,0-16-16H130.67L102.94,51.2a16.14,16.14,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V208h0a8,8,0,0,0,8,8H211.1a8,8,0,0,0,7.59-5.47l28.49-85.47A16.05,16.05,0,0,0,245,110.64ZM93.34,64,123.2,86.4A8,8,0,0,0,128,88h72v16H69.77a16,16,0,0,0-15.18,10.94L40,158.7V64Zm112,136H43.1l26.67-80H232Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M241.72,113a11.88,11.88,0,0,0-9.73-5H212V88a12,12,0,0,0-12-12H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V208a4,4,0,0,0,4,4H211.09a4,4,0,0,0,3.79-2.74l28.49-85.47A11.86,11.86,0,0,0,241.72,113ZM40,60H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h72a4,4,0,0,1,4,4v20H69.76a12,12,0,0,0-11.38,8.21L36,183.35V64A4,4,0,0,1,40,60Zm195.78,61.26L208.2,204H37.55L66,118.74A4,4,0,0,1,69.76,116H232a4,4,0,0,1,3.79,5.26Z`}))]]),lf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.29,47.91A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.1,16.64l32-21.33A20,20,0,0,0,164,194.66V140.75l66.67-71.16.12-.14A20,20,0,0,0,234.29,47.91Zm-91,79.89A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.25-8.2L49.23,60H206.77Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.81,66.76l-.08.09L160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.77,50.34A13.8,13.8,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.07L98,138.38V216a14,14,0,0,0,21.77,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.33-73A13.82,13.82,0,0,0,228.77,50.34Zm-11.26,6.94L147.62,131.9A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32A2,2,0,0,1,40,54H216a1.9,1.9,0,0,1,1.83,1.19A1.86,1.86,0,0,1,217.51,57.28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227,51.15A11.85,11.85,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.66,10l32-21.33a12,12,0,0,0,5.35-10V137.59l68.86-73.52A11.85,11.85,0,0,0,227,51.15Zm-8,7.5-69.9,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.08-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Z`}))]]),uf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.78,69.45A20,20,0,0,0,216,36H40A20,20,0,0,0,25.2,69.45l.12.14L92,140.75V216a20,20,0,0,0,31.09,16.65l32-21.34a20,20,0,0,0,8.9-16.64V140.75l66.67-71.16ZM143.23,127.8A12,12,0,0,0,140,136v56.52l-24,16V136a12,12,0,0,0-3.24-8.2L49.23,60H206.75Zm105.26,79.72a12,12,0,1,1-17,17L216,209l-15.52,15.51a12,12,0,0,1-17-17L199,192l-15.52-15.52a12,12,0,0,1,17-17L216,175l15.51-15.52a12,12,0,1,1,17,17L233,192Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M221.9,61.38,152,136v58.65a8,8,0,0,1-3.56,6.66l-32,21.33A8,8,0,0,1,104,216V136L34.1,61.38A8,8,0,0,1,40,48H216A8,8,0,0,1,221.9,61.38Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M227.82,66.76A16,16,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.73-72.32ZM40,56h0Zm106.19,74.59A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.46L40,56H216Zm99.49,79.81a8,8,0,0,1-11.32,11.32L216,203.32l-18.34,18.35a8,8,0,0,1-11.31-11.32L204.69,192l-18.34-18.35a8,8,0,0,1,11.31-11.31L216,180.69l18.34-18.34a8,8,0,0,1,11.32,11.31L227.31,192Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.73,66.85,160,139.17v55.49A16,16,0,0,1,152.87,208l-32,21.34A16,16,0,0,1,96,216V139.17L28.27,66.85l-.08-.09A16,16,0,0,1,40,40H216a16,16,0,0,1,11.84,26.76ZM227.31,192l18.35-18.34a8,8,0,0,0-11.32-11.32L216,180.69l-18.34-18.35a8,8,0,0,0-11.32,11.32L204.69,192l-18.35,18.34a8,8,0,0,0,11.32,11.32L216,203.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.79,50.34A13.83,13.83,0,0,0,216,42H40A14,14,0,0,0,29.67,65.42l.06.06L98,138.38V216a14,14,0,0,0,21.76,11.64l32-21.33A14,14,0,0,0,158,194.66V138.38l68.34-73A13.83,13.83,0,0,0,228.79,50.34Zm-11.26,6.94-69.9,74.62A6,6,0,0,0,146,136v58.66a2,2,0,0,1-.89,1.67l-32,21.33A2,2,0,0,1,110,216V136a6,6,0,0,0-1.62-4.1L38.53,57.32a1.89,1.89,0,0,1-.33-2.13A1.91,1.91,0,0,1,40,54H216a1.9,1.9,0,0,1,1.82,1.19A1.87,1.87,0,0,1,217.53,57.28Zm26.71,154.49a6,6,0,1,1-8.48,8.48L216,200.49l-19.75,19.76a6,6,0,0,1-8.49-8.48L207.52,192l-19.76-19.76a6,6,0,0,1,8.49-8.49L216,183.52l19.76-19.76a6,6,0,0,1,8.48,8.49L224.49,192Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.82,66.76A16,16,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.73-72.32ZM40,56h0Zm106.19,74.59A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.46L40,56H216Zm99.49,79.81a8,8,0,0,1-11.32,11.32L216,203.32l-18.34,18.35a8,8,0,0,1-11.31-11.32L204.69,192l-18.34-18.35a8,8,0,0,1,11.31-11.31L216,180.69l18.34-18.34a8,8,0,0,1,11.32,11.31L227.31,192Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227,51.15A11.86,11.86,0,0,0,216,44H40a12,12,0,0,0-8.88,20.07l.05.05L100,137.59V216a12,12,0,0,0,18.65,10l32-21.33a12,12,0,0,0,5.34-10V137.59l68.86-73.52A11.83,11.83,0,0,0,227,51.15Zm-8,7.5-69.91,74.62A4,4,0,0,0,148,136v58.65a4,4,0,0,1-1.78,3.33l-32,21.33A4,4,0,0,1,108,216V136a4,4,0,0,0-1.09-2.74L37.05,58.67A4,4,0,0,1,40,52H216a4,4,0,0,1,3,6.65Zm23.84,154.53a4,4,0,0,1-5.66,5.66L216,197.67l-21.17,21.17a4,4,0,0,1-5.66-5.66L210.34,192l-21.17-21.17a4,4,0,1,1,5.66-5.66L216,186.35l21.17-21.17a4,4,0,1,1,5.66,5.66L221.66,192Z`}))]]),df=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),ff=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M76,64A12,12,0,0,1,88,52H216a12,12,0,0,1,0,24H88A12,12,0,0,1,76,64Zm140,52H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,112a16,16,0,1,0,16,16A16,16,0,0,0,44,112Zm0-64A16,16,0,1,0,60,64,16,16,0,0,0,44,48Zm0,128a16,16,0,1,0,16,16A16,16,0,0,0,44,176Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,64V192H88V64Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM68,188a12,12,0,1,1,12-12A12,12,0,0,1,68,188Zm0-48a12,12,0,1,1,12-12A12,12,0,0,1,68,140Zm0-48A12,12,0,1,1,80,80,12,12,0,0,1,68,92Zm124,92H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M82,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H88A6,6,0,0,1,82,64Zm134,58H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Zm0,64H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12ZM44,54A10,10,0,1,0,54,64,10,10,0,0,0,44,54Zm0,128a10,10,0,1,0,10,10A10,10,0,0,0,44,182Zm0-64a10,10,0,1,0,10,10A10,10,0,0,0,44,118Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M84,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H88A4,4,0,0,1,84,64Zm132,60H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Zm0,64H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8ZM44,120a8,8,0,1,0,8,8A8,8,0,0,0,44,120Zm0-64a8,8,0,1,0,8,8A8,8,0,0,0,44,56Zm0,128a8,8,0,1,0,8,8A8,8,0,0,0,44,184Z`}))]]),pf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),mf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.49,111.07,90.41,22.94A20,20,0,0,0,60,39.87V216.13a20,20,0,0,0,30.41,16.93l144.08-88.13a19.82,19.82,0,0,0,0-33.86ZM84,208.85V47.15L216.16,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M228.23,134.69,84.15,222.81A8,8,0,0,1,72,216.12V39.88a8,8,0,0,1,12.15-6.69l144.08,88.12A7.82,7.82,0,0,1,228.23,134.69Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M240,128a15.74,15.74,0,0,1-7.6,13.51L88.32,229.65a16,16,0,0,1-16.2.3A15.86,15.86,0,0,1,64,216.13V39.87a15.86,15.86,0,0,1,8.12-13.82,16,16,0,0,1,16.2.3L232.4,114.49A15.74,15.74,0,0,1,240,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M231.36,116.19,87.28,28.06a14,14,0,0,0-14.18-.27A13.69,13.69,0,0,0,66,39.87V216.13a13.69,13.69,0,0,0,7.1,12.08,14,14,0,0,0,14.18-.27l144.08-88.13a13.82,13.82,0,0,0,0-23.62Zm-6.26,13.38L81,217.7a2,2,0,0,1-2.06,0,1.78,1.78,0,0,1-1-1.61V39.87a1.78,1.78,0,0,1,1-1.61A2.06,2.06,0,0,1,80,38a2,2,0,0,1,1,.31L225.1,126.43a1.82,1.82,0,0,1,0,3.14Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M232.4,114.49,88.32,26.35a16,16,0,0,0-16.2-.3A15.86,15.86,0,0,0,64,39.87V216.13A15.94,15.94,0,0,0,80,232a16.07,16.07,0,0,0,8.36-2.35L232.4,141.51a15.81,15.81,0,0,0,0-27ZM80,215.94V40l143.83,88Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.32,117.9,86.24,29.79a11.91,11.91,0,0,0-12.17-.23A11.71,11.71,0,0,0,68,39.89V216.11a11.71,11.71,0,0,0,6.07,10.33,11.91,11.91,0,0,0,12.17-.23L230.32,138.1a11.82,11.82,0,0,0,0-20.2Zm-4.18,13.37L82.06,219.39a4,4,0,0,1-4.07.07,3.77,3.77,0,0,1-2-3.35V39.89a3.77,3.77,0,0,1,2-3.35,4,4,0,0,1,4.07.07l144.08,88.12a3.8,3.8,0,0,1,0,6.54Z`}))]]),hf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M72,104a16,16,0,1,1,16,16A16,16,0,0,1,72,104Zm96,16a16,16,0,1,0-16-16A16,16,0,0,0,168,120Zm68-40V192a36,36,0,0,1-36,36H56a36,36,0,0,1-36-36V80A36,36,0,0,1,56,44h60V16a12,12,0,0,1,24,0V44h60A36,36,0,0,1,236,80Zm-24,0a12,12,0,0,0-12-12H56A12,12,0,0,0,44,80V192a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12Zm-12,82a30,30,0,0,1-30,30H86a30,30,0,0,1,0-60h84A30,30,0,0,1,200,162Zm-80-6v12h16V156ZM86,168H96V156H86a6,6,0,0,0,0,12Zm90-6a6,6,0,0,0-6-6H160v12h10A6,6,0,0,0,176,162Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,56H56A24,24,0,0,0,32,80V192a24,24,0,0,0,24,24H200a24,24,0,0,0,24-24V80A24,24,0,0,0,200,56ZM164,184H92a20,20,0,0,1,0-40h72a20,20,0,0,1,0,40Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Zm4,28H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48ZM172,96a12,12,0,1,1-12,12A12,12,0,0,1,172,96ZM96,184H80a16,16,0,0,1,0-32H96ZM84,120a12,12,0,1,1,12-12A12,12,0,0,1,84,120Zm60,64H112V152h32Zm32,0H160V152h16a16,16,0,0,1,0,32Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,50H134V16a6,6,0,0,0-12,0V50H56A30,30,0,0,0,26,80V192a30,30,0,0,0,30,30H200a30,30,0,0,0,30-30V80A30,30,0,0,0,200,50Zm18,142a18,18,0,0,1-18,18H56a18,18,0,0,1-18-18V80A18,18,0,0,1,56,62H200a18,18,0,0,1,18,18ZM74,108a10,10,0,1,1,10,10A10,10,0,0,1,74,108Zm88,0a10,10,0,1,1,10,10A10,10,0,0,1,162,108Zm2,30H92a26,26,0,0,0,0,52h72a26,26,0,0,0,0-52Zm-22,12v28H114V150ZM78,164a14,14,0,0,1,14-14h10v28H92A14,14,0,0,1,78,164Zm86,14H154V150h10a14,14,0,0,1,0,28Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,48H136V16a8,8,0,0,0-16,0V48H56A32,32,0,0,0,24,80V192a32,32,0,0,0,32,32H200a32,32,0,0,0,32-32V80A32,32,0,0,0,200,48Zm16,144a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V80A16,16,0,0,1,56,64H200a16,16,0,0,1,16,16Zm-52-56H92a28,28,0,0,0,0,56h72a28,28,0,0,0,0-56Zm-24,16v24H116V152ZM80,164a12,12,0,0,1,12-12h8v24H92A12,12,0,0,1,80,164Zm84,12h-8V152h8a12,12,0,0,1,0,24ZM72,108a12,12,0,1,1,12,12A12,12,0,0,1,72,108Zm88,0a12,12,0,1,1,12,12A12,12,0,0,1,160,108Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M200,52H132V16a4,4,0,0,0-8,0V52H56A28,28,0,0,0,28,80V192a28,28,0,0,0,28,28H200a28,28,0,0,0,28-28V80A28,28,0,0,0,200,52Zm20,140a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V80A20,20,0,0,1,56,60H200a20,20,0,0,1,20,20ZM76,108a8,8,0,1,1,8,8A8,8,0,0,1,76,108Zm88,0a8,8,0,1,1,8,8A8,8,0,0,1,164,108Zm0,32H92a24,24,0,0,0,0,48h72a24,24,0,0,0,0-48Zm-20,8v32H112V148ZM76,164a16,16,0,0,1,16-16h12v32H92A16,16,0,0,1,76,164Zm88,16H152V148h12a16,16,0,0,1,0,32Z`}))]]),gf=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M224,80l-96,56L32,80l96-56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z`}),_.createElement(`path`,{d:`M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z`}),_.createElement(`path`,{d:`M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z`}))]]),_f=new Map([[`bold`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,_.createElement(_.Fragment,null,_.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),vf=(0,_.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),yf=_.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=_.useContext(vf);return _.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&_.createElement(`title`,null,n),s,c.get(a??f))});yf.displayName=`IconBase`;var bf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:Jd}));bf.displayName=`ArrowRightIcon`;var xf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:Yd}));xf.displayName=`CaretDoubleLeftIcon`;var Sf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:Xd}));Sf.displayName=`CaretDoubleRightIcon`;var Cf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:Zd}));Cf.displayName=`CaretDownIcon`;var wf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:Qd}));wf.displayName=`CaretLeftIcon`;var Tf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:$d}));Tf.displayName=`CaretRightIcon`;var Ef=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:ef}));Ef.displayName=`CaretUpIcon`;var Df=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:tf}));Df.displayName=`CaretUpDownIcon`;var Of=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:nf}));Of.displayName=`CheckIcon`;var kf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:rf}));kf.displayName=`ClockCounterClockwiseIcon`;var Af=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:af}));Af.displayName=`CopyIcon`;var jf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:of}));jf.displayName=`FileIcon`;var Mf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:sf}));Mf.displayName=`FolderIcon`;var Nf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:cf}));Nf.displayName=`FolderOpenIcon`;var Pf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:lf}));Pf.displayName=`FunnelIcon`;var Ff=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:uf}));Ff.displayName=`FunnelXIcon`;var If=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:df}));If.displayName=`InfoIcon`;var Lf=If,Rf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:ff}));Rf.displayName=`ListBulletsIcon`;var zf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:pf}));zf.displayName=`MinusIcon`;var Bf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:mf}));Bf.displayName=`PlayIcon`;var Vf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:hf}));Vf.displayName=`RobotIcon`;var Hf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:gf}));Hf.displayName=`StackIcon`;var Uf=_.forwardRef((e,t)=>_.createElement(yf,{ref:t,...e,weights:_f}));Uf.displayName=`XIcon`;var Wf={shape:{base:{classes:``,description:`Default rectangular button shape`},square:{classes:`items-center justify-center p-0`,description:`Square button for icon-only actions`},circle:{classes:`items-center justify-center p-0 rounded-full`,description:`Circular button for icon-only actions`}},size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small button for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small button for secondary actions`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default button size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large button for primary CTAs`}},compactSize:{xs:{classes:`size-3.5`},sm:{classes:`size-6.5`},base:{classes:`size-9`},lg:{classes:`size-10`}},variant:{primary:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`High-emphasis button for primary actions`},secondary:{classes:`bg-kumo-base !text-kumo-default ring not-disabled:hover:bg-kumo-tint disabled:bg-kumo-base/50 disabled:!text-kumo-default/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Default button style for most actions`},ghost:{classes:`text-kumo-default hover:bg-kumo-tint shadow-none bg-inherit`,description:`Minimal button with no background`},destructive:{classes:`relative overflow-hidden bg-(--kumo-button-emphasis-bg) !text-white ring ring-(--kumo-button-emphasis-ring) focus:ring-(--kumo-button-emphasis-ring) focus-visible:ring-(--kumo-button-emphasis-ring) active:ring-(--kumo-button-emphasis-ring) disabled:opacity-50`,description:`Danger button for destructive actions like delete`},"secondary-destructive":{classes:`bg-kumo-base !text-kumo-danger ring not-disabled:hover:!text-kumo-danger not-disabled:hover:ring-kumo-danger/30 disabled:bg-kumo-base/50 disabled:!text-kumo-danger/70 ring-kumo-line data-[state=open]:bg-kumo-base`,description:`Secondary button with destructive text for less prominent dangerous actions`},outline:{classes:`bg-transparent text-kumo-default ring ring-kumo-line transition-colors not-disabled:hover:text-kumo-strong not-disabled:hover:ring-kumo-focus/25`,description:`Bordered button with transparent background`}}},Gf={shape:`base`,size:`base`,variant:`secondary`};function Kf({variant:e=Gf.variant,size:t=Gf.size,shape:n=Gf.shape}={}){let r=n===`square`||n===`circle`;return J(`group flex w-max shrink-0 items-center font-medium select-none`,`border-0 shadow-xs`,`focus:ring-kumo-focus/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand`,`cursor-pointer`,`disabled:cursor-not-allowed disabled:text-kumo-subtle`,vr(Wf.size,t,Gf.size).classes,vr(Wf.shape,n,Gf.shape).classes,r&&vr(Wf.compactSize,t,Gf.size).classes,vr(Wf.variant,e,Gf.variant).classes)}var qf={xs:`pb-px [--kumo-button-text-lift:0.5px]`,sm:`pb-px [--kumo-button-text-lift:0.5px]`,base:`pb-0.5 [--kumo-button-text-lift:1px]`,lg:`pb-0.5 [--kumo-button-text-lift:1px]`},Jf={xs:`pl-1`,sm:`pl-1.5`,base:`pl-2.5`,lg:`pl-3.5`},Yf=`[&>svg:first-child]:translate-y-(--kumo-button-text-lift) [&>span.relative>svg:first-child]:translate-y-(--kumo-button-text-lift)`,Xf=(e,t,n,r)=>{let i=_.Children.toArray(r).some(e=>e!==``);if(e===`base`&&i)return J(qf[t],n!=null&&[Jf[t],Yf])},Zf=e=>e?_.isValidElement(e)?e:(0,Y.jsx)(e,{}):null,Qf=e=>{if(e===`primary`)return`var(--color-kumo-brand)`;if(e===`destructive`)return`var(--color-kumo-danger)`},$f=e=>{let t=Qf(e);if(t)return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${t}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${t}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${t}, white 15%)`,"--kumo-button-emphasis-gradient-end":t}},ep=new Set([`href`,`target`,`rel`,`download`,`hrefLang`,`media`,`ping`,`referrerPolicy`,`linksExternal`]),tp=e=>{let t={...e};for(let e of Object.keys(t))(e.startsWith(`on`)||ep.has(e))&&delete t[e];return t},np=(e,t,n)=>{let r=n==null?null:(0,Y.jsx)(`span`,{className:`contents`,children:n});return Qf(e)?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`absolute inset-0 rounded-[inherit] bg-linear-to-b from-(--kumo-button-emphasis-gradient-start) to-(--kumo-button-emphasis-gradient-end) shadow-[inset_0_1px_0_0_var(--kumo-button-emphasis-bg)] group-hover:from-(--kumo-button-emphasis-bg)`}),(0,Y.jsxs)(`span`,{className:`relative flex items-center gap-1.5`,children:[t,r]})]}):(0,Y.jsxs)(Y.Fragment,{children:[t,r]})},rp=e=>{if(typeof e==`string`)return e;if(typeof e==`number`)return String(e)},ip=_.forwardRef(({children:e,className:t,disabled:n,loading:r,shape:i=`base`,size:a=`base`,variant:o=`secondary`,icon:s,style:c,title:l,...u},d)=>{let{type:f,...p}=u,m=$f(o),h=rp(l),g={...p,...!_.Children.count(e)&&!p[`aria-label`]&&!p[`aria-labelledby`]&&h&&{"aria-label":h}},v=r?(0,Y.jsx)(ji,{size:a===`lg`?16:14}):Zf(s),y=(0,Y.jsx)(`button`,{ref:d,"data-kumo-component":`Button`,className:J(Kf({variant:o,size:a,shape:i}),Xf(i,a,v,e),n&&`cursor-not-allowed opacity-50`,t),disabled:r||n,style:m?{...m,...c}:c,type:f??`button`,...g,children:np(o,v,e)});return l&&(n||r)?(0,Y.jsx)(Kd,{content:l,render:(0,Y.jsx)(`span`,{className:`inline-flex`}),children:y}):l?(0,Y.jsx)(Kd,{content:l,render:y}):y});ip.displayName=`Button`;var ap=_.forwardRef(({children:e,className:t,disabled:n=!1,external:r,href:i,shape:a=`base`,size:o=`base`,variant:s=`ghost`,icon:c,style:l,title:u,...d},f)=>{let p=Or(),m=$f(s),h=r?{target:`_blank`,rel:`noopener noreferrer`}:{};if(n)return(0,Y.jsx)(ip,{...tp(d),className:J(`select-text`,t),"data-kumo-component":`LinkButton`,disabled:!0,icon:c,shape:a,size:o,style:l,title:u,variant:s,children:e});let g=Zf(c),_=(0,Y.jsx)(p,{ref:f,"data-kumo-component":`LinkButton`,className:J(Kf({variant:s,size:o,shape:a}),Xf(a,o,g,e),`flex items-center no-underline! select-text`,t),href:i,style:m?{...m,...l}:l,to:typeof i==`string`?i:void 0,...h,...d,children:np(s,g,e)});return u?(0,Y.jsx)(Kd,{content:u,render:_}):_});ap.displayName=`LinkButton`;var op=(0,_.createContext)({variant:`default`,size:`sm`}),sp={default:{accent:`var(--color-kumo-info)`,secondary:`text-inherit ring-kumo-info/50 fill-kumo-info hover:!text-inherit hover:!ring-kumo-info/50 hover:bg-kumo-info/10`,ghost:`text-inherit fill-kumo-info hover:bg-kumo-info/10`},alert:{accent:`var(--color-kumo-warning)`,secondary:`text-inherit ring-kumo-warning/50 fill-kumo-warning hover:!text-inherit hover:!ring-kumo-warning/50 hover:bg-kumo-warning/10`,ghost:`text-inherit fill-kumo-warning hover:bg-kumo-warning/10`},error:{accent:`var(--color-kumo-danger)`,secondary:`text-inherit ring-kumo-danger/50 fill-kumo-danger hover:!text-inherit hover:!ring-kumo-danger/50 hover:bg-kumo-danger/10`,ghost:`text-inherit fill-kumo-danger hover:bg-kumo-danger/10`},secondary:{accent:`var(--color-neutral-700, oklch(37.1% 0 0))`,secondary:`text-inherit ring-kumo-focus/20 fill-kumo-subtle hover:!text-inherit hover:!ring-kumo-focus/20 hover:bg-kumo-contrast/10`,ghost:`text-inherit fill-kumo-subtle hover:bg-kumo-contrast/10`}};function cp(e){return{"--kumo-button-emphasis-ring":`color-mix(in oklch, ${e}, black 10%)`,"--kumo-button-emphasis-bg":`color-mix(in oklch, ${e}, white 30%)`,"--kumo-button-emphasis-gradient-start":`color-mix(in oklch, ${e}, white 15%)`,"--kumo-button-emphasis-gradient-end":e}}var lp=(0,_.forwardRef)(function({variant:e=`primary`,className:t,style:n,...r},i){let a=(0,_.useContext)(op),o=sp[a.variant];return(0,Y.jsx)(ip,{ref:i,variant:e===`secondary`?`outline`:e,size:a.size,className:J(e!==`primary`&&o[e],t),style:e===`primary`?{...cp(o.accent),...n}:n,...r})});lp.displayName=`Banner.Action`;var up=`flex w-full`,dp={variant:{default:{classes:`bg-kumo-info-tint text-kumo-info`,iconClasses:`fill-kumo-info`,description:`Informational banner for general messages`},alert:{classes:`bg-kumo-warning-tint text-kumo-warning`,iconClasses:`fill-kumo-warning`,description:`Warning banner for cautionary messages`},error:{classes:`bg-kumo-danger-tint text-kumo-danger`,iconClasses:`fill-kumo-danger`,description:`Error banner for critical issues`},secondary:{classes:`bg-kumo-contrast/5 text-kumo-default/70`,iconClasses:`fill-kumo-interact`,description:`Neutral banner for secondary messages`}},size:{base:{classes:`items-start gap-3 rounded-lg px-4 py-3 text-base`,description:`Default banner size`},sm:{classes:`items-center gap-2 rounded-md px-3 py-2 text-sm`,description:`Compact banner for dialogs and tight spaces`}}},fp={variant:`default`,size:`base`},pp={base:{row:`gap-3`,icon:`h-[1.375em]`,description:`text-sm`,action:`sm`},sm:{row:`gap-2`,icon:`h-[1.25em]`,description:`text-sm`,action:`xs`}};function mp({variant:e=fp.variant,size:t=fp.size}={}){let n=vr(dp.variant,e,fp.variant),r=vr(dp.size,t,fp.size);return J(up,n.classes,r.classes)}var hp=(0,_.forwardRef)(function({icon:e,title:t,description:n,action:r,children:i,text:a,variant:o=fp.variant,size:s=fp.size,className:c,...l},u){let d=vr(dp.variant,o,fp.variant),f=pp[s],p=s===`sm`,m=p&&(0,_.isValidElement)(r)&&r.type===Di;if(t||n)return(0,Y.jsx)(op.Provider,{value:{variant:o,size:f.action},children:(0,Y.jsxs)(`div`,{ref:u,className:J(mp({variant:o,size:s}),c),...l,children:[e&&(0,Y.jsx)(`span`,{className:J(`flex shrink-0 items-center`,f.icon,d.iconClasses),children:e}),(0,Y.jsxs)(`div`,{className:J(`flex min-w-0 flex-1 items-center justify-between`,f.row,!t&&`pt-px`),children:[p?(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5`,children:[t&&(0,Y.jsxs)(`span`,{className:`leading-snug font-medium`,children:[t,!n&&m&&(0,Y.jsx)(`span`,{className:`ml-1.5 [&_[data-kumo-component=Link]]:inline`,children:r})]}),n&&(0,Y.jsxs)(`span`,{className:J(f.description,`leading-snug`),children:[n,m&&(0,Y.jsx)(`span`,{className:`ml-1.5 [&_[data-kumo-component=Link]]:inline`,children:r})]})]}):(0,Y.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[t&&(0,Y.jsx)(`p`,{className:`leading-snug font-medium`,children:t}),n&&(0,Y.jsx)(`div`,{className:J(f.description,`leading-snug`),children:(0,_.isValidElement)(n)?n:(0,Y.jsx)(`p`,{children:n})})]}),!m&&r!=null&&(0,Y.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:r})]})]})});let h=i??a,g=(0,_.isValidElement)(h)?h:(0,Y.jsx)(`p`,{children:h});return(0,Y.jsx)(op.Provider,{value:{variant:o,size:f.action},children:(0,Y.jsxs)(`div`,{ref:u,className:J(mp({variant:o,size:s}),c),...l,children:[e&&(0,Y.jsx)(`span`,{className:J(`shrink-0`,d.iconClasses),children:e}),g]})})});hp.displayName=`Banner`;var gp=Object.assign(hp,{Action:lp}),_p=(0,_.createContext)({label:{optional:`(optional)`,tooltip:`More information`},layerDialog:{close:`Close`,cancel:`Cancel`}});function vp(){return(0,_.useContext)(_p)}function yp(e={}){return J(`m-0 text-base font-medium text-kumo-default`)}function bp(){return J(`inline-flex items-center gap-1`)}function xp({children:e,showOptional:t=!1,optionalLabel:n,tooltip:r,tooltipAriaLabel:i,className:a,htmlFor:o,asContent:s=!1}){let{label:c}=vp(),l=n===void 0?c.optional:n,u=i??c.tooltip,d=(0,Y.jsxs)(Y.Fragment,{children:[e,t&&(0,Y.jsx)(`span`,{className:`font-normal text-kumo-subtle`,children:l}),r&&(0,Y.jsx)(Kd,{content:r,render:(0,Y.jsx)(ip,{variant:`ghost`,size:`xs`,shape:`square`,"aria-label":u,children:(0,Y.jsx)(Lf,{className:`size-4`})})})]});return s?(0,Y.jsx)(`span`,{className:J(bp(),a),children:d}):(0,Y.jsx)(`label`,{htmlFor:o,className:J(yp(),bp(),a),children:d})}xp.displayName=`Label`;var Sp=_.createContext(void 0);Sp.displayName=`FieldsetRootContext`;function Cp(e=!1){let t=_.useContext(Sp);if(!t&&!e)throw Error(`Base UI: FieldsetRootContext is missing. Fieldset parts must be placed within <Fieldset.Root>.`);return t}function wp(e,t){let n=qu(e);return X(()=>(t(n),()=>{t(e=>e===n?void 0:e)}),[n,t]),n}var Tp=_.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,...o}=e,[s,c]=_.useState(void 0),l=Cp(!0)?.disabled||a,u=di(`fieldset`,e,{ref:t,state:{disabled:l},props:[{"aria-labelledby":s,disabled:l},o]}),d=_.useMemo(()=>({legendId:s,setLegendId:c,disabled:l}),[s,c,l]);return(0,Y.jsx)(Sp.Provider,{value:d,children:u})});Tp.displayName=`FieldsetRoot`;var Ep=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{disabled:s,setLegendId:c}=Cp(),l=wp(a,c);return di(`div`,e,{state:{disabled:s},ref:t,props:[{id:l},o]})});Ep.displayName=`FieldsetLegend`;var Dp=`data-valid`,Op=`data-invalid`,kp={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ap={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},jp={valid(e){return e===null?null:e?{[Dp]:``}:{[Op]:``}}},Mp={invalid:void 0,name:void 0,validityData:{state:kp,errors:[],error:``,value:``,initialValue:null},setValidityData:Gr,disabled:void 0,setTouched:Gr,setDirty:Gr,setFilled:Gr,setFocused:Gr,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ap,registerFieldControl:Gr,validation:{getValidationProps:(e,t=qr)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Gr,getInputControl:()=>null,commit:async()=>{},change:Gr}},Np=_.createContext(Mp);Np.displayName=`FieldRootContext`;function Pp(e=!0){let t=_.useContext(Np);if(t.setValidityData===Gr&&!e)throw Error(`Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.`);return t}var Fp=_.createContext({controlId:void 0,registerControlId:Gr,resetControlId:Gr,labelId:void 0,setLabelId:Gr,messageIds:[],setMessageIds:Gr,getDescriptionProps:e=>e});Fp.displayName=`LabelableContext`;function Ip(){return _.useContext(Fp)}var Lp=_.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Gr,validationMode:`onSubmit`,submitCountRef:{current:0}});Lp.displayName=`FormContext`;function Rp(){return _.useContext(Lp)}function zp(e={}){let{id:t,fallbackControlId:n,native:r=!1,setLabelId:i,focusControl:a}=e,{controlId:o,setLabelId:s}=Ip(),c=wp(t,Q(e=>{s(e),i?.(e)})),l=o??n;function u(e){if(a){a(e,l);return}if(!l)return;let t=Bp(e.currentTarget,l);Hi(t)&&Vp(t)}function d(e){rs(is(e.nativeEvent),`button,input,select,textarea`)||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),!r&&u(e))}return r?{id:c,htmlFor:l,onMouseDown:d}:{id:c,onClick:d,onPointerDown(e){e.preventDefault()}}}function Bp(e,t){let n=e.getRootNode();for(;Ui(n);){let e=n.getElementById(t);if(e)return e;n=n.host.getRootNode()}return zs(e).getElementById(t)}function Vp(e){e.focus({focusVisible:!0})}function Hp(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}var Up=Object.keys(kp);function Wp(e,t){return e.matches(`:disabled`)?!1:!t||e.form===t||e.form===null&&!e.hasAttribute(`form`)}function Gp(e,t){let n=null;for(let r of e.keys())if(Wp(r,t)){if(!r.validity.valid)return r;n??=r}return n}function Kp(e){return{...kp,valid:!e,customError:e}}function qp(e){return e&&e.validationMessage?[e.validationMessage]:[]}function Jp(e){let{elementRef:t,formRef:n}=Rp(),{setValidityData:r,validate:i,validityData:a,validationDebounceTime:o,invalid:s,markedDirtyRef:c,state:l,shouldValidateOnChange:u,validationMode:d,registeredFieldIdRef:f}=e,{controlId:p,getDescriptionProps:m}=Ip(),h=Il(),g=_.useRef(null),v=jr(()=>new Map).current,y=_.useRef(0),b=_.useRef(null),x=_.useCallback((e,t)=>(v.set(e,t),()=>{v.delete(e)}),[v]),S=Q(()=>{let e=Gp(v,t.current);return e&&v.get(e)?.controlRef.current||null}),C=Q(async(e,o=!1)=>{y.current+=1;let m=y.current;function _(e,t=s){let r=f.current??p;if(r==null)return;let i=n.current.fields.get(r);if(!i)return;let a=Hp(e,t);n.current.fields.set(r,{...i,validityData:a})}function x(t,n){let r=t.valid===!1?n:[];return{value:e,state:t,error:r[0]??``,errors:r,initialValue:a.initialValue}}function S(e,t){let n=e.validity.customError?e.validationMessage:``,r=t.replace(/\r\n?/g,`
|
|
20
|
+
`);e.setCustomValidity(r),b.current=[e,r,n]}function C(){let e=b.current;b.current=null,e&&(!e[0].willValidate||e[0].validationMessage===e[1])&&e[0].setCustomValidity(e[2])}function w(e,t,n){let i=x(e,t);_(i,n),r(i)}function T(e){let t=Up.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of Up)if(e!==`valid`){if(e===`valueMissing`&&t[e])n=!0;else if(t[e])return t}return n&&!c.current&&(t.valid=!0,t.valueMissing=!1),t}function E(){return v.size>0?Gp(v,t.current):g.current}let D=E();function O(){return D=E(),D?.willValidate?T(D):Kp(!1)}if(o){if(l.valid!==!1||!D)return;if(!D.validity.valueMissing){C();let e=E(),t=e?.validity.customError?qp(e):[];w(Kp(t.length>0),t,!1);return}for(let e of Up)if(e!==`valid`&&e!==`valueMissing`&&e!==`customError`&&D.validity[e])return}h.clear(),C();let k=O(),A=qp(D),j=u();if(A.length===0||j){let t=Array.from(n.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}),r=i(e,t),o;if(typeof r==`object`&&r&&`then`in r){if(k.valid===!1?w(k,A):d!==`onSubmit`&&a.state.customError||(k.valid=null,w(k,A)),o=await r,m!==y.current)return;k=O()}else o=r;A=o?[].concat(o).filter(Boolean):[],A.length>0?(k.valid=!1,k.customError=!0,D?.willValidate&&S(D,A.join(`
|
|
21
|
+
`))):A=qp(D)}w(k,A)}),w=Q((e,t=!1)=>{if(h.clear(),y.current+=1,t)return;let n=u();n&&e!==``&&o?h.start(o,()=>{C(e)}):C(e,!n)}),T=_.useCallback((e,t={})=>Qr(m(t),l.valid===!1&&!l.disabled&&!e?{"aria-invalid":!0}:qr),[m,l.disabled,l.valid]);return _.useMemo(()=>({getValidationProps:T,inputRef:g,registeredInputs:v,registerInput:x,getInputControl:S,commit:C,change:w}),[T,v,x,S,C,w])}var Yp=Ur(`error`,`Base UI`),Xp=_.createContext({disabled:!1});Xp.displayName=`FieldItemContext`;function Zp(){return _.useContext(Xp)}var Qp=function(e){let t=qu(),[n,r]=_.useState(t),[i,a]=_.useState(),[o,s]=_.useState([]),c=n===void 0?t:n,l=jr(()=>new Map),{messageIds:u}=Ip(),d=Q((e,t)=>{let n=l.current;t===void 0?n.delete(e):n.set(e,t),r(e=>{if(n.size===0)return e;let t;for(let r of n.values()){if(r===e)return e;t===void 0&&(t=r)}return t})}),f=Q(()=>{l.current.size===0&&r(t)}),p=_.useCallback(e=>{let t=e[`aria-describedby`]?e[`aria-describedby`].split(` `):[];return t.push(...u,...o),{...e,"aria-describedby":Array.from(new Set(t)).join(` `)||void 0}},[u,o]),m=_.useMemo(()=>({controlId:c,registerControlId:d,resetControlId:f,labelId:i,setLabelId:a,messageIds:o,setMessageIds:s,getDescriptionProps:p}),[c,d,f,i,a,o,s,p]);return(0,Y.jsx)(Fp.Provider,{value:m,children:e.children})};Qp.displayName=`LabelableProvider`;function $p(e){let{change:t,commit:n,invalid:r,markedDirtyRef:i,name:a,setRegisteredFieldName:o,registeredFieldIdRef:s,setValidityData:c,validityData:l}=e,{formRef:u}=Rp(),d=_.useRef(null),f=_.useRef(null),p=_.useRef(!1),m=Q(()=>{let e=f.current;if(e)return e.getValue?e.getValue():e.value});function h(e){return e.value===void 0?m():e.value}let g=Q(()=>{let e=f.current;i.current=!0,n(e?h(e):l.value)});function v(){let e=f.current;e&&e.id&&u.current.fields.set(e.id,{getValue:m,name:a??e.name,controlRef:e.controlRef,validityData:Hp(l,r),validate:g})}function y(e=f.current?.id){e&&u.current.fields.delete(e)}function b(e){if(p.current)return;p.current=!0;let t=h(e);c(e=>e.initialValue===t?e:{...e,initialValue:t})}return X(()=>{let e=f.current;e&&e.id&&(o(a?void 0:e.name),u.current.fields.set(e.id,{getValue:m,name:a??e.name,controlRef:e.controlRef,validityData:Hp(l,r),validate:g}))},[u,m,r,a,o,g,l]),X(()=>{let e=u.current.fields;return()=>{let t=f.current?.id;t&&e.delete(t)}},[u]),[g,Q((e,n)=>{if(!n){d.current===e&&(d.current=null,t(void 0,!0),y(),f.current=null,o(void 0),s.current=void 0);return}let r=f.current?.id,i=d.current;i&&i!==e&&t(void 0,!0),d.current=e,f.current=n,a||o(n.name),s.current=n.id,r&&r!==n.id&&y(r),b(n),v()})]}var em=_.forwardRef(function(e,t){let{errors:n,validationMode:r,submitCountRef:i}=Rp(),{render:a,className:o,validate:s,validationDebounceTime:c=0,validationMode:l=r,name:u,disabled:d=!1,invalid:f,dirty:p,touched:m,actionsRef:h,style:g,...v}=e,y=Cp(!0)?.disabled,b=Q(s||(()=>null)),x=y||d,[S,C]=_.useState(!1),[w,T]=_.useState(!1),[E,D]=_.useState(!1),[O,k]=_.useState(!1),A=_.useRef(void 0),j=p??w,M=m??S,N=_.useRef(j),P=_.useRef(void 0),[F,I]=_.useState(),L=u??F;X(()=>{p!==void 0&&(N.current=p)},[p]);let R=Q(e=>{p===void 0&&(e&&(N.current=!0),T(e))}),z=Q(e=>{m===void 0&&C(e)}),B=Q(()=>l===`onChange`||l===`onSubmit`&&i.current>0),V=L&&Object.hasOwn(n,L)?n[L]:null,H=!!(Array.isArray(V)?V.length:V),U=f===!0||H,[ee,te]=_.useState({state:kp,error:``,errors:[],value:null,initialValue:null}),W=!U&&(x?null:ee.state.valid),ne=_.useMemo(()=>({disabled:x,touched:M,dirty:j,valid:W,filled:E,focused:O}),[x,M,j,W,E,O]),re=Jp({setValidityData:te,validate:b,validityData:ee,validationDebounceTime:c,invalid:U,markedDirtyRef:N,state:ne,shouldValidateOnChange:B,validationMode:l,registeredFieldIdRef:P}),[ie,ae]=$p({change:re.change,commit:re.commit,invalid:U,markedDirtyRef:N,name:u,setRegisteredFieldName:I,registeredFieldIdRef:P,setValidityData:te,validityData:ee});_.useImperativeHandle(h,()=>({validate:ie}),[ie]);let G=_.useMemo(()=>({invalid:U,name:L,validityData:ee,setValidityData:te,disabled:x,setTouched:z,setDirty:R,setFilled:D,setFocused:k,focusOwnerRef:A,validationMode:l,shouldValidateOnChange:B,state:ne,registerFieldControl:ae,validation:re}),[U,L,ee,x,z,R,D,k,l,B,ne,ae,re]),K=di(`div`,e,{ref:t,state:ne,props:v,stateAttributesMapping:jp});return(0,Y.jsx)(Np.Provider,{value:G,children:K})});em.displayName=`FieldRootInner`;var tm=_.forwardRef(function(e,t){return(0,Y.jsx)(Qp,{children:(0,Y.jsx)(em,{...e,ref:t})})});tm.displayName=`FieldRoot`;var nm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,nativeLabel:o=!0,...s}=e,c=Pp(!1),l=Zp(),{labelId:u}=Ip(),d={...c.state,disabled:c.disabled||l.disabled},f=_.useRef(null),p=zp({id:u??a,native:o});return _.useEffect(()=>{if(!f.current)return;let e=f.current.tagName===`LABEL`;o?e||Yp(`<Field.Label> expected a <label> element because the \`nativeLabel\` prop is true. Rendering a non-<label> disables native label association, so \`htmlFor\` will not work. Use a real <label> in the \`render\` prop, or set \`nativeLabel\` to \`false\`.${Pi.captureOwnerStack?.()||``}`):e&&Yp(`<Field.Label> expected a non-<label> element because the \`nativeLabel\` prop is false. Rendering a <label> assumes native label behavior while Base UI treats it as non-native, which can cause unexpected pointer behavior. Use a non-<label> in the \`render\` prop, or set \`nativeLabel\` to \`true\`.${Pi.captureOwnerStack?.()||``}`)},[o]),di(`label`,e,{ref:[t,f],state:d,props:[p,s],stateAttributesMapping:jp})});nm.displayName=`FieldLabel`;function rm(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Ip(),o=qu(),s=jr(()=>Symbol()),c=_.useRef(!1),l=_.useRef(!1),u=Q(()=>{c.current&&i!==Gr&&(c.current=!1,i(s.current,void 0))});return X(()=>{if(!n||i===Gr){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),X(()=>u,[u]),(n?r:void 0)??t??o}function im(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Pp(),s=jr(()=>Symbol());X(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),X(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function am(e,t){let n=_.useRef(e),r=Q(t);X(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function om({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=_.useRef(e!==void 0),[a,o]=_.useState(()=>t),s=i&&e!==void 0?e:a;{_.useEffect(()=>{i!==(e!==void 0)&&Yp([`A component is changing the ${i?``:`un`}controlled ${r} state of ${n} to be ${i?`un`:``}controlled.`,`Elements should not switch from uncontrolled to controlled (or vice versa).`,`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.",`More info: https://fb.me/react-controlled-components`].join(`
|
|
22
|
+
`))},[r,n,e]);let{current:a}=_.useRef(t);_.useEffect(()=>{!i&&sm(a)!==sm(t)&&Yp([`A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
23
|
+
`))},[t])}return[s,_.useCallback(e=>{i||o(e)},[])]}function sm(e){let t=0,n=new WeakMap;try{return JSON.stringify(e,function(e,r){if(!(e===`_owner`&&this!=null&&typeof this==`object`&&`$$typeof`in this)){if(typeof r==`bigint`)return`__bigint__:${r}`;if(typeof r==`object`&&r){let e=n.get(r);if(e!==void 0)return`__object__:${e}`;n.set(r,t),t+=1}return r}})??`__top__:${typeof e}`}catch{return`__unserializable__`}}function cm(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var lm=_.createContext(void 0);lm.displayName=`CheckboxGroupContext`;function um(){return _.useContext(lm)}function dm(e){let{allValues:t=Kr,value:n,onValueChange:r}=e,i=_.useRef(n),a=_.useRef(new Map),[o,s]=_.useState(`mixed`),[c,l]=_.useState(()=>({registry:new Map})),u=n.length===t.length,d=n.length!==t.length&&n.length>0,f=Q(r),p=Q((e,t)=>{let n=c.registry;return n.set(e,(n.get(e)??Kr).concat(t)),l({registry:n}),()=>{let r=(n.get(e)??Kr).filter(e=>e!==t);r.length===0?n.delete(e):n.set(e,r),l({registry:n})}}),m=_.useCallback(()=>({indeterminate:d,checked:u,"aria-controls":t.flatMap(e=>c.registry.get(e)??Kr).join(` `)||void 0,onCheckedChange(e,r){let c=i.current,l=t.filter(e=>a.current.get(e)&&c.includes(e)),u=t.filter(e=>!a.current.get(e)||c.includes(e));if(c.length===u.length||c.length===0){n.length===u.length?f(l,r):f(u,r);return}let d=`mixed`,p=c;o===`mixed`?(d=`on`,p=u):o===`on`&&(d=`off`,p=l),f(p,r),r.isCanceled||s(d)}}),[t,u,c,d,f,o,n.length]),h=_.useCallback(e=>({checked:n.includes(e),onCheckedChange(t,r){let a=n.slice();t?a.push(e):a.splice(a.indexOf(e),1),f(a,r),r.isCanceled||(i.current=a,s(`mixed`))}}),[f,n]);return _.useMemo(()=>({getParentProps:m,getChildProps:h,registerChildId:p,disabledStatesRef:a}),[m,h,p])}var fm=_.forwardRef(function(e,t){let{allValues:n,className:r,defaultValue:i,disabled:a=!1,id:o,onValueChange:s,render:c,value:l,style:u,...d}=e,{disabled:f,name:p,state:m,validation:h,setFilled:g,setDirty:v,validityData:y}=Pp(),{labelId:b,registerControlId:x,getDescriptionProps:S}=Ip(),{clearErrors:C,elementRef:w}=Rp(),T=f||a,[E,D]=om({controlled:l,default:i??Kr,name:`CheckboxGroup`,state:`value`}),O=Q((e,t)=>{s?.(e,t),!t.isCanceled&&D(e)}),k=dm({allValues:n,value:E,onValueChange:O});rm({id:null});let A=qu(o),j=h.getInputControl;im(_.useMemo(()=>({get current(){return j()}}),[j]),A,E,Q(()=>{let e=w.current;if(!e)return E;let t=new Set;for(let[n,r]of h.registeredInputs)r.value!==void 0&&n.checked&&Wp(n,e)&&t.add(r.value);return E.filter(e=>t.has(e))}),!!p&&!T,p),X(()=>{g(E.length>0)},[E,g]),am(E,()=>{p&&C(p);let e=Array.isArray(y.initialValue)?y.initialValue:Kr;v(!cm(E,e)),h.change(E)});let M={...m,disabled:T},N=_.useMemo(()=>({allValues:n,value:E,setValue:O,parent:k,disabled:T,validation:h,registerControlId:x}),[n,E,O,k,T,h,x]),P=di(`div`,e,{state:M,ref:t,props:[{id:o,role:`group`,"aria-labelledby":b},d,S],stateAttributesMapping:jp});return(0,Y.jsx)(lm.Provider,{value:N,children:P})});fm.displayName=`CheckboxGroup`;function pm(e,t,n,r=!0,i,a){let[o,s]=_.useState(),c=qu(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return X(()=>{let i=e||t||l||!r?void 0:mm(n.current,c);o!==i&&s(i)}),u}function mm(e,t){let n=hm(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function hm(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function gm(e,t,n){let{setFocused:r,focusOwnerRef:i}=Pp(),a=Q(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return X(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var _m=_.createContext(void 0);_m.displayName=`CompositeRootContext`;function vm(e=!1){let t=_.useContext(_m);if(t===void 0&&!e)throw Error(`Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.`);return t}function ym(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Ri(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function bm(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:_.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function xm(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=_.useRef(null),s=vm(!0),c=a??s!==void 0,{props:l}=bm({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i});_.useEffect(()=>{if(!o.current)return;let e=Sm(o.current);i?e||Yp(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${Pi.captureOwnerStack?.()||``}`):e&&Yp(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${Pi.captureOwnerStack?.()||``}`)},[i]);let u=_.useCallback(()=>{let e=o.current;Sm(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return X(u,[u]),{getButtonProps:_.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Qr({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ci(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Sm(r),s=!i&&Cm(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),ym(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),ym(r,e)))},onKeyUp(e){t||(ci(e),a?.(e),e.target===e.currentTarget&&i&&c&&Sm(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),ym(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Q(e=>{o.current=e,u()})}}function Sm(e){return Hi(e)&&e.tagName===`BUTTON`}function Cm(e){return Hi(e)&&e.tagName===`A`&&!!e.href}function wm(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var Tm=`data-checked`,Em=`data-unchecked`;function Dm(e){return{checked(t){return e.indeterminate?{}:t?{[Tm]:``}:{[Em]:``}},...jp}}var Om=_.createContext(void 0);Om.displayName=`CheckboxRootContext`;function km(){let e=_.useContext(Om);if(e===void 0)throw Error(`Base UI: CheckboxRootContext is missing. Checkbox parts must be placed within <Checkbox.Root>.`);return e}var Am=`data-parent`,jm=_.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:v,value:y,nativeButton:b=!1,style:x,...S}=e,{clearErrors:C}=Rp(),{disabled:w,name:T,setDirty:E,setFilled:D,setTouched:O,state:k,validationMode:A,validityData:j,validation:M}=Pp(),N=Zp(),{labelId:P,registerControlId:F,getDescriptionProps:I}=Ip(),L=um(),R=L?.allValues===void 0?void 0:L.parent,z=R!==void 0,B=w||N.disabled||L?.disabled||o,V=T??d,H=y??V,U=qu(),ee=L?.registerControlId!==F,te=rm({id:c||void 0,enabled:ee}),W=b?te:U,ne={};z&&(p?ne=R.getParentProps():H!==void 0&&(ne=R.getChildProps(H)));let{checked:re=n,indeterminate:ie=l,onCheckedChange:ae,...G}=ne,K=L?.value,oe=_.useRef(null),se=gm(B,oe),{getButtonProps:ce,buttonRef:le}=xm({disabled:B,native:b}),ue=L?.validation??M,[q,de]=om({controlled:H!==void 0&&K!==void 0&&!p?K.includes(H):re,default:i,name:`Checkbox`,state:`checked`}),fe=z?!!re:q,pe=z&&ie||l;im(oe,U,q,void 0,!L&&!B,d);let me=R?.registerChildId,he=_.useRef(null),ge=ue.registerInput,_e=L?H:void 0,ve=_.useCallback(e=>ge(e,{controlRef:oe,value:_e}),[ge,_e]),ye=Mr(u,he,p?void 0:ve),be=pm(a,P,he,!b,te,S[`aria-label`]);X(()=>{he.current&&(he.current.indeterminate=pe),L||D(q)},[q,pe,L,D]),am(q,()=>{L||(C(V),E(q!==j.initialValue),ue.change(q))});let xe=Qr({checked:q,disabled:B,form:s,name:p?void 0:V,id:b?void 0:te,required:g,ref:ye,style:V?zc:Rc,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=_c(vc,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(ae?.(t,n),!n.isCanceled&&(de(t),H!==void 0&&L!==void 0&&!p&&!z))){let e=t?[...L.value,H]:L.value.filter(e=>e!==H);L.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){oe.current?.focus()}},y===void 0?qr:{value:(L?q&&y:y)||``},I,e=>ue.getValidationProps(B,e));_.useEffect(()=>{if(!R||H===void 0)return;let e=R.disabledStatesRef.current;return e.set(H,B),()=>{e.delete(H)}},[R,B,H]);let Se=_.useMemo(()=>({...k,checked:fe,disabled:B,readOnly:m,required:g,indeterminate:pe}),[k,fe,B,m,g,pe]),Ce=Dm(Se),we=di(`span`,e,{state:Se,ref:[le,oe,t],props:[{id:W,role:`checkbox`,"aria-checked":pe?`mixed`:fe,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":be,[Am]:p?``:void 0,onFocus(){se(!0)},onBlur(){let e=he.current;e&&(O(!0),se(!1),A===`onBlur`&&ue.commit(L?K:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=he.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),Ri(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||wm(t)?.click()})},onClick(e){if(m||B)return;e.preventDefault();let t=he.current;t&&ym(t,e)}},S,G,ce,I,e=>ue.getValidationProps(B,e)],stateAttributesMapping:Ce}),Te=we.props.id;return X(()=>{if(me&&!p&&H!==void 0&&Te!==void 0)return me(H,Te)},[me,p,H,Te]),(0,Y.jsxs)(Om.Provider,{value:Se,children:[we,!q&&!L&&V&&!p&&v!==void 0&&(0,Y.jsx)(`input`,{type:`hidden`,form:s,name:V,value:v,disabled:B}),(0,Y.jsx)(`input`,{...xe,suppressHydrationWarning:!0})]})});jm.displayName=`CheckboxRoot`;var Mm=_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=km(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Xl(c),f=_.useRef(null),p={...s,transitionStatus:u};Yl({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Dm(s),...hs},h=a||l,g=di(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});Mm.displayName=`CheckboxIndicator`;var Nm=(0,_.createContext)({controlFirst:void 0,appearance:`default`,orientation:null}),Pm=(0,_.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:r,variant:i=`default`,label:a,labelTooltip:o,controlFirst:s=!0,onCheckedChange:c,required:l,name:u,...d},f)=>{{let e=!!a,t=!!d[`aria-label`],n=!!d[`aria-labelledby`];e||t||n||console.warn(`[Kumo Checkbox]: Checkbox must have an accessible name. Provide either:
|
|
24
24
|
- label prop: <Checkbox label='Accept terms' />
|
|
25
25
|
- aria-label: <Checkbox aria-label='Select item' />
|
|
26
26
|
- aria-labelledby for custom label association
|
|
27
|
-
Note: When used inside Checkbox.Group, label is optional`)}let p=(0,Y.jsx)(Dm,{ref:f,"data-kumo-component":`Checkbox`,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:c,className:J(`relative flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-none`,a&&`mt-0.5`,i===`error`?`ring-kumo-danger`:`ring-kumo-hairline`,!r&&`hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`,r&&`cursor-not-allowed opacity-50`,e),...d,children:(0,Y.jsx)(Om,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,Y.jsx)(`span`,{...e,children:t.indeterminate?(0,Y.jsx)(Ff,{weight:`bold`,size:12}):(0,Y.jsx)(Ef,{weight:`bold`,size:12})})})});return a?(0,Y.jsx)(Zp,{className:`inline-flex`,children:(0,Y.jsxs)(Qp,{className:J(`!m-0 inline-flex !min-h-0 items-start gap-2 !text-base`,s?`flex-row`:`flex-row-reverse justify-end`,r?`cursor-not-allowed`:`cursor-pointer`),children:[p,(0,Y.jsx)(_p,{showOptional:l===!1,tooltip:o,asContent:!0,children:a})]})}):p});Am.displayName=`Checkbox`;var jm=(0,_.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:r,variant:i=`default`,appearance:a,label:o,description:s,value:c,onCheckedChange:l,name:u},d)=>{let{controlFirst:f,appearance:p,orientation:m}=(0,_.useContext)(km),h=(a??p)===`card`,g=f??!h,v=h&&p===`card`&&m!==null,y=(0,Y.jsx)(Om,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,Y.jsx)(`span`,{...e,children:t.indeterminate?(0,Y.jsx)(Ff,{weight:`bold`,size:12}):(0,Y.jsx)(Ef,{weight:`bold`,size:12})})});return h?(0,Y.jsxs)(`label`,{"data-kumo-component":`Checkbox`,"data-kumo-part":`item-label`,className:J(`group relative m-0 flex items-start gap-3 bg-kumo-base p-3 has-[[data-checked]]:bg-kumo-tint`,v?J(`border-b border-kumo-line bg-clip-padding last:border-b-0`,m===`horizontal`&&`odd:border-r [&:last-child:nth-child(odd)]:border-r-0 [&:nth-last-child(2):nth-child(odd)]:border-b-0`):`rounded-lg border border-kumo-hairline has-[[data-checked]]:border-kumo-interact`,g&&`flex-row-reverse`,i===`error`&&J(`has-[[data-checked]]:bg-kumo-base`,!v&&`border-kumo-danger has-[[data-checked]]:border-kumo-danger`),r?`cursor-not-allowed opacity-50`:J(`cursor-pointer has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50`,i!==`error`&&`hover:not-has-[[data-disabled]]:not-has-[[data-checked]]:bg-kumo-elevated`),e),children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Y.jsx)(`span`,{className:`text-base font-medium text-kumo-default`,children:o}),s&&(0,Y.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:s})]}),(0,Y.jsx)(Dm,{ref:d,"data-kumo-component":`Checkbox`,"data-kumo-part":`item`,value:c,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:l,className:J(`relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring focus:ring-kumo-focus focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand`,i===`error`?`ring-kumo-danger`:`ring-kumo-line`,!r&&i!==`error`&&`group-hover:ring-kumo-hairline`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`),children:y})]}):(0,Y.jsxs)(`label`,{"data-kumo-component":`Checkbox`,"data-kumo-part":`item-label`,className:J(`relative m-0 inline-flex items-start gap-2`,!g&&`flex-row-reverse justify-end`,r?`cursor-not-allowed opacity-50`:`cursor-pointer`,e),children:[(0,Y.jsx)(Dm,{ref:d,"data-kumo-component":`Checkbox`,"data-kumo-part":`item`,value:c,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:l,className:J(`peer relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2`,i===`error`?`ring-kumo-danger`:`ring-kumo-hairline`,!r&&`group-hover:ring-kumo-hairline hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`),children:y}),(0,Y.jsx)(`span`,{className:`text-base text-kumo-default`,children:o})]})});jm.displayName=`Checkbox.Item`;function Mm({children:e,className:t}){return(0,Y.jsx)(Sp,{className:J(`text-base font-medium text-kumo-default`,t),children:e})}Mm.displayName=`Checkbox.Legend`;function Nm({legend:e,children:t,error:n,description:r,defaultValue:i,value:a,onValueChange:o,allValues:s,disabled:c,orientation:l=`vertical`,appearance:u=`default`,controlFirst:d,className:f}){return(0,Y.jsx)(km.Provider,{value:{controlFirst:d,appearance:u,orientation:l},children:(0,Y.jsx)(cm,{defaultValue:i,value:a,onValueChange:o,allValues:s,disabled:c,children:(0,Y.jsxs)(xp,{className:J(`flex flex-col p-0`,u===`card`?`gap-2`:`gap-4`,f),children:[e&&(0,Y.jsx)(Sp,{className:`text-base font-medium text-kumo-default`,children:e}),(0,Y.jsx)(`div`,{className:J(l===`vertical`?u===`card`?`flex flex-col overflow-hidden rounded-lg ring ring-kumo-line`:`flex flex-col gap-2`:u===`card`?`grid grid-cols-2 overflow-hidden rounded-lg bg-kumo-base ring ring-kumo-line`:`flex flex-row flex-wrap gap-2`),children:t}),n&&(0,Y.jsx)(`p`,{className:`text-sm text-kumo-danger`,children:n}),r&&(0,Y.jsx)(`p`,{className:`text-sm text-kumo-subtle`,children:r})]})})})}var Pm=Object.assign(Am,{Item:jm,Group:Nm,Legend:Mm});Pm.displayName=`Checkbox`;function Fm(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Wc(),a=Jc()!=null;{let e=r.reference;e&&!Vi(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let o=jr(()=>new Ml({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Cl,floatingId:i,syncOnly:!1,nested:a})).current;return X(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Vi(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Im(e){return zr(19)?e:e?`true`:void 0}function Lm(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Rm={...Dp,...hs},zm=_.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,style:o,...s}=e,c=qu(r),{validityData:l,state:u,name:d}=Ap(!1),{setMessageIds:f}=Mp(),{errors:p}=Pp(),m=d&&Object.hasOwn(p,d)?p[d]:null,h=!!(Array.isArray(m)?m.length:m),g=typeof a==`string`,v=!1;v=a===!0?!0:u.disabled?!1:g?!!l.state[a]:h||l.state.valid===!1;let{mounted:y,transitionStatus:b,setMounted:x}=Xl(v);X(()=>{if(v&&c)return f(e=>e.concat(c)),()=>{f(e=>e.filter(e=>e!==c))}},[v,c,f]);let S=_.useRef(null),[C,w]=_.useState(null),[T,E]=_.useState(null),D=l.error;!g&&h?D=m:l.errors.length>1&&(D=l.errors);let O=D;Array.isArray(D)&&(O=D.length>1?(0,Y.jsx)(`ul`,{children:D.map(e=>(0,Y.jsx)(`li`,{children:e},e))}):D[0]);let k=Array.isArray(D)?JSON.stringify(D):D;v&&k!==T&&(E(k),w(O)),Yl({open:v,ref:S,onComplete(){v||x(!1)}});let A={...u,transitionStatus:b},j=di(`div`,e,{ref:[t,S],state:A,props:[{id:c,children:v?O:C},s],stateAttributesMapping:Rm,enabled:y});return y?j:null});zm.displayName=`FieldError`;var Bm=_.forwardRef(function(e,t){let{render:n,id:r,className:i,style:a,...o}=e,s=qu(r),c=Ap(!1),l=qp(),{setMessageIds:u}=Mp(),d={...c.state,disabled:c.disabled||l.disabled};return X(()=>{if(s)return u(e=>e.concat(s)),()=>{u(e=>e.filter(e=>e!==s))}},[s,u]),di(`p`,e,{ref:t,state:d,props:[{id:s},o],stateAttributesMapping:Dp})});Bm.displayName=`FieldDescription`;function Vm(e){if(e)return typeof e==`string`?{message:e,match:!0}:e}function Hm({controlFirst:e=!1}={}){return J(`grid gap-2`,`has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center`,e&&[`has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center`,`[&>label]:flex-1`])}function Um({children:e,label:t,required:n,labelTooltip:r,error:i,description:a,controlFirst:o=!1,hideLabel:s=!1}){let c=n===!1;return(0,Y.jsxs)(Zp,{className:Hm({controlFirst:o}),children:[!s&&(0,Y.jsx)(Qp,{className:`m-0 text-base font-medium text-kumo-default select-none`,children:(0,Y.jsx)(_p,{showOptional:c,tooltip:r,asContent:!0,children:t})}),e,i?(0,Y.jsx)(zm,{className:J(`text-sm leading-snug text-kumo-danger`,`col-span-full`),match:i.match,children:i.message}):a&&(0,Y.jsx)(Bm,{className:J(`text-sm leading-snug text-kumo-subtle`,`col-span-full`),children:a})]})}var Wm=_.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:v,validityData:y,setFilled:b,validationMode:x,validation:S}=Ap(),{clearErrors:C,elementRef:w,submitCountRef:T}=Pp(),E=h||s,D=m??a,O={...p,disabled:E},{labelId:k}=Mp(),A=$p({id:i}),j=o!==void 0,M=o==null?void 0:String(o),N=Q(()=>S.inputRef.current?.value);em(S.inputRef,A,M,N,!E,a),X(()=>{let e=M??S.inputRef.current?.value;e!==void 0&&b(e!==``)},[M,l,S.inputRef,b]),tm(M,()=>{M!==void 0&&(C(D),v(M!==(y.initialValue??``)),S.change(M))});let P=_.useRef(null),F=fm(E,P),I=Il();return di(`input`,e,{ref:[t,P],state:O,props:[{id:A,disabled:E,name:D,ref:S.inputRef,"aria-labelledby":k,autoFocus:u,...j?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=_c(vc,e.nativeEvent);c?.(t,n),!j&&(v(t!==(y.initialValue??``)),b(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(C(D),S.change(t)))},onFocus(){F(!0)},onBlur(e){if(g(!0),F(!1),x===`onBlur`){let t=e.currentTarget.value;S.commit(t),j&&queueMicrotask(()=>{let e=S.inputRef.current?.value;e!==void 0&&e!==t&&e!==(y.initialValue??``)&&S.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===w.current&&!e.defaultPrevented){let t=e.currentTarget,n=T.current;I.start(0,()=>{T.current===n&&S.commit(t.value)})}else S.commit(t)}}},f,e=>S.getValidationProps(E,e)],stateAttributesMapping:Dp})});Wm.displayName=`FieldControl`;var Gm=_.forwardRef(function(e,t){return(0,Y.jsx)(Wm,{ref:t,...e})});Gm.displayName=`Input`;var Km={size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small input for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small input for secondary fields`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default input size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large input for prominent fields`}},variant:{default:{classes:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`,description:`Default input appearance`},error:{classes:`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,description:`Error state for validation failures`}}},qm={size:`base`,variant:`default`};function Jm({variant:e=qm.variant,size:t=qm.size,parentFocusIndicator:n=!1,focusIndicator:r=!1}={}){return J(`border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none`,`kumo-input-placeholder disabled:text-kumo-disabled`,vr(Km.size,t,qm.size).classes,vr(Km.variant,e,qm.variant).classes,n&&(e===`error`?`focus-within:ring-[1.5px] focus-within:ring-kumo-danger/50`:`focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50`),r&&(e===`error`?`focus:ring-[1.5px] focus:ring-kumo-danger/50`:`focus:ring-[1.5px] focus:ring-kumo-focus/50`))}var Ym=(0,_.forwardRef)((e,t)=>{let{className:n,size:r=`base`,variant:i,label:a,labelTooltip:o,description:s,error:c,passwordManagerIgnore:l=!1,...u}=e;i===`error`&&console.warn('[Kumo Input]: variant="error" is deprecated. Error styling is now automatically applied when the `error` prop is truthy. Simply remove the variant prop and pass an error message instead.');let d=i??(c?`error`:`default`),{required:f}=u;{let e=!!a,t=!!u[`aria-label`],n=!!u[`aria-labelledby`];e||t||n||console.warn(`[Kumo Input]: Input must have an accessible name. Provide either:
|
|
27
|
+
Note: When used inside Checkbox.Group, label is optional`)}let p=(0,Y.jsx)(jm,{ref:f,"data-kumo-component":`Checkbox`,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:c,className:J(`relative flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2 focus:outline-none`,a&&`mt-0.5`,i===`error`?`ring-kumo-danger`:`ring-kumo-hairline`,!r&&`hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`,r&&`cursor-not-allowed opacity-50`,e),...d,children:(0,Y.jsx)(Mm,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,Y.jsx)(`span`,{...e,children:t.indeterminate?(0,Y.jsx)(zf,{weight:`bold`,size:12}):(0,Y.jsx)(Of,{weight:`bold`,size:12})})})});return a?(0,Y.jsx)(tm,{className:`inline-flex`,children:(0,Y.jsxs)(nm,{className:J(`!m-0 inline-flex !min-h-0 items-start gap-2 !text-base`,s?`flex-row`:`flex-row-reverse justify-end`,r?`cursor-not-allowed`:`cursor-pointer`),children:[p,(0,Y.jsx)(xp,{showOptional:l===!1,tooltip:o,asContent:!0,children:a})]})}):p});Pm.displayName=`Checkbox`;var Fm=(0,_.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:r,variant:i=`default`,appearance:a,label:o,description:s,value:c,onCheckedChange:l,name:u},d)=>{let{controlFirst:f,appearance:p,orientation:m}=(0,_.useContext)(Nm),h=(a??p)===`card`,g=f??!h,v=h&&p===`card`&&m!==null,y=(0,Y.jsx)(Mm,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,Y.jsx)(`span`,{...e,children:t.indeterminate?(0,Y.jsx)(zf,{weight:`bold`,size:12}):(0,Y.jsx)(Of,{weight:`bold`,size:12})})});return h?(0,Y.jsxs)(`label`,{"data-kumo-component":`Checkbox`,"data-kumo-part":`item-label`,className:J(`group relative m-0 flex items-start gap-3 bg-kumo-base p-3 has-[[data-checked]]:bg-kumo-tint`,v?J(`border-b border-kumo-line bg-clip-padding last:border-b-0`,m===`horizontal`&&`odd:border-r [&:last-child:nth-child(odd)]:border-r-0 [&:nth-last-child(2):nth-child(odd)]:border-b-0`):`rounded-lg border border-kumo-hairline has-[[data-checked]]:border-kumo-interact`,g&&`flex-row-reverse`,i===`error`&&J(`has-[[data-checked]]:bg-kumo-base`,!v&&`border-kumo-danger has-[[data-checked]]:border-kumo-danger`),r?`cursor-not-allowed opacity-50`:J(`cursor-pointer has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-50`,i!==`error`&&`hover:not-has-[[data-disabled]]:not-has-[[data-checked]]:bg-kumo-elevated`),e),children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,Y.jsx)(`span`,{className:`text-base font-medium text-kumo-default`,children:o}),s&&(0,Y.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:s})]}),(0,Y.jsx)(jm,{ref:d,"data-kumo-component":`Checkbox`,"data-kumo-part":`item`,value:c,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:l,className:J(`relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring focus:ring-kumo-focus focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand`,i===`error`?`ring-kumo-danger`:`ring-kumo-line`,!r&&i!==`error`&&`group-hover:ring-kumo-hairline`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`),children:y})]}):(0,Y.jsxs)(`label`,{"data-kumo-component":`Checkbox`,"data-kumo-part":`item-label`,className:J(`relative m-0 inline-flex items-start gap-2`,!g&&`flex-row-reverse justify-end`,r?`cursor-not-allowed opacity-50`:`cursor-pointer`,e),children:[(0,Y.jsx)(jm,{ref:d,"data-kumo-component":`Checkbox`,"data-kumo-part":`item`,value:c,name:u,checked:t,indeterminate:n,disabled:r,onCheckedChange:l,className:J(`peer relative mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2`,i===`error`?`ring-kumo-danger`:`ring-kumo-hairline`,!r&&`group-hover:ring-kumo-hairline hover:ring-kumo-hairline focus:ring-2 focus:ring-kumo-focus focus-visible:ring-2 focus-visible:ring-kumo-brand`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`),children:y}),(0,Y.jsx)(`span`,{className:`text-base text-kumo-default`,children:o})]})});Fm.displayName=`Checkbox.Item`;function Im({children:e,className:t}){return(0,Y.jsx)(Ep,{className:J(`text-base font-medium text-kumo-default`,t),children:e})}Im.displayName=`Checkbox.Legend`;function Lm({legend:e,children:t,error:n,description:r,defaultValue:i,value:a,onValueChange:o,allValues:s,disabled:c,orientation:l=`vertical`,appearance:u=`default`,controlFirst:d,className:f}){return(0,Y.jsx)(Nm.Provider,{value:{controlFirst:d,appearance:u,orientation:l},children:(0,Y.jsx)(fm,{defaultValue:i,value:a,onValueChange:o,allValues:s,disabled:c,children:(0,Y.jsxs)(Tp,{className:J(`flex flex-col p-0`,u===`card`?`gap-2`:`gap-4`,f),children:[e&&(0,Y.jsx)(Ep,{className:`text-base font-medium text-kumo-default`,children:e}),(0,Y.jsx)(`div`,{className:J(l===`vertical`?u===`card`?`flex flex-col overflow-hidden rounded-lg ring ring-kumo-line`:`flex flex-col gap-2`:u===`card`?`grid grid-cols-2 overflow-hidden rounded-lg bg-kumo-base ring ring-kumo-line`:`flex flex-row flex-wrap gap-2`),children:t}),n&&(0,Y.jsx)(`p`,{className:`text-sm text-kumo-danger`,children:n}),r&&(0,Y.jsx)(`p`,{className:`text-sm text-kumo-subtle`,children:r})]})})})}var Rm=Object.assign(Pm,{Item:Fm,Group:Lm,Legend:Im});Rm.displayName=`Checkbox`;function zm(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Wc(),a=Jc()!=null;{let e=r.reference;e&&!Vi(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`",`instead.`)}let o=jr(()=>new Ml({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Cl,floatingId:i,syncOnly:!1,nested:a})).current;return X(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Vi(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Bm(e){return zr(19)?e:e?`true`:void 0}function Vm(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Hm={...jp,...hs},Um=_.forwardRef(function(e,t){let{render:n,id:r,className:i,match:a,style:o,...s}=e,c=qu(r),{validityData:l,state:u,name:d}=Pp(!1),{setMessageIds:f}=Ip(),{errors:p}=Rp(),m=d&&Object.hasOwn(p,d)?p[d]:null,h=!!(Array.isArray(m)?m.length:m),g=typeof a==`string`,v=!1;v=a===!0?!0:u.disabled?!1:g?!!l.state[a]:h||l.state.valid===!1;let{mounted:y,transitionStatus:b,setMounted:x}=Xl(v);X(()=>{if(v&&c)return f(e=>e.concat(c)),()=>{f(e=>e.filter(e=>e!==c))}},[v,c,f]);let S=_.useRef(null),[C,w]=_.useState(null),[T,E]=_.useState(null),D=l.error;!g&&h?D=m:l.errors.length>1&&(D=l.errors);let O=D;Array.isArray(D)&&(O=D.length>1?(0,Y.jsx)(`ul`,{children:D.map(e=>(0,Y.jsx)(`li`,{children:e},e))}):D[0]);let k=Array.isArray(D)?JSON.stringify(D):D;v&&k!==T&&(E(k),w(O)),Yl({open:v,ref:S,onComplete(){v||x(!1)}});let A={...u,transitionStatus:b},j=di(`div`,e,{ref:[t,S],state:A,props:[{id:c,children:v?O:C},s],stateAttributesMapping:Hm,enabled:y});return y?j:null});Um.displayName=`FieldError`;var Wm=_.forwardRef(function(e,t){let{render:n,id:r,className:i,style:a,...o}=e,s=qu(r),c=Pp(!1),l=Zp(),{setMessageIds:u}=Ip(),d={...c.state,disabled:c.disabled||l.disabled};return X(()=>{if(s)return u(e=>e.concat(s)),()=>{u(e=>e.filter(e=>e!==s))}},[s,u]),di(`p`,e,{ref:t,state:d,props:[{id:s},o],stateAttributesMapping:jp})});Wm.displayName=`FieldDescription`;function Gm(e){if(e)return typeof e==`string`?{message:e,match:!0}:e}function Km({controlFirst:e=!1}={}){return J(`grid gap-2`,`has-[input[type=checkbox]]:grid-cols-[auto_1fr] has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:grid-cols-[auto_1fr] has-[[role=switch]]:items-center`,e&&[`has-[input[type=checkbox]]:flex has-[input[type=checkbox]]:flex-row-reverse has-[input[type=checkbox]]:flex-wrap has-[input[type=checkbox]]:items-center`,`has-[[role=switch]]:flex has-[[role=switch]]:flex-row-reverse has-[[role=switch]]:flex-wrap has-[[role=switch]]:items-center`,`[&>label]:flex-1`])}function qm({children:e,label:t,required:n,labelTooltip:r,error:i,description:a,controlFirst:o=!1,hideLabel:s=!1}){let c=n===!1;return(0,Y.jsxs)(tm,{className:Km({controlFirst:o}),children:[!s&&(0,Y.jsx)(nm,{className:`m-0 text-base font-medium text-kumo-default select-none`,children:(0,Y.jsx)(xp,{showOptional:c,tooltip:r,asContent:!0,children:t})}),e,i?(0,Y.jsx)(Um,{className:J(`text-sm leading-snug text-kumo-danger`,`col-span-full`),match:i.match,children:i.message}):a&&(0,Y.jsx)(Wm,{className:J(`text-sm leading-snug text-kumo-subtle`,`col-span-full`),children:a})]})}var Jm=_.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:v,validityData:y,setFilled:b,validationMode:x,validation:S}=Pp(),{clearErrors:C,elementRef:w,submitCountRef:T}=Rp(),E=h||s,D=m??a,O={...p,disabled:E},{labelId:k}=Ip(),A=rm({id:i}),j=o!==void 0,M=o==null?void 0:String(o),N=Q(()=>S.inputRef.current?.value);im(S.inputRef,A,M,N,!E,a),X(()=>{let e=M??S.inputRef.current?.value;e!==void 0&&b(e!==``)},[M,l,S.inputRef,b]),am(M,()=>{M!==void 0&&(C(D),v(M!==(y.initialValue??``)),S.change(M))});let P=_.useRef(null),F=gm(E,P),I=Il();return di(`input`,e,{ref:[t,P],state:O,props:[{id:A,disabled:E,name:D,ref:S.inputRef,"aria-labelledby":k,autoFocus:u,...j?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=_c(vc,e.nativeEvent);c?.(t,n),!j&&(v(t!==(y.initialValue??``)),b(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(C(D),S.change(t)))},onFocus(){F(!0)},onBlur(e){if(g(!0),F(!1),x===`onBlur`){let t=e.currentTarget.value;S.commit(t),j&&queueMicrotask(()=>{let e=S.inputRef.current?.value;e!==void 0&&e!==t&&e!==(y.initialValue??``)&&S.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===w.current&&!e.defaultPrevented){let t=e.currentTarget,n=T.current;I.start(0,()=>{T.current===n&&S.commit(t.value)})}else S.commit(t)}}},f,e=>S.getValidationProps(E,e)],stateAttributesMapping:jp})});Jm.displayName=`FieldControl`;var Ym=_.forwardRef(function(e,t){return(0,Y.jsx)(Jm,{ref:t,...e})});Ym.displayName=`Input`;var Xm={size:{xs:{classes:`h-5 gap-1 rounded-sm px-1.5 text-xs`,description:`Extra small input for compact UIs`},sm:{classes:`h-6.5 gap-1 rounded-md px-2 text-xs`,description:`Small input for secondary fields`},base:{classes:`h-9 gap-1.5 rounded-lg px-3 text-base`,description:`Default input size`},lg:{classes:`h-10 gap-2 rounded-lg px-4 text-base`,description:`Large input for prominent fields`}},variant:{default:{classes:`focus:ring-kumo-focus/50 focus:ring-[1.5px]`,description:`Default input appearance`},error:{classes:`!ring-kumo-danger focus:ring-kumo-danger/50 focus:ring-[1.5px]`,description:`Error state for validation failures`}}},Zm={size:`base`,variant:`default`};function Qm({variant:e=Zm.variant,size:t=Zm.size,parentFocusIndicator:n=!1,focusIndicator:r=!1}={}){return J(`border-0 bg-kumo-control text-kumo-default ring ring-kumo-line outline-none focus:outline-none`,`kumo-input-placeholder disabled:text-kumo-disabled`,vr(Xm.size,t,Zm.size).classes,vr(Xm.variant,e,Zm.variant).classes,n&&(e===`error`?`focus-within:ring-[1.5px] focus-within:ring-kumo-danger/50`:`focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50`),r&&(e===`error`?`focus:ring-[1.5px] focus:ring-kumo-danger/50`:`focus:ring-[1.5px] focus:ring-kumo-focus/50`))}var $m=(0,_.forwardRef)((e,t)=>{let{className:n,size:r=`base`,variant:i,label:a,labelTooltip:o,description:s,error:c,passwordManagerIgnore:l=!1,...u}=e;i===`error`&&console.warn('[Kumo Input]: variant="error" is deprecated. Error styling is now automatically applied when the `error` prop is truthy. Simply remove the variant prop and pass an error message instead.');let d=i??(c?`error`:`default`),{required:f}=u;{let e=!!a,t=!!u[`aria-label`],n=!!u[`aria-labelledby`];e||t||n||console.warn(`[Kumo Input]: Input must have an accessible name. Provide either:
|
|
28
28
|
- label prop: <Input label='Email' />
|
|
29
29
|
- aria-label: <Input aria-label='Email address' />
|
|
30
|
-
- aria-labelledby for custom label association`)}let p=(0,Y.jsx)(Gm,{ref:t,className:J(Jm({size:r,variant:d,focusIndicator:!0}),l&&`keeper-ignore`,n),...l?{"data-1p-ignore":`true`,"data-bwignore":`true`,"data-form-type":`other`,"data-lpignore":`true`}:{},...u});return a||c||s?(0,Y.jsx)(Um,{label:a,required:f,labelTooltip:o,description:s,error:Vm(c),children:p}):p});Ym.displayName=`Input`;var Xm={xs:{inputOuter:`px-1.5`,addonOuterStart:`pl-1.5`,addonOuterEnd:`pr-1.5`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-1.5`,fontSize:`text-xs`,iconSize:10},sm:{inputOuter:`px-2`,addonOuterStart:`pl-1.5`,addonOuterEnd:`pr-1.5`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-2`,fontSize:`text-xs`,iconSize:13},base:{inputOuter:`px-3`,addonOuterStart:`pl-2`,addonOuterEnd:`pr-2`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-3`,fontSize:`text-base`,iconSize:18},lg:{inputOuter:`px-4`,addonOuterStart:`pl-2.5`,addonOuterEnd:`pr-2.5`,addonButtonOuterStart:`pl-1.5`,addonButtonOuterEnd:`pr-0.5`,suffixPad:`pr-4`,fontSize:`text-base`,iconSize:20}},Zm={xs:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1`,sm:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1.5 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1.5`,base:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2`,lg:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2.5 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2.5`},Qm=(0,_.createContext)(null),$m=(0,_.createContext)(!1);function eh(e){let t=(0,_.useContext)(Qm);return t||console.warn(`<InputGroup.${e}> must be used within <InputGroup>. Falling back to default values.`),t}function th(e){let t=[],n=[];return _.Children.forEach(e,e=>{(0,_.isValidElement)(e)&&e.type?.displayName===`InputGroup.Button`?n.push(e):t.push(e)}),{containerZone:t,individualZone:n}}function nh(e){let t=!1,n=!1;return _.Children.forEach(e,e=>{if(!(0,_.isValidElement)(e))return;let r=e.type,i=typeof r==`function`||typeof r==`object`?r.displayName:void 0;if(i===`InputGroup.Addon`){n=!0;return}if(i!==`InputGroup.Button`)return;let a=e.props.variant;a!==void 0&&a!==`ghost`&&(t=!0)}),t&&n?`hybrid`:t?`individual`:`container`}var rh=(0,_.forwardRef)((e,t)=>{let n=eh(`Input`);n&&(e.size!==void 0&&console.warn("InputGroup.Input: Set `size` on <InputGroup> instead of <InputGroup.Input>."),e.disabled!==void 0&&console.warn("InputGroup.Input: Set `disabled` on <InputGroup> instead of <InputGroup.Input>."),e.label!==void 0&&console.warn("InputGroup.Input: Use the `label` prop on <InputGroup> instead of <InputGroup.Input>."),e.description!==void 0&&console.warn("InputGroup.Input: Use <InputGroup.Suffix> instead of passing `description` to <InputGroup.Input>."));let r=Xm[n?.size??`base`],i=n?.focusMode===`individual`,a=!!n?.error,o=e.id??n?.inputId;return(0,Y.jsx)(Ym,{ref:t,size:n?.size,disabled:n?.disabled||e.disabled,"aria-invalid":a||e[`aria-invalid`],...e,id:o,className:J(`flex h-full min-w-0 grow items-center rounded-none border-0 bg-transparent font-sans`,r.inputOuter,`text-ellipsis`,i?`relative ring-0 focus:ring-0 border border-kumo-line first:rounded-l-[inherit] last:rounded-r-[inherit] not-first:-ml-px hover:z-1 hover:border-kumo-line focus:z-2 focus:border-kumo-focus/50`:`relative z-1 shadow-none ring-0! outline-none focus:ring-0! focus:outline-none`,e.className)})});rh.displayName=`InputGroup.Input`;var ih={xs:`xs`,sm:`xs`,base:`sm`,lg:`base`},ah=(0,_.forwardRef)(({children:e,className:t,variant:n,size:r,disabled:i,tooltip:a,tooltipSide:o=`bottom`,icon:s,...c},l)=>{let u=eh(`Button`),d=(0,_.useContext)($m),f=i??u?.disabled,p=u?.focusMode===`individual`||u?.focusMode===`hybrid`;u&&(n??`ghost`)===`ghost`&&!d&&console.warn(`InputGroup.Button: Ghost buttons should be wrapped in <InputGroup.Addon> for correct spacing.`),u&&r!==void 0&&console.warn("InputGroup.Button: Set `size` on <InputGroup> instead of <InputGroup.Button>.");let m=typeof a==`string`&&!c[`aria-label`]?a:void 0,h=u?Xm[u.size??`base`].iconSize:void 0,g=s&&h&&(typeof s==`function`||typeof s==`object`&&s&&!_.isValidElement(s))?_.createElement(s,{size:h}):s,v=(0,Y.jsx)(ep,{ref:l,type:`button`,disabled:f,"aria-label":m,...c,icon:g,variant:n??`ghost`,size:r??(p?u?.size??`sm`:ih[u?.size??`base`]??`sm`),className:J(`pointer-events-auto`,`shadow-none`,`focus:ring-0`,!p&&`focus-visible:ring-[1.5px] focus-visible:ring-kumo-focus/50`,p&&[`relative h-full! rounded-none border border-kumo-line ring-0 focus-visible:ring-0`,`first:rounded-l-[inherit] last:rounded-r-[inherit]`,`not-first:-ml-px`,`hover:z-1`,`focus:z-2`,`focus-visible:border-kumo-focus/50`,`disabled:bg-kumo-overlay disabled:text-kumo-inactive!`],t),children:e});return a?(0,Y.jsx)(Kd,{content:a,side:o,asChild:!0,children:v}):v});ah.displayName=`InputGroup.Button`;var oh=(0,_.forwardRef)(({align:e=`start`,className:t,children:n},r)=>{let i=Xm[eh(`Addon`)?.size??`base`],a=!1,o=_.Children.map(n,e=>(0,_.isValidElement)(e)?e.type===ah?(a=!0,e):e.props.size===void 0?(0,_.cloneElement)(e,{size:i.iconSize}):e:e);return(0,Y.jsx)(`div`,{ref:r,"data-slot":e===`start`?`input-group-addon-start`:`input-group-addon-end`,className:J(`pointer-events-none relative z-[1] flex shrink-0 items-center gap-1.5`,`text-kumo-subtle`,i.fontSize,`*:pointer-events-auto`,e===`start`?J(`-order-1`,a?i.addonButtonOuterStart:i.addonOuterStart,`pr-0`):J(`order-1`,`pl-0`,a?i.addonButtonOuterEnd:i.addonOuterEnd),t),children:(0,Y.jsx)($m.Provider,{value:!0,children:o})})});oh.displayName=`InputGroup.Addon`;var sh=(0,_.forwardRef)(({className:e,children:t},n)=>{let r=Xm[eh(`Suffix`)?.size??`base`];return(0,Y.jsx)(`div`,{ref:n,"data-slot":`input-group-suffix`,className:J(`pointer-events-none flex min-w-0 grow items-center text-kumo-subtle select-none`,r.fontSize,r.suffixPad,e),children:(0,Y.jsx)(`span`,{className:`truncate`,children:t})})});sh.displayName=`InputGroup.Suffix`;var ch=(0,_.forwardRef)(({size:e=`base`,children:t,className:n,disabled:r=!1,label:i,description:a,error:o,required:s,labelTooltip:c,...l},u)=>{let d=(0,_.useId)(),f=nh(t),p=(0,_.useMemo)(()=>({size:e,focusMode:f,disabled:r,error:o,inputId:d}),[e,f,r,o,d]),m=J(`relative w-full cursor-text`,Jm({size:e}),`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,f===`container`?[`overflow-hidden`,`focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50`]:`isolate overflow-visible shadow-none ring-0`,`has-[input[aria-invalid=true]]:ring-kumo-danger`,`px-0`,`flex items-center gap-0`,`has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]`,`has-[[data-slot=input-group-suffix]]:[&_input]:max-w-full`,`has-[[data-slot=input-group-suffix]]:[&_input]:grow-0`,`has-[[data-slot=input-group-suffix]]:[&_input]:pr-0`,Zm[e],`!mb-0`,n),h={"data-slot":`input-group`,"data-focus-mode":f,"data-disabled":r?``:void 0};if(f===`hybrid`){let{containerZone:n,individualZone:r}=th(t),f={...p,focusMode:`container`},g=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Qm.Provider,{value:f,children:(0,Y.jsxs)(`div`,{"data-slot":`input-group-container-zone`,className:J(Jm({size:e}),`overflow-hidden`,`has-[input[aria-invalid=true]]:ring-kumo-danger`,`px-0`,`flex min-w-0 flex-1 items-center gap-0`,`shadow-none ring-0`,`border border-kumo-line`,`focus-within:border-kumo-focus/50`,`focus-within:z-2`,`not-first:-ml-px`,`rounded-none first:rounded-l-[inherit] last:rounded-r-[inherit]`,Zm[e],`has-data-[slot=input-group-suffix]:[&_input]:field-sizing-content`,`has-data-[slot=input-group-suffix]:[&_input]:max-w-full`,`has-data-[slot=input-group-suffix]:[&_input]:grow-0`,`has-data-[slot=input-group-suffix]:[&_input]:pr-0`),children:[i&&(0,Y.jsx)(`label`,{htmlFor:d,className:`absolute inset-0 z-0 mb-0! cursor-text`,"aria-hidden":`true`}),n]})}),r]}),_=(0,Y.jsx)(Qm.Provider,{value:p,children:(0,Y.jsx)(`div`,{ref:u,...h,className:m,...l,children:g})});return i?(0,Y.jsx)(Um,{label:i,description:a,error:o,required:s,labelTooltip:c,children:_}):_}let g=!i&&f===`container`,v=(0,Y.jsx)(Qm.Provider,{value:p,children:i?(0,Y.jsxs)(`div`,{ref:u,...h,className:m,...l,children:[(0,Y.jsx)(`label`,{htmlFor:d,className:`absolute inset-0 z-0 mb-0!`,"aria-hidden":`true`}),t]}):g?(0,Y.jsx)(`label`,{ref:u,...h,className:J(m,`mb-0!`),...l,children:t}):(0,Y.jsx)(`div`,{ref:u,...h,className:m,...l,children:t})});return i?(0,Y.jsx)(Um,{label:i,description:a,error:o,required:s,labelTooltip:c,children:v}):v});ch.displayName=`InputGroup`;var lh=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(oh,{ref:t,align:`start`,...e}));lh.displayName=`InputGroup.Label`;var uh=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(sh,{ref:t,...e}));uh.displayName=`InputGroup.Description`;var dh=Object.assign(ch,{Input:rh,Button:ah,Addon:oh,Suffix:sh,Label:lh,Description:uh}),fh={variant:{heading:{classes:`text-lg font-semibold`,description:`Heading text (16px by default, 20px at large size)`},heading1:{classes:`text-3xl font-semibold`,description:`Deprecated large heading for page titles; use heading instead`},heading2:{classes:`text-2xl font-semibold`,description:`Deprecated medium heading for section titles; use heading instead`},heading3:{classes:`text-lg font-semibold`,description:`Deprecated small heading for subsections; use heading instead`},body:{classes:`text-kumo-default`,description:`Default body text`},secondary:{classes:`text-kumo-subtle`,description:`Muted text for secondary information`},success:{classes:`text-kumo-link`,description:`Success state text`},error:{classes:`text-kumo-danger`,description:`Error state text`},mono:{classes:`font-mono`,description:`Monospace text for code`},"mono-secondary":{classes:`font-mono text-kumo-subtle`,description:`Muted monospace text`}},size:{xs:{classes:`text-xs/[inherit]`,description:`Extra small text`},sm:{classes:`text-sm/[inherit]`,description:`Small text`},base:{classes:`text-base/[inherit]`,description:`Default text size`},lg:{classes:`text-lg/[inherit]`,description:`Large text`}}},ph={variant:`body`,size:`base`},mh=[`heading1`,`heading2`,`heading3`];function hh(e){return mh.includes(e)}function gh(e,t){return e===`heading`?t===`lg`?`text-xl`:``:hh(e)?``:[`mono`,`mono-secondary`].includes(e)?t===`lg`?fh.size.base.classes:fh.size.sm.classes:vr(fh.size,t,ph.size).classes}function _h({variant:e=`body`,bold:t=!1,size:n=`base`,truncate:r=!1,children:i,DANGEROUS_className:a,DANGEROUS_style:o,as:s,...c},l){let u=[`body`,`secondary`,`success`,`error`].includes(e),d=(0,_.useMemo)(()=>s||([`mono`,`mono-secondary`].includes(e)||e===`heading`||hh(e)?`span`:`p`),[e,s]);return(0,Y.jsx)(d,{ref:l,className:J(`text-kumo-default`,vr(fh.variant,e,ph.variant).classes,gh(e,n),u&&t?`font-medium`:``,r&&`min-w-0 truncate`,a),style:o,...c,children:i})}var vh=(0,_.forwardRef)(_h),yh=0;function bh(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(yh);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Gr;let o=requestAnimationFrame(a);return yh=o,()=>{yh===o&&(cancelAnimationFrame(o),yh=0)}}var xh=`data-base-ui-inert`,Sh=new WeakMap,Ch=new WeakSet,wh=new WeakMap,Th=0;function Eh(e){return e?Ui(e)?e.host:Eh(e.parentNode):null}var Dh=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Eh(t);return e.contains(n)?n:null}).filter(e=>e!=null),Oh=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},kh=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Li(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ah(e,t,n,{mark:r=!0}){let i=Dh(t,e),a=r?kh(t,Oh(i),new Set(i)):[],o=[],s=[];if(n){let e=Dh(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);kh(t,Oh(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Sh.get(e)||0)+1;Sh.set(e,r),o.push(e),r===1&&n&&Ch.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(wh.get(e)||0)+1;wh.set(e,t),s.push(e),t===1&&e.setAttribute(xh,``)}),Th+=1,()=>{o.forEach(e=>{let t=(Sh.get(e)||0)-1;Sh.set(e,t),t||(Ch.has(e)||e.removeAttribute(`aria-hidden`),Ch.delete(e))}),r&&s.forEach(e=>{let t=(wh.get(e)||0)-1;wh.set(e,t),t||e.removeAttribute(xh)}),--Th,Th||(Sh=new WeakMap,Ch=new WeakSet,wh=new WeakMap)}}function jh(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=zs(e[0]).body;return Ah(e,i,n,{mark:r})}function Mh(e,t){let n=Ri(is(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Qo(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Nh=20,Ph=[];function Fh(){Ph=Ph.filter(e=>e.deref()?.isConnected)}function Ih(e){Fh(),e&&Li(e)!==`body`&&(Ph.push(new WeakRef(e)),Ph.length>Nh&&(Ph=Ph.slice(-20)))}function Lh(){return Fh(),Ph[Ph.length-1]?.deref()}function Rh(e){return e?sc(e)?e:lc(e)[0]||e:null}function zh(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=cc(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return sc(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Bh(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),v=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:b,dataRef:x}=t.context,S=Q(()=>x.current.floatingContext?.nodeId),C=i===!1,w=Is(v)&&C,T=Ll(i),E=Ll(a),D=Ll(o),O=Ll(u),k=Ll(g),A=Yc(m),j=_l(),M=_.useRef(!1),N=_.useRef(!1),P=_.useRef(!1),F=_.useRef(null),I=_.useRef(``),L=_.useRef(``),R=_.useRef(null),z=_.useRef(null),B=Mr(R,p,j?.beforeInsideRef),V=Mr(z,j?.afterInsideRef),H=Il(),U=Il(),ee=Ul(),te=j!=null,W=Rs(y),ne=Q((e=W)=>e?lc(e):[]),re=Q(()=>h?.().filter(e=>e!=null)??[]);_.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(W,ns(zs(W)))&&ne().length===0&&!w&&Xo(e)}return jc(zs(W),`keydown`,e)},[r,W,c,w,ne]),_.useEffect(()=>{if(r||!g)return;let e=zs(W);function t(){P.current=!1}function n(e){let t=is(e),n=re(),r=Z(y,t)||Z(v,t)||Z(j?.portalNode,t)||n.some(e=>e===t||Z(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,rs(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,U.start(0,()=>{N.current=!1}))}function i(){L.current=`keyboard`}return Mc(jc(e,`pointerdown`,n,!0),jc(e,`pointerup`,t,!0),jc(e,`pointercancel`,t,!0),jc(e,`keydown`,i,!0),t)},[r,y,v,W,g,j,U,re]),_.useEffect(()=>{if(r||!l)return;let e=zs(W);function n(){N.current=!0,U.start(0,()=>{N.current=!1})}function i(e){let t=is(e);sc(t)&&(F.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=is(n);c&&r==null&&a!=null&&Z(y,a)&&Ih(a),queueMicrotask(()=>{let o=S(),l=t.context.triggerElements,u=re(),p=r?.hasAttribute(dl(`focus-guard`))&&[R.current,z.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Gl(f),Gl(d)].includes(r),m=!(Z(v,r)||Z(y,r)||Z(r,y)||Z(j?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||A&&(Zl(A.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Ql(A.nodesRef.current,o).find(e=>[e.context?.elements.floating,Rs(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===v&&W&&zh(W),s&&i!==v&&!qs(a)&&ns(e)===e.body){if(Hi(W)&&(W.focus(),s===`popup`)){ee.request(()=>{W.focus()});return}let e=ne(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;Hi(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(w||!c)&&r&&m&&!N.current&&(w||r!==Lh())&&(M.current=!0,t.setOpen(!1,_c(wc,n)))})}function o(){P.current||(x.current.insideReactTree=!0,H.start(0,()=>{x.current.insideReactTree=!1}))}let u=Hi(v)?v:null;if(y||u)return Mc(u&&jc(u,`focusout`,a),u&&jc(u,`pointerdown`,n),y&&jc(y,`focusin`,i),y&&jc(y,`focusout`,a),y&&j&&jc(y,`focusout`,o,!0))},[r,v,y,W,c,A,j,t,l,s,ne,w,S,x,H,U,ee,d,f,re]),_.useEffect(()=>{if(r||!y||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${dl(`portal`)}]`)||[]),t=(A?Ql(A.nodesRef.current,S()):[]).find(e=>Is(e.context?.elements.domReference||null))?.context?.elements.domReference,n=jh([y,...e,R.current,z.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...re(),t,Gl(f),Gl(d),w?v:null].filter(e=>e!=null),{ariaHidden:c||w,mark:!1}),i=jh([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,v,y,c,j,w,A,S,d,f,re]),X(()=>{if(!g||r||!Hi(W))return;I.current=``,L.current=``;let e=zs(W),t=ns(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||Z(W,t))return;let i=null,a=()=>(i??=ne(W),i[0]||W),o;o=r===!0||r===null?a():Gl(r),o||=a();let s=Z(W,ns(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&Qo(c);bh(o,{sync:l,preventScroll:o===W,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=ns(e);return!(t!==o&&Z(W,t))}})})},[r,g,W,ne,T,O,k,x]);let ie=_.useRef(null);X(()=>{if(r||!W){ie.current=null;return}ie.current&&=(ie.current.cancelled=!0,null);let e=zs(W),t=ns(e),n=O.current==null;Ih(t);function i(e){if(e.open||(I.current=Mh(e.nativeEvent,L.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(dl(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(M.current=!0),e.reason===`outside-press`){if(e.nested)M.current=!1;else if(Qo(e.nativeEvent)||$o(e.nativeEvent))M.current=!1;else{let e=!1;zs(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}}b.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=v?.isConnected?v:null,o=t?.isConnected&&Li(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Lh()||null,typeof i==`boolean`?s:Gl(i)||s||null}return()=>{b.off(`openchange`,i);let t=ns(e),n=re(),r=Z(y,t)||n.some(e=>e===t||Z(e,t))||A&&Zl(A.nodesRef.current,S(),!1).some(e=>Z(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s),l={cancelled:!1};ie.current=l,queueMicrotask(()=>{ie.current===l&&(ie.current=null);let n=Rh(c),i=D.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!M.current&&Hi(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,y,W,E,D,O,b,A,v,S,re]),X(()=>{if(!gc||g||!y)return;let e=ns(zs(y));Hi(e)&&Ps(e)&&Z(y,e)&&e.blur()},[g,y]),X(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,c,g,t,l,v]),X(()=>{if(!r&&W)return zh(W),()=>{queueMicrotask(Fh)}},[r,W]);let ae=!r&&(!c||!w)&&(te||c);return(0,Y.jsxs)(_.Fragment,{children:[ae&&(0,Y.jsx)(ul,{"data-type":`inside`,ref:B,onFocus:e=>{if(c){let e=ne();bh(e[e.length-1])}else j?.portalNode&&(M.current=!1,pc(e,j.portalNode)?dc(v)?.focus():Gl(f??j.beforeOutsideRef)?.focus())}}),n,ae&&(0,Y.jsx)(ul,{"data-type":`inside`,ref:V,onFocus:e=>{c?bh(ne()[0]):j?.portalNode&&(l&&(M.current=!0),pc(e,j.portalNode)?fc(v)?.focus():Gl(d??j.afterOutsideRef)?.focus())}})]})}function Vh(e){let t=_.useRef(``),n=_.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:_.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Hh(e,t){let{onClick:n,onPointerDown:r}=Vh(Q((n,r)=>{(typeof e==`function`?e():e)||t(r||(Wo?`touch`:``))}));return _.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Uh(e){let[t,n]=_.useState(null),r=Hh(e,n);return tm(e,t=>{t&&!e&&n(null)}),_.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Wh=_.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});Wh.displayName=`InternalBackdrop`;var Gh={},Kh={},qh=``;function Jh(e,t){return Wi(e)?e:t}function Yh(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Jh(t,n)).overflowY)}function Xh(e){if(typeof document>`u`)return!1;let t=zs(e);return Ri(t).innerWidth-t.documentElement.clientWidth>0}function Zh(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=zs(e),n=t.documentElement,r=t.body,i=Jh(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Qh(e){let t=zs(e),n=t.documentElement,r=t.body,i=Jh(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function $h(e){let t=zs(e),n=t.documentElement,r=t.body,i=Ri(n),a=0,o=0,s=!1,c=Hl.create();if(gc&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Gh={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qh=n.style.scrollBehavior,Kh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Jh(n,r);s=Zh(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Gh),Object.assign(r.style,Kh),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=qh)}function d(){u(),c.request(l)}l();let f=jc(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var eg=new class{lockCount=0;restore=null;timeoutLock=Fl.create();timeoutUnlock=Fl.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=zs(e),n=t.documentElement,r=t.body,i=Ri(n);if(Yh(i,n,r)){let t=new i.MutationObserver(()=>{Yh(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Wo||!Xh(e);this.restore=a?Qh(e):$h(e)}};function tg(e=!0,t=null){X(()=>{if(e)return eg.acquire(t)},[e,t])}function ng(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=yc}=t,l=e.context.dataRef,u=_.useRef(void 0),d=Ul(),f=Il(),p=_.useMemo(()=>{function t(t,n,r,i){let a=_c(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=es(e.pointerType,!0)&&$o(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||es(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=is(s),p=Ps(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:es(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return _.useMemo(()=>n?{reference:p}:qr,[n,p])}function rg(e){return gc&&e.movementX===0&&e.movementY===0}function ig(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function ag(e,t){return ig(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function og(e,t,n){return ig(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function sg(e,t,n){return ig(t,n?e===ss:e===cs,e===us)}function cg(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:ig(t,n?e===cs:e===ss,e===ls)}function lg(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:v=g,parentOrientation:y,id:b,resetOnPointerLeave:x=!0,externalTree:S,nestedReturnFocusRef:C,grid:w}=t,T=w!=null;s&&(c||console.warn("`useListNavigation` looping must be enabled to allow escaping."),d||console.warn("`useListNavigation` must be virtual to allow escaping.")),g===`vertical`&&T&&console.warn("In grid list navigation mode, the `orientation` should",`be either "horizontal" or "both".`);let E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=Rs(D),j=Is(O),M=Ll(A),N=Jc(),P=Yc(S),F=_.useRef(f),I=_.useRef(o??-1),L=_.useRef(null),R=_.useRef(!0),z=Q(e=>{i(I.current===-1?null:I.current,e)}),B=_.useRef(!!D),V=_.useRef(E),H=_.useRef(!1),U=_.useRef(!1),ee=_.useRef(null),te=Ll(h),W=Ll(E),ne=Ll(o),re=Ll(x),ie=Ul(),ae=Ul(),G=Q(()=>{ie.cancel();function e(e){d||(ee.current=bh(e,{sync:H.current,preventScroll:!0}))}let t=n.current[I.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),ue&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});X(()=>{k.current.orientation=g},[k,g]),X(()=>{E||(L.current=null),E&&f===`auto`||(F.current=f)},[E,f]),X(()=>{a&&(E&&D?(I.current=o??-1,F.current&&o!=null&&(U.current=!0,z())):B.current&&(I.current=-1,z()))},[a,E,D,o,z]),X(()=>{if(a){if(!E)H.current=!1;else if(D){if(r==null){if(H.current=!1,ne.current!=null)return;if(B.current&&(I.current=-1,G()),(!V.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||og(L.current,v,u)||l?Vs(n):Hs(n),L.current=null,z())};t()}}else Bs(n.current,r)||(I.current=r,G(),U.current=!1)}}},[a,E,D,r,ne,l,n,v,u,z,G,ae]),X(()=>{if(!a||D||!P||d||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=ns(zs(O??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,D,O,P,N,d]),X(()=>{V.current=E,B.current=!!D});let K=r!=null,oe=Q(e=>{if(!W.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),se=Q(()=>y??P?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),ce=Q(()=>Vs(n,te.current)),le=Q(t=>{if(R.current=!1,H.current=!0,t.which===229||!W.current&&t.currentTarget===M.current)return;if(l&&cg(t.key,g,u,T)){ag(t.key,se())||Xo(t),e.setOpen(!1,_c(Ec,t.nativeEvent));let n=C?.current??O;Hi(n)&&n.focus();return}r!=null&&r!==I.current&&!Bs(n.current,r)&&(I.current=r);let i=I.current,a=Vs(n,h),o=Hs(n,h);if(j||(t.key===`Home`&&(Xo(t),I.current=a,z(t)),t.key===`End`&&(Xo(t),I.current=o,z(t))),w!=null){let e=w(t,I.current,n,g,c,u,h,a,o);if(e!=null&&e!==I.current&&(I.current=e,z(t)),g===`both`)return}if(ag(t.key,g)){Xo(t);let e=ns(t.currentTarget.ownerDocument);if(E&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){I.current=og(t.key,g,u)?a:o,z(t),r===I.current&&G();return}let{index:l,wrapped:f}=Us(n.current,i,{decrement:!og(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(H.current=!1),I.current=l,z(t)}}),ue=_.useMemo(()=>({onFocus(e){H.current=!0,oe(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){rg(e)||(H.current=!0,U.current=!1,p&&oe(e))},onPointerLeave(e){if(!W.current||!R.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,I.current=-1,z(e),!d)){let e=M.current,t=ns(zs(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[oe,W,M,p,n,z,re,d]),q=_.useMemo(()=>d&&E&&K&&{"aria-activedescendant":`${b}-${r}`},[d,E,K,b,r]),de=_.useMemo(()=>({...j?{}:q,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!d){let n=is(t.nativeEvent);if(n&&!Z(M.current,n))return;Xo(t);let r=_c(wc,t.nativeEvent);e.setOpen(!1,r);let i=C?.current??O;!r.isCanceled&&Hi(i)&&i.focus()}else le(t)},onPointerMove(e){rg(e)||(R.current=!0)}}),[q,le,M,j,e,E,d,O,C]),fe=_.useMemo(()=>{function t(t){e.setOpen(!0,_c(Ec,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Qo(e.nativeEvent)&&(F.current=!d)}function r(e){F.current=f,f===`auto`&&$o(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=sg(n.key,se(),u),o=ag(n.key,r?g:v),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Ps(n.currentTarget)))return le(n);if(r||m||!i){if(s){let e=ag(n.key,se());L.current=l&&e?null:n.key}l?a&&(Xo(n),r?(I.current=ce(),z(n),d&&M.current?.focus()):t(n)):o&&(ne.current!=null&&(I.current=ne.current),Xo(n),!r&&m?t(n):le(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(I.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[le,f,ce,l,z,e,m,g,v,se,u,ne,d,M]),pe=_.useMemo(()=>({...q,...fe}),[q,fe]);return _.useMemo(()=>a?{reference:pe,floating:de,item:ue,trigger:fe}:{},[a,pe,de,fe,ue])}function ug(e){let t=_.useRef(!0);t.current&&(t.current=!1,e())}var dg=(e,t)=>Object.is(e,t);function fg(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function pg(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!im(e,t,(e,t)=>fg(e,t,n)):e!==t}function mg(e,t,n){return e?e.some(e=>e!==void 0&&fg(t,e,n)):!1}function hg(e,t,n){return e?e.findIndex(e=>e!==void 0&&fg(e,t,n)):-1}function gg(e,t){if(t!==dg)return n=>mg(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function _g(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(gg(t,n)):hg(e,t,n);return i===-1?null:i}function vg(e,t,n,r,i,a){return mg(r,t,i)?a!=null&&e>a&&mg(r,n[a],i)?a:e:e===a?_g(n,r,i,!0):a}function yg(e,t,n){return e.filter(e=>!fg(t,e,n))}function bg(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function xg(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Sg(e){return xg(e?.[0])}function Cg(e){return Sg(e)?e.flatMap(e=>e.items):e}function wg(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Sg(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function Tg(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return bg(e)}function Eg(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?bg(e.value):bg(e)}function Dg(e,t,n){function r(){return Tg(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=Cg(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Og(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Y.jsx)(_.Fragment,{children:Dg(r,t,n)},i)),e),[])}var kg=_.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});kg.displayName=`CompositeListContext`;function Ag(){return _.useContext(kg)}function jg(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Q(i),[,o]=_.useState(0),s=jr(Ng).current,c=jr(Mg).current,l=_.useRef(0),u=_.useRef(!0),d=_.useRef(null),f=_.useRef(null),p=Q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Q((e,t)=>{c.set(e,t),p()}),h=Q(e=>{c.delete(e),p()}),g=Q(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function v(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Ig(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Lg(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Fg(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=Q(()=>{let[e,t]=Pg(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});X(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),X(()=>{u.current&&y()}),X(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let b=Q(e=>(s.add(e),()=>{s.delete(e)})),x=_.useMemo(()=>({register:m,unregister:h,subscribeMapChange:b,nextIndexRef:l}),[m,h,b,l]);return(0,Y.jsx)(kg.Provider,{value:x,children:t})}function Mg(){return new Map}function Ng(){return new Set}function Pg(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Lg(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Fg(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Ig(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Lg(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Rg(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Ag(),u=_.useRef(-1),[d,f]=_.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=_.useRef(null),h=_.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return X(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function zg(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Q(s),f=e.useState(`open`),p=Il(),m=_.useRef(``),h=_.useRef(u??i??-1),g=_.useRef(null),v=Q(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!qs(n)||n?.matches(`:disabled`)?!1:o==null||!Gs(Kr,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Xo(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Xo(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),y=Q(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});X(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let b=_.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return _.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}function Bg(e){return e==null?void 0:`${e}-label`}function Vg(e,t){return e??t}var Hg=5;function Ug(e,t){let n=Wg(t);return e.clientX>=n.left-Hg&&e.clientX<=n.right+Hg&&e.clientY>=n.top-Hg&&e.clientY<=n.bottom+Hg}function Wg(e){let t=e.getBoundingClientRect(),n=Ri(e);if(Yo)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Gg=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=_.useRef(null),{transitionStatus:l,setMounted:u}=Xl(o),d=di(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:hs});return Yl({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d}));Gg.displayName=`ItemIndicator`;var Kg=20;function qg(e,t,n,r){let[i,a]=_.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=zs(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Kg)},[e,t,n]),tg(e&&(!t||i),r)}var Jg=_.createContext(void 0);Jg.displayName=`ToolbarRootContext`;function Yg(e){let t=_.useContext(Jg);if(t===void 0&&!e)throw Error(`Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.`);return t}function Xg(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var Zg=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),Qg=`overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line`,$g=`flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline`,e_=`-my-2 flex items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle`,t_=`relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill`;function n_(e={}){return J(Qg)}function r_(e){return _.Children.toArray(e).some(e=>(0,_.isValidElement)(e)?e.type===o_||e.type===a_||e.type===_.Fragment&&r_(e.props.children):!1)}var i_=(0,_.forwardRef)(function({children:e,className:t,render:n,...r},i){return xi({defaultTagName:`div`,render:n,ref:i,props:Qr({className:J(r_(e)?$g:n_(),t)},r,{children:e})})});function a_({children:e,className:t,...n}){return(0,Y.jsx)(`div`,{className:J(e_,t),...n,children:e})}function o_({children:e,className:t,...n}){return(0,Y.jsx)(`div`,{className:J(t_,t),...n,children:e})}i_.displayName=`LayerCard`,a_.displayName=`LayerCard.Secondary`,o_.displayName=`LayerCard.Primary`;var s_=Object.assign(i_,{Primary:o_,Secondary:a_});function c_(e=2e3){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null),i=(0,_.useRef)(0);return(0,_.useEffect)(()=>()=>{i.current+=1,r.current!==null&&clearTimeout(r.current)},[]),{copied:t,runCopy:(0,_.useCallback)(async(t,a)=>{let o=++i.current;r.current!==null&&(clearTimeout(r.current),r.current=null);try{return await t(()=>i.current===o),i.current===o&&(n(!0),r.current=setTimeout(()=>{i.current===o&&(n(!1),r.current=null)},e),!0)}catch(e){return i.current===o&&(n(!1),a?.(e)),!1}},[e]),reset:(0,_.useCallback)(()=>{i.current+=1,r.current!==null&&(clearTimeout(r.current),r.current=null),n(!1)},[])}}var l_=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),u_=(e,t)=>(Math.random()*(t-e)+e).toFixed(2),d_=({minWidth:e=30,maxWidth:t=100,minDuration:n=1.3,maxDuration:r=1.7,minDelay:i=0,maxDelay:a=.5,blockHeight:o,className:s})=>{let{width:c,duration:l,delay:u}=(0,_.useMemo)(()=>({width:l_(e,t),duration:u_(n,r),delay:u_(i,a)}),[e,t,n,r,i,a]),d={"--skeleton-width":`${c}%`,"--shimmer-duration":`${l}s`,"--shimmer-delay":`${u}s`},f=(0,Y.jsx)(`div`,{className:J(`skeleton-line`,s),style:d});if(o!==void 0){let e=typeof o==`number`?`${o}px`:o;return(0,Y.jsx)(`div`,{className:`flex items-center`,style:{height:e},children:f})}return f};function f_(e){let[t,n]=_.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var p_=_.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return di(`div`,e,{state:{orientation:i},ref:t,props:[{role:`presentation`},o]})});p_.displayName=`ListboxSeparator`;function m_(e,t){return Math.max(0,e-t)}function h_(e,t){if(t<=0)return 0;let n=Lm(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var g_=`base-ui-disable-scrollbar`,__={className:g_,getElement(e){return(0,Y.jsx)(`style`,{nonce:e,href:g_,precedence:`base-ui:low`,children:`.${g_}{scrollbar-width:none}.${g_}::-webkit-scrollbar{display:none}`})}};__.getElement.displayName=`styleDisableScrollbar.getElement`;var v_=_.createContext(void 0);v_.displayName=`CSPContext`;var y_={disableStyleElements:!1};function b_(){return _.useContext(v_)??y_}var x_=_.createContext(void 0);x_.displayName=`SelectRootContext`;var S_=_.createContext(void 0);S_.displayName=`SelectFloatingContext`;function C_(){let e=_.useContext(x_);if(e===void 0)throw Error(`Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.`);return e}function w_(){let e=_.useContext(S_);if(e===void 0)throw Error(`Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.`);return e}var T_={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Eg(t,r)!==``},hasNullItemLabel:(e,t)=>t?wg(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>fg(t,e,n)):fg(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function E_(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:v,items:y,multiple:b=!1,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C=dg,highlightItemOnHover:w=!0,children:T}=e,{clearErrors:E}=Pp(),{setDirty:D,setTouched:O,setFocused:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=Ap(),I=$p({id:t}),L=N||d,R=M??c,[z,B]=nm({controlled:n,default:b?r??Kr:r,name:`Select`,state:`value`}),[V,H]=nm({controlled:a,default:o,name:`Select`,state:`open`}),U=_.useRef([]),ee=_.useRef([]),te=_.useRef(null),W=_.useRef(null),ne=_.useRef(0),re=_.useRef(null),ie=_.useRef([]),ae=_.useRef(!1),G=_.useRef(null),K=_.useRef(null),oe=_.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),se=_.useRef(!1),ce=_.useRef(z),{openMethod:le,triggerProps:ue}=Uh(V),q=jr(()=>new Al({id:I,labelId:void 0,modal:m,multiple:b,disabled:L,readOnly:f,required:p,highlightItemOnHover:w,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,value:z,open:V,mounted:V,transitionStatus:void 0,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:qr,triggerProps:qr,itemRoot:{props:qr,multiple:b,disabled:L,readOnly:f,isItemEqualToValue:C},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Gr,setOpen:Gr,handleScrollArrowVisibility:Gr,onOpenChangeComplete:Gr,listRef:U,popupRef:te,scrollHandlerRef:W,scrollArrowsMountedCountRef:ne,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:oe,firstItemTextRef:G,selectedItemTextRef:K,alignItemWithTriggerActiveRef:se,initialValueRef:ce},T_)).current,[de,fe]=_.useState(!1),{mounted:pe,transitionStatus:me,forceUnmount:he}=ru({open:V,ref:te,preventUnmountOnClose:de,setPreventUnmountOnClose:fe,onUnmount(){q.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),v?.(!1)}}),ge=q.useState(`activeIndex`),_e=q.useState(`selectedIndex`),ve=q.useState(`triggerElement`),ye=q.useState(`positionerElement`),be=f_(le),xe=le??be,Se=_.useMemo(()=>b?``:Eg(z,S),[b,z,S]),Ce=_.useMemo(()=>b&&Array.isArray(z)?z.map(e=>Eg(e,S)):Eg(z,S),[b,z,S]);em(Ll(ve),I,z,Q(()=>Ce),!L,c);let we=b?Array.isArray(z)&&z.length>0:z!=null&&Se!==``;X(()=>{j(we)},[we,j]),X(function(){let e=_g(ie.current,z,C,b);e===null&&(K.current=null),!V&&q.set(`selectedIndex`,e)},[b,V,z,C,q]),tm(z,()=>{E(R),D(pg(z,A.initialValue,C)),P.change(z)});let Te=Q((e,t)=>{let n=t,r=uu(n);s?.(e,n),!t.isCanceled&&(e||fe(r()),H(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(O(!0),k(!1),F===`onBlur`&&P.commit(z)))});_.useImperativeHandle(h,()=>({unmount:he,close:()=>{q.state.open&&Te(!1,_c(kc))}}),[he,Te,q]);let Ee=Q((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),De=Q(e=>{let t=m_(e.scrollHeight,e.clientHeight),n=h_(e.scrollTop,t),r=n>0,i=n<t;q.set(`scrollUpArrowVisible`,r),q.set(`scrollDownArrowVisible`,i)}),Oe=Fm({open:V,onOpenChange:Te,elements:{reference:ve,floating:ye}}),ke=ng(Oe,{enabled:!L,event:`mousedown`}),Ae=tu(Oe),je=lg(Oe,{enabled:!L,listRef:U,activeIndex:ge,selectedIndex:_e,disabledIndices:Kr,onNavigate(e){(e!==null||V)&&q.set(`activeIndex`,e)},focusItemOnHover:w}),Me=zg(Oe,{enabled:!L&&(V||!f&&!b),listRef:ee,activeIndex:ge,selectedIndex:_e,disabledIndices:e=>Xg(U.current[e]),onMatch(e){V?q.set(`activeIndex`,e):Ee(ie.current[e],_c(vc))},onTyping(e){ae.current=e}}),Ne=_.useMemo(()=>Qr(Me.reference,je.reference,Ae.reference,ke.reference,ue),[ke.reference,Me.reference,je.reference,Ae.reference,ue]),Pe=_.useMemo(()=>Qr(iu,Me.floating,je.floating,Ae.floating),[Me.floating,je.floating,Ae.floating]),Fe=je.item??qr,Ie=_.useMemo(()=>({props:Fe,multiple:b,disabled:L,readOnly:f,isItemEqualToValue:C}),[Fe,b,L,f,C]);q.useContextCallback(`setValue`,Ee),q.useContextCallback(`setOpen`,Te),q.useContextCallback(`handleScrollArrowVisibility`,De),q.useContextCallback(`onOpenChangeComplete`,v),ug(()=>{q.update({popupProps:Pe,triggerProps:Ne,itemRoot:Ie})}),q.useSyncedValues({id:I,modal:m,multiple:b,disabled:L,readOnly:f,required:p,highlightItemOnHover:w,value:z,open:V,mounted:pe,transitionStatus:me,popupProps:Pe,triggerProps:Ne,itemRoot:Ie,items:y,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,openMethod:xe});let Le=Mr(g,P.inputRef),Re=b?void 0:R,ze=_.useMemo(()=>!b||!Array.isArray(z)||!R?null:z.map(e=>{let t=Eg(e,S);return(0,Y.jsx)(`input`,{type:`hidden`,form:l,name:R,value:t,disabled:L},t)}),[b,z,l,R,S,L]);return(0,Y.jsxs)(x_.Provider,{value:q,children:[(0,Y.jsx)(S_.Provider,{value:Oe,children:T}),(0,Y.jsx)(`input`,{...P.getValidationProps(L,{onFocus(){q.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||L||f)return;let t=e.currentTarget.value,n=_c(vc,e.nativeEvent);function r(){if(b)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>Eg(t,S).toLowerCase()===e||Tg(t,x).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&Ee(i,n)}q.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Re==null?`${I}-hidden-input`:void 0,form:l,name:Re,autoComplete:u,value:Se,disabled:L,required:p&&!(b&&we),readOnly:f,ref:Le,style:R?zc:Rc,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})}var D_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=Ap(),c=C_(),l=c.useState(`triggerElement`),u=c.useState(`id`),d=Fp({id:Bg(u),fallbackControlId:l?.id??u,setLabelId(e){let t=typeof e==`function`?e(c.state.labelId):e;c.set(`labelId`,t)}});return di(`div`,e,{ref:t,state:s.state,props:[d,a],stateAttributesMapping:Dp})});D_.displayName=`SelectLabel`;var O_=`data-popup-side`,k_=400,A_={...Ds,...Dp,popupSide:e=>e?{[O_]:e}:null,value:()=>null},j_=_.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=Ap(),{labelId:m}=Mp(),h=C_(),g=h.useState(`readOnly`),v=h.useState(`required`),y=h.useState(`disabled`),b=p||y||a,x=h.useState(`open`),S=h.useState(`mounted`),C=h.useState(`value`),w=h.useState(`triggerProps`),T=h.useState(`positionerElement`),E=h.useState(`listElement`),D=h.useState(`popupSide`),O=h.useState(`id`),k=h.useState(`labelId`),A=h.useState(`hasSelectedValue`),j=S&&T?D:null,M=i??O,N=Vg(m,k);$p({id:i});let P=Ll(T),F=_.useRef(null),I=fm(b,F),{getButtonProps:L,buttonRef:R}=_m({disabled:b,native:o}),z=h.useStateSetter(`triggerElement`),B=Il(),V=Il(),H=Il();_.useEffect(()=>{if(x)return H.start(k_,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{H.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[x,h,V,H]);let U=Qr(w,{id:M,role:`combobox`,"aria-expanded":x,"aria-haspopup":`listbox`,"aria-controls":x?E?.id??Rs(T)?.id:void 0,"aria-labelledby":N,"aria-readonly":g||void 0,"aria-required":v||void 0,tabIndex:b?-1:0,onFocus(e){I(!0),x&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,_c(vc,e.nativeEvent)),B.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Z(T,e.relatedTarget)||(l(!0),I(!1),u===`onBlur`&&d.commit(C))},onMouseDown(e){if(x)return;let t=zs(e.currentTarget);function n(e){if(!F.current)return;let t=e.target;Z(F.current,t)||Z(P.current,t)||Ug(e,F.current)||h.context.setOpen(!1,_c(Dc,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,L),ee=d.getValidationProps(b,U);ee.role=`combobox`;let te={...f,open:x,disabled:b,value:C,readOnly:g,popupSide:j,placeholder:!A};return di(`button`,e,{ref:[t,F,R,z],state:te,stateAttributesMapping:A_,props:ee})});j_.displayName=`SelectTrigger`;var M_={value:()=>null},N_=_.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=C_(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Og(l,u,d):Dg(l,u,d)),di(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:M_})});N_.displayName=`SelectValue`;var P_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return di(`span`,e,{state:{open:C_().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Es})});P_.displayName=`SelectIcon`;var F_=_.forwardRef(function(e,t){let n=C_(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,Y.jsx)(bl,{ref:t,...e}):null});F_.displayName=`SelectPortal`;var I_=_.createContext(void 0);I_.displayName=`SelectPositionerContext`;function L_(){let e=_.useContext(I_);if(!e)throw Error(`Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.`);return e}function R_(e,t){e&&Object.assign(e.style,t)}var z_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},B_={position:`fixed`},V_=_.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=pl,style:v,...y}=e,b=C_(),x=w_(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`modal`),T=b.useState(`value`),E=b.useState(`openMethod`),D=b.useState(`positionerElement`),O=b.useState(`triggerElement`),k=b.useState(`isItemEqualToValue`),A=b.useState(`transitionStatus`),j=_.useRef(null),M=_.useRef(null),[N,P]=_.useState(h),F=C&&N&&E!==`touch`;!C&&N!==h&&P(h),_.useImperativeHandle(b.context.alignItemWithTriggerActiveRef,()=>F),qg((F||w)&&S,E===`touch`,D,O);let I=dd({anchor:n,floatingRootContext:x,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??F,collisionAvoidance:g,keepMounted:!0}),L=F?`none`:I.side,R=F?B_:I.positionerStyles,z={open:S,side:L,align:I.align,anchorHidden:I.anchorHidden};X(()=>{b.set(`popupSide`,I.side)},[b,I.side]);let B=hd(e,z,{styles:R,transitionStatus:A,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S}),V=_.useRef(0),H=Q(e=>{if(b.context.valuesRef.current.length===0)return;let t=V.current;V.current=e.size;let n=_c(vc);if(t!==0&&!b.state.multiple&&T!==null&&hg(b.context.valuesRef.current,T,k)===-1){let e=b.context.initialValueRef.current,t=e!=null&&hg(b.context.valuesRef.current,e,k)!==-1?e:null;b.context.setValue(t,n),t===null&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(T)){let e=T.filter(e=>hg(b.context.valuesRef.current,e,k)!==-1);e.length!==T.length&&(b.context.setValue(e,n),e.length===0&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null))}if(S&&F){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};R_(D,e),R_(b.context.popupRef.current,e)}}),U=_.useMemo(()=>({...I,side:L,alignItemWithTriggerActive:F,setControlledAlignItemWithTrigger:P,scrollUpArrowRef:j,scrollDownArrowRef:M}),[I,L,F,P]);return(0,Y.jsx)(jg,{elementsRef:b.context.listRef,labelsRef:b.context.labelsRef,onMapChange:H,children:(0,Y.jsxs)(I_.Provider,{value:U,children:[C&&w&&(0,Y.jsx)(Wh,{inert:Im(!S),cutout:O}),B]})})});V_.displayName=`SelectPositioner`;var H_=`--transform-origin`,U_={...Os,...hs},W_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=C_(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=w_(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=L_(),v=Yg(!0)!=null,y=Xu(),{nonce:b,disableStyleElements:x}=b_(),S=s.useState(`id`),C=s.useState(`open`),w=s.useState(`openMethod`),T=s.useState(`mounted`),E=s.useState(`popupProps`),D=s.useState(`transitionStatus`),O=s.useState(`triggerElement`),k=s.useState(`positionerElement`),A=s.useState(`listElement`),j=_.useRef(!1),M=_.useRef(!1),N=_.useRef({}),P=Ul(),F=Q(e=>{if(!k||!s.context.popupRef.current||!M.current)return;let t=k.style.top===`0px`,n=k.style.bottom===`0px`;if(j.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=q_(k),i=J_(k.getBoundingClientRect().height,`y`,r),a=zs(k),o=Ri(k),c=o.getComputedStyle(k),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=G_(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=K_(e),g=null,_=e=>{k.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=Lm(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(j.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=Lm(g,0,K_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(j.current=!0),s.context.handleScrollArrowVisibility(e)});_.useImperativeHandle(s.context.scrollHandlerRef,()=>F,[F]),Yl({open:C,ref:s.context.popupRef,onComplete(){C&&s.context.onOpenChangeComplete(!0)}});let I={open:C,transitionStatus:D,side:f,align:p};X(()=>{k&&s.context.popupRef.current&&!Object.keys(N.current).length&&(N.current={top:k.style.top||`0`,left:k.style.left||`0`,right:k.style.right,height:k.style.height,bottom:k.style.bottom,minHeight:k.style.minHeight,maxHeight:k.style.maxHeight,marginTop:k.style.marginTop,marginBottom:k.style.marginBottom})},[s,k]),X(()=>{C||m||(M.current=!1,j.current=!1,R_(k,N.current))},[C,m,k]),X(()=>{let e=s.context.popupRef.current;if(!C||!O||!k||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(M.current=!0,e.style.removeProperty(H_),!m){P.request(()=>s.context.handleScrollArrowVisibility(A||e));return}let t=Z_(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=Ri(k),i=r.getComputedStyle(k),a=r.getComputedStyle(e),o=zs(O),c=q_(O),l=Y_(O.getBoundingClientRect(),c),d=Y_(k.getBoundingClientRect(),c),f=l.height,p=A||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,v=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=G_(a),S=o.documentElement.clientHeight-_-v,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=y===`rtl`?l.right-d.width:l.left,D=0;if(t&&n){let e=Y_(n.getBoundingClientRect(),c);T=Y_(t.getBoundingClientRect(),c),E=d.left+(y===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;D=T.top-d.top+T.height/2-r}let M=w+D+v+h,P=Math.min(S,M),F=S-_-v,I=M-P,L=C-5;k.style.left=`${Lm(E,5,L-d.width)}px`,k.style.height=`${P}px`,k.style.maxHeight=`none`,k.style.marginTop=`${_}px`,k.style.marginBottom=`${v}px`,e.style.height=`100%`;let R=K_(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&gc;if(B||V){R_(k,N.current),g(!1);return}let H=Math.max(b,P);if(z){let e=Math.max(0,S-M);k.style.top=d.height>=F?`0`:`${e}px`,k.style.height=`${P}px`,p.scrollTop=K_(p)}else k.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=Lm(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(H_,`50% ${i}%`)}(H===S||P>=x)&&(j.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,C,k,O,m,g,P,A,u,y,h]),_.useEffect(()=>{if(!m||!k||!C)return;let e=Ri(k);function t(e){s.context.setOpen(!1,_c(Ac,e))}return jc(e,`resize`,t)},[s,m,k,C]);let L={...A?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${S}-list`},onKeyDown(e){v&&Zg.has(e.key)&&e.stopPropagation()},onScroll(e){A||F(e.currentTarget)},...m&&{style:A?{height:`100%`}:z_},className:!A&&m?__.className:void 0},R=di(`div`,e,{ref:[t,s.context.popupRef],state:I,stateAttributesMapping:U_,props:[E,L,md(D),o]});return(0,Y.jsxs)(_.Fragment,{children:[!x&&__.getElement(b),(0,Y.jsx)(Bh,{context:d,modal:!1,disabled:!T,openInteractionType:w,returnFocus:a,restoreFocus:!0,children:R})]})});W_.displayName=`SelectPopup`;function G_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function K_(e){return m_(e.scrollHeight,e.clientHeight)}function q_(e){return _o.getScale(e)}function J_(e,t,n){return e/n[t]}function Y_(e,t){return Na({x:J_(e.x,`x`,t),y:J_(e.y,`y`,t),width:J_(e.width,`x`,t),height:J_(e.height,`y`,t)})}var X_=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function Z_(e){let{style:t}=e,n={};for(let[e,r]of X_)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of X_){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Q_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=C_(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=L_(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:z_},className:u&&d!==`touch`?__.className:void 0};return di(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});Q_.displayName=`SelectList`;var $_=_.createContext(void 0);$_.displayName=`SelectItemContext`;function ev(){let e=_.useContext($_);if(!e)throw Error(`Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.`);return e}var tv=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=_.useRef(null),d=Rg({guess:!0,label:o,textRef:u}),f=C_(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:v}=f.useState(`itemRoot`),y=h||s,b=f.useState(`isActive`,d.index),x=f.useState(`open`),S=f.useState(`isSelected`,a),C=f.useState(`isSelectedByFocus`,d.index),w=d.index,T=_.useRef(null);X(()=>{let e=f.context.valuesRef.current;return e[w]=a,()=>{delete e[w]}},[w,a,f]),X(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=vg(w,a,f.context.valuesRef.current,e,v,t),r=n===w,w===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&fg(a,e,v),r&&(n=w)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[w,m,v,f,a]);let E=_.useRef(`mouse`),D=_.useRef(!1),{getButtonProps:O,buttonRef:k}=_m({disabled:y,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:y,selected:S,highlighted:b};function j(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=S?yg(n,a,v):[...n,a];f.context.setValue(r,_c(Cc,e))}else f.context.setValue(a,_c(Cc,e)),f.context.setOpen(!1,_c(Cc,e))}function M(){f.context.selectionRef.current.dragY=0}let N={role:`option`,"aria-selected":S,tabIndex:x&&b?0:-1,onKeyDown(e){f.set(`activeIndex`,w),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=E.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Qo(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!D.current;D.current=!1,!(y||i)&&j(e.nativeEvent)},onPointerEnter(e){E.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){E.current=e.pointerType,D.current=!0,M()},onMouseUp(){if(M(),y||E.current===`touch`||D.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&S,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!S;e||t||(D.current=!0,T.current?.click(),D.current=!1)}},P=di(`div`,e,{ref:[k,t,d.ref,T],state:A,props:[p,N,l,O]}),F=_.useMemo(()=>({selected:S,index:w,textRef:u,selectedByFocus:C}),[S,w,u,C]);return(0,Y.jsx)($_.Provider,{value:F,children:P})}));tv.displayName=`SelectItem`;var nv=_.forwardRef(function(e,t){let{selected:n}=ev();return e.keepMounted||n?(0,Y.jsx)(Gg,{...e,selected:n,ref:t}):null});nv.displayName=`SelectItemIndicator`;var rv=_.memo(_.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=ev(),a=C_(),{render:o,className:s,style:c,...l}=e;return di(`div`,e,{ref:[_.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})}));rv.displayName=`SelectItemText`;var iv=_.createContext(void 0);iv.displayName=`SelectGroupContext`;function av(){let e=_.useContext(iv);if(e===void 0)throw Error(`Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.`);return e}var ov=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=_.useState(),c=_.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=di(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,Y.jsx)(iv.Provider,{value:c,children:l})});ov.displayName=`SelectGroup`;var sv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=av(),c=qu(a);return X(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),di(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})});sv.displayName=`SelectGroupLabel`;var cv=p_;Km.size;var lv={size:`base`};function uv({size:e=lv.size}={}){return J(Hf({size:e}),`bg-kumo-control disabled:bg-kumo-control/50 data-[state=open]:bg-kumo-control`,`justify-between font-normal`,`focus:opacity-100 focus:ring-kumo-focus/50 focus-visible:ring-inset *:in-focus:opacity-100`)}var dv={xs:{iconSize:12,className:`text-kumo-subtle`},sm:{iconSize:14,className:`text-kumo-subtle`},base:{iconSize:16,className:`text-kumo-subtle`},lg:{iconSize:18,className:`text-kumo-subtle`}};function fv(e){if(typeof e!=`object`||!e||Array.isArray(e)||`$$typeof`in e||e instanceof Promise)return!1;let t=e;return`label`in t&&t.label!==void 0}function pv(e){return Array.isArray(e)?e:Object.entries(e).map(([e,t])=>({value:e,label:fv(t)?t.label:t}))}function mv(e){let t=pv(e),n=new Map;if(!Array.isArray(e))for(let[t,r]of Object.entries(e))fv(r)&&n.set(t,{disabled:r.disabled});return t.filter(e=>e.value!==null).map((e,t)=>{let r=typeof e.value==`string`?e.value:`option-${t}`,i=typeof e.value==`string`?n.get(e.value):void 0;return(0,Y.jsx)(gv,{value:e.value,disabled:i?.disabled,children:e.label},r)})}function hv({children:e,className:t,render:n,renderValue:r,label:i,hideLabel:a,placeholder:o,loading:s,size:c=lv.size,labelTooltip:l,description:u,error:d,required:f,container:p,side:m=`bottom`,sideOffset:h=4,align:g=`start`,alignOffset:v,alignItemWithTrigger:y=!1,anchor:b,arrowPadding:x,positionMethod:S,collisionAvoidance:C,collisionBoundary:w,collisionPadding:T,sticky:E,disableAnchorTracking:D,...O}){let k=(0,_.useId)(),A=Ni(),j=p??A??void 0,M=O,N=M[`aria-label`],P=M[`aria-labelledby`],F=typeof i==`string`?i:o;a!==void 0&&console.warn('[Kumo Select]: `hideLabel` is deprecated. For hidden labels, use `aria-label` instead of `label` + `hideLabel={true}`.\n Migration:\n - For visible labels: <Select label="Country" /> (hideLabel no longer needed)\n - For hidden labels: <Select aria-label="Select a country" /> (remove label and hideLabel)');let I=i&&a!==!0,L=I?void 0:P??(i?k:void 0),R=N??(L?void 0:F),z=O.items?pv(O.items):void 0,B=e||(O.items?mv(O.items):null),V=r?e=>{let t=o==null?null:(0,Y.jsx)(`span`,{className:`text-kumo-placeholder`,children:o});return e==null||e===``?t:r(e)??t}:void 0,{items:H,...U}=O,ee=i?(0,Y.jsx)(D_,{className:`m-0 text-base font-medium text-kumo-default select-none`,children:(0,Y.jsx)(_p,{showOptional:f===!1,tooltip:a?void 0:l,asContent:!0,children:i})}):null,te=(0,Y.jsxs)(j_,{"data-kumo-component":`Select`,"data-kumo-part":`trigger`,render:n,className:J(uv({size:c}),O.disabled&&`cursor-not-allowed opacity-50`,d&&`!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50`,t),"aria-label":R,"aria-labelledby":L,children:[s?(0,Y.jsx)(d_,{className:`w-32`}):(0,Y.jsx)(N_,{placeholder:o,className:`min-w-0 truncate data-[placeholder]:text-kumo-placeholder`,children:V}),(0,Y.jsx)(P_,{className:J(`flex shrink-0 items-center`,dv[c].className),children:(0,Y.jsx)(Tf,{size:dv[c].iconSize,className:`fill-current`})})]}),W=(0,Y.jsxs)(E_,{...U,items:z,disabled:s||O.disabled,required:f,children:[ee,te,(0,Y.jsx)(F_,{container:j,children:(0,Y.jsx)(V_,{side:m,sideOffset:h,align:g,alignOffset:v,alignItemWithTrigger:y,anchor:b,arrowPadding:x,positionMethod:S,collisionAvoidance:C,collisionBoundary:w,collisionPadding:T,sticky:E,disableAnchorTracking:D,children:(0,Y.jsx)(W_,{className:J(`flex flex-col`,`max-h-[var(--available-height)] bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,`max-w-(--available-width) min-w-(--anchor-width) py-1.5`),children:(0,Y.jsx)(Q_,{className:J(`min-h-0 flex-1 scroll-pt-2 scroll-pb-2 overflow-y-auto overscroll-none`),children:B})})})})]});if(I)return(0,Y.jsx)(Um,{label:i,required:f,labelTooltip:l,description:u,error:d?typeof d==`string`?{message:d,match:!0}:d:void 0,hideLabel:!0,children:W});let ne=d?typeof d==`string`?{message:d,match:!0}:d:void 0;return(0,Y.jsxs)(`div`,{className:`grid gap-2`,children:[i&&(0,Y.jsx)(`span`,{id:k,className:`sr-only`,children:i}),W,ne?(0,Y.jsx)(`span`,{className:`text-sm text-kumo-danger`,children:ne.message}):u&&(0,Y.jsx)(`span`,{className:`text-sm leading-snug text-kumo-subtle`,children:u})]})}function gv({children:e,value:t,disabled:n,className:r}){return(0,Y.jsxs)(tv,{"data-kumo-component":`Select`,"data-kumo-part":`option`,value:t,disabled:n,className:J(`group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none`,`focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,`data-highlighted:bg-kumo-tint`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[(0,Y.jsx)(rv,{children:e}),(0,Y.jsx)(nv,{children:(0,Y.jsx)(Ef,{})})]})}var _v=(0,_.forwardRef)(({children:e,className:t},n)=>(0,Y.jsx)(ov,{ref:n,className:J(t),children:e}));_v.displayName=`Select.Group`;var vv=(0,_.forwardRef)(({children:e,className:t},n)=>(0,Y.jsx)(sv,{ref:n,className:J(`px-3.5 py-1.5 text-sm font-semibold text-kumo-subtle`,t),children:e}));vv.displayName=`Select.GroupLabel`;var yv=(0,_.forwardRef)(({className:e},t)=>(0,Y.jsx)(cv,{ref:t,className:J(`my-1 h-px bg-kumo-hairline`,e)}));yv.displayName=`Select.Separator`,hv.Option=gv,hv.Group=_v,hv.GroupLabel=vv,hv.Separator=yv,hv.Option.displayName=`Select.Option`;var bv=[25,50,100,250],xv=(e,t,n)=>Math.min(Math.max(e,t),n),Sv={navigation:`Pagination`,firstPage:`First page`,previousPage:`Previous page`,nextPage:`Next page`,lastPage:`Last page`,pageNumber:`Page number`,pageSize:`Page size`},Cv={controls:`full`},wv=(0,_.createContext)(null);function Tv(){let e=(0,_.useContext)(wv);if(!e)throw Error(`Pagination compound components must be used within a Pagination component`);return e}function Ev({children:e,className:t}){let{page:n,perPage:r,totalCount:i,pageShowingRange:a}=Tv(),o=e?e({page:n,perPage:r,totalCount:i,pageShowingRange:a}):i&&i>0?(0,Y.jsxs)(Y.Fragment,{children:[`Showing `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:a}),` of`,` `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:i})]}):null;return(0,Y.jsx)(`div`,{"data-slot":`pagination-info`,className:J(`text-sm text-kumo-subtle`,t),children:o})}Ev.displayName=`Pagination.Info`;function Dv({value:e,onChange:t,options:n=bv,label:r=`Per page:`,className:i}){let{labels:a}=Tv();return(0,Y.jsxs)(`div`,{"data-slot":`pagination-page-size`,className:J(`flex items-center gap-2`,i),children:[r&&(0,Y.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:r}),(0,Y.jsx)(hv,{"aria-label":a.pageSize,value:e,onValueChange:e=>t(e),children:n.map(e=>(0,Y.jsx)(hv.Option,{value:e,children:e},e))})]})}Dv.displayName=`Pagination.PageSize`;function Ov({controls:e=Cv.controls,pageSelector:t=`input`,className:n}){let{page:r,totalCount:i,hasNextPage:a,maxPage:o,setPage:s,editingPage:c,setEditingPage:l,labels:u}=Tv(),d=i!=null,f=e===`full`&&!(!d&&a!==void 0),p=d?r===o:a!==!0;return(0,Y.jsx)(`div`,{"data-slot":`pagination-controls`,className:J(`flex grow flex-col items-end`,n),children:(0,Y.jsx)(`nav`,{"aria-label":u.navigation,children:(0,Y.jsxs)(dh,{children:[f&&(0,Y.jsx)(dh.Button,{variant:`secondary`,"aria-label":u.firstPage,disabled:r<=1,onClick:()=>{s(1),l(1)},children:(0,Y.jsx)(yf,{size:16})}),(0,Y.jsx)(dh.Button,{variant:`secondary`,"aria-label":u.previousPage,disabled:r<=1,onClick:()=>{let e=Math.max(r-1,1);s(e),l(e)},children:(0,Y.jsx)(Sf,{size:16})}),f&&(t===`dropdown`?(0,Y.jsx)(hv,{"aria-label":u.pageNumber,className:`rounded-none ring-kumo-hairline`,value:r,onValueChange:e=>{let t=e;s(t),l(t)},children:Array.from({length:o},(e,t)=>t+1).map(e=>(0,Y.jsx)(hv.Option,{value:e,children:e},e))}):(0,Y.jsx)(dh.Input,{style:{width:50},className:`text-center`,"aria-label":u.pageNumber,value:c,onValueChange:e=>{l(Number(e))},onBlur:()=>{let e=xv(c,1,o);s(e),l(e)},onKeyDown:e=>{if(e.key===`Enter`){let e=xv(c,1,o);s(e),l(e)}},autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,"data-form-type":`other`})),(0,Y.jsx)(dh.Button,{variant:`secondary`,"aria-label":u.nextPage,disabled:p,onClick:()=>{let e=d?Math.min(r+1,o):r+1;s(e),l(e)},children:(0,Y.jsx)(Cf,{size:16})}),f&&(0,Y.jsx)(dh.Button,{variant:`secondary`,"aria-label":u.lastPage,disabled:r===o,onClick:()=>{s(o),l(o)},children:(0,Y.jsx)(bf,{size:16})})]})})})}Ov.displayName=`Pagination.Controls`;function kv({className:e}){return(0,Y.jsx)(`div`,{"data-slot":`pagination-separator`,className:J(`mx-2 h-6 border-l border-kumo-hairline`,e)})}kv.displayName=`Pagination.Separator`;function Av(e){let{page:t=1,perPage:n,totalCount:r,hasNextPage:i,setPage:a,children:o,className:s,labels:c}=e,l=`text`in e?e.text:void 0,u=`controls`in e?e.controls??Cv.controls:Cv.controls,[d,f]=(0,_.useState)(1),p=(0,_.useMemo)(()=>({...Sv,...c}),[c]);(0,_.useEffect)(()=>{f(t)},[t]);let m=(0,_.useMemo)(()=>{let e=t*(n??1)-(n??0)+1,i=Math.min(t*(n??0),r??0);return Number.isNaN(e)&&(e=0),Number.isNaN(i)&&(i=0),`${e}-${i}`},[t,n,r]),h={page:t,perPage:n,totalCount:r,hasNextPage:i,maxPage:(0,_.useMemo)(()=>Math.ceil((r??1)/(n??1)),[r,n]),pageShowingRange:m,setPage:a,editingPage:d,setEditingPage:f,labels:p};return o?(0,Y.jsx)(wv.Provider,{value:h,children:(0,Y.jsx)(`div`,{"data-slot":`pagination`,className:J(`flex w-full items-center gap-2`,s),children:o})}):(0,Y.jsx)(wv.Provider,{value:h,children:(0,Y.jsxs)(`div`,{"data-slot":`pagination`,className:J(`flex w-full items-center gap-2`,s),children:[(0,Y.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-slot":`pagination-info`,className:`grow text-sm text-kumo-subtle`,children:l?l({page:t,perPage:n,totalCount:r,pageShowingRange:m}):r&&r>0?(0,Y.jsxs)(Y.Fragment,{children:[`Showing `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:m}),` of`,` `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:r})]}):null}),(0,Y.jsx)(Ov,{controls:u})]})})}Av.displayName=`Pagination`;var jv=Object.assign(Av,{Info:Ev,PageSize:Dv,Controls:Ov,Separator:kv}),Mv={layout:{auto:{classes:``,description:`Auto table layout - columns resize based on content`},fixed:{classes:`table-fixed`,description:`Fixed table layout - columns have equal width, controlled via colgroup`}},variant:{default:{classes:`even:bg-kumo-elevated [--kumo-table-row-bg:var(--color-kumo-base)] even:[--kumo-table-row-bg:var(--color-kumo-elevated)]`,description:`Default row variant`},selected:{classes:`bg-kumo-tint [--kumo-table-row-bg:var(--color-kumo-tint)]`,description:`Selected row variant`}},sticky:{left:{classes:`sticky left-0`,description:`Pin column to the left edge of the scroll container`},right:{classes:`sticky right-0`,description:`Pin column to the right edge of the scroll container`}}},Nv=(e,t)=>{let n=vr(Mv.sticky,e,`left`).classes,r=t===`head`?`z-2`:`z-1`,i=e===`right`?`before:-left-6`:`before:-right-6`,a=`before:pointer-events-none before:absolute before:inset-y-0 before:w-6`;return t===`cell`?J(n,r,`bg-(--kumo-table-row-bg)`,a,i,e===`right`?`before:bg-gradient-to-r before:from-transparent before:to-(--kumo-table-row-bg)`:`before:bg-gradient-to-l before:from-transparent before:to-(--kumo-table-row-bg)`):J(n,r,`bg-kumo-base group-data-[compact]/header:bg-kumo-elevated`,a,i,e===`right`?`before:bg-gradient-to-r before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated`:`before:bg-gradient-to-l before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated`)},Pv={layout:`auto`,variant:`default`},Fv=(0,_.forwardRef)(({layout:e=`auto`,...t},n)=>{let r=J(`isolate w-full`,vr(Mv.layout,e,Pv.layout).classes,`[&_td]:p-3`,`[&_th]:border-b [&_th]:border-kumo-fill [&_th]:p-3 [&_th]:text-base [&_th]:font-semibold`,`[&_th]:bg-kumo-base`,`text-left text-base text-kumo-default`,t.className);return(0,Y.jsx)(`table`,{ref:n,...t,className:r})}),Iv=(0,_.forwardRef)(({variant:e=`default`,sticky:t,...n},r)=>{let i=e===`compact`,a=J(`group/header`,i&&`text-xs text-kumo-strong [&_th]:bg-kumo-elevated [&_th]:py-2`,t&&`[&_th]:sticky [&_th]:top-0 [&_th]:z-1`,n.className);return(0,Y.jsx)(`thead`,{ref:r,...n,className:a,...i&&{"data-compact":``}})}),Lv=(0,_.forwardRef)(({sticky:e,...t},n)=>{let r=J(`group relative`,e&&Nv(e,`head`),t.className);return(0,Y.jsx)(`th`,{ref:n,...t,className:r})}),Rv=(0,_.forwardRef)(({variant:e=Pv.variant,...t},n)=>{let r=J(vr(Mv.variant,e,Pv.variant).classes,t.className);return(0,Y.jsx)(`tr`,{ref:n,...t,className:r})}),zv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`tbody`,{ref:t,...e})),Bv=(0,_.forwardRef)(({sticky:e,...t},n)=>{let r=J(e&&Nv(e,`cell`),t.className);return(0,Y.jsx)(`td`,{ref:n,...t,className:r})}),Vv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`tfoot`,{ref:t,...e})),Hv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`button`,{ref:t,...e,type:`button`,"aria-label":`Resize column`,className:J(`invisible h-full group-hover:visible`,`w-[10px]`,`flex items-center justify-center`,`cursor-col-resize touch-none select-none`,`absolute top-0 right-0`,`m-0 bg-kumo-base p-0`,`focus-visible:ring-2 focus-visible:ring-kumo-brand`),children:(0,Y.jsx)(`span`,{className:`h-5 w-[2px] rounded bg-kumo-hairline`})})),Uv=(0,_.forwardRef)(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:i,disabled:a,...o},s)=>(0,Y.jsx)(Bv,{ref:s,...o,className:J(`w-10 leading-none`,o.className),children:(0,Y.jsx)(Pm,{checked:e,indeterminate:t,onCheckedChange:(e,t)=>{n?.(e,t),r?.(e)},"aria-label":i??`Select row`,disabled:a,className:`relative before:absolute before:-inset-3 before:content-['']`})})),Wv=(0,_.forwardRef)(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:i,disabled:a,...o},s)=>(0,Y.jsx)(Lv,{ref:s,...o,className:J(`w-10 leading-none`,o.className),children:(0,Y.jsx)(Pm,{checked:e,indeterminate:t,onCheckedChange:(e,t)=>{n?.(e,t),r?.(e)},"aria-label":i??`Select all rows`,disabled:a,className:`relative before:absolute before:-inset-3 before:content-['']`})}));Fv.displayName=`Table`,zv.displayName=`Table.Body`,Lv.displayName=`Table.Head`,Rv.displayName=`Table.Row`,Bv.displayName=`Table.Cell`,Vv.displayName=`Table.Footer`,Iv.displayName=`Table.Header`,Hv.displayName=`Table.ResizeHandle`,Uv.displayName=`Table.CheckCell`,Wv.displayName=`Table.CheckHead`;var $=Object.assign(Fv,{Header:Iv,Head:Lv,Row:Rv,Body:zv,Cell:Bv,CheckCell:Uv,CheckHead:Wv,Footer:Vv,ResizeHandle:Hv}),Gv={size:{sm:{classes:`text-sm h-10 gap-0.5`,description:`Compact breadcrumbs for dense UIs`},base:{classes:`text-base h-12 gap-1`,description:`Default breadcrumbs size`}}},Kv={size:`base`};function qv({size:e=Kv.size}={}){return J(`group mr-4 flex min-w-0 grow items-center overflow-hidden whitespace-nowrap`,vr(Gv.size,e,Kv.size).classes)}var Jv=({href:e,icon:t,children:n})=>{let r=Or();return(0,Y.jsxs)(r,{"data-kumo-component":`Breadcrumbs`,"data-kumo-part":`link`,to:e,className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-kumo-subtle no-underline`,children:[!!t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(`span`,{children:n})]})};function Yv({children:e,icon:t,loading:n}){return n?(0,Y.jsxs)(`div`,{className:`flex w-[125px] min-w-0 items-center gap-1`,children:[t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(d_,{})]}):(0,Y.jsxs)(`div`,{className:`flex max-w-full min-w-0 items-center gap-1 font-medium`,"aria-current":`page`,children:[t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(`span`,{className:`truncate`,children:e})]})}function Xv(){return(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center text-kumo-inactive`,"aria-hidden":`true`,children:(0,Y.jsx)(`svg`,{width:`24`,height:`24`,fill:`none`,viewBox:`0 0 24 24`,children:(0,Y.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M10.75 8.75L14.25 12L10.75 15.25`})})})}function Zv(){return(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center text-kumo-subtle`,"aria-hidden":!0,children:`...`})}function Qv({text:e}){let{copied:t,runCopy:n}=c_();return(0,Y.jsx)(ep,{variant:`ghost`,shape:`square`,size:`sm`,className:`opacity-0 transition-[opacity] group-hover:opacity-100`,onClick:async()=>{e&&await n(()=>navigator.clipboard.writeText(e),e=>console.error(`Failed to copy deeplink:`,e))},title:`Click to copy`,"aria-label":`Copy`,children:t?(0,Y.jsx)(Ef,{weight:`bold`,className:`text-kumo-success`}):(0,Y.jsx)(Of,{weight:`regular`})})}function $v({children:e,size:t=`base`,className:n}){let r=_.Children.toArray(e),i=ty(r);return(0,Y.jsxs)(`nav`,{className:J(qv({size:t}),n),"aria-label":`breadcrumb`,children:[(0,Y.jsx)(`div`,{className:`contents sm:hidden`,children:i}),(0,Y.jsx)(`div`,{className:`hidden sm:contents`,children:r})]})}function ey(e,t){return(0,_.isValidElement)(e)&&e.type===t}function ty(e){let t=e.filter(e=>ey(e,Jv)||ey(e,Yv));if(t.length<=2)return e;let[n,r]=t.slice(-2),i=[(0,Y.jsx)(Zv,{},`kumo-breadcrumb-mobile-ellipsis`),(0,Y.jsx)(Xv,{},`kumo-breadcrumb-mobile-separator-leading`),(0,_.cloneElement)(n,{key:`kumo-breadcrumb-mobile-parent`}),(0,Y.jsx)(Xv,{},`kumo-breadcrumb-mobile-separator-trailing`),(0,_.cloneElement)(r,{key:`kumo-breadcrumb-mobile-current`})],a=e.filter(e=>!ey(e,Jv)&&!ey(e,Yv)&&!ey(e,Xv));return[...i,...a]}$v.Link=Jv,$v.Current=Yv,$v.Separator=Xv,$v.Clipboard=Qv;var ny={size:{sm:{classes:`px-6 py-8 gap-4`,description:`Compact empty state for smaller containers`},base:{classes:`px-10 py-16 gap-6`,description:`Default empty state size`},lg:{classes:`px-12 py-20 gap-8`,description:`Large empty state for prominent placement`}}},ry={size:`base`};function iy({size:e=ry.size}={}){return J(`flex w-full flex-col items-center rounded-xl border border-kumo-fill bg-kumo-control text-kumo-default`,vr(ny.size,e,ry.size).classes)}function ay({icon:e,title:t,description:n,commandLine:r,contents:i,size:a=`base`,className:o}){let{copied:s,runCopy:c}=c_(1e3),l=(0,_.useCallback)(async()=>{r&&await c(()=>navigator.clipboard.writeText(r),e=>console.warn(`Clipboard copy failed`,e))},[r,c]);return(0,Y.jsxs)(`div`,{className:J(iy({size:a}),o),children:[e,(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-2.5`,children:[n?(0,Y.jsx)(vh,{variant:`heading`,size:`lg`,as:`h2`,children:t}):(0,Y.jsx)(vh,{variant:`secondary`,size:`base`,as:`h2`,children:t}),n&&(0,Y.jsx)(vh,{variant:`secondary`,size:`base`,DANGEROUS_className:`max-w-140 text-center text-balance leading-normal`,children:n})]}),r&&(0,Y.jsxs)(`div`,{className:J(`relative inline-flex h-10 max-w-8/10 transform-gpu items-center gap-2 rounded-lg border border-white bg-kumo-overlay pr-2 pl-3 font-mono shadow-xs ring ring-kumo-line`),children:[(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-kumo-subtle select-none`,children:`$`}),(0,Y.jsx)(`span`,{className:`no-scrollbar overflow-scroll text-base whitespace-nowrap`,children:r})]}),(0,Y.jsx)(ep,{className:`text-kumo-subtle`,size:`sm`,variant:`ghost`,shape:`square`,"aria-label":`Copy command`,onClick:l,children:s?(0,Y.jsx)(Ef,{size:16,className:`animate-bounce-in text-kumo-success`}):(0,Y.jsx)(Of,{size:16})})]}),i]})}var oy=_.createContext(void 0);oy.displayName=`ScrollAreaRootContext`;function sy(){let e=_.useContext(oy);if(e===void 0)throw Error(`Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.`);return e}function cy(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var ly=`data-has-overflow-x`,uy=`data-has-overflow-y`,dy=`data-overflow-x-start`,fy=`data-overflow-x-end`,py=`data-overflow-y-start`,my=`data-overflow-y-end`,hy=e=>t=>t?{[e]:``}:null,gy={hasOverflowX:hy(ly),hasOverflowY:hy(uy),overflowXStart:hy(dy),overflowXEnd:hy(fy),overflowYStart:hy(py),overflowYEnd:hy(my),cornerHidden:()=>null},_y=`--scroll-area-corner-height`,vy=`--scroll-area-corner-width`,yy=`data-orientation`,by={x:0,y:0},xy={width:0,height:0},Sy={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Cy={x:!0,y:!0,corner:!0},wy=_.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=Ty(i),d=qu(),f=Il(),p=Il(),{nonce:m,disableStyleElements:h}=b_(),[g,v]=_.useState(!1),[y,b]=_.useState(!1),[x,S]=_.useState(!1),[C,w]=_.useState(!1),[T,E]=_.useState(!1),[D,O]=_.useState(xy),[k,A]=_.useState(xy),[j,M]=_.useState(Sy),[N,P]=_.useState(Cy),F=_.useRef(null),I=_.useRef(null),L=_.useRef(null),R=_.useRef(null),z=_.useRef(null),B=_.useRef(null),V=_.useRef(null),H=_.useRef(null),U=_.useRef(0),ee=_.useRef(0),te=_.useRef(0),W=_.useRef(0),ne=_.useRef(`vertical`),re=_.useRef(by),ie=_.useRef(null);function ae(e){let t=e?S:b,n=e?f:p;t(!0),n.start(500,()=>{t(!1)})}let G=Q(e=>{let t=e.x-re.current.x,n=e.y-re.current.y;re.current=e,n!==0&&ae(!0),t!==0&&ae(!1)}),K=Q(()=>{let e=I.current;e&&ie.current===null&&(ie.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),oe=Q(e=>{if(e.button!==0||H.current!==null&&(ne.current===`vertical`?z.current:B.current)?.hasPointerCapture(H.current))return;H.current=e.pointerId,U.current=e.clientY,ee.current=e.clientX,ne.current=e.currentTarget.getAttribute(yy);let t=I.current;t&&(te.current=t.scrollTop,W.current=t.scrollLeft,K()),(ne.current===`vertical`?z.current:B.current)?.setPointerCapture(e.pointerId)}),se=Q(e=>{if(e.pointerId!==H.current)return;H.current=null,(ne.current===`vertical`?S:b)(!1),ie.current!==null&&(I.current&&(I.current.style.scrollSnapType=ie.current),ie.current=null);let t=ne.current===`vertical`?z.current:B.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),ce=Q(e=>{if(e.pointerId!==H.current)return;if(e.buttons%2==0){se(e);return}let t=I.current;if(!t)return;let n=ne.current===`vertical`,r=n?z.current:B.current,i=n?L.current:R.current;if(!r||!i)return;let a=n?`y`:`x`,o=cy(i,`padding`,a),s=cy(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-U.current:e.clientX-ee.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?te.current:W.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),ae(n)});function le(e){w(e.pointerType===`touch`)}function ue(e){if(le(e),e.pointerType!==`touch`){let t=Z(F.current,e.target);v(t)}}let q=_.useMemo(()=>({scrolling:y||x,hasOverflowX:!N.x,hasOverflowY:!N.y,overflowXStart:j.xStart,overflowXEnd:j.xEnd,overflowYStart:j.yStart,overflowYEnd:j.yEnd,cornerHidden:N.corner}),[y,x,N.x,N.y,N.corner,j]),de={role:`presentation`,onPointerEnter:ue,onPointerMove:ue,onPointerDown:le,onPointerLeave(){v(!1)},style:{position:`relative`,[_y]:`${D.height}px`,[vy]:`${D.width}px`}},fe=di(`div`,e,{state:q,ref:[t,F],props:[de,o],stateAttributesMapping:gy}),pe=_.useMemo(()=>({handlePointerDown:oe,handlePointerMove:ce,handlePointerUp:se,handleScroll:G,disableViewportSnap:K,cornerSize:D,setCornerSize:O,thumbSize:k,setThumbSize:A,hasMeasuredScrollbar:T,setHasMeasuredScrollbar:E,touchModality:C,cornerRef:V,scrollingX:y,scrollingY:x,hovering:g,setHovering:v,viewportRef:I,scrollbarYRef:L,scrollbarXRef:R,thumbYRef:z,thumbXRef:B,rootId:d,hiddenState:N,setHiddenState:P,overflowEdges:j,setOverflowEdges:M,viewportState:q,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[oe,ce,se,G,K,D,k,T,C,y,x,g,d,N,j,q,s,c,l,u]);return(0,Y.jsxs)(oy.Provider,{value:pe,children:[!h&&__.getElement(m),fe]})});wy.displayName=`ScrollAreaRoot`;function Ty(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var Ey=_.createContext(void 0);Ey.displayName=`ScrollAreaViewportContext`;function Dy(){let e=_.useContext(Ey);if(e===void 0)throw Error(`Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.`);return e}var Oy=`--scroll-area-overflow-x-start`,ky=`--scroll-area-overflow-x-end`,Ay=`--scroll-area-overflow-y-start`,jy=`--scroll-area-overflow-y-end`,My=`--scroll-area-thumb-height`,Ny=`--scroll-area-thumb-width`,Py=[Oy,ky,Ay,jy],Fy=!1;function Iy(){Fy||gc||(typeof CSS<`u`&&`registerProperty`in CSS&&Py.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),Fy=!0)}var Ly=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:f,setCornerSize:p,setThumbSize:m,rootId:h,setHiddenState:g,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,touchModality:x,setHovering:S,setOverflowEdges:C,overflowEdgeThreshold:w,viewportState:T}=sy(),E=Xu(),D=_.useRef(!0),O=_.useRef([NaN,NaN,NaN,NaN]),k=Il(),A=Il(),j=Q(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let h=e.scrollHeight,_=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,T=O.current,D=Number.isNaN(T[0]);if(T[0]=v,T[1]=h,T[2]=b,T[3]=_,D&&y(!0),h===0||_===0)return;let k=Ry(e),A=k.y,j=k.x,M=b/_,N=v/h,P=Math.max(0,_-b),F=Math.max(0,h-v),I=0,L=0;j||(I=h_(E===`rtl`?-S:S,P),L=P-I);let R=A?0:h_(x,F),z=A?0:F-R,B=j?0:b,V=A?0:v,H=0,U=0;!j&&!A&&(H=t?.offsetWidth||0,U=n?.offsetHeight||0);let ee=f.width===0&&f.height===0,te=ee?H:0,W=ee?U:0,ne=cy(n,`padding`,`x`),re=cy(t,`padding`,`y`),ie=cy(i,`margin`,`x`),ae=cy(r,`margin`,`y`),G=B-ne-ie,K=V-re-ae,oe=n?Math.min(n.offsetWidth-te,G):G,se=t?Math.min(t.offsetHeight-W,K):K,ce=Math.max(16,oe*M),le=Math.max(16,se*N);if(m(e=>zy(e,{width:ce,height:le})),t&&r){let e=By(r,My,x,F,h,le,t.offsetHeight-le-re-ae);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-ce-ne-ie,t=By(i,Ny,E===`rtl`?-S:S,P,_,ce,e);i.style.transform=`translate3d(${E===`rtl`?-t:t}px,0,0)`}let ue=[I,L,R,z];Py.forEach((t,n)=>{e.style.setProperty(t,`${ue[n]}px`)}),a&&p(e=>zy(e,{width:H,height:U})),g(e=>zy(e,k));let q={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&R>w.yStart,yEnd:!A&&z>w.yEnd};C(e=>zy(e,q))});X(()=>{Iy()},[]),X(()=>{queueMicrotask(j)},[j,v,E,w.xStart,w.xEnd,w.yStart,w.yEnd]),X(()=>{o.current?.matches(`:hover`)&&S(!0)},[o,S]),X(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=O.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}j()});return n.observe(e),A.start(0,()=>{let t=Wl(e,{subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished.then(Gr))).then(j).catch(()=>{})}),()=>{n.disconnect(),A.clear()}},[j,o,A]);function M(){D.current=!1}let N={...h&&{"data-id":`${h}-viewport`},tabIndex:v.x&&v.y?-1:0,className:__.className,style:{overflow:`scroll`},onScroll(){o.current&&(j(),(x||!D.current)&&b({x:o.current.scrollLeft,y:o.current.scrollTop}),k.start(100,()=>{D.current=!0}))},onWheel:M,onPointerMove:M,onPointerEnter:M,onKeyDown:M},P=di(`div`,e,{ref:[t,o],state:T,props:[N,a],stateAttributesMapping:gy}),F=_.useMemo(()=>({computeThumbPosition:j}),[j]);return(0,Y.jsx)(Ey.Provider,{value:F,children:P})});Ly.displayName=`ScrollAreaViewport`;function Ry(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function zy(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function By(e,t,n,r,i,a,o){let s=Lm(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var Vy=_.createContext(void 0);Vy.displayName=`ScrollAreaScrollbarContext`;function Hy(){let e=_.useContext(Vy);if(e===void 0)throw Error(`Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.`);return e}var Uy=_.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:f,scrollbarXRef:p,viewportRef:m,thumbYRef:h,thumbXRef:g,handlePointerDown:v,handlePointerUp:y,handleScroll:b,disableViewportSnap:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w,viewportState:T}=sy(),E=i===`vertical`,D={...T,hovering:c,scrolling:E?u:l,orientation:i},O=Xu(),k=!w&&!a,A=E?d.y:d.x,j=a||!A;_.useEffect(()=>{if(!j)return;let e=m.current,t=E?f.current:p.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!E,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&O===`rtl`?-a:0,s=n&&O===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),b({x:e.scrollLeft,y:e.scrollTop}))}return jc(t,`wheel`,n,{passive:!1})},[O,b,E,p,f,j,m]);let M={...S&&{"data-id":`${S}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=is(e.nativeEvent),n=E?h.current:g.current;if(n&&Z(n,t))return;let r=m.current;if(!r)return;let i=E?f.current:p.current;if(!n||!i)return;let a=E?`y`:`x`,o=cy(n,`margin`,a),s=cy(i,`padding`,a),c=E?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=E?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=E?r.scrollHeight:r.scrollWidth,_=E?r.clientHeight:r.clientWidth,y=(E?i.offsetHeight:i.offsetWidth)-c-s-o;if(y<=0)return;let S=u/y,C=d-_;x(),E?r.scrollTop=S*C:r.scrollLeft=O===`rtl`?-(1-S)*C:S*C,b({x:r.scrollLeft,y:r.scrollTop}),v(e)},onMouseDown(e){e.preventDefault()},onPointerUp:y,onPointerCancel:y,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:k?`hidden`:void 0,...E?{top:0,bottom:`var(${_y})`,insetInlineEnd:0,[My]:`${C.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${vy})`,bottom:0,[Ny]:`${C.width}px`}}},N=di(`div`,e,{ref:[t,E?f:p],state:D,props:[M,s],stateAttributesMapping:gy});return j?(0,Y.jsx)(Vy.Provider,{value:i,children:N}):null});Uy.displayName=`ScrollAreaScrollbar`;var Wy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{computeThumbPosition:o}=Dy(),{hasMeasuredScrollbar:s,viewportState:c}=sy(),l=_.useRef(null),u=_.useRef(s);return X(()=>{if(typeof ResizeObserver>`u`)return;let e=!1,t=new ResizeObserver(()=>{!e&&(e=!0,!u.current)||o()});return l.current&&t.observe(l.current),()=>{t.disconnect()}},[o]),di(`div`,e,{ref:[t,l],state:c,stateAttributesMapping:gy,props:[{role:`presentation`,style:{minWidth:`fit-content`}},a]})});Wy.displayName=`ScrollAreaContent`;var Gy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:f,hasMeasuredScrollbar:p}=sy(),m=Hy(),h=m===`vertical`;return di(`div`,e,{ref:[t,h?o:s],state:{scrolling:h?f:d,orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:p?void 0:`hidden`,...h?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})});Gy.displayName=`ScrollAreaThumb`;var Ky={variant:`sidebar`,collapsible:`icon`,side:`left`},qy=`16.25rem`,Jy=`57px`,Yy=`cubic-bezier(0.77, 0, 0.175, 1)`,Xy=250,Zy=50,Qy=768,$y=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function eb(e,t,n,r=!0){let i=r&&n!==void 0,a=(0,_.useRef)(n),o=(0,_.useRef)(t),s=(0,_.useRef)(e),c=(0,_.useRef)(r),l=(0,_.useRef)(void 0),u=(0,_.useRef)(void 0);a.current=n,o.current=t;let d=(0,_.useCallback)(()=>{let e=l.current;e!==void 0&&(l.current=void 0,clearTimeout(u.current),a.current?.(e))},[]);return(0,_.useEffect)(()=>{let t=s.current!==e,n=c.current;if(s.current=e,c.current=r,!i)l.current=void 0,clearTimeout(u.current);else if(n&&t){if(l.current=e,o.current===0||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)d();else return u.current=setTimeout(d,o.current+Zy),()=>clearTimeout(u.current)}},[r,d,i,e]),d}function tb(e=Qy){let t=`(max-width: ${e-1}px)`,n=(0,_.useCallback)(e=>{let n=window.matchMedia(t);return n.addEventListener(`change`,e),()=>n.removeEventListener(`change`,e)},[t]),r=(0,_.useCallback)(()=>window.matchMedia(t).matches,[t]),i=(0,_.useCallback)(()=>!1,[]);return(0,_.useSyncExternalStore)(n,r,i)}var nb=(0,_.createContext)(null);function rb(){let e=(0,_.useContext)(nb);if(!e)throw Error(`useSidebar must be used within a Sidebar.Provider`);return e}var ib=256,ab=200,ob=480;function sb({defaultOpen:e=!0,open:t,onOpenChange:n,onOpenChangeComplete:r,variant:i=Ky.variant,side:a=Ky.side,collapsible:o=Ky.collapsible,resizable:s=!1,defaultWidth:c=ib,minWidth:l=ab,maxWidth:u=ob,onWidthChange:d,contained:f=!1,peekable:p=!1,animationDuration:m=Xy,mobileBreakpoint:h,children:g,className:v,style:y}){let b=tb(h),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(c),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!1),k=b&&t!==void 0?t:x,A=(0,_.useCallback)(e=>{S(e),b&&t!==void 0&&n?.(e)},[b,t,n]),j=(0,_.useCallback)(e=>{let t=Math.min(u,Math.max(l,e));w(t),d?.(t)},[l,u,d]),[M,N]=(0,_.useState)(e),P=t??M,F=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(P):e;n?.(t),N(t)},[n,P]),I=(0,_.useCallback)(()=>{b?A(!k):(O(!1),F(e=>!e))},[b,k,A,F]),L=(0,_.useCallback)(()=>{p&&!P&&!b&&O(!0)},[p,P,b]),R=(0,_.useCallback)(()=>{O(!1)},[]),z=D?`peeking`:P?`expanded`:`collapsed`,B=s?`${C}px`:qy,V=(0,_.useRef)(new Map),H=(0,_.useCallback)((e,t)=>{let n=V.current;t?n.set(e,t):n.delete(e)},[]),U=(0,_.useCallback)((e,t={})=>{let{align:n=`auto`,behavior:r=`auto`}=t,i=V.current.get(e);if(!i)return;let a=i.closest(`[data-sidebar="viewport"]`);if(!a)return;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect(),c=a.offsetHeight>0&&s.height>0?s.height/a.offsetHeight:1,l=(o.top-s.top)/c+a.scrollTop,u;if(n===`center`)u=l-(a.clientHeight-i.offsetHeight)/2;else if(n===`end`)u=l-(a.clientHeight-i.offsetHeight);else if(n===`auto`){let e=l+i.offsetHeight,t=a.scrollTop+a.clientHeight;if(l<a.scrollTop)u=l;else if(e>t)u=e-a.clientHeight;else return}else u=l;let d=Math.max(0,Math.min(u,a.scrollHeight-a.clientHeight)),f=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;a.scrollTo({top:d,behavior:f?`auto`:r})},[]),ee=(0,_.useCallback)((e,t={})=>{let n=V.current.get(e);if(!n)return;let r=n.closest(`[data-sidebar="viewport"]`);if(!r)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();i.top>=a.top&&i.bottom<=a.bottom||U(e,t)},[U]),te=(0,_.useMemo)(()=>({state:z,open:P,setOpen:F,openMobile:k,setOpenMobile:A,isMobile:b,toggleSidebar:I,variant:i,side:a,collapsible:o,width:C,resizable:s,minWidth:l,maxWidth:u,isResizing:T,setIsResizing:E,setWidth:j,isPeeking:D,peekable:p,startPeek:L,stopPeek:R,contained:f,animationDuration:m,registerItem:H,scrollToItem:U,scrollItemIntoView:ee}),[z,P,k,b,C,T,D]),W=eb(P,m,r,!b),ne=eb(k,m,r,b),re=b?ne:W,ie=b?`transform`:`width`,ae=(0,_.useCallback)(e=>{let t=e.target;t.closest(`[data-sidebar-wrapper]`)===e.currentTarget&&t.dataset.sidebar===`sidebar`&&e.propertyName===ie&&re()},[re,ie]);return(0,Y.jsx)(nb.Provider,{value:te,children:(0,Y.jsx)(`div`,{"data-sidebar-wrapper":``,"data-state":z,"data-side":a,onTransitionEnd:ae,style:{"--sidebar-width":B,"--sidebar-width-icon":Jy,"--sidebar-animation-duration":`${m}ms`,"--sidebar-easing":Yy,...y},className:J(`group/sidebar-wrapper relative isolate flex w-full [--sidebar-active-bg:var(--color-kumo-tint)] [--sidebar-bg:var(--color-kumo-base)]`,!f&&!b&&`min-h-svh`,`has-data-[variant=inset]:bg-kumo-recessed`,T&&`select-none`,v),children:g})})}sb.displayName=`Sidebar.Provider`;var cb=(0,_.forwardRef)(({className:e,contentClassName:t,children:n,fullScreenOnMobile:r=!1,...i},a)=>{let{state:o,open:s,isMobile:c,openMobile:l,setOpenMobile:u,side:d,variant:f,collapsible:p,isResizing:m,resizable:h,width:g,isPeeking:v,startPeek:y,stopPeek:b,contained:x}=rb(),S=(0,_.useCallback)(e=>{e&&(l?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[l]),C=(0,_.useCallback)(e=>{S(e),typeof a==`function`?a(e):a&&(a.current=e)},[a,S]),w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useRef)(!1),D=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(!c||!l)return;let e=e=>{e.key===`Escape`&&(E.current=!0,u(!1))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[c,l,u]),(0,_.useEffect)(()=>{c&&(l?(w.current=document.activeElement,E.current=!1,requestAnimationFrame(()=>{(T.current?.querySelector($y)??T.current)?.focus()})):E.current&&w.current instanceof HTMLElement&&(w.current.focus(),E.current=!1,w.current=null))},[c,l]);let O=(0,_.useCallback)(e=>{!e.currentTarget.contains(e.relatedTarget)&&!D.current&&b()},[b]),k=(0,_.useCallback)(()=>{D.current=!0,y()},[y]),A=(0,_.useCallback)(()=>{D.current=!1,b()},[b]);if(p===`none`)return(0,Y.jsx)(`aside`,{ref:a,"data-state":`expanded`,"data-side":d,"data-variant":f,"data-sidebar":`sidebar`,style:{width:`var(--sidebar-width)`,minWidth:`var(--sidebar-width)`,maxWidth:`var(--sidebar-width)`},className:J(`relative flex h-full shrink-0 grow-0 flex-col overflow-hidden bg-(--sidebar-bg) text-kumo-default`,f===`sidebar`&&(d===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`),f===`floating`&&`m-2 rounded-lg border border-kumo-line shadow-lg`,e),...i,children:n});if(c)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{"data-sidebar-backdrop":``,className:J(x?`absolute inset-0 z-40 bg-kumo-recessed`:`fixed inset-0 z-40 bg-kumo-recessed`,`transition-opacity duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,l&&!r?`opacity-80`:`pointer-events-none opacity-0`),onClick:()=>{E.current=!0,u(!1)},"aria-hidden":`true`}),(0,Y.jsx)(`nav`,{ref:e=>{C(e),T.current=e},tabIndex:-1,"aria-label":`Navigation`,"aria-hidden":!l,"data-state":l?`expanded`:`collapsed`,"data-side":d,"data-variant":f,"data-collapsible":p,"data-sidebar":`sidebar`,"data-mobile":`true`,className:J(`group/sidebar inset-y-0 z-50 flex flex-col overflow-hidden`,x?`absolute`:`fixed`,r?`w-full`:`w-(--sidebar-width)`,`bg-(--sidebar-bg) text-kumo-default`,!r&&`border-r border-kumo-line`,`transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,d===`left`&&`left-0`,d===`right`&&`right-0`,d===`left`&&(l?`translate-x-0`:`-translate-x-full`),d===`right`&&(l?`translate-x-0`:`translate-x-full`),e),...i,children:n})]});let j=p===`icon`?`var(--sidebar-width-icon)`:`0px`,M=h?`${g}px`:`var(--sidebar-width)`,N=s?M:j,P=s||v?M:j,F=f===`sidebar`?d===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`:f===`floating`?`border border-kumo-line`:``;return(0,Y.jsx)(`aside`,{ref:a,"data-state":o,"data-side":d,"data-variant":f,"data-collapsible":p,"data-sidebar":`sidebar`,style:{width:N},className:J(`group/sidebar relative h-full shrink-0 grow-0`,`overflow-visible`,`transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,m&&`transition-none!`,f===`floating`&&`m-2 rounded-lg shadow-lg`,e),...i,children:(0,Y.jsx)(Gd,{children:(()=>{let e=_.Children.toArray(n),r=e.filter(e=>_.isValidElement(e)&&e.type?.displayName===`Sidebar.Footer`),i=e.filter(e=>!_.isValidElement(e)||e.type?.displayName!==`Sidebar.Footer`);return(0,Y.jsxs)(`div`,{"data-sidebar":`content-container`,style:{width:P},className:J(`flex h-full flex-col`,`min-w-0 overflow-hidden whitespace-nowrap`,`bg-(--sidebar-bg) text-kumo-default`,F,`transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,m&&`transition-none!`,!s&&J(x?`absolute`:`fixed`,`inset-y-0 z-40`,d===`left`&&`left-0`,d===`right`&&`right-0`),s&&`relative`,t),children:[(0,Y.jsx)(`div`,{"data-sidebar":`peek-zone`,className:`flex min-h-0 flex-1 flex-col`,onMouseEnter:k,onMouseLeave:A,onFocus:y,onBlur:O,children:i}),r]})})()})})});cb.displayName=`Sidebar`;var lb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:J(`flex h-[58px] shrink-0 items-center gap-1 border-b border-kumo-line`,`overflow-hidden px-3`,e),...t}));lb.displayName=`Sidebar.Header`;var ub=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsxs)(wy,{ref:r,"data-sidebar":`content`,className:J(`relative min-w-0 flex-1 overflow-hidden`,e),...n,children:[(0,Y.jsx)(Ly,{tabIndex:-1,"data-sidebar":`viewport`,className:J(`h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5`,`transition-[padding] duration-(--sidebar-animation-duration)`,`overflow-x-hidden!`,`[mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,24px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]`),children:(0,Y.jsx)(Wy,{className:`flex min-w-0! flex-col`,children:t})}),(0,Y.jsx)(Uy,{orientation:`vertical`,className:J(`flex w-1.5 touch-none p-px select-none`,`opacity-0 transition-opacity duration-150`,`data-[hovering]:opacity-100 data-[scrolling]:opacity-100`,`group-data-[state=collapsed]/sidebar:hidden`),children:(0,Y.jsx)(Gy,{className:`flex-1 rounded-full bg-kumo-line`})})]}));ub.displayName=`Sidebar.Content`;var db=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:J(`flex h-12 shrink-0 items-center gap-4 overflow-hidden border-t border-kumo-line whitespace-nowrap`,`px-[11px] group-not-data-[state=collapsed]/sidebar:px-4`,`bg-(--sidebar-bg)`,`w-(--sidebar-width)`,`transition-[width,padding] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,`sticky bottom-0`,`bg-clip-padding group-data-[state=collapsed]/sidebar:w-(--sidebar-width-icon)`,`group-data-[state=collapsed]/sidebar:border-r group-data-[state=collapsed]/sidebar:border-kumo-line`,e),...t}));db.displayName=`Sidebar.Footer`;var fb=[[`w-28`,`w-40`,`w-24`],[`w-24`,`w-36`,`w-32`]],pb=(0,_.forwardRef)(({className:e,label:t=`Loading`,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`loading`,role:`status`,"aria-label":t,className:J(`flex min-h-0 w-full flex-1 flex-col gap-4 px-2 py-3`,e),...n,children:fb.map((e,t)=>(0,Y.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Y.jsx)(d_,{className:`mb-1 ml-2 h-2 w-16 rounded-full group-data-[state=collapsed]/sidebar:hidden`}),e.map((e,t)=>(0,Y.jsxs)(`div`,{className:`flex min-h-8.5 items-center gap-3 rounded-lg px-3 group-data-[state=collapsed]/sidebar:justify-center group-data-[state=collapsed]/sidebar:px-0`,children:[(0,Y.jsx)(d_,{className:`size-4.5 shrink-0 rounded-md`}),(0,Y.jsx)(d_,{className:J(`h-2.5 rounded-full group-data-[state=collapsed]/sidebar:hidden`,e)})]},t))]},t))}));pb.displayName=`Sidebar.Loading`;var mb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`group`,className:J(`flex min-w-0 flex-col gap-y-px`,e),...n,children:t}));mb.displayName=`Sidebar.Group`;var hb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`group-label`,className:J(`grid overflow-hidden`,`transition-[grid-template-rows,margin,border-color] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`group-data-[mobile=true]/sidebar:transition-none`,`my-3 grid-rows-[0fr] border-b border-kumo-line`,`[[data-sidebar=group]:first-child_&]:my-0 [[data-sidebar=group]:first-child_&]:border-transparent`,`group-not-data-[state=collapsed]/sidebar:my-0 group-not-data-[state=collapsed]/sidebar:grid-rows-[1fr] group-not-data-[state=collapsed]/sidebar:border-transparent`,`group-data-[mobile=true]/sidebar:my-0 group-data-[mobile=true]/sidebar:grid-rows-[1fr] group-data-[mobile=true]/sidebar:border-transparent`,e),...n,children:(0,Y.jsx)(`div`,{className:`min-h-0 min-w-0`,children:(0,Y.jsx)(`div`,{className:J(`mt-4 mb-2 truncate px-3 text-sm font-medium text-kumo-subtle`,`[[data-sidebar=group]:first-child_&]:mt-2`),children:t})})}));hb.displayName=`Sidebar.GroupLabel`;var gb=(0,_.createContext)(!1),_b=(0,_.createContext)(!1),vb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:J(`m-0 flex min-w-0 list-none flex-col items-stretch gap-y-px p-0`,e),...t}));vb.displayName=`Sidebar.Menu`;var yb=(0,_.forwardRef)(({className:e,children:t,itemId:n,...r},i)=>{let{registerItem:a}=rb(),o=(0,_.useCallback)(e=>{n&&a(n,e),typeof i==`function`?i(e):i&&(i.current=e)},[n,i,a]);return(0,Y.jsx)(gb.Provider,{value:!0,children:(0,Y.jsx)(`li`,{ref:o,"data-sidebar":`menu-item`,"data-sidebar-item-id":n,className:J(`relative group-data-[state=collapsed]/sidebar:overflow-hidden`,e),...r,children:t})})});yb.displayName=`Sidebar.MenuItem`;var bb=(0,_.forwardRef)(({className:e,icon:t,active:n=!1,size:r=`base`,href:i,target:a,tooltip:o,itemId:s,children:c,...l},u)=>{let{state:d,peekable:f,registerItem:p}=rb(),m=Or(),h=(0,_.useContext)(gb),g=(0,_.useCallback)(e=>{s&&!h&&p(s,e)},[s,h,p]),v=(0,_.useCallback)(e=>{s&&h&&p(s,e),typeof u==`function`?u(e):u&&(u.current=e)},[s,h,u,p]),y=t?_.isValidElement(t)?t:(0,Y.jsx)(t,{className:J(`shrink-0 opacity-40`,r===`base`?`size-4`:`size-3.5`)}):null,b=(0,Y.jsxs)(`div`,{className:J(`flex min-w-0 flex-1 items-center gap-3`,`translate-x-[-3px] group-not-data-[state=collapsed]/sidebar:translate-x-0`,`transition-transform duration-(--sidebar-animation-duration)`),children:[y,(0,Y.jsx)(`span`,{className:J(`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left`),children:_.Children.map(c,e=>typeof e==`string`||typeof e==`number`?(0,Y.jsx)(`span`,{className:`truncate`,children:e}):e)})]}),x=J(`group/menu-button relative flex w-full min-w-0 cursor-pointer items-center gap-2.5 rounded-lg outline-none`,`before:absolute before:inset-x-0 before:-inset-y-px`,r===`base`&&`min-h-8.5 px-3 py-0 text-sm font-medium`,r===`sm`&&`min-h-7 px-2 py-0 text-sm`,`text-kumo-default`,`transition-[color,box-shadow,outline] duration-(--sidebar-animation-duration)`,!n&&`hover:bg-(--sidebar-active-bg)`,n&&`bg-(--sidebar-active-bg)`,`has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-(--sidebar-active-bg)`,`focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong`,e),S,C=h?s:void 0;S=i?(0,Y.jsx)(m,{ref:v,...l,className:J(x,`no-underline!`),href:i,to:i,target:a,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-sidebar-item-id":C,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-button-link`,"data-size":r,children:b}):(0,Y.jsx)(`button`,{ref:v,type:`button`,className:x,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-sidebar-item-id":C,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-button`,"data-size":r,...l,children:b});let w=d===`collapsed`&&!f;return o&&(S=(0,Y.jsx)(Kd,{content:o,disabled:!w,side:`right`,render:S})),h?S:(0,Y.jsx)(`li`,{ref:g,"data-sidebar":`menu-item`,"data-sidebar-item-id":s,className:`relative group-data-[state=collapsed]/sidebar:overflow-hidden`,children:S})});bb.displayName=`Sidebar.MenuButton`;var xb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`span`,{ref:n,"data-sidebar":`menu-badge`,className:J(`inline-flex shrink-0 items-center rounded-full border border-dashed border-kumo-line`,`px-1.5 py-0.5 text-[11px]/none font-medium text-kumo-strong select-none`,`group-data-[state=collapsed]/sidebar:hidden`,e),...t}));xb.displayName=`Sidebar.MenuBadge`;var Sb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsxs)(`ul`,{ref:r,"data-sidebar":`menu-sub`,className:J(`relative m-0 flex min-w-0 list-none flex-col gap-y-px overflow-hidden p-0 pr-0 pl-7`,e),...n,children:[(0,Y.jsx)(`li`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-px left-[19px] z-10 block w-px bg-kumo-line`}),t]}));Sb.displayName=`Sidebar.MenuSub`;var Cb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(_b.Provider,{value:!0,children:(0,Y.jsx)(`li`,{ref:r,"data-sidebar":`menu-sub-item`,className:J(`relative`,e),...n,children:t})}));Cb.displayName=`Sidebar.MenuSubItem`;var wb=(0,_.forwardRef)(({className:e,active:t=!1,href:n,target:r,children:i,...a},o)=>{let s=Or(),c=(0,_.useContext)(_b),l=J(`group/menu-button relative flex min-h-8.5 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-3 py-0 text-sm font-medium outline-none`,`before:absolute before:inset-x-0 before:-inset-y-px`,`text-kumo-default transition-[color] duration-150`,!t&&`hover:bg-(--sidebar-active-bg)`,t&&`bg-(--sidebar-active-bg)`,`focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong`,e),u=(0,Y.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left`,children:_.Children.map(i,e=>typeof e==`string`||typeof e==`number`?(0,Y.jsx)(`span`,{className:`truncate`,children:e}):e)}),d;return d=n?(0,Y.jsx)(s,{ref:o,...a,className:J(l,`no-underline!`),href:n,to:n,target:r,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-sub-button-link`,children:u}):(0,Y.jsx)(`button`,{ref:o,type:`button`,className:l,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-sub-button`,...a,children:u}),c?d:(0,Y.jsx)(`li`,{"data-sidebar":`menu-sub-item`,className:`relative`,children:d})});wb.displayName=`Sidebar.MenuSubButton`;var Tb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`separator`,className:J(`my-3 px-2`,e),...t,children:(0,Y.jsx)(`div`,{className:`border-b border-kumo-line`})}));Tb.displayName=`Sidebar.Separator`;function Eb({className:e}){let{open:t}=rb();return(0,Y.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,focusable:`false`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,className:J(`shrink-0`,e),children:[(0,Y.jsx)(`path`,{d:`M21.25 6.72v10.56a2.97 2.97 0 0 1-2.97 2.97H5.72a2.97 2.97 0 0 1-2.97-2.97V6.72a2.97 2.97 0 0 1 2.97-2.97h12.56a2.97 2.97 0 0 1 2.97 2.97`}),(0,Y.jsx)(`path`,{d:`M6.25 7.25v9.5`,className:J(`transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,t?`translate-x-px`:`translate-x-[10.5px]`)})]})}Eb.displayName=`Sidebar.PanelIcon`;var Db=(0,_.forwardRef)(({className:e,children:t,onClick:n,...r},i)=>{let{open:a,toggleSidebar:o}=rb();return(0,Y.jsx)(`button`,{ref:i,type:`button`,"data-sidebar":`trigger`,"data-kumo-component":`Sidebar`,"data-kumo-part":`trigger`,"aria-expanded":a,"aria-label":a?`Collapse sidebar`:`Expand sidebar`,className:J(`flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-lg`,`text-kumo-subtle hover:bg-(--sidebar-active-bg) hover:text-kumo-default`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,e),onClick:e=>{n?.(e),o()},...r,children:t??(0,Y.jsx)(Eb,{})})});Db.displayName=`Sidebar.Trigger`;var Ob=(0,_.forwardRef)(({className:e,onClick:t,...n},r)=>{let{setOpenMobile:i}=rb();return(0,Y.jsx)(ep,{ref:r,variant:`ghost`,shape:`square`,size:`sm`,"data-sidebar":`close`,"data-kumo-component":`Sidebar`,"data-kumo-part":`close`,"aria-label":`Close navigation`,className:J(`shrink-0`,e),onClick:e=>{t?.(e),i(!1)},...n,children:(0,Y.jsx)(zf,{size:18})})});Ob.displayName=`Sidebar.Close`;var kb=(0,_.forwardRef)(({className:e,...t},n)=>{let{toggleSidebar:r}=rb();return(0,Y.jsx)(`button`,{ref:n,type:`button`,"data-sidebar":`rail`,"data-kumo-component":`Sidebar`,"data-kumo-part":`rail`,"aria-label":`Toggle sidebar`,tabIndex:-1,className:J(`absolute inset-y-0 z-1 hidden w-4 -translate-x-1/2 cursor-pointer transition-all`,`after:absolute after:inset-y-0 after:left-1/2 after:w-0.5`,`hover:after:bg-kumo-brand/20`,`group-data-[side=left]/sidebar-wrapper:right-0`,`group-data-[side=right]/sidebar-wrapper:left-0`,`sm:flex`,e),onClick:r,...t})});kb.displayName=`Sidebar.Rail`;var Ab=(0,_.forwardRef)(({className:e,...t},n)=>{let{side:r,resizable:i,setIsResizing:a,setWidth:o,setOpen:s,open:c,minWidth:l,width:u,maxWidth:d}=rb(),f=(0,_.useRef)(0),p=(0,_.useRef)(0),m=(0,_.useRef)(!1);return i?(0,Y.jsx)(`button`,{ref:n,type:`button`,"aria-label":`Resize sidebar`,tabIndex:0,"data-sidebar":`resize-handle`,className:J(`absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block`,`after:absolute after:inset-y-0 after:w-0.5`,`after:bg-transparent after:transition-colors`,`hover:after:bg-kumo-hairline focus-visible:after:bg-kumo-hairline active:after:bg-kumo-hairline`,`focus:outline-none`,r===`left`&&`right-0 after:right-0`,r===`right`&&`left-0 after:left-0`,e),onPointerDown:e=>{e.preventDefault(),a(!0),f.current=e.clientX,m.current=!c;let t=e.currentTarget.closest(`[data-sidebar-wrapper]`)?.querySelector(`[data-sidebar='sidebar']`);p.current=t?.getBoundingClientRect().width??0;let n=()=>{a(!1),document.removeEventListener(`pointermove`,i),document.removeEventListener(`pointerup`,u)},i=e=>{let t=r===`left`?e.clientX-f.current:f.current-e.clientX,n=p.current+t;m.current?n>=l&&(m.current=!1,s(!0),o(n)):n<l?(s(!1),m.current=!0):o(n)},u=()=>{n()};document.addEventListener(`pointermove`,i),document.addEventListener(`pointerup`,u)},onKeyDown:e=>{let t=r===`left`?`ArrowRight`:`ArrowLeft`,n=r===`left`?`ArrowLeft`:`ArrowRight`;if(e.key===t)e.preventDefault(),c?o(Math.min(u+10,d)):(s(!0),o(l));else if(e.key===n){e.preventDefault();let t=u-10;t<l?s(!1):o(t)}else e.key===`Home`?(e.preventDefault(),s(!1)):e.key===`End`&&(e.preventDefault(),s(!0),o(d))},...t}):null});Ab.displayName=`Sidebar.ResizeHandle`;var jb=(e,{isMobile:t,openMobile:n,state:r})=>e&&(t?n:r!==`collapsed`),Mb=(0,_.createContext)({contentId:``,isOpen:!0,isCollapsible:!1,autoScrollOnOpen:!1,toggle:()=>{},completeOpenChange:()=>{}}),Nb=(0,_.forwardRef)(({defaultOpen:e=!1,open:t,onOpenChange:n,onOpenChangeComplete:r,autoScrollOnOpen:i=!1,className:a,children:o,...s},c)=>{let l=rb(),{animationDuration:u}=l,[d,f]=(0,_.useState)(e),p=t??d,m=jb(p,l),h=(0,_.useId)(),g=(0,_.useRef)(!1),v=(0,_.useCallback)(()=>{let e=!p;f(e),n?.(e),g.current=!1},[p,n]),y=eb(m,u,r),b=(0,_.useMemo)(()=>({contentId:h,isOpen:p,isCollapsible:!0,autoScrollOnOpen:i,toggle:v,completeOpenChange:y}),[h,p,i,v,y]),x=(0,_.useCallback)(e=>{!p&&e.target.matches(`:focus-visible`)&&(g.current=!0,f(!0),n?.(!0))},[p,n]),S=(0,_.useCallback)(e=>{g.current&&!e.currentTarget.contains(e.relatedTarget)&&!e.currentTarget.querySelector(`[data-active]`)&&(g.current=!1,f(!1),n?.(!1))},[n]);return(0,Y.jsx)(Mb.Provider,{value:b,children:(0,Y.jsx)(`div`,{ref:c,"data-open":p||void 0,className:J(`min-w-0`,a),onFocus:x,onBlur:S,...s,children:o})})});Nb.displayName=`Sidebar.Collapsible`;function Pb({render:e}){let{contentId:t,isOpen:n,toggle:r}=(0,_.useContext)(Mb);return _.cloneElement(e,{"aria-expanded":n,"aria-controls":t,"data-open":n||void 0,onClick:t=>{let n=e.props.onClick;n?.(t),r()}})}Pb.displayName=`Sidebar.CollapsibleTrigger`;var Fb=(0,_.forwardRef)(({className:e,children:t,onTransitionEnd:n,...r},i)=>{let{contentId:a,isOpen:o,autoScrollOnOpen:s,completeOpenChange:c}=(0,_.useContext)(Mb),l=rb(),{animationDuration:u}=l,d=(0,_.useRef)(null),f=jb(o,l);(0,_.useEffect)(()=>{if(!f||!s)return;let e=window.setTimeout(()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;d.current?.scrollIntoView({block:`nearest`,behavior:e?`auto`:`smooth`})},u);return()=>window.clearTimeout(e)},[f,s,u]);let p=(0,_.useCallback)(e=>{e&&(f?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[f]),m=(0,_.useCallback)(e=>{d.current=e,p(e),typeof i==`function`?i(e):i&&(i.current=e)},[i,p]),h=(0,_.useCallback)(e=>{n?.(e),e.target===e.currentTarget&&e.propertyName===`grid-template-rows`&&c()},[c,n]);return(0,Y.jsx)(`div`,{ref:m,id:a,role:`region`,"aria-hidden":!f,onTransitionEnd:h,className:J(`grid`,`transition-[grid-template-rows] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,f?`grid-rows-[1fr]`:`grid-rows-[0fr]`,e),...r,children:(0,Y.jsx)(`div`,{className:`overflow-hidden`,children:t})})});Fb.displayName=`Sidebar.CollapsibleContent`;function Ib({className:e}){let{isOpen:t,isCollapsible:n}=(0,_.useContext)(Mb);return(0,Y.jsx)(Cf,{size:12,weight:`bold`,className:J(`ml-auto shrink-0 opacity-40 transition-[transform,rotate,opacity] duration-200 group-hover/menu-button:opacity-100`,n&&t&&`rotate-90`,`group-data-[state=collapsed]/sidebar:hidden`,e)})}Ib.displayName=`Sidebar.MenuChevron`;var Lb=(0,_.createContext)(``),Rb=(0,_.forwardRef)(({activeKey:e,direction:t=`left`,className:n,children:r,...i},a)=>{let o=_.Children.toArray(r).findIndex(t=>_.isValidElement(t)&&t.props.value===e),s=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,c=o>0?`-${o*100}%`:`0%`;return(0,Y.jsx)(Lb.Provider,{value:e,children:(0,Y.jsx)(`div`,{ref:a,"data-sidebar":`sliding-views`,className:J(`flex min-h-0 max-w-(--sidebar-width) flex-1 overflow-hidden`,n),...i,children:(0,Y.jsx)(`div`,{className:`flex min-h-0 w-full shrink-0`,style:{transform:`translateX(${c})`,transition:s?`none`:`transform var(--sidebar-animation-duration) var(--sidebar-easing)`},children:r})})})});Rb.displayName=`Sidebar.SlidingViews`;var zb=(0,_.forwardRef)(({value:e,className:t,children:n,...r},i)=>{let a=(0,_.useContext)(Lb)===e,o=(0,_.useCallback)(e=>{e&&(a?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[a]),s=(0,_.useCallback)(e=>{o(e),typeof i==`function`?i(e):i&&(i.current=e)},[i,o]);return(0,Y.jsx)(`div`,{ref:s,"data-sidebar":`sliding-view`,"data-value":e,"aria-hidden":!a,className:J(`flex min-h-0 w-full shrink-0 flex-col`,!a&&`pointer-events-none`,t),...r,children:n})});zb.displayName=`Sidebar.SlidingView`;var Bb=Object.assign(cb,{Provider:sb,Header:lb,Content:ub,Footer:db,Loading:pb,Group:mb,GroupLabel:hb,Menu:vb,MenuItem:yb,MenuButton:bb,MenuBadge:xb,MenuSub:Sb,MenuSubItem:Cb,MenuSubButton:wb,Separator:Tb,Trigger:Db,Close:Ob,Rail:kb,ResizeHandle:Ab,MenuChevron:Ib,Collapsible:Nb,CollapsibleTrigger:Pb,CollapsibleContent:Fb,SlidingViews:Rb,SlidingView:zb}),Vb=g();function Hb(e){return e?.agent.name??e?.agent.id??e?.agent.kind??`adapter`}var Ub=J(`text-[13px] [&_td]:px-3 [&_td]:py-1.5 [&_tbody_tr]:border-t [&_tbody_tr]:border-kumo-hairline`,`[&_th]:px-3 [&_th]:py-1.5 [&_th]:text-xs [&_th]:font-medium [&_th]:whitespace-nowrap [&_th]:text-kumo-subtle`),Wb=`[&_td]:whitespace-nowrap`;function Gb({children:e,className:t}){return(0,Y.jsx)(s_,{className:J(`data-table overflow-x-auto p-0`,t),children:(0,Y.jsx)($,{className:J(Ub,Wb),children:e})})}function Kb({children:e,wrap:t=!1}){return(0,Y.jsx)(`div`,{className:`nested overflow-x-auto rounded-md border border-kumo-hairline bg-kumo-base`,children:(0,Y.jsx)($,{className:J(Ub,!t&&Wb),children:e})})}function qb({colSpan:e,children:t}){return(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:e,className:`text-kumo-subtle`,children:t})})}var Jb=`table-link cursor-pointer text-left font-medium text-kumo-link hover:underline focus-visible:outline-2 focus-visible:outline-kumo-brand rounded-sm`,Yb=`font-mono text-xs`;function Xb({entries:e}){let t=e[0];return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:Yb,children:t.agent.id??`—`}),(0,Y.jsx)($.Cell,{className:`font-medium`,children:Hb(t)}),(0,Y.jsx)($.Cell,{children:t.agent.kind}),(0,Y.jsx)($.Cell,{children:t.agent.runtimes.map(e=>`${e.name} (${e.kind})`).join(`, `)||`adapter default`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.length})]})}function Zb({message:e,description:t}){return(0,Y.jsx)(ay,{size:`sm`,title:e,description:t,className:`py-12`})}function Qb({catalog:e}){let t=(0,_.useMemo)(()=>{let t=new Map;for(let n of e){let e=n.agent.id??Hb(n);t.set(e,[...t.get(e)??[],n])}return[...t.values()]},[e]);return t.length?(0,Y.jsxs)(Gb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`ID`}),(0,Y.jsx)($.Head,{children:`Agent`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Runtimes`}),(0,Y.jsx)($.Head,{children:`Evals`})]})}),(0,Y.jsx)($.Body,{children:t.map(e=>(0,Y.jsx)(Xb,{entries:e},e[0].agent.id??Hb(e[0])))})]}):(0,Y.jsx)(Zb,{message:`No agents are registered.`})}function $b({items:e}){return(0,Y.jsx)(`dl`,{className:`grid grid-cols-[max-content_minmax(0,1fr)] gap-x-4 gap-y-1 text-[13px]`,children:e.map(([e,t])=>(0,Y.jsxs)(`div`,{className:`contents`,children:[(0,Y.jsx)(`dt`,{className:`text-kumo-subtle`,children:e}),(0,Y.jsx)(`dd`,{className:`min-w-0 break-words text-kumo-default`,children:t})]},e))})}function ex({catalog:e,path:t}){let n=e.find(e=>e.path===t);return n?(0,Y.jsxs)(s_,{className:`flex max-w-3xl flex-col gap-3 p-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h2`,{className:`text-base font-semibold text-kumo-strong`,children:n.name??n.id}),(0,Y.jsx)(`p`,{className:`${Yb} text-kumo-subtle`,children:n.path})]}),(0,Y.jsx)($b,{items:[[`Agent`,Hb(n)],[`Runtimes`,n.agent.runtimes.map(e=>`${e.name} (${e.kind})`).join(`, `)||`default`],[`Trials`,n.trialCount],[`Scorers`,n.scorers.map(e=>`${e.name} (${e.kind})`).join(`, `)||`none`],[`Fixtures`,n.fixtures.map(e=>e.source).join(`, `)||`none`]]})]}):(0,Y.jsx)(Zb,{message:`Eval not found: ${t}`})}function tx({fixture:e}){return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:Yb,children:e.source}),(0,Y.jsx)($.Cell,{className:Yb,children:e.destination??`—`}),(0,Y.jsx)($.Cell,{children:e.visibility??`dynamic`}),(0,Y.jsx)($.Cell,{className:Yb,children:e.path})]})}function nx({catalog:e}){let t=e.flatMap(e=>e.fixtures.map(t=>({...t,path:e.path})));return t.length?(0,Y.jsxs)(Gb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Source`}),(0,Y.jsx)($.Head,{children:`Destination`}),(0,Y.jsx)($.Head,{children:`Visibility`}),(0,Y.jsx)($.Head,{children:`Used by`})]})}),(0,Y.jsx)($.Body,{children:t.map((e,t)=>(0,Y.jsx)(tx,{fixture:e},`${e.path}-${t}`))})]}):(0,Y.jsx)(Zb,{message:`No fixtures are registered.`})}function rx({label:e,noun:t,page:n,pageSize:r,total:i,onPage:a}){if(i<=r)return null;let o=n*r+1,s=Math.min((n+1)*r,i);return(0,Y.jsx)(`nav`,{className:`pager flex items-center justify-end`,"aria-label":e,children:(0,Y.jsxs)(jv,{page:n+1,setPage:e=>a(e-1),perPage:r,totalCount:i,children:[(0,Y.jsx)(jv.Info,{children:()=>(0,Y.jsxs)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:[t,` `,o,`–`,s,` of `,i]})}),(0,Y.jsx)(jv.Controls,{})]})})}function ix({facets:e,search:t,onToggleFacet:n,onField:r,onClear:i}){let[a,o]=(0,_.useState)(()=>typeof window>`u`||window.matchMedia(`(min-width: 901px)`).matches);return(0,Y.jsxs)(`details`,{className:`runs-filter-panel group shrink-0 rounded-lg border border-kumo-line bg-kumo-base lg:w-56`,open:a,onToggle:e=>o(e.currentTarget.open),children:[(0,Y.jsxs)(`summary`,{className:`flex cursor-pointer items-center gap-2 px-3 py-2 text-[13px] font-semibold text-kumo-strong select-none`,children:[(0,Y.jsx)(Mf,{"aria-hidden":!0,className:`size-3.5 text-kumo-subtle`}),`Filters`,t.size?` (${t.size} active)`:``]}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-kumo-hairline px-3 py-3`,children:[e.map(e=>(0,Y.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsx)(`legend`,{className:`mb-1 text-xs font-medium text-kumo-subtle`,children:e.label}),e.values.map(r=>(0,Y.jsx)(Pm,{className:`runs-choice`,checked:t.getAll(e.key).includes(r.key),onCheckedChange:()=>n(e.key,r.key),label:(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline justify-between gap-2 text-[13px]`,children:[(0,Y.jsx)(`span`,{className:`truncate`,children:r.label}),(0,Y.jsx)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:r.count})]})},r.key))]},e.key)),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(Ym,{type:`date`,size:`sm`,label:`From`,value:t.get(`from`)??``,onChange:e=>r(`from`,e.target.value)}),(0,Y.jsx)(Ym,{type:`date`,size:`sm`,label:`To`,value:t.get(`to`)??``,onChange:e=>r(`to`,e.target.value)})]}),(0,Y.jsx)(ep,{size:`xs`,variant:`secondary`,className:`clear-filters self-start`,disabled:!t.size,onClick:i,children:`Clear filters`})]})]})}function ax({label:e,placeholder:t,value:n,count:r,onChange:i}){return(0,Y.jsxs)(`div`,{className:`search-field flex min-w-0 flex-wrap items-center gap-3`,children:[(0,Y.jsx)(Ym,{type:`search`,size:`sm`,"aria-label":e,placeholder:t,value:n,className:`w-full sm:w-80`,onChange:e=>i(e.target.value)}),(0,Y.jsx)(`span`,{className:`search-count text-xs text-kumo-subtle tabular-nums`,children:r})]})}function ox(e,t){let[n,r]=(0,_.useState)(e);return{sort:n,toggleSort:e=>{r(t=>t.key===e?{key:e,direction:t.direction===`asc`?`desc`:`asc`}:{key:e,direction:`asc`}),t?.()}}}function sx({label:e,sortKey:t,sort:n,onSort:r,sticky:i}){let a=n.key===t,o=a?n.direction===`asc`?`ascending`:`descending`:void 0,s=a?n.direction===`asc`?wf:xf:Tf;return(0,Y.jsx)($.Head,{"aria-sort":o,sticky:i,children:(0,Y.jsxs)(`button`,{type:`button`,className:`table-sort inline-flex items-center gap-1 whitespace-nowrap rounded font-medium hover:text-kumo-strong focus-visible:outline-2 focus-visible:outline-kumo-brand`,onClick:()=>r(t),children:[e,(0,Y.jsx)(s,{"aria-hidden":!0,className:a?`size-3`:`size-3 text-kumo-inactive`})]})})}function cx(e,t,n){return(0,_.useMemo)(()=>{let r=[...e];return r.sort((e,r)=>{let i=n(e,t.key),a=n(r,t.key),o=typeof i==`number`&&typeof a==`number`?i-a:String(i??``).localeCompare(String(a??``),void 0,{numeric:!0,sensitivity:`base`});return t.direction===`asc`?o:-o}),r},[e,t,n])}var lx={passed:`success`,failed:`error`,errored:`warning`,error:`warning`};function ux({status:e}){return(0,Y.jsx)(`span`,{className:`inline-flex`,"data-status":e,children:(0,Y.jsx)(Tr,{appearance:`dot`,variant:lx[e]??`neutral`,children:e})})}function dx({run:e,trials:t,onTrial:n}){let{sort:r,toggleSort:i}=ox({key:`index`,direction:`asc`}),a=(0,_.useMemo)(()=>[...new Set(t.flatMap(e=>(e.scores??[]).map(e=>e.name)))].sort(),[t]),o=cx(t,r,(e,t)=>t.startsWith(`score:`)?(e.scores??[]).find(e=>e.name===t.slice(6))?.value:{index:e.index,status:e.status,aggregate:e.score,runtime:e.durationMs,started:e.startedAt}[t]);return(0,Y.jsxs)(Kb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)(sx,{label:`Trial`,sortKey:`index`,sort:r,onSort:i}),(0,Y.jsx)(sx,{label:`Status`,sortKey:`status`,sort:r,onSort:i}),(0,Y.jsx)(sx,{label:`Aggregate`,sortKey:`aggregate`,sort:r,onSort:i}),a.map(e=>(0,Y.jsx)(sx,{label:e,sortKey:`score:${e}`,sort:r,onSort:i},e)),(0,Y.jsx)(sx,{label:`Runtime`,sortKey:`runtime`,sort:r,onSort:i}),(0,Y.jsx)(sx,{label:`Started`,sortKey:`started`,sort:r,onSort:i}),(0,Y.jsx)($.Head,{className:`text-right`,children:`Details`})]})}),(0,Y.jsxs)($.Body,{children:[o.map(t=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.index+1}),(0,Y.jsx)($.Cell,{children:(0,Y.jsx)(ux,{status:t.status})}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.score??`—`}),a.map(e=>(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:(t.scores??[]).find(t=>t.name===e)?.value??`—`},e)),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.durationMs===void 0?`—`:`${t.durationMs}ms`}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:new Date(t.startedAt).toLocaleString()}),(0,Y.jsx)($.Cell,{className:`text-right`,children:(0,Y.jsxs)(ep,{size:`xs`,variant:`secondary`,className:`view-trial`,onClick:()=>n(e,t),children:[`View trial`,(0,Y.jsx)(vf,{"aria-hidden":!0,className:`size-3`})]})})]},t.id)),o.length?null:(0,Y.jsx)(qb,{colSpan:a.length+6,children:`No trials saved yet.`})]})]})}function fx(e){if(e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e))return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(fx).join(`,`)}]`;if(typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype)return`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${fx(e[t])}`).join(`,`)}}`;throw Error(`Matrix parameters must be finite JSON values`)}var px=`@missing`,mx=e=>`p.${e}`;function hx(e,t,n){let r=e.get(t);r?r.count++:e.set(t,{key:t,label:n,count:1})}function gx(e){return[{key:`eval`,label:`Eval`},{key:`matrix`,label:`Matrix`},{key:`status`,label:`Status`},...[...new Set(e.flatMap(e=>Object.keys(e.parameters??{})))].sort().map(e=>({key:mx(e),label:e}))].map(({key:t,label:n})=>{let r=new Map;for(let n of e){let e=t===`eval`?n.evalId:t===`matrix`?n.matrixId:t===`status`?n.status:n.parameters?.[t.slice(2)],i=t===`eval`||t===`status`||(t===`matrix`?n.matrixId!==void 0:Object.hasOwn(n.parameters??{},t.slice(2)));hx(r,i?fx(e):px,i?String(typeof e==`string`?e:JSON.stringify(e)):`Missing`)}return{key:t,label:n,values:[...r.values()].sort((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0}))}})}function _x(e,t){let n=[...t.keys()].filter(e=>[`eval`,`matrix`,`status`].includes(e)||e.startsWith(`p.`)),r=t.get(`from`),i=t.get(`to`);return e.filter(e=>r&&e.startedAt.slice(0,10)<r||i&&e.startedAt.slice(0,10)>i?!1:n.every(n=>{let r=t.getAll(n),i=n===`eval`||n===`status`||(n===`matrix`?e.matrixId!==void 0:Object.hasOwn(e.parameters??{},n.slice(2))),a=n===`eval`?e.evalId:n===`matrix`?e.matrixId:n===`status`?e.status:e.parameters?.[n.slice(2)],o=i?fx(a):px;return r.includes(o)}))}function vx(e,t){let[n,r]=(0,_.useState)(()=>new URLSearchParams),i=e??n,a=t??r,o=i.get(`q`)??``,[s,c]=(0,_.useState)(o);return(0,_.useEffect)(()=>c(o),[o]),(0,_.useEffect)(()=>{if(s===o)return;let e=setTimeout(()=>{let e=new URLSearchParams(i);s?e.set(`q`,s):e.delete(`q`),a(e)},250);return()=>clearTimeout(e)},[s,o,i,a]),{activeSearch:i,query:s,setQuery:c,setField:(e,t)=>{let n=new URLSearchParams(i);t?n.set(e,t):n.delete(e),a(n)},toggleFacet:(e,t)=>{let n=new URLSearchParams(i),r=n.getAll(e);n.delete(e);for(let i of r.filter(e=>e!==t))n.append(e,i);r.includes(t)||n.append(e,t),a(n)},clearFilters:()=>a(new URLSearchParams)}}function yx(e,t,n){let[r,i]=(0,_.useState)({});return(0,_.useEffect)(()=>{if(!n||!t.some(e=>e.id===n))return;let r=!0;return e.listTrials(n).then(e=>{r&&i(t=>({...t,[n]:e}))}),()=>{r=!1}},[e,t,n]),{trials:r,loadTrials:t=>{r[t]||e.listTrials(t).then(e=>i(n=>({...n,[t]:e})))}}}var bx=50,xx=9;function Sx(e){return typeof e==`string`?e:JSON.stringify(e)??String(e)}function Cx(e){return[...new Set(e.flatMap(e=>Object.keys(e.parameters??{})))].sort()}function wx(e,t,n,r){let i=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return i.length?e.filter(e=>{let t=r.find(t=>t.id===e.evalId),a=n.find(t=>t.id===e.suiteId),o=Object.entries(e.parameters??{}).flatMap(([e,t])=>[e,Sx(t)]),s=[e.id,e.evalId,t?.name,e.suiteId,a?.name,e.matrixId,t?.agent.name,t?.agent.kind,e.status,e.score,e.startedAt,...o].map(Sx).join(` `).toLowerCase();return i.every(e=>s.includes(e))}):[...e]}function Tx({api:e,runs:t,suites:n,catalog:r,onTrial:i,onOpenRun:a,selectedRunId:o,search:s,onSearchChange:c}){let{activeSearch:l,query:u,setQuery:d,setField:f,toggleFacet:p,clearFilters:m}=vx(s,c),{trials:h,loadTrials:g}=yx(e,t,o),v=(0,_.useMemo)(()=>gx(t),[t]),y=(0,_.useMemo)(()=>Cx(t),[t]),b=wx(_x(t,l),u,n,r),[x,S]=(0,_.useState)(0),{sort:C,toggleSort:w}=ox({key:`started`,direction:`desc`},()=>S(0)),T=e=>r.find(t=>t.id===e.evalId),E=e=>n.find(t=>t.id===e.suiteId)?.name,D=cx(b,C,(e,t)=>Ex(e,t,T(e),E(e))),O=Math.max(1,Math.ceil(D.length/bx)),k=Math.min(x,O-1),A=D.slice(k*bx,(k+1)*bx),j=xx+y.length,M=e=>{a(e),g(e.id)},N=(e,t,n)=>(0,Y.jsx)(sx,{label:e,sortKey:t,sort:C,onSort:w,sticky:n});return t.length?(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start`,children:[(0,Y.jsx)(ix,{facets:v,search:l,onToggleFacet:p,onField:f,onClear:m}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Y.jsx)(ax,{label:`Filter runs`,placeholder:`Eval, parameter, agent or status`,value:u,count:`${D.length} of ${t.length} runs`,onChange:d}),(0,Y.jsxs)(Gb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[N(`Run`,`run`,`left`),N(`Status`,`status`),N(`Eval`,`eval`),y.map(e=>(0,Y.jsx)(sx,{label:e,sortKey:`param:${e}`,sort:C,onSort:w},e)),N(`Agent`,`agent`),N(`Trials`,`trials`),N(`Score`,`score`),N(`Runtime`,`runtime`),N(`Started`,`started`),N(`Suite`,`suite`)]})}),(0,Y.jsxs)($.Body,{children:[A.map(e=>{let t=o===e.id;return(0,Y.jsxs)(_.Fragment,{children:[(0,Y.jsx)(Dx,{run:e,evaluation:T(e),suiteName:E(e),parameterColumns:y,expanded:t,onToggle:()=>M(e)}),t?(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:j,className:`bg-kumo-elevated`,children:(0,Y.jsx)(dx,{run:e,trials:h[e.id]??[],onTrial:i})})}):null]},e.id)}),D.length?null:(0,Y.jsx)(qb,{colSpan:j,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[`No matching runs.`,(0,Y.jsx)(ep,{size:`xs`,variant:`ghost`,onClick:m,children:`Clear filters`})]})})]})]}),(0,Y.jsx)(rx,{label:`Run pages`,noun:`Runs`,page:k,pageSize:bx,total:D.length,onPage:S})]})]}):(0,Y.jsx)(Zb,{message:`No runs yet. Select an eval or suite to start one.`})}function Ex(e,t,n,r){if(t.startsWith(`param:`)){let n=e.parameters?.[t.slice(6)];return n===void 0?void 0:typeof n==`number`?n:Sx(n)}return{run:e.id,suite:r??e.suiteId,eval:n?.name??e.evalId,agent:n?.agent.name??n?.agent.kind??`Unnamed agent`,status:e.status,trials:e.completedTrials,score:e.score,runtime:e.durationMs,started:e.startedAt}[t]}function Dx({run:e,evaluation:t,suiteName:n,parameterColumns:r,expanded:i,onToggle:a}){return(0,Y.jsxs)($.Row,{variant:i?`selected`:`default`,children:[(0,Y.jsx)($.Cell,{sticky:`left`,children:(0,Y.jsx)(`button`,{type:`button`,className:`${Jb} ${Yb}`,"aria-expanded":i,title:e.id,onClick:a,children:e.id.slice(0,8)})}),(0,Y.jsx)($.Cell,{children:(0,Y.jsx)(ux,{status:e.status})}),(0,Y.jsx)($.Cell,{className:`font-medium`,children:t?.name??e.evalId}),r.map(t=>(0,Y.jsx)($.Cell,{className:Yb,children:Object.hasOwn(e.parameters??{},t)?Sx(e.parameters?.[t]):`—`},t)),(0,Y.jsx)($.Cell,{children:t?.agent.name??t?.agent.kind??`Unnamed agent`}),(0,Y.jsxs)($.Cell,{className:`tabular-nums`,children:[e.completedTrials,`/`,e.requestedTrials]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.score??`—`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.durationMs===void 0?`—`:`${e.durationMs}ms`}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:new Date(e.startedAt).toLocaleString()}),(0,Y.jsx)($.Cell,{children:n??`—`})]})}function Ox({message:e,title:t}){return(0,Y.jsx)(fp,{variant:`error`,size:`sm`,role:`alert`,title:t,description:e})}function kx({id:e,evaluation:t,parameters:n=[],trials:r,onRun:i,runDisabled:a=!1,onOpen:o,status:s}){let c=t?.name??e,l=t?.path??e;return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{children:(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[o?(0,Y.jsx)(`button`,{type:`button`,className:Jb,onClick:o,children:c}):(0,Y.jsx)(`span`,{className:`font-medium`,children:c}),l===c?null:(0,Y.jsx)(`span`,{className:`${Yb} text-kumo-subtle`,children:l})]})}),n.map((e,t)=>(0,Y.jsx)($.Cell,{className:Yb,children:typeof e==`string`?e:JSON.stringify(e)},t)),(0,Y.jsx)($.Cell,{children:Hb(t)}),(0,Y.jsx)($.Cell,{children:t?.agent.runtimes.map(e=>e.name).join(`, `)||`default`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:r??t?.trialCount??`—`}),(0,Y.jsx)($.Cell,{children:s?(0,Y.jsx)(ux,{status:s}):`—`}),(0,Y.jsx)($.Cell,{className:`text-right`,children:i||a?(0,Y.jsx)(ep,{size:`xs`,variant:`secondary`,icon:(0,Y.jsx)(If,{weight:`fill`}),disabled:a,title:a?`Matrix configuration is still loading`:void 0,onClick:e=>{e.stopPropagation(),i?.()},children:`Run eval`}):null})]})}function Ax({nested:e,children:t}){return e?(0,Y.jsx)(Kb,{children:t}):(0,Y.jsx)(Gb,{children:t})}function jx({axes:e,sort:t,onSort:n,planned:r=!1}){let i=(e,r)=>(0,Y.jsx)(sx,{label:e,sortKey:r,sort:t,onSort:n});return(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[i(`Eval`,`eval`),e.map(e=>(0,Y.jsx)(sx,{label:e,sortKey:`axis:${e}`,sort:t,onSort:n},e)),i(`Agent`,`agent`),r?(0,Y.jsx)($.Head,{children:`Runtime`}):i(`Runtime`,`runtime`),i(`Trials`,`trials`),r?(0,Y.jsx)($.Head,{children:`Latest run`}):i(`Latest run`,`status`),(0,Y.jsx)($.Head,{className:`text-right`,children:`Actions`})]})})}var Mx=50;function Nx({api:e,evalIds:t,catalog:n,matrix:r,runs:i,nested:a=!1,onRun:o,onOpenEval:s}){let[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(0),{sort:f,toggleSort:p}=ox({key:`eval`,direction:`asc`},()=>d(0)),[m,h]=(0,_.useState)(),[g,v]=(0,_.useState)(),y=r.dimensions??Object.keys(r.parameters),b=t.join(`,`);(0,_.useEffect)(()=>{let t=!0;return v(void 0),h(void 0),e.listMatrixCells({evalIds:b.split(`,`).filter(Boolean),query:c,offset:u*Mx,sort:f.key,direction:f.direction}).then(e=>{t&&h(e)}).catch(e=>{t&&v(e instanceof Error?e.message:`Unable to list matrix cells`)}),()=>{t=!1}},[e,b,c,u,f]);let x=new Map(n.map(e=>[e.id,e])),S=e=>i.filter(t=>t.matrixId===r.id&&t.cellKey===e).sort((e,t)=>t.startedAt.localeCompare(e.startedAt))[0]?.status,C=y.length+6;return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(ax,{label:`Filter matrix cells`,placeholder:`Eval, parameter or agent`,value:c,count:`${m?.total??0} of ${m?.planned??0} eligible cells`,onChange:e=>{l(e),d(0)}}),g?(0,Y.jsx)(Ox,{message:g}):null,(0,Y.jsxs)(Ax,{nested:a,children:[(0,Y.jsx)(jx,{axes:y,sort:f,onSort:p,planned:!0}),(0,Y.jsxs)($.Body,{children:[m?.cells.map(e=>{let t=x.get(e.evalId);return(0,Y.jsx)(kx,{id:e.evalId,evaluation:t,parameters:y.map(t=>e.parameters[t]===null?`None`:e.parameters[t]),trials:r.trials,status:S(e.key),onRun:t?()=>o(t.path,Object.fromEntries(y.map(t=>[t,e.parameters[t]]))):void 0,onOpen:t?()=>s(t):void 0},e.key)}),!m&&!g?(0,Y.jsx)(qb,{colSpan:C,children:`Loading cells…`}):null,m&&!m.cells.length?(0,Y.jsx)(qb,{colSpan:C,children:`No matching cells.`}):null]})]}),(0,Y.jsx)(rx,{label:`Matrix cells pages`,noun:`Cells`,page:u,pageSize:Mx,total:m?.total??0,onPage:d})]})}var Px=50;function Fx(e,t,n,r){let i=t.reduce((e,[,t])=>e*t.length,1),a=e.length*i;if(!Number.isSafeInteger(a))throw Error(`Matrix exceeds safe cell count`);let o=[];for(let s=n;s<Math.min(n+r,a);s++){let n=e[Math.floor(s/i)],r=s%i,a={},c=Array(t.length);for(let e=t.length-1;e>=0;e--){let[n,i]=t[e],o=i[r%i.length];a[n]=o,c[e]=o,r=Math.floor(r/i.length)}o.push({id:n,parameters:a,values:c})}return{rows:o,total:a}}function Ix(e,t,n){return JSON.stringify([e,t.map(([e])=>n[e])])}function Lx(e){return typeof e==`string`?e:JSON.stringify(e)??String(e)}function Rx(e,t,n){let r=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return r.length?e.filter(e=>{let t=n(e).map(Lx).join(` `).toLowerCase();return r.every(e=>t.includes(e))}):[...e]}function zx(e){let t=e.matrix?e.evalIds.length*Object.values(e.matrix.parameters).reduce((e,t)=>e*t.length,1):0;return e.matrix&&(e.matrix.constrained||t>1e3)?(0,Y.jsx)(Nx,{...e,matrix:e.matrix}):(0,Y.jsx)(Bx,{...e})}function Bx({evalIds:e,catalog:t,matrix:n,runs:r,nested:i=!1,onRun:a,onOpenEval:o}){let[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(``),{sort:d,toggleSort:f}=ox({key:`eval`,direction:`asc`},()=>c(0)),p=n?Object.entries(n.parameters):[],m=new Map(t.map(e=>[e.id,e])),h=new Map;for(let e of r){if(n&&(e.matrixId!==n.id||!e.parameters))continue;let t=n?Ix(e.evalId,p,e.parameters):e.evalId,r=h.get(t);(!r||r.startedAt<=e.startedAt)&&h.set(t,e)}let g=e=>m.get(e.id),v=e=>h.get(n?Ix(e.id,p,e.parameters):e.id)?.status,{total:y}=Fx(e,p,0,0),b=cx(Rx(Fx(e,p,0,y).rows,l,e=>{let t=g(e);return[t?.name??e.id,e.id,t?.path??e.id,...e.values,Hb(t),t?.agent.runtimes.map(e=>e.name).join(`, `)??`default`,v(e)??`not run`]}),d,(e,t)=>{let r=g(e);return t.startsWith(`axis:`)?Lx(e.parameters[t.slice(5)]):t===`eval`?r?.name??e.id:t===`agent`?Hb(r):t===`runtime`?r?.agent.runtimes.map(e=>e.name).join(`, `)??`default`:t===`trials`?n?.trials??r?.trialCount??0:t===`status`?v(e)??`not run`:``}),x=Math.max(1,Math.ceil(b.length/Px)),S=Math.min(s,x-1),C=b.slice(S*Px,(S+1)*Px);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(ax,{label:`Filter matrix cells`,placeholder:`Eval, parameter, agent or status`,value:l,count:`${b.length} of ${y} cells`,onChange:e=>{u(e),c(0)}}),(0,Y.jsxs)(Ax,{nested:i,children:[(0,Y.jsx)(jx,{axes:p.map(([e])=>e),sort:d,onSort:f}),(0,Y.jsx)($.Body,{children:C.length?C.map(e=>{let t=g(e);return(0,Y.jsx)(kx,{id:e.id,evaluation:t,parameters:e.values,trials:n?.trials,status:v(e),onRun:t&&n!==void 0?()=>a(t.path,n?e.parameters:void 0):void 0,runDisabled:!!t&&n===void 0,onOpen:t?()=>o(t):void 0},Ix(e.id,p,e.parameters))}):(0,Y.jsx)(qb,{colSpan:p.length+6,children:`No matching cells.`})})]}),(0,Y.jsx)(rx,{label:`Matrix cells pages`,noun:`Cells`,page:S,pageSize:Px,total:b.length,onPage:c})]})}function Vx({suite:e,expanded:t,onToggle:n,onRun:r}){return(0,Y.jsxs)($.Row,{variant:t?`selected`:`default`,children:[(0,Y.jsx)($.Cell,{children:(0,Y.jsxs)(`button`,{type:`button`,className:`${Jb} inline-flex items-center gap-1.5`,"aria-expanded":t,onClick:n,children:[(0,Y.jsx)(Cf,{"aria-hidden":!0,className:`size-3 transition-transform ${t?`rotate-90`:``}`}),e.name??e.id??`Unnamed suite`]})}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.evalIds.length}),(0,Y.jsx)($.Cell,{className:`text-right`,children:(0,Y.jsx)(ep,{size:`xs`,variant:`secondary`,icon:(0,Y.jsx)(If,{weight:`fill`}),disabled:!r,title:r?void 0:`Run matrix cells individually from their rows`,onClick:e=>{e.stopPropagation(),r?.()},children:`Run suite`})})]})}function Hx({api:e,suites:t,catalog:n,matrix:r,runs:i=[],selectedSuiteId:a,onOpenSuite:o,onOpenEval:s}){let[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)(),f=e=>t=>d(t instanceof Error?t.message:e),p=(t,n)=>{d(void 0),e.runEval(t,n).catch(f(`Unable to start eval`))},m=t=>{d(void 0),e.runSuite(t).catch(f(`Unable to start suite`))},h=a??c,g=n.filter(e=>!e.suiteId&&!t.some(t=>t.evalIds.includes(e.id)));return!t.length&&!g.length?(0,Y.jsx)(Zb,{message:`No evals or suites are loaded.`}):(0,Y.jsxs)(Y.Fragment,{children:[r?(0,Y.jsx)(`p`,{className:`text-[13px] text-kumo-subtle`,children:`Each row is one configured matrix cell. Run one row at a time; use the CLI dry-run for larger selections.`}):null,u?(0,Y.jsx)(Ox,{message:u}):null,t.length>0?(0,Y.jsxs)(`section`,{"aria-label":`Suites`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-kumo-strong`,children:`Suites`}),(0,Y.jsxs)(Gb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Suite`}),(0,Y.jsx)($.Head,{children:`Evals`}),(0,Y.jsx)($.Head,{className:`text-right`,children:`Actions`})]})}),(0,Y.jsx)($.Body,{children:t.map(t=>(0,Y.jsxs)(_.Fragment,{children:[(0,Y.jsx)(Vx,{suite:t,expanded:h===t.id,onToggle:()=>{l(h===t.id?void 0:t.id),o(t.id)},onRun:r===null?()=>m(t.id):void 0}),h===t.id?(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:3,className:`bg-kumo-elevated`,children:(0,Y.jsx)(zx,{api:e,evalIds:t.evalIds,catalog:n,matrix:r,runs:i,nested:!0,onRun:p,onOpenEval:s})})}):null]},t.id))})]})]}):null,g.length>0?(0,Y.jsxs)(`section`,{"aria-label":`Standalone evals`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-kumo-strong`,children:`Standalone evals`}),(0,Y.jsx)(zx,{api:e,evalIds:g.map(e=>e.id),catalog:n,matrix:r,runs:i,onRun:p,onOpenEval:s})]}):null]})}function Ux({artifact:e}){return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`${Yb} break-all`,children:e.path}),(0,Y.jsx)($.Cell,{children:e.kind}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:e.size===void 0?`—`:`${e.size} B`})]})}function Wx(e){return e.kind===`message`&&e.role===`user`?`User message`:e.kind===`message`&&e.role===`assistant`?`Assistant message`:e.kind.includes(`scorer`)?`Scorer · ${e.kind.replace(`scorer-`,``)}`:e.kind.includes(`tool`)?`Tool · ${e.kind.replace(`tool-`,``)}`:e.kind.replaceAll(`-`,` `)}var Gx=`overflow-x-auto rounded-md bg-kumo-elevated px-3 py-2 font-mono text-xs whitespace-pre-wrap break-words text-kumo-default`;function Kx(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function qx({event:e,index:t}){let n=Object.entries(e).filter(([e])=>![`source`,`kind`,`timestamp`,`content`,`error`].includes(e));return(0,Y.jsxs)(`article`,{className:`event-card flex flex-col gap-2 rounded-lg border border-kumo-line bg-kumo-base px-3 py-2.5`,children:[(0,Y.jsxs)(`header`,{className:`flex items-baseline gap-2`,children:[(0,Y.jsxs)(`span`,{className:`font-mono text-xs text-kumo-subtle tabular-nums`,children:[`#`,t+1]}),(0,Y.jsx)(`h3`,{className:`text-[13px] font-semibold text-kumo-strong`,children:Wx(e)}),(0,Y.jsxs)(`span`,{className:`ml-auto text-xs text-kumo-subtle`,children:[e.source,` · `,new Date(e.timestamp).toLocaleTimeString()]})]}),`content`in e?(0,Y.jsx)(`pre`,{className:Gx,children:Kx(e.content)}):null,`error`in e?(0,Y.jsx)(`pre`,{className:`${Gx} text-kumo-danger`,children:Kx(e.error)}):null,n.length?(0,Y.jsx)(`dl`,{className:`grid grid-cols-[max-content_minmax(0,1fr)] gap-x-3 gap-y-0.5 text-xs`,children:n.map(([e,t])=>(0,Y.jsxs)(`div`,{className:`contents`,children:[(0,Y.jsx)(`dt`,{className:`text-kumo-subtle`,children:e}),(0,Y.jsx)(`dd`,{className:`font-mono break-words whitespace-pre-wrap`,children:Kx(t)})]},e))}):null]})}function Jx({api:e,selected:t,evalName:n,onWorkspace:r}){let[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(),[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)([]);if((0,_.useEffect)(()=>{if(!t)return;let n=!0;return s(void 0),a([]),l(void 0),d([]),Promise.all([e.getTrialEvents(t.run.id,t.trial.id),e.getTrial(t.run.id,t.trial.id),e.listArtifacts(t.run.id,t.trial.id)]).then(([e,t,r])=>{n&&(a(e),l(t),d(r))}).catch(e=>{n&&s(e instanceof Error?e.message:`Unable to load trial details`)}),()=>{n=!1}},[e,t]),!t)return(0,Y.jsx)(Zb,{message:`Select a trial from a run to inspect it.`});let{run:f,trial:p}=t;return(0,Y.jsxs)(`section`,{className:`trial-inspector grid gap-5 xl:grid-cols-[minmax(320px,380px)_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`aside`,{className:`trial-overview flex min-w-0 flex-col gap-4`,children:[(0,Y.jsx)($b,{items:[[`Run`,(0,Y.jsx)(`span`,{className:Yb,children:f.id},`run`)],[`Eval`,n??`Unnamed eval`],[`Trial`,p.index+1],[`Status`,(0,Y.jsx)(ux,{status:p.status},`status`)],[`Aggregate score`,p.score??`—`],[`Runtime`,p.durationMs===void 0?`—`:`${p.durationMs}ms`],[`Events`,i.length]]}),(0,Y.jsxs)(ep,{size:`sm`,variant:`secondary`,className:`open-workspace self-start`,onClick:r,children:[`Open candidate workspace`,(0,Y.jsx)(vf,{"aria-hidden":!0,className:`size-3.5`})]}),p.checkpoints?.length?(0,Y.jsx)(Yx,{title:`Checkpoints`,children:(0,Y.jsx)(Xx,{checkpoints:p.checkpoints})}):null,(0,Y.jsxs)(Yx,{title:`Final scoring`,children:[(0,Y.jsx)(Qx,{scores:p.scores}),p.skippedScorers?.length?(0,Y.jsxs)(`p`,{className:`text-xs text-kumo-subtle`,children:[`Skipped final scorers: `,p.skippedScorers.join(`, `)]}):null]}),u.length?(0,Y.jsx)(Yx,{title:`Artifacts`,children:(0,Y.jsxs)(Kb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Path`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Size`})]})}),(0,Y.jsx)($.Body,{children:u.map(e=>(0,Y.jsx)(Ux,{artifact:e},e.path))})]})}):null,c?(0,Y.jsxs)(`details`,{className:`raw-details text-xs`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer font-medium text-kumo-subtle select-none`,children:`Raw trial summary`}),(0,Y.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded-md bg-kumo-elevated px-3 py-2 font-mono`,children:JSON.stringify(c.summary,null,2)})]}):null]}),(0,Y.jsxs)(`section`,{className:`timeline flex min-w-0 flex-col gap-2`,children:[o?(0,Y.jsx)(Ox,{title:`Unable to load trial details`,message:o}):null,(0,Y.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-kumo-strong`,children:`Event timeline`}),(0,Y.jsxs)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:[i.length,` events`]})]}),i.map((e,t)=>(0,Y.jsx)(qx,{event:e,index:t},`${e.timestamp}-${t}`))]})]})}function Yx({title:e,children:t}){return(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-kumo-strong`,children:e}),t]})}function Xx({checkpoints:e}){return(0,Y.jsxs)(Kb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Step`}),(0,Y.jsx)($.Head,{children:`Rule`}),(0,Y.jsx)($.Head,{children:`Value`}),(0,Y.jsx)($.Head,{children:`Result`})]})}),(0,Y.jsx)($.Body,{children:e.map(e=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.step+1}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsxs)(`span`,{className:`text-kumo-subtle`,children:[e.kind,`:`]}),` `,e.name,e.matchedToolCall?` (event ${e.matchedToolCall.eventIndex+1})`:``]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.value??`—`}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsx)(ux,{status:e.status}),e.error?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-kumo-danger`,children:e.error.message}):null]})]},`${e.step}-${e.name}`))})]})}function Zx(e){return e.error?`error`:e.passed===!0?`passed`:e.passed===!1?`failed`:`not scored`}function Qx({scores:e}){return(0,Y.jsxs)(Kb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Scorer`}),(0,Y.jsx)($.Head,{children:`Value`}),(0,Y.jsx)($.Head,{children:`Result`})]})}),(0,Y.jsxs)($.Body,{children:[e.map(e=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsxs)($.Cell,{children:[e.kind?(0,Y.jsxs)(`span`,{className:`text-kumo-subtle`,children:[e.kind,`: `]}):null,e.name]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.value??`—`}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsx)(ux,{status:Zx(e)}),e.error?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-kumo-danger`,children:e.error.message}):null]})]},e.name)),e.length?null:(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:3,className:`text-kumo-subtle`,children:`No final scorers.`})})]})]})}function $x({api:e,selected:t}){let[n,r]=(0,_.useState)(),[i,a]=(0,_.useState)();return(0,_.useEffect)(()=>{if(!t)return;let n=!0;return r(void 0),a(void 0),e.listWorkspace(t.run.id,t.trial.id).then(e=>{n&&r(e)}).catch(e=>{n&&a(e instanceof Error?e.message:`Unable to load workspace`)}),()=>{n=!1}},[e,t]),t?(0,Y.jsxs)(`section`,{className:`workspace-inspector flex flex-col gap-2`,children:[i?(0,Y.jsx)(Ox,{message:i}):null,(0,Y.jsxs)(Gb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Path`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Size`})]})}),(0,Y.jsxs)($.Body,{children:[n?.map(e=>{let t=e.kind===`directory`?Af:kf;return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:Yb,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,Y.jsx)(t,{"aria-hidden":!0,className:`size-3.5 text-kumo-subtle`}),e.path]})}),(0,Y.jsx)($.Cell,{children:e.kind}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.size===void 0?`—`:`${e.size} B`})]},e.path)}),!n&&!i?(0,Y.jsx)(qb,{colSpan:3,children:`Loading workspace…`}):null,n&&!n.length?(0,Y.jsx)(qb,{colSpan:3,children:`The workspace is empty.`}):null]})]})]}):(0,Y.jsx)(Zb,{message:`Select a trial to inspect its workspace.`})}function eS({api:e,catalog:t,suites:n,matrix:r,runs:i,selected:a,onTrial:o}){let s=$e();return(0,Y.jsxs)(Tt,{children:[(0,Y.jsx)(Ct,{path:`/suites`,element:(0,Y.jsx)(Hx,{api:e,suites:n,catalog:t,matrix:r,runs:i,onOpenSuite:e=>s(`/suites/${encodeURIComponent(e)}`),onOpenEval:e=>s(`/evals/${encodeURIComponent(e.path)}`)})}),(0,Y.jsx)(Ct,{path:`/suites/:suiteId`,element:(0,Y.jsx)(tS,{api:e,suites:n,catalog:t,matrix:r,runs:i})}),(0,Y.jsx)(Ct,{path:`/evals/*`,element:(0,Y.jsx)(nS,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/agents`,element:(0,Y.jsx)(Qb,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/fixtures`,element:(0,Y.jsx)(nx,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/runs`,element:(0,Y.jsx)(rS,{api:e,catalog:t,suites:n,runs:i,onTrial:o})}),(0,Y.jsx)(Ct,{path:`/runs/:runUuid`,element:(0,Y.jsx)(rS,{api:e,catalog:t,suites:n,runs:i,onTrial:o})}),(0,Y.jsx)(Ct,{path:`/trials/:trialUuid`,element:(0,Y.jsx)(iS,{api:e,catalog:t,selected:a})}),(0,Y.jsx)(Ct,{path:`/workspaces/:trialUuid`,element:(0,Y.jsx)($x,{api:e,selected:a})}),(0,Y.jsx)(Ct,{path:`*`,element:(0,Y.jsx)(Hx,{api:e,suites:n,catalog:t,matrix:r,runs:i,onOpenSuite:e=>s(`/suites/${encodeURIComponent(e)}`),onOpenEval:e=>s(`/evals/${encodeURIComponent(e.path)}`)})})]})}function tS(e){let{suiteId:t}=tt(),n=$e();return(0,Y.jsx)(Hx,{...e,selectedSuiteId:t,onOpenSuite:()=>void 0,onOpenEval:e=>n(`/evals/${encodeURIComponent(e.path)}`)})}function nS({catalog:e}){let t=Xe();return(0,Y.jsx)(ex,{catalog:e,path:decodeURIComponent(t.pathname.slice(7))})}function rS(e){let t=$e(),{runUuid:n}=tt(),[r,i]=yn();return(0,Y.jsx)(Tx,{...e,search:r,onSearchChange:e=>i(e,{replace:!0}),selectedRunId:n,onTrial:(n,i)=>{e.onTrial(n,i);let a=new URLSearchParams(r);a.set(`trial`,i.id),a.delete(`view`),t({pathname:`/runs/${encodeURIComponent(n.id)}`,search:a.toString()})},onOpenRun:e=>t({pathname:`/runs/${encodeURIComponent(e.id)}`,search:r.toString()})})}function iS({api:e,catalog:t,selected:n}){let r=$e();return(0,Y.jsx)(Jx,{api:e,evalName:t.find(e=>e.id===n?.run.evalId)?.name??n?.run.evalId,selected:n,onWorkspace:()=>n&&r(`/workspaces/${encodeURIComponent(n.trial.id)}`)})}var aS=(0,_.forwardRef)(function({href:e=`/`,...t},n){return(0,Y.jsx)(pn,{ref:n,to:e,...t})}),oS=[{label:`Suites & evals`,href:`/suites`,icon:Rf,matches:[`/suites`,`/evals`]},{label:`Agents`,href:`/agents`,icon:Lf,matches:[`/agents`]},{label:`Fixtures`,href:`/fixtures`,icon:jf,matches:[`/fixtures`]},{label:`Runs`,href:`/runs`,icon:Df,matches:[`/runs`,`/trials`,`/workspaces`]}];function sS(e){return oS.find(t=>t.matches.some(t=>e.startsWith(t)))??oS[0]}function cS(e){return e.startsWith(`/trials/`)?`Trial detail`:e.startsWith(`/workspaces/`)?`Candidate workspace`:e.startsWith(`/evals/`)?`Eval detail`:sS(e).label}function lS({children:e}){let{pathname:t}=Xe(),n=sS(t);return(0,Y.jsx)(kr,{component:aS,children:(0,Y.jsxs)(Bb.Provider,{collapsible:`icon`,defaultWidth:208,className:`h-dvh`,children:[(0,Y.jsxs)(Bb,{id:`dashboard-navigation`,children:[(0,Y.jsxs)(Bb.Header,{className:`justify-between`,children:[(0,Y.jsx)(pn,{to:`/suites`,className:`truncate text-sm font-semibold text-kumo-strong group-data-[state=collapsed]/sidebar:hidden`,children:`EvalKit`}),(0,Y.jsx)(Bb.Trigger,{className:`navigation-toggle`})]}),(0,Y.jsx)(Bb.Content,{children:(0,Y.jsx)(`nav`,{"aria-label":`Dashboard`,children:(0,Y.jsx)(Bb.Group,{children:(0,Y.jsx)(Bb.Menu,{children:oS.map(e=>(0,Y.jsx)(Bb.MenuButton,{href:e.href,icon:e.icon,active:e===n,"aria-current":e===n?`page`:void 0,tooltip:e.label,children:e.label},e.href))})})})})]}),(0,Y.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col overflow-y-auto`,children:[(0,Y.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b border-kumo-line bg-kumo-base px-4 md:px-6`,children:[(0,Y.jsx)(Bb.Trigger,{className:`md:hidden`}),(0,Y.jsx)(`h1`,{className:`text-base font-semibold text-kumo-strong`,children:cS(t)})]}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-4 px-4 py-4 md:px-6`,children:e})]})]})})}function uS({api:e,catalog:t,suites:n,selected:r,trialId:i,error:a,workspace:o,onClose:s,onWorkspace:c}){let l=(0,_.useRef)(null),u=Xe();(0,_.useEffect)(()=>{let e=l.current;return e&&!e.open&&e.showModal(),()=>{e?.open&&e.close()}},[]);let d=t.find(e=>e.id===r?.run.evalId),f=n.find(e=>e.id===r?.run.suiteId),p=dS(u,[`trial`,`view`]),m=dS(u,[`view`]),h=`Trial ${r?r.trial.index+1:`…`}`;return(0,Y.jsx)(`dialog`,{ref:l,className:`trial-panel fixed inset-y-0 right-0 left-auto m-0 h-dvh max-h-none w-full max-w-[min(1100px,100vw)] border-l border-kumo-line bg-kumo-base p-0 text-kumo-default shadow-xl backdrop:bg-black/30`,"aria-label":o?`Candidate workspace`:`Trial details`,onClose:s,children:(0,Y.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Y.jsxs)(`header`,{className:`flex items-start gap-3 border-b border-kumo-line px-5 py-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsxs)($v,{size:`sm`,className:`trial-breadcrumbs`,children:[f?(0,Y.jsx)($v.Link,{href:`/suites/${encodeURIComponent(f.id)}`,children:f.name??f.id}):(0,Y.jsx)($v.Link,{href:`/runs`,children:`Runs`}),(0,Y.jsx)($v.Separator,{}),d?(0,Y.jsx)($v.Link,{href:`/evals/${encodeURIComponent(d.path)}`,children:d.name??d.id}):(0,Y.jsx)($v.Current,{children:r?.run.evalId??`Eval`}),(0,Y.jsx)($v.Separator,{}),(0,Y.jsxs)($v.Link,{href:p,children:[`Run `,r?.run.id.slice(0,8)??`…`]}),(0,Y.jsx)($v.Separator,{}),o?(0,Y.jsx)($v.Link,{href:m,children:h}):(0,Y.jsx)($v.Current,{children:h}),o?(0,Y.jsx)($v.Separator,{}):null,o?(0,Y.jsx)($v.Current,{children:`Workspace`}):null]}),(0,Y.jsx)(`h2`,{className:`text-base font-semibold text-kumo-strong`,children:o?`Candidate workspace`:h}),(0,Y.jsx)(`p`,{className:`${Yb} truncate text-kumo-subtle`,children:i})]}),(0,Y.jsx)(ep,{variant:`ghost`,shape:`square`,size:`sm`,className:`trial-panel-close`,"aria-label":`Close trial panel`,title:`Close trial panel`,icon:(0,Y.jsx)(zf,{}),onClick:()=>l.current?.close()})]}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:r?o?(0,Y.jsx)($x,{api:e,selected:r}):(0,Y.jsx)(Jx,{api:e,selected:r,evalName:d?.name??r.run.evalId,onWorkspace:c}):a?(0,Y.jsx)(Ox,{message:a}):(0,Y.jsx)(`output`,{className:`text-[13px] text-kumo-subtle`,children:`Loading trial…`})})]})})}function dS(e,t){let n=new URLSearchParams(e.search);for(let e of t)n.delete(e);return`${e.pathname}${n.size?`?${n}`:``}`}function fS({api:e}){return(0,Y.jsx)(fn,{children:(0,Y.jsx)(pS,{api:e})})}function pS({api:e}){let t=Xe(),n=$e(),r=t.pathname.startsWith(`/runs/`)?new URLSearchParams(t.search).get(`trial`):null,[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)([]),f=(0,_.useRef)(``),[p,m]=(0,_.useState)(),[h,g]=(0,_.useState)();return(0,_.useEffect)(()=>{let t=!0;return Promise.all([e.listCatalog(),e.listSuites(),e.getMatrix()]).then(([e,n,r])=>{t&&(a(e),s(n),l(r))}).catch(e=>{t&&g(e instanceof Error?e.message:`Unable to load dashboard`)}),()=>{t=!1}},[e]),(0,_.useEffect)(()=>{let t=!0,n=!1,r=async()=>{if(!n){n=!0;try{let n=await e.listRuns();if(t){let e=JSON.stringify(n);e!==f.current&&(f.current=e,d(n))}}catch(e){t&&g(e instanceof Error?e.message:`Unable to load runs`)}finally{n=!1}}};r();let i=setInterval(()=>void r(),2e3);return()=>{t=!1,clearInterval(i)}},[e,t.pathname]),(0,_.useEffect)(()=>{let n=t.pathname.match(/^\/(?:trials|workspaces)\/([^/]+)/),i=r??(n?decodeURIComponent(n[1]):void 0);if(!i||!u.length||p?.trial.id===i)return;let a=t.pathname.match(/^\/runs\/([^/]+)/)?.[1],o=a?u.filter(e=>e.id===decodeURIComponent(a)):u,s=!0;return Promise.all(o.map(async t=>({run:t,trials:await e.listTrials(t.id)}))).then(e=>{if(s){for(let t of e){let e=t.trials.find(e=>e.id===i);if(e){m({run:t.run,trial:e}),g(void 0);return}}g(`Trial ${i} was not found in this run.`)}}).catch(e=>{s&&g(e instanceof Error?e.message:`Unable to load trial`)}),()=>{s=!1}},[e,t.pathname,r,u,p]),(0,Y.jsxs)(lS,{children:[h?(0,Y.jsx)(Ox,{message:h}):null,(0,Y.jsx)(eS,{api:e,catalog:i,suites:o,matrix:c,runs:u,selected:p,onTrial:(e,t)=>m({run:e,trial:t})}),r?(0,Y.jsx)(uS,{api:e,catalog:i,suites:o,selected:p?.trial.id===r?p:void 0,trialId:r,error:h,workspace:new URLSearchParams(t.search).get(`view`)===`workspace`,onClose:()=>{let e=new URLSearchParams(t.search);e.delete(`trial`),e.delete(`view`),n({pathname:t.pathname,search:e.toString()},{replace:!0})},onWorkspace:()=>{let e=new URLSearchParams(t.search);e.set(`view`,`workspace`),n({pathname:t.pathname,search:e.toString()})}}):null]})}function mS(e){let t=e.fetch??globalThis.fetch,n=async(n,r)=>{let i=await t(new URL(n,e.baseUrl),r);if(!i.ok)throw Error(await i.text()||`Dashboard request failed: ${i.status}`);return i.json()};return{async listCatalog(){return(await n(`/v1/catalog`)).evals},async listMatrixCells(t){let r=new URL(`/v1/matrix/cells`,e.baseUrl);for(let e of t.evalIds)r.searchParams.append(`eval`,e);return r.searchParams.set(`q`,t.query),r.searchParams.set(`offset`,String(t.offset)),r.searchParams.set(`sort`,t.sort),r.searchParams.set(`direction`,t.direction),n(r.pathname+r.search)},async getMatrix(){return(await n(`/v1/matrix`)).matrix},async listEvals(){return(await n(`/v1/evals`)).evals},async listSuites(){return(await n(`/v1/suites`)).suites},async listRuns(){return(await n(`/v1/runs`)).runs},async listTrials(e){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials`)).trials},async getTrial(e,t){return n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}`)},async listArtifacts(e,t){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/artifacts`)).artifacts},async listWorkspace(e,t){return n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/workspace`)},async getWorkspaceFile(n,r,i){let a=await t(new URL(`/v1/runs/${encodeURIComponent(n)}/trials/${encodeURIComponent(r)}/workspace/${i.split(`/`).map(encodeURIComponent).join(`/`)}`,e.baseUrl));if(!a.ok)throw Error(`Dashboard request failed: ${a.status}`);return a},async getTrialEvents(e,t){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/events`)).events},async runEval(e,t){await n(`/v1/runs`,{method:`POST`,body:JSON.stringify({path:e,...t?{parameters:t}:{}}),headers:{"content-type":`application/json`}})},async runSuite(e){await n(`/v1/suites/${encodeURIComponent(e)}/runs`,{method:`POST`})}}}var hS=document.querySelector(`#root`);if(!hS)throw Error(`Dashboard root is missing`);(0,Vb.createRoot)(hS).render((0,Y.jsx)(fS,{api:mS({baseUrl:window.location.origin})}));
|
|
30
|
+
- aria-labelledby for custom label association`)}let p=(0,Y.jsx)(Ym,{ref:t,className:J(Qm({size:r,variant:d,focusIndicator:!0}),l&&`keeper-ignore`,n),...l?{"data-1p-ignore":`true`,"data-bwignore":`true`,"data-form-type":`other`,"data-lpignore":`true`}:{},...u});return a||c||s?(0,Y.jsx)(qm,{label:a,required:f,labelTooltip:o,description:s,error:Gm(c),children:p}):p});$m.displayName=`Input`;var eh={xs:{inputOuter:`px-1.5`,addonOuterStart:`pl-1.5`,addonOuterEnd:`pr-1.5`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-1.5`,fontSize:`text-xs`,iconSize:10},sm:{inputOuter:`px-2`,addonOuterStart:`pl-1.5`,addonOuterEnd:`pr-1.5`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-2`,fontSize:`text-xs`,iconSize:13},base:{inputOuter:`px-3`,addonOuterStart:`pl-2`,addonOuterEnd:`pr-2`,addonButtonOuterStart:`pl-1`,addonButtonOuterEnd:`pr-1`,suffixPad:`pr-3`,fontSize:`text-base`,iconSize:18},lg:{inputOuter:`px-4`,addonOuterStart:`pl-2.5`,addonOuterEnd:`pr-2.5`,addonButtonOuterStart:`pl-1.5`,addonButtonOuterEnd:`pr-0.5`,suffixPad:`pr-4`,fontSize:`text-base`,iconSize:20}},th={xs:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1`,sm:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-1.5 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-1.5`,base:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2`,lg:`has-[[data-slot=input-group-addon-start]]:[&_input]:pl-2.5 has-[[data-slot=input-group-addon-end]]:[&_input]:pr-2.5`},nh=(0,_.createContext)(null),rh=(0,_.createContext)(!1);function ih(e){let t=(0,_.useContext)(nh);return t||console.warn(`<InputGroup.${e}> must be used within <InputGroup>. Falling back to default values.`),t}function ah(e){let t=[],n=[];return _.Children.forEach(e,e=>{(0,_.isValidElement)(e)&&e.type?.displayName===`InputGroup.Button`?n.push(e):t.push(e)}),{containerZone:t,individualZone:n}}function oh(e){let t=!1,n=!1;return _.Children.forEach(e,e=>{if(!(0,_.isValidElement)(e))return;let r=e.type,i=typeof r==`function`||typeof r==`object`?r.displayName:void 0;if(i===`InputGroup.Addon`){n=!0;return}if(i!==`InputGroup.Button`)return;let a=e.props.variant;a!==void 0&&a!==`ghost`&&(t=!0)}),t&&n?`hybrid`:t?`individual`:`container`}var sh=(0,_.forwardRef)((e,t)=>{let n=ih(`Input`);n&&(e.size!==void 0&&console.warn("InputGroup.Input: Set `size` on <InputGroup> instead of <InputGroup.Input>."),e.disabled!==void 0&&console.warn("InputGroup.Input: Set `disabled` on <InputGroup> instead of <InputGroup.Input>."),e.label!==void 0&&console.warn("InputGroup.Input: Use the `label` prop on <InputGroup> instead of <InputGroup.Input>."),e.description!==void 0&&console.warn("InputGroup.Input: Use <InputGroup.Suffix> instead of passing `description` to <InputGroup.Input>."));let r=eh[n?.size??`base`],i=n?.focusMode===`individual`,a=!!n?.error,o=e.id??n?.inputId;return(0,Y.jsx)($m,{ref:t,size:n?.size,disabled:n?.disabled||e.disabled,"aria-invalid":a||e[`aria-invalid`],...e,id:o,className:J(`flex h-full min-w-0 grow items-center rounded-none border-0 bg-transparent font-sans`,r.inputOuter,`text-ellipsis`,i?`relative ring-0 focus:ring-0 border border-kumo-line first:rounded-l-[inherit] last:rounded-r-[inherit] not-first:-ml-px hover:z-1 hover:border-kumo-line focus:z-2 focus:border-kumo-focus/50`:`relative z-1 shadow-none ring-0! outline-none focus:ring-0! focus:outline-none`,e.className)})});sh.displayName=`InputGroup.Input`;var ch={xs:`xs`,sm:`xs`,base:`sm`,lg:`base`},lh=(0,_.forwardRef)(({children:e,className:t,variant:n,size:r,disabled:i,tooltip:a,tooltipSide:o=`bottom`,icon:s,...c},l)=>{let u=ih(`Button`),d=(0,_.useContext)(rh),f=i??u?.disabled,p=u?.focusMode===`individual`||u?.focusMode===`hybrid`;u&&(n??`ghost`)===`ghost`&&!d&&console.warn(`InputGroup.Button: Ghost buttons should be wrapped in <InputGroup.Addon> for correct spacing.`),u&&r!==void 0&&console.warn("InputGroup.Button: Set `size` on <InputGroup> instead of <InputGroup.Button>.");let m=typeof a==`string`&&!c[`aria-label`]?a:void 0,h=u?eh[u.size??`base`].iconSize:void 0,g=s&&h&&(typeof s==`function`||typeof s==`object`&&s&&!_.isValidElement(s))?_.createElement(s,{size:h}):s,v=(0,Y.jsx)(ip,{ref:l,type:`button`,disabled:f,"aria-label":m,...c,icon:g,variant:n??`ghost`,size:r??(p?u?.size??`sm`:ch[u?.size??`base`]??`sm`),className:J(`pointer-events-auto`,`shadow-none`,`focus:ring-0`,!p&&`focus-visible:ring-[1.5px] focus-visible:ring-kumo-focus/50`,p&&[`relative h-full! rounded-none border border-kumo-line ring-0 focus-visible:ring-0`,`first:rounded-l-[inherit] last:rounded-r-[inherit]`,`not-first:-ml-px`,`hover:z-1`,`focus:z-2`,`focus-visible:border-kumo-focus/50`,`disabled:bg-kumo-overlay disabled:text-kumo-inactive!`],t),children:e});return a?(0,Y.jsx)(Kd,{content:a,side:o,asChild:!0,children:v}):v});lh.displayName=`InputGroup.Button`;var uh=(0,_.forwardRef)(({align:e=`start`,className:t,children:n},r)=>{let i=eh[ih(`Addon`)?.size??`base`],a=!1,o=_.Children.map(n,e=>(0,_.isValidElement)(e)?e.type===lh?(a=!0,e):e.props.size===void 0?(0,_.cloneElement)(e,{size:i.iconSize}):e:e);return(0,Y.jsx)(`div`,{ref:r,"data-slot":e===`start`?`input-group-addon-start`:`input-group-addon-end`,className:J(`pointer-events-none relative z-[1] flex shrink-0 items-center gap-1.5`,`text-kumo-subtle`,i.fontSize,`*:pointer-events-auto`,e===`start`?J(`-order-1`,a?i.addonButtonOuterStart:i.addonOuterStart,`pr-0`):J(`order-1`,`pl-0`,a?i.addonButtonOuterEnd:i.addonOuterEnd),t),children:(0,Y.jsx)(rh.Provider,{value:!0,children:o})})});uh.displayName=`InputGroup.Addon`;var dh=(0,_.forwardRef)(({className:e,children:t},n)=>{let r=eh[ih(`Suffix`)?.size??`base`];return(0,Y.jsx)(`div`,{ref:n,"data-slot":`input-group-suffix`,className:J(`pointer-events-none flex min-w-0 grow items-center text-kumo-subtle select-none`,r.fontSize,r.suffixPad,e),children:(0,Y.jsx)(`span`,{className:`truncate`,children:t})})});dh.displayName=`InputGroup.Suffix`;var fh=(0,_.forwardRef)(({size:e=`base`,children:t,className:n,disabled:r=!1,label:i,description:a,error:o,required:s,labelTooltip:c,...l},u)=>{let d=(0,_.useId)(),f=oh(t),p=(0,_.useMemo)(()=>({size:e,focusMode:f,disabled:r,error:o,inputId:d}),[e,f,r,o,d]),m=J(`relative w-full cursor-text`,Qm({size:e}),`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,f===`container`?[`overflow-hidden`,`focus-within:ring-[1.5px] focus-within:ring-kumo-focus/50`]:`isolate overflow-visible shadow-none ring-0`,`has-[input[aria-invalid=true]]:ring-kumo-danger`,`px-0`,`flex items-center gap-0`,`has-[[data-slot=input-group-suffix]]:[&_input]:[field-sizing:content]`,`has-[[data-slot=input-group-suffix]]:[&_input]:max-w-full`,`has-[[data-slot=input-group-suffix]]:[&_input]:grow-0`,`has-[[data-slot=input-group-suffix]]:[&_input]:pr-0`,th[e],`!mb-0`,n),h={"data-slot":`input-group`,"data-focus-mode":f,"data-disabled":r?``:void 0};if(f===`hybrid`){let{containerZone:n,individualZone:r}=ah(t),f={...p,focusMode:`container`},g=(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(nh.Provider,{value:f,children:(0,Y.jsxs)(`div`,{"data-slot":`input-group-container-zone`,className:J(Qm({size:e}),`overflow-hidden`,`has-[input[aria-invalid=true]]:ring-kumo-danger`,`px-0`,`flex min-w-0 flex-1 items-center gap-0`,`shadow-none ring-0`,`border border-kumo-line`,`focus-within:border-kumo-focus/50`,`focus-within:z-2`,`not-first:-ml-px`,`rounded-none first:rounded-l-[inherit] last:rounded-r-[inherit]`,th[e],`has-data-[slot=input-group-suffix]:[&_input]:field-sizing-content`,`has-data-[slot=input-group-suffix]:[&_input]:max-w-full`,`has-data-[slot=input-group-suffix]:[&_input]:grow-0`,`has-data-[slot=input-group-suffix]:[&_input]:pr-0`),children:[i&&(0,Y.jsx)(`label`,{htmlFor:d,className:`absolute inset-0 z-0 mb-0! cursor-text`,"aria-hidden":`true`}),n]})}),r]}),_=(0,Y.jsx)(nh.Provider,{value:p,children:(0,Y.jsx)(`div`,{ref:u,...h,className:m,...l,children:g})});return i?(0,Y.jsx)(qm,{label:i,description:a,error:o,required:s,labelTooltip:c,children:_}):_}let g=!i&&f===`container`,v=(0,Y.jsx)(nh.Provider,{value:p,children:i?(0,Y.jsxs)(`div`,{ref:u,...h,className:m,...l,children:[(0,Y.jsx)(`label`,{htmlFor:d,className:`absolute inset-0 z-0 mb-0!`,"aria-hidden":`true`}),t]}):g?(0,Y.jsx)(`label`,{ref:u,...h,className:J(m,`mb-0!`),...l,children:t}):(0,Y.jsx)(`div`,{ref:u,...h,className:m,...l,children:t})});return i?(0,Y.jsx)(qm,{label:i,description:a,error:o,required:s,labelTooltip:c,children:v}):v});fh.displayName=`InputGroup`;var ph=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(uh,{ref:t,align:`start`,...e}));ph.displayName=`InputGroup.Label`;var mh=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(dh,{ref:t,...e}));mh.displayName=`InputGroup.Description`;var hh=Object.assign(fh,{Input:sh,Button:lh,Addon:uh,Suffix:dh,Label:ph,Description:mh}),gh={variant:{heading:{classes:`text-lg font-semibold`,description:`Heading text (16px by default, 20px at large size)`},heading1:{classes:`text-3xl font-semibold`,description:`Deprecated large heading for page titles; use heading instead`},heading2:{classes:`text-2xl font-semibold`,description:`Deprecated medium heading for section titles; use heading instead`},heading3:{classes:`text-lg font-semibold`,description:`Deprecated small heading for subsections; use heading instead`},body:{classes:`text-kumo-default`,description:`Default body text`},secondary:{classes:`text-kumo-subtle`,description:`Muted text for secondary information`},success:{classes:`text-kumo-link`,description:`Success state text`},error:{classes:`text-kumo-danger`,description:`Error state text`},mono:{classes:`font-mono`,description:`Monospace text for code`},"mono-secondary":{classes:`font-mono text-kumo-subtle`,description:`Muted monospace text`}},size:{xs:{classes:`text-xs/[inherit]`,description:`Extra small text`},sm:{classes:`text-sm/[inherit]`,description:`Small text`},base:{classes:`text-base/[inherit]`,description:`Default text size`},lg:{classes:`text-lg/[inherit]`,description:`Large text`}}},_h={variant:`body`,size:`base`},vh=[`heading1`,`heading2`,`heading3`];function yh(e){return vh.includes(e)}function bh(e,t){return e===`heading`?t===`lg`?`text-xl`:``:yh(e)?``:[`mono`,`mono-secondary`].includes(e)?t===`lg`?gh.size.base.classes:gh.size.sm.classes:vr(gh.size,t,_h.size).classes}function xh({variant:e=`body`,bold:t=!1,size:n=`base`,truncate:r=!1,children:i,DANGEROUS_className:a,DANGEROUS_style:o,as:s,...c},l){let u=[`body`,`secondary`,`success`,`error`].includes(e),d=(0,_.useMemo)(()=>s||([`mono`,`mono-secondary`].includes(e)||e===`heading`||yh(e)?`span`:`p`),[e,s]);return(0,Y.jsx)(d,{ref:l,className:J(`text-kumo-default`,vr(gh.variant,e,_h.variant).classes,bh(e,n),u&&t?`font-medium`:``,r&&`min-w-0 truncate`,a),style:o,...c,children:i})}var Sh=(0,_.forwardRef)(xh),Ch=0;function wh(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(Ch);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Gr;let o=requestAnimationFrame(a);return Ch=o,()=>{Ch===o&&(cancelAnimationFrame(o),Ch=0)}}var Th=`data-base-ui-inert`,Eh=new WeakMap,Dh=new WeakSet,Oh=new WeakMap,kh=0;function Ah(e){return e?Ui(e)?e.host:Ah(e.parentNode):null}var jh=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Ah(t);return e.contains(n)?n:null}).filter(e=>e!=null),Mh=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Nh=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{Li(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Ph(e,t,n,{mark:r=!0}){let i=jh(t,e),a=r?Nh(t,Mh(i),new Set(i)):[],o=[],s=[];if(n){let e=jh(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Nh(t,Mh(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Eh.get(e)||0)+1;Eh.set(e,r),o.push(e),r===1&&n&&Dh.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Oh.get(e)||0)+1;Oh.set(e,t),s.push(e),t===1&&e.setAttribute(Th,``)}),kh+=1,()=>{o.forEach(e=>{let t=(Eh.get(e)||0)-1;Eh.set(e,t),t||(Dh.has(e)||e.removeAttribute(`aria-hidden`),Dh.delete(e))}),r&&s.forEach(e=>{let t=(Oh.get(e)||0)-1;Oh.set(e,t),t||e.removeAttribute(Th)}),--kh,kh||(Eh=new WeakMap,Dh=new WeakSet,Oh=new WeakMap)}}function Fh(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=zs(e[0]).body;return Ph(e,i,n,{mark:r})}function Ih(e,t){let n=Ri(is(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(Qo(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Lh=20,Rh=[];function zh(){Rh=Rh.filter(e=>e.deref()?.isConnected)}function Bh(e){zh(),e&&Li(e)!==`body`&&(Rh.push(new WeakRef(e)),Rh.length>Lh&&(Rh=Rh.slice(-20)))}function Vh(){return zh(),Rh[Rh.length-1]?.deref()}function Hh(e){return e?sc(e)?e:lc(e)[0]||e:null}function Uh(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=cc(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return sc(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Wh(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),v=t.useState(`domReferenceElement`),y=t.useState(`floatingElement`),{events:b,dataRef:x}=t.context,S=Q(()=>x.current.floatingContext?.nodeId),C=i===!1,w=Is(v)&&C,T=Ll(i),E=Ll(a),D=Ll(o),O=Ll(u),k=Ll(g),A=Yc(m),j=_l(),M=_.useRef(!1),N=_.useRef(!1),P=_.useRef(!1),F=_.useRef(null),I=_.useRef(``),L=_.useRef(``),R=_.useRef(null),z=_.useRef(null),B=Mr(R,p,j?.beforeInsideRef),V=Mr(z,j?.afterInsideRef),H=Il(),U=Il(),ee=Ul(),te=j!=null,W=Rs(y),ne=Q((e=W)=>e?lc(e):[]),re=Q(()=>h?.().filter(e=>e!=null)??[]);_.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Z(W,ns(zs(W)))&&ne().length===0&&!w&&Xo(e)}return jc(zs(W),`keydown`,e)},[r,W,c,w,ne]),_.useEffect(()=>{if(r||!g)return;let e=zs(W);function t(){P.current=!1}function n(e){let t=is(e),n=re(),r=Z(y,t)||Z(v,t)||Z(j?.portalNode,t)||n.some(e=>e===t||Z(e,t));P.current=!r,L.current=e.pointerType||`keyboard`,rs(t,`[data-base-ui-click-trigger]`)&&(N.current=!0,U.start(0,()=>{N.current=!1}))}function i(){L.current=`keyboard`}return Mc(jc(e,`pointerdown`,n,!0),jc(e,`pointerup`,t,!0),jc(e,`pointercancel`,t,!0),jc(e,`keydown`,i,!0),t)},[r,y,v,W,g,j,U,re]),_.useEffect(()=>{if(r||!l)return;let e=zs(W);function n(){N.current=!0,U.start(0,()=>{N.current=!1})}function i(e){let t=is(e);sc(t)&&(F.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=is(n);c&&r==null&&a!=null&&Z(y,a)&&Bh(a),queueMicrotask(()=>{let o=S(),l=t.context.triggerElements,u=re(),p=r?.hasAttribute(dl(`focus-guard`))&&[R.current,z.current,j?.beforeInsideRef.current,j?.afterInsideRef.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,Gl(f),Gl(d)].includes(r),m=!(Z(v,r)||Z(y,r)||Z(r,y)||Z(j?.portalNode,r)||u.some(e=>e===r||Z(e,r))||l.hasMatchingElement(e=>Z(e,r))||p||A&&(Zl(A.nodesRef.current,o).find(e=>Z(e.context?.elements.floating,r)||Z(e.context?.elements.domReference,r))||Ql(A.nodesRef.current,o).find(e=>[e.context?.elements.floating,Rs(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===v&&W&&Uh(W),s&&i!==v&&!qs(a)&&ns(e)===e.body){if(Hi(W)&&(W.focus(),s===`popup`)){ee.request(()=>{W.focus()});return}let e=ne(),t=F.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||W;Hi(n)&&n.focus()}x.current.insideReactTree?x.current.insideReactTree=!1:(w||!c)&&r&&m&&!N.current&&(w||r!==Vh())&&(M.current=!0,t.setOpen(!1,_c(wc,n)))})}function o(){P.current||(x.current.insideReactTree=!0,H.start(0,()=>{x.current.insideReactTree=!1}))}let u=Hi(v)?v:null;if(y||u)return Mc(u&&jc(u,`focusout`,a),u&&jc(u,`pointerdown`,n),y&&jc(y,`focusin`,i),y&&jc(y,`focusout`,a),y&&j&&jc(y,`focusout`,o,!0))},[r,v,y,W,c,A,j,t,l,s,ne,w,S,x,H,U,ee,d,f,re]),_.useEffect(()=>{if(r||!y||!g)return;let e=Array.from(j?.portalNode?.querySelectorAll(`[${dl(`portal`)}]`)||[]),t=(A?Ql(A.nodesRef.current,S()):[]).find(e=>Is(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Fh([y,...e,R.current,z.current,j?.beforeOutsideRef.current,j?.afterOutsideRef.current,...re(),t,Gl(f),Gl(d),w?v:null].filter(e=>e!=null),{ariaHidden:c||w,mark:!1}),i=Fh([y,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,v,y,c,j,w,A,S,d,f,re]),X(()=>{if(!g||r||!Hi(W))return;I.current=``,L.current=``;let e=zs(W),t=ns(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(O.current||``):n;if(r===void 0||r===!1||Z(W,t))return;let i=null,a=()=>(i??=ne(W),i[0]||W),o;o=r===!0||r===null?a():Gl(r),o||=a();let s=Z(W,ns(e)),c=x.current.openEvent,l=c?.type===`mousedown`&&Qo(c);wh(o,{sync:l,preventScroll:o===W,shouldFocus(){if(!k.current)return!1;if(s)return!0;let t=ns(e);return!(t!==o&&Z(W,t))}})})},[r,g,W,ne,T,O,k,x]);let ie=_.useRef(null);X(()=>{if(r||!W){ie.current=null;return}ie.current&&=(ie.current.cancelled=!0,null);let e=zs(W),t=ns(e),n=O.current==null;Bh(t);function i(e){if(e.open||(I.current=Ih(e.nativeEvent,L.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(dl(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(M.current=!0),e.reason===`outside-press`){if(e.nested)M.current=!1;else if(Qo(e.nativeEvent)||$o(e.nativeEvent))M.current=!1;else{let e=!1;zs(W).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}}}b.on(`openchange`,i);function a(e){let r=E.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=v?.isConnected?v:null,o=t?.isConnected&&Li(t)!==`body`?t:null,s=n?o||a:a||o;return s||=Vh()||null,typeof i==`boolean`?s:Gl(i)||s||null}return()=>{b.off(`openchange`,i);let t=ns(e),n=re(),r=Z(y,t)||n.some(e=>e===t||Z(e,t))||A&&Zl(A.nodesRef.current,S(),!1).some(e=>Z(e.context?.elements.floating,t)),o=E.current,s=I.current,c=a(s),l={cancelled:!1};ie.current=l,queueMicrotask(()=>{ie.current===l&&(ie.current=null);let n=Hh(c),i=D.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!M.current&&Hi(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}M.current=!1})}},[r,y,W,E,D,O,b,A,v,S,re]),X(()=>{if(!gc||g||!y)return;let e=ns(zs(y));Hi(e)&&Ps(e)&&Z(y,e)&&e.blur()},[g,y]),X(()=>{if(!r&&j)return j.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:v}),()=>{j.setFocusManagerState(null)}},[r,j,c,g,t,l,v]),X(()=>{if(!r&&W)return Uh(W),()=>{queueMicrotask(zh)}},[r,W]);let ae=!r&&(!c||!w)&&(te||c);return(0,Y.jsxs)(_.Fragment,{children:[ae&&(0,Y.jsx)(ul,{"data-type":`inside`,ref:B,onFocus:e=>{if(c){let e=ne();wh(e[e.length-1])}else j?.portalNode&&(M.current=!1,pc(e,j.portalNode)?dc(v)?.focus():Gl(f??j.beforeOutsideRef)?.focus())}}),n,ae&&(0,Y.jsx)(ul,{"data-type":`inside`,ref:V,onFocus:e=>{c?wh(ne()[0]):j?.portalNode&&(l&&(M.current=!0),pc(e,j.portalNode)?fc(v)?.focus():Gl(d??j.afterOutsideRef)?.focus())}})]})}function Gh(e){let t=_.useRef(``),n=_.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:_.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function Kh(e,t){let{onClick:n,onPointerDown:r}=Gh(Q((n,r)=>{(typeof e==`function`?e():e)||t(r||(Wo?`touch`:``))}));return _.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function qh(e){let[t,n]=_.useState(null),r=Kh(e,n);return am(e,t=>{t&&!e&&n(null)}),_.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Jh=_.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,Y.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});Jh.displayName=`InternalBackdrop`;var Yh={},Xh={},Zh=``;function Qh(e,t){return Wi(e)?e:t}function $h(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Qh(t,n)).overflowY)}function eg(e){if(typeof document>`u`)return!1;let t=zs(e);return Ri(t).innerWidth-t.documentElement.clientWidth>0}function tg(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=zs(e),n=t.documentElement,r=t.body,i=Qh(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function ng(e){let t=zs(e),n=t.documentElement,r=t.body,i=Qh(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function rg(e){let t=zs(e),n=t.documentElement,r=t.body,i=Ri(n),a=0,o=0,s=!1,c=Hl.create();if(gc&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Yh={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Zh=n.style.scrollBehavior,Xh={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Qh(n,r);s=tg(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Yh),Object.assign(r.style,Xh),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Zh)}function d(){u(),c.request(l)}l();let f=jc(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var ig=new class{lockCount=0;restore=null;timeoutLock=Fl.create();timeoutUnlock=Fl.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=zs(e),n=t.documentElement,r=t.body,i=Ri(n);if($h(i,n,r)){let t=new i.MutationObserver(()=>{$h(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Wo||!eg(e);this.restore=a?ng(e):rg(e)}};function ag(e=!0,t=null){X(()=>{if(e)return ig.acquire(t)},[e,t])}function og(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=yc}=t,l=e.context.dataRef,u=_.useRef(void 0),d=Ul(),f=Il(),p=_.useMemo(()=>{function t(t,n,r,i){let a=_c(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=es(e.pointerType,!0)&&$o(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||es(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=is(s),p=Ps(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:es(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return _.useMemo(()=>n?{reference:p}:qr,[n,p])}function sg(e){return gc&&e.movementX===0&&e.movementY===0}function cg(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function lg(e,t){return cg(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function ug(e,t,n){return cg(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function dg(e,t,n){return cg(t,n?e===ss:e===cs,e===us)}function fg(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:cg(t,n?e===cs:e===ss,e===ls)}function pg(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:v=g,parentOrientation:y,id:b,resetOnPointerLeave:x=!0,externalTree:S,nestedReturnFocusRef:C,grid:w}=t,T=w!=null;s&&(c||console.warn("`useListNavigation` looping must be enabled to allow escaping."),d||console.warn("`useListNavigation` must be virtual to allow escaping.")),g===`vertical`&&T&&console.warn("In grid list navigation mode, the `orientation` should",`be either "horizontal" or "both".`);let E=e.useState(`open`),D=e.useState(`floatingElement`),O=e.useState(`domReferenceElement`),k=e.context.dataRef,A=Rs(D),j=Is(O),M=Ll(A),N=Jc(),P=Yc(S),F=_.useRef(f),I=_.useRef(o??-1),L=_.useRef(null),R=_.useRef(!0),z=Q(e=>{i(I.current===-1?null:I.current,e)}),B=_.useRef(!!D),V=_.useRef(E),H=_.useRef(!1),U=_.useRef(!1),ee=_.useRef(null),te=Ll(h),W=Ll(E),ne=Ll(o),re=Ll(x),ie=Ul(),ae=Ul(),G=Q(()=>{ie.cancel();function e(e){d||(ee.current=wh(e,{sync:H.current,preventScroll:!0}))}let t=n.current[I.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ie.request(e))(()=>{let i=n.current[I.current]||t;i&&(t||e(i),ue&&(r||!R.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});X(()=>{k.current.orientation=g},[k,g]),X(()=>{E||(L.current=null),E&&f===`auto`||(F.current=f)},[E,f]),X(()=>{a&&(E&&D?(I.current=o??-1,F.current&&o!=null&&(U.current=!0,z())):B.current&&(I.current=-1,z()))},[a,E,D,o,z]),X(()=>{if(a){if(!E)H.current=!1;else if(D){if(r==null){if(H.current=!1,ne.current!=null)return;if(B.current&&(I.current=-1,G()),(!V.current||!B.current)&&F.current&&(L.current!=null||F.current===!0&&L.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ae.request(e):queueMicrotask)(t),e+=1):(I.current=L.current==null||ug(L.current,v,u)||l?Vs(n):Hs(n),L.current=null,z())};t()}}else Bs(n.current,r)||(I.current=r,G(),U.current=!1)}}},[a,E,D,r,ne,l,n,v,u,z,G,ae]),X(()=>{if(!a||D||!P||d||!B.current)return;let e=P.nodesRef.current,t=e.find(e=>e.id===N)?.context?.elements.floating,n=ns(zs(O??t??null)),r=e.some(e=>e.context&&Z(e.context.elements.floating,n));t&&!r&&R.current&&t.focus({preventScroll:!0})},[a,D,O,P,N,d]),X(()=>{V.current=E,B.current=!!D});let K=r!=null,oe=Q(e=>{if(!W.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(I.current!==t||r!==t)&&(I.current=t,z(e))}),se=Q(()=>y??P?.nodesRef.current.find(e=>e.id===N)?.context?.dataRef?.current.orientation),ce=Q(()=>Vs(n,te.current)),le=Q(t=>{if(R.current=!1,H.current=!0,t.which===229||!W.current&&t.currentTarget===M.current)return;if(l&&fg(t.key,g,u,T)){lg(t.key,se())||Xo(t),e.setOpen(!1,_c(Ec,t.nativeEvent));let n=C?.current??O;Hi(n)&&n.focus();return}r!=null&&r!==I.current&&!Bs(n.current,r)&&(I.current=r);let i=I.current,a=Vs(n,h),o=Hs(n,h);if(j||(t.key===`Home`&&(Xo(t),I.current=a,z(t)),t.key===`End`&&(Xo(t),I.current=o,z(t))),w!=null){let e=w(t,I.current,n,g,c,u,h,a,o);if(e!=null&&e!==I.current&&(I.current=e,z(t)),g===`both`)return}if(lg(t.key,g)){Xo(t);let e=ns(t.currentTarget.ownerDocument);if(E&&!d&&Z(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Z(t,e))){I.current=ug(t.key,g,u)?a:o,z(t),r===I.current&&G();return}let{index:l,wrapped:f}=Us(n.current,i,{decrement:!ug(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(H.current=!1),I.current=l,z(t)}}),ue=_.useMemo(()=>({onFocus(e){H.current=!0,oe(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){sg(e)||(H.current=!0,U.current=!1,p&&oe(e))},onPointerLeave(e){if(!W.current||!R.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&re.current&&(ee.current?.(),ee.current=null,I.current=-1,z(e),!d)){let e=M.current,t=ns(zs(e));e&&Z(e,t)&&e.focus({preventScroll:!0})}}}),[oe,W,M,p,n,z,re,d]),q=_.useMemo(()=>d&&E&&K&&{"aria-activedescendant":`${b}-${r}`},[d,E,K,b,r]),de=_.useMemo(()=>({...j?{}:q,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&E&&!d){let n=is(t.nativeEvent);if(n&&!Z(M.current,n))return;Xo(t);let r=_c(wc,t.nativeEvent);e.setOpen(!1,r);let i=C?.current??O;!r.isCanceled&&Hi(i)&&i.focus()}else le(t)},onPointerMove(e){sg(e)||(R.current=!0)}}),[q,le,M,j,e,E,d,O,C]),fe=_.useMemo(()=>{function t(t){e.setOpen(!0,_c(Ec,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&Qo(e.nativeEvent)&&(F.current=!d)}function r(e){F.current=f,f===`auto`&&$o(e.nativeEvent)&&(F.current=!0)}return{onKeyDown(n){let r=e.select(`open`);R.current=!1;let i=n.key.startsWith(`Arrow`),a=dg(n.key,se(),u),o=lg(n.key,r?g:v),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||Ps(n.currentTarget)))return le(n);if(r||m||!i){if(s){let e=lg(n.key,se());L.current=l&&e?null:n.key}l?a&&(Xo(n),r?(I.current=ce(),z(n),d&&M.current?.focus()):t(n)):o&&(ne.current!=null&&(I.current=ne.current),Xo(n),!r&&m?t(n):le(n),r&&z(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(I.current=-1,z(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[le,f,ce,l,z,e,m,g,v,se,u,ne,d,M]),pe=_.useMemo(()=>({...q,...fe}),[q,fe]);return _.useMemo(()=>a?{reference:pe,floating:de,item:ue,trigger:fe}:{},[a,pe,de,fe,ue])}function mg(e){let t=_.useRef(!0);t.current&&(t.current=!1,e())}var hg=(e,t)=>Object.is(e,t);function gg(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function _g(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!cm(e,t,(e,t)=>gg(e,t,n)):e!==t}function vg(e,t,n){return e?e.some(e=>e!==void 0&&gg(t,e,n)):!1}function yg(e,t,n){return e?e.findIndex(e=>e!==void 0&&gg(e,t,n)):-1}function bg(e,t){if(t!==hg)return n=>vg(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function xg(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(bg(t,n)):yg(e,t,n);return i===-1?null:i}function Sg(e,t,n,r,i,a){return vg(r,t,i)?a!=null&&e>a&&vg(r,n[a],i)?a:e:e===a?xg(n,r,i,!0):a}function Cg(e,t,n){return e.filter(e=>!gg(t,e,n))}function wg(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Tg(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function Eg(e){return Tg(e?.[0])}function Dg(e){return Eg(e)?e.flatMap(e=>e.items):e}function Og(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Eg(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function kg(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return wg(e)}function Ag(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?wg(e.value):wg(e)}function jg(e,t,n){function r(){return kg(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=Dg(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Mg(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Y.jsx)(_.Fragment,{children:jg(r,t,n)},i)),e),[])}var Ng=_.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});Ng.displayName=`CompositeListContext`;function Pg(){return _.useContext(Ng)}function Fg(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Q(i),[,o]=_.useState(0),s=jr(Lg).current,c=jr(Ig).current,l=_.useRef(0),u=_.useRef(!0),d=_.useRef(null),f=_.useRef(null),p=Q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=Q((e,t)=>{c.set(e,t),p()}),h=Q(e=>{c.delete(e),p()}),g=Q(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function v(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Bg(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Vg(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=zg(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=Q(()=>{let[e,t]=Rg(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});X(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),X(()=>{u.current&&y()}),X(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let b=Q(e=>(s.add(e),()=>{s.delete(e)})),x=_.useMemo(()=>({register:m,unregister:h,subscribeMapChange:b,nextIndexRef:l}),[m,h,b,l]);return(0,Y.jsx)(Ng.Provider,{value:x,children:t})}function Ig(){return new Map}function Lg(){return new Set}function Rg(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Vg(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function zg(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Bg(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Vg(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Hg(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Pg(),u=_.useRef(-1),[d,f]=_.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=_.useRef(null),h=_.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return X(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function Ug(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Q(s),f=e.useState(`open`),p=Il(),m=_.useRef(``),h=_.useRef(u??i??-1),g=_.useRef(null),v=Q(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!qs(n)||n?.matches(`:disabled`)?!1:o==null||!Gs(Kr,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Xo(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Xo(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),y=Q(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Z(r,n)||Z(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});X(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let b=_.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return _.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}function Wg(e){return e==null?void 0:`${e}-label`}function Gg(e,t){return e??t}var Kg=5;function qg(e,t){let n=Jg(t);return e.clientX>=n.left-Kg&&e.clientX<=n.right+Kg&&e.clientY>=n.top-Kg&&e.clientY<=n.bottom+Kg}function Jg(e){let t=e.getBoundingClientRect(),n=Ri(e);if(Yo)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var Yg=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=_.useRef(null),{transitionStatus:l,setMounted:u}=Xl(o),d=di(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:hs});return Yl({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d}));Yg.displayName=`ItemIndicator`;var Xg=20;function Zg(e,t,n,r){let[i,a]=_.useState(!1);X(()=>{if(!e||!t||n==null){a(!1);return}let r=zs(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Xg)},[e,t,n]),ag(e&&(!t||i),r)}var Qg=_.createContext(void 0);Qg.displayName=`ToolbarRootContext`;function $g(e){let t=_.useContext(Qg);if(t===void 0&&!e)throw Error(`Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.`);return t}function e_(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var t_=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),n_=`overflow-hidden rounded-lg bg-kumo-base shadow-xs ring ring-kumo-line`,r_=`flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-hairline`,i_=`-my-2 flex items-center gap-2 bg-kumo-elevated p-4 text-base font-medium text-kumo-subtle`,a_=`relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill`;function o_(e={}){return J(n_)}function s_(e){return _.Children.toArray(e).some(e=>(0,_.isValidElement)(e)?e.type===u_||e.type===l_||e.type===_.Fragment&&s_(e.props.children):!1)}var c_=(0,_.forwardRef)(function({children:e,className:t,render:n,...r},i){return xi({defaultTagName:`div`,render:n,ref:i,props:Qr({className:J(s_(e)?r_:o_(),t)},r,{children:e})})});function l_({children:e,className:t,...n}){return(0,Y.jsx)(`div`,{className:J(i_,t),...n,children:e})}function u_({children:e,className:t,...n}){return(0,Y.jsx)(`div`,{className:J(a_,t),...n,children:e})}c_.displayName=`LayerCard`,l_.displayName=`LayerCard.Secondary`,u_.displayName=`LayerCard.Primary`;var d_=Object.assign(c_,{Primary:u_,Secondary:l_});function f_(e=2e3){let[t,n]=(0,_.useState)(!1),r=(0,_.useRef)(null),i=(0,_.useRef)(0);return(0,_.useEffect)(()=>()=>{i.current+=1,r.current!==null&&clearTimeout(r.current)},[]),{copied:t,runCopy:(0,_.useCallback)(async(t,a)=>{let o=++i.current;r.current!==null&&(clearTimeout(r.current),r.current=null);try{return await t(()=>i.current===o),i.current===o&&(n(!0),r.current=setTimeout(()=>{i.current===o&&(n(!1),r.current=null)},e),!0)}catch(e){return i.current===o&&(n(!1),a?.(e)),!1}},[e]),reset:(0,_.useCallback)(()=>{i.current+=1,r.current!==null&&(clearTimeout(r.current),r.current=null),n(!1)},[])}}var p_=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),m_=(e,t)=>(Math.random()*(t-e)+e).toFixed(2),h_=({minWidth:e=30,maxWidth:t=100,minDuration:n=1.3,maxDuration:r=1.7,minDelay:i=0,maxDelay:a=.5,blockHeight:o,className:s})=>{let{width:c,duration:l,delay:u}=(0,_.useMemo)(()=>({width:p_(e,t),duration:m_(n,r),delay:m_(i,a)}),[e,t,n,r,i,a]),d={"--skeleton-width":`${c}%`,"--shimmer-duration":`${l}s`,"--shimmer-delay":`${u}s`},f=(0,Y.jsx)(`div`,{className:J(`skeleton-line`,s),style:d});if(o!==void 0){let e=typeof o==`number`?`${o}px`:o;return(0,Y.jsx)(`div`,{className:`flex items-center`,style:{height:e},children:f})}return f};function g_(e){let[t,n]=_.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var __=_.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return di(`div`,e,{state:{orientation:i},ref:t,props:[{role:`presentation`},o]})});__.displayName=`ListboxSeparator`;function v_(e,t){return Math.max(0,e-t)}function y_(e,t){if(t<=0)return 0;let n=Vm(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}var b_=`base-ui-disable-scrollbar`,x_={className:b_,getElement(e){return(0,Y.jsx)(`style`,{nonce:e,href:b_,precedence:`base-ui:low`,children:`.${b_}{scrollbar-width:none}.${b_}::-webkit-scrollbar{display:none}`})}};x_.getElement.displayName=`styleDisableScrollbar.getElement`;var S_=_.createContext(void 0);S_.displayName=`CSPContext`;var C_={disableStyleElements:!1};function w_(){return _.useContext(S_)??C_}var T_=_.createContext(void 0);T_.displayName=`SelectRootContext`;var E_=_.createContext(void 0);E_.displayName=`SelectFloatingContext`;function D_(){let e=_.useContext(T_);if(e===void 0)throw Error(`Base UI: SelectRootContext is missing. Select parts must be placed within <Select.Root>.`);return e}function O_(){let e=_.useContext(E_);if(e===void 0)throw Error(`Base UI: SelectFloatingContext is missing. Select parts must be placed within <Select.Root>.`);return e}var k_={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Ag(t,r)!==``},hasNullItemLabel:(e,t)=>t?Og(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>gg(t,e,n)):gg(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function A_(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:v,items:y,multiple:b=!1,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C=hg,highlightItemOnHover:w=!0,children:T}=e,{clearErrors:E}=Rp(),{setDirty:D,setTouched:O,setFocused:k,validityData:A,setFilled:j,name:M,disabled:N,validation:P,validationMode:F}=Pp(),I=rm({id:t}),L=N||d,R=M??c,[z,B]=om({controlled:n,default:b?r??Kr:r,name:`Select`,state:`value`}),[V,H]=om({controlled:a,default:o,name:`Select`,state:`open`}),U=_.useRef([]),ee=_.useRef([]),te=_.useRef(null),W=_.useRef(null),ne=_.useRef(0),re=_.useRef(null),ie=_.useRef([]),ae=_.useRef(!1),G=_.useRef(null),K=_.useRef(null),oe=_.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),se=_.useRef(!1),ce=_.useRef(z),{openMethod:le,triggerProps:ue}=qh(V),q=jr(()=>new Al({id:I,labelId:void 0,modal:m,multiple:b,disabled:L,readOnly:f,required:p,highlightItemOnHover:w,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,value:z,open:V,mounted:V,transitionStatus:void 0,items:y,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:qr,triggerProps:qr,itemRoot:{props:qr,multiple:b,disabled:L,readOnly:f,isItemEqualToValue:C},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Gr,setOpen:Gr,handleScrollArrowVisibility:Gr,onOpenChangeComplete:Gr,listRef:U,popupRef:te,scrollHandlerRef:W,scrollArrowsMountedCountRef:ne,valueRef:re,valuesRef:ie,labelsRef:ee,typingRef:ae,selectionRef:oe,firstItemTextRef:G,selectedItemTextRef:K,alignItemWithTriggerActiveRef:se,initialValueRef:ce},k_)).current,[de,fe]=_.useState(!1),{mounted:pe,transitionStatus:me,forceUnmount:he}=ru({open:V,ref:te,preventUnmountOnClose:de,setPreventUnmountOnClose:fe,onUnmount(){q.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),v?.(!1)}}),ge=q.useState(`activeIndex`),_e=q.useState(`selectedIndex`),ve=q.useState(`triggerElement`),ye=q.useState(`positionerElement`),be=g_(le),xe=le??be,Se=_.useMemo(()=>b?``:Ag(z,S),[b,z,S]),Ce=_.useMemo(()=>b&&Array.isArray(z)?z.map(e=>Ag(e,S)):Ag(z,S),[b,z,S]);im(Ll(ve),I,z,Q(()=>Ce),!L,c);let we=b?Array.isArray(z)&&z.length>0:z!=null&&Se!==``;X(()=>{j(we)},[we,j]),X(function(){let e=xg(ie.current,z,C,b);e===null&&(K.current=null),!V&&q.set(`selectedIndex`,e)},[b,V,z,C,q]),am(z,()=>{E(R),D(_g(z,A.initialValue,C)),P.change(z)});let Te=Q((e,t)=>{let n=t,r=uu(n);s?.(e,n),!t.isCanceled&&(e||fe(r()),H(e),e||t.reason!==`focus-out`&&t.reason!==`outside-press`||(O(!0),k(!1),F===`onBlur`&&P.commit(z)))});_.useImperativeHandle(h,()=>({unmount:he,close:()=>{q.state.open&&Te(!1,_c(kc))}}),[he,Te,q]);let Ee=Q((e,t)=>{i?.(e,t),!t.isCanceled&&B(e)}),De=Q(e=>{let t=v_(e.scrollHeight,e.clientHeight),n=y_(e.scrollTop,t),r=n>0,i=n<t;q.set(`scrollUpArrowVisible`,r),q.set(`scrollDownArrowVisible`,i)}),Oe=zm({open:V,onOpenChange:Te,elements:{reference:ve,floating:ye}}),ke=og(Oe,{enabled:!L,event:`mousedown`}),Ae=tu(Oe),je=pg(Oe,{enabled:!L,listRef:U,activeIndex:ge,selectedIndex:_e,disabledIndices:Kr,onNavigate(e){(e!==null||V)&&q.set(`activeIndex`,e)},focusItemOnHover:w}),Me=Ug(Oe,{enabled:!L&&(V||!f&&!b),listRef:ee,activeIndex:ge,selectedIndex:_e,disabledIndices:e=>e_(U.current[e]),onMatch(e){V?q.set(`activeIndex`,e):Ee(ie.current[e],_c(vc))},onTyping(e){ae.current=e}}),Ne=_.useMemo(()=>Qr(Me.reference,je.reference,Ae.reference,ke.reference,ue),[ke.reference,Me.reference,je.reference,Ae.reference,ue]),Pe=_.useMemo(()=>Qr(iu,Me.floating,je.floating,Ae.floating),[Me.floating,je.floating,Ae.floating]),Fe=je.item??qr,Ie=_.useMemo(()=>({props:Fe,multiple:b,disabled:L,readOnly:f,isItemEqualToValue:C}),[Fe,b,L,f,C]);q.useContextCallback(`setValue`,Ee),q.useContextCallback(`setOpen`,Te),q.useContextCallback(`handleScrollArrowVisibility`,De),q.useContextCallback(`onOpenChangeComplete`,v),mg(()=>{q.update({popupProps:Pe,triggerProps:Ne,itemRoot:Ie})}),q.useSyncedValues({id:I,modal:m,multiple:b,disabled:L,readOnly:f,required:p,highlightItemOnHover:w,value:z,open:V,mounted:pe,transitionStatus:me,popupProps:Pe,triggerProps:Ne,itemRoot:Ie,items:y,itemToStringLabel:x,itemToStringValue:S,isItemEqualToValue:C,openMethod:xe});let Le=Mr(g,P.inputRef),Re=b?void 0:R,ze=_.useMemo(()=>!b||!Array.isArray(z)||!R?null:z.map(e=>{let t=Ag(e,S);return(0,Y.jsx)(`input`,{type:`hidden`,form:l,name:R,value:t,disabled:L},t)}),[b,z,l,R,S,L]);return(0,Y.jsxs)(T_.Provider,{value:q,children:[(0,Y.jsx)(E_.Provider,{value:Oe,children:T}),(0,Y.jsx)(`input`,{...P.getValidationProps(L,{onFocus(){q.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||L||f)return;let t=e.currentTarget.value,n=_c(vc,e.nativeEvent);function r(){if(b)return;let e=t.toLowerCase(),r=ie.current.findIndex(t=>Ag(t,S).toLowerCase()===e||kg(t,x).toLowerCase()===e);r===-1&&(r=ie.current.findIndex((t,n)=>{let r=ee.current[n];return r!=null&&r.toLowerCase()===e}));let i=ie.current[r];i!=null&&Ee(i,n)}q.set(`forceMount`,!0),queueMicrotask(r)}}),id:I&&Re==null?`${I}-hidden-input`:void 0,form:l,name:Re,autoComplete:u,value:Se,disabled:L,required:p&&!(b&&we),readOnly:f,ref:Le,style:R?zc:Rc,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ze]})}var j_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=a;delete o.id;let s=Pp(),c=D_(),l=c.useState(`triggerElement`),u=c.useState(`id`),d=zp({id:Wg(u),fallbackControlId:l?.id??u,setLabelId(e){let t=typeof e==`function`?e(c.state.labelId):e;c.set(`labelId`,t)}});return di(`div`,e,{ref:t,state:s.state,props:[d,a],stateAttributesMapping:jp})});j_.displayName=`SelectLabel`;var M_=`data-popup-side`,N_=400,P_={...Ds,...jp,popupSide:e=>e?{[M_]:e}:null,value:()=>null},F_=_.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=Pp(),{labelId:m}=Ip(),h=D_(),g=h.useState(`readOnly`),v=h.useState(`required`),y=h.useState(`disabled`),b=p||y||a,x=h.useState(`open`),S=h.useState(`mounted`),C=h.useState(`value`),w=h.useState(`triggerProps`),T=h.useState(`positionerElement`),E=h.useState(`listElement`),D=h.useState(`popupSide`),O=h.useState(`id`),k=h.useState(`labelId`),A=h.useState(`hasSelectedValue`),j=S&&T?D:null,M=i??O,N=Gg(m,k);rm({id:i});let P=Ll(T),F=_.useRef(null),I=gm(b,F),{getButtonProps:L,buttonRef:R}=xm({disabled:b,native:o}),z=h.useStateSetter(`triggerElement`),B=Il(),V=Il(),H=Il();_.useEffect(()=>{if(x)return H.start(N_,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{H.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},V.clear()},[x,h,V,H]);let U=Qr(w,{id:M,role:`combobox`,"aria-expanded":x,"aria-haspopup":`listbox`,"aria-controls":x?E?.id??Rs(T)?.id:void 0,"aria-labelledby":N,"aria-readonly":g||void 0,"aria-required":v||void 0,tabIndex:b?-1:0,onFocus(e){I(!0),x&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,_c(vc,e.nativeEvent)),B.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Z(T,e.relatedTarget)||(l(!0),I(!1),u===`onBlur`&&d.commit(C))},onMouseDown(e){if(x)return;let t=zs(e.currentTarget);function n(e){if(!F.current)return;let t=e.target;Z(F.current,t)||Z(P.current,t)||qg(e,F.current)||h.context.setOpen(!1,_c(Dc,e))}V.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,L),ee=d.getValidationProps(b,U);ee.role=`combobox`;let te={...f,open:x,disabled:b,value:C,readOnly:g,popupSide:j,placeholder:!A};return di(`button`,e,{ref:[t,F,R,z],state:te,stateAttributesMapping:P_,props:ee})});F_.displayName=`SelectTrigger`;var I_={value:()=>null},L_=_.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=D_(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?Mg(l,u,d):jg(l,u,d)),di(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:I_})});L_.displayName=`SelectValue`;var R_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return di(`span`,e,{state:{open:D_().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:Es})});R_.displayName=`SelectIcon`;var z_=_.forwardRef(function(e,t){let n=D_(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,Y.jsx)(bl,{ref:t,...e}):null});z_.displayName=`SelectPortal`;var B_=_.createContext(void 0);B_.displayName=`SelectPositionerContext`;function V_(){let e=_.useContext(B_);if(!e)throw Error(`Base UI: SelectPositionerContext is missing. SelectPositioner parts must be placed within <Select.Positioner>.`);return e}function H_(e,t){e&&Object.assign(e.style,t)}var U_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},W_={position:`fixed`},G_=_.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=pl,style:v,...y}=e,b=D_(),x=O_(),S=b.useState(`open`),C=b.useState(`mounted`),w=b.useState(`modal`),T=b.useState(`value`),E=b.useState(`openMethod`),D=b.useState(`positionerElement`),O=b.useState(`triggerElement`),k=b.useState(`isItemEqualToValue`),A=b.useState(`transitionStatus`),j=_.useRef(null),M=_.useRef(null),[N,P]=_.useState(h),F=C&&N&&E!==`touch`;!C&&N!==h&&P(h),_.useImperativeHandle(b.context.alignItemWithTriggerActiveRef,()=>F),Zg((F||w)&&S,E===`touch`,D,O);let I=dd({anchor:n,floatingRootContext:x,positionMethod:a,mounted:C,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??F,collisionAvoidance:g,keepMounted:!0}),L=F?`none`:I.side,R=F?W_:I.positionerStyles,z={open:S,side:L,align:I.align,anchorHidden:I.anchorHidden};X(()=>{b.set(`popupSide`,I.side)},[b,I.side]);let B=hd(e,z,{styles:R,transitionStatus:A,props:y,refs:[t,b.useStateSetter(`positionerElement`)],hidden:!C,inert:!S}),V=_.useRef(0),H=Q(e=>{if(b.context.valuesRef.current.length===0)return;let t=V.current;V.current=e.size;let n=_c(vc);if(t!==0&&!b.state.multiple&&T!==null&&yg(b.context.valuesRef.current,T,k)===-1){let e=b.context.initialValueRef.current,t=e!=null&&yg(b.context.valuesRef.current,e,k)!==-1?e:null;b.context.setValue(t,n),t===null&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null)}if(t!==0&&b.state.multiple&&Array.isArray(T)){let e=T.filter(e=>yg(b.context.valuesRef.current,e,k)!==-1);e.length!==T.length&&(b.context.setValue(e,n),e.length===0&&(b.set(`selectedIndex`,null),b.context.selectedItemTextRef.current=null))}if(S&&F){b.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};H_(D,e),H_(b.context.popupRef.current,e)}}),U=_.useMemo(()=>({...I,side:L,alignItemWithTriggerActive:F,setControlledAlignItemWithTrigger:P,scrollUpArrowRef:j,scrollDownArrowRef:M}),[I,L,F,P]);return(0,Y.jsx)(Fg,{elementsRef:b.context.listRef,labelsRef:b.context.labelsRef,onMapChange:H,children:(0,Y.jsxs)(B_.Provider,{value:U,children:[C&&w&&(0,Y.jsx)(Jh,{inert:Bm(!S),cutout:O}),B]})})});G_.displayName=`SelectPositioner`;var K_=`--transform-origin`,q_={...Os,...hs},J_=_.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=D_(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=O_(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=V_(),v=$g(!0)!=null,y=Xu(),{nonce:b,disableStyleElements:x}=w_(),S=s.useState(`id`),C=s.useState(`open`),w=s.useState(`openMethod`),T=s.useState(`mounted`),E=s.useState(`popupProps`),D=s.useState(`transitionStatus`),O=s.useState(`triggerElement`),k=s.useState(`positionerElement`),A=s.useState(`listElement`),j=_.useRef(!1),M=_.useRef(!1),N=_.useRef({}),P=Ul(),F=Q(e=>{if(!k||!s.context.popupRef.current||!M.current)return;let t=k.style.top===`0px`,n=k.style.bottom===`0px`;if(j.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=Z_(k),i=Q_(k.getBoundingClientRect().height,`y`,r),a=zs(k),o=Ri(k),c=o.getComputedStyle(k),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=Y_(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=X_(e),g=null,_=e=>{k.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=Vm(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(j.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=Vm(g,0,X_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(j.current=!0),s.context.handleScrollArrowVisibility(e)});_.useImperativeHandle(s.context.scrollHandlerRef,()=>F,[F]),Yl({open:C,ref:s.context.popupRef,onComplete(){C&&s.context.onOpenChangeComplete(!0)}});let I={open:C,transitionStatus:D,side:f,align:p};X(()=>{k&&s.context.popupRef.current&&!Object.keys(N.current).length&&(N.current={top:k.style.top||`0`,left:k.style.left||`0`,right:k.style.right,height:k.style.height,bottom:k.style.bottom,minHeight:k.style.minHeight,maxHeight:k.style.maxHeight,marginTop:k.style.marginTop,marginBottom:k.style.marginBottom})},[s,k]),X(()=>{C||m||(M.current=!1,j.current=!1,H_(k,N.current))},[C,m,k]),X(()=>{let e=s.context.popupRef.current;if(!C||!O||!k||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(M.current=!0,e.style.removeProperty(K_),!m){P.request(()=>s.context.handleScrollArrowVisibility(A||e));return}let t=tv(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=Ri(k),i=r.getComputedStyle(k),a=r.getComputedStyle(e),o=zs(O),c=Z_(O),l=$_(O.getBoundingClientRect(),c),d=$_(k.getBoundingClientRect(),c),f=l.height,p=A||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,v=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=Y_(a),S=o.documentElement.clientHeight-_-v,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=y===`rtl`?l.right-d.width:l.left,D=0;if(t&&n){let e=$_(n.getBoundingClientRect(),c);T=$_(t.getBoundingClientRect(),c),E=d.left+(y===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;D=T.top-d.top+T.height/2-r}let M=w+D+v+h,P=Math.min(S,M),F=S-_-v,I=M-P,L=C-5;k.style.left=`${Vm(E,5,L-d.width)}px`,k.style.height=`${P}px`,k.style.maxHeight=`none`,k.style.marginTop=`${_}px`,k.style.marginBottom=`${v}px`,e.style.height=`100%`;let R=X_(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),V=(r.visualViewport?.scale??1)!==1&&gc;if(B||V){H_(k,N.current),g(!1);return}let H=Math.max(b,P);if(z){let e=Math.max(0,S-M);k.style.top=d.height>=F?`0`:`${e}px`,k.style.height=`${P}px`,p.scrollTop=X_(p)}else k.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=Vm(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(K_,`50% ${i}%`)}(H===S||P>=x)&&(j.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,C,k,O,m,g,P,A,u,y,h]),_.useEffect(()=>{if(!m||!k||!C)return;let e=Ri(k);function t(e){s.context.setOpen(!1,_c(Ac,e))}return jc(e,`resize`,t)},[s,m,k,C]);let L={...A?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${S}-list`},onKeyDown(e){v&&t_.has(e.key)&&e.stopPropagation()},onScroll(e){A||F(e.currentTarget)},...m&&{style:A?{height:`100%`}:U_},className:!A&&m?x_.className:void 0},R=di(`div`,e,{ref:[t,s.context.popupRef],state:I,stateAttributesMapping:q_,props:[E,L,md(D),o]});return(0,Y.jsxs)(_.Fragment,{children:[!x&&x_.getElement(b),(0,Y.jsx)(Wh,{context:d,modal:!1,disabled:!T,openInteractionType:w,returnFocus:a,restoreFocus:!0,children:R})]})});J_.displayName=`SelectPopup`;function Y_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function X_(e){return v_(e.scrollHeight,e.clientHeight)}function Z_(e){return _o.getScale(e)}function Q_(e,t,n){return e/n[t]}function $_(e,t){return Na({x:Q_(e.x,`x`,t),y:Q_(e.y,`y`,t),width:Q_(e.width,`x`,t),height:Q_(e.height,`y`,t)})}var ev=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function tv(e){let{style:t}=e,n={};for(let[e,r]of ev)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of ev){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var nv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=D_(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=V_(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:U_},className:u&&d!==`touch`?x_.className:void 0};return di(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});nv.displayName=`SelectList`;var rv=_.createContext(void 0);rv.displayName=`SelectItemContext`;function iv(){let e=_.useContext(rv);if(!e)throw Error(`Base UI: SelectItemContext is missing. SelectItem parts must be placed within <Select.Item>.`);return e}var av=_.memo(_.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=_.useRef(null),d=Hg({guess:!0,label:o,textRef:u}),f=D_(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:v}=f.useState(`itemRoot`),y=h||s,b=f.useState(`isActive`,d.index),x=f.useState(`open`),S=f.useState(`isSelected`,a),C=f.useState(`isSelectedByFocus`,d.index),w=d.index,T=_.useRef(null);X(()=>{let e=f.context.valuesRef.current;return e[w]=a,()=>{delete e[w]}},[w,a,f]),X(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=Sg(w,a,f.context.valuesRef.current,e,v,t),r=n===w,w===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&gg(a,e,v),r&&(n=w)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[w,m,v,f,a]);let E=_.useRef(`mouse`),D=_.useRef(!1),{getButtonProps:O,buttonRef:k}=xm({disabled:y,focusableWhenDisabled:!0,native:c,composite:!0}),A={disabled:y,selected:S,highlighted:b};function j(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=S?Cg(n,a,v):[...n,a];f.context.setValue(r,_c(Cc,e))}else f.context.setValue(a,_c(Cc,e)),f.context.setOpen(!1,_c(Cc,e))}function M(){f.context.selectionRef.current.dragY=0}let N={role:`option`,"aria-selected":S,tabIndex:x&&b?0:-1,onKeyDown(e){f.set(`activeIndex`,w),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=E.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&Qo(e.nativeEvent)&&(n!==void 0||b),i=t&&!r&&!D.current;D.current=!1,!(y||i)&&j(e.nativeEvent)},onPointerEnter(e){E.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){E.current=e.pointerType,D.current=!0,M()},onMouseUp(){if(M(),y||E.current===`touch`||D.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&S,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!S;e||t||(D.current=!0,T.current?.click(),D.current=!1)}},P=di(`div`,e,{ref:[k,t,d.ref,T],state:A,props:[p,N,l,O]}),F=_.useMemo(()=>({selected:S,index:w,textRef:u,selectedByFocus:C}),[S,w,u,C]);return(0,Y.jsx)(rv.Provider,{value:F,children:P})}));av.displayName=`SelectItem`;var ov=_.forwardRef(function(e,t){let{selected:n}=iv();return e.keepMounted||n?(0,Y.jsx)(Yg,{...e,selected:n,ref:t}):null});ov.displayName=`SelectItemIndicator`;var sv=_.memo(_.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=iv(),a=D_(),{render:o,className:s,style:c,...l}=e;return di(`div`,e,{ref:[_.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})}));sv.displayName=`SelectItemText`;var cv=_.createContext(void 0);cv.displayName=`SelectGroupContext`;function lv(){let e=_.useContext(cv);if(e===void 0)throw Error(`Base UI: SelectGroupContext is missing. SelectGroup parts must be placed within <Select.Group>.`);return e}var uv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=_.useState(),c=_.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=di(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,Y.jsx)(cv.Provider,{value:c,children:l})});uv.displayName=`SelectGroup`;var dv=_.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=lv(),c=qu(a);return X(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),di(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})});dv.displayName=`SelectGroupLabel`;var fv=__;Xm.size;var pv={size:`base`};function mv({size:e=pv.size}={}){return J(Kf({size:e}),`bg-kumo-control disabled:bg-kumo-control/50 data-[state=open]:bg-kumo-control`,`justify-between font-normal`,`focus:opacity-100 focus:ring-kumo-focus/50 focus-visible:ring-inset *:in-focus:opacity-100`)}var hv={xs:{iconSize:12,className:`text-kumo-subtle`},sm:{iconSize:14,className:`text-kumo-subtle`},base:{iconSize:16,className:`text-kumo-subtle`},lg:{iconSize:18,className:`text-kumo-subtle`}};function gv(e){if(typeof e!=`object`||!e||Array.isArray(e)||`$$typeof`in e||e instanceof Promise)return!1;let t=e;return`label`in t&&t.label!==void 0}function _v(e){return Array.isArray(e)?e:Object.entries(e).map(([e,t])=>({value:e,label:gv(t)?t.label:t}))}function vv(e){let t=_v(e),n=new Map;if(!Array.isArray(e))for(let[t,r]of Object.entries(e))gv(r)&&n.set(t,{disabled:r.disabled});return t.filter(e=>e.value!==null).map((e,t)=>{let r=typeof e.value==`string`?e.value:`option-${t}`,i=typeof e.value==`string`?n.get(e.value):void 0;return(0,Y.jsx)(bv,{value:e.value,disabled:i?.disabled,children:e.label},r)})}function yv({children:e,className:t,render:n,renderValue:r,label:i,hideLabel:a,placeholder:o,loading:s,size:c=pv.size,labelTooltip:l,description:u,error:d,required:f,container:p,side:m=`bottom`,sideOffset:h=4,align:g=`start`,alignOffset:v,alignItemWithTrigger:y=!1,anchor:b,arrowPadding:x,positionMethod:S,collisionAvoidance:C,collisionBoundary:w,collisionPadding:T,sticky:E,disableAnchorTracking:D,...O}){let k=(0,_.useId)(),A=Ni(),j=p??A??void 0,M=O,N=M[`aria-label`],P=M[`aria-labelledby`],F=typeof i==`string`?i:o;a!==void 0&&console.warn('[Kumo Select]: `hideLabel` is deprecated. For hidden labels, use `aria-label` instead of `label` + `hideLabel={true}`.\n Migration:\n - For visible labels: <Select label="Country" /> (hideLabel no longer needed)\n - For hidden labels: <Select aria-label="Select a country" /> (remove label and hideLabel)');let I=i&&a!==!0,L=I?void 0:P??(i?k:void 0),R=N??(L?void 0:F),z=O.items?_v(O.items):void 0,B=e||(O.items?vv(O.items):null),V=r?e=>{let t=o==null?null:(0,Y.jsx)(`span`,{className:`text-kumo-placeholder`,children:o});return e==null||e===``?t:r(e)??t}:void 0,{items:H,...U}=O,ee=i?(0,Y.jsx)(j_,{className:`m-0 text-base font-medium text-kumo-default select-none`,children:(0,Y.jsx)(xp,{showOptional:f===!1,tooltip:a?void 0:l,asContent:!0,children:i})}):null,te=(0,Y.jsxs)(F_,{"data-kumo-component":`Select`,"data-kumo-part":`trigger`,render:n,className:J(mv({size:c}),O.disabled&&`cursor-not-allowed opacity-50`,d&&`!ring-kumo-danger focus:ring-[1.5px] focus:ring-kumo-danger/50`,t),"aria-label":R,"aria-labelledby":L,children:[s?(0,Y.jsx)(h_,{className:`w-32`}):(0,Y.jsx)(L_,{placeholder:o,className:`min-w-0 truncate data-[placeholder]:text-kumo-placeholder`,children:V}),(0,Y.jsx)(R_,{className:J(`flex shrink-0 items-center`,hv[c].className),children:(0,Y.jsx)(Df,{size:hv[c].iconSize,className:`fill-current`})})]}),W=(0,Y.jsxs)(A_,{...U,items:z,disabled:s||O.disabled,required:f,children:[ee,te,(0,Y.jsx)(z_,{container:j,children:(0,Y.jsx)(G_,{side:m,sideOffset:h,align:g,alignOffset:v,alignItemWithTrigger:y,anchor:b,arrowPadding:x,positionMethod:S,collisionAvoidance:C,collisionBoundary:w,collisionPadding:T,sticky:E,disableAnchorTracking:D,children:(0,Y.jsx)(J_,{className:J(`flex flex-col`,`max-h-[var(--available-height)] bg-kumo-base text-kumo-default`,`rounded-lg shadow-lg ring ring-kumo-line`,`max-w-(--available-width) min-w-(--anchor-width) py-1.5`),children:(0,Y.jsx)(nv,{className:J(`min-h-0 flex-1 scroll-pt-2 scroll-pb-2 overflow-y-auto overscroll-none`),children:B})})})})]});if(I)return(0,Y.jsx)(qm,{label:i,required:f,labelTooltip:l,description:u,error:d?typeof d==`string`?{message:d,match:!0}:d:void 0,hideLabel:!0,children:W});let ne=d?typeof d==`string`?{message:d,match:!0}:d:void 0;return(0,Y.jsxs)(`div`,{className:`grid gap-2`,children:[i&&(0,Y.jsx)(`span`,{id:k,className:`sr-only`,children:i}),W,ne?(0,Y.jsx)(`span`,{className:`text-sm text-kumo-danger`,children:ne.message}):u&&(0,Y.jsx)(`span`,{className:`text-sm leading-snug text-kumo-subtle`,children:u})]})}function bv({children:e,value:t,disabled:n,className:r}){return(0,Y.jsxs)(av,{"data-kumo-component":`Select`,"data-kumo-part":`option`,value:t,disabled:n,className:J(`group mx-1.5 flex cursor-pointer items-center justify-between gap-2 rounded px-2 py-1.5 text-base outline-none`,`focus-visible:z-50 focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,`data-highlighted:bg-kumo-tint`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,r),children:[(0,Y.jsx)(sv,{children:e}),(0,Y.jsx)(ov,{children:(0,Y.jsx)(Of,{})})]})}var xv=(0,_.forwardRef)(({children:e,className:t},n)=>(0,Y.jsx)(uv,{ref:n,className:J(t),children:e}));xv.displayName=`Select.Group`;var Sv=(0,_.forwardRef)(({children:e,className:t},n)=>(0,Y.jsx)(dv,{ref:n,className:J(`px-3.5 py-1.5 text-sm font-semibold text-kumo-subtle`,t),children:e}));Sv.displayName=`Select.GroupLabel`;var Cv=(0,_.forwardRef)(({className:e},t)=>(0,Y.jsx)(fv,{ref:t,className:J(`my-1 h-px bg-kumo-hairline`,e)}));Cv.displayName=`Select.Separator`,yv.Option=bv,yv.Group=xv,yv.GroupLabel=Sv,yv.Separator=Cv,yv.Option.displayName=`Select.Option`;var wv=[25,50,100,250],Tv=(e,t,n)=>Math.min(Math.max(e,t),n),Ev={navigation:`Pagination`,firstPage:`First page`,previousPage:`Previous page`,nextPage:`Next page`,lastPage:`Last page`,pageNumber:`Page number`,pageSize:`Page size`},Dv={controls:`full`},Ov=(0,_.createContext)(null);function kv(){let e=(0,_.useContext)(Ov);if(!e)throw Error(`Pagination compound components must be used within a Pagination component`);return e}function Av({children:e,className:t}){let{page:n,perPage:r,totalCount:i,pageShowingRange:a}=kv(),o=e?e({page:n,perPage:r,totalCount:i,pageShowingRange:a}):i&&i>0?(0,Y.jsxs)(Y.Fragment,{children:[`Showing `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:a}),` of`,` `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:i})]}):null;return(0,Y.jsx)(`div`,{"data-slot":`pagination-info`,className:J(`text-sm text-kumo-subtle`,t),children:o})}Av.displayName=`Pagination.Info`;function jv({value:e,onChange:t,options:n=wv,label:r=`Per page:`,className:i}){let{labels:a}=kv();return(0,Y.jsxs)(`div`,{"data-slot":`pagination-page-size`,className:J(`flex items-center gap-2`,i),children:[r&&(0,Y.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:r}),(0,Y.jsx)(yv,{"aria-label":a.pageSize,value:e,onValueChange:e=>t(e),children:n.map(e=>(0,Y.jsx)(yv.Option,{value:e,children:e},e))})]})}jv.displayName=`Pagination.PageSize`;function Mv({controls:e=Dv.controls,pageSelector:t=`input`,className:n}){let{page:r,totalCount:i,hasNextPage:a,maxPage:o,setPage:s,editingPage:c,setEditingPage:l,labels:u}=kv(),d=i!=null,f=e===`full`&&!(!d&&a!==void 0),p=d?r===o:a!==!0;return(0,Y.jsx)(`div`,{"data-slot":`pagination-controls`,className:J(`flex grow flex-col items-end`,n),children:(0,Y.jsx)(`nav`,{"aria-label":u.navigation,children:(0,Y.jsxs)(hh,{children:[f&&(0,Y.jsx)(hh.Button,{variant:`secondary`,"aria-label":u.firstPage,disabled:r<=1,onClick:()=>{s(1),l(1)},children:(0,Y.jsx)(xf,{size:16})}),(0,Y.jsx)(hh.Button,{variant:`secondary`,"aria-label":u.previousPage,disabled:r<=1,onClick:()=>{let e=Math.max(r-1,1);s(e),l(e)},children:(0,Y.jsx)(wf,{size:16})}),f&&(t===`dropdown`?(0,Y.jsx)(yv,{"aria-label":u.pageNumber,className:`rounded-none ring-kumo-hairline`,value:r,onValueChange:e=>{let t=e;s(t),l(t)},children:Array.from({length:o},(e,t)=>t+1).map(e=>(0,Y.jsx)(yv.Option,{value:e,children:e},e))}):(0,Y.jsx)(hh.Input,{style:{width:50},className:`text-center`,"aria-label":u.pageNumber,value:c,onValueChange:e=>{l(Number(e))},onBlur:()=>{let e=Tv(c,1,o);s(e),l(e)},onKeyDown:e=>{if(e.key===`Enter`){let e=Tv(c,1,o);s(e),l(e)}},autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,"data-form-type":`other`})),(0,Y.jsx)(hh.Button,{variant:`secondary`,"aria-label":u.nextPage,disabled:p,onClick:()=>{let e=d?Math.min(r+1,o):r+1;s(e),l(e)},children:(0,Y.jsx)(Tf,{size:16})}),f&&(0,Y.jsx)(hh.Button,{variant:`secondary`,"aria-label":u.lastPage,disabled:r===o,onClick:()=>{s(o),l(o)},children:(0,Y.jsx)(Sf,{size:16})})]})})})}Mv.displayName=`Pagination.Controls`;function Nv({className:e}){return(0,Y.jsx)(`div`,{"data-slot":`pagination-separator`,className:J(`mx-2 h-6 border-l border-kumo-hairline`,e)})}Nv.displayName=`Pagination.Separator`;function Pv(e){let{page:t=1,perPage:n,totalCount:r,hasNextPage:i,setPage:a,children:o,className:s,labels:c}=e,l=`text`in e?e.text:void 0,u=`controls`in e?e.controls??Dv.controls:Dv.controls,[d,f]=(0,_.useState)(1),p=(0,_.useMemo)(()=>({...Ev,...c}),[c]);(0,_.useEffect)(()=>{f(t)},[t]);let m=(0,_.useMemo)(()=>{let e=t*(n??1)-(n??0)+1,i=Math.min(t*(n??0),r??0);return Number.isNaN(e)&&(e=0),Number.isNaN(i)&&(i=0),`${e}-${i}`},[t,n,r]),h={page:t,perPage:n,totalCount:r,hasNextPage:i,maxPage:(0,_.useMemo)(()=>Math.ceil((r??1)/(n??1)),[r,n]),pageShowingRange:m,setPage:a,editingPage:d,setEditingPage:f,labels:p};return o?(0,Y.jsx)(Ov.Provider,{value:h,children:(0,Y.jsx)(`div`,{"data-slot":`pagination`,className:J(`flex w-full items-center gap-2`,s),children:o})}):(0,Y.jsx)(Ov.Provider,{value:h,children:(0,Y.jsxs)(`div`,{"data-slot":`pagination`,className:J(`flex w-full items-center gap-2`,s),children:[(0,Y.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,"data-slot":`pagination-info`,className:`grow text-sm text-kumo-subtle`,children:l?l({page:t,perPage:n,totalCount:r,pageShowingRange:m}):r&&r>0?(0,Y.jsxs)(Y.Fragment,{children:[`Showing `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:m}),` of`,` `,(0,Y.jsx)(`span`,{className:`tabular-nums`,children:r})]}):null}),(0,Y.jsx)(Mv,{controls:u})]})})}Pv.displayName=`Pagination`;var Fv=Object.assign(Pv,{Info:Av,PageSize:jv,Controls:Mv,Separator:Nv}),Iv={layout:{auto:{classes:``,description:`Auto table layout - columns resize based on content`},fixed:{classes:`table-fixed`,description:`Fixed table layout - columns have equal width, controlled via colgroup`}},variant:{default:{classes:`even:bg-kumo-elevated [--kumo-table-row-bg:var(--color-kumo-base)] even:[--kumo-table-row-bg:var(--color-kumo-elevated)]`,description:`Default row variant`},selected:{classes:`bg-kumo-tint [--kumo-table-row-bg:var(--color-kumo-tint)]`,description:`Selected row variant`}},sticky:{left:{classes:`sticky left-0`,description:`Pin column to the left edge of the scroll container`},right:{classes:`sticky right-0`,description:`Pin column to the right edge of the scroll container`}}},Lv=(e,t)=>{let n=vr(Iv.sticky,e,`left`).classes,r=t===`head`?`z-2`:`z-1`,i=e===`right`?`before:-left-6`:`before:-right-6`,a=`before:pointer-events-none before:absolute before:inset-y-0 before:w-6`;return t===`cell`?J(n,r,`bg-(--kumo-table-row-bg)`,a,i,e===`right`?`before:bg-gradient-to-r before:from-transparent before:to-(--kumo-table-row-bg)`:`before:bg-gradient-to-l before:from-transparent before:to-(--kumo-table-row-bg)`):J(n,r,`bg-kumo-base group-data-[compact]/header:bg-kumo-elevated`,a,i,e===`right`?`before:bg-gradient-to-r before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated`:`before:bg-gradient-to-l before:from-transparent before:to-kumo-base group-data-[compact]/header:before:to-kumo-elevated`)},Rv={layout:`auto`,variant:`default`},zv=(0,_.forwardRef)(({layout:e=`auto`,...t},n)=>{let r=J(`isolate w-full`,vr(Iv.layout,e,Rv.layout).classes,`[&_td]:p-3`,`[&_th]:border-b [&_th]:border-kumo-fill [&_th]:p-3 [&_th]:text-base [&_th]:font-semibold`,`[&_th]:bg-kumo-base`,`text-left text-base text-kumo-default`,t.className);return(0,Y.jsx)(`table`,{ref:n,...t,className:r})}),Bv=(0,_.forwardRef)(({variant:e=`default`,sticky:t,...n},r)=>{let i=e===`compact`,a=J(`group/header`,i&&`text-xs text-kumo-strong [&_th]:bg-kumo-elevated [&_th]:py-2`,t&&`[&_th]:sticky [&_th]:top-0 [&_th]:z-1`,n.className);return(0,Y.jsx)(`thead`,{ref:r,...n,className:a,...i&&{"data-compact":``}})}),Vv=(0,_.forwardRef)(({sticky:e,...t},n)=>{let r=J(`group relative`,e&&Lv(e,`head`),t.className);return(0,Y.jsx)(`th`,{ref:n,...t,className:r})}),Hv=(0,_.forwardRef)(({variant:e=Rv.variant,...t},n)=>{let r=J(vr(Iv.variant,e,Rv.variant).classes,t.className);return(0,Y.jsx)(`tr`,{ref:n,...t,className:r})}),Uv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`tbody`,{ref:t,...e})),Wv=(0,_.forwardRef)(({sticky:e,...t},n)=>{let r=J(e&&Lv(e,`cell`),t.className);return(0,Y.jsx)(`td`,{ref:n,...t,className:r})}),Gv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`tfoot`,{ref:t,...e})),Kv=(0,_.forwardRef)((e,t)=>(0,Y.jsx)(`button`,{ref:t,...e,type:`button`,"aria-label":`Resize column`,className:J(`invisible h-full group-hover:visible`,`w-[10px]`,`flex items-center justify-center`,`cursor-col-resize touch-none select-none`,`absolute top-0 right-0`,`m-0 bg-kumo-base p-0`,`focus-visible:ring-2 focus-visible:ring-kumo-brand`),children:(0,Y.jsx)(`span`,{className:`h-5 w-[2px] rounded bg-kumo-hairline`})})),qv=(0,_.forwardRef)(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:i,disabled:a,...o},s)=>(0,Y.jsx)(Wv,{ref:s,...o,className:J(`w-10 leading-none`,o.className),children:(0,Y.jsx)(Rm,{checked:e,indeterminate:t,onCheckedChange:(e,t)=>{n?.(e,t),r?.(e)},"aria-label":i??`Select row`,disabled:a,className:`relative before:absolute before:-inset-3 before:content-['']`})})),Jv=(0,_.forwardRef)(({checked:e,indeterminate:t,onCheckedChange:n,onValueChange:r,label:i,disabled:a,...o},s)=>(0,Y.jsx)(Vv,{ref:s,...o,className:J(`w-10 leading-none`,o.className),children:(0,Y.jsx)(Rm,{checked:e,indeterminate:t,onCheckedChange:(e,t)=>{n?.(e,t),r?.(e)},"aria-label":i??`Select all rows`,disabled:a,className:`relative before:absolute before:-inset-3 before:content-['']`})}));zv.displayName=`Table`,Uv.displayName=`Table.Body`,Vv.displayName=`Table.Head`,Hv.displayName=`Table.Row`,Wv.displayName=`Table.Cell`,Gv.displayName=`Table.Footer`,Bv.displayName=`Table.Header`,Kv.displayName=`Table.ResizeHandle`,qv.displayName=`Table.CheckCell`,Jv.displayName=`Table.CheckHead`;var $=Object.assign(zv,{Header:Bv,Head:Vv,Row:Hv,Body:Uv,Cell:Wv,CheckCell:qv,CheckHead:Jv,Footer:Gv,ResizeHandle:Kv}),Yv={size:{sm:{classes:`text-sm h-10 gap-0.5`,description:`Compact breadcrumbs for dense UIs`},base:{classes:`text-base h-12 gap-1`,description:`Default breadcrumbs size`}}},Xv={size:`base`};function Zv({size:e=Xv.size}={}){return J(`group mr-4 flex min-w-0 grow items-center overflow-hidden whitespace-nowrap`,vr(Yv.size,e,Xv.size).classes)}var Qv=({href:e,icon:t,children:n})=>{let r=Or();return(0,Y.jsxs)(r,{"data-kumo-component":`Breadcrumbs`,"data-kumo-part":`link`,to:e,className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-kumo-subtle no-underline`,children:[!!t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(`span`,{children:n})]})};function $v({children:e,icon:t,loading:n}){return n?(0,Y.jsxs)(`div`,{className:`flex w-[125px] min-w-0 items-center gap-1`,children:[t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(h_,{})]}):(0,Y.jsxs)(`div`,{className:`flex max-w-full min-w-0 items-center gap-1 font-medium`,"aria-current":`page`,children:[t&&(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center`,children:t}),(0,Y.jsx)(`span`,{className:`truncate`,children:e})]})}function ey(){return(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center text-kumo-inactive`,"aria-hidden":`true`,children:(0,Y.jsx)(`svg`,{width:`24`,height:`24`,fill:`none`,viewBox:`0 0 24 24`,children:(0,Y.jsx)(`path`,{stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,d:`M10.75 8.75L14.25 12L10.75 15.25`})})})}function ty(){return(0,Y.jsx)(`span`,{className:`flex shrink-0 items-center text-kumo-subtle`,"aria-hidden":!0,children:`...`})}function ny({text:e}){let{copied:t,runCopy:n}=f_();return(0,Y.jsx)(ip,{variant:`ghost`,shape:`square`,size:`sm`,className:`opacity-0 transition-[opacity] group-hover:opacity-100`,onClick:async()=>{e&&await n(()=>navigator.clipboard.writeText(e),e=>console.error(`Failed to copy deeplink:`,e))},title:`Click to copy`,"aria-label":`Copy`,children:t?(0,Y.jsx)(Of,{weight:`bold`,className:`text-kumo-success`}):(0,Y.jsx)(Af,{weight:`regular`})})}function ry({children:e,size:t=`base`,className:n}){let r=_.Children.toArray(e),i=ay(r);return(0,Y.jsxs)(`nav`,{className:J(Zv({size:t}),n),"aria-label":`breadcrumb`,children:[(0,Y.jsx)(`div`,{className:`contents sm:hidden`,children:i}),(0,Y.jsx)(`div`,{className:`hidden sm:contents`,children:r})]})}function iy(e,t){return(0,_.isValidElement)(e)&&e.type===t}function ay(e){let t=e.filter(e=>iy(e,Qv)||iy(e,$v));if(t.length<=2)return e;let[n,r]=t.slice(-2),i=[(0,Y.jsx)(ty,{},`kumo-breadcrumb-mobile-ellipsis`),(0,Y.jsx)(ey,{},`kumo-breadcrumb-mobile-separator-leading`),(0,_.cloneElement)(n,{key:`kumo-breadcrumb-mobile-parent`}),(0,Y.jsx)(ey,{},`kumo-breadcrumb-mobile-separator-trailing`),(0,_.cloneElement)(r,{key:`kumo-breadcrumb-mobile-current`})],a=e.filter(e=>!iy(e,Qv)&&!iy(e,$v)&&!iy(e,ey));return[...i,...a]}ry.Link=Qv,ry.Current=$v,ry.Separator=ey,ry.Clipboard=ny;var oy={size:{sm:{classes:`px-6 py-8 gap-4`,description:`Compact empty state for smaller containers`},base:{classes:`px-10 py-16 gap-6`,description:`Default empty state size`},lg:{classes:`px-12 py-20 gap-8`,description:`Large empty state for prominent placement`}}},sy={size:`base`};function cy({size:e=sy.size}={}){return J(`flex w-full flex-col items-center rounded-xl border border-kumo-fill bg-kumo-control text-kumo-default`,vr(oy.size,e,sy.size).classes)}function ly({icon:e,title:t,description:n,commandLine:r,contents:i,size:a=`base`,className:o}){let{copied:s,runCopy:c}=f_(1e3),l=(0,_.useCallback)(async()=>{r&&await c(()=>navigator.clipboard.writeText(r),e=>console.warn(`Clipboard copy failed`,e))},[r,c]);return(0,Y.jsxs)(`div`,{className:J(cy({size:a}),o),children:[e,(0,Y.jsxs)(`div`,{className:`flex flex-col items-center gap-2.5`,children:[n?(0,Y.jsx)(Sh,{variant:`heading`,size:`lg`,as:`h2`,children:t}):(0,Y.jsx)(Sh,{variant:`secondary`,size:`base`,as:`h2`,children:t}),n&&(0,Y.jsx)(Sh,{variant:`secondary`,size:`base`,DANGEROUS_className:`max-w-140 text-center text-balance leading-normal`,children:n})]}),r&&(0,Y.jsxs)(`div`,{className:J(`relative inline-flex h-10 max-w-8/10 transform-gpu items-center gap-2 rounded-lg border border-white bg-kumo-overlay pr-2 pl-3 font-mono shadow-xs ring ring-kumo-line`),children:[(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(`span`,{className:`text-kumo-subtle select-none`,children:`$`}),(0,Y.jsx)(`span`,{className:`no-scrollbar overflow-scroll text-base whitespace-nowrap`,children:r})]}),(0,Y.jsx)(ip,{className:`text-kumo-subtle`,size:`sm`,variant:`ghost`,shape:`square`,"aria-label":`Copy command`,onClick:l,children:s?(0,Y.jsx)(Of,{size:16,className:`animate-bounce-in text-kumo-success`}):(0,Y.jsx)(Af,{size:16})})]}),i]})}var uy=_.createContext(void 0);uy.displayName=`ScrollAreaRootContext`;function dy(){let e=_.useContext(uy);if(e===void 0)throw Error(`Base UI: ScrollAreaRootContext is missing. ScrollArea parts must be placed within <ScrollArea.Root>.`);return e}function fy(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var py=`data-has-overflow-x`,my=`data-has-overflow-y`,hy=`data-overflow-x-start`,gy=`data-overflow-x-end`,_y=`data-overflow-y-start`,vy=`data-overflow-y-end`,yy=e=>t=>t?{[e]:``}:null,by={hasOverflowX:yy(py),hasOverflowY:yy(my),overflowXStart:yy(hy),overflowXEnd:yy(gy),overflowYStart:yy(_y),overflowYEnd:yy(vy),cornerHidden:()=>null},xy=`--scroll-area-corner-height`,Sy=`--scroll-area-corner-width`,Cy=`data-orientation`,wy={x:0,y:0},Ty={width:0,height:0},Ey={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Dy={x:!0,y:!0,corner:!0},Oy=_.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:s,xEnd:c,yStart:l,yEnd:u}=ky(i),d=qu(),f=Il(),p=Il(),{nonce:m,disableStyleElements:h}=w_(),[g,v]=_.useState(!1),[y,b]=_.useState(!1),[x,S]=_.useState(!1),[C,w]=_.useState(!1),[T,E]=_.useState(!1),[D,O]=_.useState(Ty),[k,A]=_.useState(Ty),[j,M]=_.useState(Ey),[N,P]=_.useState(Dy),F=_.useRef(null),I=_.useRef(null),L=_.useRef(null),R=_.useRef(null),z=_.useRef(null),B=_.useRef(null),V=_.useRef(null),H=_.useRef(null),U=_.useRef(0),ee=_.useRef(0),te=_.useRef(0),W=_.useRef(0),ne=_.useRef(`vertical`),re=_.useRef(wy),ie=_.useRef(null);function ae(e){let t=e?S:b,n=e?f:p;t(!0),n.start(500,()=>{t(!1)})}let G=Q(e=>{let t=e.x-re.current.x,n=e.y-re.current.y;re.current=e,n!==0&&ae(!0),t!==0&&ae(!1)}),K=Q(()=>{let e=I.current;e&&ie.current===null&&(ie.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),oe=Q(e=>{if(e.button!==0||H.current!==null&&(ne.current===`vertical`?z.current:B.current)?.hasPointerCapture(H.current))return;H.current=e.pointerId,U.current=e.clientY,ee.current=e.clientX,ne.current=e.currentTarget.getAttribute(Cy);let t=I.current;t&&(te.current=t.scrollTop,W.current=t.scrollLeft,K()),(ne.current===`vertical`?z.current:B.current)?.setPointerCapture(e.pointerId)}),se=Q(e=>{if(e.pointerId!==H.current)return;H.current=null,(ne.current===`vertical`?S:b)(!1),ie.current!==null&&(I.current&&(I.current.style.scrollSnapType=ie.current),ie.current=null);let t=ne.current===`vertical`?z.current:B.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),ce=Q(e=>{if(e.pointerId!==H.current)return;if(e.buttons%2==0){se(e);return}let t=I.current;if(!t)return;let n=ne.current===`vertical`,r=n?z.current:B.current,i=n?L.current:R.current;if(!r||!i)return;let a=n?`y`:`x`,o=fy(i,`padding`,a),s=fy(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-U.current:e.clientX-ee.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?te.current:W.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),ae(n)});function le(e){w(e.pointerType===`touch`)}function ue(e){if(le(e),e.pointerType!==`touch`){let t=Z(F.current,e.target);v(t)}}let q=_.useMemo(()=>({scrolling:y||x,hasOverflowX:!N.x,hasOverflowY:!N.y,overflowXStart:j.xStart,overflowXEnd:j.xEnd,overflowYStart:j.yStart,overflowYEnd:j.yEnd,cornerHidden:N.corner}),[y,x,N.x,N.y,N.corner,j]),de={role:`presentation`,onPointerEnter:ue,onPointerMove:ue,onPointerDown:le,onPointerLeave(){v(!1)},style:{position:`relative`,[xy]:`${D.height}px`,[Sy]:`${D.width}px`}},fe=di(`div`,e,{state:q,ref:[t,F],props:[de,o],stateAttributesMapping:by}),pe=_.useMemo(()=>({handlePointerDown:oe,handlePointerMove:ce,handlePointerUp:se,handleScroll:G,disableViewportSnap:K,cornerSize:D,setCornerSize:O,thumbSize:k,setThumbSize:A,hasMeasuredScrollbar:T,setHasMeasuredScrollbar:E,touchModality:C,cornerRef:V,scrollingX:y,scrollingY:x,hovering:g,setHovering:v,viewportRef:I,scrollbarYRef:L,scrollbarXRef:R,thumbYRef:z,thumbXRef:B,rootId:d,hiddenState:N,setHiddenState:P,overflowEdges:j,setOverflowEdges:M,viewportState:q,overflowEdgeThreshold:{xStart:s,xEnd:c,yStart:l,yEnd:u}}),[oe,ce,se,G,K,D,k,T,C,y,x,g,d,N,j,q,s,c,l,u]);return(0,Y.jsxs)(uy.Provider,{value:pe,children:[!h&&x_.getElement(m),fe]})});Oy.displayName=`ScrollAreaRoot`;function ky(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var Ay=_.createContext(void 0);Ay.displayName=`ScrollAreaViewportContext`;function jy(){let e=_.useContext(Ay);if(e===void 0)throw Error(`Base UI: ScrollAreaViewportContext missing. ScrollAreaViewport parts must be placed within <ScrollArea.Viewport>.`);return e}var My=`--scroll-area-overflow-x-start`,Ny=`--scroll-area-overflow-x-end`,Py=`--scroll-area-overflow-y-start`,Fy=`--scroll-area-overflow-y-end`,Iy=`--scroll-area-thumb-height`,Ly=`--scroll-area-thumb-width`,Ry=[My,Ny,Py,Fy],zy=!1;function By(){zy||gc||(typeof CSS<`u`&&`registerProperty`in CSS&&Ry.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),zy=!0)}var Vy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:s,scrollbarXRef:c,thumbYRef:l,thumbXRef:u,cornerRef:d,cornerSize:f,setCornerSize:p,setThumbSize:m,rootId:h,setHiddenState:g,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,touchModality:x,setHovering:S,setOverflowEdges:C,overflowEdgeThreshold:w,viewportState:T}=dy(),E=Xu(),D=_.useRef(!0),O=_.useRef([NaN,NaN,NaN,NaN]),k=Il(),A=Il(),j=Q(()=>{let e=o.current,t=s.current,n=c.current,r=l.current,i=u.current,a=d.current;if(!e)return;let h=e.scrollHeight,_=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,T=O.current,D=Number.isNaN(T[0]);if(T[0]=v,T[1]=h,T[2]=b,T[3]=_,D&&y(!0),h===0||_===0)return;let k=Hy(e),A=k.y,j=k.x,M=b/_,N=v/h,P=Math.max(0,_-b),F=Math.max(0,h-v),I=0,L=0;j||(I=y_(E===`rtl`?-S:S,P),L=P-I);let R=A?0:y_(x,F),z=A?0:F-R,B=j?0:b,V=A?0:v,H=0,U=0;!j&&!A&&(H=t?.offsetWidth||0,U=n?.offsetHeight||0);let ee=f.width===0&&f.height===0,te=ee?H:0,W=ee?U:0,ne=fy(n,`padding`,`x`),re=fy(t,`padding`,`y`),ie=fy(i,`margin`,`x`),ae=fy(r,`margin`,`y`),G=B-ne-ie,K=V-re-ae,oe=n?Math.min(n.offsetWidth-te,G):G,se=t?Math.min(t.offsetHeight-W,K):K,ce=Math.max(16,oe*M),le=Math.max(16,se*N);if(m(e=>Uy(e,{width:ce,height:le})),t&&r){let e=Wy(r,Iy,x,F,h,le,t.offsetHeight-le-re-ae);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-ce-ne-ie,t=Wy(i,Ly,E===`rtl`?-S:S,P,_,ce,e);i.style.transform=`translate3d(${E===`rtl`?-t:t}px,0,0)`}let ue=[I,L,R,z];Ry.forEach((t,n)=>{e.style.setProperty(t,`${ue[n]}px`)}),a&&p(e=>Uy(e,{width:H,height:U})),g(e=>Uy(e,k));let q={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&R>w.yStart,yEnd:!A&&z>w.yEnd};C(e=>Uy(e,q))});X(()=>{By()},[]),X(()=>{queueMicrotask(j)},[j,v,E,w.xStart,w.xEnd,w.yStart,w.yEnd]),X(()=>{o.current?.matches(`:hover`)&&S(!0)},[o,S]),X(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=O.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}j()});return n.observe(e),A.start(0,()=>{let t=Wl(e,{subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished.then(Gr))).then(j).catch(()=>{})}),()=>{n.disconnect(),A.clear()}},[j,o,A]);function M(){D.current=!1}let N={...h&&{"data-id":`${h}-viewport`},tabIndex:v.x&&v.y?-1:0,className:x_.className,style:{overflow:`scroll`},onScroll(){o.current&&(j(),(x||!D.current)&&b({x:o.current.scrollLeft,y:o.current.scrollTop}),k.start(100,()=>{D.current=!0}))},onWheel:M,onPointerMove:M,onPointerEnter:M,onKeyDown:M},P=di(`div`,e,{ref:[t,o],state:T,props:[N,a],stateAttributesMapping:by}),F=_.useMemo(()=>({computeThumbPosition:j}),[j]);return(0,Y.jsx)(Ay.Provider,{value:F,children:P})});Vy.displayName=`ScrollAreaViewport`;function Hy(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Uy(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Wy(e,t,n,r,i,a,o){let s=Vm(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var Gy=_.createContext(void 0);Gy.displayName=`ScrollAreaScrollbarContext`;function Ky(){let e=_.useContext(Gy);if(e===void 0)throw Error(`Base UI: ScrollAreaScrollbarContext is missing. ScrollAreaScrollbar parts must be placed within <ScrollArea.Scrollbar>.`);return e}var qy=_.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...s}=e,{hovering:c,scrollingX:l,scrollingY:u,hiddenState:d,scrollbarYRef:f,scrollbarXRef:p,viewportRef:m,thumbYRef:h,thumbXRef:g,handlePointerDown:v,handlePointerUp:y,handleScroll:b,disableViewportSnap:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w,viewportState:T}=dy(),E=i===`vertical`,D={...T,hovering:c,scrolling:E?u:l,orientation:i},O=Xu(),k=!w&&!a,A=E?d.y:d.x,j=a||!A;_.useEffect(()=>{if(!j)return;let e=m.current,t=E?f.current:p.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!E,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&O===`rtl`?-a:0,s=n&&O===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),b({x:e.scrollLeft,y:e.scrollTop}))}return jc(t,`wheel`,n,{passive:!1})},[O,b,E,p,f,j,m]);let M={...S&&{"data-id":`${S}-scrollbar`},"aria-hidden":!0,onPointerDown(e){if(e.button!==0)return;let t=is(e.nativeEvent),n=E?h.current:g.current;if(n&&Z(n,t))return;let r=m.current;if(!r)return;let i=E?f.current:p.current;if(!n||!i)return;let a=E?`y`:`x`,o=fy(n,`margin`,a),s=fy(i,`padding`,a),c=E?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=E?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=E?r.scrollHeight:r.scrollWidth,_=E?r.clientHeight:r.clientWidth,y=(E?i.offsetHeight:i.offsetWidth)-c-s-o;if(y<=0)return;let S=u/y,C=d-_;x(),E?r.scrollTop=S*C:r.scrollLeft=O===`rtl`?-(1-S)*C:S*C,b({x:r.scrollLeft,y:r.scrollTop}),v(e)},onMouseDown(e){e.preventDefault()},onPointerUp:y,onPointerCancel:y,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:k?`hidden`:void 0,...E?{top:0,bottom:`var(${xy})`,insetInlineEnd:0,[Iy]:`${C.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(${Sy})`,bottom:0,[Ly]:`${C.width}px`}}},N=di(`div`,e,{ref:[t,E?f:p],state:D,props:[M,s],stateAttributesMapping:by});return j?(0,Y.jsx)(Gy.Provider,{value:i,children:N}):null});qy.displayName=`ScrollAreaScrollbar`;var Jy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{computeThumbPosition:o}=jy(),{hasMeasuredScrollbar:s,viewportState:c}=dy(),l=_.useRef(null),u=_.useRef(s);return X(()=>{if(typeof ResizeObserver>`u`)return;let e=!1,t=new ResizeObserver(()=>{!e&&(e=!0,!u.current)||o()});return l.current&&t.observe(l.current),()=>{t.disconnect()}},[o]),di(`div`,e,{ref:[t,l],state:c,stateAttributesMapping:by,props:[{role:`presentation`,style:{minWidth:`fit-content`}},a]})});Jy.displayName=`ScrollAreaContent`;var Yy=_.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:s,handlePointerDown:c,handlePointerMove:l,handlePointerUp:u,scrollingX:d,scrollingY:f,hasMeasuredScrollbar:p}=dy(),m=Ky(),h=m===`vertical`;return di(`div`,e,{ref:[t,h?o:s],state:{scrolling:h?f:d,orientation:m},props:[{onPointerDown:c,onPointerMove:l,onPointerUp:u,onPointerCancel:u,style:{visibility:p?void 0:`hidden`,...h?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})});Yy.displayName=`ScrollAreaThumb`;var Xy={variant:`sidebar`,collapsible:`icon`,side:`left`},Zy=`16.25rem`,Qy=`57px`,$y=`cubic-bezier(0.77, 0, 0.175, 1)`,eb=250,tb=50,nb=768,rb=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`;function ib(e,t,n,r=!0){let i=r&&n!==void 0,a=(0,_.useRef)(n),o=(0,_.useRef)(t),s=(0,_.useRef)(e),c=(0,_.useRef)(r),l=(0,_.useRef)(void 0),u=(0,_.useRef)(void 0);a.current=n,o.current=t;let d=(0,_.useCallback)(()=>{let e=l.current;e!==void 0&&(l.current=void 0,clearTimeout(u.current),a.current?.(e))},[]);return(0,_.useEffect)(()=>{let t=s.current!==e,n=c.current;if(s.current=e,c.current=r,!i)l.current=void 0,clearTimeout(u.current);else if(n&&t){if(l.current=e,o.current===0||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)d();else return u.current=setTimeout(d,o.current+tb),()=>clearTimeout(u.current)}},[r,d,i,e]),d}function ab(e=nb){let t=`(max-width: ${e-1}px)`,n=(0,_.useCallback)(e=>{let n=window.matchMedia(t);return n.addEventListener(`change`,e),()=>n.removeEventListener(`change`,e)},[t]),r=(0,_.useCallback)(()=>window.matchMedia(t).matches,[t]),i=(0,_.useCallback)(()=>!1,[]);return(0,_.useSyncExternalStore)(n,r,i)}var ob=(0,_.createContext)(null);function sb(){let e=(0,_.useContext)(ob);if(!e)throw Error(`useSidebar must be used within a Sidebar.Provider`);return e}var cb=256,lb=200,ub=480;function db({defaultOpen:e=!0,open:t,onOpenChange:n,onOpenChangeComplete:r,variant:i=Xy.variant,side:a=Xy.side,collapsible:o=Xy.collapsible,resizable:s=!1,defaultWidth:c=cb,minWidth:l=lb,maxWidth:u=ub,onWidthChange:d,contained:f=!1,peekable:p=!1,animationDuration:m=eb,mobileBreakpoint:h,children:g,className:v,style:y}){let b=ab(h),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(c),[T,E]=(0,_.useState)(!1),[D,O]=(0,_.useState)(!1),k=b&&t!==void 0?t:x,A=(0,_.useCallback)(e=>{S(e),b&&t!==void 0&&n?.(e)},[b,t,n]),j=(0,_.useCallback)(e=>{let t=Math.min(u,Math.max(l,e));w(t),d?.(t)},[l,u,d]),[M,N]=(0,_.useState)(e),P=t??M,F=(0,_.useCallback)(e=>{let t=typeof e==`function`?e(P):e;n?.(t),N(t)},[n,P]),I=(0,_.useCallback)(()=>{b?A(!k):(O(!1),F(e=>!e))},[b,k,A,F]),L=(0,_.useCallback)(()=>{p&&!P&&!b&&O(!0)},[p,P,b]),R=(0,_.useCallback)(()=>{O(!1)},[]),z=D?`peeking`:P?`expanded`:`collapsed`,B=s?`${C}px`:Zy,V=(0,_.useRef)(new Map),H=(0,_.useCallback)((e,t)=>{let n=V.current;t?n.set(e,t):n.delete(e)},[]),U=(0,_.useCallback)((e,t={})=>{let{align:n=`auto`,behavior:r=`auto`}=t,i=V.current.get(e);if(!i)return;let a=i.closest(`[data-sidebar="viewport"]`);if(!a)return;let o=i.getBoundingClientRect(),s=a.getBoundingClientRect(),c=a.offsetHeight>0&&s.height>0?s.height/a.offsetHeight:1,l=(o.top-s.top)/c+a.scrollTop,u;if(n===`center`)u=l-(a.clientHeight-i.offsetHeight)/2;else if(n===`end`)u=l-(a.clientHeight-i.offsetHeight);else if(n===`auto`){let e=l+i.offsetHeight,t=a.scrollTop+a.clientHeight;if(l<a.scrollTop)u=l;else if(e>t)u=e-a.clientHeight;else return}else u=l;let d=Math.max(0,Math.min(u,a.scrollHeight-a.clientHeight)),f=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;a.scrollTo({top:d,behavior:f?`auto`:r})},[]),ee=(0,_.useCallback)((e,t={})=>{let n=V.current.get(e);if(!n)return;let r=n.closest(`[data-sidebar="viewport"]`);if(!r)return;let i=n.getBoundingClientRect(),a=r.getBoundingClientRect();i.top>=a.top&&i.bottom<=a.bottom||U(e,t)},[U]),te=(0,_.useMemo)(()=>({state:z,open:P,setOpen:F,openMobile:k,setOpenMobile:A,isMobile:b,toggleSidebar:I,variant:i,side:a,collapsible:o,width:C,resizable:s,minWidth:l,maxWidth:u,isResizing:T,setIsResizing:E,setWidth:j,isPeeking:D,peekable:p,startPeek:L,stopPeek:R,contained:f,animationDuration:m,registerItem:H,scrollToItem:U,scrollItemIntoView:ee}),[z,P,k,b,C,T,D]),W=ib(P,m,r,!b),ne=ib(k,m,r,b),re=b?ne:W,ie=b?`transform`:`width`,ae=(0,_.useCallback)(e=>{let t=e.target;t.closest(`[data-sidebar-wrapper]`)===e.currentTarget&&t.dataset.sidebar===`sidebar`&&e.propertyName===ie&&re()},[re,ie]);return(0,Y.jsx)(ob.Provider,{value:te,children:(0,Y.jsx)(`div`,{"data-sidebar-wrapper":``,"data-state":z,"data-side":a,onTransitionEnd:ae,style:{"--sidebar-width":B,"--sidebar-width-icon":Qy,"--sidebar-animation-duration":`${m}ms`,"--sidebar-easing":$y,...y},className:J(`group/sidebar-wrapper relative isolate flex w-full [--sidebar-active-bg:var(--color-kumo-tint)] [--sidebar-bg:var(--color-kumo-base)]`,!f&&!b&&`min-h-svh`,`has-data-[variant=inset]:bg-kumo-recessed`,T&&`select-none`,v),children:g})})}db.displayName=`Sidebar.Provider`;var fb=(0,_.forwardRef)(({className:e,contentClassName:t,children:n,fullScreenOnMobile:r=!1,...i},a)=>{let{state:o,open:s,isMobile:c,openMobile:l,setOpenMobile:u,side:d,variant:f,collapsible:p,isResizing:m,resizable:h,width:g,isPeeking:v,startPeek:y,stopPeek:b,contained:x}=sb(),S=(0,_.useCallback)(e=>{e&&(l?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[l]),C=(0,_.useCallback)(e=>{S(e),typeof a==`function`?a(e):a&&(a.current=e)},[a,S]),w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useRef)(!1),D=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(!c||!l)return;let e=e=>{e.key===`Escape`&&(E.current=!0,u(!1))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[c,l,u]),(0,_.useEffect)(()=>{c&&(l?(w.current=document.activeElement,E.current=!1,requestAnimationFrame(()=>{(T.current?.querySelector(rb)??T.current)?.focus()})):E.current&&w.current instanceof HTMLElement&&(w.current.focus(),E.current=!1,w.current=null))},[c,l]);let O=(0,_.useCallback)(e=>{!e.currentTarget.contains(e.relatedTarget)&&!D.current&&b()},[b]),k=(0,_.useCallback)(()=>{D.current=!0,y()},[y]),A=(0,_.useCallback)(()=>{D.current=!1,b()},[b]);if(p===`none`)return(0,Y.jsx)(`aside`,{ref:a,"data-state":`expanded`,"data-side":d,"data-variant":f,"data-sidebar":`sidebar`,style:{width:`var(--sidebar-width)`,minWidth:`var(--sidebar-width)`,maxWidth:`var(--sidebar-width)`},className:J(`relative flex h-full shrink-0 grow-0 flex-col overflow-hidden bg-(--sidebar-bg) text-kumo-default`,f===`sidebar`&&(d===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`),f===`floating`&&`m-2 rounded-lg border border-kumo-line shadow-lg`,e),...i,children:n});if(c)return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{"data-sidebar-backdrop":``,className:J(x?`absolute inset-0 z-40 bg-kumo-recessed`:`fixed inset-0 z-40 bg-kumo-recessed`,`transition-opacity duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,l&&!r?`opacity-80`:`pointer-events-none opacity-0`),onClick:()=>{E.current=!0,u(!1)},"aria-hidden":`true`}),(0,Y.jsx)(`nav`,{ref:e=>{C(e),T.current=e},tabIndex:-1,"aria-label":`Navigation`,"aria-hidden":!l,"data-state":l?`expanded`:`collapsed`,"data-side":d,"data-variant":f,"data-collapsible":p,"data-sidebar":`sidebar`,"data-mobile":`true`,className:J(`group/sidebar inset-y-0 z-50 flex flex-col overflow-hidden`,x?`absolute`:`fixed`,r?`w-full`:`w-(--sidebar-width)`,`bg-(--sidebar-bg) text-kumo-default`,!r&&`border-r border-kumo-line`,`transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,d===`left`&&`left-0`,d===`right`&&`right-0`,d===`left`&&(l?`translate-x-0`:`-translate-x-full`),d===`right`&&(l?`translate-x-0`:`translate-x-full`),e),...i,children:n})]});let j=p===`icon`?`var(--sidebar-width-icon)`:`0px`,M=h?`${g}px`:`var(--sidebar-width)`,N=s?M:j,P=s||v?M:j,F=f===`sidebar`?d===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`:f===`floating`?`border border-kumo-line`:``;return(0,Y.jsx)(`aside`,{ref:a,"data-state":o,"data-side":d,"data-variant":f,"data-collapsible":p,"data-sidebar":`sidebar`,style:{width:N},className:J(`group/sidebar relative h-full shrink-0 grow-0`,`overflow-visible`,`transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,m&&`transition-none!`,f===`floating`&&`m-2 rounded-lg shadow-lg`,e),...i,children:(0,Y.jsx)(Gd,{children:(()=>{let e=_.Children.toArray(n),r=e.filter(e=>_.isValidElement(e)&&e.type?.displayName===`Sidebar.Footer`),i=e.filter(e=>!_.isValidElement(e)||e.type?.displayName!==`Sidebar.Footer`);return(0,Y.jsxs)(`div`,{"data-sidebar":`content-container`,style:{width:P},className:J(`flex h-full flex-col`,`min-w-0 overflow-hidden whitespace-nowrap`,`bg-(--sidebar-bg) text-kumo-default`,F,`transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,m&&`transition-none!`,!s&&J(x?`absolute`:`fixed`,`inset-y-0 z-40`,d===`left`&&`left-0`,d===`right`&&`right-0`),s&&`relative`,t),children:[(0,Y.jsx)(`div`,{"data-sidebar":`peek-zone`,className:`flex min-h-0 flex-1 flex-col`,onMouseEnter:k,onMouseLeave:A,onFocus:y,onBlur:O,children:i}),r]})})()})})});fb.displayName=`Sidebar`;var pb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:J(`flex h-[58px] shrink-0 items-center gap-1 border-b border-kumo-line`,`overflow-hidden px-3`,e),...t}));pb.displayName=`Sidebar.Header`;var mb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsxs)(Oy,{ref:r,"data-sidebar":`content`,className:J(`relative min-w-0 flex-1 overflow-hidden`,e),...n,children:[(0,Y.jsx)(Vy,{tabIndex:-1,"data-sidebar":`viewport`,className:J(`h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5`,`transition-[padding] duration-(--sidebar-animation-duration)`,`overflow-x-hidden!`,`[mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,24px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]`),children:(0,Y.jsx)(Jy,{className:`flex min-w-0! flex-col`,children:t})}),(0,Y.jsx)(qy,{orientation:`vertical`,className:J(`flex w-1.5 touch-none p-px select-none`,`opacity-0 transition-opacity duration-150`,`data-[hovering]:opacity-100 data-[scrolling]:opacity-100`,`group-data-[state=collapsed]/sidebar:hidden`),children:(0,Y.jsx)(Yy,{className:`flex-1 rounded-full bg-kumo-line`})})]}));mb.displayName=`Sidebar.Content`;var hb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:J(`flex h-12 shrink-0 items-center gap-4 overflow-hidden border-t border-kumo-line whitespace-nowrap`,`px-[11px] group-not-data-[state=collapsed]/sidebar:px-4`,`bg-(--sidebar-bg)`,`w-(--sidebar-width)`,`transition-[width,padding] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,`sticky bottom-0`,`bg-clip-padding group-data-[state=collapsed]/sidebar:w-(--sidebar-width-icon)`,`group-data-[state=collapsed]/sidebar:border-r group-data-[state=collapsed]/sidebar:border-kumo-line`,e),...t}));hb.displayName=`Sidebar.Footer`;var gb=[[`w-28`,`w-40`,`w-24`],[`w-24`,`w-36`,`w-32`]],_b=(0,_.forwardRef)(({className:e,label:t=`Loading`,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`loading`,role:`status`,"aria-label":t,className:J(`flex min-h-0 w-full flex-1 flex-col gap-4 px-2 py-3`,e),...n,children:gb.map((e,t)=>(0,Y.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,Y.jsx)(h_,{className:`mb-1 ml-2 h-2 w-16 rounded-full group-data-[state=collapsed]/sidebar:hidden`}),e.map((e,t)=>(0,Y.jsxs)(`div`,{className:`flex min-h-8.5 items-center gap-3 rounded-lg px-3 group-data-[state=collapsed]/sidebar:justify-center group-data-[state=collapsed]/sidebar:px-0`,children:[(0,Y.jsx)(h_,{className:`size-4.5 shrink-0 rounded-md`}),(0,Y.jsx)(h_,{className:J(`h-2.5 rounded-full group-data-[state=collapsed]/sidebar:hidden`,e)})]},t))]},t))}));_b.displayName=`Sidebar.Loading`;var vb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`group`,className:J(`flex min-w-0 flex-col gap-y-px`,e),...n,children:t}));vb.displayName=`Sidebar.Group`;var yb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(`div`,{ref:r,"data-sidebar":`group-label`,className:J(`grid overflow-hidden`,`transition-[grid-template-rows,margin,border-color] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`group-data-[mobile=true]/sidebar:transition-none`,`my-3 grid-rows-[0fr] border-b border-kumo-line`,`[[data-sidebar=group]:first-child_&]:my-0 [[data-sidebar=group]:first-child_&]:border-transparent`,`group-not-data-[state=collapsed]/sidebar:my-0 group-not-data-[state=collapsed]/sidebar:grid-rows-[1fr] group-not-data-[state=collapsed]/sidebar:border-transparent`,`group-data-[mobile=true]/sidebar:my-0 group-data-[mobile=true]/sidebar:grid-rows-[1fr] group-data-[mobile=true]/sidebar:border-transparent`,e),...n,children:(0,Y.jsx)(`div`,{className:`min-h-0 min-w-0`,children:(0,Y.jsx)(`div`,{className:J(`mt-4 mb-2 truncate px-3 text-sm font-medium text-kumo-subtle`,`[[data-sidebar=group]:first-child_&]:mt-2`),children:t})})}));yb.displayName=`Sidebar.GroupLabel`;var bb=(0,_.createContext)(!1),xb=(0,_.createContext)(!1),Sb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:J(`m-0 flex min-w-0 list-none flex-col items-stretch gap-y-px p-0`,e),...t}));Sb.displayName=`Sidebar.Menu`;var Cb=(0,_.forwardRef)(({className:e,children:t,itemId:n,...r},i)=>{let{registerItem:a}=sb(),o=(0,_.useCallback)(e=>{n&&a(n,e),typeof i==`function`?i(e):i&&(i.current=e)},[n,i,a]);return(0,Y.jsx)(bb.Provider,{value:!0,children:(0,Y.jsx)(`li`,{ref:o,"data-sidebar":`menu-item`,"data-sidebar-item-id":n,className:J(`relative group-data-[state=collapsed]/sidebar:overflow-hidden`,e),...r,children:t})})});Cb.displayName=`Sidebar.MenuItem`;var wb=(0,_.forwardRef)(({className:e,icon:t,active:n=!1,size:r=`base`,href:i,target:a,tooltip:o,itemId:s,children:c,...l},u)=>{let{state:d,peekable:f,registerItem:p}=sb(),m=Or(),h=(0,_.useContext)(bb),g=(0,_.useCallback)(e=>{s&&!h&&p(s,e)},[s,h,p]),v=(0,_.useCallback)(e=>{s&&h&&p(s,e),typeof u==`function`?u(e):u&&(u.current=e)},[s,h,u,p]),y=t?_.isValidElement(t)?t:(0,Y.jsx)(t,{className:J(`shrink-0 opacity-40`,r===`base`?`size-4`:`size-3.5`)}):null,b=(0,Y.jsxs)(`div`,{className:J(`flex min-w-0 flex-1 items-center gap-3`,`translate-x-[-3px] group-not-data-[state=collapsed]/sidebar:translate-x-0`,`transition-transform duration-(--sidebar-animation-duration)`),children:[y,(0,Y.jsx)(`span`,{className:J(`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left`),children:_.Children.map(c,e=>typeof e==`string`||typeof e==`number`?(0,Y.jsx)(`span`,{className:`truncate`,children:e}):e)})]}),x=J(`group/menu-button relative flex w-full min-w-0 cursor-pointer items-center gap-2.5 rounded-lg outline-none`,`before:absolute before:inset-x-0 before:-inset-y-px`,r===`base`&&`min-h-8.5 px-3 py-0 text-sm font-medium`,r===`sm`&&`min-h-7 px-2 py-0 text-sm`,`text-kumo-default`,`transition-[color,box-shadow,outline] duration-(--sidebar-animation-duration)`,!n&&`hover:bg-(--sidebar-active-bg)`,n&&`bg-(--sidebar-active-bg)`,`has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-(--sidebar-active-bg)`,`focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong`,e),S,C=h?s:void 0;S=i?(0,Y.jsx)(m,{ref:v,...l,className:J(x,`no-underline!`),href:i,to:i,target:a,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-sidebar-item-id":C,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-button-link`,"data-size":r,children:b}):(0,Y.jsx)(`button`,{ref:v,type:`button`,className:x,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-sidebar-item-id":C,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-button`,"data-size":r,...l,children:b});let w=d===`collapsed`&&!f;return o&&(S=(0,Y.jsx)(Kd,{content:o,disabled:!w,side:`right`,render:S})),h?S:(0,Y.jsx)(`li`,{ref:g,"data-sidebar":`menu-item`,"data-sidebar-item-id":s,className:`relative group-data-[state=collapsed]/sidebar:overflow-hidden`,children:S})});wb.displayName=`Sidebar.MenuButton`;var Tb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`span`,{ref:n,"data-sidebar":`menu-badge`,className:J(`inline-flex shrink-0 items-center rounded-full border border-dashed border-kumo-line`,`px-1.5 py-0.5 text-[11px]/none font-medium text-kumo-strong select-none`,`group-data-[state=collapsed]/sidebar:hidden`,e),...t}));Tb.displayName=`Sidebar.MenuBadge`;var Eb=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsxs)(`ul`,{ref:r,"data-sidebar":`menu-sub`,className:J(`relative m-0 flex min-w-0 list-none flex-col gap-y-px overflow-hidden p-0 pr-0 pl-7`,e),...n,children:[(0,Y.jsx)(`li`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-y-px left-[19px] z-10 block w-px bg-kumo-line`}),t]}));Eb.displayName=`Sidebar.MenuSub`;var Db=(0,_.forwardRef)(({className:e,children:t,...n},r)=>(0,Y.jsx)(xb.Provider,{value:!0,children:(0,Y.jsx)(`li`,{ref:r,"data-sidebar":`menu-sub-item`,className:J(`relative`,e),...n,children:t})}));Db.displayName=`Sidebar.MenuSubItem`;var Ob=(0,_.forwardRef)(({className:e,active:t=!1,href:n,target:r,children:i,...a},o)=>{let s=Or(),c=(0,_.useContext)(xb),l=J(`group/menu-button relative flex min-h-8.5 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-3 py-0 text-sm font-medium outline-none`,`before:absolute before:inset-x-0 before:-inset-y-px`,`text-kumo-default transition-[color] duration-150`,!t&&`hover:bg-(--sidebar-active-bg)`,t&&`bg-(--sidebar-active-bg)`,`focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong`,e),u=(0,Y.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left`,children:_.Children.map(i,e=>typeof e==`string`||typeof e==`number`?(0,Y.jsx)(`span`,{className:`truncate`,children:e}):e)}),d;return d=n?(0,Y.jsx)(s,{ref:o,...a,className:J(l,`no-underline!`),href:n,to:n,target:r,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-sub-button-link`,children:u}):(0,Y.jsx)(`button`,{ref:o,type:`button`,className:l,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,"data-kumo-component":`Sidebar`,"data-kumo-part":`menu-sub-button`,...a,children:u}),c?d:(0,Y.jsx)(`li`,{"data-sidebar":`menu-sub-item`,className:`relative`,children:d})});Ob.displayName=`Sidebar.MenuSubButton`;var kb=(0,_.forwardRef)(({className:e,...t},n)=>(0,Y.jsx)(`div`,{ref:n,"data-sidebar":`separator`,className:J(`my-3 px-2`,e),...t,children:(0,Y.jsx)(`div`,{className:`border-b border-kumo-line`})}));kb.displayName=`Sidebar.Separator`;function Ab({className:e}){let{open:t}=sb();return(0,Y.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,focusable:`false`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,className:J(`shrink-0`,e),children:[(0,Y.jsx)(`path`,{d:`M21.25 6.72v10.56a2.97 2.97 0 0 1-2.97 2.97H5.72a2.97 2.97 0 0 1-2.97-2.97V6.72a2.97 2.97 0 0 1 2.97-2.97h12.56a2.97 2.97 0 0 1 2.97 2.97`}),(0,Y.jsx)(`path`,{d:`M6.25 7.25v9.5`,className:J(`transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,t?`translate-x-px`:`translate-x-[10.5px]`)})]})}Ab.displayName=`Sidebar.PanelIcon`;var jb=(0,_.forwardRef)(({className:e,children:t,onClick:n,...r},i)=>{let{open:a,toggleSidebar:o}=sb();return(0,Y.jsx)(`button`,{ref:i,type:`button`,"data-sidebar":`trigger`,"data-kumo-component":`Sidebar`,"data-kumo-part":`trigger`,"aria-expanded":a,"aria-label":a?`Collapse sidebar`:`Expand sidebar`,className:J(`flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-lg`,`text-kumo-subtle hover:bg-(--sidebar-active-bg) hover:text-kumo-default`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset`,e),onClick:e=>{n?.(e),o()},...r,children:t??(0,Y.jsx)(Ab,{})})});jb.displayName=`Sidebar.Trigger`;var Mb=(0,_.forwardRef)(({className:e,onClick:t,...n},r)=>{let{setOpenMobile:i}=sb();return(0,Y.jsx)(ip,{ref:r,variant:`ghost`,shape:`square`,size:`sm`,"data-sidebar":`close`,"data-kumo-component":`Sidebar`,"data-kumo-part":`close`,"aria-label":`Close navigation`,className:J(`shrink-0`,e),onClick:e=>{t?.(e),i(!1)},...n,children:(0,Y.jsx)(Uf,{size:18})})});Mb.displayName=`Sidebar.Close`;var Nb=(0,_.forwardRef)(({className:e,...t},n)=>{let{toggleSidebar:r}=sb();return(0,Y.jsx)(`button`,{ref:n,type:`button`,"data-sidebar":`rail`,"data-kumo-component":`Sidebar`,"data-kumo-part":`rail`,"aria-label":`Toggle sidebar`,tabIndex:-1,className:J(`absolute inset-y-0 z-1 hidden w-4 -translate-x-1/2 cursor-pointer transition-all`,`after:absolute after:inset-y-0 after:left-1/2 after:w-0.5`,`hover:after:bg-kumo-brand/20`,`group-data-[side=left]/sidebar-wrapper:right-0`,`group-data-[side=right]/sidebar-wrapper:left-0`,`sm:flex`,e),onClick:r,...t})});Nb.displayName=`Sidebar.Rail`;var Pb=(0,_.forwardRef)(({className:e,...t},n)=>{let{side:r,resizable:i,setIsResizing:a,setWidth:o,setOpen:s,open:c,minWidth:l,width:u,maxWidth:d}=sb(),f=(0,_.useRef)(0),p=(0,_.useRef)(0),m=(0,_.useRef)(!1);return i?(0,Y.jsx)(`button`,{ref:n,type:`button`,"aria-label":`Resize sidebar`,tabIndex:0,"data-sidebar":`resize-handle`,className:J(`absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block`,`after:absolute after:inset-y-0 after:w-0.5`,`after:bg-transparent after:transition-colors`,`hover:after:bg-kumo-hairline focus-visible:after:bg-kumo-hairline active:after:bg-kumo-hairline`,`focus:outline-none`,r===`left`&&`right-0 after:right-0`,r===`right`&&`left-0 after:left-0`,e),onPointerDown:e=>{e.preventDefault(),a(!0),f.current=e.clientX,m.current=!c;let t=e.currentTarget.closest(`[data-sidebar-wrapper]`)?.querySelector(`[data-sidebar='sidebar']`);p.current=t?.getBoundingClientRect().width??0;let n=()=>{a(!1),document.removeEventListener(`pointermove`,i),document.removeEventListener(`pointerup`,u)},i=e=>{let t=r===`left`?e.clientX-f.current:f.current-e.clientX,n=p.current+t;m.current?n>=l&&(m.current=!1,s(!0),o(n)):n<l?(s(!1),m.current=!0):o(n)},u=()=>{n()};document.addEventListener(`pointermove`,i),document.addEventListener(`pointerup`,u)},onKeyDown:e=>{let t=r===`left`?`ArrowRight`:`ArrowLeft`,n=r===`left`?`ArrowLeft`:`ArrowRight`;if(e.key===t)e.preventDefault(),c?o(Math.min(u+10,d)):(s(!0),o(l));else if(e.key===n){e.preventDefault();let t=u-10;t<l?s(!1):o(t)}else e.key===`Home`?(e.preventDefault(),s(!1)):e.key===`End`&&(e.preventDefault(),s(!0),o(d))},...t}):null});Pb.displayName=`Sidebar.ResizeHandle`;var Fb=(e,{isMobile:t,openMobile:n,state:r})=>e&&(t?n:r!==`collapsed`),Ib=(0,_.createContext)({contentId:``,isOpen:!0,isCollapsible:!1,autoScrollOnOpen:!1,toggle:()=>{},completeOpenChange:()=>{}}),Lb=(0,_.forwardRef)(({defaultOpen:e=!1,open:t,onOpenChange:n,onOpenChangeComplete:r,autoScrollOnOpen:i=!1,className:a,children:o,...s},c)=>{let l=sb(),{animationDuration:u}=l,[d,f]=(0,_.useState)(e),p=t??d,m=Fb(p,l),h=(0,_.useId)(),g=(0,_.useRef)(!1),v=(0,_.useCallback)(()=>{let e=!p;f(e),n?.(e),g.current=!1},[p,n]),y=ib(m,u,r),b=(0,_.useMemo)(()=>({contentId:h,isOpen:p,isCollapsible:!0,autoScrollOnOpen:i,toggle:v,completeOpenChange:y}),[h,p,i,v,y]),x=(0,_.useCallback)(e=>{!p&&e.target.matches(`:focus-visible`)&&(g.current=!0,f(!0),n?.(!0))},[p,n]),S=(0,_.useCallback)(e=>{g.current&&!e.currentTarget.contains(e.relatedTarget)&&!e.currentTarget.querySelector(`[data-active]`)&&(g.current=!1,f(!1),n?.(!1))},[n]);return(0,Y.jsx)(Ib.Provider,{value:b,children:(0,Y.jsx)(`div`,{ref:c,"data-open":p||void 0,className:J(`min-w-0`,a),onFocus:x,onBlur:S,...s,children:o})})});Lb.displayName=`Sidebar.Collapsible`;function Rb({render:e}){let{contentId:t,isOpen:n,toggle:r}=(0,_.useContext)(Ib);return _.cloneElement(e,{"aria-expanded":n,"aria-controls":t,"data-open":n||void 0,onClick:t=>{let n=e.props.onClick;n?.(t),r()}})}Rb.displayName=`Sidebar.CollapsibleTrigger`;var zb=(0,_.forwardRef)(({className:e,children:t,onTransitionEnd:n,...r},i)=>{let{contentId:a,isOpen:o,autoScrollOnOpen:s,completeOpenChange:c}=(0,_.useContext)(Ib),l=sb(),{animationDuration:u}=l,d=(0,_.useRef)(null),f=Fb(o,l);(0,_.useEffect)(()=>{if(!f||!s)return;let e=window.setTimeout(()=>{let e=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;d.current?.scrollIntoView({block:`nearest`,behavior:e?`auto`:`smooth`})},u);return()=>window.clearTimeout(e)},[f,s,u]);let p=(0,_.useCallback)(e=>{e&&(f?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[f]),m=(0,_.useCallback)(e=>{d.current=e,p(e),typeof i==`function`?i(e):i&&(i.current=e)},[i,p]),h=(0,_.useCallback)(e=>{n?.(e),e.target===e.currentTarget&&e.propertyName===`grid-template-rows`&&c()},[c,n]);return(0,Y.jsx)(`div`,{ref:m,id:a,role:`region`,"aria-hidden":!f,onTransitionEnd:h,className:J(`grid`,`transition-[grid-template-rows] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)`,`motion-reduce:transition-none`,f?`grid-rows-[1fr]`:`grid-rows-[0fr]`,e),...r,children:(0,Y.jsx)(`div`,{className:`overflow-hidden`,children:t})})});zb.displayName=`Sidebar.CollapsibleContent`;function Bb({className:e}){let{isOpen:t,isCollapsible:n}=(0,_.useContext)(Ib);return(0,Y.jsx)(Tf,{size:12,weight:`bold`,className:J(`ml-auto shrink-0 opacity-40 transition-[transform,rotate,opacity] duration-200 group-hover/menu-button:opacity-100`,n&&t&&`rotate-90`,`group-data-[state=collapsed]/sidebar:hidden`,e)})}Bb.displayName=`Sidebar.MenuChevron`;var Vb=(0,_.createContext)(``),Hb=(0,_.forwardRef)(({activeKey:e,direction:t=`left`,className:n,children:r,...i},a)=>{let o=_.Children.toArray(r).findIndex(t=>_.isValidElement(t)&&t.props.value===e),s=typeof window<`u`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,c=o>0?`-${o*100}%`:`0%`;return(0,Y.jsx)(Vb.Provider,{value:e,children:(0,Y.jsx)(`div`,{ref:a,"data-sidebar":`sliding-views`,className:J(`flex min-h-0 max-w-(--sidebar-width) flex-1 overflow-hidden`,n),...i,children:(0,Y.jsx)(`div`,{className:`flex min-h-0 w-full shrink-0`,style:{transform:`translateX(${c})`,transition:s?`none`:`transform var(--sidebar-animation-duration) var(--sidebar-easing)`},children:r})})})});Hb.displayName=`Sidebar.SlidingViews`;var Ub=(0,_.forwardRef)(({value:e,className:t,children:n,...r},i)=>{let a=(0,_.useContext)(Vb)===e,o=(0,_.useCallback)(e=>{e&&(a?e.removeAttribute(`inert`):e.setAttribute(`inert`,``))},[a]),s=(0,_.useCallback)(e=>{o(e),typeof i==`function`?i(e):i&&(i.current=e)},[i,o]);return(0,Y.jsx)(`div`,{ref:s,"data-sidebar":`sliding-view`,"data-value":e,"aria-hidden":!a,className:J(`flex min-h-0 w-full shrink-0 flex-col`,!a&&`pointer-events-none`,t),...r,children:n})});Ub.displayName=`Sidebar.SlidingView`;var Wb=Object.assign(fb,{Provider:db,Header:pb,Content:mb,Footer:hb,Loading:_b,Group:vb,GroupLabel:yb,Menu:Sb,MenuItem:Cb,MenuButton:wb,MenuBadge:Tb,MenuSub:Eb,MenuSubItem:Db,MenuSubButton:Ob,Separator:kb,Trigger:jb,Close:Mb,Rail:Nb,ResizeHandle:Pb,MenuChevron:Bb,Collapsible:Lb,CollapsibleTrigger:Rb,CollapsibleContent:zb,SlidingViews:Hb,SlidingView:Ub}),Gb=g();function Kb(e){return e.agent.id??qb(e)}function qb(e){return e?.agent.name??e?.agent.id??e?.agent.kind??`adapter`}var Jb=J(`text-[13px] [&_td]:px-3 [&_td]:py-1.5 [&_tbody_tr]:border-t [&_tbody_tr]:border-kumo-hairline`,`[&_th]:px-3 [&_th]:py-1.5 [&_th]:text-xs [&_th]:font-medium [&_th]:whitespace-nowrap [&_th]:text-kumo-subtle`),Yb=`[&_td]:whitespace-nowrap`;function Xb({children:e,className:t}){return(0,Y.jsx)(d_,{className:J(`data-table overflow-x-auto p-0`,t),children:(0,Y.jsx)($,{className:J(Jb,Yb),children:e})})}function Zb({children:e,wrap:t=!1}){return(0,Y.jsx)(`div`,{className:`nested overflow-x-auto rounded-md border border-kumo-hairline bg-kumo-base`,children:(0,Y.jsx)($,{className:J(Jb,!t&&Yb),children:e})})}function Qb({colSpan:e,children:t}){return(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:e,className:`text-kumo-subtle`,children:t})})}var $b=`table-link cursor-pointer text-left font-medium text-kumo-link hover:underline focus-visible:outline-2 focus-visible:outline-kumo-brand rounded-sm`,ex=`font-mono text-xs`;function tx({entries:e,selected:t=!1}){let n=e[0];return(0,Y.jsxs)($.Row,{variant:t?`selected`:`default`,"data-agent":Kb(n),children:[(0,Y.jsx)($.Cell,{className:ex,children:n.agent.id??`—`}),(0,Y.jsx)($.Cell,{className:`font-medium`,children:qb(n)}),(0,Y.jsx)($.Cell,{children:n.agent.kind}),(0,Y.jsx)($.Cell,{children:n.agent.runtimes.map(e=>`${e.name} (${e.kind})`).join(`, `)||`adapter default`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.length})]})}function nx({message:e,description:t}){return(0,Y.jsx)(ly,{size:`sm`,title:e,description:t,className:`py-12`})}function rx({catalog:e,selectedAgent:t}){let n=(0,_.useMemo)(()=>{let t=new Map;for(let n of e){let e=Kb(n);t.set(e,[...t.get(e)??[],n])}return[...t.values()]},[e]);return(0,_.useEffect)(()=>{t&&document.querySelector(`[data-agent="${CSS.escape(t)}"]`)?.scrollIntoView({block:`center`})},[t,n]),n.length?(0,Y.jsxs)(Xb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`ID`}),(0,Y.jsx)($.Head,{children:`Agent`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Runtimes`}),(0,Y.jsx)($.Head,{children:`Evals`})]})}),(0,Y.jsx)($.Body,{children:n.map(e=>(0,Y.jsx)(tx,{entries:e,selected:Kb(e[0])===t},Kb(e[0])))})]}):(0,Y.jsx)(nx,{message:`No agents are registered.`})}function ix({items:e}){return(0,Y.jsx)(`dl`,{className:`grid grid-cols-[max-content_minmax(0,1fr)] gap-x-4 gap-y-1 text-[13px]`,children:e.map(([e,t])=>(0,Y.jsxs)(`div`,{className:`contents`,children:[(0,Y.jsx)(`dt`,{className:`text-kumo-subtle`,children:e}),(0,Y.jsx)(`dd`,{className:`min-w-0 break-words text-kumo-default`,children:t})]},e))})}function ax({catalog:e,path:t}){let n=e.find(e=>e.path===t);return n?(0,Y.jsxs)(d_,{className:`flex max-w-3xl flex-col gap-3 p-4`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`h2`,{className:`text-base font-semibold text-kumo-strong`,children:n.name??n.id}),(0,Y.jsx)(`p`,{className:`${ex} text-kumo-subtle`,children:n.path})]}),(0,Y.jsx)(ix,{items:[[`Agent`,qb(n)],[`Runtimes`,n.agent.runtimes.map(e=>`${e.name} (${e.kind})`).join(`, `)||`default`],[`Trials`,n.trialCount],[`Scorers`,n.scorers.map(e=>`${e.name} (${e.kind})`).join(`, `)||`none`],[`Fixtures`,n.fixtures.map(e=>e.source).join(`, `)||`none`]]})]}):(0,Y.jsx)(nx,{message:`Eval not found: ${t}`})}function ox({fixture:e}){return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:ex,children:e.source}),(0,Y.jsx)($.Cell,{className:ex,children:e.destination??`—`}),(0,Y.jsx)($.Cell,{children:e.visibility??`dynamic`}),(0,Y.jsx)($.Cell,{className:ex,children:e.path})]})}function sx({catalog:e}){let t=e.flatMap(e=>e.fixtures.map(t=>({...t,path:e.path})));return t.length?(0,Y.jsxs)(Xb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Source`}),(0,Y.jsx)($.Head,{children:`Destination`}),(0,Y.jsx)($.Head,{children:`Visibility`}),(0,Y.jsx)($.Head,{children:`Used by`})]})}),(0,Y.jsx)($.Body,{children:t.map((e,t)=>(0,Y.jsx)(ox,{fixture:e},`${e.path}-${t}`))})]}):(0,Y.jsx)(nx,{message:`No fixtures are registered.`})}function cx({label:e,noun:t,page:n,pageSize:r,total:i,onPage:a}){if(i<=r)return null;let o=n*r+1,s=Math.min((n+1)*r,i);return(0,Y.jsx)(`nav`,{className:`pager flex items-center justify-end`,"aria-label":e,children:(0,Y.jsxs)(Fv,{page:n+1,setPage:e=>a(e-1),perPage:r,totalCount:i,children:[(0,Y.jsx)(Fv.Info,{children:()=>(0,Y.jsxs)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:[t,` `,o,`–`,s,` of `,i]})}),(0,Y.jsx)(Fv.Controls,{})]})})}function lx(e,t,n){let r=t.trim().toLowerCase();return r?e.flatMap(e=>{if(e.label.toLowerCase().includes(r))return[e];let t=e.values.filter(t=>t.label.toLowerCase().includes(r)||n.getAll(e.key).includes(t.key));return t.length?[{...e,values:t}]:[]}):[...e]}var ux=(e,...t)=>!e||t.some(t=>t.includes(e));function dx({facets:e,search:t,archivedCount:n=0,onToggleFacet:r,onField:i,onClear:a}){let[o,s]=(0,_.useState)(()=>typeof window>`u`||window.matchMedia(`(min-width: 901px)`).matches),[c,l]=(0,_.useState)(``),u=c.trim().toLowerCase(),d=lx(e,c,t),f=ux(u,`date`,`from`,`to`,`started`),p=n>0&&ux(u,`archived`,`removed`),m=[...t.keys()].filter(e=>e!==`q`).length;return(0,Y.jsxs)(`section`,{"aria-label":`Run filters`,className:`runs-filter-panel shrink-0 rounded-lg border border-kumo-line bg-kumo-base lg:w-72`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2`,children:[(0,Y.jsxs)(`button`,{type:`button`,"aria-expanded":o,className:`flex shrink-0 cursor-pointer items-center gap-1.5 text-[13px] font-semibold text-kumo-strong select-none`,onClick:()=>s(e=>!e),children:[(0,Y.jsx)(Tf,{"aria-hidden":!0,className:`size-3 text-kumo-subtle transition-transform ${o?`rotate-90`:``}`}),(0,Y.jsx)(Pf,{"aria-hidden":!0,className:`size-3.5 text-kumo-subtle`}),`Filters`,m?` (${m} active)`:``]}),(0,Y.jsx)($m,{type:`search`,size:`xs`,"aria-label":`Search filters`,placeholder:`Search filters`,value:c,className:`min-w-0 flex-1`,onChange:e=>{l(e.target.value),e.target.value&&s(!0)}}),(0,Y.jsx)(ip,{size:`xs`,variant:`ghost`,shape:`square`,className:`clear-filters shrink-0`,icon:(0,Y.jsx)(Ff,{}),"aria-label":`Clear filters`,title:`Clear filters`,disabled:!m,onClick:a})]}),o?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-kumo-hairline px-3 py-3`,children:[d.map(e=>(0,Y.jsxs)(`fieldset`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsx)(`legend`,{className:`mb-1 text-xs font-medium text-kumo-subtle`,children:e.label}),e.values.map(n=>(0,Y.jsx)(Rm,{className:`runs-choice`,checked:t.getAll(e.key).includes(n.key),onCheckedChange:()=>r(e.key,n.key),label:(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline justify-between gap-2 text-[13px]`,children:[(0,Y.jsx)(`span`,{className:`truncate`,children:n.label}),(0,Y.jsx)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:n.count})]})},n.key))]},e.key)),f?(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)($m,{type:`date`,size:`sm`,label:`From`,value:t.get(`from`)??``,onChange:e=>i(`from`,e.target.value)}),(0,Y.jsx)($m,{type:`date`,size:`sm`,label:`To`,value:t.get(`to`)??``,onChange:e=>i(`to`,e.target.value)})]}):null,p?(0,Y.jsx)(Rm,{className:`runs-choice`,checked:t.get(`archived`)===`show`,onCheckedChange:e=>i(`archived`,e?`show`:``),label:(0,Y.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline justify-between gap-2 text-[13px]`,children:[(0,Y.jsx)(`span`,{children:`Show archived`}),(0,Y.jsx)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:n})]})}):null,!d.length&&!f&&!p?(0,Y.jsxs)(`p`,{className:`text-[13px] text-kumo-subtle`,children:[`No filters match “`,c,`”.`]}):null]}):null]})}function fx({label:e,placeholder:t,value:n,count:r,onChange:i}){return(0,Y.jsxs)(`div`,{className:`search-field flex min-w-0 flex-wrap items-center gap-3`,children:[(0,Y.jsx)($m,{type:`search`,size:`sm`,"aria-label":e,placeholder:t,value:n,className:`w-full sm:w-80`,onChange:e=>i(e.target.value)}),(0,Y.jsx)(`span`,{className:`search-count text-xs text-kumo-subtle tabular-nums`,children:r})]})}function px(e,t){let[n,r]=(0,_.useState)(e);return{sort:n,toggleSort:e=>{r(t=>t.key===e?{key:e,direction:t.direction===`asc`?`desc`:`asc`}:{key:e,direction:`asc`}),t?.()}}}function mx({label:e,sortKey:t,sort:n,onSort:r,sticky:i}){let a=n.key===t,o=a?n.direction===`asc`?`ascending`:`descending`:void 0,s=a?n.direction===`asc`?Ef:Cf:Df;return(0,Y.jsx)($.Head,{"aria-sort":o,sticky:i,children:(0,Y.jsxs)(`button`,{type:`button`,className:`table-sort inline-flex items-center gap-1 whitespace-nowrap rounded font-medium hover:text-kumo-strong focus-visible:outline-2 focus-visible:outline-kumo-brand`,onClick:()=>r(t),children:[e,(0,Y.jsx)(s,{"aria-hidden":!0,className:a?`size-3`:`size-3 text-kumo-inactive`})]})})}function hx(e,t,n){return(0,_.useMemo)(()=>{let r=[...e];return r.sort((e,r)=>{let i=n(e,t.key),a=n(r,t.key),o=typeof i==`number`&&typeof a==`number`?i-a:String(i??``).localeCompare(String(a??``),void 0,{numeric:!0,sensitivity:`base`});return t.direction===`asc`?o:-o}),r},[e,t,n])}var gx={passed:`success`,failed:`error`,errored:`warning`,error:`warning`};function _x({status:e}){return(0,Y.jsx)(`span`,{className:`inline-flex`,"data-status":e,children:(0,Y.jsx)(Tr,{appearance:`dot`,variant:gx[e]??`neutral`,children:e})})}function vx({run:e,trials:t,onTrial:n}){let{sort:r,toggleSort:i}=px({key:`index`,direction:`asc`}),a=(0,_.useMemo)(()=>[...new Set(t.flatMap(e=>(e.scores??[]).map(e=>e.name)))].sort(),[t]),o=hx(t,r,(e,t)=>t.startsWith(`score:`)?(e.scores??[]).find(e=>e.name===t.slice(6))?.value:{index:e.index,status:e.status,aggregate:e.score,runtime:e.durationMs,started:e.startedAt}[t]);return(0,Y.jsxs)(Zb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)(mx,{label:`Trial`,sortKey:`index`,sort:r,onSort:i}),(0,Y.jsx)(mx,{label:`Status`,sortKey:`status`,sort:r,onSort:i}),(0,Y.jsx)(mx,{label:`Aggregate`,sortKey:`aggregate`,sort:r,onSort:i}),a.map(e=>(0,Y.jsx)(mx,{label:e,sortKey:`score:${e}`,sort:r,onSort:i},e)),(0,Y.jsx)(mx,{label:`Runtime`,sortKey:`runtime`,sort:r,onSort:i}),(0,Y.jsx)(mx,{label:`Started`,sortKey:`started`,sort:r,onSort:i}),(0,Y.jsx)($.Head,{className:`text-right`,children:`Details`})]})}),(0,Y.jsxs)($.Body,{children:[o.map(t=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.index+1}),(0,Y.jsx)($.Cell,{children:(0,Y.jsx)(_x,{status:t.status})}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.score??`—`}),a.map(e=>(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:(t.scores??[]).find(t=>t.name===e)?.value??`—`},e)),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:t.durationMs===void 0?`—`:`${t.durationMs}ms`}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:new Date(t.startedAt).toLocaleString()}),(0,Y.jsx)($.Cell,{className:`text-right`,children:(0,Y.jsxs)(ip,{size:`xs`,variant:`secondary`,className:`view-trial`,onClick:()=>n(e,t),children:[`View trial`,(0,Y.jsx)(bf,{"aria-hidden":!0,className:`size-3`})]})})]},t.id)),o.length?null:(0,Y.jsx)(Qb,{colSpan:a.length+6,children:`No trials saved yet.`})]})]})}function yx(e){if(e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e))return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(yx).join(`,`)}]`;if(typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype)return`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${yx(e[t])}`).join(`,`)}}`;throw Error(`Matrix parameters must be finite JSON values`)}var bx=`@missing`,xx=e=>`p.${e}`;function Sx(e,t,n){let r=e.get(t);r?r.count++:e.set(t,{key:t,label:n,count:1})}function Cx(e){return[{key:`eval`,label:`Eval`},{key:`matrix`,label:`Matrix`},{key:`status`,label:`Status`},...[...new Set(e.flatMap(e=>Object.keys(e.parameters??{})))].sort().map(e=>({key:xx(e),label:e}))].map(({key:t,label:n})=>{let r=new Map;for(let n of e){let e=t===`eval`?n.evalId:t===`matrix`?n.matrixId:t===`status`?n.status:n.parameters?.[t.slice(2)],i=t===`eval`||t===`status`||(t===`matrix`?n.matrixId!==void 0:Object.hasOwn(n.parameters??{},t.slice(2)));Sx(r,i?yx(e):bx,i?String(typeof e==`string`?e:JSON.stringify(e)):`Missing`)}return{key:t,label:n,values:[...r.values()].sort((e,t)=>e.label.localeCompare(t.label,void 0,{numeric:!0}))}})}function wx(e,t={}){let n=new URLSearchParams;n.append(`eval`,yx(e));for(let[e,r]of Object.entries(t))r!=null&&n.append(xx(e),yx(r));return`/runs?${n}`}function Tx(e,t){let n=[...t.keys()].filter(e=>[`eval`,`matrix`,`status`].includes(e)||e.startsWith(`p.`)),r=t.get(`from`),i=t.get(`to`);return e.filter(e=>r&&e.startedAt.slice(0,10)<r||i&&e.startedAt.slice(0,10)>i?!1:n.every(n=>{let r=t.getAll(n),i=n===`eval`||n===`status`||(n===`matrix`?e.matrixId!==void 0:Object.hasOwn(e.parameters??{},n.slice(2))),a=n===`eval`?e.evalId:n===`matrix`?e.matrixId:n===`status`?e.status:e.parameters?.[n.slice(2)],o=i?yx(a):bx;return r.includes(o)}))}function Ex(e,t){let[n,r]=(0,_.useState)(()=>new URLSearchParams),i=e??n,a=t??r,o=i.get(`q`)??``,[s,c]=(0,_.useState)(o);return(0,_.useEffect)(()=>c(o),[o]),(0,_.useEffect)(()=>{if(s===o)return;let e=setTimeout(()=>{let e=new URLSearchParams(i);s?e.set(`q`,s):e.delete(`q`),a(e)},250);return()=>clearTimeout(e)},[s,o,i,a]),{activeSearch:i,query:s,setQuery:c,setField:(e,t)=>{let n=new URLSearchParams(i);t?n.set(e,t):n.delete(e),a(n)},toggleFacet:(e,t)=>{let n=new URLSearchParams(i),r=n.getAll(e);n.delete(e);for(let i of r.filter(e=>e!==t))n.append(e,i);r.includes(t)||n.append(e,t),a(n)},clearFilters:()=>a(new URLSearchParams)}}function Dx(e,t,n){let[r,i]=(0,_.useState)({});return(0,_.useEffect)(()=>{if(!n||!t.some(e=>e.id===n))return;let r=!0;return e.listTrials(n).then(e=>{r&&i(t=>({...t,[n]:e}))}),()=>{r=!1}},[e,t,n]),{trials:r,loadTrials:t=>{r[t]||e.listTrials(t).then(e=>i(n=>({...n,[t]:e})))}}}var Ox=50,kx=9;function Ax(e){return typeof e==`string`?e:JSON.stringify(e)??String(e)}function jx(e){return[...new Set(e.flatMap(e=>Object.keys(e.parameters??{})))].sort()}function Mx(e,t,n,r){let i=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return i.length?e.filter(e=>{let t=r.find(t=>t.id===e.evalId),a=n.find(t=>t.id===e.suiteId),o=Object.entries(e.parameters??{}).flatMap(([e,t])=>[e,Ax(t)]),s=[e.id,e.evalId,t?.name,e.suiteId,a?.name,e.matrixId,t?.agent.name,t?.agent.kind,e.status,e.score,e.startedAt,...o].map(Ax).join(` `).toLowerCase();return i.every(e=>s.includes(e))}):[...e]}function Nx({api:e,runs:t,suites:n,catalog:r,onTrial:i,onOpenRun:a,selectedRunId:o,search:s,onSearchChange:c}){let{activeSearch:l,query:u,setQuery:d,setField:f,toggleFacet:p,clearFilters:m}=Ex(s,c),{trials:h,loadTrials:g}=Dx(e,t,o),v=l.get(`archived`)===`show`,y=t.filter(e=>e.archived).length,b=(0,_.useMemo)(()=>v?t:t.filter(e=>!e.archived),[t,v]),x=(0,_.useMemo)(()=>Cx(b),[b]),S=(0,_.useMemo)(()=>jx(b),[b]),C=Mx(Tx(b,l),u,n,r),[w,T]=(0,_.useState)(0),{sort:E,toggleSort:D}=px({key:`started`,direction:`desc`},()=>T(0)),O=e=>r.find(t=>t.id===e.evalId),k=e=>n.find(t=>t.id===e.suiteId)?.name,A=hx(C,E,(e,t)=>Px(e,t,O(e),k(e))),j=Math.max(1,Math.ceil(A.length/Ox)),M=Math.min(w,j-1),N=A.slice(M*Ox,(M+1)*Ox),P=kx+S.length,F=e=>{a(e),g(e.id)},I=(e,t,n)=>(0,Y.jsx)(mx,{label:e,sortKey:t,sort:E,onSort:D,sticky:n});return t.length?(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4 lg:flex-row lg:items-start`,children:[(0,Y.jsx)(dx,{facets:x,search:l,archivedCount:y,onToggleFacet:p,onField:f,onClear:m}),(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2`,children:[(0,Y.jsx)(fx,{label:`Filter runs`,placeholder:`Eval, parameter, agent or status`,value:u,count:`${A.length} of ${b.length} runs`,onChange:d}),(0,Y.jsxs)(Xb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[I(`Run`,`run`,`left`),I(`Status`,`status`),I(`Eval`,`eval`),S.map(e=>(0,Y.jsx)(mx,{label:e,sortKey:`param:${e}`,sort:E,onSort:D},e)),I(`Agent`,`agent`),I(`Trials`,`trials`),I(`Score`,`score`),I(`Runtime`,`runtime`),I(`Started`,`started`),I(`Suite`,`suite`)]})}),(0,Y.jsxs)($.Body,{children:[N.map(e=>{let t=o===e.id;return(0,Y.jsxs)(_.Fragment,{children:[(0,Y.jsx)(Fx,{run:e,evaluation:O(e),suiteName:k(e),parameterColumns:S,expanded:t,onToggle:()=>F(e)}),t?(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:P,className:`bg-kumo-elevated`,children:(0,Y.jsx)(vx,{run:e,trials:h[e.id]??[],onTrial:i})})}):null]},e.id)}),A.length?null:(0,Y.jsx)(Qb,{colSpan:P,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[`No matching runs.`,(0,Y.jsx)(ip,{size:`xs`,variant:`ghost`,onClick:m,children:`Clear filters`})]})})]})]}),(0,Y.jsx)(cx,{label:`Run pages`,noun:`Runs`,page:M,pageSize:Ox,total:A.length,onPage:T})]})]}):(0,Y.jsx)(nx,{message:`No runs yet. Select an eval or suite to start one.`})}function Px(e,t,n,r){if(t.startsWith(`param:`)){let n=e.parameters?.[t.slice(6)];return n===void 0?void 0:typeof n==`number`?n:Ax(n)}return{run:e.id,suite:r??e.suiteId,eval:n?.name??e.evalId,agent:n?.agent.name??n?.agent.kind??`Unnamed agent`,status:e.status,trials:e.completedTrials,score:e.score,runtime:e.durationMs,started:e.startedAt}[t]}function Fx({run:e,evaluation:t,suiteName:n,parameterColumns:r,expanded:i,onToggle:a}){return(0,Y.jsxs)($.Row,{variant:i?`selected`:`default`,children:[(0,Y.jsx)($.Cell,{sticky:`left`,children:(0,Y.jsx)(`button`,{type:`button`,className:`${$b} ${ex}`,"aria-expanded":i,title:e.id,onClick:a,children:e.id.slice(0,8)})}),(0,Y.jsx)($.Cell,{children:(0,Y.jsx)(_x,{status:e.status})}),(0,Y.jsxs)($.Cell,{className:`font-medium`,children:[t?.name??e.evalId,e.archived?(0,Y.jsx)(`span`,{className:`ml-2 rounded border border-kumo-line px-1 text-[11px] font-normal text-kumo-subtle`,title:`This eval is no longer in the project (evalkit tidy)`,children:`archived`}):null]}),r.map(t=>(0,Y.jsx)($.Cell,{className:ex,children:Object.hasOwn(e.parameters??{},t)?Ax(e.parameters?.[t]):`—`},t)),(0,Y.jsx)($.Cell,{children:t?.agent.name??t?.agent.kind??`Unnamed agent`}),(0,Y.jsxs)($.Cell,{className:`tabular-nums`,children:[e.completedTrials,`/`,e.requestedTrials]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.score??`—`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.durationMs===void 0?`—`:`${e.durationMs}ms`}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:new Date(e.startedAt).toLocaleString()}),(0,Y.jsx)($.Cell,{children:n??`—`})]})}function Ix({message:e,title:t}){return(0,Y.jsx)(gp,{variant:`error`,size:`sm`,role:`alert`,title:t,description:e})}function Lx({id:e,evaluation:t,parameters:n=[],trials:r,onRun:i,runDisabled:a=!1,onOpen:o,status:s,cellParameters:c}){let l=wx(t?.id??e,c),u=t?.name??e,d=t?.path??e;return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{children:(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[o?(0,Y.jsx)(`button`,{type:`button`,className:$b,onClick:o,children:u}):(0,Y.jsx)(`span`,{className:`font-medium`,children:u}),d===u?null:(0,Y.jsx)(`span`,{className:`${ex} text-kumo-subtle`,children:d})]})}),n.map((e,t)=>(0,Y.jsx)($.Cell,{className:ex,children:typeof e==`string`?e:JSON.stringify(e)},t)),(0,Y.jsx)($.Cell,{children:t?(0,Y.jsx)(Di,{href:`/agents?agent=${encodeURIComponent(Kb(t))}`,children:qb(t)}):qb(t)}),(0,Y.jsx)($.Cell,{children:t?.agent.runtimes.map(e=>e.name).join(`, `)||`default`}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:r??t?.trialCount??`—`}),(0,Y.jsx)($.Cell,{children:s?(0,Y.jsx)(Di,{href:l,title:`Show these runs`,children:(0,Y.jsx)(_x,{status:s})}):`—`}),(0,Y.jsx)($.Cell,{className:`text-right`,children:(0,Y.jsxs)(`div`,{className:`inline-flex items-center justify-end gap-2`,children:[(0,Y.jsx)(ap,{size:`xs`,variant:`secondary`,icon:(0,Y.jsx)(Rf,{}),href:l,children:`Runs`}),i||a?(0,Y.jsx)(ip,{size:`xs`,variant:`secondary`,icon:(0,Y.jsx)(Bf,{weight:`fill`}),disabled:a,title:a?`Matrix configuration is still loading`:void 0,onClick:e=>{e.stopPropagation(),i?.()},children:`Run eval`}):null]})})]})}function Rx({nested:e,children:t}){return e?(0,Y.jsx)(Zb,{children:t}):(0,Y.jsx)(Xb,{children:t})}function zx({axes:e,sort:t,onSort:n,planned:r=!1}){let i=(e,r)=>(0,Y.jsx)(mx,{label:e,sortKey:r,sort:t,onSort:n});return(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[i(`Eval`,`eval`),e.map(e=>(0,Y.jsx)(mx,{label:e,sortKey:`axis:${e}`,sort:t,onSort:n},e)),i(`Agent`,`agent`),r?(0,Y.jsx)($.Head,{children:`Runtime`}):i(`Runtime`,`runtime`),i(`Trials`,`trials`),r?(0,Y.jsx)($.Head,{children:`Latest run`}):i(`Latest run`,`status`),(0,Y.jsx)($.Head,{className:`text-right`,children:`Actions`})]})})}var Bx=50;function Vx({api:e,evalIds:t,catalog:n,matrix:r,runs:i,nested:a=!1,onRun:o,onOpenEval:s}){let[c,l]=(0,_.useState)(``),[u,d]=(0,_.useState)(0),{sort:f,toggleSort:p}=px({key:`eval`,direction:`asc`},()=>d(0)),[m,h]=(0,_.useState)(),[g,v]=(0,_.useState)(),y=r.dimensions??Object.keys(r.parameters),b=t.join(`,`);(0,_.useEffect)(()=>{let t=!0;return v(void 0),h(void 0),e.listMatrixCells({evalIds:b.split(`,`).filter(Boolean),query:c,offset:u*Bx,sort:f.key,direction:f.direction}).then(e=>{t&&h(e)}).catch(e=>{t&&v(e instanceof Error?e.message:`Unable to list matrix cells`)}),()=>{t=!1}},[e,b,c,u,f]);let x=new Map(n.map(e=>[e.id,e])),S=e=>i.filter(t=>t.matrixId===r.id&&t.cellKey===e).sort((e,t)=>t.startedAt.localeCompare(e.startedAt))[0]?.status,C=y.length+6;return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(fx,{label:`Filter matrix cells`,placeholder:`Eval, parameter or agent`,value:c,count:`${m?.total??0} of ${m?.planned??0} eligible cells`,onChange:e=>{l(e),d(0)}}),g?(0,Y.jsx)(Ix,{message:g}):null,(0,Y.jsxs)(Rx,{nested:a,children:[(0,Y.jsx)(zx,{axes:y,sort:f,onSort:p,planned:!0}),(0,Y.jsxs)($.Body,{children:[m?.cells.map(e=>{let t=x.get(e.evalId);return(0,Y.jsx)(Lx,{id:e.evalId,evaluation:t,parameters:y.map(t=>e.parameters[t]===null?`None`:e.parameters[t]),trials:r.trials,status:S(e.key),cellParameters:e.parameters,onRun:t?()=>o(t.path,Object.fromEntries(y.map(t=>[t,e.parameters[t]]))):void 0,onOpen:t?()=>s(t):void 0},e.key)}),!m&&!g?(0,Y.jsx)(Qb,{colSpan:C,children:`Loading cells…`}):null,m&&!m.cells.length?(0,Y.jsx)(Qb,{colSpan:C,children:`No matching cells.`}):null]})]}),(0,Y.jsx)(cx,{label:`Matrix cells pages`,noun:`Cells`,page:u,pageSize:Bx,total:m?.total??0,onPage:d})]})}var Hx=50;function Ux(e,t,n,r){let i=t.reduce((e,[,t])=>e*t.length,1),a=e.length*i;if(!Number.isSafeInteger(a))throw Error(`Matrix exceeds safe cell count`);let o=[];for(let s=n;s<Math.min(n+r,a);s++){let n=e[Math.floor(s/i)],r=s%i,a={},c=Array(t.length);for(let e=t.length-1;e>=0;e--){let[n,i]=t[e],o=i[r%i.length];a[n]=o,c[e]=o,r=Math.floor(r/i.length)}o.push({id:n,parameters:a,values:c})}return{rows:o,total:a}}function Wx(e,t,n){return JSON.stringify([e,t.map(([e])=>n[e])])}function Gx(e){return typeof e==`string`?e:JSON.stringify(e)??String(e)}function Kx(e,t,n){let r=t.trim().toLowerCase().split(/\s+/).filter(Boolean);return r.length?e.filter(e=>{let t=n(e).map(Gx).join(` `).toLowerCase();return r.every(e=>t.includes(e))}):[...e]}function qx(e){let t=e.matrix?e.evalIds.length*Object.values(e.matrix.parameters).reduce((e,t)=>e*t.length,1):0;return e.matrix&&(e.matrix.constrained||t>1e3)?(0,Y.jsx)(Vx,{...e,matrix:e.matrix}):(0,Y.jsx)(Jx,{...e})}function Jx({evalIds:e,catalog:t,matrix:n,runs:r,nested:i=!1,onRun:a,onOpenEval:o}){let[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(``),{sort:d,toggleSort:f}=px({key:`eval`,direction:`asc`},()=>c(0)),p=n?Object.entries(n.parameters):[],m=new Map(t.map(e=>[e.id,e])),h=new Map;for(let e of r){if(n&&(e.matrixId!==n.id||!e.parameters))continue;let t=n?Wx(e.evalId,p,e.parameters):e.evalId,r=h.get(t);(!r||r.startedAt<=e.startedAt)&&h.set(t,e)}let g=e=>m.get(e.id),v=e=>h.get(n?Wx(e.id,p,e.parameters):e.id)?.status,{total:y}=Ux(e,p,0,0),b=hx(Kx(Ux(e,p,0,y).rows,l,e=>{let t=g(e);return[t?.name??e.id,e.id,t?.path??e.id,...e.values,qb(t),t?.agent.runtimes.map(e=>e.name).join(`, `)??`default`,v(e)??`not run`]}),d,(e,t)=>{let r=g(e);return t.startsWith(`axis:`)?Gx(e.parameters[t.slice(5)]):t===`eval`?r?.name??e.id:t===`agent`?qb(r):t===`runtime`?r?.agent.runtimes.map(e=>e.name).join(`, `)??`default`:t===`trials`?n?.trials??r?.trialCount??0:t===`status`?v(e)??`not run`:``}),x=Math.max(1,Math.ceil(b.length/Hx)),S=Math.min(s,x-1),C=b.slice(S*Hx,(S+1)*Hx);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(fx,{label:`Filter matrix cells`,placeholder:`Eval, parameter, agent or status`,value:l,count:`${b.length} of ${y} cells`,onChange:e=>{u(e),c(0)}}),(0,Y.jsxs)(Rx,{nested:i,children:[(0,Y.jsx)(zx,{axes:p.map(([e])=>e),sort:d,onSort:f}),(0,Y.jsx)($.Body,{children:C.length?C.map(e=>{let t=g(e);return(0,Y.jsx)(Lx,{id:e.id,evaluation:t,parameters:e.values,trials:n?.trials,status:v(e),cellParameters:e.parameters,onRun:t&&n!==void 0?()=>a(t.path,n?e.parameters:void 0):void 0,runDisabled:!!t&&n===void 0,onOpen:t?()=>o(t):void 0},Wx(e.id,p,e.parameters))}):(0,Y.jsx)(Qb,{colSpan:p.length+6,children:`No matching cells.`})})]}),(0,Y.jsx)(cx,{label:`Matrix cells pages`,noun:`Cells`,page:S,pageSize:Hx,total:b.length,onPage:c})]})}function Yx({suite:e,expanded:t,onToggle:n,onRun:r}){return(0,Y.jsxs)($.Row,{variant:t?`selected`:`default`,children:[(0,Y.jsx)($.Cell,{children:(0,Y.jsxs)(`button`,{type:`button`,className:`${$b} inline-flex items-center gap-1.5`,"aria-expanded":t,onClick:n,children:[(0,Y.jsx)(Tf,{"aria-hidden":!0,className:`size-3 transition-transform ${t?`rotate-90`:``}`}),e.name??e.id??`Unnamed suite`]})}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.evalIds.length}),(0,Y.jsx)($.Cell,{className:`text-right`,children:(0,Y.jsx)(ip,{size:`xs`,variant:`secondary`,icon:(0,Y.jsx)(Bf,{weight:`fill`}),disabled:!r,title:r?void 0:`Run matrix cells individually from their rows`,onClick:e=>{e.stopPropagation(),r?.()},children:`Run suite`})})]})}function Xx({api:e,suites:t,catalog:n,matrix:r,runs:i=[],selectedSuiteId:a,onOpenSuite:o,onOpenEval:s}){let[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)(),f=e=>t=>d(t instanceof Error?t.message:e),p=(t,n)=>{d(void 0),e.runEval(t,n).catch(f(`Unable to start eval`))},m=t=>{d(void 0),e.runSuite(t).catch(f(`Unable to start suite`))},h=a??c,g=n.filter(e=>!e.suiteId&&!t.some(t=>t.evalIds.includes(e.id)));return!t.length&&!g.length?(0,Y.jsx)(nx,{message:`No evals or suites are loaded.`}):(0,Y.jsxs)(Y.Fragment,{children:[r?(0,Y.jsx)(`p`,{className:`text-[13px] text-kumo-subtle`,children:`Each row is one configured matrix cell. Run one row at a time; use the CLI dry-run for larger selections.`}):null,u?(0,Y.jsx)(Ix,{message:u}):null,t.length>0?(0,Y.jsxs)(`section`,{"aria-label":`Suites`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-kumo-strong`,children:`Suites`}),(0,Y.jsxs)(Xb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Suite`}),(0,Y.jsx)($.Head,{children:`Evals`}),(0,Y.jsx)($.Head,{className:`text-right`,children:`Actions`})]})}),(0,Y.jsx)($.Body,{children:t.map(t=>(0,Y.jsxs)(_.Fragment,{children:[(0,Y.jsx)(Yx,{suite:t,expanded:h===t.id,onToggle:()=>{l(h===t.id?void 0:t.id),o(t.id)},onRun:r===null?()=>m(t.id):void 0}),h===t.id?(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:3,className:`bg-kumo-elevated`,children:(0,Y.jsx)(qx,{api:e,evalIds:t.evalIds,catalog:n,matrix:r,runs:i,nested:!0,onRun:p,onOpenEval:s})})}):null]},t.id))})]})]}):null,g.length>0?(0,Y.jsxs)(`section`,{"aria-label":`Standalone evals`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-kumo-strong`,children:`Standalone evals`}),(0,Y.jsx)(qx,{api:e,evalIds:g.map(e=>e.id),catalog:n,matrix:r,runs:i,onRun:p,onOpenEval:s})]}):null]})}function Zx({artifact:e}){return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`${ex} break-all`,children:e.path}),(0,Y.jsx)($.Cell,{children:e.kind}),(0,Y.jsx)($.Cell,{className:`whitespace-nowrap tabular-nums`,children:e.size===void 0?`—`:`${e.size} B`})]})}function Qx(e){return e.kind===`message`&&e.role===`user`?`User message`:e.kind===`message`&&e.role===`assistant`?`Assistant message`:e.kind.includes(`scorer`)?`Scorer · ${e.kind.replace(`scorer-`,``)}`:e.kind.includes(`tool`)?`Tool · ${e.kind.replace(`tool-`,``)}`:e.kind.replaceAll(`-`,` `)}var $x=`overflow-x-auto rounded-md bg-kumo-elevated px-3 py-2 font-mono text-xs whitespace-pre-wrap break-words text-kumo-default`;function eS(e){return typeof e==`string`?e:JSON.stringify(e,null,2)}function tS({event:e,index:t}){let n=Object.entries(e).filter(([e])=>![`source`,`kind`,`timestamp`,`content`,`error`].includes(e));return(0,Y.jsxs)(`article`,{className:`event-card flex flex-col gap-2 rounded-lg border border-kumo-line bg-kumo-base px-3 py-2.5`,children:[(0,Y.jsxs)(`header`,{className:`flex items-baseline gap-2`,children:[(0,Y.jsxs)(`span`,{className:`font-mono text-xs text-kumo-subtle tabular-nums`,children:[`#`,t+1]}),(0,Y.jsx)(`h3`,{className:`text-[13px] font-semibold text-kumo-strong`,children:Qx(e)}),(0,Y.jsxs)(`span`,{className:`ml-auto text-xs text-kumo-subtle`,children:[e.source,` · `,new Date(e.timestamp).toLocaleTimeString()]})]}),`content`in e?(0,Y.jsx)(`pre`,{className:$x,children:eS(e.content)}):null,`error`in e?(0,Y.jsx)(`pre`,{className:`${$x} text-kumo-danger`,children:eS(e.error)}):null,n.length?(0,Y.jsx)(`dl`,{className:`grid grid-cols-[max-content_minmax(0,1fr)] gap-x-3 gap-y-0.5 text-xs`,children:n.map(([e,t])=>(0,Y.jsxs)(`div`,{className:`contents`,children:[(0,Y.jsx)(`dt`,{className:`text-kumo-subtle`,children:e}),(0,Y.jsx)(`dd`,{className:`font-mono break-words whitespace-pre-wrap`,children:eS(t)})]},e))}):null]})}function nS({api:e,selected:t,evalName:n,onWorkspace:r}){let[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)(),[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)([]);if((0,_.useEffect)(()=>{if(!t)return;let n=!0;return s(void 0),a([]),l(void 0),d([]),Promise.all([e.getTrialEvents(t.run.id,t.trial.id),e.getTrial(t.run.id,t.trial.id),e.listArtifacts(t.run.id,t.trial.id)]).then(([e,t,r])=>{n&&(a(e),l(t),d(r))}).catch(e=>{n&&s(e instanceof Error?e.message:`Unable to load trial details`)}),()=>{n=!1}},[e,t]),!t)return(0,Y.jsx)(nx,{message:`Select a trial from a run to inspect it.`});let{run:f,trial:p}=t;return(0,Y.jsxs)(`section`,{className:`trial-inspector grid gap-5 xl:grid-cols-[minmax(320px,380px)_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`aside`,{className:`trial-overview flex min-w-0 flex-col gap-4`,children:[(0,Y.jsx)(ix,{items:[[`Run`,(0,Y.jsx)(`span`,{className:ex,children:f.id},`run`)],[`Eval`,n??`Unnamed eval`],[`Trial`,p.index+1],[`Status`,(0,Y.jsx)(_x,{status:p.status},`status`)],[`Aggregate score`,p.score??`—`],[`Runtime`,p.durationMs===void 0?`—`:`${p.durationMs}ms`],[`Events`,i.length]]}),(0,Y.jsxs)(ip,{size:`sm`,variant:`secondary`,className:`open-workspace self-start`,onClick:r,children:[`Open candidate workspace`,(0,Y.jsx)(bf,{"aria-hidden":!0,className:`size-3.5`})]}),p.checkpoints?.length?(0,Y.jsx)(rS,{title:`Checkpoints`,children:(0,Y.jsx)(iS,{checkpoints:p.checkpoints})}):null,(0,Y.jsxs)(rS,{title:`Final scoring`,children:[(0,Y.jsx)(oS,{scores:p.scores}),p.skippedScorers?.length?(0,Y.jsxs)(`p`,{className:`text-xs text-kumo-subtle`,children:[`Skipped final scorers: `,p.skippedScorers.join(`, `)]}):null]}),u.length?(0,Y.jsx)(rS,{title:`Artifacts`,children:(0,Y.jsxs)(Zb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Path`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Size`})]})}),(0,Y.jsx)($.Body,{children:u.map(e=>(0,Y.jsx)(Zx,{artifact:e},e.path))})]})}):null,c?(0,Y.jsxs)(`details`,{className:`raw-details text-xs`,children:[(0,Y.jsx)(`summary`,{className:`cursor-pointer font-medium text-kumo-subtle select-none`,children:`Raw trial summary`}),(0,Y.jsx)(`pre`,{className:`mt-2 overflow-x-auto rounded-md bg-kumo-elevated px-3 py-2 font-mono`,children:JSON.stringify(c.summary,null,2)})]}):null]}),(0,Y.jsxs)(`section`,{className:`timeline flex min-w-0 flex-col gap-2`,children:[o?(0,Y.jsx)(Ix,{title:`Unable to load trial details`,message:o}):null,(0,Y.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-kumo-strong`,children:`Event timeline`}),(0,Y.jsxs)(`span`,{className:`text-xs text-kumo-subtle tabular-nums`,children:[i.length,` events`]})]}),i.map((e,t)=>(0,Y.jsx)(tS,{event:e,index:t},`${e.timestamp}-${t}`))]})]})}function rS({title:e,children:t}){return(0,Y.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-kumo-strong`,children:e}),t]})}function iS({checkpoints:e}){return(0,Y.jsxs)(Zb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Step`}),(0,Y.jsx)($.Head,{children:`Rule`}),(0,Y.jsx)($.Head,{children:`Value`}),(0,Y.jsx)($.Head,{children:`Result`})]})}),(0,Y.jsx)($.Body,{children:e.map(e=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.step+1}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsxs)(`span`,{className:`text-kumo-subtle`,children:[e.kind,`:`]}),` `,e.name,e.matchedToolCall?` (event ${e.matchedToolCall.eventIndex+1})`:``]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.value??`—`}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsx)(_x,{status:e.status}),e.error?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-kumo-danger`,children:e.error.message}):null]})]},`${e.step}-${e.name}`))})]})}function aS(e){return e.error?`error`:e.passed===!0?`passed`:e.passed===!1?`failed`:`not scored`}function oS({scores:e}){return(0,Y.jsxs)(Zb,{wrap:!0,children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Scorer`}),(0,Y.jsx)($.Head,{children:`Value`}),(0,Y.jsx)($.Head,{children:`Result`})]})}),(0,Y.jsxs)($.Body,{children:[e.map(e=>(0,Y.jsxs)($.Row,{children:[(0,Y.jsxs)($.Cell,{children:[e.kind?(0,Y.jsxs)(`span`,{className:`text-kumo-subtle`,children:[e.kind,`: `]}):null,e.name]}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.value??`—`}),(0,Y.jsxs)($.Cell,{children:[(0,Y.jsx)(_x,{status:aS(e)}),e.error?(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-kumo-danger`,children:e.error.message}):null]})]},e.name)),e.length?null:(0,Y.jsx)($.Row,{children:(0,Y.jsx)($.Cell,{colSpan:3,className:`text-kumo-subtle`,children:`No final scorers.`})})]})]})}function sS({api:e,selected:t}){let[n,r]=(0,_.useState)(),[i,a]=(0,_.useState)();return(0,_.useEffect)(()=>{if(!t)return;let n=!0;return r(void 0),a(void 0),e.listWorkspace(t.run.id,t.trial.id).then(e=>{n&&r(e)}).catch(e=>{n&&a(e instanceof Error?e.message:`Unable to load workspace`)}),()=>{n=!1}},[e,t]),t?(0,Y.jsxs)(`section`,{className:`workspace-inspector flex flex-col gap-2`,children:[i?(0,Y.jsx)(Ix,{message:i}):null,(0,Y.jsxs)(Xb,{children:[(0,Y.jsx)($.Header,{variant:`compact`,children:(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Head,{children:`Path`}),(0,Y.jsx)($.Head,{children:`Kind`}),(0,Y.jsx)($.Head,{children:`Size`})]})}),(0,Y.jsxs)($.Body,{children:[n?.map(e=>{let t=e.kind===`directory`?Mf:jf;return(0,Y.jsxs)($.Row,{children:[(0,Y.jsx)($.Cell,{className:ex,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,Y.jsx)(t,{"aria-hidden":!0,className:`size-3.5 text-kumo-subtle`}),e.path]})}),(0,Y.jsx)($.Cell,{children:e.kind}),(0,Y.jsx)($.Cell,{className:`tabular-nums`,children:e.size===void 0?`—`:`${e.size} B`})]},e.path)}),!n&&!i?(0,Y.jsx)(Qb,{colSpan:3,children:`Loading workspace…`}):null,n&&!n.length?(0,Y.jsx)(Qb,{colSpan:3,children:`The workspace is empty.`}):null]})]})]}):(0,Y.jsx)(nx,{message:`Select a trial to inspect its workspace.`})}function cS({api:e,catalog:t,suites:n,matrix:r,runs:i,selected:a,onTrial:o}){let s=$e();return(0,Y.jsxs)(Tt,{children:[(0,Y.jsx)(Ct,{path:`/suites`,element:(0,Y.jsx)(Xx,{api:e,suites:n,catalog:t,matrix:r,runs:i,onOpenSuite:e=>s(`/suites/${encodeURIComponent(e)}`),onOpenEval:e=>s(`/evals/${encodeURIComponent(e.path)}`)})}),(0,Y.jsx)(Ct,{path:`/suites/:suiteId`,element:(0,Y.jsx)(lS,{api:e,suites:n,catalog:t,matrix:r,runs:i})}),(0,Y.jsx)(Ct,{path:`/evals/*`,element:(0,Y.jsx)(dS,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/agents`,element:(0,Y.jsx)(uS,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/fixtures`,element:(0,Y.jsx)(sx,{catalog:t})}),(0,Y.jsx)(Ct,{path:`/runs`,element:(0,Y.jsx)(fS,{api:e,catalog:t,suites:n,runs:i,onTrial:o})}),(0,Y.jsx)(Ct,{path:`/runs/:runUuid`,element:(0,Y.jsx)(fS,{api:e,catalog:t,suites:n,runs:i,onTrial:o})}),(0,Y.jsx)(Ct,{path:`/trials/:trialUuid`,element:(0,Y.jsx)(pS,{api:e,catalog:t,selected:a})}),(0,Y.jsx)(Ct,{path:`/workspaces/:trialUuid`,element:(0,Y.jsx)(sS,{api:e,selected:a})}),(0,Y.jsx)(Ct,{path:`*`,element:(0,Y.jsx)(Xx,{api:e,suites:n,catalog:t,matrix:r,runs:i,onOpenSuite:e=>s(`/suites/${encodeURIComponent(e)}`),onOpenEval:e=>s(`/evals/${encodeURIComponent(e.path)}`)})})]})}function lS(e){let{suiteId:t}=tt(),n=$e();return(0,Y.jsx)(Xx,{...e,selectedSuiteId:t,onOpenSuite:()=>void 0,onOpenEval:e=>n(`/evals/${encodeURIComponent(e.path)}`)})}function uS({catalog:e}){let[t]=yn();return(0,Y.jsx)(rx,{catalog:e,selectedAgent:t.get(`agent`)??void 0})}function dS({catalog:e}){let t=Xe();return(0,Y.jsx)(ax,{catalog:e,path:decodeURIComponent(t.pathname.slice(7))})}function fS(e){let t=$e(),{runUuid:n}=tt(),[r,i]=yn();return(0,Y.jsx)(Nx,{...e,search:r,onSearchChange:e=>i(e,{replace:!0}),selectedRunId:n,onTrial:(n,i)=>{e.onTrial(n,i);let a=new URLSearchParams(r);a.set(`trial`,i.id),a.delete(`view`),t({pathname:`/runs/${encodeURIComponent(n.id)}`,search:a.toString()})},onOpenRun:e=>t({pathname:`/runs/${encodeURIComponent(e.id)}`,search:r.toString()})})}function pS({api:e,catalog:t,selected:n}){let r=$e();return(0,Y.jsx)(nS,{api:e,evalName:t.find(e=>e.id===n?.run.evalId)?.name??n?.run.evalId,selected:n,onWorkspace:()=>n&&r(`/workspaces/${encodeURIComponent(n.trial.id)}`)})}var mS=(0,_.forwardRef)(function({href:e=`/`,...t},n){return(0,Y.jsx)(pn,{ref:n,to:e,...t})}),hS=[{label:`Suites & evals`,href:`/suites`,icon:Hf,matches:[`/suites`,`/evals`]},{label:`Agents`,href:`/agents`,icon:Vf,matches:[`/agents`]},{label:`Fixtures`,href:`/fixtures`,icon:Nf,matches:[`/fixtures`]},{label:`Runs`,href:`/runs`,icon:kf,matches:[`/runs`,`/trials`,`/workspaces`]}];function gS(e){return hS.find(t=>t.matches.some(t=>e.startsWith(t)))??hS[0]}function _S(e){return e.startsWith(`/trials/`)?`Trial detail`:e.startsWith(`/workspaces/`)?`Candidate workspace`:e.startsWith(`/evals/`)?`Eval detail`:gS(e).label}function vS({children:e}){let{pathname:t}=Xe(),n=gS(t);return(0,Y.jsx)(kr,{component:mS,children:(0,Y.jsxs)(Wb.Provider,{collapsible:`icon`,defaultWidth:208,className:`h-dvh`,children:[(0,Y.jsxs)(Wb,{id:`dashboard-navigation`,children:[(0,Y.jsxs)(Wb.Header,{className:`justify-between`,children:[(0,Y.jsx)(pn,{to:`/suites`,className:`truncate text-sm font-semibold text-kumo-strong group-data-[state=collapsed]/sidebar:hidden`,children:`EvalKit`}),(0,Y.jsx)(Wb.Trigger,{className:`navigation-toggle`})]}),(0,Y.jsx)(Wb.Content,{children:(0,Y.jsx)(`nav`,{"aria-label":`Dashboard`,children:(0,Y.jsx)(Wb.Group,{children:(0,Y.jsx)(Wb.Menu,{children:hS.map(e=>(0,Y.jsx)(Wb.MenuButton,{href:e.href,icon:e.icon,active:e===n,"aria-current":e===n?`page`:void 0,tooltip:e.label,children:e.label},e.href))})})})})]}),(0,Y.jsxs)(`main`,{className:`flex min-w-0 flex-1 flex-col overflow-y-auto`,children:[(0,Y.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b border-kumo-line bg-kumo-base px-4 md:px-6`,children:[(0,Y.jsx)(Wb.Trigger,{className:`md:hidden`}),(0,Y.jsx)(`h1`,{className:`text-base font-semibold text-kumo-strong`,children:_S(t)})]}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-4 px-4 py-4 md:px-6`,children:e})]})]})})}function yS({api:e,catalog:t,suites:n,selected:r,trialId:i,error:a,workspace:o,onClose:s,onWorkspace:c}){let l=(0,_.useRef)(null),u=Xe();(0,_.useEffect)(()=>{let e=l.current;return e&&!e.open&&e.showModal(),()=>{e?.open&&e.close()}},[]);let d=t.find(e=>e.id===r?.run.evalId),f=n.find(e=>e.id===r?.run.suiteId),p=bS(u,[`trial`,`view`]),m=bS(u,[`view`]),h=`Trial ${r?r.trial.index+1:`…`}`;return(0,Y.jsx)(`dialog`,{ref:l,className:`trial-panel fixed inset-y-0 right-0 left-auto m-0 h-dvh max-h-none w-full max-w-[min(1100px,100vw)] border-l border-kumo-line bg-kumo-base p-0 text-kumo-default shadow-xl backdrop:bg-black/30`,"aria-label":o?`Candidate workspace`:`Trial details`,onClose:s,children:(0,Y.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Y.jsxs)(`header`,{className:`flex items-start gap-3 border-b border-kumo-line px-5 py-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsxs)(ry,{size:`sm`,className:`trial-breadcrumbs`,children:[f?(0,Y.jsx)(ry.Link,{href:`/suites/${encodeURIComponent(f.id)}`,children:f.name??f.id}):(0,Y.jsx)(ry.Link,{href:`/runs`,children:`Runs`}),(0,Y.jsx)(ry.Separator,{}),d?(0,Y.jsx)(ry.Link,{href:`/evals/${encodeURIComponent(d.path)}`,children:d.name??d.id}):(0,Y.jsx)(ry.Current,{children:r?.run.evalId??`Eval`}),(0,Y.jsx)(ry.Separator,{}),(0,Y.jsxs)(ry.Link,{href:p,children:[`Run `,r?.run.id.slice(0,8)??`…`]}),(0,Y.jsx)(ry.Separator,{}),o?(0,Y.jsx)(ry.Link,{href:m,children:h}):(0,Y.jsx)(ry.Current,{children:h}),o?(0,Y.jsx)(ry.Separator,{}):null,o?(0,Y.jsx)(ry.Current,{children:`Workspace`}):null]}),(0,Y.jsx)(`h2`,{className:`text-base font-semibold text-kumo-strong`,children:o?`Candidate workspace`:h}),(0,Y.jsx)(`p`,{className:`${ex} truncate text-kumo-subtle`,children:i})]}),(0,Y.jsx)(ip,{variant:`ghost`,shape:`square`,size:`sm`,className:`trial-panel-close`,"aria-label":`Close trial panel`,title:`Close trial panel`,icon:(0,Y.jsx)(Uf,{}),onClick:()=>l.current?.close()})]}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:r?o?(0,Y.jsx)(sS,{api:e,selected:r}):(0,Y.jsx)(nS,{api:e,selected:r,evalName:d?.name??r.run.evalId,onWorkspace:c}):a?(0,Y.jsx)(Ix,{message:a}):(0,Y.jsx)(`output`,{className:`text-[13px] text-kumo-subtle`,children:`Loading trial…`})})]})})}function bS(e,t){let n=new URLSearchParams(e.search);for(let e of t)n.delete(e);return`${e.pathname}${n.size?`?${n}`:``}`}function xS({api:e,basename:t}){return(0,Y.jsx)(fn,{basename:t,children:(0,Y.jsx)(SS,{api:e})})}function SS({api:e}){let t=Xe(),n=$e(),r=t.pathname.startsWith(`/runs/`)?new URLSearchParams(t.search).get(`trial`):null,[i,a]=(0,_.useState)([]),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(),[u,d]=(0,_.useState)([]),f=(0,_.useRef)(``),[p,m]=(0,_.useState)(),[h,g]=(0,_.useState)();return(0,_.useEffect)(()=>{let t=!0;return Promise.all([e.listCatalog(),e.listSuites(),e.getMatrix()]).then(([e,n,r])=>{t&&(a(e),s(n),l(r))}).catch(e=>{t&&g(e instanceof Error?e.message:`Unable to load dashboard`)}),()=>{t=!1}},[e]),(0,_.useEffect)(()=>{let t=!0,n=!1,r=async()=>{if(!n){n=!0;try{let n=await e.listRuns();if(t){let e=JSON.stringify(n);e!==f.current&&(f.current=e,d(n))}}catch(e){t&&g(e instanceof Error?e.message:`Unable to load runs`)}finally{n=!1}}};r();let i=setInterval(()=>void r(),2e3);return()=>{t=!1,clearInterval(i)}},[e,t.pathname]),(0,_.useEffect)(()=>{let n=t.pathname.match(/^\/(?:trials|workspaces)\/([^/]+)/),i=r??(n?decodeURIComponent(n[1]):void 0);if(!i||!u.length||p?.trial.id===i)return;let a=t.pathname.match(/^\/runs\/([^/]+)/)?.[1],o=a?u.filter(e=>e.id===decodeURIComponent(a)):u,s=!0;return Promise.all(o.map(async t=>({run:t,trials:await e.listTrials(t.id)}))).then(e=>{if(s){for(let t of e){let e=t.trials.find(e=>e.id===i);if(e){m({run:t.run,trial:e}),g(void 0);return}}g(`Trial ${i} was not found in this run.`)}}).catch(e=>{s&&g(e instanceof Error?e.message:`Unable to load trial`)}),()=>{s=!1}},[e,t.pathname,r,u,p]),(0,Y.jsxs)(vS,{children:[e.readOnly?(0,Y.jsxs)(`p`,{className:`text-[13px] text-kumo-subtle`,role:`note`,children:[`Read-only snapshot built with `,(0,Y.jsx)(`code`,{children:`evalkit build`}),`. Runs cannot be started here.`]}):null,h?(0,Y.jsx)(Ix,{message:h}):null,(0,Y.jsx)(cS,{api:e,catalog:i,suites:o,matrix:c,runs:u,selected:p,onTrial:(e,t)=>m({run:e,trial:t})}),r?(0,Y.jsx)(yS,{api:e,catalog:i,suites:o,selected:p?.trial.id===r?p:void 0,trialId:r,error:h,workspace:new URLSearchParams(t.search).get(`view`)===`workspace`,onClose:()=>{let e=new URLSearchParams(t.search);e.delete(`trial`),e.delete(`view`),n({pathname:t.pathname,search:e.toString()},{replace:!0})},onWorkspace:()=>{let e=new URLSearchParams(t.search);e.set(`view`,`workspace`),n({pathname:t.pathname,search:e.toString()})}}):null]})}function CS(e){let t=e.fetch??globalThis.fetch,n=async(n,r)=>{let i=await t(new URL(n,e.baseUrl),r);if(!i.ok)throw Error(await i.text()||`Dashboard request failed: ${i.status}`);return i.json()};return{async listCatalog(){return(await n(`/v1/catalog`)).evals},async listMatrixCells(t){let r=new URL(`/v1/matrix/cells`,e.baseUrl);for(let e of t.evalIds)r.searchParams.append(`eval`,e);return r.searchParams.set(`q`,t.query),r.searchParams.set(`offset`,String(t.offset)),r.searchParams.set(`sort`,t.sort),r.searchParams.set(`direction`,t.direction),n(r.pathname+r.search)},async getMatrix(){return(await n(`/v1/matrix`)).matrix},async listEvals(){return(await n(`/v1/evals`)).evals},async listSuites(){return(await n(`/v1/suites`)).suites},async listRuns(){return(await n(`/v1/runs`)).runs},async listTrials(e){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials`)).trials},async getTrial(e,t){return n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}`)},async listArtifacts(e,t){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/artifacts`)).artifacts},async listWorkspace(e,t){return n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/workspace`)},async getWorkspaceFile(n,r,i){let a=await t(new URL(`/v1/runs/${encodeURIComponent(n)}/trials/${encodeURIComponent(r)}/workspace/${i.split(`/`).map(encodeURIComponent).join(`/`)}`,e.baseUrl));if(!a.ok)throw Error(`Dashboard request failed: ${a.status}`);return a},async getTrialEvents(e,t){return(await n(`/v1/runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}/events`)).events},async runEval(e,t){await n(`/v1/runs`,{method:`POST`,body:JSON.stringify({path:e,...t?{parameters:t}:{}}),headers:{"content-type":`application/json`}})},async runSuite(e){await n(`/v1/suites/${encodeURIComponent(e)}/runs`,{method:`POST`})}}}var wS="This is a read-only dashboard snapshot. Run evals with `evalkit run`, then rebuild it with `evalkit build`.";function TS(e){let t=e.fetch??globalThis.fetch,n=t=>new URL(`data/${t}`,e.baseUrl),r=async e=>{let r=await t(n(e));if(!r.ok)throw Error(`Snapshot file is missing: data/${e}`);return r},i=async e=>(await r(e)).json(),a=(e,t)=>`runs/${encodeURIComponent(e)}/trials/${encodeURIComponent(t)}`;return{readOnly:!0,listCatalog:async()=>(await i(`catalog.json`)).evals,getMatrix:async()=>null,listMatrixCells:async()=>{throw Error(wS)},listEvals:async()=>(await i(`evals.json`)).evals,listSuites:async()=>(await i(`suites.json`)).suites,listRuns:async()=>(await i(`runs.json`)).runs,listTrials:async e=>(await i(`runs/${encodeURIComponent(e)}/trials.json`)).trials,getTrial:(e,t)=>i(`${a(e,t)}/detail.json`),getTrialEvents:async(e,t)=>(await i(`${a(e,t)}/events.json`)).events,listArtifacts:async(e,t)=>(await i(`${a(e,t)}/artifacts.json`)).artifacts,listWorkspace:(e,t)=>i(`${a(e,t)}/workspace.json`),getWorkspaceFile:(e,t,n)=>r(`${a(e,t)}/workspace/${n.split(`/`).map(encodeURIComponent).join(`/`)}`),runEval:async()=>{throw Error(wS)},runSuite:async()=>{throw Error(wS)}}}var ES=document.querySelector(`#root`);if(!ES)throw Error(`Dashboard root is missing`);var DS=document.documentElement.dataset.evalkitSnapshot===`static`,OS=DS?TS({baseUrl:document.baseURI}):CS({baseUrl:window.location.origin}),kS=DS&&new URL(document.baseURI).pathname.replace(/\/$/,``)||void 0;(0,Gb.createRoot)(ES).render((0,Y.jsx)(xS,{api:OS,basename:kS}));
|