1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,847084,593758,e=>{"use strict";var t=e.i(43845),n=e.i(888351),r=e.i(255975),o=e.i(574180),a=e.i(535295),s=e.i(676826),i=e.i(890986),u=e.i(759113),l=e.i(900348),c=e.i(236610),d=e.i(541048);e.s([],589016),e.i(589016);var p=e.i(886583),f=e.i(580920);let g=n.createContext(void 0);function m(){let e=n.useContext(g);if(void 0===e)throw Error((0,f.default)(13));return e}let v={imageLoadingStatus:()=>null},h=n.forwardRef(function(e,r){let{className:o,render:a,style:s,...i}=e,[u,l]=n.useState("idle"),c=n.useMemo(()=>({imageLoadingStatus:u,setImageLoadingStatus:l}),[u,l]),d=(0,p.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:r,props:i,stateAttributesMapping:v});return(0,t.jsx)(g.Provider,{value:c,children:d})});var x=e.i(558814),b=e.i(722606),R=e.i(616738),y=e.i(845989),S=e.i(783349),E=e.i(117054);let I={...v,...y.transitionStatusMapping},C=n.forwardRef(function(e,t){let{className:r,render:o,onLoadingStatusChange:a,referrerPolicy:s,crossOrigin:i,style:u,...l}=e,c=m(),d=function(e,{referrerPolicy:t,crossOrigin:r}){let[o,a]=n.useState("idle");return(0,b.useIsoLayoutEffect)(()=>{if(!e)return a("error"),E.NOOP;let n=!0,o=new window.Image,s=e=>()=>{n&&a(e)};return a("loading"),o.onload=s("loaded"),o.onerror=s("error"),t&&(o.referrerPolicy=t),o.crossOrigin=r??null,o.src=e,o.complete&&a(o.naturalWidth>0?"loaded":"error"),()=>{n=!1}},[e,r,t]),o}(e.src,{referrerPolicy:s,crossOrigin:i}),f="loaded"===d,{mounted:g,transitionStatus:v,setMounted:h}=(0,S.useTransitionStatus)(f),y=n.useRef(null),C=(0,x.useStableCallback)(e=>{a?.(e),c.setImageLoadingStatus(e)});(0,b.useIsoLayoutEffect)(()=>{"idle"!==d&&C(d)},[d,C]),(0,R.useOpenChangeComplete)({open:f,ref:y,onComplete(){f||h(!1)}});let O=(0,p.useRenderElement)("img",e,{state:{imageLoadingStatus:d,transitionStatus:v},ref:[t,y],props:l,stateAttributesMapping:I,enabled:g});return g?O:null});var O=e.i(76851);let M=n.forwardRef(function(e,t){let{className:r,render:o,delay:a,style:s,...i}=e,{imageLoadingStatus:u}=m(),[l,c]=n.useState(void 0===a),d=(0,O.useTimeout)();return n.useEffect(()=>(void 0!==a&&d.start(a,()=>c(!0)),d.clear),[d,a]),(0,p.useRenderElement)("span",e,{state:{imageLoadingStatus:u},ref:t,props:i,stateAttributesMapping:v,enabled:"loaded"!==u&&l})});e.s(["Fallback",0,M,"Image",0,C,"Root",0,h],662478);var w=e.i(662478),w=w;function T({className:e,size:n="default",...r}){return(0,t.jsx)(w.Root,{"data-slot":"avatar","data-size":n,className:(0,d.cn)("group/avatar after:border-border relative flex size-8 shrink-0 rounded-md select-none after:absolute after:inset-0 after:rounded-md after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...r})}function k({className:e,...n}){return(0,t.jsx)(w.Image,{"data-slot":"avatar-image",className:(0,d.cn)("aspect-square size-full rounded-md object-cover",e),...n})}function N({className:e,...n}){return(0,t.jsx)(w.Fallback,{"data-slot":"avatar-fallback",className:(0,d.cn)("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-md text-sm group-data-[size=sm]/avatar:text-xs",e),...n})}function A(e){let n=(0,d.cn)(e.className,"mx-auto size-8 group-focus:ring-2");if("text"in e)return(0,t.jsx)(T,{className:n,children:(0,t.jsx)(N,{className:(0,d.cn)(e.fallbackClassName,"uppercase"),children:e.text.slice(0,1)})});let r=e.displayName?.slice(0,1);return(0,t.jsxs)(T,{className:n,children:[(0,t.jsx)(k,{src:e.pictureUrl||void 0}),(0,t.jsx)(N,{className:(0,d.cn)(e.fallbackClassName,"uppercase"),children:(0,t.jsx)("span",{suppressHydrationWarning:!0,className:"uppercase",children:r})})]})}var P=e.i(687123);e.s(["AccountMenu",0,function({compact:e=!1}){let p=(0,l.useSession)(),[f,g]=(0,n.useState)(!1),m=p.data?.user,v=m?.email??m?.name??null,h=v??"StayWithPoints",x=m?.image??null,b=async()=>{g(!0);try{await l.authClient.signOut(),window.location.assign("/auth/sign-in")}finally{g(!1)}};return(0,t.jsxs)(c.DropdownMenu,{children:[(0,t.jsxs)(c.DropdownMenuTrigger,{className:(0,d.cn)("hover:bg-sidebar-accent focus-visible:ring-sidebar-ring flex w-full min-w-0 items-center gap-2 rounded-md p-2 text-left outline-none focus-visible:ring-2",e&&"w-auto"),"data-test":e?"account-menu-trigger-compact":"account-menu-trigger",children:[(0,t.jsx)(A,{displayName:h,pictureUrl:
1x}),(0,t.jsxs)("span",{className:(0,d.cn)("min-w-0 flex-1",e&&"sr-only"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:v??(0,t.jsx)(P.Trans,{i18nKey:"app:settings.unknownValue"})}),(0,t.jsx)("span",{className:"text-muted-foreground block truncate text-xs",children:(0,t.jsx)(P.Trans,{i18nKey:"app:shell.signedInAs"})})]})]}),(0,t.jsxs)(c.DropdownMenuContent,{align:e?"center":"end",className:"bg-popover w-64",children:[(0,t.jsx)("div",{className:"text-muted-foreground truncate px-1.5 py-1 text-xs",children:m?.email??(0,t.jsx)(P.Trans,{i18nKey:"app:settings.unknownValue"})}),(0,t.jsx)(c.DropdownMenuItem,{className:"p-0",children:(0,t.jsxs)(r.default,{href:"/dashboard",className:"flex h-9 w-full items-center gap-2 px-2","data-test":"account-menu-dashboard",children:[(0,t.jsx)(s.LayoutDashboardIcon,{className:"size-4","aria-hidden":"true"}),(0,t.jsx)(P.Trans,{i18nKey:"app:marketing.navigation.dashboard"})]})}),(0,t.jsx)(c.DropdownMenuItem,{className:"p-0",children:(0,t.jsxs)(r.default,{href:"/alerts",className:"flex h-9 w-full items-center gap-2 px-2","data-test":"account-menu-alerts",children:[(0,t.jsx)(o.BellIcon,{className:"size-4","aria-hidden":"true"}),(0,t.jsx)(P.Trans,{i18nKey:"app:navigation.alerts"})]})}),(0,t.jsx)(c.DropdownMenuItem,{className:"p-0",children:(0,t.jsxs)(r.default,{href:"/docs/api",className:"flex h-9 w-full items-center gap-2 px-2","data-test":"account-menu-api-docs",children:[(0,t.jsx)(a.BracesIcon,{className:"size-4","aria-hidden":"true"}),(0,t.jsx)(P.Trans,{i18nKey:"app:navigation.apiDocs"})]})}),(0,t.jsx)(c.DropdownMenuItem,{className:"p-0",children:(0,t.jsxs)(r.default,{href:"/settings",className:"flex h-9 w-full items-center gap-2 px-2","data-test":"account-menu-settings",children:[(0,t.jsx)(u.SettingsIcon,{className:"size-4","aria-hidden":"true"}),(0,t.jsx)(P.Trans,{i18nKey:"app:navigation.settings"})]})}),(0,t.jsxs)(c.DropdownMenuItem,{onClick:b,disabled:f,className:"cursor-pointer","data-test":"account-menu-sign-out",children:[(0,t.jsx)(i.LogOutIcon,{className:"size-4","aria-hidden":"true"}),(0,t.jsx)(P.Trans,{i18nKey:"app:shell.signOut"})]})]})]})}],847084);var D=e.i(25868);e.s(["AppLogo",0,function({className:e,href:n="/dashboard"}){return(0,t.jsxs)(r.default,{href:n,className:(0,d.cn)("focus-visible:ring-ring flex min-w-0 items-center gap-2 rounded-md outline-none focus-visible:ring-2",e),"data-test":"app-logo",children:[(0,t.jsx)("span",{className:"relative flex size-8 shrink-0 items-center justify-center",children:(0,t.jsx)(D.default,{src:"/images/brand/staywithpoints-mark.png",alt:"",width:32,height:32,className:"size-8 object-contain","aria-hidden":"true"})}),(0,t.jsx)("span",{className:"truncate text-sm font-semibold tracking-normal",children:(0,t.jsx)(P.Trans,{i18nKey:"common:appName"})})]})}],593758)},535295,676826,890986,759113,e=>{"use strict";var t=e.i(820218);let n=(0,t.default)("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);e.s(["BracesIcon",0,n],535295);let r=(0,t.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboardIcon",0,r],676826);let o=(0,t.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOutIcon",0,o],890986);let a=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["SettingsIcon",0,a],759113)},727252,e=>{"use strict";let t=(0,e.i(820218).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["MenuIcon",0,t],727252)},597023,(e,t,n)=>{"use strict";e.i(226273),Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return c},getImageProps:function(){return l}};for(var o in r)Object.defineProperty(n,o,{enumerable:!0,get:r[o]});let a=e.r(836437),s=e.r(895546),i=e.r(425396),u=a._(e.r(410787));function l(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:u.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qual
1ities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let c=i.Image},25868,(e,t,n)=>{t.exports=e.r(597023)},53759,e=>{"use strict";function t(e,t){let n=function(e){try{return new URL(e,"https://example.invalid").pathname}catch{return e.split(/[?#]/,1)[0]||"/"}}(e),r=n.length>0?n:"/";if(t){let e=`/${t}`;r===e?r="/":r.startsWith(`${e}/`)&&(r=r.slice(e.length))}return r.length>1&&r.endsWith("/")&&(r=r.slice(0,-1)),r||"/"}e.s(["isRouteActive",0,function(e,n,r,o={}){let a=t(n??"/",o.locale),s=t(r??e,o.locale);return"/"===s?"/"===a:a===s||a.startsWith(`${s}/`)}])},236610,e=>{"use strict";var t,n,r,o=e.i(43845),a=e.i(541048);e.s([],496454),e.i(496454);var s=e.i(888351),i=e.i(580920);let u=s.createContext(void 0);function l(e){let t=s.useContext(u);if(void 0===t&&!e)throw Error((0,i.default)(33));return t}let c=s.createContext(void 0);function d(e){let t=s.useContext(c);if(void 0===t&&!e)throw Error((0,i.default)(36));return t}var p=e.i(886583),f=e.i(43937);let g=s.forwardRef(function(e,t){let{className:n,render:r,style:o,...a}=e,{store:s}=d(),{arrowRef:i,side:u,align:c,arrowUncentered:g,arrowStyles:m}=l(),v=s.useState("open");return(0,p.useRenderElement)("div",e,{ref:[i,t],stateAttributesMapping:f.popupStateMapping,state:{open:v,side:u,align:c,uncentered:g},props:{style:m,"aria-hidden":!0,...a}})});var m=e.i(845989);let v=s.createContext(void 0);function h(e=!0){let t=s.useContext(v);if(void 0===t&&!e)throw Error((0,i.default)(25));return t}var x=e.i(748485);let b={...f.popupStateMapping,...m.transitionStatusMapping},R=s.forwardRef(function(e,t){let{className:n,render:r,style:o,...a}=e,{store:s}=d(),i=s.useState("open"),u=s.useState("mounted"),l=s.useState("transitionStatus"),c=s.useState("lastOpenChangeReason"),f=h();return(0,p.useRenderElement)("div",e,{ref:f?.backdropRef?[t,f.backdropRef]:t,state:{open:i,transitionStatus:l},stateAttributesMapping:b,props:[{role:"presentation",hidden:!u,style:{pointerEvents:c===x.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},a]})});var y=e.i(558814),S=e.i(718105);let E=s.createContext(void 0);var I=e.i(16829),C=e.i(448563),O=e.i(495335),M=e.i(196292);function w(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:o,store:a,typingRef:i,itemRef:u,itemMetadata:l}=e,{events:c}=a.useState("floatingTreeRoot"),d=h(!0),p=void 0!==d;return s.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onKeyDown(e){" "===e.key&&i?.current&&e.preventDefault()},onMouseMove(e){o&&c.emit("itemhover",{nodeId:o,target:e.currentTarget})},onClick(e){t&&c.emit("close",{domEvent:e,reason:x.REASONS.itemPress})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,p&&t&&1>=Math.abs(e.clientX-t.x)&&1>=Math.abs(e.clientY-t.y)||p&&!M.isMac&&2===e.button)return}u.current&&a.context.allowMouseUpTriggerRef.current&&(!p||2===e.button)&&(!l||"regular-item"===l.type)&&u.current.click()}}),[t,n,r,c,o,a,i,u,d,p,l])}let T={type:"regular-item"};function k(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:o,store:a,typingRef:i=a.context.typingRef,nativeButton:u,itemMetadata:l,nodeId:c}=e,d=s.useRef(null),{getButtonProps:p,buttonRef:f}=(0,C.useButton)({disabled:n,focusableWhenDisabled:!0,native:u,composite:!0}),g=w({closeOnClick:t,highlighted:r,id:o,nodeId:c,store:a,typingRef:i,itemRef:d,itemMetadata:l}),m=s.useCallback(e=>(0,O.mergeProps)(g,{onMouseEnter(){"submenu-trigger"===l.type&&l.setActive()}},e,p),[g,p,l]),v=(0,I.useMergedRefs)(d,f);return s.useMemo(()=>({getItemProps:m,itemRef:v}),[m,v])}var N=e.i(722606);let A=s.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),P=((t={})[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t);function D(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:a}=e,{register:i,unregister:u,subscribeMapChange:l,elementsRef:c,labelsRef:d,nextIndexRef:p}=s.useContext(A),f=s.useRef(-1),[g,m]=s.useState(a??(o===P.GuessFromOrder?()=>{if(-1===f.current){let e=p.current;p.current+=1,f.current=e}return f.current}:-1)),v=s.useRef(null),h=s.useCallback(e=>{if(v.current=e,-1!==g&&null!==e&&(c.current[g]=e,d)){let n=void 0!==t;d.current[g]=n?t:r?.current?.textContent??e.textContent}},[g,c,d,t,r]);return(0,N.useIsoLayoutEffect)(()=>
1{if(null!=a)return;let e=v.current;if(e)return i(e,n),()=>{u(e)}},[a,i,u,n]),(0,N.useIsoLayoutEffect)(()=>{if(null==a)return l(e=>{let t=v.current?e.get(v.current)?.index:null;null!=t&&m(t)})},[a,l,m]),s.useMemo(()=>({ref:h,index:g}),[g,h])}var L=e.i(238543);let j=((n={}).checked="data-checked",n.unchecked="data-unchecked",n.disabled="data-disabled",n.highlighted="data-highlighted",n),F={checked:e=>e?{[j.checked]:""}:{[j.unchecked]:""},...m.transitionStatusMapping};var _=e.i(958056);let W=s.forwardRef(function(e,t){let{render:n,className:r,id:a,label:i,nativeButton:u=!1,disabled:c=!1,closeOnClick:f=!1,checked:g,defaultChecked:m,onCheckedChange:v,style:h,...b}=e,R=D({label:i}),I=l(!0),C=(0,L.useBaseUiId)(a),{store:O}=d(),M=O.useState("isActive",R.index),w=O.useState("itemProps"),[N,A]=(0,S.useControlled)({controlled:g,default:m??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:P,itemRef:j}=k({closeOnClick:f,disabled:c,highlighted:M,id:C,store:O,nativeButton:u,nodeId:I?.context.nodeId,itemMetadata:T}),W=s.useMemo(()=>({disabled:c,highlighted:M,checked:N}),[c,M,N]),z=(0,y.useStableCallback)(e=>{let t={...(0,_.createChangeEventDetails)(x.REASONS.itemPress,e.nativeEvent),preventUnmountOnClose:()=>{}};v?.(!N,t),t.isCanceled||A(e=>!e)}),H=(0,p.useRenderElement)("div",e,{state:W,stateAttributesMapping:F,props:[w,{role:"menuitemcheckbox","aria-checked":N,onClick:z},b,P],ref:[j,t,R.ref]});return(0,o.jsx)(E.Provider,{value:W,children:H})});var z=e.i(783349),H=e.i(616738);let U=s.forwardRef(function(e,t){let{render:n,className:r,style:o,keepMounted:a=!1,...u}=e,l=function(){let e=s.useContext(E);if(void 0===e)throw Error((0,i.default)(30));return e}(),c=s.useRef(null),{transitionStatus:d,setMounted:f}=(0,z.useTransitionStatus)(l.checked);(0,H.useOpenChangeComplete)({open:l.checked,ref:c,onComplete(){l.checked||f(!1)}});let g={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:d};return(0,p.useRenderElement)("span",e,{state:g,ref:[t,c],stateAttributesMapping:F,props:{"aria-hidden":!0,...u},enabled:a||l.checked})}),B=s.createContext(void 0),V=s.forwardRef(function(e,t){let{render:n,className:r,style:a,...i}=e,[u,l]=s.useState(void 0),c=s.useMemo(()=>({setLabelId:l}),[l]),d=(0,p.useRenderElement)("div",e,{ref:t,props:{role:"group","aria-labelledby":u,...i}});return(0,o.jsx)(B.Provider,{value:c,children:d})}),K=s.forwardRef(function(e,t){let{className:n,render:r,id:o,style:a,...u}=e,l=(0,L.useBaseUiId)(o),{setLabelId:c}=function(){let e=s.useContext(B);if(void 0===e)throw Error((0,i.default)(31));return e}();return(0,N.useIsoLayoutEffect)(()=>(c(l),()=>{c(void 0)}),[c,l]),(0,p.useRenderElement)("div",e,{ref:t,props:{id:l,role:"presentation",...u}})}),G=s.forwardRef(function(e,t){let{render:n,className:r,id:o,label:a,nativeButton:s=!1,disabled:i=!1,closeOnClick:u=!0,style:c,...f}=e,g=D({label:a}),m=l(!0),v=(0,L.useBaseUiId)(o),{store:h}=d(),x=h.useState("isActive",g.index),b=h.useState("itemProps"),{getItemProps:R,itemRef:y}=k({closeOnClick:u,disabled:i,highlighted:x,id:v,store:h,nativeButton:s,nodeId:m?.context.nodeId,itemMetadata:T});return(0,p.useRenderElement)("div",e,{state:{disabled:i,highlighted:x},props:[b,f,R],ref:[y,t,g.ref]})}),Y=s.forwardRef(function(e,t){let{render:n,className:r,id:o,label:a,closeOnClick:i=!1,style:u,...c}=e,f=s.useRef(null),g=D({label:a}),m=l(!0),v=m?.context.nodeId,h=(0,L.useBaseUiId)(o),{store:x}=d(),b=x.useState("isActive",g.index),R=x.useState("itemProps"),y=x.context.typingRef,{getButtonProps:S,buttonRef:E}=(0,C.useButton)({native:!1,composite:!0}),I=w({closeOnClick:i,highlighted:b,id:h,nodeId:v,store:x,typingRef:y,itemRef:f}),M=s.useMemo(()=>({highlighted:b}),[b]);return(0,p.useRenderElement)("a",e,{state:M,props:[R,c,function(e){return(0,O.mergeProps)(I,e,S)}],ref:[f,E,t,g.ref]})});
1var q=e.i(415874),$=e.i(71890);let J=s.createContext(void 0);var X=e.i(343976),Q=e.i(778823);let Z={...f.popupStateMapping,...m.transitionStatusMapping},ee=s.forwardRef(function(e,t){let{render:n,className:r,style:a,finalFocus:u,...c}=e,{store:f}=d(),{side:g,align:m}=l(),v=null!=function(e){let t=s.useContext(J);if(void 0===t&&!e)throw Error((0,i.default)(69));return t}(!0),h=f.useState("open"),b=f.useState("transitionStatus"),R=f.useState("popupProps"),y=f.useState("mounted"),S=f.useState("instantType"),E=f.useState("activeTriggerElement"),I=f.useState("parent"),C=f.useState("lastOpenChangeReason"),O=f.useState("rootId"),M=f.useState("floatingRootContext"),w=f.useState("floatingTreeRoot"),T=f.useState("closeDelay"),k=f.useState("activeTriggerElement"),N="context-menu"===I.type;(0,H.useOpenChangeComplete)({open:h,ref:f.context.popupRef,onComplete(){h&&f.context.onOpenChangeComplete?.(!0)}}),s.useEffect(()=>{function e(e){f.setOpen(!1,(0,_.createChangeEventDetails)(e.reason,e.domEvent))}return w.events.on("close",e),()=>{w.events.off("close",e)}},[w.events,f]);let A=f.useState("hoverEnabled"),P=f.useState("disabled");(0,$.useHoverFloatingInteraction)(M,{enabled:A&&!P&&!N&&"menubar"!==I.type,closeDelay:T});let D={transitionStatus:b,side:g,align:m,open:h,nested:"menu"===I.type,instant:S},L=s.useCallback(e=>{f.set("popupElement",e)},[f]),j=(0,p.useRenderElement)("div",e,{state:D,ref:[t,f.context.popupRef,L],stateAttributesMapping:Z,props:[R,{onKeyDown(e){v&&X.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,Q.getDisabledMountTransitionStyles)(b),c,{"data-rootownerid":O}]}),F=void 0===I.type||N;return(E||"menubar"===I.type&&C!==x.REASONS.outsidePress)&&(F=!0),(0,o.jsx)(q.FloatingFocusManager,{context:M,modal:N,disabled:!y,returnFocus:void 0===u?F:u,initialFocus:"menu"!==I.type,restoreFocus:!0,externalTree:"menubar"!==I.type?w:void 0,previousFocusableElement:k,nextFocusableElement:void 0===I.type?f.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===I.type?f.context.beforeContentFocusGuardRef:void 0,children:j})});var et=e.i(158025);let en=s.createContext(void 0),er=s.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:a}=d();return a.useState("mounted")||n?(0,o.jsx)(en.Provider,{value:n,children:(0,o.jsx)(et.FloatingPortal,{ref:t,...r})}):null});var eo=e.i(468292),ea=e.i(76851),es=e.i(258483),ei=e.i(706439),eu=e.i(207020);function el(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:a}=e,i=(0,y.useStableCallback)(a),u=s.useRef(0),l=(0,eu.useRefWithInit)(ed).current,c=(0,eu.useRefWithInit)(ec).current,[d,p]=s.useState(0),f=s.useRef(d),g=(0,y.useStableCallback)((e,t)=>{c.set(e,t??null),f.current+=1,p(f.current)}),m=(0,y.useStableCallback)(e=>{c.delete(e),f.current+=1,p(f.current)}),v=s.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(ep).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,d]);(0,N.useIsoLayoutEffect)(()=>{if("function"!=typeof MutationObserver||0===v.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(f.current+=1,p(f.current))});return v.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[v]),(0,N.useIsoLayoutEffect)(()=>{f.current===d&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),u.current=v.size),i(v)},[i,v,n,r,d]),(0,N.useIsoLayoutEffect)(()=>()=>{n.current=[]},[n]),(0,N.useIsoLayoutEffect)(()=>()=>{r&&(r.current=[])},[r]);let h=(0,y.useStableCallback)(e=>(l.add(e),()=>{l.delete(e)}));(0,N.useIsoLayoutEffect)(()=>{l.forEach(e=>e(v))},[l,v]);let x=s.useMemo(()=>({register:g,unregister:m,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:u}),[g,m,h,n,r,u]);return(0,o.jsx)(A.Provider,{value:x,children:t})}function ec(){return new Map}function ed(){return new Set}function ep(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var ef=e.i(969601),eg=e.i(14719),em=e.i(186840),ev=e.i(297243),eh=e.i(538305),ex=e.i(910470),eb=e.i(266814);let eR=s.forwardRef(function(e,t){let{anchor:n,positionMethod:r="absolute",className:a,render:l,side:c,align:p,sideOffset:f=0,alignOffset:g=0,collisionBoundary:m="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:R=!1,disableAnchorTracking:y=!1,collisionAvoidance:S=eg.DROPDOWN_COLLISION_AVOIDANCE,style:E,...I}=e,{store:C}=d(),O=function(){let e=s.useContext(en);if(void 0===e)throw Error((0,i.default)(32));return e}(),M=h(!0),w=C.useState("parent"),T=C.useState("floatingRootContext"),k=C.useState("floatingTreeRoot"),A=C.useState("mounted"),P=C.useState("open"),D=C.useState("modal"),L=C.useState("openMethod"),j=C.useState("activeTriggerElement"),F=C.useState("transitionStatus"),W=C.useState("positionerElement"),z=C.useState("instantType"),H=C.useState("hasViewport"),U=C.useState("lastOpenChangeReason"),B=C.useState("floatingNodeId"),V=C.useState("floatingParentNodeId"),K=T.useState("domReferenceElement"),G=s.useRef(null),Y=(0,ev.useAnimationsFinished)(W,!1,!1),q=n,$=f,J=g,X=p,Q=S;"context-menu"===w.type&&(q=n??w.context?.anchor,X=X??"start",c||"center"===X||(J=e.alignOffset??2,$
1=e.sideOffset??-5));let Z=c,ee=X;"menu"===w.type?(Z=Z??"inline-end",ee=ee??"start",Q=e.collisionAvoidance??eg.POPUP_COLLISION_AVOIDANCE):"menubar"===w.type&&(Z=Z??"bottom",ee=ee??"start");let et="context-menu"===w.type,er=(0,ei.useAnchorPositioning)({anchor:q,floatingRootContext:T,positionMethod:M?"fixed":r,mounted:A,side:Z,sideOffset:$,align:ee,alignOffset:J,arrowPadding:et?0:b,collisionBoundary:m,collisionPadding:v,sticky:R,nodeId:B,keepMounted:O,disableAnchorTracking:y,collisionAvoidance:Q,shiftCrossAxis:et&&!("side"in Q&&"flip"===Q.side),externalTree:k,adaptiveOrigin:H?em.adaptiveOrigin:void 0});s.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===B&&C.set("hoverEnabled",!1),e.nodeId!==B&&e.parentNodeId===C.select("floatingParentNodeId")&&C.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.siblingOpen)))}return k.events.on("menuopenchange",e),()=>{k.events.off("menuopenchange",e)}},[C,k.events,B]),s.useEffect(()=>{if(null!=C.select("floatingParentNodeId"))return k.events.on("menuopenchange",e),()=>{k.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==C.select("floatingParentNodeId"))return;let t=e.reason??x.REASONS.siblingOpen;C.setOpen(!1,(0,_.createChangeEventDetails)(t))}},[k.events,C]);let eu=(0,ea.useTimeout)();s.useEffect(()=>{P||eu.clear()},[P,eu]),s.useEffect(()=>{function e(e){if(P&&e.nodeId===C.select("floatingParentNodeId"))if(e.target&&j&&j!==e.target){let e=C.select("closeDelay");e>0?eu.isStarted()||eu.start(e,()=>{C.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.siblingOpen))}):C.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.siblingOpen))}else eu.clear()}return k.events.on("itemhover",e),()=>{k.events.off("itemhover",e)}},[k.events,P,j,C,eu]),s.useEffect(()=>{let e={open:P,nodeId:B,parentNodeId:V,reason:C.select("lastOpenChangeReason")};k.events.emit("menuopenchange",e)},[k.events,P,C,B,V]),(0,N.useIsoLayoutEffect)(()=>{let e=G.current;if(K&&(G.current=K),e&&K&&K!==e){C.set("instantType",void 0);let e=new AbortController;return Y(()=>{C.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[K,Y,C]);let ec={open:P,side:er.side,align:er.align,anchorHidden:er.anchorHidden,nested:"menu"===w.type,instant:z},ed="menubar"===w.type&&w.context.modal,ep=D&&U!==x.REASONS.triggerHover;!function(e,t,n,r){let[o,a]=s.useState(!1);(0,N.useIsoLayoutEffect)(()=>{if(!e||!t||null==n)return void a(!1);let r=(0,ex.ownerDocument)(n).documentElement.clientWidth,o=n.offsetWidth;a(r>0&&o>0&&o>=r-20)},[e,t,n]),(0,eb.useScrollLock)(e&&(!t||o),r)}(P&&(ed||ep),"touch"===L,W,j);let eR=(0,eh.usePositioner)(e,ec,{styles:er.positionerStyles,transitionStatus:F,props:I,refs:[t,C.useStateSetter("positionerElement")],hidden:!A,inert:!P}),ey=A&&"menu"!==w.type&&("menubar"!==w.type&&D&&U!==x.REASONS.triggerHover||"menubar"===w.type&&w.context.modal),eS=null;return"menubar"===w.type?eS=w.context.contentElement:void 0===w.type&&(eS=j),(0,o.jsxs)(u.Provider,{value:er,children:[ey&&(0,o.jsx)(ef.InternalBackdrop,{ref:"context-menu"===w.type||"nested-context-menu"===w.type?w.context.internalBackdropRef:null,inert:(0,eo.inertValue)(!P),cutout:eS}),(0,o.jsx)(es.FloatingNode,{id:B,children:(0,o.jsx)(el,{elementsRef:C.context.itemDomElements,labelsRef:C.context.itemLabels,children:eR})})]})}),ey=s.createContext(void 0),eS=s.memo(s.forwardRef(function(e,t){let{render:n,className:r,value:a,defaultValue:i,onValueChange:u,disabled:l=!1,style:c,...d}=e,[f,g]=(0,S.useControlled)({controlled:a,default:i,name:"MenuRadioGroup"}),m=(0,y.useStableCallback)(u),v=(0,y.useStableCallback)((e,t)=>{m?.(e,t),t.isCanceled||g(e)}),h=(0,p.useRenderElement)("div",e,{state:{disabled:l},ref:t,props:{role:"group","aria-disabled":l||void 0,...d}}),x=s.useMemo(()=>({value:f,setValue:v,disabled:l}),[f,v,l]);return(0,o.jsx)(ey.Provider,{value:x,children:h})})),eE=s.createContext(void 0),eI=s.forwardRef(function(e,t){let{render:n,className:r,id:a,label:u,nativeButton:c=!1,disabled:f=!1,closeOnClick:g=!1,value:m,style:v,...h}=e,b=D({label:u}),R=l(!0),S=(0,L.useBaseUiId)(a),{store:E}=d(),I=E.useState("isActive",b.index),C=E.useState("itemProps"),{value:O,setValue:M,disabled:w}=function(){let e=s.useContext(ey);if(void 0===e)throw Error((0,i.default)(34));return e}(),N=w||f,A=O===m,{getItemProps:P,itemRef:j}=k({closeOnClick:g,disabled:N,highlighted:I,id:S,store:E,nativeButton:c,nodeId:R?.context.nodeId,itemMetadata:T}),W=s.useMemo(()=>({disabled:N,highlighted:I,checked:A}),[N,I,A]),z=(0,y.useStableCallback)(e=>{M(m,{...(0,_.createChangeEventDetails)(x.REASONS.itemPress,e.nativeEvent),preventUnmountOnClose:()=>{}})}),H=(0,p.useRenderElement)("div",e,{state:W,stateAttributesMapping:F,props:[C,{role:"menuitemradio","aria-checked":A,onClick:z},h,P],ref:[j,t,b.ref]});return(0,o.jsx)(eE.Provider,{value:W,children:H})}),eC=s.forwardRef(function(e,t){let{render:n,className:r,style:o,keepMounted:a=!1,...u}=e,l=function(){let e=s.useContext(eE);if(void 0===e)throw Error((0,i.default)(35));return e}(),c=s.useRef(null),{transitionStatus:d,setMounted:f}=(0,z.useTransitionStatus)(l.checked);(0,H.useOpenChangeComplete)({open:l.checked,ref:c,onComplete(){l.checked||f(!1)}});let g={checked:l.checked,disabled:l.disabled,highlighted:l.highlighted,transitionStatus:d};return(0,p.useRenderElement)("span",e,{state:g,stateAttributesMapping:F,ref:[t,c],props:{"aria-hidden":!0,...u},enabled:a||l.checked})});var eO=e.i(993714),eM=e.i(903336),ew=e.i(117054),eT=e.i(466740),ek=e.i(120496),eN=e.i(935272),eA=e.i(92615),eP=e.i(545322),eD=e.i(675625),eL=e.i(732293),ej=e.i(234411),eF=e.i(569915),e_=e.i(601006),eW=e.i(895731);function ez(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function eH(e,t){return ez(t,e===eW.ARROW_UP||e===eW.ARROW_DOWN,e===eW.ARROW_LEFT||e===eW.ARROW_RIGHT)}
1function eU(e,t,n){return ez(t,e===eW.ARROW_DOWN,n?e===eW.ARROW_LEFT:e===eW.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}var eB=e.i(936498),eV=e.i(658274);let eK=s.createContext(null);function eG(e){let t=s.useContext(eK);if(null===t&&!e)throw Error((0,i.default)(5));return t}var eY=e.i(106880),eq=e.i(197653),e$=e.i(892757),eJ=e.i(742428),eX=e.i(420275),eQ=e.i(939485),eZ=e.i(131267);let e0={...eQ.popupStoreSelectors,disabled:(0,e$.createSelector)(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:(0,e$.createSelector)(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),openMethod:(0,e$.createSelector)(e=>e.openMethod),allowMouseEnter:(0,e$.createSelector)(e=>e.allowMouseEnter),stickIfOpen:(0,e$.createSelector)(e=>e.stickIfOpen),parent:(0,e$.createSelector)(e=>e.parent),rootId:(0,e$.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:(0,e$.createSelector)(e=>e.activeIndex),isActive:(0,e$.createSelector)((e,t)=>e.activeIndex===t),hoverEnabled:(0,e$.createSelector)(e=>e.hoverEnabled),instantType:(0,e$.createSelector)(e=>e.instantType),lastOpenChangeReason:(0,e$.createSelector)(e=>e.openChangeReason),floatingTreeRoot:(0,e$.createSelector)(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:(0,e$.createSelector)(e=>e.floatingNodeId),floatingParentNodeId:(0,e$.createSelector)(e=>e.floatingParentNodeId),itemProps:(0,e$.createSelector)(e=>e.itemProps),closeDelay:(0,e$.createSelector)(e=>e.closeDelay),hasViewport:(0,e$.createSelector)(e=>e.hasViewport),keyboardEventRelay:(0,e$.createSelector)(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class e1 extends eJ.ReactStore{constructor(e){super({...{...(0,eQ.createInitialPopupStoreState)(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new eX.FloatingTreeStore,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ew.EMPTY_OBJECT,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:s.createRef(),popupRef:s.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:s.createRef(),beforeContentFocusGuardRef:s.createRef(),onOpenChangeComplete:void 0,triggerElements:new eZ.PopupTriggerMap},e0),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");this.unsubscribeParentListener=e.store.subscribe(()=>{let o=e.store.select("rootId"),a=e.store.select("floatingTreeRoot"),s=e.store.select("keyboardEventRelay");(t!==o||n!==a||r!==s)&&(t=o,n=a,r=s,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){let n=(0,eu.useRefWithInit)(()=>new e1(t)).current;return e??n}unsubscribeParentListener=null}var e2=e.i(55461);let e3=s.createContext(void 0);function e5(){return s.useContext(e3)}let e8=(0,eT.fastComponent)(function(e){let t,{children:n,open:r,onOpenChange:a,onOpenChangeComplete:i,defaultOpen:u=!1,disabled:l=!1,modal:p,loopFocus:f=!0,orientation:g="vertical",actionsRef:m,closeParentOnEsc:v=!1,handle:b,triggerId:R,defaultTriggerId:S=null,highlightItemOnHover:E=!0}=e,I=h(!0),C=d(!0),M=eG(!0),w=e5(),T=s.useMemo(()=>w&&C?{type:"menu",store:C.store}:M?{type:"menubar",context:M}:I&&!C?{type:"context-menu",context:I}:{type:void 0},[I,C,M,w]),k=e1.useStore(b?.store,{open:u,openProp:r,activeTriggerId:S,triggerIdProp:R,parent:T});(0,eM.useOnFirstRender)(()=>{void 0===r&&!1===k.state.open&&!0===u&&k.update({open:!0,activeTriggerId:S})}),k.useControlledProp("openProp",r),k.useControlledProp("triggerIdProp",R),k.useContextCallback("onOpenChangeComplete",i);let A=k.useState("floatingTreeRoot"),P=(0,es.useFloatingNodeId)(A),D=(0,es.useFloatingParentNodeId)();(0,N.useIsoLayoutEffect)(()=>{I&&!C?k.update({parent:{type:"context-menu",context:I},floatingNodeId:P,floatingParentNodeId:D}):C&&k.update({floatingNodeId:P,floatingParentNodeId:D})},[I,C,P,D,k]);let L=k.useState("open"),j=k.useState("activeTriggerElement"),F=k.useState("positionerElement"),W=k.useState("hoverEnabled"),z=k.useState("disabled"),H=k.useState("lastOpenChangeReason"),U=k.useState("parent"),B=k.useState("activeIndex"),V=k.useState("payload"),K=k.useState("floatingParentNodeId"),G=s.useRef(null),Y=null!=K,{openMethod:q,triggerProps:$}=(0,eq.useOpenInteractionType)(L);k.useSyncedValues({disabled:l,modal:void 0===U.type?p:void 0,openMethod:q,rootId:(0,eO.useId)()}),(0,e2.useImplicitActiveTrigger)(k);let{forceUnmount:J}=(0,e2.useOpenStateTransitions)(L,k,()=>{k.update({allowMouseEnter:!1,stickIfOpen:!0})}),X=s.useRef("context-menu"!==U.type),Q=(0,ea.useTimeout)();s.useEffect(()=>{if(L||(G.current=null),"context-menu"===U.type){if(!L){Q.clear(),X.current=!1;return}Q.start(500,()=>{X.current=!0})}},[Q,L,U.type]),(0,N.useIsoLayoutEffect)(()=>{L||W||k.set("hoverEnabled",!0)},[L,W,k]);let Z=s.useRef(!0),ee=(0,ea.useTimeout)(),et=(0,y.useStableCallback)((e,t)=>{let n=t.reason;if(L===e&&t.trigger===j&&H===n||(t.preventUnmountOnClose=()=>{k.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||(t.trigger=j??void 0),a?.(e,t),t.isCanceled))return;k.state.floatingRootContext.dispatchOpenChange(e,t);let r=t.event;if(!1===e&&r?.type==="click"&&"touch"===r.pointerType&&!Z.current)return;
1if(!e&&null!==B){let e=k.context.itemDomElements.current[B];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&n===x.REASONS.triggerFocus?(Z.current=!1,ee.start(300,()=>{Z.current=!0})):(Z.current=!0,ee.clear());let o=(n===x.REASONS.triggerPress||n===x.REASONS.itemPress)&&0===r.detail&&r?.isTrusted,s=!e&&(n===x.REASONS.escapeKey||null==n),i={open:e,openChangeReason:n};G.current=t.event??null;let u=t.trigger?.id??null;(u||e)&&(i.activeTriggerId=u,i.activeTriggerElement=t.trigger??null),k.update(i),"menubar"===U.type&&(n===x.REASONS.triggerFocus||n===x.REASONS.focusOut||n===x.REASONS.triggerHover||n===x.REASONS.listNavigation||n===x.REASONS.siblingOpen)?k.set("instantType","group"):o||s?k.set("instantType",o?"click":"dismiss"):k.set("instantType",void 0)}),en=s.useCallback(()=>{k.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.imperativeAction))},[k]);s.useImperativeHandle(m,()=>({unmount:J,close:en}),[J,en]),"context-menu"===U.type&&(t=U.context),s.useImperativeHandle(t?.positionerRef,()=>F,[F]),s.useImperativeHandle(t?.actionsRef,()=>({setOpen:et}),[et]);let er=(0,eV.useSyncedFloatingRootContext)({popupStore:k,onOpenChange:et}),eo=er.context.events;s.useEffect(()=>{let e=({open:e,eventDetails:t})=>et(e,t);return eo.on("setOpen",e),()=>{eo?.off("setOpen",e)}},[eo,et]);let ei=(0,ek.useDismiss)(er,{enabled:!z,bubbles:{escapeKey:v&&"menu"===U.type},outsidePress:()=>"context-menu"!==U.type||G.current?.type==="contextmenu"||X.current,externalTree:Y?A:void 0}),eu=(0,eB.useRole)(er,{role:"menu"}),el=(0,eY.useDirection)(),ec=s.useCallback(e=>{k.select("activeIndex")!==e&&k.set("activeIndex",e)},[k]),ed=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),a=n.useState("domReferenceElement"),i=n.context.dataRef,{listRef:u,activeIndex:l,onNavigate:c=()=>{},enabled:d=!0,selectedIndex:p=null,allowEscape:f=!1,loopFocus:g=!1,nested:m=!1,rtl:v=!1,virtual:h=!1,focusItemOnOpen:b="auto",focusItemOnHover:R=!0,openOnArrowKeyDown:S=!0,disabledIndices:E,orientation:I="vertical",parentOrientation:C,cols:O=1,id:M,resetOnPointerLeave:w=!0,externalTree:T}=t,k=(0,eL.getFloatingFocusElement)(o),A=(0,eP.useValueAsRef)(k),P=(0,es.useFloatingParentNodeId)(),D=(0,es.useFloatingTree)(T);(0,N.useIsoLayoutEffect)(()=>{i.current.orientation=I},[i,I]);let L=(0,eL.isTypeableCombobox)(a),j=s.useRef(b),F=s.useRef(p??-1),W=s.useRef(null),z=s.useRef(!0),H=(0,y.useStableCallback)(e=>{c(-1===F.current?null:F.current,e)}),U=s.useRef(H),B=s.useRef(!!o),V=s.useRef(r),K=s.useRef(!1),G=s.useRef(!1),Y=s.useRef(null),q=(0,eP.useValueAsRef)(E),$=(0,eP.useValueAsRef)(r),J=(0,eP.useValueAsRef)(p),X=(0,eP.useValueAsRef)(w),Q=(0,y.useStableCallback)(()=>{function e(e){h?D?.events.emit("virtualfocus",e):Y.current=(0,e_.enqueueFocus)(e,{sync:K.current,preventScroll:!0})}let t=u.current[F.current],n=G.current;t&&e(t),(K.current?e=>e():requestAnimationFrame)(()=>{let r=u.current[F.current]||t;!r||(t||e(r),et&&(n||!z.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,N.useIsoLayoutEffect)(()=>{d&&(r&&o?(F.current=p??-1,j.current&&null!=p&&(G.current=!0,H())):B.current&&(F.current=-1,U.current()))},[d,r,o,p,H]),(0,N.useIsoLayoutEffect)(()=>{if(d){if(!r){K.current=!1;return}if(o)if(null==l){if(K.current=!1,null!=J.current)return;if(B.current&&(F.current=-1,Q()),(!V.current||!B.current)&&j.current&&(null!=W.current||!0===j.current&&null==W.current)){let e=0,t=()=>{null==u.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(F.current=null==W.current||eU(W.current,I,v)||m?(0,eF.getMinListIndex)(u):(0,eF.getMaxListIndex)(u),W.current=null,H())};t()}}else(0,eF.isIndexOutOfListBounds)(u.current,l)||(F.current=l,Q(),G.current=!1)}},[d,r,o,l,J,m,u,I,v,H,Q,q]),(0,N.useIsoLayoutEffect)(()=>{if(!d||o||!D||h||!B.current)return;let e=D.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=(0,eD.activeElement)((0,ex.ownerDocument)(o)),r=e.some(e=>e.context&&(0,eD.contains)(e.context.elements.floating,n));t&&!r&&z.current&&t.focus({preventScroll:!0})},[d,o,D,P,h]),(0,N.useIsoLayoutEffect)(()=>
1{U.current=H,V.current=r,B.current=!!o}),(0,N.useIsoLayoutEffect)(()=>{r||(W.current=null,j.current=b)},[r,b]);let Z=null!=l,ee=(0,y.useStableCallback)(e=>{if(!$.current)return;let t=u.current.indexOf(e.currentTarget);-1!==t&&(F.current!==t||l!==t)&&(F.current=t,H(e))}),et=s.useMemo(()=>({onFocus(e){K.current=!0,ee(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){K.current=!0,G.current=!1,R&&ee(e)},onPointerLeave(e){if(!$.current||!z.current||"touch"===e.pointerType)return;K.current=!0;let t=e.relatedTarget;if(!(!R||u.current.includes(t))&&X.current&&(Y.current?.(),Y.current=null,F.current=-1,H(e),!h)){let e=A.current,t=(0,eD.activeElement)((0,ex.ownerDocument)(e));e&&(0,eD.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[ee,$,A,R,u,H,X,h]),en=s.useCallback(()=>C??D?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation,[P,D,C]),er=(0,y.useStableCallback)(e=>{var t;let o,s;if(z.current=!1,K.current=!0,229===e.which||!$.current&&e.currentTarget===A.current)return;if(m&&(t=e.key,o=v?t===eW.ARROW_RIGHT:t===eW.ARROW_LEFT,s=t===eW.ARROW_UP,"both"===I||"horizontal"===I&&O&&O>1?"Escape"===t:ez(I,o,s))){eH(e.key,en())||(0,ej.stopEvent)(e),n.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.listNavigation,e.nativeEvent)),(0,eA.isHTMLElement)(a)&&(h?D?.events.emit("virtualfocus",a):a.focus());return}let i=F.current,l=(0,eF.getMinListIndex)(u,E),c=(0,eF.getMaxListIndex)(u,E);if(L||("Home"===e.key&&((0,ej.stopEvent)(e),F.current=l,H(e)),"End"===e.key&&((0,ej.stopEvent)(e),F.current=c,H(e))),O>1){let t=Array.from({length:u.current.length},()=>({width:1,height:1})),n=(0,eF.createGridCellMap)(t,O,!1),r=n.findIndex(e=>null!=e&&!(0,eF.isListIndexDisabled)(u.current,e,E)),o=n.reduce((e,t,n)=>null==t||(0,eF.isListIndexDisabled)(u.current,t,E)?e:n,-1),a=n[(0,eF.getGridNavigatedIndex)(n.map(e=>null!=e?u.current[e]:null),{event:e,orientation:I,loopFocus:g,rtl:v,cols:O,disabledIndices:(0,eF.getGridCellIndices)([...("function"!=typeof E?E:null)||u.current.map((e,t)=>(0,eF.isListIndexDisabled)(u.current,t,E)?t:void 0),void 0],n),minIndex:r,maxIndex:o,prevIndex:(0,eF.getGridCellIndexOfCorner)(F.current>c?l:F.current,t,n,O,e.key===eW.ARROW_DOWN?"bl":e.key===(v?eW.ARROW_LEFT:eW.ARROW_RIGHT)?"tr":"tl"),stopEvent:!0})];if(null!=a&&(F.current=a,H(e)),"both"===I)return}if(eH(e.key,I)){if((0,ej.stopEvent)(e),r&&!h&&(0,eD.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){F.current=eU(e.key,I,v)?l:c,H(e);return}eU(e.key,I,v)?g?i>=c?f&&i!==u.current.length?F.current=-1:(K.current=!1,F.current=l):F.current=(0,eF.findNonDisabledListIndex)(u.current,{startingIndex:i,disabledIndices:E}):F.current=Math.min(c,(0,eF.findNonDisabledListIndex)(u.current,{startingIndex:i,disabledIndices:E})):g?i<=l?f&&-1!==i?F.current=u.current.length:(K.current=!1,F.current=c):F.current=(0,eF.findNonDisabledListIndex)(u.current,{startingIndex:i,decrement:!0,disabledIndices:E}):F.current=Math.max(l,(0,eF.findNonDisabledListIndex)(u.current,{startingIndex:i,decrement:!0,disabledIndices:E})),(0,eF.isIndexOutOfListBounds)(u.current,F.current)&&(F.current=-1),H(e)}}),eo=s.useMemo(()=>h&&r&&Z&&{"aria-activedescendant":`${M}-${l}`},[h,r,Z,M,l]),ea=s.useMemo(()=>({"aria-orientation":"both"===I?void 0:I,...!L?eo:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&r&&!h){let t=(0,eD.getTarget)(e.nativeEvent);if(t&&!(0,eD.contains)(A.current,t))return;(0,ej.stopEvent)(e),n.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent)),(0,eA.isHTMLElement)(a)&&a.focus();return}er(e)},onPointerMove(){z.current=!0}}),[eo,er,A,I,L,n,r,h,a]),ei=s.useMemo(()=>{function e(e){"auto"===b&&(0,ej.isVirtualClick)(e.nativeEvent)&&(j.current=!h)}function t(e){j.current=b,"auto"===b&&(0,ej.isVirtualPointerEvent)(e.nativeEvent)&&(j.current=!0)}return{onKeyDown(e){var t,r;let o=n.select("open");z.current=!1;let a=e.key.startsWith("Arrow"),s=(t=e.key,r=en(),ez(r,v?t===eW.ARROW_LEFT:t===eW.ARROW_RIGHT,t===eW.ARROW_DOWN)),i=eH(e.key,I),l=(m?s:i)||"Enter"===e.key||""===e.key.trim();if(h&&o)return er(e);if(o||S||!a){if(l){let t=eH(e.key,en());W.current=m&&t?null:e.key}if(m){s&&((0,ej.stopEvent)(e),o?(F.current=(0,eF.getMinListIndex)(u,q.current),H(e)):n.setOpen(!0,(0,_.createChangeEventDetails)(x.REASONS.listNavigation,e.nativeEvent,e.currentTarget)));return}i&&(null!=J.current&&(F.current=J.current),(0,ej.stopEvent)(e),!o&&S?n.setOpen(!0,(0,_.createChangeEventDetails)(x.REASONS.listNavigation,e.nativeEvent,e.currentTarget)):er(e),o&&H(e))}},onFocus(e){n.select("open")&&!h&&(F.current=-1,H(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[er,q,b,u,m,H,n,S,I,en,v,J,h]),eu=s.useMemo(()=>({...eo,...ei}),[eo,ei]);return s.useMemo(()=>d?{reference:eu,floating:ea,item:et,trigger:ei}:{},[d,eu,ea,ei,et])}
1(er,{enabled:!z,listRef:k.context.itemDomElements,activeIndex:B,nested:void 0!==U.type,loopFocus:f,orientation:g,parentOrientation:"menubar"===U.type?U.context.orientation:void 0,rtl:"rtl"===el,disabledIndices:ew.EMPTY_ARRAY,onNavigate:ec,openOnArrowKeyDown:"context-menu"!==U.type,externalTree:Y?A:void 0,focusItemOnHover:E}),ep=s.useCallback(e=>{k.context.typingRef.current=e},[k]),ef=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,o=n.useState("open"),{listRef:a,elementsRef:i,activeIndex:u,onMatch:l,onTypingChange:c,enabled:d=!0,resetMs:p=750,selectedIndex:f=null}=t,g=(0,ea.useTimeout)(),m=s.useRef(""),v=s.useRef(f??u??-1),h=s.useRef(null);(0,N.useIsoLayoutEffect)(()=>{(o||null===f)&&(g.clear(),h.current=null,""!==m.current&&(m.current=""))},[o,f,g]),(0,N.useIsoLayoutEffect)(()=>{o&&""===m.current&&(v.current=f??u??-1)},[o,f,u]);let x=(0,y.useStableCallback)(e=>{e?r.current.typing||(r.current.typing=e,c?.(e)):r.current.typing&&(r.current.typing=e,c?.(e))}),b=(0,y.useStableCallback)(e=>{function t(e,n,r=0){if(0===e.length)return -1;let o=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let t=0;t<e.length;t+=1){let n=(o+t)%e.length,r=e[n];if(r?.toLocaleLowerCase().startsWith(a)&&function(e){let t=i?.current[e];return!t||(0,eF.isElementVisible)(t)}(n))return n}return -1}let n=a.current;if(m.current.length>0&&" "===e.key&&((0,ej.stopEvent)(e),x(!0)),m.current.length>0&&" "!==m.current[0]&&-1===t(n,m.current)&&" "!==e.key&&x(!1),null==n||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;o&&" "!==e.key&&((0,ej.stopEvent)(e),x(!0));let r=""===m.current;r&&(v.current=f??u??-1),n.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",v.current=h.current),m.current+=e.key,g.start(p,()=>{m.current="",v.current=h.current,x(!1)});let s=r?f??u??-1:v.current,c=t(n,m.current,(s??0)+1);-1!==c?(l?.(c),h.current=c):" "!==e.key&&(m.current="",x(!1))}),R=(0,y.useStableCallback)(e=>{let t=e.relatedTarget,r=n.select("domReferenceElement"),o=n.select("floatingElement"),a=(0,eD.contains)(r,t),s=(0,eD.contains)(o,t);a||s||(g.clear(),m.current="",v.current=h.current,x(!1))}),S=s.useMemo(()=>({onKeyDown:b,onBlur:R}),[b,R]),E=s.useMemo(()=>({onKeyDown:b,onBlur:R}),[b,R]);return s.useMemo(()=>d?{reference:S,floating:E}:{},[d,S,E])}(er,{listRef:k.context.itemLabels,elementsRef:k.context.itemDomElements,activeIndex:B,resetMs:eg.TYPEAHEAD_RESET_MS,onMatch:e=>{L&&e!==B&&k.set("activeIndex",e)},onTypingChange:ep}),{getReferenceProps:em,getFloatingProps:ev,getItemProps:eh,getTriggerProps:eb}=(0,eN.useInteractions)([ei,eu,ed,ef]),eR=s.useMemo(()=>{let e=(0,O.mergeProps)(em(),{onMouseMove(){k.set("allowMouseEnter",!0)}},$);return delete e.role,e},[em,k,$]),ey=s.useMemo(()=>{let e=eb();if(!e)return e;let t=(0,O.mergeProps)(e,$);return delete t.role,delete t["aria-controls"],t},[eb,$]),eS=s.useMemo(()=>ev({onMouseMove(){k.set("allowMouseEnter",!0),"menu"===U.type&&k.set("hoverEnabled",!1)},onClick(){k.select("hoverEnabled")&&k.set("hoverEnabled",!1)},onKeyDown(e){let t=k.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ev,U.type,k]),eE=s.useMemo(()=>eh(),[eh]);k.useSyncedValues({floatingRootContext:er,activeTriggerProps:eR,inactiveTriggerProps:ey,popupProps:eS,itemProps:eE});let eI=s.useMemo(()=>({store:k,parent:T}),[k,T]),eC=(0,o.jsx)(c.Provider,{value:eI,children:"function"==typeof n?n({payload:V}
1):n});return void 0===U.type||"context-menu"===U.type?(0,o.jsx)(es.FloatingTree,{externalTree:A,children:eC}):eC});var e4=e.i(777059),e9=e.i(621913),e6=e.i(430892),e7=e.i(457340),te=e.i(285182),tt=e.i(420041);function tn(e){let{render:t,className:n,style:r,state:o=ew.EMPTY_OBJECT,props:a=ew.EMPTY_ARRAY,refs:i=ew.EMPTY_ARRAY,metadata:u,stateAttributesMapping:l,tag:c="div",...d}=e,{compositeProps:f,compositeRef:g}=function(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=(0,tt.useCompositeRootContext)(),{ref:o,index:a}=D(e),i=n===a,u=s.useRef(null),l=(0,I.useMergedRefs)(o,u);return{compositeProps:s.useMemo(()=>({tabIndex:i?0:-1,onFocus(){r(a)},onMouseMove(){let e=u.current;if(!t||!e)return;let n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;i||n||e.focus()}}),[i,r,a,t]),compositeRef:l,index:a}}({metadata:u});return(0,p.useRenderElement)(c,e,{state:o,ref:[...i,g],props:[f,...a,d],stateAttributesMapping:l})}var tr=e.i(891676),to=e.i(48432),ta=e.i(391276);let ts=(0,eT.fastComponentRef)(function(e,t){let n,r,a,u,l,{render:c,className:g,disabled:m=!1,nativeButton:v=!0,id:b,openOnHover:R,delay:S=100,closeDelay:E=0,handle:I,payload:O,style:M,...w}=e,T=d(!0),k=I?.store??T?.store;if(!k)throw Error((0,i.default)(85));let A=(0,L.useBaseUiId)(b),P=k.useState("isTriggerActive",A),D=k.useState("floatingRootContext"),j=k.useState("isOpenedByTrigger",A),F=s.useRef(null),W=(n=h(!0),r=d(!0),a=eG(!0),s.useMemo(()=>a?{type:"menubar",context:a}:n&&!r?{type:"context-menu",context:n}:{type:void 0},[n,r,a])),z=(0,tt.useCompositeRootContext)(!0),H=(0,es.useFloatingTree)(),U=s.useMemo(()=>H??new eX.FloatingTreeStore,[H]),B=(0,es.useFloatingNodeId)(U),V=(0,es.useFloatingParentNodeId)(),{registerTrigger:K,isMountedByThisTrigger:G}=(0,e2.useTriggerDataForwarding)(A,F,k,{payload:O,closeDelay:E,parent:W,floatingTreeRoot:U,floatingNodeId:B,floatingParentNodeId:V,keyboardEventRelay:z?.relayKeyboardEvent}),Y="menubar"===W.type,q=k.useState("disabled"),$=m||q||Y&&W.context.disabled,{getButtonProps:J,buttonRef:X}=(0,C.useButton)({disabled:$,native:v});s.useEffect(()=>{j||void 0!==W.type||(k.context.allowMouseUpTriggerRef.current=!1)},[k,j,W.type]);let Q=s.useRef(null),Z=(0,ea.useTimeout)(),ee=(0,y.useStableCallback)(e=>{if(!Q.current)return;Z.clear(),k.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if((0,eD.contains)(Q.current,t)||(0,eD.contains)(k.select("positionerElement"),t)||t===Q.current||null!=t&&function e(t){return(0,eA.isHTMLElement)(t)&&t.hasAttribute("data-rootownerid")?t.getAttribute("data-rootownerid")??void 0:(0,eA.isLastTraversableNode)(t)?void 0:e((0,eA.getParentNode)(t))}(t)===k.select("rootId"))return;let n=function(e){let t=e.getBoundingClientRect(),n=(0,te.ownerWindow)(e),r=n.getComputedStyle(e,"::before"),o=n.getComputedStyle(e,"::after");if("none"===r.content&&"none"===o.content)return t;let a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,i=parseFloat(o.width)||0,u=parseFloat(o.height)||0,l=Math.max(t.width,a,i),c=Math.max(t.height,s,u),d=l-t.width,p=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-p/2,bottom:t.bottom+p/2}}(Q.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||U.events.emit("close",{domEvent:e,reason:x.REASONS.cancelOpen})});s.useEffect(()=>{j&&k.select("lastOpenChangeReason")===x.REASONS.triggerHover&&(0,ex.ownerDocument)(Q.current).addEventListener("mouseup",ee,{once:!0})},[j,ee,k]);let et=Y&&W.context.hasSubmenuOpen,en=R??et,er=(0,e7.useHoverReferenceInteraction)(D,{enabled:en&&!$&&"context-menu"!==W.type&&(!Y||et&&!G),handleClose:(0,e4.safePolygon)({blockPointerEvents:!Y}),mouseOnly:!0,move:!1,restMs:void 0===W.type?S:void 0,delay:{close:E},triggerElementRef:F,externalTree:U,isActiveTrigger:P,isClosing:()=>"ending"===k.select("transitionStatus")}),eo=function(e,t){let n=(0,ea.useTimeout)(),[r,o]=s.useState(!1);return(0,N.useIsoLayoutEffect)(()=>{e&&"trigger-hover"===t?(o(!0),n.start(eg.PATIENT_CLICK_THRESHOLD,()=>{o(!1)})):e||(n.clear(),o(!1))},[e,t,n]),r}(j,k.select("lastOpenChangeReason")),ei=(0,e9.useClick)(D,{enabled:!$&&"context-menu"!==W.type,event:j&&Y?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===W.type&&eo}),eu=(0,e6.useFocus)(D,{enabled:!$&&et}),el=function(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,o=s.useRef(!1);return s.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!r||"close"===n&&r)&&(o.current=!0,(0,ex.ownerDocument)(e.currentTarget).addEventListener("click",()=>{o.current=!1},{once:!0}))},onClick:e=>{o.current&&(o.current=!1,e.preventBaseUIHandler())}}:ew.EMPTY_OBJECT,[t,n,r])}({open:j,enabled:Y,mouseDownAction:"open"}),ec=(0,eN.useInteractions)([ei,eu]),ed={disabled:$,open:j},ep=k.useState("triggerProps",G),ef=[Q,t,X,K,F],em=[ec.getReferenceProps(),er??ew.EMPTY_OBJECT,ep,{"aria-haspopup":"menu",id:A,onMouseDown:e=>{k.select("open")||(Z.start(200,()=>{k.context.allowMouseUpTriggerRef.current=!0}),(0,ex.ownerDocument)(e.currentTarget).addEventListener("mouseup",ee,{once:!0}))}},Y?{role:"menuitem"}:{},el,w,J],{preFocusGuardRef:ev,handlePreFocusGuardFocus:eh,handleFocusTargetFocus:eb}=(u=s.useRef(null),l=(0,y.useStableCallback)(e=>{tr.flushSync(()=>{k.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,to.getTabbableBeforeElement)(u.current);t?.focus()}),{preFocusGuardRef:u,handlePreFocusGuardFocus:l,handleFocusTargetFocus:(0,y.useStableCallback)(e=>{let t=k.select("positionerElement");
1if(t&&(0,to.isOutsideEvent)(e,t))k.context.beforeContentFocusGuardRef.current?.focus();else{tr.flushSync(()=>{k.setOpen(!1,(0,_.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,to.getTabbableAfterElement)(k.context.triggerFocusTargetRef.current||F.current);for(;null!==n&&(0,eD.contains)(t,n);){let e=n;if((n=(0,to.getNextTabbable)(n))===e)break}n?.focus()}})}),eR=(0,p.useRenderElement)("button",e,{enabled:!Y,stateAttributesMapping:f.pressableTriggerOpenStateMapping,state:ed,ref:ef,props:em});return Y?(0,o.jsx)(tn,{tag:"button",render:c,className:g,style:M,state:ed,refs:ef,props:em,stateAttributesMapping:f.pressableTriggerOpenStateMapping}):j?(0,o.jsxs)(s.Fragment,{children:[(0,o.jsx)(ta.FocusGuard,{ref:ev,onFocus:eh},`${A}-pre-focus-guard`),(0,o.jsx)(s.Fragment,{children:eR},A),(0,o.jsx)(ta.FocusGuard,{ref:k.context.triggerFocusTargetRef,onFocus:eb},`${A}-post-focus-guard`)]}):(0,o.jsx)(s.Fragment,{children:eR},A)});var ti=e.i(218289);let tu=((r={}).popupWidth="--popup-width",r.popupHeight="--popup-height",r),tl={activationDirection:e=>e?{"data-activation-direction":e}:null},tc=s.forwardRef(function(e,t){let{render:n,className:r,style:o,children:a,...s}=e,{store:i}=d(),{side:u}=l(),c=i.useState("instantType"),{children:f,state:g}=(0,ti.usePopupViewport)({store:i,side:u,cssVars:tu,children:a}),m={activationDirection:g.activationDirection,transitioning:g.transitioning,instant:c};return(0,p.useRenderElement)("div",e,{state:m,ref:t,props:[s,{children:f}],stateAttributesMapping:tl})});var td=e.i(301410);let tp=s.forwardRef(function(e,t){let{render:n,className:r,label:o,id:a,nativeButton:u=!1,openOnHover:c=!0,delay:g=100,closeDelay:m=0,disabled:v=!1,style:h,...x}=e,b=D(),R=l(),{store:y}=d(),S=(0,L.useBaseUiId)(a),E=y.useState("open"),I=y.useState("floatingRootContext"),C=y.useState("floatingTreeRoot"),O=(0,e2.useTriggerRegistration)(S,y),M=s.useCallback(e=>{let t=O(e);return null!==e&&y.select("open")&&null==y.select("activeTriggerId")&&y.update({activeTriggerId:S,activeTriggerElement:e,closeDelay:m}),t},[O,m,y,S]),w=s.useRef(null),T=s.useCallback(e=>{w.current=e,y.set("activeTriggerElement",e)},[y]),N=e5();if(!N?.parentMenu)throw Error((0,i.default)(37));y.useSyncedValue("closeDelay",m);let A=N.parentMenu,P=A.useState("itemProps"),j=A.useState("isActive",b.index),F=s.useMemo(()=>({type:"submenu-trigger",setActive(){A.set("activeIndex",b.index)}}),[A,b.index]),_=y.useState("disabled"),W=v||_,{getItemProps:z,itemRef:H}=k({closeOnClick:!1,disabled:W,highlighted:j,id:S,store:y,typingRef:A.context.typingRef,nativeButton:u,itemMetadata:F,nodeId:R?.context.nodeId}),U=y.useState("hoverEnabled"),B=A.useState("allowMouseEnter"),V=(0,e7.useHoverReferenceInteraction)(I,{enabled:U&&c&&!W,handleClose:(0,e4.safePolygon)({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:g,delay:B?{open:g,close:m}:0,triggerElementRef:w,externalTree:C,isClosing:()=>"ending"===y.select("transitionStatus")}),K=(0,e9.useClick)(I,{enabled:!W,event:"mousedown",toggle:!c,ignoreMouse:c,stickIfOpen:!1}),G=(0,eN.useInteractions)([K]),Y=y.useState("triggerProps",!0);return delete Y.id,(0,p.useRenderElement)("div",e,{state:{disabled:W,highlighted:j,open:E},stateAttributesMapping:f.triggerOpenStateMapping,props:[G.getReferenceProps(),V,Y,P,{tabIndex:E||j?0:-1,onBlur(){j&&A.set("activeIndex",null)}},x,z],ref:[t,b.ref,H,M,T]})});class tf{constructor(){this.store=new e1}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,i.default)(83,e));this.store.setOpen(!0,(0,_.createChangeEventDetails)("imperative-action",void 0,t))}close(){this.store.setOpen(!1,(0,_.createChangeEventDetails)("imperative-action",void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,g,"Backdrop",0,R,"CheckboxItem",0,W,"CheckboxItemIndicator",0,U,"Group",0,V,"GroupLabel",0,K,"Handle",0,tf,"Item",0,G,"LinkItem",0,Y,"Popup",0,ee,"Portal",0,er,"Positioner",0,eR,"RadioGroup",0,eS,"RadioItem",0,eI,"RadioItemIndicator",0,eC,"Root",0,e8,"Separator",()=>td.Separator,"SubmenuRoot",0,function(e){let t=d().store,n=s.useMemo(()=>({parentMenu:t}),[t]);return(0,o.jsx)(e3.Provider,{value:n,children:(0,o.jsx)(e8,{...e})})},"SubmenuTrigger",0,tp,"Trigger",0,ts,"Viewport",0,tc,"createHandle",0,function(){return new tf}],572897);var tg=e.i(572897),tg=tg;e.i(636588),e.i(702893),e.s(["DropdownMenu",0,function({...e}){return(0,o.jsx)(tg.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:t=0,side:n="bottom",sideOffset:r=4,className:s,...i}){return(0,o.jsx)(tg.Portal,{children:(0,o.jsx)(tg.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:t,side:n,sideOffset:r,children:(0,o.jsx)(tg.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("bg-popover text-popover-foreground ring-foreground
1/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",s),...i})})})},"DropdownMenuItem",0,function({className:e,inset:t,variant:n="default",...r}){return(0,o.jsx)(tg.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})},"DropdownMenuSeparator",0,function({className:e,...t}){return(0,o.jsx)(tg.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("bg-border -mx-1 my-1 h-px",e),...t})},"DropdownMenuTrigger",0,function({...e}){return(0,o.jsx)(tg.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}],236610)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.