@jean2/client 1.0.0 → 1.0.2

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.
Files changed (29) hide show
  1. package/dist/assets/SessionContent-BUi72_iy.js +9 -0
  2. package/dist/assets/{SessionMenuButton-CfDBJE0r.js → SessionMenuButton-CMaV4kEA.js} +1 -1
  3. package/dist/assets/{ThemeProvider-DWTAR83t.js → ThemeProvider-Da23NPAS.js} +1 -1
  4. package/dist/assets/_serverId-BvST5YDe.js +12 -0
  5. package/dist/assets/{_serverId-D7fl2Don.js → _serverId-DfPzo4bd.js} +1 -1
  6. package/dist/assets/{_serverId-Z_onznBB.js → _serverId-MO9g8fX9.js} +2 -2
  7. package/dist/assets/_sessionId-CPP8h5aK.js +1 -0
  8. package/dist/assets/_sessionId-DBdXwlmj.js +1 -0
  9. package/dist/assets/alert-3Kbxsvve.js +31 -0
  10. package/dist/assets/badge-CzDK507L.js +45 -0
  11. package/dist/assets/{confirmation-dialog-CcyiA31R.js → confirmation-dialog-x-_jBxq9.js} +1 -1
  12. package/dist/assets/index-gpIdz2Xy.css +2 -0
  13. package/dist/assets/index-wGbWnMXW.js +10 -0
  14. package/dist/assets/{overview-GjLiY4UT.js → overview-mSGJdfsz.js} +1 -1
  15. package/dist/assets/{platform-Be8afd__.js → platform-5d-ZQG2e.js} +1 -1
  16. package/dist/assets/{popover-DDHwMxwz.js → popover-EEh8MoGn.js} +1 -1
  17. package/dist/assets/{scroll-area-C-KPh_XU.js → scroll-area-zE8JtjlC.js} +1 -1
  18. package/dist/assets/{sidebar-BNTVPq06.js → sidebar-BULcvh4r.js} +1 -1
  19. package/dist/assets/{workspace-DVaW6FBq.js → workspace-BDB9L3JR.js} +1 -1
  20. package/dist/index.html +5 -5
  21. package/package.json +1 -1
  22. package/dist/assets/SessionContent-6BakydNj.js +0 -9
  23. package/dist/assets/_serverId-B47rZ3cs.js +0 -12
  24. package/dist/assets/_sessionId-CJ6VLUC_.js +0 -1
  25. package/dist/assets/_sessionId-CMQvBPmZ.js +0 -1
  26. package/dist/assets/alert-DjGCaOkT.js +0 -31
  27. package/dist/assets/badge-CxHTOx9D.js +0 -45
  28. package/dist/assets/index-CGdDNSI7.js +0 -10
  29. package/dist/assets/index-QW5PCSUz.css +0 -2
@@ -1 +1 @@
1
- import{n as e,o as t,r as n}from"./compiler-runtime-DZXZ41-q.js";import{A as r,C as i,E as a,S as o,T as s,_ as c,b as l,d as u,g as d,h as f,m as p,p as m,u as h,v as g,w as _,y as v}from"./servers-GmYSnzvH.js";import{C as y,E as b,S as x,T as S,_ as C,b as w,c as T,d as E,g as D,i as O,l as k,m as A,o as j,p as ee,r as M,u as N,w as P,x as F,y as I}from"./useParams-RuFKFrOo.js";function te(){try{return typeof window<`u`&&typeof window.sessionStorage==`object`?window.sessionStorage:void 0}catch{return}}var L=`tsr-scroll-restoration-v1_3`;function ne(){let e=te();if(!e)return null;let t={};try{let n=JSON.parse(e.getItem(`tsr-scroll-restoration-v1_3`)||`{}`);o(n)&&(t=n)}catch{}return{get state(){return t},set:e=>{t=v(e,t)||t},persist:()=>{try{e.setItem(L,JSON.stringify(t))}catch{}}}}var re=ne(),ie=e=>e.state.__TSR_key||e.href;function ae(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var R=!1,z=`window`,oe=`data-scroll-restoration-id`;function se(e,t){var n;if(!re)return;let r=re;if((n=t==null?e.options.scrollRestoration:t)!=null&&n&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,R=!1;let i=e.options.getScrollRestorationKey||ie,a=new Map;window.history.scrollRestoration=`manual`;let s=t=>{if(!(R||!e.isScrollRestoring))if(t.target===document||t.target===window)a.set(z,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{let e=t.target;a.set(e,{scrollX:e.scrollLeft||0,scrollY:e.scrollTop||0})}},c=t=>{var n;if(!e.isScrollRestoring||!t||a.size===0||!r)return;let i=(n=r.state)[t]||(n[t]={});for(let[e,t]of a){let n;if(e===z)n=z;else if(e.isConnected){let t=e.getAttribute(oe);n=t?`[${oe}="${t}"]`:ae(e)}n&&(i[n]=t)}};document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{c(e.fromLocation?i(e.fromLocation):void 0),a.clear()}),window.addEventListener(`pagehide`,()=>{var t;c(i((t=e.stores.resolvedLocation.state)==null?e.stores.location.state:t)),r.persist()}),e.subscribe(`onRendered`,t=>{let n=i(t.toLocation),s=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(a.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))){R=!0;try{let t=e.isScrollRestoring?r.state[n]:void 0,i=!1;if(t)for(let e in t){let n=t[e];if(!o(n))continue;let{scrollX:r,scrollY:a}=n;if(!(!Number.isFinite(r)||!Number.isFinite(a))){if(e===z)window.scrollTo({top:a,left:r,behavior:s}),i=!0;else if(e){let t;try{t=document.querySelector(e)}catch{continue}t&&(t.scrollLeft=r,t.scrollTop=a,i=!0)}}}if(!i){let t=e.history.location.hash.slice(1);if(t){var l,u;let e=(l=(u=window.history.state)==null?void 0:u.__hashScrollIntoViewOptions)==null?!0:l;if(e){let n=document.getElementById(t);n&&n.scrollIntoView(e)}}else{let e={top:0,left:0,behavior:s};if(window.scrollTo(e),c)for(let t of c){if(t===z)continue;let n=typeof t==`function`?t():document.querySelector(t);n&&n.scrollTo(e)}}}}finally{R=!1}e.isScrollRestoring&&r.set(e=>(e[n]||(e[n]={}),e))}})}function ce(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function le(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ue(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=le(r):Array.isArray(t)?t.push(le(r)):n[e]=[t,le(r)]}return n}var de=pe(JSON.parse),fe=me(JSON.stringify,JSON.parse);function pe(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=ue(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function me(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=ce(e,r);return t?`?${t}`:``}}function he(e){return{input:({url:t})=>{for(let n of e)t=_e(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ve(e[n],t);return t}}}function ge(e){let t=C(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=A([`/`,t,e.pathname]),e)}}function _e(e,t){var n;let r=e==null||(n=e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function ve(e,t){var n;let r=e==null||(n=e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function ye(e){let t=e;return{get state(){return t},setState(e){t=e(t)}}}function be(e){return{get state(){return e()}}}function xe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>Se(o,_.state)),x=r(()=>Se(s,v.state)),C=r(()=>Se(c,y.state)),w=r(()=>_.state[0]),T=r(()=>_.state.some(e=>{var t;return((t=o.get(e))==null?void 0:t.state.status)===`pending`})),E=r(()=>{var e;return{locationHref:p.state.href,resolvedLocationHref:(e=m.state)==null?void 0:e.href,status:l.state}}),D=r(()=>({status:l.state,loadedAt:u.state,isLoading:d.state,isTransitioning:f.state,matches:b.state,location:p.state,resolvedLocation:m.state,statusCode:h.state,redirect:g.state})),O=S(64);function k(e){let t=O.get(e);return t||(t=r(()=>{let t=_.state;for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.state}}),O.set(e,t)),t}let A={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingMatchesId:v,cachedMatchesId:y,activeMatchesSnapshot:b,pendingMatchesSnapshot:x,cachedMatchesSnapshot:C,firstMatchId:w,hasPendingMatches:T,matchRouteReactivity:E,activeMatchStoresById:o,pendingMatchStoresById:s,cachedMatchStoresById:c,__store:D,getMatchStoreByRouteId:k,setActiveMatches:j,setPendingMatches:ee,setCachedMatches:M};j(e.matches),a==null||a(A);function j(e){Ce(e,o,_,n,i)}function ee(e){Ce(e,s,v,n,i)}function M(e){Ce(e,c,y,n,i)}return A}function Se(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.state)}return n}function Ce(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.state!==n&&e.setState(()=>n)}p(n.state,a)||n.setState(()=>a)})}var we=e=>{if(!e.rendered){var t;return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)}},Te=e=>e.stores.matchesId.state.some(t=>{var n;return(n=e.stores.activeMatchStoresById.get(t))==null?void 0:n.state._forcePending}),B=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),V=(e,t,n=!0)=>{var r;let i={...(r=e.router.options.context)==null?{}:r},a=n?t:t-1;for(let t=0;t<=a;t++){let n=e.matches[t];if(!n)continue;let r=e.router.getMatch(n.id);r&&Object.assign(i,r.__routeContext,r.__beforeLoadContext)}return i},Ee=(e,t)=>{var n;if(!e.matches.length)return;let r=t.routeId,i=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),a=i>=0?i:0,o=r?e.matches.findIndex(e=>e.routeId===r):(n=e.firstBadMatchIndex)==null?e.matches.length-1:n;o<0&&(o=a);for(let t=o;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return r?o:a},H=(e,t,n)=>{if(!(!j(n)&&!k(n))){if(j(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){var r,i,a;(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:j(n)?`redirected`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),k(n)&&!n.routeId&&(n.routeId=t.routeId),(a=t._nonReactive.loadPromise)==null||a.resolve()}throw j(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n}},De=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Oe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},U=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex!=null||(e.firstBadMatchIndex=t),H(e,e.router.getMatch(i),n);try{var s,c;(s=(c=o.options).onError)==null||s.call(c,n)}catch(t){n=t,H(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>{var t,r;return(t=e._nonReactive.beforeLoadPromise)==null||t.resolve(),e._nonReactive.beforeLoadPromise=void 0,(r=e._nonReactive.loadPromise)==null||r.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!j(n)&&!k(n)&&(e.serialError!=null||(e.serialError=n))},ke=(e,t,n,r)=>{var i,a,o;if(r._nonReactive.pendingTimeout!==void 0)return;let s=(i=n.options.pendingMs)==null?e.router.options.defaultPendingMs:i;if(e.onReady&&!B(e,t)&&(n.options.loader||n.options.beforeLoad||ze(n))&&typeof s==`number`&&s!==1/0&&((a=n.options.pendingComponent)==null?(o=e.router.options)!=null&&o.defaultPendingComponent:a)){let t=setTimeout(()=>{we(e)},s);r._nonReactive.pendingTimeout=t}},Ae=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ke(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},je=(e,t,n,r)=>{let a=e.router.getMatch(t),o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=f(()=>{o==null||o.resolve(),o=void 0});let{paramsError:s,searchError:c}=a;s&&U(e,n,s,`PARSE_PARAMS`),c&&U(e,n,c,`VALIDATE_SEARCH`),ke(e,t,r,a);let l=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:l})))},p=()=>{var n;(n=a._nonReactive.beforeLoadPromise)==null||n.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),p()});return}a._nonReactive.beforeLoadPromise=f();let m={...V(e,n,!1),...a.__routeContext},{search:h,params:g,cause:_}=a,v=B(e,t),y={search:h,abortController:l,params:g,preload:v,context:m,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),p()});return}(j(r)||k(r))&&(d(),U(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),p()})},x;try{if(x=r.options.beforeLoad(y),i(x))return d(),x.catch(t=>{U(e,n,t,`BEFORE_LOAD`)}).then(b)}catch(t){d(),U(e,n,t,`BEFORE_LOAD`)}b(x)},Me=(e,t)=>{let{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],o=()=>c(),s=()=>je(e,n,t,a),c=()=>{if(De(e,n))return;let t=Ae(e,n,a);return i(t)?t.then(s):s()};return o()},Ne=(e,t,n)=>{var r,i,a,o,s,c;let l=e.router.getMatch(t);if(!l||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let u={ssr:e.router.options.ssr,matches:e.matches,match:l,params:l.params,loaderData:l.loaderData};return Promise.all([(r=(i=n.options).head)==null?void 0:r.call(i,u),(a=(o=n.options).scripts)==null?void 0:a.call(o,u),(s=(c=n.options).headers)==null?void 0:s.call(c,u)]).then(([e,t,n])=>({meta:e==null?void 0:e.meta,links:e==null?void 0:e.links,headScripts:e==null?void 0:e.scripts,headers:n,scripts:t,styles:e==null?void 0:e.styles}))},Pe=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=B(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Fe=async(e,t,n,r,a)=>{try{let d=e.router.getMatch(n);try{W(a);let o=a.options.loader,s=typeof o==`function`?o:o==null?void 0:o.handler,c=s==null?void 0:s(Pe(e,t,n,r,a)),l=!!s&&i(c);if((l||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}a._lazyPromise&&await a._lazyPromise;let u=d._nonReactive.minPendingPromise;u&&await u,a._componentsPromise&&await a._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){var o,s;let i=t;if((i==null?void 0:i.name)===`AbortError`){if(d.abortController.signal.aborted){var c;(c=d._nonReactive.loaderPromise)==null||c.resolve(),d._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let f=d._nonReactive.minPendingPromise;f&&await f,k(t)&&await((o=a.options.notFoundComponent)==null||(s=o.preload)==null?void 0:s.call(o)),H(e,e.router.getMatch(n),t);try{var l,u;(l=(u=a.options).onError)==null||l.call(u,t)}catch(t){i=t,H(e,e.router.getMatch(n),t)}!j(i)&&!k(i)&&await W(a,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:i,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},Ie=async(e,t,n)=>{var r;async function i(r,i,o,l,u){var f,p,m,h;let g=Date.now()-i.updatedAt,_=r?(f=(p=u.options.preloadStaleTime)==null?e.router.options.defaultPreloadStaleTime:p)==null?3e4:f:(m=(h=u.options.staleTime)==null?e.router.options.defaultStaleTime:h)==null?0:m,v=u.options.shouldReload,y=typeof v==`function`?v(Pe(e,t,a,n,u)):v,{status:b,invalid:x}=l,S=g>=_&&(!!e.forceStaleReload||l.cause===`enter`||o!==void 0&&o!==l.id);s=b===`success`&&(x||(y==null?S:y)),r&&u.options.preload===!1||(s&&!e.sync&&d?(c=!0,(async()=>{try{var r,i;await Fe(e,t,a,n,u);let o=e.router.getMatch(a);(r=o._nonReactive.loaderPromise)==null||r.resolve(),(i=o._nonReactive.loadPromise)==null||i.resolve(),o._nonReactive.loaderPromise=void 0,o._nonReactive.loadPromise=void 0}catch(t){j(t)&&await e.router.navigate(t.options)}})()):b!==`success`||s?await Fe(e,t,a,n,u):Oe(e,a,n))}let{id:a,routeId:o}=e.matches[n],s=!1,c=!1,l=e.router.looseRoutesById[o],u=l.options.loader,d=((r=typeof u==`function`||u==null?void 0:u.staleReloadMode)==null?e.router.options.defaultStaleReloadMode:r)!==`blocking`;if(De(e,a)){if(!e.router.getMatch(a))return e.matches[n];Oe(e,a,n)}else{var p,m;let t=e.router.getMatch(a),r=e.router.stores.matchesId.state[n],s=((p=r&&e.router.stores.activeMatchStoresById.get(r)||null)==null?void 0:p.routeId)===o?r:(m=e.router.stores.activeMatchesSnapshot.state.find(e=>e.routeId===o))==null?void 0:m.id,c=B(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&d)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),r=n._nonReactive.error||n.error;r&&H(e,n,r),n.status===`pending`&&await i(c,t,s,n,l)}else{let n=c&&!e.router.stores.activeMatchStoresById.has(a),r=e.router.getMatch(a);r._nonReactive.loaderPromise=f(),n!==r.preload&&e.updateMatch(a,e=>({...e,preload:n})),await i(c,t,s,r,l)}}let h=e.router.getMatch(a);if(!c){var g,_;(g=h._nonReactive.loaderPromise)==null||g.resolve(),(_=h._nonReactive.loadPromise)==null||_.resolve(),h._nonReactive.loadPromise=void 0}clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;let v=c?h.isFetching:!1;return v!==h.isFetching||h.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:v,invalid:!1})),e.router.getMatch(a)):h};async function Le(e){var t,n;let r=e,a=[];Te(r.router)&&we(r);let o;for(let e=0;e<r.matches.length;e++){try{let t=Me(r,e);i(t)&&await t}catch(e){if(j(e))throw e;if(k(e))o=e;else if(!r.preload)throw e;break}if(r.serialError||r.firstBadMatchIndex!=null)break}let s=(t=r.firstBadMatchIndex)==null?r.matches.length:t,c=o&&!r.preload?Ee(r,o):void 0,l=o&&r.preload?0:c===void 0?s:Math.min(c+1,s),u,d;for(let e=0;e<l;e++)a.push(Ie(r,a,e));try{await Promise.all(a)}catch{let e=await Promise.allSettled(a);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(j(e))throw e;k(e)?u!=null||(u=e):d!=null||(d=e)}if(d!==void 0)throw d}let f=(n=u)==null?o&&!r.preload?o:void 0:n,p=r.firstBadMatchIndex===void 0?r.matches.length-1:r.firstBadMatchIndex;if(!f&&o&&r.preload)return r.matches;if(f){var m;let e=Ee(r,f);e===void 0&&b();let t=r.matches[e],n=r.router.looseRoutesById[t.routeId],i=(m=r.router.options)==null?void 0:m.defaultNotFoundComponent;!n.options.notFoundComponent&&i&&(n.options.notFoundComponent=i),f.routeId=t.routeId;let a=t.routeId===r.router.routeTree.id;r.updateMatch(t.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:f},isFetching:!1})),p=e,await W(n,[`notFoundComponent`])}else if(!r.preload){let e=r.matches[0];if(!e.globalNotFound){var h;(h=r.router.getMatch(e.id))!=null&&h.globalNotFound&&r.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}}if(r.serialError&&r.firstBadMatchIndex!==void 0){let e=r.router.looseRoutesById[r.matches[r.firstBadMatchIndex].routeId];await W(e,[`errorComponent`])}for(let e=0;e<=p;e++){let{id:t,routeId:n}=r.matches[e],i=r.router.looseRoutesById[n];try{let e=Ne(r,t,i);if(e){let n=await e;r.updateMatch(t,e=>({...e,...n}))}}catch(e){console.error(`Error executing head for route ${n}:`,e)}}let g=we(r);if(i(g)&&await g,f)throw f;if(r.serialError&&!r.preload&&!r.onReady)throw r.serialError;return r.matches}function Re(e,t){let n=t.map(t=>{var n,r;return(n=e.options[t])==null||(r=n.preload)==null?void 0:r.call(n)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function W(e,t=G){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===G?(()=>{if(e._componentsPromise===void 0){let t=Re(e,G);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Re(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ze(e){var t;for(let n of G)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var G=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],K=`__TSR_index`,Be=`popstate`,Ve=`beforeunload`;function He(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{var i;(i=e.notifyOnIndexChange)==null||i?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{var a,o,s;if((a=r==null?void 0:r.ignoreBlocker)!=null&&a){n();return}let c=(o=(s=e.getBlockers)==null?void 0:s.call(e))==null?[]:o,l=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&c.length&&l)for(let n of c){let r=q(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){var u;(u=e.onBlocked)==null||u.call(e);return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[K];i=Ue(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[K];i=Ue(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{var n;e.back((n=t==null?void 0:t.ignoreBlocker)==null?!1:n),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{var n;e.forward((n=t==null?void 0:t.ignoreBlocker)==null?!1:n),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[K]!==0,createHref:t=>e.createHref(t),block:t=>{var n,r;if(!e.setBlockers)return()=>{};let i=(n=(r=e.getBlockers)==null?void 0:r.call(e))==null?[]:n;return e.setBlockers([...i,t]),()=>{var n,r,i;let a=(n=(r=e.getBlockers)==null?void 0:r.call(e))==null?[]:n;(i=e.setBlockers)==null||i.call(e,a.filter(e=>e!==t))}},flush:()=>{var t;return(t=e.flush)==null?void 0:t.call(e)},destroy:()=>{var t;return(t=e.destroy)==null?void 0:t.call(e)},notify:r}}function Ue(e,t){t||(t={});let n=qe();return{...t,key:n,__TSR_key:n,[K]:e}}function We(e){var t,n,r,i,a;let o=(t=e==null?void 0:e.window)==null?typeof document<`u`?window:void 0:t,s=o.history.pushState,c=o.history.replaceState,l=[],u=()=>l,d=e=>l=e,f=(n=e==null?void 0:e.createHref)==null?(e=>e):n,p=(r=e==null?void 0:e.parseLocation)==null?(()=>q(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state)):r;if(!((i=o.history.state)!=null&&i.__TSR_key)&&!((a=o.history.state)!=null&&a.key)){let e=qe();o.history.replaceState({[K]:0,key:e,__TSR_key:e},``)}let m=p(),h,g=!1,_=!1,v=!1,y=!1,b=()=>m,x,S,C=()=>{x&&(O._ignoreSubscribers=!0,(x.isPush?o.history.pushState:o.history.replaceState)(x.state,``,x.href),O._ignoreSubscribers=!1,x=void 0,S=void 0,h=void 0)},w=(e,t,n)=>{let r=f(t);S||(h=m),m=q(t,n),x={href:r,state:n,isPush:(x==null?void 0:x.isPush)||e===`push`},S||(S=Promise.resolve().then(()=>C()))},T=e=>{m=p(),O.notify({type:e})},E=async()=>{if(_){_=!1;return}let e=p(),t=e.state[K]-m.state[K],n=t===1,r=t===-1,i=!n&&!r||g;g=!1;let a=i?`GO`:r?`BACK`:`FORWARD`,s=i?{type:`GO`,index:t}:{type:r?`BACK`:`FORWARD`};if(v)v=!1;else{let t=u();if(typeof document<`u`&&t.length){for(let n of t)if(await n.blockerFn({currentLocation:m,nextLocation:e,action:a})){_=!0,o.history.go(1),O.notify(s);return}}}m=p(),O.notify(s)},D=e=>{if(y){y=!1;return}let t=!1,n=u();if(typeof document<`u`&&n.length)for(let e of n){var r;let n=(r=e.enableBeforeUnload)==null?!0:r;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},O=He({getLocation:b,getLength:()=>o.history.length,pushState:(e,t)=>w(`push`,e,t),replaceState:(e,t)=>w(`replace`,e,t),back:e=>(e&&(v=!0),y=!0,o.history.back()),forward:e=>{e&&(v=!0),y=!0,o.history.forward()},go:e=>{g=!0,o.history.go(e)},createHref:e=>f(e),flush:C,destroy:()=>{o.history.pushState=s,o.history.replaceState=c,o.removeEventListener(Ve,D,{capture:!0}),o.removeEventListener(Be,E)},onBlocked:()=>{h&&m!==h&&(m=h)},getBlockers:u,setBlockers:d,notifyOnIndexChange:!1});return o.addEventListener(Ve,D,{capture:!0}),o.addEventListener(Be,E),o.history.pushState=function(...e){let t=s.apply(o.history,e);return O._ignoreSubscribers||T(`PUSH`),t},o.history.replaceState=function(...e){let t=c.apply(o.history,e);return O._ignoreSubscribers||T(`REPLACE`),t},O}function Ge(e){var t;let n=(t=e==null?void 0:e.window)==null?typeof document<`u`?window:void 0:t;return We({window:n,parseLocation:()=>{var e;let t=n.location.hash.split(`#`).slice(1),r=(e=t[0])==null?`/`:e,i=n.location.search,a=t.slice(1);return q(`${r}${i}${a.length===0?``:`#${a.join(`#`)}`}`,n.history.state)},createHref:e=>`${n.location.pathname}${n.location.search}#${e}`})}function Ke(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function q(e,t){let n=Ke(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=qe();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[K]:0,key:a,__TSR_key:a}}}function qe(){return(Math.random()+1).toString(36).substring(7)}function J(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var Je=class{constructor(e,t){var n,r,i,o,u;this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{var t,n,r,i,a,o;let s=this.options,c=(t=(n=this.basepath)==null?s==null?void 0:s.basepath:n)==null?`/`:t,l=this.basepath===void 0,u=s==null?void 0:s.rewrite;if(this.options={...s,...e},this.isServer=(r=this.options.isServer)==null?typeof document>`u`:r,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=E(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=We()),this.origin=this.options.origin,this.origin||((i=window)!=null&&i.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=S(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=xe(Xe(this.latestLocation),e),se(this)}let d=!1,f=(a=this.options.basepath)==null?`/`:a,p=this.options.rewrite;if(l||c!==f||u!==p){this.basepath=f;let e=[],t=C(f);t&&t!==`/`&&e.push(ge({basepath:f})),p&&e.push(p),this.rewrite=e.length===0?void 0:e.length===1?e[0]:he(e),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof((o=window.CSS)==null?void 0:o.supports)==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=P(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&y(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:o})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),c=this.options.stringifySearch(i);return{href:e+c+r,publicHref:e+c+r,pathname:d(e).path,external:!1,searchStr:c,search:s(t==null?void 0:t.search,i),hash:d(r.slice(1)).path,state:a(t==null?void 0:t.state,o)}}let c=new URL(i,this.origin),l=_e(this.rewrite,c),u=this.options.parseSearch(l.search),f=this.options.stringifySearch(u);return l.search=f,{href:l.href.replace(l.origin,``),publicHref:i,pathname:d(l.pathname).path,external:!!this.rewrite&&l.origin!==this.origin,searchStr:f,search:s(t==null?void 0:t.search,u),hash:d(l.hash.slice(1)).path,state:a(t==null?void 0:t.state,o)}},r=n(e),{__tempLocation:i,__tempKey:o}=r.state;if(i&&(!o||o===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>D({base:e,to:N(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Qe({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.state.forEach(e=>{var t;if(this.stores.pendingMatchStoresById.has(e))return;let n=(t=this.stores.activeMatchStoresById.get(e))==null?void 0:t.state;n&&(n.status===`pending`||n.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{var n,r,i;let o=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(o);t.from;let l=t.unsafeRelative===`path`?o.pathname:(n=t.from)==null?c.fullPath:n,u=this.resolvePathWithBase(l,`.`),f=c.search,p=Object.assign(Object.create(null),c.params),m=t.to?this.resolvePathWithBase(u,`${t.to}`):this.resolvePathWithBase(u,`.`),h=t.params===!1||t.params===null?Object.create(null):((r=t.params)==null?!0:r)===!0?p:Object.assign(p,v(t.params,p)),_=this.getMatchedRoutes(m),y=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!==`/`&&_.routeParams[`**`])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(h).length>0)for(let e of y){var b,x;let t=(b=(x=e.options.params)==null?void 0:x.stringify)==null?e.options.stringifyParams:b;if(t)try{Object.assign(h,t(h))}catch{}}let S=e.leaveParams?m:d(ee({path:m,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,C=f;if(e._includeValidateSearch&&(i=this.options.search)!=null&&i.strict){let e={};y.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Ze(t.options.validateSearch,{...e,...C}))}catch{}}),C=e}C=$e({search:C,dest:t,destRoutes:y,_includeValidateSearch:e._includeValidateSearch}),C=s(f,C);let w=this.options.stringifySearch(C),T=t.hash===!0?o.hash:t.hash?v(t.hash,o.hash):void 0,E=T?`#${T}`:``,D=t.state===!0?o.state:t.state?v(t.state,o.state):{};D=a(o.state,D);let O=`${S}${w}${E}`,k,A,j=!1;if(this.rewrite){let e=new URL(O,this.origin),t=ve(this.rewrite,e);k=e.href.replace(e.origin,``),t.origin===this.origin?A=t.pathname+t.search+t.hash:(A=t.href,j=!0)}else k=g(O),A=k;return{publicHref:A,href:k,pathname:S,search:C,searchStr:w,state:D,hash:T==null?``:T,external:j,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=w(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s==null?!0:s)===!0?n:Object.assign(n,v(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{var r;let i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=c(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=I(this.latestLocation.href)===I(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=f(()=>{o==null||o.resolve(),o=void 0}),a&&i())this.load();else{var s;let{maskedLocation:r,hashScrollIntoView:i,...a}=n;if(r){var l,u;a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l=(u=a.unmaskOnReload)==null?this.options.unmaskOnReload:u)!=null&&l&&(a.state.__tempKey=this.tempLocationKey)}a.state.__hashScrollIntoViewOptions=(s=i==null?this.options.defaultHashScrollIntoView:i)==null?!0:s,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=(r=n.resetScroll)==null?!0:r,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=q(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=_e(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){var o,s;let t=this.buildLocation({to:e,...i});n=(o=n)==null?t.publicHref:o,r=(s=r)==null?t.publicHref:s}let t=!a&&r?r:n;if(l(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){var c,u,d;let e=(c=(u=(d=this.history).getBlockers)==null?void 0:u.call(d))==null?[]:c;for(let t of e)if(t!=null&&t.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatchesSnapshot.state.filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.setState(()=>`pending`),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(e),this.stores.setCachedMatches(t)})},this.load=async e=>{var t;let n,r,i,a=(t=this.stores.resolvedLocation.state)==null?this.stores.location.state:t;for(i=new Promise(t=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.stores.resolvedLocation.state,r=J(t,n);this.stores.redirect.state||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Le({router:this,sync:e==null?void 0:e.sync,forceStaleReload:a.href===t.href,matches:this.stores.pendingMatchesSnapshot.state,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatchesSnapshot.state,a=i.length,o=this.stores.activeMatchesSnapshot.state;e=a?o.filter(e=>!this.stores.pendingMatchStoresById.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStoresById.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),a&&(this.stores.setActiveMatches(i),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,o]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]]){var i,a;if(e)for(let t of e)(i=(a=this.looseRoutesById[t.routeId].options)[o])==null||i.call(a,t)}})})}})}catch(e){j(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):k(e)&&(r=e);let t=n?n.status:r?404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>t),this.stores.redirect.setState(()=>n)})}if(this.latestLoadPromise===i){var o;(o=this.commitLocationPromise)==null||o.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0}t()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.setState(()=>o)},this.startViewTransition=e=>{var t;let n=(t=this.shouldViewTransition)==null?this.options.defaultViewTransition:t;if(this.shouldViewTransition=void 0,n&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let t;if(typeof n==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.state,a=typeof n.types==`function`?n.types(J(r,i)):n.types;if(a===!1){e();return}t={update:e,types:a}}else t=e;document.startViewTransition(t)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStoresById.get(e);if(n){n.setState(t);return}let r=this.stores.activeMatchStoresById.get(e);if(r){r.setState(t);return}let i=this.stores.cachedMatchStoresById.get(e);if(i){let n=t(i.state);n.status===`redirected`?this.stores.cachedMatchStoresById.delete(e)&&this.stores.cachedMatchesId.setState(t=>t.filter(t=>t!==e)):i.setState(()=>n)}})},this.getMatch=e=>{var t,n,r,i,a;return(t=(n=(r=this.stores.cachedMatchStoresById.get(e))==null?void 0:r.state)==null?(i=this.stores.pendingMatchStoresById.get(e))==null?void 0:i.state:n)==null?(a=this.stores.activeMatchStoresById.get(e))==null?void 0:a.state:t},this.invalidate=e=>{let t=t=>{var n,r;return(n=e==null||(r=e.filter)==null?void 0:r.call(e,t))==null||n?{...t,invalid:!0,...e!=null&&e.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(t)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(t)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(t))}),this.shouldViewTransition=!1,this.load({sync:e==null?void 0:e.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){var n;let t=(n=e.options._builtLocation)==null?this.buildLocation(e.options):n,r=this.getParsedLocationHref(t);e.options.href=r,e.headers.set(`Location`,r)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&l(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e==null?void 0:e.filter;t===void 0?this.stores.setCachedMatches([]):this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{var n,r,i;let a=this.looseRoutesById[t.routeId];if(!a.options.loader)return!0;let o=(n=t.preload?(r=a.options.preloadGcTime)==null?this.options.defaultPreloadGcTime:r:(i=a.options.gcTime)==null?this.options.defaultGcTime:i)==null?300*1e3:n;return t.status===`error`?!0:e-t.updatedAt>=o}})},this.loadRouteChunk=W,this.preloadRoute=async e=>{var t;let n=(t=e._builtLocation)==null?this.buildLocation(e):t,r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:e}),i=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),a=new Set([...i,...this.stores.cachedMatchesId.state]),o=r.filter(e=>!a.has(e.id));if(o.length){let e=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...e,...o])}try{return r=await Le({router:this,matches:r,location:n,preload:!0,updateMatch:(e,t)=>{i.has(e)?r=r.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),r}catch(e){if(j(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:n});k(e)||console.error(e);return}},this.matchRoute=(e,t)=>{var n,r,i;let a={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},o=this.buildLocation(a);if(t!=null&&t.pending&&this.stores.status.state!==`pending`)return!1;let s=((t==null?void 0:t.pending)===void 0?!this.stores.isLoading.state:t.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,l=x(o.pathname,(n=t==null?void 0:t.caseSensitive)==null?!1:n,(r=t==null?void 0:t.fuzzy)==null?!1:r,s.pathname,this.processedTree);return!l||e.params&&!c(l.rawParams,e.params,{partial:!0})?!1:(i=t==null?void 0:t.includeSearch)==null||i?c(s.search,o.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:(n=e.caseSensitive)==null?!1:n,notFoundMode:(r=e.notFoundMode)==null?`fuzzy`:r,stringifySearch:(i=e.stringifySearch)==null?fe:i,parseSearch:(o=e.parseSearch)==null?de:o,protocolAllowlist:(u=e.protocolAllowlist)==null?m:u}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){var t,n,r;return e!=null&&e.id?(n=(r=e.context)==null?this.options.context:r)==null?void 0:n:(t=this.options.context)==null?void 0:t}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n,{matchedRoutes:c}=n,l=!1;(r?r.path!==`/`&&i[`**`]:I(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?tt(this.options.notFoundMode,c):void 0,d=Array(c.length),p=new Map;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&p.set(e.routeId,e.state);for(let n=0;n<c.length;n++){var m,h,g,_,v;let r=c[n],l=d[n-1],C,w,T;{var y,b;let n=(y=l==null?void 0:l.search)==null?e.search:y,i=(b=l==null?void 0:l._strictSearch)==null?void 0:b;try{var x;let e=(x=Ze(r.options.validateSearch,{...n}))==null?void 0:x;C={...n,...e},w={...i,...e},T=void 0}catch(e){let r=e;if(e instanceof Y||(r=new Y(e.message,{cause:e})),t!=null&&t.throwOnError)throw r;C=n,w={},T=r}}let E=(m=(h=(g=r.options).loaderDeps)==null?void 0:h.call(g,{search:C}))==null?``:m,D=E?JSON.stringify(E):``,{interpolatedPath:O,usedParams:A}=ee({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),M=r.id+O+D,N=this.getMatch(M),P=p.get(r.id),F=(_=N==null?void 0:N._strictParams)==null?A:_,I;if(!N)try{nt(r,A,o,F)}catch(e){if(I=k(e)||j(e)?e:new Ye(e.message,{cause:e}),t!=null&&t.throwOnError)throw I}Object.assign(i,F);let te=P?`stay`:`enter`,L;if(N)L={...N,cause:te,params:(v=P==null?void 0:P.params)==null?i:v,_strictParams:F,search:s(P?P.search:N.search,C),_strictSearch:w};else{var S;let e=r.options.loader||r.options.beforeLoad||r.lazyFn||ze(r)?`pending`:`success`;L={id:M,ssr:r.options.ssr,index:n,routeId:r.id,params:(S=P==null?void 0:P.params)==null?i:S,_strictParams:F,pathname:O,updatedAt:Date.now(),search:P?s(P.search,C):C,_strictSearch:w,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:f()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:te,loaderDeps:P?a(P.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t!=null&&t.preload||(L.globalNotFound=u===r.id),L.searchError=T;let ne=this.getParentContext(l);L.context={...ne,...L.__routeContext,...L.__beforeLoadContext},d[n]=L}for(let t=0;t<d.length;t++){let n=d[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=p.get(n.routeId);if(n.params=o?s(o.params,i):i,!a){let i=d[t-1],a=this.getParentContext(i);if(r.options.context){var C;let t={deps:n.loaderDeps,params:n.params,context:a==null?{}:a,location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:d,routeId:r.id};n.__routeContext=(C=r.options.context(t))==null?void 0:C}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return d}matchRoutesLightweight(e){var t;let{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(e.pathname),a=_(n),o={...e.search};for(let e of n)try{Object.assign(o,Ze(e.options.validateSearch,o))}catch{}let s=_(this.stores.matchesId.state),c=s&&((t=this.stores.activeMatchStoresById.get(s))==null?void 0:t.state),l=c&&c.routeId===a.id&&c.pathname===e.pathname,u;if(l)u=c.params;else{let e=Object.assign(Object.create(null),r);for(let t of n)try{nt(t,r,i==null?{}:i,e)}catch{}u=e}return{matchedRoutes:n,fullPath:a.fullPath,search:o,params:u}}},Y=class extends Error{},Ye=class extends Error{};function Xe(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ze(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Y(`Async validation not supported`);if(n.issues)throw new Y(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Qe({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=I(e),a,o,s=F(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign(Object.create(null),s.parsedParams)),{matchedRoutes:(s==null?void 0:s.branch)||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function $e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return et(n)(e,t,r==null?!1:r)}function et(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let r of e){if(`search`in r.options){var n;(n=r.options.search)!=null&&n.middlewares&&t.middlewares.push(...r.options.search.middlewares)}else (r.options.preSearchFilters||r.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let n=e;`preSearchFilters`in r.options&&r.options.preSearchFilters&&(n=r.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(n);return`postSearchFilters`in r.options&&r.options.postSearchFilters?r.options.postSearchFilters.reduce((e,t)=>t(e),i):i});r.options.validateSearch&&t.middlewares.push(({search:e,next:n})=>{let i=n(e);if(!t._includeValidateSearch)return i;try{var a;return{...i,...(a=Ze(r.options.validateSearch,i))==null?void 0:a}}catch{return i}})}t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:v(n.search,e):{}});let r=(e,t,n)=>{if(e>=n.length)return t;let i=n[e];return i({search:t,next:t=>r(e+1,t,n)})};return function(e,n,i){return t.dest=n,t._includeValidateSearch=i,r(0,e,t.middlewares)}}function tt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return T}function nt(e,t,n,r){var i,a;let o=(i=(a=e.options.params)==null?void 0:a.parse)==null?e.options.parseParams:i;if(o)if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=o(r);Object.assign(r,e)}}var X=t(n(),1),Z=e();function rt(e){var t;let n=(t=e.errorComponent)==null?at:t;return(0,Z.jsx)(it,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:t,reset:r})=>t?X.createElement(n,{error:t,reset:r}):e.children})}var it=class extends X.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function at({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ot(e){let t=u(),n=`not-found-${h(t.stores.location,e=>e.pathname)}-${h(t.stores.status,e=>e)}`;return(0,Z.jsx)(rt,{getResetKey:()=>n,onCatch:(t,n)=>{var r;if(k(t))(r=e.onCatch)==null||r.call(e,t,n);else throw t},errorComponent:({error:t})=>{var n;if(k(t))return(n=e.fallback)==null?void 0:n.call(e,t);throw t},children:e.children})}function st(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function Q(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function ct(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(st,{})}var lt=X.memo(function({matchId:e}){let t=u(),n=t.stores.activeMatchStoresById.get(e);n||b();let r=h(t.stores.loadedAt,e=>e),i=h(n,e=>e);return(0,Z.jsx)(ut,{router:t,matchId:e,resetKey:r,matchState:X.useMemo(()=>{var e;let n=i.routeId,r=(e=t.routesById[n].parentRoute)==null?void 0:e.id;return{routeId:n,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:r}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function ut({router:e,matchId:t,resetKey:n,matchState:r}){var i,a,o,s,c,l,u,d,f;let p=e.routesById[r.routeId],m=(i=p.options.pendingComponent)==null?e.options.defaultPendingComponent:i,h=m?(0,Z.jsx)(m,{}):null,g=(a=p.options.errorComponent)==null?e.options.defaultErrorComponent:a,_=(o=p.options.onCatch)==null?e.options.defaultOnCatch:o,v=p.isRoot?(s=p.options.notFoundComponent)==null?(c=e.options.notFoundRoute)==null?void 0:c.options.component:s:p.options.notFoundComponent,y=r.ssr===!1||r.ssr===`data-only`,b=(!p.isRoot||p.options.wrapInSuspense||y)&&((l=(u=p.options.wrapInSuspense)==null?m:u)==null?(d=p.options.errorComponent)!=null&&d.preload||y:l)?X.Suspense:Q,x=g?rt:Q,S=v?ot:Q;return(0,Z.jsxs)(p.isRoot?(f=p.options.shellComponent)==null?Q:f:Q,{children:[(0,Z.jsx)(M.Provider,{value:t,children:(0,Z.jsx)(b,{fallback:h,children:(0,Z.jsx)(x,{getResetKey:()=>n,errorComponent:g||at,onCatch:(e,t)=>{if(k(e))throw e.routeId!=null||(e.routeId=r.routeId),e;_==null||_(e,t)},children:(0,Z.jsx)(S,{fallback:e=>{if(e.routeId!=null||(e.routeId=r.routeId),!v||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!p.isRoot)throw e;return X.createElement(v,e)},children:y||r._displayPending?(0,Z.jsx)(O,{fallback:h,children:(0,Z.jsx)(ft,{matchId:t})}):(0,Z.jsx)(ft,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(dt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function dt({resetKey:e}){let t=u(),n=X.useRef(void 0);return r(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...J(t.stores.location.state,t.stores.resolvedLocation.state)}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var ft=X.memo(function({matchId:e}){let t=u(),n=(e,n)=>{var r,i;return(r=(i=t.getMatch(e.id))==null?void 0:i._nonReactive[n])==null?e._nonReactive[n]:r},r=t.stores.activeMatchStoresById.get(e);r||b();let i=h(r,e=>e),a=i.routeId,o=t.routesById[a],s=X.useMemo(()=>{var e,n;let r=(e=(n=t.routesById[a].options.remountDeps)==null?t.options.defaultRemountDeps:n)==null?void 0:e({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return r?JSON.stringify(r):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=X.useMemo(()=>{var e;let n=(e=o.options.component)==null?t.options.defaultComponent:e;return n?(0,Z.jsx)(n,{},s):(0,Z.jsx)(pt,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){var l;let e=(l=o.options.pendingMinMs)==null?t.options.defaultPendingMinMs:l;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=f();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return k(i.error)||b(),ct(t,o,i.error);if(i.status===`redirected`)throw j(i.error)||b(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),pt=X.memo(function(){let e=u(),t=X.useContext(M),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=h(a,e=>{var t;return[e==null?void 0:e.routeId,(t=e==null?void 0:e.globalNotFound)==null?!1:t]}),i=h(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||b(),ct(e,a,void 0);if(!i)return null;let s=(0,Z.jsx)(lt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:o,children:s}):s}),$=null;function mt(){return $||(typeof window>`u`?($=`unknown`,$):window.__JEAN2_ELECTRON__?($=`electron`,$):`__TAURI_INTERNALS__`in window||`__TAURI__`in window?($=`tauri-mobile`,$):($=`web`,$))}function ht(){return mt()===`electron`}function gt(){return mt()===`tauri-mobile`}function _t(){return typeof navigator>`u`?!1:/Win/i.test(navigator.platform||navigator.userAgent)}export{lt as a,rt as c,J as d,Ge as f,_t as i,at as l,be as m,ht as n,pt as o,ye as p,gt as r,Q as s,mt as t,Je as u};
1
+ import{n as e,o as t,r as n}from"./compiler-runtime-DZXZ41-q.js";import{A as r,C as i,E as a,S as o,T as s,_ as c,b as l,d as u,g as d,h as f,m as p,p as m,u as h,v as g,w as _,y as v}from"./servers-GmYSnzvH.js";import{C as y,E as b,S as x,T as S,_ as C,b as w,c as T,d as E,g as D,i as O,l as k,m as A,o as j,p as ee,r as M,u as N,w as P,x as F,y as I}from"./useParams-RuFKFrOo.js";function te(){try{return typeof window<`u`&&typeof window.sessionStorage==`object`?window.sessionStorage:void 0}catch{return}}var L=`tsr-scroll-restoration-v1_3`;function ne(){let e=te();if(!e)return null;let t={};try{let n=JSON.parse(e.getItem(`tsr-scroll-restoration-v1_3`)||`{}`);o(n)&&(t=n)}catch{}return{get state(){return t},set:e=>{t=v(e,t)||t},persist:()=>{try{e.setItem(L,JSON.stringify(t))}catch{}}}}var re=ne(),ie=e=>e.state.__TSR_key||e.href;function ae(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var R=!1,z=`window`,oe=`data-scroll-restoration-id`;function se(e,t){var n;if(!re)return;let r=re;if((n=t==null?e.options.scrollRestoration:t)!=null&&n&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,R=!1;let i=e.options.getScrollRestorationKey||ie,a=new Map;window.history.scrollRestoration=`manual`;let s=t=>{if(!(R||!e.isScrollRestoring))if(t.target===document||t.target===window)a.set(z,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{let e=t.target;a.set(e,{scrollX:e.scrollLeft||0,scrollY:e.scrollTop||0})}},c=t=>{var n;if(!e.isScrollRestoring||!t||a.size===0||!r)return;let i=(n=r.state)[t]||(n[t]={});for(let[e,t]of a){let n;if(e===z)n=z;else if(e.isConnected){let t=e.getAttribute(oe);n=t?`[${oe}="${t}"]`:ae(e)}n&&(i[n]=t)}};document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{c(e.fromLocation?i(e.fromLocation):void 0),a.clear()}),window.addEventListener(`pagehide`,()=>{var t;c(i((t=e.stores.resolvedLocation.state)==null?e.stores.location.state:t)),r.persist()}),e.subscribe(`onRendered`,t=>{let n=i(t.toLocation),s=e.options.scrollRestorationBehavior,c=e.options.scrollToTopSelectors;if(a.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))){R=!0;try{let t=e.isScrollRestoring?r.state[n]:void 0,i=!1;if(t)for(let e in t){let n=t[e];if(!o(n))continue;let{scrollX:r,scrollY:a}=n;if(!(!Number.isFinite(r)||!Number.isFinite(a))){if(e===z)window.scrollTo({top:a,left:r,behavior:s}),i=!0;else if(e){let t;try{t=document.querySelector(e)}catch{continue}t&&(t.scrollLeft=r,t.scrollTop=a,i=!0)}}}if(!i){let t=e.history.location.hash.slice(1);if(t){var l,u;let e=(l=(u=window.history.state)==null?void 0:u.__hashScrollIntoViewOptions)==null?!0:l;if(e){let n=document.getElementById(t);n&&n.scrollIntoView(e)}}else{let e={top:0,left:0,behavior:s};if(window.scrollTo(e),c)for(let t of c){if(t===z)continue;let n=typeof t==`function`?t():document.querySelector(t);n&&n.scrollTo(e)}}}}finally{R=!1}e.isScrollRestoring&&r.set(e=>(e[n]||(e[n]={}),e))}})}function ce(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function le(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function ue(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=le(r):Array.isArray(t)?t.push(le(r)):n[e]=[t,le(r)]}return n}var de=pe(JSON.parse),fe=me(JSON.stringify,JSON.parse);function pe(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=ue(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function me(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=ce(e,r);return t?`?${t}`:``}}function he(e){return{input:({url:t})=>{for(let n of e)t=_e(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ve(e[n],t);return t}}}function ge(e){let t=C(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=A([`/`,t,e.pathname]),e)}}function _e(e,t){var n;let r=e==null||(n=e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function ve(e,t){var n;let r=e==null||(n=e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r==`string`)return new URL(r);if(r instanceof URL)return r}return t}function ye(e){let t=e;return{get state(){return t},setState(e){t=e(t)}}}function be(e){return{get state(){return e()}}}function xe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>Se(o,_.state)),x=r(()=>Se(s,v.state)),C=r(()=>Se(c,y.state)),w=r(()=>_.state[0]),T=r(()=>_.state.some(e=>{var t;return((t=o.get(e))==null?void 0:t.state.status)===`pending`})),E=r(()=>{var e;return{locationHref:p.state.href,resolvedLocationHref:(e=m.state)==null?void 0:e.href,status:l.state}}),D=r(()=>({status:l.state,loadedAt:u.state,isLoading:d.state,isTransitioning:f.state,matches:b.state,location:p.state,resolvedLocation:m.state,statusCode:h.state,redirect:g.state})),O=S(64);function k(e){let t=O.get(e);return t||(t=r(()=>{let t=_.state;for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.state}}),O.set(e,t)),t}let A={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingMatchesId:v,cachedMatchesId:y,activeMatchesSnapshot:b,pendingMatchesSnapshot:x,cachedMatchesSnapshot:C,firstMatchId:w,hasPendingMatches:T,matchRouteReactivity:E,activeMatchStoresById:o,pendingMatchStoresById:s,cachedMatchStoresById:c,__store:D,getMatchStoreByRouteId:k,setActiveMatches:j,setPendingMatches:ee,setCachedMatches:M};j(e.matches),a==null||a(A);function j(e){Ce(e,o,_,n,i)}function ee(e){Ce(e,s,v,n,i)}function M(e){Ce(e,c,y,n,i)}return A}function Se(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.state)}return n}function Ce(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.state!==n&&e.setState(()=>n)}p(n.state,a)||n.setState(()=>a)})}var we=e=>{if(!e.rendered){var t;return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)}},Te=e=>e.stores.matchesId.state.some(t=>{var n;return(n=e.stores.activeMatchStoresById.get(t))==null?void 0:n.state._forcePending}),B=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),V=(e,t,n=!0)=>{var r;let i={...(r=e.router.options.context)==null?{}:r},a=n?t:t-1;for(let t=0;t<=a;t++){let n=e.matches[t];if(!n)continue;let r=e.router.getMatch(n.id);r&&Object.assign(i,r.__routeContext,r.__beforeLoadContext)}return i},Ee=(e,t)=>{var n;if(!e.matches.length)return;let r=t.routeId,i=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),a=i>=0?i:0,o=r?e.matches.findIndex(e=>e.routeId===r):(n=e.firstBadMatchIndex)==null?e.matches.length-1:n;o<0&&(o=a);for(let t=o;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return r?o:a},H=(e,t,n)=>{if(!(!j(n)&&!k(n))){if(j(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){var r,i,a;(r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:j(n)?`redirected`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),k(n)&&!n.routeId&&(n.routeId=t.routeId),(a=t._nonReactive.loadPromise)==null||a.resolve()}throw j(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n}},De=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Oe=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},U=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex!=null||(e.firstBadMatchIndex=t),H(e,e.router.getMatch(i),n);try{var s,c;(s=(c=o.options).onError)==null||s.call(c,n)}catch(t){n=t,H(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>{var t,r;return(t=e._nonReactive.beforeLoadPromise)==null||t.resolve(),e._nonReactive.beforeLoadPromise=void 0,(r=e._nonReactive.loadPromise)==null||r.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!j(n)&&!k(n)&&(e.serialError!=null||(e.serialError=n))},ke=(e,t,n,r)=>{var i,a,o;if(r._nonReactive.pendingTimeout!==void 0)return;let s=(i=n.options.pendingMs)==null?e.router.options.defaultPendingMs:i;if(e.onReady&&!B(e,t)&&(n.options.loader||n.options.beforeLoad||ze(n))&&typeof s==`number`&&s!==1/0&&((a=n.options.pendingComponent)==null?(o=e.router.options)!=null&&o.defaultPendingComponent:a)){let t=setTimeout(()=>{we(e)},s);r._nonReactive.pendingTimeout=t}},Ae=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;ke(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},je=(e,t,n,r)=>{let a=e.router.getMatch(t),o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=f(()=>{o==null||o.resolve(),o=void 0});let{paramsError:s,searchError:c}=a;s&&U(e,n,s,`PARSE_PARAMS`),c&&U(e,n,c,`VALIDATE_SEARCH`),ke(e,t,r,a);let l=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:l})))},p=()=>{var n;(n=a._nonReactive.beforeLoadPromise)==null||n.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),p()});return}a._nonReactive.beforeLoadPromise=f();let m={...V(e,n,!1),...a.__routeContext},{search:h,params:g,cause:_}=a,v=B(e,t),y={search:h,abortController:l,params:g,preload:v,context:m,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),p()});return}(j(r)||k(r))&&(d(),U(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),p()})},x;try{if(x=r.options.beforeLoad(y),i(x))return d(),x.catch(t=>{U(e,n,t,`BEFORE_LOAD`)}).then(b)}catch(t){d(),U(e,n,t,`BEFORE_LOAD`)}b(x)},Me=(e,t)=>{let{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],o=()=>c(),s=()=>je(e,n,t,a),c=()=>{if(De(e,n))return;let t=Ae(e,n,a);return i(t)?t.then(s):s()};return o()},Ne=(e,t,n)=>{var r,i,a,o,s,c;let l=e.router.getMatch(t);if(!l||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let u={ssr:e.router.options.ssr,matches:e.matches,match:l,params:l.params,loaderData:l.loaderData};return Promise.all([(r=(i=n.options).head)==null?void 0:r.call(i,u),(a=(o=n.options).scripts)==null?void 0:a.call(o,u),(s=(c=n.options).headers)==null?void 0:s.call(c,u)]).then(([e,t,n])=>({meta:e==null?void 0:e.meta,links:e==null?void 0:e.links,headScripts:e==null?void 0:e.scripts,headers:n,scripts:t,styles:e==null?void 0:e.styles}))},Pe=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=B(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Fe=async(e,t,n,r,a)=>{try{let d=e.router.getMatch(n);try{W(a);let o=a.options.loader,s=typeof o==`function`?o:o==null?void 0:o.handler,c=s==null?void 0:s(Pe(e,t,n,r,a)),l=!!s&&i(c);if((l||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}a._lazyPromise&&await a._lazyPromise;let u=d._nonReactive.minPendingPromise;u&&await u,a._componentsPromise&&await a._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){var o,s;let i=t;if((i==null?void 0:i.name)===`AbortError`){if(d.abortController.signal.aborted){var c;(c=d._nonReactive.loaderPromise)==null||c.resolve(),d._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let f=d._nonReactive.minPendingPromise;f&&await f,k(t)&&await((o=a.options.notFoundComponent)==null||(s=o.preload)==null?void 0:s.call(o)),H(e,e.router.getMatch(n),t);try{var l,u;(l=(u=a.options).onError)==null||l.call(u,t)}catch(t){i=t,H(e,e.router.getMatch(n),t)}!j(i)&&!k(i)&&await W(a,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:i,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},Ie=async(e,t,n)=>{var r;async function i(r,i,o,l,u){var f,p,m,h;let g=Date.now()-i.updatedAt,_=r?(f=(p=u.options.preloadStaleTime)==null?e.router.options.defaultPreloadStaleTime:p)==null?3e4:f:(m=(h=u.options.staleTime)==null?e.router.options.defaultStaleTime:h)==null?0:m,v=u.options.shouldReload,y=typeof v==`function`?v(Pe(e,t,a,n,u)):v,{status:b,invalid:x}=l,S=g>=_&&(!!e.forceStaleReload||l.cause===`enter`||o!==void 0&&o!==l.id);s=b===`success`&&(x||(y==null?S:y)),r&&u.options.preload===!1||(s&&!e.sync&&d?(c=!0,(async()=>{try{var r,i;await Fe(e,t,a,n,u);let o=e.router.getMatch(a);(r=o._nonReactive.loaderPromise)==null||r.resolve(),(i=o._nonReactive.loadPromise)==null||i.resolve(),o._nonReactive.loaderPromise=void 0,o._nonReactive.loadPromise=void 0}catch(t){j(t)&&await e.router.navigate(t.options)}})()):b!==`success`||s?await Fe(e,t,a,n,u):Oe(e,a,n))}let{id:a,routeId:o}=e.matches[n],s=!1,c=!1,l=e.router.looseRoutesById[o],u=l.options.loader,d=((r=typeof u==`function`||u==null?void 0:u.staleReloadMode)==null?e.router.options.defaultStaleReloadMode:r)!==`blocking`;if(De(e,a)){if(!e.router.getMatch(a))return e.matches[n];Oe(e,a,n)}else{var p,m;let t=e.router.getMatch(a),r=e.router.stores.matchesId.state[n],s=((p=r&&e.router.stores.activeMatchStoresById.get(r)||null)==null?void 0:p.routeId)===o?r:(m=e.router.stores.activeMatchesSnapshot.state.find(e=>e.routeId===o))==null?void 0:m.id,c=B(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&d)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),r=n._nonReactive.error||n.error;r&&H(e,n,r),n.status===`pending`&&await i(c,t,s,n,l)}else{let n=c&&!e.router.stores.activeMatchStoresById.has(a),r=e.router.getMatch(a);r._nonReactive.loaderPromise=f(),n!==r.preload&&e.updateMatch(a,e=>({...e,preload:n})),await i(c,t,s,r,l)}}let h=e.router.getMatch(a);if(!c){var g,_;(g=h._nonReactive.loaderPromise)==null||g.resolve(),(_=h._nonReactive.loadPromise)==null||_.resolve(),h._nonReactive.loadPromise=void 0}clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;let v=c?h.isFetching:!1;return v!==h.isFetching||h.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:v,invalid:!1})),e.router.getMatch(a)):h};async function Le(e){var t,n;let r=e,a=[];Te(r.router)&&we(r);let o;for(let e=0;e<r.matches.length;e++){try{let t=Me(r,e);i(t)&&await t}catch(e){if(j(e))throw e;if(k(e))o=e;else if(!r.preload)throw e;break}if(r.serialError||r.firstBadMatchIndex!=null)break}let s=(t=r.firstBadMatchIndex)==null?r.matches.length:t,c=o&&!r.preload?Ee(r,o):void 0,l=o&&r.preload?0:c===void 0?s:Math.min(c+1,s),u,d;for(let e=0;e<l;e++)a.push(Ie(r,a,e));try{await Promise.all(a)}catch{let e=await Promise.allSettled(a);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(j(e))throw e;k(e)?u!=null||(u=e):d!=null||(d=e)}if(d!==void 0)throw d}let f=(n=u)==null?o&&!r.preload?o:void 0:n,p=r.firstBadMatchIndex===void 0?r.matches.length-1:r.firstBadMatchIndex;if(!f&&o&&r.preload)return r.matches;if(f){var m;let e=Ee(r,f);e===void 0&&b();let t=r.matches[e],n=r.router.looseRoutesById[t.routeId],i=(m=r.router.options)==null?void 0:m.defaultNotFoundComponent;!n.options.notFoundComponent&&i&&(n.options.notFoundComponent=i),f.routeId=t.routeId;let a=t.routeId===r.router.routeTree.id;r.updateMatch(t.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:f},isFetching:!1})),p=e,await W(n,[`notFoundComponent`])}else if(!r.preload){let e=r.matches[0];if(!e.globalNotFound){var h;(h=r.router.getMatch(e.id))!=null&&h.globalNotFound&&r.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}}if(r.serialError&&r.firstBadMatchIndex!==void 0){let e=r.router.looseRoutesById[r.matches[r.firstBadMatchIndex].routeId];await W(e,[`errorComponent`])}for(let e=0;e<=p;e++){let{id:t,routeId:n}=r.matches[e],i=r.router.looseRoutesById[n];try{let e=Ne(r,t,i);if(e){let n=await e;r.updateMatch(t,e=>({...e,...n}))}}catch(e){console.error(`Error executing head for route ${n}:`,e)}}let g=we(r);if(i(g)&&await g,f)throw f;if(r.serialError&&!r.preload&&!r.onReady)throw r.serialError;return r.matches}function Re(e,t){let n=t.map(t=>{var n,r;return(n=e.options[t])==null||(r=n.preload)==null?void 0:r.call(n)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function W(e,t=G){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===G?(()=>{if(e._componentsPromise===void 0){let t=Re(e,G);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Re(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ze(e){var t;for(let n of G)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var G=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],K=`__TSR_index`,Be=`popstate`,Ve=`beforeunload`;function He(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{var i;(i=e.notifyOnIndexChange)==null||i?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{var a,o,s;if((a=r==null?void 0:r.ignoreBlocker)!=null&&a){n();return}let c=(o=(s=e.getBlockers)==null?void 0:s.call(e))==null?[]:o,l=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&c.length&&l)for(let n of c){let r=q(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){var u;(u=e.onBlocked)==null||u.call(e);return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[K];i=Ue(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[K];i=Ue(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{var n;e.back((n=t==null?void 0:t.ignoreBlocker)==null?!1:n),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{var n;e.forward((n=t==null?void 0:t.ignoreBlocker)==null?!1:n),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[K]!==0,createHref:t=>e.createHref(t),block:t=>{var n,r;if(!e.setBlockers)return()=>{};let i=(n=(r=e.getBlockers)==null?void 0:r.call(e))==null?[]:n;return e.setBlockers([...i,t]),()=>{var n,r,i;let a=(n=(r=e.getBlockers)==null?void 0:r.call(e))==null?[]:n;(i=e.setBlockers)==null||i.call(e,a.filter(e=>e!==t))}},flush:()=>{var t;return(t=e.flush)==null?void 0:t.call(e)},destroy:()=>{var t;return(t=e.destroy)==null?void 0:t.call(e)},notify:r}}function Ue(e,t){t||(t={});let n=qe();return{...t,key:n,__TSR_key:n,[K]:e}}function We(e){var t,n,r,i,a;let o=(t=e==null?void 0:e.window)==null?typeof document<`u`?window:void 0:t,s=o.history.pushState,c=o.history.replaceState,l=[],u=()=>l,d=e=>l=e,f=(n=e==null?void 0:e.createHref)==null?(e=>e):n,p=(r=e==null?void 0:e.parseLocation)==null?(()=>q(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state)):r;if(!((i=o.history.state)!=null&&i.__TSR_key)&&!((a=o.history.state)!=null&&a.key)){let e=qe();o.history.replaceState({[K]:0,key:e,__TSR_key:e},``)}let m=p(),h,g=!1,_=!1,v=!1,y=!1,b=()=>m,x,S,C=()=>{x&&(O._ignoreSubscribers=!0,(x.isPush?o.history.pushState:o.history.replaceState)(x.state,``,x.href),O._ignoreSubscribers=!1,x=void 0,S=void 0,h=void 0)},w=(e,t,n)=>{let r=f(t);S||(h=m),m=q(t,n),x={href:r,state:n,isPush:(x==null?void 0:x.isPush)||e===`push`},S||(S=Promise.resolve().then(()=>C()))},T=e=>{m=p(),O.notify({type:e})},E=async()=>{if(_){_=!1;return}let e=p(),t=e.state[K]-m.state[K],n=t===1,r=t===-1,i=!n&&!r||g;g=!1;let a=i?`GO`:r?`BACK`:`FORWARD`,s=i?{type:`GO`,index:t}:{type:r?`BACK`:`FORWARD`};if(v)v=!1;else{let t=u();if(typeof document<`u`&&t.length){for(let n of t)if(await n.blockerFn({currentLocation:m,nextLocation:e,action:a})){_=!0,o.history.go(1),O.notify(s);return}}}m=p(),O.notify(s)},D=e=>{if(y){y=!1;return}let t=!1,n=u();if(typeof document<`u`&&n.length)for(let e of n){var r;let n=(r=e.enableBeforeUnload)==null?!0:r;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},O=He({getLocation:b,getLength:()=>o.history.length,pushState:(e,t)=>w(`push`,e,t),replaceState:(e,t)=>w(`replace`,e,t),back:e=>(e&&(v=!0),y=!0,o.history.back()),forward:e=>{e&&(v=!0),y=!0,o.history.forward()},go:e=>{g=!0,o.history.go(e)},createHref:e=>f(e),flush:C,destroy:()=>{o.history.pushState=s,o.history.replaceState=c,o.removeEventListener(Ve,D,{capture:!0}),o.removeEventListener(Be,E)},onBlocked:()=>{h&&m!==h&&(m=h)},getBlockers:u,setBlockers:d,notifyOnIndexChange:!1});return o.addEventListener(Ve,D,{capture:!0}),o.addEventListener(Be,E),o.history.pushState=function(...e){let t=s.apply(o.history,e);return O._ignoreSubscribers||T(`PUSH`),t},o.history.replaceState=function(...e){let t=c.apply(o.history,e);return O._ignoreSubscribers||T(`REPLACE`),t},O}function Ge(e){var t;let n=(t=e==null?void 0:e.window)==null?typeof document<`u`?window:void 0:t;return We({window:n,parseLocation:()=>{var e;let t=n.location.hash.split(`#`).slice(1),r=(e=t[0])==null?`/`:e,i=n.location.search,a=t.slice(1);return q(`${r}${i}${a.length===0?``:`#${a.join(`#`)}`}`,n.history.state)},createHref:e=>`${n.location.pathname}${n.location.search}#${e}`})}function Ke(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function q(e,t){let n=Ke(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=qe();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[K]:0,key:a,__TSR_key:a}}}function qe(){return(Math.random()+1).toString(36).substring(7)}function J(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var Je=class{constructor(e,t){var n,r,i,o,u;this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{var t,n,r,i,a,o;let s=this.options,c=(t=(n=this.basepath)==null?s==null?void 0:s.basepath:n)==null?`/`:t,l=this.basepath===void 0,u=s==null?void 0:s.rewrite;if(this.options={...s,...e},this.isServer=(r=this.options.isServer)==null?typeof document>`u`:r,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=E(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=We()),this.origin=this.options.origin,this.origin||((i=window)!=null&&i.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=S(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=xe(Xe(this.latestLocation),e),se(this)}let d=!1,f=(a=this.options.basepath)==null?`/`:a,p=this.options.rewrite;if(l||c!==f||u!==p){this.basepath=f;let e=[],t=C(f);t&&t!==`/`&&e.push(ge({basepath:f})),p&&e.push(p),this.rewrite=e.length===0?void 0:e.length===1?e[0]:he(e),this.history&&this.updateLatestLocation(),d=!0}d&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof((o=window.CSS)==null?void 0:o.supports)==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=P(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&y(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:o})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),c=this.options.stringifySearch(i);return{href:e+c+r,publicHref:e+c+r,pathname:d(e).path,external:!1,searchStr:c,search:s(t==null?void 0:t.search,i),hash:d(r.slice(1)).path,state:a(t==null?void 0:t.state,o)}}let c=new URL(i,this.origin),l=_e(this.rewrite,c),u=this.options.parseSearch(l.search),f=this.options.stringifySearch(u);return l.search=f,{href:l.href.replace(l.origin,``),publicHref:i,pathname:d(l.pathname).path,external:!!this.rewrite&&l.origin!==this.origin,searchStr:f,search:s(t==null?void 0:t.search,u),hash:d(l.hash.slice(1)).path,state:a(t==null?void 0:t.state,o)}},r=n(e),{__tempLocation:i,__tempKey:o}=r.state;if(i&&(!o||o===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>D({base:e,to:N(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Qe({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.state.forEach(e=>{var t;if(this.stores.pendingMatchStoresById.has(e))return;let n=(t=this.stores.activeMatchStoresById.get(e))==null?void 0:t.state;n&&(n.status===`pending`||n.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{var n,r,i;let o=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(o);t.from;let l=t.unsafeRelative===`path`?o.pathname:(n=t.from)==null?c.fullPath:n,u=this.resolvePathWithBase(l,`.`),f=c.search,p=Object.assign(Object.create(null),c.params),m=t.to?this.resolvePathWithBase(u,`${t.to}`):this.resolvePathWithBase(u,`.`),h=t.params===!1||t.params===null?Object.create(null):((r=t.params)==null?!0:r)===!0?p:Object.assign(p,v(t.params,p)),_=this.getMatchedRoutes(m),y=_.matchedRoutes;if((!_.foundRoute||_.foundRoute.path!==`/`&&_.routeParams[`**`])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(h).length>0)for(let e of y){var b,x;let t=(b=(x=e.options.params)==null?void 0:x.stringify)==null?e.options.stringifyParams:b;if(t)try{Object.assign(h,t(h))}catch{}}let S=e.leaveParams?m:d(ee({path:m,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,C=f;if(e._includeValidateSearch&&(i=this.options.search)!=null&&i.strict){let e={};y.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Ze(t.options.validateSearch,{...e,...C}))}catch{}}),C=e}C=$e({search:C,dest:t,destRoutes:y,_includeValidateSearch:e._includeValidateSearch}),C=s(f,C);let w=this.options.stringifySearch(C),T=t.hash===!0?o.hash:t.hash?v(t.hash,o.hash):void 0,E=T?`#${T}`:``,D=t.state===!0?o.state:t.state?v(t.state,o.state):{};D=a(o.state,D);let O=`${S}${w}${E}`,k,A,j=!1;if(this.rewrite){let e=new URL(O,this.origin),t=ve(this.rewrite,e);k=e.href.replace(e.origin,``),t.origin===this.origin?A=t.pathname+t.search+t.hash:(A=t.href,j=!0)}else k=g(O),A=k;return{publicHref:A,href:k,pathname:S,search:C,searchStr:w,state:D,hash:T==null?``:T,external:j,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=w(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s==null?!0:s)===!0?n:Object.assign(n,v(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{var r;let i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=c(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=I(this.latestLocation.href)===I(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=f(()=>{o==null||o.resolve(),o=void 0}),a&&i())this.load();else{var s;let{maskedLocation:r,hashScrollIntoView:i,...a}=n;if(r){var l,u;a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l=(u=a.unmaskOnReload)==null?this.options.unmaskOnReload:u)!=null&&l&&(a.state.__tempKey=this.tempLocationKey)}a.state.__hashScrollIntoViewOptions=(s=i==null?this.options.defaultHashScrollIntoView:i)==null?!0:s,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=(r=n.resetScroll)==null?!0:r,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=q(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=_e(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){var o,s;let t=this.buildLocation({to:e,...i});n=(o=n)==null?t.publicHref:o,r=(s=r)==null?t.publicHref:s}let t=!a&&r?r:n;if(l(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){var c,u,d;let e=(c=(u=(d=this.history).getBlockers)==null?void 0:u.call(d))==null?[]:c;for(let t of e)if(t!=null&&t.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatchesSnapshot.state.filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.setState(()=>`pending`),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(e),this.stores.setCachedMatches(t)})},this.load=async e=>{var t;let n,r,i,a=(t=this.stores.resolvedLocation.state)==null?this.stores.location.state:t;for(i=new Promise(t=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.stores.resolvedLocation.state,r=J(t,n);this.stores.redirect.state||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Le({router:this,sync:e==null?void 0:e.sync,forceStaleReload:a.href===t.href,matches:this.stores.pendingMatchesSnapshot.state,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatchesSnapshot.state,a=i.length,o=this.stores.activeMatchesSnapshot.state;e=a?o.filter(e=>!this.stores.pendingMatchStoresById.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStoresById.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),a&&(this.stores.setActiveMatches(i),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,o]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]]){var i,a;if(e)for(let t of e)(i=(a=this.looseRoutesById[t.routeId].options)[o])==null||i.call(a,t)}})})}})}catch(e){j(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):k(e)&&(r=e);let t=n?n.status:r?404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>t),this.stores.redirect.setState(()=>n)})}if(this.latestLoadPromise===i){var o;(o=this.commitLocationPromise)==null||o.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0}t()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.setState(()=>o)},this.startViewTransition=e=>{var t;let n=(t=this.shouldViewTransition)==null?this.options.defaultViewTransition:t;if(this.shouldViewTransition=void 0,n&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let t;if(typeof n==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.state,a=typeof n.types==`function`?n.types(J(r,i)):n.types;if(a===!1){e();return}t={update:e,types:a}}else t=e;document.startViewTransition(t)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStoresById.get(e);if(n){n.setState(t);return}let r=this.stores.activeMatchStoresById.get(e);if(r){r.setState(t);return}let i=this.stores.cachedMatchStoresById.get(e);if(i){let n=t(i.state);n.status===`redirected`?this.stores.cachedMatchStoresById.delete(e)&&this.stores.cachedMatchesId.setState(t=>t.filter(t=>t!==e)):i.setState(()=>n)}})},this.getMatch=e=>{var t,n,r,i,a;return(t=(n=(r=this.stores.cachedMatchStoresById.get(e))==null?void 0:r.state)==null?(i=this.stores.pendingMatchStoresById.get(e))==null?void 0:i.state:n)==null?(a=this.stores.activeMatchStoresById.get(e))==null?void 0:a.state:t},this.invalidate=e=>{let t=t=>{var n,r;return(n=e==null||(r=e.filter)==null?void 0:r.call(e,t))==null||n?{...t,invalid:!0,...e!=null&&e.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(t)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(t)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(t))}),this.shouldViewTransition=!1,this.load({sync:e==null?void 0:e.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){var n;let t=(n=e.options._builtLocation)==null?this.buildLocation(e.options):n,r=this.getParsedLocationHref(t);e.options.href=r,e.headers.set(`Location`,r)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&l(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e==null?void 0:e.filter;t===void 0?this.stores.setCachedMatches([]):this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{var n,r,i;let a=this.looseRoutesById[t.routeId];if(!a.options.loader)return!0;let o=(n=t.preload?(r=a.options.preloadGcTime)==null?this.options.defaultPreloadGcTime:r:(i=a.options.gcTime)==null?this.options.defaultGcTime:i)==null?300*1e3:n;return t.status===`error`?!0:e-t.updatedAt>=o}})},this.loadRouteChunk=W,this.preloadRoute=async e=>{var t;let n=(t=e._builtLocation)==null?this.buildLocation(e):t,r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:e}),i=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),a=new Set([...i,...this.stores.cachedMatchesId.state]),o=r.filter(e=>!a.has(e.id));if(o.length){let e=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...e,...o])}try{return r=await Le({router:this,matches:r,location:n,preload:!0,updateMatch:(e,t)=>{i.has(e)?r=r.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),r}catch(e){if(j(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:n});k(e)||console.error(e);return}},this.matchRoute=(e,t)=>{var n,r,i;let a={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},o=this.buildLocation(a);if(t!=null&&t.pending&&this.stores.status.state!==`pending`)return!1;let s=((t==null?void 0:t.pending)===void 0?!this.stores.isLoading.state:t.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,l=x(o.pathname,(n=t==null?void 0:t.caseSensitive)==null?!1:n,(r=t==null?void 0:t.fuzzy)==null?!1:r,s.pathname,this.processedTree);return!l||e.params&&!c(l.rawParams,e.params,{partial:!0})?!1:(i=t==null?void 0:t.includeSearch)==null||i?c(s.search,o.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:(n=e.caseSensitive)==null?!1:n,notFoundMode:(r=e.notFoundMode)==null?`fuzzy`:r,stringifySearch:(i=e.stringifySearch)==null?fe:i,parseSearch:(o=e.parseSearch)==null?de:o,protocolAllowlist:(u=e.protocolAllowlist)==null?m:u}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){var t,n,r;return e!=null&&e.id?(n=(r=e.context)==null?this.options.context:r)==null?void 0:n:(t=this.options.context)==null?void 0:t}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n,{matchedRoutes:c}=n,l=!1;(r?r.path!==`/`&&i[`**`]:I(e.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:l=!0);let u=l?tt(this.options.notFoundMode,c):void 0,d=Array(c.length),p=new Map;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&p.set(e.routeId,e.state);for(let n=0;n<c.length;n++){var m,h,g,_,v;let r=c[n],l=d[n-1],C,w,T;{var y,b;let n=(y=l==null?void 0:l.search)==null?e.search:y,i=(b=l==null?void 0:l._strictSearch)==null?void 0:b;try{var x;let e=(x=Ze(r.options.validateSearch,{...n}))==null?void 0:x;C={...n,...e},w={...i,...e},T=void 0}catch(e){let r=e;if(e instanceof Y||(r=new Y(e.message,{cause:e})),t!=null&&t.throwOnError)throw r;C=n,w={},T=r}}let E=(m=(h=(g=r.options).loaderDeps)==null?void 0:h.call(g,{search:C}))==null?``:m,D=E?JSON.stringify(E):``,{interpolatedPath:O,usedParams:A}=ee({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),M=r.id+O+D,N=this.getMatch(M),P=p.get(r.id),F=(_=N==null?void 0:N._strictParams)==null?A:_,I;if(!N)try{nt(r,A,o,F)}catch(e){if(I=k(e)||j(e)?e:new Ye(e.message,{cause:e}),t!=null&&t.throwOnError)throw I}Object.assign(i,F);let te=P?`stay`:`enter`,L;if(N)L={...N,cause:te,params:(v=P==null?void 0:P.params)==null?i:v,_strictParams:F,search:s(P?P.search:N.search,C),_strictSearch:w};else{var S;let e=r.options.loader||r.options.beforeLoad||r.lazyFn||ze(r)?`pending`:`success`;L={id:M,ssr:r.options.ssr,index:n,routeId:r.id,params:(S=P==null?void 0:P.params)==null?i:S,_strictParams:F,pathname:O,updatedAt:Date.now(),search:P?s(P.search,C):C,_strictSearch:w,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:f()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:te,loaderDeps:P?a(P.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t!=null&&t.preload||(L.globalNotFound=u===r.id),L.searchError=T;let ne=this.getParentContext(l);L.context={...ne,...L.__routeContext,...L.__beforeLoadContext},d[n]=L}for(let t=0;t<d.length;t++){let n=d[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=p.get(n.routeId);if(n.params=o?s(o.params,i):i,!a){let i=d[t-1],a=this.getParentContext(i);if(r.options.context){var C;let t={deps:n.loaderDeps,params:n.params,context:a==null?{}:a,location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:d,routeId:r.id};n.__routeContext=(C=r.options.context(t))==null?void 0:C}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return d}matchRoutesLightweight(e){var t;let{matchedRoutes:n,routeParams:r,parsedParams:i}=this.getMatchedRoutes(e.pathname),a=_(n),o={...e.search};for(let e of n)try{Object.assign(o,Ze(e.options.validateSearch,o))}catch{}let s=_(this.stores.matchesId.state),c=s&&((t=this.stores.activeMatchStoresById.get(s))==null?void 0:t.state),l=c&&c.routeId===a.id&&c.pathname===e.pathname,u;if(l)u=c.params;else{let e=Object.assign(Object.create(null),r);for(let t of n)try{nt(t,r,i==null?{}:i,e)}catch{}u=e}return{matchedRoutes:n,fullPath:a.fullPath,search:o,params:u}}},Y=class extends Error{},Ye=class extends Error{};function Xe(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ze(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Y(`Async validation not supported`);if(n.issues)throw new Y(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Qe({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=I(e),a,o,s=F(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign(Object.create(null),s.parsedParams)),{matchedRoutes:(s==null?void 0:s.branch)||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function $e({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return et(n)(e,t,r==null?!1:r)}function et(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let r of e){if(`search`in r.options){var n;(n=r.options.search)!=null&&n.middlewares&&t.middlewares.push(...r.options.search.middlewares)}else (r.options.preSearchFilters||r.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let n=e;`preSearchFilters`in r.options&&r.options.preSearchFilters&&(n=r.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(n);return`postSearchFilters`in r.options&&r.options.postSearchFilters?r.options.postSearchFilters.reduce((e,t)=>t(e),i):i});r.options.validateSearch&&t.middlewares.push(({search:e,next:n})=>{let i=n(e);if(!t._includeValidateSearch)return i;try{var a;return{...i,...(a=Ze(r.options.validateSearch,i))==null?void 0:a}}catch{return i}})}t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:v(n.search,e):{}});let r=(e,t,n)=>{if(e>=n.length)return t;let i=n[e];return i({search:t,next:t=>r(e+1,t,n)})};return function(e,n,i){return t.dest=n,t._includeValidateSearch=i,r(0,e,t.middlewares)}}function tt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return T}function nt(e,t,n,r){var i,a;let o=(i=(a=e.options.params)==null?void 0:a.parse)==null?e.options.parseParams:i;if(o)if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=o(r);Object.assign(r,e)}}var X=t(n(),1),Z=e();function rt(e){var t;let n=(t=e.errorComponent)==null?at:t;return(0,Z.jsx)(it,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:t,reset:r})=>t?X.createElement(n,{error:t,reset:r}):e.children})}var it=class extends X.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function at({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ot(e){let t=u(),n=`not-found-${h(t.stores.location,e=>e.pathname)}-${h(t.stores.status,e=>e)}`;return(0,Z.jsx)(rt,{getResetKey:()=>n,onCatch:(t,n)=>{var r;if(k(t))(r=e.onCatch)==null||r.call(e,t,n);else throw t},errorComponent:({error:t})=>{var n;if(k(t))return(n=e.fallback)==null?void 0:n.call(e,t);throw t},children:e.children})}function st(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function Q(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function ct(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(st,{})}var lt=X.memo(function({matchId:e}){let t=u(),n=t.stores.activeMatchStoresById.get(e);n||b();let r=h(t.stores.loadedAt,e=>e),i=h(n,e=>e);return(0,Z.jsx)(ut,{router:t,matchId:e,resetKey:r,matchState:X.useMemo(()=>{var e;let n=i.routeId,r=(e=t.routesById[n].parentRoute)==null?void 0:e.id;return{routeId:n,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:r}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function ut({router:e,matchId:t,resetKey:n,matchState:r}){var i,a,o,s,c,l,u,d,f;let p=e.routesById[r.routeId],m=(i=p.options.pendingComponent)==null?e.options.defaultPendingComponent:i,h=m?(0,Z.jsx)(m,{}):null,g=(a=p.options.errorComponent)==null?e.options.defaultErrorComponent:a,_=(o=p.options.onCatch)==null?e.options.defaultOnCatch:o,v=p.isRoot?(s=p.options.notFoundComponent)==null?(c=e.options.notFoundRoute)==null?void 0:c.options.component:s:p.options.notFoundComponent,y=r.ssr===!1||r.ssr===`data-only`,b=(!p.isRoot||p.options.wrapInSuspense||y)&&((l=(u=p.options.wrapInSuspense)==null?m:u)==null?(d=p.options.errorComponent)!=null&&d.preload||y:l)?X.Suspense:Q,x=g?rt:Q,S=v?ot:Q;return(0,Z.jsxs)(p.isRoot?(f=p.options.shellComponent)==null?Q:f:Q,{children:[(0,Z.jsx)(M.Provider,{value:t,children:(0,Z.jsx)(b,{fallback:h,children:(0,Z.jsx)(x,{getResetKey:()=>n,errorComponent:g||at,onCatch:(e,t)=>{if(k(e))throw e.routeId!=null||(e.routeId=r.routeId),e;_==null||_(e,t)},children:(0,Z.jsx)(S,{fallback:e=>{if(e.routeId!=null||(e.routeId=r.routeId),!v||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!p.isRoot)throw e;return X.createElement(v,e)},children:y||r._displayPending?(0,Z.jsx)(O,{fallback:h,children:(0,Z.jsx)(ft,{matchId:t})}):(0,Z.jsx)(ft,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(dt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function dt({resetKey:e}){let t=u(),n=X.useRef(void 0);return r(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...J(t.stores.location.state,t.stores.resolvedLocation.state)}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var ft=X.memo(function({matchId:e}){let t=u(),n=(e,n)=>{var r,i;return(r=(i=t.getMatch(e.id))==null?void 0:i._nonReactive[n])==null?e._nonReactive[n]:r},r=t.stores.activeMatchStoresById.get(e);r||b();let i=h(r,e=>e),a=i.routeId,o=t.routesById[a],s=X.useMemo(()=>{var e,n;let r=(e=(n=t.routesById[a].options.remountDeps)==null?t.options.defaultRemountDeps:n)==null?void 0:e({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return r?JSON.stringify(r):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=X.useMemo(()=>{var e;let n=(e=o.options.component)==null?t.options.defaultComponent:e;return n?(0,Z.jsx)(n,{},s):(0,Z.jsx)(pt,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){var l;let e=(l=o.options.pendingMinMs)==null?t.options.defaultPendingMinMs:l;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=f();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return k(i.error)||b(),ct(t,o,i.error);if(i.status===`redirected`)throw j(i.error)||b(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),pt=X.memo(function(){let e=u(),t=X.useContext(M),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=h(a,e=>{var t;return[e==null?void 0:e.routeId,(t=e==null?void 0:e.globalNotFound)==null?!1:t]}),i=h(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||b(),ct(e,a,void 0);if(!i)return null;let s=(0,Z.jsx)(lt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:o,children:s}):s}),$=null;function mt(){return $||(typeof window>`u`?($=`unknown`,$):window.__JEAN2_ELECTRON__?($=`electron`,$):`__TAURI_INTERNALS__`in window||`__TAURI__`in window?($=`tauri-mobile`,$):($=`web`,$))}function ht(){return mt()===`electron`}function gt(){return mt()===`tauri-mobile`}export{pt as a,at as c,Ge as d,ye as f,lt as i,Je as l,ht as n,Q as o,be as p,gt as r,rt as s,mt as t,J as u};
@@ -1 +1 @@
1
- import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import{$ as i,A as a,B as o,D as s,E as c,Et as l,F as u,H as d,I as f,J as p,L as m,M as h,N as g,O as _,P as v,Q as ee,R as te,U as y,V as b,W as x,Y as S,Z as C,_t as ne,b as w,it as T,k as E,nt as D,q as O,rt as k,tt as A,y as j,z as M}from"./badge-CxHTOx9D.js";import{t as N}from"./createLucideIcon-BYAVpx9Z.js";var P=N(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),F=N(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),I=t(n(),1),L=e(),R=`Popover`,[re,ie]=ee(R,[a]),z=a(),[ae,B]=re(R),oe=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=z(t),c=I.useRef(null),[l,u]=I.useState(!1),[d,f]=S({prop:r,defaultProp:i==null?!1:i,onChange:a,caller:R});return(0,L.jsx)(E,{...s,children:(0,L.jsx)(ae,{scope:t,contentId:O(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:I.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:I.useCallback(()=>u(!0),[]),onCustomAnchorRemove:I.useCallback(()=>u(!1),[]),modal:o,children:n})})};oe.displayName=R;var se=`PopoverAnchor`,ce=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=B(se,n),a=z(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return I.useEffect(()=>(o(),()=>s()),[o,s]),(0,L.jsx)(c,{...a,...r,ref:t})});ce.displayName=se;var le=`PopoverTrigger`,ue=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=B(le,n),o=z(n),s=k(t,a.triggerRef),l=(0,L.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ce(a.open),...r,ref:s,onClick:C(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:(0,L.jsx)(c,{asChild:!0,...o,children:l})});ue.displayName=le;var V=`PopoverPortal`,[de,fe]=re(V,{forceMount:void 0}),pe=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=B(V,t);return(0,L.jsx)(de,{scope:t,forceMount:n,children:(0,L.jsx)(p,{present:n||a.open,children:(0,L.jsx)(d,{asChild:!0,container:i,children:r})})})};pe.displayName=V;var H=`PopoverContent`,me=I.forwardRef((e,t)=>{let n=fe(H,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=B(H,e.__scopePopover);return(0,L.jsx)(p,{present:r||a.open,children:a.modal?(0,L.jsx)(ge,{...i,ref:t}):(0,L.jsx)(_e,{...i,ref:t})})});me.displayName=H;var he=A(`PopoverContent.RemoveScroll`),ge=I.forwardRef((e,t)=>{let n=B(H,e.__scopePopover),r=I.useRef(null),i=k(t,r),a=I.useRef(!1);return I.useEffect(()=>{let e=r.current;if(e)return M(e)},[]),(0,L.jsx)(o,{as:he,allowPinchZoom:!0,children:(0,L.jsx)(ve,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:C(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),a.current||(t=n.triggerRef.current)==null||t.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:C(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),_e=I.forwardRef((e,t)=>{let n=B(H,e.__scopePopover),r=I.useRef(!1),i=I.useRef(!1);return(0,L.jsx)(ve,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a;if((a=e.onCloseAutoFocus)==null||a.call(e,t),!t.defaultPrevented){var o;r.current||(o=n.triggerRef.current)==null||o.focus(),t.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:t=>{var a,o;(a=e.onInteractOutside)==null||a.call(e,t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let s=t.target;(o=n.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ve=I.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=B(H,n),p=z(n);return b(),(0,L.jsx)(y,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(x,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,L.jsx)(_,{"data-state":Ce(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.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)`}})})})}),ye=`PopoverClose`,be=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=B(ye,n);return(0,L.jsx)(i.button,{type:`button`,...r,ref:t,onClick:C(e.onClick,()=>a.onOpenChange(!1))})});be.displayName=ye;var xe=`PopoverArrow`,Se=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=z(n);return(0,L.jsx)(s,{...i,...r,ref:t})});Se.displayName=xe;function Ce(e){return e?`open`:`closed`}var we=oe,Te=ce,Ee=ue,De=pe,Oe=me,U=r(),ke=1,Ae=.9,je=.8,Me=.17,W=.1,G=.999,Ne=.9999,Pe=.99,Fe=/[\\\/_+.#"@\[\(\{&]/,Ie=/[\\\/_+.#"@\[\(\{&]/g,Le=/[\s-]/,Re=/[\s-]/g;function ze(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ke:Pe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=ze(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ke:Fe.test(e.charAt(l-1))?(d*=je,p=e.slice(i,l-1).match(Ie),p&&i>0&&(d*=G**+p.length)):Le.test(e.charAt(l-1))?(d*=Ae,m=e.slice(i,l-1).match(Re),m&&i>0&&(d*=G**+m.length)):(d*=Me,i>0&&(d*=G**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ne)),(d<W&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=ze(e,t,n,r,l+1,a+2,o),f*W>d&&(d=f*W)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Be(e){return e.toLowerCase().replace(Re,` `)}function Ve(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,ze(e,t,Be(e),Be(t),0,0,{})}var K=`[cmdk-group=""]`,He=`[cmdk-group-items=""]`,Ue=`[cmdk-group-heading=""]`,We=`[cmdk-item=""]`,Ge=`${We}:not([aria-disabled="true"])`,Ke=`cmdk-item-select`,q=`data-value`,qe=(e,t,n)=>Ve(e,t,n),Je=I.createContext(void 0),J=()=>I.useContext(Je),Ye=I.createContext(void 0),Xe=()=>I.useContext(Ye),Ze=I.createContext(void 0),Qe=I.forwardRef((e,t)=>{let n=Z(()=>{var t,n;return{search:``,value:(n=(t=e.value)==null?e.defaultValue:t)==null?``:n,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Z(()=>new Set),a=Z(()=>new Map),o=Z(()=>new Map),s=Z(()=>new Set),c=lt(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,ee=O(),te=O(),y=O(),b=I.useRef(null),x=dt();X(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,S.emit()}},[d]),X(()=>{x(6,D)},[]);let S=I.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)E(),w(),x(1,T);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(y);e?e.focus():(i=document.getElementById(ee))==null||i.focus()}if(x(7,()=>{var e;n.current.selectedItemId=(e=k())==null?void 0:e.id,S.emit()}),r||x(5,D),((a=c.current)==null?void 0:a.value)!==void 0){let e=t==null?``:t;(s=(o=c.current).onValueChange)==null||s.call(o,e);return}}S.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),C=I.useMemo(()=>({value:(e,t,r)=>{var i;t!==((i=o.current.get(e))==null?void 0:i.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,ne(t,r)),x(2,()=>{w(),S.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),x(3,()=>{E(),w(),n.current.value||T(),S.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();x(4,()=>{E(),(t==null?void 0:t.getAttribute(`id`))===e&&T(),S.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:ee,inputId:y,labelId:te,listInnerRef:b}),[]);function ne(e,t){var r,i;let a=(i=(r=c.current)==null?void 0:r.filter)==null?qe:i;return e?a(e,n.current.search,t):0}function w(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=b.current;A().sort((t,n)=>{var r,i;let a=t.getAttribute(`id`),o=n.getAttribute(`id`);return((r=e.get(o))==null?0:r)-((i=e.get(a))==null?0:i)}).forEach(e=>{let t=e.closest(He);t?t.appendChild(e.parentElement===t?e:e.closest(`${He} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${He} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=(t=b.current)==null?void 0:t.querySelector(`${K}[${q}="${encodeURIComponent(e[0])}"]`);n==null||n.parentElement.appendChild(n)})}function T(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`),t=e==null?void 0:e.getAttribute(q);S.setState(`value`,t||void 0)}function E(){var e,t,i,s;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let l=0;for(let a of r.current){let r=ne((t=(e=o.current.get(a))==null?void 0:e.value)==null?``:t,(s=(i=o.current.get(a))==null?void 0:i.keywords)==null?[]:s);n.current.filtered.items.set(a,r),r>0&&l++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function D(){var e,t,n;let r=k();r&&(((e=r.parentElement)==null?void 0:e.firstChild)===r&&((n=(t=r.closest(K))==null?void 0:t.querySelector(Ue))==null||n.scrollIntoView({block:`nearest`})),r.scrollIntoView({block:`nearest`}))}function k(){var e;return(e=b.current)==null?void 0:e.querySelector(`${We}[aria-selected="true"]`)}function A(){var e;return Array.from(((e=b.current)==null?void 0:e.querySelectorAll(Ge))||[])}function j(e){let t=A()[e];t&&S.setState(`value`,t.getAttribute(q))}function M(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&S.setState(`value`,a.getAttribute(q))}function N(e){let t=k(),n=t==null?void 0:t.closest(K),r;for(;n&&!r;)n=e>0?st(n,K):ct(n,K),r=n==null?void 0:n.querySelector(Ge);r?S.setState(`value`,r.getAttribute(q)):M(e)}let P=()=>j(A().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?N(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?N(-1):M(-1)};return I.createElement(i.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:_&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),j(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(Ke);t.dispatchEvent(e)}}}}},I.createElement(`label`,{"cmdk-label":``,htmlFor:C.inputId,id:C.labelId,style:pt},l),$(e,e=>I.createElement(Ye.Provider,{value:S},I.createElement(Je.Provider,{value:C},e))))}),$e=I.forwardRef((e,t)=>{var n,r;let a=O(),o=I.useRef(null),s=I.useContext(Ze),c=J(),l=lt(e),u=(r=(n=l.current)==null?void 0:n.forceMount)==null?s==null?void 0:s.forceMount:r;X(()=>{if(!u)return c.item(a,s==null?void 0:s.id)},[u]);let d=ut(a,o,[e.value,e.children,o],e.keywords),f=Xe(),p=Q(e=>e.value&&e.value===d.current),m=Q(e=>u||c.filter()===!1?!0:e.search?e.filtered.items.get(a)>0:!0);I.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(Ke,h),()=>t.removeEventListener(Ke,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=l.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:ee,forceMount:te,keywords:y,...b}=e;return I.createElement(i.div,{ref:D(o,t),...b,id:a,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||c.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),et=I.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=O(),c=I.useRef(null),l=I.useRef(null),u=O(),d=J(),f=Q(e=>a||d.filter()===!1?!0:e.search?e.filtered.groups.has(s):!0);X(()=>d.group(s),[]),ut(s,c,[e.value,e.heading,l]);let p=I.useMemo(()=>({id:s,forceMount:a}),[a]);return I.createElement(i.div,{ref:D(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&I.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),$(e,e=>I.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},I.createElement(Ze.Provider,{value:p},e))))}),tt=I.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=I.useRef(null),o=Q(e=>!e.search);return!n&&!o?null:I.createElement(i.div,{ref:D(a,t),...r,"cmdk-separator":``,role:`separator`})}),nt=I.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=Xe(),s=Q(e=>e.search),c=Q(e=>e.selectedItemId),l=J();return I.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),I.createElement(i.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:a?e.value:s,onChange:e=>{a||o.setState(`search`,e.target.value),n==null||n(e.target.value)}})}),rt=I.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...a}=e,o=I.useRef(null),s=I.useRef(null),c=Q(e=>e.selectedItemId),l=J();return I.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),I.createElement(i.div,{ref:D(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},$(e,e=>I.createElement(`div`,{ref:D(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),it=I.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return I.createElement(m,{open:n,onOpenChange:r},I.createElement(f,{container:o},I.createElement(u,{"cmdk-overlay":``,className:i}),I.createElement(g,{"aria-label":e.label,"cmdk-dialog":``,className:a},I.createElement(Qe,{ref:t,...s}))))}),at=I.forwardRef((e,t)=>Q(e=>e.filtered.count===0)?I.createElement(i.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),ot=I.forwardRef((e,t)=>{let{progress:n,children:r,label:a=`Loading...`,...o}=e;return I.createElement(i.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},$(e,e=>I.createElement(`div`,{"aria-hidden":!0},e)))}),Y=Object.assign(Qe,{List:rt,Item:$e,Input:nt,Group:et,Separator:tt,Dialog:it,Empty:at,Loading:ot});function st(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ct(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function lt(e){let t=I.useRef(e);return X(()=>{t.current=e}),t}var X=typeof window>`u`?I.useEffect:I.useLayoutEffect;function Z(e){let t=I.useRef();return t.current===void 0&&(t.current=e()),t}function Q(e){let t=Xe(),n=()=>e(t.snapshot());return I.useSyncExternalStore(t.subscribe,n,n)}function ut(e,t,n,r=[]){let i=I.useRef(),a=J();return X(()=>{var o;let s=(()=>{var e;for(let t of n){if(typeof t==`string`)return t.trim();if(typeof t==`object`&&`current`in t)return t.current?(e=t.current.textContent)==null?void 0:e.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(q,s),i.current=s}),i}var dt=()=>{let[e,t]=I.useState(),n=Z(()=>new Map);return X(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function ft(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function $({asChild:e,children:t},n){return e&&I.isValidElement(t)?I.cloneElement(ft(t),{ref:t.ref},n(t.props.children)):n(t)}var pt={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function mt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(m,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function ht(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(f,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function gt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(h,{"data-slot":`dialog-close`,...n}),t[2]=n,t[3]=r),r}function _t(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(u,{"data-slot":`dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vt(e){let t=(0,U.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCloseButton:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(_t,{}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=w(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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`,r),t[6]=r,t[7]=c);let l;t[8]===o?l=t[9]:(l=o&&(0,L.jsx)(h,{"data-slot":`dialog-close`,asChild:!0,children:(0,L.jsxs)(j,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,L.jsx)(ne,{}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[8]=o,t[9]=l);let u;return t[10]!==n||t[11]!==i||t[12]!==c||t[13]!==l?(u=(0,L.jsxs)(ht,{children:[s,(0,L.jsxs)(g,{"data-slot":`dialog-content`,className:c,...i,children:[n,l]})]}),t[10]=n,t[11]=i,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}function yt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex flex-col gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bt(e){let t=(0,U.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,showCloseButton:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!1:a,s;t[5]===r?s=t[6]:(s=w(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,r),t[5]=r,t[6]=s);let c;t[7]===o?c=t[8]:(c=o&&(0,L.jsx)(h,{asChild:!0,children:(0,L.jsx)(j,{variant:`outline`,children:`Close`})}),t[7]=o,t[8]=c);let l;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==c?(l=(0,L.jsxs)(`div`,{"data-slot":`dialog-footer`,className:s,...i,children:[n,c]}),t[9]=n,t[10]=i,t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function xt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`text-base leading-none font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(te,{"data-slot":`dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function St(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(v,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ct(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`textarea`,{"data-slot":`textarea`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Tt=T(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Et(e){let t=(0,U.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=w(Tt({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,L.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":a,className:o,onClick:Dt,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Dt(e){var t;e.target.closest(`button`)||(t=e.currentTarget.parentElement)==null||(t=t.querySelector(`input`))==null||t.focus()}T(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Ot(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y,{"data-slot":`command`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function kt(e){let t=(0,U.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Input,{"data-slot":`command-input`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7];let o;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(Et,{children:(0,L.jsx)(F,{className:`size-4 shrink-0 opacity-50`})}),t[8]=o):o=t[8];let s;return t[9]===a?s=t[10]:(s=(0,L.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,L.jsxs)(wt,{className:`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[a,o]})}),t[9]=a,t[10]=s),s}function At(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.List,{"data-slot":`command-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`py-6 text-center text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Empty,{"data-slot":`command-empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`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`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Group,{"data-slot":`command-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Nt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`-mx-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Separator,{"data-slot":`command-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pt(e){let t=(0,U.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCheck:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,s;t[5]===r?s=t[6]:(s=w(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground`,r),t[5]=r,t[6]=s);let c;t[7]===o?c=t[8]:(c=o&&(0,L.jsx)(l,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),t[7]=o,t[8]=c);let u;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==c?(u=(0,L.jsxs)(Y.Item,{"data-slot":`command-item`,className:s,...i,children:[n,c]}),t[9]=n,t[10]=i,t[11]=s,t[12]=c,t[13]=u):u=t[13],u}function Ft(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(we,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function It(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(Ee,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function Lt(e){let t=(0,U.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=w(`z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 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`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,L.jsx)(De,{children:(0,L.jsx)(Oe,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Rt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(Te,{"data-slot":`popover-anchor`,...n}),t[2]=n,t[3]=r),r}export{bt as _,Ot as a,F as b,kt as c,Nt as d,Ct as f,St as g,vt as h,It as i,Pt as l,gt as m,Rt as n,jt as o,mt as p,Lt as r,Mt as s,Ft as t,At as u,yt as v,P as x,xt as y};
1
+ import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import{$ as i,A as a,B as o,D as s,E as c,Et as l,F as u,H as d,I as f,J as p,L as m,M as h,N as g,O as _,P as v,Q as ee,R as te,U as y,V as b,W as x,Y as S,Z as C,_t as ne,b as w,it as T,k as E,nt as D,q as O,rt as k,tt as A,y as j,z as M}from"./badge-CzDK507L.js";import{t as N}from"./createLucideIcon-BYAVpx9Z.js";var P=N(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),F=N(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),I=t(n(),1),L=e(),R=`Popover`,[re,ie]=ee(R,[a]),z=a(),[ae,B]=re(R),oe=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=z(t),c=I.useRef(null),[l,u]=I.useState(!1),[d,f]=S({prop:r,defaultProp:i==null?!1:i,onChange:a,caller:R});return(0,L.jsx)(E,{...s,children:(0,L.jsx)(ae,{scope:t,contentId:O(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:I.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:I.useCallback(()=>u(!0),[]),onCustomAnchorRemove:I.useCallback(()=>u(!1),[]),modal:o,children:n})})};oe.displayName=R;var se=`PopoverAnchor`,ce=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=B(se,n),a=z(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return I.useEffect(()=>(o(),()=>s()),[o,s]),(0,L.jsx)(c,{...a,...r,ref:t})});ce.displayName=se;var le=`PopoverTrigger`,ue=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=B(le,n),o=z(n),s=k(t,a.triggerRef),l=(0,L.jsx)(i.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Ce(a.open),...r,ref:s,onClick:C(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:(0,L.jsx)(c,{asChild:!0,...o,children:l})});ue.displayName=le;var V=`PopoverPortal`,[de,fe]=re(V,{forceMount:void 0}),pe=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=B(V,t);return(0,L.jsx)(de,{scope:t,forceMount:n,children:(0,L.jsx)(p,{present:n||a.open,children:(0,L.jsx)(d,{asChild:!0,container:i,children:r})})})};pe.displayName=V;var H=`PopoverContent`,me=I.forwardRef((e,t)=>{let n=fe(H,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=B(H,e.__scopePopover);return(0,L.jsx)(p,{present:r||a.open,children:a.modal?(0,L.jsx)(ge,{...i,ref:t}):(0,L.jsx)(_e,{...i,ref:t})})});me.displayName=H;var he=A(`PopoverContent.RemoveScroll`),ge=I.forwardRef((e,t)=>{let n=B(H,e.__scopePopover),r=I.useRef(null),i=k(t,r),a=I.useRef(!1);return I.useEffect(()=>{let e=r.current;if(e)return M(e)},[]),(0,L.jsx)(o,{as:he,allowPinchZoom:!0,children:(0,L.jsx)(ve,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:C(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),a.current||(t=n.triggerRef.current)==null||t.focus()}),onPointerDownOutside:C(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:C(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),_e=I.forwardRef((e,t)=>{let n=B(H,e.__scopePopover),r=I.useRef(!1),i=I.useRef(!1);return(0,L.jsx)(ve,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a;if((a=e.onCloseAutoFocus)==null||a.call(e,t),!t.defaultPrevented){var o;r.current||(o=n.triggerRef.current)==null||o.focus(),t.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:t=>{var a,o;(a=e.onInteractOutside)==null||a.call(e,t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let s=t.target;(o=n.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),ve=I.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=B(H,n),p=z(n);return b(),(0,L.jsx)(y,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(x,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,L.jsx)(_,{"data-state":Ce(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.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)`}})})})}),ye=`PopoverClose`,be=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,a=B(ye,n);return(0,L.jsx)(i.button,{type:`button`,...r,ref:t,onClick:C(e.onClick,()=>a.onOpenChange(!1))})});be.displayName=ye;var xe=`PopoverArrow`,Se=I.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=z(n);return(0,L.jsx)(s,{...i,...r,ref:t})});Se.displayName=xe;function Ce(e){return e?`open`:`closed`}var we=oe,Te=ce,Ee=ue,De=pe,Oe=me,U=r(),ke=1,Ae=.9,je=.8,Me=.17,W=.1,G=.999,Ne=.9999,Pe=.99,Fe=/[\\\/_+.#"@\[\(\{&]/,Ie=/[\\\/_+.#"@\[\(\{&]/g,Le=/[\s-]/,Re=/[\s-]/g;function ze(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ke:Pe;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=ze(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ke:Fe.test(e.charAt(l-1))?(d*=je,p=e.slice(i,l-1).match(Ie),p&&i>0&&(d*=G**+p.length)):Le.test(e.charAt(l-1))?(d*=Ae,m=e.slice(i,l-1).match(Re),m&&i>0&&(d*=G**+m.length)):(d*=Me,i>0&&(d*=G**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Ne)),(d<W&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=ze(e,t,n,r,l+1,a+2,o),f*W>d&&(d=f*W)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Be(e){return e.toLowerCase().replace(Re,` `)}function Ve(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,ze(e,t,Be(e),Be(t),0,0,{})}var K=`[cmdk-group=""]`,He=`[cmdk-group-items=""]`,Ue=`[cmdk-group-heading=""]`,We=`[cmdk-item=""]`,Ge=`${We}:not([aria-disabled="true"])`,Ke=`cmdk-item-select`,q=`data-value`,qe=(e,t,n)=>Ve(e,t,n),Je=I.createContext(void 0),J=()=>I.useContext(Je),Ye=I.createContext(void 0),Xe=()=>I.useContext(Ye),Ze=I.createContext(void 0),Qe=I.forwardRef((e,t)=>{let n=Z(()=>{var t,n;return{search:``,value:(n=(t=e.value)==null?e.defaultValue:t)==null?``:n,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Z(()=>new Set),a=Z(()=>new Map),o=Z(()=>new Map),s=Z(()=>new Set),c=lt(e),{label:l,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,ee=O(),te=O(),y=O(),b=I.useRef(null),x=dt();X(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,S.emit()}},[d]),X(()=>{x(6,D)},[]);let S=I.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)E(),w(),x(1,T);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(y);e?e.focus():(i=document.getElementById(ee))==null||i.focus()}if(x(7,()=>{var e;n.current.selectedItemId=(e=k())==null?void 0:e.id,S.emit()}),r||x(5,D),((a=c.current)==null?void 0:a.value)!==void 0){let e=t==null?``:t;(s=(o=c.current).onValueChange)==null||s.call(o,e);return}}S.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),C=I.useMemo(()=>({value:(e,t,r)=>{var i;t!==((i=o.current.get(e))==null?void 0:i.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,ne(t,r)),x(2,()=>{w(),S.emit()}))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),x(3,()=>{E(),w(),n.current.value||T(),S.emit()}),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=k();x(4,()=>{E(),(t==null?void 0:t.getAttribute(`id`))===e&&T(),S.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>c.current.shouldFilter,label:l||e[`aria-label`],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:ee,inputId:y,labelId:te,listInnerRef:b}),[]);function ne(e,t){var r,i;let a=(i=(r=c.current)==null?void 0:r.filter)==null?qe:i;return e?a(e,n.current.search,t):0}function w(){if(!n.current.search||c.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=a.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let r=b.current;A().sort((t,n)=>{var r,i;let a=t.getAttribute(`id`),o=n.getAttribute(`id`);return((r=e.get(o))==null?0:r)-((i=e.get(a))==null?0:i)}).forEach(e=>{let t=e.closest(He);t?t.appendChild(e.parentElement===t?e:e.closest(`${He} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${He} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=(t=b.current)==null?void 0:t.querySelector(`${K}[${q}="${encodeURIComponent(e[0])}"]`);n==null||n.parentElement.appendChild(n)})}function T(){let e=A().find(e=>e.getAttribute(`aria-disabled`)!==`true`),t=e==null?void 0:e.getAttribute(q);S.setState(`value`,t||void 0)}function E(){var e,t,i,s;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let l=0;for(let a of r.current){let r=ne((t=(e=o.current.get(a))==null?void 0:e.value)==null?``:t,(s=(i=o.current.get(a))==null?void 0:i.keywords)==null?[]:s);n.current.filtered.items.set(a,r),r>0&&l++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function D(){var e,t,n;let r=k();r&&(((e=r.parentElement)==null?void 0:e.firstChild)===r&&((n=(t=r.closest(K))==null?void 0:t.querySelector(Ue))==null||n.scrollIntoView({block:`nearest`})),r.scrollIntoView({block:`nearest`}))}function k(){var e;return(e=b.current)==null?void 0:e.querySelector(`${We}[aria-selected="true"]`)}function A(){var e;return Array.from(((e=b.current)==null?void 0:e.querySelectorAll(Ge))||[])}function j(e){let t=A()[e];t&&S.setState(`value`,t.getAttribute(q))}function M(e){var t;let n=k(),r=A(),i=r.findIndex(e=>e===n),a=r[i+e];(t=c.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&S.setState(`value`,a.getAttribute(q))}function N(e){let t=k(),n=t==null?void 0:t.closest(K),r;for(;n&&!r;)n=e>0?st(n,K):ct(n,K),r=n==null?void 0:n.querySelector(Ge);r?S.setState(`value`,r.getAttribute(q)):M(e)}let P=()=>j(A().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?N(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?N(-1):M(-1)};return I.createElement(i.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:_&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),j(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=k();if(t){let e=new Event(Ke);t.dispatchEvent(e)}}}}},I.createElement(`label`,{"cmdk-label":``,htmlFor:C.inputId,id:C.labelId,style:pt},l),$(e,e=>I.createElement(Ye.Provider,{value:S},I.createElement(Je.Provider,{value:C},e))))}),$e=I.forwardRef((e,t)=>{var n,r;let a=O(),o=I.useRef(null),s=I.useContext(Ze),c=J(),l=lt(e),u=(r=(n=l.current)==null?void 0:n.forceMount)==null?s==null?void 0:s.forceMount:r;X(()=>{if(!u)return c.item(a,s==null?void 0:s.id)},[u]);let d=ut(a,o,[e.value,e.children,o],e.keywords),f=Xe(),p=Q(e=>e.value&&e.value===d.current),m=Q(e=>u||c.filter()===!1?!0:e.search?e.filtered.items.get(a)>0:!0);I.useEffect(()=>{let t=o.current;if(!(!t||e.disabled))return t.addEventListener(Ke,h),()=>t.removeEventListener(Ke,h)},[m,e.onSelect,e.disabled]);function h(){var e,t;g(),(t=(e=l.current).onSelect)==null||t.call(e,d.current)}function g(){f.setState(`value`,d.current,!0)}if(!m)return null;let{disabled:_,value:v,onSelect:ee,forceMount:te,keywords:y,...b}=e;return I.createElement(i.div,{ref:D(o,t),...b,id:a,"cmdk-item":``,role:`option`,"aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||c.getDisablePointerSelection()?void 0:g,onClick:_?void 0:h},e.children)}),et=I.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,s=O(),c=I.useRef(null),l=I.useRef(null),u=O(),d=J(),f=Q(e=>a||d.filter()===!1?!0:e.search?e.filtered.groups.has(s):!0);X(()=>d.group(s),[]),ut(s,c,[e.value,e.heading,l]);let p=I.useMemo(()=>({id:s,forceMount:a}),[a]);return I.createElement(i.div,{ref:D(c,t),...o,"cmdk-group":``,role:`presentation`,hidden:f?void 0:!0},n&&I.createElement(`div`,{ref:l,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),$(e,e=>I.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},I.createElement(Ze.Provider,{value:p},e))))}),tt=I.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=I.useRef(null),o=Q(e=>!e.search);return!n&&!o?null:I.createElement(i.div,{ref:D(a,t),...r,"cmdk-separator":``,role:`separator`})}),nt=I.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,o=Xe(),s=Q(e=>e.search),c=Q(e=>e.selectedItemId),l=J();return I.useEffect(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),I.createElement(i.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:a?e.value:s,onChange:e=>{a||o.setState(`search`,e.target.value),n==null||n(e.target.value)}})}),rt=I.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...a}=e,o=I.useRef(null),s=I.useRef(null),c=Q(e=>e.selectedItemId),l=J();return I.useEffect(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),I.createElement(i.div,{ref:D(o,t),...a,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},$(e,e=>I.createElement(`div`,{ref:D(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),it=I.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return I.createElement(m,{open:n,onOpenChange:r},I.createElement(f,{container:o},I.createElement(u,{"cmdk-overlay":``,className:i}),I.createElement(g,{"aria-label":e.label,"cmdk-dialog":``,className:a},I.createElement(Qe,{ref:t,...s}))))}),at=I.forwardRef((e,t)=>Q(e=>e.filtered.count===0)?I.createElement(i.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),ot=I.forwardRef((e,t)=>{let{progress:n,children:r,label:a=`Loading...`,...o}=e;return I.createElement(i.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},$(e,e=>I.createElement(`div`,{"aria-hidden":!0},e)))}),Y=Object.assign(Qe,{List:rt,Item:$e,Input:nt,Group:et,Separator:tt,Dialog:it,Empty:at,Loading:ot});function st(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ct(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function lt(e){let t=I.useRef(e);return X(()=>{t.current=e}),t}var X=typeof window>`u`?I.useEffect:I.useLayoutEffect;function Z(e){let t=I.useRef();return t.current===void 0&&(t.current=e()),t}function Q(e){let t=Xe(),n=()=>e(t.snapshot());return I.useSyncExternalStore(t.subscribe,n,n)}function ut(e,t,n,r=[]){let i=I.useRef(),a=J();return X(()=>{var o;let s=(()=>{var e;for(let t of n){if(typeof t==`string`)return t.trim();if(typeof t==`object`&&`current`in t)return t.current?(e=t.current.textContent)==null?void 0:e.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(q,s),i.current=s}),i}var dt=()=>{let[e,t]=I.useState(),n=Z(()=>new Map);return X(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function ft(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function $({asChild:e,children:t},n){return e&&I.isValidElement(t)?I.cloneElement(ft(t),{ref:t.ref},n(t.props.children)):n(t)}var pt={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function mt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(m,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function ht(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(f,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function gt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(h,{"data-slot":`dialog-close`,...n}),t[2]=n,t[3]=r),r}function _t(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(u,{"data-slot":`dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vt(e){let t=(0,U.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCloseButton:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(_t,{}),t[5]=s):s=t[5];let c;t[6]===r?c=t[7]:(c=w(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm 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`,r),t[6]=r,t[7]=c);let l;t[8]===o?l=t[9]:(l=o&&(0,L.jsx)(h,{"data-slot":`dialog-close`,asChild:!0,children:(0,L.jsxs)(j,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`,children:[(0,L.jsx)(ne,{}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[8]=o,t[9]=l);let u;return t[10]!==n||t[11]!==i||t[12]!==c||t[13]!==l?(u=(0,L.jsxs)(ht,{children:[s,(0,L.jsxs)(g,{"data-slot":`dialog-content`,className:c,...i,children:[n,l]})]}),t[10]=n,t[11]=i,t[12]=c,t[13]=l,t[14]=u):u=t[14],u}function yt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex flex-col gap-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function bt(e){let t=(0,U.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,showCloseButton:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!1:a,s;t[5]===r?s=t[6]:(s=w(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,r),t[5]=r,t[6]=s);let c;t[7]===o?c=t[8]:(c=o&&(0,L.jsx)(h,{asChild:!0,children:(0,L.jsx)(j,{variant:`outline`,children:`Close`})}),t[7]=o,t[8]=c);let l;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==c?(l=(0,L.jsxs)(`div`,{"data-slot":`dialog-footer`,className:s,...i,children:[n,c]}),t[9]=n,t[10]=i,t[11]=s,t[12]=c,t[13]=l):l=t[13],l}function xt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`text-base leading-none font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(te,{"data-slot":`dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function St(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(v,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ct(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`textarea`,{"data-slot":`textarea`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function wt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Tt=T(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function Et(e){let t=(0,U.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,o;t[4]!==a||t[5]!==n?(o=w(Tt({align:a}),n),t[4]=a,t[5]=n,t[6]=o):o=t[6];let s;return t[7]!==a||t[8]!==r||t[9]!==o?(s=(0,L.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":a,className:o,onClick:Dt,...r}),t[7]=a,t[8]=r,t[9]=o,t[10]=s):s=t[10],s}function Dt(e){var t;e.target.closest(`button`)||(t=e.currentTarget.parentElement)==null||(t=t.querySelector(`input`))==null||t.focus()}T(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function Ot(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y,{"data-slot":`command`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function kt(e){let t=(0,U.c)(11),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Input,{"data-slot":`command-input`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7];let o;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,L.jsx)(Et,{children:(0,L.jsx)(F,{className:`size-4 shrink-0 opacity-50`})}),t[8]=o):o=t[8];let s;return t[9]===a?s=t[10]:(s=(0,L.jsx)(`div`,{"data-slot":`command-input-wrapper`,className:`p-1 pb-0`,children:(0,L.jsxs)(wt,{className:`h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!`,children:[a,o]})}),t[9]=a,t[10]=s),s}function At(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.List,{"data-slot":`command-list`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function jt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`py-6 text-center text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Empty,{"data-slot":`command-empty`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Mt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`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`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Group,{"data-slot":`command-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Nt(e){let t=(0,U.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=w(`-mx-1 h-px bg-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,L.jsx)(Y.Separator,{"data-slot":`command-separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pt(e){let t=(0,U.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCheck:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?!0:a,s;t[5]===r?s=t[6]:(s=w(`group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground`,r),t[5]=r,t[6]=s);let c;t[7]===o?c=t[8]:(c=o&&(0,L.jsx)(l,{className:`ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100`}),t[7]=o,t[8]=c);let u;return t[9]!==n||t[10]!==i||t[11]!==s||t[12]!==c?(u=(0,L.jsxs)(Y.Item,{"data-slot":`command-item`,className:s,...i,children:[n,c]}),t[9]=n,t[10]=i,t[11]=s,t[12]=c,t[13]=u):u=t[13],u}function Ft(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(we,{"data-slot":`popover`,...n}),t[2]=n,t[3]=r),r}function It(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(Ee,{"data-slot":`popover-trigger`,...n}),t[2]=n,t[3]=r),r}function Lt(e){let t=(0,U.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,align:i,sideOffset:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?`center`:i,s=a===void 0?4:a,c;t[5]===n?c=t[6]:(c=w(`z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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 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`,n),t[5]=n,t[6]=c);let l;return t[7]!==o||t[8]!==r||t[9]!==s||t[10]!==c?(l=(0,L.jsx)(De,{children:(0,L.jsx)(Oe,{"data-slot":`popover-content`,align:o,sideOffset:s,className:c,...r})}),t[7]=o,t[8]=r,t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Rt(e){let t=(0,U.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,L.jsx)(Te,{"data-slot":`popover-anchor`,...n}),t[2]=n,t[3]=r),r}export{bt as _,Ot as a,F as b,kt as c,Nt as d,Ct as f,St as g,vt as h,It as i,Pt as l,gt as m,Rt as n,jt as o,mt as p,Lt as r,Mt as s,Ft as t,At as u,yt as v,P as x,xt as y};
@@ -1 +1 @@
1
- import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import{$ as i,G as a,J as o,K as s,Q as c,X as l,Z as u,b as d,rt as f}from"./badge-CxHTOx9D.js";import{t as p}from"./createLucideIcon-BYAVpx9Z.js";var m=p(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),h=t(n(),1);function g(e,[t,n]){return Math.min(n,Math.max(t,e))}var _=e();function v(e,t){return h.useReducer((e,n)=>{let r=t[e][n];return r==null?e:r},e)}var y=`ScrollArea`,[b,x]=c(y),[S,C]=b(y),w=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:a,scrollHideDelay:o=600,...c}=e,[l,u]=h.useState(null),[d,p]=h.useState(null),[m,g]=h.useState(null),[v,y]=h.useState(null),[b,x]=h.useState(null),[C,w]=h.useState(0),[T,E]=h.useState(0),[D,O]=h.useState(!1),[k,A]=h.useState(!1),j=f(t,e=>u(e)),M=s(a);return(0,_.jsx)(S,{scope:n,type:r,dir:M,scrollHideDelay:o,scrollArea:l,viewport:d,onViewportChange:p,content:m,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:D,onScrollbarXEnabledChange:O,scrollbarY:b,onScrollbarYChange:x,scrollbarYEnabled:k,onScrollbarYEnabledChange:A,onCornerWidthChange:w,onCornerHeightChange:E,children:(0,_.jsx)(i.div,{dir:M,...c,ref:j,style:{position:`relative`,"--radix-scroll-area-corner-width":C+`px`,"--radix-scroll-area-corner-height":T+`px`,...e.style}})})});w.displayName=y;var T=`ScrollAreaViewport`,E=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:a,...o}=e,s=C(T,n),c=f(t,h.useRef(null),s.onViewportChange);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:a}),(0,_.jsx)(i.div,{"data-radix-scroll-area-viewport":``,...o,ref:c,style:{overflowX:s.scrollbarXEnabled?`scroll`:`hidden`,overflowY:s.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,_.jsx)(`div`,{ref:s.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});E.displayName=T;var D=`ScrollAreaScrollbar`,O=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return h.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,_.jsx)(k,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,_.jsx)(A,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,_.jsx)(j,{...r,ref:t,forceMount:n}):i.type===`always`?(0,_.jsx)(M,{...r,ref:t}):null});O.displayName=D;var k=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),s(!0)},r=()=>{t=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,_.jsx)(o,{present:n||a,children:(0,_.jsx)(j,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),A=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),a=e.orientation===`horizontal`,s=X(()=>l(`SCROLL_END`),100),[c,l]=v(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return h.useEffect(()=>{if(c===`idle`){let e=window.setTimeout(()=>l(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,i.scrollHideDelay,l]),h.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(l(`SCROLL`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,l,s]),(0,_.jsx)(o,{present:n||c!==`hidden`,children:(0,_.jsx)(M,{"data-state":c===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:u(e.onPointerEnter,()=>l(`POINTER_ENTER`)),onPointerLeave:u(e.onPointerLeave,()=>l(`POINTER_LEAVE`))})})}),j=h.forwardRef((e,t)=>{let n=C(D,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,s]=h.useState(!1),c=e.orientation===`horizontal`,l=X(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?e:t)}},10);return Z(n.viewport,l),Z(n.content,l),(0,_.jsx)(o,{present:r||a,children:(0,_.jsx)(M,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),M=h.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=C(D,e.__scopeScrollArea),a=h.useRef(null),o=h.useRef(0),[s,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=G(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return ee(e,o.current,s,t)}return n===`horizontal`?(0,_.jsx)(N,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=q(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,_.jsx)(P,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=q(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),N=h.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=C(D,e.__scopeScrollArea),[o,s]=h.useState(),c=h.useRef(null),l=f(t,c,a.onScrollbarXChange);return h.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(L,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":K(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Y(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:W(o.paddingLeft),paddingEnd:W(o.paddingRight)}})}})}),P=h.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=C(D,e.__scopeScrollArea),[o,s]=h.useState(),c=h.useRef(null),l=f(t,c,a.onScrollbarYChange);return h.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(L,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":K(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Y(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:W(o.paddingTop),paddingEnd:W(o.paddingBottom)}})}})}),[F,I]=b(D),L=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:l,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:m,onResize:g,...v}=e,y=C(D,n),[b,x]=h.useState(null),S=f(t,e=>x(e)),w=h.useRef(null),T=h.useRef(``),E=y.viewport,O=r.content-r.viewport,k=a(m),A=a(d),j=X(g,10);function M(e){w.current&&p({x:e.clientX-w.current.left,y:e.clientY-w.current.top})}return h.useEffect(()=>{let e=e=>{let t=e.target;b!=null&&b.contains(t)&&k(e,O)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[E,b,O,k]),h.useEffect(A,[r,A]),Z(b,j),Z(y.content,j),(0,_.jsx)(F,{scope:n,scrollbar:b,hasThumb:o,onThumbChange:a(s),onThumbPointerUp:a(c),onThumbPositionChange:A,onThumbPointerDown:a(l),children:(0,_.jsx)(i.div,{...v,ref:S,style:{position:`absolute`,...v.style},onPointerDown:u(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),w.current=b.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,y.viewport&&(y.viewport.style.scrollBehavior=`auto`),M(e))}),onPointerMove:u(e.onPointerMove,M),onPointerUp:u(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=T.current,y.viewport&&(y.viewport.style.scrollBehavior=``),w.current=null})})})}),R=`ScrollAreaThumb`,z=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=I(R,e.__scopeScrollArea);return(0,_.jsx)(o,{present:n||i.hasThumb,children:(0,_.jsx)(B,{ref:t,...r})})}),B=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...a}=e,o=C(R,n),s=I(R,n),{onThumbPositionChange:c}=s,l=f(t,e=>s.onThumbChange(e)),d=h.useRef(void 0),p=X(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{let e=o.viewport;if(e){let t=()=>{p(),d.current||(d.current=te(e,c),c())};return c(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[o.viewport,p,c]),(0,_.jsx)(i.div,{"data-state":s.hasThumb?`visible`:`hidden`,...a,ref:l,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:u(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;s.onThumbPointerDown({x:n,y:r})}),onPointerUp:u(e.onPointerUp,s.onThumbPointerUp)})});z.displayName=R;var V=`ScrollAreaCorner`,H=h.forwardRef((e,t)=>{let n=C(V,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,_.jsx)(U,{...e,ref:t}):null});H.displayName=V;var U=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,a=C(V,n),[o,s]=h.useState(0),[c,l]=h.useState(0),u=!!(o&&c);return Z(a.scrollbarX,()=>{var e;let t=((e=a.scrollbarX)==null?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)}),Z(a.scrollbarY,()=>{var e;let t=((e=a.scrollbarY)==null?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),s(t)}),u?(0,_.jsx)(i.div,{...r,ref:t,style:{width:o,height:c,position:`absolute`,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function W(e){return e?parseInt(e,10):0}function G(e,t){let n=e/t;return isNaN(n)?0:n}function K(e){let t=G(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ee(e,t,n,r=`ltr`){let i=K(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return J([c,l],d)(e)}function q(e,t,n=`ltr`){let r=K(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=g(e,n===`ltr`?[0,o]:[o*-1,0]);return J([0,o],[0,s])(c)}function J(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Y(e,t){return e>0&&e<t}var te=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function X(e,t){let n=a(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Z(e,t){let n=a(t);l(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var ne=w,re=E,ie=H,Q=r(),$=h.forwardRef((e,t)=>{let n=(0,Q.c)(16),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=d(`relative overflow-hidden`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s={WebkitOverflowScrolling:`touch`},n[6]=s):s=n[6];let c;n[7]!==r||n[8]!==t?(c=(0,_.jsx)(re,{ref:t,"data-slot":`scroll-area-viewport`,className:`size-full min-w-0 rounded-[inherit] outline-none`,style:s,children:r}),n[7]=r,n[8]=t,n[9]=c):c=n[9];let l,u;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,_.jsx)(ae,{}),u=(0,_.jsx)(ie,{}),n[10]=l,n[11]=u):(l=n[10],u=n[11]);let f;return n[12]!==a||n[13]!==o||n[14]!==c?(f=(0,_.jsxs)(ne,{"data-slot":`scroll-area`,className:o,...a,children:[c,l,u]}),n[12]=a,n[13]=o,n[14]=c,n[15]=f):f=n[15],f});$.displayName=`ScrollArea`;function ae(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]===n?o=t[5]:(o=d(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,_.jsx)(z,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`}),t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==r||t[9]!==o?(c=(0,_.jsx)(O,{"data-slot":`scroll-area-scrollbar`,"data-orientation":a,orientation:a,className:o,...r,children:s}),t[7]=a,t[8]=r,t[9]=o,t[10]=c):c=t[10],c}export{m as n,$ as t};
1
+ import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import{$ as i,G as a,J as o,K as s,Q as c,X as l,Z as u,b as d,rt as f}from"./badge-CzDK507L.js";import{t as p}from"./createLucideIcon-BYAVpx9Z.js";var m=p(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),h=t(n(),1);function g(e,[t,n]){return Math.min(n,Math.max(t,e))}var _=e();function v(e,t){return h.useReducer((e,n)=>{let r=t[e][n];return r==null?e:r},e)}var y=`ScrollArea`,[b,x]=c(y),[S,C]=b(y),w=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:a,scrollHideDelay:o=600,...c}=e,[l,u]=h.useState(null),[d,p]=h.useState(null),[m,g]=h.useState(null),[v,y]=h.useState(null),[b,x]=h.useState(null),[C,w]=h.useState(0),[T,E]=h.useState(0),[D,O]=h.useState(!1),[k,A]=h.useState(!1),j=f(t,e=>u(e)),M=s(a);return(0,_.jsx)(S,{scope:n,type:r,dir:M,scrollHideDelay:o,scrollArea:l,viewport:d,onViewportChange:p,content:m,onContentChange:g,scrollbarX:v,onScrollbarXChange:y,scrollbarXEnabled:D,onScrollbarXEnabledChange:O,scrollbarY:b,onScrollbarYChange:x,scrollbarYEnabled:k,onScrollbarYEnabledChange:A,onCornerWidthChange:w,onCornerHeightChange:E,children:(0,_.jsx)(i.div,{dir:M,...c,ref:j,style:{position:`relative`,"--radix-scroll-area-corner-width":C+`px`,"--radix-scroll-area-corner-height":T+`px`,...e.style}})})});w.displayName=y;var T=`ScrollAreaViewport`,E=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:a,...o}=e,s=C(T,n),c=f(t,h.useRef(null),s.onViewportChange);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:a}),(0,_.jsx)(i.div,{"data-radix-scroll-area-viewport":``,...o,ref:c,style:{overflowX:s.scrollbarXEnabled?`scroll`:`hidden`,overflowY:s.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,_.jsx)(`div`,{ref:s.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});E.displayName=T;var D=`ScrollAreaScrollbar`,O=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return h.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,_.jsx)(k,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,_.jsx)(A,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,_.jsx)(j,{...r,ref:t,forceMount:n}):i.type===`always`?(0,_.jsx)(M,{...r,ref:t}):null});O.displayName=D;var k=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),[a,s]=h.useState(!1);return h.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),s(!0)},r=()=>{t=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,_.jsx)(o,{present:n||a,children:(0,_.jsx)(j,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),A=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=C(D,e.__scopeScrollArea),a=e.orientation===`horizontal`,s=X(()=>l(`SCROLL_END`),100),[c,l]=v(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return h.useEffect(()=>{if(c===`idle`){let e=window.setTimeout(()=>l(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,i.scrollHideDelay,l]),h.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(l(`SCROLL`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,l,s]),(0,_.jsx)(o,{present:n||c!==`hidden`,children:(0,_.jsx)(M,{"data-state":c===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:u(e.onPointerEnter,()=>l(`POINTER_ENTER`)),onPointerLeave:u(e.onPointerLeave,()=>l(`POINTER_LEAVE`))})})}),j=h.forwardRef((e,t)=>{let n=C(D,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,s]=h.useState(!1),c=e.orientation===`horizontal`,l=X(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?e:t)}},10);return Z(n.viewport,l),Z(n.content,l),(0,_.jsx)(o,{present:r||a,children:(0,_.jsx)(M,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),M=h.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=C(D,e.__scopeScrollArea),a=h.useRef(null),o=h.useRef(0),[s,c]=h.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=G(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return ee(e,o.current,s,t)}return n===`horizontal`?(0,_.jsx)(N,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=q(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,_.jsx)(P,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=q(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}),N=h.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=C(D,e.__scopeScrollArea),[o,s]=h.useState(),c=h.useRef(null),l=f(t,c,a.onScrollbarXChange);return h.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(L,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":K(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Y(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:W(o.paddingLeft),paddingEnd:W(o.paddingRight)}})}})}),P=h.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=C(D,e.__scopeScrollArea),[o,s]=h.useState(),c=h.useRef(null),l=f(t,c,a.onScrollbarYChange);return h.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,_.jsx)(L,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":K(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Y(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:W(o.paddingTop),paddingEnd:W(o.paddingBottom)}})}})}),[F,I]=b(D),L=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:c,onThumbPointerDown:l,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:m,onResize:g,...v}=e,y=C(D,n),[b,x]=h.useState(null),S=f(t,e=>x(e)),w=h.useRef(null),T=h.useRef(``),E=y.viewport,O=r.content-r.viewport,k=a(m),A=a(d),j=X(g,10);function M(e){w.current&&p({x:e.clientX-w.current.left,y:e.clientY-w.current.top})}return h.useEffect(()=>{let e=e=>{let t=e.target;b!=null&&b.contains(t)&&k(e,O)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[E,b,O,k]),h.useEffect(A,[r,A]),Z(b,j),Z(y.content,j),(0,_.jsx)(F,{scope:n,scrollbar:b,hasThumb:o,onThumbChange:a(s),onThumbPointerUp:a(c),onThumbPositionChange:A,onThumbPointerDown:a(l),children:(0,_.jsx)(i.div,{...v,ref:S,style:{position:`absolute`,...v.style},onPointerDown:u(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),w.current=b.getBoundingClientRect(),T.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,y.viewport&&(y.viewport.style.scrollBehavior=`auto`),M(e))}),onPointerMove:u(e.onPointerMove,M),onPointerUp:u(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=T.current,y.viewport&&(y.viewport.style.scrollBehavior=``),w.current=null})})})}),R=`ScrollAreaThumb`,z=h.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=I(R,e.__scopeScrollArea);return(0,_.jsx)(o,{present:n||i.hasThumb,children:(0,_.jsx)(B,{ref:t,...r})})}),B=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...a}=e,o=C(R,n),s=I(R,n),{onThumbPositionChange:c}=s,l=f(t,e=>s.onThumbChange(e)),d=h.useRef(void 0),p=X(()=>{d.current&&(d.current(),d.current=void 0)},100);return h.useEffect(()=>{let e=o.viewport;if(e){let t=()=>{p(),d.current||(d.current=te(e,c),c())};return c(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[o.viewport,p,c]),(0,_.jsx)(i.div,{"data-state":s.hasThumb?`visible`:`hidden`,...a,ref:l,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:u(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;s.onThumbPointerDown({x:n,y:r})}),onPointerUp:u(e.onPointerUp,s.onThumbPointerUp)})});z.displayName=R;var V=`ScrollAreaCorner`,H=h.forwardRef((e,t)=>{let n=C(V,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,_.jsx)(U,{...e,ref:t}):null});H.displayName=V;var U=h.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,a=C(V,n),[o,s]=h.useState(0),[c,l]=h.useState(0),u=!!(o&&c);return Z(a.scrollbarX,()=>{var e;let t=((e=a.scrollbarX)==null?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)}),Z(a.scrollbarY,()=>{var e;let t=((e=a.scrollbarY)==null?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),s(t)}),u?(0,_.jsx)(i.div,{...r,ref:t,style:{width:o,height:c,position:`absolute`,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function W(e){return e?parseInt(e,10):0}function G(e,t){let n=e/t;return isNaN(n)?0:n}function K(e){let t=G(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ee(e,t,n,r=`ltr`){let i=K(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return J([c,l],d)(e)}function q(e,t,n=`ltr`){let r=K(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=g(e,n===`ltr`?[0,o]:[o*-1,0]);return J([0,o],[0,s])(c)}function J(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Y(e,t){return e>0&&e<t}var te=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function X(e,t){let n=a(e),r=h.useRef(0);return h.useEffect(()=>()=>window.clearTimeout(r.current),[]),h.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Z(e,t){let n=a(t);l(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var ne=w,re=E,ie=H,Q=r(),$=h.forwardRef((e,t)=>{let n=(0,Q.c)(16),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:i,children:r,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]===i?o=n[5]:(o=d(`relative overflow-hidden`,i),n[4]=i,n[5]=o);let s;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(s={WebkitOverflowScrolling:`touch`},n[6]=s):s=n[6];let c;n[7]!==r||n[8]!==t?(c=(0,_.jsx)(re,{ref:t,"data-slot":`scroll-area-viewport`,className:`size-full min-w-0 rounded-[inherit] outline-none`,style:s,children:r}),n[7]=r,n[8]=t,n[9]=c):c=n[9];let l,u;n[10]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,_.jsx)(ae,{}),u=(0,_.jsx)(ie,{}),n[10]=l,n[11]=u):(l=n[10],u=n[11]);let f;return n[12]!==a||n[13]!==o||n[14]!==c?(f=(0,_.jsxs)(ne,{"data-slot":`scroll-area`,className:o,...a,children:[c,l,u]}),n[12]=a,n[13]=o,n[14]=c,n[15]=f):f=n[15],f});$.displayName=`ScrollArea`;function ae(e){let t=(0,Q.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`vertical`:i,o;t[4]===n?o=t[5]:(o=d(`flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent`,n),t[4]=n,t[5]=o);let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,_.jsx)(z,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`}),t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==r||t[9]!==o?(c=(0,_.jsx)(O,{"data-slot":`scroll-area-scrollbar`,"data-orientation":a,orientation:a,className:o,...r,children:s}),t[7]=a,t[8]=r,t[9]=o,t[10]=c):c=t[10],c}export{m as n,$ as t};
@@ -1 +1 @@
1
- import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import"./src-9dJwbSJY.js";import{n as i}from"./platform-Be8afd__.js";import{At as a,F as o,I as s,L as c,M as l,N as u,P as d,R as f,S as p,_ as m,_t as h,b as g,et as _,f as v,gt as y,h as b,it as x,kt as S,p as C,y as w}from"./badge-CxHTOx9D.js";import{t as T}from"./createLucideIcon-BYAVpx9Z.js";var E=T(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),D=T(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),O=T(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),k=T(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),A=5e3,j=y(e=>({completionState:new Map,setCompletion:(t,n)=>e(e=>{let r=new Map(e.completionState);return r.set(t,n),{completionState:r}}),clearCompletion:t=>e(e=>{let n=new Map(e.completionState);return n.delete(t),{completionState:n}}),clearAllCompletions:()=>e({completionState:new Map})})),M=e=>t=>t.completionState.get(e),N=A,P=t(n(),1),F=r();function I(e){return a(e)}function L(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(S.SESSIONS);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:I(n.width)}catch{return e}}function R(e){if(!(typeof window>`u`))try{let t=I(e);localStorage.setItem(S.SESSIONS,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving sessions panel width:`,e)}}function ee(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(S.FILES);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:I(n.width)}catch{return e}}function te(e){if(!(typeof window>`u`))try{let t=I(e);localStorage.setItem(S.FILES,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving files panel width:`,e)}}var ne=()=>L(256),z=()=>ee(256),B=y(e=>({showFilesPanel:!1,showTerminalPanel:!1,sessionsPanelWidth:ne(),filesPanelWidth:z(),setShowFilesPanel:t=>e({showFilesPanel:t}),setShowTerminalPanel:t=>e({showTerminalPanel:t}),setSessionsPanelWidth:t=>{let n=a(t);R(n),e({sessionsPanelWidth:n})},setFilesPanelWidth:t=>{let n=a(t);te(n),e({filesPanelWidth:n})}})),V=e();function H(e){let t=(0,F.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(c,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function re(e){let t=(0,F.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(s,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function ie(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(o,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function U(e){let t=(0,F.c)(24),n,r,a,o,s,c;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({className:r,children:n,side:s,showCloseButton:c,style:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let d=s===void 0?`right`:s,f=c===void 0?!0:c,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(ie,{}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=g(`fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,r),t[8]=r,t[9]=m);let _=i()?`90px`:`0px`,v;t[10]===d?v=t[11]:(v=d===`left`||d===`right`?{top:`calc(env(safe-area-inset-top, 0px) + ${_})`,bottom:`env(safe-area-inset-bottom, 0px)`,height:`calc(100vh - env(safe-area-inset-top, 0px) - ${_} - env(safe-area-inset-bottom, 0px))`}:d===`top`?{top:`calc(env(safe-area-inset-top, 0px) + ${_})`}:d===`bottom`?{bottom:`env(safe-area-inset-bottom, 0px)`}:void 0,t[10]=d,t[11]=v);let y=v,b;t[12]!==y||t[13]!==o?(b=y?{...y,...o}:o,t[12]=y,t[13]=o,t[14]=b):b=t[14];let x=b,S;t[15]===f?S=t[16]:(S=f&&(0,V.jsx)(l,{"data-slot":`sheet-close`,asChild:!0,children:(0,V.jsxs)(w,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,V.jsx)(h,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[15]=f,t[16]=S);let C;return t[17]!==n||t[18]!==a||t[19]!==d||t[20]!==m||t[21]!==x||t[22]!==S?(C=(0,V.jsxs)(re,{children:[p,(0,V.jsxs)(u,{"data-slot":`sheet-content`,"data-side":d,className:m,style:x,...a,children:[n,S]})]}),t[17]=n,t[18]=a,t[19]=d,t[20]=m,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function W(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex flex-col gap-0.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function G(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`text-base font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(f,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(d,{"data-slot":`sheet-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var q=`sidebar_state`,J=3600*24*7,Y=`16rem`,ae=`18rem`,oe=`3rem`,X=P.createContext(null);function Z(){let e=P.useContext(X);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function se(e){var t;let n=(0,F.c)(35),r,i,a,o,s,c,l,u;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8]):({defaultOpen:u,open:a,onOpenChange:c,className:i,style:l,children:r,panelId:o,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u);let d=u===void 0?!0:u,f=p(),[m,h]=P.useState(!1),[_,v]=P.useState(d),y=(t=a)==null?_:t,b;n[9]!==y||n[10]!==c?(b=e=>{let t=typeof e==`function`?e(y):e;c?c(t):v(t),document.cookie=`${q}=${t}; path=/; max-age=${J}`},n[9]=y,n[10]=c,n[11]=b):b=n[11];let x=b,S;n[12]!==f||n[13]!==x?(S=()=>f?h(le):x(ce),n[12]=f,n[13]=x,n[14]=S):S=n[14];let C=S,w=y?`expanded`:`collapsed`,T;n[15]!==f||n[16]!==y||n[17]!==m||n[18]!==x||n[19]!==w||n[20]!==C?(T={state:w,open:y,setOpen:x,isMobile:f,openMobile:m,setOpenMobile:h,toggleSidebar:C},n[15]=f,n[16]=y,n[17]=m,n[18]=x,n[19]=w,n[20]=C,n[21]=T):T=n[21];let E=T,D;n[22]===l?D=n[23]:(D={"--sidebar-width":Y,"--sidebar-width-icon":oe,...l},n[22]=l,n[23]=D);let O=D,k;n[24]===i?k=n[25]:(k=g(`overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar`,i),n[24]=i,n[25]=k);let A;n[26]!==r||n[27]!==o||n[28]!==s||n[29]!==O||n[30]!==k?(A=(0,V.jsx)(`div`,{"data-slot":`sidebar-wrapper`,"data-panel-id":o,style:O,className:k,...s,children:r}),n[26]=r,n[27]=o,n[28]=s,n[29]=O,n[30]=k,n[31]=A):A=n[31];let j;return n[32]!==E||n[33]!==A?(j=(0,V.jsx)(X.Provider,{value:E,children:A}),n[32]=E,n[33]=A,n[34]=j):j=n[34],j}function ce(e){return!e}function le(e){return!e}function ue(e){let t=(0,F.c)(53),n,r,i,a,o,s,c,l;if(t[0]!==e){let{side:u,variant:d,collapsible:f,className:p,children:m,dir:h,isOpen:g,onOpenChange:_,...v}=e;s=u,c=d,l=f,r=p,n=m,i=h,a=g,o=v,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];let u=s===void 0?`left`:s,d=c===void 0?`sidebar`:c,f=l===void 0?`offcanvas`:l,{isMobile:p,state:m,openMobile:h,setOpenMobile:_}=Z(),v=a===void 0?void 0:a,y=v===void 0?m:v?`expanded`:`collapsed`;if(f===`none`){let e;t[9]===r?e=t[10]:(e=g(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[9]=r,t[10]=e);let i;return t[11]!==n||t[12]!==o||t[13]!==e?(i=(0,V.jsx)(`div`,{"data-slot":`sidebar`,className:e,...o,children:n}),t[11]=n,t[12]=o,t[13]=e,t[14]=i):i=t[14],i}if(p){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":ae},t[15]=e):e=t[15];let r;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsxs)(W,{className:`sr-only`,children:[(0,V.jsx)(G,{children:`Sidebar`}),(0,V.jsx)(K,{children:`Displays the mobile sidebar.`})]}),t[16]=r):r=t[16];let a;t[17]===n?a=t[18]:(a=(0,V.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[17]=n,t[18]=a);let s;t[19]!==i||t[20]!==u||t[21]!==a?(s=(0,V.jsxs)(U,{dir:i,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:e,side:u,children:[r,a]}),t[19]=i,t[20]=u,t[21]=a,t[22]=s):s=t[22];let c;return t[23]!==h||t[24]!==o||t[25]!==_||t[26]!==s?(c=(0,V.jsx)(H,{open:h,onOpenChange:_,...o,children:s}),t[23]=h,t[24]=o,t[25]=_,t[26]=s,t[27]=c):c=t[27],c}let b=y===`collapsed`?f:``,x=v!==void 0&&!v&&`w-0`,S=d===`floating`||d===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,C;t[28]!==x||t[29]!==S?(C=g(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,x,`group-data-[side=right]:rotate-180`,S),t[28]=x,t[29]=S,t[30]=C):C=t[30];let w;t[31]===C?w=t[32]:(w=(0,V.jsx)(`div`,{"data-slot":`sidebar-gap`,className:C}),t[31]=C,t[32]=w);let T=u===`left`&&v!==void 0&&!v&&`left-[calc(var(--sidebar-width)*-1)]`,E=u===`right`&&v!==void 0&&!v&&`right-[calc(var(--sidebar-width)*-1)]`,D=d===`floating`||d===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,O;t[33]!==r||t[34]!==E||t[35]!==D||t[36]!==T?(O=g(`fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,T,E,D,r),t[33]=r,t[34]=E,t[35]=D,t[36]=T,t[37]=O):O=t[37];let k;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(k={top:`calc(var(--header-height, 0px) + env(safe-area-inset-top, 0px))`,bottom:`env(safe-area-inset-bottom, 0px)`,height:`calc(100vh - var(--header-height, 0px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))`},t[38]=k):k=t[38];let A;t[39]===n?A=t[40]:(A=(0,V.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[39]=n,t[40]=A);let j;t[41]!==o||t[42]!==u||t[43]!==O||t[44]!==A?(j=(0,V.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":u,className:O,style:k,...o,children:A}),t[41]=o,t[42]=u,t[43]=O,t[44]=A,t[45]=j):j=t[45];let M;return t[46]!==y||t[47]!==u||t[48]!==j||t[49]!==b||t[50]!==w||t[51]!==d?(M=(0,V.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":y,"data-collapsible":b,"data-variant":d,"data-side":u,"data-slot":`sidebar`,children:[w,j]}),t[46]=y,t[47]=u,t[48]=j,t[49]=b,t[50]=w,t[51]=d,t[52]=M):M=t[52],M}function de(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fe(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(m,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var pe=P.forwardRef((e,t)=>{let n=(0,F.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=g(`no-scrollbar flex min-h-0 min-w-0 w-full flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,V.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:a,ref:t,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});function me(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function he(e){let t=(0,F.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?_:`div`,o;t[4]===n?o=t[5]:(o=g(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,V.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function ge(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ve(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ye=x(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function be(e){let t=(0,F.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?_:`button`,{isMobile:m,state:h}=Z(),y;t[8]!==n||t[9]!==f||t[10]!==d?(y=g(ye({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=y):y=t[11];let x;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==y?(x=(0,V.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:y,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=y,t[17]=x):x=t[17];let S=x;if(!c)return S;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let w;t[20]===S?w=t[21]:(w=(0,V.jsx)(b,{asChild:!0,children:S}),t[20]=S,t[21]=w);let T=h!==`collapsed`||m,E;t[22]!==T||t[23]!==c?(E=(0,V.jsx)(C,{side:`right`,align:`center`,hidden:T,...c}),t[22]=T,t[23]=c,t[24]=E):E=t[24];let D;return t[25]!==w||t[26]!==E?(D=(0,V.jsxs)(v,{children:[w,E]}),t[25]=w,t[26]=E,t[27]=D):D=t[27],D}function xe(e){let t=(0,F.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,asChild:i,showOnHover:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?!1:i,s=a===void 0?!1:a,c=o?_:`button`,l=s&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,u;t[5]!==n||t[6]!==l?(u=g(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,l,n),t[5]=n,t[6]=l,t[7]=u):u=t[7];let d;return t[8]!==c||t[9]!==r||t[10]!==u?(d=(0,V.jsx)(c,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:u,...r}),t[8]=c,t[9]=r,t[10]=u,t[11]=d):d=t[11],d}function Q(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $(e){let t=(0,F.c)(29),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({side:o,panelId:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=p(),c=B(Te),l=B(we),u=B(Ce),d=B(Se),f=r===`sessions`?c:u,m=r===`sessions`?l:d,[h,_]=P.useState(!1),v=P.useRef(!1),y=P.useRef(0),b=P.useRef(0),x=P.useRef(0),S=P.useRef(null),C=P.useRef(null),w;t[5]!==s||t[6]!==r?(w=e=>{if(s)return;e.preventDefault(),e.stopPropagation(),v.current=!0,_(!0),y.current=e.clientX,b.current=x.current,document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`;let t=document.querySelector(`[data-panel-id="${r}"]`);S.current=t,t&&(C.current=t.style.getPropertyValue(`--sidebar-width`)||null,t.classList.add(`no-transition`))},t[5]=s,t[6]=r,t[7]=w):w=t[7];let T=w,E,D;t[8]===f?(E=t[9],D=t[10]):(E=()=>{x.current=f},D=[f],t[8]=f,t[9]=E,t[10]=D),P.useEffect(E,D);let O,k;if(t[11]!==r||t[12]!==m||t[13]!==o?(O=()=>{let e=e=>{if(!v.current)return;let t=o===`left`?e.clientX-y.current:y.current-e.clientX,n=a(b.current+t);x.current=n;let i=S.current||document.querySelector(`[data-panel-id="${r}"]`);i&&(i.style.setProperty(`--sidebar-width`,`${Math.round(n)}px`),S.current=i);let s=document.querySelector(`[data-panel-gap="${r}"]`);s&&(s.style.width=`${Math.round(n)}px`)},t=()=>{if(!v.current)return;v.current=!1,_(!1),document.body.style.cursor=``,document.body.style.userSelect=``;let e=S.current||document.querySelector(`[data-panel-id="${r}"]`);e&&(e.classList.remove(`no-transition`),C.current===null?e.style.removeProperty(`--sidebar-width`):e.style.setProperty(`--sidebar-width`,C.current));let t=document.querySelector(`[data-panel-gap="${r}"]`);t&&(t.classList.add(`no-transition`),t.style.width=`${Math.round(x.current)}px`,requestAnimationFrame(()=>{t==null||t.classList.remove(`no-transition`)})),m(Math.round(x.current))};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},k=[m,o,r],t[11]=r,t[12]=m,t[13]=o,t[14]=O,t[15]=k):(O=t[14],k=t[15]),P.useEffect(O,k),s)return null;let A=o===`left`?`absolute top-0 right-0`:`absolute top-0 left-0`,j;t[16]!==n||t[17]!==A?(j=g(`z-30 flex h-full w-2 cursor-ew-resize items-center justify-center group/sidebar-resize`,A,n),t[16]=n,t[17]=A,t[18]=j):j=t[18];let M=h?`bg-primary`:`group-active/sidebar-resize:bg-primary`,N;t[19]===M?N=t[20]:(N=g(`h-8 w-0.5 rounded-full transition-colors duration-100`,`bg-transparent group-hover/sidebar-resize:bg-border`,M),t[19]=M,t[20]=N);let I;t[21]===N?I=t[22]:(I=(0,V.jsx)(`div`,{className:N}),t[21]=N,t[22]=I);let L;return t[23]!==T||t[24]!==r||t[25]!==i||t[26]!==j||t[27]!==I?(L=(0,V.jsx)(`div`,{"data-slot":`panel-resize-handle`,"data-panel-id":r,className:j,onMouseDown:T,...i,children:I}),t[23]=T,t[24]=r,t[25]=i,t[26]=j,t[27]=I,t[28]=L):L=t[28],L}function Se(e){return e.setFilesPanelWidth}function Ce(e){return e.filesPanelWidth}function we(e){return e.setSessionsPanelWidth}function Te(e){return e.sessionsPanelWidth}function Ee(e){let t=(0,F.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,V.jsx)($,{side:`left`,panelId:`sessions`,className:n,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}export{M as C,D,O as E,E as O,N as S,k as T,H as _,me as a,G as b,de as c,be as d,ve as f,Z as g,fe as h,pe as i,_e as l,se as m,Ee as n,ge as o,Q as p,ue as r,he as s,$ as t,xe as u,U as v,j as w,B as x,W as y};
1
+ import{n as e,o as t,r as n,t as r}from"./compiler-runtime-DZXZ41-q.js";import"./src-9dJwbSJY.js";import{n as i}from"./platform-5d-ZQG2e.js";import{At as a,F as o,I as s,L as c,M as l,N as u,P as d,R as f,S as p,_ as m,_t as h,b as g,et as _,f as v,gt as y,h as b,it as x,kt as S,p as C,y as w}from"./badge-CzDK507L.js";import{t as T}from"./createLucideIcon-BYAVpx9Z.js";var E=T(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),D=T(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),O=T(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),k=T(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),A=5e3,j=y(e=>({completionState:new Map,setCompletion:(t,n)=>e(e=>{let r=new Map(e.completionState);return r.set(t,n),{completionState:r}}),clearCompletion:t=>e(e=>{let n=new Map(e.completionState);return n.delete(t),{completionState:n}}),clearAllCompletions:()=>e({completionState:new Map})})),M=e=>t=>t.completionState.get(e),N=A,P=t(n(),1),F=r();function I(e){return a(e)}function L(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(S.SESSIONS);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:I(n.width)}catch{return e}}function R(e){if(!(typeof window>`u`))try{let t=I(e);localStorage.setItem(S.SESSIONS,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving sessions panel width:`,e)}}function ee(e){if(typeof window>`u`)return e;try{let t=localStorage.getItem(S.FILES);if(t===null)return e;let n=JSON.parse(t);return typeof n.width!=`number`||isNaN(n.width)?e:I(n.width)}catch{return e}}function te(e){if(!(typeof window>`u`))try{let t=I(e);localStorage.setItem(S.FILES,JSON.stringify({width:t}))}catch(e){console.warn(`Error saving files panel width:`,e)}}var ne=()=>L(256),z=()=>ee(256),B=y(e=>({showFilesPanel:!1,showTerminalPanel:!1,sessionsPanelWidth:ne(),filesPanelWidth:z(),setShowFilesPanel:t=>e({showFilesPanel:t}),setShowTerminalPanel:t=>e({showTerminalPanel:t}),setSessionsPanelWidth:t=>{let n=a(t);R(n),e({sessionsPanelWidth:n})},setFilesPanelWidth:t=>{let n=a(t);te(n),e({filesPanelWidth:n})}})),V=e();function H(e){let t=(0,F.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(c,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function re(e){let t=(0,F.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,V.jsx)(s,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function ie(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(o,{"data-slot":`sheet-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function U(e){let t=(0,F.c)(24),n,r,a,o,s,c;t[0]===e?(n=t[1],r=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({className:r,children:n,side:s,showCloseButton:c,style:o,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let d=s===void 0?`right`:s,f=c===void 0?!0:c,p;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(ie,{}),t[7]=p):p=t[7];let m;t[8]===r?m=t[9]:(m=g(`fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10`,r),t[8]=r,t[9]=m);let _=i()?`90px`:`0px`,v;t[10]===d?v=t[11]:(v=d===`left`||d===`right`?{top:`calc(env(safe-area-inset-top, 0px) + ${_})`,bottom:`env(safe-area-inset-bottom, 0px)`,height:`calc(100vh - env(safe-area-inset-top, 0px) - ${_} - env(safe-area-inset-bottom, 0px))`}:d===`top`?{top:`calc(env(safe-area-inset-top, 0px) + ${_})`}:d===`bottom`?{bottom:`env(safe-area-inset-bottom, 0px)`}:void 0,t[10]=d,t[11]=v);let y=v,b;t[12]!==y||t[13]!==o?(b=y?{...y,...o}:o,t[12]=y,t[13]=o,t[14]=b):b=t[14];let x=b,S;t[15]===f?S=t[16]:(S=f&&(0,V.jsx)(l,{"data-slot":`sheet-close`,asChild:!0,children:(0,V.jsxs)(w,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,V.jsx)(h,{}),(0,V.jsx)(`span`,{className:`sr-only`,children:`Close`})]})}),t[15]=f,t[16]=S);let C;return t[17]!==n||t[18]!==a||t[19]!==d||t[20]!==m||t[21]!==x||t[22]!==S?(C=(0,V.jsxs)(re,{children:[p,(0,V.jsxs)(u,{"data-slot":`sheet-content`,"data-side":d,className:m,style:x,...a,children:[n,S]})]}),t[17]=n,t[18]=a,t[19]=d,t[20]=m,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function W(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex flex-col gap-0.5 p-4`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sheet-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function G(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`text-base font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(f,{"data-slot":`sheet-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function K(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(d,{"data-slot":`sheet-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var q=`sidebar_state`,J=3600*24*7,Y=`16rem`,ae=`18rem`,oe=`3rem`,X=P.createContext(null);function Z(){let e=P.useContext(X);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function se(e){var t;let n=(0,F.c)(35),r,i,a,o,s,c,l,u;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8]):({defaultOpen:u,open:a,onOpenChange:c,className:i,style:l,children:r,panelId:o,...s}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u);let d=u===void 0?!0:u,f=p(),[m,h]=P.useState(!1),[_,v]=P.useState(d),y=(t=a)==null?_:t,b;n[9]!==y||n[10]!==c?(b=e=>{let t=typeof e==`function`?e(y):e;c?c(t):v(t),document.cookie=`${q}=${t}; path=/; max-age=${J}`},n[9]=y,n[10]=c,n[11]=b):b=n[11];let x=b,S;n[12]!==f||n[13]!==x?(S=()=>f?h(le):x(ce),n[12]=f,n[13]=x,n[14]=S):S=n[14];let C=S,w=y?`expanded`:`collapsed`,T;n[15]!==f||n[16]!==y||n[17]!==m||n[18]!==x||n[19]!==w||n[20]!==C?(T={state:w,open:y,setOpen:x,isMobile:f,openMobile:m,setOpenMobile:h,toggleSidebar:C},n[15]=f,n[16]=y,n[17]=m,n[18]=x,n[19]=w,n[20]=C,n[21]=T):T=n[21];let E=T,D;n[22]===l?D=n[23]:(D={"--sidebar-width":Y,"--sidebar-width-icon":oe,...l},n[22]=l,n[23]=D);let O=D,k;n[24]===i?k=n[25]:(k=g(`overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar`,i),n[24]=i,n[25]=k);let A;n[26]!==r||n[27]!==o||n[28]!==s||n[29]!==O||n[30]!==k?(A=(0,V.jsx)(`div`,{"data-slot":`sidebar-wrapper`,"data-panel-id":o,style:O,className:k,...s,children:r}),n[26]=r,n[27]=o,n[28]=s,n[29]=O,n[30]=k,n[31]=A):A=n[31];let j;return n[32]!==E||n[33]!==A?(j=(0,V.jsx)(X.Provider,{value:E,children:A}),n[32]=E,n[33]=A,n[34]=j):j=n[34],j}function ce(e){return!e}function le(e){return!e}function ue(e){let t=(0,F.c)(53),n,r,i,a,o,s,c,l;if(t[0]!==e){let{side:u,variant:d,collapsible:f,className:p,children:m,dir:h,isOpen:g,onOpenChange:_,...v}=e;s=u,c=d,l=f,r=p,n=m,i=h,a=g,o=v,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];let u=s===void 0?`left`:s,d=c===void 0?`sidebar`:c,f=l===void 0?`offcanvas`:l,{isMobile:p,state:m,openMobile:h,setOpenMobile:_}=Z(),v=a===void 0?void 0:a,y=v===void 0?m:v?`expanded`:`collapsed`;if(f===`none`){let e;t[9]===r?e=t[10]:(e=g(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[9]=r,t[10]=e);let i;return t[11]!==n||t[12]!==o||t[13]!==e?(i=(0,V.jsx)(`div`,{"data-slot":`sidebar`,className:e,...o,children:n}),t[11]=n,t[12]=o,t[13]=e,t[14]=i):i=t[14],i}if(p){let e;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":ae},t[15]=e):e=t[15];let r;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsxs)(W,{className:`sr-only`,children:[(0,V.jsx)(G,{children:`Sidebar`}),(0,V.jsx)(K,{children:`Displays the mobile sidebar.`})]}),t[16]=r):r=t[16];let a;t[17]===n?a=t[18]:(a=(0,V.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[17]=n,t[18]=a);let s;t[19]!==i||t[20]!==u||t[21]!==a?(s=(0,V.jsxs)(U,{dir:i,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:e,side:u,children:[r,a]}),t[19]=i,t[20]=u,t[21]=a,t[22]=s):s=t[22];let c;return t[23]!==h||t[24]!==o||t[25]!==_||t[26]!==s?(c=(0,V.jsx)(H,{open:h,onOpenChange:_,...o,children:s}),t[23]=h,t[24]=o,t[25]=_,t[26]=s,t[27]=c):c=t[27],c}let b=y===`collapsed`?f:``,x=v!==void 0&&!v&&`w-0`,S=d===`floating`||d===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,C;t[28]!==x||t[29]!==S?(C=g(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,x,`group-data-[side=right]:rotate-180`,S),t[28]=x,t[29]=S,t[30]=C):C=t[30];let w;t[31]===C?w=t[32]:(w=(0,V.jsx)(`div`,{"data-slot":`sidebar-gap`,className:C}),t[31]=C,t[32]=w);let T=u===`left`&&v!==void 0&&!v&&`left-[calc(var(--sidebar-width)*-1)]`,E=u===`right`&&v!==void 0&&!v&&`right-[calc(var(--sidebar-width)*-1)]`,D=d===`floating`||d===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,O;t[33]!==r||t[34]!==E||t[35]!==D||t[36]!==T?(O=g(`fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,T,E,D,r),t[33]=r,t[34]=E,t[35]=D,t[36]=T,t[37]=O):O=t[37];let k;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(k={top:`calc(var(--header-height, 0px) + env(safe-area-inset-top, 0px))`,bottom:`env(safe-area-inset-bottom, 0px)`,height:`calc(100vh - var(--header-height, 0px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))`},t[38]=k):k=t[38];let A;t[39]===n?A=t[40]:(A=(0,V.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:n}),t[39]=n,t[40]=A);let j;t[41]!==o||t[42]!==u||t[43]!==O||t[44]!==A?(j=(0,V.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":u,className:O,style:k,...o,children:A}),t[41]=o,t[42]=u,t[43]=O,t[44]=A,t[45]=j):j=t[45];let M;return t[46]!==y||t[47]!==u||t[48]!==j||t[49]!==b||t[50]!==w||t[51]!==d?(M=(0,V.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":y,"data-collapsible":b,"data-variant":d,"data-side":u,"data-slot":`sidebar`,children:[w,j]}),t[46]=y,t[47]=u,t[48]=j,t[49]=b,t[50]=w,t[51]=d,t[52]=M):M=t[52],M}function de(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fe(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(m,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var pe=P.forwardRef((e,t)=>{let n=(0,F.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=g(`no-scrollbar flex min-h-0 min-w-0 w-full flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,V.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:a,ref:t,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});function me(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`relative flex w-full min-w-0 flex-col p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function he(e){let t=(0,F.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i!==void 0&&i?_:`div`,o;t[4]===n?o=t[5]:(o=g(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,V.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:o,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function ge(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`w-full text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`flex w-full min-w-0 flex-col gap-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ve(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ye=x(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function be(e){let t=(0,F.c)(28),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({asChild:i,isActive:a,variant:o,size:s,tooltip:c,className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=i===void 0?!1:i,u=a===void 0?!1:a,d=o===void 0?`default`:o,f=s===void 0?`default`:s,p=l?_:`button`,{isMobile:m,state:h}=Z(),y;t[8]!==n||t[9]!==f||t[10]!==d?(y=g(ye({variant:d,size:f}),n),t[8]=n,t[9]=f,t[10]=d,t[11]=y):y=t[11];let x;t[12]!==p||t[13]!==u||t[14]!==r||t[15]!==f||t[16]!==y?(x=(0,V.jsx)(p,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":f,"data-active":u,className:y,...r}),t[12]=p,t[13]=u,t[14]=r,t[15]=f,t[16]=y,t[17]=x):x=t[17];let S=x;if(!c)return S;if(typeof c==`string`){let e;t[18]===c?e=t[19]:(e={children:c},t[18]=c,t[19]=e),c=e}let w;t[20]===S?w=t[21]:(w=(0,V.jsx)(b,{asChild:!0,children:S}),t[20]=S,t[21]=w);let T=h!==`collapsed`||m,E;t[22]!==T||t[23]!==c?(E=(0,V.jsx)(C,{side:`right`,align:`center`,hidden:T,...c}),t[22]=T,t[23]=c,t[24]=E):E=t[24];let D;return t[25]!==w||t[26]!==E?(D=(0,V.jsxs)(v,{children:[w,E]}),t[25]=w,t[26]=E,t[27]=D):D=t[27],D}function xe(e){let t=(0,F.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,asChild:i,showOnHover:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=i===void 0?!1:i,s=a===void 0?!1:a,c=o?_:`button`,l=s&&`group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0`,u;t[5]!==n||t[6]!==l?(u=g(`absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-1 focus:ring-inset md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0`,l,n),t[5]=n,t[6]=l,t[7]=u):u=t[7];let d;return t[8]!==c||t[9]!==r||t[10]!==u?(d=(0,V.jsx)(c,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:u,...r}),t[8]=c,t[9]=r,t[10]=u,t[11]=d):d=t[11],d}function Q(e){let t=(0,F.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=g(`ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,V.jsx)(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function $(e){let t=(0,F.c)(29),n,r,i,o;t[0]===e?(n=t[1],r=t[2],i=t[3],o=t[4]):({side:o,panelId:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o);let s=p(),c=B(Te),l=B(we),u=B(Ce),d=B(Se),f=r===`sessions`?c:u,m=r===`sessions`?l:d,[h,_]=P.useState(!1),v=P.useRef(!1),y=P.useRef(0),b=P.useRef(0),x=P.useRef(0),S=P.useRef(null),C=P.useRef(null),w;t[5]!==s||t[6]!==r?(w=e=>{if(s)return;e.preventDefault(),e.stopPropagation(),v.current=!0,_(!0),y.current=e.clientX,b.current=x.current,document.body.style.cursor=`ew-resize`,document.body.style.userSelect=`none`;let t=document.querySelector(`[data-panel-id="${r}"]`);S.current=t,t&&(C.current=t.style.getPropertyValue(`--sidebar-width`)||null,t.classList.add(`no-transition`))},t[5]=s,t[6]=r,t[7]=w):w=t[7];let T=w,E,D;t[8]===f?(E=t[9],D=t[10]):(E=()=>{x.current=f},D=[f],t[8]=f,t[9]=E,t[10]=D),P.useEffect(E,D);let O,k;if(t[11]!==r||t[12]!==m||t[13]!==o?(O=()=>{let e=e=>{if(!v.current)return;let t=o===`left`?e.clientX-y.current:y.current-e.clientX,n=a(b.current+t);x.current=n;let i=S.current||document.querySelector(`[data-panel-id="${r}"]`);i&&(i.style.setProperty(`--sidebar-width`,`${Math.round(n)}px`),S.current=i);let s=document.querySelector(`[data-panel-gap="${r}"]`);s&&(s.style.width=`${Math.round(n)}px`)},t=()=>{if(!v.current)return;v.current=!1,_(!1),document.body.style.cursor=``,document.body.style.userSelect=``;let e=S.current||document.querySelector(`[data-panel-id="${r}"]`);e&&(e.classList.remove(`no-transition`),C.current===null?e.style.removeProperty(`--sidebar-width`):e.style.setProperty(`--sidebar-width`,C.current));let t=document.querySelector(`[data-panel-gap="${r}"]`);t&&(t.classList.add(`no-transition`),t.style.width=`${Math.round(x.current)}px`,requestAnimationFrame(()=>{t==null||t.classList.remove(`no-transition`)})),m(Math.round(x.current))};return document.addEventListener(`mousemove`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousemove`,e),document.removeEventListener(`mouseup`,t)}},k=[m,o,r],t[11]=r,t[12]=m,t[13]=o,t[14]=O,t[15]=k):(O=t[14],k=t[15]),P.useEffect(O,k),s)return null;let A=o===`left`?`absolute top-0 right-0`:`absolute top-0 left-0`,j;t[16]!==n||t[17]!==A?(j=g(`z-30 flex h-full w-2 cursor-ew-resize items-center justify-center group/sidebar-resize`,A,n),t[16]=n,t[17]=A,t[18]=j):j=t[18];let M=h?`bg-primary`:`group-active/sidebar-resize:bg-primary`,N;t[19]===M?N=t[20]:(N=g(`h-8 w-0.5 rounded-full transition-colors duration-100`,`bg-transparent group-hover/sidebar-resize:bg-border`,M),t[19]=M,t[20]=N);let I;t[21]===N?I=t[22]:(I=(0,V.jsx)(`div`,{className:N}),t[21]=N,t[22]=I);let L;return t[23]!==T||t[24]!==r||t[25]!==i||t[26]!==j||t[27]!==I?(L=(0,V.jsx)(`div`,{"data-slot":`panel-resize-handle`,"data-panel-id":r,className:j,onMouseDown:T,...i,children:I}),t[23]=T,t[24]=r,t[25]=i,t[26]=j,t[27]=I,t[28]=L):L=t[28],L}function Se(e){return e.setFilesPanelWidth}function Ce(e){return e.filesPanelWidth}function we(e){return e.setSessionsPanelWidth}function Te(e){return e.sessionsPanelWidth}function Ee(e){let t=(0,F.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,V.jsx)($,{side:`left`,panelId:`sessions`,className:n,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}export{M as C,D,O as E,E as O,N as S,k as T,H as _,me as a,G as b,de as c,be as d,ve as f,Z as g,fe as h,pe as i,_e as l,se as m,Ee as n,ge as o,Q as p,ue as r,he as s,$ as t,xe as u,U as v,j as w,B as x,W as y};