PageSourceSearch

https://naritai.app/assets/components-BlKJZwkS.js

js naritai.app collected 2026-10-09 22:05:09 UTC 6,131 bytes, 1 lines download raw bytes

1import{u as J,r as t,g as W,w as N,D as q,a as z,F as U,V as _,i as V,b as O,p as G,s as K,c as j,N as B,L as Q,d as X,e as Z,f as Y,h as $,k as A,R as F,l as I,m as ee,n as te,o as ae,q as ne,t as oe}from"./warnings-DbRFP8yh.js";const fe=["HydrateFallback","hydrateFallbackElement"];var ie=class{status="pending";promise;resolve;reject;constructor(){this.promise=new Promise((e,a)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",a(n))}})}};function he({router:e,flushSync:a,onError:n,useTransitions:i}){i=J()||i;let[g,s]=t.useState(e.state),[l,r]=t.useOptimistic(g),[f,c]=t.useState(),[h,m]=t.useState({isTransitioning:!1}),[u,L]=t.useState(),[v,R]=t.useState(),[x,D]=t.useState(),C=t.useRef(new Map),k=t.useCallback((o,{deletedFetchers:b,newErrors:p,flushSync:P,viewTransitionOpts:y})=>{p&&n&&Object.values(p).forEach(d=>n(d,{location:o.location,params:o.matches[0]?.params??{},pattern:W(o.matches)})),o.fetchers.forEach((d,S)=>{d.data!==void 0&&C.current.set(S,d.data)}),b.forEach(d=>C.current.delete(d)),N(P===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let M=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(N(y==null||M,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!y||!M){a&&P?a(()=>s(o)):i===!1?s(o):t.startTransition(()=>{i===!0&&r(d=>T(d,o)),s(o)});return}if(a&&P){a(()=>{v&&(u?.resolve(),v.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:y.currentLocation,nextLocation:y.nextLocation})});let d=e.window.document.startViewTransition(()=>{a(()=>s(o))});d.finished.finally(()=>{a(()=>{L(void 0),R(void 0),c(void 0),m({isTransitioning:!1})})}),a(()=>R(d));return}v?(u?.resolve(),v.skipTransition(),D({state:o,currentLocation:y.currentLocation,nextLocation:y.nextLocation})):(c(o),m({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}))},[e.window,a,v,u,i,r,n]);t.useLayoutEffect(()=>e.subscribe(k),[e,k]),t.useEffect(()=>{h.isTransitioning&&!h.flushSync&&L(new ie)},[h]),t.useEffect(()=>{if(u&&f&&e.window){let o=f,b=u.promise,p=e.window.document.startViewTransition(async()=>{i===!1?s(o):t.startTransition(()=>{i===!0&&r(P=>T(P,o)),s(o)}),await b});p.finished.finally(()=>{L(void 0),R(void 0),c(void 0),m({isTransitioning:!1})}),R(p)}},[f,u,e.window,i,r]),t.useEffect(()=>{u&&f&&l.location.key===f.location.key&&u.resolve()},[u,v,l.location,f]),t.useEffect(()=>{!h.isTransitioning&&x&&(c(x.state),m({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),D(void 0))},[h.isTransitioning,x]);let E=t.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:o=>e.navigate(o),push:(o,b,p)=>e.navigate(o,{state:b,preventScrollReset:p?.preventScrollReset}),replace:(o,b,p)=>e.navigate(o,{replace:!0,state:b,preventScrollReset:p?.preventScrollReset})}),[e]),w=e.basename||"/",H=t.useMemo(()=>({router:e,navigator:E,static:!1,basename:w,onError:n}),[e,E,w,n]);return t.createElement(t.Fragment,null,t.createElement(q.Provider,{value:H},t.createElement(z.Provider,{value:l},t.createElement(U.Provider,{value:C.current},t.createElement(_.Provider,{value:h},t.createElement(ue,{basename:w,location:l.location,navigationType:l.historyAction,navigator:E,useTransitions:i},t.createElement(se,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:n})))))),null)}function T(e,a){return{...e,navigation:a.navigation.state!=="idle"?a.navigation:e.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:e.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:e.actionData,fetchers:a.fetchers}}const se=t.memo(re);function re({routes:e,manifest:a,future:n,state:i,isStatic:g,onError:s}){return X(e,void 0,{manifest:a,state:i,isStatic:g,onError:s})}function me({to:e,replace:a,state:n,relative:i}){V(O(),"<Navigate> may be used only in the context of a <Router> component.");let{static:g}=t.useContext(B);j(!g,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=t.useContext(F),{pathname:l}=I(),r=ee(),f=te(e,ae(s),l,i==="path"),c=JSON.stringify(f);return t.useEffect(()=>{r(JSON.parse(c),{replace:a,state:n,relative:i})},[r,c,i,a,n]),null}function ve(e){return oe(e.context)}function ue({basename:e="/",children:a=null,location:n,navigationType:i="POP",navigator:g,static:s=!1,useTransitions:l}){V(!O(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let r=e.replace(/^\/*/,"/"),f=t.useMemo(()=>({basename:r,navigator:g,static:s,useTransitions:l,future:{}}),[r,g,s,l]);typeof n=="string"&&(n=G(n));
1let{pathname:c="/",search:h="",hash:m="",state:u=null,key:L="default",mask:v}=n,R=t.useMemo(()=>{let x=K(c,r);return x==null?null:{location:{pathname:x,search:h,hash:m,state:u,key:L,mask:v},navigationType:i}},[r,c,h,m,u,L,i,v]);return j(R!=null,`<Router basename="${r}"> is not able to match the URL "${c}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:t.createElement(B.Provider,{value:f},t.createElement(Q.Provider,{children:a,value:R}))}function le(){return{params:A(),loaderData:$(),actionData:Y(),matches:Z()}}function pe(e){return function(){const n=le();return t.createElement(e,n)}}function ce(){return{params:A(),loaderData:$(),actionData:Y(),error:ne()}}function ge(e){return function(){const n=ce();return t.createElement(e,n)}}export{me as N,ve as O,he as R,ge as a,fe as h,pe as w};

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.