vendor: 4,298 bytes, line 1
1import{j as s}from"./jsx-runtime-D_zvdyIk.js";import{r as a}from"./chunk-JZWAC4HX-CvF4xNvl.js";import{u as $,c as $e}from"./index-DiMsKsuQ.js";import{P as j,c as he,u as Ke,d as an}from"./index-DXc_e2PQ.js";import{c as Ue,u as Be}from"./index-COkMidC3.js";import{P as sn,D as cn}from"./index-BOpV76vV.js";import{h as un,R as dn,F as ln}from"./index-B85n1Hz2.js";import{u as fn,a as pn,o as mn,s as gn,l as hn,f as vn,b as wn,c as xn,h as Mn,d as Cn,R as yn}from"./index-h4s6-X72.js";import{a as ve,u as pe}from"./index-B-xKeptW.js";import{u as Re}from"./index-OKYRncZt.js";import{a as Rn}from"./button-BBqyhS_x.js";import{g as bn,h as _n,b as In}from"./react-icons.esm-D6dadWCr.js";import{c as B}from"./utils-DSbFSvvO.js";function w(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var Ce=0;function Pn(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Le()),document.body.insertAdjacentElement("beforeend",e[1]??Le()),Ce++,()=>{Ce===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ce--}},[])}function Le(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ie="Popper",[We,Ye]=he(Ie),[Nn,Ve]=We(Ie),Xe=e=>{const{__scopePopper:t,children:n}=e,[o,r]=a.useState(null);return s.jsx(Nn,{scope:t,anchor:o,onAnchorChange:r,children:n})};Xe.displayName=Ie;var ze="PopperAnchor",He=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,c=Ve(ze,n),u=a.useRef(null),f=$(t,u);return a.useEffect(()=>{c.onAnchorChange((o==null?void 0:o.current)||u.current)}),o?null:s.jsx(j.div,{...r,ref:f})});He.displayName=ze;var Pe="PopperContent",[En,Sn]=We(Pe),Ze=a.forwardRef((e,t)=>{var G,ee,S,te,je,Fe;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:c="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:p=!0,collisionBoundary:l=[],collisionPadding:d=0,sticky:i="partial",hideWhenDetached:m=!1,updatePositionStrategy:h="optimized",onPlaced:v,...M}=e,x=Ve(Pe,n),[C,N]=a.useState(null),y=$(t,ne=>N(ne)),[b,W]=a.useState(null),D=fn(b),F=(D==null?void 0:D.width)??0,R=(D==null?void 0:D.height)??0,K=o+(c!=="center"?"-"+c:""),k=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(l)?l:[l],Y=U.length>0,L={padding:k,boundary:U.filter(Dn),altBoundary:Y},{refs:H,floatingStyles:Z,placement:T,isPositioned:q,middlewareData:E}=pn({strategy:"fixed",placement:K,whileElementsMounted:(...ne)=>Cn(...ne,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[mn({mainAxis:r+R,alignmentAxis:u}),p&&gn({mainAxis:!0,crossAxis:!1,limiter:i==="partial"?hn():void 0,...L}),p&&vn({...L}),wn({...L,apply:({elements:ne,rects:ke,availableWidth:tn,availableHeight:nn})=>{const{width:on,height:rn}=ke.reference,le=ne.floating.style;le.setProperty("--radix-popper-available-width",`${tn}px`),le.setProperty("--radix-popper-available-height",`${nn}px`),le.setProperty("--radix-popper-anchor-width",`${on}px`),le.setProperty("--radix-popper-anchor-height",`${rn}px`)}}),b&&xn({element:b,padding:f}),Tn({arrowWidth:F,arrowHeight:R}),m&&Mn({strategy:"referenceHidden",...L})]}),[g,P]=Qe(T),_=ve(v);pe(()=>{q&&(_==null||_())},[q,_]);const O=(G=E.arrow)==null?void 0:G.x,J=(ee=E.arrow)==null?void 0:ee.y,Q=((S=E.arrow)==null?void 0:S.centerOffset)!==0,[de,V]=a.useState();return pe(()=>{C&&V(window.getComputedStyle(C).zIndex)},[C]),s.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:q?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(te=E.transformOrigin)==null?void 0:te.x,(je=E.transformOrigin)==null?void 0:je.y].join(" "),...((Fe=E.hide)==null?void 0:Fe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(En,{scope:n,placedSide:g,onArrowChange:W,arrowX:O,arrowY:J,shouldHideArrow:Q,children:s.jsx(j.div,{"data-side":g,"data-align":P,...M,ref:y,style:{...M.style,animation:q?void 0:"none"}})})})});Ze.displayName=Pe;var qe="PopperArrow",An={top:"bottom",right:"left",bottom:"top",left:"r
1ight"},Je=a.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,c=Sn(qe,o),u=An[c.placedSide];return s.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:s.jsx(yn,{...r,ref:n,style:{...r.style,display:"block"}})})});Je.displayName=qe;function Dn(e){return e!==null}var Tn=e=>({name:"transformOrigin",options:e,fn(t){var x,C,N;const{placement:n,rects:o,middlewareData:r}=t,u=((x=r.arrow)==null?void 0:x.centerOffset)!==0,f=u?0:e.arrowWidth,p=u?0:e.arrowHeight,[l,d]=Qe(n),i={start:"0%",center:"50%",end:"100%"}[d],m=(((C=r.arrow)==null?void 0:C.x)??0)+f/2,h=(((N=r.arrow)==null?void 0:N.y)??0)+p/2;let v="",M="";return l==="bottom"?(v=u?i:`${m}px`,M=`${-p}px`):l==="top"?(v=u?i:`${m}px`,M=`${o.floating.height+p}px`):l==="right"?(v=`${-p}px`,M=u?i:`${h}px`):l==="left"&&(v=`${o.floating.width+p}px`,M=u?i:`${h}px`),{data:{x:v,y:M}}}});function Qe(e){const[t,n="center"]=e.split("-");return[t,n]}var On=Xe,jn=He,Fn=Ze,kn=Je;function Ln(e,t){return a.useReducer((n,o)=>t[n][o]??n,e)}var se=e=>{const{present:t,children:n}=e,o=Gn(t),r=typeof n=="function"?n({present:o.isPresent}):a.Children.only(n),c=$(o.ref,$n(r));return typeof n=="function"||o.isPresent?a.cloneElement(r,{ref:c}):null};se.displayName="Presence";function Gn(e){const[t,n]=a.useState(),o=a.useRef(null),r=a.useRef(e),c=a.useRef("none"),u=e?"mounted":"unmounted",[f,p]=Ln(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=fe(o.current);c.current=f==="mounted"?l:"none"},[f]),pe(()=>{const l=o.current,d=r.current;if(d!==e){const m=c.current,h=fe(l);e?p("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?p("UNMOUNT"):p(d&&m!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,p]),pe(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,i=h=>{const M=fe(o.current).includes(h.animationName);if(h.target===t&&M&&(p("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=h=>{h.target===t&&(c.current=fe(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:a.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function fe(e){return(e==null?void 0:e.animationName)||"none"}function $n(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ye="rovingFocusGroup.onEntryFocus",Kn={bubbles:!1,cancelable:!0},ce="RovingFocusGroup",[be,et,Un]=Ue(ce),[Bn,tt]=he(ce,[Un]),[Wn,Yn]=Bn(ce),nt=a.forwardRef((e,t)=>s.jsx(be.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(be.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Vn,{...e,ref:t})})}));nt.displayName=ce;var Vn=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:p,onEntryFocus:l,preventScrollOnEntryFocus:d=!1,...i}=e,m=a.useRef(null),h=$(t,m),v=Be(c),[M,x]=Ke({prop:u,defaultProp:f??null,onChange:p,caller:ce}),[C,N]=a.useState(!1),y=ve(l),b=et(n),W=a.useRef(!1),[D,F]=a.useState(0);return a.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(ye,y),()=>R.removeEventListener(ye,y)},[y]),s.jsx(Wn,{scope:n,orientation:o,dir:v,loop:r,currentTabStopId:M,onItemFocus:a.useCallback(R=>x(R),[x]),onItemShiftTab:a.useCallback(()=>N(!0),[]),onFocusableItemAdd:a.useCallback(()=>F(R=>R+1),[]),onFocusableItemRemove:a.useCallback(()=>F(R=>R-1),[]),children:s.jsx(j.div,{tabIndex:C||D===0?-1:0,"data-orientation":o,...i,ref:h,style:{outline:"none",...e.style},onMouseDown:w(e.onMouseDown,()=>{W.current=!0}),onFocus:w(e.onFocus,R=>{const K=!W.current;
vendor: 16,971 bytes, line 1
1if(R.target===R.currentTarget&&K&&!C){const k=new CustomEvent(ye,Kn);if(R.currentTarget.dispatchEvent(k),!k.defaultPrevented){const U=b().filter(T=>T.focusable),Y=U.find(T=>T.active),L=U.find(T=>T.id===M),Z=[Y,L,...U].filter(Boolean).map(T=>T.ref.current);at(Z,d)}}W.current=!1}),onBlur:w(e.onBlur,()=>N(!1))})})}),ot="RovingFocusGroupItem",rt=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:c,children:u,...f}=e,p=Re(),l=c||p,d=Yn(ot,n),i=d.currentTabStopId===l,m=et(n),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:M}=d;return a.useEffect(()=>{if(o)return h(),()=>v()},[o,h,v]),s.jsx(be.ItemSlot,{scope:n,id:l,focusable:o,active:r,children:s.jsx(j.span,{tabIndex:i?0:-1,"data-orientation":d.orientation,...f,ref:t,onMouseDown:w(e.onMouseDown,x=>{o?d.onItemFocus(l):x.preventDefault()}),onFocus:w(e.onFocus,()=>d.onItemFocus(l)),onKeyDown:w(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const C=Hn(x,d.orientation,d.dir);if(C!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=m().filter(b=>b.focusable).map(b=>b.ref.current);if(C==="last")y.reverse();else if(C==="prev"||C==="next"){C==="prev"&&y.reverse();const b=y.indexOf(x.currentTarget);y=d.loop?Zn(y,b+1):y.slice(b+1)}setTimeout(()=>at(y))}}),children:typeof u=="function"?u({isCurrentTabStop:i,hasTabStop:M!=null}):u})})});rt.displayName=ot;var Xn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zn(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hn(e,t,n){const o=zn(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Xn[o]}function at(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function Zn(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var qn=nt,Jn=rt,_e=["Enter"," "],Qn=["ArrowDown","PageUp","Home"],st=["ArrowUp","PageDown","End"],eo=[...Qn,...st],to={ltr:[..._e,"ArrowRight"],rtl:[..._e,"ArrowLeft"]},no={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ie="Menu",[re,oo,ro]=Ue(ie),[X,ct]=he(ie,[ro,Ye,tt]),we=Ye(),it=tt(),[ao,z]=X(ie),[so,ue]=X(ie),ut=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:c,modal:u=!0}=e,f=we(t),[p,l]=a.useState(null),d=a.useRef(!1),i=ve(c),m=Be(r);return a.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(On,{...f,children:s.jsx(ao,{scope:t,open:n,onOpenChange:i,content:p,onContentChange:l,children:s.jsx(so,{scope:t,onClose:a.useCallback(()=>i(!1),[i]),isUsingKeyboardRef:d,dir:m,modal:u,children:o})})})};ut.displayName=ie;var co="MenuAnchor",Ne=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=we(n);return s.jsx(jn,{...r,...o,ref:t})});Ne.displayName=co;var Ee="MenuPortal",[io,dt]=X(Ee,{forceMount:void 0}),lt=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,c=z(Ee,t);return s.jsx(io,{scope:t,forceMount:n,children:s.jsx(se,{present:n||c.open,children:s.jsx(sn,{asChild:!0,container:r,children:o})})})};lt.displayName=Ee;var A="MenuContent",[uo,Se]=X(A),ft=a.forwardRef((e,t)=>{const n=dt(A,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,c=z(A,e.__scopeMenu),u=ue(A,e.__scopeMenu);return s.jsx(re.Provider,{scope:e.__scopeMenu,children:s.jsx(se,{present:o||c.open,children:s.jsx(re.Slot,{scope:e.__scopeMenu,children:u.modal?s.jsx(lo,{...r,ref:t}):s.jsx(fo,{...r,ref:t})})})})}),lo=a.forwardRef((e,t)=>{const n=z(A,e.__scopeMenu),o=a.useRef(null),r=$(t,o);return a.useEffect(()=>{const c=o.current;if(c)return un(c)},[]),s.jsx(Ae,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:w(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),fo=a.forwardRef((e,t)=>{const n=z(A,e.__scopeMenu);return s.jsx(Ae,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),po=Rn("MenuContent.ScrollLock"),Ae=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:p,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:i,onInteractOutside:m,onDismiss:h,disableOutsideScroll:v,...M}=e,x=z(A,n),C=ue(A,n),N=we(n),y=it(n),b=oo(n),[W,D]=a.useState(null),F=a.useRef(null),R=$(t,F,x.onContentChange),K=a.useRef(0),k=a.useRef(""),U=a.useRef(0),Y=a.useRef(null),L=a.useRef("right"),H=a.useRef(0),Z=v?dn:a.Fragment,T=v?{as:po,allowPinchZoom:!0}:void 0,q=g=>{var G,ee;const P=k.current+g,_=b().filter(S=>!S.disabled),O=document.activeElement,J=(G=_.find(S=>S.ref.current===O))==null?void 0:G.textValue,Q=_.map(S=>S.textValue),de=_o(Q,P,J),V=(ee=_.find(S=>S.textValue===de))==null?void 0:ee.ref.current;(function S(te){k.current=te,window.clearTimeout(K.current),te!==""&&(K.current=window.setTimeout(()=>S(""),1e3))})(P),V&&setTimeout(()=>V.focus())};a.useEffect(()=>()=>window.clearTimeout(K.current),[]),Pn();const E=a.useCallback(g=>{var _,O;return L.current===((_=Y.current)==null?void 0:_.side)&&Po(g,(O=Y.current)==null?void 0:O.area)},[]);return s.jsx(uo,{scope:n,searchRef:k,onItemEnter:a.useCallback(g=>{E(g)&&g.preventDefault()},[E]),onItemLeave:a.useCallback(g=>{var P;E(g)||((P=F.current)==null||P.focus(),D(null))},[E]),onTriggerLeave:a.useCallback(g=>{E(g)&&g.preventDefault()},[E]),pointerGraceTimerRef:U,onPointerGraceIntentChange:a.useCallback(g=>{Y.current=g},[]),children:s.jsx(Z,{...T,children:s.jsx(ln,{asChild:!0,trapped:r,onMountAutoFocus:w(c,g=>{var P;g.preventDefault(),(P=F.current)==null||P.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:s.jsx(cn,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:i,onInteractOutside:m,onDismiss:h,children:s.jsx(qn,{asChild:!0,...y,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:W,onCurrentTabStopIdChange:D,onEntryFocus:w(p,g=>{C.isUsingKeyboardRef.current||g.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Fn,{role:"menu","aria-orientation":"vertical","data-state":Nt(x.open),"data-radix-menu-content":"",dir:C.dir,...N,...M,ref:R,style:{outline:"none",...M.style},onKeyDown:w(M.onKeyDown,g=>{const _=g.target.closest("[data-radix-menu-content]")===g.currentTarget,O=g.ctrlKey||g.altKey||g.metaKey,J=g.key.length===1;_&&(g.key==="Tab"&&g.preventDefault(),!O&&J&&q(g.key));const Q=F.current;if(g.target!==Q||!eo.includes(g.key))return;g.preventDefault();const V=b().filter(G=>!G.disabled).map(G=>G.ref.current);st.includes(g.key)&&V.reverse(),Ro(V)}),onBlur:w(e.onBlur,g=>{g.currentTarget.contains(g.target)||(window.clearTimeout(K.current),k.current="")}),onPointerMove:w(e.onPointerMove,ae(g=>{const P=g.target,_=H.current!==g.clientX;if(g.currentTarget.contains(P)&&_){const O=g.clientX>H.current?"right":"left";L.current=O,H.current=g.clientX}}))})})})})})})});ft.displayName=A;var mo="MenuGroup",De=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return s.jsx(j.div,{role:"group",...o,ref:t})});De.displayName=mo;var go="MenuLabel",pt=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return s.jsx(j.div,{...o,ref:t})});pt.displayName=go;var me="MenuItem",Ge="menu.itemSelect",xe=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,c=a.useRef(null),u=ue(me,e.__scopeMenu),f=Se(me,e.__scopeMenu),p=$(t,c),l=a.useRef(!1),d=()=>{const i=c.current;if(!n&&i){const m=new CustomEvent(Ge,{bubbles:!0,cancelable:!0});i.addEventListener(Ge,h=>o==null?void 0:o(h),{once:!0}),an(i,m),m.defaultPrevented?l.current=!1:u.onClose()}};return s.jsx(mt,{...r,ref:p,disabled:n,onClick:w(e.onClick,d),onPointerDown:i=>{var m;(m=e.onPointerDown)==null||m.call(e,i),l.current=!0},onPointerUp:w(e.onPointerUp,i=>{var m;l.current||(m=i.currentTarget)==null||m.click()}),onKeyDown:w(e.onKeyDown,i=>{const m=f.searchRef.current!=="";n||m&&i.key===" "||_e.includes(i.key)&&(i.currentTarget.click(),i.preventDefault())})})});xe.displayName=me;var mt=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...c}=e,u=Se(me,n),f=it(n),p=a.useRef(null),l=$(t,p),[d,i]=a.useState(!1),[m,h]=a.useState("");return a.useEffect(()=>{const v=p.current;v&&h((v.textContent??"").trim())},[c.children]),s.jsx(re.ItemSlot,{scope:n,disabled:o,textValue:r??m,children:s.jsx(Jn,{asChild:!0,...f,focusable:!o,children:s.jsx(j.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:l,onPointerMove:w(e.onPointerMove,ae(v=>{o?u.onItemLeave(v):(u.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:w(e.onPointerLeave,ae(v=>u.onItemLeave(v))),onFocus:w(e.onFocus,()=>i(!0)),onBlur:w(e.onBlur,()=>i(!1))})})})}),ho="MenuCheckboxItem",gt=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return s.jsx(Mt,{scope:e.__scopeMenu,checked:n,children:s.jsx(xe,{role:"menuitemcheckbox","aria-checked":ge(n)?"mixed":n,...r,ref:t,"data-state":Oe(n),onSelect:w(r.onSelect,()=>o==null?void 0:o(ge(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gt.displayName=ho;var ht="MenuRadioGroup",[vo,wo]=X(ht,{value:void 0,onValueChange:()=>{}}),vt=a.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,c=ve(o);return s.jsx(vo,{scope:e.__scopeMenu,value:n,onValueChange:c,children:s.jsx(De,{...r,ref:t})})});vt.displayName=ht;var wt="MenuRadioItem",xt=a.forwardRef((e,t)=>{const{value:n,...o}=e,r=wo(wt,e.__scopeMenu),c=n===r.value;return s.jsx(Mt,{scope:e.__scopeMenu,checked:c,children:s.jsx(xe,{role:"menuitemradio","aria-checked":c,...o,ref:t,"data-state":Oe(c),onSelect:w(o.onSelect,()=>{var u;return(u=r.onValueChange)==null?void 0:u.call(r,n)},{checkForDefaultPrevented:!1})})})});xt.displayName=wt;var Te="MenuItemIndicator",[Mt,xo]=X(Te,{checked:!1}),Ct=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,c=xo(Te,n);return s.jsx(se,{present:o||ge(c.checked)||c.checked===!0,children:s.jsx(j.span,{...r,ref:t,"data-state":Oe(c.checked)})})});Ct.displayName=Te;var Mo="MenuSeparator",yt=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return s.jsx(j.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});yt.displayName=Mo;var Co="MenuArrow",Rt=a.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=we(n);return s.jsx(kn,{...r,...o,ref:t})});Rt.displayName=Co;var yo="MenuSub",[Sr,bt]=X(yo),oe="MenuSubTrigger",_t=a.forwardRef((e,t)=>{const n=z(oe,e.__scopeMenu),o=ue(oe,e.__scopeMenu),r=bt(oe,e.__scopeMenu),c=Se(oe,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:p}=c,l={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const i=f.current;return()=>{window.clearTimeout(i),p(null)}},[f,p]),s.jsx(Ne,{asChild:!0,...l,children:s.jsx(mt,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Nt(n.open),...e,ref:$e(t,r.onTriggerChange),onClick:i=>{var m;(m=e.onClick)==null||m.call(e,i),!(e.disabled||i.defaultPrevented)&&(i.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:w(e.onPointerMove,ae(i=>{c.onItemEnter(i),!i.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(c.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:w(e.onPointerLeave,ae(i=>{var h,v;d();const m=(h=n.content)==null?void 0:h.getBoundingClientRect();if(m){const M=(v=n.content)==null?void 0:v.dataset.side,x=M==="right",C=x?-5:5,N=m[x?"left":"right"],y=m[x?"right":"left"];c.onPointerGraceIntentChange({area:[{x:i.clientX+C,y:i.clientY},{x:N,y:m.top},{x:y,y:m.top},{x:y,y:m.bottom},{x:N,y:m.bottom}],side:M}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(i),i.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:w(e.onKeyDown,i=>{var h;const m=c.searchRef.current!=="";e.disabled||m&&i.key===" "||to[o.dir].includes(i.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),i.preventDefault())})})})});_t.displayName=oe;var It="MenuSubContent",Pt=a.forwardRef((e,t)=>{const n=dt(A,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,c=z(A,e.__scopeMenu),u=ue(A,e.__scopeMenu),f=bt(It,e.__scopeMenu),p=a.useRef(null),l=$(t,p);return s.jsx(re.Provider,{scope:e.__scopeMenu,children:s.jsx(se,{present:o||c.open,children:s.jsx(re.Slot,{scope:e.__scopeMenu,children:s.jsx(Ae,{id:f.contentId,"aria-labelledby":f.triggerId,...r,ref:l,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var i;u.isUsingKeyboardRef.current&&((i=p.current)==null||i.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:w(e.onFocusOutside,d=>{d.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:w(e.onEscapeKeyDown,d=>{u.onClose(),d.preventDefault()}),onKeyDown:w(e.onKeyDown,d=>{var h;const i=d.currentTarget.contains(d.target),m=no[u.dir].includes(d.key);i&&m&&(c.onOpenChange(!1),(h=f.trigger)==null||h.focus(),d.preventDefault())})})})})})});Pt.displayName=It;function Nt(e){return e?"open":"closed"}function ge(e){return e==="indeterminate"}function Oe(e){return ge(e)?"indeterminate":e?"checked":"unchecked"}function Ro(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function bo(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function _o(e,t,n){const r=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let u=bo(e,Math.max(c,0));r.length===1&&(u=u.filter(l=>l!==n));const p=u.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return p!==n?p:void 0}function Io(e,t){const{x:n,y:o}=e;let r=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],p=t[u],l=f.x,d=f.y,i=p.x,m=p.y;d>o!=m>o&&n<(i-l)*(o-d)/(m-d)+l&&(r=!r)}return r}function Po(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Io(n,t)}function ae(e){return t=>t.pointerType==="mouse"?e(t):void 0}var No=ut,Eo=Ne,So=lt,Ao=ft,Do=De,To=pt,Oo=xe,jo=gt,Fo=vt,ko=xt,Lo=Ct,Go=yt,$o=Rt,Ko=_t,Uo=Pt,Me="DropdownMenu",[Bo]=he(Me,[ct]),I=ct(),[Wo,Et]=Bo(Me),St=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:c,onOpenChange:u,modal:f=!0}=e,p=I(t),l=a.useRef(null),[d,i]=Ke({prop:r,defaultProp:c??!1,onChange:u,caller:Me});return s.jsx(Wo,{scope:t,triggerId:Re(),triggerRef:l,contentId:Re(),open:d,onOpenChange:i,onOpenToggle:a.useCallback(()=>i(m=>!m),[i]),modal:f,children:s.jsx(No,{...p,open:d,onOpenChange:i,dir:o,modal:f,children:n})})};St.displayName=Me;var At="DropdownMenuTrigger",Dt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,c=Et(At,n),u=I(n);return s.jsx(Eo,{asChild:!0,...u,children:s.jsx(j.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:$e(t,c.triggerRef),onPointerDown:w(e.onPointerDown,f=>{!o&&f.button===0&&f.ctrlKey===!1&&(c.onOpenToggle(),c.open||f.preventDefault())}),onKeyDown:w(e.onKeyDown,f=>{o||(["Enter"," "].includes(f.key)&&c.onOpenToggle(),f.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Dt.displayName=At;var Yo="DropdownMenuPortal",Tt=e=>{const{__scopeDropdownMenu:t,...n}=e,o=I(t);return s.jsx(So,{...o,...n})};Tt.displayName=Yo;var Ot="DropdownMenuContent",jt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Et(Ot,n),c=I(n),u=a.useRef(!1);return s.jsx(Ao,{id:r.contentId,"aria-labelledby":r.triggerId,...c,...o,ref:t,onCloseAutoFocus:w(e.onCloseAutoFocus,f=>{var p;u.current||(p=r.triggerRef.current)==null||p.focus(),u.current=!1,f.preventDefault()}),onInteractOutside:w(e.onInteractOutside,f=>{const p=f.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;(!r.modal||d)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jt.displayName=Ot;var Vo="DropdownMenuGroup",Ft=a.forwardRef((e,t)=>
1{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Do,{...r,...o,ref:t})});Ft.displayName=Vo;var Xo="DropdownMenuLabel",kt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(To,{...r,...o,ref:t})});kt.displayName=Xo;var zo="DropdownMenuItem",Lt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Oo,{...r,...o,ref:t})});Lt.displayName=zo;var Ho="DropdownMenuCheckboxItem",Gt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(jo,{...r,...o,ref:t})});Gt.displayName=Ho;var Zo="DropdownMenuRadioGroup",$t=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Fo,{...r,...o,ref:t})});$t.displayName=Zo;var qo="DropdownMenuRadioItem",Kt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(ko,{...r,...o,ref:t})});Kt.displayName=qo;var Jo="DropdownMenuItemIndicator",Ut=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Lo,{...r,...o,ref:t})});Ut.displayName=Jo;var Qo="DropdownMenuSeparator",Bt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Go,{...r,...o,ref:t})});Bt.displayName=Qo;var er="DropdownMenuArrow",tr=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx($o,{...r,...o,ref:t})});tr.displayName=er;var nr="DropdownMenuSubTrigger",Wt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Ko,{...r,...o,ref:t})});Wt.displayName=nr;var or="DropdownMenuSubContent",Yt=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return s.jsx(Uo,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yt.displayName=or;var rr=St,ar=Dt,sr=Tt,Vt=jt,cr=Ft,Xt=kt,zt=Lt,Ht=Gt,ir=$t,Zt=Kt,qt=Ut,Jt=Bt,Qt=Wt,en=Yt;const Ar=rr,Dr=ar,Tr=cr,Or=ir,ur=a.forwardRef(({className:e,inset:t,children:n,...o},r)=>s.jsxs(Qt,{ref:r,className:B("flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[n,s.jsx(_n,{className:"ml-auto h-4 w-4"})]}));ur.displayName=Qt.displayName;const dr=a.forwardRef(({className:e,...t},n)=>s.jsx(en,{ref:n,className:B("z-dropdown min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...t}));dr.displayName=en.displayName;const lr=a.forwardRef(({className:e,sideOffset:t=4,...n},o)=>s.jsx(sr,{children:s.jsx(Vt,{ref:o,sideOffset:t,className:B("z-dropdown min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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",e),...n})}));lr.displayName=Vt.displayName;const fr=a.forwardRef(({className:e,inset:t,...n},o)=>s.jsx(zt,{ref:o,className:B("relative flex select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",t&&"pl-8",e),...n}));fr.displayName=zt.displayName;const pr=a.forwardRef(({className:e,children:t,checked:n,...o},r)=>s.jsxs(Ht,{ref:r,className:B("relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",e),checked:n,...o,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(qt,{children:s.jsx(In,{className:"h-4 w-4"})})}),t]}));pr.displayName=Ht.displayName;const mr=a.forwardRef(({className:e,children:t,...n},o)=>s.jsxs(Zt,{ref:o,className:B("relative flex select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(qt,{children:s.jsx(bn,{className:"h-4 w-4 fill-current"})})}),t]}));mr.displayName=Zt.displayName;const gr=a.forwardRef(({className:e,inset:t,...n},o)=>s.jsx(Xt,{ref:o,className:B("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));gr.displayName=Xt.displayName;const hr=a.forwardRef(({className:e,...t},n)=>s.jsx(Jt,{ref:n,className:B("-mx-1 my-1 h-px bg-muted",e),...t}));hr.displayName=Jt.displayName;export{mr as D,Dr as a,gr as b,Or as c,lr as d,Ar as e,pr as f,hr as g,fr as h,Tr as i};
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.