@vltpkg/gui 0.0.0-23 → 0.0.0-24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}
|
|
|
63
63
|
|
|
64
64
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
65
65
|
|
|
66
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return lr.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gUe="DialogDescriptionWarning",fUe=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ese(gUe).contentName}}.`;return lr.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},V8=Oie,tse=Gie,Z8=Uie,xv=qie,_v=zie,m5=Kie,g5=Jie,f5=Zie;var Le=k(U(),1);var ase=k(U(),1),wUe=k(Gu(),1);var ao=k(U(),1);var X8=k(N(),1);function rse(e){let t=hUe(e),n=ao.forwardRef((r,a)=>{let{children:o,...i}=r,s=ao.Children.toArray(o),A=s.find(yUe);if(A){let c=A.props.children,u=s.map(l=>l===A?ao.Children.count(c)>1?ao.Children.only(null):ao.isValidElement(c)?c.props.children:null:l);return(0,X8.jsx)(t,{...i,ref:a,children:ao.isValidElement(c)?ao.cloneElement(c,void 0,u):null})}return(0,X8.jsx)(t,{...i,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function hUe(e){let t=ao.forwardRef((n,r)=>{let{children:a,...o}=n;if(ao.isValidElement(a)){let i=CUe(a),s=BUe(o,a.props);return a.type!==ao.Fragment&&(s.ref=r?Hi(r,i):i),ao.cloneElement(a,s)}return ao.Children.count(a)>1?ao.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bUe=Symbol("radix.slottable");function yUe(e){return ao.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bUe}function BUe(e,t){let n={...t};for(let r in t){let a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...s)=>{o(...s),a(...s)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function CUe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ose=k(N(),1),EUe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Md=EUe.reduce((e,t)=>{let n=rse(`Primitive.${t}`),r=ase.forwardRef((a,o)=>{let{asChild:i,...s}=a,A=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,ose.jsx)(A,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var Dv='[cmdk-group=""]',h5='[cmdk-group-items=""]',kUe='[cmdk-group-heading=""]',sse='[cmdk-item=""]',ise=`${sse}:not([aria-disabled="true"])`,b5="cmdk-item-select",KB="data-value",vUe=(e,t,n)=>uie(e,t,n),Ase=Le.createContext(void 0),Fv=()=>Le.useContext(Ase),cse=Le.createContext(void 0),y5=()=>Le.useContext(cse),use=Le.createContext(void 0),lse=Le.forwardRef((e,t)=>{let n=WB(()=>{var T,D;return{search:"",value:(D=(T=e.value)!=null?T:e.defaultValue)!=null?D:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=WB(()=>new Set),a=WB(()=>new Map),o=WB(()=>new Map),i=WB(()=>new Set),s=dse(e),{label:A,children:c,value:u,onValueChange:l,filter:d,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:h=!0,...f}=e,b=xn(),y=xn(),w=xn(),C=Le.useRef(null),B=NUe();xh(()=>{if(u!==void 0){let T=u.trim();n.current.value=T,E.emit()}},[u]),xh(()=>{B(6,O)},[]);let E=Le.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,D,z)=>{var J,te,K,W;if(!Object.is(n.current[T],D)){if(n.current[T]=D,T==="search")j(),S(),B(1,M);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Y=document.getElementById(w);Y?Y.focus():(J=document.getElementById(b))==null||J.focus()}if(B(7,()=>{var Y;n.current.selectedItemId=(Y=L())==null?void 0:Y.id,E.emit()}),z||B(5,O),((te=s.current)==null?void 0:te.value)!==void 0){let Y=D??"";(W=(K=s.current).onValueChange)==null||W.call(K,Y);return}}E.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),v=Le.useMemo(()=>({value:(T,D,z)=>{var J;D!==((J=o.current.get(T))==null?void 0:J.value)&&(o.current.set(T,{value:D,keywords:z}),n.current.filtered.items.set(T,x(D,z)),B(2,()=>{S(),E.emit()}))},item:(T,D)=>(r.current.add(T),D&&(a.current.has(D)?a.current.get(D).add(T):a.current.set(D,new Set([T]))),B(3,()=>{j(),S(),n.current.value||M(),E.emit()}),()=>{o.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=L();B(4,()=>{j(),z?.getAttribute("id")===T&&M(),E.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>s.current.shouldFilter,label:A||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:b,inputId:w,labelId:y,listInnerRef:C}),[]);function x(T,D){var z,J;let te=(J=(z=s.current)==null?void 0:z.filter)!=null?J:vUe;return T?te(T,n.current.search,D):0}function S(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,D=[];n.current.filtered.groups.forEach(J=>{let te=a.current.get(J),K=0;te.forEach(W=>{let Y=T.get(W);K=Math.max(Y,K)}),D.push([J,K])});let z=C.current;$().sort((J,te)=>{var K,W;let Y=J.getAttribute("id"),ae=te.getAttribute("id");return((K=T.get(ae))!=null?K:0)-((W=T.get(Y))!=null?W:0)}).forEach(J=>{let te=J.closest(h5);te?te.appendChild(J.parentElement===te?J:J.closest(`${h5} > *`)):z.appendChild(J.parentElement===z?J:J.closest(`${h5} > *`))}),D.sort((J,te)=>te[1]-J[1]).forEach(J=>{var te;let K=(te=C.current)==null?void 0:te.querySelector(`${Dv}[${KB}="${encodeURIComponent(J[0])}"]`);K?.parentElement.appendChild(K)})}function M(){let T=$().find(z=>z.getAttribute("aria-disabled")!=="true"),D=T?.getAttribute(KB);E.setState("value",D||void 0)}function j(){var T,D,z,J;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let K of r.current){let W=(D=(T=o.current.get(K))==null?void 0:T.value)!=null?D:"",Y=(J=(z=o.current.get(K))==null?void 0:z.keywords)!=null?J:[],ae=x(W,Y);n.current.filtered.items.set(K,ae),ae>0&&te++}for(let[K,W]of a.current)for(let Y of W)if(n.current.filtered.items.get(Y)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=te}function O(){var T,D,z;let J=L();J&&(((T=J.parentElement)==null?void 0:T.firstChild)===J&&((z=(D=J.closest(Dv))==null?void 0:D.querySelector(kUe))==null||z.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function L(){var T;return(T=C.current)==null?void 0:T.querySelector(`${sse}[aria-selected="true"]`)}function $(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(ise))||[])}function I(T){let D=$()[T];D&&E.setState("value",D.getAttribute(KB))}function _(T){var D;let z=L(),J=$(),te=J.findIndex(W=>W===z),K=J[te+T];(D=s.current)!=null&&D.loop&&(K=te+T<0?J[J.length-1]:te+T===J.length?J[0]:J[te+T]),K&&E.setState("value",K.getAttribute(KB))}function R(T){let D=L(),z=D?.closest(Dv),J;for(;z&&!J;)z=T>0?LUe(z,Dv):MUe(z,Dv),J=z?.querySelector(ise);J?E.setState("value",J.getAttribute(KB)):_(T)}let F=()=>I($().length-1),Q=T=>{T.preventDefault(),T.metaKey?F():T.altKey?R(1):_(1)},P=T=>{T.preventDefault(),T.metaKey?I(0):T.altKey?R(-1):_(-1)};return Le.createElement(Md.div,{ref:t,tabIndex:-1,...f,"cmdk-root":"",onKeyDown:T=>{var D;(D=f.onKeyDown)==null||D.call(f,T);let z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||z))switch(T.key){case"n":case"j":{h&&T.ctrlKey&&Q(T);break}case"ArrowDown":{Q(T);break}case"p":case"k":{h&&T.ctrlKey&&P(T);break}case"ArrowUp":{P(T);break}case"Home":{T.preventDefault(),I(0);break}case"End":{T.preventDefault(),F();break}case"Enter":{T.preventDefault();let J=L();if(J){let te=new Event(b5);J.dispatchEvent(te)}}}}},Le.createElement("label",{"cmdk-label":"",htmlFor:v.inputId,id:v.labelId,style:TUe},A),eF(e,T=>Le.createElement(cse.Provider,{value:E},Le.createElement(Ase.Provider,{value:v},T))))}),IUe=Le.forwardRef((e,t)=>{var n,r;let a=xn(),o=Le.useRef(null),i=Le.useContext(use),s=Fv(),A=dse(e),c=(r=(n=A.current)==null?void 0:n.forceMount)!=null?r:i?.forceMount;xh(()=>{if(!c)return s.item(a,i?.id)},[c]);let u=pse(a,o,[e.value,e.children,o],e.keywords),l=y5(),d=ag(B=>B.value&&B.value===u.current),p=ag(B=>c||s.filter()===!1?!0:B.search?B.filtered.items.get(a)>0:!0);Le.useEffect(()=>{let B=o.current;if(!(!B||e.disabled))return B.addEventListener(b5,g),()=>B.removeEventListener(b5,g)},[p,e.onSelect,e.disabled]);function g(){var B,E;m(),(E=(B=A.current).onSelect)==null||E.call(B,u.current)}function m(){l.setState("value",u.current,!0)}if(!p)return null;let{disabled:h,value:f,onSelect:b,forceMount:y,keywords:w,...C}=e;return Le.createElement(Md.div,{ref:Hi(o,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||s.getDisablePointerSelection()?void 0:m,onClick:h?void 0:g},e.children)}),QUe=Le.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,i=xn(),s=Le.useRef(null),A=Le.useRef(null),c=xn(),u=Fv(),l=ag(p=>a||u.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);xh(()=>u.group(i),[]),pse(i,s,[e.value,e.heading,A]);let d=Le.useMemo(()=>({id:i,forceMount:a}),[a]);return Le.createElement(Md.div,{ref:Hi(s,t),...o,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&Le.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),eF(e,p=>Le.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},Le.createElement(use.Provider,{value:d},p))))}),xUe=Le.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=Le.useRef(null),o=ag(i=>!i.search);return!n&&!o?null:Le.createElement(Md.div,{ref:Hi(a,t),...r,"cmdk-separator":"",role:"separator"})}),_Ue=Le.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=y5(),i=ag(c=>c.search),s=ag(c=>c.selectedItemId),A=Fv();return Le.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),Le.createElement(Md.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":s,id:A.inputId,type:"text",value:a?e.value:i,onChange:c=>{a||o.setState("search",c.target.value),n?.(c.target.value)}})}),DUe=Le.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=Le.useRef(null),i=Le.useRef(null),s=ag(c=>c.selectedItemId),A=Fv();return Le.useEffect(()=>{if(i.current&&o.current){let c=i.current,u=o.current,l,d=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let p=c.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(l),d.unobserve(c)}}},[]),Le.createElement(Md.div,{ref:Hi(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:A.listId},eF(e,c=>Le.createElement("div",{ref:Hi(i,A.listInnerRef),"cmdk-list-sizer":""},c)))}),FUe=Le.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:i,...s}=e;return Le.createElement(V8,{open:n,onOpenChange:r},Le.createElement(Z8,{container:i},Le.createElement(xv,{"cmdk-overlay":"",className:a}),Le.createElement(_v,{"aria-label":e.label,"cmdk-dialog":"",className:o},Le.createElement(lse,{ref:t,...s}))))}),SUe=Le.forwardRef((e,t)=>ag(n=>n.filtered.count===0)?Le.createElement(Md.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),RUe=Le.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return Le.createElement(Md.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},eF(e,i=>Le.createElement("div",{"aria-hidden":!0},i)))}),zi=Object.assign(lse,{List:DUe,Item:IUe,Input:_Ue,Group:QUe,Separator:xUe,Dialog:FUe,Empty:SUe,Loading:RUe});function LUe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function MUe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function dse(e){let t=Le.useRef(e);return xh(()=>{t.current=e}),t}var xh=typeof window>"u"?Le.useEffect:Le.useLayoutEffect;function WB(e){let t=Le.useRef();return t.current===void 0&&(t.current=e()),t}function ag(e){let t=y5(),n=()=>e(t.snapshot());return Le.useSyncExternalStore(t.subscribe,n,n)}function pse(e,t,n,r=[]){let a=Le.useRef(),o=Fv();return xh(()=>{var i;let s=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),A=r.map(c=>c.trim());o.value(e,s,A),(i=t.current)==null||i.setAttribute(KB,s),a.current=s}),a}var NUe=()=>{let[e,t]=Le.useState(),n=WB(()=>new Map);return xh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function PUe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function eF({asChild:e,children:t},n){return e&&Le.isValidElement(t)?Le.cloneElement(PUe(t),{ref:t.ref},n(t.props.children)):n(t)}var TUe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Sv=k(U(),1);var sA=k(N(),1),Nd=V8,JB=tse,B5=Z8,mse=f5,gse=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(xv,{ref:n,className:G("fixed inset-0 z-[10001] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));gse.displayName=xv.displayName;var tl=Sv.forwardRef(({className:e,children:t,...n},r)=>(0,sA.jsxs)(B5,{children:[(0,sA.jsx)(gse,{}),(0,sA.jsxs)(_v,{ref:r,className:G("fixed left-[50%] top-[50%] z-[10001] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,(0,sA.jsxs)(f5,{className:"absolute right-4 top-4 cursor-default rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,sA.jsx)(ld,{className:"h-4 w-4"}),(0,sA.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));tl.displayName=_v.displayName;var Pd=({className:e,...t})=>(0,sA.jsx)("div",{className:G("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pd.displayName="DialogHeader";var Td=({className:e,...t})=>(0,sA.jsx)("div",{className:G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Td.displayName="DialogFooter";var jd=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(m5,{ref:n,className:G("text-lg font-semibold leading-none tracking-tight",e),...t}));jd.displayName=m5.displayName;var Od=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(g5,{ref:n,className:G("text-sm text-muted-foreground",e),...t}));Od.displayName=g5.displayName;var WA=k(N(),1),_h=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi,{ref:n,className:G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_h.displayName=zi.displayName;var Dh=og.forwardRef(({className:e,wrapperClassName:t,...n},r)=>(0,WA.jsxs)("div",{className:G("flex items-center border-b px-3",t),"cmdk-input-wrapper":"",children:[(0,WA.jsx)(Wo,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,WA.jsx)(zi.Input,{ref:r,className:G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));Dh.displayName=zi.Input.displayName;var Fh=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.List,{ref:n,className:G("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Fh.displayName=zi.List.displayName;var Sh=og.forwardRef((e,t)=>(0,WA.jsx)(zi.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Sh.displayName=zi.Empty.displayName;var Rh=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Group,{ref:n,className:G("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Rh.displayName=zi.Group.displayName;var C5=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Separator,{ref:n,className:G("-mx-1 h-px bg-border",e),...t}));C5.displayName=zi.Separator.displayName;var ig=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Item,{ref:n,className:G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ig.displayName=zi.Item.displayName;var jUe=({className:e,...t})=>(0,WA.jsx)("span",{className:G("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});jUe.displayName="CommandShortcut";var Lh=k(U(),1);var Ag=k(U(),1);var _se=k(U(),1);var Ur=k(U(),1);var $a=k(N(),1),tF="Popover",[fse,Knn]=Cn(tF,[UA]),Rv=UA(),[OUe,sg]=fse(tF),hse=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=Rv(t),A=Ur.useRef(null),[c,u]=Ur.useState(!1),[l,d]=Gr({prop:r,defaultProp:a??!1,onChange:o,caller:tF});return(0,$a.jsx)(gd,{...s,children:(0,$a.jsx)(OUe,{scope:t,contentId:xn(),triggerRef:A,open:l,onOpenChange:d,onOpenToggle:Ur.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:c,onCustomAnchorAdd:Ur.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Ur.useCallback(()=>u(!1),[]),modal:i,children:n})})};hse.displayName=tF;var bse="PopoverAnchor",$Ue=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(bse,n),o=Rv(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return Ur.useEffect(()=>(i(),()=>s()),[i,s]),(0,$a.jsx)(fd,{...o,...r,ref:t})});$Ue.displayName=bse;var yse="PopoverTrigger",Bse=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(yse,n),o=Rv(n),i=We(t,a.triggerRef),s=(0,$a.jsx)(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":vse(a.open),...r,ref:i,onClick:le(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:(0,$a.jsx)(fd,{asChild:!0,...o,children:s})});Bse.displayName=yse;var w5="PopoverPortal",[GUe,HUe]=fse(w5,{forceMount:void 0}),Cse=e=>{let{__scopePopover:t,forceMount:n,children:r,container:a}=e,o=sg(w5,t);return(0,$a.jsx)(GUe,{scope:t,forceMount:n,children:(0,$a.jsx)(qn,{present:n||o.open,children:(0,$a.jsx)(nA,{asChild:!0,container:a,children:r})})})};Cse.displayName=w5;var VB="PopoverContent",wse=Ur.forwardRef((e,t)=>{let n=HUe(VB,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=sg(VB,e.__scopePopover);return(0,$a.jsx)(qn,{present:r||o.open,children:o.modal?(0,$a.jsx)(qUe,{...a,ref:t}):(0,$a.jsx)(zUe,{...a,ref:t})})});wse.displayName=VB;var UUe=ys("PopoverContent.RemoveScroll"),qUe=Ur.forwardRef((e,t)=>{let n=sg(VB,e.__scopePopover),r=Ur.useRef(null),a=We(t,r),o=Ur.useRef(!1);return Ur.useEffect(()=>{let i=r.current;if(i)return rg(i)},[]),(0,$a.jsx)(Ld,{as:UUe,allowPinchZoom:!0,children:(0,$a.jsx)(Ese,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,i=>{i.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,A=s.button===0&&s.ctrlKey===!0,c=s.button===2||A;o.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:le(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),zUe=Ur.forwardRef((e,t)=>{let n=sg(VB,e.__scopePopover),r=Ur.useRef(!1),a=Ur.useRef(!1);return(0,$a.jsx)(Ese,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let i=o.target;n.triggerRef.current?.contains(i)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Ese=Ur.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:c,onInteractOutside:u,...l}=e,d=sg(VB,n),p=Rv(n);return ng(),(0,$a.jsx)(Rd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,$a.jsx)($A,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:(0,$a.jsx)(Nm,{"data-state":vse(d.open),role:"dialog",id:d.contentId,...p,...l,ref:t,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),kse="PopoverClose",YUe=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(kse,n);return(0,$a.jsx)(ke.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>a.onOpenChange(!1))})});YUe.displayName=kse;var KUe="PopoverArrow",WUe=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=Rv(n);return(0,$a.jsx)(Pm,{...a,...r,ref:t})});WUe.displayName=KUe;function vse(e){return e?"open":"closed"}var Ise=hse;var Qse=Bse,xse=Cse,E5=wse;var k5=k(N(),1),Qr=Ise,xr=Qse;var dr=_se.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>(0,k5.jsx)(xse,{children:(0,k5.jsx)(E5,{ref:a,align:t,sideOffset:n,className:G("z-[10000] w-72 rounded-md border border-muted bg-popover p-4 text-popover-foreground shadow-lg outline-none 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),...r})}));dr.displayName=E5.displayName;var Lv=k(U(),1);var $d=k(N(),1),VUe=["#ef4444","#f59e0b","#84cc16","#22c55e","#10b981","#06b6d4","#3b82f6","#a855f7"],ZB="#00FF5F";function XB({onChange:e,defaultColor:t,defaultInput:n}){let[r,a]=(0,Lv.useState)(n??ZB),[o,i]=(0,Lv.useState)(t??ZB);(0,Lv.useEffect)(()=>{i(t||ZB),i(n||ZB)},[t,n]);let s=u=>/^#[0-9A-F]{6}$/i.test(u),A=u=>{let l=u.target.value;s(l)&&(a(l),i(l),e(l))},c=u=>{a(u),i(u),e(u)};return(0,$d.jsxs)("div",{className:"mx-auto w-full max-w-md px-2 py-1",children:[(0,$d.jsxs)("div",{className:"relative w-full",children:[(0,$d.jsx)(Rt,{className:"w-full rounded-lg",type:"text",value:r,onChange:A,placeholder:"#00FF5F"}),(0,$d.jsx)("div",{className:"absolute bottom-0 right-2 top-0 my-auto flex h-5 w-5 items-center justify-center rounded-sm",style:{backgroundColor:s(r)?r:o},children:(0,$d.jsx)("input",{onChange:u=>{s(u.target.value)&&(a(u.target.value),e(u.target.value))},className:"relative h-5 w-5 cursor-default opacity-0",type:"color"})})]}),(0,$d.jsx)("div",{className:"mt-4 grid grid-cols-8 gap-2",children:VUe.map(u=>(0,$d.jsx)("button",{onClick:()=>c(u),className:"aspect-square w-full cursor-default rounded-sm border border-[1px] border-muted-foreground/25 focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:u},"aria-label":`Select color ${u}`},u))})]})}var Xo=[];for(let e=0;e<256;++e)Xo.push((e+256).toString(16).slice(1));function Dse(e,t=0){return(Xo[e[t+0]]+Xo[e[t+1]]+Xo[e[t+2]]+Xo[e[t+3]]+"-"+Xo[e[t+4]]+Xo[e[t+5]]+"-"+Xo[e[t+6]]+Xo[e[t+7]]+"-"+Xo[e[t+8]]+Xo[e[t+9]]+"-"+Xo[e[t+10]]+Xo[e[t+11]]+Xo[e[t+12]]+Xo[e[t+13]]+Xo[e[t+14]]+Xo[e[t+15]]).toLowerCase()}var v5,ZUe=new Uint8Array(16);function I5(){if(!v5){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");v5=crypto.getRandomValues.bind(crypto)}return v5(ZUe)}var XUe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Q5={randomUUID:XUe};function eqe(e,t,n){if(Q5.randomUUID&&!t&&!e)return Q5.randomUUID();e=e||{};let r=e.random??e.rng?.()??I5();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[n+a]=r[a];return t}return Dse(r)}var Gd=eqe;var zn=k(N(),1),Fse=({onClose:e,label:t="Label Preview"})=>{let[n,r]=(0,Ag.useState)(t),[a,o]=(0,Ag.useState)(""),[i,s]=(0,Ag.useState)("#00FF5F"),[A,c]=(0,Ag.useState)(!1),u=X(p=>p.saveQueryLabel),{toast:l}=Io();(0,Ag.useEffect)(()=>{r(t)},[t]),(0,Ag.useEffect)(()=>{c(n!==""&&n!=="Label Preview")},[n,i]);let d=()=>{let p={id:Gd(),name:n,description:a,color:i};u(p),l({title:`${n} successfully created`}),e&&e(!1)};return(0,zn.jsxs)(tl,{children:[(0,zn.jsxs)(Pd,{children:[(0,zn.jsx)(jd,{className:"text-lg font-medium",children:"Create label"}),(0,zn.jsx)(Od,{})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,zn.jsx)("div",{className:"flex flex-col gap-2",children:(0,zn.jsx)("div",{className:"flex w-fit items-center",children:(0,zn.jsx)(Ds,{name:n.trim()!==""?n:"Label preview",color:i})})}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Name"}),(0,zn.jsx)(Rt,{value:n,onChange:p=>r(p.target.value),placeholder:"Name"})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Description"}),(0,zn.jsx)(Rt,{value:a,onChange:p=>o(p.target.value),placeholder:"Description (optional)"})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Color"}),(0,zn.jsxs)(Qr,{children:[(0,zn.jsx)(xr,{asChild:!0,children:(0,zn.jsxs)(de,{variant:"outline",className:"font-normal",children:[(0,zn.jsx)(Ad,{}),(0,zn.jsx)("span",{children:i})]})}),(0,zn.jsx)(dr,{children:(0,zn.jsx)(XB,{defaultInput:i,defaultColor:i,onChange:s})})]})]})]}),(0,zn.jsxs)(Td,{children:[(0,zn.jsx)(mse,{asChild:!0,children:(0,zn.jsx)(de,{variant:"outline",children:"Cancel"})}),(0,zn.jsx)(de,{disabled:!A,onClick:d,children:"Create"})]})]})};var _r=k(N(),1),eC=({setIsOpen:e,setItems:t,selectedItems:n,className:r})=>{let a=X(l=>l.savedQueryLabels),o=(0,Lh.useRef)(null),[i,s]=(0,Lh.useState)(""),[A,c]=(0,Lh.useState)(!1);(0,Lh.useEffect)(()=>{let l=d=>{o.current&&!o.current.contains(d.target)&&e(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e]);let u=l=>{t(d=>{if(d.some(g=>g.name===l))return d.filter(g=>g.name!==l);{let g=a?.find(m=>m.name===l);if(g)return[...d,g]}return d})};return(0,_r.jsxs)(_h,{ref:o,className:r,children:[(0,_r.jsx)(Dh,{value:i,onValueChange:s,className:"w-full",placeholder:"Search labels"}),(0,_r.jsxs)(Fh,{className:"rounded-xl",children:[(0,_r.jsx)(Sh,{className:"my-3 items-center px-3 py-2",children:(0,_r.jsx)(Nd,{open:A,onOpenChange:c,children:(0,_r.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,_r.jsx)("p",{className:"text-sm text-neutral-400",children:"No labels found."}),(0,_r.jsx)(JB,{asChild:!0,children:(0,_r.jsxs)(de,{className:"w-full font-normal",children:['Create label "',i,'"']})}),(0,_r.jsx)(Fse,{label:i,onClose:c})]})})}),(0,_r.jsx)(Rh,{children:a?.map(l=>{let d=n.some(p=>p.name===l.name);return(0,_r.jsxs)(ig,{value:l.name,onSelect:u,className:"flex flex-col items-start gap-2",children:[(0,_r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_r.jsx)(na,{className:G("transition-opacity",d?"opacity-100":"opacity-0")}),(0,_r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_r.jsx)("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:l.color}}),(0,_r.jsx)("span",{children:l.name})]})]}),(0,_r.jsx)("div",{className:"-mt-1 ml-7",children:(0,_r.jsx)("p",{className:"text-xs text-neutral-500",children:l.description})})]},l.id)})})]}),(0,_r.jsx)(de,{className:"rounded-[7px] border-none text-neutral-500 hover:text-primary",variant:"outline",size:"sm",asChild:!0,children:(0,_r.jsxs)("a",{href:"/labels",children:[(0,_r.jsx)(mk,{}),(0,_r.jsx)("span",{children:"Edit labels"})]})})]})};var tC=k(U(),1);var wi=k(N(),1),nC=({directory:e,setDirectory:t,dashboard:n,acceptsGlobal:r=!0,useDashboardProjectLocations:a=!1,className:o})=>{let[i,s]=(0,tC.useState)(""),A=(0,tC.useRef)(!1),c=a?n?.dashboardProjectLocations:n?.projects;return(0,tC.useLayoutEffect)(()=>{let u=()=>{r&&e!==""&&!a?s(c?.find(l=>l.path===e)?.readablePath??""):r&&e===""&&!a?s("Global"):!r&&a&&e===""&&s("Select a directory")};A.current||(A.current=!0,u())},[r,e,c,a]),(0,wi.jsxs)(Qr,{children:[(0,wi.jsx)(xr,{asChild:!0,children:(0,wi.jsxs)(de,{className:G("group flex h-10 w-full items-center justify-between rounded-lg border-[1px] border-muted bg-white text-muted-foreground shadow-none hover:bg-accent dark:bg-muted-foreground/5 dark:hover:bg-muted-foreground/10",o),children:[i,(0,wi.jsx)(Bs,{className:"text-foreground opacity-50 duration-300 group-data-[state=open]:-rotate-180"})]})}),(0,wi.jsx)(dr,{className:"max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0",children:(0,wi.jsxs)(_h,{defaultValue:r?"":void 0,children:[(0,wi.jsx)(Dh,{placeholder:"Directory"}),(0,wi.jsxs)(Fh,{children:[(0,wi.jsx)(Sh,{children:"Directory not found."}),(0,wi.jsx)(Rh,{children:c?.map(u=>u.readablePath==="~"&&r?(0,wi.jsxs)(ig,{value:"",className:"hover:bg-accent",onSelect:l=>{t(""),s("Global")},children:[(0,wi.jsx)(na,{className:G("mr-2 size-4",e===""?"opacity-100":"opacity-0")}),"Global"]},u.path):(0,wi.jsxs)(ig,{value:u.path,onSelect:l=>{t(l===e?"":l),s(r&&l===e?"Global":u.readablePath)},children:[(0,wi.jsx)(na,{className:G("mr-2 size-4",e===u.path?"opacity-100":"opacity-0")}),u.readablePath]},u.path))})]})]})})]})};var kt=k(N(),1),x5=async({navigate:e,updateErrorCause:t,updateQuery:n,updateStamp:r,item:a,context:o})=>{let i;try{i=await fetch("/select-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:o})})}catch(A){console.error(A),e("/error"),t("Failed to request project selection.");return}let s=!1;try{s=await i.json()==="ok"}catch(A){console.error(A)}s?(window.scrollTo(0,0),n(a.query),e("/explore"),r()):(e("/error"),t("Failed to select project."))},Sse=({item:e,handleSelect:t,checked:n,dashboard:r})=>{let a=Zt(),{toast:o}=Io(),[i,s]=(0,JA.useState)(!1),[A,c]=(0,JA.useState)(""),[u,l]=(0,JA.useState)(""),[,d]=(0,JA.useState)(!1),[p,g]=(0,JA.useState)(!1),[m,h]=(0,JA.useState)([]),[f,b]=(0,JA.useState)(""),y=X(M=>M.updateSavedQuery),w=X(M=>M.updateErrorCause),C=X(M=>M.updateQuery),B=X(M=>M.updateStamp);(0,JA.useEffect)(()=>{c(e.name),l(e.context),b(e.query),h(e.labels??[])},[e]);let E=(0,JA.useMemo)(()=>A!==""&&f!=="",[A,f]),v=()=>{s(!i)},x=()=>{let M={...e,name:A,context:u,query:f,dateModified:new Date().toISOString(),labels:m};y(M),s(!1),o({title:`${A} saved successfully`})},S=async()=>{await x5({navigate:a,updateErrorCause:w,updateQuery:C,updateStamp:B,item:e,context:e.context})};return(0,kt.jsxs)("div",{className:G("group flex flex-col rounded-xl border border-[1px] bg-card transition-colors transition-opacity hover:bg-card-accent",i?"border-muted-foreground":"border-muted"),children:[(0,kt.jsxs)("div",{className:"grid grid-cols-12 gap-4 px-3 py-2",children:[(0,kt.jsxs)("div",{className:"col-span-2 flex grow items-center gap-3",children:[(0,kt.jsx)(Sd,{checked:n,onCheckedChange:()=>t(e),className:G("border-muted-foreground/25 opacity-0 group-hover:border-muted-foreground/50 group-hover:opacity-100",n&&"opacity-100")}),(0,kt.jsx)("p",{className:"truncate text-sm font-medium",children:A.trim()!==""?A:"Query Name"})]}),(0,kt.jsx)("div",{className:"col-span-4 flex items-center",children:!i&&(0,kt.jsx)("p",{className:"w-[500px] truncate text-sm",children:f})}),(0,kt.jsx)("div",{className:"col-span-2 flex w-full items-center gap-2",children:(0,kt.jsx)(ct,{children:(0,kt.jsxs)(ut,{children:[(0,kt.jsx)(Bt,{className:"w-full truncate text-left text-sm",children:e.context.trim()===""?"Global":e.context}),(0,kt.jsx)(At,{children:e.context})]})})}),(0,kt.jsx)("div",{className:"col-span-2 flex items-center gap-2",children:m.map((M,j)=>(0,kt.jsx)(Ds,{name:M.name,color:M.color},j))}),(0,kt.jsxs)("div",{className:"col-span-2 flex items-center justify-end gap-4",children:[(0,kt.jsx)(de,{variant:"outline",className:"h-8 rounded-lg border border-[1px] border-muted-foreground/25 px-3 text-sm",onClick:v,children:i?"Close":"Edit"}),u.trim()!==""&&(0,kt.jsxs)(de,{variant:"outline",className:"h-8 rounded-lg border border-[1px] border-muted-foreground/25 px-3 text-sm",role:"link",onClick:()=>void S(),children:[(0,kt.jsx)("span",{children:"Run"}),(0,kt.jsx)(Hc,{})]})]})]}),i&&(0,kt.jsxs)("div",{className:"flex flex-col border-t-[1px] border-muted-foreground/25 px-3 py-2",children:[(0,kt.jsxs)("div",{className:"my-3 mb-6 flex gap-3",children:[(0,kt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Name"}),(0,kt.jsx)(Rt,{type:"text",value:A,onChange:M=>c(M.target.value),placeholder:"Name",className:"rounded-lg"})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Query"}),(0,kt.jsx)(Rt,{type:"text",placeholder:"Query",value:f,onChange:M=>b(M.target.value),className:"w-full rounded-lg"})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(ct,{children:(0,kt.jsxs)(ut,{children:[(0,kt.jsxs)(Bt,{className:"inline-flex cursor-default items-center",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Directory (optional)"}),(0,kt.jsx)(hi,{className:"text-muted-foreground",size:18})]}),(0,kt.jsx)(At,{children:"Set directory to 'Global' to reuse across all projects."})]})}),(0,kt.jsx)(nC,{dashboard:r,setDirectory:l,directory:u})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm",children:"Labels"}),(0,kt.jsxs)(Qr,{open:p,onOpenChange:g,children:[(0,kt.jsx)(xr,{asChild:!0,children:(0,kt.jsxs)(de,{variant:"outline",role:"combobox","aria-expanded":p,className:"w-full justify-between rounded-lg",children:["Select labels",(0,kt.jsx)(sd,{className:"opacity-50"})]})}),(0,kt.jsx)(dr,{className:"rounded-xl p-0",children:(0,kt.jsx)(eC,{className:"rounded-xl",selectedItems:m,setItems:h,setIsOpen:d})})]})]})]}),(0,kt.jsx)("div",{className:"mb-0.5 flex items-end justify-end",children:(0,kt.jsx)(de,{className:"rounded-lg",disabled:!E,onClick:x,variant:"default",size:"sm",children:"Save changes"})})]})]})};var VA=k(N(),1),Rse=()=>{let{isOnExploreView:e}=Koe(),t=Zt(),{open:n,setOpen:r}=Ju(),a=X(p=>p.savedQueries),o=X(p=>p.graph),i=X(p=>p.updateErrorCause),s=X(p=>p.updateQuery),A=X(p=>p.updateStamp),c=a?.filter(p=>p.context===o?.projectRoot),u=a?.filter(p=>!p.context.trim()),l=(p,g,m)=>({title:p,icon:m,items:g.map(h=>({title:h.name,onClick:()=>void d(h)}))}),d=async p=>{o&&await x5({navigate:t,updateErrorCause:i,updateQuery:s,updateStamp:A,item:p,context:p.context.trim()===""?o.projectRoot:p.context})};return!e()||!c||c.length===0&&!u||u?.length===0?null:(0,VA.jsxs)(VA.Fragment,{children:[(0,VA.jsx)(gP,{}),(0,VA.jsxs)(Dk,{children:[(0,VA.jsx)(hP,{className:"font-medium tracking-wide",children:"Queries"}),u&&u.length!==0&&(0,VA.jsx)(Tm,{children:(0,VA.jsx)(Xc,{onParentClick:()=>{n||r(!0)},items:[l("Global",u,Xy)]})}),c.length!==0&&(0,VA.jsx)(Tm,{children:(0,VA.jsx)(Xc,{onParentClick:()=>{n||r(!0)},items:[l("Project",c,Xy)]})})]})]})};var ZA=k(N(),1),Lse=(()=>{let e=document.cookie.split("; ").find(n=>n.startsWith("sidebar:state=")),[,t]=e?.split("=")??[];return t==="true"})(),Mse=()=>(0,ZA.jsxs)(lP,{className:"relative flex h-full grow",collapsible:"icon",variant:"inset",children:[(0,ZA.jsxs)(fP,{children:[(0,ZA.jsx)(Yoe,{}),(0,ZA.jsx)(Rse,{})]}),(0,ZA.jsx)(mP,{className:"mb-[0.875px]",children:(0,ZA.jsxs)(Tm,{children:[(0,ZA.jsx)(Xc,{items:zoe}),(0,ZA.jsx)($oe,{}),(0,ZA.jsx)(Hoe,{})]})}),(0,ZA.jsx)(dP,{})]});var Mh=k(U(),1);var Lt=k(U(),1),Pse=k(Gu(),1);var cg=k(U(),1);var nF=k(N(),1),tqe=k(U(),1);var nqe=k(N(),1);function ug(e){let t=e+"CollectionProvider",[n,r]=Cn(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:h,children:f}=m,b=cg.default.useRef(null),y=cg.default.useRef(new Map).current;return(0,nF.jsx)(a,{scope:h,itemMap:y,collectionRef:b,children:f})};i.displayName=t;let s=e+"CollectionSlot",A=ys(s),c=cg.default.forwardRef((m,h)=>{let{scope:f,children:b}=m,y=o(s,f),w=We(h,y.collectionRef);return(0,nF.jsx)(A,{ref:w,children:b})});c.displayName=s;let u=e+"CollectionItemSlot",l="data-radix-collection-item",d=ys(u),p=cg.default.forwardRef((m,h)=>{let{scope:f,children:b,...y}=m,w=cg.default.useRef(null),C=We(h,w),B=o(u,f);return cg.default.useEffect(()=>(B.itemMap.set(w,{ref:w,...y}),()=>void B.itemMap.delete(w))),(0,nF.jsx)(d,{[l]:"",ref:C,children:b})});p.displayName=u;function g(m){let h=o(e+"CollectionConsumer",m);return cg.default.useCallback(()=>{let b=h.collectionRef.current;if(!b)return[];let y=Array.from(b.querySelectorAll(`[${l}]`));return Array.from(h.itemMap.values()).sort((B,E)=>y.indexOf(B.ref.current)-y.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},g,r]}var Dn=k(N(),1),R5="ToastProvider",[L5,rqe,aqe]=ug("Toast"),[Tse,xan]=Cn("Toast",[aqe]),[oqe,aF]=Tse(R5),jse=e=>{let{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:i}=e,[s,A]=Lt.useState(null),[c,u]=Lt.useState(0),l=Lt.useRef(!1),d=Lt.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${R5}\`. Expected non-empty \`string\`.`),(0,Dn.jsx)(L5.Provider,{scope:t,children:(0,Dn.jsx)(oqe,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:s,onViewportChange:A,onToastAdd:Lt.useCallback(()=>u(p=>p+1),[]),onToastRemove:Lt.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:i})})};jse.displayName=R5;var Ose="ToastViewport",iqe=["F8"],D5="toast.viewportPause",F5="toast.viewportResume",$se=Lt.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=iqe,label:a="Notifications ({hotkey})",...o}=e,i=aF(Ose,n),s=rqe(n),A=Lt.useRef(null),c=Lt.useRef(null),u=Lt.useRef(null),l=Lt.useRef(null),d=We(t,l,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;Lt.useEffect(()=>{let h=f=>{r.length!==0&&r.every(y=>f[y]||f.code===y)&&l.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),Lt.useEffect(()=>{let h=A.current,f=l.current;if(g&&h&&f){let b=()=>{if(!i.isClosePausedRef.current){let B=new CustomEvent(D5);f.dispatchEvent(B),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let B=new CustomEvent(F5);f.dispatchEvent(B),i.isClosePausedRef.current=!1}},w=B=>{!h.contains(B.relatedTarget)&&y()},C=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",b),h.addEventListener("focusout",w),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",C),window.addEventListener("blur",b),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",w),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",b),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=Lt.useCallback(({tabbingDirection:h})=>{let b=s().map(y=>{let w=y.ref.current,C=[w,...yqe(w)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?b.reverse():b).flat()},[s]);return Lt.useEffect(()=>{let h=l.current;if(h){let f=b=>{let y=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!y){let C=document.activeElement,B=b.shiftKey;if(b.target===h&&B){c.current?.focus();return}let x=m({tabbingDirection:B?"backwards":"forwards"}),S=x.findIndex(M=>M===C);_5(x.slice(S+1))?b.preventDefault():B?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",f),()=>h.removeEventListener("keydown",f)}},[s,m]),(0,Dn.jsxs)(_ee,{ref:A,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,Dn.jsx)(S5,{ref:c,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"forwards"});_5(h)}}),(0,Dn.jsx)(L5.Slot,{scope:n,children:(0,Dn.jsx)(ke.ol,{tabIndex:-1,...o,ref:d})}),g&&(0,Dn.jsx)(S5,{ref:u,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"backwards"});_5(h)}})]})});$se.displayName=Ose;var Gse="ToastFocusProxy",S5=Lt.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=aF(Gse,n);return(0,Dn.jsx)(Qk,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!o.viewport?.contains(s)&&r()}})});S5.displayName=Gse;var Mv="Toast",sqe="toast.swipeStart",Aqe="toast.swipeMove",cqe="toast.swipeCancel",uqe="toast.swipeEnd",Hse=Lt.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...i}=e,[s,A]=Gr({prop:r,defaultProp:a??!0,onChange:o,caller:Mv});return(0,Dn.jsx)(qn,{present:n||s,children:(0,Dn.jsx)(pqe,{open:s,...i,ref:t,onClose:()=>A(!1),onPause:on(e.onPause),onResume:on(e.onResume),onSwipeStart:le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,c=>{let{x:u,y:l}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,c=>{let{x:u,y:l}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),A(!1)})})})});Hse.displayName=Mv;var[lqe,dqe]=Tse(Mv,{onClose(){}}),pqe=Lt.forwardRef((e,t)=>{let{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:i,onEscapeKeyDown:s,onPause:A,onResume:c,onSwipeStart:u,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:p,...g}=e,m=aF(Mv,n),[h,f]=Lt.useState(null),b=We(t,L=>f(L)),y=Lt.useRef(null),w=Lt.useRef(null),C=a||m.duration,B=Lt.useRef(0),E=Lt.useRef(C),v=Lt.useRef(0),{onToastAdd:x,onToastRemove:S}=m,M=on(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),i()}),j=Lt.useCallback(L=>{!L||L===1/0||(window.clearTimeout(v.current),B.current=new Date().getTime(),v.current=window.setTimeout(M,L))},[M]);Lt.useEffect(()=>{let L=m.viewport;if(L){let $=()=>{j(E.current),c?.()},I=()=>{let _=new Date().getTime()-B.current;E.current=E.current-_,window.clearTimeout(v.current),A?.()};return L.addEventListener(D5,I),L.addEventListener(F5,$),()=>{L.removeEventListener(D5,I),L.removeEventListener(F5,$)}}},[m.viewport,C,A,c,j]),Lt.useEffect(()=>{o&&!m.isClosePausedRef.current&&j(C)},[o,C,m.isClosePausedRef,j]),Lt.useEffect(()=>(x(),()=>S()),[x,S]);let O=Lt.useMemo(()=>h?Jse(h):null,[h]);return m.viewport?(0,Dn.jsxs)(Dn.Fragment,{children:[O&&(0,Dn.jsx)(mqe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:O}),(0,Dn.jsx)(lqe,{scope:n,onClose:M,children:Pse.createPortal((0,Dn.jsx)(L5.ItemSlot,{scope:n,children:(0,Dn.jsx)(xee,{asChild:!0,onEscapeKeyDown:le(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Dn.jsx)(ke.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,L=>{L.key==="Escape"&&(s?.(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:le(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:le(e.onPointerMove,L=>{if(!y.current)return;let $=L.clientX-y.current.x,I=L.clientY-y.current.y,_=!!w.current,R=["left","right"].includes(m.swipeDirection),F=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,Q=R?F(0,$):0,P=R?0:F(0,I),T=L.pointerType==="touch"?10:2,D={x:Q,y:P},z={originalEvent:L,delta:D};_?(w.current=D,rF(Aqe,l,z,{discrete:!1})):Nse(D,m.swipeDirection,T)?(w.current=D,rF(sqe,u,z,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs($)>T||Math.abs(I)>T)&&(y.current=null)}),onPointerUp:le(e.onPointerUp,L=>{let $=w.current,I=L.target;if(I.hasPointerCapture(L.pointerId)&&I.releasePointerCapture(L.pointerId),w.current=null,y.current=null,$){let _=L.currentTarget,R={originalEvent:L,delta:$};Nse($,m.swipeDirection,m.swipeThreshold)?rF(uqe,p,R,{discrete:!0}):rF(cqe,d,R,{discrete:!0}),_.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),mqe=e=>{let{__scopeToast:t,children:n,...r}=e,a=aF(Mv,t),[o,i]=Lt.useState(!1),[s,A]=Lt.useState(!1);return hqe(()=>i(!0)),Lt.useEffect(()=>{let c=window.setTimeout(()=>A(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Dn.jsx)(nA,{asChild:!0,children:(0,Dn.jsx)(Qk,{...r,children:o&&(0,Dn.jsxs)(Dn.Fragment,{children:[a.label," ",n]})})})},gqe="ToastTitle",Use=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,Dn.jsx)(ke.div,{...r,ref:t})});Use.displayName=gqe;var fqe="ToastDescription",qse=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,Dn.jsx)(ke.div,{...r,ref:t})});qse.displayName=fqe;var zse="ToastAction",Yse=Lt.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,Dn.jsx)(Wse,{altText:n,asChild:!0,children:(0,Dn.jsx)(M5,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${zse}\`. Expected non-empty \`string\`.`),null)});Yse.displayName=zse;var Kse="ToastClose",M5=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,a=dqe(Kse,n);return(0,Dn.jsx)(Wse,{asChild:!0,children:(0,Dn.jsx)(ke.button,{type:"button",...r,ref:t,onClick:le(e.onClick,a.onClose)})})});M5.displayName=Kse;var Wse=Lt.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...a}=e;return(0,Dn.jsx)(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Jse(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),bqe(r)){let a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){let i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Jse(r))}}),t}function rF(e,t,n,{discrete:r}){let a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?rB(a,o):a.dispatchEvent(o)}var Nse=(e,t,n=0)=>{let r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function hqe(e=()=>{}){let t=on(e);hn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function bqe(e){return e.nodeType===e.ELEMENT_NODE}function yqe(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _5(e){let t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Vse=jse,N5=$se,P5=Hse,T5=Use,j5=qse,O5=Yse,$5=M5;var lg=k(N(),1),Zse=Vse,G5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(N5,{ref:n,className:G("fixed top-0 z-[10001] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));G5.displayName=N5.displayName;var Cqe=wa("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),H5=Mh.forwardRef(({className:e,variant:t,...n},r)=>(0,lg.jsx)(P5,{ref:r,className:G(Cqe({variant:t}),e),...n}));H5.displayName=P5.displayName;var wqe=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(O5,{ref:n,className:G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));wqe.displayName=O5.displayName;var U5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)($5,{ref:n,className:G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,lg.jsx)(ld,{className:"h-4 w-4"})}));U5.displayName=$5.displayName;var q5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(T5,{ref:n,className:G("text-sm font-semibold",e),...t}));q5.displayName=T5.displayName;var z5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(j5,{ref:n,className:G("text-sm opacity-90",e),...t}));z5.displayName=j5.displayName;var Hd=k(N(),1);function Xse(){let{toasts:e}=Io();return(0,Hd.jsxs)(Zse,{children:[e.map(function({id:t,title:n,description:r,action:a,...o}){return(0,Hd.jsxs)(H5,{...o,children:[(0,Hd.jsxs)("div",{className:"grid gap-1",children:[n&&(0,Hd.jsx)(q5,{children:n}),r&&(0,Hd.jsx)(z5,{children:r})]}),a,(0,Hd.jsx)(U5,{})]},t)}),(0,Hd.jsx)(G5,{})]})}var Lpe=k(U(),1);var oF=Z("Vlt",[["path",{d:"M8.66659 6.33329C8.66659 6.68925 8.61079 7.03216 8.50747 7.35379C8.21694 8.2582 7.99884 9.28798 8.47332 10.1109L10.6593 13.9022C10.9243 14.3618 11.4692 14.5626 11.9997 14.5626C12.5304 14.5626 13.0755 14.3617 13.3406 13.902L15.5265 10.1108C16.001 9.28787 15.7829 8.25813 15.4924 7.35374C15.389 7.03215 15.3333 6.68925 15.3333 6.33332C15.3333 4.49239 16.8257 3.00003 18.6666 3.00003C20.5075 3.00003 21.9999 4.49239 21.9999 6.33332C21.9999 8.17424 20.5075 9.66661 18.6666 9.66661C18.1358 9.66661 17.5906 9.86748 17.3254 10.3273L15.1397 14.1182C14.6652 14.9411 14.8834 15.971 15.1739 16.8754C15.2772 17.197 15.333 17.54 15.333 17.8959C15.333 19.7368 13.8406 21.2292 11.9997 21.2292C10.1588 21.2292 8.66644 19.7368 8.66644 17.8959C8.66644 17.5399 8.72226 17.1969 8.8256 16.8752C9.1162 15.9708 9.33437 14.9409 8.85984 14.1179L6.67422 10.3272C6.40911 9.86744 5.86403 9.66659 5.33329 9.66659C3.49237 9.66659 2 8.17422 2 6.33329C2 4.49237 3.49237 3 5.33329 3C7.17422 3 8.66659 4.49237 8.66659 6.33329Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var eAe=Z("Vsr",[["path",{d:"M13.714 6.85711C13.714 7.80388 12.9465 8.57139 11.9997 8.57139C11.9634 8.57139 11.9274 8.57027 11.8917 8.56805C11.3917 8.53695 10.8334 8.55884 10.4791 8.91307L8.49791 10.8943C8.38627 11.0059 8.36954 11.1773 8.43201 11.3223V11.3223C8.49296 11.4638 8.62483 11.5714 8.77891 11.5714H14.6517C15.1406 11.5714 15.5446 11.2096 15.8732 10.8477C16.1869 10.5025 16.6394 10.2857 17.1426 10.2857C18.0894 10.2857 18.8569 11.0532 18.8569 12C18.8569 12.9467 18.0894 13.7143 17.1426 13.7143C17.1095 13.7143 17.0766 13.7133 17.044 13.7115C16.5484 13.6834 15.9964 13.7082 15.6454 14.0592L14.059 15.6456C13.7079 15.9967 13.6831 16.5486 13.7112 17.0443C13.7131 17.0769 13.714 17.1097 13.714 17.1428C13.714 18.0896 12.9465 18.8571 11.9997 18.8571C11.0529 18.8571 10.2854 18.0896 10.2854 17.1428C10.2854 16.196 11.0529 15.4285 11.9997 15.4285C12.049 15.4285 12.0977 15.4306 12.1459 15.4347C12.6638 15.4784 13.2488 15.4692 13.6163 15.1017L15.512 13.206C15.642 13.076 15.6565 12.8748 15.5806 12.7073V12.7073C15.5091 12.5498 15.3614 12.4285 15.1884 12.4285H9.34772C8.85885 12.4285 8.45489 12.7903 8.12619 13.1522C7.81259 13.4975 7.36004 13.7143 6.85686 13.7143C5.91009 13.7143 5.14258 12.9467 5.14258 12C5.14258 11.0532 5.91009 10.2857 6.85686 10.2857C6.90304 10.2857 6.94878 10.2875 6.99403 10.2911C7.50763 10.3317 8.08622 10.3194 8.45053 9.95507L9.95483 8.45077C10.3191 8.08647 10.3315 7.50787 10.2908 6.99428C10.2873 6.94903 10.2854 6.90328 10.2854 6.85711C10.2854 5.91033 11.0529 5.14282 11.9997 5.14282C12.9465 5.14282 13.714 5.91033 13.714 6.85711Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var tAe=Z("VltClient",[["path",{d:"M11.1424 6.85711C11.1424 6.88482 11.1418 6.91238 11.1405 6.93977C11.1173 7.42818 11.1468 7.96964 11.4925 8.31539L13.1127 9.93559C13.4585 10.2813 13.9999 10.3108 14.4883 10.2876C14.5157 10.2863 14.5433 10.2857 14.571 10.2857C15.5178 10.2857 16.2853 11.0532 16.2853 12C16.2853 12.9467 15.5178 13.7143 14.571 13.7143C14.5433 13.7143 14.5157 13.7136 14.4883 13.7123C13.9999 13.6891 13.4585 13.7186 13.1127 14.0643L11.4925 15.6845C11.1468 16.0303 11.1173 16.5718 11.1405 17.0602C11.1418 17.0876 11.1424 17.1151 11.1424 17.1428C11.1424 18.0896 10.3749 18.8571 9.42815 18.8571C8.48138 18.8571 7.71387 18.0896 7.71387 17.1428C7.71387 16.196 8.48138 15.4285 9.42815 15.4285C9.45587 15.4285 9.48343 15.4292 9.51082 15.4305C9.99923 15.4537 10.5407 15.4242 10.8864 15.0784L12.5066 13.4583C12.8524 13.1125 12.8819 12.571 12.8587 12.0826C12.8574 12.0552 12.8567 12.0277 12.8567 12C12.8567 11.9723 12.8574 11.9447 12.8587 11.9173C12.8819 11.4289 12.8524 10.8874 12.5066 10.5417L10.8864 8.92148C10.5407 8.57574 9.99923 8.54625 9.51082 8.56944C9.48343 8.57074 9.45587 8.57139 9.42815 8.57139C8.48138 8.57139 7.71387 7.80388 7.71387 6.85711C7.71387 5.91033 8.48138 5.14282 9.42815 5.14282C10.3749 5.14282 11.1424 5.91033 11.1424 6.85711Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Han=Z("Sidebar",[["path",{d:"M9.35719 3H14.6428C15.7266 2.99999 16.6007 2.99998 17.3086 3.05782C18.0375 3.11737 18.6777 3.24318 19.27 3.54497C20.2108 4.02433 20.9757 4.78924 21.455 5.73005C21.7568 6.32234 21.8826 6.96253 21.9422 7.69138C22 8.39925 22 9.27339 22 10.3572V13.6428C22 14.7266 22 15.6008 21.9422 16.3086C21.8826 17.0375 21.7568 17.6777 21.455 18.27C20.9757 19.2108 20.2108 19.9757 19.27 20.455C18.6777 20.7568 18.0375 20.8826 17.3086 20.9422C16.6008 21 15.7266 21 14.6428 21H9.35717C8.27339 21 7.39925 21 6.69138 20.9422C5.96253 20.8826 5.32234 20.7568 4.73005 20.455C3.78924 19.9757 3.02433 19.2108 2.54497 18.27C2.24318 17.6777 2.11737 17.0375 2.05782 16.3086C1.99998 15.6007 1.99999 14.7266 2 13.6428V10.3572C1.99999 9.27341 1.99998 8.39926 2.05782 7.69138C2.11737 6.96253 2.24318 6.32234 2.54497 5.73005C3.02433 4.78924 3.78924 4.02433 4.73005 3.54497C5.32234 3.24318 5.96253 3.11737 6.69138 3.05782C7.39926 2.99998 8.27341 2.99999 9.35719 3ZM6.85424 5.05118C6.24907 5.10062 5.90138 5.19279 5.63803 5.32698C5.07354 5.6146 4.6146 6.07354 4.32698 6.63803C4.19279 6.90138 4.10062 7.24907 4.05118 7.85424C4.00078 8.47108 4 9.26339 4 10.4V13.6C4 14.7366 4.00078 15.5289 4.05118 16.1458C4.10062 16.7509 4.19279 17.0986 4.32698 17.362C4.6146 17.9265 5.07354 18.3854 5.63803 18.673C5.90138 18.8072 6.24907 18.8994 6.85424 18.9488C7.47108 18.9992 8.26339 19 9.4 19H14.6C15.7366 19 16.5289 18.9992 17.1458 18.9488C17.7509 18.8994 18.0986 18.8072 18.362 18.673C18.9265 18.3854 19.3854 17.9265 19.673 17.362C19.8072 17.0986 19.8994 16.7509 19.9488 16.1458C19.9992 15.5289 20 14.7366 20 13.6V10.4C20 9.26339 19.9992 8.47108 19.9488 7.85424C19.8994 7.24907 19.8072 6.90138 19.673 6.63803C19.3854 6.07354 18.9265 5.6146 18.362 5.32698C18.0986 5.19279 17.7509 5.10062 17.1458 5.05118C16.5289 5.00078 15.7366 5 14.6 5H9.4C8.26339 5 7.47108 5.00078 6.85424 5.05118ZM7 7C7.55229 7 8 7.44772 8 8V16C8 16.5523 7.55229 17 7 17C6.44772 17 6 16.5523 6 16V8C6 7.44772 6.44772 7 7 7Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var zan=Z("ViewOptions",[["path",{d:"M17 16V18H7V16H17ZM20 13V11C20 9.34315 18.6569 8 17 8H7C5.34315 8 4 9.34315 4 11V13C4 14.6569 5.34315 16 7 16V18C4.23858 18 2 15.7614 2 13V11C2 8.32472 4.10111 6.14053 6.74316 6.00684L7 6H17L17.2568 6.00684C19.8989 6.14053 22 8.32472 22 11V13L21.9932 13.2568C21.8595 15.8989 19.6753 18 17 18V16C18.6569 16 20 14.6569 20 13Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8 12C8 12.5523 7.55228 13 7 13C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11C7.55228 11 8 11.4477 8 12Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M18 12C18 12.5523 17.5523 13 17 13C16.4477 13 16 12.5523 16 12C16 11.4477 16.4477 11 17 11C17.5523 11 18 11.4477 18 12Z",key:"4",fill:"currentColor",strokeWidth:"0"}]]);var nAe=Z("Github",[["path",{d:"M12 2.04932C6.475 2.04932 2 6.52432 2 12.0493C2 16.4743 4.8625 20.2118 8.8375 21.5368C9.3375 21.6243 9.525 21.3243 9.525 21.0618C9.525 20.8243 9.5125 20.0368 9.5125 19.1993C7 19.6618 6.35 18.5868 6.15 18.0243C6.0375 17.7368 5.55 16.8493 5.125 16.6118C4.775 16.4243 4.275 15.9618 5.1125 15.9493C5.9 15.9368 6.4625 16.6743 6.65 16.9743C7.55 18.4868 8.9875 18.0618 9.5625 17.7993C9.65 17.1493 9.9125 16.7118 10.2 16.4618C7.975 16.2118 5.65 15.3493 5.65 11.5243C5.65 10.4368 6.0375 9.53682 6.675 8.83682C6.575 8.58682 6.225 7.56182 6.775 6.18682C6.775 6.18682 7.6125 5.92432 9.525 7.21182C10.325 6.98682 11.175 6.87432 12.025 6.87432C12.875 6.87432 13.725 6.98682 14.525 7.21182C16.4375 5.91182 17.275 6.18682 17.275 6.18682C17.825 7.56182 17.475 8.58682 17.375 8.83682C18.0125 9.53682 18.4 10.4243 18.4 11.5243C18.4 15.3618 16.0625 16.2118 13.8375 16.4618C14.2 16.7743 14.5125 17.3743 14.5125 18.3118C14.5125 19.6493 14.5 20.7243 14.5 21.0618C14.5 21.3243 14.6875 21.6368 15.1875 21.5368C19.1375 20.2118 22 16.4618 22 12.0493C22 6.52432 17.525 2.04932 12 2.04932Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Eqe=k(N(),1);var kqe=k(N(),1);var vqe=k(N(),1);var iF=Z("Bun",[["path",{d:"M11.9999 20.6599C17.5231 20.6599 21.9999 17.0447 21.9999 12.5863C21.9999 9.82179 20.2859 7.37988 17.6509 5.93162C16.5787 5.33577 15.7363 4.80093 15.0352 4.35634C13.7148 3.5173 12.9 3 11.9999 3C11.0857 3 10.0553 3.65435 8.69476 4.51762C7.92829 5.01459 7.14565 5.48618 6.34813 5.93162C3.71401 7.37988 2 9.82179 2 12.5863C2 17.0447 6.47683 20.6599 11.9999 20.6599ZM10.8325 5.75947C11.1105 5.1267 11.252 4.44243 11.2478 3.75129C11.2478 3.63095 11.4158 3.59585 11.4392 3.72789C11.9874 6.04695 10.6871 7.19603 9.72518 7.58045C9.62155 7.62057 9.55887 7.48017 9.6391 7.40663C10.1499 6.94905 10.5568 6.38741 10.8325 5.75947ZM12.5473 5.67423C12.4682 4.99468 12.2461 4.33959 11.8955 3.75213V3.73959C11.8387 3.6368 11.9674 3.5198 12.0501 3.59585C13.6847 5.35499 13.139 6.9846 12.5131 7.80525C12.4445 7.89049 12.3217 7.80275 12.3559 7.69996C12.5614 7.04567 12.6266 6.35542 12.5473 5.67423ZM14.0273 5.20707C13.6921 4.61538 13.2342 4.10221 12.6844 3.70198V3.69029C12.5908 3.61925 12.6643 3.4613 12.7788 3.5081C14.9416 4.414 15.0903 6.1581 14.8279 7.18099C14.8226 7.20516 14.8083 7.22639 14.7878 7.24032C14.768 7.25434 14.7434 7.25992 14.7194 7.25585C14.6954 7.25178 14.6741 7.23838 14.66 7.2186C14.6453 7.1986 14.6388 7.17384 14.6416 7.14923C14.5751 6.46597 14.3659 5.80429 14.0273 5.20707ZM9.78869 5.67423C9.2739 6.12885 8.71983 6.30769 8.06883 6.50742C7.97189 6.50742 7.9067 6.44223 7.93929 6.35699C9.39926 5.59902 9.91906 4.98227 10.438 4.04128C10.438 4.04128 10.5676 3.9435 10.5951 4.11231C10.5951 4.36553 10.3043 5.21961 9.78869 5.67423ZM13.9095 15.0382C13.7911 15.5409 13.5178 15.9937 13.1281 16.3327C12.8396 16.6209 12.462 16.803 12.0568 16.8492C11.6396 16.8101 11.2488 16.6276 10.9511 16.3327C10.5652 15.9923 10.2955 15.5396 10.1798 15.0382C10.176 15.0085 10.1789 14.9784 10.1881 14.9499C10.1974 14.9214 10.2128 14.8954 10.2333 14.8736C10.2538 14.8523 10.2789 14.836 10.3068 14.826C10.3346 14.816 10.3644 14.8125 10.3937 14.8159H13.6981C13.7273 14.8126 13.7568 14.8162 13.7844 14.8264C13.812 14.8365 13.8368 14.853 13.8569 14.8744C13.8773 14.8961 13.8926 14.922 13.9017 14.9503C13.9108 14.9787 13.9135 15.0087 13.9095 15.0382ZM9.36081 13.2247C9.05905 13.4311 8.69392 13.5238 8.33025 13.4865C7.96659 13.4492 7.62791 13.2842 7.37436 13.0208C7.11619 12.753 6.95639 12.4056 6.92103 12.0353C6.88567 11.665 6.97683 11.2936 7.17965 10.9817C7.35264 10.716 7.59917 10.5096 7.88665 10.3876C8.17366 10.2653 8.49106 10.2332 8.79672 10.2956C9.10175 10.3583 9.38254 10.5129 9.60233 10.7385C9.82295 10.9642 9.97254 11.2533 10.0327 11.5659C10.0934 11.8795 10.0621 12.204 9.94246 12.5002C9.82401 12.7934 9.62168 13.046 9.36081 13.2247ZM16.44 13.2289C16.1378 13.4339 15.7727 13.5253 15.4095 13.4867C15.0463 13.4482 14.7085 13.2822 14.4561 13.0183C14.162 12.7125 13.9984 12.3044 13.9998 11.8801C13.9998 11.56 14.0917 11.2467 14.2664 10.9809C14.4393 10.7151 14.6859 10.5079 14.9742 10.3867C15.2616 10.2649 15.5793 10.2334 15.8851 10.2965C16.191 10.36 16.4718 10.5146 16.6915 10.7419C16.9113 10.9692 17.0592 11.2575 17.1194 11.5717C17.1788 11.8858 17.146 12.2103 17.025 12.506C16.9055 12.7994 16.702 13.0509 16.44 13.2289Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),eon=Z("BunWordmark",[["path",{d:"M5.58371 15.4622C3.3392 15.4622 2.10242 15.1495 2.04691 15.0801C1.98436 13.1512 1.98436 11.2208 2.04691 9.29187C2.10242 9.22938 3.3324 9 5.58371 9C7.67518 9 8.47428 9.77129 8.47428 10.6955C8.47428 11.2931 8.11295 11.8351 7.39028 12.1478V12.252C8.25893 12.3146 8.68275 12.8843 8.68275 13.5305C8.68275 14.5242 7.67527 15.4622 5.58371 15.4622ZM4.15921 11.8629L5.51416 11.8698C5.9589 11.8004 6.25774 11.5571 6.25774 11.1819C6.25774 10.7094 5.9033 10.4523 5.27101 10.4523C4.72901 10.4523 4.31905 10.5426 4.16618 10.6608C4.15921 11.0569 4.15921 11.4667 4.15921 11.8629ZM5.27798 13.8572C5.91027 13.8572 6.29243 13.5723 6.29243 13.0859C6.29243 12.6898 5.97973 12.4535 5.51416 12.4396L4.15921 12.4327C4.15921 12.8356 4.15921 13.2386 4.16618 13.6348C4.31207 13.7598 4.72901 13.8572 5.27798 13.8572ZM15.2134 10.2091C15.269 11.8975 15.269 13.5027 15.2134 15.1565C14.5742 15.2607 13.8932 15.2607 13.254 15.1565L13.0594 13.9822H12.9343C12.6842 15.0036 12.1422 15.3233 11.3013 15.3233C9.599 15.3233 9.2863 13.9336 9.2863 12.2242C9.2863 11.7934 9.30016 11.2028 9.30016 10.2091C10.0511 10.0979 10.8144 10.0979 11.5654 10.2091V12.6828C11.5654 13.3916 11.9267 13.6556 12.3575 13.6556C12.6633 13.6556 12.9829 13.5027 13.1428 13.2456V10.2091C13.8285 10.0979 14.5277 10.0979 15.2134 10.2091ZM16.0729 15.1565C16.0173 13.468 16.0173 11.8629 16.0729 10.2091C16.7121 10.1048 17.3931 10.1048 18.0324 10.2091L18.2269 11.3834H18.352C18.6021 10.362 19.1441 10.0423 19.985 10.0423C21.6874 10.0423 22 11.4321 22 13.1414C22 13.5723 21.9861 14.1629 21.9861 15.1565C21.2352 15.2677 20.4719 15.2677 19.7209 15.1565V12.6828C19.7209 11.9741 19.3596 11.71 18.9288 11.71C18.623 11.71 18.3034 11.8629 18.1435 12.12V15.1565C17.4578 15.2677 16.7586 15.2677 16.0729 15.1565Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var sF=Z("Deno",[["path",{d:"M12.439 1.95705C17.9669 2.2142 22.2462 6.911 21.989 12.439C21.7319 17.9669 17.0351 22.2461 11.5071 21.989C5.97916 21.7318 1.6999 17.0351 1.95705 11.5071C2.2142 5.97915 6.911 1.6999 12.439 1.95705ZM14.7833 14.0305C14.1504 13.9993 13.5256 13.8936 13.0233 13.8096C12.6413 13.7457 12.279 13.645 11.9816 13.5429C11.933 13.5255 11.8788 13.5417 11.8479 13.583C11.817 13.6242 11.8126 13.6842 11.8471 13.7225C11.9875 13.8782 12.4328 14.2027 12.7788 14.3517C12.483 14.5959 12.2807 15.1543 12.201 15.4434C12.094 15.8313 12.0788 16.3915 12.1047 16.597C12.2089 17.424 12.513 18.1652 13.266 18.8135C13.793 19.2673 14.5558 19.5775 15.3353 19.5914C16.411 19.6106 17.6997 19.1484 18.7113 18.1096C20.0339 16.6596 20.9004 14.7742 21.0613 12.6675C21.4443 7.65129 17.6828 3.26778 12.6665 2.88475C7.65033 2.50172 3.26681 6.2633 2.88378 11.2795C2.68541 13.8773 3.59862 16.3054 5.22219 18.0959C5.2674 18.1451 5.34032 18.157 5.39885 18.1249C5.45739 18.0928 5.48644 18.0248 5.46923 17.9603C4.2652 13.2441 6.87711 8.15373 9.79245 6.54265C10.8748 5.94449 11.929 5.71711 12.8762 6.10014C14.3263 6.68651 15.1554 7.6587 16.9502 8.47641C18.745 9.29407 18.9391 10.6572 18.4388 12.0354C17.9385 13.4136 16.3265 14.1062 14.7833 14.0305ZM11.6428 6.73553C11.0546 6.78156 10.6684 7.50958 10.6178 7.97793C10.567 8.44623 10.7995 9.21917 11.5659 9.20408C12.4634 9.1864 12.7361 8.41813 12.6376 7.67475C12.5637 7.11645 12.1345 6.69699 11.6428 6.73553Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),ron=Z("DenoWordmark",[["path",{d:"M11.7911 11.5266C11.7911 11.6902 11.7911 11.9255 11.7603 12.0073H8.25184C8.41547 12.6006 8.88602 12.9689 9.53042 12.9689C10.0624 12.9791 10.4511 12.7439 10.7272 12.4063L11.5967 13.2144C11.1671 13.7566 10.4409 14.1555 9.43839 14.1555C7.97569 14.1555 6.87096 13.1326 6.87096 11.5675C6.87096 10.0537 7.92452 9 9.34635 9C10.809 9 11.7911 10.0639 11.7911 11.5266ZM9.38719 10.1763C8.84518 10.1763 8.41547 10.473 8.26204 11.0458H10.4613C10.3283 10.5242 9.9703 10.1763 9.38719 10.1763ZM15.3097 9C16.3838 9 17.1304 9.57294 17.1304 11.1072V14.0737H15.7904V11.4447C15.7904 10.4934 15.453 10.1969 14.829 10.1969C14.154 10.1969 13.6936 10.6673 13.6936 11.5573V14.0737H12.3536V9.08184H13.6936V9.72637H13.714C14.1231 9.24564 14.6961 9 15.3097 9ZM20.2811 14.1555C18.6956 14.1555 17.6319 13.0712 17.6319 11.5778C17.6319 10.0843 18.6956 9 20.2811 9C21.8359 9 22.9407 10.0435 22.9407 11.5778C22.9407 13.112 21.8359 14.1555 20.2811 14.1555ZM20.2811 12.9586C21.0071 12.9586 21.5802 12.3858 21.5802 11.5778C21.5802 10.7595 21.0279 10.1969 20.2811 10.1969C19.5036 10.1969 18.982 10.7901 18.982 11.5778C18.982 12.3552 19.5241 12.9586 20.2811 12.9586ZM2 14.0737V9H3.83416C5.4391 9 6.47082 10.0433 6.47082 11.544C6.47082 13.0375 5.50359 14.0737 3.85568 14.0737H2ZM3.31833 12.866H3.76255C4.53635 12.866 5.04503 12.2729 5.04503 11.544C5.04503 10.7865 4.52917 10.2077 3.86283 10.2077H3.31833V12.866Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Nh=Z("Node",[["path",{d:"M11.8751 22C11.5993 22 11.3423 21.9266 11.1032 21.7977L8.65943 20.3461C8.29224 20.1437 8.47584 20.0703 8.58599 20.0336C9.08209 19.8679 9.17428 19.8312 9.68835 19.5375C9.74382 19.5008 9.81725 19.5187 9.87194 19.5562L11.7462 20.6773C11.8196 20.7141 11.9118 20.7141 11.9665 20.6773L19.2978 16.4328C19.3713 16.396 19.408 16.3226 19.408 16.2304V7.76002C19.408 7.66783 19.3713 7.59439 19.2978 7.55767L11.9665 3.33185C11.8931 3.29513 11.8009 3.29513 11.7462 3.33185L4.41486 7.55767C4.34142 7.59439 4.3047 7.68658 4.3047 7.76002V16.2304C4.3047 16.3039 4.34142 16.396 4.41486 16.4328L6.418 17.5906C7.50239 18.1422 8.18208 17.4984 8.18208 16.8554V8.49518C8.18208 8.38502 8.27427 8.27487 8.4024 8.27487H9.33912C9.44928 8.27487 9.55944 8.36705 9.55944 8.49518V16.8554C9.55944 18.307 8.76959 19.1523 7.39145 19.1523C6.96879 19.1523 6.63832 19.1523 5.70081 18.6929L3.77188 17.5906C3.29453 17.3148 3 16.8007 3 16.2492V7.77877C3 7.2272 3.29375 6.71313 3.77188 6.43735L11.1032 2.19278C11.5626 1.93574 12.1876 1.93574 12.647 2.19278L19.9783 6.43735C20.4556 6.71313 20.7502 7.2272 20.7502 7.77877V16.2492C20.7502 16.8007 20.4564 17.3148 19.9783 17.5906L12.647 21.8352C12.4079 21.9445 12.1321 22 11.8751 22ZM14.1353 16.1757C10.9196 16.1757 10.2587 14.7062 10.2587 13.4562C10.2587 13.346 10.3509 13.2359 10.479 13.2359H11.4345C11.5446 13.2359 11.6368 13.3093 11.6368 13.4194C11.7837 14.3929 12.2063 14.871 14.154 14.871C15.6978 14.871 16.3587 14.5218 16.3587 13.6952C16.3587 13.2179 16.1751 12.8687 13.7681 12.6296C11.7649 12.4273 10.5157 11.9866 10.5157 10.3882C10.5157 8.89987 11.7649 8.01783 13.8595 8.01783C16.2111 8.01783 17.3689 8.82643 17.5158 10.5905C17.5158 10.646 17.497 10.7007 17.4603 10.7561C17.4236 10.7929 17.3681 10.8296 17.3134 10.8296H16.3579C16.2658 10.8296 16.1743 10.7561 16.1556 10.664C15.9353 9.653 15.3657 9.32253 13.8587 9.32253C12.1681 9.32253 11.9665 9.91082 11.9665 10.3514C11.9665 10.8843 12.2056 11.0499 14.4837 11.3436C16.7439 11.6374 17.8095 12.0601 17.8095 13.6405C17.7916 15.257 16.4689 16.1757 14.1353 16.1757Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),ion=Z("NodeWordmark",[["path",{d:"M21.8928 12.5235C21.9591 12.4848 22 12.414 22 12.3371V11.8385C22 11.7618 21.9593 11.6911 21.8928 11.6523L20.1212 10.6237C20.0545 10.585 19.9723 10.5848 19.9053 10.6233L18.1227 11.6525C18.0562 11.6911 18.0151 11.762 18.0151 11.8389V13.8969C18.0151 13.9743 18.0566 14.0459 18.124 14.0842L19.8954 15.0935C19.9606 15.131 20.0407 15.1312 20.1066 15.0948L21.1779 14.4991C21.212 14.4801 21.2332 14.4445 21.2334 14.4059C21.2336 14.367 21.2129 14.331 21.1792 14.3117L19.3855 13.2823C19.3519 13.263 19.3313 13.2274 19.3313 13.1891V12.5439C19.3313 12.5053 19.3519 12.4699 19.3851 12.4509L19.9437 12.1289C19.9767 12.1096 20.0178 12.1096 20.0511 12.1289L20.6096 12.4509C20.6431 12.4701 20.6636 12.5055 20.6636 12.5439V13.0514C20.6636 13.0901 20.6842 13.1257 20.7174 13.1448C20.7509 13.1641 20.792 13.1641 20.8255 13.1446L21.8928 12.5235ZM19.9869 12.4269C19.9998 12.4197 20.0155 12.4197 20.0282 12.4269L20.3703 12.6246C20.383 12.632 20.3908 12.6457 20.3908 12.6604V13.0554C20.3908 13.0702 20.383 13.0838 20.3703 13.0912L20.0282 13.2886C20.0155 13.296 19.9996 13.296 19.9869 13.2886L19.645 13.0912C19.6321 13.0838 19.6243 13.0702 19.6243 13.0554V12.6604C19.6243 12.6457 19.6321 12.632 19.645 12.6246L19.9869 12.4269ZM15.3479 13.2488C15.3479 13.2678 15.3377 13.2856 15.321 13.2954L14.7088 13.6483C14.6921 13.658 14.6715 13.658 14.655 13.6483L14.0429 13.2954C14.0261 13.2856 14.016 13.2678 14.016 13.2488V12.5417C14.016 12.5227 14.0264 12.5047 14.0429 12.4949L14.655 12.1416C14.6718 12.1317 14.6923 12.1317 14.709 12.1416L15.3214 12.4949C15.3379 12.5047 15.3481 12.5227 15.3481 12.5417L15.3479 13.2488ZM15.5133 8.01351C15.4801 7.99508 15.4394 7.99551 15.4063 8.01478C15.3735 8.03427 15.3532 8.06943 15.3532 8.10756V10.8432C15.3532 10.8699 15.3388 10.8949 15.3157 10.9084C15.2924 10.9218 15.2636 10.9218 15.2403 10.9084L14.7938 10.6511C14.7273 10.6127 14.6453 10.6127 14.5788 10.6511L12.7957 11.6801C12.729 11.7186 12.6879 11.7898 12.6879 11.8667V13.9253C12.6879 14.0022 12.729 14.0732 12.7955 14.1119L14.5786 15.1416C14.6451 15.1801 14.7273 15.1801 14.794 15.1416L16.5775 14.1119C16.644 14.0732 16.6851 14.0022 16.6851 13.9253V8.79363C16.6851 8.71568 16.6427 8.64367 16.5747 8.60554L15.5133 8.01351ZM9.23801 10.6123C9.30452 10.5737 9.3867 10.5737 9.45322 10.6123L11.2363 11.6411C11.3028 11.6796 11.3439 11.7508 11.3439 11.8277V13.887C11.3439 13.9639 11.3028 14.0351 11.2363 14.0736L9.45343 15.1032C9.38692 15.1416 9.30473 15.1416 9.23801 15.1032L7.45557 14.0736C7.38906 14.0351 7.34796 13.9639 7.34796 13.887V11.8275C7.34796 11.7508 7.38906 11.6796 7.45557 11.6411L9.23801 10.6123ZM5.99551 11.8105C5.99551 11.733 5.95484 11.6619 5.88791 11.6235L4.10546 10.5977C4.07496 10.5799 4.04128 10.5708 4.00718 10.5695H3.98875C3.95486 10.5708 3.92097 10.5799 3.89047 10.5977L2.10782 11.6235C2.04152 11.6619 2 11.733 2 11.8105L2.00381 14.5726C2.00381 14.6112 2.02394 14.647 2.05761 14.6656C2.09066 14.6855 2.13154 14.6855 2.16458 14.6656L3.22367 14.059C3.2906 14.0192 3.33148 13.9491 3.33148 13.8722V12.5818C3.33148 12.5047 3.37215 12.4337 3.43887 12.3952L3.89005 12.1355C3.92351 12.1158 3.96037 12.1065 3.99765 12.1065C4.0345 12.1065 4.07221 12.1158 4.10504 12.1355L4.55579 12.3952C4.62251 12.4337 4.6636 12.5047 4.6636 12.5818V13.8722C4.6636 13.9491 4.70491 14.0196 4.77142 14.059L5.8305 14.6656C5.86376 14.6855 5.90528 14.6855 5.93811 14.6656C5.97094 14.6468 5.99149 14.611 5.99149 14.5726L5.99551 11.8105Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var rAe=Z("JavaScript",[["path",{d:"M21.9178 14.357C21.6958 12.9704 20.7911 11.8057 18.1128 10.7194C17.182 10.292 16.1456 9.98573 15.8357 9.28052C15.7265 8.86975 15.7111 8.63943 15.7811 8.39012C15.9806 7.584 16.9422 7.33231 17.7056 7.56382C18.1971 7.72884 18.6613 8.10756 18.9427 8.71066C20.2545 7.86181 20.251 7.86656 21.1675 7.28364C20.8327 6.76364 20.6534 6.52383 20.4338 6.30182C19.6455 5.42091 18.5699 4.9674 16.852 5.00182C16.554 5.03982 16.2536 5.08018 15.9568 5.11698C15.0985 5.33424 14.2817 5.78419 13.802 6.38848C12.3631 8.0209 12.7739 10.8785 14.5239 12.0538C16.2489 13.3479 18.7824 13.6423 19.1053 14.8533C19.4199 16.3349 18.0166 16.8145 16.6205 16.6448C15.5923 16.4311 15.0201 15.9075 14.4016 14.9578C13.6426 15.397 12.8732 15.841 12.0936 16.2898C12.3715 16.8965 12.6623 17.1707 13.1277 17.6966C15.3288 19.9298 20.8386 19.8206 21.8264 16.4394C21.8656 16.3254 22.1315 15.5502 21.9178 14.357ZM10.5348 5.18228H7.69148C7.69148 7.63743 7.67961 10.076 7.67961 12.5323C7.67961 14.0958 7.76034 15.5276 7.50627 15.9669C7.09075 16.8312 6.01276 16.7243 5.52126 16.5557C5.02145 16.31 4.76738 15.9609 4.47296 15.4671C4.39223 15.3258 4.33168 15.2154 4.31149 15.2071C3.53981 15.6784 2.77169 16.1521 2 16.6222C2.38466 17.4105 2.95095 18.0955 3.67515 18.5407C4.75907 19.1913 6.21459 19.3896 7.73659 19.0406C8.72791 18.7521 9.5827 18.1537 10.0303 17.2431C10.6773 16.05 10.5384 14.6052 10.5325 13.0084C10.5491 10.4024 10.5348 7.79651 10.5348 5.18228Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var AF=Z("Npm",[["path",{d:"M2 2V22H22V2H2ZM18.6469 18.6484H15.2938V8.70469H11.9406V18.6484H5.35156V5.35312H18.6469V18.6484Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),lon=Z("NpmWordmark",[["path",{d:"M8.15385 15.4103H10.7179V14.1282H13.2821V9H8.15385V15.4103ZM10.7179 10.2821H12V12.8462H10.7179V10.2821ZM14.3077 9V14.1282H16.8718V10.2821H18.1538V14.1282H19.4359V10.2821H20.7179V14.1282H22V9H14.3077ZM2 14.1282H4.5641V10.2821H5.84615V14.1282H7.12821V9H2V14.1282Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var cF=Z("Pnpm",[["path",{d:"M22 8.24922H15.7507V2H22V8.24922Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 8.24922H8.875V2H15.1242V8.24922Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8.25 8.24898H2V1.99976H8.25V8.24898Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M22 15.1243H15.7507V8.87427H22V15.1243Z",key:"4",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 15.1243H8.875V8.87427H15.1242V15.1243Z",key:"5",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 21.9985H8.875V15.7493H15.1242V21.9985Z",key:"6",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M22 21.9985H15.7507V15.7493H22V21.9985Z",key:"7",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8.25 21.9985H2V15.7493H8.25V21.9985Z",key:"8",fill:"currentColor",strokeWidth:"0"}]]),mon=Z("PnpmWordmark",[["path",{d:"M3.78752 9.0002C4.10836 9.0002 4.40475 9.04284 4.67747 9.12834C4.95527 9.20855 5.19316 9.33415 5.39075 9.50513C5.58854 9.67612 5.74348 9.89249 5.85578 10.1544C5.96807 10.4107 6.02402 10.7183 6.02402 11.0763C6.02402 11.4182 5.97609 11.7176 5.87984 11.9742C5.78359 12.2305 5.64743 12.4471 5.47096 12.6234C5.2947 12.7943 5.08087 12.9227 4.82967 13.0082C4.58395 13.0937 4.30869 13.1365 4.00409 13.1365C3.77422 13.1365 3.56039 13.1017 3.3628 13.0322V14.363C3.30919 14.379 3.22389 14.395 3.10612 14.4111C2.98874 14.4324 2.86843 14.4432 2.74537 14.4432C2.62799 14.4432 2.52098 14.4351 2.42472 14.4191C2.34072 14.4059 2.26106 14.3729 2.19231 14.3228C2.12814 14.2747 2.08001 14.208 2.04813 14.1225C2.01604 14.0423 2 13.9353 2 13.8017V9.95411C2 9.80993 2.02935 9.69235 2.08804 9.60138C2.1522 9.51061 2.2377 9.42766 2.34471 9.35293C2.51022 9.24611 2.71603 9.16062 2.96194 9.09645C3.20766 9.03228 3.48292 9.0002 3.78752 9.0002ZM3.80356 12.0623C4.35408 12.0623 4.62914 11.7336 4.62914 11.0763C4.62914 10.7341 4.55989 10.4804 4.42079 10.3147C4.28717 10.149 4.09212 10.0662 3.83584 10.0662C3.73411 10.0662 3.64334 10.0795 3.56313 10.1063C3.48292 10.1278 3.41347 10.1544 3.35477 10.1865V11.95C3.41875 11.9821 3.4882 12.0087 3.56313 12.0302C3.63786 12.0517 3.71787 12.0623 3.80356 12.0623ZM9.1581 10.5471C9.1581 10.3816 9.10998 10.2613 9.01392 10.1863C8.92295 10.1061 8.79735 10.0662 8.63713 10.0662C8.53011 10.0662 8.4233 10.0795 8.31628 10.1063C8.21494 10.1329 8.12671 10.173 8.05198 10.2264V13.0082C7.99857 13.0242 7.91308 13.0403 7.79531 13.0563C7.68321 13.0723 7.56563 13.0804 7.44258 13.0804C7.32519 13.0804 7.21818 13.0723 7.12193 13.0563C7.03792 13.0431 6.95825 13.0101 6.88951 12.9601C6.82357 12.9096 6.77125 12.8435 6.73731 12.7677C6.70523 12.6822 6.68918 12.5727 6.68918 12.4391V10.0341C6.68918 9.88975 6.71853 9.77217 6.77722 9.6814C6.84139 9.59062 6.92688 9.50767 7.03389 9.43294C7.21544 9.3046 7.44277 9.20053 7.71529 9.12032C7.99309 9.0401 8.30024 9 8.63713 9C9.24105 9 9.70588 9.13362 10.032 9.40086C10.3579 9.66281 10.5211 10.0288 10.5211 10.4992V13.0082C10.4675 13.0242 10.382 13.0403 10.2644 13.0563C10.1521 13.0723 10.0345 13.0804 9.91169 13.0804C9.79411 13.0804 9.6873 13.0723 9.59104 13.0563C9.50703 13.0431 9.42737 13.0101 9.35863 12.9601C9.29261 12.9096 9.24023 12.8435 9.20623 12.7677C9.17414 12.6822 9.1581 12.5727 9.1581 12.4391V10.5471ZM13.1504 9.0002C13.4711 9.0002 13.7677 9.04304 14.0402 9.12853C14.318 9.20874 14.5559 9.33434 14.7537 9.50533C14.9513 9.67631 15.1062 9.89268 15.2185 10.1546C15.3308 10.4109 15.3867 10.7185 15.3867 11.0765C15.3867 11.4184 15.3388 11.7178 15.2426 11.9744C15.1463 12.2307 15.0101 12.4473 14.8337 12.6236C14.6574 12.7945 14.4436 12.9229 14.1924 13.0084C13.9467 13.0939 13.6714 13.1367 13.3668 13.1367C13.1369 13.1367 12.9233 13.1019 12.7255 13.0324V14.3631C12.6721 14.3792 12.5866 14.3952 12.4688 14.4113C12.3515 14.4326 12.2311 14.4434 12.1083 14.4434C11.9907 14.4434 11.8837 14.4353 11.7874 14.4193C11.7034 14.4061 11.6238 14.3731 11.555 14.323C11.4909 14.2749 11.4429 14.2082 11.4108 14.1227C11.3788 14.0425 11.3627 13.9355 11.3627 13.8019V9.95411C11.3627 9.80993 11.3921 9.69235 11.4508 9.60138C11.5149 9.51061 11.6004 9.42766 11.7074 9.35293C11.8731 9.24611 12.0787 9.16062 12.3247 9.09645C12.5706 9.03228 12.8456 9.0002 13.1502 9.0002H13.1504ZM13.1663 12.0625C13.7168 12.0625 13.9919 11.7338 13.9919 11.0765C13.9919 10.7343 13.9226 10.4806 13.7837 10.3149C13.6501 10.1492 13.455 10.0664 13.1984 10.0664C13.0968 10.0664 13.0061 10.0797 12.9258 10.1065C12.8456 10.128 12.7762 10.1546 12.7175 10.1867V11.9502C12.7817 11.9823 12.8511 12.0089 12.9258 12.0304C13.0008 12.0519 13.0806 12.0625 13.1663 12.0625ZM17.9196 9.0002C18.1387 9.0002 18.3526 9.03228 18.5609 9.09645C18.7748 9.15514 18.959 9.24611 19.1142 9.36897C19.2746 9.26215 19.4534 9.17392 19.6512 9.10447C19.8543 9.03502 20.0974 9.0002 20.3807 9.0002C20.5838 9.0002 20.7816 9.027 20.9739 9.08041C21.1717 9.13382 21.3454 9.21931 21.4949 9.33688C21.65 9.44918 21.7729 9.60138 21.8636 9.79389C21.9546 9.98092 22 10.2106 22 10.4833V13.0084C21.9466 13.0244 21.8611 13.0405 21.7435 13.0565C21.6312 13.0725 21.5137 13.0806 21.3908 13.0806C21.2834 13.0814 21.1762 13.0733 21.0701 13.0565C20.9861 13.0433 20.9063 13.0103 20.8375 12.9602C20.7716 12.9098 20.7193 12.8437 20.6853 12.7679C20.6532 12.6824 20.6372 12.5729 20.6372 12.4393V10.5234C20.6372 10.363 20.5918 10.2482 20.5008 10.1787C20.4101 10.1038 20.2872 10.0664 20.1323 10.0664C20.0573 10.0664 19.9771 10.085 19.8916 10.1226C19.8061 10.1546 19.7422 10.1893 19.6993 10.2266C19.7046 10.2482 19.7072 10.2695 19.7072 10.2908V13.0084C19.6485 13.0244 19.5604 13.0405 19.4428 13.0565C19.3306 13.0725 19.2157 13.0806 19.0981 13.0806C18.9806 13.0806 18.8736 13.0725 18.7773 13.0565C18.6933 13.0433 18.6136 13.0103 18.5449 12.9602C18.4789 12.9098 18.4266 12.8437 18.3927 12.7679C18.3606 12.6824 18.3446 12.5729 18.3446 12.4393V10.5234C18.3446 10.363 18.2937 10.2482 18.1922 10.1787C18.0961 10.1038 17.9785 10.0664 17.8396 10.0664C17.7434 10.0664 17.6606 10.0825 17.5912 10.1145C17.5306 10.1372 17.4716 10.164 17.4147 10.1947V13.0084C17.3613 13.0244 17.2758 13.0405 17.1582 13.0565C17.0414 13.0729 16.9235 13.0809 16.8055 13.0806C16.6879 13.0806 16.5809 13.0725 16.4846 13.0565C16.4006 13.0433 16.321 13.0103 16.2522 12.9602C16.1863 12.9098 16.134 12.8437 16.1 12.7679C16.0679 12.6824 16.0519 12.5729 16.0519 12.4393V10.0181C16.0519 9.8739 16.0812 9.75887 16.1399 9.67338C16.2043 9.58788 16.2898 9.50767 16.3966 9.43275C16.5784 9.3046 16.8027 9.20033 17.07 9.12032C17.346 9.03964 17.6321 8.99932 17.9196 9.0002Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var uF=Z("Yarn",[["path",{d:"M11.5508 7.2041C11.5578 7.18276 12.0646 5.66064 12.5322 5.95996C12.677 6.05521 13.1919 7.19573 13.1992 7.21191C13.2138 7.20347 13.7574 6.88906 13.8193 7.00879C14.1567 7.66261 14.196 8.91154 14.0469 9.6709C13.7957 10.9235 13.1671 11.5968 12.916 12.0195C12.8584 12.1177 13.592 12.4279 14.0547 13.707C14.4822 14.8774 14.1013 15.8601 14.168 15.9697C14.1797 15.9892 14.1836 15.9971 14.1836 15.9971C14.1836 15.9971 14.6745 16.0362 15.6592 15.4297C16.185 15.1048 16.8093 14.7403 17.5195 14.7324C18.206 14.7208 18.2414 15.5269 17.7275 15.6484C17.0997 15.7972 16.7818 15.9345 16.0049 16.4395C14.7936 17.2191 13.4731 17.5829 13.4619 17.5859C13.4619 17.5859 13.352 17.7508 13.0342 17.8252C12.4848 17.9583 10.417 18.0713 10.2285 18.0752C9.72264 18.0791 9.41273 17.9465 9.32617 17.7393C9.06326 17.1129 9.70312 16.8389 9.70312 16.8389C9.70312 16.8389 9.56192 16.7521 9.47949 16.6738C9.40494 16.5995 9.32629 16.4511 9.30273 16.5059C9.20466 16.7446 9.15332 17.3274 8.89062 17.5898C8.52961 17.9539 7.84656 17.8325 7.44238 17.6211C7.00536 17.3894 7.46102 16.8498 7.47363 16.835C7.4641 16.8404 7.23031 16.9693 7.04199 16.6855C6.8694 16.4193 6.7088 15.9649 6.75195 15.4053C6.79872 14.7757 7.49442 14.1653 7.5127 14.1494C7.5127 14.1494 7.38778 13.2052 7.7998 12.2383C8.1706 11.3627 9.16533 10.6575 9.17676 10.6494C9.17441 10.6468 8.33398 9.71646 8.64746 8.87988C8.85115 8.33281 8.93335 8.33586 9 8.3125C9.23538 8.22248 9.46312 8.12433 9.63184 7.94043C10.4695 7.03864 11.5357 7.20174 11.5508 7.2041Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12.8496 5.46582C12.63 5.32511 12.371 5.29391 12.1279 5.38379C11.8023 5.5012 11.5236 5.81451 11.2607 6.37012C11.2215 6.45233 11.1857 6.53108 11.1543 6.60938C10.6559 6.64465 9.87105 6.82476 9.20801 7.54102C9.12558 7.63101 8.96457 7.69813 8.7959 7.76074H8.7998C8.4548 7.87827 8.29374 8.16025 8.10547 8.66895C7.83891 9.38127 8.11308 10.0821 8.38379 10.5361C8.01497 10.865 7.52452 11.3895 7.26562 12.0039C6.94394 12.7632 6.90914 13.5069 6.9209 13.9102C6.64626 14.1998 6.22201 14.7439 6.1748 15.3545C6.11202 16.2079 6.42223 16.7876 6.55957 16.999C6.5988 17.0616 6.64238 17.1122 6.68945 17.1631C6.67376 17.2688 6.66982 17.3826 6.69336 17.5C6.74437 17.774 6.91681 17.9968 7.17969 18.1377C7.69759 18.4117 8.41938 18.5298 8.97656 18.252C9.1767 18.4633 9.54196 18.667 10.2051 18.667H10.2441C10.4129 18.667 12.5558 18.5531 13.1797 18.4004C13.4581 18.3338 13.6499 18.216 13.7754 18.1104C14.1756 17.9851 15.2825 17.6097 16.3262 16.9365C17.0637 16.459 17.3191 16.3567 17.8682 16.2236C18.39 16.0945 18.7277 15.6134 18.6572 15.0732C18.5866 14.5174 18.1159 14.1339 17.5117 14.1416C16.6094 14.1533 15.8519 14.6185 15.3496 14.9277C15.1534 15.0491 14.9841 15.1395 14.8389 15.2061C14.8703 14.7519 14.8429 14.1567 14.6074 13.5029C14.321 12.7203 13.9367 12.2389 13.6621 11.9609C13.98 11.499 14.4151 10.8255 14.6191 9.78418C14.7957 8.89554 14.7411 7.51339 14.3369 6.73828C14.2545 6.58181 14.1169 6.46883 13.9443 6.42188C13.8737 6.40229 13.7403 6.36316 13.4775 6.4375C13.093 5.61933 12.9556 5.53237 12.8496 5.46582Z",key:"2",fill:"currentColor",strokeWidth:"0"}]]),hon=Z("YarnWordmark",[["path",{d:"M7.05494 12.9698C6.78022 13.9176 6.34066 14.6044 5.84615 15.1538V10.3324C5.84615 10.0027 5.55769 9.72802 5.1044 9.72802C4.91209 9.72802 4.74725 9.82417 4.74725 9.96154C4.74725 10.0577 4.8022 10.1401 4.8022 10.4011V12.6126C4.63736 13.5742 4.22527 14.467 3.67582 14.467C3.27747 14.467 3.04396 14.0687 3.04396 13.3269C3.04396 12.1731 3.19505 11.5687 3.44231 10.5522C3.49725 10.3462 3.8956 9.7967 3.22253 9.7967C2.49451 9.7967 2.59066 10.0714 2.49451 10.3049C2.49451 10.3049 2 11.9396 2 13.3956C2 14.5907 2.53571 15.3736 3.45604 15.3736C4.0467 15.3736 4.47253 14.9753 4.8022 14.4258V16.1703C3.8956 16.967 3.0989 17.6676 3.0989 19.0549C3.0989 19.9341 3.64835 20.6346 4.41758 20.6346C5.11813 20.6346 5.84615 20.1264 5.84615 18.6841V16.3077C6.58791 15.6621 7.38461 14.8516 7.85165 13.2582C7.86538 13.2033 7.86538 13.1346 7.86538 13.1209C7.86538 12.8599 7.60439 12.5577 7.38461 12.5577C7.24725 12.5577 7.13736 12.6813 7.05494 12.9698ZM4.41758 19.7692C4.1978 19.7692 4.06044 19.4396 4.06044 19.0137C4.06044 18.1896 4.36264 17.6676 4.8022 17.2143V18.6841C4.8022 18.9451 4.85714 19.7692 4.41758 19.7692Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M10.9973 14.4533C10.6676 14.4533 10.5302 14.1236 10.5302 13.8214V11.5549C10.5302 11.2253 10.2418 10.9505 9.78846 10.9505C9.59615 10.9505 9.43132 11.0467 9.43132 11.1841C9.43132 11.2802 9.48626 11.3626 9.48626 11.6236V13.739C9.33516 14.1236 9.08791 14.4533 8.71703 14.4533C8.23626 14.4533 7.93407 14.0412 7.93407 13.3269C7.93407 11.3489 9.15659 10.456 10.2005 10.456C10.3379 10.456 10.4753 10.4835 10.5989 10.4835C10.7363 10.4835 10.7775 10.4011 10.7775 10.1676C10.7775 9.81044 10.5165 9.59066 10.1456 9.59066C8.46978 9.59066 6.87637 10.9918 6.87637 13.2857C6.87637 14.4533 7.43956 15.3599 8.51099 15.3599C9.03297 15.3599 9.41758 15.1126 9.69231 14.7967C9.89835 15.1264 10.2692 15.3599 10.75 15.3599C11.9313 15.3599 12.4808 14.1236 12.7143 13.217C12.728 13.1621 12.728 13.1346 12.728 13.1209C12.728 12.8599 12.467 12.5577 12.2473 12.5577C12.1099 12.5577 11.9725 12.6813 11.9176 12.9698C11.794 13.5742 11.5467 14.4533 10.9973 14.4533Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M14.967 15.3599C16.1484 15.3599 16.6841 14.1236 16.9313 13.217C16.9313 13.1896 16.9451 13.1621 16.9451 13.1209C16.9451 12.8599 16.6841 12.5577 16.4643 12.5577C16.3269 12.5577 16.1896 12.6813 16.1346 12.9698C16.011 13.5742 15.7775 14.4533 15.1456 14.4533C14.7747 14.4533 14.5962 14.0962 14.5962 13.7115C14.5962 12.3379 15.2143 10.717 15.2143 10.5522C15.2692 10.2363 14.7198 9.78297 14.5549 9.78297H13.8407C13.7033 9.78297 13.5659 9.78297 13.1126 9.72802C12.9615 9.16484 12.5769 9 12.2473 9C11.8901 9 11.5604 9.24725 11.5604 9.63187C11.5604 10.0302 11.8077 10.3187 12.1511 10.511C12.1374 11.2115 12.0824 12.3516 11.9313 12.9011C11.8077 13.3681 12.522 13.8626 12.7006 13.2857C12.9478 12.489 13.0302 11.294 13.044 10.7582H14.239C13.7995 11.9396 13.5522 12.9148 13.5522 13.794C13.5522 15.0027 14.3214 15.3599 14.967 15.3599Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M16.1896 14.7555C16.1896 15.2637 16.5742 15.3599 16.8489 15.3599C17.2473 15.3599 17.2335 15.0302 17.2335 14.7692V12.7637C17.3297 11.6786 18.1813 10.4973 18.5797 10.4973C18.8407 10.4973 18.8681 10.8544 18.8681 11.2802V14.0687C18.8681 14.7692 19.294 15.3599 20.022 15.3599C21.2033 15.3599 21.7527 14.1236 21.9863 13.217C22 13.1621 22 13.1346 22 13.1209C22 12.8599 21.739 12.5577 21.5192 12.5577C21.3819 12.5577 21.2445 12.6813 21.1896 12.9698C21.0659 13.5742 20.8187 14.4533 20.2692 14.4533C19.9121 14.4533 19.9121 13.9451 19.9121 13.8214V10.978C19.9121 10.3462 19.6923 9.59066 18.772 9.59066C18.0989 9.59066 17.6044 10.1813 17.2335 10.9505V10.3324C17.2335 10.0027 16.9451 9.72802 16.4918 9.72802C16.2995 9.72802 16.1346 9.82417 16.1346 9.96154C16.1346 10.0577 16.1896 10.1401 16.1896 10.4011V14.7555Z",key:"4",fill:"currentColor",strokeWidth:"0"}]]);var Ud=k(N(),1),aAe=e=>(0,Ud.jsxs)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,Ud.jsxs)("g",{clipPath:"url(#clip0_2967_820)",children:[(0,Ud.jsx)("path",{d:"M236.58 52.3083C235.731 52.3855 233.031 52.6555 230.601 52.8483C174.558 57.9011 122.064 88.1403 88.8162 134.618C70.3024 160.46 58.4613 189.773 53.9871 220.823C52.4057 231.661 52.2129 234.862 52.2129 249.558C52.2129 264.253 52.4057 267.454 53.9871 278.293C64.7097 352.386 117.436 414.639 188.945 437.704C201.751 441.831 215.25 444.647 230.601 446.344C236.58 447 262.422 447 268.4 446.344C294.898 443.413 317.346 436.856 339.486 425.555C342.88 423.819 343.536 423.356 343.073 422.97C342.764 422.739 328.3 403.338 310.943 379.887L279.393 337.267L239.858 278.755C218.104 246.588 200.208 220.283 200.053 220.283C199.899 220.244 199.745 246.241 199.668 277.984C199.552 333.564 199.513 335.801 198.819 337.113C197.816 339.003 197.045 339.774 195.425 340.622C194.191 341.24 193.111 341.355 187.287 341.355H180.614L178.84 340.237C177.683 339.504 176.834 338.54 176.255 337.421L175.445 335.685L175.523 258.352L175.638 180.979L176.834 179.475C177.451 178.665 178.763 177.624 179.688 177.122C181.27 176.351 181.887 176.274 188.559 176.274C196.428 176.274 197.739 176.582 199.783 178.819C200.362 179.437 221.769 211.681 247.379 250.522C272.99 289.362 308.012 342.397 325.215 368.432L356.457 415.758L358.038 414.716C372.039 405.614 386.85 392.654 398.576 379.154C423.531 350.497 439.615 315.552 445.014 278.293C446.596 267.454 446.789 264.253 446.789 249.558C446.789 234.862 446.596 231.661 445.014 220.823C434.292 146.729 381.566 84.4761 310.056 61.411C297.444 57.3225 284.021 54.5069 268.979 52.8098C265.276 52.4241 239.781 51.9998 236.58 52.3083ZM317.346 171.645C319.198 172.571 320.702 174.345 321.242 176.197C321.55 177.199 321.627 198.645 321.55 246.973L321.435 316.323L309.208 297.578L296.942 278.833V228.421C296.942 195.829 297.097 177.508 297.328 176.621C297.945 174.461 299.295 172.764 301.147 171.761C302.728 170.951 303.307 170.874 309.362 170.874C315.071 170.874 316.073 170.951 317.346 171.645Z",fill:"currentColor"}),(0,Ud.jsx)("path",{d:"M354.527 416.607C353.177 417.455 352.753 418.034 353.948 417.378C354.797 416.877 356.185 415.835 355.954 415.797C355.838 415.797 355.183 416.183 354.527 416.607ZM351.865 418.343C351.171 418.883 351.171 418.921 352.02 418.497C352.483 418.265 352.868 417.995 352.868 417.918C352.868 417.61 352.675 417.687 351.865 418.343ZM349.937 419.5C349.243 420.04 349.243 420.078 350.091 419.654C350.554 419.422 350.94 419.153 350.94 419.075C350.94 418.767 350.747 418.844 349.937 419.5ZM348.008 420.657C347.314 421.197 347.314 421.235 348.163 420.811C348.626 420.58 349.011 420.31 349.011 420.232C349.011 419.924 348.818 420.001 348.008 420.657ZM345.077 422.2C343.611 422.971 343.689 423.28 345.154 422.547C345.81 422.2 346.311 421.852 346.311 421.775C346.311 421.505 346.273 421.544 345.077 422.2Z",fill:"currentColor"})]}),(0,Ud.jsx)("defs",{children:(0,Ud.jsx)("clipPath",{id:"clip0_2967_820",children:(0,Ud.jsx)("rect",{width:"395",height:"395",fill:"white",transform:"translate(52 52)"})})})]});var Y5=k(N(),1),oAe=e=>(0,Y5.jsx)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,Y5.jsx)("path",{d:"M273.76 383H420.28C424.955 383 429.431 381.351 433.48 379.025C437.529 376.699 441.703 373.779 444.04 369.749C446.377 365.721 448.002 361.15 448 356.499C447.998 351.847 446.381 347.278 444.04 343.251L345.04 172.325C342.703 168.297 339.848 165.376 335.8 163.05C331.752 160.725 325.954 159.075 321.28 159.075C316.606 159.075 312.128 160.725 308.08 163.05C304.032 165.376 301.176 168.297 298.84 172.325L273.76 216.05L223.6 131.247C221.261 127.219 218.41 122.975 214.36 120.65C210.31 118.324 205.836 118 201.16 118C196.485 118 192.009 118.324 187.96 120.65C183.911 122.975 179.739 127.219 177.4 131.247L54.64 343.251C52.2996 347.278 52.0021 351.847 52 356.499C51.998 361.15 52.3032 365.72 54.64 369.749C56.9769 373.778 61.1509 376.699 65.2 379.025C69.2492 381.351 73.7243 383 78.4 383H170.8C207.412 383 234.061 366.514 252.64 335.3L297.52 257.125L321.28 216.05L393.88 340.6H297.52L273.76 383ZM169.48 340.6H104.8L201.16 173.65L250 257.125L217.648 313.735C205.311 333.988 191.244 340.6 169.48 340.6Z",fill:"currentColor"})});var iAe=k(N(),1);var K5=k(N(),1),sAe=e=>(0,K5.jsx)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,K5.jsx)("path",{d:"M230.653 52.6932C191.799 56.9501 155.267 71.9653 125.779 95.7264C115.794 103.776 99.4634 120.571 92.2654 130.168C71.755 157.567 58.6748 188.836 53.7213 222.504C52.0186 233.882 51.4768 255.63 52.5603 267.008C55.8111 300.521 66.492 331.48 83.9065 357.873C115.949 406.556 164.942 437.747 222.526 446.261C233.903 447.964 255.652 448.506 267.03 447.422C300.543 444.171 331.502 433.49 357.895 416.076C406.578 384.033 437.769 335.04 446.283 277.456C447.986 266.079 448.528 244.33 447.444 232.953C443.497 192.396 429.023 156.484 404.256 125.757C396.207 115.772 379.411 99.4415 369.814 92.2435C342.415 71.7331 311.379 58.8076 277.478 53.6994C268.113 52.3062 239.786 51.687 230.653 52.6932ZM301.007 234.423C327.864 281.404 349.845 319.948 349.845 320.103C349.845 320.257 305.806 320.412 251.937 320.412C198.068 320.412 154.029 320.257 154.029 320.025C154.029 319.406 251.782 148.512 252.014 148.821C252.092 148.899 274.228 187.443 301.007 234.423Z",fill:"currentColor"})});var AAe=k(N(),1);var sl=k(U(),1);var{captureStackTrace:Iqe}=Error;function W5(e,t,n,r,a=t){let o=new e(n,r?{cause:r}:void 0);return Iqe?.(o,a),o}function ce(e,t,n){return W5(Error,ce,e,t,n)}function Nv(e,t,n){return W5(TypeError,Nv,e,t,n)}function dg(e,t,n){return W5(SyntaxError,dg,e,t,n)}function tu(e,t,n=-1,r){let a=0,o=0,i=t.length,s=[];for(;a!==-1;){a=e.indexOf(t,o);let A=a===-1||s.length===n-1?e.substring(o):e.substring(o,a);if(s.push(r?.(A,s,a)??A),s.length===n)return s;o=a+i}return s}var cAe=e=>{if(!/^[0-9]+$/.test(e))return e;let t=Number(e);return t<=Number.MAX_SAFE_INTEGER?t:e},J5=(e,t,n)=>{let r=Number(e);if(r>Number.MAX_SAFE_INTEGER)throw rC(t,`invalid ${n}, must be <= ${Number.MAX_SAFE_INTEGER}`);return r},V5={prefix:/^[ v=]+/,main:/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)/,prerelease:/-([0-9a-zA-Z_.-]+)(?:$|\+)/,build:/\+([0-9a-zA-Z_.-]+)$/,full:/^[ v=]*(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9a-zA-Z_.-]+))?(?:\+([0-9a-zA-Z_.-]+))?$/},rC=(e,t)=>dg(`invalid version: ${t}`,{version:e},Fn);var Fn=class e{raw;major;minor;patch;prerelease;build;toString(){return`${this.major}.${this.minor}.${this.patch}${this.prerelease?"-"+this.prerelease.join("."):""}${this.build?"+"+this.build.join("."):""}`}static parse(t){if(t=t.replace(V5.prefix,"").trim(),t.length>256)throw rC(t,"must be less than 256 characters");let n=V5.full.exec(t);if(!n)throw V5.main.exec(t)?rC(t,"invalid build or patch section"):rC(t,"no Major.minor.patch tuple present");let[r,a,o,i,s,A]=n,c=J5(a,t,"major"),u=J5(o,t,"minor"),l=J5(i,t,"patch");return new e(t,c,u,l,s,A)}constructor(t,n,r,a,o,i){this.raw=t,this.major=n,this.minor=r,this.patch=a,o&&(this.prerelease=tu(o,".",-1,s=>{if(!s)throw rC(t,"invalid prerelease, empty identifiers not allowed");return cAe(s)})),i&&(this.build=tu(i,".",-1,s=>{if(!s)throw rC(t,"invalid build metadata, empty identifiers not allowed")}))}compare(t){if(this.major>t.major)return 1;if(this.major<t.major)return-1;if(this.minor>t.minor)return 1;if(this.minor<t.minor)return-1;if(this.patch>t.patch)return 1;if(this.patch<t.patch)return-1;if(!t.prerelease?.length)return this.prerelease?.length?-1:0;if(!this.prerelease?.length)return 1;let n=Math.max(this.prerelease.length,t.prerelease.length),r=this.prerelease,a=t.prerelease;for(let o=0;o<n;o++){let i=r[o],s=a[o];if(i!==s)return s===void 0?1:i===void 0?-1:typeof i!=typeof s?typeof i=="string"?1:-1:i>s?1:-1}return 0}rcompare(t){return-1*this.compare(t)}greaterThan(t){return this.compare(t)===1}greaterThanEqual(t){return this.compare(t)>-1}lessThan(t){return this.compare(t)===-1}lessThanEqual(t){return this.compare(t)<1}equals(t){return this.compare(t)===0}tupleEquals(t){return this.major===t.major&&this.minor===t.minor&&this.patch===t.patch}satisfies(t){return t.test(this)}inc(t,n){switch(t){case"premajor":this.prerelease=void 0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n);break;case"preminor":this.prerelease=void 0,this.patch=0,this.minor++,this.inc("pre",n);break;case"prepatch":this.prerelease=void 0,this.inc("patch"),this.inc("pre",n);break;case"prerelease":this.prerelease?.length||this.inc("patch",n),this.inc("pre",n);break;case"pre":{if(!n){if(!this.prerelease?.length){this.prerelease=[0];break}let o=this.prerelease[this.prerelease.length-1];typeof o=="number"?this.prerelease[this.prerelease.length-1]=o+1:this.prerelease.push(0);break}if(!this.prerelease?.length){this.prerelease=[n];break}let r=this.prerelease.indexOf(cAe(n));if(r===-1){this.prerelease=[n];break}let a=this.prerelease[r+1];if(typeof a=="number"){this.prerelease[r+1]=a+1;break}if(r===this.prerelease.length-1){this.prerelease.push(0);break}this.prerelease.splice(r+1,0,0);break}case"major":(!this.prerelease?.length||this.minor||this.patch)&&this.major++,this.prerelease=void 0,this.patch=0,this.minor=0;break;case"minor":(!this.prerelease?.length||this.patch)&&this.minor++,this.prerelease=void 0,this.patch=0;break;case"patch":this.prerelease?.length||this.patch++,this.prerelease=void 0;break;default:throw Nv("Invalid increment identifier",{version:this,found:t,validOptions:["major","minor","patch","premajor","preminor","prepatch","prerelease","pre"]},this.inc)}return this.raw=this.toString(),this}};var Qqe=e=>!!e&&(e===">"||e==="<"||e===">="||e==="<="||e===""||e==="~"||e==="^"||e==="~>"),xqe=new Set("=v "),ei=(e,t)=>dg(`invalid comparator: '${e}' ${t}`,{found:e},jv),Yi=(e,t,n)=>{let r=Number(e);if(r!==r)throw ei(t,`${n} must be numeric or 'x', got: '${e}'`);return r},Ph=(e,t)=>{if(!e)throw ei(t,"no value provided for operator")},Z5=(e,t,n)=>{if(e&&!Tv(e))throw ei(t,`cannot omit '${n}' and include subsequent fields`)},nl=0,aC=1,dAe=2,Tv=e=>!e||e==="X"||e==="x"||e==="*",X5=e=>e[dAe]!==void 0,lF=e=>e[aC]!==void 0&&e[dAe]===void 0,dF=e=>e[nl]!==void 0&&e[aC]===void 0,uAe=e=>e[nl]===void 0,jv=class{includePrerelease;raw;tokens;tuples=[];isNone=!1;isAny=!1;toString(){return this.isNone?"<0.0.0-0":this.isAny?"*":this.tuples.map(t=>Pv(t)?"*":t.join("")).join(" ")}constructor(t,n=!1){this.includePrerelease=n,t=t.trim(),this.raw=t;let r=!1,a=tu(t," ",-1,(A,c,u)=>{if(A==="-"){if(r)throw ei(t,"multiple hyphen ranges not allowed");if(c.length!==1||u===-1)throw ei(t,"hyphen must be between two versions");r=!0}else if(r&&c.length!==2)throw ei(t,"hyphen range must be alone")}),o=[],i=!1,s=0;for(let A of a)if(A!==""){if(!i){i=Qqe(A),o.push(A),s++;continue}o[s-1]+=A,i=!1}if(r){let[A,c,u]=o;if(!A||!u)throw ei(t,"hyphen must be between two versions");this.#d(A,u)}else if(!o.length||o.length===1&&Tv(o[0]))this.tuples.push(this.#l());else for(let A of o)if(this.#m(A),this.isNone)break;this.tokens=o,this.isAny=!0;for(let A of this.tuples)if(Array.isArray(A)||!A.isAny){this.isAny=!1;break}}#e(t){let n=this.includePrerelease?"0":void 0,[r,a=0,o=0,i=n,s]=this.#c(t);return r===void 0?this.#l():[">=",new Fn(t,r,a,o,i,s)]}#n(t){let n=this.#c(t);if(X5(n))return[">",new Fn(t,...n)];let r=this.includePrerelease?"0":void 0;return lF(n)?[">=",new Fn(t,n[nl],n[aC]+1,0,r,void 0)]:dF(n)?[">=",new Fn(t,n[nl]+1,0,0,r,void 0)]:(this.isNone=!0,this.tuples.length=0,lAe)}#a(t){let n=this.#c(t);return X5(n)?["<=",new Fn(t,...n)]:lF(n)?["<",new Fn(t,n[nl],n[aC]+1,0,"0",void 0)]:dF(n)?["<",new Fn(t,n[nl]+1,0,0,"0",void 0)]:this.#l()}#t(t){let n=this.includePrerelease?"0":void 0,[r=0,a=0,o=0,i=n,s]=this.#c(t);return r===0&&a===0&&o===0&&i==="0"?(this.isNone=!0,this.tuples.length=0,lAe):["<",new Fn(t,r,a,o,i,s)]}#r(t,n,r){if(Z5(n,t,"major"),Z5(r,t,"major"),n===""||r==="")throw ei(t,"(Did you mean '*'?)");return[]}#i(t,n,r,a){if(Z5(a,t,"major"),r===""||a==="")throw ei(t,`(Did you mean '${n}'?)`);return[Yi(n,t,"major")]}#A(t,n,r,a){if(a==="")throw ei(t,`(Did you mean '${n}.${r}'?)`);return[Yi(n,t,"major"),Yi(r,t,"minor")]}#o(t,n,r,a){return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(a,t,"patch")]}#s(t,n,r,a,o){let i=a.substring(0,o),s=a.substring(o+1);if(!i)throw ei(t,"cannot specify build without patch");if(!s)throw ei(t,"encountered '+', but no build value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(i,t,"patch"),void 0,s]}#u(t,n,r,a,o){{let i=a.substring(0,o),s=a.substring(o+1);if(!i)throw ei(t,"cannot specify prerelease without patch");if(!s)throw ei(t,"encountered '-', but no prerelease value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(i,t,"patch"),s,void 0]}}#p(t,n,r,a,o,i){let s=a.substring(0,o),A=a.substring(o+1,i),c=a.substring(i+1);if(!s)throw ei(t,"cannot specify prerelease without patch");if(!A)throw ei(t,"encountered '-', but no prerelease value");if(!c)throw ei(t,"encountered '+', but no build value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(s,t,"patch"),A,c]}#c(t){let[n,r,a]=tu(t,".",3),o=0;for(;n&&xqe.has(n.charAt(o));)o++;if(n!==void 0&&o!==0&&(n=n.substring(o)),!n||Tv(n))return this.#r(t,r,a);if(!r||Tv(r))return this.#i(t,n,r,a);if(!a||Tv(a))return this.#A(t,n,r,a);let i=a.indexOf("-"),s=a.indexOf("+");return s===-1&&i===-1?this.#o(t,n,r,a):s===-1?this.#u(t,n,r,a,i):i===-1?this.#s(t,n,r,a,s):this.#p(t,n,r,a,i,s)}#d(t,n){let r=this.#e(t),a=this.#a(n),o=Pv(r),i=Pv(a);o&&i?this.tuples.push(this.#l()):o?this.tuples.push(a):i?this.tuples.push(r):this.tuples.push(r,a)}#m(t){let n=t.charAt(0),r=t.substring(0,2),a=t.substring(1),o=t.substring(2);switch(r){case"~>":return Ph(o,t),this.#g(o);case">=":return Ph(o,t),this.tuples.push(this.#e(o));case"<=":return Ph(o,t),this.tuples.push(this.#a(o))}switch(n){case"~":return Ph(a,t),this.#g(a);case"^":return Ph(a,t),this.#f(a);case">":return Ph(a,t),this.tuples.push(this.#n(a));case"<":return Ph(a,t),this.tuples.push(this.#t(a))}return this.#h(t)}#g(t){let n=this.#c(t);if(uAe(n)){this.tuples.push(this.#l());return}let r=this.includePrerelease?"0":void 0;if(dF(n)){let[c]=n;this.tuples.push([">=",new Fn(t,c,0,0,r,void 0)],["<",new Fn(t,c+1,0,0,"0",void 0)]);return}if(lF(n)){let[c,u]=n,l=this.includePrerelease?"0":void 0;this.tuples.push([">=",new Fn(t,c,u,0,l,void 0)],["<",new Fn(t,c,u+1,0,"0",void 0)]);return}let[a,o,i,s=r,A]=n;this.tuples.push([">=",new Fn(t,a,o,i,s,A)],["<",new Fn(t,a,o+1,0,"0",A)])}#f(t){let n=this.#e(t);if(Pv(n)){this.tuples.push(n);return}let r=n[1];r.major!==0?this.tuples.push(n,["<",new Fn(t,r.major+1,0,0,"0",void 0)]):r.minor!==0?this.tuples.push(n,["<",new Fn(t,r.major,r.minor+1,0,"0",void 0)]):r.prerelease?.length?this.tuples.push(n,["<",new Fn(t,r.major,r.minor,r.patch+1,"0",void 0)]):this.tuples.push(["",r])}#h(t){let n=this.#c(t),r=this.includePrerelease?"0":void 0;X5(n)?this.tuples.push(["",new Fn(t,...n)]):uAe(n)?this.tuples.push(this.#l()):dF(n)?(this.tuples.push([">=",new Fn(t,n[nl],0,0,r,void 0)]),this.tuples.push(["<",new Fn(t,n[nl]+1,0,0,"0",void 0)])):lF(n)&&this.tuples.push([">=",new Fn(t,n[nl],n[aC],0,r,void 0)],["<",new Fn(t,n[nl],n[aC]+1,0,"0",void 0)])}test(t){if(this.isNone)return!1;let n=this.includePrerelease,r=!!t.prerelease?.length,a=n||!r;for(let o of this.tuples){if(Pv(o))continue;let[i,s]=o;switch(a||=!!s.prerelease?.length&&t.tupleEquals(s),i){case"":if(!t.equals(s))return!1;continue;case">":if(!t.greaterThan(s))return!1;continue;case">=":if(!t.greaterThanEqual(s))return!1;continue;case"<":if(!t.lessThan(s))return!1;continue;case"<=":if(!t.lessThanEqual(s))return!1;continue}}return a}#l(){return this.includePrerelease?mAe:pAe}},Pv=e=>e===pAe||e===mAe,pAe={isAny:!0,toString:()=>"*",includePrerelease:!1,test:e=>!e.prerelease?.length},mAe={isAny:!0,toString:()=>"*",includePrerelease:!0,test:e=>!0},lAe={isNone:!0,toString:()=>"<0.0.0-0",includePrerelease:!1,test:e=>!1};var _qe=e=>{let t=r=>{try{let{hostname:a}=new URL(r),o=a.startsWith("www.")?a.slice(4):a;return o==="github.com"?"github":o==="patreon.com"?"patreon":o==="opencollective.com"?"opencollective":"individual"}catch{return"invalid"}},n=(r,a)=>{let o=t(r);if(!a||["github","patreon","opencollective"].includes(o))return o;if(o!=="invalid")return a};if(typeof e=="string")return{url:e,type:t(e)};if(rl(e)&&"url"in e&&typeof e.url=="string"){if(Fqe(e))return e;let r=e,a=r.url,o=n(a,r.type),i={...r,url:a};return o?i.type=o:delete i.type,i}return{url:"",type:"individual"}},Dqe=e=>{if(!e)return;let n=(Array.isArray(e)?e:[e]).map(_qe);return n.length>0?n:void 0},Fqe=e=>rl(e)&&"url"in e&&typeof e.url=="string"&&!!e.url&&"type"in e&&typeof e.type=="string"&&["github","patreon","opencollective","individual"].includes(e.type);var Sqe=e=>{if(!Object.hasOwn(e,"version"))return e;if(!e.version)throw ce("version is empty",{manifest:e});let t=Fn.parse(e.version);return e.version=t.toString(),e},eT=Symbol.for("writeAccess"),tT=Symbol.for("isPublisher"),nT=(e,t,n)=>{if(e){if(rl(e)){if(fAe(e))return e;let r=typeof e.name=="string"?e.name:void 0,a=typeof e.email=="string"?e.email:typeof e.mail=="string"?e.mail:void 0;return!r&&!a?void 0:{name:r,email:a,[eT]:t??!1,[tT]:n??!1}}else if(typeof e=="string"){let r=/^([^(<]+)/,a=/<([^<>]+)>/,o=r.exec(e)?.[0].trim()||"",i=a.exec(e)?.[1]||"";return!o&&!i?void 0:{name:o||void 0,email:i||void 0,[eT]:t??!1,[tT]:n??!1}}}},fAe=e=>rl(e)&&typeof e.name=="string"&&!!e.name&&typeof e.email=="string"&&!!e.email&&(pF(e[eT])||pF(e.writeAccess))&&(pF(e[tT])||pF(e.isPublisher));var Rqe=(e,t)=>{if(!e&&!t)return;let n=[];if(e){let r=Array.isArray(e)?e:[e],a=r.every(fAe),o=!t||Array.isArray(t)&&t.length===0;if(a){if(o)return r.length>0?r:void 0;n.push(...r)}let i=r.map(s=>nT(s)).filter(s=>s!==void 0);n.push(...i)}if(t){let a=(Array.isArray(t)?t:[t]).map(o=>nT(o,!0,!0)).filter(o=>o!==void 0);n.push(...a)}return n.length>0?n:void 0},gAe=e=>{let t=[];if(typeof e=="string")try{new URL(e),t.push({type:"link",url:e})}catch{/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?t.push({type:"email",email:e}):t.push({type:"link",url:e})}else if(rl(e)){Mqe(e)&&t.push(e);let n=e;n.url&&t.push({type:"link",url:n.url}),n.email&&t.push({type:"email",email:n.email})}return t.length>0?t:[]},Lqe=e=>{if(!e)return;let t=[];if(Array.isArray(e))for(let n of e)t.push(...gAe(n));else t.push(...gAe(e));return t.length>0?t:void 0},Mqe=e=>rl(e)&&"type"in e&&(e.type==="email"&&typeof e.email=="string"&&!!e.email||e.type==="link"&&typeof e.url=="string"&&!!e.url);var Nqe=e=>{if(!e)return;let t=[];if(typeof e=="string")t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);else if(Array.isArray(e)){if(Pqe(e))return e;t=e.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0)}else return;return t.length>0?t:void 0},Pqe=e=>Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="string"&&!!t&&!t.startsWith(" ")&&!t.endsWith(" ")),pF=e=>typeof e=="boolean";var nu=(e,t="Unknown error")=>e instanceof Error?e:new Error(String(e)||t);var rl=e=>!!e&&typeof e=="object"&&(e.constructor===Object||e.constructor===void 0),Ov=e=>e===void 0||Tqe(e),Tqe=e=>hAe(e,t=>typeof t=="string");var hAe=(e,t)=>rl(e)&&Object.entries(e).every(([n,r])=>typeof n=="string"&&t(r));var jqe=e=>e===void 0||hAe(e,t=>$qe(t)),Oqe=e=>e===void 0||typeof e=="boolean",$qe=e=>rl(e)&&Oqe(e.optional),rT=e=>e===void 0||typeof e=="string",Gqe=e=>e===void 0||rl(e)&&rT(e.tarball),Hqe=e=>rl(e)&&!Array.isArray(e)&&rT(e.name)&&rT(e.version)&&Ov(e.dependencies)&&Ov(e.devDependencies)&&Ov(e.optionalDependencies)&&Ov(e.peerDependencies)&&Ov(e.acceptDependencies)&&jqe(e.peerDependenciesMeta)&&Gqe(e.dist);var aT=(e,t)=>{if(!Hqe(e))throw ce("invalid manifest",{found:e},t??aT);return e},oT=e=>{e=Sqe(e);let t=nT(e.author),n=Dqe(e.funding),r=Rqe(e.contributors,e.maintainers),a=Lqe(e.bugs),o=Nqe(e.keywords),i=e;return t?i.author=t:delete i.author,n?i.funding=n:delete i.funding,r?i.contributors=r:delete i.contributors,a?i.bugs=a:delete i.bugs,o?i.keywords=o:delete i.keywords,"maintainers"in i&&i.maintainers&&delete i.maintainers,i};var Th=new Set(["dependencies","devDependencies","peerDependencies","optionalDependencies"]),bAe=new Set(["prod","dev","peer","optional","peerOptional"]),yAe=new Map([["dependencies","prod"],["devDependencies","dev"],["peerDependencies","peer"],["optionalDependencies","optional"]]);var mF=class{raw;isAny;isSingle;set=[];includePrerelease;#e;constructor(t,n=!1){this.raw=t,this.includePrerelease=n,this.isAny=!1;let r=!0;this.isSingle=!1;let a=[];if(tu(t,"||",-1,o=>{if(this.isAny)return;let i=this.#n(o,this.includePrerelease);if(i instanceof Error){a.push(i);return}if(i.isAny){this.set=[i],this.isAny=!0;return}this.set.push(i),r?Array.isArray(i.tuples)&&i.tuples.length===1&&Array.isArray(i.tuples[0])&&i.tuples[0][0]===""&&(this.isSingle=!0):this.isSingle=!1,r=!1}),!this.set.length&&a.length)throw a.length===1&&a[0]?a[0]:new AggregateError(a)}#n(t,n){try{return new jv(t,n)}catch(r){return nu(r)}}test(t){return this.set.some(n=>n.test(t))}toString(){return this.#e?this.#e:this.isSingle?(this.#e=String(this.set[0]),this.#e):(this.#e=this.set.map(t=>String(t)).join(" || "),this.#e)}};var ru=e=>{if(e instanceof Fn)return e;try{return Fn.parse(e)}catch{return}},qd=(e,t=!1)=>{if(typeof e=="object"){if(e.includePrerelease===t)return e;e=e.raw}try{return new mF(e,t)}catch{return}};var Oh=(e,t,n=!1)=>{if(typeof e=="string"){let r=ru(e);if(!r)return!1;e=r}if(typeof t=="string"){let r=qd(t,n);if(!r)return!1;t=r}return e.satisfies(t)};var ol=(e,t)=>{let n=ru(e);if(!n)throw dg("invalid version",{found:e});let r=ru(t);if(!r)throw dg("invalid version",{found:t});return n.compare(r)};var al=(e,t)=>ol(e,t)>0,iT=(e,t)=>ol(e,t)>=0,jh=(e,t)=>ol(e,t)<0,sT=(e,t)=>ol(e,t)<=0,BAe=(e,t)=>ol(e,t)!==0,oC=(e,t)=>ol(e,t)===0,CAe=e=>ru(e)?.major,wAe=e=>ru(e)?.minor,EAe=e=>ru(e)?.patch,gF=e=>{let t=ru(e);if(t)return t.prerelease??[]};var kAe=(e,t,n)=>{let r=typeof e=="string"?qd(e,n):e,a=typeof t=="string"?qd(t,n):t;return!r||!a?!1:r.isAny||a.isAny?!0:r.set.some(o=>a.set.some(i=>Uqe(o,i)))},Uqe=(e,t)=>{let n=e.tuples.filter(a=>Array.isArray(a)),r=t.tuples.filter(a=>Array.isArray(a));return qqe(n.concat(r))},qqe=e=>{let t=null,n=!1,r=null,a=!1,o=null;for(let[i,s]of e)switch(i){case"":if(o&&!oC(o,s))return!1;o=s;break;case">=":(!t||al(s,t)||oC(s,t)&&!n)&&(t=s,n=!0);break;case">":(!t||al(s,t))&&(t=s,n=!1);break;case"<=":(!r||jh(s,r))&&(r=s,a=!0);break;case"<":(!r||jh(s,r)||oC(s,r))&&(r=s,a=!1);break}return o?!(t&&(n?jh(o,t):sT(o,t))||r&&(a?al(o,r):iT(o,r))):!(t&&r&&(al(t,r)||oC(t,r)&&!(n&&a)))};var zqe=Symbol.for("nodejs.util.inspect.custom"),iC="https://registry.npmjs.org/",fF={npm:iC,gh:"https://npm.pkg.github.com/"},Yqe={jsr:"https://npm.jsr.io/"},hF={github:"git+ssh://git@github.com:$1/$2.git",bitbucket:"git+ssh://git@bitbucket.org:$1/$2.git",gitlab:"git+ssh://git@gitlab.com:$1/$2.git",gist:"git+ssh://git@gist.github.com/$1.git"},bF={github:"https://codeload.github.com/$1/$2/tar.gz/$committish",bitbucket:"https://bitbucket.org/$1/$2/get/$committish.tar.gz",gist:"https://codeload.github.com/gist/$1/tar.gz/$committish",gitlab:"https://gitlab.com/$1/$2/repository/archive.tar.gz?ref=$committish"},Kqe={github:"https://github.com/",bitbucket:"https://bitbucket.org/",gist:"https://gist.github.com/",gitlab:"https://gitlab.com/"},_Ae={"@jsr":"https://npm.jsr.io/"},vAe=e=>({catalog:{},catalogs:{},...e,"jsr-registries":{...e?.["jsr-registries"]??{},...Yqe},registry:e?.registry??iC,"scope-registries":e?.["scope-registries"]??{},"git-hosts":e?.["git-hosts"]?{...hF,...e["git-hosts"]}:hF,registries:e?.registries??{},"git-host-archives":e?.["git-host-archives"]?{...bF,...e["git-host-archives"]}:bF}),IAe=(e,t)=>e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||e.startsWith("file:")||e.startsWith("http:")||e.startsWith("https:")||e.startsWith("workspace:")||e.startsWith("catalog:")||e.startsWith("git@")||e.startsWith("git://")||e.startsWith("git+ssh://")||e.startsWith("git+http://")||e.startsWith("git+https://")||e.startsWith("git+file://")||e.startsWith("git@github.com")||e.startsWith("registry:")||e.startsWith("npm:")||e.startsWith("gh:")||[...Object.keys(t["git-hosts"]),...Object.keys(t.registries),...Object.keys(t["jsr-registries"])].some(n=>e.startsWith(`${n}:`)),QAe=(e,t)=>e.indexOf("@",t?1:0),Wqe=e=>e.indexOf("#")>2,Jqe=e=>e.includes("/");var Ga=class e{static parse(t,n,r){return typeof t=="object"?t:new this(t,n,r)}static parseArgs(t,n){let r=vAe(n??{});if(IAe(t,r)){let a=this.parse("(unknown)",t,r);if(a.subspec){let{namedJsrRegistry:o}=a;o||(a.name=a.subspec.name),a.spec=`${a.name}@${a.bareSpec}`}return a}else{let a=t.startsWith("@"),o=QAe(t,a);return o>-1?this.parse(t.substring(0,o),t.substring(o+1),r):Wqe(t)||!a&&Jqe(t)?this.parse("(unknown)",t,r):this.parse(`${t}@`,r)}}static nodejsDependencies;type;spec;options;name;scope;scopeRegistry;bareSpec;gitRemote;gitSelector;gitSelectorParsed;gitCommittish;namedGitHost;namedGitHostPath;workspaceSpec;workspace;namedRegistry;namedJsrRegistry;registry;registrySpec;conventionalRegistryTarball;semver;range;distTag;remoteURL;file;catalog;subspec;overridden=!1;#e;#n;get final(){if(this.#e)return this.#e;let t=this.subspec?this.subspec.final:this;if(t.type==="catalog")throw ce('invalid Spec.final value, type is "catalog"');return this.#e=t}toString(){if(this.#n!==void 0)return this.#n;let t=this;for(;t.subspec?.subspec;)t=t.subspec;return t.subspec&&t.subspec.type!=="registry"&&(t=t.subspec),this.#n=this.name+"@"+t.bareSpec}constructor(t,n,r={}){if(n&&typeof n=="object"&&(r=n,n=void 0),this.options=vAe(r),typeof n=="string")this.name=t,this.#a(t),this.bareSpec=n,this.spec=`${this.name}@${n}`;else if(this.spec=t,!t.startsWith("git@")&&IAe(t,this.options)&&t.includes(":")&&[...Object.keys(this.options.registries),...Object.keys(fF)].some(l=>t.startsWith(`${l}:`)))this.name=t,this.bareSpec=t;else{let l=t.startsWith("@"),d=QAe(t,l);d===-1&&(d=t.length,t+="@"),this.name=t.substring(0,d),l&&this.#a(this.name),this.bareSpec=t.substring(d+1)}if(this.bareSpec.startsWith("catalog:")){this.catalog=this.bareSpec.substring(8);let l=this.catalog?this.options.catalogs[this.catalog]:this.options.catalog;if(!l)throw this.#o("Named catalog not found",{name:this.catalog,validOptions:Object.keys(this.options.catalogs)});let d=l[this.name];if(!d)throw this.#o("Name not found in catalog",{name:this.name,validOptions:Object.keys(l)});this.subspec=e.parse(this.name,d),this.type="catalog";return}if(this.bareSpec.startsWith("https://")){for(let[l,d]of Object.entries(Kqe))if(this.bareSpec.startsWith(d)){let p=new URL(this.bareSpec),[g,m]=p.pathname.replace(/\.git$/,"").replace(/\/+/g," ").trim().split(" ");if(g&&m){this.bareSpec=`${l}:${g}/${m}${p.hash}`,this.spec=`${this.name}@${this.bareSpec}`;break}}}if(this.bareSpec.startsWith("workspace:")){this.type="workspace";let l=this.bareSpec.substring(10).trim(),d=l.lastIndexOf("@");if(d===-1)this.workspace=this.name;else{let m=l.substring(0,d);if(!m||m==="*"||m==="~"||m==="^"||(m.startsWith("@")?m.split("/").length!==2||m.substring(1).includes("@"):m.includes("@")))throw this.#o("workspace: name must be a path or valid package name",{found:m});this.workspace=m}let p=d===-1?l:l.substring(d+1)||"*",g=p==="*"?void 0:qd(p);if(p!=="*"&&p!=="~"&&p!=="^"&&!g)throw this.#o("workspace: spec must be one of *, ~, or ^, or a valid semver range",{found:p,wanted:"'*'|'~'|'^'|SemverRange"});this.workspaceSpec=p,g&&(this.semver=p,this.range=g);return}if(this.bareSpec.startsWith("git://")||this.bareSpec.startsWith("git+ssh://")||this.bareSpec.startsWith("git+http://")||this.bareSpec.startsWith("git+https://")||this.bareSpec.startsWith("git+file://")||this.bareSpec.startsWith("git@github.com")){this.bareSpec.startsWith("git@")&&(this.bareSpec=`git+ssh://${this.bareSpec}`,this.spec=`${this.name}@${this.bareSpec}`),this.type="git";for(let[l,d]of Object.entries(this.options["git-hosts"])){let p=d.indexOf("$");if(p>0&&this.bareSpec.startsWith(d.substring(0,p))){let g=this.bareSpec.substring(p).replace(/\.git(#.*)?$/,"$1");this.bareSpec=`${l}:${g}`,this.spec=`${this.name}@${this.bareSpec}`,this.#t(l,d),this.type="git";return}}this.#s(this.bareSpec);return}let a=Object.entries(this.options.registries);if(this.options.registries.npm||a.push(["npm",this.options.registry]),this.options.registries.gh||a.push(["gh",fF.gh]),this.bareSpec.startsWith("registry:")){let l=this.bareSpec.substring(9),d=l.indexOf("#");if(d===-1)throw this.#o("registry: must include name/version");this.type="registry";let p=l.substring(0,d);p.endsWith("/")||(p+="/");let g=l.substring(d+1);for(let[m,h]of a)h.endsWith("/")||(h+="/",this.options.registries[m]=h),h===p&&(this.namedRegistry=m);this.#i(g,p),this.#r();return}for(let[l,d]of a){let p=`${l}:`;if(this.bareSpec.startsWith(p)){this.type="registry",this.namedRegistry=l,this.#i(this.bareSpec.substring(p.length),d).namedRegistry??=l,this.subspec&&this.name===this.bareSpec&&(this.name=this.subspec.name,this.spec=`${this.name}@${this.bareSpec}`),this.#r();return}}let o=Object.entries(this.options["git-hosts"]);for(let[l,d]of o)if(this.#t(l,d)){this.type="git";return}let i=Object.entries(this.options["jsr-registries"]);for(let[l,d]of i){let p=`${l}:`;if(this.bareSpec.startsWith(p)){this.type="registry",this.namedJsrRegistry=l,this.#A(this.bareSpec.substring(p.length),d).namedJsrRegistry??=l;return}}if(this.bareSpec.startsWith("https://")||this.bareSpec.startsWith("http://")){this.remoteURL=this.bareSpec,this.type="remote";return}if(this.bareSpec.startsWith("file:")){this.type="file";let[l,d]=xAe(this.constructor.nodejsDependencies)(this.bareSpec,this);this.file=l,this.bareSpec=d.replace(/\/+$/,""),this.spec=`${this.name}@${this.bareSpec}`;return}if(!this.bareSpec.startsWith("./")&&!this.bareSpec.startsWith("../")&&this.options["git-hosts"].github){let l=this.bareSpec.indexOf("#");if((l===-1?this.bareSpec:this.bareSpec.substring(0,l)).split("/").length===2){this.bareSpec=`github:${this.bareSpec}`,this.spec=`${this.name}@${this.bareSpec}`,this.#t("github",this.options["git-hosts"].github),this.type="git";return}}if(this.bareSpec.includes("/")||this.bareSpec==="."||this.bareSpec===".."){this.type="file";let[l,d]=xAe(this.constructor.nodejsDependencies)(`file:${this.bareSpec}`,this);this.bareSpec=d,this.spec=`${this.name}@${this.bareSpec}`,this.file=l;return}this.type="registry";let s=qd(this.bareSpec);s?(this.semver=this.bareSpec.trim(),this.range=s):this.distTag=this.bareSpec,this.registrySpec=this.bareSpec;let{"scope-registries":A,registry:c}=this.options,u=this.scope&&A[this.scope];this.registry=u??c;for(let l of Object.values(this.options["jsr-registries"]))if(this.registry===l)return;this.#r()}#a(t){if(!t.startsWith("@"))return;let n=t.indexOf("/");if(n>1&&n<t.length-1){let r=t.substring(0,n);this.registry=this.scopeRegistry=this.options["scope-registries"][r],this.scope=r}}#t(t,n){if(this.bareSpec.startsWith(`${t}:`)){let r=this.bareSpec.indexOf("#"),a=r===-1?this.bareSpec:this.bareSpec.substring(0,r),o=r===-1?"":this.bareSpec.substring(r),i=a.substring(t.length+1);if(!i)throw this.#o("invalid named git host specifier");let s=i.split("/"),A=n;for(let c=0;c<s.length;c++)A=A.split(`$${c+1}`).join(s[c]);if(A+=o,this.namedGitHost=t,this.namedGitHostPath=i,this.#s(A),this.gitCommittish&&!this.gitSelectorParsed?.path){let c=this.options["git-host-archives"][t];if(c){this.type="remote";let u=c;u=u.split("$committish").join(this.gitCommittish);for(let l=0;l<s.length;l++)u=u.split(`$${l+1}`).join(s[l]);this.remoteURL=u}}return!0}return!1}[zqe](){return`@vltpkg/spec.Spec ${String(this)}`}#r(){let{name:t,registry:n,range:r}=this.final;if(!n||!r?.isSingle)return;let a=/^@[^/]+\//;this.conventionalRegistryTarball=String(new URL(`/${t}/-/${t.replace(a,"")}-${r}.tgz`,n))}#i(t,n){return this.registry=n,this.subspec=this.constructor.parse(t,{...this.options,registry:n}),this.subspec}#A(t,n){this.registry=n,t.startsWith("@")||(t=`${this.name}@${t}`);let r=`@jsr/${t.replace(/^@/,"").replace(/\//,"__")}`;this.subspec=this.constructor.parse(r,{...this.options,"scope-registries":{...this.options["scope-registries"],"@jsr":n}}),this.name==="(unknown)"&&(t.indexOf("@",1)===-1?this.name=t:this.name=t.substring(0,t.indexOf("@",1)));let a=`${this.namedJsrRegistry}:`,o=`${a}${this.name}`;return this.bareSpec.startsWith(o+"@")?this.bareSpec=a+this.bareSpec.substring(o.length+1):this.bareSpec===o&&(this.bareSpec=a),this.spec=this.name+"@"+this.bareSpec,this.subspec}#o(t,n={}){return ce(t,{spec:this.spec,...n},this.#o)}#s(t){let n=t.indexOf("#");if(n===-1){this.gitRemote=t;return}this.gitRemote=t.substring(0,n),this.gitSelector=t.substring(n+1);let[r,a,o]=this.constructor.parseGitSelector(this.gitSelector,this);this.range=o,this.gitCommittish=a,this.gitSelectorParsed=r}set inheritedRegistry(t){t!=null&&this.type==="registry"&&this.registry===this.options.registry&&(this.registry=t)}static parseGitSelector(t,n){if(!t)return[{}];let r=t.split("::"),a=r[0],o,i,s={};if(typeof a!="string")throw Nv("impossible",{found:a,wanted:String});a.includes(":")||(o=a,r.shift());for(let A of r){let c=A.indexOf(":");if(c===-1)continue;let u=A.substring(0,c),l=A.substring(c+1);if(u==="semver"){if(o)throw ce("Cannot specify a semver range and committish value",{spec:n});if(i=qd(l),!i)throw ce(`Invalid git tag semver range: ${l}`,{spec:n})}if(u==="semver"||u==="path")if(u==="path"){if(this.nodejsDependencies?.isAbsolute(l)||/(^|\/|\\)\.\.($|\\|\/)/.test(l))throw ce("Invalid path in git selector",{spec:n});s.path=(this.nodejsDependencies?this.nodejsDependencies.join("/",l).substring(1):l).replace(/\\/g,"/")}else s[u]=l}return[s,o,i]}},xAe=e=>(t,n)=>{let r=t.substring(5,7),a=`file:${r==="//"?r:""}`,o=t.substring(a.length),[i="",s="/",A="/",c="/"]=o.split("",4);if(!i)return[".","file:."];if(i==="/"&&s==="~"&&A!=="/"||i==="~"&&s!=="/")throw ce("invalid file: specifier. '~username' not supported",{spec:n});if(i==="~")return e?[e.resolve(e.homedir(),o.substring(2)),`file:${o}`]:[o,`file:${o}`];if(i==="/"&&s==="~")return e?[e.resolve(e.homedir(),o.substring(3)),`file:${o.substring(1)}`]:[o.substring(1),`file:${o.substring(1)}`];if(i==="/"&&s==="."&&(A==="/"||A==="."&&c==="/"))return[o.substring(1),`file:${o.substring(1)}`];if(i==="."&&(s==="/"||s==="."&&A==="/"))return[o,`file:${o}`];if(r==="//")try{let u=new URL(t);if(u.host&&u.host!=="localhost")throw ce("invalid file:// specifier. host must be empty or 'localhost'",{spec:n,found:u.host,validOptions:["","localhost"]});return[u.pathname.replace(/^\/([a-zA-Z]:\/)/,"$1"),`file://${u.pathname}`]}catch(u){throw ce("invalid file:// specifier",{spec:n,cause:u})}return e?.winPath.isAbsolute(o)?[o,`file://${o}`]:[`./${o}`,`file:./${o}`]};var oo="\xB7",Vqe=new RegExp(`^((git)?${oo}[^${oo}]*${oo}[^${oo}]*(${oo}[^${oo}]*)?$|^(file|remote|workspace)${oo}[^${oo}]*)(${oo}[^${oo}]*)?$`),Zqe=e=>typeof e=="string"&&Vqe.test(e),$v=e=>{if(!Zqe(e))throw ce("Expected dep id",{found:e});return e},yF=e=>{let[t,n,r,a]=e,o=sC(n);switch(t){case"registry":return`${oo}${o}${oo}${sC(r)}${a?`${oo}${sC(a)}`:""}`;case"git":return`${t}${oo}${o}${oo}${sC(r)}${a?`${oo}${sC(a)}`:""}`;default:return`${t}${oo}${o}${r?`${oo}${sC(r)}`:""}`}},sC=e=>e&&encodeURIComponent(e).replaceAll("%40","@").replaceAll("%2f","\xA7").replaceAll("%2F","\xA7"),DAe=e=>e&&decodeURIComponent(e.replaceAll("@","%40").replaceAll("\xA7","%2F")),Qo=e=>{let[t,n="",r,a]=e.replaceAll("\xA7","/").split(oo,4),o=decodeURIComponent(n);switch(t){case"git":case"":{if(r===void 0)throw ce(`invalid ${t} id`,{found:e});return[t||"registry",o,decodeURIComponent(r),DAe(a)]}case"file":case"remote":case"workspace":return[t,o,DAe(r)];default:throw ce("invalid DepID type",{found:t,validOptions:["git","file","workspace","remote",""]})}},Gv=e=>{let[t,n,r]=Qo(e);switch(t){case"git":case"registry":return yF([t,n,r]);default:return yF([t,n])}},AC=(e,t,n={})=>Xqe(Qo(e),t,n),Xqe=(e,t,n={})=>{let[r,a,o]=e;switch(r){case"remote":{if(!a)throw ce("no remoteURL found on remote id",{found:e});return Ga.parse(t??"(unknown)",a,n)}case"file":{if(!a)throw ce("no file path found on remote id",{found:e});return Ga.parse(t??"(unknown)",`file:${a}`,n)}case"registry":{if(typeof a!="string")throw ce("no registry url or name in registry ID",{found:e});if(!o)throw ce("no name/specifier in registry ID",{found:e});if(!a){let s=Ga.parseArgs(o,n);return t&&s.name!==t?Ga.parse(t,`npm:${o}`,n):s}if(!/^https?:\/\//.test(a)){let s=n.registries?.[a];if(a!=="npm"&&!s)throw ce("named registry not found in options",{name:a,found:e});return Ga.parse(t??"(unknown)",`${a}:${o}`,n)}let i=Ga.parse(t??"(unknown)",`registry:${a}#${o}`,n);return t&&i.final.name!==t?Ga.parse(i.final.name,i.bareSpec,n):i}case"git":{if(!a)throw ce("no git remote in git ID",{found:e});return Ga.parse(t??"(unknown)",a+"#"+o,n)}case"workspace":{if(!a)throw ce("no name/path on workspace id",{found:e});return t&&t!==a?Ga.parse(t,`workspace:${a}@*`,n):Ga.parse(a,"workspace:*",n)}}};var Oce=k(SF(),1);var AA=e=>"type"in e&&"nodes"in e,we=e=>{if(!e)throw ce("Expected a query node");if(!AA(e))throw ce("Not a query selector node with children",{found:e});return e},Hh=e=>!!e&&typeof e=="object",lI=e=>Hh(e)&&!!e.attribute&&e.type==="attribute",dC=e=>{if(!e)throw ce("Expected a query node");if(!lI(e))throw ce("Mismatching query node",{wanted:"attribute",found:e.type});return e},pC=e=>Hh(e)&&!!e.value&&e.type==="combinator",Pce=e=>{if(!e)throw ce("Expected a query node");if(!pC(e))throw ce("Mismatching query node",{wanted:"combinator",found:e.type});return e},pg=e=>Hh(e)&&!!e.value&&e.type==="id",Tce=e=>{if(!e)throw ce("Expected a query node");if(!pg(e))throw ce("Mismatching query node",{wanted:"id",found:e.type});return e},Kd=e=>AA(e)&&e.type==="selector",jce=e=>{if(!e)throw ce("Expected a query node");if(!Kd(e))throw ce("Mismatching query node",{wanted:"selector",found:e.type});return e},ou=e=>Hh(e)&&!!e.value&&e.type==="pseudo",RF=e=>{if(!e)throw ce("Expected a query node");if(!ou(e))throw ce("Mismatching query node",{wanted:"pseudo",found:e.type});return e},Yn=e=>Hh(e)&&!!e.value&&e.type==="tag",wn=e=>{if(!e)throw ce("Expected a query node");if(!Yn(e))throw ce("Mismatching query node",{wanted:"tag",found:e.type});return e},Kn=e=>Hh(e)&&!!e.value&&e.type==="string",En=e=>{if(!e)throw ce("Expected a query node");if(!Kn(e))throw ce("Mismatching query node",{wanted:"string",found:e.type});return e},nj=e=>Hh(e)&&!!e.value&&e.type==="comment";var KWe=e=>e.replace(/(#@(\w|-|\.)+)\//gm,(t,n)=>`${n}\\/`),WWe=e=>e.replaceAll(".","\\."),JWe=e=>e.replaceAll("\\.","."),VWe=new Set([":published",":score",":malware",":severity",":sev",":squat",":semver",":v"]),ZWe=e=>VWe.has(e.value),Uh=e=>{let t=WWe(KWe(e));return(0,Oce.default)(r=>{r.walk(a=>{if(a.value&&typeof a.value=="string"&&(a.value=JWe(a.value)),ou(a)&&ZWe(a))for(let o of a.nodes){let i=jce(o);i.nodes.forEach((s,A,c)=>{let u=c[A+1];pC(s)&&Yn(u)&&(u.value=`${s.spaces.before}${s.value}${s.spaces.after}${u.value}`,u.source?.start?.line&&s.source?.start?.line&&(u.source.start.line=s.source.start.line),u.source?.start?.column&&s.source?.start?.column&&(u.source.start.column=s.source.start.column),c.splice(A,1))}),i.nodes.reduce((s,A)=>(A===s||(s.value=`${s.value}${A.spaces.before}${A.value}${A.spaces.after}`,A.source?.end?.line&&s.source?.end?.line&&(s.source.end.line=A.source.end.line),A.source?.end?.column&&s.source?.end?.column&&(s.source.end.column=A.source.end.column)),s),i.first),i.nodes.length=1}})}).astSync(t)};var tt=(e,t)=>{for(let n of t.edgesIn)e.partial.edges.delete(n);e.partial.nodes.delete(t)},nc=(e,t)=>{e.partial.edges.delete(t),t.to&&e.partial.nodes.delete(t.to)},dn=e=>{for(let t of e.partial.edges)t.to||e.partial.edges.delete(t)},rc=e=>{for(let t of e.partial.nodes)t.edgesIn.size===0&&e.partial.nodes.delete(t)},jn=e=>e.replace(/^"(.*?)"$/,"$1"),ni=(e,t)=>{if(!e.securityArchive)throw ce(`Missing security archive while trying to parse the :${t} selector`,{found:e})},mC=e=>(e.partial.nodes.clear(),e.partial.edges.clear(),e),It=(e,t)=>async n=>{ni(n,e);for(let r of n.partial.nodes)!n.securityArchive.get(r.id)?.alerts.some(i=>i.type===t)&&tt(n,r);return dn(n),n};var LF=e=>String(e),rj=(e,t,n)=>{if(!e.manifest)return;let r=new Set([e.manifest]),a=new Set;for(let i of t)for(let s of r){if(!s)throw ce("failed to find nested property in :attr",{found:t});if(Array.isArray(s)){for(let A of s)r.add(A);continue}if(!(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&i in s){let A=s[i];A&&(i===n?a.add(A):(r.delete(s),r.add(A)))}}if(!a.size)return;let o=new Set;for(let i of a)if(Array.isArray(i))for(let s of i)o.add(s?LF(s):"");else o.add(LF(i));return[...o]},aj=(e,t,n,r,a,o=[])=>{let i=A=>t?.(a?LF(A).toLowerCase():LF(A),a?n.toLowerCase():n),s=A=>{for(let c of A.edgesIn)e.partial.edges.delete(c);e.partial.nodes.delete(A)};for(let A of e.partial.nodes){let c=o.length?o:[r],u=rj(A,c,r);if(!u?.length){s(A);continue}t&&!u.some(i)&&s(A)}return dn(e),e},XWe={"=":(e,t="")=>e===t,"^=":(e,t="")=>e.startsWith(t),"$=":(e,t="")=>e.endsWith(t),"~=":(e,t="")=>new Set(e.match(/\w+/g)).has(t),"*=":(e,t="")=>e.includes(t),"|=":(e,t="")=>e===t||e.startsWith(`${t}-`),undefined:e=>!!e},oj=new Map(Object.entries(XWe)),$ce=async e=>{await e.cancellable();let t=dC(e.current),n=oj.get(String(t.operator));if(!n){if(e.loose)return e;throw ce(`Unsupported attribute operator: ${t.operator}`,{found:e.current})}let r=t.value||"",a=t.attribute,o=!!t.insensitive;return e.specificity.commonCounter+=1,aj(e,n,r,a,o)};var eJe=async e=>{let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t)for(let r of n.edgesOut.values())r.to&&(e.partial.edges.add(r),e.partial.nodes.add(r.to));return e},tJe=async e=>{let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t)for(let r of n.edgesIn){let a=r.from.edgesOut.values();for(let o of a)o.to&&o.to!==n&&(e.partial.edges.add(o),e.partial.nodes.add(o.to))}return e},nJe=async e=>{if(e.prev?.type==="tag"||e.next?.type==="tag")return e;let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t){let r=new Set;for(let a of n.edgesOut.values())a.to&&(r.add(a.to),e.partial.edges.add(a),e.partial.nodes.add(a.to));for(let a of r)t.add(a)}return e},rJe={">":eJe,"~":tJe," ":nJe},aJe=new Map(Object.entries(rJe)),Gce=async e=>{await e.cancellable();let t=Pce(e.current),n=t.value&&aJe.get(t.value);if(!n){if(e.loose)return e;throw ce(`Unsupported combinator: ${e.current.value}`,{found:e.current})}return n(e)};var Hce=async e=>{let{value:t}=Tce(e.current);if(!t)throw ce("Missing identifier name");for(let n of e.partial.edges)n.name!==t&&(e.partial.edges.delete(n),n.to&&e.partial.nodes.delete(n.to));for(let n of e.partial.nodes)n.edgesIn.size===0&&n.name!==t&&e.partial.nodes.has(n)&&e.partial.nodes.delete(n);return e.specificity.idCounter+=1,e};var Uce=It("abandoned","missingAuthor");var ij=e=>{let t=dC(we(e.pop()).nodes[0]),n=[];for(let r of e){let a=we(r).nodes[0];Kn(a)?n.push(jn(En(a).value)):n.push(wn(a).value)}return n.push(t.attribute),{attribute:t.attribute,insensitive:t.insensitive||!1,operator:t.operator,value:t.value,properties:n}},qce=async e=>{let t;try{t=ij(we(e.current).nodes)}catch(s){throw ce("Failed to parse :attr selector",{cause:s})}let n=t.operator?oj.get(t.operator):void 0,r=t.value||"",a=t.attribute,o=t.insensitive,i=t.properties;return aj(e,n,r,a,o,i)};var zce=async e=>{ni(e,"confused");for(let t of e.partial.nodes){let n=e.securityArchive.get(t.id);!t.confused&&!n?.alerts.some(a=>a.type==="manifestConfusion")&&tt(e,t)}return dn(e),e};var oJe=e=>{let t="";if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),!t)throw ce("Expected a CVE ID",{found:we(e[0]).nodes[0]});return{cveId:t}},Yce=async e=>{ni(e,"cve");let t;try{t=oJe(we(e.current).nodes)}catch(r){throw ce("Failed to parse :cve selector",{cause:r})}let{cveId:n}=t;for(let r of e.partial.nodes)!e.securityArchive.get(r.id)?.alerts.some(i=>i.props?.cveId?.trim().toLowerCase()===n.trim().toLowerCase())&&tt(e,r);return dn(e),e};var iJe=e=>{let t="";if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),!t)throw ce("Expected a CWE ID",{found:we(e[0]).nodes[0]});return{cweId:t}},Kce=async e=>{ni(e,"cwe");let t;try{t=iJe(we(e.current).nodes)}catch(r){throw ce("Failed to parse :cwe selector",{cause:r})}let{cweId:n}=t;for(let r of e.partial.nodes)!e.securityArchive.get(r.id)?.alerts.some(i=>i.props?.cwes?.some(s=>s.id.trim().toLowerCase()===n.trim().toLowerCase()))&&tt(e,r);return dn(e),e};var Wce=It("debug","debugAccess");var Jce=It("deprecated","deprecated");var Vce=async e=>{for(let t of e.partial.edges)t.type!=="dev"&&nc(e,t);return rc(e),e};var Zce=It("dynamic","dynamicRequire");var Xce=async e=>{for(let t of e.partial.nodes)t.edgesOut.size>0&&tt(e,t);return e};var eue=It("entropic","highEntropyStrings");var tue=It("env","envVars");var nue=It("eval","usesEval");var rue=It("fs","filesystemAccess");var oue=new Map([["unlicensed","explicitlyUnlicensedItem"],["misc","miscLicenseIssues"],["restricted","nonpermissiveLicense"],["ambiguous","ambiguousClassifier"],["copyleft","copyleftLicense"],["unknown","unidentifiedLicense"],["none","noLicenseFound"],["exception","licenseException"],[void 0,void 0]]),iue=new Set(oue.keys()),sJe=e=>iue.has(e),aue=e=>{if(!sJe(e))throw ce("Expected a valid license kind",{found:e,validOptions:Array.from(iue)});return e},AJe=e=>{let t;return Kn(we(e[0]).nodes[0])?t=aue(jn(En(we(e[0]).nodes[0]).value)):Yn(we(e[0]).nodes[0])&&(t=aue(wn(we(e[0]).nodes[0]).value)),{kind:t}},sue=async e=>{ni(e,"license");let t;try{t=AJe(we(e.current).nodes)}catch(a){throw ce("Failed to parse :license selector",{cause:a})}let{kind:n}=t,r=oue.get(n);for(let a of e.partial.nodes)!e.securityArchive.get(a.id)?.alerts.some(s=>s.type===r)&&tt(e,a);return dn(e),e};var Aue=async e=>{for(let t of e.partial.nodes){let[n,r]=Qo(t.id);(n!=="file"||r.endsWith("tar.gz")||r===".")&&tt(e,t)}for(let t of e.partial.edges)(!t.spec.file||t.spec.file.endsWith("tar.gz")||t.spec.file===".")&&e.partial.edges.delete(t);return e};var sj=new Map([["critical","malware"],["high","gptMalware"],["medium","gptSecurity"],["low","gptAnomaly"],["0","malware"],["1","gptMalware"],["2","gptSecurity"],["3","gptAnomaly"]]),cue=new Map([["critical",0],["high",1],["medium",2],["low",3],["0",0],["1",1],["2",2],["3",3]]),uue=new Set(sj.keys()),lue=e=>uue.has(e),cJe=e=>{if(!lue(e))throw ce("Expected a valid malware kind",{found:e,validOptions:Array.from(uue)});return e},uJe=e=>{let t="",n,r;if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),t.startsWith(">=")?(n=">=",t=t.substring(2)):t.startsWith("<=")?(n="<=",t=t.substring(2)):t.startsWith(">")?(n=">",t=t.substring(1)):t.startsWith("<")&&(n="<",t=t.substring(1)),!n)r=cJe(t);else if(lue(t))r=t;else throw ce("Expected a valid malware kind or number between 0-3",{found:t});return{kind:r,comparator:n}},due=async e=>{ni(e,"malware");let t;try{t=uJe(we(e.current).nodes)}catch(o){throw ce("Failed to parse :malware selector",{cause:o})}let{kind:n,comparator:r}=t,a=r?void 0:sj.get(n);for(let o of e.partial.nodes){let i=e.securityArchive.get(o.id);(!i?.alerts||i.alerts.length===0)&&tt(e,o)}for(let o of e.partial.nodes){let i=e.securityArchive.get(o.id),s=!0;if(i)if(r){let A=cue.get(n);if(!A)break;for(let c of i.alerts){let u=c.type,l=[...sj.entries()].find(([d,p])=>p===u)?.[0];if(l){let d=cue.get(l);if(d==null)continue;switch(r){case">":d>A&&(s=!1);break;case"<":d<A&&(s=!1);break;case">=":d>=A&&(s=!1);break;case"<=":d<=A&&(s=!1);break}if(!s)break}}}else s=!i.alerts.some(A=>A.type===a);s&&tt(e,o)}return dn(e),e};var pue=It("minified","minifiedFile");var mue=async e=>{for(let t of e.partial.edges)t.to&&e.partial.edges.delete(t);return e.partial.nodes.clear(),e};var gue=It("native","hasNativeCode");var fue=It("network","networkAccess");var hue=It("obfuscated","obfuscatedFile");var bue=async e=>{for(let t of e.partial.edges)t.optional||nc(e,t);return rc(e),e};var lJe=Object.prototype.toString,dJe=e=>lJe.call(e)==="[object Error]",pJe=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Aj(e){return e&&dJe(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:pJe.has(e.message):!1}function mJe(e){if(typeof e=="number"){if(e<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(e))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(e!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function MF(e,t,{min:n=0,allowInfinity:r=!1}={}){if(t!==void 0){if(typeof t!="number"||Number.isNaN(t))throw new TypeError(`Expected \`${e}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(t))throw new TypeError(`Expected \`${e}\` to be a finite number.`);if(t<n)throw new TypeError(`Expected \`${e}\` to be \u2265 ${n}.`)}}var qh=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}},gJe=(e,t,n)=>{let r=n.retries-(t-1);return Object.freeze({error:e,attemptNumber:t,retriesLeft:r})};function fJe(e,t){let n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*t.factor**(e-1));return r=Math.min(r,t.maxTimeout),r}async function hJe(e,t,n,r,a){let o=e;if(o instanceof Error||(o=new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`)),o instanceof qh)throw o.originalError;if(o instanceof TypeError&&!Aj(o))throw o;let i=gJe(o,t,n);await n.onFailedAttempt(i);let s=Date.now();if(s-r>=a||t>=n.retries+1||!await n.shouldRetry(i))throw o;let A=fJe(t,n),c=a-(s-r);if(c<=0)throw o;let u=Math.min(A,c);u>0&&await new Promise((l,d)=>{let p=()=>{clearTimeout(g),n.signal?.removeEventListener("abort",p),d(n.signal.reason)},g=setTimeout(()=>{n.signal?.removeEventListener("abort",p),l()},u);n.unref&&g.unref?.(),n.signal?.addEventListener("abort",p,{once:!0})}),n.signal?.throwIfAborted()}async function dI(e,t={}){if(t={...t},mJe(t.retries),Object.hasOwn(t,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");t.retries??=10,t.factor??=2,t.minTimeout??=1e3,t.maxTimeout??=Number.POSITIVE_INFINITY,t.randomize??=!1,t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,MF("factor",t.factor,{min:0,allowInfinity:!1}),MF("minTimeout",t.minTimeout,{min:0,allowInfinity:!1}),MF("maxTimeout",t.maxTimeout,{min:0,allowInfinity:!0});let n=t.maxRetryTime??Number.POSITIVE_INFINITY;MF("maxRetryTime",n,{min:0,allowInfinity:!0}),t.factor>0||(t.factor=1),t.signal?.throwIfAborted();let r=0,a=Date.now(),o=n;for(;r<t.retries+1;){r++;try{t.signal?.throwIfAborted();let i=await e(r);return t.signal?.throwIfAborted(),i}catch(i){await hJe(i,r,t,a,o)}}throw new Error("Retry attempts exhausted without throwing an error.")}var Bue=new Set(["any","major","minor","patch","in-range","out-of-range"]),bJe=e=>Bue.has(e),yue=e=>{if(!bJe(e))throw ce("Expected a valid outdated kind",{found:e,validOptions:Array.from(Bue)});return e},yJe=async(e,t,n)=>{let r=AC(e.id,String(e.name),t);if(!r.registry||!e.name)return[];let a=new URL(r.registry);a.pathname=`/${e.name}`;let o=await fetch(String(a),{headers:{Accept:"application/vnd.npm.install-v1+json"},signal:n});if(o.status===404)throw new qh("Missing API");if(!o.ok)throw ce("Failed to fetch packument",{name:e.name,spec:r,response:o});let i=await o.json();return Object.keys(i.versions).sort(ol)},BJe=e=>{let t="any";return Kn(we(e[0]).nodes[0])?t=yue(jn(En(we(e[0]).nodes[0]).value)):Yn(we(e[0]).nodes[0])&&(t=yue(wn(we(e[0]).nodes[0]).value)),{kind:t}},CJe=async(e,t,n)=>{if(!t.name||!t.version)return t;let r=t.version,a;try{a=await dI(()=>yJe(t,e.specOptions,e.signal),{retries:e.retries,signal:e.signal})}catch(s){console.warn(ce("Could not retrieve registry versions",{name:t.name,cause:s})),a=[]}let o=a.filter(s=>al(s,r));if(!o.length)return t;let i=new Map([["major",CAe],["minor",wAe],["patch",EAe]]);switch(n){case"any":return;case"major":case"minor":case"patch":return o.some(s=>{let A=i.get(n)?.(s),c=i.get(n)?.(r);return A===void 0||c===void 0?!1:A>c})?void 0:t;case"in-range":{for(let s of t.edgesIn)if(e.partial.edges.has(s)&&o.some(A=>s.spec.final.range&&Oh(A,s.spec.final.range)))return;return t}case"out-of-range":{for(let s of t.edgesIn)if(e.partial.edges.has(s)&&o.some(A=>s.spec.final.range&&Oh(A,s.spec.final.range)))return t;return}}},Cue=async e=>{let t;try{t=BJe(we(e.current).nodes)}catch(o){if(nu(o).message==="Expected a query node")t={kind:"any"};else throw ce("Failed to parse :outdated selector",{cause:o})}let{kind:n}=t,r=[];for(let o of e.partial.nodes){if(o.mainImporter||o.manifest?.private||Qo(o.id)[0]!=="registry"){tt(e,o);continue}r.push(CJe(e,o,n))}let a=await Promise.all(r);for(let o of a)o&&tt(e,o);return e};var wue=async e=>{for(let t of e.partial.edges)t.spec.overridden||nc(e,t);return rc(e),e};var cj=(e,t,n)=>{let r=e instanceof RegExp?Eue(e,n):e,a=t instanceof RegExp?Eue(t,n):t,o=r!==null&&a!=null&&wJe(r,a,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+r.length,o[1]),post:n.slice(o[1]+a.length)}},Eue=(e,t)=>{let n=t.match(e);return n?n[0]:null},wJe=(e,t,n)=>{let r,a,o,i,s,A=n.indexOf(e),c=n.indexOf(t,A+1),u=A;if(A>=0&&c>0){if(e===t)return[A,c];for(r=[],o=n.length;u>=0&&!s;){if(u===A)r.push(u),A=n.indexOf(e,u+1);else if(r.length===1){let l=r.pop();l!==void 0&&(s=[l,c])}else a=r.pop(),a!==void 0&&a<o&&(o=a,i=c),c=n.indexOf(t,u+1);u=A<c&&A>=0?A:c}r.length&&i!==void 0&&(s=[o,i])}return s};var kue="\0SLASH"+Math.random()+"\0",vue="\0OPEN"+Math.random()+"\0",lj="\0CLOSE"+Math.random()+"\0",Iue="\0COMMA"+Math.random()+"\0",Que="\0PERIOD"+Math.random()+"\0",EJe=new RegExp(kue,"g"),kJe=new RegExp(vue,"g"),vJe=new RegExp(lj,"g"),IJe=new RegExp(Iue,"g"),QJe=new RegExp(Que,"g"),xJe=/\\\\/g,_Je=/\\{/g,DJe=/\\}/g,FJe=/\\,/g,SJe=/\\./g;function uj(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function RJe(e){return e.replace(xJe,kue).replace(_Je,vue).replace(DJe,lj).replace(FJe,Iue).replace(SJe,Que)}function LJe(e){return e.replace(EJe,"\\").replace(kJe,"{").replace(vJe,"}").replace(IJe,",").replace(QJe,".")}function xue(e){if(!e)return[""];let t=[],n=cj("{","}",e);if(!n)return e.split(",");let{pre:r,body:a,post:o}=n,i=r.split(",");i[i.length-1]+="{"+a+"}";let s=xue(o);return o.length&&(i[i.length-1]+=s.shift(),i.push.apply(i,s)),t.push.apply(t,i),t}function _ue(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),pI(RJe(e),!0).map(LJe)):[]}function MJe(e){return"{"+e+"}"}function NJe(e){return/^-?0\d/.test(e)}function PJe(e,t){return e<=t}function TJe(e,t){return e>=t}function pI(e,t){let n=[],r=cj("{","}",e);if(!r)return[e];let a=r.pre,o=r.post.length?pI(r.post,!1):[""];if(/\$$/.test(r.pre))for(let i=0;i<o.length;i++){let s=a+"{"+r.body+"}"+o[i];n.push(s)}else{let i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),A=i||s,c=r.body.indexOf(",")>=0;if(!A&&!c)return r.post.match(/,(?!,).*\}/)?(e=r.pre+"{"+r.body+lj+r.post,pI(e)):[e];let u;if(A)u=r.body.split(/\.\./);else if(u=xue(r.body),u.length===1&&u[0]!==void 0&&(u=pI(u[0],!1).map(MJe),u.length===1))return o.map(d=>r.pre+u[0]+d);let l;if(A&&u[0]!==void 0&&u[1]!==void 0){let d=uj(u[0]),p=uj(u[1]),g=Math.max(u[0].length,u[1].length),m=u.length===3&&u[2]!==void 0?Math.abs(uj(u[2])):1,h=PJe;p<d&&(m*=-1,h=TJe);let b=u.some(NJe);l=[];for(let y=d;h(y,p);y+=m){let w;if(s)w=String.fromCharCode(y),w==="\\"&&(w="");else if(w=String(y),b){let C=g-w.length;if(C>0){let B=new Array(C+1).join("0");y<0?w="-"+B+w.slice(1):w=B+w}}l.push(w)}}else{l=[];for(let d=0;d<u.length;d++)l.push.apply(l,pI(u[d],!1))}for(let d=0;d<l.length;d++)for(let p=0;p<o.length;p++){let g=a+l[d]+o[p];(!t||A||g)&&n.push(g)}}return n}var mI=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var jJe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gI=e=>e.replace(/[[\]\\-]/g,"\\$&"),OJe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Due=e=>e.join(""),Fue=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],a=[],o=n+1,i=!1,s=!1,A=!1,c=!1,u=n,l="";e:for(;o<e.length;){let m=e.charAt(o);if((m==="!"||m==="^")&&o===n+1){c=!0,o++;continue}if(m==="]"&&i&&!A){u=o+1;break}if(i=!0,m==="\\"&&!A){A=!0,o++;continue}if(m==="["&&!A){for(let[h,[f,b,y]]of Object.entries(jJe))if(e.startsWith(h,o)){if(l)return["$.",!1,e.length-n,!0];o+=h.length,y?a.push(f):r.push(f),s=s||b;continue e}}if(A=!1,l){m>l?r.push(gI(l)+"-"+gI(m)):m===l&&r.push(gI(m)),l="",o++;continue}if(e.startsWith("-]",o+1)){r.push(gI(m+"-")),o+=2;continue}if(e.startsWith("-",o+1)){l=m,o+=2;continue}r.push(gI(m)),o++}if(u<o)return["",!1,0,!1];if(!r.length&&!a.length)return["$.",!1,e.length-n,!0];if(a.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c){let m=r[0].length===2?r[0].slice(-1):r[0];return[OJe(m),!1,u-n,!1]}let d="["+(c?"^":"")+Due(r)+"]",p="["+(c?"":"^")+Due(a)+"]";return[r.length&&a.length?"("+d+"|"+p+")":r.length?d:p,s,u-n,!0]};var mg=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var $Je=new Set(["!","?","+","*","@"]),Sue=e=>$Je.has(e),GJe="(?!(?:^|/)\\.\\.?(?:$|/))",NF="(?!\\.)",HJe=new Set(["[","."]),UJe=new Set(["..","."]),qJe=new Set("().*{}+?[]^$\\!"),zJe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dj="[^/]",Rue=dj+"*?",Lue=dj+"+?",gC=class e{type;#e;#n;#a=!1;#t=[];#r;#i;#A;#o=!1;#s;#u;#p=!1;constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#r=n,this.#e=this.#r?this.#r.#e:this,this.#s=this.#e===this?r:this.#e.#s,this.#A=this.#e===this?[]:this.#e.#A,t==="!"&&!this.#e.#o&&this.#A.push(this),this.#i=this.#r?this.#r.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#u=this.#t.map(t=>String(t)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#o)return this;this.toString(),this.#o=!0;let t;for(;t=this.#A.pop();){if(t.type!=="!")continue;let n=t,r=n.#r;for(;r;){for(let a=n.#i+1;!r.type&&a<r.#t.length;a++)for(let o of t.#t){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#t[a])}n=r,r=n.#r}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof e&&n.#r===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#o&&this.#r?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(this.#i===0)return!0;let t=this.#r;for(let n=0;n<this.#i;n++){let r=t.#t[n];if(!(r instanceof e&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let t=this.#r?this.#r.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new e(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#d(t,n,r,a){let o=!1,i=!1,s=-1,A=!1;if(n.type===null){let p=r,g="";for(;p<t.length;){let m=t.charAt(p++);if(o||m==="\\"){o=!o,g+=m;continue}if(i){p===s+1?(m==="^"||m==="!")&&(A=!0):m==="]"&&!(p===s+2&&A)&&(i=!1),g+=m;continue}else if(m==="["){i=!0,s=p,A=!1,g+=m;continue}if(!a.noext&&Sue(m)&&t.charAt(p)==="("){n.push(g),g="";let h=new e(m,n);p=e.#d(t,h,p,a),n.push(h);continue}g+=m}return n.push(g),p}let c=r+1,u=new e(null,n),l=[],d="";for(;c<t.length;){let p=t.charAt(c++);if(o||p==="\\"){o=!o,d+=p;continue}if(i){c===s+1?(p==="^"||p==="!")&&(A=!0):p==="]"&&!(c===s+2&&A)&&(i=!1),d+=p;continue}else if(p==="["){i=!0,s=c,A=!1,d+=p;continue}if(Sue(p)&&t.charAt(c)==="("){u.push(d),d="";let g=new e(p,u);u.push(g),c=e.#d(t,g,c,a);continue}if(p==="|"){u.push(d),d="",l.push(u),u=new e(null,n);continue}if(p===")")return d===""&&n.#t.length===0&&(n.#p=!0),u.push(d),d="",n.push(...l,u),c;d+=p}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],c}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#d(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,a,o]=this.toRegExpSource();if(!(a||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let s=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,s),{_src:n,_glob:t})}get options(){return this.#s}toRegExpSource(t){let n=t??!!this.#s.dot;if(this.#e===this&&this.#c(),!this.type){let A=this.isStart()&&this.isEnd(),c=this.#t.map(p=>{let[g,m,h,f]=typeof p=="string"?e.#g(p,this.#n,A):p.toRegExpSource(t);return this.#n=this.#n||h,this.#a=this.#a||f,g}).join(""),u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&UJe.has(this.#t[0]))){let g=HJe,m=n&&g.has(c.charAt(0))||c.startsWith("\\.")&&g.has(c.charAt(2))||c.startsWith("\\.\\.")&&g.has(c.charAt(4)),h=!n&&!t&&g.has(c.charAt(0));u=m?GJe:h?NF:""}let l="";return this.isEnd()&&this.#e.#o&&this.#r?.type==="!"&&(l="(?:$|\\/)"),[u+c+l,mg(c),this.#n=!!this.#n,this.#a]}let r=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#m(n);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let A=this.toString();return this.#t=[A],this.type=null,this.#n=void 0,[A,mg(this.toString()),!1,!1]}let i=!r||t||n||!NF?"":this.#m(!0);i===o&&(i=""),i&&(o=`(?:${o})(?:${i})*?`);let s="";if(this.type==="!"&&this.#p)s=(this.isStart()&&!n?NF:"")+Lue;else{let A=this.type==="!"?"))"+(this.isStart()&&!n&&!t?NF:"")+Rue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;s=a+o+A}return[s,mg(o),this.#n=!!this.#n,this.#a]}#m(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,a,o,i]=n.toRegExpSource(t);return this.#a=this.#a||i,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#g(t,n,r=!1){let a=!1,o="",i=!1;for(let s=0;s<t.length;s++){let A=t.charAt(s);if(a){a=!1,o+=(qJe.has(A)?"\\":"")+A;continue}if(A==="\\"){s===t.length-1?o+="\\\\":a=!0;continue}if(A==="["){let[c,u,l,d]=Fue(t,s);if(l){o+=c,i=i||u,s+=l-1,n=n||d;continue}}if(A==="*"){r&&t==="*"?o+=Lue:o+=Rue,n=!0;continue}if(A==="?"){o+=dj,n=!0;continue}o+=zJe(A)}return[o,mg(t),!!n,i]}};var pj=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var ri=(e,t,n={})=>(mI(t),!n.nocomment&&t.charAt(0)==="#"?!1:new fC(t,n).match(e)),YJe=/^\*+([^+@!?\*\[\(]*)$/,KJe=e=>t=>!t.startsWith(".")&&t.endsWith(e),WJe=e=>t=>t.endsWith(e),JJe=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),VJe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ZJe=/^\*+\.\*+$/,XJe=e=>!e.startsWith(".")&&e.includes("."),eVe=e=>e!=="."&&e!==".."&&e.includes("."),tVe=/^\.\*+$/,nVe=e=>e!=="."&&e!==".."&&e.startsWith("."),rVe=/^\*+$/,aVe=e=>e.length!==0&&!e.startsWith("."),oVe=e=>e.length!==0&&e!=="."&&e!=="..",iVe=/^\?+([^+@!?\*\[\(]*)?$/,sVe=([e,t=""])=>{let n=Pue([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},AVe=([e,t=""])=>{let n=Tue([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},cVe=([e,t=""])=>{let n=Tue([e]);return t?r=>n(r)&&r.endsWith(t):n},uVe=([e,t=""])=>{let n=Pue([e]);return t?r=>n(r)&&r.endsWith(t):n},Pue=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},Tue=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},jue=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mue={win32:{sep:"\\"},posix:{sep:"/"}},lVe=jue==="win32"?Mue.win32.sep:Mue.posix.sep;ri.sep=lVe;var oc=Symbol("globstar **");ri.GLOBSTAR=oc;var dVe="[^/]",pVe=dVe+"*?",mVe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",gVe="(?:(?!(?:\\/|^)\\.).)*?",fVe=(e,t={})=>n=>ri(n,e,t);ri.filter=fVe;var ac=(e,t={})=>Object.assign({},e,t),hVe=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ri;let t=ri;return Object.assign((r,a,o={})=>t(r,a,ac(e,o)),{Minimatch:class extends t.Minimatch{constructor(a,o={}){super(a,ac(e,o))}static defaults(a){return t.defaults(ac(e,a)).Minimatch}},AST:class extends t.AST{constructor(a,o,i={}){super(a,o,ac(e,i))}static fromGlob(a,o={}){return t.AST.fromGlob(a,ac(e,o))}},unescape:(r,a={})=>t.unescape(r,ac(e,a)),escape:(r,a={})=>t.escape(r,ac(e,a)),filter:(r,a={})=>t.filter(r,ac(e,a)),defaults:r=>t.defaults(ac(e,r)),makeRe:(r,a={})=>t.makeRe(r,ac(e,a)),braceExpand:(r,a={})=>t.braceExpand(r,ac(e,a)),match:(r,a,o={})=>t.match(r,a,ac(e,o)),sep:t.sep,GLOBSTAR:oc})};ri.defaults=hVe;var Oue=(e,t={})=>(mI(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_ue(e));ri.braceExpand=Oue;var bVe=(e,t={})=>new fC(e,t).makeRe();ri.makeRe=bVe;var yVe=(e,t,n={})=>{let r=new fC(t,n);return e=e.filter(a=>r.match(a)),r.options.nonull&&!e.length&&e.push(t),e};ri.match=yVe;var Nue=/[?*]|[+@!]\(.*?\)|\[|\]/,BVe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fC=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,n={}){mI(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||jue,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let a=this.globParts.map((o,i,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let A=o[0]===""&&o[1]===""&&(o[2]==="?"||!Nue.test(o[2]))&&!Nue.test(o[3]),c=/^[a-z]:/i.test(o[0]);if(A)return[...o.slice(0,4),...o.slice(4).map(u=>this.parse(u))];if(c)return[o[0],...o.slice(1).map(u=>this.parse(u))]}return o.map(A=>this.parse(A))});if(this.debug(this.pattern,a),this.set=a.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let i=this.set[o];i[0]===""&&i[1]===""&&this.globParts[o][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let a=0;a<t[r].length;a++)t[r][a]==="**"&&(t[r][a]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let a=r;for(;n[a+1]==="**";)a++;a!==r&&n.splice(r,a-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,a)=>{let o=r[r.length-1];return a==="**"&&o==="**"?r:a===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(a),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let a=1;a<t.length-1;a++){let o=t[a];a===1&&o===""&&t[0]===""||(o==="."||o==="")&&(n=!0,t.splice(a,1),a--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let a=t[r-1];a&&a!=="."&&a!==".."&&a!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let a=-1;for(;(a=r.indexOf("**",a+1))!==-1;){let i=a;for(;r[i+1]==="**";)i++;i>a&&r.splice(a+1,i-a);let s=r[a+1],A=r[a+2],c=r[a+3];if(s!==".."||!A||A==="."||A===".."||!c||c==="."||c==="..")continue;n=!0,r.splice(a,1);let u=r.slice(0);u[a]="**",t.push(u),a--}if(!this.preserveMultipleSlashes){for(let i=1;i<r.length-1;i++){let s=r[i];i===1&&s===""&&r[0]===""||(s==="."||s==="")&&(n=!0,r.splice(i,1),i--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let i=r[o-1];if(i&&i!=="."&&i!==".."&&i!=="**"){n=!0;let A=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...A),r.length===0&&r.push(""),o-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let a=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(a){t[n]=[],t[r]=a;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let a=0,o=0,i=[],s="";for(;a<t.length&&o<n.length;)if(t[a]===n[o])i.push(s==="b"?n[o]:t[a]),a++,o++;else if(r&&t[a]==="**"&&n[o]===t[a+1])i.push(t[a]),a++;else if(r&&n[o]==="**"&&t[a]===n[o+1])i.push(n[o]),o++;else if(t[a]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(s==="b")return!1;s="a",i.push(t[a]),a++,o++}else if(n[o]==="*"&&t[a]&&(this.options.dot||!t[a].startsWith("."))&&t[a]!=="**"){if(s==="a")return!1;s="b",i.push(n[o]),a++,o++}else return!1;return t.length===n.length&&i}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let a=0;a<t.length&&t.charAt(a)==="!";a++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let a=this.options;if(this.isWindows){let m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),b=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=h?3:m?0:void 0,w=b?3:f?0:void 0;if(typeof y=="number"&&typeof w=="number"){let[C,B]=[t[y],n[w]];C.toLowerCase()===B.toLowerCase()&&(n[w]=C,w>y?n=n.slice(w):y>w&&(t=t.slice(y)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var i=0,s=0,A=t.length,c=n.length;i<A&&s<c;i++,s++){this.debug("matchOne loop");var u=n[s],l=t[i];if(this.debug(n,u,l),u===!1)return!1;if(u===oc){this.debug("GLOBSTAR",[n,u,l]);var d=i,p=s+1;if(p===c){for(this.debug("** at the end");i<A;i++)if(t[i]==="."||t[i]===".."||!a.dot&&t[i].charAt(0)===".")return!1;return!0}for(;d<A;){var g=t[d];if(this.debug(`
|
|
66
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return lr.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},gUe="DialogDescriptionWarning",fUe=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ese(gUe).contentName}}.`;return lr.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},V8=Oie,tse=Gie,Z8=Uie,xv=qie,_v=zie,m5=Kie,g5=Jie,f5=Zie;var Le=k(U(),1);var ase=k(U(),1),wUe=k(Gu(),1);var ao=k(U(),1);var X8=k(N(),1);function rse(e){let t=hUe(e),n=ao.forwardRef((r,a)=>{let{children:o,...i}=r,s=ao.Children.toArray(o),A=s.find(yUe);if(A){let c=A.props.children,u=s.map(l=>l===A?ao.Children.count(c)>1?ao.Children.only(null):ao.isValidElement(c)?c.props.children:null:l);return(0,X8.jsx)(t,{...i,ref:a,children:ao.isValidElement(c)?ao.cloneElement(c,void 0,u):null})}return(0,X8.jsx)(t,{...i,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function hUe(e){let t=ao.forwardRef((n,r)=>{let{children:a,...o}=n;if(ao.isValidElement(a)){let i=CUe(a),s=BUe(o,a.props);return a.type!==ao.Fragment&&(s.ref=r?Hi(r,i):i),ao.cloneElement(a,s)}return ao.Children.count(a)>1?ao.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bUe=Symbol("radix.slottable");function yUe(e){return ao.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bUe}function BUe(e,t){let n={...t};for(let r in t){let a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...s)=>{o(...s),a(...s)}:a&&(n[r]=a):r==="style"?n[r]={...a,...o}:r==="className"&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function CUe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ose=k(N(),1),EUe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Md=EUe.reduce((e,t)=>{let n=rse(`Primitive.${t}`),r=ase.forwardRef((a,o)=>{let{asChild:i,...s}=a,A=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,ose.jsx)(A,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});var Dv='[cmdk-group=""]',h5='[cmdk-group-items=""]',kUe='[cmdk-group-heading=""]',sse='[cmdk-item=""]',ise=`${sse}:not([aria-disabled="true"])`,b5="cmdk-item-select",KB="data-value",vUe=(e,t,n)=>uie(e,t,n),Ase=Le.createContext(void 0),Fv=()=>Le.useContext(Ase),cse=Le.createContext(void 0),y5=()=>Le.useContext(cse),use=Le.createContext(void 0),lse=Le.forwardRef((e,t)=>{let n=WB(()=>{var T,D;return{search:"",value:(D=(T=e.value)!=null?T:e.defaultValue)!=null?D:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=WB(()=>new Set),a=WB(()=>new Map),o=WB(()=>new Map),i=WB(()=>new Set),s=dse(e),{label:A,children:c,value:u,onValueChange:l,filter:d,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:h=!0,...f}=e,b=xn(),y=xn(),w=xn(),C=Le.useRef(null),B=NUe();xh(()=>{if(u!==void 0){let T=u.trim();n.current.value=T,E.emit()}},[u]),xh(()=>{B(6,O)},[]);let E=Le.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,D,z)=>{var J,te,K,W;if(!Object.is(n.current[T],D)){if(n.current[T]=D,T==="search")j(),S(),B(1,M);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Y=document.getElementById(w);Y?Y.focus():(J=document.getElementById(b))==null||J.focus()}if(B(7,()=>{var Y;n.current.selectedItemId=(Y=L())==null?void 0:Y.id,E.emit()}),z||B(5,O),((te=s.current)==null?void 0:te.value)!==void 0){let Y=D??"";(W=(K=s.current).onValueChange)==null||W.call(K,Y);return}}E.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),v=Le.useMemo(()=>({value:(T,D,z)=>{var J;D!==((J=o.current.get(T))==null?void 0:J.value)&&(o.current.set(T,{value:D,keywords:z}),n.current.filtered.items.set(T,x(D,z)),B(2,()=>{S(),E.emit()}))},item:(T,D)=>(r.current.add(T),D&&(a.current.has(D)?a.current.get(D).add(T):a.current.set(D,new Set([T]))),B(3,()=>{j(),S(),n.current.value||M(),E.emit()}),()=>{o.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=L();B(4,()=>{j(),z?.getAttribute("id")===T&&M(),E.emit()})}),group:T=>(a.current.has(T)||a.current.set(T,new Set),()=>{o.current.delete(T),a.current.delete(T)}),filter:()=>s.current.shouldFilter,label:A||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:b,inputId:w,labelId:y,listInnerRef:C}),[]);function x(T,D){var z,J;let te=(J=(z=s.current)==null?void 0:z.filter)!=null?J:vUe;return T?te(T,n.current.search,D):0}function S(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,D=[];n.current.filtered.groups.forEach(J=>{let te=a.current.get(J),K=0;te.forEach(W=>{let Y=T.get(W);K=Math.max(Y,K)}),D.push([J,K])});let z=C.current;$().sort((J,te)=>{var K,W;let Y=J.getAttribute("id"),ae=te.getAttribute("id");return((K=T.get(ae))!=null?K:0)-((W=T.get(Y))!=null?W:0)}).forEach(J=>{let te=J.closest(h5);te?te.appendChild(J.parentElement===te?J:J.closest(`${h5} > *`)):z.appendChild(J.parentElement===z?J:J.closest(`${h5} > *`))}),D.sort((J,te)=>te[1]-J[1]).forEach(J=>{var te;let K=(te=C.current)==null?void 0:te.querySelector(`${Dv}[${KB}="${encodeURIComponent(J[0])}"]`);K?.parentElement.appendChild(K)})}function M(){let T=$().find(z=>z.getAttribute("aria-disabled")!=="true"),D=T?.getAttribute(KB);E.setState("value",D||void 0)}function j(){var T,D,z,J;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let K of r.current){let W=(D=(T=o.current.get(K))==null?void 0:T.value)!=null?D:"",Y=(J=(z=o.current.get(K))==null?void 0:z.keywords)!=null?J:[],ae=x(W,Y);n.current.filtered.items.set(K,ae),ae>0&&te++}for(let[K,W]of a.current)for(let Y of W)if(n.current.filtered.items.get(Y)>0){n.current.filtered.groups.add(K);break}n.current.filtered.count=te}function O(){var T,D,z;let J=L();J&&(((T=J.parentElement)==null?void 0:T.firstChild)===J&&((z=(D=J.closest(Dv))==null?void 0:D.querySelector(kUe))==null||z.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function L(){var T;return(T=C.current)==null?void 0:T.querySelector(`${sse}[aria-selected="true"]`)}function $(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(ise))||[])}function I(T){let D=$()[T];D&&E.setState("value",D.getAttribute(KB))}function _(T){var D;let z=L(),J=$(),te=J.findIndex(W=>W===z),K=J[te+T];(D=s.current)!=null&&D.loop&&(K=te+T<0?J[J.length-1]:te+T===J.length?J[0]:J[te+T]),K&&E.setState("value",K.getAttribute(KB))}function R(T){let D=L(),z=D?.closest(Dv),J;for(;z&&!J;)z=T>0?LUe(z,Dv):MUe(z,Dv),J=z?.querySelector(ise);J?E.setState("value",J.getAttribute(KB)):_(T)}let F=()=>I($().length-1),Q=T=>{T.preventDefault(),T.metaKey?F():T.altKey?R(1):_(1)},P=T=>{T.preventDefault(),T.metaKey?I(0):T.altKey?R(-1):_(-1)};return Le.createElement(Md.div,{ref:t,tabIndex:-1,...f,"cmdk-root":"",onKeyDown:T=>{var D;(D=f.onKeyDown)==null||D.call(f,T);let z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||z))switch(T.key){case"n":case"j":{h&&T.ctrlKey&&Q(T);break}case"ArrowDown":{Q(T);break}case"p":case"k":{h&&T.ctrlKey&&P(T);break}case"ArrowUp":{P(T);break}case"Home":{T.preventDefault(),I(0);break}case"End":{T.preventDefault(),F();break}case"Enter":{T.preventDefault();let J=L();if(J){let te=new Event(b5);J.dispatchEvent(te)}}}}},Le.createElement("label",{"cmdk-label":"",htmlFor:v.inputId,id:v.labelId,style:TUe},A),eF(e,T=>Le.createElement(cse.Provider,{value:E},Le.createElement(Ase.Provider,{value:v},T))))}),IUe=Le.forwardRef((e,t)=>{var n,r;let a=xn(),o=Le.useRef(null),i=Le.useContext(use),s=Fv(),A=dse(e),c=(r=(n=A.current)==null?void 0:n.forceMount)!=null?r:i?.forceMount;xh(()=>{if(!c)return s.item(a,i?.id)},[c]);let u=pse(a,o,[e.value,e.children,o],e.keywords),l=y5(),d=ag(B=>B.value&&B.value===u.current),p=ag(B=>c||s.filter()===!1?!0:B.search?B.filtered.items.get(a)>0:!0);Le.useEffect(()=>{let B=o.current;if(!(!B||e.disabled))return B.addEventListener(b5,g),()=>B.removeEventListener(b5,g)},[p,e.onSelect,e.disabled]);function g(){var B,E;m(),(E=(B=A.current).onSelect)==null||E.call(B,u.current)}function m(){l.setState("value",u.current,!0)}if(!p)return null;let{disabled:h,value:f,onSelect:b,forceMount:y,keywords:w,...C}=e;return Le.createElement(Md.div,{ref:Hi(o,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!d,"data-disabled":!!h,"data-selected":!!d,onPointerMove:h||s.getDisablePointerSelection()?void 0:m,onClick:h?void 0:g},e.children)}),QUe=Le.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,i=xn(),s=Le.useRef(null),A=Le.useRef(null),c=xn(),u=Fv(),l=ag(p=>a||u.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);xh(()=>u.group(i),[]),pse(i,s,[e.value,e.heading,A]);let d=Le.useMemo(()=>({id:i,forceMount:a}),[a]);return Le.createElement(Md.div,{ref:Hi(s,t),...o,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&Le.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),eF(e,p=>Le.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},Le.createElement(use.Provider,{value:d},p))))}),xUe=Le.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=Le.useRef(null),o=ag(i=>!i.search);return!n&&!o?null:Le.createElement(Md.div,{ref:Hi(a,t),...r,"cmdk-separator":"",role:"separator"})}),_Ue=Le.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=y5(),i=ag(c=>c.search),s=ag(c=>c.selectedItemId),A=Fv();return Le.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),Le.createElement(Md.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":s,id:A.inputId,type:"text",value:a?e.value:i,onChange:c=>{a||o.setState("search",c.target.value),n?.(c.target.value)}})}),DUe=Le.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=Le.useRef(null),i=Le.useRef(null),s=ag(c=>c.selectedItemId),A=Fv();return Le.useEffect(()=>{if(i.current&&o.current){let c=i.current,u=o.current,l,d=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let p=c.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(l),d.unobserve(c)}}},[]),Le.createElement(Md.div,{ref:Hi(o,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:A.listId},eF(e,c=>Le.createElement("div",{ref:Hi(i,A.listInnerRef),"cmdk-list-sizer":""},c)))}),FUe=Le.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:i,...s}=e;return Le.createElement(V8,{open:n,onOpenChange:r},Le.createElement(Z8,{container:i},Le.createElement(xv,{"cmdk-overlay":"",className:a}),Le.createElement(_v,{"aria-label":e.label,"cmdk-dialog":"",className:o},Le.createElement(lse,{ref:t,...s}))))}),SUe=Le.forwardRef((e,t)=>ag(n=>n.filtered.count===0)?Le.createElement(Md.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),RUe=Le.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return Le.createElement(Md.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},eF(e,i=>Le.createElement("div",{"aria-hidden":!0},i)))}),zi=Object.assign(lse,{List:DUe,Item:IUe,Input:_Ue,Group:QUe,Separator:xUe,Dialog:FUe,Empty:SUe,Loading:RUe});function LUe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function MUe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function dse(e){let t=Le.useRef(e);return xh(()=>{t.current=e}),t}var xh=typeof window>"u"?Le.useEffect:Le.useLayoutEffect;function WB(e){let t=Le.useRef();return t.current===void 0&&(t.current=e()),t}function ag(e){let t=y5(),n=()=>e(t.snapshot());return Le.useSyncExternalStore(t.subscribe,n,n)}function pse(e,t,n,r=[]){let a=Le.useRef(),o=Fv();return xh(()=>{var i;let s=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),A=r.map(c=>c.trim());o.value(e,s,A),(i=t.current)==null||i.setAttribute(KB,s),a.current=s}),a}var NUe=()=>{let[e,t]=Le.useState(),n=WB(()=>new Map);return xh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function PUe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function eF({asChild:e,children:t},n){return e&&Le.isValidElement(t)?Le.cloneElement(PUe(t),{ref:t.ref},n(t.props.children)):n(t)}var TUe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Sv=k(U(),1);var sA=k(N(),1),Nd=V8,JB=tse,B5=Z8,mse=f5,gse=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(xv,{ref:n,className:G("fixed inset-0 z-[10001] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));gse.displayName=xv.displayName;var tl=Sv.forwardRef(({className:e,children:t,...n},r)=>(0,sA.jsxs)(B5,{children:[(0,sA.jsx)(gse,{}),(0,sA.jsxs)(_v,{ref:r,className:G("fixed left-[50%] top-[50%] z-[10001] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,(0,sA.jsxs)(f5,{className:"absolute right-4 top-4 cursor-default rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[(0,sA.jsx)(ld,{className:"h-4 w-4"}),(0,sA.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));tl.displayName=_v.displayName;var Pd=({className:e,...t})=>(0,sA.jsx)("div",{className:G("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Pd.displayName="DialogHeader";var Td=({className:e,...t})=>(0,sA.jsx)("div",{className:G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Td.displayName="DialogFooter";var jd=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(m5,{ref:n,className:G("text-lg font-semibold leading-none tracking-tight",e),...t}));jd.displayName=m5.displayName;var Od=Sv.forwardRef(({className:e,...t},n)=>(0,sA.jsx)(g5,{ref:n,className:G("text-sm text-muted-foreground",e),...t}));Od.displayName=g5.displayName;var WA=k(N(),1),_h=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi,{ref:n,className:G("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));_h.displayName=zi.displayName;var Dh=og.forwardRef(({className:e,wrapperClassName:t,...n},r)=>(0,WA.jsxs)("div",{className:G("flex items-center border-b px-3",t),"cmdk-input-wrapper":"",children:[(0,WA.jsx)(Wo,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,WA.jsx)(zi.Input,{ref:r,className:G("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));Dh.displayName=zi.Input.displayName;var Fh=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.List,{ref:n,className:G("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Fh.displayName=zi.List.displayName;var Sh=og.forwardRef((e,t)=>(0,WA.jsx)(zi.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Sh.displayName=zi.Empty.displayName;var Rh=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Group,{ref:n,className:G("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Rh.displayName=zi.Group.displayName;var C5=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Separator,{ref:n,className:G("-mx-1 h-px bg-border",e),...t}));C5.displayName=zi.Separator.displayName;var ig=og.forwardRef(({className:e,...t},n)=>(0,WA.jsx)(zi.Item,{ref:n,className:G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ig.displayName=zi.Item.displayName;var jUe=({className:e,...t})=>(0,WA.jsx)("span",{className:G("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});jUe.displayName="CommandShortcut";var Lh=k(U(),1);var Ag=k(U(),1);var _se=k(U(),1);var Ur=k(U(),1);var $a=k(N(),1),tF="Popover",[fse,Knn]=Cn(tF,[UA]),Rv=UA(),[OUe,sg]=fse(tF),hse=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=Rv(t),A=Ur.useRef(null),[c,u]=Ur.useState(!1),[l,d]=Gr({prop:r,defaultProp:a??!1,onChange:o,caller:tF});return(0,$a.jsx)(gd,{...s,children:(0,$a.jsx)(OUe,{scope:t,contentId:xn(),triggerRef:A,open:l,onOpenChange:d,onOpenToggle:Ur.useCallback(()=>d(p=>!p),[d]),hasCustomAnchor:c,onCustomAnchorAdd:Ur.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Ur.useCallback(()=>u(!1),[]),modal:i,children:n})})};hse.displayName=tF;var bse="PopoverAnchor",$Ue=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(bse,n),o=Rv(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return Ur.useEffect(()=>(i(),()=>s()),[i,s]),(0,$a.jsx)(fd,{...o,...r,ref:t})});$Ue.displayName=bse;var yse="PopoverTrigger",Bse=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(yse,n),o=Rv(n),i=We(t,a.triggerRef),s=(0,$a.jsx)(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":vse(a.open),...r,ref:i,onClick:le(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:(0,$a.jsx)(fd,{asChild:!0,...o,children:s})});Bse.displayName=yse;var w5="PopoverPortal",[GUe,HUe]=fse(w5,{forceMount:void 0}),Cse=e=>{let{__scopePopover:t,forceMount:n,children:r,container:a}=e,o=sg(w5,t);return(0,$a.jsx)(GUe,{scope:t,forceMount:n,children:(0,$a.jsx)(qn,{present:n||o.open,children:(0,$a.jsx)(nA,{asChild:!0,container:a,children:r})})})};Cse.displayName=w5;var VB="PopoverContent",wse=Ur.forwardRef((e,t)=>{let n=HUe(VB,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=sg(VB,e.__scopePopover);return(0,$a.jsx)(qn,{present:r||o.open,children:o.modal?(0,$a.jsx)(qUe,{...a,ref:t}):(0,$a.jsx)(zUe,{...a,ref:t})})});wse.displayName=VB;var UUe=ys("PopoverContent.RemoveScroll"),qUe=Ur.forwardRef((e,t)=>{let n=sg(VB,e.__scopePopover),r=Ur.useRef(null),a=We(t,r),o=Ur.useRef(!1);return Ur.useEffect(()=>{let i=r.current;if(i)return rg(i)},[]),(0,$a.jsx)(Ld,{as:UUe,allowPinchZoom:!0,children:(0,$a.jsx)(Ese,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,i=>{i.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,A=s.button===0&&s.ctrlKey===!0,c=s.button===2||A;o.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:le(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),zUe=Ur.forwardRef((e,t)=>{let n=sg(VB,e.__scopePopover),r=Ur.useRef(!1),a=Ur.useRef(!1);return(0,$a.jsx)(Ese,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let i=o.target;n.triggerRef.current?.contains(i)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),Ese=Ur.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:c,onInteractOutside:u,...l}=e,d=sg(VB,n),p=Rv(n);return ng(),(0,$a.jsx)(Rd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,$a.jsx)($A,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:A,onFocusOutside:c,onDismiss:()=>d.onOpenChange(!1),children:(0,$a.jsx)(Nm,{"data-state":vse(d.open),role:"dialog",id:d.contentId,...p,...l,ref:t,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),kse="PopoverClose",YUe=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=sg(kse,n);return(0,$a.jsx)(ke.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>a.onOpenChange(!1))})});YUe.displayName=kse;var KUe="PopoverArrow",WUe=Ur.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=Rv(n);return(0,$a.jsx)(Pm,{...a,...r,ref:t})});WUe.displayName=KUe;function vse(e){return e?"open":"closed"}var Ise=hse;var Qse=Bse,xse=Cse,E5=wse;var k5=k(N(),1),Qr=Ise,xr=Qse;var dr=_se.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>(0,k5.jsx)(xse,{children:(0,k5.jsx)(E5,{ref:a,align:t,sideOffset:n,className:G("z-[10000] w-72 rounded-md border border-muted bg-popover p-4 text-popover-foreground shadow-lg outline-none 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),...r})}));dr.displayName=E5.displayName;var Lv=k(U(),1);var $d=k(N(),1),VUe=["#ef4444","#f59e0b","#84cc16","#22c55e","#10b981","#06b6d4","#3b82f6","#a855f7"],ZB="#00FF5F";function XB({onChange:e,defaultColor:t,defaultInput:n}){let[r,a]=(0,Lv.useState)(n??ZB),[o,i]=(0,Lv.useState)(t??ZB);(0,Lv.useEffect)(()=>{i(t||ZB),i(n||ZB)},[t,n]);let s=u=>/^#[0-9A-F]{6}$/i.test(u),A=u=>{let l=u.target.value;s(l)&&(a(l),i(l),e(l))},c=u=>{a(u),i(u),e(u)};return(0,$d.jsxs)("div",{className:"mx-auto w-full max-w-md px-2 py-1",children:[(0,$d.jsxs)("div",{className:"relative w-full",children:[(0,$d.jsx)(Rt,{className:"w-full rounded-lg",type:"text",value:r,onChange:A,placeholder:"#00FF5F"}),(0,$d.jsx)("div",{className:"absolute bottom-0 right-2 top-0 my-auto flex h-5 w-5 items-center justify-center rounded-sm",style:{backgroundColor:s(r)?r:o},children:(0,$d.jsx)("input",{onChange:u=>{s(u.target.value)&&(a(u.target.value),e(u.target.value))},className:"relative h-5 w-5 cursor-default opacity-0",type:"color"})})]}),(0,$d.jsx)("div",{className:"mt-4 grid grid-cols-8 gap-2",children:VUe.map(u=>(0,$d.jsx)("button",{onClick:()=>c(u),className:"aspect-square w-full cursor-default rounded-sm border border-[1px] border-muted-foreground/25 focus:outline-none focus:ring-2 focus:ring-blue-500",style:{backgroundColor:u},"aria-label":`Select color ${u}`},u))})]})}var Xo=[];for(let e=0;e<256;++e)Xo.push((e+256).toString(16).slice(1));function Dse(e,t=0){return(Xo[e[t+0]]+Xo[e[t+1]]+Xo[e[t+2]]+Xo[e[t+3]]+"-"+Xo[e[t+4]]+Xo[e[t+5]]+"-"+Xo[e[t+6]]+Xo[e[t+7]]+"-"+Xo[e[t+8]]+Xo[e[t+9]]+"-"+Xo[e[t+10]]+Xo[e[t+11]]+Xo[e[t+12]]+Xo[e[t+13]]+Xo[e[t+14]]+Xo[e[t+15]]).toLowerCase()}var v5,ZUe=new Uint8Array(16);function I5(){if(!v5){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");v5=crypto.getRandomValues.bind(crypto)}return v5(ZUe)}var XUe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Q5={randomUUID:XUe};function eqe(e,t,n){if(Q5.randomUUID&&!t&&!e)return Q5.randomUUID();e=e||{};let r=e.random??e.rng?.()??I5();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let a=0;a<16;++a)t[n+a]=r[a];return t}return Dse(r)}var Gd=eqe;var zn=k(N(),1),Fse=({onClose:e,label:t="Label Preview"})=>{let[n,r]=(0,Ag.useState)(t),[a,o]=(0,Ag.useState)(""),[i,s]=(0,Ag.useState)("#00FF5F"),[A,c]=(0,Ag.useState)(!1),u=X(p=>p.saveQueryLabel),{toast:l}=Io();(0,Ag.useEffect)(()=>{r(t)},[t]),(0,Ag.useEffect)(()=>{c(n!==""&&n!=="Label Preview")},[n,i]);let d=()=>{let p={id:Gd(),name:n,description:a,color:i};u(p),l({title:`${n} successfully created`}),e&&e(!1)};return(0,zn.jsxs)(tl,{children:[(0,zn.jsxs)(Pd,{children:[(0,zn.jsx)(jd,{className:"text-lg font-medium",children:"Create label"}),(0,zn.jsx)(Od,{})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,zn.jsx)("div",{className:"flex flex-col gap-2",children:(0,zn.jsx)("div",{className:"flex w-fit items-center",children:(0,zn.jsx)(Ds,{name:n.trim()!==""?n:"Label preview",color:i})})}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Name"}),(0,zn.jsx)(Rt,{value:n,onChange:p=>r(p.target.value),placeholder:"Name"})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Description"}),(0,zn.jsx)(Rt,{value:a,onChange:p=>o(p.target.value),placeholder:"Description (optional)"})]}),(0,zn.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,zn.jsx)(nr,{className:"border-none text-xs font-medium",children:"Color"}),(0,zn.jsxs)(Qr,{children:[(0,zn.jsx)(xr,{asChild:!0,children:(0,zn.jsxs)(de,{variant:"outline",className:"font-normal",children:[(0,zn.jsx)(Ad,{}),(0,zn.jsx)("span",{children:i})]})}),(0,zn.jsx)(dr,{children:(0,zn.jsx)(XB,{defaultInput:i,defaultColor:i,onChange:s})})]})]})]}),(0,zn.jsxs)(Td,{children:[(0,zn.jsx)(mse,{asChild:!0,children:(0,zn.jsx)(de,{variant:"outline",children:"Cancel"})}),(0,zn.jsx)(de,{disabled:!A,onClick:d,children:"Create"})]})]})};var _r=k(N(),1),eC=({setIsOpen:e,setItems:t,selectedItems:n,className:r})=>{let a=X(l=>l.savedQueryLabels),o=(0,Lh.useRef)(null),[i,s]=(0,Lh.useState)(""),[A,c]=(0,Lh.useState)(!1);(0,Lh.useEffect)(()=>{let l=d=>{o.current&&!o.current.contains(d.target)&&e(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[e]);let u=l=>{t(d=>{if(d.some(g=>g.name===l))return d.filter(g=>g.name!==l);{let g=a?.find(m=>m.name===l);if(g)return[...d,g]}return d})};return(0,_r.jsxs)(_h,{ref:o,className:r,children:[(0,_r.jsx)(Dh,{value:i,onValueChange:s,className:"w-full",placeholder:"Search labels"}),(0,_r.jsxs)(Fh,{className:"rounded-xl",children:[(0,_r.jsx)(Sh,{className:"my-3 items-center px-3 py-2",children:(0,_r.jsx)(Nd,{open:A,onOpenChange:c,children:(0,_r.jsxs)("div",{className:"flex w-full flex-col items-center gap-3",children:[(0,_r.jsx)("p",{className:"text-sm text-neutral-400",children:"No labels found."}),(0,_r.jsx)(JB,{asChild:!0,children:(0,_r.jsxs)(de,{className:"w-full font-normal",children:['Create label "',i,'"']})}),(0,_r.jsx)(Fse,{label:i,onClose:c})]})})}),(0,_r.jsx)(Rh,{children:a?.map(l=>{let d=n.some(p=>p.name===l.name);return(0,_r.jsxs)(ig,{value:l.name,onSelect:u,className:"flex flex-col items-start gap-2",children:[(0,_r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_r.jsx)(na,{className:G("transition-opacity",d?"opacity-100":"opacity-0")}),(0,_r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_r.jsx)("div",{className:"h-3 w-3 rounded-full",style:{backgroundColor:l.color}}),(0,_r.jsx)("span",{children:l.name})]})]}),(0,_r.jsx)("div",{className:"-mt-1 ml-7",children:(0,_r.jsx)("p",{className:"text-xs text-neutral-500",children:l.description})})]},l.id)})})]}),(0,_r.jsx)(de,{className:"rounded-[7px] border-none text-neutral-500 hover:text-primary",variant:"outline",size:"sm",asChild:!0,children:(0,_r.jsxs)("a",{href:"/labels",children:[(0,_r.jsx)(mk,{}),(0,_r.jsx)("span",{children:"Edit labels"})]})})]})};var tC=k(U(),1);var wi=k(N(),1),nC=({directory:e,setDirectory:t,dashboard:n,acceptsGlobal:r=!0,useDashboardProjectLocations:a=!1,className:o})=>{let[i,s]=(0,tC.useState)(""),A=(0,tC.useRef)(!1),c=a?n?.dashboardProjectLocations:n?.projects;return(0,tC.useLayoutEffect)(()=>{let u=()=>{r&&e!==""&&!a?s(c?.find(l=>l.path===e)?.readablePath??""):r&&e===""&&!a?s("Global"):!r&&a&&e===""&&s("Select a directory")};A.current||(A.current=!0,u())},[r,e,c,a]),(0,wi.jsxs)(Qr,{children:[(0,wi.jsx)(xr,{asChild:!0,children:(0,wi.jsxs)(de,{className:G("group flex h-10 w-full items-center justify-between rounded-lg border-[1px] border-muted bg-white text-muted-foreground shadow-none hover:bg-accent dark:bg-muted-foreground/5 dark:hover:bg-muted-foreground/10",o),children:[i,(0,wi.jsx)(Bs,{className:"text-foreground opacity-50 duration-300 group-data-[state=open]:-rotate-180"})]})}),(0,wi.jsx)(dr,{className:"max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0",children:(0,wi.jsxs)(_h,{defaultValue:r?"":void 0,children:[(0,wi.jsx)(Dh,{placeholder:"Directory"}),(0,wi.jsxs)(Fh,{children:[(0,wi.jsx)(Sh,{children:"Directory not found."}),(0,wi.jsx)(Rh,{children:c?.map(u=>u.readablePath==="~"&&r?(0,wi.jsxs)(ig,{value:"",className:"hover:bg-accent",onSelect:l=>{t(""),s("Global")},children:[(0,wi.jsx)(na,{className:G("mr-2 size-4",e===""?"opacity-100":"opacity-0")}),"Global"]},u.path):(0,wi.jsxs)(ig,{value:u.path,onSelect:l=>{t(l===e?"":l),s(r&&l===e?"Global":u.readablePath)},children:[(0,wi.jsx)(na,{className:G("mr-2 size-4",e===u.path?"opacity-100":"opacity-0")}),u.readablePath]},u.path))})]})]})})]})};var kt=k(N(),1),x5=async({navigate:e,updateErrorCause:t,updateQuery:n,updateStamp:r,item:a,context:o})=>{let i;try{i=await fetch("/select-project",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:o})})}catch(A){console.error(A),e("/error"),t("Failed to request project selection.");return}let s=!1;try{s=await i.json()==="ok"}catch(A){console.error(A)}s?(window.scrollTo(0,0),n(a.query),e("/explore"),r()):(e("/error"),t("Failed to select project."))},Sse=({item:e,handleSelect:t,checked:n,dashboard:r})=>{let a=Zt(),{toast:o}=Io(),[i,s]=(0,JA.useState)(!1),[A,c]=(0,JA.useState)(""),[u,l]=(0,JA.useState)(""),[,d]=(0,JA.useState)(!1),[p,g]=(0,JA.useState)(!1),[m,h]=(0,JA.useState)([]),[f,b]=(0,JA.useState)(""),y=X(M=>M.updateSavedQuery),w=X(M=>M.updateErrorCause),C=X(M=>M.updateQuery),B=X(M=>M.updateStamp);(0,JA.useEffect)(()=>{c(e.name),l(e.context),b(e.query),h(e.labels??[])},[e]);let E=(0,JA.useMemo)(()=>A!==""&&f!=="",[A,f]),v=()=>{s(!i)},x=()=>{let M={...e,name:A,context:u,query:f,dateModified:new Date().toISOString(),labels:m};y(M),s(!1),o({title:`${A} saved successfully`})},S=async()=>{await x5({navigate:a,updateErrorCause:w,updateQuery:C,updateStamp:B,item:e,context:e.context})};return(0,kt.jsxs)("div",{className:G("group flex flex-col rounded-xl border border-[1px] bg-card transition-colors transition-opacity hover:bg-card-accent",i?"border-muted-foreground":"border-muted"),children:[(0,kt.jsxs)("div",{className:"grid grid-cols-12 gap-4 px-3 py-2",children:[(0,kt.jsxs)("div",{className:"col-span-2 flex grow items-center gap-3",children:[(0,kt.jsx)(Sd,{checked:n,onCheckedChange:()=>t(e),className:G("border-muted-foreground/25 opacity-0 group-hover:border-muted-foreground/50 group-hover:opacity-100",n&&"opacity-100")}),(0,kt.jsx)("p",{className:"truncate text-sm font-medium",children:A.trim()!==""?A:"Query Name"})]}),(0,kt.jsx)("div",{className:"col-span-4 flex items-center",children:!i&&(0,kt.jsx)("p",{className:"w-[500px] truncate text-sm",children:f})}),(0,kt.jsx)("div",{className:"col-span-2 flex w-full items-center gap-2",children:(0,kt.jsx)(ct,{children:(0,kt.jsxs)(ut,{children:[(0,kt.jsx)(Bt,{className:"w-full truncate text-left text-sm",children:e.context.trim()===""?"Global":e.context}),(0,kt.jsx)(At,{children:e.context})]})})}),(0,kt.jsx)("div",{className:"col-span-2 flex items-center gap-2",children:m.map((M,j)=>(0,kt.jsx)(Ds,{name:M.name,color:M.color},j))}),(0,kt.jsxs)("div",{className:"col-span-2 flex items-center justify-end gap-4",children:[(0,kt.jsx)(de,{variant:"outline",className:"h-8 rounded-lg border border-[1px] border-muted-foreground/25 px-3 text-sm",onClick:v,children:i?"Close":"Edit"}),u.trim()!==""&&(0,kt.jsxs)(de,{variant:"outline",className:"h-8 rounded-lg border border-[1px] border-muted-foreground/25 px-3 text-sm",role:"link",onClick:()=>void S(),children:[(0,kt.jsx)("span",{children:"Run"}),(0,kt.jsx)(Hc,{})]})]})]}),i&&(0,kt.jsxs)("div",{className:"flex flex-col border-t-[1px] border-muted-foreground/25 px-3 py-2",children:[(0,kt.jsxs)("div",{className:"my-3 mb-6 flex gap-3",children:[(0,kt.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Name"}),(0,kt.jsx)(Rt,{type:"text",value:A,onChange:M=>c(M.target.value),placeholder:"Name",className:"rounded-lg"})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Query"}),(0,kt.jsx)(Rt,{type:"text",placeholder:"Query",value:f,onChange:M=>b(M.target.value),className:"w-full rounded-lg"})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(ct,{children:(0,kt.jsxs)(ut,{children:[(0,kt.jsxs)(Bt,{className:"inline-flex cursor-default items-center",children:[(0,kt.jsx)(nr,{className:"border-none text-sm font-medium",children:"Directory (optional)"}),(0,kt.jsx)(hi,{className:"text-muted-foreground",size:18})]}),(0,kt.jsx)(At,{children:"Set directory to 'Global' to reuse across all projects."})]})}),(0,kt.jsx)(nC,{dashboard:r,setDirectory:l,directory:u})]}),(0,kt.jsxs)("div",{className:"flex grow flex-col gap-2",children:[(0,kt.jsx)(nr,{className:"border-none text-sm",children:"Labels"}),(0,kt.jsxs)(Qr,{open:p,onOpenChange:g,children:[(0,kt.jsx)(xr,{asChild:!0,children:(0,kt.jsxs)(de,{variant:"outline",role:"combobox","aria-expanded":p,className:"w-full justify-between rounded-lg",children:["Select labels",(0,kt.jsx)(sd,{className:"opacity-50"})]})}),(0,kt.jsx)(dr,{className:"rounded-xl p-0",children:(0,kt.jsx)(eC,{className:"rounded-xl",selectedItems:m,setItems:h,setIsOpen:d})})]})]})]}),(0,kt.jsx)("div",{className:"mb-0.5 flex items-end justify-end",children:(0,kt.jsx)(de,{className:"rounded-lg",disabled:!E,onClick:x,variant:"default",size:"sm",children:"Save changes"})})]})]})};var VA=k(N(),1),Rse=()=>{let{isOnExploreView:e}=Koe(),t=Zt(),{open:n,setOpen:r}=Ju(),a=X(p=>p.savedQueries),o=X(p=>p.graph),i=X(p=>p.updateErrorCause),s=X(p=>p.updateQuery),A=X(p=>p.updateStamp),c=a?.filter(p=>p.context===o?.projectRoot),u=a?.filter(p=>!p.context.trim()),l=(p,g,m)=>({title:p,icon:m,items:g.map(h=>({title:h.name,onClick:()=>void d(h)}))}),d=async p=>{o&&await x5({navigate:t,updateErrorCause:i,updateQuery:s,updateStamp:A,item:p,context:p.context.trim()===""?o.projectRoot:p.context})};return!e()||!c||c.length===0&&!u||u?.length===0?null:(0,VA.jsxs)(VA.Fragment,{children:[(0,VA.jsx)(gP,{}),(0,VA.jsxs)(Dk,{children:[(0,VA.jsx)(hP,{className:"font-medium tracking-wide",children:"Queries"}),u&&u.length!==0&&(0,VA.jsx)(Tm,{children:(0,VA.jsx)(Xc,{onParentClick:()=>{n||r(!0)},items:[l("Global",u,Xy)]})}),c.length!==0&&(0,VA.jsx)(Tm,{children:(0,VA.jsx)(Xc,{onParentClick:()=>{n||r(!0)},items:[l("Project",c,Xy)]})})]})]})};var ZA=k(N(),1),Lse=(()=>{let e=document.cookie.split("; ").find(n=>n.startsWith("sidebar:state=")),[,t]=e?.split("=")??[];return t==="true"})(),Mse=()=>(0,ZA.jsxs)(lP,{className:"relative flex h-full grow",collapsible:"icon",variant:"inset",children:[(0,ZA.jsxs)(fP,{children:[(0,ZA.jsx)(Yoe,{}),(0,ZA.jsx)(Rse,{})]}),(0,ZA.jsx)(mP,{className:"mb-[0.875px]",children:(0,ZA.jsxs)(Tm,{children:[(0,ZA.jsx)(Xc,{items:zoe}),(0,ZA.jsx)($oe,{}),(0,ZA.jsx)(Hoe,{})]})}),(0,ZA.jsx)(dP,{})]});var Mh=k(U(),1);var Lt=k(U(),1),Pse=k(Gu(),1);var cg=k(U(),1);var nF=k(N(),1),tqe=k(U(),1);var nqe=k(N(),1);function ug(e){let t=e+"CollectionProvider",[n,r]=Cn(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:h,children:f}=m,b=cg.default.useRef(null),y=cg.default.useRef(new Map).current;return(0,nF.jsx)(a,{scope:h,itemMap:y,collectionRef:b,children:f})};i.displayName=t;let s=e+"CollectionSlot",A=ys(s),c=cg.default.forwardRef((m,h)=>{let{scope:f,children:b}=m,y=o(s,f),w=We(h,y.collectionRef);return(0,nF.jsx)(A,{ref:w,children:b})});c.displayName=s;let u=e+"CollectionItemSlot",l="data-radix-collection-item",d=ys(u),p=cg.default.forwardRef((m,h)=>{let{scope:f,children:b,...y}=m,w=cg.default.useRef(null),C=We(h,w),B=o(u,f);return cg.default.useEffect(()=>(B.itemMap.set(w,{ref:w,...y}),()=>void B.itemMap.delete(w))),(0,nF.jsx)(d,{[l]:"",ref:C,children:b})});p.displayName=u;function g(m){let h=o(e+"CollectionConsumer",m);return cg.default.useCallback(()=>{let b=h.collectionRef.current;if(!b)return[];let y=Array.from(b.querySelectorAll(`[${l}]`));return Array.from(h.itemMap.values()).sort((B,E)=>y.indexOf(B.ref.current)-y.indexOf(E.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},g,r]}var Dn=k(N(),1),R5="ToastProvider",[L5,rqe,aqe]=ug("Toast"),[Tse,xan]=Cn("Toast",[aqe]),[oqe,aF]=Tse(R5),jse=e=>{let{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:o=50,children:i}=e,[s,A]=Lt.useState(null),[c,u]=Lt.useState(0),l=Lt.useRef(!1),d=Lt.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${R5}\`. Expected non-empty \`string\`.`),(0,Dn.jsx)(L5.Provider,{scope:t,children:(0,Dn.jsx)(oqe,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:c,viewport:s,onViewportChange:A,onToastAdd:Lt.useCallback(()=>u(p=>p+1),[]),onToastRemove:Lt.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:i})})};jse.displayName=R5;var Ose="ToastViewport",iqe=["F8"],D5="toast.viewportPause",F5="toast.viewportResume",$se=Lt.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=iqe,label:a="Notifications ({hotkey})",...o}=e,i=aF(Ose,n),s=rqe(n),A=Lt.useRef(null),c=Lt.useRef(null),u=Lt.useRef(null),l=Lt.useRef(null),d=We(t,l,i.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;Lt.useEffect(()=>{let h=f=>{r.length!==0&&r.every(y=>f[y]||f.code===y)&&l.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),Lt.useEffect(()=>{let h=A.current,f=l.current;if(g&&h&&f){let b=()=>{if(!i.isClosePausedRef.current){let B=new CustomEvent(D5);f.dispatchEvent(B),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let B=new CustomEvent(F5);f.dispatchEvent(B),i.isClosePausedRef.current=!1}},w=B=>{!h.contains(B.relatedTarget)&&y()},C=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",b),h.addEventListener("focusout",w),h.addEventListener("pointermove",b),h.addEventListener("pointerleave",C),window.addEventListener("blur",b),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",b),h.removeEventListener("focusout",w),h.removeEventListener("pointermove",b),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",b),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=Lt.useCallback(({tabbingDirection:h})=>{let b=s().map(y=>{let w=y.ref.current,C=[w,...yqe(w)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?b.reverse():b).flat()},[s]);return Lt.useEffect(()=>{let h=l.current;if(h){let f=b=>{let y=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!y){let C=document.activeElement,B=b.shiftKey;if(b.target===h&&B){c.current?.focus();return}let x=m({tabbingDirection:B?"backwards":"forwards"}),S=x.findIndex(M=>M===C);_5(x.slice(S+1))?b.preventDefault():B?c.current?.focus():u.current?.focus()}};return h.addEventListener("keydown",f),()=>h.removeEventListener("keydown",f)}},[s,m]),(0,Dn.jsxs)(_ee,{ref:A,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,Dn.jsx)(S5,{ref:c,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"forwards"});_5(h)}}),(0,Dn.jsx)(L5.Slot,{scope:n,children:(0,Dn.jsx)(ke.ol,{tabIndex:-1,...o,ref:d})}),g&&(0,Dn.jsx)(S5,{ref:u,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"backwards"});_5(h)}})]})});$se.displayName=Ose;var Gse="ToastFocusProxy",S5=Lt.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,o=aF(Gse,n);return(0,Dn.jsx)(Qk,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!o.viewport?.contains(s)&&r()}})});S5.displayName=Gse;var Mv="Toast",sqe="toast.swipeStart",Aqe="toast.swipeMove",cqe="toast.swipeCancel",uqe="toast.swipeEnd",Hse=Lt.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:a,onOpenChange:o,...i}=e,[s,A]=Gr({prop:r,defaultProp:a??!0,onChange:o,caller:Mv});return(0,Dn.jsx)(qn,{present:n||s,children:(0,Dn.jsx)(pqe,{open:s,...i,ref:t,onClose:()=>A(!1),onPause:on(e.onPause),onResume:on(e.onResume),onSwipeStart:le(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(e.onSwipeMove,c=>{let{x:u,y:l}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:le(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(e.onSwipeEnd,c=>{let{x:u,y:l}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),A(!1)})})})});Hse.displayName=Mv;var[lqe,dqe]=Tse(Mv,{onClose(){}}),pqe=Lt.forwardRef((e,t)=>{let{__scopeToast:n,type:r="foreground",duration:a,open:o,onClose:i,onEscapeKeyDown:s,onPause:A,onResume:c,onSwipeStart:u,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:p,...g}=e,m=aF(Mv,n),[h,f]=Lt.useState(null),b=We(t,L=>f(L)),y=Lt.useRef(null),w=Lt.useRef(null),C=a||m.duration,B=Lt.useRef(0),E=Lt.useRef(C),v=Lt.useRef(0),{onToastAdd:x,onToastRemove:S}=m,M=on(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),i()}),j=Lt.useCallback(L=>{!L||L===1/0||(window.clearTimeout(v.current),B.current=new Date().getTime(),v.current=window.setTimeout(M,L))},[M]);Lt.useEffect(()=>{let L=m.viewport;if(L){let $=()=>{j(E.current),c?.()},I=()=>{let _=new Date().getTime()-B.current;E.current=E.current-_,window.clearTimeout(v.current),A?.()};return L.addEventListener(D5,I),L.addEventListener(F5,$),()=>{L.removeEventListener(D5,I),L.removeEventListener(F5,$)}}},[m.viewport,C,A,c,j]),Lt.useEffect(()=>{o&&!m.isClosePausedRef.current&&j(C)},[o,C,m.isClosePausedRef,j]),Lt.useEffect(()=>(x(),()=>S()),[x,S]);let O=Lt.useMemo(()=>h?Jse(h):null,[h]);return m.viewport?(0,Dn.jsxs)(Dn.Fragment,{children:[O&&(0,Dn.jsx)(mqe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:O}),(0,Dn.jsx)(lqe,{scope:n,onClose:M,children:Pse.createPortal((0,Dn.jsx)(L5.ItemSlot,{scope:n,children:(0,Dn.jsx)(xee,{asChild:!0,onEscapeKeyDown:le(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Dn.jsx)(ke.li,{tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:le(e.onKeyDown,L=>{L.key==="Escape"&&(s?.(L.nativeEvent),L.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:le(e.onPointerDown,L=>{L.button===0&&(y.current={x:L.clientX,y:L.clientY})}),onPointerMove:le(e.onPointerMove,L=>{if(!y.current)return;let $=L.clientX-y.current.x,I=L.clientY-y.current.y,_=!!w.current,R=["left","right"].includes(m.swipeDirection),F=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,Q=R?F(0,$):0,P=R?0:F(0,I),T=L.pointerType==="touch"?10:2,D={x:Q,y:P},z={originalEvent:L,delta:D};_?(w.current=D,rF(Aqe,l,z,{discrete:!1})):Nse(D,m.swipeDirection,T)?(w.current=D,rF(sqe,u,z,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs($)>T||Math.abs(I)>T)&&(y.current=null)}),onPointerUp:le(e.onPointerUp,L=>{let $=w.current,I=L.target;if(I.hasPointerCapture(L.pointerId)&&I.releasePointerCapture(L.pointerId),w.current=null,y.current=null,$){let _=L.currentTarget,R={originalEvent:L,delta:$};Nse($,m.swipeDirection,m.swipeThreshold)?rF(uqe,p,R,{discrete:!0}):rF(cqe,d,R,{discrete:!0}),_.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),mqe=e=>{let{__scopeToast:t,children:n,...r}=e,a=aF(Mv,t),[o,i]=Lt.useState(!1),[s,A]=Lt.useState(!1);return hqe(()=>i(!0)),Lt.useEffect(()=>{let c=window.setTimeout(()=>A(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Dn.jsx)(nA,{asChild:!0,children:(0,Dn.jsx)(Qk,{...r,children:o&&(0,Dn.jsxs)(Dn.Fragment,{children:[a.label," ",n]})})})},gqe="ToastTitle",Use=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,Dn.jsx)(ke.div,{...r,ref:t})});Use.displayName=gqe;var fqe="ToastDescription",qse=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,Dn.jsx)(ke.div,{...r,ref:t})});qse.displayName=fqe;var zse="ToastAction",Yse=Lt.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,Dn.jsx)(Wse,{altText:n,asChild:!0,children:(0,Dn.jsx)(M5,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${zse}\`. Expected non-empty \`string\`.`),null)});Yse.displayName=zse;var Kse="ToastClose",M5=Lt.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,a=dqe(Kse,n);return(0,Dn.jsx)(Wse,{asChild:!0,children:(0,Dn.jsx)(ke.button,{type:"button",...r,ref:t,onClick:le(e.onClick,a.onClose)})})});M5.displayName=Kse;var Wse=Lt.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...a}=e;return(0,Dn.jsx)(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Jse(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),bqe(r)){let a=r.ariaHidden||r.hidden||r.style.display==="none",o=r.dataset.radixToastAnnounceExclude==="";if(!a)if(o){let i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Jse(r))}}),t}function rF(e,t,n,{discrete:r}){let a=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?rB(a,o):a.dispatchEvent(o)}var Nse=(e,t,n=0)=>{let r=Math.abs(e.x),a=Math.abs(e.y),o=r>a;return t==="left"||t==="right"?o&&r>n:!o&&a>n};function hqe(e=()=>{}){let t=on(e);hn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function bqe(e){return e.nodeType===e.ELEMENT_NODE}function yqe(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _5(e){let t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var Vse=jse,N5=$se,P5=Hse,T5=Use,j5=qse,O5=Yse,$5=M5;var lg=k(N(),1),Zse=Vse,G5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(N5,{ref:n,className:G("fixed top-0 z-[10001] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));G5.displayName=N5.displayName;var Cqe=wa("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),H5=Mh.forwardRef(({className:e,variant:t,...n},r)=>(0,lg.jsx)(P5,{ref:r,className:G(Cqe({variant:t}),e),...n}));H5.displayName=P5.displayName;var wqe=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(O5,{ref:n,className:G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));wqe.displayName=O5.displayName;var U5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)($5,{ref:n,className:G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,lg.jsx)(ld,{className:"h-4 w-4"})}));U5.displayName=$5.displayName;var q5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(T5,{ref:n,className:G("text-sm font-semibold",e),...t}));q5.displayName=T5.displayName;var z5=Mh.forwardRef(({className:e,...t},n)=>(0,lg.jsx)(j5,{ref:n,className:G("text-sm opacity-90",e),...t}));z5.displayName=j5.displayName;var Hd=k(N(),1);function Xse(){let{toasts:e}=Io();return(0,Hd.jsxs)(Zse,{children:[e.map(function({id:t,title:n,description:r,action:a,...o}){return(0,Hd.jsxs)(H5,{...o,children:[(0,Hd.jsxs)("div",{className:"grid gap-1",children:[n&&(0,Hd.jsx)(q5,{children:n}),r&&(0,Hd.jsx)(z5,{children:r})]}),a,(0,Hd.jsx)(U5,{})]},t)}),(0,Hd.jsx)(G5,{})]})}var Lpe=k(U(),1);var oF=Z("Vlt",[["path",{d:"M8.66659 6.33329C8.66659 6.68925 8.61079 7.03216 8.50747 7.35379C8.21694 8.2582 7.99884 9.28798 8.47332 10.1109L10.6593 13.9022C10.9243 14.3618 11.4692 14.5626 11.9997 14.5626C12.5304 14.5626 13.0755 14.3617 13.3406 13.902L15.5265 10.1108C16.001 9.28787 15.7829 8.25813 15.4924 7.35374C15.389 7.03215 15.3333 6.68925 15.3333 6.33332C15.3333 4.49239 16.8257 3.00003 18.6666 3.00003C20.5075 3.00003 21.9999 4.49239 21.9999 6.33332C21.9999 8.17424 20.5075 9.66661 18.6666 9.66661C18.1358 9.66661 17.5906 9.86748 17.3254 10.3273L15.1397 14.1182C14.6652 14.9411 14.8834 15.971 15.1739 16.8754C15.2772 17.197 15.333 17.54 15.333 17.8959C15.333 19.7368 13.8406 21.2292 11.9997 21.2292C10.1588 21.2292 8.66644 19.7368 8.66644 17.8959C8.66644 17.5399 8.72226 17.1969 8.8256 16.8752C9.1162 15.9708 9.33437 14.9409 8.85984 14.1179L6.67422 10.3272C6.40911 9.86744 5.86403 9.66659 5.33329 9.66659C3.49237 9.66659 2 8.17422 2 6.33329C2 4.49237 3.49237 3 5.33329 3C7.17422 3 8.66659 4.49237 8.66659 6.33329Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var eAe=Z("Vsr",[["path",{d:"M13.714 6.85711C13.714 7.80388 12.9465 8.57139 11.9997 8.57139C11.9634 8.57139 11.9274 8.57027 11.8917 8.56805C11.3917 8.53695 10.8334 8.55884 10.4791 8.91307L8.49791 10.8943C8.38627 11.0059 8.36954 11.1773 8.43201 11.3223V11.3223C8.49296 11.4638 8.62483 11.5714 8.77891 11.5714H14.6517C15.1406 11.5714 15.5446 11.2096 15.8732 10.8477C16.1869 10.5025 16.6394 10.2857 17.1426 10.2857C18.0894 10.2857 18.8569 11.0532 18.8569 12C18.8569 12.9467 18.0894 13.7143 17.1426 13.7143C17.1095 13.7143 17.0766 13.7133 17.044 13.7115C16.5484 13.6834 15.9964 13.7082 15.6454 14.0592L14.059 15.6456C13.7079 15.9967 13.6831 16.5486 13.7112 17.0443C13.7131 17.0769 13.714 17.1097 13.714 17.1428C13.714 18.0896 12.9465 18.8571 11.9997 18.8571C11.0529 18.8571 10.2854 18.0896 10.2854 17.1428C10.2854 16.196 11.0529 15.4285 11.9997 15.4285C12.049 15.4285 12.0977 15.4306 12.1459 15.4347C12.6638 15.4784 13.2488 15.4692 13.6163 15.1017L15.512 13.206C15.642 13.076 15.6565 12.8748 15.5806 12.7073V12.7073C15.5091 12.5498 15.3614 12.4285 15.1884 12.4285H9.34772C8.85885 12.4285 8.45489 12.7903 8.12619 13.1522C7.81259 13.4975 7.36004 13.7143 6.85686 13.7143C5.91009 13.7143 5.14258 12.9467 5.14258 12C5.14258 11.0532 5.91009 10.2857 6.85686 10.2857C6.90304 10.2857 6.94878 10.2875 6.99403 10.2911C7.50763 10.3317 8.08622 10.3194 8.45053 9.95507L9.95483 8.45077C10.3191 8.08647 10.3315 7.50787 10.2908 6.99428C10.2873 6.94903 10.2854 6.90328 10.2854 6.85711C10.2854 5.91033 11.0529 5.14282 11.9997 5.14282C12.9465 5.14282 13.714 5.91033 13.714 6.85711Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var tAe=Z("VltClient",[["path",{d:"M11.1424 6.85711C11.1424 6.88482 11.1418 6.91238 11.1405 6.93977C11.1173 7.42818 11.1468 7.96964 11.4925 8.31539L13.1127 9.93559C13.4585 10.2813 13.9999 10.3108 14.4883 10.2876C14.5157 10.2863 14.5433 10.2857 14.571 10.2857C15.5178 10.2857 16.2853 11.0532 16.2853 12C16.2853 12.9467 15.5178 13.7143 14.571 13.7143C14.5433 13.7143 14.5157 13.7136 14.4883 13.7123C13.9999 13.6891 13.4585 13.7186 13.1127 14.0643L11.4925 15.6845C11.1468 16.0303 11.1173 16.5718 11.1405 17.0602C11.1418 17.0876 11.1424 17.1151 11.1424 17.1428C11.1424 18.0896 10.3749 18.8571 9.42815 18.8571C8.48138 18.8571 7.71387 18.0896 7.71387 17.1428C7.71387 16.196 8.48138 15.4285 9.42815 15.4285C9.45587 15.4285 9.48343 15.4292 9.51082 15.4305C9.99923 15.4537 10.5407 15.4242 10.8864 15.0784L12.5066 13.4583C12.8524 13.1125 12.8819 12.571 12.8587 12.0826C12.8574 12.0552 12.8567 12.0277 12.8567 12C12.8567 11.9723 12.8574 11.9447 12.8587 11.9173C12.8819 11.4289 12.8524 10.8874 12.5066 10.5417L10.8864 8.92148C10.5407 8.57574 9.99923 8.54625 9.51082 8.56944C9.48343 8.57074 9.45587 8.57139 9.42815 8.57139C8.48138 8.57139 7.71387 7.80388 7.71387 6.85711C7.71387 5.91033 8.48138 5.14282 9.42815 5.14282C10.3749 5.14282 11.1424 5.91033 11.1424 6.85711Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Han=Z("Sidebar",[["path",{d:"M9.35719 3H14.6428C15.7266 2.99999 16.6007 2.99998 17.3086 3.05782C18.0375 3.11737 18.6777 3.24318 19.27 3.54497C20.2108 4.02433 20.9757 4.78924 21.455 5.73005C21.7568 6.32234 21.8826 6.96253 21.9422 7.69138C22 8.39925 22 9.27339 22 10.3572V13.6428C22 14.7266 22 15.6008 21.9422 16.3086C21.8826 17.0375 21.7568 17.6777 21.455 18.27C20.9757 19.2108 20.2108 19.9757 19.27 20.455C18.6777 20.7568 18.0375 20.8826 17.3086 20.9422C16.6008 21 15.7266 21 14.6428 21H9.35717C8.27339 21 7.39925 21 6.69138 20.9422C5.96253 20.8826 5.32234 20.7568 4.73005 20.455C3.78924 19.9757 3.02433 19.2108 2.54497 18.27C2.24318 17.6777 2.11737 17.0375 2.05782 16.3086C1.99998 15.6007 1.99999 14.7266 2 13.6428V10.3572C1.99999 9.27341 1.99998 8.39926 2.05782 7.69138C2.11737 6.96253 2.24318 6.32234 2.54497 5.73005C3.02433 4.78924 3.78924 4.02433 4.73005 3.54497C5.32234 3.24318 5.96253 3.11737 6.69138 3.05782C7.39926 2.99998 8.27341 2.99999 9.35719 3ZM6.85424 5.05118C6.24907 5.10062 5.90138 5.19279 5.63803 5.32698C5.07354 5.6146 4.6146 6.07354 4.32698 6.63803C4.19279 6.90138 4.10062 7.24907 4.05118 7.85424C4.00078 8.47108 4 9.26339 4 10.4V13.6C4 14.7366 4.00078 15.5289 4.05118 16.1458C4.10062 16.7509 4.19279 17.0986 4.32698 17.362C4.6146 17.9265 5.07354 18.3854 5.63803 18.673C5.90138 18.8072 6.24907 18.8994 6.85424 18.9488C7.47108 18.9992 8.26339 19 9.4 19H14.6C15.7366 19 16.5289 18.9992 17.1458 18.9488C17.7509 18.8994 18.0986 18.8072 18.362 18.673C18.9265 18.3854 19.3854 17.9265 19.673 17.362C19.8072 17.0986 19.8994 16.7509 19.9488 16.1458C19.9992 15.5289 20 14.7366 20 13.6V10.4C20 9.26339 19.9992 8.47108 19.9488 7.85424C19.8994 7.24907 19.8072 6.90138 19.673 6.63803C19.3854 6.07354 18.9265 5.6146 18.362 5.32698C18.0986 5.19279 17.7509 5.10062 17.1458 5.05118C16.5289 5.00078 15.7366 5 14.6 5H9.4C8.26339 5 7.47108 5.00078 6.85424 5.05118ZM7 7C7.55229 7 8 7.44772 8 8V16C8 16.5523 7.55229 17 7 17C6.44772 17 6 16.5523 6 16V8C6 7.44772 6.44772 7 7 7Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var zan=Z("ViewOptions",[["path",{d:"M17 16V18H7V16H17ZM20 13V11C20 9.34315 18.6569 8 17 8H7C5.34315 8 4 9.34315 4 11V13C4 14.6569 5.34315 16 7 16V18C4.23858 18 2 15.7614 2 13V11C2 8.32472 4.10111 6.14053 6.74316 6.00684L7 6H17L17.2568 6.00684C19.8989 6.14053 22 8.32472 22 11V13L21.9932 13.2568C21.8595 15.8989 19.6753 18 17 18V16C18.6569 16 20 14.6569 20 13Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8 12C8 12.5523 7.55228 13 7 13C6.44772 13 6 12.5523 6 12C6 11.4477 6.44772 11 7 11C7.55228 11 8 11.4477 8 12Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M18 12C18 12.5523 17.5523 13 17 13C16.4477 13 16 12.5523 16 12C16 11.4477 16.4477 11 17 11C17.5523 11 18 11.4477 18 12Z",key:"4",fill:"currentColor",strokeWidth:"0"}]]);var nAe=Z("Github",[["path",{d:"M12 2.04932C6.475 2.04932 2 6.52432 2 12.0493C2 16.4743 4.8625 20.2118 8.8375 21.5368C9.3375 21.6243 9.525 21.3243 9.525 21.0618C9.525 20.8243 9.5125 20.0368 9.5125 19.1993C7 19.6618 6.35 18.5868 6.15 18.0243C6.0375 17.7368 5.55 16.8493 5.125 16.6118C4.775 16.4243 4.275 15.9618 5.1125 15.9493C5.9 15.9368 6.4625 16.6743 6.65 16.9743C7.55 18.4868 8.9875 18.0618 9.5625 17.7993C9.65 17.1493 9.9125 16.7118 10.2 16.4618C7.975 16.2118 5.65 15.3493 5.65 11.5243C5.65 10.4368 6.0375 9.53682 6.675 8.83682C6.575 8.58682 6.225 7.56182 6.775 6.18682C6.775 6.18682 7.6125 5.92432 9.525 7.21182C10.325 6.98682 11.175 6.87432 12.025 6.87432C12.875 6.87432 13.725 6.98682 14.525 7.21182C16.4375 5.91182 17.275 6.18682 17.275 6.18682C17.825 7.56182 17.475 8.58682 17.375 8.83682C18.0125 9.53682 18.4 10.4243 18.4 11.5243C18.4 15.3618 16.0625 16.2118 13.8375 16.4618C14.2 16.7743 14.5125 17.3743 14.5125 18.3118C14.5125 19.6493 14.5 20.7243 14.5 21.0618C14.5 21.3243 14.6875 21.6368 15.1875 21.5368C19.1375 20.2118 22 16.4618 22 12.0493C22 6.52432 17.525 2.04932 12 2.04932Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Eqe=k(N(),1);var kqe=k(N(),1);var vqe=k(N(),1);var iF=Z("Bun",[["path",{d:"M11.9999 20.6599C17.5231 20.6599 21.9999 17.0447 21.9999 12.5863C21.9999 9.82179 20.2859 7.37988 17.6509 5.93162C16.5787 5.33577 15.7363 4.80093 15.0352 4.35634C13.7148 3.5173 12.9 3 11.9999 3C11.0857 3 10.0553 3.65435 8.69476 4.51762C7.92829 5.01459 7.14565 5.48618 6.34813 5.93162C3.71401 7.37988 2 9.82179 2 12.5863C2 17.0447 6.47683 20.6599 11.9999 20.6599ZM10.8325 5.75947C11.1105 5.1267 11.252 4.44243 11.2478 3.75129C11.2478 3.63095 11.4158 3.59585 11.4392 3.72789C11.9874 6.04695 10.6871 7.19603 9.72518 7.58045C9.62155 7.62057 9.55887 7.48017 9.6391 7.40663C10.1499 6.94905 10.5568 6.38741 10.8325 5.75947ZM12.5473 5.67423C12.4682 4.99468 12.2461 4.33959 11.8955 3.75213V3.73959C11.8387 3.6368 11.9674 3.5198 12.0501 3.59585C13.6847 5.35499 13.139 6.9846 12.5131 7.80525C12.4445 7.89049 12.3217 7.80275 12.3559 7.69996C12.5614 7.04567 12.6266 6.35542 12.5473 5.67423ZM14.0273 5.20707C13.6921 4.61538 13.2342 4.10221 12.6844 3.70198V3.69029C12.5908 3.61925 12.6643 3.4613 12.7788 3.5081C14.9416 4.414 15.0903 6.1581 14.8279 7.18099C14.8226 7.20516 14.8083 7.22639 14.7878 7.24032C14.768 7.25434 14.7434 7.25992 14.7194 7.25585C14.6954 7.25178 14.6741 7.23838 14.66 7.2186C14.6453 7.1986 14.6388 7.17384 14.6416 7.14923C14.5751 6.46597 14.3659 5.80429 14.0273 5.20707ZM9.78869 5.67423C9.2739 6.12885 8.71983 6.30769 8.06883 6.50742C7.97189 6.50742 7.9067 6.44223 7.93929 6.35699C9.39926 5.59902 9.91906 4.98227 10.438 4.04128C10.438 4.04128 10.5676 3.9435 10.5951 4.11231C10.5951 4.36553 10.3043 5.21961 9.78869 5.67423ZM13.9095 15.0382C13.7911 15.5409 13.5178 15.9937 13.1281 16.3327C12.8396 16.6209 12.462 16.803 12.0568 16.8492C11.6396 16.8101 11.2488 16.6276 10.9511 16.3327C10.5652 15.9923 10.2955 15.5396 10.1798 15.0382C10.176 15.0085 10.1789 14.9784 10.1881 14.9499C10.1974 14.9214 10.2128 14.8954 10.2333 14.8736C10.2538 14.8523 10.2789 14.836 10.3068 14.826C10.3346 14.816 10.3644 14.8125 10.3937 14.8159H13.6981C13.7273 14.8126 13.7568 14.8162 13.7844 14.8264C13.812 14.8365 13.8368 14.853 13.8569 14.8744C13.8773 14.8961 13.8926 14.922 13.9017 14.9503C13.9108 14.9787 13.9135 15.0087 13.9095 15.0382ZM9.36081 13.2247C9.05905 13.4311 8.69392 13.5238 8.33025 13.4865C7.96659 13.4492 7.62791 13.2842 7.37436 13.0208C7.11619 12.753 6.95639 12.4056 6.92103 12.0353C6.88567 11.665 6.97683 11.2936 7.17965 10.9817C7.35264 10.716 7.59917 10.5096 7.88665 10.3876C8.17366 10.2653 8.49106 10.2332 8.79672 10.2956C9.10175 10.3583 9.38254 10.5129 9.60233 10.7385C9.82295 10.9642 9.97254 11.2533 10.0327 11.5659C10.0934 11.8795 10.0621 12.204 9.94246 12.5002C9.82401 12.7934 9.62168 13.046 9.36081 13.2247ZM16.44 13.2289C16.1378 13.4339 15.7727 13.5253 15.4095 13.4867C15.0463 13.4482 14.7085 13.2822 14.4561 13.0183C14.162 12.7125 13.9984 12.3044 13.9998 11.8801C13.9998 11.56 14.0917 11.2467 14.2664 10.9809C14.4393 10.7151 14.6859 10.5079 14.9742 10.3867C15.2616 10.2649 15.5793 10.2334 15.8851 10.2965C16.191 10.36 16.4718 10.5146 16.6915 10.7419C16.9113 10.9692 17.0592 11.2575 17.1194 11.5717C17.1788 11.8858 17.146 12.2103 17.025 12.506C16.9055 12.7994 16.702 13.0509 16.44 13.2289Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),eon=Z("BunWordmark",[["path",{d:"M5.58371 15.4622C3.3392 15.4622 2.10242 15.1495 2.04691 15.0801C1.98436 13.1512 1.98436 11.2208 2.04691 9.29187C2.10242 9.22938 3.3324 9 5.58371 9C7.67518 9 8.47428 9.77129 8.47428 10.6955C8.47428 11.2931 8.11295 11.8351 7.39028 12.1478V12.252C8.25893 12.3146 8.68275 12.8843 8.68275 13.5305C8.68275 14.5242 7.67527 15.4622 5.58371 15.4622ZM4.15921 11.8629L5.51416 11.8698C5.9589 11.8004 6.25774 11.5571 6.25774 11.1819C6.25774 10.7094 5.9033 10.4523 5.27101 10.4523C4.72901 10.4523 4.31905 10.5426 4.16618 10.6608C4.15921 11.0569 4.15921 11.4667 4.15921 11.8629ZM5.27798 13.8572C5.91027 13.8572 6.29243 13.5723 6.29243 13.0859C6.29243 12.6898 5.97973 12.4535 5.51416 12.4396L4.15921 12.4327C4.15921 12.8356 4.15921 13.2386 4.16618 13.6348C4.31207 13.7598 4.72901 13.8572 5.27798 13.8572ZM15.2134 10.2091C15.269 11.8975 15.269 13.5027 15.2134 15.1565C14.5742 15.2607 13.8932 15.2607 13.254 15.1565L13.0594 13.9822H12.9343C12.6842 15.0036 12.1422 15.3233 11.3013 15.3233C9.599 15.3233 9.2863 13.9336 9.2863 12.2242C9.2863 11.7934 9.30016 11.2028 9.30016 10.2091C10.0511 10.0979 10.8144 10.0979 11.5654 10.2091V12.6828C11.5654 13.3916 11.9267 13.6556 12.3575 13.6556C12.6633 13.6556 12.9829 13.5027 13.1428 13.2456V10.2091C13.8285 10.0979 14.5277 10.0979 15.2134 10.2091ZM16.0729 15.1565C16.0173 13.468 16.0173 11.8629 16.0729 10.2091C16.7121 10.1048 17.3931 10.1048 18.0324 10.2091L18.2269 11.3834H18.352C18.6021 10.362 19.1441 10.0423 19.985 10.0423C21.6874 10.0423 22 11.4321 22 13.1414C22 13.5723 21.9861 14.1629 21.9861 15.1565C21.2352 15.2677 20.4719 15.2677 19.7209 15.1565V12.6828C19.7209 11.9741 19.3596 11.71 18.9288 11.71C18.623 11.71 18.3034 11.8629 18.1435 12.12V15.1565C17.4578 15.2677 16.7586 15.2677 16.0729 15.1565Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var sF=Z("Deno",[["path",{d:"M12.439 1.95705C17.9669 2.2142 22.2462 6.911 21.989 12.439C21.7319 17.9669 17.0351 22.2461 11.5071 21.989C5.97916 21.7318 1.6999 17.0351 1.95705 11.5071C2.2142 5.97915 6.911 1.6999 12.439 1.95705ZM14.7833 14.0305C14.1504 13.9993 13.5256 13.8936 13.0233 13.8096C12.6413 13.7457 12.279 13.645 11.9816 13.5429C11.933 13.5255 11.8788 13.5417 11.8479 13.583C11.817 13.6242 11.8126 13.6842 11.8471 13.7225C11.9875 13.8782 12.4328 14.2027 12.7788 14.3517C12.483 14.5959 12.2807 15.1543 12.201 15.4434C12.094 15.8313 12.0788 16.3915 12.1047 16.597C12.2089 17.424 12.513 18.1652 13.266 18.8135C13.793 19.2673 14.5558 19.5775 15.3353 19.5914C16.411 19.6106 17.6997 19.1484 18.7113 18.1096C20.0339 16.6596 20.9004 14.7742 21.0613 12.6675C21.4443 7.65129 17.6828 3.26778 12.6665 2.88475C7.65033 2.50172 3.26681 6.2633 2.88378 11.2795C2.68541 13.8773 3.59862 16.3054 5.22219 18.0959C5.2674 18.1451 5.34032 18.157 5.39885 18.1249C5.45739 18.0928 5.48644 18.0248 5.46923 17.9603C4.2652 13.2441 6.87711 8.15373 9.79245 6.54265C10.8748 5.94449 11.929 5.71711 12.8762 6.10014C14.3263 6.68651 15.1554 7.6587 16.9502 8.47641C18.745 9.29407 18.9391 10.6572 18.4388 12.0354C17.9385 13.4136 16.3265 14.1062 14.7833 14.0305ZM11.6428 6.73553C11.0546 6.78156 10.6684 7.50958 10.6178 7.97793C10.567 8.44623 10.7995 9.21917 11.5659 9.20408C12.4634 9.1864 12.7361 8.41813 12.6376 7.67475C12.5637 7.11645 12.1345 6.69699 11.6428 6.73553Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),ron=Z("DenoWordmark",[["path",{d:"M11.7911 11.5266C11.7911 11.6902 11.7911 11.9255 11.7603 12.0073H8.25184C8.41547 12.6006 8.88602 12.9689 9.53042 12.9689C10.0624 12.9791 10.4511 12.7439 10.7272 12.4063L11.5967 13.2144C11.1671 13.7566 10.4409 14.1555 9.43839 14.1555C7.97569 14.1555 6.87096 13.1326 6.87096 11.5675C6.87096 10.0537 7.92452 9 9.34635 9C10.809 9 11.7911 10.0639 11.7911 11.5266ZM9.38719 10.1763C8.84518 10.1763 8.41547 10.473 8.26204 11.0458H10.4613C10.3283 10.5242 9.9703 10.1763 9.38719 10.1763ZM15.3097 9C16.3838 9 17.1304 9.57294 17.1304 11.1072V14.0737H15.7904V11.4447C15.7904 10.4934 15.453 10.1969 14.829 10.1969C14.154 10.1969 13.6936 10.6673 13.6936 11.5573V14.0737H12.3536V9.08184H13.6936V9.72637H13.714C14.1231 9.24564 14.6961 9 15.3097 9ZM20.2811 14.1555C18.6956 14.1555 17.6319 13.0712 17.6319 11.5778C17.6319 10.0843 18.6956 9 20.2811 9C21.8359 9 22.9407 10.0435 22.9407 11.5778C22.9407 13.112 21.8359 14.1555 20.2811 14.1555ZM20.2811 12.9586C21.0071 12.9586 21.5802 12.3858 21.5802 11.5778C21.5802 10.7595 21.0279 10.1969 20.2811 10.1969C19.5036 10.1969 18.982 10.7901 18.982 11.5778C18.982 12.3552 19.5241 12.9586 20.2811 12.9586ZM2 14.0737V9H3.83416C5.4391 9 6.47082 10.0433 6.47082 11.544C6.47082 13.0375 5.50359 14.0737 3.85568 14.0737H2ZM3.31833 12.866H3.76255C4.53635 12.866 5.04503 12.2729 5.04503 11.544C5.04503 10.7865 4.52917 10.2077 3.86283 10.2077H3.31833V12.866Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var Nh=Z("Node",[["path",{d:"M11.8751 22C11.5993 22 11.3423 21.9266 11.1032 21.7977L8.65943 20.3461C8.29224 20.1437 8.47584 20.0703 8.58599 20.0336C9.08209 19.8679 9.17428 19.8312 9.68835 19.5375C9.74382 19.5008 9.81725 19.5187 9.87194 19.5562L11.7462 20.6773C11.8196 20.7141 11.9118 20.7141 11.9665 20.6773L19.2978 16.4328C19.3713 16.396 19.408 16.3226 19.408 16.2304V7.76002C19.408 7.66783 19.3713 7.59439 19.2978 7.55767L11.9665 3.33185C11.8931 3.29513 11.8009 3.29513 11.7462 3.33185L4.41486 7.55767C4.34142 7.59439 4.3047 7.68658 4.3047 7.76002V16.2304C4.3047 16.3039 4.34142 16.396 4.41486 16.4328L6.418 17.5906C7.50239 18.1422 8.18208 17.4984 8.18208 16.8554V8.49518C8.18208 8.38502 8.27427 8.27487 8.4024 8.27487H9.33912C9.44928 8.27487 9.55944 8.36705 9.55944 8.49518V16.8554C9.55944 18.307 8.76959 19.1523 7.39145 19.1523C6.96879 19.1523 6.63832 19.1523 5.70081 18.6929L3.77188 17.5906C3.29453 17.3148 3 16.8007 3 16.2492V7.77877C3 7.2272 3.29375 6.71313 3.77188 6.43735L11.1032 2.19278C11.5626 1.93574 12.1876 1.93574 12.647 2.19278L19.9783 6.43735C20.4556 6.71313 20.7502 7.2272 20.7502 7.77877V16.2492C20.7502 16.8007 20.4564 17.3148 19.9783 17.5906L12.647 21.8352C12.4079 21.9445 12.1321 22 11.8751 22ZM14.1353 16.1757C10.9196 16.1757 10.2587 14.7062 10.2587 13.4562C10.2587 13.346 10.3509 13.2359 10.479 13.2359H11.4345C11.5446 13.2359 11.6368 13.3093 11.6368 13.4194C11.7837 14.3929 12.2063 14.871 14.154 14.871C15.6978 14.871 16.3587 14.5218 16.3587 13.6952C16.3587 13.2179 16.1751 12.8687 13.7681 12.6296C11.7649 12.4273 10.5157 11.9866 10.5157 10.3882C10.5157 8.89987 11.7649 8.01783 13.8595 8.01783C16.2111 8.01783 17.3689 8.82643 17.5158 10.5905C17.5158 10.646 17.497 10.7007 17.4603 10.7561C17.4236 10.7929 17.3681 10.8296 17.3134 10.8296H16.3579C16.2658 10.8296 16.1743 10.7561 16.1556 10.664C15.9353 9.653 15.3657 9.32253 13.8587 9.32253C12.1681 9.32253 11.9665 9.91082 11.9665 10.3514C11.9665 10.8843 12.2056 11.0499 14.4837 11.3436C16.7439 11.6374 17.8095 12.0601 17.8095 13.6405C17.7916 15.257 16.4689 16.1757 14.1353 16.1757Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),ion=Z("NodeWordmark",[["path",{d:"M21.8928 12.5235C21.9591 12.4848 22 12.414 22 12.3371V11.8385C22 11.7618 21.9593 11.6911 21.8928 11.6523L20.1212 10.6237C20.0545 10.585 19.9723 10.5848 19.9053 10.6233L18.1227 11.6525C18.0562 11.6911 18.0151 11.762 18.0151 11.8389V13.8969C18.0151 13.9743 18.0566 14.0459 18.124 14.0842L19.8954 15.0935C19.9606 15.131 20.0407 15.1312 20.1066 15.0948L21.1779 14.4991C21.212 14.4801 21.2332 14.4445 21.2334 14.4059C21.2336 14.367 21.2129 14.331 21.1792 14.3117L19.3855 13.2823C19.3519 13.263 19.3313 13.2274 19.3313 13.1891V12.5439C19.3313 12.5053 19.3519 12.4699 19.3851 12.4509L19.9437 12.1289C19.9767 12.1096 20.0178 12.1096 20.0511 12.1289L20.6096 12.4509C20.6431 12.4701 20.6636 12.5055 20.6636 12.5439V13.0514C20.6636 13.0901 20.6842 13.1257 20.7174 13.1448C20.7509 13.1641 20.792 13.1641 20.8255 13.1446L21.8928 12.5235ZM19.9869 12.4269C19.9998 12.4197 20.0155 12.4197 20.0282 12.4269L20.3703 12.6246C20.383 12.632 20.3908 12.6457 20.3908 12.6604V13.0554C20.3908 13.0702 20.383 13.0838 20.3703 13.0912L20.0282 13.2886C20.0155 13.296 19.9996 13.296 19.9869 13.2886L19.645 13.0912C19.6321 13.0838 19.6243 13.0702 19.6243 13.0554V12.6604C19.6243 12.6457 19.6321 12.632 19.645 12.6246L19.9869 12.4269ZM15.3479 13.2488C15.3479 13.2678 15.3377 13.2856 15.321 13.2954L14.7088 13.6483C14.6921 13.658 14.6715 13.658 14.655 13.6483L14.0429 13.2954C14.0261 13.2856 14.016 13.2678 14.016 13.2488V12.5417C14.016 12.5227 14.0264 12.5047 14.0429 12.4949L14.655 12.1416C14.6718 12.1317 14.6923 12.1317 14.709 12.1416L15.3214 12.4949C15.3379 12.5047 15.3481 12.5227 15.3481 12.5417L15.3479 13.2488ZM15.5133 8.01351C15.4801 7.99508 15.4394 7.99551 15.4063 8.01478C15.3735 8.03427 15.3532 8.06943 15.3532 8.10756V10.8432C15.3532 10.8699 15.3388 10.8949 15.3157 10.9084C15.2924 10.9218 15.2636 10.9218 15.2403 10.9084L14.7938 10.6511C14.7273 10.6127 14.6453 10.6127 14.5788 10.6511L12.7957 11.6801C12.729 11.7186 12.6879 11.7898 12.6879 11.8667V13.9253C12.6879 14.0022 12.729 14.0732 12.7955 14.1119L14.5786 15.1416C14.6451 15.1801 14.7273 15.1801 14.794 15.1416L16.5775 14.1119C16.644 14.0732 16.6851 14.0022 16.6851 13.9253V8.79363C16.6851 8.71568 16.6427 8.64367 16.5747 8.60554L15.5133 8.01351ZM9.23801 10.6123C9.30452 10.5737 9.3867 10.5737 9.45322 10.6123L11.2363 11.6411C11.3028 11.6796 11.3439 11.7508 11.3439 11.8277V13.887C11.3439 13.9639 11.3028 14.0351 11.2363 14.0736L9.45343 15.1032C9.38692 15.1416 9.30473 15.1416 9.23801 15.1032L7.45557 14.0736C7.38906 14.0351 7.34796 13.9639 7.34796 13.887V11.8275C7.34796 11.7508 7.38906 11.6796 7.45557 11.6411L9.23801 10.6123ZM5.99551 11.8105C5.99551 11.733 5.95484 11.6619 5.88791 11.6235L4.10546 10.5977C4.07496 10.5799 4.04128 10.5708 4.00718 10.5695H3.98875C3.95486 10.5708 3.92097 10.5799 3.89047 10.5977L2.10782 11.6235C2.04152 11.6619 2 11.733 2 11.8105L2.00381 14.5726C2.00381 14.6112 2.02394 14.647 2.05761 14.6656C2.09066 14.6855 2.13154 14.6855 2.16458 14.6656L3.22367 14.059C3.2906 14.0192 3.33148 13.9491 3.33148 13.8722V12.5818C3.33148 12.5047 3.37215 12.4337 3.43887 12.3952L3.89005 12.1355C3.92351 12.1158 3.96037 12.1065 3.99765 12.1065C4.0345 12.1065 4.07221 12.1158 4.10504 12.1355L4.55579 12.3952C4.62251 12.4337 4.6636 12.5047 4.6636 12.5818V13.8722C4.6636 13.9491 4.70491 14.0196 4.77142 14.059L5.8305 14.6656C5.86376 14.6855 5.90528 14.6855 5.93811 14.6656C5.97094 14.6468 5.99149 14.611 5.99149 14.5726L5.99551 11.8105Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var rAe=Z("JavaScript",[["path",{d:"M21.9178 14.357C21.6958 12.9704 20.7911 11.8057 18.1128 10.7194C17.182 10.292 16.1456 9.98573 15.8357 9.28052C15.7265 8.86975 15.7111 8.63943 15.7811 8.39012C15.9806 7.584 16.9422 7.33231 17.7056 7.56382C18.1971 7.72884 18.6613 8.10756 18.9427 8.71066C20.2545 7.86181 20.251 7.86656 21.1675 7.28364C20.8327 6.76364 20.6534 6.52383 20.4338 6.30182C19.6455 5.42091 18.5699 4.9674 16.852 5.00182C16.554 5.03982 16.2536 5.08018 15.9568 5.11698C15.0985 5.33424 14.2817 5.78419 13.802 6.38848C12.3631 8.0209 12.7739 10.8785 14.5239 12.0538C16.2489 13.3479 18.7824 13.6423 19.1053 14.8533C19.4199 16.3349 18.0166 16.8145 16.6205 16.6448C15.5923 16.4311 15.0201 15.9075 14.4016 14.9578C13.6426 15.397 12.8732 15.841 12.0936 16.2898C12.3715 16.8965 12.6623 17.1707 13.1277 17.6966C15.3288 19.9298 20.8386 19.8206 21.8264 16.4394C21.8656 16.3254 22.1315 15.5502 21.9178 14.357ZM10.5348 5.18228H7.69148C7.69148 7.63743 7.67961 10.076 7.67961 12.5323C7.67961 14.0958 7.76034 15.5276 7.50627 15.9669C7.09075 16.8312 6.01276 16.7243 5.52126 16.5557C5.02145 16.31 4.76738 15.9609 4.47296 15.4671C4.39223 15.3258 4.33168 15.2154 4.31149 15.2071C3.53981 15.6784 2.77169 16.1521 2 16.6222C2.38466 17.4105 2.95095 18.0955 3.67515 18.5407C4.75907 19.1913 6.21459 19.3896 7.73659 19.0406C8.72791 18.7521 9.5827 18.1537 10.0303 17.2431C10.6773 16.05 10.5384 14.6052 10.5325 13.0084C10.5491 10.4024 10.5348 7.79651 10.5348 5.18228Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var AF=Z("Npm",[["path",{d:"M2 2V22H22V2H2ZM18.6469 18.6484H15.2938V8.70469H11.9406V18.6484H5.35156V5.35312H18.6469V18.6484Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]),lon=Z("NpmWordmark",[["path",{d:"M8.15385 15.4103H10.7179V14.1282H13.2821V9H8.15385V15.4103ZM10.7179 10.2821H12V12.8462H10.7179V10.2821ZM14.3077 9V14.1282H16.8718V10.2821H18.1538V14.1282H19.4359V10.2821H20.7179V14.1282H22V9H14.3077ZM2 14.1282H4.5641V10.2821H5.84615V14.1282H7.12821V9H2V14.1282Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var cF=Z("Pnpm",[["path",{d:"M22 8.24922H15.7507V2H22V8.24922Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 8.24922H8.875V2H15.1242V8.24922Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8.25 8.24898H2V1.99976H8.25V8.24898Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M22 15.1243H15.7507V8.87427H22V15.1243Z",key:"4",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 15.1243H8.875V8.87427H15.1242V15.1243Z",key:"5",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M15.1242 21.9985H8.875V15.7493H15.1242V21.9985Z",key:"6",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M22 21.9985H15.7507V15.7493H22V21.9985Z",key:"7",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M8.25 21.9985H2V15.7493H8.25V21.9985Z",key:"8",fill:"currentColor",strokeWidth:"0"}]]),mon=Z("PnpmWordmark",[["path",{d:"M3.78752 9.0002C4.10836 9.0002 4.40475 9.04284 4.67747 9.12834C4.95527 9.20855 5.19316 9.33415 5.39075 9.50513C5.58854 9.67612 5.74348 9.89249 5.85578 10.1544C5.96807 10.4107 6.02402 10.7183 6.02402 11.0763C6.02402 11.4182 5.97609 11.7176 5.87984 11.9742C5.78359 12.2305 5.64743 12.4471 5.47096 12.6234C5.2947 12.7943 5.08087 12.9227 4.82967 13.0082C4.58395 13.0937 4.30869 13.1365 4.00409 13.1365C3.77422 13.1365 3.56039 13.1017 3.3628 13.0322V14.363C3.30919 14.379 3.22389 14.395 3.10612 14.4111C2.98874 14.4324 2.86843 14.4432 2.74537 14.4432C2.62799 14.4432 2.52098 14.4351 2.42472 14.4191C2.34072 14.4059 2.26106 14.3729 2.19231 14.3228C2.12814 14.2747 2.08001 14.208 2.04813 14.1225C2.01604 14.0423 2 13.9353 2 13.8017V9.95411C2 9.80993 2.02935 9.69235 2.08804 9.60138C2.1522 9.51061 2.2377 9.42766 2.34471 9.35293C2.51022 9.24611 2.71603 9.16062 2.96194 9.09645C3.20766 9.03228 3.48292 9.0002 3.78752 9.0002ZM3.80356 12.0623C4.35408 12.0623 4.62914 11.7336 4.62914 11.0763C4.62914 10.7341 4.55989 10.4804 4.42079 10.3147C4.28717 10.149 4.09212 10.0662 3.83584 10.0662C3.73411 10.0662 3.64334 10.0795 3.56313 10.1063C3.48292 10.1278 3.41347 10.1544 3.35477 10.1865V11.95C3.41875 11.9821 3.4882 12.0087 3.56313 12.0302C3.63786 12.0517 3.71787 12.0623 3.80356 12.0623ZM9.1581 10.5471C9.1581 10.3816 9.10998 10.2613 9.01392 10.1863C8.92295 10.1061 8.79735 10.0662 8.63713 10.0662C8.53011 10.0662 8.4233 10.0795 8.31628 10.1063C8.21494 10.1329 8.12671 10.173 8.05198 10.2264V13.0082C7.99857 13.0242 7.91308 13.0403 7.79531 13.0563C7.68321 13.0723 7.56563 13.0804 7.44258 13.0804C7.32519 13.0804 7.21818 13.0723 7.12193 13.0563C7.03792 13.0431 6.95825 13.0101 6.88951 12.9601C6.82357 12.9096 6.77125 12.8435 6.73731 12.7677C6.70523 12.6822 6.68918 12.5727 6.68918 12.4391V10.0341C6.68918 9.88975 6.71853 9.77217 6.77722 9.6814C6.84139 9.59062 6.92688 9.50767 7.03389 9.43294C7.21544 9.3046 7.44277 9.20053 7.71529 9.12032C7.99309 9.0401 8.30024 9 8.63713 9C9.24105 9 9.70588 9.13362 10.032 9.40086C10.3579 9.66281 10.5211 10.0288 10.5211 10.4992V13.0082C10.4675 13.0242 10.382 13.0403 10.2644 13.0563C10.1521 13.0723 10.0345 13.0804 9.91169 13.0804C9.79411 13.0804 9.6873 13.0723 9.59104 13.0563C9.50703 13.0431 9.42737 13.0101 9.35863 12.9601C9.29261 12.9096 9.24023 12.8435 9.20623 12.7677C9.17414 12.6822 9.1581 12.5727 9.1581 12.4391V10.5471ZM13.1504 9.0002C13.4711 9.0002 13.7677 9.04304 14.0402 9.12853C14.318 9.20874 14.5559 9.33434 14.7537 9.50533C14.9513 9.67631 15.1062 9.89268 15.2185 10.1546C15.3308 10.4109 15.3867 10.7185 15.3867 11.0765C15.3867 11.4184 15.3388 11.7178 15.2426 11.9744C15.1463 12.2307 15.0101 12.4473 14.8337 12.6236C14.6574 12.7945 14.4436 12.9229 14.1924 13.0084C13.9467 13.0939 13.6714 13.1367 13.3668 13.1367C13.1369 13.1367 12.9233 13.1019 12.7255 13.0324V14.3631C12.6721 14.3792 12.5866 14.3952 12.4688 14.4113C12.3515 14.4326 12.2311 14.4434 12.1083 14.4434C11.9907 14.4434 11.8837 14.4353 11.7874 14.4193C11.7034 14.4061 11.6238 14.3731 11.555 14.323C11.4909 14.2749 11.4429 14.2082 11.4108 14.1227C11.3788 14.0425 11.3627 13.9355 11.3627 13.8019V9.95411C11.3627 9.80993 11.3921 9.69235 11.4508 9.60138C11.5149 9.51061 11.6004 9.42766 11.7074 9.35293C11.8731 9.24611 12.0787 9.16062 12.3247 9.09645C12.5706 9.03228 12.8456 9.0002 13.1502 9.0002H13.1504ZM13.1663 12.0625C13.7168 12.0625 13.9919 11.7338 13.9919 11.0765C13.9919 10.7343 13.9226 10.4806 13.7837 10.3149C13.6501 10.1492 13.455 10.0664 13.1984 10.0664C13.0968 10.0664 13.0061 10.0797 12.9258 10.1065C12.8456 10.128 12.7762 10.1546 12.7175 10.1867V11.9502C12.7817 11.9823 12.8511 12.0089 12.9258 12.0304C13.0008 12.0519 13.0806 12.0625 13.1663 12.0625ZM17.9196 9.0002C18.1387 9.0002 18.3526 9.03228 18.5609 9.09645C18.7748 9.15514 18.959 9.24611 19.1142 9.36897C19.2746 9.26215 19.4534 9.17392 19.6512 9.10447C19.8543 9.03502 20.0974 9.0002 20.3807 9.0002C20.5838 9.0002 20.7816 9.027 20.9739 9.08041C21.1717 9.13382 21.3454 9.21931 21.4949 9.33688C21.65 9.44918 21.7729 9.60138 21.8636 9.79389C21.9546 9.98092 22 10.2106 22 10.4833V13.0084C21.9466 13.0244 21.8611 13.0405 21.7435 13.0565C21.6312 13.0725 21.5137 13.0806 21.3908 13.0806C21.2834 13.0814 21.1762 13.0733 21.0701 13.0565C20.9861 13.0433 20.9063 13.0103 20.8375 12.9602C20.7716 12.9098 20.7193 12.8437 20.6853 12.7679C20.6532 12.6824 20.6372 12.5729 20.6372 12.4393V10.5234C20.6372 10.363 20.5918 10.2482 20.5008 10.1787C20.4101 10.1038 20.2872 10.0664 20.1323 10.0664C20.0573 10.0664 19.9771 10.085 19.8916 10.1226C19.8061 10.1546 19.7422 10.1893 19.6993 10.2266C19.7046 10.2482 19.7072 10.2695 19.7072 10.2908V13.0084C19.6485 13.0244 19.5604 13.0405 19.4428 13.0565C19.3306 13.0725 19.2157 13.0806 19.0981 13.0806C18.9806 13.0806 18.8736 13.0725 18.7773 13.0565C18.6933 13.0433 18.6136 13.0103 18.5449 12.9602C18.4789 12.9098 18.4266 12.8437 18.3927 12.7679C18.3606 12.6824 18.3446 12.5729 18.3446 12.4393V10.5234C18.3446 10.363 18.2937 10.2482 18.1922 10.1787C18.0961 10.1038 17.9785 10.0664 17.8396 10.0664C17.7434 10.0664 17.6606 10.0825 17.5912 10.1145C17.5306 10.1372 17.4716 10.164 17.4147 10.1947V13.0084C17.3613 13.0244 17.2758 13.0405 17.1582 13.0565C17.0414 13.0729 16.9235 13.0809 16.8055 13.0806C16.6879 13.0806 16.5809 13.0725 16.4846 13.0565C16.4006 13.0433 16.321 13.0103 16.2522 12.9602C16.1863 12.9098 16.134 12.8437 16.1 12.7679C16.0679 12.6824 16.0519 12.5729 16.0519 12.4393V10.0181C16.0519 9.8739 16.0812 9.75887 16.1399 9.67338C16.2043 9.58788 16.2898 9.50767 16.3966 9.43275C16.5784 9.3046 16.8027 9.20033 17.07 9.12032C17.346 9.03964 17.6321 8.99932 17.9196 9.0002Z",key:"1",fill:"currentColor",strokeWidth:"0"}]]);var uF=Z("Yarn",[["path",{d:"M11.5508 7.2041C11.5578 7.18276 12.0646 5.66064 12.5322 5.95996C12.677 6.05521 13.1919 7.19573 13.1992 7.21191C13.2138 7.20347 13.7574 6.88906 13.8193 7.00879C14.1567 7.66261 14.196 8.91154 14.0469 9.6709C13.7957 10.9235 13.1671 11.5968 12.916 12.0195C12.8584 12.1177 13.592 12.4279 14.0547 13.707C14.4822 14.8774 14.1013 15.8601 14.168 15.9697C14.1797 15.9892 14.1836 15.9971 14.1836 15.9971C14.1836 15.9971 14.6745 16.0362 15.6592 15.4297C16.185 15.1048 16.8093 14.7403 17.5195 14.7324C18.206 14.7208 18.2414 15.5269 17.7275 15.6484C17.0997 15.7972 16.7818 15.9345 16.0049 16.4395C14.7936 17.2191 13.4731 17.5829 13.4619 17.5859C13.4619 17.5859 13.352 17.7508 13.0342 17.8252C12.4848 17.9583 10.417 18.0713 10.2285 18.0752C9.72264 18.0791 9.41273 17.9465 9.32617 17.7393C9.06326 17.1129 9.70312 16.8389 9.70312 16.8389C9.70312 16.8389 9.56192 16.7521 9.47949 16.6738C9.40494 16.5995 9.32629 16.4511 9.30273 16.5059C9.20466 16.7446 9.15332 17.3274 8.89062 17.5898C8.52961 17.9539 7.84656 17.8325 7.44238 17.6211C7.00536 17.3894 7.46102 16.8498 7.47363 16.835C7.4641 16.8404 7.23031 16.9693 7.04199 16.6855C6.8694 16.4193 6.7088 15.9649 6.75195 15.4053C6.79872 14.7757 7.49442 14.1653 7.5127 14.1494C7.5127 14.1494 7.38778 13.2052 7.7998 12.2383C8.1706 11.3627 9.16533 10.6575 9.17676 10.6494C9.17441 10.6468 8.33398 9.71646 8.64746 8.87988C8.85115 8.33281 8.93335 8.33586 9 8.3125C9.23538 8.22248 9.46312 8.12433 9.63184 7.94043C10.4695 7.03864 11.5357 7.20174 11.5508 7.2041Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12.8496 5.46582C12.63 5.32511 12.371 5.29391 12.1279 5.38379C11.8023 5.5012 11.5236 5.81451 11.2607 6.37012C11.2215 6.45233 11.1857 6.53108 11.1543 6.60938C10.6559 6.64465 9.87105 6.82476 9.20801 7.54102C9.12558 7.63101 8.96457 7.69813 8.7959 7.76074H8.7998C8.4548 7.87827 8.29374 8.16025 8.10547 8.66895C7.83891 9.38127 8.11308 10.0821 8.38379 10.5361C8.01497 10.865 7.52452 11.3895 7.26562 12.0039C6.94394 12.7632 6.90914 13.5069 6.9209 13.9102C6.64626 14.1998 6.22201 14.7439 6.1748 15.3545C6.11202 16.2079 6.42223 16.7876 6.55957 16.999C6.5988 17.0616 6.64238 17.1122 6.68945 17.1631C6.67376 17.2688 6.66982 17.3826 6.69336 17.5C6.74437 17.774 6.91681 17.9968 7.17969 18.1377C7.69759 18.4117 8.41938 18.5298 8.97656 18.252C9.1767 18.4633 9.54196 18.667 10.2051 18.667H10.2441C10.4129 18.667 12.5558 18.5531 13.1797 18.4004C13.4581 18.3338 13.6499 18.216 13.7754 18.1104C14.1756 17.9851 15.2825 17.6097 16.3262 16.9365C17.0637 16.459 17.3191 16.3567 17.8682 16.2236C18.39 16.0945 18.7277 15.6134 18.6572 15.0732C18.5866 14.5174 18.1159 14.1339 17.5117 14.1416C16.6094 14.1533 15.8519 14.6185 15.3496 14.9277C15.1534 15.0491 14.9841 15.1395 14.8389 15.2061C14.8703 14.7519 14.8429 14.1567 14.6074 13.5029C14.321 12.7203 13.9367 12.2389 13.6621 11.9609C13.98 11.499 14.4151 10.8255 14.6191 9.78418C14.7957 8.89554 14.7411 7.51339 14.3369 6.73828C14.2545 6.58181 14.1169 6.46883 13.9443 6.42188C13.8737 6.40229 13.7403 6.36316 13.4775 6.4375C13.093 5.61933 12.9556 5.53237 12.8496 5.46582Z",key:"2",fill:"currentColor",strokeWidth:"0"}]]),hon=Z("YarnWordmark",[["path",{d:"M7.05494 12.9698C6.78022 13.9176 6.34066 14.6044 5.84615 15.1538V10.3324C5.84615 10.0027 5.55769 9.72802 5.1044 9.72802C4.91209 9.72802 4.74725 9.82417 4.74725 9.96154C4.74725 10.0577 4.8022 10.1401 4.8022 10.4011V12.6126C4.63736 13.5742 4.22527 14.467 3.67582 14.467C3.27747 14.467 3.04396 14.0687 3.04396 13.3269C3.04396 12.1731 3.19505 11.5687 3.44231 10.5522C3.49725 10.3462 3.8956 9.7967 3.22253 9.7967C2.49451 9.7967 2.59066 10.0714 2.49451 10.3049C2.49451 10.3049 2 11.9396 2 13.3956C2 14.5907 2.53571 15.3736 3.45604 15.3736C4.0467 15.3736 4.47253 14.9753 4.8022 14.4258V16.1703C3.8956 16.967 3.0989 17.6676 3.0989 19.0549C3.0989 19.9341 3.64835 20.6346 4.41758 20.6346C5.11813 20.6346 5.84615 20.1264 5.84615 18.6841V16.3077C6.58791 15.6621 7.38461 14.8516 7.85165 13.2582C7.86538 13.2033 7.86538 13.1346 7.86538 13.1209C7.86538 12.8599 7.60439 12.5577 7.38461 12.5577C7.24725 12.5577 7.13736 12.6813 7.05494 12.9698ZM4.41758 19.7692C4.1978 19.7692 4.06044 19.4396 4.06044 19.0137C4.06044 18.1896 4.36264 17.6676 4.8022 17.2143V18.6841C4.8022 18.9451 4.85714 19.7692 4.41758 19.7692Z",key:"1",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M10.9973 14.4533C10.6676 14.4533 10.5302 14.1236 10.5302 13.8214V11.5549C10.5302 11.2253 10.2418 10.9505 9.78846 10.9505C9.59615 10.9505 9.43132 11.0467 9.43132 11.1841C9.43132 11.2802 9.48626 11.3626 9.48626 11.6236V13.739C9.33516 14.1236 9.08791 14.4533 8.71703 14.4533C8.23626 14.4533 7.93407 14.0412 7.93407 13.3269C7.93407 11.3489 9.15659 10.456 10.2005 10.456C10.3379 10.456 10.4753 10.4835 10.5989 10.4835C10.7363 10.4835 10.7775 10.4011 10.7775 10.1676C10.7775 9.81044 10.5165 9.59066 10.1456 9.59066C8.46978 9.59066 6.87637 10.9918 6.87637 13.2857C6.87637 14.4533 7.43956 15.3599 8.51099 15.3599C9.03297 15.3599 9.41758 15.1126 9.69231 14.7967C9.89835 15.1264 10.2692 15.3599 10.75 15.3599C11.9313 15.3599 12.4808 14.1236 12.7143 13.217C12.728 13.1621 12.728 13.1346 12.728 13.1209C12.728 12.8599 12.467 12.5577 12.2473 12.5577C12.1099 12.5577 11.9725 12.6813 11.9176 12.9698C11.794 13.5742 11.5467 14.4533 10.9973 14.4533Z",key:"2",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M14.967 15.3599C16.1484 15.3599 16.6841 14.1236 16.9313 13.217C16.9313 13.1896 16.9451 13.1621 16.9451 13.1209C16.9451 12.8599 16.6841 12.5577 16.4643 12.5577C16.3269 12.5577 16.1896 12.6813 16.1346 12.9698C16.011 13.5742 15.7775 14.4533 15.1456 14.4533C14.7747 14.4533 14.5962 14.0962 14.5962 13.7115C14.5962 12.3379 15.2143 10.717 15.2143 10.5522C15.2692 10.2363 14.7198 9.78297 14.5549 9.78297H13.8407C13.7033 9.78297 13.5659 9.78297 13.1126 9.72802C12.9615 9.16484 12.5769 9 12.2473 9C11.8901 9 11.5604 9.24725 11.5604 9.63187C11.5604 10.0302 11.8077 10.3187 12.1511 10.511C12.1374 11.2115 12.0824 12.3516 11.9313 12.9011C11.8077 13.3681 12.522 13.8626 12.7006 13.2857C12.9478 12.489 13.0302 11.294 13.044 10.7582H14.239C13.7995 11.9396 13.5522 12.9148 13.5522 13.794C13.5522 15.0027 14.3214 15.3599 14.967 15.3599Z",key:"3",fill:"currentColor",strokeWidth:"0"}],["path",{d:"M16.1896 14.7555C16.1896 15.2637 16.5742 15.3599 16.8489 15.3599C17.2473 15.3599 17.2335 15.0302 17.2335 14.7692V12.7637C17.3297 11.6786 18.1813 10.4973 18.5797 10.4973C18.8407 10.4973 18.8681 10.8544 18.8681 11.2802V14.0687C18.8681 14.7692 19.294 15.3599 20.022 15.3599C21.2033 15.3599 21.7527 14.1236 21.9863 13.217C22 13.1621 22 13.1346 22 13.1209C22 12.8599 21.739 12.5577 21.5192 12.5577C21.3819 12.5577 21.2445 12.6813 21.1896 12.9698C21.0659 13.5742 20.8187 14.4533 20.2692 14.4533C19.9121 14.4533 19.9121 13.9451 19.9121 13.8214V10.978C19.9121 10.3462 19.6923 9.59066 18.772 9.59066C18.0989 9.59066 17.6044 10.1813 17.2335 10.9505V10.3324C17.2335 10.0027 16.9451 9.72802 16.4918 9.72802C16.2995 9.72802 16.1346 9.82417 16.1346 9.96154C16.1346 10.0577 16.1896 10.1401 16.1896 10.4011V14.7555Z",key:"4",fill:"currentColor",strokeWidth:"0"}]]);var Ud=k(N(),1),aAe=e=>(0,Ud.jsxs)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,Ud.jsxs)("g",{clipPath:"url(#clip0_2967_820)",children:[(0,Ud.jsx)("path",{d:"M236.58 52.3083C235.731 52.3855 233.031 52.6555 230.601 52.8483C174.558 57.9011 122.064 88.1403 88.8162 134.618C70.3024 160.46 58.4613 189.773 53.9871 220.823C52.4057 231.661 52.2129 234.862 52.2129 249.558C52.2129 264.253 52.4057 267.454 53.9871 278.293C64.7097 352.386 117.436 414.639 188.945 437.704C201.751 441.831 215.25 444.647 230.601 446.344C236.58 447 262.422 447 268.4 446.344C294.898 443.413 317.346 436.856 339.486 425.555C342.88 423.819 343.536 423.356 343.073 422.97C342.764 422.739 328.3 403.338 310.943 379.887L279.393 337.267L239.858 278.755C218.104 246.588 200.208 220.283 200.053 220.283C199.899 220.244 199.745 246.241 199.668 277.984C199.552 333.564 199.513 335.801 198.819 337.113C197.816 339.003 197.045 339.774 195.425 340.622C194.191 341.24 193.111 341.355 187.287 341.355H180.614L178.84 340.237C177.683 339.504 176.834 338.54 176.255 337.421L175.445 335.685L175.523 258.352L175.638 180.979L176.834 179.475C177.451 178.665 178.763 177.624 179.688 177.122C181.27 176.351 181.887 176.274 188.559 176.274C196.428 176.274 197.739 176.582 199.783 178.819C200.362 179.437 221.769 211.681 247.379 250.522C272.99 289.362 308.012 342.397 325.215 368.432L356.457 415.758L358.038 414.716C372.039 405.614 386.85 392.654 398.576 379.154C423.531 350.497 439.615 315.552 445.014 278.293C446.596 267.454 446.789 264.253 446.789 249.558C446.789 234.862 446.596 231.661 445.014 220.823C434.292 146.729 381.566 84.4761 310.056 61.411C297.444 57.3225 284.021 54.5069 268.979 52.8098C265.276 52.4241 239.781 51.9998 236.58 52.3083ZM317.346 171.645C319.198 172.571 320.702 174.345 321.242 176.197C321.55 177.199 321.627 198.645 321.55 246.973L321.435 316.323L309.208 297.578L296.942 278.833V228.421C296.942 195.829 297.097 177.508 297.328 176.621C297.945 174.461 299.295 172.764 301.147 171.761C302.728 170.951 303.307 170.874 309.362 170.874C315.071 170.874 316.073 170.951 317.346 171.645Z",fill:"currentColor"}),(0,Ud.jsx)("path",{d:"M354.527 416.607C353.177 417.455 352.753 418.034 353.948 417.378C354.797 416.877 356.185 415.835 355.954 415.797C355.838 415.797 355.183 416.183 354.527 416.607ZM351.865 418.343C351.171 418.883 351.171 418.921 352.02 418.497C352.483 418.265 352.868 417.995 352.868 417.918C352.868 417.61 352.675 417.687 351.865 418.343ZM349.937 419.5C349.243 420.04 349.243 420.078 350.091 419.654C350.554 419.422 350.94 419.153 350.94 419.075C350.94 418.767 350.747 418.844 349.937 419.5ZM348.008 420.657C347.314 421.197 347.314 421.235 348.163 420.811C348.626 420.58 349.011 420.31 349.011 420.232C349.011 419.924 348.818 420.001 348.008 420.657ZM345.077 422.2C343.611 422.971 343.689 423.28 345.154 422.547C345.81 422.2 346.311 421.852 346.311 421.775C346.311 421.505 346.273 421.544 345.077 422.2Z",fill:"currentColor"})]}),(0,Ud.jsx)("defs",{children:(0,Ud.jsx)("clipPath",{id:"clip0_2967_820",children:(0,Ud.jsx)("rect",{width:"395",height:"395",fill:"white",transform:"translate(52 52)"})})})]});var Y5=k(N(),1),oAe=e=>(0,Y5.jsx)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,Y5.jsx)("path",{d:"M273.76 383H420.28C424.955 383 429.431 381.351 433.48 379.025C437.529 376.699 441.703 373.779 444.04 369.749C446.377 365.721 448.002 361.15 448 356.499C447.998 351.847 446.381 347.278 444.04 343.251L345.04 172.325C342.703 168.297 339.848 165.376 335.8 163.05C331.752 160.725 325.954 159.075 321.28 159.075C316.606 159.075 312.128 160.725 308.08 163.05C304.032 165.376 301.176 168.297 298.84 172.325L273.76 216.05L223.6 131.247C221.261 127.219 218.41 122.975 214.36 120.65C210.31 118.324 205.836 118 201.16 118C196.485 118 192.009 118.324 187.96 120.65C183.911 122.975 179.739 127.219 177.4 131.247L54.64 343.251C52.2996 347.278 52.0021 351.847 52 356.499C51.998 361.15 52.3032 365.72 54.64 369.749C56.9769 373.778 61.1509 376.699 65.2 379.025C69.2492 381.351 73.7243 383 78.4 383H170.8C207.412 383 234.061 366.514 252.64 335.3L297.52 257.125L321.28 216.05L393.88 340.6H297.52L273.76 383ZM169.48 340.6H104.8L201.16 173.65L250 257.125L217.648 313.735C205.311 333.988 191.244 340.6 169.48 340.6Z",fill:"currentColor"})});var iAe=k(N(),1);var K5=k(N(),1),sAe=e=>(0,K5.jsx)("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,K5.jsx)("path",{d:"M230.653 52.6932C191.799 56.9501 155.267 71.9653 125.779 95.7264C115.794 103.776 99.4634 120.571 92.2654 130.168C71.755 157.567 58.6748 188.836 53.7213 222.504C52.0186 233.882 51.4768 255.63 52.5603 267.008C55.8111 300.521 66.492 331.48 83.9065 357.873C115.949 406.556 164.942 437.747 222.526 446.261C233.903 447.964 255.652 448.506 267.03 447.422C300.543 444.171 331.502 433.49 357.895 416.076C406.578 384.033 437.769 335.04 446.283 277.456C447.986 266.079 448.528 244.33 447.444 232.953C443.497 192.396 429.023 156.484 404.256 125.757C396.207 115.772 379.411 99.4415 369.814 92.2435C342.415 71.7331 311.379 58.8076 277.478 53.6994C268.113 52.3062 239.786 51.687 230.653 52.6932ZM301.007 234.423C327.864 281.404 349.845 319.948 349.845 320.103C349.845 320.257 305.806 320.412 251.937 320.412C198.068 320.412 154.029 320.257 154.029 320.025C154.029 319.406 251.782 148.512 252.014 148.821C252.092 148.899 274.228 187.443 301.007 234.423Z",fill:"currentColor"})});var AAe=k(N(),1);var sl=k(U(),1);var{captureStackTrace:Iqe}=Error;function W5(e,t,n,r,a=t){let o=new e(n,r?{cause:r}:void 0);return Iqe?.(o,a),o}function ce(e,t,n){return W5(Error,ce,e,t,n)}function Nv(e,t,n){return W5(TypeError,Nv,e,t,n)}function dg(e,t,n){return W5(SyntaxError,dg,e,t,n)}function tu(e,t,n=-1,r){let a=0,o=0,i=t.length,s=[];for(;a!==-1;){a=e.indexOf(t,o);let A=a===-1||s.length===n-1?e.substring(o):e.substring(o,a);if(s.push(r?.(A,s,a)??A),s.length===n)return s;o=a+i}return s}var cAe=e=>{if(!/^[0-9]+$/.test(e))return e;let t=Number(e);return t<=Number.MAX_SAFE_INTEGER?t:e},J5=(e,t,n)=>{let r=Number(e);if(r>Number.MAX_SAFE_INTEGER)throw rC(t,`invalid ${n}, must be <= ${Number.MAX_SAFE_INTEGER}`);return r},V5={prefix:/^[ v=]+/,main:/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)/,prerelease:/-([0-9a-zA-Z_.-]+)(?:$|\+)/,build:/\+([0-9a-zA-Z_.-]+)$/,full:/^[ v=]*(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9a-zA-Z_.-]+))?(?:\+([0-9a-zA-Z_.-]+))?$/},rC=(e,t)=>dg(`invalid version: ${t}`,{version:e},Fn);var Fn=class e{raw;major;minor;patch;prerelease;build;toString(){return`${this.major}.${this.minor}.${this.patch}${this.prerelease?"-"+this.prerelease.join("."):""}${this.build?"+"+this.build.join("."):""}`}static parse(t){if(t=t.replace(V5.prefix,"").trim(),t.length>256)throw rC(t,"must be less than 256 characters");let n=V5.full.exec(t);if(!n)throw V5.main.exec(t)?rC(t,"invalid build or patch section"):rC(t,"no Major.minor.patch tuple present");let[r,a,o,i,s,A]=n,c=J5(a,t,"major"),u=J5(o,t,"minor"),l=J5(i,t,"patch");return new e(t,c,u,l,s,A)}constructor(t,n,r,a,o,i){this.raw=t,this.major=n,this.minor=r,this.patch=a,o&&(this.prerelease=tu(o,".",-1,s=>{if(!s)throw rC(t,"invalid prerelease, empty identifiers not allowed");return cAe(s)})),i&&(this.build=tu(i,".",-1,s=>{if(!s)throw rC(t,"invalid build metadata, empty identifiers not allowed")}))}compare(t){if(this.major>t.major)return 1;if(this.major<t.major)return-1;if(this.minor>t.minor)return 1;if(this.minor<t.minor)return-1;if(this.patch>t.patch)return 1;if(this.patch<t.patch)return-1;if(!t.prerelease?.length)return this.prerelease?.length?-1:0;if(!this.prerelease?.length)return 1;let n=Math.max(this.prerelease.length,t.prerelease.length),r=this.prerelease,a=t.prerelease;for(let o=0;o<n;o++){let i=r[o],s=a[o];if(i!==s)return s===void 0?1:i===void 0?-1:typeof i!=typeof s?typeof i=="string"?1:-1:i>s?1:-1}return 0}rcompare(t){return-1*this.compare(t)}greaterThan(t){return this.compare(t)===1}greaterThanEqual(t){return this.compare(t)>-1}lessThan(t){return this.compare(t)===-1}lessThanEqual(t){return this.compare(t)<1}equals(t){return this.compare(t)===0}tupleEquals(t){return this.major===t.major&&this.minor===t.minor&&this.patch===t.patch}satisfies(t){return t.test(this)}inc(t,n){switch(t){case"premajor":this.prerelease=void 0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n);break;case"preminor":this.prerelease=void 0,this.patch=0,this.minor++,this.inc("pre",n);break;case"prepatch":this.prerelease=void 0,this.inc("patch"),this.inc("pre",n);break;case"prerelease":this.prerelease?.length||this.inc("patch",n),this.inc("pre",n);break;case"pre":{if(!n){if(!this.prerelease?.length){this.prerelease=[0];break}let o=this.prerelease[this.prerelease.length-1];typeof o=="number"?this.prerelease[this.prerelease.length-1]=o+1:this.prerelease.push(0);break}if(!this.prerelease?.length){this.prerelease=[n];break}let r=this.prerelease.indexOf(cAe(n));if(r===-1){this.prerelease=[n];break}let a=this.prerelease[r+1];if(typeof a=="number"){this.prerelease[r+1]=a+1;break}if(r===this.prerelease.length-1){this.prerelease.push(0);break}this.prerelease.splice(r+1,0,0);break}case"major":(!this.prerelease?.length||this.minor||this.patch)&&this.major++,this.prerelease=void 0,this.patch=0,this.minor=0;break;case"minor":(!this.prerelease?.length||this.patch)&&this.minor++,this.prerelease=void 0,this.patch=0;break;case"patch":this.prerelease?.length||this.patch++,this.prerelease=void 0;break;default:throw Nv("Invalid increment identifier",{version:this,found:t,validOptions:["major","minor","patch","premajor","preminor","prepatch","prerelease","pre"]},this.inc)}return this.raw=this.toString(),this}};var Qqe=e=>!!e&&(e===">"||e==="<"||e===">="||e==="<="||e===""||e==="~"||e==="^"||e==="~>"),xqe=new Set("=v "),ei=(e,t)=>dg(`invalid comparator: '${e}' ${t}`,{found:e},jv),Yi=(e,t,n)=>{let r=Number(e);if(r!==r)throw ei(t,`${n} must be numeric or 'x', got: '${e}'`);return r},Ph=(e,t)=>{if(!e)throw ei(t,"no value provided for operator")},Z5=(e,t,n)=>{if(e&&!Tv(e))throw ei(t,`cannot omit '${n}' and include subsequent fields`)},nl=0,aC=1,dAe=2,Tv=e=>!e||e==="X"||e==="x"||e==="*",X5=e=>e[dAe]!==void 0,lF=e=>e[aC]!==void 0&&e[dAe]===void 0,dF=e=>e[nl]!==void 0&&e[aC]===void 0,uAe=e=>e[nl]===void 0,jv=class{includePrerelease;raw;tokens;tuples=[];isNone=!1;isAny=!1;toString(){return this.isNone?"<0.0.0-0":this.isAny?"*":this.tuples.map(t=>Pv(t)?"*":t.join("")).join(" ")}constructor(t,n=!1){this.includePrerelease=n,t=t.trim(),this.raw=t;let r=!1,a=tu(t," ",-1,(A,c,u)=>{if(A==="-"){if(r)throw ei(t,"multiple hyphen ranges not allowed");if(c.length!==1||u===-1)throw ei(t,"hyphen must be between two versions");r=!0}else if(r&&c.length!==2)throw ei(t,"hyphen range must be alone")}),o=[],i=!1,s=0;for(let A of a)if(A!==""){if(!i){i=Qqe(A),o.push(A),s++;continue}o[s-1]+=A,i=!1}if(r){let[A,c,u]=o;if(!A||!u)throw ei(t,"hyphen must be between two versions");this.#d(A,u)}else if(!o.length||o.length===1&&Tv(o[0]))this.tuples.push(this.#l());else for(let A of o)if(this.#m(A),this.isNone)break;this.tokens=o,this.isAny=!0;for(let A of this.tuples)if(Array.isArray(A)||!A.isAny){this.isAny=!1;break}}#e(t){let n=this.includePrerelease?"0":void 0,[r,a=0,o=0,i=n,s]=this.#c(t);return r===void 0?this.#l():[">=",new Fn(t,r,a,o,i,s)]}#n(t){let n=this.#c(t);if(X5(n))return[">",new Fn(t,...n)];let r=this.includePrerelease?"0":void 0;return lF(n)?[">=",new Fn(t,n[nl],n[aC]+1,0,r,void 0)]:dF(n)?[">=",new Fn(t,n[nl]+1,0,0,r,void 0)]:(this.isNone=!0,this.tuples.length=0,lAe)}#a(t){let n=this.#c(t);return X5(n)?["<=",new Fn(t,...n)]:lF(n)?["<",new Fn(t,n[nl],n[aC]+1,0,"0",void 0)]:dF(n)?["<",new Fn(t,n[nl]+1,0,0,"0",void 0)]:this.#l()}#t(t){let n=this.includePrerelease?"0":void 0,[r=0,a=0,o=0,i=n,s]=this.#c(t);return r===0&&a===0&&o===0&&i==="0"?(this.isNone=!0,this.tuples.length=0,lAe):["<",new Fn(t,r,a,o,i,s)]}#r(t,n,r){if(Z5(n,t,"major"),Z5(r,t,"major"),n===""||r==="")throw ei(t,"(Did you mean '*'?)");return[]}#i(t,n,r,a){if(Z5(a,t,"major"),r===""||a==="")throw ei(t,`(Did you mean '${n}'?)`);return[Yi(n,t,"major")]}#A(t,n,r,a){if(a==="")throw ei(t,`(Did you mean '${n}.${r}'?)`);return[Yi(n,t,"major"),Yi(r,t,"minor")]}#o(t,n,r,a){return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(a,t,"patch")]}#s(t,n,r,a,o){let i=a.substring(0,o),s=a.substring(o+1);if(!i)throw ei(t,"cannot specify build without patch");if(!s)throw ei(t,"encountered '+', but no build value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(i,t,"patch"),void 0,s]}#u(t,n,r,a,o){{let i=a.substring(0,o),s=a.substring(o+1);if(!i)throw ei(t,"cannot specify prerelease without patch");if(!s)throw ei(t,"encountered '-', but no prerelease value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(i,t,"patch"),s,void 0]}}#p(t,n,r,a,o,i){let s=a.substring(0,o),A=a.substring(o+1,i),c=a.substring(i+1);if(!s)throw ei(t,"cannot specify prerelease without patch");if(!A)throw ei(t,"encountered '-', but no prerelease value");if(!c)throw ei(t,"encountered '+', but no build value");return[Yi(n,t,"major"),Yi(r,t,"minor"),Yi(s,t,"patch"),A,c]}#c(t){let[n,r,a]=tu(t,".",3),o=0;for(;n&&xqe.has(n.charAt(o));)o++;if(n!==void 0&&o!==0&&(n=n.substring(o)),!n||Tv(n))return this.#r(t,r,a);if(!r||Tv(r))return this.#i(t,n,r,a);if(!a||Tv(a))return this.#A(t,n,r,a);let i=a.indexOf("-"),s=a.indexOf("+");return s===-1&&i===-1?this.#o(t,n,r,a):s===-1?this.#u(t,n,r,a,i):i===-1?this.#s(t,n,r,a,s):this.#p(t,n,r,a,i,s)}#d(t,n){let r=this.#e(t),a=this.#a(n),o=Pv(r),i=Pv(a);o&&i?this.tuples.push(this.#l()):o?this.tuples.push(a):i?this.tuples.push(r):this.tuples.push(r,a)}#m(t){let n=t.charAt(0),r=t.substring(0,2),a=t.substring(1),o=t.substring(2);switch(r){case"~>":return Ph(o,t),this.#g(o);case">=":return Ph(o,t),this.tuples.push(this.#e(o));case"<=":return Ph(o,t),this.tuples.push(this.#a(o))}switch(n){case"~":return Ph(a,t),this.#g(a);case"^":return Ph(a,t),this.#f(a);case">":return Ph(a,t),this.tuples.push(this.#n(a));case"<":return Ph(a,t),this.tuples.push(this.#t(a))}return this.#h(t)}#g(t){let n=this.#c(t);if(uAe(n)){this.tuples.push(this.#l());return}let r=this.includePrerelease?"0":void 0;if(dF(n)){let[c]=n;this.tuples.push([">=",new Fn(t,c,0,0,r,void 0)],["<",new Fn(t,c+1,0,0,"0",void 0)]);return}if(lF(n)){let[c,u]=n,l=this.includePrerelease?"0":void 0;this.tuples.push([">=",new Fn(t,c,u,0,l,void 0)],["<",new Fn(t,c,u+1,0,"0",void 0)]);return}let[a,o,i,s=r,A]=n;this.tuples.push([">=",new Fn(t,a,o,i,s,A)],["<",new Fn(t,a,o+1,0,"0",A)])}#f(t){let n=this.#e(t);if(Pv(n)){this.tuples.push(n);return}let r=n[1];r.major!==0?this.tuples.push(n,["<",new Fn(t,r.major+1,0,0,"0",void 0)]):r.minor!==0?this.tuples.push(n,["<",new Fn(t,r.major,r.minor+1,0,"0",void 0)]):r.prerelease?.length?this.tuples.push(n,["<",new Fn(t,r.major,r.minor,r.patch+1,"0",void 0)]):this.tuples.push(["",r])}#h(t){let n=this.#c(t),r=this.includePrerelease?"0":void 0;X5(n)?this.tuples.push(["",new Fn(t,...n)]):uAe(n)?this.tuples.push(this.#l()):dF(n)?(this.tuples.push([">=",new Fn(t,n[nl],0,0,r,void 0)]),this.tuples.push(["<",new Fn(t,n[nl]+1,0,0,"0",void 0)])):lF(n)&&this.tuples.push([">=",new Fn(t,n[nl],n[aC],0,r,void 0)],["<",new Fn(t,n[nl],n[aC]+1,0,"0",void 0)])}test(t){if(this.isNone)return!1;let n=this.includePrerelease,r=!!t.prerelease?.length,a=n||!r;for(let o of this.tuples){if(Pv(o))continue;let[i,s]=o;switch(a||=!!s.prerelease?.length&&t.tupleEquals(s),i){case"":if(!t.equals(s))return!1;continue;case">":if(!t.greaterThan(s))return!1;continue;case">=":if(!t.greaterThanEqual(s))return!1;continue;case"<":if(!t.lessThan(s))return!1;continue;case"<=":if(!t.lessThanEqual(s))return!1;continue}}return a}#l(){return this.includePrerelease?mAe:pAe}},Pv=e=>e===pAe||e===mAe,pAe={isAny:!0,toString:()=>"*",includePrerelease:!1,test:e=>!e.prerelease?.length},mAe={isAny:!0,toString:()=>"*",includePrerelease:!0,test:e=>!0},lAe={isNone:!0,toString:()=>"<0.0.0-0",includePrerelease:!1,test:e=>!1};var _qe=e=>{let t=r=>{try{let{hostname:a}=new URL(r),o=a.startsWith("www.")?a.slice(4):a;return o==="github.com"?"github":o==="patreon.com"?"patreon":o==="opencollective.com"?"opencollective":"individual"}catch{return"invalid"}},n=(r,a)=>{let o=t(r);if(!a||["github","patreon","opencollective"].includes(o))return o;if(o!=="invalid")return a};if(typeof e=="string")return{url:e,type:t(e)};if(rl(e)&&"url"in e&&typeof e.url=="string"){if(Fqe(e))return e;let r=e,a=r.url,o=n(a,r.type),i={...r,url:a};return o?i.type=o:delete i.type,i}return{url:"",type:"individual"}},Dqe=e=>{if(!e)return;let n=(Array.isArray(e)?e:[e]).map(_qe);return n.length>0?n:void 0},Fqe=e=>rl(e)&&"url"in e&&typeof e.url=="string"&&!!e.url&&"type"in e&&typeof e.type=="string"&&["github","patreon","opencollective","individual"].includes(e.type);var Sqe=e=>{if(!Object.hasOwn(e,"version"))return e;if(!e.version)throw ce("version is empty",{manifest:e});let t=Fn.parse(e.version);return e.version=t.toString(),e},eT=Symbol.for("writeAccess"),tT=Symbol.for("isPublisher"),nT=(e,t,n)=>{if(e){if(rl(e)){if(fAe(e))return e;let r=typeof e.name=="string"?e.name:void 0,a=typeof e.email=="string"?e.email:typeof e.mail=="string"?e.mail:void 0;return!r&&!a?void 0:{name:r,email:a,[eT]:t??!1,[tT]:n??!1}}else if(typeof e=="string"){let r=/^([^(<]+)/,a=/<([^<>]+)>/,o=r.exec(e)?.[0].trim()||"",i=a.exec(e)?.[1]||"";return!o&&!i?void 0:{name:o||void 0,email:i||void 0,[eT]:t??!1,[tT]:n??!1}}}},fAe=e=>rl(e)&&typeof e.name=="string"&&!!e.name&&typeof e.email=="string"&&!!e.email&&(pF(e[eT])||pF(e.writeAccess))&&(pF(e[tT])||pF(e.isPublisher));var Rqe=(e,t)=>{if(!e&&!t)return;let n=[];if(e){let r=Array.isArray(e)?e:[e],a=r.every(fAe),o=!t||Array.isArray(t)&&t.length===0;if(a){if(o)return r.length>0?r:void 0;n.push(...r)}let i=r.map(s=>nT(s)).filter(s=>s!==void 0);n.push(...i)}if(t){let a=(Array.isArray(t)?t:[t]).map(o=>nT(o,!0,!0)).filter(o=>o!==void 0);n.push(...a)}return n.length>0?n:void 0},gAe=e=>{let t=[];if(typeof e=="string")try{new URL(e),t.push({type:"link",url:e})}catch{/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?t.push({type:"email",email:e}):t.push({type:"link",url:e})}else if(rl(e)){Mqe(e)&&t.push(e);let n=e;n.url&&t.push({type:"link",url:n.url}),n.email&&t.push({type:"email",email:n.email})}return t.length>0?t:[]},Lqe=e=>{if(!e)return;let t=[];if(Array.isArray(e))for(let n of e)t.push(...gAe(n));else t.push(...gAe(e));return t.length>0?t:void 0},Mqe=e=>rl(e)&&"type"in e&&(e.type==="email"&&typeof e.email=="string"&&!!e.email||e.type==="link"&&typeof e.url=="string"&&!!e.url);var Nqe=e=>{if(!e)return;let t=[];if(typeof e=="string")t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);else if(Array.isArray(e)){if(Pqe(e))return e;t=e.filter(n=>typeof n=="string").map(n=>n.trim()).filter(n=>n.length>0)}else return;return t.length>0?t:void 0},Pqe=e=>Array.isArray(e)&&e.length>0&&e.every(t=>typeof t=="string"&&!!t&&!t.startsWith(" ")&&!t.endsWith(" ")),pF=e=>typeof e=="boolean";var nu=(e,t="Unknown error")=>e instanceof Error?e:new Error(String(e)||t);var rl=e=>!!e&&typeof e=="object"&&(e.constructor===Object||e.constructor===void 0),Ov=e=>e===void 0||Tqe(e),Tqe=e=>hAe(e,t=>typeof t=="string");var hAe=(e,t)=>rl(e)&&Object.entries(e).every(([n,r])=>typeof n=="string"&&t(r));var jqe=e=>e===void 0||hAe(e,t=>$qe(t)),Oqe=e=>e===void 0||typeof e=="boolean",$qe=e=>rl(e)&&Oqe(e.optional),rT=e=>e===void 0||typeof e=="string",Gqe=e=>e===void 0||rl(e)&&rT(e.tarball),Hqe=e=>rl(e)&&!Array.isArray(e)&&rT(e.name)&&rT(e.version)&&Ov(e.dependencies)&&Ov(e.devDependencies)&&Ov(e.optionalDependencies)&&Ov(e.peerDependencies)&&Ov(e.acceptDependencies)&&jqe(e.peerDependenciesMeta)&&Gqe(e.dist);var aT=(e,t)=>{if(!Hqe(e))throw ce("invalid manifest",{found:e},t??aT);return e},oT=e=>{e=Sqe(e);let t=nT(e.author),n=Dqe(e.funding),r=Rqe(e.contributors,e.maintainers),a=Lqe(e.bugs),o=Nqe(e.keywords),i=e;return t?i.author=t:delete i.author,n?i.funding=n:delete i.funding,r?i.contributors=r:delete i.contributors,a?i.bugs=a:delete i.bugs,o?i.keywords=o:delete i.keywords,"maintainers"in i&&i.maintainers&&delete i.maintainers,i};var Th=new Set(["dependencies","devDependencies","peerDependencies","optionalDependencies"]),bAe=new Set(["prod","dev","peer","optional","peerOptional"]),yAe=new Map([["dependencies","prod"],["devDependencies","dev"],["peerDependencies","peer"],["optionalDependencies","optional"]]);var mF=class{raw;isAny;isSingle;set=[];includePrerelease;#e;constructor(t,n=!1){this.raw=t,this.includePrerelease=n,this.isAny=!1;let r=!0;this.isSingle=!1;let a=[];if(tu(t,"||",-1,o=>{if(this.isAny)return;let i=this.#n(o,this.includePrerelease);if(i instanceof Error){a.push(i);return}if(i.isAny){this.set=[i],this.isAny=!0;return}this.set.push(i),r?Array.isArray(i.tuples)&&i.tuples.length===1&&Array.isArray(i.tuples[0])&&i.tuples[0][0]===""&&(this.isSingle=!0):this.isSingle=!1,r=!1}),!this.set.length&&a.length)throw a.length===1&&a[0]?a[0]:new AggregateError(a)}#n(t,n){try{return new jv(t,n)}catch(r){return nu(r)}}test(t){return this.set.some(n=>n.test(t))}toString(){return this.#e?this.#e:this.isSingle?(this.#e=String(this.set[0]),this.#e):(this.#e=this.set.map(t=>String(t)).join(" || "),this.#e)}};var ru=e=>{if(e instanceof Fn)return e;try{return Fn.parse(e)}catch{return}},qd=(e,t=!1)=>{if(typeof e=="object"){if(e.includePrerelease===t)return e;e=e.raw}try{return new mF(e,t)}catch{return}};var Oh=(e,t,n=!1)=>{if(typeof e=="string"){let r=ru(e);if(!r)return!1;e=r}if(typeof t=="string"){let r=qd(t,n);if(!r)return!1;t=r}return e.satisfies(t)};var ol=(e,t)=>{let n=ru(e);if(!n)throw dg("invalid version",{found:e});let r=ru(t);if(!r)throw dg("invalid version",{found:t});return n.compare(r)};var al=(e,t)=>ol(e,t)>0,iT=(e,t)=>ol(e,t)>=0,jh=(e,t)=>ol(e,t)<0,sT=(e,t)=>ol(e,t)<=0,BAe=(e,t)=>ol(e,t)!==0,oC=(e,t)=>ol(e,t)===0,CAe=e=>ru(e)?.major,wAe=e=>ru(e)?.minor,EAe=e=>ru(e)?.patch,gF=e=>{let t=ru(e);if(t)return t.prerelease??[]};var kAe=(e,t,n)=>{let r=typeof e=="string"?qd(e,n):e,a=typeof t=="string"?qd(t,n):t;return!r||!a?!1:r.isAny||a.isAny?!0:r.set.some(o=>a.set.some(i=>Uqe(o,i)))},Uqe=(e,t)=>{let n=e.tuples.filter(a=>Array.isArray(a)),r=t.tuples.filter(a=>Array.isArray(a));return qqe(n.concat(r))},qqe=e=>{let t=null,n=!1,r=null,a=!1,o=null;for(let[i,s]of e)switch(i){case"":if(o&&!oC(o,s))return!1;o=s;break;case">=":(!t||al(s,t)||oC(s,t)&&!n)&&(t=s,n=!0);break;case">":(!t||al(s,t))&&(t=s,n=!1);break;case"<=":(!r||jh(s,r))&&(r=s,a=!0);break;case"<":(!r||jh(s,r)||oC(s,r))&&(r=s,a=!1);break}return o?!(t&&(n?jh(o,t):sT(o,t))||r&&(a?al(o,r):iT(o,r))):!(t&&r&&(al(t,r)||oC(t,r)&&!(n&&a)))};var zqe=Symbol.for("nodejs.util.inspect.custom"),iC="https://registry.npmjs.org/",fF={npm:iC,gh:"https://npm.pkg.github.com/"},Yqe={jsr:"https://npm.jsr.io/"},hF={github:"git+ssh://git@github.com:$1/$2.git",bitbucket:"git+ssh://git@bitbucket.org:$1/$2.git",gitlab:"git+ssh://git@gitlab.com:$1/$2.git",gist:"git+ssh://git@gist.github.com/$1.git"},bF={github:"https://api.github.com/repos/$1/$2/tarball/$committish",bitbucket:"https://bitbucket.org/$1/$2/get/$committish.tar.gz",gist:"https://codeload.github.com/gist/$1/tar.gz/$committish",gitlab:"https://gitlab.com/$1/$2/repository/archive.tar.gz?ref=$committish"},Kqe={github:"https://github.com/",bitbucket:"https://bitbucket.org/",gist:"https://gist.github.com/",gitlab:"https://gitlab.com/"},_Ae={"@jsr":"https://npm.jsr.io/"},vAe=e=>({catalog:{},catalogs:{},...e,"jsr-registries":{...e?.["jsr-registries"]??{},...Yqe},registry:e?.registry??iC,"scope-registries":e?.["scope-registries"]??{},"git-hosts":e?.["git-hosts"]?{...hF,...e["git-hosts"]}:hF,registries:e?.registries??{},"git-host-archives":e?.["git-host-archives"]?{...bF,...e["git-host-archives"]}:bF}),IAe=(e,t)=>e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||e.startsWith("file:")||e.startsWith("http:")||e.startsWith("https:")||e.startsWith("workspace:")||e.startsWith("catalog:")||e.startsWith("git@")||e.startsWith("git://")||e.startsWith("git+ssh://")||e.startsWith("git+http://")||e.startsWith("git+https://")||e.startsWith("git+file://")||e.startsWith("git@github.com")||e.startsWith("registry:")||e.startsWith("npm:")||e.startsWith("gh:")||[...Object.keys(t["git-hosts"]),...Object.keys(t.registries),...Object.keys(t["jsr-registries"])].some(n=>e.startsWith(`${n}:`)),QAe=(e,t)=>e.indexOf("@",t?1:0),Wqe=e=>e.indexOf("#")>2,Jqe=e=>e.includes("/");var Ga=class e{static parse(t,n,r){return typeof t=="object"?t:new this(t,n,r)}static parseArgs(t,n){let r=vAe(n??{});if(IAe(t,r)){let a=this.parse("(unknown)",t,r);if(a.subspec){let{namedJsrRegistry:o}=a;o||(a.name=a.subspec.name),a.spec=`${a.name}@${a.bareSpec}`}return a}else{let a=t.startsWith("@"),o=QAe(t,a);return o>-1?this.parse(t.substring(0,o),t.substring(o+1),r):Wqe(t)||!a&&Jqe(t)?this.parse("(unknown)",t,r):this.parse(`${t}@`,r)}}static nodejsDependencies;type;spec;options;name;scope;scopeRegistry;bareSpec;gitRemote;gitSelector;gitSelectorParsed;gitCommittish;namedGitHost;namedGitHostPath;workspaceSpec;workspace;namedRegistry;namedJsrRegistry;registry;registrySpec;conventionalRegistryTarball;semver;range;distTag;remoteURL;file;catalog;subspec;overridden=!1;#e;#n;get final(){if(this.#e)return this.#e;let t=this.subspec?this.subspec.final:this;if(t.type==="catalog")throw ce('invalid Spec.final value, type is "catalog"');return this.#e=t}toString(){if(this.#n!==void 0)return this.#n;let t=this;for(;t.subspec?.subspec;)t=t.subspec;return t.subspec&&t.subspec.type!=="registry"&&(t=t.subspec),this.#n=this.name+"@"+t.bareSpec}constructor(t,n,r={}){if(n&&typeof n=="object"&&(r=n,n=void 0),this.options=vAe(r),typeof n=="string")this.name=t,this.#a(t),this.bareSpec=n,this.spec=`${this.name}@${n}`;else if(this.spec=t,!t.startsWith("git@")&&IAe(t,this.options)&&t.includes(":")&&[...Object.keys(this.options.registries),...Object.keys(fF)].some(l=>t.startsWith(`${l}:`)))this.name=t,this.bareSpec=t;else{let l=t.startsWith("@"),d=QAe(t,l);d===-1&&(d=t.length,t+="@"),this.name=t.substring(0,d),l&&this.#a(this.name),this.bareSpec=t.substring(d+1)}if(this.bareSpec.startsWith("catalog:")){this.catalog=this.bareSpec.substring(8);let l=this.catalog?this.options.catalogs[this.catalog]:this.options.catalog;if(!l)throw this.#o("Named catalog not found",{name:this.catalog,validOptions:Object.keys(this.options.catalogs)});let d=l[this.name];if(!d)throw this.#o("Name not found in catalog",{name:this.name,validOptions:Object.keys(l)});this.subspec=e.parse(this.name,d),this.type="catalog";return}if(this.bareSpec.startsWith("https://")){for(let[l,d]of Object.entries(Kqe))if(this.bareSpec.startsWith(d)){let p=new URL(this.bareSpec),[g,m]=p.pathname.replace(/\.git$/,"").replace(/\/+/g," ").trim().split(" ");if(g&&m){this.bareSpec=`${l}:${g}/${m}${p.hash}`,this.spec=`${this.name}@${this.bareSpec}`;break}}}if(this.bareSpec.startsWith("workspace:")){this.type="workspace";let l=this.bareSpec.substring(10).trim(),d=l.lastIndexOf("@");if(d===-1)this.workspace=this.name;else{let m=l.substring(0,d);if(!m||m==="*"||m==="~"||m==="^"||(m.startsWith("@")?m.split("/").length!==2||m.substring(1).includes("@"):m.includes("@")))throw this.#o("workspace: name must be a path or valid package name",{found:m});this.workspace=m}let p=d===-1?l:l.substring(d+1)||"*",g=p==="*"?void 0:qd(p);if(p!=="*"&&p!=="~"&&p!=="^"&&!g)throw this.#o("workspace: spec must be one of *, ~, or ^, or a valid semver range",{found:p,wanted:"'*'|'~'|'^'|SemverRange"});this.workspaceSpec=p,g&&(this.semver=p,this.range=g);return}if(this.bareSpec.startsWith("git://")||this.bareSpec.startsWith("git+ssh://")||this.bareSpec.startsWith("git+http://")||this.bareSpec.startsWith("git+https://")||this.bareSpec.startsWith("git+file://")||this.bareSpec.startsWith("git@github.com")){this.bareSpec.startsWith("git@")&&(this.bareSpec=`git+ssh://${this.bareSpec}`,this.spec=`${this.name}@${this.bareSpec}`),this.type="git";for(let[l,d]of Object.entries(this.options["git-hosts"])){let p=d.indexOf("$");if(p>0&&this.bareSpec.startsWith(d.substring(0,p))){let g=this.bareSpec.substring(p).replace(/\.git(#.*)?$/,"$1");this.bareSpec=`${l}:${g}`,this.spec=`${this.name}@${this.bareSpec}`,this.#t(l,d),this.type="git";return}}this.#s(this.bareSpec);return}let a=Object.entries(this.options.registries);if(this.options.registries.npm||a.push(["npm",this.options.registry]),this.options.registries.gh||a.push(["gh",fF.gh]),this.bareSpec.startsWith("registry:")){let l=this.bareSpec.substring(9),d=l.indexOf("#");if(d===-1)throw this.#o("registry: must include name/version");this.type="registry";let p=l.substring(0,d);p.endsWith("/")||(p+="/");let g=l.substring(d+1);for(let[m,h]of a)h.endsWith("/")||(h+="/",this.options.registries[m]=h),h===p&&(this.namedRegistry=m);this.#i(g,p),this.#r();return}for(let[l,d]of a){let p=`${l}:`;if(this.bareSpec.startsWith(p)){this.type="registry",this.namedRegistry=l,this.#i(this.bareSpec.substring(p.length),d).namedRegistry??=l,this.subspec&&this.name===this.bareSpec&&(this.name=this.subspec.name,this.spec=`${this.name}@${this.bareSpec}`),this.#r();return}}let o=Object.entries(this.options["git-hosts"]);for(let[l,d]of o)if(this.#t(l,d)){this.type="git";return}let i=Object.entries(this.options["jsr-registries"]);for(let[l,d]of i){let p=`${l}:`;if(this.bareSpec.startsWith(p)){this.type="registry",this.namedJsrRegistry=l,this.#A(this.bareSpec.substring(p.length),d).namedJsrRegistry??=l;return}}if(this.bareSpec.startsWith("https://")||this.bareSpec.startsWith("http://")){this.remoteURL=this.bareSpec,this.type="remote";return}if(this.bareSpec.startsWith("file:")){this.type="file";let[l,d]=xAe(this.constructor.nodejsDependencies)(this.bareSpec,this);this.file=l,this.bareSpec=d.replace(/\/+$/,""),this.spec=`${this.name}@${this.bareSpec}`;return}if(!this.bareSpec.startsWith("./")&&!this.bareSpec.startsWith("../")&&this.options["git-hosts"].github){let l=this.bareSpec.indexOf("#");if((l===-1?this.bareSpec:this.bareSpec.substring(0,l)).split("/").length===2){this.bareSpec=`github:${this.bareSpec}`,this.spec=`${this.name}@${this.bareSpec}`,this.#t("github",this.options["git-hosts"].github),this.type="git";return}}if(this.bareSpec.includes("/")||this.bareSpec==="."||this.bareSpec===".."){this.type="file";let[l,d]=xAe(this.constructor.nodejsDependencies)(`file:${this.bareSpec}`,this);this.bareSpec=d,this.spec=`${this.name}@${this.bareSpec}`,this.file=l;return}this.type="registry";let s=qd(this.bareSpec);s?(this.semver=this.bareSpec.trim(),this.range=s):this.distTag=this.bareSpec,this.registrySpec=this.bareSpec;let{"scope-registries":A,registry:c}=this.options,u=this.scope&&A[this.scope];this.registry=u??c;for(let l of Object.values(this.options["jsr-registries"]))if(this.registry===l)return;this.#r()}#a(t){if(!t.startsWith("@"))return;let n=t.indexOf("/");if(n>1&&n<t.length-1){let r=t.substring(0,n);this.registry=this.scopeRegistry=this.options["scope-registries"][r],this.scope=r}}#t(t,n){if(this.bareSpec.startsWith(`${t}:`)){let r=this.bareSpec.indexOf("#"),a=r===-1?this.bareSpec:this.bareSpec.substring(0,r),o=r===-1?"":this.bareSpec.substring(r),i=a.substring(t.length+1);if(!i)throw this.#o("invalid named git host specifier");let s=i.split("/"),A=n;for(let c=0;c<s.length;c++)A=A.split(`$${c+1}`).join(s[c]);if(A+=o,this.namedGitHost=t,this.namedGitHostPath=i,this.#s(A),this.gitCommittish&&!this.gitSelectorParsed?.path){let c=this.options["git-host-archives"][t];if(t==="github"&&this.gitCommittish.startsWith("pull/")&&this.gitCommittish.match(/\//g)?.length===1&&(this.gitCommittish+="/head"),c){this.type="remote";let u=c;u=u.split("$committish").join(this.gitCommittish);for(let l=0;l<s.length;l++)u=u.split(`$${l+1}`).join(s[l]);this.remoteURL=u}}return!0}return!1}[zqe](){return`@vltpkg/spec.Spec ${String(this)}`}#r(){let{name:t,registry:n,range:r}=this.final;if(!n||!r?.isSingle)return;let a=/^@[^/]+\//;this.conventionalRegistryTarball=String(new URL(`/${t}/-/${t.replace(a,"")}-${r}.tgz`,n))}#i(t,n){return this.registry=n,this.subspec=this.constructor.parse(t,{...this.options,registry:n}),this.subspec}#A(t,n){this.registry=n,t.startsWith("@")||(t=`${this.name}@${t}`);let r=`@jsr/${t.replace(/^@/,"").replace(/\//,"__")}`;this.subspec=this.constructor.parse(r,{...this.options,"scope-registries":{...this.options["scope-registries"],"@jsr":n}}),this.name==="(unknown)"&&(t.indexOf("@",1)===-1?this.name=t:this.name=t.substring(0,t.indexOf("@",1)));let a=`${this.namedJsrRegistry}:`,o=`${a}${this.name}`;return this.bareSpec.startsWith(o+"@")?this.bareSpec=a+this.bareSpec.substring(o.length+1):this.bareSpec===o&&(this.bareSpec=a),this.spec=this.name+"@"+this.bareSpec,this.subspec}#o(t,n={}){return ce(t,{spec:this.spec,...n},this.#o)}#s(t){let n=t.indexOf("#");if(n===-1){this.gitRemote=t;return}this.gitRemote=t.substring(0,n),this.gitSelector=t.substring(n+1);let[r,a,o]=this.constructor.parseGitSelector(this.gitSelector,this);this.range=o,this.gitCommittish=a,this.gitSelectorParsed=r}set inheritedRegistry(t){t!=null&&this.type==="registry"&&this.registry===this.options.registry&&(this.registry=t)}static parseGitSelector(t,n){if(!t)return[{}];let r=t.split("::"),a=r[0],o,i,s={};if(typeof a!="string")throw Nv("impossible",{found:a,wanted:String});a.includes(":")||(o=a,r.shift());for(let A of r){let c=A.indexOf(":");if(c===-1)continue;let u=A.substring(0,c),l=A.substring(c+1);if(u==="semver"){if(o)throw ce("Cannot specify a semver range and committish value",{spec:n});if(i=qd(l),!i)throw ce(`Invalid git tag semver range: ${l}`,{spec:n})}if(u==="semver"||u==="path")if(u==="path"){if(this.nodejsDependencies?.isAbsolute(l)||/(^|\/|\\)\.\.($|\\|\/)/.test(l))throw ce("Invalid path in git selector",{spec:n});s.path=(this.nodejsDependencies?this.nodejsDependencies.join("/",l).substring(1):l).replace(/\\/g,"/")}else s[u]=l}return[s,o,i]}},xAe=e=>(t,n)=>{let r=t.substring(5,7),a=`file:${r==="//"?r:""}`,o=t.substring(a.length),[i="",s="/",A="/",c="/"]=o.split("",4);if(!i)return[".","file:."];if(i==="/"&&s==="~"&&A!=="/"||i==="~"&&s!=="/")throw ce("invalid file: specifier. '~username' not supported",{spec:n});if(i==="~")return e?[e.resolve(e.homedir(),o.substring(2)),`file:${o}`]:[o,`file:${o}`];if(i==="/"&&s==="~")return e?[e.resolve(e.homedir(),o.substring(3)),`file:${o.substring(1)}`]:[o.substring(1),`file:${o.substring(1)}`];if(i==="/"&&s==="."&&(A==="/"||A==="."&&c==="/"))return[o.substring(1),`file:${o.substring(1)}`];if(i==="."&&(s==="/"||s==="."&&A==="/"))return[o,`file:${o}`];if(r==="//")try{let u=new URL(t);if(u.host&&u.host!=="localhost")throw ce("invalid file:// specifier. host must be empty or 'localhost'",{spec:n,found:u.host,validOptions:["","localhost"]});return[u.pathname.replace(/^\/([a-zA-Z]:\/)/,"$1"),`file://${u.pathname}`]}catch(u){throw ce("invalid file:// specifier",{spec:n,cause:u})}return e?.winPath.isAbsolute(o)?[o,`file://${o}`]:[`./${o}`,`file:./${o}`]};var oo="\xB7",Vqe=new RegExp(`^((git)?${oo}[^${oo}]*${oo}[^${oo}]*(${oo}[^${oo}]*)?$|^(file|remote|workspace)${oo}[^${oo}]*)(${oo}[^${oo}]*)?$`),Zqe=e=>typeof e=="string"&&Vqe.test(e),$v=e=>{if(!Zqe(e))throw ce("Expected dep id",{found:e});return e},yF=e=>{let[t,n,r,a]=e,o=sC(n);switch(t){case"registry":return`${oo}${o}${oo}${sC(r)}${a?`${oo}${sC(a)}`:""}`;case"git":return`${t}${oo}${o}${oo}${sC(r)}${a?`${oo}${sC(a)}`:""}`;default:return`${t}${oo}${o}${r?`${oo}${sC(r)}`:""}`}},sC=e=>e&&encodeURIComponent(e).replaceAll("%40","@").replaceAll("%2f","\xA7").replaceAll("%2F","\xA7"),DAe=e=>e&&decodeURIComponent(e.replaceAll("@","%40").replaceAll("\xA7","%2F")),Qo=e=>{let[t,n="",r,a]=e.replaceAll("\xA7","/").split(oo,4),o=decodeURIComponent(n);switch(t){case"git":case"":{if(r===void 0)throw ce(`invalid ${t} id`,{found:e});return[t||"registry",o,decodeURIComponent(r),DAe(a)]}case"file":case"remote":case"workspace":return[t,o,DAe(r)];default:throw ce("invalid DepID type",{found:t,validOptions:["git","file","workspace","remote",""]})}},Gv=e=>{let[t,n,r]=Qo(e);switch(t){case"git":case"registry":return yF([t,n,r]);default:return yF([t,n])}},AC=(e,t,n={})=>Xqe(Qo(e),t,n),Xqe=(e,t,n={})=>{let[r,a,o]=e;switch(r){case"remote":{if(!a)throw ce("no remoteURL found on remote id",{found:e});return Ga.parse(t??"(unknown)",a,n)}case"file":{if(!a)throw ce("no file path found on remote id",{found:e});return Ga.parse(t??"(unknown)",`file:${a}`,n)}case"registry":{if(typeof a!="string")throw ce("no registry url or name in registry ID",{found:e});if(!o)throw ce("no name/specifier in registry ID",{found:e});if(!a){let s=Ga.parseArgs(o,n);return t&&s.name!==t?Ga.parse(t,`npm:${o}`,n):s}if(!/^https?:\/\//.test(a)){let s=n.registries?.[a];if(a!=="npm"&&!s)throw ce("named registry not found in options",{name:a,found:e});return Ga.parse(t??"(unknown)",`${a}:${o}`,n)}let i=Ga.parse(t??"(unknown)",`registry:${a}#${o}`,n);return t&&i.final.name!==t?Ga.parse(i.final.name,i.bareSpec,n):i}case"git":{if(!a)throw ce("no git remote in git ID",{found:e});return Ga.parse(t??"(unknown)",a+"#"+o,n)}case"workspace":{if(!a)throw ce("no name/path on workspace id",{found:e});return t&&t!==a?Ga.parse(t,`workspace:${a}@*`,n):Ga.parse(a,"workspace:*",n)}}};var Oce=k(SF(),1);var AA=e=>"type"in e&&"nodes"in e,we=e=>{if(!e)throw ce("Expected a query node");if(!AA(e))throw ce("Not a query selector node with children",{found:e});return e},Hh=e=>!!e&&typeof e=="object",lI=e=>Hh(e)&&!!e.attribute&&e.type==="attribute",dC=e=>{if(!e)throw ce("Expected a query node");if(!lI(e))throw ce("Mismatching query node",{wanted:"attribute",found:e.type});return e},pC=e=>Hh(e)&&!!e.value&&e.type==="combinator",Pce=e=>{if(!e)throw ce("Expected a query node");if(!pC(e))throw ce("Mismatching query node",{wanted:"combinator",found:e.type});return e},pg=e=>Hh(e)&&!!e.value&&e.type==="id",Tce=e=>{if(!e)throw ce("Expected a query node");if(!pg(e))throw ce("Mismatching query node",{wanted:"id",found:e.type});return e},Kd=e=>AA(e)&&e.type==="selector",jce=e=>{if(!e)throw ce("Expected a query node");if(!Kd(e))throw ce("Mismatching query node",{wanted:"selector",found:e.type});return e},ou=e=>Hh(e)&&!!e.value&&e.type==="pseudo",RF=e=>{if(!e)throw ce("Expected a query node");if(!ou(e))throw ce("Mismatching query node",{wanted:"pseudo",found:e.type});return e},Yn=e=>Hh(e)&&!!e.value&&e.type==="tag",wn=e=>{if(!e)throw ce("Expected a query node");if(!Yn(e))throw ce("Mismatching query node",{wanted:"tag",found:e.type});return e},Kn=e=>Hh(e)&&!!e.value&&e.type==="string",En=e=>{if(!e)throw ce("Expected a query node");if(!Kn(e))throw ce("Mismatching query node",{wanted:"string",found:e.type});return e},nj=e=>Hh(e)&&!!e.value&&e.type==="comment";var KWe=e=>e.replace(/(#@(\w|-|\.)+)\//gm,(t,n)=>`${n}\\/`),WWe=e=>e.replaceAll(".","\\."),JWe=e=>e.replaceAll("\\.","."),VWe=new Set([":published",":score",":malware",":severity",":sev",":squat",":semver",":v"]),ZWe=e=>VWe.has(e.value),Uh=e=>{let t=WWe(KWe(e));return(0,Oce.default)(r=>{r.walk(a=>{if(a.value&&typeof a.value=="string"&&(a.value=JWe(a.value)),ou(a)&&ZWe(a))for(let o of a.nodes){let i=jce(o);i.nodes.forEach((s,A,c)=>{let u=c[A+1];pC(s)&&Yn(u)&&(u.value=`${s.spaces.before}${s.value}${s.spaces.after}${u.value}`,u.source?.start?.line&&s.source?.start?.line&&(u.source.start.line=s.source.start.line),u.source?.start?.column&&s.source?.start?.column&&(u.source.start.column=s.source.start.column),c.splice(A,1))}),i.nodes.reduce((s,A)=>(A===s||(s.value=`${s.value}${A.spaces.before}${A.value}${A.spaces.after}`,A.source?.end?.line&&s.source?.end?.line&&(s.source.end.line=A.source.end.line),A.source?.end?.column&&s.source?.end?.column&&(s.source.end.column=A.source.end.column)),s),i.first),i.nodes.length=1}})}).astSync(t)};var tt=(e,t)=>{for(let n of t.edgesIn)e.partial.edges.delete(n);e.partial.nodes.delete(t)},nc=(e,t)=>{e.partial.edges.delete(t),t.to&&e.partial.nodes.delete(t.to)},dn=e=>{for(let t of e.partial.edges)t.to||e.partial.edges.delete(t)},rc=e=>{for(let t of e.partial.nodes)t.edgesIn.size===0&&e.partial.nodes.delete(t)},jn=e=>e.replace(/^"(.*?)"$/,"$1"),ni=(e,t)=>{if(!e.securityArchive)throw ce(`Missing security archive while trying to parse the :${t} selector`,{found:e})},mC=e=>(e.partial.nodes.clear(),e.partial.edges.clear(),e),It=(e,t)=>async n=>{ni(n,e);for(let r of n.partial.nodes)!n.securityArchive.get(r.id)?.alerts.some(i=>i.type===t)&&tt(n,r);return dn(n),n};var LF=e=>String(e),rj=(e,t,n)=>{if(!e.manifest)return;let r=new Set([e.manifest]),a=new Set;for(let i of t)for(let s of r){if(!s)throw ce("failed to find nested property in :attr",{found:t});if(Array.isArray(s)){for(let A of s)r.add(A);continue}if(!(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&i in s){let A=s[i];A&&(i===n?a.add(A):(r.delete(s),r.add(A)))}}if(!a.size)return;let o=new Set;for(let i of a)if(Array.isArray(i))for(let s of i)o.add(s?LF(s):"");else o.add(LF(i));return[...o]},aj=(e,t,n,r,a,o=[])=>{let i=A=>t?.(a?LF(A).toLowerCase():LF(A),a?n.toLowerCase():n),s=A=>{for(let c of A.edgesIn)e.partial.edges.delete(c);e.partial.nodes.delete(A)};for(let A of e.partial.nodes){let c=o.length?o:[r],u=rj(A,c,r);if(!u?.length){s(A);continue}t&&!u.some(i)&&s(A)}return dn(e),e},XWe={"=":(e,t="")=>e===t,"^=":(e,t="")=>e.startsWith(t),"$=":(e,t="")=>e.endsWith(t),"~=":(e,t="")=>new Set(e.match(/\w+/g)).has(t),"*=":(e,t="")=>e.includes(t),"|=":(e,t="")=>e===t||e.startsWith(`${t}-`),undefined:e=>!!e},oj=new Map(Object.entries(XWe)),$ce=async e=>{await e.cancellable();let t=dC(e.current),n=oj.get(String(t.operator));if(!n){if(e.loose)return e;throw ce(`Unsupported attribute operator: ${t.operator}`,{found:e.current})}let r=t.value||"",a=t.attribute,o=!!t.insensitive;return e.specificity.commonCounter+=1,aj(e,n,r,a,o)};var eJe=async e=>{let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t)for(let r of n.edgesOut.values())r.to&&(e.partial.edges.add(r),e.partial.nodes.add(r.to));return e},tJe=async e=>{let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t)for(let r of n.edgesIn){let a=r.from.edgesOut.values();for(let o of a)o.to&&o.to!==n&&(e.partial.edges.add(o),e.partial.nodes.add(o.to))}return e},nJe=async e=>{if(e.prev?.type==="tag"||e.next?.type==="tag")return e;let t=new Set(e.partial.nodes);e.partial.edges.clear(),e.partial.nodes.clear();for(let n of t){let r=new Set;for(let a of n.edgesOut.values())a.to&&(r.add(a.to),e.partial.edges.add(a),e.partial.nodes.add(a.to));for(let a of r)t.add(a)}return e},rJe={">":eJe,"~":tJe," ":nJe},aJe=new Map(Object.entries(rJe)),Gce=async e=>{await e.cancellable();let t=Pce(e.current),n=t.value&&aJe.get(t.value);if(!n){if(e.loose)return e;throw ce(`Unsupported combinator: ${e.current.value}`,{found:e.current})}return n(e)};var Hce=async e=>{let{value:t}=Tce(e.current);if(!t)throw ce("Missing identifier name");for(let n of e.partial.edges)n.name!==t&&(e.partial.edges.delete(n),n.to&&e.partial.nodes.delete(n.to));for(let n of e.partial.nodes)n.edgesIn.size===0&&n.name!==t&&e.partial.nodes.has(n)&&e.partial.nodes.delete(n);return e.specificity.idCounter+=1,e};var Uce=It("abandoned","missingAuthor");var ij=e=>{let t=dC(we(e.pop()).nodes[0]),n=[];for(let r of e){let a=we(r).nodes[0];Kn(a)?n.push(jn(En(a).value)):n.push(wn(a).value)}return n.push(t.attribute),{attribute:t.attribute,insensitive:t.insensitive||!1,operator:t.operator,value:t.value,properties:n}},qce=async e=>{let t;try{t=ij(we(e.current).nodes)}catch(s){throw ce("Failed to parse :attr selector",{cause:s})}let n=t.operator?oj.get(t.operator):void 0,r=t.value||"",a=t.attribute,o=t.insensitive,i=t.properties;return aj(e,n,r,a,o,i)};var zce=async e=>{ni(e,"confused");for(let t of e.partial.nodes){let n=e.securityArchive.get(t.id);!t.confused&&!n?.alerts.some(a=>a.type==="manifestConfusion")&&tt(e,t)}return dn(e),e};var oJe=e=>{let t="";if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),!t)throw ce("Expected a CVE ID",{found:we(e[0]).nodes[0]});return{cveId:t}},Yce=async e=>{ni(e,"cve");let t;try{t=oJe(we(e.current).nodes)}catch(r){throw ce("Failed to parse :cve selector",{cause:r})}let{cveId:n}=t;for(let r of e.partial.nodes)!e.securityArchive.get(r.id)?.alerts.some(i=>i.props?.cveId?.trim().toLowerCase()===n.trim().toLowerCase())&&tt(e,r);return dn(e),e};var iJe=e=>{let t="";if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),!t)throw ce("Expected a CWE ID",{found:we(e[0]).nodes[0]});return{cweId:t}},Kce=async e=>{ni(e,"cwe");let t;try{t=iJe(we(e.current).nodes)}catch(r){throw ce("Failed to parse :cwe selector",{cause:r})}let{cweId:n}=t;for(let r of e.partial.nodes)!e.securityArchive.get(r.id)?.alerts.some(i=>i.props?.cwes?.some(s=>s.id.trim().toLowerCase()===n.trim().toLowerCase()))&&tt(e,r);return dn(e),e};var Wce=It("debug","debugAccess");var Jce=It("deprecated","deprecated");var Vce=async e=>{for(let t of e.partial.edges)t.type!=="dev"&&nc(e,t);return rc(e),e};var Zce=It("dynamic","dynamicRequire");var Xce=async e=>{for(let t of e.partial.nodes)t.edgesOut.size>0&&tt(e,t);return e};var eue=It("entropic","highEntropyStrings");var tue=It("env","envVars");var nue=It("eval","usesEval");var rue=It("fs","filesystemAccess");var oue=new Map([["unlicensed","explicitlyUnlicensedItem"],["misc","miscLicenseIssues"],["restricted","nonpermissiveLicense"],["ambiguous","ambiguousClassifier"],["copyleft","copyleftLicense"],["unknown","unidentifiedLicense"],["none","noLicenseFound"],["exception","licenseException"],[void 0,void 0]]),iue=new Set(oue.keys()),sJe=e=>iue.has(e),aue=e=>{if(!sJe(e))throw ce("Expected a valid license kind",{found:e,validOptions:Array.from(iue)});return e},AJe=e=>{let t;return Kn(we(e[0]).nodes[0])?t=aue(jn(En(we(e[0]).nodes[0]).value)):Yn(we(e[0]).nodes[0])&&(t=aue(wn(we(e[0]).nodes[0]).value)),{kind:t}},sue=async e=>{ni(e,"license");let t;try{t=AJe(we(e.current).nodes)}catch(a){throw ce("Failed to parse :license selector",{cause:a})}let{kind:n}=t,r=oue.get(n);for(let a of e.partial.nodes)!e.securityArchive.get(a.id)?.alerts.some(s=>s.type===r)&&tt(e,a);return dn(e),e};var Aue=async e=>{for(let t of e.partial.nodes){let[n,r]=Qo(t.id);(n!=="file"||r.endsWith("tar.gz")||r===".")&&tt(e,t)}for(let t of e.partial.edges)(!t.spec.file||t.spec.file.endsWith("tar.gz")||t.spec.file===".")&&e.partial.edges.delete(t);return e};var sj=new Map([["critical","malware"],["high","gptMalware"],["medium","gptSecurity"],["low","gptAnomaly"],["0","malware"],["1","gptMalware"],["2","gptSecurity"],["3","gptAnomaly"]]),cue=new Map([["critical",0],["high",1],["medium",2],["low",3],["0",0],["1",1],["2",2],["3",3]]),uue=new Set(sj.keys()),lue=e=>uue.has(e),cJe=e=>{if(!lue(e))throw ce("Expected a valid malware kind",{found:e,validOptions:Array.from(uue)});return e},uJe=e=>{let t="",n,r;if(Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),t.startsWith(">=")?(n=">=",t=t.substring(2)):t.startsWith("<=")?(n="<=",t=t.substring(2)):t.startsWith(">")?(n=">",t=t.substring(1)):t.startsWith("<")&&(n="<",t=t.substring(1)),!n)r=cJe(t);else if(lue(t))r=t;else throw ce("Expected a valid malware kind or number between 0-3",{found:t});return{kind:r,comparator:n}},due=async e=>{ni(e,"malware");let t;try{t=uJe(we(e.current).nodes)}catch(o){throw ce("Failed to parse :malware selector",{cause:o})}let{kind:n,comparator:r}=t,a=r?void 0:sj.get(n);for(let o of e.partial.nodes){let i=e.securityArchive.get(o.id);(!i?.alerts||i.alerts.length===0)&&tt(e,o)}for(let o of e.partial.nodes){let i=e.securityArchive.get(o.id),s=!0;if(i)if(r){let A=cue.get(n);if(!A)break;for(let c of i.alerts){let u=c.type,l=[...sj.entries()].find(([d,p])=>p===u)?.[0];if(l){let d=cue.get(l);if(d==null)continue;switch(r){case">":d>A&&(s=!1);break;case"<":d<A&&(s=!1);break;case">=":d>=A&&(s=!1);break;case"<=":d<=A&&(s=!1);break}if(!s)break}}}else s=!i.alerts.some(A=>A.type===a);s&&tt(e,o)}return dn(e),e};var pue=It("minified","minifiedFile");var mue=async e=>{for(let t of e.partial.edges)t.to&&e.partial.edges.delete(t);return e.partial.nodes.clear(),e};var gue=It("native","hasNativeCode");var fue=It("network","networkAccess");var hue=It("obfuscated","obfuscatedFile");var bue=async e=>{for(let t of e.partial.edges)t.optional||nc(e,t);return rc(e),e};var lJe=Object.prototype.toString,dJe=e=>lJe.call(e)==="[object Error]",pJe=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Aj(e){return e&&dJe(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:pJe.has(e.message):!1}function mJe(e){if(typeof e=="number"){if(e<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(e))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(e!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function MF(e,t,{min:n=0,allowInfinity:r=!1}={}){if(t!==void 0){if(typeof t!="number"||Number.isNaN(t))throw new TypeError(`Expected \`${e}\` to be a number${r?" or Infinity":""}.`);if(!r&&!Number.isFinite(t))throw new TypeError(`Expected \`${e}\` to be a finite number.`);if(t<n)throw new TypeError(`Expected \`${e}\` to be \u2265 ${n}.`)}}var qh=class extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}},gJe=(e,t,n)=>{let r=n.retries-(t-1);return Object.freeze({error:e,attemptNumber:t,retriesLeft:r})};function fJe(e,t){let n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*t.factor**(e-1));return r=Math.min(r,t.maxTimeout),r}async function hJe(e,t,n,r,a){let o=e;if(o instanceof Error||(o=new TypeError(`Non-error was thrown: "${o}". You should only throw errors.`)),o instanceof qh)throw o.originalError;if(o instanceof TypeError&&!Aj(o))throw o;let i=gJe(o,t,n);await n.onFailedAttempt(i);let s=Date.now();if(s-r>=a||t>=n.retries+1||!await n.shouldRetry(i))throw o;let A=fJe(t,n),c=a-(s-r);if(c<=0)throw o;let u=Math.min(A,c);u>0&&await new Promise((l,d)=>{let p=()=>{clearTimeout(g),n.signal?.removeEventListener("abort",p),d(n.signal.reason)},g=setTimeout(()=>{n.signal?.removeEventListener("abort",p),l()},u);n.unref&&g.unref?.(),n.signal?.addEventListener("abort",p,{once:!0})}),n.signal?.throwIfAborted()}async function dI(e,t={}){if(t={...t},mJe(t.retries),Object.hasOwn(t,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");t.retries??=10,t.factor??=2,t.minTimeout??=1e3,t.maxTimeout??=Number.POSITIVE_INFINITY,t.randomize??=!1,t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,MF("factor",t.factor,{min:0,allowInfinity:!1}),MF("minTimeout",t.minTimeout,{min:0,allowInfinity:!1}),MF("maxTimeout",t.maxTimeout,{min:0,allowInfinity:!0});let n=t.maxRetryTime??Number.POSITIVE_INFINITY;MF("maxRetryTime",n,{min:0,allowInfinity:!0}),t.factor>0||(t.factor=1),t.signal?.throwIfAborted();let r=0,a=Date.now(),o=n;for(;r<t.retries+1;){r++;try{t.signal?.throwIfAborted();let i=await e(r);return t.signal?.throwIfAborted(),i}catch(i){await hJe(i,r,t,a,o)}}throw new Error("Retry attempts exhausted without throwing an error.")}var Bue=new Set(["any","major","minor","patch","in-range","out-of-range"]),bJe=e=>Bue.has(e),yue=e=>{if(!bJe(e))throw ce("Expected a valid outdated kind",{found:e,validOptions:Array.from(Bue)});return e},yJe=async(e,t,n)=>{let r=AC(e.id,String(e.name),t);if(!r.registry||!e.name)return[];let a=new URL(r.registry);a.pathname=`/${e.name}`;let o=await fetch(String(a),{headers:{Accept:"application/vnd.npm.install-v1+json"},signal:n});if(o.status===404)throw new qh("Missing API");if(!o.ok)throw ce("Failed to fetch packument",{name:e.name,spec:r,response:o});let i=await o.json();return Object.keys(i.versions).sort(ol)},BJe=e=>{let t="any";return Kn(we(e[0]).nodes[0])?t=yue(jn(En(we(e[0]).nodes[0]).value)):Yn(we(e[0]).nodes[0])&&(t=yue(wn(we(e[0]).nodes[0]).value)),{kind:t}},CJe=async(e,t,n)=>{if(!t.name||!t.version)return t;let r=t.version,a;try{a=await dI(()=>yJe(t,e.specOptions,e.signal),{retries:e.retries,signal:e.signal})}catch(s){console.warn(ce("Could not retrieve registry versions",{name:t.name,cause:s})),a=[]}let o=a.filter(s=>al(s,r));if(!o.length)return t;let i=new Map([["major",CAe],["minor",wAe],["patch",EAe]]);switch(n){case"any":return;case"major":case"minor":case"patch":return o.some(s=>{let A=i.get(n)?.(s),c=i.get(n)?.(r);return A===void 0||c===void 0?!1:A>c})?void 0:t;case"in-range":{for(let s of t.edgesIn)if(e.partial.edges.has(s)&&o.some(A=>s.spec.final.range&&Oh(A,s.spec.final.range)))return;return t}case"out-of-range":{for(let s of t.edgesIn)if(e.partial.edges.has(s)&&o.some(A=>s.spec.final.range&&Oh(A,s.spec.final.range)))return t;return}}},Cue=async e=>{let t;try{t=BJe(we(e.current).nodes)}catch(o){if(nu(o).message==="Expected a query node")t={kind:"any"};else throw ce("Failed to parse :outdated selector",{cause:o})}let{kind:n}=t,r=[];for(let o of e.partial.nodes){if(o.mainImporter||o.manifest?.private||Qo(o.id)[0]!=="registry"){tt(e,o);continue}r.push(CJe(e,o,n))}let a=await Promise.all(r);for(let o of a)o&&tt(e,o);return e};var wue=async e=>{for(let t of e.partial.edges)t.spec.overridden||nc(e,t);return rc(e),e};var cj=(e,t,n)=>{let r=e instanceof RegExp?Eue(e,n):e,a=t instanceof RegExp?Eue(t,n):t,o=r!==null&&a!=null&&wJe(r,a,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+r.length,o[1]),post:n.slice(o[1]+a.length)}},Eue=(e,t)=>{let n=t.match(e);return n?n[0]:null},wJe=(e,t,n)=>{let r,a,o,i,s,A=n.indexOf(e),c=n.indexOf(t,A+1),u=A;if(A>=0&&c>0){if(e===t)return[A,c];for(r=[],o=n.length;u>=0&&!s;){if(u===A)r.push(u),A=n.indexOf(e,u+1);else if(r.length===1){let l=r.pop();l!==void 0&&(s=[l,c])}else a=r.pop(),a!==void 0&&a<o&&(o=a,i=c),c=n.indexOf(t,u+1);u=A<c&&A>=0?A:c}r.length&&i!==void 0&&(s=[o,i])}return s};var kue="\0SLASH"+Math.random()+"\0",vue="\0OPEN"+Math.random()+"\0",lj="\0CLOSE"+Math.random()+"\0",Iue="\0COMMA"+Math.random()+"\0",Que="\0PERIOD"+Math.random()+"\0",EJe=new RegExp(kue,"g"),kJe=new RegExp(vue,"g"),vJe=new RegExp(lj,"g"),IJe=new RegExp(Iue,"g"),QJe=new RegExp(Que,"g"),xJe=/\\\\/g,_Je=/\\{/g,DJe=/\\}/g,FJe=/\\,/g,SJe=/\\./g;function uj(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function RJe(e){return e.replace(xJe,kue).replace(_Je,vue).replace(DJe,lj).replace(FJe,Iue).replace(SJe,Que)}function LJe(e){return e.replace(EJe,"\\").replace(kJe,"{").replace(vJe,"}").replace(IJe,",").replace(QJe,".")}function xue(e){if(!e)return[""];let t=[],n=cj("{","}",e);if(!n)return e.split(",");let{pre:r,body:a,post:o}=n,i=r.split(",");i[i.length-1]+="{"+a+"}";let s=xue(o);return o.length&&(i[i.length-1]+=s.shift(),i.push.apply(i,s)),t.push.apply(t,i),t}function _ue(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),pI(RJe(e),!0).map(LJe)):[]}function MJe(e){return"{"+e+"}"}function NJe(e){return/^-?0\d/.test(e)}function PJe(e,t){return e<=t}function TJe(e,t){return e>=t}function pI(e,t){let n=[],r=cj("{","}",e);if(!r)return[e];let a=r.pre,o=r.post.length?pI(r.post,!1):[""];if(/\$$/.test(r.pre))for(let i=0;i<o.length;i++){let s=a+"{"+r.body+"}"+o[i];n.push(s)}else{let i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),A=i||s,c=r.body.indexOf(",")>=0;if(!A&&!c)return r.post.match(/,(?!,).*\}/)?(e=r.pre+"{"+r.body+lj+r.post,pI(e)):[e];let u;if(A)u=r.body.split(/\.\./);else if(u=xue(r.body),u.length===1&&u[0]!==void 0&&(u=pI(u[0],!1).map(MJe),u.length===1))return o.map(d=>r.pre+u[0]+d);let l;if(A&&u[0]!==void 0&&u[1]!==void 0){let d=uj(u[0]),p=uj(u[1]),g=Math.max(u[0].length,u[1].length),m=u.length===3&&u[2]!==void 0?Math.abs(uj(u[2])):1,h=PJe;p<d&&(m*=-1,h=TJe);let b=u.some(NJe);l=[];for(let y=d;h(y,p);y+=m){let w;if(s)w=String.fromCharCode(y),w==="\\"&&(w="");else if(w=String(y),b){let C=g-w.length;if(C>0){let B=new Array(C+1).join("0");y<0?w="-"+B+w.slice(1):w=B+w}}l.push(w)}}else{l=[];for(let d=0;d<u.length;d++)l.push.apply(l,pI(u[d],!1))}for(let d=0;d<l.length;d++)for(let p=0;p<o.length;p++){let g=a+l[d]+o[p];(!t||A||g)&&n.push(g)}}return n}var mI=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var jJe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},gI=e=>e.replace(/[[\]\\-]/g,"\\$&"),OJe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Due=e=>e.join(""),Fue=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],a=[],o=n+1,i=!1,s=!1,A=!1,c=!1,u=n,l="";e:for(;o<e.length;){let m=e.charAt(o);if((m==="!"||m==="^")&&o===n+1){c=!0,o++;continue}if(m==="]"&&i&&!A){u=o+1;break}if(i=!0,m==="\\"&&!A){A=!0,o++;continue}if(m==="["&&!A){for(let[h,[f,b,y]]of Object.entries(jJe))if(e.startsWith(h,o)){if(l)return["$.",!1,e.length-n,!0];o+=h.length,y?a.push(f):r.push(f),s=s||b;continue e}}if(A=!1,l){m>l?r.push(gI(l)+"-"+gI(m)):m===l&&r.push(gI(m)),l="",o++;continue}if(e.startsWith("-]",o+1)){r.push(gI(m+"-")),o+=2;continue}if(e.startsWith("-",o+1)){l=m,o+=2;continue}r.push(gI(m)),o++}if(u<o)return["",!1,0,!1];if(!r.length&&!a.length)return["$.",!1,e.length-n,!0];if(a.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!c){let m=r[0].length===2?r[0].slice(-1):r[0];return[OJe(m),!1,u-n,!1]}let d="["+(c?"^":"")+Due(r)+"]",p="["+(c?"":"^")+Due(a)+"]";return[r.length&&a.length?"("+d+"|"+p+")":r.length?d:p,s,u-n,!0]};var mg=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var $Je=new Set(["!","?","+","*","@"]),Sue=e=>$Je.has(e),GJe="(?!(?:^|/)\\.\\.?(?:$|/))",NF="(?!\\.)",HJe=new Set(["[","."]),UJe=new Set(["..","."]),qJe=new Set("().*{}+?[]^$\\!"),zJe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dj="[^/]",Rue=dj+"*?",Lue=dj+"+?",gC=class e{type;#e;#n;#a=!1;#t=[];#r;#i;#A;#o=!1;#s;#u;#p=!1;constructor(t,n,r={}){this.type=t,t&&(this.#n=!0),this.#r=n,this.#e=this.#r?this.#r.#e:this,this.#s=this.#e===this?r:this.#e.#s,this.#A=this.#e===this?[]:this.#e.#A,t==="!"&&!this.#e.#o&&this.#A.push(this),this.#i=this.#r?this.#r.#t.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#t)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#t.map(t=>String(t)).join("|")+")":this.#u=this.#t.map(t=>String(t)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#o)return this;this.toString(),this.#o=!0;let t;for(;t=this.#A.pop();){if(t.type!=="!")continue;let n=t,r=n.#r;for(;r;){for(let a=n.#i+1;!r.type&&a<r.#t.length;a++)for(let o of t.#t){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(r.#t[a])}n=r,r=n.#r}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof e&&n.#r===this))throw new Error("invalid part: "+n);this.#t.push(n)}}toJSON(){let t=this.type===null?this.#t.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#t.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#o&&this.#r?.type==="!")&&t.push({}),t}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(this.#i===0)return!0;let t=this.#r;for(let n=0;n<this.#i;n++){let r=t.#t[n];if(!(r instanceof e&&r.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let t=this.#r?this.#r.#t.length:0;return this.#i===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new e(this.type,t);for(let r of this.#t)n.copyIn(r);return n}static#d(t,n,r,a){let o=!1,i=!1,s=-1,A=!1;if(n.type===null){let p=r,g="";for(;p<t.length;){let m=t.charAt(p++);if(o||m==="\\"){o=!o,g+=m;continue}if(i){p===s+1?(m==="^"||m==="!")&&(A=!0):m==="]"&&!(p===s+2&&A)&&(i=!1),g+=m;continue}else if(m==="["){i=!0,s=p,A=!1,g+=m;continue}if(!a.noext&&Sue(m)&&t.charAt(p)==="("){n.push(g),g="";let h=new e(m,n);p=e.#d(t,h,p,a),n.push(h);continue}g+=m}return n.push(g),p}let c=r+1,u=new e(null,n),l=[],d="";for(;c<t.length;){let p=t.charAt(c++);if(o||p==="\\"){o=!o,d+=p;continue}if(i){c===s+1?(p==="^"||p==="!")&&(A=!0):p==="]"&&!(c===s+2&&A)&&(i=!1),d+=p;continue}else if(p==="["){i=!0,s=c,A=!1,d+=p;continue}if(Sue(p)&&t.charAt(c)==="("){u.push(d),d="";let g=new e(p,u);u.push(g),c=e.#d(t,g,c,a);continue}if(p==="|"){u.push(d),d="",l.push(u),u=new e(null,n);continue}if(p===")")return d===""&&n.#t.length===0&&(n.#p=!0),u.push(d),d="",n.push(...l,u),c;d+=p}return n.type=null,n.#n=void 0,n.#t=[t.substring(r-1)],c}static fromGlob(t,n={}){let r=new e(null,void 0,n);return e.#d(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let t=this.toString(),[n,r,a,o]=this.toRegExpSource();if(!(a||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let s=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,s),{_src:n,_glob:t})}get options(){return this.#s}toRegExpSource(t){let n=t??!!this.#s.dot;if(this.#e===this&&this.#c(),!this.type){let A=this.isStart()&&this.isEnd(),c=this.#t.map(p=>{let[g,m,h,f]=typeof p=="string"?e.#g(p,this.#n,A):p.toRegExpSource(t);return this.#n=this.#n||h,this.#a=this.#a||f,g}).join(""),u="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&UJe.has(this.#t[0]))){let g=HJe,m=n&&g.has(c.charAt(0))||c.startsWith("\\.")&&g.has(c.charAt(2))||c.startsWith("\\.\\.")&&g.has(c.charAt(4)),h=!n&&!t&&g.has(c.charAt(0));u=m?GJe:h?NF:""}let l="";return this.isEnd()&&this.#e.#o&&this.#r?.type==="!"&&(l="(?:$|\\/)"),[u+c+l,mg(c),this.#n=!!this.#n,this.#a]}let r=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#m(n);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let A=this.toString();return this.#t=[A],this.type=null,this.#n=void 0,[A,mg(this.toString()),!1,!1]}let i=!r||t||n||!NF?"":this.#m(!0);i===o&&(i=""),i&&(o=`(?:${o})(?:${i})*?`);let s="";if(this.type==="!"&&this.#p)s=(this.isStart()&&!n?NF:"")+Lue;else{let A=this.type==="!"?"))"+(this.isStart()&&!n&&!t?NF:"")+Rue+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;s=a+o+A}return[s,mg(o),this.#n=!!this.#n,this.#a]}#m(t){return this.#t.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,a,o,i]=n.toRegExpSource(t);return this.#a=this.#a||i,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#g(t,n,r=!1){let a=!1,o="",i=!1;for(let s=0;s<t.length;s++){let A=t.charAt(s);if(a){a=!1,o+=(qJe.has(A)?"\\":"")+A;continue}if(A==="\\"){s===t.length-1?o+="\\\\":a=!0;continue}if(A==="["){let[c,u,l,d]=Fue(t,s);if(l){o+=c,i=i||u,s+=l-1,n=n||d;continue}}if(A==="*"){r&&t==="*"?o+=Lue:o+=Rue,n=!0;continue}if(A==="?"){o+=dj,n=!0;continue}o+=zJe(A)}return[o,mg(t),!!n,i]}};var pj=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var ri=(e,t,n={})=>(mI(t),!n.nocomment&&t.charAt(0)==="#"?!1:new fC(t,n).match(e)),YJe=/^\*+([^+@!?\*\[\(]*)$/,KJe=e=>t=>!t.startsWith(".")&&t.endsWith(e),WJe=e=>t=>t.endsWith(e),JJe=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),VJe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ZJe=/^\*+\.\*+$/,XJe=e=>!e.startsWith(".")&&e.includes("."),eVe=e=>e!=="."&&e!==".."&&e.includes("."),tVe=/^\.\*+$/,nVe=e=>e!=="."&&e!==".."&&e.startsWith("."),rVe=/^\*+$/,aVe=e=>e.length!==0&&!e.startsWith("."),oVe=e=>e.length!==0&&e!=="."&&e!=="..",iVe=/^\?+([^+@!?\*\[\(]*)?$/,sVe=([e,t=""])=>{let n=Pue([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},AVe=([e,t=""])=>{let n=Tue([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},cVe=([e,t=""])=>{let n=Tue([e]);return t?r=>n(r)&&r.endsWith(t):n},uVe=([e,t=""])=>{let n=Pue([e]);return t?r=>n(r)&&r.endsWith(t):n},Pue=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},Tue=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},jue=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Mue={win32:{sep:"\\"},posix:{sep:"/"}},lVe=jue==="win32"?Mue.win32.sep:Mue.posix.sep;ri.sep=lVe;var oc=Symbol("globstar **");ri.GLOBSTAR=oc;var dVe="[^/]",pVe=dVe+"*?",mVe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",gVe="(?:(?!(?:\\/|^)\\.).)*?",fVe=(e,t={})=>n=>ri(n,e,t);ri.filter=fVe;var ac=(e,t={})=>Object.assign({},e,t),hVe=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ri;let t=ri;return Object.assign((r,a,o={})=>t(r,a,ac(e,o)),{Minimatch:class extends t.Minimatch{constructor(a,o={}){super(a,ac(e,o))}static defaults(a){return t.defaults(ac(e,a)).Minimatch}},AST:class extends t.AST{constructor(a,o,i={}){super(a,o,ac(e,i))}static fromGlob(a,o={}){return t.AST.fromGlob(a,ac(e,o))}},unescape:(r,a={})=>t.unescape(r,ac(e,a)),escape:(r,a={})=>t.escape(r,ac(e,a)),filter:(r,a={})=>t.filter(r,ac(e,a)),defaults:r=>t.defaults(ac(e,r)),makeRe:(r,a={})=>t.makeRe(r,ac(e,a)),braceExpand:(r,a={})=>t.braceExpand(r,ac(e,a)),match:(r,a,o={})=>t.match(r,a,ac(e,o)),sep:t.sep,GLOBSTAR:oc})};ri.defaults=hVe;var Oue=(e,t={})=>(mI(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:_ue(e));ri.braceExpand=Oue;var bVe=(e,t={})=>new fC(e,t).makeRe();ri.makeRe=bVe;var yVe=(e,t,n={})=>{let r=new fC(t,n);return e=e.filter(a=>r.match(a)),r.options.nonull&&!e.length&&e.push(t),e};ri.match=yVe;var Nue=/[?*]|[+@!]\(.*?\)|\[|\]/,BVe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fC=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,n={}){mI(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||jue,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let a=this.globParts.map((o,i,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let A=o[0]===""&&o[1]===""&&(o[2]==="?"||!Nue.test(o[2]))&&!Nue.test(o[3]),c=/^[a-z]:/i.test(o[0]);if(A)return[...o.slice(0,4),...o.slice(4).map(u=>this.parse(u))];if(c)return[o[0],...o.slice(1).map(u=>this.parse(u))]}return o.map(A=>this.parse(A))});if(this.debug(this.pattern,a),this.set=a.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let i=this.set[o];i[0]===""&&i[1]===""&&this.globParts[o][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let a=0;a<t[r].length;a++)t[r][a]==="**"&&(t[r][a]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let a=r;for(;n[a+1]==="**";)a++;a!==r&&n.splice(r,a-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,a)=>{let o=r[r.length-1];return a==="**"&&o==="**"?r:a===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(a),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let a=1;a<t.length-1;a++){let o=t[a];a===1&&o===""&&t[0]===""||(o==="."||o==="")&&(n=!0,t.splice(a,1),a--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let a=t[r-1];a&&a!=="."&&a!==".."&&a!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let a=-1;for(;(a=r.indexOf("**",a+1))!==-1;){let i=a;for(;r[i+1]==="**";)i++;i>a&&r.splice(a+1,i-a);let s=r[a+1],A=r[a+2],c=r[a+3];if(s!==".."||!A||A==="."||A===".."||!c||c==="."||c==="..")continue;n=!0,r.splice(a,1);let u=r.slice(0);u[a]="**",t.push(u),a--}if(!this.preserveMultipleSlashes){for(let i=1;i<r.length-1;i++){let s=r[i];i===1&&s===""&&r[0]===""||(s==="."||s==="")&&(n=!0,r.splice(i,1),i--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){let i=r[o-1];if(i&&i!=="."&&i!==".."&&i!=="**"){n=!0;let A=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...A),r.length===0&&r.push(""),o-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let a=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(a){t[n]=[],t[r]=a;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let a=0,o=0,i=[],s="";for(;a<t.length&&o<n.length;)if(t[a]===n[o])i.push(s==="b"?n[o]:t[a]),a++,o++;else if(r&&t[a]==="**"&&n[o]===t[a+1])i.push(t[a]),a++;else if(r&&n[o]==="**"&&t[a]===n[o+1])i.push(n[o]),o++;else if(t[a]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(s==="b")return!1;s="a",i.push(t[a]),a++,o++}else if(n[o]==="*"&&t[a]&&(this.options.dot||!t[a].startsWith("."))&&t[a]!=="**"){if(s==="a")return!1;s="b",i.push(n[o]),a++,o++}else return!1;return t.length===n.length&&i}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let a=0;a<t.length&&t.charAt(a)==="!";a++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let a=this.options;if(this.isWindows){let m=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!m&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),b=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=h?3:m?0:void 0,w=b?3:f?0:void 0;if(typeof y=="number"&&typeof w=="number"){let[C,B]=[t[y],n[w]];C.toLowerCase()===B.toLowerCase()&&(n[w]=C,w>y?n=n.slice(w):y>w&&(t=t.slice(y)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var i=0,s=0,A=t.length,c=n.length;i<A&&s<c;i++,s++){this.debug("matchOne loop");var u=n[s],l=t[i];if(this.debug(n,u,l),u===!1)return!1;if(u===oc){this.debug("GLOBSTAR",[n,u,l]);var d=i,p=s+1;if(p===c){for(this.debug("** at the end");i<A;i++)if(t[i]==="."||t[i]===".."||!a.dot&&t[i].charAt(0)===".")return!1;return!0}for(;d<A;){var g=t[d];if(this.debug(`
|
|
67
67
|
globstar while`,t,d,n,p,g),this.matchOne(t.slice(d),n.slice(p),r))return this.debug("globstar found match!",d,A,g),!0;if(g==="."||g===".."||!a.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,d,n,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(r&&(this.debug(`
|
|
68
68
|
>>> no match, partial?`,t,d,n,p),d===A))}let m;if(typeof u=="string"?(m=l===u,this.debug("string match",u,l,m)):(m=u.test(l),this.debug("pattern match",u,l,m)),!m)return!1}if(i===A&&s===c)return!0;if(i===A)return r;if(s===c)return i===A-1&&t[i]==="";throw new Error("wtf?")}braceExpand(){return Oue(this.pattern,this.options)}parse(t){mI(t);let n=this.options;if(t==="**")return oc;if(t==="")return"";let r,a=null;(r=t.match(rVe))?a=n.dot?oVe:aVe:(r=t.match(YJe))?a=(n.nocase?n.dot?VJe:JJe:n.dot?WJe:KJe)(r[1]):(r=t.match(iVe))?a=(n.nocase?n.dot?AVe:sVe:n.dot?cVe:uVe)(r):(r=t.match(ZJe))?a=n.dot?eVe:XJe:(r=t.match(tVe))&&(a=nVe);let o=gC.fromGlob(t,this.options).toMMPattern();return a&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:a}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?pVe:n.dot?mVe:gVe,a=new Set(n.nocase?["i"]:[]),o=t.map(A=>{let c=A.map(u=>{if(u instanceof RegExp)for(let l of u.flags.split(""))a.add(l);return typeof u=="string"?BVe(u):u===oc?oc:u._src});return c.forEach((u,l)=>{let d=c[l+1],p=c[l-1];u!==oc||p===oc||(p===void 0?d!==void 0&&d!==oc?c[l+1]="(?:\\/|"+r+"\\/)?"+d:c[l]=r:d===void 0?c[l-1]=p+"(?:\\/|"+r+")?":d!==oc&&(c[l-1]=p+"(?:\\/|\\/"+r+"\\/)"+d,c[l+1]=oc))}),c.filter(u=>u!==oc).join("/")}).join("|"),[i,s]=t.length>1?["(?:",")"]:["",""];o="^"+i+o+s+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let a=this.slashSplit(t);this.debug(this.pattern,"split",a);let o=this.set;this.debug(this.pattern,"set",o);let i=a[a.length-1];if(!i)for(let s=a.length-2;!i&&s>=0;s--)i=a[s];for(let s=0;s<o.length;s++){let A=o[s],c=a;if(r.matchBase&&A.length===1&&(c=[i]),this.matchOne(c,A,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ri.defaults(t).Minimatch}};ri.AST=gC;ri.Minimatch=fC;ri.escape=pj;ri.unescape=mg;function $ue(e){let t=e.trim();return t==="."?"":t.startsWith("./")?t.slice(2):t}function CVe(e,t=!1){let n=$ue(e),r=n===""||e.trim()===".";return a=>{let o=$ue(a);if(r)return o===""||o===".";try{return ri(o,n,{dot:!0,nocase:!1,matchBase:n==="*"})}catch(i){if(t)return!1;throw ce("Invalid glob pattern in :path selector",nu(i))}}}var Gue=async e=>{let t=we(e.current);if(!t.nodes[0])return mC(e);let n=we(t.nodes[0]);if(!n.nodes[0])return mC(e);let r="";if(Kn(n.nodes[0]))r=jn(En(n.nodes[0]).value);else{if(e.loose)return mC(e);throw ce("Failed to parse path pattern in :path selector",new Error("Path pattern must be a quoted string"))}if(!r)return mC(e);if(r==="["||r.includes("[")&&!r.includes("]")){if(e.loose)return mC(e);throw ce("Invalid glob pattern in :path selector",new Error(`Unmatched bracket in pattern: ${r}`))}let a=CVe(r,e.loose);for(let o of e.partial.nodes){let i=o.location||"",[s]=Qo(o.id);if(r==="."&&o.mainImporter)continue;(!(s==="workspace"||s==="file")||!a(i))&&tt(e,o)}return dn(e),e};var Hue=async e=>{for(let t of e.partial.edges)t.peer||nc(e,t);return rc(e),e};var Uue=async e=>{for(let t of e.partial.nodes){let n=t.manifest?.version;if(!n){tt(e,t);continue}let r=ru(n);if(!r){tt(e,t);continue}r.prerelease?.length||tt(e,t)}return dn(e),e};var wVe=async(e,t,n)=>{let r=AC(e.id,String(e.name),t);if(!r.registry||!e.name||!e.version)return;let a=new URL(r.registry);a.pathname=`/${e.name}`;let o=await fetch(String(a),{signal:n});if(o.status===404)throw new qh("Missing API");if(!o.ok)throw ce("Failed to fetch packument",{name:e.name,spec:r,response:o});return(await o.json()).time?.[e.version]},EVe=e=>{let t="";Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value);let n,r=t;return t.startsWith(">=")?(n=">=",r=t.slice(2)):t.startsWith("<=")?(n="<=",r=t.slice(2)):t.startsWith(">")?(n=">",r=t.slice(1)):t.startsWith("<")&&(n="<",r=t.slice(1)),{relativeDate:r,comparator:n}},kVe=async(e,t,n,r)=>{if(!t.name||!t.version)return t;let a;try{a=await dI(()=>wVe(t,e.specOptions,e.signal),{retries:e.retries,signal:e.signal})}catch(s){return console.warn(ce("Could not retrieve registry publish date",{name:t.name,cause:s})),t}if(!a)return t;let o=new Date(a.slice(0,n.length)),i=new Date(n);switch(r){case">":return o>i?void 0:t;case"<":return o<i?void 0:t;case">=":return o>=i?void 0:t;case"<=":return o<=i?void 0:t;default:return o.getTime()===i.getTime()?void 0:t}},que=async e=>{let t;try{t=EVe(we(e.current).nodes)}catch(i){throw ce("Failed to parse :published selector",{cause:i})}let{relativeDate:n,comparator:r}=t,a=[];for(let i of e.partial.nodes){if(i.mainImporter||i.manifest?.private||Qo(i.id)[0]!=="registry"){tt(e,i);continue}a.push(kVe(e,i,n,r))}let o=await Promise.all(a);for(let i of o)i&&tt(e,i);return dn(e),e};var zue=async e=>{for(let t of e.partial.nodes)(!t.manifest||!aT(t.manifest).private)&&tt(e,t);return dn(e),e};var Yue=async e=>{for(let t of e.partial.edges)t.type!=="prod"&&nc(e,t);return rc(e),e};var Kue=async e=>{let[t]=e.initial.nodes.values(),n=t?.graph.mainImporter;if(!n)throw ce(":root pseudo-element works on local graphs only");for(let r of e.partial.edges)r.to!==n&&e.partial.edges.delete(r);return e.partial.nodes.clear(),e.partial.nodes.add(n),e};var Wue=async e=>{for(let t of e.partial.nodes)e.securityArchive?.has(t.id)||tt(e,t);return dn(e),e};var Vue=new Set(["overall","license","maintenance","quality","supplyChain","vulnerability",void 0]),vVe=e=>Vue.has(e),Jue=e=>{if(!vVe(e))throw ce("Expected a valid score kind",{found:e,validOptions:Array.from(Vue)});return e},IVe=e=>{let t="",n="=",r="overall";Kn(we(e[0]).nodes[0])?t=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(t=wn(we(e[0]).nodes[0]).value),t.startsWith(">=")?(n=">=",t=t.substring(2)):t.startsWith("<=")?(n="<=",t=t.substring(2)):t.startsWith(">")?(n=">",t=t.substring(1)):t.startsWith("<")&&(n="<",t=t.substring(1));let a=parseFloat(t);if(a>1&&(a=a/100),a<0||a>1)throw ce("Expected rate to be between 0 and 100",{found:t});return e.length>1&&(Kn(we(e[1]).nodes[0])?r=Jue(jn(En(we(e[1]).nodes[0]).value)):Yn(we(e[1]).nodes[0])&&(r=Jue(wn(we(e[1]).nodes[0]).value))),{comparator:n,rate:a,kind:r}},Zue=async e=>{ni(e,"score");let t;try{t=IVe(we(e.current).nodes)}catch(o){throw ce("Failed to parse :score selector",{cause:o})}let{comparator:n,rate:r,kind:a}=t;for(let o of e.partial.nodes){let i=e.securityArchive.get(o.id);if(!i){tt(e,o);continue}let s=i.score[a],A=!1;switch(n){case">":A=s<=r;break;case"<":A=s>=r;break;case">=":A=s<r;break;case"<=":A=s>r;break;default:A=s!==r;break}A&&tt(e,o)}return dn(e),e};var Xue=It("scripts","installScripts");var ele=It("shell","shellAccess");var rle=new Set(["satisfies","gt","gte","lt","lte","eq","neq"]),QVe=e=>rle.has(e),tle=e=>{if(!QVe(e))throw ce("Invalid semver function name",{found:e,validOptions:Array.from(rle)});return e},nle=new Map([["satisfies",Oh],["gt",al],["gte",iT],["lt",jh],["lte",sT],["eq",oC],["neq",BAe]]),xVe=(e,t)=>{let n="";try{n=jn(En(we(e[0]).nodes[0]).value)}catch(i){if(nu(i).message==="Mismatching query node"&&Yn(we(e[0]).nodes[0]))n=wn(we(e[0]).nodes[0]).value;else throw i}let r="satisfies";try{if(e[1])try{r=tle(jn(En(we(e[1]).nodes[0]).value))}catch(i){if(nu(i).message==="Mismatching query node")r=tle(wn(we(e[1]).nodes[0]).value);else throw i}}catch(i){if(!t)throw i}let a=nle.get(r);if(!a)throw ce("Invalid semver function name",{found:r,validOptions:Array.from(nle.keys())});let o;if(e[2]){let s=we(e[2]).nodes[0];if(lI(s)){let{attribute:A}=dC(s);o={attribute:A,properties:[A]}}else if(ou(s))o=ij(RF(s).nodes);else if(Kn(s)){let A=jn(En(s).value);o={attribute:A,properties:[A]}}}return{semverValue:n,semverFunction:a,compareAttribute:o}},mj=async e=>{let t;try{t=xVe(we(e.current).nodes,!!e.loose)}catch(o){throw ce("Failed to parse :semver selector",{cause:o})}let{semverValue:n,semverFunction:r,compareAttribute:a}=t;for(let o of e.partial.nodes)if(a){let s=rj(o,a.properties,a.attribute)?.[0],A=ru(n),c=s&&qd(s);r===Oh&&A&&c?Oh(A,c)||tt(e,o):(!s||!r(s,n))&&tt(e,o)}else{let i=o.manifest?.version;(!i||!r(i,n))&&tt(e,o)}return e};var gj=new Map([["critical","criticalCVE"],["high","cve"],["medium","potentialVulnerability"],["low","mildCVE"],["0","criticalCVE"],["1","cve"],["2","potentialVulnerability"],["3","mildCVE"]]),ale=new Map([["critical",0],["high",1],["medium",2],["low",3],["0",0],["1",1],["2",2],["3",3]]),_Ve=new Set(gj.keys()),DVe=e=>_Ve.has(e);var FVe=e=>{let t,n;if(e.length===0)throw ce("Missing severity kind parameter");let r="";if(Kn(we(e[0]).nodes[0])?r=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(r=wn(we(e[0]).nodes[0]).value),r.startsWith(">=")?(n=">=",r=r.substring(2)):r.startsWith("<=")?(n="<=",r=r.substring(2)):r.startsWith(">")?(n=">",r=r.substring(1)):r.startsWith("<")&&(n="<",r=r.substring(1)),r)if(DVe(r))t=r;else throw ce("Expected a valid severity kind or number between 0-3",{found:r});return{kind:t,comparator:n}},fj=async e=>{ni(e,"severity");let t;try{t=FVe(we(e.current).nodes)}catch(a){throw ce("Failed to parse :severity selector",{cause:a})}let{kind:n,comparator:r}=t;for(let a of e.partial.nodes){let o=e.securityArchive.get(a.id);(!o?.alerts||o.alerts.length===0)&&tt(e,a)}for(let a of e.partial.nodes){let o=e.securityArchive.get(a.id),i=!0;if(o)if(r){let s=ale.get(n);if(!s)break;for(let A of o.alerts){let c=A.type,u=[...gj.entries()].find(([l,d])=>d===c)?.[0];if(u){let l=ale.get(u);if(l==null)continue;switch(r){case">":l>s&&(i=!1);break;case"<":l<s&&(i=!1);break;case">=":l>=s&&(i=!1);break;case"<=":l<=s&&(i=!1);break}}}}else{let s=gj.get(n);i=!o.alerts.some(A=>A.type===s)}i&&tt(e,a)}return dn(e),e};var SVe=e=>{let t="";if(e.length===0)throw new Error("No nodes provided to parseInternals");let n=we(e[0]);if(n.nodes.length===0)throw new Error("First node has no child nodes");if(n.nodes.length===1){let a=n.nodes[0];try{return t=jn(En(a).value),{specValue:t}}catch(o){if(nu(o).message==="Mismatching query node"&&Yn(a))return t=wn(a).value,{specValue:t};throw o}}let r=[];for(let a of n.nodes)switch(a.type){case"tag":r.push(wn(a).value);break;case"class":r.push("."+a.value);break;case"id":r.push("#"+a.value);break;case"string":r.push(jn(En(a).value));break;default:r.push(a.value??String(a));break}return t=r.join(""),{specValue:t}},ole=async e=>{let t;try{t=SVe(we(e.current).nodes)}catch(r){throw ce("Failed to parse :spec selector",{cause:r})}let{specValue:n}=t;for(let r of e.partial.edges)r.spec.bareSpec!==n&&nc(e,r);return rc(e),e};var ile=It("shrinkwrap","shrinkwrap");var hj=new Map([["critical","didYouMean"],["medium","gptDidYouMean"],["0","didYouMean"],["2","gptDidYouMean"],[void 0,void 0]]),sle=new Map([["critical",0],["medium",2],["0",0],["2",2]]),Ale=new Set(hj.keys()),RVe=e=>Ale.has(e);var LVe=e=>{let t,n,r="";if(Kn(we(e[0]).nodes[0])?r=jn(En(we(e[0]).nodes[0]).value):Yn(we(e[0]).nodes[0])&&(r=wn(we(e[0]).nodes[0]).value),r.startsWith(">=")?(n=">=",r=r.substring(2)):r.startsWith("<=")?(n="<=",r=r.substring(2)):r.startsWith(">")?(n=">",r=r.substring(1)):r.startsWith("<")&&(n="<",r=r.substring(1)),r)if(RVe(r))t=r;else throw ce("Expected a valid squat kind for comparison",{found:r,validOptions:Array.from(Ale)});return{kind:t,comparator:n}},cle=async e=>{ni(e,"squat");let t;try{t=LVe(we(e.current).nodes)}catch(a){throw ce("Failed to parse :squat selector",{cause:a})}let{kind:n,comparator:r}=t;for(let a of e.partial.nodes){let o=e.securityArchive.get(a.id);(!o?.alerts||o.alerts.length===0)&&tt(e,a)}for(let a of e.partial.nodes){let o=e.securityArchive.get(a.id);if(!o)continue;let i=!0;if(r){let s=sle.get(n);if(s===void 0)break;let A=!1;for(let c of o.alerts){let u=c.type,l=[...hj.entries()].find(([d,p])=>p===u)?.[0];if(l){let d=sle.get(l);if(d===void 0)continue;switch(r){case">":d>s&&(A=!0);break;case"<":d<s&&(A=!0);break;case">=":d>=s&&(A=!0);break;case"<=":d<=s&&(A=!0);break}if(A)break}}i=!A}else{let s=hj.get(n);i=!o.alerts.some(A=>A.type===s)}i&&tt(e,a)}return dn(e),e};var ule=It("suspicious","suspiciousStarActivity");var lle=It("tracker","telemetry");var dle=It("trivial","trivialPackage");var ple=async e=>{let t=we(e.current),n=we(t.nodes[0]),r=wn(n.nodes[0]).value;for(let a of e.partial.nodes)Qo(a.id)[0]!==r&&tt(e,a);return dn(e),e};var mle=It("undesirable","troll");var gle=It("unknown","newAuthor");var fle=It("unmaintained","unmaintained");var hle=It("unpopular","unpopularPackage");var ble=It("unstable","unstableOwnership");var yle=async e=>{for(let t of e.partial.nodes)(!t.importer||t.mainImporter)&&tt(e,t);return e.partial.edges.clear(),e};var MVe=async e=>{let t=we(e.current),n=new Set,r=new Set;for(let i of t.nodes)if(Kd(i)){let s=await e.walk({cancellable:e.cancellable,initial:{edges:new Set(e.initial.edges),nodes:new Set(e.initial.nodes)},current:i,walk:e.walk,collect:{edges:new Set,nodes:new Set},partial:{edges:new Set(e.partial.edges),nodes:new Set(e.partial.nodes)},retries:e.retries,securityArchive:e.securityArchive,specOptions:e.specOptions,signal:e.signal,scopeIDs:e.scopeIDs,comment:e.comment,specificity:{...e.specificity}});for(let A of s.collect.nodes)n.add(A);for(let A of s.partial.edges)r.add(A)}if(n.size===0)return e.partial.edges.clear(),e.partial.nodes.clear(),e;let a=new Set,o=new Set(n);for(let i of o)for(let s of i.edgesIn)a.add(s.from),s.from.edgesIn.size&&o.add(s.from);e:for(let i of e.partial.nodes){if(i.edgesOut.size===0||!a.has(i)){tt(e,i);continue}for(let s of i.edgesOut.values())if(r.has(s))continue e;tt(e,i)}return dn(e),e},NVe=async e=>{let t=we(e.current),n=new Set;for(let r of t.nodes)if(Kd(r)){let a=await e.walk({cancellable:e.cancellable,collect:{edges:new Set,nodes:new Set},current:r,initial:e.initial,loose:!0,partial:{nodes:new Set(e.partial.nodes),edges:new Set(e.partial.edges)},walk:e.walk,retries:e.retries,securityArchive:e.securityArchive,specOptions:e.specOptions,signal:e.signal,scopeIDs:e.scopeIDs,comment:e.comment,specificity:{...e.specificity}});for(let o of a.collect.nodes)n.add(o)}for(let r of e.partial.nodes)n.has(r)||tt(e,r);return e},PVe=async e=>{let t=we(e.current),n=new Set;for(let r of t.nodes)if(Kd(r)){let a=await e.walk({cancellable:e.cancellable,collect:{edges:new Set,nodes:new Set},current:r,initial:e.initial,partial:{nodes:new Set(e.partial.nodes),edges:new Set(e.partial.edges)},walk:e.walk,retries:e.retries,securityArchive:e.securityArchive,specOptions:e.specOptions,signal:e.signal,scopeIDs:e.scopeIDs,comment:e.comment,specificity:{...e.specificity}});for(let o of a.collect.nodes)n.add(o)}else throw ce("Error parsing :not() selectors",{wanted:{type:"selector"},found:r});for(let r of e.partial.nodes)n.has(r)&&tt(e,r);return e},TVe=async e=>{for(let t of e.partial.nodes)t.importer||tt(e,t);for(let t of e.partial.edges)t.to?.importer||e.partial.edges.delete(t);return e},jVe=async e=>{let t=new Set(e.scopeIDs);for(let n of e.partial.nodes)t.has(n.id)||tt(e,n);return dn(e),e},OVe=new Map(Object.entries({abandoned:Uce,attr:qce,confused:zce,cve:Yce,cwe:Kce,debug:Wce,deprecated:Jce,dev:Vce,dynamic:Zce,eval:nue,empty:Xce,entropic:eue,env:tue,fs:rue,has:MVe,is:NVe,license:sue,link:Aue,malware:due,minified:pue,missing:mue,native:gue,network:fue,not:PVe,obfuscated:hue,optional:bue,outdated:Cue,overridden:wue,path:Gue,peer:Hue,prerelease:Uue,published:que,private:zue,prod:Yue,project:TVe,root:Kue,scanned:Wue,scope:jVe,score:Zue,scripts:Xue,semver:mj,sev:fj,spec:ole,severity:fj,shell:ele,shrinkwrap:ile,squat:cle,suspicious:ule,tracker:lle,trivial:dle,type:ple,undesirable:mle,unknown:gle,unmaintained:fle,unpopular:hle,unstable:ble,v:mj,workspace:yle})),Ble=async e=>{await e.cancellable();let t=RF(e.current),n=t.value&&OVe.get(t.value.slice(1));if(!n){if(e.loose)return e.partial.edges.clear(),e.partial.nodes.clear(),e;throw ce(`Unsupported pseudo-class: ${e.current.value}`,{found:e.current})}let r=await n(e),a=t.value.slice(1);return a&&a!=="not"&&a!=="is"&&a!=="has"&&(r.specificity.commonCounter+=1),r};var bj=async e=>e,$Ve={attribute:$ce,class:async e=>{throw ce("Unsupported selector",{found:e.current})},combinator:Gce,comment:async e=>{if(e.current.value&&!e.comment){let n=e.current.value.replace(/^\/\*/,"").replace(/\*\/$/,"").trim();e.comment=n}return e},id:Hce,nesting:bj,pseudo:Ble,root:bj,selector:async e=>(e.partial.nodes=new Set(e.initial.nodes),e.partial.edges=new Set(e.initial.edges),e),string:async e=>{throw ce("Unsupported selector",{found:e.current})},tag:async e=>{if(e.current.value!=="{"&&e.current.value!=="}")throw ce("Unsupported selector",{found:e.current});return e},universal:bj},wle=new Map(Object.entries($Ve)),yj=async e=>{await e.cancellable();let t=wle.get(e.current.type);if(!t){if(e.loose)return e;throw ce(`Missing parser for query node: ${e.current.type}`,{found:e.current})}if(e=await t(e),AA(e.current)&&e.current.type!=="pseudo"){let n=we(e.current);if(n.nodes.length)for(let r=0;r<n.nodes.length;r++){let a=n.nodes[r];if(!a)continue;let o={...e,current:a,next:n.nodes[r+1],prev:n.nodes[r-1]};e=await yj(o)}if(Kd(n)){for(let r of e.partial.edges)e.collect.edges.add(r);for(let r of e.partial.nodes)e.collect.nodes.add(r)}}return e},GVe=new Set([":abandoned",":confused",":cve",":cwe",":debug",":deprecated",":dynamic",":entropic",":env",":eval",":fs",":license",":malware",":minified",":native",":network",":obfuscated",":scanned",":score",":scripts",":sev",":severity",":shell",":shrinkwrap",":squat",":suspicious",":tracker",":trivial",":undesirable",":unknown",":unmaintained",":unpopular",":unstable"]),Cle=e=>{let{toJSON:t}=e,n=e.insights;e.toJSON=()=>({...t.call(e),insights:n})},ic=class{#e;#n;#a;#t;#r;static hasSecuritySelectors(t){for(let n of GVe)if(t.includes(n))return!0;return!1}static specificitySort(t){return[...t].sort((n,r)=>n.specificity.idCounter!==r.specificity.idCounter?r.specificity.idCounter-n.specificity.idCounter:n.specificity.commonCounter!==r.specificity.commonCounter?r.specificity.commonCounter-n.specificity.commonCounter:0)}constructor({graph:t,retries:n,specOptions:r,securityArchive:a}){this.#e=new Map,this.#n=t,this.#a=n??3,this.#t=r,this.#r=a}#i(t){return Array.from(t)}#A(t){let n=Array.from(t);for(let r of n){let a=this.#r?.get(r.id);if(!a){r.insights={scanned:!1},Cle(r);continue}r.insights={scanned:!0,score:a.score,abandoned:a.alerts.some(o=>o.type==="missingAuthor"),confused:a.alerts.some(o=>o.type==="manifestConfusion"),cve:a.alerts.map(o=>o.props?.cveId).filter(o=>o!==void 0),cwe:Array.from(new Set(a.alerts.filter(o=>o.props?.cveId).flatMap(o=>o.props?.cwes?.map(i=>i.id)))),debug:a.alerts.some(o=>o.type==="debugAccess"),deprecated:a.alerts.some(o=>o.type==="deprecated"),dynamic:a.alerts.some(o=>o.type==="dynamicRequire"),entropic:a.alerts.some(o=>o.type==="highEntropyStrings"),env:a.alerts.some(o=>o.type==="envVars"),eval:a.alerts.some(o=>o.type==="usesEval"),fs:a.alerts.some(o=>o.type==="filesystemAccess"),license:{unlicensed:a.alerts.some(o=>o.type==="explicitlyUnlicensedItem"),misc:a.alerts.some(o=>o.type==="miscLicenseIssues"),restricted:a.alerts.some(o=>o.type==="nonpermissiveLicense"),ambiguous:a.alerts.some(o=>o.type==="ambiguousClassifier"),copyleft:a.alerts.some(o=>o.type==="copyleftLicense"),unknown:a.alerts.some(o=>o.type==="unidentifiedLicense"),none:a.alerts.some(o=>o.type==="noLicenseFound"),exception:a.alerts.some(o=>o.type==="licenseException")},malware:{low:a.alerts.some(o=>o.type==="gptAnomaly"),medium:a.alerts.some(o=>o.type==="gptSecurity"),high:a.alerts.some(o=>o.type==="gptMalware"),critical:a.alerts.some(o=>o.type==="malware")},minified:a.alerts.some(o=>o.type==="minifiedFile"),native:a.alerts.some(o=>o.type==="hasNativeCode"),network:a.alerts.some(o=>o.type==="networkAccess"),obfuscated:a.alerts.some(o=>o.type==="obfuscatedFile"),scripts:a.alerts.some(o=>o.type==="installScripts"),severity:{low:a.alerts.some(o=>o.type==="mildCVE"),medium:a.alerts.some(o=>o.type==="potentialVulnerability"),high:a.alerts.some(o=>o.type==="cve"),critical:a.alerts.some(o=>o.type==="criticalCVE")},shell:a.alerts.some(o=>o.type==="shellAccess"),shrinkwrap:a.alerts.some(o=>o.type==="shrinkwrap"),squat:{medium:a.alerts.some(o=>o.type==="gptDidYouMean"),critical:a.alerts.some(o=>o.type==="didYouMean")},suspicious:a.alerts.some(o=>o.type==="suspiciousStarActivity"),tracker:a.alerts.some(o=>o.type==="telemetry"),trivial:a.alerts.some(o=>o.type==="trivialPackage"),undesirable:a.alerts.some(o=>o.type==="troll"),unknown:a.alerts.some(o=>o.type==="newAuthor"),unmaintained:a.alerts.some(o=>o.type==="unmaintained"),unpopular:a.alerts.some(o=>o.type==="unpopularPackage"),unstable:a.alerts.some(o=>o.type==="unstableOwnership")},Cle(r)}return n}async search(t,{signal:n,scopeIDs:r=[yF(["file","."])]}){if(!t)return{edges:[],nodes:[],comment:"",specificity:{idCounter:0,commonCounter:0}};let a=this.#e.get(t);if(a)return a;let o=new Set(Array.from(this.#n.nodes.values())),i=new Set(Array.from(this.#n.edges)),s=Uh(t),A=we(s).nodes.length>1,{collect:c,comment:u,specificity:l}=await yj({cancellable:async()=>{await new Promise(p=>{setTimeout(p,0)}),n.throwIfAborted()},current:s,initial:{nodes:new Set(o),edges:new Set(i)},collect:{nodes:new Set,edges:new Set},comment:"",loose:A,partial:{nodes:o,edges:i},retries:this.#a,signal:n,securityArchive:this.#r,specOptions:this.#t,scopeIDs:r,walk:yj,specificity:{idCounter:0,commonCounter:0}}),d={edges:this.#i(c.edges),nodes:this.#A(c.nodes),comment:u,specificity:l};return this.#e.set(t,d),d}static getQueryTokens(t){if(!t)return[];let n=[],r=o=>{try{return Uh(o)}catch{return r(o.slice(0,-1))}},a=o=>{for(let i of wle.keys())if(o.type===i&&o.type!=="root"){let s=`${o.spaces.before}${o.value}${o.spaces.after}`;pg(o)?s=`${o.spaces.before}#${o.value}${o.spaces.after}`:Kd(o)?s=`${o.spaces.before},${o.spaces.after}`:lI(o)&&(s=String(o.source?.start?.column&&o.source.end?.column&&`${o.spaces.before}${t.slice(o.source.start.column-1,o.source.end.column)}${o.spaces.after}`)),AA(o)&&ou(o)&&o.nodes.length&&(s=String(s.split("(")[0]),s+="("),(!Kd(o)||o.parent?.nodes.indexOf(o)!==0)&&n.push({...o,token:s})}if(AA(o)){for(let i of o.nodes)a(i);ou(o)&&o.nodes.length&&n.push({...o,token:")"+o.spaces.after,type:"pseudo"})}};return a(r(t)),n}};var vle=k(U(),1);var Ele=k(U(),1);var kle=k(N(),1),Bj={light:"text-gray-800 after:bg-gray-500/20",dark:"dark:text-gray-300 after:dark:bg-gray-500/20"},HVe={pseudo:{light:"text-purple-800 after:bg-purple-600/20",dark:"dark:text-purple-400 after:dark:bg-purple-600/20"},attribute:{light:"text-blue-800 after:bg-blue-600/20",dark:"dark:text-blue-400 after:dark:bg-blue-600/15"},class:{light:"text-green-800 after:bg-green-600/20",dark:"dark:text-green-400 after:dark:bg-green-600/15"},tag:{light:"text-emerald-800 after:bg-emerald-600/20",dark:"dark:text-emerald-400 after:dark:bg-emerald-600/15"},id:{light:"text-pink-800 after:bg-pink-600/20",dark:"dark:text-pink-400 after:dark:bg-pink-600/15"},string:{light:"text-violet-800 after:bg-violet-500/20",dark:"dark:text-violet-300 after:dark:bg-violet-500/20"},universal:{light:"text-fuchsia-800 after:bg-fuchsia-600/20",dark:"dark:text-fuchsia-400 after:dark:bg-fuchsia-600/20"},combinator:Bj,comment:Bj,selector:Bj},UVe=Object.fromEntries(Object.entries(HVe).map(([e,t])=>[e,`${t.light} ${t.dark}`])),Cj=wa('relative z-[2] whitespace-pre text-black dark:text-white text-sm after:absolute after:inset-0 after:z-[-1] after:rounded-sm after:content-[""]',{variants:{variant:UVe}}),zh=Ele.forwardRef(({className:e,variant:t,...n},r)=>(0,kle.jsx)("span",{className:G(Cj({variant:t,className:e})),ref:r,...n}));zh.displayName="Query Token";var PF=k(N(),1),Ile=(0,vle.forwardRef)(({query:e,parsedTokens:t,className:n},r)=>{if(!e)return null;let a=e,o=0,i=[];for(;a;){let s=t[o],A=s?.token,c=s?.type;if(!A){let u={type:"text",token:a};i.push(u);break}if(a.startsWith(A)){let u={type:c,token:A};i.push(u),a=a.slice(A.length),o++}else{let[u]=a.split(A);if(!u)break;let l={type:"string",token:u};i.push(l),a=a.slice(u.length);continue}}return(0,PF.jsx)("div",{ref:r,className:G("scrollbar-hidden pointer-events-none absolute inset-0 left-[2.556rem] top-[0.01rem] flex items-center overflow-x-auto pr-32",n),children:(0,PF.jsx)("div",{className:"flex whitespace-nowrap",children:i.map((s,A)=>(0,PF.jsx)(zh,{variant:s.type,children:s.token},A))})})});var gg=k(N(),1),wj="query-bar",Ej=(0,sl.forwardRef)(({className:e,wrapperClassName:t,tabIndex:n,startContent:r,endContent:a,onFocus:o,onBlur:i,...s},A)=>{let c=X(m=>m.updateQuery),u=X(m=>m.query),l=X(m=>m.q),d=(0,sl.useRef)(null),p=(0,sl.useRef)(null),g=(0,sl.useMemo)(()=>{if(!l||!u)return[];try{return ic.getQueryTokens(u)}catch(m){return console.error(`Error parsing query: ${m}`),[]}},[u,l]);return(0,sl.useEffect)(()=>{let m=h=>{(h.metaKey||h.ctrlKey)&&h.key==="k"?(h.preventDefault(),d.current?.focus()):h.key==="Escape"&&(h.preventDefault(),d.current?.blur())};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m)}},[]),(0,sl.useEffect)(()=>{let m=d.current,h=p.current;if(!m||!h)return;let f=()=>{let y=m.getBoundingClientRect(),w=m.selectionStart||0,C=document.createElement("span");C.style.visibility="hidden",C.style.position="absolute",C.style.whiteSpace="pre",C.style.font=window.getComputedStyle(m).font,C.textContent=m.value.substring(0,w),document.body.appendChild(C);let B=C.offsetWidth;document.body.removeChild(C);let E=B-y.width/2;requestAnimationFrame(()=>{h.scrollLeft=Math.max(0,E)})},b=["input","select","click","keyup"];return b.forEach(y=>m.addEventListener(y,f)),f(),()=>{b.forEach(y=>m.removeEventListener(y,f))}},[]),(0,gg.jsxs)("div",{ref:A,className:G("relative flex grow items-center",t),...s,children:[r&&(0,gg.jsx)("div",{className:"absolute z-[4] pr-8",children:r}),(0,gg.jsxs)("div",{id:wj,className:"relative z-[3] w-full",children:[(0,gg.jsx)(Rt,{onFocus:o,onBlur:i,type:"text",role:"search",tabIndex:n,autoCorrect:"off",autoComplete:"off",autoCapitalize:"off",ref:d,className:G("rounded-xl bg-white text-sm text-transparent caret-black focus-visible:ring-0 focus-visible:ring-transparent focus-visible:ring-offset-0 dark:bg-muted-foreground/5 dark:caret-white",r&&"pl-10",a&&"pr-32",e),placeholder:"Query Lookup, e.g: :root > *",value:u,onChange:m=>{let h=m.currentTarget.value;c(h)}}),(0,gg.jsx)(Ile,{parsedTokens:g,ref:p,query:u})]}),a&&(0,gg.jsx)("div",{className:"absolute right-0 z-[3]",children:a})]})});Ej.displayName="QueryBar";var Wd=k(N(),1),Qle=({className:e})=>{let t=X(a=>a.updateQuery),n=X(a=>a.query);return(0,Wd.jsx)(ct,{children:(0,Wd.jsxs)(ut,{children:[(0,Wd.jsx)(Bt,{asChild:!0,children:(0,Wd.jsx)(de,{disabled:n===nd,onClick:()=>{t(nd)},size:"icon",className:G("rounded-sm border-[1px] border-muted bg-card text-muted-foreground hover:bg-card/50 dark:bg-card dark:hover:bg-card/50",e),children:(0,Wd.jsx)(zu,{})})}),(0,Wd.jsx)(bn,{children:(0,Wd.jsx)(At,{children:"Go to project root"})})]})})};var kj=k(U(),1);var ga=k(N(),1),xle=()=>{let e=X(r=>r.savedQueries),t=X(r=>r.query),n=(0,kj.useMemo)(()=>e?.filter(r=>r.query===t)??[],[e,t]);return(0,ga.jsxs)(ga.Fragment,{children:[(0,ga.jsx)(qVe,{className:"mr-1",queries:n}),n.length>1&&n[0]&&(0,ga.jsx)(zVe,{className:"mr-2",query:n[0].query,numberOfQueries:n.length})]})},qVe=({queries:e,className:t})=>{let n=Zt(),r=o=>{n(`/labels?name=${encodeURIComponent(o)}`)},a=(0,kj.useMemo)(()=>{let o=new Set;return e.flatMap(i=>i.labels??[]).filter(i=>{let s=i.name;return o.has(s)?!1:(o.add(s),!0)})},[e]);return(0,ga.jsxs)(Qr,{children:[(0,ga.jsx)(xr,{className:"flex items-center justify-center",children:(0,ga.jsx)(ct,{children:(0,ga.jsxs)(ut,{children:[(0,ga.jsx)(Bt,{asChild:!0,className:"flex items-center justify-center",children:(0,ga.jsx)("div",{className:G("flex -space-x-2",t),children:a.map((o,i)=>(0,ga.jsx)("div",{className:"inline-block size-4 rounded-full border border-[1px] border-white dark:border-neutral-800",style:{backgroundColor:o.color}},i))})}),(0,ga.jsx)(At,{children:"Labels"})]})})}),(0,ga.jsx)(dr,{className:"rounded-xl",children:(0,ga.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,ga.jsx)("p",{className:"font-medium",children:"Labels"}),(0,ga.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map((o,i)=>(0,ga.jsx)("button",{onClick:()=>r(o.name),children:(0,ga.jsx)(Ds,{name:o.name,color:o.color})},i))})]})})]})},zVe=({numberOfQueries:e,className:t,query:n})=>(0,ga.jsxs)(bs,{to:`/queries?query=${encodeURIComponent(n)}`,className:G("h-6 cursor-pointer items-center justify-center rounded-md border border-neutral-200 bg-neutral-100 px-2 py-1 text-xxs transition-colors dark:border-neutral-700 dark:bg-muted",t),children:["Matches ",e," Queries"]});var _le=k(N(),1),cA=({children:e,className:t})=>(0,_le.jsx)("kbd",{className:G("flex size-6 items-center justify-center rounded-md border border-neutral-200 bg-neutral-100 font-mono text-xs text-muted-foreground dark:border-neutral-700 dark:bg-muted",t),children:e});var Zd=k(U(),1),Xj=k(Gu(),1);var Rn=k(U(),1);var Jd=k(U(),1);var so=k(U(),1);var Ke=k(U(),1);var TF=k(U(),1),YVe=k(N(),1),KVe=TF.createContext(void 0);function Al(e){let t=TF.useContext(KVe);return e||t||"ltr"}var xo=k(U(),1);var fg=k(N(),1),vj="rovingFocusGroup.onEntryFocus",WVe={bubbles:!1,cancelable:!0},fI="RovingFocusGroup",[Ij,Dle,JVe]=ug(fI),[VVe,hC]=Cn(fI,[JVe]),[ZVe,XVe]=VVe(fI),Fle=xo.forwardRef((e,t)=>(0,fg.jsx)(Ij.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,fg.jsx)(Ij.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,fg.jsx)(eZe,{...e,ref:t})})}));Fle.displayName=fI;var eZe=xo.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:A,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...l}=e,d=xo.useRef(null),p=We(t,d),g=Al(o),[m,h]=Gr({prop:i,defaultProp:s??null,onChange:A,caller:fI}),[f,b]=xo.useState(!1),y=on(c),w=Dle(n),C=xo.useRef(!1),[B,E]=xo.useState(0);return xo.useEffect(()=>{let v=d.current;if(v)return v.addEventListener(vj,y),()=>v.removeEventListener(vj,y)},[y]),(0,fg.jsx)(ZVe,{scope:n,orientation:r,dir:g,loop:a,currentTabStopId:m,onItemFocus:xo.useCallback(v=>h(v),[h]),onItemShiftTab:xo.useCallback(()=>b(!0),[]),onFocusableItemAdd:xo.useCallback(()=>E(v=>v+1),[]),onFocusableItemRemove:xo.useCallback(()=>E(v=>v-1),[]),children:(0,fg.jsx)(ke.div,{tabIndex:f||B===0?-1:0,"data-orientation":r,...l,ref:p,style:{outline:"none",...e.style},onMouseDown:le(e.onMouseDown,()=>{C.current=!0}),onFocus:le(e.onFocus,v=>{let x=!C.current;if(v.target===v.currentTarget&&x&&!f){let S=new CustomEvent(vj,WVe);if(v.currentTarget.dispatchEvent(S),!S.defaultPrevented){let M=w().filter(I=>I.focusable),j=M.find(I=>I.active),O=M.find(I=>I.id===m),$=[j,O,...M].filter(Boolean).map(I=>I.ref.current);Lle($,u)}}C.current=!1}),onBlur:le(e.onBlur,()=>b(!1))})})}),Sle="RovingFocusGroupItem",Rle=xo.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,children:i,...s}=e,A=xn(),c=o||A,u=XVe(Sle,n),l=u.currentTabStopId===c,d=Dle(n),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=u;return xo.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),(0,fg.jsx)(Ij.ItemSlot,{scope:n,id:c,focusable:r,active:a,children:(0,fg.jsx)(ke.span,{tabIndex:l?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:le(e.onMouseDown,h=>{r?u.onItemFocus(c):h.preventDefault()}),onFocus:le(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:le(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let f=rZe(h,u.orientation,u.dir);if(f!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=d().filter(w=>w.focusable).map(w=>w.ref.current);if(f==="last")y.reverse();else if(f==="prev"||f==="next"){f==="prev"&&y.reverse();let w=y.indexOf(h.currentTarget);y=u.loop?aZe(y,w+1):y.slice(w+1)}setTimeout(()=>Lle(y))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:m!=null}):i})})});Rle.displayName=Sle;var tZe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nZe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rZe(e,t,n){let r=nZe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return tZe[r]}function Lle(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function aZe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jF=Fle,OF=Rle;var Qt=k(N(),1),Qj=["Enter"," "],oZe=["ArrowDown","PageUp","Home"],Ple=["ArrowUp","PageDown","End"],iZe=[...oZe,...Ple],sZe={ltr:[...Qj,"ArrowRight"],rtl:[...Qj,"ArrowLeft"]},AZe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},BI="Menu",[bI,cZe,uZe]=ug(BI),[Yh,bC]=Cn(BI,[uZe,UA,hC]),CI=UA(),Tle=hC(),[jle,hg]=Yh(BI),[lZe,wI]=Yh(BI),Ole=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:i=!0}=e,s=CI(t),[A,c]=Ke.useState(null),u=Ke.useRef(!1),l=on(o),d=Al(a);return Ke.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),(0,Qt.jsx)(gd,{...s,children:(0,Qt.jsx)(jle,{scope:t,open:n,onOpenChange:l,content:A,onContentChange:c,children:(0,Qt.jsx)(lZe,{scope:t,onClose:Ke.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:u,dir:d,modal:i,children:r})})})};Ole.displayName=BI;var dZe="MenuAnchor",xj=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,a=CI(n);return(0,Qt.jsx)(fd,{...a,...r,ref:t})});xj.displayName=dZe;var _j="MenuPortal",[pZe,$le]=Yh(_j,{forceMount:void 0}),Gle=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=hg(_j,t);return(0,Qt.jsx)(pZe,{scope:t,forceMount:n,children:(0,Qt.jsx)(qn,{present:n||o.open,children:(0,Qt.jsx)(nA,{asChild:!0,container:a,children:r})})})};Gle.displayName=_j;var sc="MenuContent",[mZe,Dj]=Yh(sc),Hle=Ke.forwardRef((e,t)=>{let n=$le(sc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=hg(sc,e.__scopeMenu),i=wI(sc,e.__scopeMenu);return(0,Qt.jsx)(bI.Provider,{scope:e.__scopeMenu,children:(0,Qt.jsx)(qn,{present:r||o.open,children:(0,Qt.jsx)(bI.Slot,{scope:e.__scopeMenu,children:i.modal?(0,Qt.jsx)(gZe,{...a,ref:t}):(0,Qt.jsx)(fZe,{...a,ref:t})})})})}),gZe=Ke.forwardRef((e,t)=>{let n=hg(sc,e.__scopeMenu),r=Ke.useRef(null),a=We(t,r);return Ke.useEffect(()=>{let o=r.current;if(o)return rg(o)},[]),(0,Qt.jsx)(Fj,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:le(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),fZe=Ke.forwardRef((e,t)=>{let n=hg(sc,e.__scopeMenu);return(0,Qt.jsx)(Fj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hZe=ys("MenuContent.ScrollLock"),Fj=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:A,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,onDismiss:p,disableOutsideScroll:g,...m}=e,h=hg(sc,n),f=wI(sc,n),b=CI(n),y=Tle(n),w=cZe(n),[C,B]=Ke.useState(null),E=Ke.useRef(null),v=We(t,E,h.onContentChange),x=Ke.useRef(0),S=Ke.useRef(""),M=Ke.useRef(0),j=Ke.useRef(null),O=Ke.useRef("right"),L=Ke.useRef(0),$=g?Ld:Ke.Fragment,I=g?{as:hZe,allowPinchZoom:!0}:void 0,_=F=>{let Q=S.current+F,P=w().filter(K=>!K.disabled),T=document.activeElement,D=P.find(K=>K.ref.current===T)?.textValue,z=P.map(K=>K.textValue),J=_Ze(z,Q,D),te=P.find(K=>K.textValue===J)?.ref.current;(function K(W){S.current=W,window.clearTimeout(x.current),W!==""&&(x.current=window.setTimeout(()=>K(""),1e3))})(Q),te&&setTimeout(()=>te.focus())};Ke.useEffect(()=>()=>window.clearTimeout(x.current),[]),ng();let R=Ke.useCallback(F=>O.current===j.current?.side&&FZe(F,j.current?.area),[]);return(0,Qt.jsx)(mZe,{scope:n,searchRef:S,onItemEnter:Ke.useCallback(F=>{R(F)&&F.preventDefault()},[R]),onItemLeave:Ke.useCallback(F=>{R(F)||(E.current?.focus(),B(null))},[R]),onTriggerLeave:Ke.useCallback(F=>{R(F)&&F.preventDefault()},[R]),pointerGraceTimerRef:M,onPointerGraceIntentChange:Ke.useCallback(F=>{j.current=F},[]),children:(0,Qt.jsx)($,{...I,children:(0,Qt.jsx)(Rd,{asChild:!0,trapped:a,onMountAutoFocus:le(o,F=>{F.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,Qt.jsx)($A,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:d,onDismiss:p,children:(0,Qt.jsx)(jF,{asChild:!0,...y,dir:f.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:B,onEntryFocus:le(A,F=>{f.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Qt.jsx)(Nm,{role:"menu","aria-orientation":"vertical","data-state":ide(h.open),"data-radix-menu-content":"",dir:f.dir,...b,...m,ref:v,style:{outline:"none",...m.style},onKeyDown:le(m.onKeyDown,F=>{let P=F.target.closest("[data-radix-menu-content]")===F.currentTarget,T=F.ctrlKey||F.altKey||F.metaKey,D=F.key.length===1;P&&(F.key==="Tab"&&F.preventDefault(),!T&&D&&_(F.key));let z=E.current;if(F.target!==z||!iZe.includes(F.key))return;F.preventDefault();let te=w().filter(K=>!K.disabled).map(K=>K.ref.current);Ple.includes(F.key)&&te.reverse(),QZe(te)}),onBlur:le(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(x.current),S.current="")}),onPointerMove:le(e.onPointerMove,yI(F=>{let Q=F.target,P=L.current!==F.clientX;if(F.currentTarget.contains(Q)&&P){let T=F.clientX>L.current?"right":"left";O.current=T,L.current=F.clientX}}))})})})})})})});Hle.displayName=sc;var bZe="MenuGroup",Sj=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,Qt.jsx)(ke.div,{role:"group",...r,ref:t})});Sj.displayName=bZe;var yZe="MenuLabel",Ule=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,Qt.jsx)(ke.div,{...r,ref:t})});Ule.displayName=yZe;var $F="MenuItem",Nle="menu.itemSelect",HF=Ke.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=Ke.useRef(null),i=wI($F,e.__scopeMenu),s=Dj($F,e.__scopeMenu),A=We(t,o),c=Ke.useRef(!1),u=()=>{let l=o.current;if(!n&&l){let d=new CustomEvent(Nle,{bubbles:!0,cancelable:!0});l.addEventListener(Nle,p=>r?.(p),{once:!0}),rB(l,d),d.defaultPrevented?c.current=!1:i.onClose()}};return(0,Qt.jsx)(qle,{...a,ref:A,disabled:n,onClick:le(e.onClick,u),onPointerDown:l=>{e.onPointerDown?.(l),c.current=!0},onPointerUp:le(e.onPointerUp,l=>{c.current||l.currentTarget?.click()}),onKeyDown:le(e.onKeyDown,l=>{let d=s.searchRef.current!=="";n||d&&l.key===" "||Qj.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});HF.displayName=$F;var qle=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=Dj($F,n),s=Tle(n),A=Ke.useRef(null),c=We(t,A),[u,l]=Ke.useState(!1),[d,p]=Ke.useState("");return Ke.useEffect(()=>{let g=A.current;g&&p((g.textContent??"").trim())},[o.children]),(0,Qt.jsx)(bI.ItemSlot,{scope:n,disabled:r,textValue:a??d,children:(0,Qt.jsx)(OF,{asChild:!0,...s,focusable:!r,children:(0,Qt.jsx)(ke.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:le(e.onPointerMove,yI(g=>{r?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:le(e.onPointerLeave,yI(g=>i.onItemLeave(g))),onFocus:le(e.onFocus,()=>l(!0)),onBlur:le(e.onBlur,()=>l(!1))})})})}),BZe="MenuCheckboxItem",zle=Ke.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,Qt.jsx)(Vle,{scope:e.__scopeMenu,checked:n,children:(0,Qt.jsx)(HF,{role:"menuitemcheckbox","aria-checked":GF(n)?"mixed":n,...a,ref:t,"data-state":Mj(n),onSelect:le(a.onSelect,()=>r?.(GF(n)?!0:!n),{checkForDefaultPrevented:!1})})})});zle.displayName=BZe;var Yle="MenuRadioGroup",[CZe,wZe]=Yh(Yle,{value:void 0,onValueChange:()=>{}}),Kle=Ke.forwardRef((e,t)=>{let{value:n,onValueChange:r,...a}=e,o=on(r);return(0,Qt.jsx)(CZe,{scope:e.__scopeMenu,value:n,onValueChange:o,children:(0,Qt.jsx)(Sj,{...a,ref:t})})});Kle.displayName=Yle;var Wle="MenuRadioItem",Jle=Ke.forwardRef((e,t)=>{let{value:n,...r}=e,a=wZe(Wle,e.__scopeMenu),o=n===a.value;return(0,Qt.jsx)(Vle,{scope:e.__scopeMenu,checked:o,children:(0,Qt.jsx)(HF,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":Mj(o),onSelect:le(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Jle.displayName=Wle;var Rj="MenuItemIndicator",[Vle,EZe]=Yh(Rj,{checked:!1}),Zle=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...a}=e,o=EZe(Rj,n);return(0,Qt.jsx)(qn,{present:r||GF(o.checked)||o.checked===!0,children:(0,Qt.jsx)(ke.span,{...a,ref:t,"data-state":Mj(o.checked)})})});Zle.displayName=Rj;var kZe="MenuSeparator",Xle=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,Qt.jsx)(ke.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xle.displayName=kZe;var vZe="MenuArrow",ede=Ke.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,a=CI(n);return(0,Qt.jsx)(Pm,{...a,...r,ref:t})});ede.displayName=vZe;var Lj="MenuSub",[IZe,tde]=Yh(Lj),nde=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,o=hg(Lj,t),i=CI(t),[s,A]=Ke.useState(null),[c,u]=Ke.useState(null),l=on(a);return Ke.useEffect(()=>(o.open===!1&&l(!1),()=>l(!1)),[o.open,l]),(0,Qt.jsx)(gd,{...i,children:(0,Qt.jsx)(jle,{scope:t,open:r,onOpenChange:l,content:c,onContentChange:u,children:(0,Qt.jsx)(IZe,{scope:t,contentId:xn(),triggerId:xn(),trigger:s,onTriggerChange:A,children:n})})})};nde.displayName=Lj;var hI="MenuSubTrigger",rde=Ke.forwardRef((e,t)=>{let n=hg(hI,e.__scopeMenu),r=wI(hI,e.__scopeMenu),a=tde(hI,e.__scopeMenu),o=Dj(hI,e.__scopeMenu),i=Ke.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:A}=o,c={__scopeMenu:e.__scopeMenu},u=Ke.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return Ke.useEffect(()=>u,[u]),Ke.useEffect(()=>{let l=s.current;return()=>{window.clearTimeout(l),A(null)}},[s,A]),(0,Qt.jsx)(xj,{asChild:!0,...c,children:(0,Qt.jsx)(qle,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":ide(n.open),...e,ref:Hi(t,a.onTriggerChange),onClick:l=>{e.onClick?.(l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:le(e.onPointerMove,yI(l=>{o.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:le(e.onPointerLeave,yI(l=>{u();let d=n.content?.getBoundingClientRect();if(d){let p=n.content?.dataset.side,g=p==="right",m=g?-5:5,h=d[g?"left":"right"],f=d[g?"right":"left"];o.onPointerGraceIntentChange({area:[{x:l.clientX+m,y:l.clientY},{x:h,y:d.top},{x:f,y:d.top},{x:f,y:d.bottom},{x:h,y:d.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(l),l.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:le(e.onKeyDown,l=>{let d=o.searchRef.current!=="";e.disabled||d&&l.key===" "||sZe[r.dir].includes(l.key)&&(n.onOpenChange(!0),n.content?.focus(),l.preventDefault())})})})});rde.displayName=hI;var ade="MenuSubContent",ode=Ke.forwardRef((e,t)=>{let n=$le(sc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=hg(sc,e.__scopeMenu),i=wI(sc,e.__scopeMenu),s=tde(ade,e.__scopeMenu),A=Ke.useRef(null),c=We(t,A);return(0,Qt.jsx)(bI.Provider,{scope:e.__scopeMenu,children:(0,Qt.jsx)(qn,{present:r||o.open,children:(0,Qt.jsx)(bI.Slot,{scope:e.__scopeMenu,children:(0,Qt.jsx)(Fj,{id:s.contentId,"aria-labelledby":s.triggerId,...a,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{i.isUsingKeyboardRef.current&&A.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:le(e.onFocusOutside,u=>{u.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:le(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:le(e.onKeyDown,u=>{let l=u.currentTarget.contains(u.target),d=AZe[i.dir].includes(u.key);l&&d&&(o.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});ode.displayName=ade;function ide(e){return e?"open":"closed"}function GF(e){return e==="indeterminate"}function Mj(e){return GF(e)?"indeterminate":e?"checked":"unchecked"}function QZe(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xZe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function _Ze(e,t,n){let a=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1,i=xZe(e,Math.max(o,0));a.length===1&&(i=i.filter(c=>c!==n));let A=i.find(c=>c.toLowerCase().startsWith(a.toLowerCase()));return A!==n?A:void 0}function DZe(e,t){let{x:n,y:r}=e,a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){let s=t[o],A=t[i],c=s.x,u=s.y,l=A.x,d=A.y;u>r!=d>r&&n<(l-c)*(r-u)/(d-u)+c&&(a=!a)}return a}function FZe(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return DZe(n,t)}function yI(e){return t=>t.pointerType==="mouse"?e(t):void 0}var UF=Ole,qF=xj,zF=Gle,YF=Hle,KF=Sj,WF=Ule,JF=HF,VF=zle,ZF=Kle,XF=Jle,eS=Zle,tS=Xle,nS=ede,rS=nde,aS=rde,oS=ode;var io=k(N(),1),iS="DropdownMenu",[SZe,Edn]=Cn(iS,[bC]),Ei=bC(),[RZe,Ade]=SZe(iS),cde=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,A=Ei(t),c=so.useRef(null),[u,l]=Gr({prop:a,defaultProp:o??!1,onChange:i,caller:iS});return(0,io.jsx)(RZe,{scope:t,triggerId:xn(),triggerRef:c,contentId:xn(),open:u,onOpenChange:l,onOpenToggle:so.useCallback(()=>l(d=>!d),[l]),modal:s,children:(0,io.jsx)(UF,{...A,open:u,onOpenChange:l,dir:r,modal:s,children:n})})};cde.displayName=iS;var ude="DropdownMenuTrigger",lde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=Ade(ude,n),i=Ei(n);return(0,io.jsx)(qF,{asChild:!0,...i,children:(0,io.jsx)(ke.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Hi(t,o.triggerRef),onPointerDown:le(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:le(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});lde.displayName=ude;var LZe="DropdownMenuPortal",dde=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Ei(t);return(0,io.jsx)(zF,{...r,...n})};dde.displayName=LZe;var pde="DropdownMenuContent",mde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ade(pde,n),o=Ei(n),i=so.useRef(!1);return(0,io.jsx)(YF,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...r,ref:t,onCloseAutoFocus:le(e.onCloseAutoFocus,s=>{i.current||a.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:le(e.onInteractOutside,s=>{let A=s.detail.originalEvent,c=A.button===0&&A.ctrlKey===!0,u=A.button===2||c;(!a.modal||u)&&(i.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)"}})});mde.displayName=pde;var MZe="DropdownMenuGroup",gde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(KF,{...a,...r,ref:t})});gde.displayName=MZe;var NZe="DropdownMenuLabel",fde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(WF,{...a,...r,ref:t})});fde.displayName=NZe;var PZe="DropdownMenuItem",hde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(JF,{...a,...r,ref:t})});hde.displayName=PZe;var TZe="DropdownMenuCheckboxItem",bde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(VF,{...a,...r,ref:t})});bde.displayName=TZe;var jZe="DropdownMenuRadioGroup",OZe=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(ZF,{...a,...r,ref:t})});OZe.displayName=jZe;var $Ze="DropdownMenuRadioItem",yde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(XF,{...a,...r,ref:t})});yde.displayName=$Ze;var GZe="DropdownMenuItemIndicator",Bde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(eS,{...a,...r,ref:t})});Bde.displayName=GZe;var HZe="DropdownMenuSeparator",Cde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(tS,{...a,...r,ref:t})});Cde.displayName=HZe;var UZe="DropdownMenuArrow",qZe=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(nS,{...a,...r,ref:t})});qZe.displayName=UZe;var zZe=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:o}=e,i=Ei(t),[s,A]=Gr({prop:r,defaultProp:o??!1,onChange:a,caller:"DropdownMenuSub"});return(0,io.jsx)(rS,{...i,open:s,onOpenChange:A,children:n})},YZe="DropdownMenuSubTrigger",wde=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(aS,{...a,...r,ref:t})});wde.displayName=YZe;var KZe="DropdownMenuSubContent",Ede=so.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,a=Ei(n);return(0,io.jsx)(oS,{...a,...r,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)"}})});Ede.displayName=KZe;var kde=cde,vde=lde,Nj=dde,Pj=mde,Ide=gde,Tj=fde,jj=hde,Oj=bde;var $j=yde,Gj=Bde,Hj=Cde;var Qde=zZe,Uj=wde,qj=Ede;var Ao=k(N(),1),uA=kde,lA=vde,zj=Ide,yC=Nj,xde=Qde;var Yj=Jd.forwardRef(({className:e,inset:t,children:n,...r},a)=>(0,Ao.jsxs)(Uj,{ref:a,className:G("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,(0,Ao.jsx)(Ea,{className:"ml-auto"})]}));Yj.displayName=Uj.displayName;var Kj=Jd.forwardRef(({className:e,...t},n)=>(0,Ao.jsx)(qj,{ref:n,className:G("z-[10000] min-w-[8rem] overflow-hidden rounded-md border border-muted 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}));Kj.displayName=qj.displayName;var Rs=Jd.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,Ao.jsx)(Nj,{children:(0,Ao.jsx)(Pj,{ref:r,sideOffset:t,className:G("z-[10000] min-w-[8rem] overflow-hidden rounded-md border border-muted 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),...n})}));Rs.displayName=Pj.displayName;var Vd=Jd.forwardRef(({className:e,inset:t,...n},r)=>(0,Ao.jsx)(jj,{ref:r,className:G("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Vd.displayName=jj.displayName;var bg=Jd.forwardRef(({className:e,children:t,checked:n,...r},a)=>(0,Ao.jsxs)(Oj,{ref:a,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[(0,Ao.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ao.jsx)(Gj,{children:(0,Ao.jsx)(na,{className:"h-4 w-4"})})}),t]}));bg.displayName=Oj.displayName;var JZe=Jd.forwardRef(({className:e,children:t,...n},r)=>(0,Ao.jsxs)($j,{ref:r,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[(0,Ao.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ao.jsx)(Gj,{children:(0,Ao.jsx)(qf,{className:"h-2 w-2 fill-current"})})}),t]}));JZe.displayName=$j.displayName;var VZe=Jd.forwardRef(({className:e,inset:t,...n},r)=>(0,Ao.jsx)(Tj,{ref:r,className:G("px-2 py-1.5 text-sm font-medium",t&&"pl-8",e),...n}));VZe.displayName=Tj.displayName;var ZZe=Jd.forwardRef(({className:e,...t},n)=>(0,Ao.jsx)(Hj,{ref:n,className:G("-mx-1 my-1 h-px bg-muted",e),...t}));ZZe.displayName=Hj.displayName;var XZe=({className:e,...t})=>(0,Ao.jsx)("span",{className:G("ml-auto text-xs tracking-widest opacity-60",e),...t});XZe.displayName="DropdownMenuShortcut";var eXe=[{operator:">",label:"greater than",description:"Matches packages published after the specified date."},{operator:">=",label:"greater than or equal to",description:"Matches packages published on or after the specified date."},{operator:"<",label:"less than",description:"Matches packages published before the specified date."},{operator:"<=",label:"less than or equal to",description:"Matches packages published on or before the specified date."},{operator:"=",label:"equal to",description:"Matches packages published on the specified date."}],BC=[{operator:">",label:"less than",description:"Less than the score."},{operator:"<=",label:"less than or equal to",description:"Less than or equal to the score."},{operator:">",label:"greater than",description:"Greater than the score."},{operator:">=",label:"greater than or equal to",description:"Greater than or equal to the score."},{operator:"=",label:"equal to",description:"Equal to the value."}],tXe=[{operator:"eq",label:"equals",description:"Matches packages that equal the specified semver value."},{operator:"neq",label:"not equal",description:"Matches packages that do not equal the specified semver value."},{operator:"gt",label:"greater than",description:"Matches packages with a version greater than the specified semver value."},{operator:"gte",label:"greater than or equal to",description:"Matches packages with a version greater than or equal to the specified semver value."},{operator:"lt",label:"less than",description:"Matches packages with a version less than the specified semver value."},{operator:"lte",label:"less than or equal to",description:"Matches packages with a version less than or equal to the specified semver value."},{operator:"satisfies",label:"satisfies",description:"Matches packages that satisfy the specified semver range."}],sS={"=":"equals","^=":"starts with","$=":"ends with","~=":"contains word","|=":"starts with dash","*=":"contains"},AS={i:"case insensitive",s:"case sensitive"},cS={">":{selector:">",category:"combinator",label:"Direct children",description:"Child combinator, matches packages that are direct dependencies of the previously selected nodes."}," ":{selector:" ",category:"combinator",label:"All descendants",description:"Descendant combinator, matches all packages that are direct & transitive dependencies of the previously selected nodes."},"~":{selector:"~",category:"combinator",label:"Siblings",description:"Sibling combinator, matches packages that are direct dependencies of all dependents of the previously selected nodes."}},uS={":has":{selector:":has",category:"pseudo",description:"Matches only packages that have valid results for the selector expression used. For example, :has(.peer[name=react]) matches packages with a peer dependency on react."},":is":{selector:":is",category:"pseudo",description:"Useful for writing large selectors in a more compact form. It takes a selector list as its arguments and selects any element that can be selected by one of the selectors in that list. It behaves forgivingly, ignoring non-existing ids, classes, combinators, operators, and pseudo-selectors."},":not":{selector:":not",category:"pseudo",description:"Negation pseudo-class, selects packages that do not match a list of selectors."}},yg={":prod":{selector:":prod",label:"Production dependencies",category:"pseudo",description:"Matches prod dependencies to your current project."},":dev":{selector:":dev",label:"Development dependencies",category:"pseudo",description:"Matches packages that are only used as dev dependencies in your current project."},":optional":{selector:":optional",label:"Optional dependencies",category:"pseudo",description:"Matches packages that are optional to your current project."},":peer":{selector:":peer",label:"Peer dependencies",category:"pseudo",description:"Matches peer dependencies to your current project."}},lS={":workspace":{selector:":workspace",label:"Matches workspaces in `vlt.json`",category:"pseudo",description:"Matches the current project workspaces (listed in your vlt.json file)."},":project":{selector:":project",label:"Root project / all workspaces",category:"pseudo",description:"Returns both the root node (as defined below) along with any workspace declared in your project."},":root":{selector:":root",label:"Root package",category:"pseudo",description:"Returns the root node, that represents the package defined at the top-level package.json of your project folder."}},dS={":attr":{selector:":attr()",label:"Contains selector",category:"pseudo",description:"Matches packages based on a custom attribute, e.g., :attr(license,[name=MIT]) to match packages with a license attribute that has a name of MIT."},":v":{selector:":v()",label:"Contains version",category:"pseudo",description:"Matches packages based on a version, e.g., :v(1.0.0) to match packages with a version attribute that has a name of 1.0.0."}},cl={":abandoned":{label:"Abandoned packages",selector:":abandoned",category:"pseudo",description:"Packages that are missing an author field",securityCategory:"Supply Chain",severity:"medium"},":confused":{label:"Manifest confusion",selector:":confused",category:"pseudo",description:"Packages affected by manifest confusion. This could be malicious or caused by an error when publishing the package",securityCategory:"Supply Chain",severity:"medium"},":debug":{label:"Debugging features",selector:":debug",category:"pseudo",description:"Packages that use debug, reflection and dynamic code execution features",securityCategory:"Supply Chain",severity:"low"},":deprecated":{label:"Deprecated packages",selector:":deprecated",category:"pseudo",description:"Packages marked as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed",securityCategory:"Maintenance",severity:"medium"},":dynamic":{label:"Dynamic imports",selector:":dynamic",category:"pseudo",description:"Packages that uses dynamic imports",securityCategory:"Supply Chain",severity:"low"},":entropic":{label:"Entropic strings",selector:":entropic",category:"pseudo",description:"Packages that contains high entropic strings. This could be a sign of encrypted data, leaked secrets or obfuscated code",securityCategory:"Supply Chain",severity:"low"},":env":{label:"Environment variables",selector:":env",category:"pseudo",description:"Packages that accesses environment variables, which may be a sign of credential stuffing or data theft",securityCategory:"Supply Chain",severity:"low"},":eval":{label:"Dynamic code execution",selector:":eval",category:"pseudo",description:"Packages that use dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior",securityCategory:"Supply Chain",severity:"medium"},":fs":{label:"File system access",selector:":fs",category:"pseudo",description:"Packages that accesses the file system, and could potentially read sensitive data",securityCategory:"Supply Chain",severity:"low"},":license":{label:"License",selector:":license(<type>)",category:"pseudo",description:"Packages that have a license. This selector can be used to filter packages based on their license type.",securityCategory:"License",arguments:[{argument:"ambiguous",category:"tag",label:"Ambiguous",description:"Packages with ambiguous classifiers. This could be due to multiple licenses or unclear license terms.",severity:"low"},{argument:"copyleft",category:"tag",label:"Copyleft",description:"Packages with copyleft licenses. These licenses require derivative works to also be open source.",severity:"low"},{argument:"exception",category:"tag",label:"Exception",description:"Packages with license exceptions. These are special permissions that modify the terms of the license.",severity:"low"},{argument:"misc",category:"tag",label:"Miscellaneous",description:"Packages with fine-grained problems related to their license.",severity:"medium"},{argument:"none",category:"tag",label:"No License Found",description:"Packages with no license found. This could indicate that the package is not open source or has unclear licensing.",severity:"low"},{argument:"restricted",category:"tag",label:"Restricted",description:"Packages with non-permissive licenses. These licenses may restrict usage, modification, or distribution.",severity:"low"},{argument:"unknown",category:"tag",label:"Unknown License",description:"Packages with unidentified licenses. This could be due to missing or incomplete license information.",severity:"low"},{argument:"unlicensed",category:"tag",label:"Unlicensed",description:"Packages that are explicitly unlicensed. This means they have no copyright protection and can be used freely.",severity:"high"}]},":malware":{label:"Has malware",selector:":malware(<severity>)",category:"pseudo",description:"Packages that are known to contain malware. This is determined by AI based on the package contents and metadata",securityCategory:"Supply Chain",arguments:[{argument:"low",category:"tag",label:"Low severity",description:"AI has identified unusual behaviors that may pose a security risk",severity:"low"},{argument:"medium",category:"tag",label:"Medium severity",description:"AI has determined that this package may contain potential security issues or vulnerabilities",severity:"high"},{argument:"high",category:"tag",label:"High severity",description:"AI has identified this package as containing malware",severity:"high"},{argument:"critical",category:"tag",label:"Critical severity",description:"Packages that is and contains known malware",severity:"critical"}]},":minified":{label:"Minified code",selector:":minified",category:"pseudo",description:"Packages that contain minified code. This may be harmless in some cases where minified code is included in packaged libraries",securityCategory:"Quality",severity:"low"},":native":{label:"Native code",selector:":native",category:"pseudo",description:"Packages that contain native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior",securityCategory:"Supply Chain",severity:"medium"},":network":{label:"Network access",selector:":network",category:"pseudo",description:"Packages that access the network",securityCategory:"Supply Chain",severity:"medium"},":obfuscated":{label:"Obfuscated code",selector:":obfuscated",category:"pseudo",description:"Packages that use obfuscated files, intentionally packed to hide their behavior. This could be a sign of malware",securityCategory:"Supply Chain",severity:"high"},":scripts":{label:"Install scripts",category:"pseudo",selector:":scripts",description:"Packages that have scripts that are run when the package is installed. The majority of malware in npm is hidden in install scripts",securityCategory:"Supply Chain",severity:"medium"},":shell":{label:"Shell access",category:"pseudo",selector:":shell",description:"Packages that accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code",securityCategory:"Supply Chain",severity:"medium"},":shrinkwrap":{label:"Shrinkwrap packages",category:"pseudo",selector:":shrinkwrap",description:"Packages that contains a shrinkwrap file. This may allow the package to bypass normal install procedures",securityCategory:"Supply Chain",severity:"high"},":squat":{label:"Typosquats",category:"pseudo",selector:":squat(<severity>)",description:"Packages with names similar to other popular packages and may not be the package you want",securityCategory:"Supply Chain",arguments:[{label:"Medium severity",category:"tag",argument:"medium",description:"AI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another packages name, description, or other metadata",severity:"medium"},{label:"Critical severity",category:"tag",argument:"critical",description:"Packages with names similar to other popular packages and may not be the package you want",severity:"critical"}]},":suspicious":{label:"Suspicious packages",selector:":suspicious()",category:"pseudo",description:"Packages that may have its GitHub repository artificially inflated with stars (from bots, crowdsourcing, etc.)",securityCategory:"Supply Chain",severity:"high"},":tracker":{label:"Telemetry",selector:":tracker()",category:"pseudo",description:"Packages that contains telemetry which tracks how it is used",securityCategory:"Supply Chain",severity:"high"},":trivial":{label:"Trivial packages",selector:":trivial()",category:"pseudo",description:"Packages that have less than 10 lines of code. These packages are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency",securityCategory:"Supply Chain",severity:"medium"},":undesirable":{label:"Undesirable packages",selector:":undesirable()",category:"pseudo",description:"Packages that are a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function",securityCategory:"Supply Chain",severity:"high"},":unknown":{label:"New npm collaborator",selector:":unknown()",category:"pseudo",description:"Packages that have a new npm collaborator publishing a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package",securityCategory:"Supply Chain",severity:"low"},":unmaintained":{label:"Unmaintained packages",selector:":unmaintained()",category:"pseudo",description:"Packages that have not been updated in more than 5 years and may be unmaintained",securityCategory:"Maintenance",severity:"low"},":unpopular":{label:"Unpopular packages",selector:":unpopular()",category:"pseudo",description:"Packages that are not very popular",securityCategory:"Quality",severity:"medium"},":unstable":{label:"Unstable ownership",selector:":unstable()",category:"pseudo",description:"Packages with unstable ownership. This indicates a new collaborator has begun publishing package versions. Package stability and security risk may be elevated",securityCategory:"Supply Chain",severity:"high"}},CC={":scope":{selector:":scope",label:"The scope of the current selector",category:"pseudo",description:"Returns the current scope of a given selector."},":empty":{selector:":empty",label:"Packages with no dependencies",category:"pseudo",description:"Matches packages that have no dependencies installed."},":outdated":{selector:":outdated(<type>)",label:"Packages that are outdated",category:"pseudo",arguments:[{argument:"any",category:"tag",label:"Outdated on any level",description:"A version exists that is greater than the current one."},{argument:"major",category:"tag",label:"Only major versions",description:"A version exists that is greater than the current one on a major level."},{argument:"minor",category:"tag",label:"Only minor versions",description:"A version exists that is greater than the current one on a minor level."},{argument:"patch",category:"tag",label:"Only patch versions",description:"A version exists that is greater than the current one on a patch level."},{argument:"out-of-range",category:"tag",label:"Out of range",description:"A version exists that is greater than the current one, does not satisfy at least one of its parent\u2019s dependencies."},{argument:"in-range",category:"tag",label:"In range",description:"A version exists that is greater than the current one, and satisfies at least one if its parent\u2019s dependencies."}],description:"Matches packages that are outdated. The type parameter is optional and can be one of: any (default), in-range, out-of-range, major, minor, patch."},":private":{selector:":private",label:"Packages that are private",category:"pseudo",description:"Matches packages that have the property private set in their package.json file."},":semver":{selector:":semver(<value>, <function>)",label:"Packages matching a semver value",category:"pseudo",arguments:[{argumentType:"input",category:"tag",argument:"version",label:"Version",description:"The semver value to match against, e.g., ^1.0.0",operators:tXe}],description:"Matches packages based on a semver value, e.g., :semver(^1.0.0) to retrieve packages that match the semver. You can also specify a comparison function (e.g., eq, neq, gt) and an optional custom attribute to compare against."},":type":{selector:":type(<type>)",label:"Package type",category:"pseudo",arguments:[{argument:"registry",category:"tag",label:"Registry",description:"Matches packages that are hosted on a registry."},{argument:"file",category:"tag",label:"File",description:"Matches packages that are local files."},{argument:"git",category:"tag",label:"Git",description:"Matches packages that are hosted on a git repository."},{argument:"remote",category:"tag",label:"Remote",description:"Matches packages that are hosted on a remote server."},{argument:"workspace",category:"tag",label:"Workspace",description:"Matches packages that are part of a workspace."}],description:"Matches packages based on their type, e.g., :type(git) to retrieve all git dependencies."},":published":{selector:":published(<operator>, <date>)",label:"Package publish date",arguments:[{argument:"date",argumentType:"date",category:"string",label:"Date",operators:eXe,description:"The date to compare against, in ISO format (YYYY-MM-DD)."}],category:"pseudo",description:"Matches packages based on their published date. The operator can be one of: >, >=, <, <=, =, !=. The date must be in ISO format (YYYY-MM-DD)."},":score":{selector:":score(<rate>, <kind>)",label:"Package insight score",category:"pseudo",arguments:[{argumentType:"input",argument:"overall",category:"string",label:"Overall",description:"The overall score",operators:BC},{argumentType:"input",category:"string",argument:"maintenance",label:"Maintenance",description:"The maintenance score",operators:BC},{argumentType:"input",category:"string",argument:"quality",label:"Quality",description:"The quality score",operators:BC},{argumentType:"input",category:"string",argument:"supply chain",label:"Supply Chain",description:"The supply chain score",operators:BC},{argumentType:"input",category:"string",argument:"license",label:"License",description:"The license score",operators:BC},{argumentType:"input",category:"string",argument:"vulnerability",label:"Vulnerability",description:"The vulnerability score",operators:BC}],description:'Matches packages based on the scores rated found in the insights data, e.g., :score("<=0.5", "maintenance") to match a maintenance score of 0.5 or less.'}},_de={"#foo":{selector:"#foo",category:"id",description:"Identifiers are a shortcut to retrieving packages by name, unfortunately this shortcut only works for unscoped packages. It\u2019s advised to rely on using Attribute selectors instead. e.g: #foo is the same as [name=foo]."}};var Wj={":empty":"no dependencies",":scope":"scope of",":private":"private",":outdated":"outdated",":semver":"a version of",":type":"a type of",":published":"published",":score":"a score of",":abandoned":"abandoned",":confused":"confused",":debug":"debug features",":deprecated":"a deprecated package",":dynamic":"dynamic imports",":entropic":"entropic strings",":env":"env variable access",":eval":"dynamic code execution",":fs":"file system access",":license":"license issues",":malware":"malware",":minified":"minified code",":native":"native code",":network":"network access",":obfuscated":"obfuscated code",":scripts":"install scripts",":shell":"shell access",":shrinkwrap":"shrinkwrap file",":squat":"typosquats",":suspicious":"suspicious",":tracker":"telemtery",":trivial":"trivial package",":undesirable":"undesirable",":unknown":"unknown collaborators",":unmaintained":"unmaintained",":unpopular":"unpopular",":unstable":"unstable"},Dde={":attr":"with attribute",":v":"with version"},Fde={":is":"and matches",":has":"and has",":not":"and does not match"},Sde={">":"and direct dependencies with","~":"and sibling dependencies with"," ":"and any dependencies with"},Rde="and",Lde=[":project",":workspace",":root"],Mde={header:"Relationship",items:Object.entries(yg).map(([e,t])=>({label:t.label,token:{token:e,type:t.category,label:t.label,description:t.description}}))},Nde={header:"Connection Type",items:Object.entries(cS).map(([e,t])=>({label:t.label,token:{token:e,type:t.category,label:t.label,description:t.description}}))},Pde={header:"Project",items:Object.entries(lS).map(([e,t])=>({label:t.label,token:{token:e,type:t.category,label:t.label,description:t.description}}))},Tde={header:"State",items:Object.entries(CC).map(([e,t])=>({label:t.label,options:"arguments"in t?{label:"Options",options:t.arguments.map(n=>({label:n.label,token:{argumentType:"argumentType"in n?n.argumentType:void 0,token:n.argument,operators:"operators"in n?n.operators:void 0,flags:"flags"in n?n.flags:void 0,type:"category"in n?n.category:t.category,label:n.label,description:n.description}}))}:void 0,token:{token:e,label:t.label,type:t.category,description:t.description}}))},jde={header:"Insights",items:Object.entries(cl).map(([e,t])=>({label:t.label,options:"arguments"in t?{label:"Options",options:t.arguments.map(n=>({label:n.label,token:{argumentType:"argumentType"in n?n.argumentType:void 0,token:n.argument,operators:"operators"in n?n.operators:void 0,flags:"flags"in n?n.flags:void 0,type:"category"in n?n.category:t.category,label:n.label,description:n.description}}))}:void 0,token:{token:e,label:t.label,type:t.category,description:t.description}}))},nXe={name:"Package name",version:"Package version",description:"Package description",homepage:"Homepage URL",license:"License",author:"Author",main:"Main entry point",dependencies:"Dependencies",devDependencies:"Development dependencies",peerDependencies:"Peer dependencies",optionalDependencies:"Optional dependencies",private:"Private package",type:"Module type"},rXe={contributors:{label:"Contributors",options:{name:"Contributor name",email:"Contributor email",writeAccess:"Write access",isPublisher:"Is publisher"}},funding:{label:"Funding",options:{type:"Funding type",url:"Funding URL"}},bugs:{label:"Bug tracker",options:{url:"Bug tracker URL",email:"Bug tracker email"}},keywords:{label:"Keywords",options:{value:"Keyword value"}}},Ode=Object.entries(sS).map(([e,t])=>({operator:e,label:t,description:`${t} the specified value`})),$de=Object.entries(AS).map(([e,t])=>({flag:e,label:t,description:`Make the search ${t}`})),aXe=(e,t)=>({label:t,token:{token:e,type:"attribute",argumentType:"input",label:t,description:`Match packages by ${t.toLowerCase()}`,operators:Ode,flags:$de,operator:"=",flag:""}}),oXe=(e,t)=>({label:t.label,options:{label:`${t.label} Properties`,options:Object.entries(t.options).map(([n,r])=>({label:r,token:{token:n,type:"attribute",argumentType:"input",values:e==="contributors"&&(n==="writeAccess"||n==="isPublisher")?["true","false"]:void 0,label:r,description:`Match packages by ${r.toLowerCase()} in ${t.label.toLowerCase()}`,operators:Ode,flags:$de,operator:"=",flag:""}}))},token:{token:e,type:"pseudo",label:t.label,description:`Match packages by ${t.label.toLowerCase()}`}}),Gde={header:"Attributes",items:[...Object.entries(nXe).map(([e,t])=>aXe(e,t)),...Object.entries(rXe).map(([e,t])=>oXe(e,t))]};var wC=k(SF(),1),Hde=e=>({type:e.type,value:e.value}),EI=()=>(0,wC.selector)({value:""}),Ude=()=>(0,wC.root)({value:""}),Jj=(e,t)=>{e.append(t)},Vj=(e,t)=>{e.append(t)},qde=e=>(0,wC.attribute)(e);var zde=e=>{let t=Uh(e),n=Yde(t);if(!n)return;let r=pXe(n);return r=mXe(e,r),r},Yde=e=>{let t=iXe(e);return cXe(e)?lXe(e):t.length>0?dXe(e,t):Hde(e)},iXe=e=>{if(!AA(e)||e.nodes.length===0)return[];let t=[];for(let n=0;n<e.nodes.length;n++){let r=e.nodes[n];if(!r)continue;let a=Yde(r);if(a){if(sXe(a)){let o=AXe(a);if(o){t.push(...o);let i=e.nodes[n+1];r.type==="selector"&&i&&i.type==="selector"&&t.push({type:"comma",value:","});continue}}t.push(a)}}return t},sXe=e=>(e.type==="selector"||e.type==="root")&&(!e.value||e.value===""),AXe=e=>"children"in e?e.children:void 0,cXe=e=>"operator"in e||"flag"in e,uXe=e=>e==="i"||e==="s",lXe=e=>{let t={type:"attribute",value:e.value||"",attribute:"attribute"in e&&e.attribute||""};return"operator"in e&&e.operator!==void 0&&(t.operator=e.operator),"flag"in e&&uXe(e.flag)&&(t.flag=e.flag),t},dXe=(e,t)=>e.type==="pseudo"?{type:"pseudo",value:e.value,children:t}:{type:e.type,value:e.value||"",children:t},pXe=e=>{if(e.type==="root"&&"children"in e&&Array.isArray(e.children)){let t=[],n=e.children;for(let r=0;r<n.length;r++){let a=n[r];if(a&&a.type==="selector"&&"children"in a&&Array.isArray(a.children)){t.push(...a.children);let o=n[r+1];o&&o.type==="selector"&&t.push({type:"comma",value:","})}else{if(a&&a.type==="selector"&&(!a.value||a.value===""))continue;a&&t.push(a)}}return t.length>0?t:void 0}if(!(e.type==="root"&&(!e.value||e.value==="")))return[e]},mXe=(e,t)=>{if(!t)return t;let n=t;e.endsWith(",")&&n[n.length-1]?.type!=="comma"&&(n=[...n,{type:"comma",value:","}]);let r=/\s$/.test(e),a=e.trimEnd(),o=/[>,~]$/.test(a),i=n[n.length-1]?.type==="combinator"&&n[n.length-1].value===" ";return r&&!o&&!i&&(n=[...n,{type:"combinator",value:" "}]),n};var iu=k(SF(),1);var Kde=e=>{let t=Ude(),n=EI(),r=()=>{let i=n;i.nodes&&i.nodes.length>0&&(t.append(n),n=EI())};for(let i of e){if(i.type==="comma"){r();continue}let s=Zj(i);s&&Vj(n,s)}r();let a=t.toString();return e[e.length-1]?.type==="comma"?`${a},`:a},Zj=e=>{switch(e.type){case"comma":return null;case"string":return(0,iu.string)({value:e.value});case"pseudo":{let t=(0,iu.pseudo)({value:e.value});if("children"in e&&e.children)if(e.children.some(r=>r.type==="comma")){let r=EI(),a=()=>{let o=r;o.nodes&&o.nodes.length>0&&(Jj(t,r),r=EI())};for(let o of e.children){if(o.type==="comma"){a();continue}let i=Zj(o);i&&Vj(r,i)}a()}else for(let r of e.children){let a=Zj(r);a&&Jj(t,a)}return t}case"attribute":{let t=e,n={attribute:t.attribute,value:e.value,raws:{}};return t.operator&&(n.operator=t.operator),t.flag&&(n.insensitive=t.flag==="i"),qde(n)}case"id":return(0,iu.id)({value:e.value});case"combinator":{if(e.value===" ")return(0,iu.combinator)({value:" "});let t={value:e.value,spaces:{before:" ",after:" "}};return(0,iu.combinator)(t)}case"tag":return(0,iu.tag)({value:e.value});case"selector":case"root":return null}};var Wde=e=>zde(e),Jde=e=>Kde(e),pS=({token:e,arguments:t})=>{let n;switch(e.type){case"string":n={type:"string",value:e.token};break;case"pseudo":{let r=t?.map(a=>({type:"string",value:a.value??a.token?.token??""}));n={type:"pseudo",value:e.token,children:r};break}case"attribute":n={type:"attribute",value:e.token,attribute:e.token};break;case"root":n={type:"root",value:e.token};break;case"id":n={type:"id",value:e.token};break;case"combinator":n={type:"combinator",value:e.token};break;case"tag":n={type:"tag",value:e.token};break;default:throw new Error(`Unsupported token type: ${e.type}`)}return n};var ve=k(N(),1),gXe=(0,Rn.memo)(({isOpen:e,setIsOpen:t,selection:n,addNode:r})=>{let[a,o]=(0,Rn.useState)(""),[i,s]=(0,Rn.useState)(null),[A,c]=(0,Rn.useState)(null),[u,l]=(0,Rn.useState)(null),{token:d,argument:p}=n;(0,Rn.useEffect)(()=>{if(p?.operator&&!A){let f=sS[p.operator];c({operator:p.operator,label:f})}if(p?.flag&&!u){let f=AS[p.flag];l({flag:p.flag,label:f})}p?.values&&p.values.length>0&&!i&&s(p.values[0]??null)},[p,A,u,i]);let g=(f,b)=>({type:f,token:b,label:"",description:""}),m=(0,Rn.useCallback)(()=>{let f=p?.values&&i!==null?i:a.trim();if(f)try{let b=p?.type==="attribute",y=d.token===":score",w=A?.operator||p?.operator||"=",C=u?.flag||p?.flag||"",B=pS({token:b?g("pseudo",":attr"):d,arguments:b?[...d.token!==":attr"?[{token:g("tag",d.token)}]:[],{token:g("attribute",`[${p.token}${w}"${f}"${C?` ${C}`:""}]`)}]:y?[{token:g("string",`"${w}${f}"`)},{token:g("string",`"${p?.token||"overall"}"`)}]:[{token:g("string",`"${f}"`)},...p?[{token:p}]:[]]});r(B),o(""),c(null),l(null),t(!1)}catch(b){t(!1),console.error("error converting node: ",b)}},[a,i,p,A,u,d,r]),h=(0,Rn.useCallback)(f=>{f.key==="Enter"&&m()},[m]);return(0,ve.jsx)(Nd,{open:e,onOpenChange:t,children:(0,ve.jsx)(B5,{children:(0,ve.jsxs)(tl,{className:"px-4 py-3",children:[(0,ve.jsx)(Pd,{children:(0,ve.jsx)(jd,{className:"text-md font-medium",children:d.label})}),(0,ve.jsx)(Od,{}),(0,ve.jsx)("div",{className:"w-full space-y-3",children:(0,ve.jsxs)("div",{className:"flex w-full items-center gap-2",children:[p?.operators&&(0,ve.jsxs)("div",{className:"flex shrink flex-col gap-1",children:[(0,ve.jsx)("label",{htmlFor:"operator",className:"block text-xs text-muted-foreground",children:"operator"}),(0,ve.jsxs)(uA,{children:[(0,ve.jsx)(lA,{asChild:!0,children:(0,ve.jsxs)(de,{id:"operator",className:"[&>svg]:duration-250 h-8 w-fit border-[1px] border-muted bg-white text-foreground hover:bg-neutral-200 dark:bg-neutral-800 dark:hover:bg-neutral-700 [&>svg]:transition-transform [&>svg]:data-[state=open]:rotate-90",children:[(0,ve.jsx)("span",{children:A?A.label:"Select an operator"}),(0,ve.jsx)(Ea,{})]})}),(0,ve.jsx)(yC,{children:(0,ve.jsx)(Rs,{className:"z-[10002]",children:p.operators.map((f,b)=>(0,ve.jsx)(Vd,{onSelect:()=>{c({operator:f.operator,label:f.label})},children:f.label},b))})})]})]}),(0,ve.jsxs)("div",{className:"flex w-full grow flex-col gap-1",children:[(0,ve.jsx)("label",{htmlFor:"argument",className:"block text-xs text-muted-foreground",children:"value"}),p?.values&&p.values.length>0?(0,ve.jsxs)(uA,{children:[(0,ve.jsx)(lA,{asChild:!0,children:(0,ve.jsxs)(de,{id:"argument",className:"[&>svg]:duration-250 h-8 w-fit border-[1px] border-muted bg-white text-foreground hover:bg-neutral-200 dark:bg-neutral-800 dark:hover:bg-neutral-700 [&>svg]:transition-transform [&>svg]:data-[state=open]:rotate-90",children:[(0,ve.jsx)("span",{children:i??"Select a value"}),(0,ve.jsx)(Ea,{})]})}),(0,ve.jsx)(yC,{children:(0,ve.jsx)(Rs,{className:"z-[10002]",children:p.values.map((f,b)=>(0,ve.jsx)(Vd,{onSelect:()=>s(f),children:f},b))})})]}):(0,ve.jsx)(Rt,{id:"argument",value:a,onChange:f=>o(f.target.value),onKeyDown:h,placeholder:p?`Enter a value for ${p.label}`:"Enter value",className:"h-8 w-full border-[1px] border-muted bg-white dark:bg-neutral-800",autoFocus:!0})]}),p?.flags&&(0,ve.jsxs)("div",{className:"flex shrink flex-col gap-1",children:[(0,ve.jsx)("label",{htmlFor:"flag",className:"block text-xs text-muted-foreground",children:"flag"}),(0,ve.jsxs)(uA,{children:[(0,ve.jsx)(lA,{asChild:!0,children:(0,ve.jsxs)(de,{id:"flag",className:"[&>svg]:duration-250 h-8 w-fit border-[1px] border-muted bg-white text-foreground hover:bg-neutral-200 dark:bg-neutral-800 dark:hover:bg-neutral-700 [&>svg]:transition-transform [&>svg]:data-[state=open]:rotate-90",children:[(0,ve.jsx)("span",{children:u?u.label:"Select a flag"}),(0,ve.jsx)(Ea,{})]})}),(0,ve.jsx)(yC,{children:(0,ve.jsx)(Rs,{className:"z-[10002]",children:p.flags.map((f,b)=>(0,ve.jsx)(Vd,{onSelect:()=>{l({flag:f.flag,label:f.label})},children:f.label},b))})})]})]})]})}),(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:d.description}),(0,ve.jsxs)(Td,{children:[(0,ve.jsx)(de,{variant:"outline",onClick:()=>t(!1),size:"sm",children:"Cancel"}),(0,ve.jsx)(de,{onClick:m,size:"sm",disabled:p?.values&&p.values.length>0?!i:!a.trim(),children:"Add"})]})]})})})}),Zde=(0,Rn.memo)(({label:e,token:t,options:n,addNode:r,onOpenDialog:a,level:o=0,parentToken:i,handleMouseEnter:s,handleMouseLeave:A,parentHoverHandlers:c})=>{let[u,l]=(0,Rn.useState)(null),d=(0,Rn.useCallback)(m=>{l(m)},[]),p=(0,Rn.useCallback)(()=>{l(null)},[]),g=()=>{if(n?.options)return;if(t.argumentType!==void 0){t.type==="attribute"?a({token:":attr",type:"pseudo",label:"Attribute selector",description:"Match packages by attribute"},t):a(t);return}let m=pS({token:i??t});r(m)};return o>0?(0,ve.jsx)(Vd,{onSelect:h=>{if(h.preventDefault(),i&&t.argumentType!==void 0){a(i,t);return}else if(i&&t.argumentType===void 0){let f=pS({token:i,arguments:[{token:t}]});r(f);return}g()},onMouseEnter:()=>{c&&c.onNestedEnter(t)},onMouseLeave:()=>{c&&c.onNestedLeave()},className:"cursor-default",children:e}):(0,ve.jsx)(ig,{keywords:n?.options.map(m=>m.label),onSelect:g,onMouseEnter:()=>s?.(t),onMouseLeave:A,className:"!bg-transparent hover:!bg-neutral-200/50 dark:bg-transparent dark:hover:!bg-neutral-800",children:n?(0,ve.jsxs)(uA,{children:[(0,ve.jsxs)(lA,{className:"inline-flex w-full cursor-default items-center justify-between",children:[e,(0,ve.jsx)(Ea,{className:"h-4 w-4 text-muted-foreground"})]}),(0,ve.jsxs)(Rs,{side:"right",align:"start",className:"w-[200px] rounded-lg p-1",onCloseAutoFocus:m=>{m.preventDefault(),m.stopPropagation()},children:[(0,ve.jsx)("div",{className:"px-2 py-1.5",children:(0,ve.jsx)("h4",{className:"text-xs font-medium text-muted-foreground",children:n.label})}),n.options.map((m,h)=>(0,ve.jsx)(Zde,{...m,addNode:r,onOpenDialog:a,level:o+1,parentToken:t,parentHoverHandlers:{onNestedEnter:d,onNestedLeave:p}},h)),u&&(0,ve.jsx)("div",{className:"border-t-[1px] border-muted px-3 py-2",children:(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description})})]})]}):(0,ve.jsx)("span",{children:e})})}),fXe=(0,Rn.memo)(({header:e,items:t,addNode:n,onOpenDialog:r,handleMouseEnter:a,handleMouseLeave:o})=>(0,ve.jsx)(Rh,{heading:e,children:t.map((i,s)=>(0,ve.jsx)(Zde,{...i,addNode:n,onOpenDialog:r,handleMouseEnter:a,handleMouseLeave:o},`${e}-${s}`))})),Vde=[Mde,Nde,Pde,Tde,jde,Gde],hXe={top:0,bottom:0,right:0,left:0},Xde=(0,Rn.memo)(({setNodes:e})=>{let[t,n]=(0,Rn.useState)(null),[r,a]=(0,Rn.useState)(!1),[o,i]=(0,Rn.useState)(!1),[s,A]=(0,Rn.useState)(null),[c,u]=(0,Rn.useState)(hXe),l=X(b=>b.updateQueryBuilderDisplay),d=(0,Rn.useCallback)(b=>{n(b)},[]),p=(0,Rn.useCallback)(()=>{n(null)},[]),g=(0,Rn.useCallback)(b=>{e(y=>y?[...y,b]:[b])},[e]),m=(0,Rn.useCallback)((b,y)=>{A({token:b,argument:y}),i(!0)},[]),h=R7(),f=(0,Rn.useCallback)(()=>{u({top:-92,left:-140,right:window.innerWidth-540,bottom:window.innerHeight-430})},[]);return(0,Rn.useEffect)(()=>(f(),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}),[f]),(0,ve.jsxs)(Qr,{open:r,onOpenChange:a,children:[(0,ve.jsx)(ct,{children:(0,ve.jsxs)(ut,{delayDuration:150,children:[(0,ve.jsx)(Bt,{asChild:!0,children:(0,ve.jsx)(xr,{asChild:!0,children:(0,ve.jsx)(de,{"data-testid":"query-builder-open",variant:"default",className:"aspect-square size-6 rounded-md border-[1px] border-muted bg-transparent p-0 text-muted-foreground hover:bg-neutral-200 dark:bg-neutral-800 hover:dark:bg-neutral-700",children:(0,ve.jsx)(no,{})})})}),(0,ve.jsx)(bn,{children:(0,ve.jsx)(At,{children:"Add query selector"})})]})}),(0,ve.jsx)(dr,{onInteractOutside:b=>{document.getElementById("query-builder-focus-guard")?.contains(b.target)&&(a(!1),l(!1))},align:"start",className:"group w-[400px] select-none rounded-lg border-none bg-transparent p-0 shadow-none",children:(0,ve.jsxs)(Ce.div,{drag:!0,dragConstraints:c,dragElastic:0,dragMomentum:!1,dragControls:h,dragListener:!1,style:{touchAction:"none"},className:"rounded-lg border border-muted bg-popover shadow-lg",children:[(0,ve.jsxs)(_h,{children:[(0,ve.jsxs)("div",{className:"relative",children:[(0,ve.jsx)(Dh,{placeholder:"Search selectors...",wrapperClassName:"border-b-[1px] border-muted",className:"h-9"}),(0,ve.jsx)("div",{tabIndex:-1,onPointerDownCapture:b=>{b.stopPropagation(),h.start(b)},className:"absolute right-2 top-2",children:(0,ve.jsx)(nk,{className:"duration-250 relative size-4 text-muted-foreground opacity-0 transition-colors transition-opacity group-hover:opacity-100 hover:cursor-grab hover:text-foreground active:cursor-grabbing active:text-foreground"})})]}),(0,ve.jsxs)(Fh,{children:[(0,ve.jsx)(Sh,{children:"No results found"}),Vde.map((b,y)=>(0,ve.jsxs)(Rn.Fragment,{children:[(0,ve.jsx)(fXe,{...b,addNode:g,onOpenDialog:m,handleMouseEnter:d,handleMouseLeave:p}),y<Vde.length-1&&(0,ve.jsx)(C5,{})]},y))]})]}),t&&(0,ve.jsx)("div",{className:"border-t-[1px] border-muted px-3 py-2",children:(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:t.description})})]})}),s&&(0,ve.jsx)(gXe,{isOpen:o,setIsOpen:i,selection:s,addNode:g})]})});var epe=e=>e.type==="string",tpe=e=>e.type==="pseudo",npe=e=>e.type==="pseudo"&&Lde.includes(e.value),rpe=e=>e.type==="pseudo"&&Object.keys(CC).includes(e.value),ape=e=>e.type==="pseudo"&&Object.keys(cl).includes(e.value),ope=e=>Object.keys(yg).includes(e.value),ipe=e=>Array.isArray(e.children)&&e.children.length>0&&Object.keys(uS).includes(e.value),spe=e=>e.type==="attribute",Ape=e=>Object.keys(dS).includes(e.value),cpe=e=>e.type==="combinator"&&[">","~"," "].includes(e.value),upe=e=>e.type==="comma",lpe=e=>e.type==="id"&&typeof e.value=="string"&&e.value.length>0,dpe=e=>e.type==="tag"&&typeof e.value=="string"&&e.value.length>0;var xt=k(N(),1),ki=({children:e,className:t,variant:n="selector"})=>(0,xt.jsx)("span",{className:G(Cj({variant:n}),"inline-flex items-center px-1 leading-6","first:after:rounded-l-[7px] first:after:rounded-r-none odd:after:rounded-none first:odd:after:rounded-l-[7px] even:after:rounded-none",t),children:e}),bXe=({node:e})=>(0,xt.jsx)(ki,{variant:"tag",children:e.value}),yXe=({node:e})=>(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"selector",children:"project"}),(0,xt.jsx)(ki,{variant:"selector",children:"is"}),(0,xt.jsx)(ki,{variant:"string",children:e.value})]}),BXe=({node:e})=>(0,xt.jsx)(ki,{variant:"combinator",children:Sde[e.value]}),CXe=({node:e})=>(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"selector",children:"name"}),(0,xt.jsx)(ki,{variant:"id",children:e.value})]}),wXe=({node:e})=>(0,xt.jsx)(ki,{variant:"string",children:e.value}),EXe=({node:e})=>(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"attribute",children:e.attribute}),(0,xt.jsx)(ki,{variant:"string",children:e.value})]}),kXe=({node:e})=>{if(ape(e))return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"pseudo",children:Wj[e.value]}),e.children?.map((t,n)=>kI(t,n))]});if(rpe(e))return(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"pseudo",children:Wj[e.value]}),e.children?.map((t,n)=>kI(t,n))]});if(Ape(e))return!e.children||e.children.length===0?null:(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"pseudo",children:Dde[e.value]}),e.children.map((t,n)=>kI(t,n))]});if(ope(e))return(0,xt.jsx)(ki,{variant:"pseudo",children:yg[e.value].label});if(ipe(e))return!e.children||e.children.length===0?null:(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)(ki,{variant:"pseudo",children:Fde[e.value]}),e.children.map((t,n)=>kI(t,n))]})},kI=(e,t)=>upe(e)?(0,xt.jsx)(ki,{variant:"selector",children:Rde},t):epe(e)?(0,xt.jsx)(wXe,{node:e},t):spe(e)?(0,xt.jsx)(EXe,{node:e},t):dpe(e)?(0,xt.jsx)(bXe,{node:e},t):npe(e)?(0,xt.jsx)(yXe,{node:e},t):tpe(e)?(0,xt.jsx)(kXe,{node:e},t):cpe(e)?(0,xt.jsx)(BXe,{node:e},t):lpe(e)?(0,xt.jsx)(CXe,{node:e},t):null,ppe=({node:e,onDelete:t})=>{let n=kI(e);return n?(0,xt.jsxs)("div",{className:G("inline-flex items-center","rounded-lg border-[1px] border-muted","[&:has(>.content:empty)_>.close-button]:border-l-[0px]"),children:[(0,xt.jsx)("div",{className:G("content inline-flex divide-x-[1px] divide-popover"),children:n}),(0,xt.jsx)(de,{onClick:t,className:G("close-button","duration-250 m-0 aspect-square size-6 rounded-l-none border-l-[1px] border-muted bg-transparent p-0 text-muted-foreground transition-colors","hover:!bg-neutral-200 hover:text-foreground","dark:bg-transparent dark:hover:!bg-neutral-600"),children:(0,xt.jsx)(ld,{})})]}):null};var oa=k(N(),1),mpe=()=>{let e=X(o=>o.queryBuilderOpen),t=X(o=>o.queryBuilderDisplay),n=X(o=>o.updateQueryBuilderOpen),r=X(o=>o.updateQueryBuilderDisplay);return(0,oa.jsxs)(oa.Fragment,{children:[(0,oa.jsx)(vXe,{onClick:()=>{n(!e),r(!e)}}),t&&e&&(0,oa.jsx)(IXe,{})]})},vXe=({onClick:e})=>(0,oa.jsx)("div",{children:(0,oa.jsx)(ct,{children:(0,oa.jsxs)(ut,{children:[(0,oa.jsx)(Bt,{asChild:!0,children:(0,oa.jsx)(de,{onClick:e,className:"duration-250 flex h-[1.5rem] w-[1.5rem] items-center justify-center rounded-sm bg-input p-0 text-muted-foreground transition-colors hover:bg-neutral-300 hover:text-accent-foreground dark:hover:bg-neutral-700 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",children:(0,oa.jsx)(yk,{})})}),(0,oa.jsx)(bn,{children:(0,oa.jsx)(At,{children:"Toggle query builder"})})]})})}),IXe=()=>{let[e,t]=(0,Zd.useState)(!1),[n,r]=(0,Zd.useState)(void 0),a=X(p=>p.query),o=X(p=>p.updateQuery),i=X(p=>p.updateQueryBuilderDisplay),s=X(p=>p.queryInputFocused),A=(0,Zd.useRef)(!1),c=(0,Zd.useRef)(null),u=()=>{let p=document.getElementById(wj);if(!p)throw new Error("Query bar element not found");return p},l=()=>{i(!1)},d=p=>{if(p<=0){o("");return}r(g=>{if(!g)return g;let m=[...g];return m.splice(p,1),m.length>0?m:void 0})};return(0,Zd.useEffect)(()=>{if(A.current){A.current=!1;return}if(n){let p=Jde(n);p!==a&&o(p)}},[n]),(0,Zd.useEffect)(()=>{t(!0);try{c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{try{let p=Wde(a);A.current=!0,r(p)}catch(p){console.debug("QueryBuilder parse in-progress error:",p)}},60)}catch(p){console.error("Error constructing UI AST:",p)}return()=>{c.current&&(window.clearTimeout(c.current),c.current=null)}},[a]),e?(0,Xj.createPortal)((0,oa.jsxs)("section",{className:G("absolute inset-x-0 top-10 z-[50] flex w-full rounded-b-xl border border-t-0 border-muted bg-popover shadow-lg",s&&'after:absolute after:-inset-[5px] after:rounded-[14px] after:rounded-t-none after:border-x-[2px] after:border-b-[2px] after:border-ring after:content-[""]'),children:[(0,oa.jsxs)("div",{className:"relative flex w-full gap-2 px-3 py-3",children:[(0,oa.jsx)(Xde,{setNodes:r,nodes:n}),n&&(0,oa.jsx)("div",{className:"flex w-full flex-wrap gap-2",children:n.map((p,g)=>(0,oa.jsx)(ppe,{onDelete:()=>d(g),node:p},`${p.type}-${p.value}-${g}`))}),n===void 0&&a.trim().length===0&&(0,oa.jsx)("div",{className:"inline-flex h-6 items-center rounded-md border border-dashed border-muted-foreground/50 bg-neutral-50 px-2 dark:bg-neutral-800",children:(0,oa.jsx)("p",{className:"text-sm leading-6 text-muted-foreground/80",children:"No items present"})})]}),(0,Xj.createPortal)((0,oa.jsx)("div",{id:"query-builder-focus-guard",onClick:l,className:"fixed inset-0 z-[2] bg-transparent"}),document.body)]}),u()):null};var ai=k(U(),1);var EC=k(U(),1);var Bg=k(N(),1),Cg=({renderAsLink:e,className:t,...n})=>{let r=G("block rounded-lg border bg-card text-card-foreground shadow-sm",t);return e?(0,Bg.jsx)("a",{href:"#",className:r,...n}):(0,Bg.jsx)("div",{className:r,...n})};Cg.displayName="Card";var su=(0,EC.forwardRef)(({className:e,...t},n)=>(0,Bg.jsx)("div",{ref:n,className:G("flex flex-col p-6",e),...t}));su.displayName="CardHeader";var Xd=(0,EC.forwardRef)(({className:e,...t},n)=>(0,Bg.jsx)("h3",{ref:n,className:G("text-2xl font-semibold leading-none tracking-tight",e),...t}));Xd.displayName="CardTitle";var QXe=(0,EC.forwardRef)(({className:e,...t},n)=>(0,Bg.jsx)("p",{ref:n,className:G("text-sm text-muted-foreground",e),...t}));QXe.displayName="CardDescription";var xXe=(0,EC.forwardRef)(({className:e,...t},n)=>(0,Bg.jsx)("div",{ref:n,className:G("p-6 pt-0",e),...t}));xXe.displayName="CardContent";var _Xe=(0,EC.forwardRef)(({className:e,...t},n)=>(0,Bg.jsx)("div",{ref:n,className:G("flex items-center p-6 pt-0",e),...t}));_Xe.displayName="CardFooter";var gpe=k(U(),1);var Ha=k(N(),1),mS=({deleteDialogOpen:e,setDeleteDialogOpen:t,selectedQueries:n,type:r,onClose:a,text:o="Delete",className:i})=>{let{toast:s}=Io(),[A,c]=(0,gpe.useState)(!1),u=X(d=>d.deleteSavedQueries),l=()=>{t(!1),c(!1),u(n),s({title:"Deleted successfully"}),a&&a()};return(0,Ha.jsxs)(Nd,{open:e,onOpenChange:t,children:[(0,Ha.jsx)(ct,{children:(0,Ha.jsxs)(ut,{open:A,onOpenChange:c,children:[(0,Ha.jsx)(JB,{asChild:!0,children:r==="icon"?(0,Ha.jsx)(de,{onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),disabled:n.length<=0,className:G("rounded-sm border border-[1px] border-muted-foreground/25",i),size:"icon",variant:"ghost",children:(0,Ha.jsx)(Wf,{})}):(0,Ha.jsx)(de,{variant:"destructive",size:"sm",className:"rounded-lg",children:o})}),(0,Ha.jsxs)(At,{children:["Delete ",n.length<=1?"Query":"Queries"]})]})}),(0,Ha.jsxs)(tl,{children:[(0,Ha.jsxs)(Pd,{children:[(0,Ha.jsxs)(jd,{className:"font-medium",children:["Delete ",n.length<=1?"Query":"Queries"]}),(0,Ha.jsx)(Od,{})]}),(0,Ha.jsxs)("div",{children:["You're about to delete:",(0,Ha.jsx)("ul",{className:"my-3 list-none",children:n.map((d,p)=>(0,Ha.jsx)("li",{className:"font-medium",children:d.name},p))}),"This action cannot be undone."]}),(0,Ha.jsxs)(Td,{children:[(0,Ha.jsx)(de,{variant:"outline",onClick:()=>t(!1),children:"No, Keep It."}),(0,Ha.jsx)(de,{variant:"destructive",onClick:l,children:"Yes, Delete!"})]})]})]})};var sn=k(N(),1),DXe=()=>{let[e,t]=(0,ai.useState)(!1),[n,r]=OB(),a=X(A=>A.savedQueries),o=X(A=>A.query),{resolvedTheme:i}=Bm();(0,ai.useEffect)(()=>{r(n.current,{rotate:e?-71.5:0})},[e,r,n]);let s=(0,ai.useMemo)(()=>a?.find(c=>c.query===o)&&i==="dark"?"#fafafa":"#212121",[a,o,i]);return(0,sn.jsxs)(Qr,{open:e,onOpenChange:t,children:[(0,sn.jsx)(xr,{className:"flex items-center justify-center",children:(0,sn.jsx)(ct,{children:(0,sn.jsxs)(ut,{children:[(0,sn.jsx)(Bt,{asChild:!0,className:"flex size-6 cursor-default items-center justify-center rounded-md border border-neutral-200 bg-neutral-100 transition-colors hover:bg-neutral-300 dark:border-neutral-700 dark:bg-muted dark:hover:bg-neutral-700",children:(0,sn.jsx)("div",{onClick:()=>t(!e),className:"inline-flex size-5 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-[15px] [&_svg]:shrink-0",children:(0,sn.jsx)(ud,{ref:n,fill:s})})}),(0,sn.jsx)(bn,{children:(0,sn.jsx)(At,{children:(0,sn.jsx)("p",{children:"Save query"})})})]})})}),(0,sn.jsx)(dr,{className:"w-full rounded-xl p-0",align:"end",children:(0,sn.jsx)(FXe,{isOpen:e,setIsOpen:t})})]})},FXe=({isOpen:e,setIsOpen:t})=>{let[n,r]=(0,ai.useState)(!1),[a,o]=(0,ai.useState)(!1),i=(0,ai.useRef)(!1),[s,A]=(0,ai.useState)(null),[c,u]=(0,ai.useState)(""),[l,d]=(0,ai.useState)(""),[p,g]=(0,ai.useState)([]),m=X(w=>w.saveQuery),h=X(w=>w.nodes),f=X(w=>w.updateSavedQuery),b=X(w=>w.savedQueries),y=X(w=>w.query);return(0,ai.useEffect)(()=>{if(!i.current){i.current=!0;let w=b?.find(C=>C.query===y);if(A(w??null),w&&c!==""){g(w.labels??[]),u(w.name||h[0]?.manifest?.name||""),d(w.context||h[0]?.projectRoot||"");let C={...w,name:c,context:l,query:y,labels:p,dateModified:new Date().toISOString()};f(C)}w||m({id:Gd(),name:h[0]?.manifest?.name??"Query",context:h[0]?.projectRoot??"",query:y,labels:p,dateCreated:new Date().toISOString(),dateModified:new Date().toISOString()})}},[y,h,m,b,f,l,c,p]),(0,ai.useEffect)(()=>{if(!e){let w=b?.find(C=>C.query===y);if(A(w??null),w&&c!==""){g(w.labels??[]),u(w.name||h[0]?.manifest?.name||""),d(w.context||h[0]?.projectRoot||"");let C={...w,name:c,context:l,query:y,labels:p,dateModified:new Date().toISOString()};f(C)}}},[e,y,h,f,l,c,p]),(0,ai.useEffect)(()=>{g(s?.labels??[]),u(s?.name??h[0]?.manifest?.name??""),d(s?.context??h[0]?.projectRoot??"")},[s,h]),e?(0,sn.jsxs)("div",{className:"flex w-[325px] flex-col",children:[(0,sn.jsx)(su,{className:"px-6 py-3",children:(0,sn.jsx)(Xd,{className:"text-md font-medium",children:s?"Edit Query":"Added Query!"})}),(0,sn.jsxs)("div",{className:"flex flex-col gap-2 border-t-[1px] border-muted-foreground/20 px-6 py-4",children:[(0,sn.jsx)(nr,{className:"border-none p-0 font-medium",children:"Name"}),(0,sn.jsx)(Rt,{type:"text",autoComplete:"off",placeholder:"Name",className:"rounded-lg",value:c,onChange:w=>{let C=w.currentTarget.value;u(C)}}),(0,sn.jsx)(nr,{className:"mt-2 border-none p-0 font-medium",children:"Directory"}),(0,sn.jsx)(Rt,{id:"query-context",type:"text",autoComplete:"off",className:"rounded-lg",placeholder:"Directory (optional)",value:l,onChange:w=>{let C=w.currentTarget.value;d(C)}}),(0,sn.jsx)(nr,{className:"mt-2 border-none p-0 font-medium",children:"Labels"}),p.length!==0&&(0,sn.jsx)("div",{className:"flex flex-wrap gap-2",children:p.map((w,C)=>(0,sn.jsx)(Ds,{name:w.name,color:w.color},C))}),(0,sn.jsxs)(Qr,{children:[(0,sn.jsx)(xr,{asChild:!0,children:(0,sn.jsxs)(de,{variant:"outline",role:"combobox",className:"w-full justify-between rounded-lg font-normal",children:["Select labels",(0,sn.jsx)(sd,{className:"opacity-50"})]})}),(0,sn.jsx)(dr,{className:"p-0",children:(0,sn.jsx)(eC,{selectedItems:p,setItems:g,setIsOpen:o})})]}),(0,sn.jsx)("div",{className:"mt-4 flex w-full items-center justify-end gap-2",children:(0,sn.jsxs)("div",{className:"flex items-center gap-3",children:[s&&(0,sn.jsx)(mS,{type:"button",text:"Remove",className:"rounded-lg",deleteDialogOpen:n,setDeleteDialogOpen:r,onClose:()=>t(!1),selectedQueries:[{...s,name:c,context:l,query:y,labels:p}]}),(0,sn.jsx)(de,{size:"sm",className:"rounded-lg",onClick:()=>t(!1),children:"Done"})]})})]})]}):null},fpe=DXe;var Ls=k(N(),1),hpe=()=>{let e=X(i=>i.queryInputFocused),t=X(i=>i.updateQueryInputFocused),n=X(i=>i.queryBuilderOpen),r=X(i=>i.queryBuilderDisplay),a=X(i=>i.updateQueryBuilderDisplay),o=()=>{t(!e),e||a(!0)};return(0,Ls.jsxs)("div",{className:"flex w-full gap-5",children:[(0,Ls.jsx)(Qle,{className:"rounded-xl"}),(0,Ls.jsx)(Ej,{onFocus:o,onBlur:o,tabIndex:0,startContent:(0,Ls.jsx)(Wo,{size:20,className:"ml-3 text-neutral-500"}),wrapperClassName:G(e&&'relative after:content-[""] after:absolute after:rounded-[14px] after:-inset-1 after:border-[2px] after:border-ring',n&&r&&e&&"after:border-b-0 after:rounded-b-none"),className:G("relative",n&&r&&"rounded-b-none"),endContent:(0,Ls.jsxs)("div",{className:"relative mr-3 hidden items-center gap-1 md:flex",children:[(0,Ls.jsx)(mpe,{}),(0,Ls.jsx)(xle,{}),(0,Ls.jsx)(fpe,{}),(0,Ls.jsx)(cA,{className:'before:content-[" "] relative ml-3 before:absolute before:-ml-10 before:h-[0.75rem] before:w-[2px] before:rounded-sm before:bg-neutral-200 before:dark:bg-neutral-700',children:(0,Ls.jsx)(qc,{size:12})}),(0,Ls.jsx)(cA,{className:"text-sm",children:"k"}),(0,Ls.jsx)("div",{className:G("absolute inset-0 -bottom-2 -right-3 -top-2 z-[-2] rounded-br-xl rounded-tr-xl border-y border-r border-input bg-gradient-to-r from-white/20 to-white backdrop-blur-sm dark:from-muted/5 dark:to-muted/5",n&&r&&"rounded-br-none")})]})})]})};var bpe=k(U(),1);var Kh=k(N(),1),gS=({options:e,value:t,classNames:n})=>{let[r,a]=(0,bpe.useState)(t??e[0].key),{wrapperClassName:o,toggleClassName:i,optionClassName:s,sliderClassName:A}=n??{},c=t??r,u=l=>{let d=c===l?l===e[0].key?e[1].key:e[0].key:l,p=e.find(g=>g.key===d);p&&d!==c&&(t===void 0&&a(d),p.callBack())};return(0,Kh.jsx)("div",{className:G("flex w-fit",o),children:(0,Kh.jsxs)("div",{className:G("relative flex h-[2.5rem] w-full items-center rounded-md border border-[1px] border-muted bg-white p-1 dark:bg-muted-foreground/5",i),children:[(0,Kh.jsx)(Ce.div,{className:G("absolute h-[2rem] w-[2rem] rounded-[4px] bg-muted",A),animate:{left:c===e[0].key?4:36}}),e.map((l,d)=>(0,Kh.jsx)("div",{onClick:()=>u(l.key),className:G("z-[1] flex h-[2rem] w-[2rem] cursor-default items-center justify-center rounded-sm",s),title:l.toolTipContent,children:(0,Kh.jsx)(l.icon,{size:20,className:"text-muted-foreground"})},d))]})})};var fS=k(N(),1),Wh=(e,t,n)=>{let r=[...e].sort((a,o)=>String(a[t]).localeCompare(String(o[t])));n(r)},eO=(e,t,n)=>{let r=[...e].sort((a,o)=>String(o[t]).localeCompare(String(a[t])));n(r)},hS=({filteredItems:e,setFilteredItems:t,sortKey:n,classNames:r})=>(0,fS.jsx)(gS,{classNames:r,options:[{icon:o=>(0,fS.jsx)(vm,{...o}),toolTipContent:"Ascending",key:"ascending",callBack:()=>Wh(e,n,t)},{icon:o=>(0,fS.jsx)(Im,{...o}),toolTipContent:"Descending",key:"descending",callBack:()=>eO(e,n,t)}]});var ype=k(U(),1);var ep=k(N(),1),Bpe=({items:e,setFilteredItems:t,sortKey:n,className:r})=>{let[a,o]=(0,ype.useState)("ascending"),i=s=>{o(s),s==="ascending"?Wh(e,n,t):eO(e,n,t)};return(0,ep.jsxs)(uA,{children:[(0,ep.jsx)(lA,{asChild:!0,className:G("w-[120px]",r),children:(0,ep.jsxs)(de,{variant:"outline",className:"text-sm font-normal",children:["Sort by",(0,ep.jsx)(Bs,{size:16})]})}),(0,ep.jsxs)(Rs,{children:[(0,ep.jsx)(bg,{checked:a==="ascending",onSelect:s=>{s.preventDefault(),i("ascending")},children:"Ascending"}),(0,ep.jsx)(bg,{checked:a==="descending",onSelect:s=>{s.preventDefault(),i("descending")},children:"Descending"})]})]})};var dA=k(U(),1);var ul=k(N(),1),kC=({items:e,setFilteredItems:t,placeholder:n,className:r})=>{let[a,o]=(0,dA.useState)(""),i=(0,dA.useRef)(null),s=(0,dA.useRef)(!0),A=(0,dA.useRef)([]),[c,u]=jN();(0,dA.useEffect)(()=>{if(s.current)return;let d=new URLSearchParams(c),p=e?Object.keys(e[0]??{}):[];if(!a.trim()){d.forEach((m,h)=>d.delete(h));let g=e??[];JSON.stringify(g)!==JSON.stringify(A.current)&&(t(g),A.current=g)}if(a.trim()!==""&&(d.forEach((g,m)=>d.delete(m)),d.set("filter",a)),a.split("=")[0]==="label"){d.forEach((m,h)=>d.delete(h));let g=a.split("=")[1];g&&d.set("label",g)}if(p.some(g=>a.includes(g))){d.forEach((h,f)=>d.delete(f));let[g,m]=a.split("=");g&&m&&d.set(g,m)}u(d)},[a,e,c,u,t]),(0,dA.useEffect)(()=>{let d=new URLSearchParams(c),p=e?Object.keys(e[0]??{}):[],m=Array.from(d.keys()).find(h=>p.includes(h));m&&o(`${m}=${d.get(m)}`),d.get("label")&&o(`label=${d.get("label")?.toLowerCase()}`),s.current=!1},[e,c]);let l=(0,dA.useMemo)(()=>{if(!e)return[];let d=new URLSearchParams(c),p=[];for(let[g,m]of d.entries())p.push({key:g,value:m});return e.filter(g=>p.every(m=>{if(m.key==="filter"){let h=m.value.toLowerCase();return Object.values(g).some(f=>String(f).toLowerCase().includes(h))}else if(m.key==="label"){let h=m.value.toLowerCase();return(g.labels??[]).some(b=>b.name.toLowerCase().includes(h))}else{let h=String(g[m.key]||"").toLowerCase(),f=m.value.toLowerCase();return h===f}}))},[e,c]);return(0,dA.useEffect)(()=>{JSON.stringify(l)!==JSON.stringify(A.current)&&(t(l),A.current=l)},[l,t]),(0,dA.useEffect)(()=>{let d=p=>{switch(!0){case((p.metaKey||p.ctrlKey)&&p.key==="k"):p.preventDefault(),i.current?.focus();break;case p.key==="Escape":p.preventDefault(),i.current?.blur();break;default:break}};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d)}},[]),(0,ul.jsxs)("div",{className:G("relative flex w-full items-center",r),children:[(0,ul.jsx)(Wo,{size:18,className:"absolute left-0 ml-3 text-neutral-500"}),(0,ul.jsx)(Rt,{type:"text",ref:i,className:"rounded-xl bg-white pl-9 pr-20 dark:bg-muted-foreground/5",role:"search",placeholder:n,value:a,onChange:d=>o(d.target.value)}),(0,ul.jsx)("div",{className:"absolute right-0 flex gap-2",children:(0,ul.jsxs)("div",{className:"mr-3 hidden items-center gap-1 backdrop-blur-sm md:flex",children:[(0,ul.jsx)(cA,{children:(0,ul.jsx)(qc,{size:12})}),(0,ul.jsx)(cA,{className:"text-sm",children:"k"})]})})]})};var bS=k(U(),1);var ll=k(N(),1),Cpe=({placeholder:e="Filter Projects",filterValue:t,onFilterChange:n,className:r=""})=>{let a=(0,bS.useRef)(null);return(0,bS.useEffect)(()=>{let o=i=>{switch(!0){case((i.metaKey||i.ctrlKey)&&i.key==="k"):i.preventDefault(),a.current?.focus();break;case i.key==="Escape":i.preventDefault(),a.current?.blur();break;default:break}};return window.addEventListener("keydown",o),()=>{window.removeEventListener("keydown",o)}},[]),(0,ll.jsxs)("div",{className:`relative flex w-96 items-center ${r}`,children:[(0,ll.jsx)(Wo,{size:18,className:"absolute left-0 ml-3 text-neutral-500"}),(0,ll.jsx)(Rt,{type:"text",ref:a,className:"rounded-xl bg-white pl-9 pr-20 dark:bg-muted-foreground/5",role:"search",placeholder:e,value:t,onChange:o=>n(o.target.value)}),(0,ll.jsx)("div",{className:"absolute right-0 flex gap-2",children:(0,ll.jsxs)("div",{className:"mr-3 hidden items-center gap-1 backdrop-blur-sm md:flex",children:[(0,ll.jsx)(cA,{children:(0,ll.jsx)(qc,{size:12})}),(0,ll.jsx)(cA,{className:"text-sm",children:"k"})]})})]})};var tp=k(N(),1),yS=({className:e="",table:t,columnVisibility:n,setColumnVisibility:r})=>t?(0,tp.jsxs)(uA,{children:[(0,tp.jsx)(lA,{asChild:!0,className:e,children:(0,tp.jsxs)(de,{variant:"outline",className:"text-sm font-normal",children:["Columns ",(0,tp.jsx)(Bs,{})]})}),(0,tp.jsx)(Rs,{align:"end",children:t.getAllColumns().filter(a=>a.getCanHide()).map(a=>(0,tp.jsx)(bg,{className:"capitalize",onSelect:o=>o.preventDefault(),checked:n[a.id]??a.getIsVisible(),onCheckedChange:o=>{r({...n,[a.id]:o})},children:a.id},a.id))})]}):(0,tp.jsx)(Ck,{className:`h-full ${e}`});var wpe=k(U(),1);var BS=k(N(),1),Epe=({currentView:e,setCurrentView:t,classNames:n})=>{let r=(0,wpe.useMemo)(()=>[{icon:a=>(0,BS.jsx)(ok,{...a}),toolTipContent:"Grid",key:"grid",callBack:()=>t("grid")},{icon:a=>(0,BS.jsx)(fk,{...a}),toolTipContent:"Table",key:"table",callBack:()=>t("table")}],[t]);return(0,BS.jsx)(gS,{classNames:n,options:r,value:e})};var SXe={currentView:"grid",table:void 0,tableFilterValue:"",filteredProjects:[],columnVisibility:{type:!1,private:!1,version:!1}},_o=ym(e=>({...SXe,updateCurrentView:n=>e(()=>({currentView:n})),updateTable:n=>e(()=>({table:n})),setTableFilterValue:n=>e(()=>({tableFilterValue:n})),setFilteredProjects:n=>e(()=>({filteredProjects:n})),setColumnVisibility:n=>e(()=>({columnVisibility:n}))}));var Ms=k(N(),1),kpe=()=>{let e=_o(u=>u.currentView),t=_o(u=>u.updateCurrentView),n=_o(u=>u.table),r=_o(u=>u.tableFilterValue),a=_o(u=>u.setTableFilterValue),o=X(u=>u.dashboard),i=_o(u=>u.filteredProjects),s=_o(u=>u.setFilteredProjects),A=_o(u=>u.columnVisibility),c=_o(u=>u.setColumnVisibility);return(0,Ms.jsxs)("div",{className:"flex w-full items-center gap-5",children:[e==="table"?(0,Ms.jsx)(Cpe,{filterValue:r,onFilterChange:a,className:"w-full"}):(0,Ms.jsx)(kC,{placeholder:"Filter Projects",items:o?.projects??[],setFilteredItems:s,className:"w-full"}),(0,Ms.jsx)(Epe,{currentView:e,setCurrentView:t,classNames:{toggleClassName:"rounded-xl",sliderClassName:"rounded-[9px]",optionClassName:"rounded-lg"}}),e==="table"?(0,Ms.jsx)(Ce.div,{initial:{opacity:0},exit:{opacity:0},animate:{opacity:1},children:(0,Ms.jsx)(yS,{columnVisibility:A,setColumnVisibility:c,table:n,className:"w-[100px] rounded-xl md:w-[120px]"})},e):(0,Ms.jsx)(Ce.div,{exit:{opacity:0},initial:{opacity:1},animate:{opacity:1},children:(0,Ms.jsx)(Bpe,{items:i,className:"w-[100px] rounded-xl md:w-[120px]",setFilteredItems:u=>{let l=typeof u=="function"?u(i):u;s(l)},sortKey:"name"})},e),(0,Ms.jsx)(de,{asChild:!0,className:"ml-auto rounded-xl",children:(0,Ms.jsxs)(bs,{to:"/create-new-project",children:[(0,Ms.jsx)(no,{size:24}),(0,Ms.jsx)("span",{className:"hidden md:flex",children:"Create New Project"})]})})]})};var RXe={isCreating:!1,deleteDialogOpen:!1,filteredQueries:[],selectedQueries:[]},Ki=ym(e=>({...RXe,setIsCreating:n=>e(()=>({isCreating:n})),setFilteredQueries:n=>e(()=>({filteredQueries:n})),setDeleteDialogOpen:n=>e(()=>({deleteDialogOpen:n})),setSelectedQueries:n=>e(()=>({selectedQueries:n}))}));var vi=k(N(),1),vpe=()=>{let e=X(c=>c.savedQueryLabels),t=X(c=>c.savedQueries),n=Ki(c=>c.filteredQueries),r=Ki(c=>c.setFilteredQueries),a=Ki(c=>c.isCreating),o=Ki(c=>c.setIsCreating),i=Ki(c=>c.deleteDialogOpen),s=Ki(c=>c.setDeleteDialogOpen),A=Ki(c=>c.selectedQueries);return(0,vi.jsxs)("div",{className:"flex w-full items-center justify-between gap-5",children:[(0,vi.jsx)(kC,{placeholder:"Filter Queries",items:t,className:"grow",setFilteredItems:r}),(0,vi.jsx)(hS,{filteredItems:n,setFilteredItems:r,sortKey:"name",classNames:{toggleClassName:"rounded-xl",sliderClassName:"rounded-[9px]",optionClassName:"rounded-lg"}}),(0,vi.jsx)("div",{className:"flex items-center",children:(0,vi.jsx)("div",{className:"flex items-center",children:(0,vi.jsx)(mS,{deleteDialogOpen:i,setDeleteDialogOpen:s,selectedQueries:A,className:"rounded-xl",type:"icon"})})}),t?.length!==0&&(0,vi.jsxs)(de,{disabled:a,onClick:()=>o(!0),className:"rounded-xl",children:[(0,vi.jsx)("span",{className:"hidden md:flex",children:"New Query"}),(0,vi.jsx)(no,{})]}),(0,vi.jsx)(de,{asChild:!0,variant:"outline",className:"rounded-xl",children:(0,vi.jsxs)(bs,{to:"/labels",children:[(0,vi.jsx)(bk,{}),(0,vi.jsx)("span",{children:"Labels"}),(0,vi.jsx)(eg,{variant:"secondary",children:e?.length})]})})]})};var Ipe=k(U(),1);var Ia=k(N(),1),Qpe=({deleteDialogOpen:e,setDeleteDialogOpen:t,selectedLabels:n,className:r})=>{let{toast:a}=Io(),[o,i]=(0,Ipe.useState)(!1),s=X(c=>c.deleteSavedQueryLabels),A=()=>{t(!1),i(!1),s(n),a({title:"Deleted successfully"})};return(0,Ia.jsx)("div",{className:"flex items-center",children:(0,Ia.jsx)("div",{className:"flex items-center",children:(0,Ia.jsxs)(Nd,{open:e,onOpenChange:t,children:[(0,Ia.jsx)(ct,{children:(0,Ia.jsxs)(ut,{open:o,onOpenChange:i,children:[(0,Ia.jsx)(JB,{asChild:!0,children:(0,Ia.jsx)(de,{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),disabled:n.length<=0,className:G("rounded-sm border border-[1px] border-muted-foreground/25",r),size:"icon",variant:"ghost",children:(0,Ia.jsx)(Wf,{})})}),(0,Ia.jsxs)(At,{children:["Delete"," ",n.length<=1?"Label":"Labels"]})]})}),(0,Ia.jsxs)(tl,{children:[(0,Ia.jsxs)(Pd,{children:[(0,Ia.jsxs)(jd,{className:"font-medium",children:["Delete"," ",n.length<=1?"Label":"Labels"]}),(0,Ia.jsx)(Od,{})]}),(0,Ia.jsxs)("div",{children:["You're about to delete:",(0,Ia.jsx)("ul",{className:"my-3 list-none",children:n.map((c,u)=>(0,Ia.jsx)("li",{className:"font-medium",children:c.name},u))}),"This action cannot be undone."]}),(0,Ia.jsxs)(Td,{children:[(0,Ia.jsx)(de,{variant:"outline",onClick:()=>t(!1),children:"No, Keep It."}),(0,Ia.jsx)(de,{variant:"destructive",onClick:A,children:"Yes, Delete!"})]})]})]})})})};var LXe={isCreating:!1,deleteDialogOpen:!1,selectedLabels:[],filteredLabels:[]},Wi=ym(e=>({...LXe,setDeleteDialogOpen:n=>e(()=>({deleteDialogOpen:n})),setSelectedLabels:n=>e(()=>({selectedLabels:n})),setIsCreating:n=>e(()=>({isCreating:n})),setFilteredLabels:n=>e(()=>({filteredLabels:n}))}));var np=k(N(),1),xpe=()=>{let e=X(A=>A.savedQueryLabels),t=Wi(A=>A.selectedLabels),n=Wi(A=>A.isCreating),r=Wi(A=>A.setIsCreating),a=Wi(A=>A.deleteDialogOpen),o=Wi(A=>A.setDeleteDialogOpen),i=Wi(A=>A.setFilteredLabels),s=Wi(A=>A.filteredLabels);return(0,np.jsxs)("div",{className:"flex w-full justify-between gap-5",children:[(0,np.jsx)(kC,{placeholder:"Filter Labels",items:e,setFilteredItems:i,className:"grow"}),(0,np.jsx)(hS,{filteredItems:s,setFilteredItems:i,sortKey:"name",classNames:{toggleClassName:"rounded-xl",sliderClassName:"rounded-[9px]",optionClassName:"rounded-lg"}}),(0,np.jsx)(Qpe,{deleteDialogOpen:a,setDeleteDialogOpen:o,selectedLabels:t,className:"rounded-xl"}),e?.length!==0&&(0,np.jsxs)(de,{disabled:n,onClick:()=>r(!0),className:"rounded-xl",children:[(0,np.jsx)("span",{className:"hidden md:flex",children:"New Label"}),(0,np.jsx)(no,{})]})]})};var _pe=k(U(),1);var tO=k(N(),1),Dpe=()=>{let{pathname:e}=$r(),t=(0,_pe.useMemo)(()=>e.split("/").pop()||"Help",[e]);return(0,tO.jsx)("div",{className:"flex items-center",children:(0,tO.jsx)("h4",{className:"text-md font-medium capitalize",children:t})})};var Fpe=[{title:"Product",children:[{icon:tAe,title:"Client",path:"https://vlt.sh/client",target:"_blank"},{icon:eAe,title:"Serverless Registry",path:"https://vlt.sh/serverless-registry",target:"_blank"}]},{title:"Docs",path:"https://docs.vlt.sh/",target:"_blank"},{title:"Blog",path:"https://blog.vlt.sh/",target:"_blank"},{title:"Company",path:"https://vlt.sh/company",target:"_blank"}];var pA=k(N(),1),Spe=()=>(0,pA.jsx)("div",{className:"hidden h-10 items-center gap-x-2 rounded-xl border-[1px] bg-white p-1 text-sm dark:bg-neutral-950 md:flex",children:Fpe.map(e=>e.children?(0,pA.jsx)(MXe,{item:e},e.title):(0,pA.jsx)(Rpe,{item:e},e.title))}),MXe=({item:e})=>{let{title:t,children:n}=e;return(0,pA.jsxs)(Qr,{children:[(0,pA.jsxs)(xr,{className:"duration-250 inline-flex cursor-default items-center gap-1.5 rounded-lg bg-transparent px-3 py-1.5 text-sm text-neutral-800 transition-colors hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-900",children:[t,(0,pA.jsx)(Bs,{size:12})]}),(0,pA.jsx)(dr,{align:"start",className:"flex w-[224px] flex-col gap-1 rounded-lg bg-white p-1 dark:bg-neutral-950",children:n?.map((r,a)=>(0,pA.jsx)(Rpe,{item:r},a))})]})},Rpe=({item:e,className:t})=>{let{title:n,path:r,target:a,icon:o}=e;return(0,pA.jsxs)("a",{target:a,href:r,className:G("duration-250 inline-flex cursor-default items-center gap-x-3 text-nowrap rounded-lg bg-transparent px-3 py-1.5 text-sm text-neutral-800 transition-colors hover:bg-neutral-100 dark:text-neutral-300 dark:hover:bg-neutral-900",t),children:[o&&(0,pA.jsx)(o,{className:"rounded-sm border-[1px] border-border dark:border-neutral-800"}),(0,pA.jsx)("span",{children:n})]})};var Ac=k(N(),1),Mpe=()=>{let{pathname:e}=$r(),t=(0,Lpe.useMemo)(()=>{if(e.includes("explore"))return(0,Ac.jsx)(hpe,{});if(e==="/")return(0,Ac.jsx)(kpe,{});if(e==="/queries")return(0,Ac.jsx)(vpe,{});if(e==="/labels")return(0,Ac.jsx)(xpe,{});if(e.includes("/help"))return(0,Ac.jsx)(Dpe,{})},[e]);return(0,Ac.jsxs)("div",{className:"flex h-16 w-full cursor-default items-center justify-between gap-5 bg-sidebar px-4 py-3",children:[(0,Ac.jsx)("div",{className:"hidden aspect-square size-8 items-center justify-center md:flex",children:(0,Ac.jsx)(oF,{})}),(0,Ac.jsx)("div",{className:"flex w-full",children:t}),(0,Ac.jsx)(Spe,{})]})};var Tpe=k(U(),1);var Npe=async({url:e,params:t={},stamp:n})=>{t.random=n;let r=new URLSearchParams(t).toString(),a=r?`${e}?${r}`:e,o=await fetch(a);if(!o.ok)throw new Error(`Failed to fetch ${e}: ${o.statusText}`);return await o.json()},vC=({navigate:e,updateDashboard:t,updateErrorCause:n,stamp:r})=>{async function a(){let o=await Npe({url:"/dashboard.json",stamp:r});t(o)}a().catch(o=>{console.error(o),e("/error"),n("Failed to initialize dashboard.")})},Ppe=({updateAppData:e,updateErrorCause:t,navigate:n,stamp:r})=>{async function a(){let o=await Npe({url:"/app-data.json",stamp:r});e(o)}a().catch(o=>{console.error(o),n("/error"),t("Failed to initialize app data.")})};var jpe=()=>{let e=Zt(),t=X(a=>a.updateAppData),n=X(a=>a.updateErrorCause),r=X(a=>a.stamp);(0,Tpe.useEffect)(()=>{Ppe({updateAppData:t,updateErrorCause:n,navigate:e,stamp:r})},[r,t,n,e])};var rp=k(N(),1),NXe=()=>(jpe(),(0,rp.jsxs)("div",{className:"flex flex-col",children:[(0,rp.jsx)(Mpe,{}),(0,rp.jsxs)(uP,{defaultOpen:Lse,children:[(0,rp.jsx)(Mse,{}),(0,rp.jsx)(pP,{children:(0,rp.jsx)(id,{})}),(0,rp.jsx)(Xse,{})]})]})),Ope=NXe;var CS=k(U(),1);var cc=k(U(),1);var Upe=k(U(),1);var $pe=k(U(),1);var Gpe=k(N(),1),PXe="Label",Hpe=$pe.forwardRef((e,t)=>(0,Gpe.jsx)(ke.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Hpe.displayName=PXe;var nO=Hpe;var qpe=k(N(),1),jXe=wa("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ap=Upe.forwardRef(({className:e,...t},n)=>(0,qpe.jsx)(nO,{ref:n,className:G(jXe(),e),...t}));ap.displayName=nO.displayName;var IC=async({navigate:e,updateErrorCause:t,updateQuery:n,updateStamp:r,body:a,url:o,destinationRoute:i,errorMessage:s})=>{let A;try{A=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(u){console.error(u),e("/error"),t("Failed to submit request.");return}let c=!1;try{c=await A.json()==="ok"}catch(u){console.error(u)}c?(window.scrollTo(0,0),n(nd),e(i),r()):(e("/error"),t(s))};var vI=k(U(),1);var Au=k(N(),1),zpe=(0,vI.forwardRef)(({rows:e,columns:t,children:n},r)=>(0,Au.jsxs)("div",{ref:r,className:"grid-system",style:{"--rows":e,"--columns":t},children:[(0,Au.jsx)("div",{className:"grid-system-guides",children:Array.from({length:e*t},(a,o)=>{let i=o%t+1,s=Math.floor(o/t)+1;return(0,Au.jsx)("div",{className:"grid-system-guide",style:{"--x":i,"--y":s}},o)})}),n]})),Ype=(0,vI.forwardRef)(({className:e="",children:t},n)=>{let r=wa("");return(0,Au.jsx)("section",{ref:n,className:G(r({className:e})),children:t})}),QC=(0,vI.forwardRef)(({row:e="auto",column:t,children:n},r)=>(0,Au.jsx)("div",{ref:r,className:"grid-system-cell",style:{gridRow:e,gridColumn:t},children:n})),ifn=(0,vI.forwardRef)(({row:e,column:t},n)=>(0,Au.jsx)("div",{ref:n,className:"grid-system-cross",style:{gridRow:e,gridColumn:t},children:(0,Au.jsxs)("svg",{width:30,height:30,children:[(0,Au.jsx)("line",{x1:5,y1:15,x2:25,y2:15,stroke:"#fafafa",strokeWidth:1}),(0,Au.jsx)("line",{x1:15,y1:5,x2:15,y2:25,stroke:"#fafafa",strokeWidth:1})]})}));var Jh=k(U(),1);var cu=k(N(),1),II=({className:e,containerRef:t,fromRef:n,toRef:r,curvature:a=0,reverse:o=!1,duration:i=Math.random()*3+4,delay:s=0,pathColor:A="gray",pathWidth:c=2,pathOpacity:u=.2,gradientStartColor:l="#ffaa40",gradientStopColor:d="#9c40ff",startXOffset:p=0,startYOffset:g=0,endXOffset:m=0,endYOffset:h=0})=>{let f=(0,Jh.useId)(),[b,y]=(0,Jh.useState)(""),[w,C]=(0,Jh.useState)({width:0,height:0}),B=o?{x1:["90%","-10%"],x2:["100%","0%"],y1:["0%","0%"],y2:["0%","0%"]}:{x1:["10%","110%"],x2:["0%","100%"],y1:["0%","0%"],y2:["0%","0%"]};return(0,Jh.useEffect)(()=>{let E=()=>{if(t.current&&n.current&&r.current){let x=t.current.getBoundingClientRect(),S=n.current.getBoundingClientRect(),M=r.current.getBoundingClientRect(),j=x.width,O=x.height;C({width:j,height:O});let L=S.left-x.left+S.width/2+p,$=S.top-x.top+S.height/2+g,I=M.left-x.left+M.width/2+m,_=M.top-x.top+M.height/2+h,R=$-a,F=`M ${L},${$} Q ${(L+I)/2},${R} ${I},${_}`;y(F)}},v=new ResizeObserver(x=>{for(let S of x)E()});return t.current&&v.observe(t.current),E(),()=>{v.disconnect()}},[t,n,r,a,p,g,m,h]),(0,cu.jsxs)("svg",{fill:"none",width:w.width,height:w.height,xmlns:"http://www.w3.org/2000/svg",className:G("pointer-events-none absolute left-0 top-0 transform-gpu stroke-2",e),viewBox:`0 0 ${w.width} ${w.height}`,children:[(0,cu.jsx)("path",{d:b,stroke:A,strokeWidth:c,strokeOpacity:u,strokeLinecap:"round"}),(0,cu.jsx)("path",{d:b,strokeWidth:c,stroke:`url(#${f})`,strokeOpacity:"1",strokeLinecap:"round"}),(0,cu.jsx)("defs",{children:(0,cu.jsxs)(Ce.linearGradient,{className:"transform-gpu",id:f,gradientUnits:"userSpaceOnUse",initial:{x1:"0%",x2:"0%",y1:"0%",y2:"0%"},animate:{x1:B.x1,x2:B.x2,y1:B.y1,y2:B.y2},transition:{delay:s,duration:i,ease:[.16,1,.3,1],repeat:1/0,repeatDelay:0},children:[(0,cu.jsx)("stop",{stopColor:l,stopOpacity:"0"}),(0,cu.jsx)("stop",{stopColor:l}),(0,cu.jsx)("stop",{offset:"32.5%",stopColor:d}),(0,cu.jsx)("stop",{offset:"100%",stopColor:d,stopOpacity:"0"})]})})]})};var mt=k(N(),1),Kpe=({inProgress:e,setInProgress:t})=>{let n=Zt(),r=X(x=>x.dashboard),a=X(x=>x.updateErrorCause),o=X(x=>x.updateQuery),i=X(x=>x.updateStamp),[s,A]=(0,cc.useState)(""),[c,u]=(0,cc.useState)(""),[l,d]=(0,cc.useState)(r?.defaultAuthor??""),[p,g]=(0,cc.useState)(!0),m=(0,cc.useRef)(null),h=(0,cc.useRef)(null),f=(0,cc.useRef)(null),b=(0,cc.useRef)(null),y=(0,cc.useRef)(null),w=(0,cc.useRef)(null),C=x=>/^[a-z0-9-]+$/.test(x)&&x.length<128,B=x=>{let S=x.target.value;u(S),g(C(S))},E=x=>{d(x.target.value)};return(0,mt.jsxs)("div",{className:"z-[3] flex w-full rounded-md border-[1px] border-dashed bg-card",children:[(0,mt.jsxs)("form",{className:"relative w-1/2 space-y-6 border-r-[1px] border-solid border-dashed",onSubmit:x=>{x.stopPropagation(),x.preventDefault(),!e&&(t(!0),IC({navigate:n,updateErrorCause:a,updateQuery:o,updateStamp:i,body:{path:s,name:c,author:l},url:"/create-project",destinationRoute:"/explore",errorMessage:"Failed to create project."}))},children:[(0,mt.jsxs)("div",{className:"mb-12 flex flex-col gap-2 px-8 pt-8",children:[(0,mt.jsx)("h5",{className:"text-xl font-medium",children:"Project details"}),(0,mt.jsx)("p",{className:"text-sm italic text-muted-foreground/50",children:"Required fields are marked with an asterisk (*)."})]}),(0,mt.jsxs)("div",{className:"flex flex-col gap-2 px-8",children:[(0,mt.jsx)(ap,{htmlFor:"projectName",children:"Project Name *"}),(0,mt.jsx)(Rt,{id:"projectName",value:c,placeholder:"vlt-project",onChange:B,className:p?"":"border-red-500"}),(0,mt.jsx)(pt,{children:!p&&(0,mt.jsx)(Ce.div,{initial:{opacity:0,height:0},exit:{opacity:0,height:0},transition:{duration:.2,ease:[.45,0,.55,1]},animate:{height:"auto",opacity:1},children:(0,mt.jsx)("p",{className:"text-sm text-red-500",style:{marginTop:10},children:"Project name can only contain lowercase letters and hyphens"})})})]}),(0,mt.jsxs)(Ce.div,{animate:{top:p?0:10},layout:!0,initial:{top:0},transition:{duration:.2,ease:[.45,0,.55,1]},className:"flex flex-col gap-6",children:[(0,mt.jsxs)("div",{className:"flex flex-col gap-2 px-8",children:[(0,mt.jsx)(ap,{htmlFor:"location",children:"Location *"}),(0,mt.jsx)(nC,{useDashboardProjectLocations:!0,acceptsGlobal:!1,dashboard:r,setDirectory:A,directory:s})]}),(0,mt.jsxs)("div",{className:"flex flex-col gap-2 px-8",children:[(0,mt.jsx)(ap,{htmlFor:"author",children:"Author"}),(0,mt.jsx)(Rt,{placeholder:"John Doe <johndoe@acme.com>",id:"author",value:l,onChange:E})]})]}),(0,mt.jsx)("div",{className:"absolute bottom-0 flex w-full justify-end border-t-[1px] border-dashed px-8 py-4",children:(0,mt.jsx)(de,{className:"font-medium",disabled:!p||c.trim()===""||s.trim()==="",type:"submit",children:"Create Project"})})]}),(0,mt.jsxs)("div",{className:"relative h-full w-1/2",children:[(0,mt.jsx)("div",{className:"absolute inset-0 z-[10] h-full w-full bg-gradient-radial from-card/20 to-card/80"}),(0,mt.jsx)(Ype,{className:"h-full w-full",children:(0,mt.jsxs)(zpe,{rows:7,columns:7,ref:m,children:[(0,mt.jsx)(QC,{column:2,row:2,ref:h,children:(0,mt.jsx)("div",{className:"/80 relative z-[2] flex h-full w-full items-center justify-center border-b-[1px] border-r-[1px] border-dashed border-muted bg-card",children:(0,mt.jsx)("div",{className:"flex items-center justify-center shadow-inner",children:(0,mt.jsx)(aAe,{className:"size-12 text-muted-foreground/80"})})})}),(0,mt.jsx)(QC,{column:6,row:2,ref:y,children:(0,mt.jsx)("div",{className:"/80 relative z-[2] flex h-full w-full items-center justify-center border-b-[1px] border-r-[1px] border-dashed border-muted bg-card",children:(0,mt.jsx)("div",{className:"flex items-center justify-center shadow-inner",children:(0,mt.jsx)(oAe,{className:"size-12 text-muted-foreground/80"})})})}),(0,mt.jsx)(QC,{column:2,row:6,ref:w,children:(0,mt.jsx)("div",{className:"/80 relative z-[2] flex h-full w-full items-center justify-center border-b-[1px] border-r-[1px] border-dashed border-muted bg-card",children:(0,mt.jsx)("div",{className:"flex items-center justify-center shadow-inner",children:(0,mt.jsx)(sAe,{className:"size-12 text-muted-foreground/80"})})})}),(0,mt.jsx)(QC,{column:6,row:6,ref:b,children:(0,mt.jsx)("div",{className:"/80 relative z-[2] flex h-full w-full items-center justify-center border-b-[1px] border-r-[1px] border-dashed border-muted bg-card",children:(0,mt.jsx)("div",{className:"flex h-full w-full items-center justify-center shadow-inner",children:(0,mt.jsx)(Nh,{className:"size-12 fill-muted-foreground/80"})})})}),(0,mt.jsx)(QC,{column:4,row:4,ref:f,children:(0,mt.jsx)("div",{className:"relative z-[2] flex h-full w-full items-center justify-center border-b-[1px] border-r-[1px] border-dashed border-muted bg-card p-2 shadow-inner",children:(0,mt.jsx)("div",{className:"flex items-center justify-center",children:(0,mt.jsx)("svg",{width:"24",className:"size-16 text-muted-foreground",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,mt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.54545 17.4601C6.54545 20.4686 8.9945 22.9201 12 22.9201C15.0055 22.9201 17.4545 20.4686 17.4545 17.4601C17.4545 16.6302 17.2691 15.8275 16.9145 15.0959L18.7745 11.9947C21.6764 11.8745 24 9.54858 24 6.54008C24 3.53157 21.551 1.08008 18.5455 1.08008C15.54 1.08008 13.0909 3.53157 13.0909 6.54008C13.0909 7.37 13.2764 8.17266 13.631 8.90421L12 11.6234L10.369 8.90421C10.7236 8.17808 10.9091 7.37 10.9091 6.54008C10.9091 3.53157 8.46004 1.08008 5.45455 1.08008C2.44909 1.08008 0 3.6081 0 6.54008C0 9.47205 2.32364 11.8745 5.22545 11.9947L7.0855 15.0959C6.73091 15.8221 6.54545 16.6302 6.54545 17.4601ZM15.2727 6.54008C15.2727 4.73277 16.74 3.26408 18.5455 3.26408C20.351 3.26408 21.8182 4.73277 21.8182 6.54008C21.8182 8.34738 20.351 9.81608 18.5455 9.81608C18.2236 9.81608 17.9127 9.76698 17.6182 9.67962L14.3291 15.1615C14.9127 15.7566 15.2727 16.5646 15.2727 17.4601C15.2727 19.2674 13.8055 20.7361 12 20.7361C10.1945 20.7361 8.72727 19.2674 8.72727 17.4601C8.72727 16.5646 9.08727 15.7511 9.67087 15.1615L6.38182 9.67962C6.08727 9.76698 5.77641 9.81608 5.45455 9.81608C3.64905 9.81608 2.18182 8.34738 2.18182 6.54008C2.18182 4.73277 3.64905 3.26408 5.45455 3.26408C7.26004 3.26408 8.72727 4.73277 8.72727 6.54008C8.72727 7.43552 8.36727 8.24901 7.78368 8.83869L11.0727 14.3205C11.3673 14.2332 11.6781 14.1841 12 14.1841C12.3219 14.1841 12.6327 14.2332 12.9273 14.3205L16.2163 8.83869C15.6327 8.2436 15.2727 7.43552 15.2727 6.54008Z",fill:"currentColor"})})})})}),(0,mt.jsx)(II,{containerRef:m,fromRef:h,delay:.5,toRef:f}),(0,mt.jsx)(II,{containerRef:m,fromRef:y,delay:1,reverse:!0,toRef:f}),(0,mt.jsx)(II,{containerRef:m,fromRef:w,delay:1.5,toRef:f}),(0,mt.jsx)(II,{containerRef:m,delay:2,reverse:!0,fromRef:b,toRef:f})]})})]})]})};var Wpe=k(U(),1),Jpe=k(N(),1),OXe=wa("mx-1 rounded-sm px-1.5 py-1 pt-1.5 text-xs font-normal",{variants:{color:{pink:"text-pink-500",blue:"text-blue-500",green:"text-green-500",yellow:"text-yellow-500",red:"text-red-500",purple:"text-purple-500"},variant:{unstyled:"",mono:"font-courier text-muted-foreground dark:bg-neutral-700/50 bg-neutral-700/5 border-none",monoGhost:"font-courier text-muted-foreground bg-transparent",default:"border-[1px] font-mono border-muted bg-white dark:bg-black"}},defaultVariants:{color:"pink",variant:"default"}}),wg=(0,Wpe.forwardRef)(({children:e,className:t,variant:n,color:r,...a},o)=>(0,Jpe.jsx)("span",{ref:o,className:G(OXe({color:r,variant:n,className:t})),...a,children:e}));wg.displayName="InlineCode";var Vpe=k(U(),1);var Zpe=k(N(),1),$Xe="w-6 h-6 rounded-full animate-spin",op=Vpe.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,Zpe.jsx)(Ak,{ref:t,className:G($Xe,n),...r})});op.displayName="LoadingSpinner";var Ns=k(N(),1),Xpe=()=>{let e=Zt(),t=X(i=>i.updateDashboard),n=X(i=>i.updateErrorCause),r=X(i=>i.stamp),[a,o]=(0,CS.useState)(!1);return(0,CS.useEffect)(()=>{vC({navigate:e,updateDashboard:t,updateErrorCause:n,stamp:r})},[r,e,t,n]),a?(0,Ns.jsx)("section",{className:"flex h-full w-full grow items-center justify-center",children:(0,Ns.jsx)(op,{})}):(0,Ns.jsxs)("section",{className:"flex h-full w-full flex-col rounded-lg border-[1px]",children:[(0,Ns.jsx)("div",{className:"h-1/5 rounded-t-lg border-b-[1px] border-border",children:(0,Ns.jsxs)("div",{className:"mx-auto flex h-full max-w-8xl flex-col justify-end gap-2 px-16 py-8",children:[(0,Ns.jsx)("h4",{className:"text-2xl font-medium",children:"Create a new Project"}),(0,Ns.jsxs)("p",{className:"text-pretty text-sm text-muted-foreground",children:["A Project is a scaffolded through the"," ",(0,Ns.jsx)(wg,{children:"vlt init"})," command, and creates a folder that contains a"," ",(0,Ns.jsx)(wg,{children:"package.json"})," file."]})]})}),(0,Ns.jsxs)("div",{className:"relative mx-auto flex h-full w-full max-w-8xl items-center justify-center px-16 py-8",children:[(0,Ns.jsx)("div",{className:"absolute inset-0 z-[1] bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:32px_32px] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#fff_70%,transparent_100%)] dark:[mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_60%,transparent_100%)]"}),(0,Ns.jsx)(Kpe,{inProgress:a,setInProgress:o})]})]})};var Pge=k(U(),1);var Mge=k(U(),1);var _I=k(U(),1);function Eg(e,t){return typeof e=="function"?e(t):e}function mA(e,t){return n=>{t.setState(r=>({...r,[e]:Eg(n,r[e])}))}}function vS(e){return e instanceof Function}function GXe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function HXe(e,t){let n=[],r=a=>{a.forEach(o=>{n.push(o);let i=t(o);i!=null&&i.length&&r(i)})};return r(e),n}function ft(e,t,n){let r=[],a;return o=>{let i;n.key&&n.debug&&(i=Date.now());let s=e(o);if(!(s.length!==r.length||s.some((u,l)=>r[l]!==u)))return a;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),a=t(...s),n==null||n.onChange==null||n.onChange(a),n.key&&n.debug&&n!=null&&n.debug()){let u=Math.round((Date.now()-i)*100)/100,l=Math.round((Date.now()-c)*100)/100,d=l/16,p=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c\u23F1 ${p(l,5)} /${p(u,5)} ms`,`
|
|
69
69
|
font-size: .6rem;
|