1import{r as d,aJ as At}from"./ErrorPage-D3usKVpd.js";import{r as ue}from"./index-BxE29L5R.js";var Ut=ue();const Jt=0,Kt=1,Yt=2,Ht=3;var kt=Object.prototype.hasOwnProperty;function Ot(t,e){var n,s;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((s=t.length)===e.length)for(;s--&&Ot(t[s],e[s]););return s===-1}if(!n||typeof t=="object"){s=0;for(n in t)if(kt.call(t,n)&&++s&&!kt.call(e,n)||!(n in e)||!Ot(t[n],e[n]))return!1;return Object.keys(e).length===s}}return t!==t&&e!==e}const M=new WeakMap,j=()=>{},w=j(),ft=Object,c=t=>t===w,L=t=>typeof t=="function",q=(t,e)=>({...t,...e}),Gt=t=>L(t.then),mt={},ct={},Lt="undefined",rt=typeof window!=Lt,Ct=typeof document!=Lt,le=rt&&"Deno"in window,fe=()=>rt&&typeof window.requestAnimationFrame!=Lt,Xt=(t,e)=>{const n=M.get(t);return[()=>!c(e)&&t.get(e)||mt,s=>{if(!c(e)){const i=t.get(e);e in ct||(ct[e]=i),n[5](e,q(i,s),i||mt)}},n[6],()=>!c(e)&&e in ct?ct[e]:!c(e)&&t.get(e)||mt]};let Dt=!0;const de=()=>Dt,[Tt,_t]=rt&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[j,j],he=()=>{const t=Ct&&document.visibilityState;return c(t)||t!=="hidden"},Re=t=>(Ct&&document.addEventListener("visibilitychange",t),Tt("focus",t),()=>{Ct&&document.removeEventListener("visibilitychange",t),_t("focus",t)}),ge=t=>{const e=()=>{Dt=!0,t()},n=()=>{Dt=!1};return Tt("online",e),Tt("offline",n),()=>{_t("online",e),_t("offline",n)}},Ee={isOnline:de,isVisible:he},me={initFocus:Re,initReconnect:ge},$t=!At.useId,Q=!rt||le,pe=t=>fe()?window.requestAnimationFrame(t):setTimeout(t,1),lt=Q?d.useEffect:d.useLayoutEffect,pt=typeof navigator<"u"&&navigator.connection,zt=!Q&&pt&&(["slow-2g","2g"].includes(pt.effectiveType)||pt.saveData),ut=new WeakMap,ve=t=>ft.prototype.toString.call(t),vt=(t,e)=>t===`[object ${e}]`;let we=0;const yt=t=>{const e=typeof t,n=ve(t),s=vt(n,"Date"),i=vt(n,"RegExp"),a=vt(n,"Object");let r,u;if(ft(t)===t&&!s&&!i){if(r=ut.get(t),r)return r;if(r=++we+"~",ut.set(t,r),Array.isArray(t)){for(r="@",u=0;u<t.length;u++)r+=yt(t[u])+",";ut.set(t,r)}if(a){r="#";const l=ft.keys(t).sort();for(;!c(u=l.pop());)c(t[u])||(r+=u+":"+yt(t[u])+",");ut.set(t,r)}}else r=s?t.toJSON():e=="symbol"?t.toString():e=="string"?JSON.stringify(t):""+t;return r},Vt=t=>{if(L(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?yt(t):"",[t,e]};let Se=0;const bt=()=>++Se;async function Qt(...t){const[e,n,s,i]=t,a=q({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let r=a.populateCache;const u=a.rollbackOnError;let l=a.optimisticData;const y=v=>typeof u=="function"?u(v):u!==!1,C=a.throwOnError;if(L(n)){const v=n,m=[],D=e.keys();for(const b of D)!/^\$(inf|sub)\$/.test(b)&&v(e.get(b)._k)&&m.push(b);return Promise.all(m.map(S))}return S(n);async function S(v){const[m]=Vt(v);if(!m)return;const[D,b]=Xt(e,m),[V,Z,o,ot]=M.get(e),$=()=>{const I=V[m];return(L(a.revalidate)?a.revalidate(D().data,v):a.revalidate!==!1)&&(delete o[m],delete ot[m],I&&I[0])?I[0](Yt).then(()=>D().data):D().data};if(t.length<3)return $();let O=s,N,x=!1;const z=bt();Z[m]=[z,0];const h=!c(l),B=D(),F=B.data,J=B._c,U=c(J)?F:J;if(h&&(l=L(l)?l(U,F):l,b({data:l,_c:U})),L(O))try{O=O(U)}catch(I){N=I,x=!0}if(O&&Gt(O))if(O=await O.catch(I=>{N=I,x=!0}),z!==Z[m][0]){if(x)throw N;return O}else x&&h&&y(N)&&(r=!0,b({data:U,_c:w}));if(r&&!x)if(L(r)){const I=r(O,U);b({data:I,error:w,_c:w})}else b({data:O,error:w,_c:w});if(Z[m][1]=bt(),Promise.resolve($()).then(()=>{b({_c:w})}),x){if(C)throw N;return}return O}}const Bt=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},Zt=(t,e)=>{if(!M.has(t)){const n=q(me,e),s=Object.create(null),i=Qt.bind(w,t);let a=j;const r=Object.create(null),u=(C,S)=>{const v=r[C]||[];return r[C]=v,v.push(S),()=>{const m=v.indexOf(S);m>=0&&(v[m]=v[v.length-1],v.pop())}},l=(C,S,v)=>{t.set(C,S);const m=r[C];if(m)for(const D of m)D(S,v)},y=()=>{if(!M.has(t)&&(M.set(t,[s,Object.create(null),Object.create(null),Object.create(null),i,l,u]),!Q)){const C=n.initFocus(setTimeout.bind(w,Bt.bind(w,s,Jt))),S=n.initReconnect(setTimeout.bind(w,Bt.bind(w,s,Kt)));a=()=>{C&&C(),S&&S(),M.delete(t)}}};return y(),[t,i,y,a]}return[t,M.get(t)[4]]},Oe=(t,e,n,s,i)=>{const a=n.errorRetryCount,r=i.retryCount,u=~~((Math.random()+.5)*(1<<(r<8?r:8)))*n.errorRetryInterval;!c(a)&&r>a||setTimeout(s,u,i)},Ce=Ot,[Nt,De]=Zt(new Map),te=q({onLoadingSlow:j,onSuccess:j,onError:j,onErrorRetry:Oe,onDiscarded:j,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:zt?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:zt?5e3:3e3,compare:Ce,isPaused:()=>!1,cache:Nt,mutate:De,fallback:{}},Ee),ee=(t,e)=>{const n=q(t,e);if(e){const{use:s,fallback:i}=t,{use:a,fallback:r}=e;s&&a&&(n.use=s.concat(a)),i&&r&&(n.fallback=q(i,r))}return n},It=d.createContext({}),Te=t=>{const{value:e}=t,n=d.useContext(It),s=L(e),i=d.useMemo(()=>
1s?e(n):e,[s,n,e]),a=d.useMemo(()=>s?i:ee(n,i),[s,n,i]),r=i&&i.provider,u=d.useRef(w);r&&!u.current&&(u.current=Zt(r(a.cache||Nt),i));const l=u.current;return l&&(a.cache=l[0],a.mutate=l[1]),lt(()=>{if(l)return l[2]&&l[2](),l[3]},[]),d.createElement(It.Provider,q(t,{value:a}))},_e="$inf$",ne=rt&&window.__SWR_DEVTOOLS_USE__,ye=ne?window.__SWR_DEVTOOLS_USE__:[],be=()=>{ne&&(window.__SWR_DEVTOOLS_REACT__=At)},se=t=>L(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],Ie=()=>{const t=d.useContext(It);return d.useMemo(()=>q(te,t),[t])},Ae=t=>(e,n,s)=>t(e,n&&((...a)=>{const[r]=Vt(e),[,,,u]=M.get(Nt);if(r.startsWith(_e))return n(...a);const l=u[r];return c(l)?n(...a):(delete u[r],l)}),s),Le=ye.concat(Ae),Ve=t=>function(...n){const s=Ie(),[i,a,r]=se(n),u=ee(s,r);let l=t;const{use:y}=u,C=(y||[]).concat(Le);for(let S=C.length;S--;)l=C[S](l);return l(i,a||u.fetcher||null,u)},Ne=(t,e,n)=>{const s=e[t]||(e[t]=[]);return s.push(n),()=>{const i=s.indexOf(n);i>=0&&(s[i]=s[s.length-1],s.pop())}},je=(t,e)=>(...n)=>{const[s,i,a]=se(n),r=(a.use||[]).concat(e);return t(s,i,{...a,use:r})};be();const wt=At.use||(t=>{switch(t.status){case"pending":throw t;case"fulfilled":return t.value;case"rejected":throw t.reason;default:throw t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t}}),St={dedupe:!0},dt=Promise.resolve(w);dt.status="fulfilled";dt.value=w;const xe=()=>j,Fe=(t,e,n)=>{const{cache:s,compare:i,suspense:a,fallbackData:r,revalidateOnMount:u,revalidateIfStale:l,refreshInterval:y,refreshWhenHidden:C,refreshWhenOffline:S,keepPreviousData:v,strictServerPrefetchWarning:m}=n,[D,b,V,Z]=M.get(s),[o,ot]=Vt(t),$=d.useRef(!1),O=d.useRef(!1),N=d.useRef(o),x=d.useRef(e),z=d.useRef(n),h=()=>z.current,B=()=>h().isVisible()&&h().isOnline(),[F,J,U,I]=Xt(s,o),K=d.useRef({}).current,Y=c(r)?c(n.fallback)?w:n.fallback[o]:r,xt=(f,R)=>{for(const g in K){const E=g;if(E==="data"){if(!i(f[E],R[E])&&(!c(f[E])||!i(at,R[E])))return!1}else if(R[E]!==f[E])return!1}return!0},ht=!$.current,Ft=d.useMemo(()=>{const f=F(),R=I(),g=p=>{const A=q(p);return delete A._k,(()=>{if(!o||!e||h().isPaused())return!1;if(ht&&!c(u))return u;const st=c(Y)?A.data:Y;return c(st)||l})()?{isValidating:!0,isLoading:!0,...A}:A},E=g(f),W=f===R?E:g(R);let T=E;return[()=>{const p=g(F());return xt(p,T)?(T.data=p.data,T.isLoading=p.isLoading,T.isValidating=p.isValidating,T.error=p.error,T):(T=p,p)},()=>W]},[s,o]),G=Ut.useSyncExternalStore(d.useCallback(f=>U(o,(R,g)=>{xt(g,R)||f()}),[s,o]),Ft[0],Ft[1]),re=D[o]&&D[o].length>0,X=G.data,H=c(X)?Y&&Gt(Y)?wt(Y):Y:X,it=G.error,Rt=d.useRef(H),at=v?c(X)?c(Rt.current)?H:Rt.current:X:H,k=o&&c(H),tt=d.useRef(null);!Q&&Ut.useSyncExternalStore(xe,()=>(tt.current=!1,tt),()=>(tt.current=!0,tt));const oe=tt.current;m&&oe&&!a&&k&&console.warn(`Missing pre-initiated data for serialized key "${o}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const Wt=!o||!e||h().isPaused()||re&&!c(it)?!1:ht&&!c(u)?u:a?c(H)?!1:l:c(H)||l,Pt=ht&&Wt,ie=c(G.isValidating)?Pt:G.isValidating,ae=c(G.isLoading)?Pt:G.isLoading,et=d.useCallback(async f=>{const R=x.current;if(!o||!R||O.current||h().isPaused())return!1;let g,E,W=!0;const T=f||{},p=!V[o]||!T.dedupe,A=()=>$t?!O.current&&o===N.current&&$.current:o===N.current,nt={isValidating:!1,isLoading:!1},st=()=>{J(nt)},jt=()=>{const _=V[o];_&&_[1]===E&&delete V[o]},qt={isValidating:!0};c(F().data)&&(qt.isLoading=!0);try{if(p&&(J(qt),n.loadingTimeout&&c(F().data)&&setTimeout(()=>{W&&A()&&h().onLoadingSlow(o,n)},n.loadingTimeout),V[o]=[R(ot),bt()]),[g,E]=V[o],g=await g,p&&setTimeout(jt,n.dedupingInterval),!V[o]||V[o][1]!==E)return p&&A()&&h().onDiscarded(o),!1;nt.error=w;const _=b[o];if(!c(_)&&(E<=_[0]||E<=_[1]||_[1]===0))return st(),p&&A()&&h().onDiscarded(o),!1;const P=F().data;nt.data=i(P,g)?P:g,p&&A()&&h().onSuccess(g,o,n)}catch(_){jt();const P=h(),{shouldRetryOnError:gt}=P;P.isPaused()||(nt.error=_,p&&A()&&(P.onError(_,o,P),(gt===!0||L(gt)&>(_))&&(!h().revalidateOnFocus||!h().revalidateOnReconnect||B())&&P.onErrorRetry(_,o,P,ce=>{const Et=D[o];Et&&Et[0]&&Et[0](Ht,ce)},{retryCount:(T.retryCount||0)+1,dedupe:!0})))}return W=!1,st(),!0},[o,s]),Mt=d.useCallback((...f)=>Qt(s,N.current,...f),[]);if(lt(()=>{x.current=e,z.current=n,c(X)||(Rt.current=X)}),lt(()=>{if(!o)return;const f=et.bind(w,St);let R=0;h().revalidateOnFocus&&(R=Date.now()+h().focusThrottleInterval);const E=Ne(o,D,(W,T={})=>
1{if(W==Jt){const p=Date.now();h().revalidateOnFocus&&p>R&&B()&&(R=p+h().focusThrottleInterval,f())}else if(W==Kt)h().revalidateOnReconnect&&B()&&f();else{if(W==Yt)return et();if(W==Ht)return et(T)}});return O.current=!1,N.current=o,$.current=!0,J({_k:ot}),Wt&&(V[o]||(c(H)||Q?f():pe(f))),()=>{O.current=!0,E()}},[o]),lt(()=>{let f;function R(){const E=L(y)?y(F().data):y;E&&f!==-1&&(f=setTimeout(g,E))}function g(){!F().error&&(C||h().isVisible())&&(S||h().isOnline())?et(St).then(R):R()}return R(),()=>{f&&(clearTimeout(f),f=-1)}},[y,C,S,o]),d.useDebugValue(at),a){if(!$t&&Q&&k)throw new Error("Fallback data is required when using Suspense in SSR.");k&&(x.current=e,z.current=n,O.current=!1);const f=Z[o],R=!c(f)&&k?Mt(f):dt;if(wt(R),!c(it)&&k)throw it;const g=k?et(St):dt;!c(at)&&k&&(g.status="fulfilled",g.value=!0),wt(g)}return{mutate:Mt,get data(){return K.data=!0,at},get error(){return K.error=!0,it},get isValidating(){return K.isValidating=!0,ie},get isLoading(){return K.isLoading=!0,ae}}},qe=ft.defineProperty(Te,"defaultValue",{value:te}),Ue=Ve(Fe);export{_e as I,qe as S,w as U,M as a,Xt as b,Nt as c,lt as d,Vt as e,L as f,c as i,De as m,Ut as s,Ue as u,je as w}; 2//# sourceMappingURL=index-Vszvsomj.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.