@deslop/auth 0.1.1227 → 0.1.1231

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.
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-CCrWjb5A.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/client-ClOiXUNj.js","assets/effect-CP5U-98U.js","assets/components-C_j5giMJ.js","assets/(home)-DNsm_lO-.js","assets/people-zIaLZpqU.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{o as t,r as n,s as r}from"./react-BUjtWCUj.js";import{$ as i,Q as a,X as o,Y as s,Z as c,at as l,ct as u,dt as d,et as f,ft as p,it as m,lt as h,n as g,nt as _,ot as v,pt as ee,q as te,rt as y,st as b,tt as x,ut as S}from"./client-ClOiXUNj.js";var C=e(r(),1),w=C.use,T=C.useLayoutEffect,E=C.createContext(null);function D(e){return C.useContext(E)}function O(e){let t=D();return C.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function k(e){let t=D(),n=O(),r=C.useRef(null);return T(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var A=`Error preloading route! ☝️`;function j(e,t){if(e)return typeof e==`string`?e:e[t]}function M(e){return e?.scriptFormat??`module`}function N(e,t,n){let r=P(t),i=j(n,`script`)??r.crossOrigin;return{...M(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function P(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function F(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ne(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(e,t,n,r){let i=s(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function L([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var re=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,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=i:this.parentRoute||l();let r=n?i:t?.path;r&&r!==`/`&&(r=y(r));let a=t?.id||r,o=n?i:x((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(a??``));r===`__root__`&&(r=`/`);let s=o===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:x(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=o,this._fullPath=s,this._to=m(s)},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=>a({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.`)}},ie=class extends re{constructor(e){super(e)}};function ae(e,t){let n=e.stores.location,r=new Set,i,a,s=n=>{o(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(s).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var R=C.createContext(void 0),oe=C.createContext(void 0),z=t();function se(...e){let t=C.useRef(e),n=t.current;return e.forEach((e,t)=>{v(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(A)})}function ce(e,t){let n=typeof e==`string`&&h(e);if(n)return t.has(n)?e:null}function le(e,t,n,r){let i=_(e.pathname,r),a=_(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!v(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function ue(e,t,n){let r=D(),i=C.useRef(null),a=C.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,disabled:u,target:d,onClick:f,onBlur:p,onFocus:m,onMouseEnter:g,onMouseLeave:_,onTouchStart:v}=e,[ee,te,y]=se(e.search,e.params,o),b=C.useContext(R),x=(r.stores._linkScopes??={})[b]??=ae(r,b),[S,w,T]=C.useMemo(()=>{let t=ce(s,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,c=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=ge(t,r,u),s=u||o&&!h(o)?le(e,t,y,r.basepath):void 0;a&&a[0]===o&&a[1]===s||(a=[o,s]),i=e}return a};return[n,c,y?.includeHash&&(()=>{let e=c();return e[1]?o??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,s,ee,te,e.state,e.mask,e.unsafeRelative,y,u]),[E,O]=C.useSyncExternalStore(x[1],w,T||w),k=O===void 0&&E,A=u||E===void 0,j=C.useRef(!1),M=e.reloadDocument||k||A?!1:c??r.options.defaultPreload,N=l??r.options.defaultPreloadDelay??0,P=C.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,B(r,S)},N):B(r,S):t===!1&&V(i)},[r,S,i,M,N]);C.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,B(r,S));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),V(i)}},[r,S,M,P,i]);let F=me(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let ne=t=>{let n=d??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),V(i),r.navigate({...e,_fromLocation:S._fromLocation}))},I=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(f,ne),F.onBlur=H(p,L),F.onFocus=H(m,P),F.onMouseEnter=H(g,P),F.onMouseLeave=H(_,L),F.onTouchStart=H(v,I),he(F,e,O,E,A,n)}var de={},fe={className:`active`},pe=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function me(e,t){let n={};for(let r in e)pe.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function he(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:d}=t,f=u(n?o:s,{})??(n?fe:de);Object.assign(e,f),e.href=r,a!==`a`&&(e.disabled=i),e.target=d;let p=f.style;(l||p)&&(e.style=l&&p?{...l,...p}:l||p);let m=f.className;return(c||m)&&(e.className=c?m?`${c} ${m}`:c:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var V=e=>{clearTimeout(e.t),e.t=void 0},H=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ge(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!d(i,t.protocolAllowlist))return i}var U=C.memo(C.forwardRef((e,t)=>{let n=e._asChild||`a`,r=ue(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return C.createElement(n,r,i)}),_e);function _e(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!pe.has(r)||!v(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ve=te();function ye(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??ye,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,ve.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var be={};function xe(e,t){let n=C.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ee(n.current,i):i}}function G(e){let t=D(),n=C.useContext(e.from?oe:R),r=e.from??n,i=t.stores.getMatchStore(r),a=xe(e,t),o=W(i,e=>e?a(e):be);if(o!==be)return o;(e.shouldThrow??!0)&&l()}function K(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Se(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ce(e){return G({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 we(e){return G({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Te(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var Ee=class extends re{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Te({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ce({...e,from:this.id}),this.useLoaderDeps=e=>Se({...e,from:this.id}),this.useLoaderData=e=>K({...e,from:this.id}),this.useNavigate=()=>O({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function De(e){return new Ee(e)}var Oe=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Te({...e,from:this.id}),this.useSearch=e=>we({...e,from:this.id}),this.useParams=e=>Ce({...e,from:this.id}),this.useLoaderDeps=e=>Se({...e,from:this.id}),this.useLoaderData=e=>K({...e,from:this.id}),this.useNavigate=()=>O({from:this.fullPath}),this.Link=C.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function ke(e){return new Oe(e)}function q(e){return e=>{let t=De(e);return t.isRoot=!1,t}}function J(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(p(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(w)w(a());else throw a()}return C.createElement(r,e)};return o.preload=a,o}var Y=class extends C.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?C.createElement(this.props.errorComponent??Ae,{error:e[0],reset:this.reset}):this.props.children}};function Ae({error:e}){let[t,n]=C.useState(!1);return(0,z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,z.jsx)(`div`,{children:(0,z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,z.jsx)(`code`,{children:e.message}):null})}):null]})}var je=()=>!0,Me=()=>!1;function Ne({children:e,fallback:t=null}){return(0,z.jsx)(C.Fragment,{children:Pe()?e:t})}function Pe(e=!0){return C.useSyncExternalStore(Fe,je,e?Me:je)}function Fe(){return()=>{}}function Ie(e){let t=D(),n=`not-found-${W(t.stores.location,e=>e.pathname)}-${W(t.stores.status)}`;return(0,z.jsx)(Y,{getResetKey:()=>n,onCatch:(t,n)=>{if(f(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(f(t))return e.fallback?.(t);throw t},children:e.children})}function Le(){return(0,z.jsx)(`p`,{children:`Not Found`})}function Re(e,t,n){return t.options.notFoundComponent?(0,z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,z.jsx)(Le,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var ze=(e,t)=>e[0]===t[0]&&e[1]===t[1],Be=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Ve=C.memo(function({routeId:e}){let t=D();return He(t,W(t.stores.getMatchStore(e)))});function He(e,t){let n=e.routesById[t.routeId],r=X(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Be(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(Ue,{match:t});s&&(l=(0,z.jsx)(Ne,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Ie,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return C.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(f(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(C.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,z.jsx)(R.Provider,{value:t.routeId,children:(0,z.jsxs)(u,{children:[l,null]})}):(0,z.jsxs)(R.Provider,{value:t.routeId,children:[l,null]})}var Ue=C.memo(function({match:e}){let t=D(),n=e.routeId,r=t.routesById[n],i=C.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=C.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(We,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Be(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return Re(t,r,e.error);if(e.status===`error`)throw e.error;return a}),We=C.memo(function(){let e=D(),t=C.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:ze}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Re(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(Ve,{routeId:i});return t===`__root__`?(0,z.jsx)(C.Suspense,{fallback:X(e),children:a}):a});function Ge(e,t){let n=e[1];e.length=0,n?.(t)}function Ke({t:e}){let t=D(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ge(n,!1),n.push(i,a),e(t),C.startTransition(r)}),T(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(m(r.publicHref)!==m(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...c(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function qe(){let e=D(),t=e.routesById[i],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ke,{t:C.useState()[1]}),e.ssr?(0,z.jsx)(Je,{}):(0,z.jsx)(C.Suspense,{fallback:n,children:(0,z.jsx)(Je,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Je(){let e=D(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;T(()=>{t[0]===n&&Ge(t,!0)},[t,n]);let a=i?(0,z.jsx)(Ve,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Ye(){let e=D();return C.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,W(e.stores.location,e=>e.href),W(e.stores.resolvedLocation,e=>e?.href),W(e.stores.status)])}function Xe({router:e,children:t,...n}){S(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(E.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Ze({router:e,...t}){return(0,z.jsx)(Xe,{router:e,...t,children:(0,z.jsx)(qe,{})})}function Z(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Qe(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=C.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)($e,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function $e({attrs:e,children:t,preventScriptHoist:n}){D();let r=Pe(),i=C.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(C.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return Z(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,Z(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function et(e,t,n,r){n=s(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},c;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)c||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:b(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}c&&a.push(c),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let l=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),u=e.ssr?.manifest,d=[];u&&(n.forEach(e=>{(u.routes[e.routeId]?.css)?.forEach(e=>{let n=ne(e);d.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:j(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),u.inlineStyle&&d.push({tag:`style`,attrs:{...u.inlineStyle.attrs,nonce:t},children:u.inlineStyle.children,inlineCss:!0}));let f=[];u&&n.forEach(e=>{u.routes[e.routeId]?.preloads?.forEach(e=>{f.push({tag:`link`,attrs:{...N(u,e,r),nonce:t}})})});let p=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),m=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),h=[];return F(h,a),h.push(...f),F(h,l),h.push(...d),F(h,p),F(h,m),h}var tt=e=>{let t=D(),n=t.options.ssr?.nonce,r=C.useCallback(r=>et(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:v})};function nt(e){let t=tt(e.assetCrossOrigin),n=D().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,C.createElement)(Qe,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var rt={suppressHydrationWarning:!0},it=()=>{let e=D(),t=e.options.ssr?.nonce,n=n=>{let r=I(n,e.ssr?.manifest,t,rt);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return at(W(e.stores.matches,e=>L(n(e)),{compare:v}))};function at(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,C.createElement)(Qe,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ot=n(),st=ke({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(nt,{}),(0,z.jsx)(it,{}),e.children]})}),ct=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),lt=function(e){return`/`+e},ut={},dt=function(e){return e.pathname.endsWith(`.css`)},ft=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=lt(t,n);let r=s(t),i=dt(r);return ft(ut,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ct,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},pt=q(`/(home)`)({component:J(()=>Q(()=>import(`./route-CCrWjb5A.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),mt=q(`/(home)/`)({component:J(()=>Q(()=>import(`./(home)-DNsm_lO-.js`),__vite__mapDeps([6,1,2,3,4,5])),`component`)}),ht=q(`/(home)/people`)({component:J(()=>Q(()=>import(`./people-zIaLZpqU.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),$=pt.update({id:`/(home)`,getParentRoute:()=>st}),gt=mt.update({id:`/`,path:`/`,getParentRoute:()=>$}),_t={homePeopleRoute:ht.update({id:`/people`,path:`/people`,getParentRoute:()=>$}),homeIndexRoute:gt},vt={homeRouteRoute:$._addFileChildren(_t)},yt=st._addFileChildren(vt)._addFileTypes(),bt=g(yt);(0,ot.createRoot)(bt.root).render((0,z.jsx)(C.StrictMode,{children:(0,z.jsx)(Ze,{router:bt.router})}));export{k as i,We as n,U as r,Ye as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{s as i}from"./client-ClOiXUNj.js";import{Bi as a,F as o,H as s,Ki as c,Sa as l,Zi as u,ga as d,ta as f,ua as p,ya as m}from"./effect-CP5U-98U.js";import{Dn as h,En as g,Ln as _,On as v,Pn as y,Sn as b,Tn as x,a as S,bn as C,f as w,i as T,kn as E,p as D,t as O,u as k,wn as A,xn as j}from"./components-C_j5giMJ.js";import{i as M}from"./index-C8Ug5KEH.js";var N=t(),P=e(r()),F=n();function I(e){let t=(0,N.c)(17),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,F.jsx)(v,{children:(0,F.jsx)(O,{id:e.person.id,name:e.person.name})}),t[0]=e.person.id,t[1]=e.person.name,t[2]=n):n=t[2];let r=e.person.fullName??e.person.name,i;t[3]===r?i=t[4]:(i=(0,F.jsx)(E,{children:r}),t[3]=r,t[4]=i);let a;t[5]!==e.detail||t[6]!==e.person.name?(a=(0,F.jsxs)(h,{className:`font-mono`,children:[`@`,e.person.name,` · `,e.detail]}),t[5]=e.detail,t[6]=e.person.name,t[7]=a):a=t[7];let o;t[8]!==i||t[9]!==a?(o=(0,F.jsxs)(g,{children:[i,a]}),t[8]=i,t[9]=a,t[10]=o):o=t[10];let s;t[11]===e.actions?s=t[12]:(s=(0,F.jsx)(x,{children:e.actions}),t[11]=e.actions,t[12]=s);let c;return t[13]!==n||t[14]!==o||t[15]!==s?(c=(0,F.jsxs)(A,{role:`listitem`,children:[n,o,s]}),t[13]=n,t[14]=o,t[15]=s,t[16]=c):c=t[16],c}function L(e){let t=(0,N.c)(25),[n,r]=y(S),a=e.person,o;t[0]===e.person.since?o=t[1]:(o=k(e.person.since),t[0]=e.person.since,t[1]=o);let c;t[2]===n?c=t[3]:(c=s(n),t[2]=n,t[3]=c);let l;t[4]!==r||t[5]!==e.person.id?(l=()=>r({allow:!0,id:e.person.id}),t[4]=r,t[5]=e.person.id,t[6]=l):l=t[6];let u;t[7]!==c||t[8]!==l?(u=(0,F.jsx)(i,{disabled:c,onClick:l,children:`Allow`}),t[7]=c,t[8]=l,t[9]=u):u=t[9];let d;t[10]===n?d=t[11]:(d=s(n),t[10]=n,t[11]=d);let f;t[12]!==r||t[13]!==e.person.id?(f=()=>r({allow:!1,id:e.person.id}),t[12]=r,t[13]=e.person.id,t[14]=f):f=t[14];let p;t[15]!==d||t[16]!==f?(p=(0,F.jsx)(i,{variant:`outline`,disabled:d,onClick:f,children:`Decline`}),t[15]=d,t[16]=f,t[17]=p):p=t[17];let m;t[18]!==u||t[19]!==p?(m=(0,F.jsxs)(F.Fragment,{children:[u,p]}),t[18]=u,t[19]=p,t[20]=m):m=t[20];let h;return t[21]!==e.person||t[22]!==o||t[23]!==m?(h=(0,F.jsx)(I,{person:a,detail:o,actions:m}),t[21]=e.person,t[22]=o,t[23]=m,t[24]=h):h=t[24],h}function R(e){let t=(0,N.c)(14),[n,r]=y(D),o=e.person,c;if(t[0]!==e.person.role||t[1]!==e.person.since){let n;t[3]===e.person.since?n=t[4]:(n=()=>`since ${k(e.person.since)}`,t[3]=e.person.since,t[4]=n),c=a(e.person.role===`Admin`,{onFalse:n,onTrue:z}),t[0]=e.person.role,t[1]=e.person.since,t[2]=c}else c=t[2];let l;t[5]!==e.person.id||t[6]!==e.person.role||t[7]!==n||t[8]!==r?(l=e.person.role===`Member`&&(0,F.jsx)(i,{variant:`outline`,disabled:s(n),onClick:()=>r(e.person.id),children:`Remove`}),t[5]=e.person.id,t[6]=e.person.role,t[7]=n,t[8]=r,t[9]=l):l=t[9];let u;return t[10]!==e.person||t[11]!==c||t[12]!==l?(u=(0,F.jsx)(I,{person:o,detail:c,actions:l}),t[10]=e.person,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function z(){return`admin`}function B(e){let t=(0,N.c)(8),n;t[0]===e.title?n=t[1]:(n=(0,F.jsx)(`h2`,{className:`text-muted-foreground font-mono text-xs`,children:e.title}),t[0]=e.title,t[1]=n);let r;t[2]!==e.children||t[3]!==e.label?(r=(0,F.jsx)(j,{label:e.label,children:e.children}),t[2]=e.children,t[3]=e.label,t[4]=r):r=t[4];let i;return t[5]!==n||t[6]!==r?(i=(0,F.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[n,r]}),t[5]=n,t[6]=r,t[7]=i):i=t[7],i}function V(){let e=(0,N.c)(14),t=_(w).value,n=c(t,K),r=c(t,G),[i]=y(S),[a]=y(D),s;e[0]===a?s=e[1]:(s=()=>o(a),e[0]=a,e[1]=s);let p=l(o(i),s),h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,F.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:`People`}),e[2]=h):h=e[2];let g=u(n)&&(0,F.jsx)(B,{label:`Asking for access`,title:`${n.length} asking`,children:f(n,W)}),v=`${r.length} with access`,b=f(r,U),x;e[3]!==v||e[4]!==b?(x=(0,F.jsx)(B,{label:`With access`,title:v,children:b}),e[3]=v,e[4]=b,e[5]=x):x=e[5];let T=C,E=d(m(p,H)),O;e[6]!==T||e[7]!==E?(O=(0,F.jsx)(T,{children:E}),e[6]=T,e[7]=E,e[8]=O):O=e[8];let k;return e[9]!==h||e[10]!==g||e[11]!==x||e[12]!==O?(k=(0,F.jsxs)(F.Fragment,{children:[h,g,x,O]}),e[9]=h,e[10]=g,e[11]=x,e[12]=O,e[13]=k):k=e[13],k}function H(e){return e.message}function U(e){return(0,F.jsx)(R,{person:e},e.id)}function W(e){return(0,F.jsx)(L,{person:e},e.id)}function G(e){return e.role!==`Waiting`}function K(e){return e.role===`Waiting`}function q(){let e=(0,N.c)(2);if(!p(_(T).value,J)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(M,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,F.jsx)(P.Suspense,{fallback:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`h1`,{className:`text-xl font-semibold tracking-tight`,children:`People`}),(0,F.jsx)(b,{label:`People`,media:!0,rows:3})]}),children:(0,F.jsx)(V,{})}),e[1]=t):t=e[1],t}function J(e){return e.role===`Admin`}export{q as component};