PageSourceSearch

https://ngrok.com/blog-assets/build/jsx-runtime-CB84OG5s.js

js ngrok.com collected 2026-09-24 06:50:30 UTC 87,618 bytes, 1 lines download raw bytes

1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;
1try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ee(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(ee.bind(null,e))}var z={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=z,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ee,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;
1if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,p=/^[\\/]{2}/;function m(e,t){return t+e.replace(/\\/g,`/`)}var h=`popstate`;function g(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function _(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return S(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:C(t)}return T(t,n,null,e)}function v(e,t){if(e===!1||e==null)throw Error(t)}function y(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function b(){return Math.random().toString(36).substring(2,10)}function x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function S(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?w(t):t,state:n,key:t&&t.key||r||b(),mask:i}}function C({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function w(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function T(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:_.location,delta:t})}function f(e,t){s=`PUSH`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u()+1;let d=x(r,l),f=_.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:_.location,delta:1})}function p(e,t){s=`REPLACE`;let r=g(e)?e:S(_.location,e,t);n&&n(r,e),l=u();let i=x(r,l),d=_.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:_.location,delta:0})}function m(e){return E(i,e)}let _={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(h,d),c=e,()=>{i.removeEventListener(h,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return _}function E(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),v(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:C(t);return i=i.replace(/ $/,`%20`),!n&&p.test(i)&&(i=r+i),new URL(i,r)}var D=l(d(),1),O=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},k=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`,`unstable_validateParams`]);function A(e){return k.has(e)}var j=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`,`unstable_validateParams`]);function M(e){return j.has(e)}function N(e){return e.index===!0}function P(e){let t={};return e.Component&&Object.assign(t,{element:D.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:D.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:D.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function F(e,t=P,n=[],r={},i=!1){return e.map((e,a)=>
1{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(v(e.index!==!0||!e.children,`Cannot specify children on an index route`),v(i||!r[s],`Found a route id collision on id "${s}".  Route id's must be globally unique within Data Router usages`),N(e)){let n={...e,id:s};return r[s]=I(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=I(n,t(n)),e.children&&(n.children=F(e.children,t,o,r,i)),n}})}function I(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function L(e,t,n=`/`){return R(e,t,n,!1)}function R(e,t,n,r,i){let a=_e((typeof t==`string`?w(t):t).pathname||`/`,n);if(a==null)return null;let o=i??z(e),s=null,c=ge(a);for(let e=0;s==null&&e<o.length;++e)s=de(o[e],c,r);return s}function ee(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function z(e){let t=B(e);return ne(t),t}function B(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;v(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=G([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(v(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),B(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:U(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=W(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of te(e.path))a(e,t,!0,n)}),t}function te(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=te(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ne(e){e.sort((e,t)=>e.score===t.score?ue(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var re=/^:[\w-]+$/,ie=/^:[\w-]+/,V=3.5,ae=3,oe=2,se=1,H=10,ce=-2,le=e=>e===`*`;function U(e,t){let n=e.split(`/`),r=n.length;return n.some(le)&&(r+=ce),t&&(r+=oe),n.filter(e=>!le(e)).reduce((e,t)=>e+(re.test(t)?ae:ie.test(t)?V:t===``?se:H),r)}function ue(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function de(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?he(u,l,s.matcher,s.compiledParams):me(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=me({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;
1Object.assign(i,d.params),o.push({params:i,pathname:G([a,d.pathname]),pathnameBase:Oe(G([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=G([a,d.pathnameBase]))}return o}var fe={"%24":`$`,"%26":`&`,"%2B":`+`,"%2C":`,`,"%3A":`:`,"%3B":`;`,"%3D":`=`,"%40":`@`};function pe(e){return encodeURIComponent(e).replace(/%(?:24|26|2B|2C|3A|3B|3D|40)/g,e=>fe[e])}function me(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=W(e.path,e.caseSensitive,e.end);return he(e,t,n,r)}function he(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=De(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=De(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function W(e,t=!1,n=!0){y(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ge(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return y(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function _e(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ve({basename:e,pathname:t}){return t===`/`?e:G([e,t])}var ye=e=>f.test(e);function be(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?w(e):e,a;return n?(n=Ee(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?xe(n.substring(1),`/`):xe(n,t)):a=t,{pathname:a,search:ke(r),hash:Ae(i)}}function xe(e,t){let n=De(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Se(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ce(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function we(e){let t=Ce(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Te(e,t,n,r=!1){let i;typeof e==`string`?i=w(e):(i={...e},v(!i.pathname||!i.pathname.includes(`?`),Se(`?`,`pathname`,`search`,i)),v(!i.pathname||!i.pathname.includes(`#`),Se(`#`,`pathname`,`hash`,i)),v(!i.search||!i.search.includes(`#`),Se(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=be(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ee=e=>e.replace(/[\\/]{2,}/g,`/`),G=e=>Ee(e.join(`/`));function De(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Oe=e=>De(e).replace(/^\/*/,`/`),ke=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ae=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,je=class{type=`DataWithResponseInit`;data;init;constructor(e,t){this.data=e,this.init=t||null}};function K(e,t){return new je(e,typeof t==`number`?{status:t}:t)}var q=(e,t=302)=>{let n=t;
1typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},Me=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ne=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Pe(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Fe(e){return G(e.map(e=>e.route.path).filter(Boolean))||`/`}function Ie(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?w(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var J=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Le(e,t){let n=e;if(typeof n!=`string`||!f.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(J)try{let e=new URL(window.location.href),r=p.test(n)?new URL(m(n,e.protocol)):new URL(n),a=_e(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{y(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Re=Symbol(`Uninstrumented`),ze=new WeakMap;function Be(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>Y(await X(n.lazy,void 0,()=>e(...t),Ke))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>Y(await X(n[`lazy.middleware`],void 0,()=>t(...e),Ke))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>Y(await X(n[`lazy.loader`],void 0,()=>t(...e),Ke))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>Y(await X(n[`lazy.action`],void 0,()=>t(...e),Ke))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=He(t.loader),i=async(...t)=>Y(await X(n.loader,qe(t[0]),()=>e(...t),Ke));e.hydrate===!0&&(i.hydrate=!0),Ue(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=He(t.action),i=async(...t)=>Y(await X(n.action,qe(t[0]),()=>e(...t),Ke));Ue(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=He(e),r=async(...e)=>Y(await X(n.middleware,qe(e[0]),()=>t(...e),Ke));return Ue(r,t),r})),r}function Ve(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=He(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?C(i):`.`,...Je(e,a??{})};return Y(await X(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=We(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...Ke(e),meta:o})))};Ue(r,t),e.navigate=r}if(n.fetch.length>0){let t=He(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return Y(await X(n.fetch,{href:o??`.`,fetcherKey:i,...Je(e,s??{})},async()=>{let n=We(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...Ke(e),meta:c})))};Ue(r,t),e.fetch=r}return e}function He(e){return e[Re]??e}function Ue(e,t){e[Re]=t}function We(e,t){return ze.set(e,t),()=>{ze.get(e)===t&&ze.delete(e)}}function Ge(e){let t=ze.get(e);return ze.delete(e),t}function Y(e){if(e.type===`error`)throw e.value;return e.value}async function X(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=X(e,t,n,r,i,a-1),await s,v(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function Ke(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function qe(e){let{request:t,context:n,params:r}=e;return{...e,request:Ye(t),params:{...r},context:Xe(n)}}function Je(e,t){return{currentUrl:C(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function Ye(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Xe(e){return{get:t=>e.get(t)}}var Ze=class{#e=[];#t=[];#n;constructor(e){this.#n=e}update(e){this.#e=e,this.#t=z(e)}match(e,t=!1){return R(this.#e,e,this.#n,t,this.#t)}}
1,Qe=new URL(`http://localhost`);function $e(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Qe)}catch{return Qe}}function et(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function tt(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function nt(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!et(i,n),s=!et(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!tt(e,i)||!et(i,a)))throw Error(`External navigation is not allowed`)}var rt=[`POST`,`PUT`,`PATCH`,`DELETE`],it=new Set(rt),at=[`GET`,...rt],ot=new Set(at),st=new Set([301,302,303,307,308]),ct=new Set([307,308]),lt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ut={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ft=`remix-router-transitions`,pt=Symbol(`ResetLoaderData`);function mt(e,t){return e.unstable_routePatternMatching?(v(void 0,`You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.`),new(void 0)(t)):new Ze(t)}var ht=class{#e;#t;#n;constructor(e,t){this.#e=e,this.#n=t,this.#n.update(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#t??this.#e}get hasHMRRoutes(){return this.#t!=null}setRoutes(e){this.#e=e,this.#t||this.#n.update(e)}setHmrRoutes(e){this.#t=e,this.#n.update(e)}commitHmrRoutes(){this.#t&&(this.#e=this.#t,this.#t=void 0,this.#n.update(this.#e))}};function gt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;v(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...Be(t.map(e=>e.route).filter(Boolean),e)})}let o={...e.future},s=e.basename||`/`;s.startsWith(`/`)||(s=`/${s}`);let c=mt(o,s),l={},u=new ht(F(e.routes,a,void 0,l),c),d=e.dataStrategy||Nt,f=null,m=new Set,h=null,g=null,_=null,b=null,x=e.hydrationData!=null,T=c.match(e.history.location),D=!1,k=null,A,j;if(T==null&&!e.patchRoutesOnNavigation){let t=Z(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=nn(u.activeRoutes);A=!0,j=!A,T=n,k={[r.id]:t}}else if(T&&!e.hydrationData&&Xe(T,e.history.location.pathname).active&&(T=null),!T){A=!1,j=!A,T=[];let t=Xe(null,e.history.location.pathname);t.active&&t.matches&&(D=!0,T=t.matches)}else if(T.some(e=>e.route.lazy))A=!1,j=!A;else if(!T.some(e=>xt(e.route)))A=!0,j=!A;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=T;if(n){let e=T.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}j=!1,A=!0,r.forEach(e=>{let r=St(e.route,t,n);j||=r.renderFallback,A&&=!r.shouldLoad})}let M,N={historyAction:e.history.action,location:e.history.location,matches:T,initialized:A,renderFallback:j,navigation:lt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||k,fetchers:new Map,blockers:new Map},P=`POP`,I=null,L=!1,R,z=!1,B=new Map,te=null,ne=!1,re=!1,ie=new Set,V=new Map,ae=0,oe=-1,se=new Map,H=new Set,ce=new Map,le=new Map,U=new Set,ue=new Map,de,fe=null;function pe(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(de){de(),de=void 0;return}y(ue.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Y({currentLocation:N.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{de=e});e.history.go(r*-1),We(i,{state:`blocked`,location:n,proceed(){We(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(N.blockers);e.set(i,dt),W({blockers:e})}}),I?.resolve(),I=null;return}return xe(t,n)}),n){En(t,B);let e=()=>Dn(t,B);t.addEventListener(`pagehide`,e),te=()=>t.removeEventListener(`pagehide`,e)}return N.initialized||xe(`POP`,N.location,{initialHydration:!0}),M}function me(){f&&f(),te&&te(),m.clear(),R&&R.abort(),N.fetchers.forEac
1h((e,t)=>Fe(N.fetchers,t)),N.blockers.forEach((e,t)=>Ue(t))}function he(e){if(m.add(e),h){let{newErrors:t}=h;h=null,e(N,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>m.delete(e)}function W(e,t={}){e.matches&&=e.matches.map(e=>{let t=l[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),N={...N,...e};let n=[],r=[];N.fetchers.forEach((e,t)=>{e.state===`idle`&&(U.has(t)?n.push(t):r.push(t))}),U.forEach(e=>{!N.fetchers.has(e)&&!V.has(e)&&n.push(e)}),m.size===0&&(h={newErrors:e.errors??null}),[...m].forEach(r=>r(N,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Fe(N.fetchers,e)),r.forEach(e=>N.fetchers.delete(e))}function ge(t,n,{flushSync:r}={}){let i=N.actionData!=null&&N.navigation.formMethod!=null&&$(N.navigation.formMethod)&&N.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?N.actionData:null;let o=n.loaderData?$t(N.loaderData,n.loaderData,n.matches||[],n.errors):N.loaderData,s=N.blockers;s.size>
10&&!ne&&(s=new Map(s),s.forEach((e,t)=>s.set(t,dt)));let c=!ne&&Ye(t,n.matches||N.matches),l=L===!0||N.navigation.formMethod!=null&&$(N.navigation.formMethod)&&t.state?._isRedirect!==!0;u.commitHmrRoutes(),ne||P===`POP`||(P===`PUSH`?e.history.push(t,t.state):P===`REPLACE`&&e.history.replace(t,t.state));let d;if(P===`POP`&&!ne&&t!==N.location){let e=B.get(N.location.pathname);e&&e.has(t.pathname)?d={currentLocation:N.location,nextLocation:t}:B.has(t.pathname)&&(d={currentLocation:t,nextLocation:N.location})}else if(z){let e=B.get(N.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),B.set(N.location.pathname,e)),d={currentLocation:N.location,nextLocation:t}}W({...n,actionData:a,loaderData:o,historyAction:P,location:t,initialized:!0,renderFallback:!1,navigation:lt,revalidation:`idle`,restoreScrollPosition:c,preventScrollReset:l,blockers:s},{viewTransitionOpts:d,flushSync:r===!0}),P=`POP`,L=!1,z=!1,ne=!1,re=!1,I?.resolve(),I=null,fe?.resolve(),fe=null}async function ve(t,n){if(I?.resolve(),I=null,typeof t==`number`){I||=On();let n=I.promise;return e.history.go(t),n}let r=Ge(M),{path:i,submission:a,error:o}=yt(!1,vt(N.location,N.matches,s,t,n?.fromRouteId,n?.relative),n),c;if(n?.mask){let t=typeof n.mask==`string`?w(n.mask):{...N.location.mask,...n.mask};if(c={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},p.test(c.pathname))throw Error(`External navigation is not allowed`);c.pathname.startsWith(`\\`)&&(c.pathname=c.pathname.replace(/^\\+/,`/`)),nt(typeof n.mask==`string`?n.mask:C(n.mask),C(c),e.history.createURL(`/`),`reject`)}let l=N.location,u=S(l,i,n&&n.state,void 0,c);u={...u,...e.history.encodeLocation(u)},nt(t==null?e.history.createHref(N.location):typeof t==`string`?t:C(t),e.history.createHref(u.mask||u),e.history.createURL(`/`),`reject`);let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&$(a.formMethod)&&a.formAction===N.location.pathname+N.location.search&&(f=`REPLACE`);let m=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,h=(n&&n.flushSync)===!0,g=Y({currentLocation:l,nextLocation:u,historyAction:f});if(g){We(g,{state:`blocked`,location:u,proceed(){We(g,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),ve(t,n)},reset(){let e=new Map(N.blockers);e.set(g,dt),W({blockers:e})}});return}await xe(f,u,{submission:a,pendingError:o,preventScrollReset:m,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function be(){fe||=On(),je(),W({revalidation:`loading`});let e=fe.promise;return N.navigation.state===`submitting`?e:N.navigation.state===`idle`?(xe(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),e):(xe(P||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:z===!0}),e)}async function xe(t,n,r){R&&R.abort(),R=null,P=t,ne=(r&&r.startUninterruptedRevalidation)===!0,Je(N.location,N.matches),L=(r&&r.preventScrollReset)===!0,z=(r&&r.enableViewTransition)===!0;let i=r?.initialHydration&&N.matches&&N.matches.length>0&&!D?N.matches:c.match(n),a=(r&&r.flushSync)===!0;if(i&&N.initialized&&!re&&on(N.location,n)&&!(r&&r.submission&&$(r.submission.formMethod))){ge(n,{matches:i},{flushSync:a});return}let o=Xe(i,n.pathname);if(o.active&&o.matches&&(i=o.matches),r?.instrumentationNavigateMetaReceiver){let t=yn(e.history,n,i);r.instrumentationNavigateMetaReceiver(t)}if(!i){let{error:e,notFoundMatches:t,route:r}=X(n.pathname);ge(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:a});return}let s=r&&r.overrideNavigation?{...r.overrideNavigation,matches:i,historyAction:t}:void 0;R=new AbortController;let l=Jt(e.history,n,R.signal,r&&r.submission),u=e.getContext?await e.getContext():new O,d;if(r&&r.pendingError)d=[tn(i).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&$(r.submission.formMethod)){let c=await Se(l,n,r.submission,i,t,u,o.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:a});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Q(t)&&Pe(t.error)&&t.error.status===404){R=null,ge(n,{matches:c.matches,loaderData:{},errors:{[e]:t.error}});return}}i=c.matches||i,d=c.pendingActionResult,s=xn(n,i,t,r.submission),a=!1,o.active=!1,l=Jt(e.history,l.url,l.signal)}let{shortCircuited:f,matches:p,loaderData:m,errors:h,workingFetchers:g}=await Ce(l,n,i,t,u,o.active,s,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,a,d,r&&r.callSiteDefaultShouldRevalidate);f||(R=null,ge(n,{matches:p||i,...en(d),loaderData:m,errors:h,...g?{fetchers:g}:{}}))}async function Se(t,n,i,o,c,d,f,p,m={}){if(je(),W({navigation:Sn(n,o,c,i)},{flushSync:m.flushSync===!0}),f){let e=await Ze(o,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=nn(u.activeRoutes);
1return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=tn(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)o=e.matches;else{let{notFoundMatches:e,error:t,route:r}=X(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=vn(o,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:Z(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await ke(t,n,zt(a,l,t,n,o,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of o)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(dn(h)){let n;return n=m&&m.replace!=null?m.replace:qt(h.response.headers.get(`Location`),new URL(t.url),s,e.history)===N.location.pathname+N.location.search,await Oe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Q(h)){let e=tn(o,g.route.id);return(m&&m.replace)!==!0&&(P=`PUSH`),{matches:o,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:o,pendingActionResult:[g.route.id,h]}}async function Ce(t,n,i,o,s,d,f,p,m,h,g,_,v,y){let b=f||xn(n,i,o,p),x=p||m||bn(b),S=!ne&&!g;if(d){if(S){let e=we(v);W({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ze(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=nn(u.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=tn(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=X(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let{dsMatches:C,revalidatingFetchers:w}=bt(t,s,a,l,e.history,N,i,x,n,g?[]:r,g===!0,re,ie,U,ce,H,c,v,y);if(oe=++ae,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=new Map(N.fetchers),t=Re(e);return ge(n,{matches:i,loaderData:{},errors:v&&Q(v[1])?{[v[0]]:v[1].error}:null,...en(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=we(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Te(w)),W(e,{flushSync:_})}w.forEach(e=>{J(e.key),e.controller&&V.set(e.key,e.controller)});let T=()=>w.forEach(e=>J(e.key));R&&R.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:D}=await Ae(C,w,t,n,s);if(t.signal.aborted)return{shortCircuited:!0};R&&R.signal.removeEventListener(`abort`,T),w.forEach(e=>V.delete(e.key));let O=rn(E);if(O)return await Oe(t,O.result,!0,{replace:h}),{shortCircuited:!0};if(O=rn(D),O)return H.add(O.key),await Oe(t,O.result,!0,{replace:h}),{shortCircuited:!0};let k=new Map(N.fetchers),{loaderData:A,errors:j}=Qt(N,i,E,v,w,D,k);g&&N.errors&&(j={...N.errors,...j});let M=Re(k),P=ze(oe,k),F=M||P||w.length>0;return{matches:i,loaderData:A,errors:j,...F?{workingFetchers:k}:{}}}function we(e){if(e&&!Q(e[1]))return{[e[0]]:e[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Te(e){let t=new Map(N.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Cn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Ee(t,n,r,i){J(t);let a=(i&&i.flushSync)===!0,o=Ge(M),l=vt(N.location,N.matches,s,r,n,i?.relative),u=c.match(l),d=Xe(u,l);if(d.active&&d.matches&&(u=d.matches),o&&o(yn(e.history,l,u)),!u){q(t,n,Z(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=yt(!0,l,i);if(m){q(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new O,g=(i&&i.preventScrollReset)===!0;if(p&&$(p.formMethod)){await G(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate);return}let _={routeId:n,path:f,isDiscovering:d.active};ce.set(t,_),await De(t,_,u,h,a,g,p)}async function G(t,n,i,o,s,u,d,f,p,m){je(),ce.delete(t),K(t,wn(p,N.fetchers.get(t)),{flushSync:d});let h=new AbortController,g=Jt(e.history,i,h.signal,p);if(u){let e=await Ze(o,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,n,e.error,{flushSync:d});return}if(e.matches)o=e.matches;else{q(t,n,Z(404,{pathname:i}),{flushSync:d});return}}let _=vn(o,i);if(!_.route.action&&!_.route.lazy){q(t,n,Z(405,{method:p.formMethod,pathname:i,routeId:n}),{flushSync:d});return}V.set(t,h);let y=ae,b=zt(a,l,g,i,o,_,r,s),x=await ke(g,i,b,s,t),S=x[_.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(g.signal.aborted){V.get(t)===h&&V.delete(t);return}if(U.has(t)){if(dn(S)||Q(S)){K(t,Tn(void 0));return}}else{if(dn(S)){if(V.delete(t),oe>y){K(t,Tn(void 0));return}return H.add(t),K(t,Cn(p)),Oe(g,S,!1,{fetcherSubmission:p,preventScrollReset:f})}if(Q(S)){q(t,n,S.error);return}}let C=N.navigation.location||N.location,w=Jt(e.history,C,h.signal),T=N.navigation.state===`idle`?N.matches:c.match(N.navigation.location);v(T,`Didn't find any matches after fetcher action`);let E=++ae;se.set(t,E);let{dsMatches:D,revalidatingFetchers:O}=bt(w,s,a,l,e.history,N,T,p,C,r,!1,re,ie,U,ce,H,c,[_.route.id,S],m),k=Cn(p,S.data),A=new Map(N.fetchers);A.set(t,k),O.filter(e=>
1e.key!==t).forEach(e=>{let t=e.key,n=A.get(t),r=Cn(void 0,n?n.data:void 0);A.set(t,r),J(t),e.controller&&V.set(t,e.controller)}),W({fetchers:A});let j=()=>O.forEach(e=>J(e.key));h.signal.addEventListener(`abort`,j);let{loaderResults:M,fetcherResults:F}=await Ae(D,O,w,C,s);if(h.signal.aborted){se.get(t)===E&&se.delete(t);return}h.signal.removeEventListener(`abort`,j),se.delete(t),V.delete(t),O.forEach(e=>V.delete(e.key));let I=N.fetchers.has(t),L=e=>{if(!I)return e;let n=new Map(e.fetchers);return n.set(t,Tn(S.data)),{...e,fetchers:n}},ee=rn(M);if(ee)return N=L(N),Oe(w,ee.result,!1,{preventScrollReset:f});if(ee=rn(F),ee)return H.add(ee.key),N=L(N),Oe(w,ee.result,!1,{preventScrollReset:f});let z=new Map(N.fetchers);I&&z.set(t,Tn(S.data));let{loaderData:B,errors:te}=Qt(N,T,M,void 0,O,F,z);ze(E,z),N.navigation.state===`loading`&&E>oe?(v(P,`Expected pending action`),R&&R.abort(),ge(N.navigation.location,{matches:T,loaderData:B,errors:te,fetchers:z})):(W({errors:te,loaderData:$t(N.loaderData,B,T,te),fetchers:z}),re=!1)}async function De(t,n,i,o,s,c,u){let{routeId:d,path:f}=n,p=N.fetchers.get(t);K(t,Cn(u,p?p.data:void 0),{flushSync:s});let m=new AbortController,h=Jt(e.history,f,m.signal);if(n.isDiscovering){let e=await Ze(i,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){q(t,d,e.error,{flushSync:s});return}if(e.matches)i=e.matches,n.isDiscovering=!1;else{q(t,d,Z(404,{pathname:f}),{flushSync:s});return}}let g=vn(i,f);V.set(t,m);let _=ae,v=await ke(h,f,zt(a,l,h,f,i,g,r,o),o,t),y=v[g.route.id];if(!y){for(let e of i)if(v[e.route.id]){y=v[e.route.id];break}}if(V.get(t)===m&&V.delete(t),!h.signal.aborted){if(U.has(t)){K(t,Tn(void 0));return}if(dn(y)){if(oe>_){K(t,Tn(void 0));return}H.add(t),await Oe(h,y,!1,{preventScrollReset:c});return}if(Q(y)){q(t,d,y.error);return}K(t,Tn(y.data))}}async function Oe(r,i,a,{submission:o,fetcherSubmission:c,preventScrollReset:l,replace:u}={}){a||(I?.resolve(),I=null),i.response.headers.has(`X-Remix-Revalidate`)&&(re=!0);let d=i.response.headers.get(`Location`);v(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=qt(d,p,s,e.history),nt(f,d,p,`allow-explicit`);let m=S(N.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(ye(d)){let n=E(t,d,!0);e=n.origin!==t.location.origin||_e(n.pathname,s)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}R=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:y}=N.navigation;!o&&!c&&g&&_&&y&&(o=bn(N.navigation));let b=o||c;ct.has(i.response.status)&&b&&$(b.formMethod)?await xe(h,m,{submission:{...b,formAction:d},preventScrollReset:l||L,enableViewTransition:a?z:void 0}):await xe(h,m,{overrideNavigation:xn(m,[],h,o),fetcherSubmission:c,preventScrollReset:l||L,enableViewTransition:a?z:void 0})}async function ke(e,t,n,r,i){let a,o={};try{a=await Bt(d,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!$(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!N.loaderData.hasOwnProperty(e.route.id)&&(!N.errors||!N.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(un(r)){let i=r.result;o[t]={type:`redirect`,response:Wt(i,e,t,n,s)}}else o[t]=await Ut(r);return o}async function Ae(e,t,n,r,i){let a=ke(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ke(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:Z(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function je(){re=!0,ce.forEach((e,t)=>{V.has(t)&&ie.add(t),J(t)})}function K(e,t,n={}){let r=new Map(N.fetchers);r.set(e,t),W({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function q(e,t,n,r={}){let i=tn(N.matches,t),a=new Map(N.fetchers);Fe(a,e),W({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Me(e){return le.set(e,(le.get(e)||0)+1),U.has(e)&&U.delete(e),N.fetchers.get(e)||ut}function Ne(e,t){J(e,t?.reason),K(e,Tn(null))}function Fe(e,t){let n=N.fetchers.get(t);V.has(t)&&!(n&&n.state===`loading`&&se.has(t))&&J(t),ce.delete(t),se.delete(t),H.delete(t),U.delete(t),ie.delete(t),e.delete(t)}function Ie(e){let t=(le.get(e)||0)-1;
1t<=0?(le.delete(e),U.add(e)):le.set(e,t),W({fetchers:new Map(N.fetchers)})}function J(e,t){let n=V.get(e);n&&(n.abort(t),V.delete(e))}function Le(e,t){for(let n of e){let e=t.get(n);v(e,`Expected fetcher: ${n}`);let r=Tn(e.data);t.set(n,r)}}function Re(e){let t=[],n=!1;for(let r of H){let i=e.get(r);v(i,`Expected fetcher: ${r}`),i.state===`loading`&&(H.delete(r),t.push(r),n=!0)}return Le(t,e),n}function ze(e,t){let n=[];for(let[r,i]of se)if(i<e){let e=t.get(r);v(e,`Expected fetcher: ${r}`),e.state===`loading`&&(J(r),se.delete(r),n.push(r))}return Le(n,t),n.length>0}function He(e,t){let n=N.blockers.get(e)||dt;return ue.get(e)!==t&&ue.set(e,t),n}function Ue(e){N.blockers.delete(e),ue.delete(e)}function We(e,t){let n=N.blockers.get(e)||dt;v(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(N.blockers);r.set(e,t),W({blockers:r})}function Y({currentLocation:e,nextLocation:t,historyAction:n}){if(ue.size===0)return;ue.size>1&&y(!1,`A router only supports one blocker at a time`);let r=Array.from(ue.entries()),[i,a]=r[r.length-1],o=N.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function X(e){let t=Z(404,{pathname:e}),n=u.activeRoutes,{matches:r,route:i}=nn(n);return{notFoundMatches:r,route:i,error:t}}function Ke(e,t,n){if(g=e,b=t,_=n||null,!x&&N.navigation===lt){x=!0;let e=Ye(N.location,N.matches);e!=null&&W({restoreScrollPosition:e})}return()=>{g=null,b=null,_=null}}function qe(e,t){return _&&_(e,t.map(e=>ee(e,N.loaderData)))||e.key}function Je(e,t){if(g&&b){let n=qe(e,t);g[n]=b()}}function Ye(e,t){if(g){let n=qe(e,t),r=g[n];if(typeof r==`number`)return r}return null}function Xe(t,n){if(e.patchRoutesOnNavigation){if(!t)return{active:!0,matches:c.match(n,!0)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:c.match(n,!0)}}return{active:!1,matches:null}}async function Ze(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let o=t;for(;;){let t=l;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:o,fetcherKey:i,patch:(e,n)=>{r.aborted||Et(e,n,u,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:o}}if(r.aborted)return{type:`aborted`};let s=c.match(n),d=null;if(s&&(Object.keys(s[0].params).length===0||(d=c.match(n,!0),!(d&&o.length<d.length&&Qe(o,d.slice(0,o.length))))))return{type:`success`,matches:s};if(d||=c.match(n,!0),!d||Qe(o,d))return{type:`success`,matches:null};o=d}}function Qe(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function $e(e){l={},u.setHmrRoutes(F(e,a,void 0,l))}function et(e,t,n=!1){Et(e,t,u,l,a,n),u.hasHMRRoutes||W({})}return M={get basename(){return s},get future(){return o},get state(){return N},get routes(){return u.stableRoutes},match(e){return c.match(e)},get manifest(){return l},get window(){return t},initialize:pe,subscribe:he,enableScrollRestoration:Ke,navigate:ve,fetch:Ee,revalidate:be,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Me,resetFetcher:Ne,deleteFetcher:Ie,dispose:me,getBlocker:He,deleteBlocker:Ue,patchRoutes:et,_internalFetchControllers:V,_internalSetRoutes:$e,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){W(e)}},e.instrumentations&&(M=Ve(M,e.instrumentations.map(e=>e.router).filter(Boolean))),M}function _t(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`
1in e&&e.body!==void 0)}function vt(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Te(r||`.`,we(o),_e(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=_n(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=ve({basename:n,pathname:c.pathname})),C(c)}function yt(e,t,n){if(!n||!_t(n))return{path:t};if(n.formMethod&&!gn(n.formMethod))return{path:t,error:Z(405,{method:n.formMethod})};let r=()=>({path:t,error:Z(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=an(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!$(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!$(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}v(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Yt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Yt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Xt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Xt(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if($(c.formMethod))return{path:t,submission:c};let l=w(t);return e&&l.search&&_n(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:C(l),submission:c}}function bt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v){let y=_?Q(_[1])?_[1].error:_[1].data:void 0,b=i.createURL(a.location),x=i.createURL(c),S;if(u&&a.errors){let e=Object.keys(a.errors)[0];S=o.findIndex(t=>t.route.id===e)}else if(_&&Q(_[1])){let e=_[0];S=o.findIndex(t=>t.route.id===e)-1}let C=_?_[1].statusCode:void 0,w=C&&C>=400,T={currentUrl:b,currentParams:a.matches[0]?.params||{},nextUrl:x,nextParams:o[0].params,...s,actionResult:y,actionStatus:C},E=Fe(o),D=o.map((i,o)=>{let{route:s}=i,f=null;if(S!=null&&o>S)f=!1;else if(s.lazy)f=!0;else if(!xt(s))f=!1;else if(u){let{shouldLoad:e}=St(s,a.loaderData,a.errors);f=e}else Ct(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Rt(n,r,e,c,E,i,l,t,f);let p=!1;typeof v==`boolean`?p=v:w?p=!1:d||b.pathname+b.search===x.pathname+x.search?p=!0:b.search===x.search?wt(a.matches[o],i)&&(p=!0):p=!0;let m={...T,defaultShouldRevalidate:p};return Rt(n,r,e,c,E,i,l,t,Tt(i,m),m,v)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s)||e.isDiscovering)return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,_=g.match(e.path);if(!_){O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let y=vn(_,e.path),b=new AbortController,x=Jt(i,e.path,b.signal),S=null;if(f.has(s))f.delete(s),S=zt(n,r,x,e.path,_,y,l,t);else if(m)d&&(S=zt(n,r,x,e.path,_,y,l,t));else{let i;i=typeof v==`boolean`?v:!w&&d;let a={...T,defaultShouldRevalidate:i};Tt(y,a)&&(S=zt(n,r,x,e.path,_,y,l,t,a))}S&&O.push({key:s,routeId:e.routeId,path:e.path,matches:S,match:y,request:x,controller:b})}),{dsMatches:D,revalidatingFetchers:O}}function xt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function St(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!xt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Ct(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function wt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Tt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Et(e,t,n,r,i,a){let o;if(e){let t=r[e];v(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];
1if(t.forEach(e=>{let t=o.find(t=>Dt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=F(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=F([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Dt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Dt(e,t)))??!1}var Ot=new WeakMap,kt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(v(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ot.get(i);o||(o={},Ot.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=A(e),n=i[e]!==void 0;if(t)y(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)y(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},At=new WeakMap;function jt(e,t,n,r,i){let a=n[e.id];if(v(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=At.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{v(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=M(e),o=a[e]!==void 0;i?y(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?y(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return At.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=kt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Mt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Nt(e){return e.matches.some(e=>e.route.middleware)?Pt(e,()=>Mt(e)):Mt(e)}function Pt(e,t){return Ft(e,t,e=>{if(hn(e))throw e;return e},cn,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[tn(r,a).route.id]:{type:`error`,result:t}}}}}async function Ft(e,t,n,r,i){let{matches:a,...o}=e;return await It(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function It(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await It(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Lt(e,t,n,r,i){let a=kt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=jt(r.route,$(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Rt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Lt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Tt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Tt(a,{...l,defaultShouldRevalidate:e}):Tt(a,l):c}
1,resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!$(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&($(n.method)||!p)?Vt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function zt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Rt(e,t,n,r,Fe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Lt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Bt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Ie(t,n),pattern:Fe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Pt(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Vt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=$(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Ie(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw Z(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw Z(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Ht(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Ut(e){let{result:t,type:n}=e;if(pn(t)){let e;try{e=await Ht(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ne(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?fn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:sn(t),statusCode:Pe(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Pe(t)?t.status:void 0}:fn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Wt(e,t,n,r,i){let a=e.headers.get(`Location`);if(v(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!ye(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=vt(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Gt=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Kt(e){try{return Gt.includes(new URL(e).protocol)}catch{return!1}}function qt(e,t,n,r){if(ye(e)){let r=e,i=p.test(r)?new URL(m(r,t.protocol)):new URL(r);if(Kt(i.toString()))throw Error(`Invalid redirect location`);let a=_e(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Ee(i.pathname)+i.search+i.hash}try{if(Kt(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Jt(e,t,n,r){let i=e.createURL(an(t)).toString(),a={signal:n};if(r&&$(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Yt(r.formData):r.formData}
1return new Request(i,a)}function Yt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Xt(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Zt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Q(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(v(!dn(f),`Cannot handle redirect results in processLoaderData`),Q(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=tn(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=pt),c||(c=!0,s=Pe(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Qt(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Zt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(v(s,`Did not find corresponding fetcher result`),Q(s)){let t=tn(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(dn(s))v(!1,`Unhandled fetcher revalidation redirect`);else{let e=Tn(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function $t(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==pt).reduce((e,[t,n])=>(e[t]=n,e),{}),a=0;for(let o of n){let n=o.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&o.route.loader&&(i[n]=e[n],a++),r&&r.hasOwnProperty(n))break}return Object.keys(t).length===0&&a===Object.keys(e).length?e:i}function en(e){return e?Q(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function tn(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function nn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Z(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ne(e||500,o,Error(s),!0)}function rn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(dn(r))return{key:n,result:r}}}function an(e){return C({...typeof e==`string`?w(e):e,hash:``})}function on(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function sn(e){return new Ne(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function cn(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&ln(t))}function ln(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function un(e){return pn(e.result)&&st.has(e.result.status)}function Q(e){return e.type===`error`}function dn(e){return(e&&e.type)===`redirect`}function fn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function pn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function mn(e){return st.has(e)}function hn(e){return pn(e)&&mn(e.status)&&e.headers.has(`Location`)}function gn(e){return ot.has(e.toUpperCase())}function $(e){return it.has(e.toUpperCase())}function _n(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function vn(e,t){let n=typeof t==`string`?w(t).search:t.search;if(e[e.length-1].route.index&&_n(n||``))return e[e.length-1];let r=Ce(e);return r[r.length-1]}function yn(e,t,n){return{url:Ie(e.createURL(t),t),pattern:n?Fe(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function bn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function xn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Sn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Cn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function wn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Tn(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function En(e,t){try{let n=e.sessionStorage.getItem(ft);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Dn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ft,JSON.stringify(n))}catch(e){y(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function On(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var kn=D.createContext(null);kn.displayName=`DataRouter`;var An=D.createContext(null);An.displayName=`DataRouterState`;var jn=D.createContext(null);jn.displayName=`DataRouterData`;var Mn=D.createContext(null);Mn.displayName=`DataRouterNavigation`;var Nn=D.createContext(!1);function Pn(){return D.useContext(Nn)}var Fn=D.createContext({isTransitioning:!1});Fn.displayName=`ViewTransition`;var In=D.createContext(null);In.displayName=`Fetchers`;var Ln=D.createContext(null);Ln.displayName=`Await`;var Rn=D.createContext(null);Rn.displayName=`Navigation`;var zn=D.createContext(null);zn.displayName=`Location`;var Bn=D.createContext({outlet:null,matches:[],isDataRoute:!1});Bn.displayName=`Route`;var Vn=D.createContext(!1);Vn.displayName=`IsDataRoute`;var Hn=D.createContext(void 0);Hn.displayName=`RouteId`;var Un=D.createContext(null);Un.displayName=`RouteError`;
1var Wn=`REACT_ROUTER_ERROR`,Gn=`REDIRECT`,Kn=`ROUTE_ERROR_RESPONSE`;function qn(e){if(e.startsWith(`${Wn}:${Gn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Jn(e){if(e.startsWith(`${Wn}:${Kn}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ne(t.status,t.statusText,t.data)}catch{}}function Yn(e,{relative:t}={}){v(Xn(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=D.useContext(Rn),{hash:i,pathname:a,search:o}=ir(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:G([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Xn(){return D.useContext(zn)!=null}function Zn(){return v(Xn(),`useLocation() may be used only in the context of a <Router> component.`),D.useContext(zn).location}var Qn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function $n(){return D.useContext(Vn)?Tr():er()}function er(){v(Xn(),`useNavigate() may be used only in the context of a <Router> component.`);let e=D.useContext(kn),{basename:t,navigator:n}=D.useContext(Rn),{matches:r}=D.useContext(Bn),{pathname:i}=Zn(),a=JSON.stringify(we(r)),o=D.useRef(!1);return D.useLayoutEffect(()=>{o.current=!0}),D.useCallback((r,s={})=>{if(y(o.current,Qn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Te(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:G([t,c.pathname])),nt(typeof r==`string`?r:C(r),n.createHref(c),$e(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var tr=D.createContext(null);function nr(e){let t=D.useContext(Bn).outlet;return D.useMemo(()=>t&&D.createElement(tr.Provider,{value:e},t),[t,e])}function rr(){let{matches:e}=D.useContext(Bn);return e[e.length-1]?.params??{}}function ir(e,{relative:t}={}){let{matches:n}=D.useContext(Bn),{pathname:r}=Zn(),i=JSON.stringify(we(n));return D.useMemo(()=>Te(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ar(e,t,n){v(Xn(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=D.useContext(Rn),{matches:i}=D.useContext(Bn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=Zn(),l;if(t){let e=typeof t==`string`?w(t):t;v(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f;f=n?n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):n.router.match(n.state.location):L(e,{pathname:d});let p=fr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:G([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:G([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?D.createElement(zn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function or(){let e=wr(),t=Pe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return D.createElement(D.Fragment,null,D.createElement(`h2`,null,`Unexpected Application Error!`),D.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?D.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var sr=D.createElement(or,null),cr=class extends D.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Nn;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Jn(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:D.createElement(Bn.Provider,{value:this.props.routeContext}
1,D.createElement(Vn.Provider,{value:this.props.routeContext.isDataRoute},D.createElement(Hn.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},D.createElement(Un.Provider,{value:e,children:this.props.component}))));return this.context?D.createElement(ur,{error:e},t):t}},lr=new WeakMap;function ur({children:e,error:t}){let{basename:n,navigator:r}=D.useContext(Rn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=qn(t.digest);if(e){let i=lr.get(t);if(i)throw i;let a=Le(e.location,n),o=a.absoluteURL||a.to;if(nt(e.location,o,$e(r),`allow-explicit`),Kt(o))throw Error(`Invalid redirect location`);if(J&&!lr.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw lr.set(t,n),n}}return D.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function dr({routeContext:e,match:t,children:n}){let r=D.useContext(kn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),D.createElement(Bn.Provider,{value:e},D.createElement(Vn.Provider,{value:e.isDataRoute},D.createElement(Hn.Provider,{value:t.route.id},n)))}function fr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);v(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Fe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||sr,o&&(s<0&&c===0?(Dr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?D.createElement(n.route.Component,null):n.route.element?n.route.element:e,D.createElement(dr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?D.createElement(cr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function pr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function mr(e){let t=D.useContext(kn);return v(t,pr(e)),t}function hr(e){let t=D.useContext(An);return v(t,pr(e)),t}function gr(e){let t=D.useContext(jn);return v(t,pr(e)),t}function _r(e){let t=D.useContext(Mn);return v(t,pr(e)),t}function vr(e){let t=D.useContext(Hn);return v(t,`${e} can only be used on routes that contain a unique "id"`),t}function yr(){let{navigation:e}=_r(`useNavigation`);return D.useMemo(()=>{let{matches:t,historyAction:n,...r}=e;return r},[e])}function br(){let{matches:e}=hr(`useMatches`),{loaderData:t}=gr(`useMatches`);return D.useMemo(()=>e.map(e=>ee(e,t)),[e,t])}function xr(){let e=gr(`useLoaderData`),t=vr(`useLoaderData`);return e.loaderData[t]}function Sr(e){return gr(`useRouteLoaderData`).loaderData[e]}function Cr(){let e=gr(`useActionData`),t=vr(`useActionData`);return e.actionData?e.actionData[t]:void 0}function wr(){let e=D.useContext(Un),t=gr(`useRouteError`),n=vr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Tr(){let{router:e}=mr(`useNavigate`),t=vr(`useNavigate`),n=D.useRef(!1);return D.useLayoutEffect(()=>{n.current=!0}),D.useCallback(async(r,i={})=>{y(n.current,Qn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Er={};function Dr(e,t,n){!t&&!Er[e]&&(Er[e]=!0,y(!1,n))}var Or={};function kr(e,t){!e&&!Or[t]&&(Or[t]=!0,console.warn(t))}var Ar=[`HydrateFallback`,`hydrateFallbackElement`],jr=class{status=`pending`;promise;resolve;reject;
1constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Mr({router:e,flushSync:t,onError:n,useTransitions:r}){r=Pn()||r;let[i,a]=D.useState(e.state),[o,s]=(0,D.useOptimistic)(i),[c,l]=D.useState(),[u,d]=D.useState({isTransitioning:!1}),[f,p]=D.useState(),[m,h]=D.useState(),[g,_]=D.useState(),v=D.useRef(new Map),y=D.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:Fe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),kr(u===!1||t!=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 y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(kr(g==null||y,"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."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):D.startTransition(()=>{r===!0&&s(e=>Nr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);D.useLayoutEffect(()=>e.subscribe(y),[e,y]),D.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new jr)},[u]),D.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):D.startTransition(()=>{r===!0&&s(e=>Nr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),D.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),D.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=D.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=D.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]),C=D.useMemo(()=>({historyAction:o.historyAction,location:o.location,matches:o.matches,initialized:o.initialized,renderFallback:o.renderFallback,restoreScrollPosition:o.restoreScrollPosition,preventScrollReset:o.preventScrollReset,blockers:o.blockers}),[o.historyAction,o.location,o.matches,o.initialized,o.renderFallback,o.restoreScrollPosition,o.preventScrollReset,o.blockers]),w=D.useMemo(()=>({navigation:o.navigation,revalidation:o.revalidation}),[o.navigation,o.revalidation]),T=D.useMemo(()=>({loaderData:o.loaderData,actionData:o.actionData,errors:o.errors}),[o.loaderData,o.actionData,o.errors]),E=D.useMemo(()=>({fetchers:o.fetchers,fetcherData:v.current}),[o.fetchers]);return D.createElement(D.Fragment,null,D.createElement(kn.Provider,{value:S},D.createElement(An.Provider,{value:C},D.createElement(Mn.Provider,{value:w},D.createElement(jn.Provider,{value:T},D.createElement(In.Provider,{value:E},D.createElement(Fn.Provider,{value:u},D.createElement(Lr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},D.createElement(Pr,{routes:e.routes,manifest:e.manifest,state:o,isStatic:!1,onError:n})))))))),null)}function Nr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Pr=D.memo(Fr);function Fr({routes:e,manifest:t,state:n,isStatic:r,onError:i}){let a=D.useContext(kn);return v(a,`You must render this element inside a <DataRouterContext.Provider> element`),ar(e,void 0,{router:a.router,manifest:t,state:n,isStatic:r,onError:i})}function Ir(e){return nr(e.context)}function Lr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){v(!Xn(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=D.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=w(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=D.useMemo(()=>{let e=_e(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);
1return y(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:D.createElement(Rn.Provider,{value:c},D.createElement(zn.Provider,{children:t,value:h}))}D.Component;function Rr(){return{params:rr(),loaderData:xr(),actionData:Cr(),matches:br()}}function zr(e){return function(){let t=Rr();return D.createElement(e,t)}}function Br(){return{params:rr(),loaderData:xr(),actionData:Cr(),error:wr()}}function Vr(e){return function(){let t=Br();return D.createElement(e,t)}}var Hr=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ur=o(((e,t)=>{t.exports=Hr()}));export{Ne as A,q as B,Bn as C,gt as D,mt as E,pe as F,v as G,_e as H,Pe as I,d as J,y as K,G as L,W as M,K as N,fn as O,P,me as R,Rn as S,Pn as T,_ as U,Te as V,C as W,s as X,o as Y,l as Z,yr as _,Ar as a,Sr as b,kr as c,gr as d,hr as f,$n as g,br as h,Mr as i,Me as j,pn as k,vr as l,Zn as m,Ir as n,zr as o,Yn as p,f as q,Lr as r,Vr as s,Ur as t,mr as u,ir as v,Fn as w,Mn as x,wr as y,Le as z};

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.