Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-router-dom

Package Overview
Dependencies
Maintainers
3
Versions
468
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-dom - npm Package Compare versions

Comparing version 6.4.0-pre.13 to 6.4.0-pre.14

8

CHANGELOG.md
# react-router-dom
## 6.4.0-pre.14
### Patch Changes
- fix: rename resetScroll -> preventScrollReset (#9199)
- Updated dependencies
- react-router@6.4.0-pre.14
## 6.4.0-pre.13

@@ -4,0 +12,0 @@

8

dist/index.d.ts

@@ -13,3 +13,3 @@ /**

export type { ActionFunction, ActionFunctionArgs, AwaitProps, DataMemoryRouterProps, DataRouteMatch, DataRouteObject, Fetcher, Hash, IndexRouteProps, JsonFunction, LayoutRouteProps, LoaderFunction, LoaderFunctionArgs, Location, MemoryRouterProps, NavigateFunction, NavigateOptions, NavigateProps, Navigation, Navigator, OutletProps, Params, ParamParseKey, Path, PathMatch, Pathname, PathPattern, PathRouteProps, RedirectFunction, RelativeRoutingType, RouteMatch, RouteObject, RouteProps, RouterProps, RoutesProps, Search, ShouldRevalidateFunction, To, } from "react-router";
export { Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, createPath, createRoutesFromChildren, defer, isRouteErrorResponse, generatePath, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, } from "react-router";
export { AbortedDeferredError, Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, createPath, createRoutesFromChildren, defer, isRouteErrorResponse, generatePath, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, } from "react-router";
/** @internal */

@@ -82,3 +82,3 @@ export { UNSAFE_DataRouter, UNSAFE_DataRouterProvider, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_NavigationContext, UNSAFE_LocationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, } from "react-router";

state?: any;
resetScroll?: boolean;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;

@@ -167,7 +167,7 @@ to: To;

*/
export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, resetScroll, relative, }?: {
export declare function useLinkClickHandler<E extends Element = HTMLAnchorElement>(to: To, { target, replace: replaceProp, state, preventScrollReset, relative, }?: {
target?: React.HTMLAttributeAnchorTarget;
replace?: boolean;
state?: any;
resetScroll?: boolean;
preventScrollReset?: boolean;
relative?: RelativeRoutingType;

@@ -174,0 +174,0 @@ }): (event: React.MouseEvent<E, MouseEvent>) => void;

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -13,3 +13,3 @@ * Copyright (c) Remix Software Inc.

import { UNSAFE_enhanceManualRouteObjects, createRoutesFromChildren, UNSAFE_DataRouterProvider, UNSAFE_DataRouter, Router, useHref, createPath, useResolvedPath, useMatch, UNSAFE_DataRouterStateContext, useNavigate, useLocation, UNSAFE_DataRouterContext, UNSAFE_RouteContext, useMatches, useNavigation } from 'react-router';
export { Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouter, UNSAFE_DataRouterContext, UNSAFE_DataRouterProvider, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createPath, createRoutesFromChildren, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';
export { AbortedDeferredError, Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouter, UNSAFE_DataRouterContext, UNSAFE_DataRouterProvider, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createPath, createRoutesFromChildren, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';
import { createBrowserRouter, createHashRouter, createBrowserHistory, createHashHistory, matchPath, invariant } from '@remix-run/router';

@@ -189,3 +189,3 @@

const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "resetScroll"],
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset"],
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"],

@@ -371,3 +371,3 @@ _excluded3 = ["reloadDocument", "replace", "method", "action", "onSubmit", "fetcherKey", "routeId", "relative"];

to,
resetScroll
preventScrollReset
} = _ref6,

@@ -383,3 +383,3 @@ rest = _objectWithoutPropertiesLoose(_ref6, _excluded);

target,
resetScroll,
preventScrollReset,
relative

@@ -577,3 +577,3 @@ });

state,
resetScroll,
preventScrollReset,
relative

@@ -595,7 +595,7 @@ } = _temp === void 0 ? {} : _temp;

state,
resetScroll,
preventScrollReset,
relative
});
}
}, [location, navigate, path, replaceProp, state, target, to, resetScroll, relative]);
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative]);
}

@@ -807,3 +807,3 @@ /**

restoreScrollPosition,
resetScrollPosition
preventScrollReset
} = state; // Trigger manual scroll restoration while we're active

@@ -867,3 +867,3 @@

if (resetScrollPosition === false) {
if (preventScrollReset === true) {
return;

@@ -874,3 +874,3 @@ } // otherwise go to the top on new locations

window.scrollTo(0, 0);
}, [location, restoreScrollPosition, resetScrollPosition]);
}, [location, restoreScrollPosition, preventScrollReset]);
}

@@ -877,0 +877,0 @@

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -4,0 +4,0 @@ * Copyright (c) Remix Software Inc.

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -13,3 +13,3 @@ * Copyright (c) Remix Software Inc.

import { UNSAFE_enhanceManualRouteObjects, createRoutesFromChildren, UNSAFE_DataRouterProvider, UNSAFE_DataRouter, Router, useHref, createPath, useResolvedPath, useMatch, UNSAFE_DataRouterStateContext, useNavigate, useLocation, UNSAFE_DataRouterContext, UNSAFE_RouteContext, useMatches, useNavigation } from 'react-router';
export { Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouter, UNSAFE_DataRouterContext, UNSAFE_DataRouterProvider, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createPath, createRoutesFromChildren, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';
export { AbortedDeferredError, Await, DataMemoryRouter, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouter, UNSAFE_DataRouterContext, UNSAFE_DataRouterProvider, UNSAFE_DataRouterStateContext, UNSAFE_DataStaticRouterContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_enhanceManualRouteObjects, createPath, createRoutesFromChildren, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, useActionData, useAsyncError, useAsyncValue, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';
import { createBrowserRouter, createHashRouter, createBrowserHistory, createHashHistory, matchPath, invariant } from '@remix-run/router';

@@ -331,3 +331,3 @@

to,
resetScroll,
preventScrollReset,
...rest

@@ -342,3 +342,3 @@ }, ref) {

target,
resetScroll,
preventScrollReset,
relative

@@ -527,3 +527,3 @@ });

state,
resetScroll,
preventScrollReset,
relative

@@ -545,7 +545,7 @@ } = {}) {

state,
resetScroll,
preventScrollReset,
relative
});
}
}, [location, navigate, path, replaceProp, state, target, to, resetScroll, relative]);
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative]);
}

@@ -750,3 +750,3 @@ /**

restoreScrollPosition,
resetScrollPosition
preventScrollReset
} = state; // Trigger manual scroll restoration while we're active

@@ -810,3 +810,3 @@

if (resetScrollPosition === false) {
if (preventScrollReset === true) {
return;

@@ -817,3 +817,3 @@ } // otherwise go to the top on new locations

window.scrollTo(0, 0);
}, [location, restoreScrollPosition, resetScrollPosition]);
}, [location, restoreScrollPosition, preventScrollReset]);
}

@@ -820,0 +820,0 @@

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc.

*/
import*as e from"react";import{UNSAFE_enhanceManualRouteObjects as t,createRoutesFromChildren as n,UNSAFE_DataRouterProvider as a,UNSAFE_DataRouter as r,Router as o,useHref as i,createPath as l,useResolvedPath as u,useMatch as s,UNSAFE_DataRouterStateContext as c,useNavigate as f,useLocation as m,UNSAFE_DataRouterContext as d,UNSAFE_RouteContext as h,useMatches as p,useNavigation as g}from"react-router";export{Await,DataMemoryRouter,MemoryRouter,Navigate,NavigationType,Outlet,Route,Router,Routes,UNSAFE_DataRouter,UNSAFE_DataRouterContext,UNSAFE_DataRouterProvider,UNSAFE_DataRouterStateContext,UNSAFE_DataStaticRouterContext,UNSAFE_LocationContext,UNSAFE_NavigationContext,UNSAFE_RouteContext,UNSAFE_enhanceManualRouteObjects,createPath,createRoutesFromChildren,defer,generatePath,isRouteErrorResponse,json,matchPath,matchRoutes,parsePath,redirect,renderMatches,resolvePath,useActionData,useAsyncError,useAsyncValue,useHref,useInRouterContext,useLoaderData,useLocation,useMatch,useMatches,useNavigate,useNavigation,useNavigationType,useOutlet,useOutletContext,useParams,useResolvedPath,useRevalidator,useRouteError,useRouteLoaderData,useRoutes}from"react-router";import{createBrowserRouter as y,createHashRouter as w,createBrowserHistory as b,createHashHistory as v,matchPath as E,invariant as R}from"@remix-run/router";const S="application/x-www-form-urlencoded";function C(e){return null!=e&&"string"==typeof e.tagName}function A(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map((e=>[n,e])):[[n,a]])}),[]))}function D(e,t,n){let a,r,o,i;if(C(l=e)&&"form"===l.tagName.toLowerCase()){let l=n.submissionTrigger;a=n.method||e.getAttribute("method")||"get",r=n.action||e.getAttribute("action")||t,o=n.encType||e.getAttribute("enctype")||S,i=new FormData(e),l&&l.name&&i.append(l.name,l.value)}else if(function(e){return C(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return C(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let l=e.form;if(null==l)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');a=n.method||e.getAttribute("formmethod")||l.getAttribute("method")||"get",r=n.action||e.getAttribute("formaction")||l.getAttribute("action")||t,o=n.encType||e.getAttribute("formenctype")||l.getAttribute("enctype")||S,i=new FormData(l),e.name&&i.append(e.name,e.value)}else{if(C(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(a=n.method||"get",r=n.action||t,o=n.encType||S,e instanceof FormData)i=e;else if(i=new FormData,e instanceof URLSearchParams)for(let[t,n]of e)i.append(t,n);else if(null!=e)for(let t of Object.keys(e))i.append(t,e[t])}var l;let{protocol:u,host:s}=window.location;return{url:new URL(r,`${u}//${s}`),method:a,encType:o,formData:i}}let x;function N(){x=null}function L({basename:o,children:i,fallbackElement:l,hydrationData:u,routes:s,window:c}){x||(x=y({basename:o,hydrationData:u||window.__staticRouterHydrationData,window:c,routes:s?t(s):n(i)}).initialize());let f=x;return e.createElement(a,{router:f,basename:o},e.createElement(r,{fallbackElement:l}))}function P({basename:o,children:i,hydrationData:l,fallbackElement:u,routes:s,window:c}){x||(x=w({basename:o,hydrationData:l||window.__staticRouterHydrationData,window:c,routes:s?t(s):n(i)}).initialize());let f=x;return e.createElement(a,{router:f,basename:o},e.createElement(r,{fallbackElement:u}))}function F({basename:t,children:n,window:a}){let r=e.useRef();null==r.current&&(r.current=b({window:a,v5Compat:!0}));let i=r.current,[l,u]=e.useState({action:i.action,location:i.location});return e.useLayoutEffect((()=>i.listen(u)),[i]),e.createElement(o,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i})}function T({basename:t,children:n,window:a}){let r=e.useRef();null==r.current&&(r.current=v({window:a,v5Compat:!0}));let i=r.current,[l,u]=e.useState({action:i.action,location:i.location});return e.useLayoutEffect((()=>i.listen(u)),[i]),e.createElement(o,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i})}function k({basename:t,children:n,history:a}){const[r,i]=e.useState({action:a.action,location:a.location});return e.useLayoutEffect((()=>a.listen(i)),[a]),e.createElement(o,{basename:t,children:n,location:r.location,navigationType:r.action,navigator:a})}const _=e.forwardRef((function({onClick:t,relative:n,reloadDocument:a,replace:r,state:o,target:l,to:u,resetScroll:s,...c},f){let m=i(u,{relative:n}),d=M(u,{replace:r,state:o,target:l,resetScroll:s,relative:n});return e.createElement("a",Object.assign({},c,{href:m,onClick:a?t:function(e){t&&t(e),e.defaultPrevented||d(e)},ref:f,target:l}))})),U=e.forwardRef((function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:r=!1,style:o,to:i,children:l,...f},m){let d,h=u(i),p=s({path:h.pathname,end:r,caseSensitive:n}),g=e.useContext(c)?.navigation.location,y=u(g||""),w=null!=e.useMemo((()=>g?E({path:h.pathname,end:r,caseSensitive:n},y.pathname):null),[g,h.pathname,n,r,y.pathname]),b=null!=p,v=b?t:void 0;d="function"==typeof a?a({isActive:b,isPending:w}):[a,b?"active":null,w?"pending":null].filter(Boolean).join(" ");let R="function"==typeof o?o({isActive:b,isPending:w}):o;return e.createElement(_,Object.assign({},f,{"aria-current":v,className:d,ref:m,style:R,to:i}),"function"==typeof l?l({isActive:b,isPending:w}):l)})),O=e.forwardRef(((t,n)=>e.createElement(K,Object.assign({},t,{ref:n})))),K=e.forwardRef((({reloadDocument:t,replace:n,method:a="get",action:r,onSubmit:o,fetcherKey:i,routeId:l,relative:u,...s},c)=>{let f=Y(i,l),m="get"===a.toLowerCase()?"get":"post",d=$(r,{relative:u});return e.createElement("form",Object.assign({ref:c,method:m,action:d,onSubmit:t?o:e=>{if(o&&o(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;f(t||e.currentTarget,{method:a,replace:n,relative:u})}},s))}));function j({getKey:t,storageKey:n}){return function({getKey:t,storageKey:n}={}){let a=m(),r=p(),o=g(),i=e.useContext(d);i||R(!1);let{router:l}=i,u=e.useContext(c);(null==l||null==u)&&R(!1);let{restoreScrollPosition:s,resetScrollPosition:f}=u;e.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),h=e.useCallback((()=>{if("idle"===o.state){let e=(t?t(a,r):null)||a.key;V[e]=window.scrollY}sessionStorage.setItem(n||"react-router-scroll-positions",JSON.stringify(V)),window.history.scrollRestoration="auto"}),[n,t,o.state,a,r]),e.useEffect((()=>(window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h)})),[h]),e.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(n||"react-router-scroll-positions");e&&(V=JSON.parse(e))}catch(e){}}),[n]),e.useLayoutEffect((()=>{let e=l?.enableScrollRestoration(V,(()=>window.scrollY),t);return()=>e&&e()}),[l,t]),e.useLayoutEffect((()=>{if(!1!==s)if("number"!=typeof s){if(a.hash){let e=document.getElementById(a.hash.slice(1));if(e)return void e.scrollIntoView()}!1!==f&&window.scrollTo(0,0)}else window.scrollTo(0,s)}),[a,s,f]);var h}({getKey:t,storageKey:n}),null}function M(t,{target:n,replace:a,state:r,resetScroll:o,relative:i}={}){let s=f(),c=m(),d=u(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,n)){e.preventDefault();let n=void 0!==a?a:l(c)===l(d);s(t,{replace:n,state:r,resetScroll:o,relative:i})}}),[c,s,d,a,r,n,t,o,i])}function I(t){let n=e.useRef(A(t)),a=m(),r=e.useMemo((()=>function(e,t){let n=A(e);for(let a of t.keys())n.has(a)||t.getAll(a).forEach((e=>{n.append(a,e)}));return n}(a.search,n.current)),[a.search]),o=f(),i=e.useCallback(((e,t)=>{const n=A("function"==typeof e?e(r):e);o("?"+n,t)}),[o,r]);return[r,i]}function H(){return Y()}function Y(t,n){let a=e.useContext(d);a||R(!1);let{router:r}=a,o=$();return e.useCallback(((e,a={})=>{if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:i,encType:l,formData:u,url:s}=D(e,o,a),c=s.pathname+s.search,f={replace:a.replace,formData:u,formMethod:i,formEncType:l};t?(null==n&&R(!1),r.fetch(t,n,c,f)):r.navigate(c,f)}),[o,r,t,n])}function $(t,{relative:n}={}){let a=e.useContext(h);a||R(!1);let[r]=a.matches.slice(-1),o=u(t??".",{relative:n}),i=m();if(null==t&&(o.search=i.search,o.hash=i.hash,r.route.index)){let e=new URLSearchParams(o.search);e.delete("index"),o.search=e.toString()?`?${e.toString()}`:""}return t&&"."!==t||!r.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),l(o)}let z=0;function B(){let t=e.useContext(d);t||R(!1);let{router:n}=t,a=e.useContext(h);a||R(!1);let r=a.matches[a.matches.length-1]?.route.id;null==r&&R(!1);let[o]=e.useState((()=>String(++z))),[i]=e.useState((()=>(r||R(!1),function(t,n){return e.forwardRef(((a,r)=>e.createElement(K,Object.assign({},a,{ref:r,fetcherKey:t,routeId:n}))))}(o,r)))),[l]=e.useState((()=>e=>{n||R(!1),r||R(!1),n.fetch(o,r,e)})),u=Y(o,r),s=n.getFetcher(o),c=e.useMemo((()=>({Form:i,submit:u,load:l,...s})),[s,i,u,l]);return e.useEffect((()=>()=>{n?n.deleteFetcher(o):console.warn("No fetcher available to clean up from useFetcher()")}),[n,o]),c}function J(){let t=e.useContext(c);return t||R(!1),[...t.fetchers.values()]}let V={};export{F as BrowserRouter,L as DataBrowserRouter,P as DataHashRouter,O as Form,T as HashRouter,_ as Link,U as NavLink,j as ScrollRestoration,N as _resetModuleScope,A as createSearchParams,k as unstable_HistoryRouter,B as useFetcher,J as useFetchers,$ as useFormAction,M as useLinkClickHandler,I as useSearchParams,H as useSubmit};
import*as e from"react";import{UNSAFE_enhanceManualRouteObjects as t,createRoutesFromChildren as n,UNSAFE_DataRouterProvider as r,UNSAFE_DataRouter as a,Router as o,useHref as i,createPath as l,useResolvedPath as u,useMatch as s,UNSAFE_DataRouterStateContext as c,useNavigate as f,useLocation as m,UNSAFE_DataRouterContext as d,UNSAFE_RouteContext as h,useMatches as p,useNavigation as g}from"react-router";export{AbortedDeferredError,Await,DataMemoryRouter,MemoryRouter,Navigate,NavigationType,Outlet,Route,Router,Routes,UNSAFE_DataRouter,UNSAFE_DataRouterContext,UNSAFE_DataRouterProvider,UNSAFE_DataRouterStateContext,UNSAFE_DataStaticRouterContext,UNSAFE_LocationContext,UNSAFE_NavigationContext,UNSAFE_RouteContext,UNSAFE_enhanceManualRouteObjects,createPath,createRoutesFromChildren,defer,generatePath,isRouteErrorResponse,json,matchPath,matchRoutes,parsePath,redirect,renderMatches,resolvePath,useActionData,useAsyncError,useAsyncValue,useHref,useInRouterContext,useLoaderData,useLocation,useMatch,useMatches,useNavigate,useNavigation,useNavigationType,useOutlet,useOutletContext,useParams,useResolvedPath,useRevalidator,useRouteError,useRouteLoaderData,useRoutes}from"react-router";import{createBrowserRouter as y,createHashRouter as w,createBrowserHistory as v,createHashHistory as b,matchPath as E,invariant as R}from"@remix-run/router";const S="application/x-www-form-urlencoded";function A(e){return null!=e&&"string"==typeof e.tagName}function C(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}function D(e,t,n){let r,a,o,i;if(A(l=e)&&"form"===l.tagName.toLowerCase()){let l=n.submissionTrigger;r=n.method||e.getAttribute("method")||"get",a=n.action||e.getAttribute("action")||t,o=n.encType||e.getAttribute("enctype")||S,i=new FormData(e),l&&l.name&&i.append(l.name,l.value)}else if(function(e){return A(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return A(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let l=e.form;if(null==l)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');r=n.method||e.getAttribute("formmethod")||l.getAttribute("method")||"get",a=n.action||e.getAttribute("formaction")||l.getAttribute("action")||t,o=n.encType||e.getAttribute("formenctype")||l.getAttribute("enctype")||S,i=new FormData(l),e.name&&i.append(e.name,e.value)}else{if(A(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(r=n.method||"get",a=n.action||t,o=n.encType||S,e instanceof FormData)i=e;else if(i=new FormData,e instanceof URLSearchParams)for(let[t,n]of e)i.append(t,n);else if(null!=e)for(let t of Object.keys(e))i.append(t,e[t])}var l;let{protocol:u,host:s}=window.location;return{url:new URL(a,`${u}//${s}`),method:r,encType:o,formData:i}}let x;function N(){x=null}function L({basename:o,children:i,fallbackElement:l,hydrationData:u,routes:s,window:c}){x||(x=y({basename:o,hydrationData:u||window.__staticRouterHydrationData,window:c,routes:s?t(s):n(i)}).initialize());let f=x;return e.createElement(r,{router:f,basename:o},e.createElement(a,{fallbackElement:l}))}function F({basename:o,children:i,hydrationData:l,fallbackElement:u,routes:s,window:c}){x||(x=w({basename:o,hydrationData:l||window.__staticRouterHydrationData,window:c,routes:s?t(s):n(i)}).initialize());let f=x;return e.createElement(r,{router:f,basename:o},e.createElement(a,{fallbackElement:u}))}function P({basename:t,children:n,window:r}){let a=e.useRef();null==a.current&&(a.current=v({window:r,v5Compat:!0}));let i=a.current,[l,u]=e.useState({action:i.action,location:i.location});return e.useLayoutEffect((()=>i.listen(u)),[i]),e.createElement(o,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i})}function T({basename:t,children:n,window:r}){let a=e.useRef();null==a.current&&(a.current=b({window:r,v5Compat:!0}));let i=a.current,[l,u]=e.useState({action:i.action,location:i.location});return e.useLayoutEffect((()=>i.listen(u)),[i]),e.createElement(o,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i})}function k({basename:t,children:n,history:r}){const[a,i]=e.useState({action:r.action,location:r.location});return e.useLayoutEffect((()=>r.listen(i)),[r]),e.createElement(o,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:r})}const _=e.forwardRef((function({onClick:t,relative:n,reloadDocument:r,replace:a,state:o,target:l,to:u,preventScrollReset:s,...c},f){let m=i(u,{relative:n}),d=M(u,{replace:a,state:o,target:l,preventScrollReset:s,relative:n});return e.createElement("a",Object.assign({},c,{href:m,onClick:r?t:function(e){t&&t(e),e.defaultPrevented||d(e)},ref:f,target:l}))})),U=e.forwardRef((function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:o,to:i,children:l,...f},m){let d,h=u(i),p=s({path:h.pathname,end:a,caseSensitive:n}),g=e.useContext(c)?.navigation.location,y=u(g||""),w=null!=e.useMemo((()=>g?E({path:h.pathname,end:a,caseSensitive:n},y.pathname):null),[g,h.pathname,n,a,y.pathname]),v=null!=p,b=v?t:void 0;d="function"==typeof r?r({isActive:v,isPending:w}):[r,v?"active":null,w?"pending":null].filter(Boolean).join(" ");let R="function"==typeof o?o({isActive:v,isPending:w}):o;return e.createElement(_,Object.assign({},f,{"aria-current":b,className:d,ref:m,style:R,to:i}),"function"==typeof l?l({isActive:v,isPending:w}):l)})),O=e.forwardRef(((t,n)=>e.createElement(K,Object.assign({},t,{ref:n})))),K=e.forwardRef((({reloadDocument:t,replace:n,method:r="get",action:a,onSubmit:o,fetcherKey:i,routeId:l,relative:u,...s},c)=>{let f=Y(i,l),m="get"===r.toLowerCase()?"get":"post",d=$(a,{relative:u});return e.createElement("form",Object.assign({ref:c,method:m,action:d,onSubmit:t?o:e=>{if(o&&o(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;f(t||e.currentTarget,{method:r,replace:n,relative:u})}},s))}));function j({getKey:t,storageKey:n}){return function({getKey:t,storageKey:n}={}){let r=m(),a=p(),o=g(),i=e.useContext(d);i||R(!1);let{router:l}=i,u=e.useContext(c);(null==l||null==u)&&R(!1);let{restoreScrollPosition:s,preventScrollReset:f}=u;e.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),h=e.useCallback((()=>{if("idle"===o.state){let e=(t?t(r,a):null)||r.key;V[e]=window.scrollY}sessionStorage.setItem(n||"react-router-scroll-positions",JSON.stringify(V)),window.history.scrollRestoration="auto"}),[n,t,o.state,r,a]),e.useEffect((()=>(window.addEventListener("beforeunload",h),()=>{window.removeEventListener("beforeunload",h)})),[h]),e.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(n||"react-router-scroll-positions");e&&(V=JSON.parse(e))}catch(e){}}),[n]),e.useLayoutEffect((()=>{let e=l?.enableScrollRestoration(V,(()=>window.scrollY),t);return()=>e&&e()}),[l,t]),e.useLayoutEffect((()=>{if(!1!==s)if("number"!=typeof s){if(r.hash){let e=document.getElementById(r.hash.slice(1));if(e)return void e.scrollIntoView()}!0!==f&&window.scrollTo(0,0)}else window.scrollTo(0,s)}),[r,s,f]);var h}({getKey:t,storageKey:n}),null}function M(t,{target:n,replace:r,state:a,preventScrollReset:o,relative:i}={}){let s=f(),c=m(),d=u(t,{relative:i});return e.useCallback((e=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(e,n)){e.preventDefault();let n=void 0!==r?r:l(c)===l(d);s(t,{replace:n,state:a,preventScrollReset:o,relative:i})}}),[c,s,d,r,a,n,t,o,i])}function I(t){let n=e.useRef(C(t)),r=m(),a=e.useMemo((()=>function(e,t){let n=C(e);for(let r of t.keys())n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}));return n}(r.search,n.current)),[r.search]),o=f(),i=e.useCallback(((e,t)=>{const n=C("function"==typeof e?e(a):e);o("?"+n,t)}),[o,a]);return[a,i]}function H(){return Y()}function Y(t,n){let r=e.useContext(d);r||R(!1);let{router:a}=r,o=$();return e.useCallback(((e,r={})=>{if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:i,encType:l,formData:u,url:s}=D(e,o,r),c=s.pathname+s.search,f={replace:r.replace,formData:u,formMethod:i,formEncType:l};t?(null==n&&R(!1),a.fetch(t,n,c,f)):a.navigate(c,f)}),[o,a,t,n])}function $(t,{relative:n}={}){let r=e.useContext(h);r||R(!1);let[a]=r.matches.slice(-1),o=u(t??".",{relative:n}),i=m();if(null==t&&(o.search=i.search,o.hash=i.hash,a.route.index)){let e=new URLSearchParams(o.search);e.delete("index"),o.search=e.toString()?`?${e.toString()}`:""}return t&&"."!==t||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),l(o)}let z=0;function B(){let t=e.useContext(d);t||R(!1);let{router:n}=t,r=e.useContext(h);r||R(!1);let a=r.matches[r.matches.length-1]?.route.id;null==a&&R(!1);let[o]=e.useState((()=>String(++z))),[i]=e.useState((()=>(a||R(!1),function(t,n){return e.forwardRef(((r,a)=>e.createElement(K,Object.assign({},r,{ref:a,fetcherKey:t,routeId:n}))))}(o,a)))),[l]=e.useState((()=>e=>{n||R(!1),a||R(!1),n.fetch(o,a,e)})),u=Y(o,a),s=n.getFetcher(o),c=e.useMemo((()=>({Form:i,submit:u,load:l,...s})),[s,i,u,l]);return e.useEffect((()=>()=>{n?n.deleteFetcher(o):console.warn("No fetcher available to clean up from useFetcher()")}),[n,o]),c}function J(){let t=e.useContext(c);return t||R(!1),[...t.fetchers.values()]}let V={};export{P as BrowserRouter,L as DataBrowserRouter,F as DataHashRouter,O as Form,T as HashRouter,_ as Link,U as NavLink,j as ScrollRestoration,N as _resetModuleScope,C as createSearchParams,k as unstable_HistoryRouter,B as useFetcher,J as useFetchers,$ as useFormAction,M as useLinkClickHandler,I as useSearchParams,H as useSubmit};
//# sourceMappingURL=react-router-dom.production.min.js.map

@@ -156,3 +156,3 @@ 'use strict';

restoreScrollPosition: null,
resetScrollPosition: true,
preventScrollReset: false,
revalidation: "idle",

@@ -159,0 +159,0 @@ fetchers: new Map()

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -209,3 +209,3 @@ * Copyright (c) Remix Software Inc.

const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "resetScroll"],
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset"],
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"],

@@ -395,3 +395,3 @@ _excluded3 = ["reloadDocument", "replace", "method", "action", "onSubmit", "fetcherKey", "routeId", "relative"];

to,
resetScroll
preventScrollReset
} = _ref6,

@@ -407,3 +407,3 @@ rest = _objectWithoutPropertiesLoose(_ref6, _excluded);

target,
resetScroll,
preventScrollReset,
relative

@@ -598,3 +598,3 @@ });

state,
resetScroll,
preventScrollReset,
relative

@@ -616,7 +616,7 @@ } = _temp === void 0 ? {} : _temp;

state,
resetScroll,
preventScrollReset,
relative
});
}
}, [location, navigate, path, replaceProp, state, target, to, resetScroll, relative]);
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative]);
}

@@ -828,3 +828,3 @@ /**

restoreScrollPosition,
resetScrollPosition
preventScrollReset
} = state; // Trigger manual scroll restoration while we're active

@@ -888,3 +888,3 @@

if (resetScrollPosition === false) {
if (preventScrollReset === true) {
return;

@@ -895,3 +895,3 @@ } // otherwise go to the top on new locations

window.scrollTo(0, 0);
}, [location, restoreScrollPosition, resetScrollPosition]);
}, [location, restoreScrollPosition, preventScrollReset]);
}

@@ -928,2 +928,6 @@

Object.defineProperty(exports, 'AbortedDeferredError', {
enumerable: true,
get: function () { return reactRouter.AbortedDeferredError; }
});
Object.defineProperty(exports, 'Await', {

@@ -930,0 +934,0 @@ enumerable: true,

/**
* React Router DOM v6.4.0-pre.13
* React Router DOM v6.4.0-pre.14
*

@@ -11,3 +11,3 @@ * Copyright (c) Remix Software Inc.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-router"),require("@remix-run/router")):"function"==typeof define&&define.amd?define(["exports","react","react-router","@remix-run/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRouterDOM={},e.React,e.ReactRouter,e.Router)}(this,(function(e,t,r,n){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var o=a(t);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function i(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}const c="get",l="application/x-www-form-urlencoded";function s(e){return null!=e&&"string"==typeof e.tagName}function f(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}function d(e,t,r){let n,a,o,u;if(s(i=e)&&"form"===i.tagName.toLowerCase()){let i=r.submissionTrigger;n=r.method||e.getAttribute("method")||c,a=r.action||e.getAttribute("action")||t,o=r.encType||e.getAttribute("enctype")||l,u=new FormData(e),i&&i.name&&u.append(i.name,i.value)}else if(function(e){return s(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return s(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||e.getAttribute("formmethod")||i.getAttribute("method")||c,a=r.action||e.getAttribute("formaction")||i.getAttribute("action")||t,o=r.encType||e.getAttribute("formenctype")||i.getAttribute("enctype")||l,u=new FormData(i),e.name&&u.append(e.name,e.value)}else{if(s(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||c,a=r.action||t,o=r.encType||l,e instanceof FormData)u=e;else if(u=new FormData,e instanceof URLSearchParams)for(let[t,r]of e)u.append(t,r);else if(null!=e)for(let t of Object.keys(e))u.append(t,e[t])}var i;let{protocol:f,host:d}=window.location;return{url:new URL(a,f+"//"+d),method:n,encType:o,formData:u}}const m=["onClick","relative","reloadDocument","replace","state","target","to","resetScroll"],b=["aria-current","caseSensitive","className","end","style","to","children"],h=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative"];let p;const y=o.forwardRef((function(e,t){let{onClick:n,relative:a,reloadDocument:c,replace:l,state:s,target:f,to:d,resetScroll:b}=e,h=i(e,m),p=r.useHref(d,{relative:a}),y=P(d,{replace:l,state:s,target:f,resetScroll:b,relative:a});return o.createElement("a",u({},h,{href:p,onClick:c?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:f}))})),g=o.forwardRef((function(e,t){let a,{"aria-current":c="page",caseSensitive:l=!1,className:s="",end:f=!1,style:d,to:m,children:h}=e,p=i(e,b),g=r.useResolvedPath(m),v=r.useMatch({path:g.pathname,end:f,caseSensitive:l}),R=o.useContext(r.UNSAFE_DataRouterStateContext),P=null==R?void 0:R.navigation.location,O=r.useResolvedPath(P||""),w=null!=o.useMemo((()=>P?n.matchPath({path:g.pathname,end:f,caseSensitive:l},O.pathname):null),[P,g.pathname,l,f,O.pathname]),S=null!=v,E=S?c:void 0;a="function"==typeof s?s({isActive:S,isPending:w}):[s,S?"active":null,w?"pending":null].filter(Boolean).join(" ");let j="function"==typeof d?d({isActive:S,isPending:w}):d;return o.createElement(y,u({},p,{"aria-current":E,className:a,ref:t,style:j,to:m}),"function"==typeof h?h({isActive:S,isPending:w}):h)})),v=o.forwardRef(((e,t)=>o.createElement(R,u({},e,{ref:t})))),R=o.forwardRef(((e,t)=>{let{reloadDocument:r,replace:n,method:a=c,action:l,onSubmit:s,fetcherKey:f,routeId:d,relative:m}=e,b=i(e,h),p=O(f,d),y="get"===a.toLowerCase()?"get":"post",g=w(l,{relative:m});return o.createElement("form",u({ref:t,method:y,action:g,onSubmit:r?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;p(t||e.currentTarget,{method:a,replace:n,relative:m})}},b))}));function P(e,t){let{target:n,replace:a,state:u,resetScroll:i,relative:c}=void 0===t?{}:t,l=r.useNavigate(),s=r.useLocation(),f=r.useResolvedPath(e,{relative:c});return o.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==a?a:r.createPath(s)===r.createPath(f);l(e,{replace:n,state:u,resetScroll:i,relative:c})}}),[s,l,f,a,u,n,e,i,c])}function O(e,t){let a=o.useContext(r.UNSAFE_DataRouterContext);a||n.invariant(!1);let{router:u}=a,i=w();return o.useCallback((function(r,a){if(void 0===a&&(a={}),"undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:o,encType:c,formData:l,url:s}=d(r,i,a),f=s.pathname+s.search,m={replace:a.replace,formData:l,formMethod:o,formEncType:c};e?(null==t&&n.invariant(!1),u.fetch(e,t,f,m)):u.navigate(f,m)}),[i,u,e,t])}function w(e,t){let{relative:a}=void 0===t?{}:t,u=o.useContext(r.UNSAFE_RouteContext);u||n.invariant(!1);let[i]=u.matches.slice(-1),c=null!=e?e:".",l=r.useResolvedPath(c,{relative:a}),s=r.useLocation();if(null==e&&(l.search=s.search,l.hash=s.hash,i.route.index)){let e=new URLSearchParams(l.search);e.delete("index"),l.search=e.toString()?"?"+e.toString():""}return e&&"."!==e||!i.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r.createPath(l)}let S=0;const E="react-router-scroll-positions";let j={};Object.defineProperty(e,"Await",{enumerable:!0,get:function(){return r.Await}}),Object.defineProperty(e,"DataMemoryRouter",{enumerable:!0,get:function(){return r.DataMemoryRouter}}),Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return r.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return r.Navigate}}),Object.defineProperty(e,"NavigationType",{enumerable:!0,get:function(){return r.NavigationType}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return r.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return r.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return r.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return r.Routes}}),Object.defineProperty(e,"UNSAFE_DataRouter",{enumerable:!0,get:function(){return r.UNSAFE_DataRouter}}),Object.defineProperty(e,"UNSAFE_DataRouterContext",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterContext}}),Object.defineProperty(e,"UNSAFE_DataRouterProvider",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterProvider}}),Object.defineProperty(e,"UNSAFE_DataRouterStateContext",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterStateContext}}),Object.defineProperty(e,"UNSAFE_DataStaticRouterContext",{enumerable:!0,get:function(){return r.UNSAFE_DataStaticRouterContext}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return r.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return r.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return r.UNSAFE_RouteContext}}),Object.defineProperty(e,"UNSAFE_enhanceManualRouteObjects",{enumerable:!0,get:function(){return r.UNSAFE_enhanceManualRouteObjects}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return r.createPath}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return r.createRoutesFromChildren}}),Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return r.defer}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return r.generatePath}}),Object.defineProperty(e,"isRouteErrorResponse",{enumerable:!0,get:function(){return r.isRouteErrorResponse}}),Object.defineProperty(e,"json",{enumerable:!0,get:function(){return r.json}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return r.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return r.matchRoutes}}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return r.parsePath}}),Object.defineProperty(e,"redirect",{enumerable:!0,get:function(){return r.redirect}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return r.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return r.resolvePath}}),Object.defineProperty(e,"useActionData",{enumerable:!0,get:function(){return r.useActionData}}),Object.defineProperty(e,"useAsyncError",{enumerable:!0,get:function(){return r.useAsyncError}}),Object.defineProperty(e,"useAsyncValue",{enumerable:!0,get:function(){return r.useAsyncValue}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return r.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return r.useInRouterContext}}),Object.defineProperty(e,"useLoaderData",{enumerable:!0,get:function(){return r.useLoaderData}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return r.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return r.useMatch}}),Object.defineProperty(e,"useMatches",{enumerable:!0,get:function(){return r.useMatches}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return r.useNavigate}}),Object.defineProperty(e,"useNavigation",{enumerable:!0,get:function(){return r.useNavigation}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return r.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return r.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return r.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return r.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return r.useResolvedPath}}),Object.defineProperty(e,"useRevalidator",{enumerable:!0,get:function(){return r.useRevalidator}}),Object.defineProperty(e,"useRouteError",{enumerable:!0,get:function(){return r.useRouteError}}),Object.defineProperty(e,"useRouteLoaderData",{enumerable:!0,get:function(){return r.useRouteLoaderData}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return r.useRoutes}}),e.BrowserRouter=function(e){let{basename:t,children:a,window:u}=e,i=o.useRef();null==i.current&&(i.current=n.createBrowserHistory({window:u,v5Compat:!0}));let c=i.current,[l,s]=o.useState({action:c.action,location:c.location});return o.useLayoutEffect((()=>c.listen(s)),[c]),o.createElement(r.Router,{basename:t,children:a,location:l.location,navigationType:l.action,navigator:c})},e.DataBrowserRouter=function(e){let{basename:t,children:a,fallbackElement:u,hydrationData:i,routes:c,window:l}=e;p||(p=n.createBrowserRouter({basename:t,hydrationData:i||window.__staticRouterHydrationData,window:l,routes:c?r.UNSAFE_enhanceManualRouteObjects(c):r.createRoutesFromChildren(a)}).initialize());let s=p;return o.createElement(r.UNSAFE_DataRouterProvider,{router:s,basename:t},o.createElement(r.UNSAFE_DataRouter,{fallbackElement:u}))},e.DataHashRouter=function(e){let{basename:t,children:a,hydrationData:u,fallbackElement:i,routes:c,window:l}=e;p||(p=n.createHashRouter({basename:t,hydrationData:u||window.__staticRouterHydrationData,window:l,routes:c?r.UNSAFE_enhanceManualRouteObjects(c):r.createRoutesFromChildren(a)}).initialize());let s=p;return o.createElement(r.UNSAFE_DataRouterProvider,{router:s,basename:t},o.createElement(r.UNSAFE_DataRouter,{fallbackElement:i}))},e.Form=v,e.HashRouter=function(e){let{basename:t,children:a,window:u}=e,i=o.useRef();null==i.current&&(i.current=n.createHashHistory({window:u,v5Compat:!0}));let c=i.current,[l,s]=o.useState({action:c.action,location:c.location});return o.useLayoutEffect((()=>c.listen(s)),[c]),o.createElement(r.Router,{basename:t,children:a,location:l.location,navigationType:l.action,navigator:c})},e.Link=y,e.NavLink=g,e.ScrollRestoration=function(e){let{getKey:t,storageKey:a}=e;return function(e){let{getKey:t,storageKey:a}=void 0===e?{}:e,u=r.useLocation(),i=r.useMatches(),c=r.useNavigation(),l=o.useContext(r.UNSAFE_DataRouterContext);l||n.invariant(!1);let{router:s}=l,f=o.useContext(r.UNSAFE_DataRouterStateContext);(null==s||null==f)&&n.invariant(!1);let{restoreScrollPosition:d,resetScrollPosition:m}=f;o.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),b=o.useCallback((()=>{if("idle"===c.state){let e=(t?t(u,i):null)||u.key;j[e]=window.scrollY}sessionStorage.setItem(a||E,JSON.stringify(j)),window.history.scrollRestoration="auto"}),[a,t,c.state,u,i]),o.useEffect((()=>(window.addEventListener("beforeunload",b),()=>{window.removeEventListener("beforeunload",b)})),[b]),o.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(a||E);e&&(j=JSON.parse(e))}catch(e){}}),[a]),o.useLayoutEffect((()=>{let e=null==s?void 0:s.enableScrollRestoration(j,(()=>window.scrollY),t);return()=>e&&e()}),[s,t]),o.useLayoutEffect((()=>{if(!1!==d)if("number"!=typeof d){if(u.hash){let e=document.getElementById(u.hash.slice(1));if(e)return void e.scrollIntoView()}!1!==m&&window.scrollTo(0,0)}else window.scrollTo(0,d)}),[u,d,m]);var b}({getKey:t,storageKey:a}),null},e._resetModuleScope=function(){p=null},e.createSearchParams=f,e.unstable_HistoryRouter=function(e){let{basename:t,children:n,history:a}=e;const[u,i]=o.useState({action:a.action,location:a.location});return o.useLayoutEffect((()=>a.listen(i)),[a]),o.createElement(r.Router,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:a})},e.useFetcher=function(){var e;let t=o.useContext(r.UNSAFE_DataRouterContext);t||n.invariant(!1);let{router:a}=t,i=o.useContext(r.UNSAFE_RouteContext);i||n.invariant(!1);let c=null==(e=i.matches[i.matches.length-1])?void 0:e.route.id;null==c&&n.invariant(!1);let[l]=o.useState((()=>String(++S))),[s]=o.useState((()=>(c||n.invariant(!1),function(e,t){return o.forwardRef(((r,n)=>o.createElement(R,u({},r,{ref:n,fetcherKey:e,routeId:t}))))}(l,c)))),[f]=o.useState((()=>e=>{a||n.invariant(!1),c||n.invariant(!1),a.fetch(l,c,e)})),d=O(l,c),m=a.getFetcher(l),b=o.useMemo((()=>u({Form:s,submit:d,load:f},m)),[m,s,d,f]);return o.useEffect((()=>()=>{a?a.deleteFetcher(l):console.warn("No fetcher available to clean up from useFetcher()")}),[a,l]),b},e.useFetchers=function(){let e=o.useContext(r.UNSAFE_DataRouterStateContext);return e||n.invariant(!1),[...e.fetchers.values()]},e.useFormAction=w,e.useLinkClickHandler=P,e.useSearchParams=function(e){let t=o.useRef(f(e)),n=r.useLocation(),a=o.useMemo((()=>function(e,t){let r=f(e);for(let e of t.keys())r.has(e)||t.getAll(e).forEach((t=>{r.append(e,t)}));return r}(n.search,t.current)),[n.search]),u=r.useNavigate(),i=o.useCallback(((e,t)=>{const r=f("function"==typeof e?e(a):e);u("?"+r,t)}),[u,a]);return[a,i]},e.useSubmit=function(){return O()},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-router"),require("@remix-run/router")):"function"==typeof define&&define.amd?define(["exports","react","react-router","@remix-run/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRouterDOM={},e.React,e.ReactRouter,e.Router)}(this,(function(e,t,r,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=o(t);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function i(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const c="get",l="application/x-www-form-urlencoded";function s(e){return null!=e&&"string"==typeof e.tagName}function f(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}function d(e,t,r){let n,o,a,u;if(s(i=e)&&"form"===i.tagName.toLowerCase()){let i=r.submissionTrigger;n=r.method||e.getAttribute("method")||c,o=r.action||e.getAttribute("action")||t,a=r.encType||e.getAttribute("enctype")||l,u=new FormData(e),i&&i.name&&u.append(i.name,i.value)}else if(function(e){return s(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return s(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');n=r.method||e.getAttribute("formmethod")||i.getAttribute("method")||c,o=r.action||e.getAttribute("formaction")||i.getAttribute("action")||t,a=r.encType||e.getAttribute("formenctype")||i.getAttribute("enctype")||l,u=new FormData(i),e.name&&u.append(e.name,e.value)}else{if(s(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');if(n=r.method||c,o=r.action||t,a=r.encType||l,e instanceof FormData)u=e;else if(u=new FormData,e instanceof URLSearchParams)for(let[t,r]of e)u.append(t,r);else if(null!=e)for(let t of Object.keys(e))u.append(t,e[t])}var i;let{protocol:f,host:d}=window.location;return{url:new URL(o,f+"//"+d),method:n,encType:a,formData:u}}const m=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],b=["aria-current","caseSensitive","className","end","style","to","children"],p=["reloadDocument","replace","method","action","onSubmit","fetcherKey","routeId","relative"];let y;const h=a.forwardRef((function(e,t){let{onClick:n,relative:o,reloadDocument:c,replace:l,state:s,target:f,to:d,preventScrollReset:b}=e,p=i(e,m),y=r.useHref(d,{relative:o}),h=P(d,{replace:l,state:s,target:f,preventScrollReset:b,relative:o});return a.createElement("a",u({},p,{href:y,onClick:c?n:function(e){n&&n(e),e.defaultPrevented||h(e)},ref:t,target:f}))})),g=a.forwardRef((function(e,t){let o,{"aria-current":c="page",caseSensitive:l=!1,className:s="",end:f=!1,style:d,to:m,children:p}=e,y=i(e,b),g=r.useResolvedPath(m),v=r.useMatch({path:g.pathname,end:f,caseSensitive:l}),R=a.useContext(r.UNSAFE_DataRouterStateContext),P=null==R?void 0:R.navigation.location,O=r.useResolvedPath(P||""),w=null!=a.useMemo((()=>P?n.matchPath({path:g.pathname,end:f,caseSensitive:l},O.pathname):null),[P,g.pathname,l,f,O.pathname]),E=null!=v,S=E?c:void 0;o="function"==typeof s?s({isActive:E,isPending:w}):[s,E?"active":null,w?"pending":null].filter(Boolean).join(" ");let j="function"==typeof d?d({isActive:E,isPending:w}):d;return a.createElement(h,u({},y,{"aria-current":S,className:o,ref:t,style:j,to:m}),"function"==typeof p?p({isActive:E,isPending:w}):p)})),v=a.forwardRef(((e,t)=>a.createElement(R,u({},e,{ref:t})))),R=a.forwardRef(((e,t)=>{let{reloadDocument:r,replace:n,method:o=c,action:l,onSubmit:s,fetcherKey:f,routeId:d,relative:m}=e,b=i(e,p),y=O(f,d),h="get"===o.toLowerCase()?"get":"post",g=w(l,{relative:m});return a.createElement("form",u({ref:t,method:h,action:g,onSubmit:r?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter;y(t||e.currentTarget,{method:o,replace:n,relative:m})}},b))}));function P(e,t){let{target:n,replace:o,state:u,preventScrollReset:i,relative:c}=void 0===t?{}:t,l=r.useNavigate(),s=r.useLocation(),f=r.useResolvedPath(e,{relative:c});return a.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==o?o:r.createPath(s)===r.createPath(f);l(e,{replace:n,state:u,preventScrollReset:i,relative:c})}}),[s,l,f,o,u,n,e,i,c])}function O(e,t){let o=a.useContext(r.UNSAFE_DataRouterContext);o||n.invariant(!1);let{router:u}=o,i=w();return a.useCallback((function(r,o){if(void 0===o&&(o={}),"undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");let{method:a,encType:c,formData:l,url:s}=d(r,i,o),f=s.pathname+s.search,m={replace:o.replace,formData:l,formMethod:a,formEncType:c};e?(null==t&&n.invariant(!1),u.fetch(e,t,f,m)):u.navigate(f,m)}),[i,u,e,t])}function w(e,t){let{relative:o}=void 0===t?{}:t,u=a.useContext(r.UNSAFE_RouteContext);u||n.invariant(!1);let[i]=u.matches.slice(-1),c=null!=e?e:".",l=r.useResolvedPath(c,{relative:o}),s=r.useLocation();if(null==e&&(l.search=s.search,l.hash=s.hash,i.route.index)){let e=new URLSearchParams(l.search);e.delete("index"),l.search=e.toString()?"?"+e.toString():""}return e&&"."!==e||!i.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r.createPath(l)}let E=0;const S="react-router-scroll-positions";let j={};Object.defineProperty(e,"AbortedDeferredError",{enumerable:!0,get:function(){return r.AbortedDeferredError}}),Object.defineProperty(e,"Await",{enumerable:!0,get:function(){return r.Await}}),Object.defineProperty(e,"DataMemoryRouter",{enumerable:!0,get:function(){return r.DataMemoryRouter}}),Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return r.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return r.Navigate}}),Object.defineProperty(e,"NavigationType",{enumerable:!0,get:function(){return r.NavigationType}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return r.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return r.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return r.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return r.Routes}}),Object.defineProperty(e,"UNSAFE_DataRouter",{enumerable:!0,get:function(){return r.UNSAFE_DataRouter}}),Object.defineProperty(e,"UNSAFE_DataRouterContext",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterContext}}),Object.defineProperty(e,"UNSAFE_DataRouterProvider",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterProvider}}),Object.defineProperty(e,"UNSAFE_DataRouterStateContext",{enumerable:!0,get:function(){return r.UNSAFE_DataRouterStateContext}}),Object.defineProperty(e,"UNSAFE_DataStaticRouterContext",{enumerable:!0,get:function(){return r.UNSAFE_DataStaticRouterContext}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return r.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return r.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return r.UNSAFE_RouteContext}}),Object.defineProperty(e,"UNSAFE_enhanceManualRouteObjects",{enumerable:!0,get:function(){return r.UNSAFE_enhanceManualRouteObjects}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return r.createPath}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return r.createRoutesFromChildren}}),Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return r.defer}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return r.generatePath}}),Object.defineProperty(e,"isRouteErrorResponse",{enumerable:!0,get:function(){return r.isRouteErrorResponse}}),Object.defineProperty(e,"json",{enumerable:!0,get:function(){return r.json}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return r.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return r.matchRoutes}}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return r.parsePath}}),Object.defineProperty(e,"redirect",{enumerable:!0,get:function(){return r.redirect}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return r.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return r.resolvePath}}),Object.defineProperty(e,"useActionData",{enumerable:!0,get:function(){return r.useActionData}}),Object.defineProperty(e,"useAsyncError",{enumerable:!0,get:function(){return r.useAsyncError}}),Object.defineProperty(e,"useAsyncValue",{enumerable:!0,get:function(){return r.useAsyncValue}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return r.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return r.useInRouterContext}}),Object.defineProperty(e,"useLoaderData",{enumerable:!0,get:function(){return r.useLoaderData}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return r.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return r.useMatch}}),Object.defineProperty(e,"useMatches",{enumerable:!0,get:function(){return r.useMatches}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return r.useNavigate}}),Object.defineProperty(e,"useNavigation",{enumerable:!0,get:function(){return r.useNavigation}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return r.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return r.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return r.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return r.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return r.useResolvedPath}}),Object.defineProperty(e,"useRevalidator",{enumerable:!0,get:function(){return r.useRevalidator}}),Object.defineProperty(e,"useRouteError",{enumerable:!0,get:function(){return r.useRouteError}}),Object.defineProperty(e,"useRouteLoaderData",{enumerable:!0,get:function(){return r.useRouteLoaderData}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return r.useRoutes}}),e.BrowserRouter=function(e){let{basename:t,children:o,window:u}=e,i=a.useRef();null==i.current&&(i.current=n.createBrowserHistory({window:u,v5Compat:!0}));let c=i.current,[l,s]=a.useState({action:c.action,location:c.location});return a.useLayoutEffect((()=>c.listen(s)),[c]),a.createElement(r.Router,{basename:t,children:o,location:l.location,navigationType:l.action,navigator:c})},e.DataBrowserRouter=function(e){let{basename:t,children:o,fallbackElement:u,hydrationData:i,routes:c,window:l}=e;y||(y=n.createBrowserRouter({basename:t,hydrationData:i||window.__staticRouterHydrationData,window:l,routes:c?r.UNSAFE_enhanceManualRouteObjects(c):r.createRoutesFromChildren(o)}).initialize());let s=y;return a.createElement(r.UNSAFE_DataRouterProvider,{router:s,basename:t},a.createElement(r.UNSAFE_DataRouter,{fallbackElement:u}))},e.DataHashRouter=function(e){let{basename:t,children:o,hydrationData:u,fallbackElement:i,routes:c,window:l}=e;y||(y=n.createHashRouter({basename:t,hydrationData:u||window.__staticRouterHydrationData,window:l,routes:c?r.UNSAFE_enhanceManualRouteObjects(c):r.createRoutesFromChildren(o)}).initialize());let s=y;return a.createElement(r.UNSAFE_DataRouterProvider,{router:s,basename:t},a.createElement(r.UNSAFE_DataRouter,{fallbackElement:i}))},e.Form=v,e.HashRouter=function(e){let{basename:t,children:o,window:u}=e,i=a.useRef();null==i.current&&(i.current=n.createHashHistory({window:u,v5Compat:!0}));let c=i.current,[l,s]=a.useState({action:c.action,location:c.location});return a.useLayoutEffect((()=>c.listen(s)),[c]),a.createElement(r.Router,{basename:t,children:o,location:l.location,navigationType:l.action,navigator:c})},e.Link=h,e.NavLink=g,e.ScrollRestoration=function(e){let{getKey:t,storageKey:o}=e;return function(e){let{getKey:t,storageKey:o}=void 0===e?{}:e,u=r.useLocation(),i=r.useMatches(),c=r.useNavigation(),l=a.useContext(r.UNSAFE_DataRouterContext);l||n.invariant(!1);let{router:s}=l,f=a.useContext(r.UNSAFE_DataRouterStateContext);(null==s||null==f)&&n.invariant(!1);let{restoreScrollPosition:d,preventScrollReset:m}=f;a.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),b=a.useCallback((()=>{if("idle"===c.state){let e=(t?t(u,i):null)||u.key;j[e]=window.scrollY}sessionStorage.setItem(o||S,JSON.stringify(j)),window.history.scrollRestoration="auto"}),[o,t,c.state,u,i]),a.useEffect((()=>(window.addEventListener("beforeunload",b),()=>{window.removeEventListener("beforeunload",b)})),[b]),a.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(o||S);e&&(j=JSON.parse(e))}catch(e){}}),[o]),a.useLayoutEffect((()=>{let e=null==s?void 0:s.enableScrollRestoration(j,(()=>window.scrollY),t);return()=>e&&e()}),[s,t]),a.useLayoutEffect((()=>{if(!1!==d)if("number"!=typeof d){if(u.hash){let e=document.getElementById(u.hash.slice(1));if(e)return void e.scrollIntoView()}!0!==m&&window.scrollTo(0,0)}else window.scrollTo(0,d)}),[u,d,m]);var b}({getKey:t,storageKey:o}),null},e._resetModuleScope=function(){y=null},e.createSearchParams=f,e.unstable_HistoryRouter=function(e){let{basename:t,children:n,history:o}=e;const[u,i]=a.useState({action:o.action,location:o.location});return a.useLayoutEffect((()=>o.listen(i)),[o]),a.createElement(r.Router,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o})},e.useFetcher=function(){var e;let t=a.useContext(r.UNSAFE_DataRouterContext);t||n.invariant(!1);let{router:o}=t,i=a.useContext(r.UNSAFE_RouteContext);i||n.invariant(!1);let c=null==(e=i.matches[i.matches.length-1])?void 0:e.route.id;null==c&&n.invariant(!1);let[l]=a.useState((()=>String(++E))),[s]=a.useState((()=>(c||n.invariant(!1),function(e,t){return a.forwardRef(((r,n)=>a.createElement(R,u({},r,{ref:n,fetcherKey:e,routeId:t}))))}(l,c)))),[f]=a.useState((()=>e=>{o||n.invariant(!1),c||n.invariant(!1),o.fetch(l,c,e)})),d=O(l,c),m=o.getFetcher(l),b=a.useMemo((()=>u({Form:s,submit:d,load:f},m)),[m,s,d,f]);return a.useEffect((()=>()=>{o?o.deleteFetcher(l):console.warn("No fetcher available to clean up from useFetcher()")}),[o,l]),b},e.useFetchers=function(){let e=a.useContext(r.UNSAFE_DataRouterStateContext);return e||n.invariant(!1),[...e.fetchers.values()]},e.useFormAction=w,e.useLinkClickHandler=P,e.useSearchParams=function(e){let t=a.useRef(f(e)),n=r.useLocation(),o=a.useMemo((()=>function(e,t){let r=f(e);for(let e of t.keys())r.has(e)||t.getAll(e).forEach((t=>{r.append(e,t)}));return r}(n.search,t.current)),[n.search]),u=r.useNavigate(),i=a.useCallback(((e,t)=>{const r=f("function"==typeof e?e(o):e);u("?"+r,t)}),[u,o]);return[o,i]},e.useSubmit=function(){return O()},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=react-router-dom.production.min.js.map
{
"name": "react-router-dom",
"version": "6.4.0-pre.13",
"version": "6.4.0-pre.14",
"description": "Declarative routing for React web applications",

@@ -26,3 +26,3 @@ "keywords": [

"dependencies": {
"react-router": "6.4.0-pre.13"
"react-router": "6.4.0-pre.14"
},

@@ -29,0 +29,0 @@ "devDependencies": {

@@ -156,3 +156,3 @@ 'use strict';

restoreScrollPosition: null,
resetScrollPosition: true,
preventScrollReset: false,
revalidation: "idle",

@@ -159,0 +159,0 @@ fetchers: new Map()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc