git-truck 3.0.2 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/GitTruckInfo-Bu3InKk0.js +1 -0
- package/build/client/assets/RepoTabs-B_gVZfyQ.js +1 -0
- package/build/client/assets/browse-BVbfiHLu.js +1 -0
- package/build/client/assets/browse-DMoBg6Vh.js +9 -0
- package/build/client/assets/chunk-JPUPSTYD-YBbsfvLw.js +1 -0
- package/build/client/assets/clear-cache-CAdofhUa.js +1 -0
- package/build/client/assets/clear-cache-Ciosxv25.js +1 -0
- package/build/client/assets/{compare-Br3z3FUS-OODPzXmX.js → compare-Br3z3FUS-Bm1os1Jk.js} +1 -1
- package/build/client/assets/{entry.client-NklqTk8N.js → entry.client-lU2GATMj.js} +2 -2
- package/build/client/assets/jsx-runtime-s_YwNCZb.js +26 -0
- package/build/client/assets/manifest-bbde1677.js +1 -0
- package/build/client/assets/{react-dom-_FKEaPb7.js → react-dom-BkDQo3BN.js} +1 -1
- package/build/client/assets/{root-Djh_4EO9.js → root-CMX9SEB-.js} +2 -2
- package/build/client/assets/root-DEstG3hL.css +1 -0
- package/build/client/assets/ui-C21Ckl3a.js +1 -0
- package/build/client/assets/view-JlAiRFiK.js +1 -0
- package/build/client/assets/view._index-jmCCN9mA.js +1 -0
- package/build/client/assets/view.commits-CIgkE9N1.js +1 -0
- package/build/client/assets/view.details-DAXK445Q.js +1 -0
- package/build/server/assets/{server-build-D47uxE8F.js → server-build-BqWgrywa.js} +1307 -1356
- package/build/server/index.js +1 -1
- package/cli.mjs +2 -3
- package/package.json +2 -2
- package/build/client/assets/FullscreenButton-CFqdBqf-.js +0 -1
- package/build/client/assets/GitTruckInfo-C1VOiqSW.js +0 -1
- package/build/client/assets/RepoTabs-xQ7LCUn1.js +0 -1
- package/build/client/assets/UnionAuthorsModal-D-H775E5.js +0 -1
- package/build/client/assets/browse-CPxPbHtx.js +0 -1
- package/build/client/assets/browse-CuAoODR1.js +0 -9
- package/build/client/assets/chunk-JPUPSTYD-XO4UPun8.js +0 -1
- package/build/client/assets/chunk-LFPYN7LY-CPTP6242.js +0 -26
- package/build/client/assets/clear-cache-82hexQD7.js +0 -1
- package/build/client/assets/clear-cache-CrL0weu5.js +0 -1
- package/build/client/assets/jsx-runtime-BVRj4wYA.js +0 -1
- package/build/client/assets/manifest-b5d81016.js +0 -1
- package/build/client/assets/root-qwQAVU-u.css +0 -1
- package/build/client/assets/styling-B8OEge8x.js +0 -1
- package/build/client/assets/ui-nIuMvo3S.js +0 -1
- package/build/client/assets/util-1G1Ez1rt.js +0 -1
- package/build/client/assets/view-ESMBoxIY.js +0 -1
- package/build/client/assets/view._index-CjsEuBV6.js +0 -1
- package/build/client/assets/view.commits-DP_ltd6_.js +0 -1
- package/build/client/assets/view.details-C6kuGyhb.js +0 -1
- package/build/client/assets/view.merge-authors-VwPHWL-d.js +0 -1
- /package/build/client/assets/{_-RagYKtT_.js → _-CT17qCl3.js} +0 -0
- /package/build/client/assets/{_._well-known._-DIwl00oI.js → _._well-known._-8QUD84tm.js} +0 -0
- /package/build/client/assets/{_index-J0jvF8An.js → _index-VLoUE117.js} +0 -0
- /package/build/client/assets/{_path-bRAhzWvL.js → _path-DzSNgPJP.js} +0 -0
- /package/build/client/assets/{commitcount-eFguKtSp.js → commitcount-B_3CeIvr.js} +0 -0
- /package/build/client/assets/{commits-DPfZp-l3.js → commits-DDIAHyHU.js} +0 -0
- /package/build/client/assets/{view.progress-B7Os3EHt.js → view.progress-CEmcNaLe.js} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var 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),t.exports),s=(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},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 M(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,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(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 te(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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)},ne={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),u=o(((e,t)=>{t.exports=l()})),d=`modulepreload`,f=function(e){return`/`+e},p={};const m=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=f(t,n),t in p)return;p[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:d,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};var h=c(u(),1),g=e=>{throw TypeError(e)},_=(e,t,n)=>t.has(e)||g(`Cannot `+n),v=(e,t,n)=>(_(e,t,`read from private field`),n?n.call(e):t.get(e)),y=(e,t,n)=>t.has(e)?g(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),b=`popstate`;function x(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function S(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return D(``,{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:O(t)}return A(t,n,null,e)}function C(e,t){if(e===!1||e==null)throw Error(t)}function w(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function T(){return Math.random().toString(36).substring(2,10)}function E(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function D(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?k(t):t,state:n,key:t&&t.key||r||T(),unstable_mask:i}}function O({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 k(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 A(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:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=x(e)?e:D(h.location,e,t);n&&n(r,e),l=u()+1;let d=E(r,l),f=h.createHref(r.unstable_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:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=x(e)?e:D(h.location,e,t);n&&n(r,e),l=u();let i=E(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ee(e)}let h={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(b,d),c=e,()=>{i.removeEventListener(b,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 h}function ee(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),C(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:O(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function j(e){return{defaultValue:e}}var M,te=class{constructor(e){if(y(this,M,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(v(this,M).has(e))return v(this,M).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){v(this,M).set(e,t)}};M=new WeakMap;var N=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function P(e){return N.has(e)}var ne=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function re(e){return ne.has(e)}function ie(e){return e.index===!0}function F(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(C(e.index!==!0||!e.children,`Cannot specify children on an index route`),C(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ie(e)){let n={...e,id:s};return r[s]=ae(n,t(n)),n}else{let n={...e,id:s,children:void 0};return r[s]=ae(n,t(n)),e.children&&(n.children=F(e.children,t,o,r,i)),n}})}function ae(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function I(e,t,n=`/`){return oe(e,t,n,!1)}function oe(e,t,n,r){let i=V((typeof t==`string`?k(t):t).pathname||`/`,n);if(i==null)return null;let a=L(e);le(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ye(i);o=_e(a[e],t,r)}return o}function se(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function L(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;C(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=H([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(C(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),L(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:he(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ce(e.path))a(e,t,!0,n)}),t}function ce(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=ce(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 le(e){e.sort((e,t)=>e.score===t.score?ge(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ue=/^:[\w-]+$/,R=3,de=2,fe=1,z=10,pe=-2,me=e=>e===`*`;function he(e,t){let n=e.split(`/`),r=n.length;return n.some(me)&&(r+=pe),t&&(r+=de),n.filter(e=>!me(e)).reduce((e,t)=>e+(ue.test(t)?R:t===``?fe:z),r)}function ge(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 _e(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=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ve({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:H([a,u.pathname]),pathnameBase:ke(H([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=H([a,u.pathnameBase]))}return o}function ve(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=B(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function B(e,t=!1,n=!0){w(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)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ye(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return w(!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 V(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 be({basename:e,pathname:t}){return t===`/`?e:H([e,t])}var xe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Se=e=>xe.test(e);function Ce(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?k(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?we(n.substring(1),`/`):we(n,t)):a=t,{pathname:a,search:Ae(r),hash:je(i)}}function we(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Te(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 Ee(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function De(e){let t=Ee(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Oe(e,t,n,r=!1){let i;typeof e==`string`?i=k(e):(i={...e},C(!i.pathname||!i.pathname.includes(`?`),Te(`?`,`pathname`,`search`,i)),C(!i.pathname||!i.pathname.includes(`#`),Te(`#`,`pathname`,`hash`,i)),C(!i.search||!i.search.includes(`#`),Te(`#`,`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=Ce(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var H=e=>e.join(`/`).replace(/\/\/+/g,`/`),ke=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),Ae=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,je=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Me=class{constructor(e,t){this.type=`DataWithResponseInit`,this.data=e,this.init=t||null}};function Ne(e,t){return new Me(e,typeof t==`number`?{status:t}:t)}var U=(e,t=302)=>{let n=t;typeof 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})},W=class{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 e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var Ie=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Le(e,t){let n=e;if(typeof n!=`string`||!xe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ie)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=V(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{w(!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`);function ze(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){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=G(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=G(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[Re]??i,a=G(n[e],t,(...e)=>He(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[Re]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[Re]??e,r=G(n.middleware,t,(...e)=>He(e[0]));return r?(r[Re]=t,r):e})),r}function Be(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[Re]??e.navigate,r=G(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?O(n):`.`,...Ue(e,r??{})}});r&&(r[Re]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[Re]??e.fetch,r=G(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Ue(e,i??{})}});r&&(r[Re]=t,e.fetch=r)}return e}function G(e,t,n){return e.length===0?null:async(...r)=>{let i=await Ve(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function Ve(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=Ve(e,t,n,r-1),a=await o,C(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function He(e){let{request:t,context:n,params:r,unstable_pattern:i}=e;return{request:We(t),params:{...r},unstable_pattern:i,context:Ge(n)}}function Ue(e,t){return{currentUrl:O(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 We(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ge(e){if(qe(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Ke=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function qe(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===Ke}var Je=[`POST`,`PUT`,`PATCH`,`DELETE`],Ye=new Set(Je),Xe=[`GET`,...Je],Ze=new Set(Xe),Qe=new Set([301,302,303,307,308]),$e=new Set([307,308]),et={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},rt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),it=`remix-router-transitions`,at=Symbol(`ResetLoaderData`);function ot(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;C(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||rt,a=i;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;a=e=>({...i(e),...ze(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=F(e.routes,a,void 0,o),c,l=e.basename||`/`;l.startsWith(`/`)||(l=`/${l}`);let u=e.dataStrategy||Ct,d={...e.future},f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=I(s,e.history.location,l),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=K(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Wt(s);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&it(v,s,e.history.location.pathname).active&&(v=null),v)if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>dt(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=r.every(e=>{let r=ft(e.route,t,n);return S||=r.renderFallback,!r.shouldLoad})}else{x=!1,S=!x,v=[];let t=it(null,s,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}let T,E={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:et,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},O=`POP`,A=null,j=!1,M,N=!1,P=new Map,ne=null,re=!1,ie=!1,ae=new Set,L=new Map,ce=0,le=-1,ue=new Map,R=new Set,de=new Map,fe=new Map,z=new Set,pe=new Map,me,he=null;function ge(){if(f=e.history.listen(({action:t,location:n,delta:r})=>{if(me){me(),me=void 0;return}w(pe.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=qe({currentLocation:E.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{me=e});e.history.go(r*-1),Ke(i,{state:`blocked`,location:n,proceed(){Ke(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(E.blockers);e.set(i,nt),B({blockers:e})}}),A?.resolve(),A=null;return}return Ce(t,n)}),n){fn(t,P);let e=()=>pn(t,P);t.addEventListener(`pagehide`,e),ne=()=>t.removeEventListener(`pagehide`,e)}return E.initialized||Ce(`POP`,E.location,{initialHydration:!0}),T}function _e(){f&&f(),ne&&ne(),p.clear(),M&&M.abort(),E.fetchers.forEach((e,t)=>Le(t)),E.blockers.forEach((e,t)=>Ge(t))}function ve(e){return p.add(e),()=>p.delete(e)}function B(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),E={...E,...e};let n=[],r=[];E.fetchers.forEach((e,t)=>{e.state===`idle`&&(z.has(t)?n.push(t):r.push(t))}),z.forEach(e=>{!E.fetchers.has(e)&&!L.has(e)&&n.push(e)}),[...p].forEach(r=>r(E,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Le(e)),r.forEach(e=>E.fetchers.delete(e))}function ye(t,n,{flushSync:r}={}){let i=E.actionData!=null&&E.navigation.formMethod!=null&&J(E.navigation.formMethod)&&E.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?E.actionData:null;let o=n.loaderData?Vt(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData,l=E.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,nt)));let u=re?!1:Qe(t,n.matches||E.matches),d=j===!0||E.navigation.formMethod!=null&&J(E.navigation.formMethod)&&t.state?._isRedirect!==!0;c&&=(s=c,void 0),re||O===`POP`||(O===`PUSH`?e.history.push(t,t.state):O===`REPLACE`&&e.history.replace(t,t.state));let f;if(O===`POP`){let e=P.get(E.location.pathname);e&&e.has(t.pathname)?f={currentLocation:E.location,nextLocation:t}:P.has(t.pathname)&&(f={currentLocation:t,nextLocation:E.location})}else if(N){let e=P.get(E.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),P.set(E.location.pathname,e)),f={currentLocation:E.location,nextLocation:t}}B({...n,actionData:a,loaderData:o,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:et,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),O=`POP`,j=!1,N=!1,re=!1,ie=!1,A?.resolve(),A=null,he?.resolve(),he=null}async function be(t,n){if(A?.resolve(),A=null,typeof t==`number`){A||=mn();let n=A.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=lt(!1,ct(E.location,E.matches,l,t,n?.fromRouteId,n?.relative),n),o;n?.unstable_mask&&(o={pathname:``,search:``,hash:``,...typeof n.unstable_mask==`string`?k(n.unstable_mask):{...E.location.unstable_mask,...n.unstable_mask}});let s=E.location,c=D(s,r,n&&n.state,void 0,o);c={...c,...e.history.encodeLocation(c)};let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&J(i.formMethod)&&i.formAction===E.location.pathname+E.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=qe({currentLocation:s,nextLocation:c,historyAction:d});if(m){Ke(m,{state:`blocked`,location:c,proceed(){Ke(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:c}),be(t,n)},reset(){let e=new Map(E.blockers);e.set(m,nt),B({blockers:e})}});return}await Ce(d,c,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})}function xe(){he||=mn(),Ne(),B({revalidation:`loading`});let e=he.promise;return E.navigation.state===`submitting`?e:E.navigation.state===`idle`?(Ce(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),e):(Ce(O||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:N===!0}),e)}async function Ce(t,n,r){M&&M.abort(),M=null,O=t,re=(r&&r.startUninterruptedRevalidation)===!0,Ze(E.location,E.matches),j=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=c||s,a=r&&r.overrideNavigation,o=r?.initialHydration&&E.matches&&E.matches.length>0&&!y?E.matches:I(i,n,l),u=(r&&r.flushSync)===!0;if(o&&E.initialized&&!ie&&qt(E.location,n)&&!(r&&r.submission&&J(r.submission.formMethod))){ye(n,{matches:o},{flushSync:u});return}let d=it(o,i,n.pathname);if(d.active&&d.matches&&(o=d.matches),!o){let{error:e,notFoundMatches:t,route:r}=Je(n.pathname);ye(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}M=new AbortController;let f=It(e.history,n,M.signal,r&&r.submission),p=e.getContext?await e.getContext():new te,m;if(r&&r.pendingError)m=[Ut(o).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&J(r.submission.formMethod)){let t=await we(f,n,r.submission,o,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(q(r)&&Pe(r.error)&&r.error.status===404){M=null,ye(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}o=t.matches||o,m=t.pendingActionResult,a=cn(n,r.submission),u=!1,d.active=!1,f=It(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await Te(f,n,o,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m,r&&r.callSiteDefaultShouldRevalidate);h||(M=null,ye(n,{matches:g||o,...Ht(m),loaderData:_,errors:v}))}async function we(t,n,i,c,u,d,f,p={}){if(Ne(),B({navigation:ln(n,i)},{flushSync:p.flushSync===!0}),d){let e=await at(c,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}=Wt(s);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Ut(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}else if(e.matches)c=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Je(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let m,h=on(c,n);if(!h.route.action&&!h.route.lazy)m={type:`error`,error:K(405,{method:t.method,pathname:n.pathname,routeId:h.route.id})};else{let e=await je(t,kt(a,o,t,c,h,f?[]:r,u),u,null);if(m=e[h.route.id],!m){for(let t of c)if(e[t.route.id]){m=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Qt(m)){let n;return n=p&&p.replace!=null?p.replace:Ft(m.response.headers.get(`Location`),new URL(t.url),l,e.history)===E.location.pathname+E.location.search,await Ae(t,m,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(q(m)){let e=Ut(c,h.route.id);return(p&&p.replace)!==!0&&(O=`PUSH`),{matches:c,pendingActionResult:[e.route.id,m,h.route.id]}}return{matches:c,pendingActionResult:[h.route.id,m]}}async function Te(t,n,i,u,d,f,p,m,h,g,_,v,y){let b=f||cn(n,p),x=p||m||sn(b),S=!re&&!g;if(d){if(S){let e=Ee(v);B({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await at(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}=Wt(s);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Ut(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Je(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=c||s,{dsMatches:w,revalidatingFetchers:T}=ut(t,u,a,o,e.history,E,i,x,n,g?[]:r,g===!0,ie,ae,z,de,R,C,l,e.patchRoutesOnNavigation!=null,v,y);if(le=++ce,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=He();return ye(n,{matches:i,loaderData:{},errors:v&&q(v[1])?{[v[0]]:v[1].error}:null,...Ht(v),...e?{fetchers:new Map(E.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Ee(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=De(T)),B(e,{flushSync:_})}T.forEach(e=>{G(e.key),e.controller&&L.set(e.key,e.controller)});let D=()=>T.forEach(e=>G(e.key));M&&M.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Me(w,T,t,u);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,D),T.forEach(e=>L.delete(e.key));let A=Gt(O);if(A)return await Ae(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=Gt(k),A)return R.add(A.key),await Ae(t,A.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:ee,errors:j}=Bt(E,i,O,v,T,k);g&&E.errors&&(j={...E.errors,...j});let te=He(),N=Ue(le),P=te||N||T.length>0;return{matches:i,loaderData:ee,errors:j,...P?{fetchers:new Map(E.fetchers)}:{}}}function Ee(e){if(e&&!q(e[1]))return{[e[0]]:e[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function De(e){return e.forEach(e=>{let t=E.fetchers.get(e.key),n=un(void 0,t?t.data:void 0);E.fetchers.set(e.key,n)}),new Map(E.fetchers)}async function Oe(t,n,r,i){G(t);let a=(i&&i.flushSync)===!0,o=c||s,u=ct(E.location,E.matches,l,r,n,i?.relative),d=I(o,u,l),f=it(d,o,u);if(f.active&&f.matches&&(d=f.matches),!d){W(t,n,K(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=lt(!0,u,i);if(h){W(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new te,_=(i&&i.preventScrollReset)===!0;if(m&&J(m.formMethod)){await H(t,n,p,d,g,f.active,a,_,m,i&&i.unstable_defaultShouldRevalidate);return}de.set(t,{routeId:n,path:p}),await ke(t,n,p,d,g,f.active,a,_,m)}async function H(t,n,i,u,d,f,p,m,h,g){Ne(),de.delete(t),U(t,dn(h,E.fetchers.get(t)),{flushSync:p});let _=new AbortController,v=It(e.history,i,_.signal,h);if(f){let e=await at(u,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){W(t,n,e.error,{flushSync:p});return}else if(e.matches)u=e.matches;else{W(t,n,K(404,{pathname:i}),{flushSync:p});return}}let y=on(u,i);if(!y.route.action&&!y.route.lazy){W(t,n,K(405,{method:h.formMethod,pathname:i,routeId:n}),{flushSync:p});return}L.set(t,_);let b=ce,x=kt(a,o,v,u,y,r,d),S=await je(v,x,d,t),w=S[y.route.id];if(!w){for(let e of x)if(S[e.route.id]){w=S[e.route.id];break}}if(v.signal.aborted){L.get(t)===_&&L.delete(t);return}if(z.has(t)){if(Qt(w)||q(w)){U(t,Y(void 0));return}}else{if(Qt(w))if(L.delete(t),le>b){U(t,Y(void 0));return}else return R.add(t),U(t,un(h)),Ae(v,w,!1,{fetcherSubmission:h,preventScrollReset:m});if(q(w)){W(t,n,w.error);return}}let T=E.navigation.location||E.location,D=It(e.history,T,_.signal),k=c||s,A=E.navigation.state===`idle`?E.matches:I(k,E.navigation.location,l);C(A,`Didn't find any matches after fetcher action`);let ee=++ce;ue.set(t,ee);let j=un(h,w.data);E.fetchers.set(t,j);let{dsMatches:te,revalidatingFetchers:N}=ut(D,d,a,o,e.history,E,A,h,T,r,!1,ie,ae,z,de,R,k,l,e.patchRoutesOnNavigation!=null,[y.route.id,w],g);N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=E.fetchers.get(t),r=un(void 0,n?n.data:void 0);E.fetchers.set(t,r),G(t),e.controller&&L.set(t,e.controller)}),B({fetchers:new Map(E.fetchers)});let P=()=>N.forEach(e=>G(e.key));_.signal.addEventListener(`abort`,P);let{loaderResults:ne,fetcherResults:re}=await Me(te,N,D,d);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,P),ue.delete(t),L.delete(t),N.forEach(e=>L.delete(e.key)),E.fetchers.has(t)){let e=Y(w.data);E.fetchers.set(t,e)}let F=Gt(ne);if(F)return Ae(D,F.result,!1,{preventScrollReset:m});if(F=Gt(re),F)return R.add(F.key),Ae(D,F.result,!1,{preventScrollReset:m});let{loaderData:oe,errors:se}=Bt(E,A,ne,void 0,N,re);Ue(ee),E.navigation.state===`loading`&&ee>le?(C(O,`Expected pending action`),M&&M.abort(),ye(E.navigation.location,{matches:A,loaderData:oe,errors:se,fetchers:new Map(E.fetchers)})):(B({errors:se,loaderData:Vt(E.loaderData,oe,A,se),fetchers:new Map(E.fetchers)}),ie=!1)}async function ke(t,n,i,s,c,l,u,d,f){let p=E.fetchers.get(t);U(t,un(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=It(e.history,i,m.signal);if(l){let e=await at(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){W(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{W(t,n,K(404,{pathname:i}),{flushSync:u});return}}let g=on(s,i);L.set(t,m);let _=ce,v=(await je(h,kt(a,o,h,s,g,r,c),c,t))[g.route.id];if(L.get(t)===m&&L.delete(t),!h.signal.aborted){if(z.has(t)){U(t,Y(void 0));return}if(Qt(v))if(le>_){U(t,Y(void 0));return}else{R.add(t),await Ae(h,v,!1,{preventScrollReset:d});return}if(q(v)){W(t,n,v.error);return}U(t,Y(v.data))}}async function Ae(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:c,replace:u}={}){a||(A?.resolve(),A=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=i.response.headers.get(`Location`);C(d,`Expected a Location header on the redirect Response`),d=Ft(d,new URL(r.url),l,e.history);let f=D(E.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Se(d)){let n=ee(d,!0);e=n.origin!==t.location.origin||V(n.pathname,l)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}M=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=E.navigation;!o&&!s&&m&&h&&g&&(o=sn(E.navigation));let _=o||s;$e.has(i.response.status)&&_&&J(_.formMethod)?await Ce(p,f,{submission:{..._,formAction:d},preventScrollReset:c||j,enableViewTransition:a?N:void 0}):await Ce(p,f,{overrideNavigation:cn(f,o),fetcherSubmission:s,preventScrollReset:c||j,enableViewTransition:a?N:void 0})}async function je(e,t,n,r){let i,a={};try{i=await At(u,e,t,r,n,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{a[t.route.id]={type:`error`,error:e}}),a}if(e.signal.aborted)return a;if(!J(e.method))for(let e of t){if(i[e.route.id]?.type===`error`)break;!i.hasOwnProperty(e.route.id)&&!E.loaderData.hasOwnProperty(e.route.id)&&(!E.errors||!E.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(i[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[n,r]of Object.entries(i))if(Zt(r)){let i=r.result;a[n]={type:`redirect`,response:Pt(i,e,n,t,l)}}else a[n]=await Nt(r);return a}async function Me(e,t,n,r){let i=je(n,e,r,null),a=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await je(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:K(404,{pathname:e.path})}})}));return{loaderResults:await i,fetcherResults:(await a).reduce((e,t)=>Object.assign(e,t),{})}}function Ne(){ie=!0,de.forEach((e,t)=>{L.has(t)&&ae.add(t),G(t)})}function U(e,t,n={}){E.fetchers.set(e,t),B({fetchers:new Map(E.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function W(e,t,n,r={}){let i=Ut(E.matches,t);Le(e),B({errors:{[i.route.id]:n},fetchers:new Map(E.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Fe(e){return fe.set(e,(fe.get(e)||0)+1),z.has(e)&&z.delete(e),E.fetchers.get(e)||tt}function Ie(e,t){G(e,t?.reason),U(e,Y(null))}function Le(e){let t=E.fetchers.get(e);L.has(e)&&!(t&&t.state===`loading`&&ue.has(e))&&G(e),de.delete(e),ue.delete(e),R.delete(e),z.delete(e),ae.delete(e),E.fetchers.delete(e)}function Re(e){let t=(fe.get(e)||0)-1;t<=0?(fe.delete(e),z.add(e)):fe.set(e,t),B({fetchers:new Map(E.fetchers)})}function G(e,t){let n=L.get(e);n&&(n.abort(t),L.delete(e))}function Ve(e){for(let t of e){let e=Y(Fe(t).data);E.fetchers.set(t,e)}}function He(){let e=[],t=!1;for(let n of R){let r=E.fetchers.get(n);C(r,`Expected fetcher: ${n}`),r.state===`loading`&&(R.delete(n),e.push(n),t=!0)}return Ve(e),t}function Ue(e){let t=[];for(let[n,r]of ue)if(r<e){let e=E.fetchers.get(n);C(e,`Expected fetcher: ${n}`),e.state===`loading`&&(G(n),ue.delete(n),t.push(n))}return Ve(t),t.length>0}function We(e,t){let n=E.blockers.get(e)||nt;return pe.get(e)!==t&&pe.set(e,t),n}function Ge(e){E.blockers.delete(e),pe.delete(e)}function Ke(e,t){let n=E.blockers.get(e)||nt;C(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(E.blockers);r.set(e,t),B({blockers:r})}function qe({currentLocation:e,nextLocation:t,historyAction:n}){if(pe.size===0)return;pe.size>1&&w(!1,`A router only supports one blocker at a time`);let r=Array.from(pe.entries()),[i,a]=r[r.length-1],o=E.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Je(e){let t=K(404,{pathname:e}),{matches:n,route:r}=Wt(c||s);return{notFoundMatches:n,route:r,error:t}}function Ye(e,t,n){if(m=e,g=t,h=n||null,!_&&E.navigation===et){_=!0;let e=Qe(E.location,E.matches);e!=null&&B({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Xe(e,t){return h&&h(e,t.map(e=>se(e,E.loaderData)))||e.key}function Ze(e,t){if(m&&g){let n=Xe(e,t);m[n]=g()}}function Qe(e,t){if(m){let n=Xe(e,t),r=m[n];if(typeof r==`number`)return r}return null}function it(t,n,r){if(e.patchRoutesOnNavigation)if(t){if(Object.keys(t[0].params).length>0)return{active:!0,matches:oe(n,r,l,!0)}}else return{active:!0,matches:oe(n,r,l,!0)||[]};return{active:!1,matches:null}}async function at(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=c==null,d=c||s,f=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:i,patch:(e,t)=>{r.aborted||gt(e,t,d,f,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(s=[...s])}if(r.aborted)return{type:`aborted`};let p=I(d,n,l),m=null;if(p&&(Object.keys(p[0].params).length===0||(m=oe(d,n,l,!0),!(m&&u.length<m.length&&ot(u,m.slice(0,u.length))))))return{type:`success`,matches:p};if(m||=oe(d,n,l,!0),!m||ot(u,m))return{type:`success`,matches:null};u=m}}function ot(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function st(e){o={},c=F(e,a,void 0,o)}function pt(e,t,n=!1){let r=c==null;gt(e,t,c||s,o,a,n),r&&(s=[...s],B({}))}return T={get basename(){return l},get future(){return d},get state(){return E},get routes(){return s},get window(){return t},initialize:ge,subscribe:ve,enableScrollRestoration:Ye,navigate:be,fetch:Oe,revalidate:xe,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Fe,resetFetcher:Ie,deleteFetcher:Re,dispose:_e,getBlocker:We,deleteBlocker:Ge,patchRoutes:pt,_internalFetchControllers:L,_internalSetRoutes:st,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){B(e)}},e.unstable_instrumentations&&(T=Be(T,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),T}function st(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function ct(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=Oe(r||`.`,De(o),V(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=an(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=be({basename:n,pathname:c.pathname})),O(c)}function lt(e,t,n){if(!n||!st(n))return{path:t};if(n.formMethod&&!rn(n.formMethod))return{path:t,error:K(405,{method:n.formMethod})};let r=()=>({path:t,error:K(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Kt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!J(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}
|
|
2
|
+
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!J(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()}}}C(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Lt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Lt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Rt(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Rt(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(J(c.formMethod))return{path:t,submission:c};let l=k(t);return e&&l.search&&an(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:O(l),submission:c}}function ut(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b){let x=y?q(y[1])?y[1].error:y[1].data:void 0,S=i.createURL(a.location),C=i.createURL(c),w;if(u&&a.errors){let e=Object.keys(a.errors)[0];w=o.findIndex(t=>t.route.id===e)}else if(y&&q(y[1])){let e=y[0];w=o.findIndex(t=>t.route.id===e)-1}let T=y?y[1].statusCode:void 0,E=T&&T>=400,D={currentUrl:S,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:o[0].params,...s,actionResult:x,actionStatus:T},O=Fe(o),k=o.map((i,o)=>{let{route:s}=i,c=null;if(w!=null&&o>w)c=!1;else if(s.lazy)c=!0;else if(!dt(s))c=!1;else if(u){let{shouldLoad:e}=ft(s,a.loaderData,a.errors);c=e}else pt(a.loaderData,a.matches[o],i)&&(c=!0);if(c!==null)return Ot(n,r,e,O,i,l,t,c);let f=!1;typeof b==`boolean`?f=b:E?f=!1:d||S.pathname+S.search===C.pathname+C.search?f=!0:S.search===C.search?mt(a.matches[o],i)&&(f=!0):f=!0;let p={...D,defaultShouldRevalidate:f};return Ot(n,r,e,O,i,l,t,ht(i,p),p,b)}),A=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=I(g,e.path,_);if(!y){if(v&&m)return;A.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let x=on(y,e.path),S=new AbortController,C=It(i,e.path,S.signal),w=null;if(f.has(s))f.delete(s),w=kt(n,r,C,y,x,l,t);else if(m)d&&(w=kt(n,r,C,y,x,l,t));else{let e;e=typeof b==`boolean`?b:E?!1:d;let i={...D,defaultShouldRevalidate:e};ht(x,i)&&(w=kt(n,r,C,y,x,l,t,i))}w&&A.push({key:s,routeId:e.routeId,path:e.path,matches:w,match:x,request:C,controller:S})}),{dsMatches:k,revalidatingFetchers:A}}function dt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function ft(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!dt(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 pt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function mt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function ht(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function gt(e,t,n,r,i,a){let o;if(e){let t=r[e];C(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>_t(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})}}function _t(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?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>_t(e,t)))??!1:!1}var vt=new WeakMap,yt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(C(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=vt.get(i);o||(o={},vt.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=P(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)w(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)w(!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},bt=new WeakMap;function xt(e,t,n,r,i){let a=n[e.id];if(C(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=bt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{C(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=re(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?w(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?w(!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 bt.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=yt({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 St(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 Ct(e){return e.matches.some(e=>e.route.middleware)?wt(e,()=>St(e)):St(e)}function wt(e,t){return Tt(e,t,e=>{if(nn(e))throw e;return e},Yt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Ut(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Tt(e,t,n,r,i){let{matches:a,request:o,params:s,context:c,unstable_pattern:l}=e,u=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await Et({request:o,params:s,context:c,unstable_pattern:l},u,t,n,r,i)}async function Et(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 Et(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 Dt(e,t,n,r,i){let a=yt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=xt(r.route,J(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Ot(e,t,n,r,i,a,o,s,c=null,l){let u=!1,d=Dt(e,t,n,i,a);return{...i,_lazyPromises:d,shouldLoad:s,shouldRevalidateArgs:c,shouldCallHandler(e){return u=!0,c?typeof l==`boolean`?ht(i,{...c,defaultShouldRevalidate:l}):typeof e==`boolean`?ht(i,{...c,defaultShouldRevalidate:e}):ht(i,c):s},resolve(e){let{lazy:t,loader:a,middleware:c}=i.route,l=u||s||e&&!J(n.method)&&(t||a),f=c&&c.length>0&&!a&&!t;return l&&(J(n.method)||!f)?jt({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:e,scopedContext:o}):Promise.resolve({type:`data`,result:void 0})}}}function kt(e,t,n,r,i,a,o,s=null){return r.map(c=>c.route.id===i.route.id?Ot(e,t,n,Fe(r),c,a,o,!0,s):{...c,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Dt(e,t,n,c,a),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function At(e,t,n,r,i,a){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let o={request:t,unstable_pattern:Fe(n),params:n[0].params,context:i,matches:n},s=a?()=>{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=o;return wt(t,()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...o,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return c}async function jt({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:r,lazyRoutePromise:i,handlerOverride:a,scopedContext:o}){let s,c,l=J(e.method),u=l?`action`:`loader`,d=r=>{let i,s=new Promise((e,t)=>i=t);c=()=>i(),e.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:e,unstable_pattern:t,params:n.params,context:o},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)),d=(async()=>{try{return{type:`data`,result:await(a?a(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([d,s])};try{let t=l?n.route.action:n.route.loader;if(r||i)if(t){let e,[n]=await Promise.all([d(t).catch(t=>{e=t}),r,i]);if(e!==void 0)throw e;s=n}else{await r;let t=l?n.route.action:n.route.loader;if(t)[s]=await Promise.all([d(t),i]);else if(u===`action`){let t=new URL(e.url),r=t.pathname+t.search;throw K(405,{method:e.method,pathname:r,routeId:n.route.id})}else return{type:`data`,result:void 0}}else if(t)s=await d(t);else{let t=new URL(e.url);throw K(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{c&&e.signal.removeEventListener(`abort`,c)}return s}async function Mt(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 Nt(e){let{result:t,type:n}=e;if(en(t)){let e;try{e=await Mt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new W(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?$t(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:Jt(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}:$t(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 Pt(e,t,n,r,i){let a=e.headers.get(`Location`);if(C(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Se(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=ct(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}function Ft(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(Se(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=V(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function It(e,t,n,r){let i=e.createURL(Kt(t)).toString(),a={signal:n};if(r&&J(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)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=Lt(r.formData):a.body=r.formData}return new Request(i,a)}function Lt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Rt(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(C(!Qt(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=Ut(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=at),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 Bt(e,t,n,r,i,a){let{loaderData:o,errors:s}=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 o=a[n];if(C(o,`Did not find corresponding fetcher result`),q(o)){let t=Ut(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(Qt(o))C(!1,`Unhandled fetcher revalidation redirect`);else{let t=Y(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function Vt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==at).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Ht(e){return e?q(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ut(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Wt(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 K(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 W(e||500,o,Error(s),!0)}function Gt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Qt(r))return{key:n,result:r}}}function Kt(e){return O({...typeof e==`string`?k(e):e,hash:``})}function qt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function Jt(e){return new W(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Yt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Xt(t))}function Xt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Zt(e){return en(e.result)&&Qe.has(e.result.status)}function q(e){return e.type===`error`}function Qt(e){return(e&&e.type)===`redirect`}function $t(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function en(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function tn(e){return Qe.has(e)}function nn(e){return en(e)&&tn(e.status)&&e.headers.has(`Location`)}function rn(e){return Ze.has(e.toUpperCase())}function J(e){return Ye.has(e.toUpperCase())}function an(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function on(e,t){let n=typeof t==`string`?k(t).search:t.search;if(e[e.length-1].route.index&&an(n||``))return e[e.length-1];let r=Ee(e);return r[r.length-1]}function sn(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 cn(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ln(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function un(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 dn(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 Y(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 fn(e,t){try{let n=e.sessionStorage.getItem(it);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 pn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(it,JSON.stringify(n))}catch(e){w(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function mn(){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 hn=h.createContext(null);hn.displayName=`DataRouter`;var gn=h.createContext(null);gn.displayName=`DataRouterState`;var _n=h.createContext(!1);function vn(){return h.useContext(_n)}var yn=h.createContext({isTransitioning:!1});yn.displayName=`ViewTransition`;var bn=h.createContext(new Map);bn.displayName=`Fetchers`;var xn=h.createContext(null);xn.displayName=`Await`;var X=h.createContext(null);X.displayName=`Navigation`;var Sn=h.createContext(null);Sn.displayName=`Location`;var Z=h.createContext({outlet:null,matches:[],isDataRoute:!1});Z.displayName=`Route`;var Cn=h.createContext(null);Cn.displayName=`RouteError`;var wn=`REACT_ROUTER_ERROR`,Tn=`REDIRECT`,En=`ROUTE_ERROR_RESPONSE`;function Dn(e){if(e.startsWith(`${wn}:${Tn}:{`))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 On(e){if(e.startsWith(`${wn}:${En}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new W(t.status,t.statusText,t.data)}catch{}}function kn(e,{relative:t}={}){C(An(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=h.useContext(X),{hash:i,pathname:a,search:o}=zn(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:H([n,a])),r.createHref({pathname:s,search:o,hash:i})}function An(){return h.useContext(Sn)!=null}function Q(){return C(An(),`useLocation() may be used only in the context of a <Router> component.`),h.useContext(Sn).location}function jn(e){C(An(),`useMatch() may be used only in the context of a <Router> component.`);let{pathname:t}=Q();return h.useMemo(()=>ve(e,ye(t)),[t,e])}var Mn=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Nn(e){h.useContext(X).static||h.useLayoutEffect(e)}function Pn(){let{isDataRoute:e}=h.useContext(Z);return e?sr():Fn()}function Fn(){C(An(),`useNavigate() may be used only in the context of a <Router> component.`);let e=h.useContext(hn),{basename:t,navigator:n}=h.useContext(X),{matches:r}=h.useContext(Z),{pathname:i}=Q(),a=JSON.stringify(De(r)),o=h.useRef(!1);return Nn(()=>{o.current=!0}),h.useCallback((r,s={})=>{if(w(o.current,Mn),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Oe(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:H([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var In=h.createContext(null);function Ln(e){let t=h.useContext(Z).outlet;return h.useMemo(()=>t&&h.createElement(In.Provider,{value:e},t),[t,e])}function Rn(){let{matches:e}=h.useContext(Z),t=e[e.length-1];return t?t.params:{}}function zn(e,{relative:t}={}){let{matches:n}=h.useContext(Z),{pathname:r}=Q(),i=JSON.stringify(De(n));return h.useMemo(()=>Oe(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Bn(e,t,n){C(An(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=h.useContext(X),{matches:i}=h.useContext(Z),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;lr(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Q(),d;if(t){let e=typeof t==`string`?k(t):t;C(c===`/`||e.pathname?.startsWith(c),`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 "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=I(e,{pathname:p});w(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),w(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=qn(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:H([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:H([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?h.createElement(Sn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...d},navigationType:`POP`}},g):g}function Vn(){let e=ar(),t=Pe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=h.createElement(h.Fragment,null,h.createElement(`p`,null,`💿 Hey developer 👋`),h.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,h.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,h.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),h.createElement(h.Fragment,null,h.createElement(`h2`,null,`Unexpected Application Error!`),h.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?h.createElement(`pre`,{style:i},n):null,o)}var Hn=h.createElement(Vn,null),Un=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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=On(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:h.createElement(Z.Provider,{value:this.props.routeContext},h.createElement(Cn.Provider,{value:e,children:this.props.component}));return this.context?h.createElement(Gn,{error:e},t):t}};Un.contextType=_n;var Wn=new WeakMap;function Gn({children:e,error:t}){let{basename:n}=h.useContext(X);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Dn(t.digest);if(e){let r=Wn.get(t);if(r)throw r;let i=Le(e.location,n);if(Ie&&!Wn.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Wn.set(t,n),n}return h.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Kn({routeContext:e,match:t,children:n}){let r=h.useContext(hn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Z.Provider,{value:e},n)}function qn(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);C(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??{},unstable_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||Hn,o&&(s<0&&c===0?(lr(`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)),g=()=>{let t;return t=u?f:d?p:n.route.Component?h.createElement(n.route.Component,null):n.route.element?n.route.element:e,h.createElement(Kn,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?h.createElement(Un,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function Jn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yn(e){let t=h.useContext(hn);return C(t,Jn(e)),t}function Xn(e){let t=h.useContext(gn);return C(t,Jn(e)),t}function Zn(e){let t=h.useContext(Z);return C(t,Jn(e)),t}function Qn(e){let t=Zn(e),n=t.matches[t.matches.length-1];return C(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function $n(){return Qn(`useRouteId`)}function er(){return Xn(`useNavigation`).navigation}function tr(){let{matches:e,loaderData:t}=Xn(`useMatches`);return h.useMemo(()=>e.map(e=>se(e,t)),[e,t])}function nr(){let e=Xn(`useLoaderData`),t=Qn(`useLoaderData`);return e.loaderData[t]}function rr(e){return Xn(`useRouteLoaderData`).loaderData[e]}function ir(){let e=Xn(`useActionData`),t=Qn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function ar(){let e=h.useContext(Cn),t=Xn(`useRouteError`),n=Qn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function or(){return h.useContext(xn)?._data}function sr(){let{router:e}=Yn(`useNavigate`),t=Qn(`useNavigate`),n=h.useRef(!1);return Nn(()=>{n.current=!0}),h.useCallback(async(r,i={})=>{w(n.current,Mn),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var cr={};function lr(e,t,n){!t&&!cr[e]&&(cr[e]=!0,w(!1,n))}var ur={};function dr(e,t){!e&&!ur[t]&&(ur[t]=!0,console.warn(t))}var fr=h.useOptimistic,pr=()=>void 0;function mr(e){return fr?fr(e):[e,pr]}function hr(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&w(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:h.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&w(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:h.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&w(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:h.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var gr=[`HydrateFallback`,`hydrateFallbackElement`],_r=class{constructor(){this.status=`pending`,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 vr({router:e,flushSync:t,onError:n,unstable_useTransitions:r}){r=vn()||r;let[i,a]=h.useState(e.state),[o,s]=mr(i),[c,l]=h.useState(),[u,d]=h.useState({isTransitioning:!1}),[f,p]=h.useState(),[m,g]=h.useState(),[_,v]=h.useState(),y=h.useRef(new Map),b=h.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:_})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},unstable_pattern:Fe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),o.forEach(e=>y.current.delete(e)),dr(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 b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(dr(_==null||b,"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."),!_||!b){t&&u?t(()=>a(i)):r===!1?a(i):h.startTransition(()=>{r===!0&&s(e=>yr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>g(n));return}m?(f?.resolve(),m.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,m,f,r,s,n]);h.useLayoutEffect(()=>e.subscribe(b),[e,b]),h.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new _r)},[u]),h.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):h.startTransition(()=>{r===!0&&s(e=>yr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),g(void 0),l(void 0),d({isTransitioning:!1})}),g(i)}},[c,f,e.window,r,s]),h.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),h.useEffect(()=>{!u.isTransitioning&&_&&(l(_.state),d({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[u.isTransitioning,_]);let x=h.useMemo(()=>({createHref:e.createHref,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]),S=e.basename||`/`,C=h.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return h.createElement(h.Fragment,null,h.createElement(hn.Provider,{value:C},h.createElement(gn.Provider,{value:o},h.createElement(bn.Provider,{value:y.current},h.createElement(yn.Provider,{value:u},h.createElement(Cr,{basename:S,location:o.location,navigationType:o.historyAction,navigator:x,unstable_useTransitions:r},h.createElement(br,{routes:e.routes,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function yr(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 br=h.memo(xr);function xr({routes:e,future:t,state:n,isStatic:r,onError:i}){return Bn(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function Sr(e){return Ln(e.context)}function Cr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){C(!An(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=h.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=k(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,unstable_mask:m}=n,g=h.useMemo(()=>{let e=V(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,unstable_mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return w(g!=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.`),g==null?null:h.createElement(X.Provider,{value:c},h.createElement(Sn.Provider,{children:t,value:g}))}function wr({children:e,errorElement:t,resolve:n}){let r=h.useContext(hn),i=h.useContext(gn),a=h.useCallback((e,t)=>{r&&r.onError&&i&&r.onError(e,{location:i.location,params:i.matches[0]?.params||{},unstable_pattern:Fe(i.matches),errorInfo:t})},[r,i]);return h.createElement(Tr,{resolve:n,errorElement:t,onError:a},h.createElement(Er,null,e))}var Tr=class extends h.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`<Await> caught the following error during render`,e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=0;if(!(n instanceof Promise))i=1,r=Promise.resolve(),Object.defineProperty(r,`_tracked`,{get:()=>!0}),Object.defineProperty(r,`_data`,{get:()=>n});else if(this.state.error){i=2;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,`_tracked`,{get:()=>!0}),Object.defineProperty(r,`_error`,{get:()=>e})}else n._tracked?(r=n,i=`_error`in r?2:`_data`in r?1:0):(i=0,Object.defineProperty(n,`_tracked`,{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,`_data`,{get:()=>e}),e=>{this.props.onError?.(e),Object.defineProperty(n,`_error`,{get:()=>e})}));if(i===2&&!t)throw r._error;if(i===2)return h.createElement(xn.Provider,{value:r,children:t});if(i===1)return h.createElement(xn.Provider,{value:r,children:e});throw r}};function Er({children:e}){let t=or(),n=typeof e==`function`?e(t):e;return h.createElement(h.Fragment,null,n)}function Dr(){return{params:Rn(),loaderData:nr(),actionData:ir(),matches:tr()}}function Or(e){return function(){let t=Dr();return h.createElement(e,t)}}function kr(){return{params:Rn(),loaderData:nr(),actionData:ir()}}function Ar(e){return function(){let t=kr();return h.createElement(e,t)}}function jr(){return{params:Rn(),loaderData:nr(),actionData:ir(),error:ar()}}function Mr(e){return function(){let t=jr();return h.createElement(e,t)}}var Nr=`get`,Pr=`application/x-www-form-urlencoded`;function Fr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ir(e){return Fr(e)&&e.tagName.toLowerCase()===`button`}function Lr(e){return Fr(e)&&e.tagName.toLowerCase()===`form`}function Rr(e){return Fr(e)&&e.tagName.toLowerCase()===`input`}function zr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Br(e,t){return e.button===0&&(!t||t===`_self`)&&!zr(e)}function Vr(e=``){return new URLSearchParams(typeof e==`string`||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 Hr(e,t){let n=Vr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ur=null;function Wr(){if(Ur===null)try{new FormData(document.createElement(`form`),0),Ur=!1}catch{Ur=!0}return Ur}var Gr=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Kr(e){return e!=null&&!Gr.has(e)?(w(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pr}"`),null):e}function qr(e,t){let n,r,i,a,o;if(Lr(e)){let o=e.getAttribute(`action`);r=o?V(o,t):null,n=e.getAttribute(`method`)||Nr,i=Kr(e.getAttribute(`enctype`))||Pr,a=new FormData(e)}else if(Ir(e)||Rr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?V(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Nr,i=Kr(e.getAttribute(`formenctype`))||Kr(o.getAttribute(`enctype`))||Pr,a=new FormData(o,e),!Wr()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Fr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Nr,r=null,i=Pr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Jr=-1,Yr=-2,Xr=-3,Zr=-4,Qr=-5,$r=-6,ei=-7,ti=`B`,ni=`D`,ri=`E`,ii=`M`,ai=`N`,oi=`P`,si=`R`,ci=`S`,li=`Y`,ui=`U`,di=`Z`,fi=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function pi(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(`
|
|
5
|
+
`);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var mi=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function hi(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return gi.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,gi.call(this,r)}function gi(e){let{hydrated:t,values:n,deferred:r,plugins:i}=this,a,o=[[e,e=>{a=e}]],s=[];for(;o.length>0;){let[e,a]=o.pop();switch(e){case ei:a(void 0);continue;case Qr:a(null);continue;case Yr:a(NaN);continue;case $r:a(1/0);continue;case Xr:a(-1/0);continue;case Zr:a(-0);continue}if(t[e]){a(t[e]);continue}let c=n[e];if(!c||typeof c!=`object`){t[e]=c,a(c);continue}if(Array.isArray(c))if(typeof c[0]==`string`){let[n,l,u]=c;switch(n){case ni:a(t[e]=new Date(l));continue;case ui:a(t[e]=new URL(l));continue;case ti:a(t[e]=BigInt(l));continue;case si:a(t[e]=new RegExp(l,u));continue;case li:a(t[e]=Symbol.for(l));continue;case ci:let n=new Set;t[e]=n;for(let e=c.length-1;e>0;e--)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case ii:let d=new Map;t[e]=d;for(let e=c.length-2;e>0;e-=2){let t=[];o.push([c[e+1],e=>{t[1]=e}]),o.push([c[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}a(d);continue;case ai:let f=Object.create(null);t[e]=f;for(let e of Object.keys(l).reverse()){let t=[];o.push([l[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}a(f);continue;case oi:if(t[l])a(t[e]=t[l]);else{let n=new fi;r[l]=n,a(t[e]=n.promise)}continue;case ri:let[,p,m]=c,h=m&&mi&&mi[m]?new mi[m](p):Error(p);t[e]=h,a(h);continue;case di:a(t[e]=t[l]);continue;default:if(Array.isArray(i)){let n=[],r=c.slice(1);for(let e=0;e<r.length;e++){let t=r[e];o.push([t,t=>{n[e]=t}])}s.push(()=>{for(let r of i){let i=r(c[0],...n);if(i){a(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<c.length;e++){let t=c[e];t!==Jr&&o.push([t,t=>{n[e]=t}])}a(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(c).reverse()){let t=[];o.push([c[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{n[t[0]]=t[1]})}a(n);continue}}for(;s.length>0;)s.pop()();return a}async function _i(e,t){let{plugins:n}=t??{},r=new fi,i=e.pipeThrough(pi()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await vi.call(a,i),s=r.promise;return o.done?r.resolve():s=yi.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function vi(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:hi.call(this,n)}}async function yi(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case oi:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=hi.call(this,a);r.resolve(o);break}case ri:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=hi.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function bi(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var xi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Si=/[&><\u2028\u2029]/g;function Ci(e){return e.replace(Si,e=>xi[e])}function $(e,t){if(e===!1||e==null)throw Error(t)}var wi=Symbol(`SingleFetchRedirect`),Ti=class extends Error{},Ei=new Set([100,101,204,205]);function Di(e,t,n,r,i,a){let o=Oi(e,e=>{let r=t.routes[e.route.id];$(r,`Route not found in manifest`);let i=n[e.route.id];return{hasLoader:r.hasLoader,hasClientLoader:r.hasClientLoader,hasShouldRevalidate:!!i?.shouldRevalidate}},Ii,r,i,a);return async e=>e.runClientMiddleware(o)}function Oi(e,t,n,r,i,a,o=()=>!0){return async s=>{let{request:c,matches:l,fetcherKey:u}=s,d=e();if(c.method!==`GET`)return ki(s,n,i,a);let f=l.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.shouldCallHandler()&&n&&!r});return!r&&!f?Ai(s,t,n,i,a):u?Ni(s,n,i,a):ji(s,d,t,n,r,i,a,o)}}async function ki(e,t,n,r){let i=e.matches.find(e=>e.shouldCallHandler());$(i,`No action match found`);let a,o=await i.resolve(async o=>await o(async()=>{let{data:o,status:s}=await t(e,n,r,[i.route.id]);return a=s,Ri(o,i.route.id)}));return en(o.result)||Pe(o.result)||$t(o.result)?{[i.route.id]:o}:{[i.route.id]:{type:o.type,result:Ne(o.result,a)}}}async function Ai(e,t,n,r,i){let a=e.matches.filter(e=>e.shouldCallHandler()),o={};return await Promise.all(a.map(a=>a.resolve(async s=>{try{let{hasClientLoader:c}=t(a),l=a.route.id,u=c?await s(async()=>{let{data:t}=await n(e,r,i,[l]);return Ri(t,l)}):await s();o[a.route.id]={type:`data`,result:u}}catch(e){o[a.route.id]={type:`error`,result:e}}}))),o}async function ji(e,t,n,r,i,a,o,s=()=>!0){let c=new Set,l=!1,u=e.matches.map(()=>zi()),d=zi(),f={},p=Promise.all(e.matches.map(async(t,i)=>t.resolve(async p=>{u[i].resolve();let m=t.route.id,{hasLoader:h,hasClientLoader:g,hasShouldRevalidate:_}=n(t),v=!t.shouldRevalidateArgs||t.shouldRevalidateArgs.actionStatus==null||t.shouldRevalidateArgs.actionStatus<400;if(!t.shouldCallHandler(v)){l||=t.shouldRevalidateArgs!=null&&h&&_===!0;return}if(s(t)&&g){h&&(l=!0);try{f[m]={type:`data`,result:await p(async()=>{let{data:t}=await r(e,a,o,[m]);return Ri(t,m)})}}catch(e){f[m]={type:`error`,result:e}}return}h&&c.add(m);try{f[m]={type:`data`,result:await p(async()=>Ri(await d.promise,m))}}catch(e){f[m]={type:`error`,result:e}}})));if(await Promise.all(u.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||c.size===0)&&!window.__reactRouterHdrActive)d.resolve({routes:{}});else{let t=i&&l&&c.size>0?[...c.keys()]:void 0;try{let n=await r(e,a,o,t);d.resolve(n.data)}catch(e){d.reject(e)}}return await p,await Mi(d.promise,e.matches,c,f),f}async function Mi(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof Ti&&(r[e].result=i)})}catch{}}async function Ni(e,t,n,r){let i=e.matches.find(e=>e.shouldCallHandler());$(i,`No fetcher match found`);let a=i.route.id,o=await i.resolve(async i=>i(async()=>{let{data:i}=await t(e,n,r,[a]);return Ri(i,a)}));return{[i.route.id]:o}}function Pi(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function Fi(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&V(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function Ii(e,t,n,r){let{request:i}=e,a=Fi(i.url,t,n,`data`);i.method===`GET`&&(a=Pi(a),r&&a.searchParams.set(`_routes`,r.join(`,`)));let o=await fetch(a,await bi(i));if(o.status>=400&&!o.headers.has(`X-Remix-Response`))throw new W(o.status,o.statusText,await o.text());if(o.status===204&&o.headers.has(`X-Remix-Redirect`))return{status:202,data:{redirect:{redirect:o.headers.get(`X-Remix-Redirect`),status:Number(o.headers.get(`X-Remix-Status`)||`302`),revalidate:o.headers.get(`X-Remix-Revalidate`)===`true`,reload:o.headers.get(`X-Remix-Reload-Document`)===`true`,replace:o.headers.get(`X-Remix-Replace`)===`true`}}};if(Ei.has(o.status)){let e={};return r&&i.method!==`GET`&&(e[r[0]]={data:void 0}),{status:o.status,data:{routes:e}}}$(o.body,`No response body to decode`);try{let e=await Li(o.body,window),t;if(i.method===`GET`){let n=e.value;t=wi in n?{redirect:n[wi]}:{routes:n}}else{let n=e.value,i=r?.[0];$(i,`No routeId found for single fetch call decoding`),t=`redirect`in n?{redirect:n}:{routes:{[i]:n}}}return{status:o.status,data:t}}catch{throw Error(`Unable to decode turbo-stream response`)}}function Li(e,t){return _i(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,i]=n,a=Error;e&&e in t&&typeof t[e]==`function`&&(a=t[e]);let o=new a(r);return o.stack=i,{value:o}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new W(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[wi]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function Ri(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:a}=e.redirect;throw U(t,{status:a,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new Ti(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function zi(){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}}async function Bi(e,t){if(e.id in t)return t[e.id];try{let n=await m(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Vi(e,t,n){return $i(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),Xi(e,n))}function Hi(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function Ui(e){if(!e.css)return;let t=Hi(e);await Promise.all(t.map(Gi))}async function Wi(e,t){if(!e.css&&!t.links||!ta())return;let n=[];if(e.css&&n.push(...Hi(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!Ki(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(Gi))}async function Gi(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function Ki(e){return e!=null&&typeof e.page==`string`}function qi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Ji(e,t,n){return $i((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Bi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(qi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Yi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Xi(e,t,{includeHydrateFallback:n}={}){return Zi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Zi(e){return[...new Set(e)]}function Qi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function $i(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ki(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Qi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var ea;function ta(){if(ea!==void 0)return ea;let e=document.createElement(`link`);return ea=e.relList.supports(`preload`),e=null,ea}function na(){return h.createElement(Ja,{title:`Loading...`,renderScripts:!0},h.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
|
|
6
|
+
console.log(
|
|
7
|
+
"💿 Hey developer 👋. You can provide a way better UX than this " +
|
|
8
|
+
"when your app is loading JS modules and/or running \`clientLoader\` " +
|
|
9
|
+
"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
|
|
10
|
+
"for more information."
|
|
11
|
+
);
|
|
12
|
+
`}}))}function ra(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function ia(e,t,n){let r=fa(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?na:void 0,a=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>h.createElement(qa,{error:ar()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:h.createElement(t.Layout,null,h.createElement(r,null))}:{Component:r},...a?{errorElement:h.createElement(t.Layout,null,h.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:h.createElement(t.Layout,null,h.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function aa(e,t,n,r,i,a){return ca(t,n,r,i,a,``,ra(t),e)}function oa(e,t){if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction){let n=`You are trying to call ${e===`action`?`serverAction()`:`serverLoader()`} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new W(400,`Bad Request`,Error(n),!0)}}function sa(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new W(405,`Method Not Allowed`,Error(r),!0)}function ca(e,t,n,r,i,a=``,o=ra(e),s){return(o[a]||[]).map(a=>{let c=t[a.id];function l(e){return $(typeof e==`function`,`No single fetch function available for route handler`),e()}function u(e){return a.hasLoader?l(e):Promise.resolve(null)}function d(e){if(!a.hasAction)throw sa(`action`,a.id);return l(e)}function f(e){m(()=>import(e),[])}function p(e){e.clientActionModule&&f(e.clientActionModule),e.clientLoaderModule&&f(e.clientLoaderModule)}async function h(e){let n=t[a.id],r=n?Wi(a,n):Promise.resolve();try{return e()}finally{await r}}let g={id:a.id,index:a.index,path:a.path};if(c){Object.assign(g,{...g,...ia(a,c,i),middleware:c.clientMiddleware,handle:c.handle,shouldRevalidate:la(g.path,c,a,r,s)});let e=n&&n.loaderData&&a.id in n.loaderData,t=e?n?.loaderData?.[a.id]:void 0,o=n&&n.errors&&a.id in n.errors,l=o?n?.errors?.[a.id]:void 0,f=s==null&&(c.clientLoader?.hydrate===!0||!a.hasLoader);g.loader=async({request:n,params:r,context:i,unstable_pattern:s},d)=>{try{return await h(async()=>($(c,"No `routeModule` available for critical-route loader"),c.clientLoader?c.clientLoader({request:n,params:r,context:i,unstable_pattern:s,async serverLoader(){if(oa(`loader`,a),f){if(e)return t;if(o)throw l}return u(d)}}):u(d)))}finally{f=!1}},g.loader.hydrate=pa(a.id,c.clientLoader,a.hasLoader,i),g.action=({request:e,params:t,context:n,unstable_pattern:r},o)=>h(async()=>{if($(c,"No `routeModule` available for critical-route action"),!c.clientAction){if(i)throw sa(`clientAction`,a.id);return d(o)}return c.clientAction({request:e,params:t,context:n,unstable_pattern:r,async serverAction(){return oa(`action`,a),d(o)}})})}else{a.hasClientLoader||(g.loader=(e,t)=>h(()=>u(t))),a.hasClientAction||(g.action=(e,t)=>h(()=>{if(i)throw sa(`clientAction`,a.id);return d(t)}));let e;async function n(){return e||=(async()=>{(a.clientLoaderModule||a.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=da(a,t);return p(a),await e})(),await e}g.lazy={loader:a.hasClientLoader?async()=>{let{clientLoader:e}=a.clientLoaderModule?await m(()=>import(a.clientLoaderModule),[]):await n();return $(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return oa(`loader`,a),u(n)}})}:void 0,action:a.hasClientAction?async()=>{let e=a.clientActionModule?m(()=>import(a.clientActionModule),[]):n();p(a);let{clientAction:t}=await e;return $(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return oa(`action`,a),d(n)}})}:void 0,middleware:a.hasClientMiddleware?async()=>{let{clientMiddleware:e}=a.clientMiddlewareModule?await m(()=>import(a.clientMiddlewareModule),[]):await n();return $(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await n();return la(g.path,e,a,r,s)},handle:async()=>(await n()).handle,Component:async()=>(await n()).Component,ErrorBoundary:a.hasErrorBoundary?async()=>(await n()).ErrorBoundary:void 0}}let _=ca(e,t,n,r,i,a.id,o,s);return _.length>0&&(g.children=_),g})}function la(e,t,n,r,i){if(i)return ua(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?B(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}return t.shouldRevalidate}function ua(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function da(e,t){let n=Bi(e,t),r=Ui(e),i=await n;return await Promise.all([r,Wi(e,i)]),{Component:fa(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function fa(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function pa(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var ma=new Set,ha=1e3,ga=new Set,_a=7680;function va(e,t){return e.mode===`lazy`&&t===!0}function ya({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=I(n.routes,e,n.basename);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function ba(e,t,n,r,i,a,o){if(va(i,r))return async({path:s,patch:c,signal:l,fetcherKey:u})=>{if(ga.has(s))return;let{state:d}=e();await wa([s],u?window.location.href:O(d.navigation.location||d.location),t,n,r,a,o,i.manifestPath,c,l)}}function xa(e,t,n,r,i,a){h.useEffect(()=>{if(!va(i,r)||window.navigator?.connection?.saveData===!0)return;function o(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;ga.has(n)||ma.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(o);let s=Array.from(ma.keys()).filter(e=>ga.has(e)?(ma.delete(e),!1):!0);if(s.length!==0)try{await wa(s,null,t,n,r,a,e.basename,i.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}let c=Ea(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,a,t,n,e,i])}function Sa(e,t){let n=e||`/__manifest`;return t==null?n:`${t}${n}`.replace(/\/+/g,`/`)}var Ca=`react-router-manifest-version`;async function wa(e,t,n,r,i,a,o,s,c,l){let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(Sa(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>_a){ma.clear();return}let f;try{let e=await fetch(d,{signal:l});if(e.ok){if(e.status===204&&e.headers.has(`X-Remix-Reload-Document`)){if(!t){console.warn(`Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.`);return}try{if(sessionStorage.getItem(Ca)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}sessionStorage.setItem(Ca,n.version)}catch{}window.location.href=t,console.warn(`Detected manifest version mismatch, reloading...`),await new Promise(()=>{})}else if(e.status>=400)throw Error(await e.text())}else throw Error(`${e.status} ${e.statusText}`);try{sessionStorage.removeItem(Ca)}catch{}f=await e.json()}catch(e){if(l?.aborted)return;throw e}let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>Ta(e,ga));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,ca(m,r,null,i,a,e)))}function Ta(e,t){if(t.size>=ha){let e=t.values().next().value;t.delete(e)}t.add(e)}function Ea(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function Da(){let e=h.useContext(hn);return $(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Oa(){let e=h.useContext(gn);return $(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ka=h.createContext(void 0);ka.displayName=`FrameworkContext`;function Aa(){let e=h.useContext(ka);return $(e,`You must render this element inside a <HydratedRouter> element`),e}function ja(e,t){let n=h.useContext(ka),[r,i]=h.useState(!1),[a,o]=h.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=h.useRef(null);h.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),h.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ma(s,p),onBlur:Ma(c,m),onMouseEnter:Ma(l,p),onMouseLeave:Ma(u,m),onTouchStart:Ma(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ma(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Na(e,t,n){if(n&&!Va)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var Pa=`data-react-router-critical-css`;function Fa({nonce:e,crossOrigin:t}){let{isSpaMode:n,manifest:r,routeModules:i,criticalCss:a}=Aa(),{errors:o,matches:s}=Oa(),c=Na(s,o,n),l=h.useMemo(()=>Vi(c,i,r),[c,i,r]);return h.createElement(h.Fragment,null,typeof a==`string`?h.createElement(`style`,{[Pa]:``,nonce:e,dangerouslySetInnerHTML:{__html:a}}):null,typeof a==`object`?h.createElement(`link`,{[Pa]:``,rel:`stylesheet`,href:a.href,nonce:e,crossOrigin:t}):null,l.map(({key:n,link:r})=>Ki(r)?h.createElement(Ia,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t}):h.createElement(`link`,{key:n,nonce:e,...r,crossOrigin:r.crossOrigin??t})))}function Ia({page:e,...t}){let{router:n}=Da(),r=h.useMemo(()=>I(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?h.createElement(Ra,{page:e,matches:r,...t}):null}function La(e){let{manifest:t,routeModules:n}=Aa(),[r,i]=h.useState([]);return h.useEffect(()=>{let r=!1;return Ji(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ra({page:e,matches:t,...n}){let r=Q(),{future:i,manifest:a,routeModules:o}=Aa(),{basename:s}=Da(),{loaderData:c,matches:l}=Oa(),u=h.useMemo(()=>Yi(e,t,l,a,r,`data`),[e,t,l,a,r]),d=h.useMemo(()=>Yi(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=h.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Fi(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=h.useMemo(()=>Xi(d,a),[d,a]),m=La(d);return h.createElement(h.Fragment,null,f.map(e=>h.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>h.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>h.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function za(){let{isSpaMode:e,routeModules:t}=Aa(),{errors:n,matches:r,loaderData:i}=Oa(),a=Q(),o=Na(r,n,e),s=null;n&&(s=n[o[o.length-1].route.id]);let c=[],l=null,u=[];for(let e=0;e<o.length;e++){let n=o[e],r=n.route.id,d=i[r],f=n.params,p=t[r],m=[],h={id:r,data:d,loaderData:d,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:s};if(u[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({data:d,loaderData:d,params:f,location:a,matches:u,error:s}):Array.isArray(p.meta)?[...p.meta]:p.meta:l&&(m=[...l]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
|
|
13
|
+
|
|
14
|
+
To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);h.meta=m,u[e]=h,c=[...m],l=c}return h.createElement(h.Fragment,null,c.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!Ba(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return h.createElement(r,{key:JSON.stringify(n),...n})}if(`title`in e)return h.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?h.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return h.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:Ci(t)}})}catch{return null}return h.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function Ba(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var Va=!1;function Ha(){Va=!0}function Ua(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:i,routeDiscovery:a,ssr:o}=Aa(),{router:s,static:c,staticContext:l}=Da(),{matches:u}=Oa(),d=vn(),f=va(a,o);i&&(i.didRenderScripts=!0);let p=Na(u,null,r);h.useEffect(()=>{Ha()},[]);let m=h.useMemo(()=>{if(d)return null;let r=l?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,i=c?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${f?``:`import ${JSON.stringify(t.url)}`};
|
|
15
|
+
${p.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];$(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(`
|
|
16
|
+
`),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(`
|
|
17
|
+
`)}).join(`
|
|
18
|
+
`)}
|
|
19
|
+
${f?`window.__reactRouterManifest = ${JSON.stringify(ya(t,s),null,2)};`:``}
|
|
20
|
+
window.__reactRouterRouteModules = {${p.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
|
|
21
|
+
|
|
22
|
+
import(${JSON.stringify(t.entry.module)});`:` `;return h.createElement(h.Fragment,null,h.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:void 0}),h.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:`module`,async:!0}))},[]),g=Va||d?[]:Wa(t.entry.imports.concat(Xi(p,t,{includeHydrateFallback:!0}))),_=typeof t.sri==`object`?t.sri:{};return dr(!d,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),Va||d?null:h.createElement(h.Fragment,null,typeof t.sri==`object`?h.createElement(`script`,{...e,"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:_})}}):null,f?null:h.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:_[t.url],suppressHydrationWarning:!0}),h.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:_[t.entry.module],suppressHydrationWarning:!0}),g.map(t=>h.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:_[t],suppressHydrationWarning:!0})),m)}function Wa(e){return[...new Set(e)]}function Ga(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Ka=class extends h.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location===e.location?{error:e.error||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?h.createElement(qa,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function qa({error:e,isOutsideRemixApp:t}){console.error(e);let n=h.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
|
|
23
|
+
console.log(
|
|
24
|
+
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
25
|
+
);
|
|
26
|
+
`}});if(Pe(e))return h.createElement(Ja,{title:`Unhandled Thrown Response!`},h.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),n);let r;if(e instanceof Error)r=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);r=Error(t)}return h.createElement(Ja,{title:`Application Error!`,isOutsideRemixApp:t},h.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),h.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},r.stack),n)}function Ja({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:i}=Aa();return i.root?.Layout&&!n?r:h.createElement(`html`,{lang:`en`},h.createElement(`head`,null,h.createElement(`meta`,{charSet:`utf-8`}),h.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),h.createElement(`title`,null,e)),h.createElement(`body`,null,h.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?h.createElement(Ua,null):null)))}var Ya=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Ya&&(window.__reactRouterVersion=`7.13.1`)}catch{}function Xa({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=h.useState({action:n.action,location:n.location}),o=h.useCallback(e=>{r===!1?a(e):h.startTransition(()=>a(e))},[r]);return h.useLayoutEffect(()=>n.listen(o),[n,o]),h.createElement(Cr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Xa.displayName=`unstable_HistoryRouter`;var Za=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qa=h.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:g,navigator:_,unstable_useTransitions:v}=h.useContext(X),y=typeof l==`string`&&Za.test(l),b=Le(l,g);l=b.to;let x=kn(l,{relative:r}),S=Q(),C=null;if(o){let e=Oe(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:H([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=ja(n,p),D=ao(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=h.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ga(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?h.createElement(h.Fragment,null,A,h.createElement(Ia,{page:x})):A});Qa.displayName=`Link`;var $a=h.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=zn(a,{relative:c.relative}),d=Q(),f=h.useContext(gn),{navigator:p,basename:m}=h.useContext(X),g=f!=null&&vo(u)&&o===!0,_=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&m&&(y=V(y,m)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return h.createElement(Qa,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});$a.displayName=`NavLink`;var eo=h.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Nr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m)=>{let{unstable_useTransitions:g}=h.useContext(X),_=lo(),v=uo(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&Za.test(s);return h.createElement(`form`,{ref:m,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f});g&&n!==!1?h.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});eo.displayName=`Form`;function to({getKey:e,storageKey:t,...n}){let r=h.useContext(ka),{basename:i}=h.useContext(X),a=Q(),o=tr();go({getKey:e,storageKey:t});let s=h.useMemo(()=>{if(!r||!e)return null;let t=ho(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return h.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Ci(JSON.stringify(t||po))}, ${Ci(JSON.stringify(s))})`}})}to.displayName=`ScrollRestoration`;function no(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ro(e){let t=h.useContext(hn);return C(t,no(e)),t}function io(e){let t=h.useContext(gn);return C(t,no(e)),t}function ao(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=Pn(),d=Q(),f=zn(e,{relative:o});return h.useCallback(p=>{if(Br(p,t)){p.preventDefault();let t=n===void 0?O(d)===O(f):n,m=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?h.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function oo(e){w(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=h.useRef(Vr(e)),n=h.useRef(!1),r=Q(),i=h.useMemo(()=>Hr(r.search,n.current?null:t.current),[r.search]),a=Pn();return[i,h.useCallback((e,t)=>{let r=Vr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var so=0,co=()=>`__${String(++so)}__`;function lo(){let{router:e}=ro(`useSubmit`),{basename:t}=h.useContext(X),n=$n(),r=e.fetch,i=e.navigate;return h.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=qr(e,t);a.navigate===!1?await r(a.fetcherKey||co(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function uo(e,{relative:t}={}){let{basename:n}=h.useContext(X),r=h.useContext(Z);C(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...zn(e||`.`,{relative:t})},o=Q();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:H([n,a.pathname])),O(a)}function fo({key:e}={}){let{router:t}=ro(`useFetcher`),n=io(`useFetcher`),r=h.useContext(bn),i=h.useContext(Z),a=i.matches[i.matches.length-1]?.route.id;C(r,`useFetcher must be used inside a FetchersContext`),C(i,`useFetcher must be used inside a RouteContext`),C(a!=null,`useFetcher can only be used on routes that contain a unique "id"`);let o=h.useId(),[s,c]=h.useState(e||o);e&&e!==s&&c(e);let{deleteFetcher:l,getFetcher:u,resetFetcher:d,fetch:f}=t;h.useEffect(()=>(u(s),()=>l(s)),[l,u,s]);let p=h.useCallback(async(e,t)=>{C(a,`No routeId available for fetcher.load()`),await f(s,a,e,t)},[s,a,f]),m=lo(),g=h.useCallback(async(e,t)=>{await m(e,{...t,navigate:!1,fetcherKey:s})},[s,m]),_=h.useCallback(e=>d(s,e),[d,s]),v=h.useMemo(()=>{let e=h.forwardRef((e,t)=>h.createElement(eo,{...e,navigate:!1,fetcherKey:s,ref:t}));return e.displayName=`fetcher.Form`,e},[s]),y=n.fetchers.get(s)||tt,b=r.get(s);return h.useMemo(()=>({Form:v,submit:g,load:p,reset:_,...y,data:b}),[v,g,p,_,y,b])}var po=`react-router-scroll-positions`,mo={};function ho(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:V(e.pathname,n)||e.pathname},t)),i??=e.key,i}function go({getKey:e,storageKey:t}={}){let{router:n}=ro(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=io(`useScrollRestoration`),{basename:a}=h.useContext(X),o=Q(),s=tr(),c=er();h.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),_o(h.useCallback(()=>{if(c.state===`idle`){let t=ho(o,s,a,e);mo[t]=window.scrollY}try{sessionStorage.setItem(t||po,JSON.stringify(mo))}catch(e){w(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(h.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||po);e&&(mo=JSON.parse(e))}catch{}},[t]),h.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(mo,()=>window.scrollY,e?(t,n)=>ho(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),h.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{w(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function _o(e,t){let{capture:n}=t||{};h.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function vo(e,{relative:t}={}){let n=h.useContext(yn);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ro(`useViewTransitionState`),i=zn(e,{relative:t});if(!n.isTransitioning)return!1;let a=V(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=V(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(i.pathname,o)!=null||ve(i.pathname,a)!=null}var yo=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})),bo=o(((e,t)=>{t.exports=yo()}));export{nr as A,Mr as B,gr as C,pa as D,I as E,ar as F,u as H,rr as I,oo as L,jn as M,Pn as N,fo as O,er as P,lo as R,Di as S,hr as T,o as U,Ar as V,c as W,aa as _,ka as a,Li as b,za as c,Ka as d,vr as f,ca as g,S as h,eo as i,Q as j,xa as k,Ei as l,to as m,wr as n,Qa as o,Ua as p,W as r,Fa as s,bo as t,Sr as u,j as v,C as w,ba as x,ot as y,Or as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-lU2GATMj.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/react-dom-BkDQo3BN.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-CMX9SEB-.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/react-dom-BkDQo3BN.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/clear-cache-CAdofhUa.js"],"css":["/assets/root-DEstG3hL.css"]},"routes/[.]well-known.$":{"id":"routes/[.]well-known.$","parentId":"root","path":".well-known/*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/_._well-known._-8QUD84tm.js","imports":[],"css":[]},"routes/clear-cache":{"id":"routes/clear-cache","parentId":"root","path":"clear-cache","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/clear-cache-Ciosxv25.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/clear-cache-CAdofhUa.js"],"css":[]},"routes/commitcount":{"id":"routes/commitcount","parentId":"root","path":"commitcount","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/commitcount-B_3CeIvr.js","imports":[],"css":[]},"routes/commits":{"id":"routes/commits","parentId":"root","path":"commits","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/commits-DDIAHyHU.js","imports":[],"css":[]},"routes/_index":{"id":"routes/_index","parentId":"root","index":true,"hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/_index-VLoUE117.js","imports":[],"css":[]},"routes/browse":{"id":"routes/browse","parentId":"root","path":"browse","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/browse-BVbfiHLu.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/browse-DMoBg6Vh.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes/$path":{"id":"routes/$path","parentId":"root","path":":path","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/_path-DzSNgPJP.js","imports":[],"css":[]},"routes/view":{"id":"routes/view","parentId":"root","path":"view","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/view-JlAiRFiK.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/browse-DMoBg6Vh.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes/view.progress":{"id":"routes/view.progress","parentId":"routes/view","path":"progress","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/view.progress-CEmcNaLe.js","imports":[],"css":[]},"routes/view.commits":{"id":"routes/view.commits","parentId":"routes/view","path":"commits","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/view.commits-CIgkE9N1.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/browse-DMoBg6Vh.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/RepoTabs-B_gVZfyQ.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes/view.details":{"id":"routes/view.details","parentId":"routes/view","path":"details","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/view.details-DAXK445Q.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/browse-DMoBg6Vh.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/RepoTabs-B_gVZfyQ.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes/view._index":{"id":"routes/view._index","parentId":"routes/view","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/view._index-jmCCN9mA.js","imports":["/assets/jsx-runtime-s_YwNCZb.js"],"css":[]},"routes/ui":{"id":"routes/ui","parentId":"root","path":"ui","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/ui-C21Ckl3a.js","imports":["/assets/jsx-runtime-s_YwNCZb.js","/assets/browse-DMoBg6Vh.js","/assets/GitTruckInfo-Bu3InKk0.js","/assets/react-dom-BkDQo3BN.js","/assets/compare-Br3z3FUS-Bm1os1Jk.js","/assets/chunk-JPUPSTYD-YBbsfvLw.js"],"css":[]},"routes/$":{"id":"routes/$","parentId":"root","path":"*","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/_-CT17qCl3.js","imports":[],"css":[]}},"url":"/assets/manifest-bbde1677.js","version":"bbde1677"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as e,U as t}from"./jsx-runtime-s_YwNCZb.js";var n=t((t=>{var n=e();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,t.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},t.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},t.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},t.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},t.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},t.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},t.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},t.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},t.requestFormReset=function(e){a.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},t.useFormStatus=function(){return c.H.useHostTransitionStatus()},t.version=`19.2.4`})),r=t(((e,t)=>{function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),t.exports=n()}));export{r as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as e,F as t,H as n,L as r,N as i,W as a,c as o,j as s,m as c,o as l,p as u,s as d,t as f,u as p,v as m,z as h}from"./jsx-runtime-s_YwNCZb.js";import"./react-dom-BkDQo3BN.js";import{V as g,o as _,r as v}from"./GitTruckInfo-Bu3InKk0.js";import{t as y}from"./clear-cache-CAdofhUa.js";import{a as b,c as x,d as S,l as C,n as w,r as T,t as E,u as D}from"./compare-Br3z3FUS-Bm1os1Jk.js";function O(e,t,n){return r=>{if(!(t.length===0||t.some(t=>!E(r.getAll(t),e.getAll(t)))))return C("[nuqs `%s`] no change, returning previous",t.join(`,`),r),r;let i=k(e,t,n);return C(`[nuqs \`%s\`] subbed search params change
|
|
2
2
|
from %O
|
|
3
|
-
to %O`,t.join(`,`),r,i),i}}function k(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var A=0;function j(e=1){A=e}function M(e=N){A=Math.max(0,A-1),!(A>0)&&e()}function N(){C(`[nuqs] Aborting queues`),T.abortAll(),b.abort().forEach(e=>T.queuedQuerySync.emit(e))}var P=`__nuqs__`;function F(e){if(e instanceof URL)return e.searchParams;if(e.startsWith(`?`))return new URLSearchParams(e);try{return new URL(e,location.origin).searchParams}catch{return new URLSearchParams(e)}}function I(e){return typeof history>`u`?!1:history.nuqs?.version&&history.nuqs.version!==`2.8.
|
|
3
|
+
to %O`,t.join(`,`),r,i),i}}function k(e,t,n){if(t.length===0)return e;let r=n?new URLSearchParams(e):e;for(let n of e.keys())t.includes(n)||r.delete(n);return r}var A=0;function j(e=1){A=e}function M(e=N){A=Math.max(0,A-1),!(A>0)&&e()}function N(){C(`[nuqs] Aborting queues`),T.abortAll(),b.abort().forEach(e=>T.queuedQuerySync.emit(e))}var P=`__nuqs__`;function F(e){if(e instanceof URL)return e.searchParams;if(e.startsWith(`?`))return new URLSearchParams(e);try{return new URL(e,location.origin).searchParams}catch{return new URLSearchParams(e)}}function I(e){return typeof history>`u`?!1:history.nuqs?.version&&history.nuqs.version!==`2.8.9`?(console.error(D(409),history.nuqs.version,`2.8.9`,e),!1):!history.nuqs?.adapters?.includes(e)}function L(e){history.nuqs=history.nuqs??{version:`2.8.9`,adapters:[]},history.nuqs.adapters.push(e)}function R(e,t){if(!I(t))return;let n=typeof location==`object`?location.search:``;e.on(`update`,e=>{let t=e.toString();n=t.length?`?`+t:``}),window.addEventListener(`popstate`,()=>{n=location.search,N()}),C(`[nuqs %s] Patching history (%s adapter)`,`2.8.9`,t);function r(t){M();try{if(new URL(t,location.origin).search===n)return}catch{}try{e.emit(`update`,F(t))}catch(e){console.error(e)}}let i=history.pushState,a=history.replaceState;history.pushState=function(e,t,n){i.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},history.replaceState=function(e,t,n){a.call(history,e,``,n),n&&t!==`__nuqs__`&&r(n)},L(t)}var z=a(n(),1);function B({adapter:e,useNavigate:t,useSearchParams:n}){let r=w();function i(n){let i=t();return{searchParams:a(n),updateUrl:(0,z.useCallback)((t,n)=>{(0,z.startTransition)(()=>{r.emit(`update`,t)});let a=new URL(location.href);a.search=S(t),C(`[nuqs ${e}] Updating url: %s`,a);let o=n.history===`push`?history.pushState:history.replaceState;j(n.shallow?1:2),o.call(history,history.state,P,a),n.shallow===!1&&i({hash:a.hash,search:a.search},{replace:!0,preventScrollReset:!0,state:history.state?.usr}),n.scroll&&window.scrollTo(0,0)},[i]),autoResetQueueOnUpdate:!1}}function a(e=[]){let[t]=n(typeof location>`u`?new URLSearchParams:new URLSearchParams(location.search)),[i,a]=(0,z.useState)(()=>typeof location>`u`?k(t,e,!0):k(new URLSearchParams(location.search),e,!1));return(0,z.useEffect)(()=>{function t(){(0,z.startTransition)(()=>{a(O(new URLSearchParams(location.search),e,!1))})}function n(t){(0,z.startTransition)(()=>{a(O(t,e,!0))})}return r.on(`update`,n),window.addEventListener(`popstate`,t),()=>{r.off(`update`,n),window.removeEventListener(`popstate`,t)}},[e.join(`&`)]),i}return R(r,e),{NuqsAdapter:x(i),useOptimisticSearchParams:a}}var V=B({adapter:`react-router-v7`,useNavigate:i,useSearchParams:r}),H=V.NuqsAdapter;V.useOptimisticSearchParams;var U=a(f(),1);function W({className:e,message:t,noTruck:n=!1,children:r}){return(0,U.jsxs)(`div`,{className:g(`app-container`,e),children:[(0,U.jsx)(`div`,{}),(0,U.jsx)(`div`,{className:`grid h-full w-full place-items-center px-4 py-10`,children:(0,U.jsxs)(`div`,{className:`flex max-w-2xl flex-col items-center gap-3 text-center`,children:[n?null:(0,U.jsx)(`img`,{src:v,alt:`Git Truck`,className:`w-full max-w-sm min-w-0`}),(0,U.jsx)(`div`,{className:`text-4xl leading-tight font-extrabold`,children:t}),r]})})]})}const G=()=>[{title:`Git Truck`}];var K=h(function(){return(0,U.jsx)(H,{children:(0,U.jsx)(q,{children:(0,U.jsx)(p,{})})})});m();function q({children:e,className:t=``}){return(0,U.jsxs)(`html`,{lang:`en`,children:[(0,U.jsxs)(`head`,{children:[(0,U.jsx)(`meta`,{charSet:`utf-8`}),(0,U.jsx)(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1`}),(0,U.jsx)(o,{}),(0,U.jsx)(d,{})]}),(0,U.jsxs)(`body`,{className:g(`bg-primary-bg dark:bg-primary-bg-dark text-primary-text dark:text-primary-text-dark`,t),children:[e,(0,U.jsx)(c,{}),(0,U.jsx)(u,{})]})]})}const J=e(()=>{let{pathname:e,search:n}=s(),r=t(),i=r instanceof Error&&r.message.startsWith(`Failed to fetch`);return(0,U.jsxs)(q,{children:[(0,U.jsxs)(W,{noTruck:!0,className:`min-h-screen`,message:i?`Git Truck is not running, please start it and try again.`:`Oh no, the Git Truck crashed!`,children:[i?null:(0,U.jsx)(y,{redirectPath:e+n}),(0,U.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[(0,U.jsx)(l,{className:`btn`,to:e+n,children:`Retry`}),i?null:(0,U.jsx)(l,{className:`btn btn--primary`,to:`..`,children:`Go back`})]})]}),i?null:(0,U.jsx)(`div`,{className:`mx-auto max-w-xl space-y-2`,children:(0,U.jsx)(_,{className:`overflow-x-auto text-left whitespace-pre`,children:r instanceof Error?r.stack:`No stack trace available`})})]})});export{J as ErrorBoundary,K as default,G as meta};
|