@kimuson/claude-code-viewer 0.6.1-beta.4 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -110
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static/assets/ProtectedRoute-Clw5r4X-.js +1 -0
- package/dist/static/assets/index-26yPYMZp.css +2 -0
- package/dist/static/assets/{index-CxzFZpzV.js → index-BO-D9mWo.js} +2 -2
- package/dist/static/assets/projects-BVPr5gWf.js +1 -0
- package/dist/static/assets/session-BkAg5Fs5.js +1 -0
- package/dist/static/assets/session-D-iyWO70.js +8 -0
- package/dist/static/index.html +2 -2
- package/dist/static/sw.js +1 -1
- package/package.json +1 -1
- package/dist/static/assets/ProtectedRoute-DtqWc34B.js +0 -1
- package/dist/static/assets/index-DgQxQj-3.css +0 -2
- package/dist/static/assets/projects-DWwR_fHN.js +0 -1
- package/dist/static/assets/session-D5eScPGc.js +0 -8
- package/dist/static/assets/session-DK1CQBjg.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-pLhQHKNI.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/card-DGrqtTaC.js","assets/markdown-parser-vendor-D9j1a-bm.js","assets/AuthProvider-BKc7q7ka.js","assets/createLucideIcon-BL_meogc.js","assets/eye-SsvAY8oF.js","assets/input-B_6IT1CP.js","assets/label-Cw6sZ5kQ.js","assets/routes-9aZugTrf.js","assets/projects-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-pLhQHKNI.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/card-DGrqtTaC.js","assets/markdown-parser-vendor-D9j1a-bm.js","assets/AuthProvider-BKc7q7ka.js","assets/createLucideIcon-BL_meogc.js","assets/eye-SsvAY8oF.js","assets/input-B_6IT1CP.js","assets/label-Cw6sZ5kQ.js","assets/routes-9aZugTrf.js","assets/projects-BVPr5gWf.js","assets/ProtectedRoute-Clw5r4X-.js","assets/dist-CG2L4mx5.js","assets/dist-DiGJ7VFi.js","assets/session-BkAg5Fs5.js","assets/session-D-iyWO70.js","assets/syntax-highlighter-vendor-CwGXx8v4.js","assets/refractor-vendor-B-OUwWR7.js","assets/xterm-vendor-DRG2K165.js","assets/xterm-vendor-BrP-ENHg.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e,t}from"./rolldown-runtime-Dw2cE7zH.js";import{d as n,f as r}from"./markdown-parser-vendor-D9j1a-bm.js";import{$ as i,A as a,B as o,C as s,E as c,F as l,G as u,H as d,J as f,K as p,M as m,O as h,Q as g,R as _,S as v,T as y,U as b,W as x,X as ee,Y as S,Z as te,_ as ne,at as re,b as ie,ct as ae,et as oe,g as se,it as ce,lt as le,mt as ue,n as C,nt as w,pt as de,q as fe,rt as pe,st as me,t as T,tt as E,ut as he,v as ge,y as _e,z as ve}from"./AuthProvider-BKc7q7ka.js";import{$ as ye,At as be,Ct as xe,Dt as Se,Et as Ce,H as we,L as Te,Ot as Ee,P as De,St as Oe,Tt as ke,W as Ae,_t as je,at as Me,bt as Ne,ct as Pe,dt as Fe,et as Ie,ft as Le,gt as Re,ht as ze,it as Be,jt as Ve,kt as He,lt as Ue,mt as We,nt as Ge,ot as Ke,pt as qe,r as Je,rt as Ye,st as Xe,t as Ze,tt as Qe,ut as $e,vt as et,wt as tt,xt as nt,yt as rt,z as it}from"./dist-DiGJ7VFi.js";import{n as at,t as ot}from"./dist-CG2L4mx5.js";import{t as st}from"./createLucideIcon-BL_meogc.js";import{a as ct,c as lt,i as ut,n as dt,o as ft,r as pt,s as mt,t as ht}from"./card-DGrqtTaC.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function D(e){return!!e?.isNotFound}function gt(){try{return typeof window<`u`&&typeof window.sessionStorage==`object`?window.sessionStorage:void 0}catch{return}}var _t=`tsr-scroll-restoration-v1_3`;function vt(){let e=gt();if(!e)return null;let t={};try{let n=JSON.parse(e.getItem(`tsr-scroll-restoration-v1_3`)||`{}`);Se(n)&&(t=n)}catch{}return{get state(){return t},set:e=>{t=tt(e,t)||t},persist:()=>{try{e.setItem(_t,JSON.stringify(t))}catch{}}}}var yt=vt(),bt=e=>e.state.__TSR_key||e.href;function xt(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 St=!1,Ct=`window`,wt=`data-scroll-restoration-id`;function Tt(e,t){if(!yt)return;let n=yt;if((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,St=!1;let r=e.options.getScrollRestorationKey||bt,i=new Map;window.history.scrollRestoration=`manual`;let a=t=>{if(!(St||!e.isScrollRestoring))if(t.target===document||t.target===window)i.set(Ct,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{let e=t.target;i.set(e,{scrollX:e.scrollLeft||0,scrollY:e.scrollTop||0})}},o=t=>{if(!e.isScrollRestoring||!t||i.size===0||!n)return;let r=n.state[t]||={};for(let[e,t]of i){let n;if(e===Ct)n=Ct;else if(e.isConnected){let t=e.getAttribute(wt);n=t?`[${wt}="${t}"]`:xt(e)}n&&(r[n]=t)}};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{o(e.fromLocation?r(e.fromLocation):void 0),i.clear()}),window.addEventListener(`pagehide`,()=>{o(r(e.stores.resolvedLocation.state??e.stores.location.state)),n.persist()}),e.subscribe(`onRendered`,t=>{let a=r(t.toLocation),o=e.options.scrollRestorationBehavior,s=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))){St=!0;try{let t=e.isScrollRestoring?n.state[a]:void 0,r=!1;if(t)for(let e in t){let n=t[e];if(!Se(n))continue;let{scrollX:i,scrollY:a}=n;if(!(!Number.isFinite(i)||!Number.isFinite(a))){if(e===Ct)window.scrollTo({top:a,left:i,behavior:o}),r=!0;else if(e){let t;try{t=document.querySelector(e)}catch{continue}t&&(t.scrollLeft=i,t.scrollTop=a,r=!0)}}}if(!r){let t=e.history.location.hash.slice(1);if(t){let e=window.history.state?.__hashScrollIntoViewOptions??!0;if(e){let n=document.getElementById(t);n&&n.scrollIntoView(e)}}else{let e={top:0,left:0,behavior:o};if(window.scrollTo(e),s)for(let t of s){if(t===Ct)continue;let n=typeof t==`function`?t():document.querySelector(t);n&&n.scrollTo(e)}}}}finally{St=!1}e.isScrollRestoring&&n.set(e=>(e[a]||={},e))}})}function Et(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 Dt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ot(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]=Dt(r):Array.isArray(t)?t.push(Dt(r)):n[e]=[t,Dt(r)]}return n}var kt=jt(JSON.parse),At=Mt(JSON.stringify,JSON.parse);function jt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ot(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Mt(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=Et(e,r);return t?`?${t}`:``}}var Nt=`__root__`;function Pt(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Ft(e){return e instanceof Response&&!!e.options}function It(e){return{input:({url:t})=>{for(let n of e)t=Rt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=zt(e[n],t);return t}}}function Lt(e){let t=Pe(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=Ke([`/`,t,e.pathname]),e)}}function Rt(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function zt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Bt(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(()=>Vt(o,_.state)),x=r(()=>Vt(s,v.state)),ee=r(()=>Vt(c,y.state)),S=r(()=>_.state[0]),te=r(()=>_.state.some(e=>o.get(e)?.state.status===`pending`)),ne=r(()=>({locationHref:p.state.href,resolvedLocationHref:m.state?.href,status:l.state})),re=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})),ie=Re(64);function ae(e){let t=ie.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}}),ie.set(e,t)),t}let oe={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:ee,firstMatchId:S,hasPendingMatches:te,matchRouteReactivity:ne,activeMatchStoresById:o,pendingMatchStoresById:s,cachedMatchStoresById:c,__store:re,getMatchStoreByRouteId:ae,setActiveMatches:se,setPendingMatches:ce,setCachedMatches:le};se(e.matches),a?.(oe);function se(e){Ht(e,o,_,n,i)}function ce(e){Ht(e,s,v,n,i)}function le(e){Ht(e,c,y,n,i)}return oe}function Vt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.state)}return n}function Ht(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)}rt(n.state,a)||n.setState(()=>a)})}var Ut=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Wt=e=>e.stores.matchesId.state.some(t=>e.stores.activeMatchStoresById.get(t)?.state._forcePending),Gt=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Kt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},qt=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},Jt=(e,t,n)=>{if(!(!Ft(n)&&!D(n)))throw Ft(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:Ft(n)?`redirected`:r.status===`pending`?`success`:r.status,context:Kt(e,t.index),isFetching:!1,error:n})),D(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Ft(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Yt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Xt=(e,t,n)=>{let r=Kt(e,n);e.updateMatch(t,e=>({...e,context:r}))},Zt=(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??=t,Jt(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,Jt(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Ft(n)&&!D(n)&&(e.serialError??=n)},Qt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Gt(e,t)&&(n.options.loader||n.options.beforeLoad||un(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ut(e)},i);r._nonReactive.pendingTimeout=t}},$t=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Qt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Jt(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},en=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ne(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Zt(e,n,o,`PARSE_PARAMS`),s&&Zt(e,n,s,`VALIDATE_SEARCH`),Qt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=Ne();let f={...Kt(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=Gt(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(Ft(r)||D(r))&&(u(),Zt(e,n,r,`BEFORE_LOAD`)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),Ee(y))return u(),y.catch(t=>{Zt(e,n,t,`BEFORE_LOAD`)}).then(v)}catch(t){u(),Zt(e,n,t,`BEFORE_LOAD`)}v(y)},tn=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>en(e,n,t,i),s=()=>{if(Yt(e,n))return;let t=$t(e,n,i);return Ee(t)?t.then(o):o()};return a()},nn=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},rn=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Kt(e,r),d=Gt(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}},an=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{ln(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(rn(e,t,n,r,i)),l=!!s&&Ee(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Jt(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Kt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Kt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,D(t)&&await i.options.notFoundComponent?.preload?.(),Jt(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Jt(e,e.router.getMatch(n),t)}!Ft(o)&&!D(o)&&await ln(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Kt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Jt(e,r,t)}},on=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(rn(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await an(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){Ft(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await an(e,t,i,n,d):Xt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Yt(e,i)){if(!e.router.getMatch(i))return e.matches[n];Xt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.state[n],s=(o&&e.router.stores.activeMatchStoresById.get(o)||null)?.routeId===a?o:e.router.stores.activeMatchesSnapshot.state.find(e=>e.routeId===a)?.id,l=Gt(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Jt(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.activeMatchStoresById.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=Ne(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function sn(e){let t=e,n=[];Wt(t.router)&&Ut(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=tn(t,e);Ee(n)&&await n}catch(e){if(Ft(e))throw e;if(D(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?qt(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(on(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(Ft(e))throw e;D(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=qt(t,l);e===void 0&&je();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await ln(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ln(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=nn(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Ut(t);if(Ee(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function cn(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function ln(e,t=dn){!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===dn?(()=>{if(e._componentsPromise===void 0){let t=cn(e,dn);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():cn(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function un(e){for(let t of dn)if(e.options[t]?.preload)return!0;return!1}var dn=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],fn=`__TSR_index`,pn=`popstate`,mn=`beforeunload`;function hn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=yn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();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[fn];i=gn(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[fn];i=gn(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:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[fn]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gn(e,t){t||={};let n=bn();return{...t,key:n,__TSR_key:n,[fn]:e}}function _n(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>yn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=bn();t.history.replaceState({[fn]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(S._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),S._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=yn(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),S.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[fn]-l.state[fn],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},ee=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=hn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mn,ee,{capture:!0}),t.removeEventListener(pn,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(mn,ee,{capture:!0}),t.addEventListener(pn,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||b(`REPLACE`),n},S}function vn(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function yn(e,t){let n=vn(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=bn();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||{[fn]:0,key:a,__TSR_key:a}}}function bn(){return(Math.random()+1).toString(36).substring(7)}function xn(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Sn=class{constructor(e,t){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=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Be(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_n()),this.origin=this.options.origin,this.origin||(window?.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=Re(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Bt(Tn(this.latestLocation),e),Tt(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=Pe(o);t&&t!==`/`&&e.push(Lt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:It(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.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=ze(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&We(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:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:nt(e).path,external:!1,searchStr:o,search:be(t?.search,i),hash:nt(r.slice(1)).path,state:Ve(t?.state,a)}}let o=new URL(i,this.origin),s=Rt(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:nt(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:be(t?.search,c),hash:nt(s.hash.slice(1)).path,state:Ve(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===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)=>Xe({base:e,to:Ye(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=>Dn({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=>{if(this.stores.pendingMatchStoresById.has(e))return;let t=this.stores.activeMatchStoresById.get(e)?.state;t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=this.resolvePathWithBase(i,`.`),o=r.search,s=Object.assign(Object.create(null),r.params),c=t.to?this.resolvePathWithBase(a,`${t.to}`):this.resolvePathWithBase(a,`.`),l=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,tt(t.params,s)),u=this.getMatchedRoutes(c),d=u.matchedRoutes;if((!u.foundRoute||u.foundRoute.path!==`/`&&u.routeParams[`**`])&&this.options.notFoundRoute&&(d=[...d,this.options.notFoundRoute]),Object.keys(l).length>0)for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(l,t(l))}catch{}}let f=e.leaveParams?c:nt(Me({path:c,params:l,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,p=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,En(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=On({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=be(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?tt(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?tt(t.state,n.state):{};_=Ve(n.state,_);let v=`${f}${m}${g}`,y,b,x=!1;if(this.rewrite){let e=new URL(v,this.origin),t=zt(this.rewrite,e);y=e.href.replace(e.origin,``),t.origin===this.origin?b=t.pathname+t.search+t.hash:(b=t.href,x=!0)}else y=xe(v),b=y;return{publicHref:b,href:y,pathname:f,search:p,searchStr:m,state:_,hash:h??``,external:x,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=Fe(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??!0)===!0?n:Object.assign(n,tt(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})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=Oe(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=$e(this.latestLocation.href)===$e(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=Ne(()=>{a?.resolve(),a=void 0}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(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}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,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=yn(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Rt(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){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ke(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(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=>{let t,n,r,i=this.stores.resolvedLocation.state??this.stores.location.state;for(r=new Promise(a=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.stores.resolvedLocation.state,r=xn(t,n);this.stores.redirect.state||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await sn({router:this,sync:e?.sync,forceStaleReload:i.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,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){Ft(e)?(t=e,this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):D(e)&&(n=e);let r=t?t.status:n?404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>r),this.stores.redirect.setState(()=>t)})}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.stores.activeMatchesSnapshot.state.some(e=>e.status===`error`)&&(a=500),a!==void 0&&this.stores.statusCode.setState(()=>a)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.state,a=typeof t.types==`function`?t.types(xn(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}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=>this.stores.cachedMatchStoresById.get(e)?.state??this.stores.pendingMatchStoresById.get(e)?.state??this.stores.activeMatchStoresById.get(e)?.state,this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...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?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}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&&ke(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?.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=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=ln,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),i=new Set([...r,...this.stores.cachedMatchesId.state]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...e,...a])}try{return n=await sn({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(Ft(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});D(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.state!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.state:t.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,a=qe(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!Oe(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?Oe(i.search,r.search,{partial:!0})?a.rawParams:!1:a.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:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??At,parseSearch:e.parseSearch??kt,protocolAllowlist:e.protocolAllowlist??et}),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){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n,{matchedRoutes:o}=n,s=!1;(r?r.path!==`/`&&i[`**`]:$e(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:s=!0);let c=s?An(this.options.notFoundMode,o):void 0,l=Array(o.length),u=new Map;for(let e of this.stores.activeMatchStoresById.values())e.routeId&&u.set(e.routeId,e.state);for(let n=0;n<o.length;n++){let r=o[n],s=l[n-1],d,f,p;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=En(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof Cn||(r=new Cn(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:_}=Me({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),v=r.id+g+h,y=this.getMatch(v),b=u.get(r.id),x=y?._strictParams??_,ee;if(!y)try{jn(r,_,a,x)}catch(e){if(ee=D(e)||Ft(e)?e:new wn(e.message,{cause:e}),t?.throwOnError)throw ee}Object.assign(i,x);let S=b?`stay`:`enter`,te;if(y)te={...y,cause:S,params:b?.params??i,_strictParams:x,search:be(b?b.search:y.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||un(r)?`pending`:`success`;te={id:v,ssr:r.options.ssr,index:n,routeId:r.id,params:b?.params??i,_strictParams:x,pathname:g,updatedAt:Date.now(),search:b?be(b.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:ee,__routeContext:void 0,_nonReactive:{loadPromise:Ne()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:S,loaderDeps:b?Ve(b.loaderDeps,m):m,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(te.globalNotFound=c===r.id),te.searchError=p;let ne=this.getParentContext(s);te.context={...ne,...te.__routeContext,...te.__beforeLoadContext},l[n]=te}for(let t=0;t<l.length;t++){let n=l[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?be(o.params,i):i,!a){let i=l[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=He(t),a={...e.search};for(let e of t)try{Object.assign(a,En(e.options.validateSearch,a))}catch{}let o=He(this.stores.matchesId.state),s=o&&this.stores.activeMatchStoresById.get(o)?.state,c=s&&s.routeId===i.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),n);for(let i of t)try{jn(i,n,r??{},e)}catch{}l=e}return{matchedRoutes:t,fullPath:i.fullPath,search:a,params:l}}},Cn=class extends Error{},wn=class extends Error{};function Tn(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function En(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Cn(`Async validation not supported`);if(n.issues)throw new Cn(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 Dn({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=$e(e),a,o,s=Le(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign(Object.create(null),s.parsedParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function On({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return kn(n)(e,t,r??!1)}function kn(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...En(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:tt(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function An(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 Nt}function jn(e,t,n,r){let i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=i(r);Object.assign(r,e)}}var Mn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Nt:this.parentRoute||je();let r=n?Nt:t?.path;r&&r!==`/`&&(r=Ue(r));let i=t?.id||r,a=n?Nt:Ke([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ke([`/`,a]));let o=a===`__root__`?`/`:Ke([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=$e(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Pt({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Nn=class extends Mn{constructor(e){super(e)}};function Pn(e){if(typeof document<`u`&&document.querySelector){let t=e.stores.location.state,n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==``){let e=document.getElementById(t.hash);e&&e.scrollIntoView(n)}}}var O=e(r(),1),k=n();function Fn(e){let t=e.errorComponent??Ln;return(0,k.jsx)(In,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?O.createElement(t,{error:n,reset:r}):e.children})}var In=class extends O.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function Ln({error:e}){let[t,n]=O.useState(!1);return(0,k.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,k.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,k.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,k.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,k.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,k.jsx)(`div`,{children:(0,k.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,k.jsx)(`code`,{children:e.message}):null})}):null]})}var Rn=O.createContext(void 0),zn=O.createContext(void 0),A=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(A||{});function Bn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Vn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Hn=[],Un=0,{link:Wn,unlink:Gn,propagate:Kn,checkDirty:qn,shallowPropagate:Jn}=Bn({update(e){return e._update()},notify(e){Hn[Xn++]=e,e.flags&=~A.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=A.Mutable|A.Dirty,er(e))}}),Yn=0,Xn=0,Zn,Qn=0;function $n(e){try{++Qn,e()}finally{--Qn||tr()}}function er(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Gn(n,e)}function tr(){if(!(Qn>0)){for(;Yn<Xn;){let e=Hn[Yn];Hn[Yn++]=void 0,e.notify()}Yn=0,Xn=0}}function nr(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?A.None:A.Mutable,get(){return Zn!==void 0&&Wn(i,Zn,Un),i._snapshot},subscribe(e){let t=Vn(e),n={current:!1},r=rr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Zn,o=t?.compare??Object.is;if(n)Zn=i,++Un,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=A.Mutable|A.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Zn=a,n&&(i.flags&=~A.RecursedCheck),er(i)}}};return n?(i.flags=A.Mutable|A.Dirty,i.get=function(){let e=i.flags;if(e&A.Dirty||e&A.Pending&&qn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Jn(e)}}else e&A.Pending&&(i.flags=e&~A.Pending);return Zn!==void 0&&Wn(i,Zn,Un),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Kn(e),Jn(e),tr())}},i}function rr(e){let t=()=>{let t=Zn;Zn=n,++Un,n.depsTail=void 0,n.flags=A.Watching|A.RecursedCheck;try{return e()}finally{Zn=t,n.flags&=~A.RecursedCheck,er(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:A.Watching|A.RecursedCheck,notify(){let e=this.flags;e&A.Dirty||e&A.Pending&&qn(this.deps,this)?t():this.flags=A.Watching},stop(){this.flags=A.None,this.depsTail=void 0,er(this)}};return t(),n}var ir=class{constructor(e){this.atom=nr(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Vn(e))}},ar=class{constructor(e){this.atom=nr(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(Vn(e))}};function or(e){return typeof e==`function`?new ar(e):new ir(e)}var sr={state:void 0,get:()=>void 0,subscribe:()=>()=>{}};function cr(e){let t=ae(),n=O.useContext(e.from?zn:Rn),r=e.from??n,i=r?e.from?t.stores.getMatchStoreByRouteId(r):t.stores.activeMatchStoresById.get(r):void 0,a=O.useRef(void 0);return Qe(i??sr,n=>{if((e.shouldThrow??!0)&&!n&&je(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=Ve(a.current,r);return a.current=e,e}return r})}function lr(e){return cr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ur(e){let{select:t,...n}=e;return cr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function dr(e){return cr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function fr(e){return cr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function pr(e){return cr({...e,select:t=>e.select?e.select(t.context):t.context})}var mr=class extends Mn{constructor(e){super(e),this.useMatch=e=>cr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pr({...e,from:this.id}),this.useSearch=e=>fr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>dr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ur({...e,from:this.id}),this.useLoaderData=e=>lr({...e,from:this.id}),this.useNavigate=()=>me({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,k.jsx)(ye,{ref:t,from:this.fullPath,...e}))}};function hr(e){return new mr(e)}var gr=class extends Nn{constructor(e){super(e),this.useMatch=e=>cr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pr({...e,from:this.id}),this.useSearch=e=>fr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>dr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ur({...e,from:this.id}),this.useLoaderData=e=>lr({...e,from:this.id}),this.useNavigate=()=>me({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,k.jsx)(ye,{ref:t,from:this.fullPath,...e}))}};function _r(e){return new gr(e)}function vr(e){return typeof e==`object`?new yr(e,{silent:!0}).createRoute(e):new yr(e,{silent:!0}).createRoute}var yr=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=hr(e);return t.isRoot=!1,t},this.silent=t?.silent}};function br(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,Ce(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(he)he(o());else throw o();return O.createElement(r,e)};return s.preload=o,s}function xr(e){let t=ae(),n=`not-found-${Qe(t.stores.location,e=>e.pathname)}-${Qe(t.stores.status,e=>e)}`;return(0,k.jsx)(Fn,{getResetKey:()=>n,onCatch:(t,n)=>{if(D(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(D(t))return e.fallback?.(t);throw t},children:e.children})}function Sr(){return(0,k.jsx)(`p`,{children:`Not Found`})}function Cr(e){return(0,k.jsx)(k.Fragment,{children:e.children})}function wr(e,t,n){return t.options.notFoundComponent?(0,k.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,k.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,k.jsx)(Sr,{})}var Tr=O.memo(function({matchId:e}){let t=ae(),n=t.stores.activeMatchStoresById.get(e);n||je();let r=Qe(t.stores.loadedAt,e=>e),i=Qe(n,e=>e);return(0,k.jsx)(Er,{router:t,matchId:e,resetKey:r,matchState:O.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Er({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,k.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?O.Suspense:Cr,f=s?Fn:Cr,p=l?xr:Cr;return(0,k.jsxs)(i.isRoot?i.options.shellComponent??Cr:Cr,{children:[(0,k.jsx)(Rn.Provider,{value:t,children:(0,k.jsx)(d,{fallback:o,children:(0,k.jsx)(f,{getResetKey:()=>n,errorComponent:s||Ln,onCatch:(e,t)=>{if(D(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,k.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return O.createElement(l,e)},children:u||r._displayPending?(0,k.jsx)(Ge,{fallback:o,children:(0,k.jsx)(Or,{matchId:t})}):(0,k.jsx)(Or,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Dr,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function Dr({resetKey:e}){let t=ae(),n=O.useRef(void 0);return de(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...xn(t.stores.location.state,t.stores.resolvedLocation.state)}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var Or=O.memo(function({matchId:e}){let t=ae(),n=t.stores.activeMatchStoresById.get(e);n||je();let r=Qe(n,e=>e),i=r.routeId,a=t.routesById[i],o=O.useMemo(()=>{let e=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return e?JSON.stringify(e):void 0},[i,r.loaderDeps,r._strictParams,r._strictSearch,t.options.defaultRemountDeps,t.routesById]),s=O.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,k.jsx)(e,{},o):(0,k.jsx)(kr,{})},[o,a.options.component,t.options.defaultComponent]);if(r._displayPending)throw t.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw t.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(r.id);if(n&&!n._nonReactive.minPendingPromise){let t=Ne();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(r.id)?._nonReactive.loadPromise}if(r.status===`notFound`)return D(r.error)||je(),wr(t,a,r.error);if(r.status===`redirected`)throw Ft(r.error)||je(),t.getMatch(r.id)?._nonReactive.loadPromise;if(r.status===`error`)throw r.error;return s}),kr=O.memo(function(){let e=ae(),t=O.useContext(Rn),n,r=!1,i;{let a=t?e.stores.activeMatchStoresById.get(t):void 0;[n,r]=Qe(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=Qe(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,k.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||je(),wr(e,a,void 0);if(!i)return null;let s=(0,k.jsx)(Tr,{matchId:i});return n===`__root__`?(0,k.jsx)(O.Suspense,{fallback:o,children:s}):s});function Ar(){let e=ae(),t=O.useRef({router:e,mounted:!1}),[n,r]=O.useState(!1),i=Qe(e.stores.isLoading,e=>e),a=Qe(e.stores.hasPendingMatches,e=>e),o=ue(i),s=i||n||a,c=ue(s),l=i||a,u=ue(l);return e.startTransition=e=>{r(!0),O.startTransition(()=>{e(),r(!1)})},O.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return $e(e.latestLocation.publicHref)!==$e(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),de(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),de(()=>{o&&!i&&e.emit({type:`onLoad`,...xn(e.stores.location.state,e.stores.resolvedLocation.state)})},[o,e,i]),de(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...xn(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,u,e]),de(()=>{if(c&&!s){let t=xn(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:`onResolved`,...t}),$n(()=>{e.stores.status.setState(()=>`idle`),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),t.hrefChanged&&Pn(e)}},[s,c,e]),null}function jr(){let e=ae(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,k.jsx)(t,{}):null,r=(0,k.jsxs)(typeof document<`u`&&e.ssr?Cr:O.Suspense,{fallback:n,children:[(0,k.jsx)(Ar,{}),(0,k.jsx)(Mr,{})]});return e.options.InnerWrap?(0,k.jsx)(e.options.InnerWrap,{children:r}):r}function Mr(){let e=ae(),t=Qe(e.stores.firstMatchId,e=>e),n=Qe(e.stores.loadedAt,e=>e),r=t?(0,k.jsx)(Tr,{matchId:t}):null;return(0,k.jsx)(Rn.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,k.jsx)(Fn,{getResetKey:()=>n,errorComponent:Ln,onCatch:void 0,children:r})})}var Nr=e=>({createMutableStore:or,createReadonlyStore:or,batch:$n}),Pr=e=>new Fr(e),Fr=class extends Sn{constructor(e){super(e,Nr)}};function Ir({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,k.jsx)(le.Provider,{value:e,children:t});return e.options.Wrap?(0,k.jsx)(e.options.Wrap,{children:r}):r}function Lr({router:e,...t}){return(0,k.jsx)(Ir,{router:e,...t,children:(0,k.jsx)(jr,{})})}var Rr=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}var ee=!1,S=-1,te=5,ne=-1;function re(){return g?!0:!(e.unstable_now()-ne<te)}function ie(){if(g=!1,ee){var t=e.unstable_now();ne=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(S),S=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&re());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){S=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):te=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(S),S=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),zr=t(((e,t)=>{t.exports=Rr()})),Br=t((e=>{var t=zr(),n=r(),i=Ie();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),re=Symbol.for(`react.lazy`),ie=Symbol.for(`react.activity`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.iterator;function se(e){return typeof e!=`object`||!e?null:(e=oe&&e[oe]||e[`@@iterator`],typeof e==`function`?e:null)}var ce=Symbol.for(`react.client.reference`);function le(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case S:return`Suspense`;case te:return`SuspenseList`;case ie:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?le(e.type)||`Memo`:t;case re:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ue=Array.isArray,C=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},fe=[],pe=-1;function me(e){return{current:e}}function T(e){0>pe||(e.current=fe[pe],fe[pe]=null,pe--)}function E(e,t){pe++,fe[pe]=e.current,e.current=t}var he=me(null),ge=me(null),_e=me(null),ve=me(null);function ye(e,t){switch(E(_e,t),E(ge,e),E(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(he),E(he,e)}function be(){T(he),T(ge),T(_e)}function xe(e){e.memoizedState!==null&&E(ve,e);var t=he.current,n=Hd(t,e.type);t!==n&&(E(ge,e),E(he,n))}function Se(e){ge.current===e&&(T(he),T(ge)),ve.current===e&&(T(ve),Qf._currentValue=de)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -17,4 +17,4 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
17
17
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
18
18
|
|
|
19
19
|
Please compile your catalog first.
|
|
20
|
-
`)),fi(s)&&Ci.test(s)?wi(s):fi(s)?s:Oi(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return _i(this._locales||this._locale,e,t)}number(e,t){return yi(this._locales||this._locale,e,t)}};function Li(e={}){return new Ii(e)}var Ri=Li(),zi=async e=>{switch(e){case`ja`:return Gr(()=>import(`./messages-Cq0t_Ljz.js`),[]);case`en`:return Gr(()=>import(`./messages-DJ70MfCl.js`),[]);case`zh_CN`:return Gr(()=>import(`./messages-DRdgpO3i.js`),[]);default:throw Error(`Unsupported locale: ${String(e)}`)}},Bi=[],Vi=async e=>{if(!Bi.includes(e)){let{messages:t}=await zi(e);Ri.load(e,t),Bi.push(e)}Ri.activate(e)},j=({children:e})=>{let{config:t}=De();return(0,O.useEffect)(()=>{Vi(t.locale)},[t.locale]),(0,k.jsx)(ot,{i18n:Ri,children:e})},M=({children:e})=>(0,k.jsx)(k.Fragment,{children:e}),Hi=(0,O.createContext)(null),Ui={didCatch:!1,error:null},Wi=class extends O.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ui}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(Ui))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&Gi(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(Ui))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,O.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,O.createElement)(Hi.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function Gi(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var Ki=lt(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}}),qi=({className:e,variant:t,...n})=>(0,k.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:mt(Ki({variant:t}),e),...n}),Ji=({className:e,...t})=>(0,k.jsx)(`div`,{"data-slot":`alert-title`,className:mt(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t}),Yi=({className:e,...t})=>(0,k.jsx)(`div`,{"data-slot":`alert-description`,className:mt(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t}),Xi=e=>e instanceof Error?e.message:String(e),Zi=({children:e})=>(0,k.jsx)(Wi,{FallbackComponent:({error:e,resetErrorBoundary:t})=>e instanceof y&&e.status===401?(window.location.href=`/login`,null):(0,k.jsx)(`div`,{className:`flex min-h-screen items-center justify-center p-4`,children:(0,k.jsxs)(ht,{className:`w-full max-w-2xl`,children:[(0,k.jsx)(ut,{children:(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(Zr,{className:`size-6 text-destructive`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(ct,{children:`Something went wrong`}),(0,k.jsx)(pt,{children:`An unexpected error occurred in the application`})]})]})}),(0,k.jsxs)(dt,{className:`space-y-4`,children:[(0,k.jsxs)(qi,{variant:`destructive`,children:[(0,k.jsx)(Zr,{}),(0,k.jsx)(Ji,{children:`Error Details`}),(0,k.jsx)(Yi,{children:(0,k.jsx)(`code`,{className:`text-xs`,children:Xi(e)})})]}),(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsxs)(ft,{onClick:t,variant:`default`,children:[(0,k.jsx)(ei,{}),`Try Again`]}),(0,k.jsxs)(ft,{onClick:()=>{window.location.href=`/`},variant:`outline`,children:[(0,k.jsx)($r,{}),`Go to Home`]})]})]})]})}),children:e}),Qi=e=>{let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=window.atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r.buffer},$i=()=>`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window,ea=async e=>{let t=e?.forceResubscribe===!0,n=await navigator.serviceWorker.ready,r=await n.pushManager.getSubscription();if(r&&!t){await ra(r);return}r&&t&&await r.unsubscribe();let i=await n.pushManager.getSubscription();if(i){await ra(i);return}let a=await c.api.notifications[`vapid-public-key`].$get();if(!a.ok)return;let{publicKey:o}=await a.json();await ra(await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Qi(o)}))},ta=()=>{let e=(0,O.useRef)(!1);(0,O.useEffect)(()=>{e.current||(e.current=!0,$i()&&Notification.permission===`granted`&&ea().catch(e=>{}))},[])},na=async()=>{if(!$i())return`denied`;let e=await Notification.requestPermission();return e===`granted`&&await ea({forceResubscribe:!0}),e},ra=async e=>{let t=e.toJSON();if(t.endpoint===void 0||t.endpoint===``||t.keys===void 0)return;let n=t.keys.p256dh,r=t.keys.auth;n===void 0||n===``||r===void 0||r===``||await c.api.notifications[`push-subscription`].$post({json:{endpoint:t.endpoint,keys:{p256dh:n,auth:r}}})},ia=e=>{let{onOpen:t}=e??{},n=new EventSource(new URL(`/api/sse`,window.location.origin).href);return n.onopen=e=>{console.log(`SSE connection opened`,e),t?.(e)},{addEventListener:(e,t)=>{let r=e=>{try{t(JSON.parse(String(e.data)))}catch(e){console.error(`Failed to parse SSE event data:`,e)}};return n.addEventListener(e,r),{removeEventListener:()=>{n.removeEventListener(e,r)}}},cleanUp:()=>{n.onopen=null,n.onmessage=null,n.close()},eventSource:n}},aa=(0,O.createContext)(null),oa=()=>{let e=(0,O.useContext)(aa);if(!e)throw Error(`useSSEContext must be used within SSEProvider`);return e},sa=m({isConnected:!1}),ca=({children:e})=>{let t=(0,O.useRef)(null),n=(0,O.useRef)(new Map),[,r]=h(sa),i=ve();(0,O.useEffect)(()=>{let e=ia({onOpen:()=>{i.invalidateQueries({queryKey:ie.queryKey}),i.invalidateQueries({predicate:e=>{let t=e.queryKey;return Array.isArray(t)&&t[0]===`projects`&&t[2]===`sessions`}}),i.invalidateQueries({queryKey:s.queryKey})}});t.current=e;let{removeEventListener:n}=e.addEventListener(`connect`,e=>{r({isConnected:!0}),console.log(`SSE connected`,e)});return()=>{e.cleanUp(),n(),t.current=null}},[r,i]);let a={addEventListener:(0,O.useCallback)((e,r)=>{n.current.has(e)||n.current.set(e,new Set);let i=n.current.get(e);i&&i.add(r);let a=null,o=null,s=()=>{if(t.current){let{removeEventListener:n}=t.current.addEventListener(e,e=>{r(e)});a=n}};return t.current?s():o=setTimeout(s,0),()=>{let t=n.current.get(e);t&&(t.delete(r),t.size===0&&n.current.delete(e)),a&&a(),o&&clearTimeout(o)}},[])};return(0,k.jsx)(aa.Provider,{value:a,children:e})},la=({children:e})=>(0,k.jsx)(ca,{children:e}),ua=(e,t)=>{let{addEventListener:n}=oa(),r=(0,O.useRef)(t);(0,O.useEffect)(()=>{r.current=t}),(0,O.useEffect)(()=>{let t=n(e,e=>{r.current(e)});return()=>{t()}},[e,n])},da=({children:e})=>{let t=ve();return ua(`sessionListChanged`,e=>{t.invalidateQueries({queryKey:_e(e.projectId).queryKey})}),ua(`sessionChanged`,e=>{t.invalidateQueries({queryKey:v(e.projectId,e.sessionId).queryKey})}),ua(`agentSessionChanged`,e=>{t.invalidateQueries({predicate:t=>{let n=t.queryKey;return Array.isArray(n)&&n[0]===`projects`&&n[1]===e.projectId&&n[2]===`agent-sessions`&&n[3]===e.agentSessionId}})}),ua(`permissionRequested`,()=>{t.invalidateQueries({queryKey:ne.queryKey})}),ua(`permissionResolved`,()=>{t.invalidateQueries({queryKey:ne.queryKey})}),ua(`questionRequested`,()=>{t.invalidateQueries({queryKey:ge.queryKey})}),ua(`questionResolved`,()=>{t.invalidateQueries({queryKey:ge.queryKey})}),ua(`notificationCreated`,()=>{t.invalidateQueries({queryKey:se.queryKey})}),ua(`notificationConsumed`,()=>{t.invalidateQueries({queryKey:se.queryKey})}),ua(`schedulerJobsChanged`,()=>{t.invalidateQueries({queryKey:[`scheduler`]})}),(0,k.jsx)(k.Fragment,{children:e})},fa=m([]),pa=({children:e})=>{let t=a(fa),{data:n}=l({queryKey:s.queryKey,queryFn:s.queryFn});return ua(`sessionProcessChanged`,({processes:e})=>{t(e)}),(0,O.useEffect)(()=>{t(n.processes)},[n,t]),(0,k.jsx)(k.Fragment,{children:e})},N=({children:e})=>(ta(),(0,k.jsx)(k.Fragment,{children:e})),ma=({children:e})=>{let{isAuthenticated:t}=C();return t?(0,k.jsx)(la,{children:(0,k.jsx)(da,{children:(0,k.jsx)(pa,{children:(0,k.jsx)(N,{children:(0,k.jsx)(Je,{children:e})})})})}):(0,k.jsx)(k.Fragment,{children:e})},ha=()=>{let{config:e}=De(),t=(0,O.useMemo)(()=>e?.theme===`light`||e?.theme===`dark`?e?.theme:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,[e?.theme]);return{theme:e?.theme??`system`,resolvedTheme:t}},ga=({children:e})=>{let{resolvedTheme:t}=ha();return(0,O.useEffect)(()=>{let e=window.document.documentElement;e.classList.remove(`light`,`dark`),e.classList.add(t)},[t]),(0,k.jsx)(k.Fragment,{children:e})},_a=({...e})=>{let{theme:t}=ha();return(0,k.jsx)(Ze,{theme:t,className:`toaster group`,style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`},...e})},va=_r({component:()=>(0,k.jsxs)(Zi,{children:[(0,k.jsx)(ga,{children:(0,k.jsx)(T,{children:(0,k.jsx)(j,{children:(0,k.jsx)(ma,{children:(0,k.jsx)(M,{children:(0,k.jsx)(kr,{})})})})})}),(0,k.jsx)(_a,{position:`top-right`})]})}),ya=vr(`/login`)({component:br(()=>Gr(()=>import(`./login-pLhQHKNI.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`)}),ba=vr(`/`)({component:br(()=>Gr(()=>import(`./routes-9aZugTrf.js`),__vite__mapDeps([9,1,4,3,5])),`component`)}),xa=vr(`/projects/`)({component:br(()=>Gr(()=>import(`./projects-DWwR_fHN.js`),__vite__mapDeps([10,1,11,12,3,13,2,4,5,7,8])),`component`)}),Sa=Te([`sessions`,`mcp`,`tasks`,`scheduler`,`settings`,`system-info`]),Ca=()=>Gr(()=>import(`./session-DK1CQBjg.js`),__vite__mapDeps([14,12,1,3])),wa=()=>Gr(()=>import(`./session-D5eScPGc.js`),__vite__mapDeps([15,1,16,3,17,11,12,13,2,4,5,7,18,19,6,8])),Ta=Te([`explorer`,`git`,`review`,`browser`]),Ea=we({sessionId:Ae().optional(),tab:Sa.optional().default(`sessions`),rightPanel:it().optional(),rightPanelTab:Ta.optional().default(`explorer`)}),Da=vr(`/projects/$projectId/session`)({validateSearch:Ea,component:br(wa,`component`),notFoundComponent:br(Ca,`notFoundComponent`)}),Oa=ya.update({id:`/login`,path:`/login`,getParentRoute:()=>va}),ka={IndexRoute:ba.update({id:`/`,path:`/`,getParentRoute:()=>va}),LoginRoute:Oa,ProjectsIndexRoute:xa.update({id:`/projects/`,path:`/projects/`,getParentRoute:()=>va}),ProjectsProjectIdSessionRoute:Da.update({id:`/projects/$projectId/session`,path:`/projects/$projectId/session`,getParentRoute:()=>va})},Aa=va._addFileChildren(ka)._addFileTypes(),ja=3600*1e3;Xr({immediate:!0,onRegisteredSW(e,t){t&&setInterval(()=>{t.update()},ja)}});var Ma=Pr({routeTree:Aa,context:{},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0,defaultNotFoundComponent:()=>(0,k.jsx)(ti,{})}),Na=document.getElementById(`app`);Na&&!Na.innerHTML&&Vr.createRoot(Na).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(di,{children:(0,k.jsx)(Lr,{router:Ma})})}));export{sa as a,Yi as c,oi as d,ni as f,Zr as h,fa as i,Ji as l,ei as m,Sa as n,na as o,ti as p,ha as r,qi as s,Da as t,ai as u};
|
|
20
|
+
`)),fi(s)&&Ci.test(s)?wi(s):fi(s)?s:Oi(s,this._locale,this._locales)(t,n?.formats)}date(e,t){return _i(this._locales||this._locale,e,t)}number(e,t){return yi(this._locales||this._locale,e,t)}};function Li(e={}){return new Ii(e)}var Ri=Li(),zi=async e=>{switch(e){case`ja`:return Gr(()=>import(`./messages-Cq0t_Ljz.js`),[]);case`en`:return Gr(()=>import(`./messages-DJ70MfCl.js`),[]);case`zh_CN`:return Gr(()=>import(`./messages-DRdgpO3i.js`),[]);default:throw Error(`Unsupported locale: ${String(e)}`)}},Bi=[],Vi=async e=>{if(!Bi.includes(e)){let{messages:t}=await zi(e);Ri.load(e,t),Bi.push(e)}Ri.activate(e)},j=({children:e})=>{let{config:t}=De();return(0,O.useEffect)(()=>{Vi(t.locale)},[t.locale]),(0,k.jsx)(ot,{i18n:Ri,children:e})},M=({children:e})=>(0,k.jsx)(k.Fragment,{children:e}),Hi=(0,O.createContext)(null),Ui={didCatch:!1,error:null},Wi=class extends O.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Ui}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){let{error:t}=this.state;t!==null&&(this.props.onReset?.({args:e,reason:`imperative-api`}),this.setState(Ui))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;n&&t.error!==null&&Gi(e.resetKeys,r)&&(this.props.onReset?.({next:r,prev:e.resetKeys,reason:`keys`}),this.setState(Ui))}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=(0,O.createElement)(n,e);else if(r!==void 0)o=r;else throw a}return(0,O.createElement)(Hi.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function Gi(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var Ki=lt(`relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90`}},defaultVariants:{variant:`default`}}),qi=({className:e,variant:t,...n})=>(0,k.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:mt(Ki({variant:t}),e),...n}),Ji=({className:e,...t})=>(0,k.jsx)(`div`,{"data-slot":`alert-title`,className:mt(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t}),Yi=({className:e,...t})=>(0,k.jsx)(`div`,{"data-slot":`alert-description`,className:mt(`text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,e),...t}),Xi=e=>e instanceof Error?e.message:String(e),Zi=({children:e})=>(0,k.jsx)(Wi,{FallbackComponent:({error:e,resetErrorBoundary:t})=>e instanceof y&&e.status===401?(window.location.href=`/login`,null):(0,k.jsx)(`div`,{className:`flex min-h-screen items-center justify-center p-4`,children:(0,k.jsxs)(ht,{className:`w-full max-w-2xl`,children:[(0,k.jsx)(ut,{children:(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(Zr,{className:`size-6 text-destructive`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(ct,{children:`Something went wrong`}),(0,k.jsx)(pt,{children:`An unexpected error occurred in the application`})]})]})}),(0,k.jsxs)(dt,{className:`space-y-4`,children:[(0,k.jsxs)(qi,{variant:`destructive`,children:[(0,k.jsx)(Zr,{}),(0,k.jsx)(Ji,{children:`Error Details`}),(0,k.jsx)(Yi,{children:(0,k.jsx)(`code`,{className:`text-xs`,children:Xi(e)})})]}),(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsxs)(ft,{onClick:t,variant:`default`,children:[(0,k.jsx)(ei,{}),`Try Again`]}),(0,k.jsxs)(ft,{onClick:()=>{window.location.href=`/`},variant:`outline`,children:[(0,k.jsx)($r,{}),`Go to Home`]})]})]})]})}),children:e}),Qi=e=>{let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=window.atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r.buffer},$i=()=>`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window,ea=async e=>{let t=e?.forceResubscribe===!0,n=await navigator.serviceWorker.ready,r=await n.pushManager.getSubscription();if(r&&!t){await ra(r);return}r&&t&&await r.unsubscribe();let i=await n.pushManager.getSubscription();if(i){await ra(i);return}let a=await c.api.notifications[`vapid-public-key`].$get();if(!a.ok)return;let{publicKey:o}=await a.json();await ra(await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Qi(o)}))},ta=()=>{let e=(0,O.useRef)(!1);(0,O.useEffect)(()=>{e.current||(e.current=!0,$i()&&Notification.permission===`granted`&&ea().catch(e=>{}))},[])},na=async()=>{if(!$i())return`denied`;let e=await Notification.requestPermission();return e===`granted`&&await ea({forceResubscribe:!0}),e},ra=async e=>{let t=e.toJSON();if(t.endpoint===void 0||t.endpoint===``||t.keys===void 0)return;let n=t.keys.p256dh,r=t.keys.auth;n===void 0||n===``||r===void 0||r===``||await c.api.notifications[`push-subscription`].$post({json:{endpoint:t.endpoint,keys:{p256dh:n,auth:r}}})},ia=e=>{let{onOpen:t}=e??{},n=new EventSource(new URL(`/api/sse`,window.location.origin).href);return n.onopen=e=>{console.log(`SSE connection opened`,e),t?.(e)},{addEventListener:(e,t)=>{let r=e=>{try{t(JSON.parse(String(e.data)))}catch(e){console.error(`Failed to parse SSE event data:`,e)}};return n.addEventListener(e,r),{removeEventListener:()=>{n.removeEventListener(e,r)}}},cleanUp:()=>{n.onopen=null,n.onmessage=null,n.close()},eventSource:n}},aa=(0,O.createContext)(null),oa=()=>{let e=(0,O.useContext)(aa);if(!e)throw Error(`useSSEContext must be used within SSEProvider`);return e},sa=m({isConnected:!1}),ca=({children:e})=>{let t=(0,O.useRef)(null),n=(0,O.useRef)(new Map),[,r]=h(sa),i=ve();(0,O.useEffect)(()=>{let e=ia({onOpen:()=>{i.invalidateQueries({queryKey:ie.queryKey}),i.invalidateQueries({predicate:e=>{let t=e.queryKey;return Array.isArray(t)&&t[0]===`projects`&&t[2]===`sessions`}}),i.invalidateQueries({queryKey:s.queryKey})}});t.current=e;let{removeEventListener:n}=e.addEventListener(`connect`,e=>{r({isConnected:!0}),console.log(`SSE connected`,e)});return()=>{e.cleanUp(),n(),t.current=null}},[r,i]);let a={addEventListener:(0,O.useCallback)((e,r)=>{n.current.has(e)||n.current.set(e,new Set);let i=n.current.get(e);i&&i.add(r);let a=null,o=null,s=()=>{if(t.current){let{removeEventListener:n}=t.current.addEventListener(e,e=>{r(e)});a=n}};return t.current?s():o=setTimeout(s,0),()=>{let t=n.current.get(e);t&&(t.delete(r),t.size===0&&n.current.delete(e)),a&&a(),o&&clearTimeout(o)}},[])};return(0,k.jsx)(aa.Provider,{value:a,children:e})},la=({children:e})=>(0,k.jsx)(ca,{children:e}),ua=(e,t)=>{let{addEventListener:n}=oa(),r=(0,O.useRef)(t);(0,O.useEffect)(()=>{r.current=t}),(0,O.useEffect)(()=>{let t=n(e,e=>{r.current(e)});return()=>{t()}},[e,n])},da=({children:e})=>{let t=ve();return ua(`sessionListChanged`,e=>{t.invalidateQueries({queryKey:_e(e.projectId).queryKey})}),ua(`sessionChanged`,e=>{t.invalidateQueries({queryKey:v(e.projectId,e.sessionId).queryKey})}),ua(`agentSessionChanged`,e=>{t.invalidateQueries({predicate:t=>{let n=t.queryKey;return Array.isArray(n)&&n[0]===`projects`&&n[1]===e.projectId&&n[2]===`agent-sessions`&&n[3]===e.agentSessionId}})}),ua(`permissionRequested`,()=>{t.invalidateQueries({queryKey:ne.queryKey})}),ua(`permissionResolved`,()=>{t.invalidateQueries({queryKey:ne.queryKey})}),ua(`questionRequested`,()=>{t.invalidateQueries({queryKey:ge.queryKey})}),ua(`questionResolved`,()=>{t.invalidateQueries({queryKey:ge.queryKey})}),ua(`notificationCreated`,()=>{t.invalidateQueries({queryKey:se.queryKey})}),ua(`notificationConsumed`,()=>{t.invalidateQueries({queryKey:se.queryKey})}),ua(`schedulerJobsChanged`,()=>{t.invalidateQueries({queryKey:[`scheduler`]})}),(0,k.jsx)(k.Fragment,{children:e})},fa=m([]),pa=({children:e})=>{let t=a(fa),{data:n}=l({queryKey:s.queryKey,queryFn:s.queryFn});return ua(`sessionProcessChanged`,({processes:e})=>{t(e)}),(0,O.useEffect)(()=>{t(n.processes)},[n,t]),(0,k.jsx)(k.Fragment,{children:e})},N=({children:e})=>(ta(),(0,k.jsx)(k.Fragment,{children:e})),ma=({children:e})=>{let{isAuthenticated:t}=C();return t?(0,k.jsx)(la,{children:(0,k.jsx)(da,{children:(0,k.jsx)(pa,{children:(0,k.jsx)(N,{children:(0,k.jsx)(Je,{children:e})})})})}):(0,k.jsx)(k.Fragment,{children:e})},ha=()=>{let{config:e}=De(),t=(0,O.useMemo)(()=>e?.theme===`light`||e?.theme===`dark`?e?.theme:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,[e?.theme]);return{theme:e?.theme??`system`,resolvedTheme:t}},ga=({children:e})=>{let{resolvedTheme:t}=ha();return(0,O.useEffect)(()=>{let e=window.document.documentElement;e.classList.remove(`light`,`dark`),e.classList.add(t)},[t]),(0,k.jsx)(k.Fragment,{children:e})},_a=({...e})=>{let{theme:t}=ha();return(0,k.jsx)(Ze,{theme:t,className:`toaster group`,style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`},...e})},va=_r({component:()=>(0,k.jsxs)(Zi,{children:[(0,k.jsx)(ga,{children:(0,k.jsx)(T,{children:(0,k.jsx)(j,{children:(0,k.jsx)(ma,{children:(0,k.jsx)(M,{children:(0,k.jsx)(kr,{})})})})})}),(0,k.jsx)(_a,{position:`top-right`})]})}),ya=vr(`/login`)({component:br(()=>Gr(()=>import(`./login-pLhQHKNI.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8])),`component`)}),ba=vr(`/`)({component:br(()=>Gr(()=>import(`./routes-9aZugTrf.js`),__vite__mapDeps([9,1,4,3,5])),`component`)}),xa=vr(`/projects/`)({component:br(()=>Gr(()=>import(`./projects-BVPr5gWf.js`),__vite__mapDeps([10,1,11,12,3,13,2,4,5,7,8])),`component`)}),Sa=Te([`sessions`,`mcp`,`tasks`,`scheduler`,`settings`,`system-info`]),Ca=()=>Gr(()=>import(`./session-BkAg5Fs5.js`),__vite__mapDeps([14,12,1,3])),wa=()=>Gr(()=>import(`./session-D-iyWO70.js`),__vite__mapDeps([15,1,16,3,17,11,12,13,2,4,5,7,18,19,6,8])),Ta=Te([`explorer`,`git`,`review`,`browser`]),Ea=we({sessionId:Ae().optional(),tab:Sa.optional().default(`sessions`),rightPanel:it().optional(),rightPanelTab:Ta.optional().default(`explorer`)}),Da=vr(`/projects/$projectId/session`)({validateSearch:Ea,component:br(wa,`component`),notFoundComponent:br(Ca,`notFoundComponent`)}),Oa=ya.update({id:`/login`,path:`/login`,getParentRoute:()=>va}),ka={IndexRoute:ba.update({id:`/`,path:`/`,getParentRoute:()=>va}),LoginRoute:Oa,ProjectsIndexRoute:xa.update({id:`/projects/`,path:`/projects/`,getParentRoute:()=>va}),ProjectsProjectIdSessionRoute:Da.update({id:`/projects/$projectId/session`,path:`/projects/$projectId/session`,getParentRoute:()=>va})},Aa=va._addFileChildren(ka)._addFileTypes(),ja=3600*1e3;Xr({immediate:!0,onRegisteredSW(e,t){t&&setInterval(()=>{t.update()},ja)}});var Ma=Pr({routeTree:Aa,context:{},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0,defaultNotFoundComponent:()=>(0,k.jsx)(ti,{})}),Na=document.getElementById(`app`);Na&&!Na.innerHTML&&Vr.createRoot(Na).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(di,{children:(0,k.jsx)(Lr,{router:Ma})})}));export{sa as a,Yi as c,oi as d,ni as f,Zr as h,fa as i,Ji as l,ei as m,Sa as n,na as o,ti as p,ha as r,qi as s,Da as t,ai as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{d as t,f as n}from"./markdown-parser-vendor-D9j1a-bm.js";import{E as r,F as i,P as a,b as o,c as s,ot as c,st as l}from"./AuthProvider-BKc7q7ka.js";import{$ as u,N as d,P as f,Y as p,Z as m,c as h,d as g,f as _,i as v,l as y,n as b,o as x,s as S,u as C}from"./dist-DiGJ7VFi.js";import{n as w}from"./dist-CG2L4mx5.js";import{E as T,T as E,c as D,k as O,n as k,s as A,t as j,w as M}from"./ProtectedRoute-Clw5r4X-.js";import{a as N,i as P,n as F,o as I,r as L,t as R}from"./card-DGrqtTaC.js";import{t as z}from"./label-Cw6sZ5kQ.js";var B=e(n(),1),V=()=>i({queryKey:o.queryKey,queryFn:o.queryFn}),H=t(),U=()=>{let{data:{projects:e}}=V(),{config:t}=f();return e.length,(0,H.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3`,children:e.map(e=>(0,H.jsxs)(R,{className:`hover:shadow-md transition-shadow`,children:[(0,H.jsxs)(P,{children:[(0,H.jsxs)(N,{className:`flex items-center gap-2 justify-start items-start`,children:[(0,H.jsx)(T,{className:`w-5 h-5 flex-shrink-0`}),(0,H.jsx)(`span`,{className:`text-wrap flex-1`,children:e.meta.projectName??e.claudeProjectPath})]}),e.meta.projectPath!==void 0&&e.meta.projectPath!==``?(0,H.jsx)(L,{children:e.meta.projectPath}):null]}),(0,H.jsxs)(F,{className:`space-y-2`,children:[(0,H.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,H.jsx)(w,{id:`project_list.last_modified`}),` `,e.lastModifiedAt?d(e.lastModifiedAt,{locale:t.locale,target:`time`}):``]}),(0,H.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,H.jsx)(w,{id:`project_list.messages`}),` `,e.meta.sessionCount]})]}),(0,H.jsx)(F,{className:`pt-0`,children:(0,H.jsx)(I,{asChild:!0,className:`w-full`,children:(0,H.jsx)(u,{to:`/projects/$projectId/session`,params:{projectId:e.id},children:(0,H.jsx)(w,{id:`project_list.view_conversations`})})})})]},e.id))})},W=({onPathChange:e})=>{let[t,n]=(0,B.useState)(void 0),[r,i]=(0,B.useState)(!1),{data:a,isLoading:o}=p(s(t,r));(0,B.useEffect)(()=>{a?.currentPath!==void 0&&a.currentPath!==``&&e(a.currentPath)},[a?.currentPath,e]);let c=e=>{if(e===``){n(void 0);return}n(`/${e}`)};return(0,H.jsxs)(`div`,{className:`border rounded-md`,children:[(0,H.jsx)(`div`,{className:`p-3 border-b bg-muted/50`,children:(0,H.jsxs)(`p`,{className:`text-sm font-medium`,children:[(0,H.jsx)(w,{id:`directory_picker.current`}),` `,(0,H.jsx)(`span`,{className:`font-mono`,children:a?.currentPath??`~`})]})}),(0,H.jsxs)(`div`,{className:`p-3 border-b flex items-center gap-2`,children:[(0,H.jsx)(A,{id:`show-hidden`,checked:r,onCheckedChange:e=>i(e===!0)}),(0,H.jsx)(z,{htmlFor:`show-hidden`,className:`text-sm cursor-pointer`,children:(0,H.jsx)(w,{id:`directory_picker.show_hidden`})})]}),(0,H.jsx)(`div`,{className:`max-h-96 overflow-auto`,children:o?(0,H.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:(0,H.jsx)(w,{id:`directory_picker.loading`})}):a?.entries&&a.entries.length>0?(0,H.jsx)(`div`,{className:`divide-y`,children:a.entries.filter(e=>e.type===`directory`).filter(e=>r||e.name===`..`||!e.name.startsWith(`.`)).map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>c(e.path),className:`w-full px-3 py-2 flex items-center gap-2 hover:bg-muted/50 transition-colors text-left`,children:[e.name===`..`?(0,H.jsx)(O,{className:`w-4 h-4 rotate-180`}):(0,H.jsx)(T,{className:`w-4 h-4 text-blue-500`}),(0,H.jsx)(`span`,{className:`text-sm`,children:e.name})]},e.path))}):(0,H.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:(0,H.jsx)(w,{id:`directory_picker.no_directories`})})})]})},G=()=>{let[e,t]=(0,B.useState)(!1),[n,i]=(0,B.useState)(``),o=l(),s=a({mutationFn:async()=>{let e=await r.api.projects.$post({json:{projectPath:n}});if(!e.ok)throw Error(`Failed to set up project`);return await e.json()},onSuccess:e=>{b.success(`Project set up successfully`),t(!1),o({to:`/projects/$projectId/session`,params:{projectId:e.projectId},search:{sessionId:e.sessionId}})},onError:e=>{b.error(e instanceof Error?e.message:`Failed to set up project`)}});return(0,H.jsxs)(x,{open:e,onOpenChange:t,children:[(0,H.jsx)(_,{asChild:!0,children:(0,H.jsxs)(I,{"data-testid":`new-project-button`,children:[(0,H.jsx)(M,{className:`w-4 h-4 mr-2`}),(0,H.jsx)(w,{id:`project.new`})]})}),(0,H.jsxs)(S,{className:`max-w-2xl`,"data-testid":`new-project-modal`,children:[(0,H.jsxs)(C,{children:[(0,H.jsx)(g,{children:(0,H.jsx)(w,{id:`project.setup.title`})}),(0,H.jsx)(h,{children:(0,H.jsx)(w,{id:`project.setup.description`,components:{0:(0,H.jsx)(`code`,{className:`text-sm bg-muted px-1 py-0.5 rounded`})}})})]}),(0,H.jsx)(`div`,{className:`py-4`,children:(0,H.jsx)(W,{onPathChange:i})}),(0,H.jsxs)(y,{children:[(0,H.jsx)(I,{variant:`outline`,onClick:()=>t(!1),children:(0,H.jsx)(w,{id:`common.action.cancel`})}),(0,H.jsx)(I,{onClick:()=>{s.mutateAsync()},disabled:n===``||s.isPending,children:s.isPending?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(c,{className:`w-4 h-4 mr-2 animate-spin`}),(0,H.jsx)(w,{id:`project.setup.action.setting_up`})]}):(0,H.jsx)(w,{id:`project.setup.action.setup`})})]})]})]})},K=()=>{let{openSearch:e}=v(),[t,n]=(0,B.useState)(!1);return(0,H.jsxs)(`div`,{className:`flex flex-col h-screen max-h-screen overflow-hidden`,children:[(0,H.jsxs)(`header`,{className:`h-(--spacing-header-height) flex items-center justify-between px-3 bg-muted/30 border-b border-border/40 text-xs flex-shrink-0 select-none`,children:[(0,H.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:`claude-code-viewer`}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:`w-11 h-11 md:w-7 md:h-7 flex items-center justify-center rounded transition-colors hover:bg-muted text-muted-foreground hover:text-foreground`,"aria-label":`System Info`,children:(0,H.jsx)(E,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(`button`,{type:`button`,onClick:e,className:`w-11 h-11 md:w-7 md:h-7 flex items-center justify-center rounded transition-colors hover:bg-muted text-muted-foreground hover:text-foreground`,"aria-label":`Search`,children:(0,H.jsx)(m,{className:`w-3.5 h-3.5`})}),(0,H.jsx)(D,{})]})]}),(0,H.jsx)(x,{open:t,onOpenChange:n,children:(0,H.jsxs)(S,{className:`max-w-md h-[70vh] overflow-hidden p-0`,children:[(0,H.jsx)(g,{className:`sr-only`,children:`System Info`}),(0,H.jsx)(B.Suspense,{fallback:(0,H.jsx)(`div`,{className:`p-8 text-center text-muted-foreground`,children:`Loading...`}),children:(0,H.jsx)(k,{})})]})}),(0,H.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,H.jsxs)(`div`,{className:`container mx-auto px-4 py-8`,children:[(0,H.jsx)(`header`,{className:`mb-8`,children:(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:(0,H.jsx)(w,{id:`projects.page.description`})})}),(0,H.jsx)(`main`,{children:(0,H.jsxs)(`section`,{children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,H.jsx)(`h2`,{className:`text-xl font-semibold`,children:(0,H.jsx)(w,{id:`projects.page.title`})}),(0,H.jsx)(G,{})]}),(0,H.jsx)(B.Suspense,{fallback:(0,H.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,H.jsx)(`div`,{className:`text-muted-foreground`,children:(0,H.jsx)(w,{id:`projects.page.loading`})})}),children:(0,H.jsx)(U,{})})]})})]})})]})},q=()=>(0,H.jsx)(j,{children:(0,H.jsx)(K,{})});export{q as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e}from"./markdown-parser-vendor-D9j1a-bm.js";import{n as t}from"./dist-CG2L4mx5.js";import{p as n}from"./index-BO-D9mWo.js";var r=e(),i=()=>(0,r.jsx)(n,{message:(0,r.jsx)(t,{id:`notfound.session.title`}),description:(0,r.jsx)(t,{id:`notfound.session.description`})});export{i as notFoundComponent};
|