PageSourceSearch

https://kvio.ai/assets/dashboard-header-zlawtkKx.js

js kvio.ai collected 2026-10-05 13:33:54 UTC 65,227 bytes, 1 lines download raw bytes

1import{c as me,g as q,cF as jn,cG as On,cH as Be,cI as vt,cJ as Vt,r,br as de,cK as Tt,cL as Ln,b3 as W,cM as Et,cN as at,cO as Pt,cP as it,cQ as De,cR as Ee,cl as we,b4 as Ce,cS as pt,cT as gt,cU as Fn,cV as ct,cW as An,cX as Dn,cY as tt,cZ as Ke,c_ as $e,c$ as zn,d0 as qe,d1 as Bn,d2 as Qe,d3 as Hn,d4 as Un,d5 as Wt,d6 as Oe,d7 as Kn,bi as ge,j as o,l as J,bw as qt,d8 as $n,b8 as Fe,aM as Te,d9 as Gn,da as yt,ci as Yt,ce as Xt,bt as _t,bd as Ge,cb as Vn,db as Qt,bq as Ct,bs as Wn,dc as qn,dd as Yn,bu as Xn,ck as Qn,bv as Zn,de as Jn,df as ht,dg as eo,dh as to,di as no,bk as oo,bm as ro,bn as so,bo as ao,aT as Ze,dj as io,dk as co,bp as lo,dl as He,aN as uo,aP as fo,aQ as mo,b7 as ze,dm as Zt,aV as po,aW as Z,a_ as go,b0 as ho,dn as Nt,bl as Jt,dp as xo,b1 as bo,b2 as vo,aX as jt,aY as yo,aZ as _o,dq as Co,b5 as Ro,b6 as Mo,ca as Io,cs as xt,dr as ko,b9 as So,ba as wo,a$ as To,ds as Eo,dt as en,du as Po,dv as No,dw as jo,aR as Ot,dx as Oo,dy as Lo,dz as Fo,bc as Ao,be as Do,dA as zo,bf as tn,bg as nn,dB as on,bh as Bo,dC as Lt,dD as Ft,dE as Ho,dF as Uo,bj as Ko,dG as Je,dH as Ae,bx as $o,dI as Go,dJ as Vo,dK as Wo,dL as qo,a1 as Rt,dM as Yo,dN as Xo,aa as ue,a0 as je,dO as Qo,dP as Zo,dQ as Jo,a9 as er,dR as tr,dS as nr,dT as or,dU as rr,dV as sr,dW as ar,dX as ir,dY as cr,_ as Mt,bF as lr,dZ as ur,d_ as dr,af as fr,d$ as rn,e0 as mr,B as sn,X as pr,ac as an,ae as cn,as as ln,bE as gr,P as bt,S as hr,e1 as xr,e2 as br}from"./main-BsQhsZ_c.js";import{I as vr}from"./IconArrowLeft-Xa73GHTq.js";const yr=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],_r=me("outline","check","Check",yr);const Cr=[["path",{d:"M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]],At=me("outline","credit-card","CreditCard",Cr);const Rr=[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]],Dt=me("outline","device-desktop","DeviceDesktop",Rr);const Mr=[["path",{d:"M4 14v-3a8 8 0 1 1 16 0v3",key:"svg-0"}],["path",{d:"M18 19c0 1.657 -2.686 3 -6 3",key:"svg-1"}],["path",{d:"M4 14a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2v-3",key:"svg-2"}],["path",{d:"M15 14a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v3a2 2 0 0 1 -2 2h-1a2 2 0 0 1 -2 -2v-3",key:"svg-3"}]],zt=me("outline","headset","Headset",Mr);const Ir=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],un=me("outline","language","Language",Ir);const kr=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],Sr=me("outline","list-check","ListCheck",kr);const wr=[["path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M21 12h-13l3 -3",key:"svg-1"}],["path",{d:"M11 15l-3 -3",key:"svg-2"}]],Tr=me("outline","login","Login",wr);const Er=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],Pr=me("outline","logout","Logout",Er);const Nr=[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]],jr=me("outline","mail","Mail",Nr);const Or=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],Bt=me("outline","moon","Moon",Or);const Lr=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],Ht=me("outline","sun","Sun",Lr);const Fr=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],Ar=me("outline","user","User",Fr);const Dr=[["path",{d:"M14.983 3l.123 .006c2.014 .214 3.527 .672 4.966 1.673a1 1 0 0 1 .371 .488c1.876 5.315 2.373 9.987 1.451 12.28c-1.003 2.005 -2.606 3.553 -4.394 3.553c-.732 0 -1.693 -.968 -2.328 -2.045a21.512 21.512 0 0 0 2.103 -.493a1 1 0 1 0 -.55 -1.924c-3.32 .95 -6.13 .95 -9.45 0a1 1 0 0 0 -.55 1.924c.717 .204 1.416 .37 2.103 .494c-.635 1.075 -1.596 2.044 -2.328 2.044c-1.788 0 
1-3.391 -1.548 -4.428 -3.629c-.888 -2.217 -.39 -6.89 1.485 -12.204a1 1 0 0 1 .371 -.488c1.439 -1.001 2.952 -1.459 4.966 -1.673a1 1 0 0 1 .935 .435l.063 .107l.651 1.285l.137 -.016a12.97 12.97 0 0 1 2.643 0l.134 .016l.65 -1.284a1 1 0 0 1 .754 -.54l.122 -.009zm-5.983 7a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15zm6 0a2 2 0 0 0 -1.977 1.697l-.018 .154l-.005 .149l.005 .15a2 2 0 1 0 1.995 -2.15z",key:"svg-0"}]],zr=me("filled","brand-discord-filled","BrandDiscordFilled",Dr);const Br=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],Hr=me("filled","brand-x-filled","BrandXFilled",Br),Ur=()=>"Follow us on X",Kr=()=>"Suivez-nous sur X",$r=()=>"Folgen Sie uns auf X",Gr=((e={},n={})=>{const t=n.locale??q();return t==="en"?Ur():t==="fr"?Kr():$r()}),Vr=()=>"Get started",Wr=()=>"Commencer",qr=()=>"Jetzt loslegen",Yr=((e={},n={})=>{const t=n.locale??q();return t==="en"?Vr():t==="fr"?Wr():qr()}),Xr=()=>"Guest",Qr=()=>"Invité",Zr=()=>"Gast",dn=((e={},n={})=>{const t=n.locale??q();return t==="en"?Xr():t==="fr"?Qr():Zr()}),Jr=()=>"Log in",es=()=>"Se connecter",ts=()=>"Anmelden",ns=((e={},n={})=>{const t=n.locale??q();return t==="en"?Jr():t==="fr"?es():ts()}),os=()=>"Log out",rs=()=>"Se déconnecter",ss=()=>"Abmelden",as=((e={},n={})=>{const t=n.locale??q();return t==="en"?os():t==="fr"?rs():ss()}),is=()=>"Log out failed",cs=()=>"Échec de la déconnexion",ls=()=>"Abmeldung fehlgeschlagen",us=((e={},n={})=>{const t=n.locale??q();return t==="en"?is():t==="fr"?cs():ls()}),ds=()=>"Not signed in",fs=()=>"Non connecté",ms=()=>"Nicht angemeldet",ps=((e={},n={})=>{const t=n.locale??q();return t==="en"?ds():t==="fr"?fs():ms()}),gs=()=>"Sign In",hs=()=>"Se connecter",xs=()=>"Anmelden",bs=((e={},n={})=>{const t=n.locale??q();return t==="en"?gs():t==="fr"?hs():xs()}),vs=()=>"Back",ys=()=>"Retour",_s=()=>"Zurück",Cs=((e={},n={})=>{const t=n.locale??q();return t==="en"?vs():t==="fr"?ys():_s()}),Rs=()=>"Breadcrumb",Ms=()=>"Fil d'Ariane",Is=()=>"Breadcrumb-Navigation",ks=((e={},n={})=>{const t=n.locale??q();return t==="en"?Rs():t==="fr"?Ms():Is()}),Ss=()=>"Dark",ws=()=>"Sombre",Ts=()=>"Dunkel",Es=((e={},n={})=>{const t=n.locale??q();return t==="en"?Ss():t==="fr"?ws():Ts()}),Ps=()=>"Light",Ns=()=>"Lumière",js=()=>"Hell",Os=((e={},n={})=>{const t=n.locale??q();return t==="en"?Ps():t==="fr"?Ns():js()}),Ls=()=>"System",Fs=()=>"Système",As=()=>"System",Ds=((e={},n={})=>{const t=n.locale??q();return t==="en"?Ls():t==="fr"?Fs():As()}),zs=()=>"Theme",Bs=()=>"Thème",Hs=()=>"Thema",Us=((e={},n={})=>{const t=n.locale??q();return t==="en"?zs():t==="fr"?Bs():Hs()}),Ks=()=>"language",$s=()=>"langue",Gs=()=>"Sprache",fn=((e={},n={})=>{const t=n.locale??q();return t==="en"?Ks():t==="fr"?$s():Gs()}),Vs=()=>"User menu",Ws=()=>"Menu utilisateur",qs=()=>"Benutzermenü",Ys=((e={},n={})=>{const t=n.locale??q();return t==="en"?Vs():t==="fr"?Ws():qs()}),Xs=()=>"Billing",Qs=()=>"Facturation",Zs=()=>"Abrechnung",Js=((e={},n={})=>{const t=n.locale??q();return t==="en"?Xs():t==="fr"?Qs():Zs()}),ea=()=>"Contact",ta=()=>"Contacter",na=()=>"Kontakt",lt=((e={},n={})=>{const t=n.locale??q();return t==="en"?ea():t==="fr"?ta():na()}),oa=()=>"Pricing",ra=()=>"Tarifs",sa=()=>"Preise",aa=((e={},n={})=>{const t=n.locale??q();return t==="en"?oa():t==="fr"?ra():sa()}),ia=()=>"Failed to load credit balance",ca=()=>"Échec du chargement du solde créditeur",la=()=>"Credits konnten nicht geladen werden",ua=((e={},n={})=>{const t=n.locale??q();return t==="en"?ia():t==="fr"?ca():la()}),da=()=>"Credits",fa=()=>"Crédits",ma=()=>"Credits",pa=((e={},n={})=>{const t=n.locale??q();return t==="en"?da():t==="fr"?fa():ma()}),ga="Escape";function nt(e,n,t){switch(e){case"vertical":return n;case"horizontal":return t;default:return n||t}}function Ye(e,n){return nt(n,e===Wt||e===tt,e===Ke||e===$e)}function ut(e,n,t){return nt(n,e===tt,t?e===Ke:e===$e)||e==="Enter"||e===" "||e===""}function ha(e,n,t){return nt(n,t?e===Ke:e===$e,e===tt)}function xa(e,n,t,s){const c=t?e===$e:e===Ke,l=e===Wt;return n==="both"||n==="horizontal"&&s&&s>1?e===ga:nt(n,c,l)}function ba(e,n){const{listRef:t,activeIndex:s,onNavigate:c=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:f=!1,loopFocus:i=!1,nested:g=!1,rtl:x=!1,virtual:d=!1,focusItemOnOpen:h="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:C=!0,disabledIndices:k=void 0,orientation:p="vertical",parentOrientation:v,cols:I=1,id:m,resetOnPointerLeave:N=!0,externalTree:j}
1=n,a="rootStore"in e?e.rootStore:e,w=a.useState("open"),P=a.useState("floatingElement"),B=a.useState("domReferenceElement"),F=a.context.dataRef,A=jn(P),E=On(B),L=Be(A),H=vt(),z=Vt(j),b=r.useRef(h),R=r.useRef(u??-1),O=r.useRef(null),G=r.useRef(!0),D=de(M=>{c(R.current===-1?null:R.current,M)}),he=r.useRef(D),ne=r.useRef(!!P),ie=r.useRef(w),Y=r.useRef(!1),ce=r.useRef(!1),xe=r.useRef(null),X=Be(k),re=Be(w),ee=Be(u),pe=Be(N),be=Tt(),se=Tt(),ae=de(()=>{function M(_){d?z?.events.emit("virtualfocus",_):xe.current=Ln(_,{sync:Y.current,preventScroll:!0})}const T=t.current[R.current],te=ce.current;T&&M(T),(Y.current?_=>_():_=>be.request(_))(()=>{const _=t.current[R.current]||T;if(!_)return;T||M(_),V&&(te||!G.current)&&_.scrollIntoView?.({block:"nearest",inline:"nearest"})})});W(()=>{F.current.orientation=p},[F,p]),W(()=>{l&&(w&&P?(R.current=u??-1,b.current&&u!=null&&(ce.current=!0,D())):ne.current&&(R.current=-1,he.current()))},[l,w,P,u,D]),W(()=>{if(l){if(!w){Y.current=!1;return}if(P)if(s==null){if(Y.current=!1,ee.current!=null)return;if(ne.current&&(R.current=-1,ae()),(!ie.current||!ne.current)&&b.current&&(O.current!=null||b.current===!0&&O.current==null)){let M=0;const T=()=>{t.current[0]==null?(M<2&&(M?S=>se.request(S):queueMicrotask)(T),M+=1):(R.current=O.current==null||ut(O.current,p,x)||g?at(t):Pt(t),O.current=null,D())};T()}}else Et(t.current,s)||(R.current=s,ae(),ce.current=!1)}},[l,w,P,s,ee,g,t,p,x,D,ae,se]),W(()=>{if(!l||P||!z||d||!ne.current)return;const M=z.nodesRef.current,T=M.find(_=>_.id===H)?.context?.elements.floating,te=it(De(P)),S=M.some(_=>_.context&&Ee(_.context.elements.floating,te));T&&!S&&G.current&&T.focus({preventScroll:!0})},[l,P,z,H,d]),W(()=>{he.current=D,ie.current=w,ne.current=!!P}),W(()=>{w||(O.current=null,b.current=h)},[w,h]);const Me=s!=null,ve=de(M=>{if(!re.current)return;const T=t.current.indexOf(M.currentTarget);T!==-1&&(R.current!==T||s!==T)&&(R.current=T,D(M))}),le=de(()=>v??z?.nodesRef.current.find(M=>M.id===H)?.context?.dataRef?.current.orientation),Ie=de(()=>at(t,X.current)),ye=de(M=>{if(G.current=!1,Y.current=!0,M.which===229||!re.current&&M.currentTarget===L.current)return;if(g&&xa(M.key,p,x,I)){Ye(M.key,le())||we(M),a.setOpen(!1,Ce(pt,M.nativeEvent)),gt(B)&&(d?z?.events.emit("virtualfocus",B):B.focus());return}const T=R.current,te=at(t,k),S=Pt(t,k);if(E||(M.key==="Home"&&(we(M),R.current=te,D(M)),M.key==="End"&&(we(M),R.current=S,D(M))),I>1){const _=Array.from({length:t.current.length},()=>({width:1,height:1})),$=Fn(_,I,!1),Q=$.findIndex(_e=>_e!=null&&!ct(t.current,_e,k)),ke=$.reduce((_e,Se,We)=>Se!=null&&!ct(t.current,Se,k)?We:_e,-1),Pe=$[An($.map(_e=>_e!=null?t.current[_e]:null),{event:M,orientation:p,loopFocus:i,rtl:x,cols:I,disabledIndices:zn([...(typeof k!="function"?k:null)||t.current.map((_e,Se)=>ct(t.current,Se,k)?Se:void 0),void 0],$),minIndex:Q,maxIndex:ke,prevIndex:Dn(R.current>S?te:R.current,_,$,I,M.key===tt?"bl":M.key===(x?Ke:$e)?"tr":"tl"),stopEvent:!0})];if(Pe!=null&&(R.current=Pe,D(M)),p==="both")return}if(Ye(M.key,p)){if(we(M),w&&!d&&it(M.currentTarget.ownerDocument)===M.currentTarget){R.current=ut(M.key,p,x)?te:S,D(M);return}ut(M.key,p,x)?i?T>=S?f&&T!==t.current.length?R.current=-1:(Y.current=!1,R.current=te):R.current=qe(t.current,{startingIndex:T,disabledIndices:k}):R.current=Math.min(S,qe(t.current,{startingIndex:T,disabledIndices:k})):i?T<=te?f&&T!==-1?R.current=t.current.length:(Y.current=!1,R.current=S):R.current=qe(t.current,{startingIndex:T,decrement:!0,disabledIndices:k}):R.current=Math.max(te,qe(t.current,{startingIndex:T,decrement:!0,disabledIndices:k})),Et(t.current,R.current)&&(R.current=-1),D(M)}}),V=r.useMemo(()=>({onFocus(T){Y.current=!0,ve(T)},onClick:({currentTarget:T})=>T.focus({preventScroll:!0}),onMouseMove(T){Y.current=!0,ce.current=!1,y&&ve(T)},onPointerLeave(T){if(!re.current||!G.current||T.pointerType==="touch")return;Y.current=!0;const te=T.relatedTarget;if(!(!y||t.current.includes(te))&&pe.current&&(xe.current?.(),xe.current=null,R.current=-1,D(T),!d)){const S=L.current,_=it(De(S));S&&Ee(S,_)&&S.focus({preventScroll:!0})}}}),[ve,re,L,y,t,D,pe,d]),U=r.useMemo(()=>d&&w&&Me&&{"aria-activedescendant":`${m}-${s}`},[d,w,Me,m,s]),K=r.useMemo(()=>({"aria-orientation":p==="both"?void 0:p,...E?{}:U,onKeyDown(M){if(M.key==="Tab"&&M.shiftKey&&w&&!d){const T=Bn(M.nativeEvent);if(T&&!Ee(L.current,T))return;we(M),a.setOpen(!1,Ce(Qe,M.nativeEvent)),gt(B)&&B.focus();return}ye(M)},onPointerMove(){G.current=!0}}),[U,ye,L,p,E,a,w,d,B]),fe=r.useMemo(()=>{function M(S){a.setOpen(!0,Ce(pt,S.nativeEvent,S.currentTarget))}function T(S){h==="auto"&&Hn(S.nativeEvent)&&(b.current=!d)}function te(S){b.current=h,h==="auto"&&Un(S.nativeEvent)&&(b.current=!0)}return{onKeyDown(S){const _=a.select("open");G.current=!1;
1const $=S.key.startsWith("Arrow"),Q=ha(S.key,le(),x),ke=Ye(S.key,p),Pe=(g?Q:ke)||S.key==="Enter"||S.key.trim()==="";if(d&&_)return ye(S);if(!(!_&&!C&&$)){if(Pe){const _e=Ye(S.key,le());O.current=g&&_e?null:S.key}if(g){Q&&(we(S),_?(R.current=Ie(),D(S)):M(S));return}ke&&(ee.current!=null&&(R.current=ee.current),we(S),!_&&C?M(S):ye(S),_&&D(S))}},onFocus(S){a.select("open")&&!d&&(R.current=-1,D(S))},onPointerDown:te,onPointerEnter:te,onMouseDown:T,onClick:T}},[ye,h,Ie,g,D,a,C,p,le,x,ee,d]),Ve=r.useMemo(()=>({...U,...fe}),[U,fe]);return r.useMemo(()=>l?{reference:Ve,floating:K,item:V,trigger:fe}:{},[l,Ve,K,fe,V])}function va(e,n){const{listRef:t,elementsRef:s,activeIndex:c,onMatch:l,onTyping:u,enabled:f=!0,resetMs:i=750,selectedIndex:g=null}=n,x="rootStore"in e?e.rootStore:e,d=x.useState("open"),h=Oe(),y=r.useRef(""),C=r.useRef(g??c??-1),k=r.useRef(null),p=de(m=>{function N(E){const L=s?.current[E];return!L||Kn(L)}function j(E,L,H=0){if(E.length===0)return-1;const z=(H%E.length+E.length)%E.length,b=L.toLocaleLowerCase();for(let R=0;R<E.length;R+=1){const O=(z+R)%E.length;if(!(!E[O]?.toLocaleLowerCase().startsWith(b)||!N(O)))return O}return-1}const a=t.current;if(y.current.length>0&&m.key===" "&&(we(m),u?.(!0)),y.current.length>0&&y.current[0]!==" "&&j(a,y.current)===-1&&m.key!==" "&&u?.(!1),a==null||m.key.length!==1||m.ctrlKey||m.metaKey||m.altKey)return;d&&m.key!==" "&&(we(m),u?.(!0));const w=y.current==="";w&&(C.current=g??c??-1),a.every(E=>E?E[0]?.toLocaleLowerCase()!==E[1]?.toLocaleLowerCase():!0)&&y.current===m.key&&(y.current="",C.current=k.current),y.current+=m.ke
1y,h.start(i,()=>{y.current="",C.current=k.current,u?.(!1)});const F=((w?g??c??-1:C.current)??0)+1,A=j(a,y.current,F);A!==-1?(l?.(A),k.current=A):m.key!==" "&&(y.current="",u?.(!1))}),v=de(m=>{const N=m.relatedTarget,j=x.select("domReferenceElement"),a=x.select("floatingElement");Ee(j,N)||Ee(a,N)||(h.clear(),y.current="",C.current=k.current,u?.(!1))});W(()=>{!d&&g!==null||(h.clear(),k.current=null,y.current!==""&&(y.current=""))},[d,g,h]),W(()=>{d&&y.current===""&&(C.current=g??c??-1)},[d,g,c]);const I=r.useMemo(()=>({onKeyDown:p,onBlur:v}),[p,v]);return r.useMemo(()=>f?{reference:I,floating:I}:{},[f,I])}const ya=r.forwardRef(function(n,t){const{className:s,render:c,orientation:l="horizontal",style:u,...f}=n;return ge("div",n,{state:{orientation:l},ref:t,props:[{role:"separator","aria-orientation":l},f]})});function _a({className:e,...n}){return o.jsx("nav",{"aria-label":ks(),"data-slot":"breadcrumb",className:J(e),...n})}function Ca({className:e,...n}){return o.jsx("ol",{"data-slot":"breadcrumb-list",className:J("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",e),...n})}function Ra({className:e,...n}){return o.jsx("li",{"data-slot":"breadcrumb-item",className:J("inline-flex items-center gap-1",e),...n})}function Ma({className:e,render:n,...t}){return $n({defaultTagName:"a",props:Fe({className:J("transition-colors hover:text-foreground",e)},t),render:n,state:{slot:"breadcrumb-link"}})}function Ia({className:e,...n}){return o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:J("font-normal text-foreground",e),...n})}function ka({children:e,className:n,...t}){return o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:J("[&>svg]:size-3.5",n),...t,children:e??o.jsx(qt,{})})}const mn=r.createContext(void 0);function ot(e){const n=r.useContext(mn);if(n===void 0&&!e)throw new Error(Te(33));return n}const pn=r.createContext(void 0);function Re(e){const n=r.useContext(pn);if(n===void 0&&!e)throw new Error(Te(36));return n}const Sa=r.createContext(void 0);function rt(e=!0){const n=r.useContext(Sa);if(n===void 0&&!e)throw new Error(Te(25));return n}const gn=r.createContext(void 0);function wa(){const e=r.useContext(gn);if(e===void 0)throw new Error(Te(30));return e}function Ta(e){const{closeOnClick:n,highlighted:t,id:s,nodeId:c,store:l,typingRef:u,itemRef:f,itemMetadata:i}=e,{events:g}=l.useState("floatingTreeRoot"),x=rt(!0),d=x!==void 0;return r.useMemo(()=>({id:s,role:"menuitem",tabIndex:t?0:-1,onKeyDown(h){h.key===" "&&u?.current&&h.preventDefault()},onMouseMove(h){c&&g.emit("itemhover",{nodeId:c,target:h.currentTarget})},onClick(h){n&&g.emit("close",{domEvent:h,reason:yt})},onMouseUp(h){if(x){const y=x.initialCursorPointRef.current;if(x.initialCursorPointRef.current=null,d&&y&&Math.abs(h.clientX-y.x)<=1&&Math.abs(h.clientY-y.y)<=1||d&&!Gn&&h.button===2)return}f.current&&l.context.allowMouseUpTriggerRef.current&&(!d||h.button===2)&&(!i||i.type==="regular-item")&&f.current.click()}}),[n,t,s,g,c,l,u,f,x,d,i])}const hn={type:"regular-item"};function It(e){const{closeOnClick:n,disabled:t=!1,highlighted:s,id:c,store:l,typingRef:u=l.context.typingRef,nativeButton:f,itemMetadata:i,nodeId:g}=e,x=r.useRef(null),{getButtonProps:d,buttonRef:h}=Yt({disabled:t,focusableWhenDisabled:!0,native:f,composite:!0}),y=Ta({closeOnClick:n,highlighted:s,id:c,nodeId:g,store:l,typingRef:u,itemRef:x,itemMetadata:i}),C=r.useCallback(p=>Fe(y,{onMouseEnter(){i.type==="submenu-trigger"&&i.setActive()}},p,d),[y,d,i]),k=Xt(x,h);return r.useMemo(()=>({getItemProps:C,itemRef:k}),[C,k])}const xn=r.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Ea(){return r.useContext(xn)}let Pa=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function st(e={}){const{label:n,metadata:t,textRef:s,indexGuessBehavior:c,index:l}=e,{register:u,unregister:f,subscribeMapChange:i,elementsRef:g,labelsRef:x,nextIndexRef:d}=Ea(),h=r.useRef(-1),[y,C]=r.useState(l??(c===Pa.GuessFromOrder?()=>{if(h.current===-1){const v=d.current;d.current+=1,h.current=v}return h.current}:-1)),k=r.useRef(null),p=r.useCallback(v=>{if(k.current=v,y!==-1&&v!==null&&(g.current[y]=v,x)){const I=n!==void 0;x.current[y]=I?n:s?.current?.textContent??v.textContent}},[y,g,x,n,s]);return W(()=>{if(l!=null)return;const v=k.current;if(v)return u(v,t),()=>{f(v)}},[l,u,f,t]),W(()=>{if(l==null)return i(v=>{const I=k.current?v.get(k.current)?.index:null;I!=null&&C(I)})},[l,i,C]),r.useMemo(()=>({ref:p,index:y}),[y,p])}let Ut=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const bn={checked(e){return e?{[Ut.checked]:""}:{[Ut.unchecked]:""}},..._t},Na=r.forwardRef(function(n,t){const{render:s,className:c,id:l,label:u,nativeButton:f=!1,disabled:i=!1,closeOnClick:g=!1,checked:x,defaultChecked:d,onCheckedChange:h,style:y,...C}=n,k=st({label:u}),p=ot(!0),v=Ge(l),{store:I}=Re(),m=I.useState("isActive",k.index),N=I.useState("itemProps"),[j,a]=Vn({controlled:x,default:d??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:w,itemRef:P}=It({closeOnClick:g,disabled:i,highlighted:m,id:v,store:I,nativeButton:f,no
1deId:p?.context.nodeId,itemMetadata:hn}),B=r.useMemo(()=>({disabled:i,highlighted:m,checked:j}),[i,m,j]);function F(E){const L=Ce(yt,E.nativeEvent,void 0,{preventUnmountOnClose(){}});h?.(!j,L),!L.isCanceled&&a(H=>!H)}const A=ge("div",n,{state:B,stateAttributesMapping:bn,props:[N,{role:"menuitemcheckbox","aria-checked":j,onClick:F},C,w],ref:[P,t,k.ref]});return o.jsx(gn.Provider,{value:B,children:A})}),ja=r.forwardRef(function(n,t){const{render:s,className:c,style:l,keepMounted:u=!1,...f}=n,i=wa(),g=r.useRef(null),{transitionStatus:x,setMounted:d}=Qt(i.checked);Ct({open:i.checked,ref:g,onComplete(){i.checked||d(!1)}});const h={checked:i.checked,disabled:i.disabled,highlighted:i.highlighted,transitionStatus:x};return ge("span",n,{state:h,ref:[t,g],stateAttributesMapping:bn,props:{"aria-hidden":!0,...f},enabled:u||i.checked})}),vn=r.createContext(void 0);function Oa(){const e=r.useContext(vn);if(e===void 0)throw new Error(Te(31));return e}const La=r.forwardRef(function(n,t){const{render:s,className:c,style:l,...u}=n,[f,i]=r.useState(void 0),g=ge("div",n,{ref:t,props:{role:"group","aria-labelledby":f,...u}});return o.jsx(vn.Provider,{value:i,children:g})}),Fa=r.forwardRef(function(n,t){const{render:s,className:c,style:l,id:u,...f}=n,i=Ge(u),g=Oa();return W(()=>(g(i),()=>{g(void 0)}),[g,i]),ge("div",n,{ref:t,props:{id:i,role:"presentation",...f}})}),Aa=r.forwardRef(function(n,t){const{render:s,className:c,id:l,label:u,nativeButton:f=!1,disabled:i=!1,closeOnClick:g=!0,style:x,...d}=n,h=st({label:u}),y=ot(!0),C=Ge(l),{store:k}=Re(),p=k.useState("isActive",h.index),v=k.useState("itemProps"),{getItemProps:I,itemRef:m}=It({closeOnClick:g,disabled:i,highlighted:p,id:C,store:k,nativeButton:f,nodeId:y?.context.nodeId,itemMetadata:hn});return ge("div",n,{state:{disabled:i,highlighted:p},props:[v,d,I],ref:[m,t,h.ref]})}),Da=r.createContext(void 0);function za(e){return r.useContext(Da)}const Ba={...Xn,..._t},Ha=r.forwardRef(function(n,t){const{render:s,className:c,style:l,finalFocus:u,...f}=n,{store:i}=Re(),{side:g,align:x}=ot(),d=za()!=null,h=i.useState("open"),y=i.useState("transitionStatus"),C=i.useState("popupProps"),k=i.useState("mounted"),p=i.useState("instantType"),v=i.useState("activeTriggerElement"),I=i.useState("parent"),m=i.useState("lastOpenChangeReason"),N=i.useState("rootId"),j=i.useState("floatingRootContext"),a=i.useState("floatingTreeRoot"),w=i.useState("closeDelay"),P=i.useState("activeTriggerElement"),B=i.useState("hoverEnabled"),F=i.useState("disabled"),A=I.type==="context-menu";Ct({open:h,ref:i.context.popupRef,onComplete(){h&&i.context.onOpenChangeComplete?.(!0)}}),r.useEffect(()=>{function b(R){i.setOpen(!1,Ce(R.reason,R.domEvent))}return a.events.on("close",b),()=>{a.events.off("close",b)}},[a.events,i]),Wn(j,{enabled:B&&!F&&!A&&I.type!=="menubar",closeDelay:w});const E=r.useCallback(b=>{i.set("popupElement",b)},[i]),L={transitionStatus:y,side:g,align:x,open:h,nested:I.type==="menu",instant:p},H=ge("div",n,{state:L,ref:[t,i.context.popupRef,E],stateAttributesMapping:Ba,props:[C,{onKeyDown(b){d&&Qn.has(b.key)&&b.stopPropagation()}},Zn(y),f,{"data-rootownerid":N}]});let z=I.type===void 0||A;return(v||I.type==="menubar"&&m!==qn)&&(z=!0),o.jsx(Yn,{context:j,modal:A,disabled:!k,returnFocus:u===void 0?z:u,initialFocus:I.type!=="menu",restoreFocus:!0,externalTree:I.type!=="menubar"?a:void 0,previousFocusableElement:P,nextFocusableElement:I.type===void 0?i.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:I.type===void 0?i.context.beforeContentFocusGuardRef:void 0,children:H})}),yn=r.createContext(void 0);function Ua(){const e=r.useContext(yn);if(e===void 0)throw new Error(Te(32));return e}const Ka=r.forwardRef(function(n,t){const{keepMounted:s=!1,...c}=n,{store:l}=Re();return l.useState("mounted")||s?o.jsx(yn.Provider,{value:s,children:o.jsx(Jn,{ref:t,...c})}):null});function $a(e){const{children:n,elementsRef:t,labelsRef:s,onMapChange:c}=e,l=de(c),u=r.useRef(0),f=ht(Va).current,i=ht(Ga).current,[g,x]=r.useState(0),d=r.useRef(g),h=de((v,I)=>{i.set(v,I??null),d.current+=1,x(d.current)}),y=de(v=>{i.delete(v),d.current+=1,x(d.current)}),C=r.useMemo(()=>{const v=new Map;return Array.from(i.keys()).filter(m=>
1m.isConnected).sort(Wa).forEach((m,N)=>{const j=i.get(m)??{};v.set(m,{...j,index:N})}),v},[i,g]);W(()=>{if(typeof MutationObserver!="function"||C.size===0)return;const v=new MutationObserver(I=>{const m=new Set,N=j=>m.has(j)?m.delete(j):m.add(j);I.forEach(j=>{j.removedNodes.forEach(N),j.addedNodes.forEach(N)}),m.size===0&&(d.current+=1,x(d.current))});return C.forEach((I,m)=>{m.parentElement&&v.observe(m.parentElement,{childList:!0})}),()=>{v.disconnect()}},[C]),W(()=>{d.current===g&&(t.current.length!==C.size&&(t.current.length=C.size),s&&s.current.length!==C.size&&(s.current.length=C.size),u.current=C.size),l(C)},[l,C,t,s,g]),W(()=>()=>{t.current=[]},[t]),W(()=>()=>{s&&(s.current=[])},[s]);const k=de(v=>(f.add(v),()=>{f.delete(v)}));W(()=>{f.forEach(v=>v(C))},[f,C]);const p=r.useMemo(()=>({register:h,unregister:y,subscribeMapChange:k,elementsRef:t,labelsRef:s,nextIndexRef:u}),[h,y,k,t,s,u]);return o.jsx(xn.Provider,{value:p,children:n})}function Ga(){return new Map}function Va(){return new Set}function Wa(e,n){const t=e.compareDocumentPosition(n);return t&Node.DOCUMENT_POSITION_FOLLOWING||t&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:t&Node.DOCUMENT_POSITION_PRECEDING||t&Node.DOCUMENT_POSITION_CONTAINS?1:0}const qa=20;function Ya(e,n,t,s){const[c,l]=r.useState(!1);W(()=>{if(!e||!n||t==null){l(!1);return}const u=De(t).documentElement.clientWidth,f=t.offsetWidth;l(u>0&&f>0&&f>=u-qa)},[e,n,t]),eo(e&&(!n||c),s)}const Xa=r.forwardRef(function(n,t){const{anchor:s,positionMethod:c="absolute",className:l,render:u,side:f,align:i,sideOffset:g=0,alignOffset:x=0,collisionBoundary:d="clipping-ancestors",collisionPadding:h=5,arrowPadding:y=5,sticky:C=!1,disableAnchorTracking:k=!1,collisionAvoidance:p=to,style:v,...I}=n,{store:m}=Re(),N=Ua(),j=rt(!0),a=m.useState("parent"),w=m.useState("floatingRootContext"),P=m.useState("floatingTreeRoot"),B=m.useState("mounted"),F=m.useState("open"),A=m.useState("modal"),E=m.useState("openMethod"),L=m.useState("activeTriggerElement"),H=m.useState("transitionStatus"),z=m.useState("positionerElement"),b=m.useState("instantType"),R=m.useState("hasViewport"),O=m.useState("lastOpenChangeReason"),G=m.useState("floatingNodeId"),D=m.useState("floatingParentNodeId"),he=w.useState("domReferenceElement"),ne=r.useRef(null),ie=no(z,!1,!1);let Y=s,ce=g,xe=x,X=i,re=p;a.type==="context-menu"&&(Y=s??a.context?.anchor,X=X??"start",!f&&X!=="center"&&(xe=n.alignOffset??2,ce=n.sideOffset??-5));let ee=f,pe=X;a.type==="menu"?(ee=ee??"inline-end",pe=pe??"start",re=n.collisionAvoidance??oo):a.type==="menubar"&&(ee=ee??"bottom",pe=pe??"start");const be=a.type==="context-menu",se=ro({anchor:Y,floatingRootContext:w,positionMethod:j?"fixed":c,mounted:B,side:ee,sideOffset:ce,align:pe,alignOffset:xe,arrowPadding:be?0:y,collisionBoundary:d,collisionPadding:h,sticky:C,nodeId:G,keepMounted:N,disableAnchorTracking:k,collisionAvoidance:re,shiftCrossAxis:be&&!("side"in re&&re.side==="flip"),externalTree:P,adaptiveOrigin:R?so:void 0});r.useEffect(()=>{function U(K){K.open&&(K.parentNodeId===G&&m.set("hoverEnabled",!1),K.nodeId!==G&&K.parentNodeId===m.select("floatingParentNodeId")&&m.setOpen(!1,Ce(He)))}return P.events.on("menuopenchange",U),()=>{P.events.off("menuopenchange",U)}},[m,P.events,G]),r.useEffect(()=>{if(m.select("floatingParentNodeId")==null)return;function U(K){if(K.open||K.nodeId!==m.select("floatingParentNodeId"))return;const fe=K.reason??He;m.setOpen(!1,Ce(fe))}return P.events.on("menuopenchange",U),()=>{P.events.off("menuopenchange",U)}},[P.events,m]);const ae=Oe();r.useEffect(()=>{F||ae.clear()},[F,ae]),r.useEffect(()=>{function U(K){if(!(!F||K.nodeId!==m.select("floatingParentNodeId")))if(K.target&&L&&L!==K.target){const fe=m.select("closeDelay");fe>0?ae.isStarted()||ae.start(fe,()=>{m.setOpen(!1,Ce(He))}):m.setOpen(!1,Ce(He))}else ae.clear()}return P.events.on("itemhover",U),()=>{P.events.off("itemhover",U)}},[P.events,F,L,m,ae]),r.useEffect(()=>{const U={open:F,nodeId:G,parentNodeId:D,reason:m.select("lastOpenChangeReason")};P.events.emit("menuopenchange",U)},[P.events,F,m,G,D]),W(()=>{const U=he,K=ne.current;if(U&&(ne.current=U),K&&U&&U!==K){m.set("instantType",void 0);const fe=new AbortController;return ie(()=>{m.set("instantType","trigger-change")},fe.signal),()=>{fe.abort()}}},[he,ie,m]);const Me={open:F,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:a.type==="menu",instant:b},ve=a.type==="menubar"&&a.context.modal;Ya(F&&(ve||A&&O!==Ze),E==="touch",z,L);const Ie=ao(n,Me,{styles:se.positionerStyles,transitionStatus:H,props:I,refs:[t,m.useStateSetter("positionerElement")],hidden:!B,inert:!F}),ye=B&&a.type!=="menu"&&(a.type!=="menubar"&&A&&O!==Ze||a.type==="menubar"&&a.context.modal);let V=null;return a.type==="menubar"?V=a.context.contentElement:a.type===void 0&&(V=L),o.jsxs(mn.Provider,{value:se,children:[ye&&o.jsx(io,{ref:a.type==="context-menu"||a.type==="nested-context-menu"?a.context.
1internalBackdropRef:null,inert:co(!F),cutout:V}),o.jsx(lo,{id:G,children:o.jsx($a,{elementsRef:m.context.itemDomElements,labelsRef:m.context.itemLabels,children:Ie})})]})}),Qa=r.createContext(null);function _n(e){return r.useContext(Qa)}const Za={...mo,disabled:Z(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:Z(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),openMethod:Z(e=>e.openMethod),allowMouseEnter:Z(e=>e.allowMouseEnter),stickIfOpen:Z(e=>e.stickIfOpen),parent:Z(e=>e.parent),rootId:Z(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:Z(e=>e.activeIndex),isActive:Z((e,n)=>e.activeIndex===n),hoverEnabled:Z(e=>e.hoverEnabled),instantType:Z(e=>e.instantType),lastOpenChangeReason:Z(e=>e.openChangeReason),floatingTreeRoot:Z(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Z(e=>e.floatingNodeId),floatingParentNodeId:Z(e=>e.floatingParentNodeId),itemProps:Z(e=>e.itemProps),closeDelay:Z(e=>e.closeDelay),hasViewport:Z(e=>e.hasViewport),keyboardEventRelay:Z(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class kt extends uo{constructor(n){super({...Ja(),...n},{positionerRef:r.createRef(),popupRef:r.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),onOpenChangeComplete:void 0,triggerElements:new fo},Za),this.unsubscribeParentListener=this.observe("parent",t=>{if(this.unsubscribeParentListener?.(),t.type==="menu"){let s=t.store.select("rootId"),c=t.store.select("floatingTreeRoot"),l=t.store.select("keyboardEventRelay");this.unsubscribeParentListener=t.store.subscribe(()=>{const u=t.store.select("rootId"),f=t.store.select("floatingTreeRoot"),i=t.store.select("keyboardEventRelay");s===u&&c===f&&l===i||(s=u,c=f,l=i,this.notifyAll())}),this.context.allowMouseUpTriggerRef=t.store.context.allowMouseUpTriggerRef;return}t.type!==void 0&&(this.context.allowMouseUpTriggerRef=t.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:t})}static useStore(n,t){const s=ht(()=>new kt(t)).current;return n??s}unsubscribeParentListener=null}function Ja(){return{...po(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Zt,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:ze,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}const Cn=r.createContext(void 0);function Rn(){return r.useContext(Cn)}const Mn=go(function(n){const{children:t,open:s,onOpenChange:c,onOpenChangeComplete:l,defaultOpen:u=!1,disabled:f=!1,modal:i,loopFocus:g=!0,orientation:x="vertical",actionsRef:d,closeParentOnEsc:h=!1,handle:y,triggerId:C,defaultTriggerId:k=null,highlightItemOnHover:p=!0}=n,v=rt(!0),I=Re(!0),m=_n(!0),N=Rn(),j=r.useMemo(()=>N&&I?{type:"menu",store:I.store}:m?{type:"menubar",context:m}:v&&!I?{type:"context-menu",context:v}:{type:void 0},[v,I,m,N]),a=kt.useStore(y?.store,{open:u,openProp:s,activeTriggerId:k,triggerIdProp:C,parent:j});ho(()=>{s===void 0&&a.state.open===!1&&u===!0&&a.update({open:!0,activeTriggerId:k})}),a.useControlledProp("openProp",s),a.useControlledProp("triggerIdProp",C),a.useContextCallback("onOpenChangeComplete",l);const w=Nt(),P=Nt(),B=a.useState("floatingTreeRoot"),F=Jt(B),A=vt(),E=a.useState("open"),L=a.useState("activeTriggerElement"),H=a.useState("positionerElement"),z=a.useState("hoverEnabled"),b=a.useState("disabled"),R=a.useState("lastOpenChangeReason"),O=a.useState("parent"),G=a.useState("activeIndex"),D=a.useState("payload"),he=a.useState("floatingParentNodeId"),ne=r.useRef(null),ie=r.useRef(O.type!=="context-menu"),Y=Oe(),ce=r.useRef(!0),xe=Oe(),X=he!=null,{openMethod:re,triggerProps:ee}=xo(E);a.useSyncedValues({disabled:f,modal:O.type===void 0?i:void 0,openMethod:re,rootId:w}),bo(a);const{forceUnmount:pe}=vo(E,a,()=>{a.update({allowMouseEnter:!1,stickIfOpen:!0})});W(()=>{v&&!I?a.update({parent:{type:"context-menu",context:v},floatingNodeId:F,floatingParentNodeId:A}):I&&a.update({floatingNodeId:F,floatingParentNodeId:A})},[v,I,F,A,a]),r.useEffect(()=>{if(E||(ne.current=null),O.type==="context-menu"){if(!E){Y.clear(),ie.current=!1;return}Y.start(500,()=>{ie.current=!0})}},[Y,E,O.type]),W(()=>{!E&&!z&&a.set("hoverEnabled",!0)},[E,z,a]);const be=de((_,$)=>
1{const Q=$.reason;if(E===_&&$.trigger===L&&R===Q||($.preventUnmountOnClose=()=>{a.set("preventUnmountingOnClose",!0)},!_&&$.trigger==null&&($.trigger=L??void 0),c?.(_,$),$.isCanceled))return;a.state.floatingRootContext.dispatchOpenChange(_,$);const ke=$.event;if(_===!1&&ke?.type==="click"&&ke.pointerType==="touch"&&!ce.current)return;if(!_&&G!==null){const Nn=a.context.itemDomElements.current[G];queueMicrotask(()=>{Nn?.setAttribute("tabindex","-1")})}_&&Q===jt?(ce.current=!1,xe.start(300,()=>{ce.current=!0})):(ce.current=!0,xe.clear());const Pe=(Q===yo||Q===yt)&&ke.detail===0&&ke?.isTrusted,_e=!_&&(Q===_o||Q==null),Se={open:_,openChangeReason:Q};ne.current=$.event??null;const We=$.trigger?.id??null;(We||_)&&(Se.activeTriggerId=We,Se.activeTriggerElement=$.trigger??null),a.update(Se),O.type==="menubar"&&(Q===jt||Q===Qe||Q===Ze||Q===pt||Q===He)?a.set("instantType","group"):Pe||_e?a.set("instantType",Pe?"click":"dismiss"):a.set("instantType",void 0)}),se=Co({popupStore:a,floatingId:P,nested:A!=null,onOpenChange:be}),ae=se.context.events;r.useEffect(()=>{const _=({open:$,eventDetails:Q})=>be($,Q);return ae.on("setOpen",_),()=>{ae?.off("setOpen",_)}},[ae,be]);const Me=r.useCallback(()=>{a.setOpen(!1,Ce(Ro))},[a]);r.useImperativeHandle(d,()=>({unmount:pe,close:Me}),[pe,Me]);let ve;O.type==="context-menu"&&(ve=O.context),r.useImperativeHandle(ve?.positionerRef,()=>H,[H]),r.useImperativeHandle(ve?.actionsRef,()=>({setOpen:be}),[be]);const le=Mo(se,{enabled:!b,bubbles:{escapeKey:h&&O.type==="menu"},outsidePress(){return O.type!=="context-menu"||ne.current?.type==="contextmenu"?!0:ie.current},externalTree:X?B:void 0}),Ie=Io(),ye=r.useCallback(_=>{a.select("activeIndex")!==_&&a.set("activeIndex",_)},[a]),V=ba(se,{enabled:!b,listRef:a.context.itemDomElements,activeIndex:G,nested:O.type!==void 0,loopFocus:g,orientation:x,parentOrientation:O.type==="menubar"?O.context.orientation:void 0,rtl:Ie==="rtl",disabledIndices:xt,onNavigate:ye,openOnArrowKeyDown:O.type!=="context-menu",externalTree:X?B:void 0,focusItemOnHover:p}),U=r.useCallback(_=>{a.context.typingRef.current=_},[a]),K=va(se,{listRef:a.context.itemLabels,elementsRef:a.context.itemDomElements,activeIndex:G,resetMs:ko,onMatch:_=>{E&&_!==G&&a.set("activeIndex",_)},onTyping:U}),fe=r.useMemo(()=>{const _=Fe(K.reference,V.reference,le.reference,{onMouseMove(){a.set("allowMouseEnter",!0)}},ee);return _["aria-haspopup"]="menu",_["aria-expanded"]=E,_},[a,K.reference,V.reference,le.reference,ee,E]),Ve=r.useMemo(()=>{const _=Fe(V.trigger,le.trigger,ee);return _["aria-haspopup"]="menu",_["aria-expanded"]=!1,_},[V.trigger,le.trigger,ee]),M=r.useMemo(()=>Fe(So,{id:P,role:"menu","aria-labelledby":L?.id,onMouseMove(){a.set("allowMouseEnter",!0),O.type==="menu"&&a.set("hoverEnabled",!1)},onClick(){a.select("hoverEnabled")&&a.set("hoverEnabled",!1)},onKeyDown(_){const $=a.select("keyboardEventRelay");$&&!_.isPropagationStopped()&&$(_)}},K.floating,V.floating,le.floating),[L,P,O.type,a,K.floating,V.floating,le.floating]),T=V.item??ze;wo(a,{floatingRootContext:se,activeTriggerProps:fe,inactiveTriggerProps:Ve,popupProps:M,itemProps:T});const te=r.useMemo(()=>({store:a,parent:j}),[a,j]),S=o.jsx(pn.Provider,{value:te,children:typeof t=="function"?t({payload:D}):t});return O.type===void 0||O.type==="context-menu"?o.jsx(To,{externalTree:B,children:S}):S});function ei(e){const n=Re().store,t=r.useMemo(()=>({parentMenu:n}),[n]);return o.jsx(Cn.Provider,{value:t,children:o.jsx(Mn,{...e})})}function ti(e){const n=e.getBoundingClientRect(),t=Eo(e),s=t.getComputedStyle(e,"::before"),c=t.getComputedStyle(e,"::after");if(!(s.content!=="none"||c.content!=="none"))return n;const u=parseFloat(s.width)||0,f=parseFloat(s.height)||0,i=parseFloat(c.width)||0,g=parseFloat(c.height)||0,x=Math.max(n.width,u,i),d=Math.max(n.height,f,g),h=x-n.width,y=d-n.height;return{left:n.left-h/2,right:n.right+h/2,top:n.top-y/2,bottom:n.bottom+y/2}}function ni(e={}){const{highlightItemOnHover:n,highlightedIndex:t,onHighlightedIndexChange:s}=en(),{ref:c,index:l}=st(e),u=t===l,f=r.useRef(null),i=Xt(c,f);return{compositeProps:r.useMemo(()=>({tabIndex:u?0:-1,onFocus(){s(l)},onMouseMove(){const x=f.current;if(!n||!x)return;const d=x.hasAttribute("disabled")||x.ariaDisabled==="true";!u&&!d&&x.focus()}}),[u,s,l,n]),compositeRef:i,index:l}}function oi(e){const{render:n,className:t,style:s,state:c=ze,props:l=xt,refs:u=xt,metadata:f,stateAttributesMapping:i,tag:g="div",...x}=e,{compositeProps:d,compositeRef:h}=ni({metadata:f});return ge(g,e,{state:c,ref:[...u,h],props:[d,...l,x],stateAttributesMapping:i})}function In(e){if(gt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!Po(e))return In(No(e))}function ri(e,n){const t=r.useRef(null);function s(l){Ot.flushSync(()=>{e.setOpen(!1,Ce(Qe,l.nativeEvent,l.currentTarget))}),Fo(t.current)?.focus()}function c(l){const u=e.select("positionerElement");
1if(u&&jo(l,u))e.context.beforeContentFocusGuardRef.current?.focus();else{Ot.flushSync(()=>{e.setOpen(!1,Ce(Qe,l.nativeEvent,l.currentTarget))});let f=Oo(e.context.triggerFocusTargetRef.current||n.current);for(;f!==null&&Ee(u,f);){const i=f;if(f=Lo(f),f===i)break}f?.focus()}}return{preFocusGuardRef:t,handlePreFocusGuardFocus:s,handleFocusTargetFocus:c}}function si(e){const{enabled:n=!0,mouseDownAction:t,open:s}=e,c=r.useRef(!1);return r.useMemo(()=>n?{onMouseDown:l=>{(t==="open"&&!s||t==="close"&&s)&&(c.current=!0,De(l.currentTarget).addEventListener("click",()=>{c.current=!1},{once:!0}))},onClick:l=>{c.current&&(c.current=!1,l.preventBaseUIHandler())}}:ze,[n,t,s])}const Xe=2,ai=Ao(function(n,t){const{render:s,className:c,style:l,disabled:u=!1,nativeButton:f=!0,id:i,openOnHover:g,delay:x=100,closeDelay:d=0,handle:h,payload:y,...C}=n,k=Re(!0),p=h?.store??k?.store;if(!p)throw new Error(Te(85));const v=Ge(i),I=p.useState("isTriggerActive",v),m=p.useState("floatingRootContext"),N=p.useState("isOpenedByTrigger",v),j=p.useState("triggerPopupId",v),a=r.useRef(null),w=ci(),P=en(!0),B=Vt(),F=r.useMemo(()=>B??new Zt,[B]),A=Jt(F),E=vt(),{registerTrigger:L,isMountedByThisTrigger:H}=Do(v,a,p,{payload:y,closeDelay:d,parent:w,floatingTreeRoot:F,floatingNodeId:A,floatingParentNodeId:E,keyboardEventRelay:P?.relayKeyboardEvent}),z=w.type==="menubar",b=p.useState("disabled"),R=u||b||z&&w.context.disabled,{getButtonProps:O,buttonRef:G}=Yt({disabled:R,native:f});r.useEffect(()=>{!N&&w.type===void 0&&(p.context.allowMouseUpTriggerRef.current=!1)},[p,N,w.type]);const D=r.useRef(null),he=Oe(),ne=de(V=>{if(!D.current)return;he.clear(),p.context.allowMouseUpTriggerRef.current=!1;const U=V.target;if(Ee(D.current,U)||Ee(p.select("positionerElement"),U)||U===D.current||U!=null&&In(U)===p.select("rootId"))return;const K=ti(D.current);V.clientX>=K.left-Xe&&V.clientX<=K.right+Xe&&V.clientY>=K.top-Xe&&V.clientY<=K.bottom+Xe||F.events.emit("close",{domEvent:V,reason:zo})});r.useEffect(()=>{N&&p.select("lastOpenChangeReason")===Ze&&De(D.current).addEventListener("mouseup",ne,{once:!0})},[N,ne,p]);const ie=z&&w.context.hasSubmenuOpen,ce=tn(m,{enabled:(g??ie)&&!R&&w.type!=="context-menu"&&(!z||ie&&!H),handleClose:nn({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:w.type===void 0?x:void 0,delay:{close:d},triggerElementRef:a,externalTree:F,isActiveTrigger:I,isClosing:()=>p.select("transitionStatus")==="ending"}),xe=ii(N,p.select("lastOpenChangeReason")),X=on(m,{enabled:!R&&w.type!=="context-menu",event:N&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:w.type===void 0?xe:!1}),re=Bo(m,{enabled:!R&&ie}),ee=si({open:N,enabled:z,mouseDownAction:"open"}),pe=r.useMemo(()=>Fe(re.reference,X.reference),[re.reference,X.reference]),be=p.useState("triggerProps",H),{preFocusGuardRef:se,handlePreFocusGuardFocus:ae,handleFocusTargetFocus:Me}=ri(p,a),ve={disabled:R,open:N},le=[D,t,G,L,a],Ie=[pe,ce??ze,be,{"aria-haspopup":"menu","aria-controls":j,id:v,onMouseDown:V=>{if(p.select("open"))return;he.start(200,()=>{p.context.allowMouseUpTriggerRef.current=!0}),De(V.currentTarget).addEventListener("mouseup",ne,{once:!0})}},z?{role:"menuitem"}:{},ee,C,O],ye=ge("button",n,{enabled:!z,stateAttributesMapping:Lt,state:ve,ref:le,props:Ie});return z?o.jsx(oi,{tag:"button",render:s,className:c,style:l,state:ve,refs:le,props:Ie,stateAttributesMapping:Lt}):N?o.jsxs(r.Fragment,{children:[o.jsx(Ft,{ref:se,onFocus:ae},`${v}-pre-focus-guard`),o.jsx(r.Fragment,{children:ye},v),o.jsx(Ft,{ref:p.context.triggerFocusTargetRef,onFocus:Me},`${v}-post-focus-guard`)]}):o.jsx(r.Fragment,{children:ye},v)});function ii(e,n){const t=Oe(),[s,c]=r.useState(!1);return W(()=>{e&&n==="trigger-hover"?(c(!0),t.start(Ho,()=>{c(!1)})):e||(t.clear(),c(!1))},[e,n,t]),s}function ci(){const e=rt(!0),n=Re(!0),t=_n();return r.useMemo(()=>t?{type:"menubar",context:t}:e&&!n?{type:"context-menu",context:e}:{type:void 0},[e,n,t])}const li=r.forwardRef(function(n,t){const{render:s,className:c,style:l,label:u,id:f,nativeButton:i=!1,openOnHover:g=!0,delay:x=100,closeDelay:d=0,disabled:h=!1,...y}=n,C=st(),k=ot(),{store:p}=Re(),v=Ge(f),I=p.useState("open"),m=p.useState("floatingRootContext"),N=p.useState("floatingTreeRoot"),j=p.useState("triggerPopupId",v),a=Uo(v,p),w=r.useCallback(X=>{const re=a(X);return X!==null&&p.select("open")&&p.select("activeTriggerId")==null&&p.update({activeTriggerId:v,activeTriggerElement:X,closeDelay:d}),re},[a,d,p,v]),P=r.useRef(null),B=r.useCallback(X=>{P.current=X,p.set("activeTriggerElement",X)},[p]),F=Rn();if(!F?.parentMenu)throw new Error(Te(37));p.useSyncedValue("closeDelay",d);const A=F.parentMenu,E=A.useState("itemProps"),L=A.useState("isActive",C.index),H=r.useMemo(()=>({type:"submenu-trigger",setActive(){A.set("activeIndex",C.index)}}
1),[A,C.index]),z=p.useState("disabled"),b=h||z,{getItemProps:R,itemRef:O}=It({closeOnClick:!1,disabled:b,highlighted:L,id:v,store:p,typingRef:A.context.typingRef,nativeButton:i,itemMetadata:H,nodeId:k?.context.nodeId}),G=p.useState("hoverEnabled"),D=A.useState("allowMouseEnter"),he=tn(m,{enabled:G&&g&&!b,handleClose:nn({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:x,delay:D?{open:x,close:d}:0,triggerElementRef:P,externalTree:N,isClosing:()=>p.select("transitionStatus")==="ending"}),ie=on(m,{enabled:!b,event:"mousedown",toggle:!g,ignoreMouse:g,stickIfOpen:!1}).reference??ze,Y=p.useState("triggerProps",!0);return delete Y.id,ge("div",n,{state:{disabled:b,highlighted:L,open:I},stateAttributesMapping:Ko,props:[ie,he,Y,E,{"aria-controls":j,tabIndex:I||L?0:-1,onBlur(){L&&A.set("activeIndex",null)}},y,R],ref:[t,C.ref,O,w,B]})});function kn({...e}){return o.jsx(Mn,{"data-slot":"dropdown-menu",...e})}function Sn({className:e,...n}){return o.jsx(ai,{"data-slot":"dropdown-menu-trigger",className:J("cursor-pointer disabled:cursor-not-allowed data-disabled:cursor-not-allowed",e),...n})}function St({align:e="start",alignOffset:n=0,side:t="bottom",sideOffset:s=4,className:c,...l}){return o.jsx(Ka,{children:o.jsx(Xa,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:t,sideOffset:s,children:o.jsx(Ha,{"data-slot":"dropdown-menu-content",className:J("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",c),...l})})})}function Ne({...e}){return o.jsx(La,{"data-slot":"dropdown-menu-group",...e})}function ui({className:e,inset:n,...t}){return o.jsx(Fa,{"data-slot":"dropdown-menu-label","data-inset":n,className:J("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...t})}function oe({className:e,inset:n,variant:t="default",...s}){return o.jsx(Aa,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":t,className:J("group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...s})}function dt({...e}){return o.jsx(ei,{"data-slot":"dropdown-menu-sub",...e})}function ft({className:e,inset:n,children:t,...s}){return o.jsxs(li,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:J("flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[t,o.jsx(qt,{className:"ml-auto"})]})}function mt({align:e="start",alignOffset:n=-3,side:t="right",sideOffset:s=0,className:c,...l}){return o.jsx(St,{"data-slot":"dropdown-menu-sub-content",className:J("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",c),align:e,alignOffset:n,side:t,sideOffset:s,...l})}function Bi({className:e,children:n,checked:t,inset:s,...c}){return o.jsxs(Na,{"data-slot":"dropdown-menu-checkbox-item","data-inset":s,className:J("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:t,...c,children:[o.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:o.jsx(ja,{children:o.jsx(_r,{})})}),n]})}function Le({className:e,...n}){return o.jsx(ya,{"data-slot":"dropdown-menu-separator",className:J("-mx-1 my-1 h-px bg-border",e),...n})}function Kt(e,n){return e?e.startsWith(n)?e:`${n}${e}`:""}function wn({onLocaleChange:e}={}){const n=$o(),t=q(),s=[n.pathname,Kt(n.searchStr,"?"),Kt(n.hash,"#")].join(""),c=Go(s);function l(u){if(u===t)return;const f=Vo(c,{locale:u});Wo(u,{reload:!1}),e?.(),window.location.assign(f)}return{currentLocale:t,switchLocale:l}}function $t({className:e,onLocaleChange:n}){const{currentLocale:t,switchLocale:s}=wn({onLocaleChange:n});return Je.length<=1?null:o.jsxs(kn,{children:[o.jsx(Sn,{type:"button",className:J("flex size-8 shrink-0 items-center justify-center rounded-full border border-border bg-transparent p-0 hover:bg-accent",e),"aria-label":fn(),children:o.jsx(un,{className:"size-4"})}),o.jsx(St,{align:"end",children:Je.map(c=>o.jsxs(oe,{onClick:()=>s(c),disabled:c===t,children:[Ae[c].flag?o.jsx("span",{className:"mr-2 text-base",children:Ae[c].flag}):null,o.jsx("span",{children:Ae[c].name})]},c))})]})}const Tn=r.createContext(void 0);function En(){const e=r.useContext(Tn);if(e===void 0)throw new Error(Te(13));return e}const wt={imageLoadingStatus:()=>null},di=r.forwardRef(function(n,t){const{className:s,render:c,style:l,...u}=n,[f,i]=r.useState("idle"),g={imageLoadingStatus:f},x=r.useMemo(()=>({imageLoadingStatus:f,setImageLoadingStatus:i}),[f,i]),d=ge("span",n,{state:g,ref:t,props:u,stateAttributesMapping:wt});return o.jsx(Tn.Provider,{value:x,children:d})});function fi(e,{referrerPolicy:n,crossOrigin:t}){const[s,c]=r.useState("idle");return W(()=>{if(!e)return c("error"),qo;let l=!0;const u=new window.Image,f=i=>()=>{l&&c(i)};return c("loading"),u.onload=f("loaded"),u.onerror=f("error"),n&&(u.referrerPolicy=n),u.crossOrigin=t??null,u.src=e,u.complete&&c(u.naturalWidth>0?"loaded":"error"),()=>{l=!1}},[e,t,n]),s}const mi={...wt,..._t},pi=r.forwardRef(function(n,t){const{className:s,render:c,onLoadingStatusChange:l,referrerPolicy:u,crossOrigin:f,style:i,...g}=n,x=En(),d=fi(n.src,{referrerPolicy:u,crossOrigin:f}),h=d==="loaded",{mounted:y,transitionStatus:C,setMounted:k}=Qt(h),p=r.useRef(null),v=de(N=>{l?.(N),x.setImageLoadingStatus(N)});W(()=>{d!=="idle"&&v(d)},[d,v]),Ct({open:h,ref:p,onComplete(){h||k(!1)}});const m=ge("img",n,{state:{imageLoadingStatus:d,transitionStatus:C},ref:[t,p],props:g,stateAttributesMapping:mi,enabled:y});return y?m:null}),gi=r.forwardRef(function(n,t){const{className:s,render:c,delay:l,style:u,...f}=n,{imageLoadingStatus:i}=En(),[g,x]=r.useState(l===void 0),d=Oe();return r.useEffect(()=>(l!==void 0&&d.start(l,()=>x(!0)),d.clear),[d,l]),ge("span",n,{state:{imageLoadingStatus:i},ref:t,props:f,stateAttributesMapping:wt,enabled:i!=="loaded"&&g})});function hi({className:e,size:n="default",...t}){return o.jsx(di,{"data-slot":"avatar","data-size":n,className:J("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...t})}function xi({className:e,...n}){return o.jsx(pi,{"data-slot":"avatar-image",className:J("aspect-square size-full rounded-full object-cover",e),...n})}function bi({className:e,...n}){return o.jsx(gi,{"data-slot":"avatar-fallback",className:J("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...n})}function Gt({name:e,image:n,className:t}){return o.jsxs(hi,{className:J("size-8 border",t),children:[o.jsx(xi,{alt:e??"",src:n??void 0,referrerPolicy:"no-referrer"}),o.jsxs(bi,{className:"absolute inset-0",children:[o.jsx("span",{className:"sr-only",children:e??dn()}),o.jsx(Ar,{className:"size-4"})]})]})}function vi({user:e,className:n}){const t=Rt(),{setTheme:s,theme:c}=Yo(),[l,u]=r.useState(!1),[f,i]=r.useState(!1),{currentLocale:g,switchLocale:x}=wn({onLocaleChange:()=>u(!1)}),d=je.ui?.mode?.enableSwitch??!1,h=Je.length>1,y=je.auth?.enable??!1,C=!!e,k=e?.name??dn(),p=e?.email??ps(),v=c==="system"?Dt:c==="dark"?Bt:Ht,m=Xo().find(b=>b.items&&!b.authorizeOnly),N=new Set([ue.SettingsFiles,ue.SettingsApiKeys]),j=C?(m?.items??[]).filter(b=>!b.href||!N.has(b.href)):[],a=j.find(b=>b.href===ue.SettingsCredits),w=j.filter(b=>b.href!==ue.SettingsCredits),P=e?.role==="admin",B=je.social?.twitter,F=je.social?.discord,A=[{key:"contact-page",title:lt(),icon:jr,href:ue.Contact}];F&&A.push({key:"discord",title:"Discord",icon:zr,href:F,external:!0}),B&&A.push({key:"twitter",title:Gr(),icon:Hr,href:B,external:!0});const E=A.length>1,L=async()=>{await Mt.signOut({fetchOptions:{onSuccess:()=>{t.navigate({to:"/",search:{}}
1)},onError:b=>{lr.error(us()),console.error("sign out error:",b)}}})},H=b=>{u(!1),t.navigate({to:b})},z=b=>{if(u(!1),b.startsWith("mailto:")){window.location.href=b;return}window.open(b,"_blank","noopener,noreferrer")};return o.jsxs(o.Fragment,{children:[o.jsxs(kn,{open:l,onOpenChange:u,children:[o.jsx(Sn,{type:"button",className:`rounded-full outline-none transition-[box-shadow,transform] hover:scale-[1.03] focus-visible:ring-2 focus-visible:ring-amber-400 focus-visible:ring-offset-2 focus-visible:ring-offset-background motion-reduce:hover:scale-100 ${n??""}`,"aria-label":Ys(),children:o.jsx(Gt,{name:e?.name??null,image:e?.image??null,className:"size-8 border-amber-500/35"})}),o.jsxs(St,{className:"w-72 max-w-[calc(100vw-2rem)] rounded-lg",side:"bottom",align:"end",sideOffset:8,children:[o.jsx(Ne,{children:o.jsx(ui,{className:"p-0 font-normal",children:o.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[o.jsx(Gt,{name:e?.name??null,image:e?.image??null,className:"size-8 border"}),o.jsxs("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[o.jsx("span",{className:"truncate font-semibold text-foreground",children:k}),o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:p})]})]})})}),!C&&y&&o.jsxs(o.Fragment,{children:[o.jsx(Le,{}),o.jsx(Ne,{children:o.jsxs(oe,{onClick:()=>{u(!1),i(!0)},children:[o.jsx(Tr,{className:"mr-2 size-4"}),ns()]})})]}),w.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Le,{}),o.jsx(Ne,{children:w.map(b=>{const R=b.icon;return o.jsxs(oe,{onClick:()=>b.href&&H(b.href),children:[R&&o.jsx(R,{className:"mr-2 size-4"}),b.title]},b.title)})})]}),P&&o.jsxs(o.Fragment,{children:[o.jsx(Le,{}),o.jsxs(Ne,{children:[o.jsxs(oe,{onClick:()=>H(ue.AdminUsers),children:[o.jsx(Qo,{className:"mr-2 size-4"}),Zo()]}),o.jsxs(oe,{onClick:()=>H(ue.AdminTasks),children:[o.jsx(Sr,{className:"mr-2 size-4"}),Jo()]}),o.jsxs(oe,{onClick:()=>H(ue.AdminPrompts),children:[o.jsx(er,{className:"mr-2 size-4"}),tr()]}),o.jsxs(oe,{onClick:()=>H(ue.AdminRedemptions),children:[o.jsx(nr,{className:"mr-2 size-4"}),or()]})]})]}),o.jsx(Le,{}),o.jsxs(Ne,{children:[a&&o.jsxs(oe,{onClick:()=>a.href&&H(a.href),children:[a.icon&&o.jsx(a.icon,{className:"mr-2 size-4"}),a.title]}),C&&je.payment?.enable?o.jsxs(oe,{onClick:()=>H(ue.SettingsBilling),children:[o.jsx(At,{className:"mr-2 size-4"}),Js()]}):o.jsxs(oe,{onClick:()=>H(ue.Pricing),children:[o.jsx(At,{className:"mr-2 size-4"}),aa()]})]}),o.jsx(Le,{}),o.jsxs(Ne,{children:[h&&o.jsxs(dt,{children:[o.jsxs(ft,{children:[o.jsx(un,{className:"mr-2 size-4"}),fn()]}),o.jsx(mt,{children:Je.map(b=>o.jsxs(oe,{onClick:()=>x(b),disabled:b===g,children:[Ae[b].flag?o.jsx("span",{className:"mr-2 text-base",children:Ae[b].flag}):null,o.jsx("span",{children:Ae[b].name})]},b))})]}),d&&o.jsxs(dt,{children:[o.jsxs(ft,{children:[o.jsx(v,{className:"mr-2 size-4"}),Us()]}),o.jsxs(mt,{children:[o.jsxs(oe,{onClick:()=>s("light"),children:[o.jsx(Ht,{className:"mr-2 size-4"}),Os()]}),o.jsxs(oe,{onClick:()=>s("dark"),children:[o.jsx(Bt,{className:"mr-2 size-4"}),Es()]}),o.jsxs(oe,{onClick:()=>s("system"),children:[o.jsx(Dt,{className:"mr-2 size-4"}),Ds()]})]})]}),E?o.jsxs(dt,{children:[o.jsxs(ft,{children:[o.jsx(zt,{className:"mr-2 size-4"}),lt()]}),o.jsx(mt,{children:A.map(b=>o.jsxs(oe,{onClick:()=>b.external?z(b.href):H(b.href),children:[o.jsx(b.icon,{className:"mr-2 size-4"}),b.title]},b.key))})]}):o.jsxs(oe,{onClick:()=>H(ue.Contact),children:[o.jsx(zt,{className:"mr-2 size-4"}),lt()]})]}),C&&o.jsxs(o.Fragment,{children:[o.jsx(Le,{}),o.jsx(Ne,{children:o.jsxs(oe,{onClick:async b=>{b.preventDefault(),u(!1),await L()},children:[o.jsx(Pr,{className:"mr-2 size-4"}),as()]})})]})]})]}),!C&&y&&o.jsx(rr,{open:f,onOpenChange:i,children:o.jsxs(sr,{className:"sm:max-w-100 p-0 border-0 overflow-hidden",children:[o.jsx(ar,{className:"sr-only",children:o.jsx(ir,{children:bs()})}),o.jsx(cr,{className:"border-0 shadow-none"})]})})]})}var yi=Symbol.for("react.lazy"),et=ur[" use ".trim().toString()];function _i(e){return typeof e=="object"&&e!==null&&"then"in e}function Pn(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===yi&&"_payload"in e&&_i(e._payload)}function Ci(e){const n=Mi(e),t=r.forwardRef((s,c)=>{let{children:l,...u}=s;Pn(l)&&typeof et=="function"&&(l=et(l._payload));const f=r.Children.toArray(l),i=f.find(ki);if(i){const g=i.props.children,x=f.map(d=>d===i?r.Children.count(g)>1?r.Children.only(null):r.isValidElement(g)?g.props.children:null:d);return o.jsx(n,{...u,ref:c,children:r.isValidElement(g)?r.cloneElement(g,void 0,x):null})}return o.jsx(n,{...u,ref:c,children:l})});return t.displayName=`${e}.Slot`,t}var Ri=Ci("Slot");function Mi(e){const n=r.forwardRef((t,s)=>{let{children:c,...l}=t;if(Pn(c)&&typeof et=="function"&&(c=et(c._payload)),r.isValidElement(c)){const u=wi(c),f=Si(l,c.props);return c.type!==r.Fragment&&(f.ref=s?dr(s,u):u),r.cloneElement(c,f)}return r.Children.count(c)>1?r.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var Ii=Symbol("radix.slottable");function ki(e){return r.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ii}function Si(e,n){const t={...n};for(const s in n){const c=e[s],l=n[s];/^on[A-Z]/.test(s)?c&&l?t[s]=(...f)=>{const i=l(...f);return c(...f),i}:c&&(t[s]=c):s==="style"?t[s]={...c,...l}
1:s==="className"&&(t[s]=[c,l].filter(Boolean).join(" "))}return{...e,...t}}function wi(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function Ti({children:e,mode:n="redirect",asChild:t,callbackUrl:s,pendingAction:c}){const l=Rt(),{openAuthDialog:u}=fr(),f=()=>{const i=mr({callbackUrl:s,pendingAction:c});l.navigate({to:ue.Login,search:{callbackUrl:i}})};if(n==="modal"){const i=()=>u({callbackUrl:s,pendingAction:c});return t&&rn.isValidElement(e)?o.jsx(Ri,{onClick:i,children:e}):o.jsx("button",{type:"button",onClick:i,className:"inline",children:e})}return o.jsx("button",{type:"button",onClick:f,className:"inline",children:e})}function Ei(){return o.jsx(Ti,{mode:"modal",asChild:!0,children:o.jsxs(sn,{type:"button",size:"lg","data-testid":"guest-header-cta",className:"guest-header-cta px-4 font-semibold",children:[o.jsx("span",{className:"relative z-10",children:Yr()}),o.jsx(pr,{"aria-hidden":"true",className:"guest-header-cta__arrow relative z-10 size-3.5"})]})})}const Pi=an({method:"GET"}).handler(cn("96106ce3cf7a18e22b8aa1e7eb32db3179304249a912f61e12522378a47680a5"));an({method:"POST"}).handler(cn("6b9841b8eeaed2a4655225fa2c49f0a1ff55c7ed1764d3015761ec9a59ba9cac"));const Ue={all:["credits"],balance:()=>[...Ue.all,"balance"],history:()=>[...Ue.all,"history"]};function Ni(e){return e.invalidateQueries({queryKey:Ue.all})}async function ji(){const e=await fetch("/api/credits/balance",{credentials:"same-origin",headers:{accept:"application/json"}});if(!e.ok)throw new Error(ua());return e.json()}function Oi(){const{data:e,isPending:n}=Mt.useSession();return ln({queryKey:Ue.balance(),queryFn:ji,enabled:typeof window<"u"&&!n&&!!e?.user,refetchOnWindowFocus:!0})}function Hi(){return ln({queryKey:Ue.history(),queryFn:()=>Pi()})}function Ui(){const e=gr();return r.useCallback(()=>Ni(e),[e])}function Li({className:e}){const{data:n}=Oi();return o.jsxs(bt,{to:ue.SettingsCredits,className:e??"flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-sm transition-colors hover:bg-accent",title:pa(),children:[o.jsx(hr,{className:"size-4 text-amber-500"}),o.jsx("span",{className:"font-medium",children:n?.balance??0})]})}function Fi(e){const n=e,t=n?.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||n?.isContentEditable===!0}function Ai(){return typeof document>"u"?!1:!!document.querySelector(['[role="dialog"]','[data-slot="dialog-content"]','[data-slot="drawer-content"]','[data-slot="sheet-content"]','[data-slot="popover-content"]'].join(", "))}function Ki({breadcrumbs:e,center:n,actions:t,showBack:s=!1,showCredits:c=!0}){const l=Rt(),{data:u,isPending:f}=Mt.useSession(),[i,g]=r.useState(!1),x=r.useCallback(()=>{typeof window<"u"&&window.history.length>1?l.history.back():l.navigate({to:"/",search:{}})},[l]);return r.useEffect(()=>{g(!0)},[]),r.useEffect(()=>{if(!s)return;function d(h){h.key!=="Escape"||Fi(h.target)||Ai()||(h.preventDefault(),x())}return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[x,s]),o.jsx("header",{"data-slot":"dashboard-header",className:"sticky top-0 z-50 bg-background md:rounded-t-xl flex h-(--header-height) shrink-0 items-center border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",children:o.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1 px-3 sm:gap-2 sm:px-4 lg:px-6",children:[o.jsx(xr,{className:"-ml-1 shrink-0"}),s&&o.jsx(sn,{type:"button",variant:"outline",size:"icon-sm",onClick:x,"aria-label":Cs(),className:"shrink-0",children:o.jsx(vr,{className:"size-4"})}),o.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:n??(e&&e.length>0?o.jsx(_a,{className:"min-w-0 flex-1",children:o.jsx(Ca,{className:"text-base font-medium",children:e.map((d,h)=>o.jsxs(rn.Fragment,{children:[h>0&&o.jsx(ka,{className:"hidden md:block"},`sep-${h}`),o.jsx(Ra,{className:h<e.length-1?"hidden md:block":"",children:d.isCurrentPage?o.jsx(Ia,{className:"font-semibold",children:d.label}):d.href?o.jsx(Ma,{render:o.jsx(bt,{to:d.href}),children:d.label}):d.label},`item-${h}`)]},`breadcrumb-${h}`))})}):o.jsxs(bt,{to:ue.Root,search:{},className:"flex min-w-0 items-center gap-2 md:hidden","aria-label":je.metadata?.name,children:[o.jsx(br,{className:"size-5 shrink-0"}),o.jsx("span",{className:"truncate font-semibold text-sm max-[359px]:hidden",children:je.metadata?.name})]}))}),o.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1 pl-1 sm:gap-3 sm:pl-4",children:[t,!i||f?o.jsx("div",{"aria-hidden":"true",className:"h-8 w-24 rounded-lg bg-muted/50"}):u?.user?o.jsxs(o.Fragment,{children:[c?o.jsx(Li,{}):null,o.jsx($t,{}),o.jsx(vi,{user:u.user})]}):o.jsxs(o.Fragment,{children:[o.jsx($t,{}),o.jsx(Ei,{})]})]})]})})}export{hi as A,ui as B,$a as C,Ki as D,Le as E,Bi as F,Cs as G,ni as H,_r as I,At as J,Ti as L,ya as S,Gt as U,Ui as a,xi as b,bi as c,Hr as d,st as e,oi as f,za as g,Gr as h,ba as i,va as j,ti as k,Ya as l,Pa as m,ri as n,Ar as o,aa as p,Ni as q,Ue as r,kn as s,Sn as t,Oi as u,St as v,oe as w,pa as x,Hi as y,Ne as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.