vendor: 5,506 bytes, line 1
1function e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"1.0.0"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="dc70ffaa-529d-4def-a789-f6676a0089ac",e._sentryDebugIdIdentifier="sentry-dbid-dc70ffaa-529d-4def-a789-f6676a0089ac")}catch(r){}}();var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n,a,o={exports:{}},i={};function l(){if(n)return i;n=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function g(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||m}function w(){}function b(e,t,r){this.props=e,this.context=t,this.refs=v,this.updater=r||m}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=g.prototype;var E=b.prototype=new w;E.constructor=b,y(E,g.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function S(){}var x={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function L(t,r,n){var a=n.ref;return{$$typeof:e,type:t,key:r,ref:void 0!==a?a:null,props:n}}function C(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var P=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function D(r,n,a,o,i){var l=typeof r;"undefined"!==l&&"boolean"!==l||(r=null);var s,u,c=!1;if(null===r)c=!0;else switch(l){case"bigint":case"string":case"number":c=!0;break;case"object":switch(r.$$typeof){case e:case t:c=!0;break;case h:return D((c=r._init)(r._payload),n,a,o,i)}}if(c)return i=i(r),c=""===o?"."+T(r,0):o,R(i)?(a="",null!=c&&(a=c.replace(P,"$&/")+"/"),D(i,n,a,"",function(e){return e})):null!=i&&(C(i)&&(s=i,u=a+(null==i.key||r&&r.key===i.key?"":(""+i.key).replace(P,"$&/")+"/")+c,i=L(s.type,u,s.props)),n.push(i)),1;c=0;var d,f=""===o?".":o+":";if(R(r))for(var m=0;m<r.length;m++)c+=D(o=r[m],n,a,l=f+T(o,m),i);else if("function"==typeof(m=null===(d=r)||"object"!=typeof d?null:"function"==typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(r=m.call(r),m=0;!(o=r.next()).done;)c+=D(o=o.value,n,a,l=f+T(o,m++),i);else if("object"===l){if("function"==typeof r.then)return D(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(S,S):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(r),n,a,o,i);throw n=String(r),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(r).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return c}function O(e,t,r){if(null==e)return e;var n=[],a=0;return D(e,n,"","",function(e){return t.call(r,e,a++)}),n}function _(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},A={map:O,forEach:function(e,t,r){O(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};return i.Activity=f,i.Children=A,i.Component=g,i.Fragment=r,i.Profiler=o,i.PureC
vendor: 4,122 bytes, line 1
1omponent=b,i.StrictMode=a,i.Suspense=c,i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,i.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},i.cache=function(e){return function(){return e.apply(null,arguments)}},i.cacheSignal=function(){return null},i.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=y({},e.props),a=e.key;if(null!=t)for(o in void 0!==t.key&&(a=""+t.key),t)!k.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(n[o]=t[o]);var o=arguments.length-2;if(1===o)n.children=r;else if(1<o){for(var i=Array(o),l=0;l<o;l++)i[l]=arguments[l+2];n.children=i}return L(e.type,a,n)},i.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:l,_context:e},e},i.createElement=function(e,t,r){var n,a={},o=null;if(null!=t)for(n in void 0!==t.key&&(o=""+t.key),t)k.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(a[n]=t[n]);var i=arguments.length-2;if(1===i)a.children=r;else if(1<i){for(var l=Array(i),s=0;s<i;s++)l[s]=arguments[s+2];a.children=l}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===a[n]&&(a[n]=i[n]);return L(e,o,a)},i.createRef=function(){return{current:null}},i.forwardRef=function(e){return{$$typeof:u,render:e}},i.isValidElement=C,i.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:_}},i.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},i.startTransition=function(e){var t=x.T,r={};x.T=r;try{var n=e(),a=x.S;null!==a&&a(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(S,M)}catch(o){M(o)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}},i.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},i.use=function(e){return x.H.use(e)},i.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},i.useCallback=function(e,t){return x.H.useCallback(e,t)},i.useContext=function(e){return x.H.useContext(e)},i.useDebugValue=function(){},i.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},i.useEffect=function(e,t){return x.H.useEffect(e,t)},i.useEffectEvent=function(e){return x.H.useEffectEvent(e)},i.useId=function(){return x.H.useId()},i.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},i.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},i.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},i.useMemo=function(e,t){return x.H.useMemo(e,t)},i.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},i.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},i.useRef=function(e){return x.H.useRef(e)},i.useState=function(e){return x.H.useState(e)},i.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},i.useTransition=function(){return x.H.useTransition()},i.version="19.2.5",i}function s(){return a||(a=1,o.exports=l()),o.exports}var u=s();const c=r(u),d=e({__proto__:null,default:c},[u]);var h,f,p={exports:{}},m={};function y(){if(h)return m;h=1;var e=s();function t(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function i(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}return m.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,m.createPortal=function(e,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!r||1!==r.nodeType&&9!==r.nodeType&&11!==r.nodeType)throw Error(t(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;
1return{$$typeof:a,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,r,null,n)},m.flushSync=function(e){var t=o.T,r=n.p;try{if(o.T=null,n.p=2,e)return e()}finally{o.T=t,n.p=r,n.d.f()}},m.preconnect=function(e,t){"string"==typeof e&&(t?t="string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,n.d.C(e,t))},m.prefetchDNS=function(e){"string"==typeof e&&n.d.D(e)},m.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,a=i(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,l="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?n.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:a,integrity:o,fetchPriority:l}):"script"===r&&n.d.X(e,{crossOrigin:a,integrity:o,fetchPriority:l,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},m.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=i(t.as,t.crossOrigin);n.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&n.d.M(e)},m.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,a=i(r,t.crossOrigin);n.d.L(e,r,{crossOrigin:a,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},m.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=i(t.as,t.crossOrigin);n.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else n.d.m(e)},m.requestFormReset=function(e){n.d.r(e)},m.unstable_batchedUpdates=function(e,t){return e(t)},m.useFormState=function(e,t,r){return o.H.useFormState(e,t,r)},m.useFormStatus=function(){return o.H.useHostTransitionStatus()},m.version="19.2.5",m}function v(){if(f)return p.exports;return f=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),p.exports=y(),p.exports} 2/** 3 * react-router v7.18.3 4 * 5 * Copyright (c) Remix Software Inc. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE.md file in the root directory of this source tree. 9 * 10 * @license MIT 11 */var g=e=>{throw TypeError(e)},w=(e,t,r)=>t.has(e)||g("Cannot "+r),b=(e,t,r)=>(w(e,t,"read from private field"),r?r.call(e):t.get(e)),E=(e,t,r)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),R=(e,t,r,n)=>(w(e,t,"write to private field"),t.set(e,r),r),S=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,x=/^[\\/]{2}/;function k(e,t){return t+e.replace(/\\/g,"/")}var L,C="popstate";function P(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function T(e={}){return function(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=c();null==u&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:m.location,delta:t})}function h(e,t){l="PUSH";let r=P(e)?e:M(m.location,e,t);u=c()+1;let n=_(r,u),d=m.createHref(r.mask||r);try{i.pushState(n,"",d)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;a.location.assign(d)}o&&s&&s({action:l,location:m.location,delta:1})}function f(e,t){l="REPLACE";let r=P(e)?e:M(m.location,e,t);u=c();let n=_(r,u),a=m.createHref(r.mask||r);i.replaceState(n,"",a),o&&s&&s({action:l,location:m.location,delta:0})}function p(e){return $(a,e)}let m={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(C,d),s=e,()=>{a.removeEventListener(C,d),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:f,go:e=>i.go(e)};return m}(function(e,t){var r;let n=null==(r=t.state)?void 0:r.masked,{pathname:a,search:o,hash:i}=n||e.location;return M("",{pathname:a,search:o,hash:i},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(e,t){return"string"==typeof t?t:A(t)},0,e)}function D(e,t){if(!1===e||null==e)throw new Error(t)}function O(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(r){}}}function _(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function M(e,t,r=null,n,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?j(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),mask:a}}function A({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"
11===r.charAt(0)?r:"#"+r),e}function j(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function $(e,t,r=!1){let n="http://localhost";e&&(n="null"!==e.location.origin?e.location.origin:e.location.href),D(n,"No window.location.(origin|href) available to create URL");let a="string"==typeof t?t:A(t);return a=a.replace(/ $/,"%20"),!r&&x.test(a)&&(a=n+a),new URL(a,n)}var U=class{constructor(e){if(E(this,L,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(b(this,L).has(e))return b(this,L).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){b(this,L).set(e,t)}};L=new WeakMap;var N=new Set(["lazy","caseSensitive","path","id","index","children"]);var H=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function z(e){return H.has(e)}function F(e,t,r=[],n={},a=!1){return e.map((e,o)=>{let i=[...r,String(o)],l="string"==typeof e.id?e.id:i.join("-");if(D(!0!==e.index||!e.children,"Cannot specify children on an index route"),D(a||!n[l],`Found a route id collision on i
11d "${l}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let r={...e,id:l};return n[l]=I(r,t(r)),r}{let r={...e,id:l,children:void 0};return n[l]=I(r,t(r)),e.children&&(r.children=F(e.children,t,i,n,a)),r}})}function I(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function B(e,t,r="/"){return W(e,t,r,!1)}function W(e,t,r,n,a){let o=ie(("string"==typeof t?j(t):t).pathname||"/",r);if(null==o)return null;let i=a??q(e),l=null,s=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return O(!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}}(o);for(let u=0;null==l&&u<i.length;++u)l=re(i[u],s,n);return l}function q(e){let t=Y(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function Y(e,t=[],r=[],n="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(n)&&i)return;D(s.relativePath.startsWith(n),`Absolute route path "${s.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(n.length)}let u=pe([n,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(D(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Y(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:te(u,e.index),routesMeta:c.map((e,t)=>{let[r,n]=oe(e.relativePath,e.caseSensitive,t===c.length-1);return{...e,matcher:r,compiledParams:n}})})};return e.forEach((e,t)=>{var r;if(""!==e.path&&(null==(r=e.path)?void 0:r.includes("?")))for(let n of V(e.path))o(e,t,!0,n);else o(e,t)}),t}function V(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=V(n.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var J=/^:[\w-]+$/,K=3,G=2,X=1,Q=10,Z=-2,ee=e=>"*"===e;function te(e,t){let r=e.split("/"),n=r.length;return r.some(ee)&&(n+=Z),t&&(n+=G),r.filter(e=>!ee(e)).reduce((e,t)=>e+(J.test(t)?K:""===t?X:Q),n)}function re(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let e=n[l],s=l===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c={path:e.relativePath,caseSensitive:e.caseSensitive,end:s},d=e.matcher&&e.compiledParams?ae(c,u,e.matcher,e.compiledParams):ne(c,u),h=e.route;if(!d&&s&&r&&!n[n.length-1].route.index&&(d=ne({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!d)return null;
11Object.assign(a,d.params),i.push({params:a,pathname:pe([o,d.pathname]),pathnameBase:ye(pe([o,d.pathnameBase])),route:h}),"/"!==d.pathnameBase&&(o=pe([o,d.pathnameBase]))}return i}function ne(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=oe(e.path,e.caseSensitive,e.end);return ae(e,t,r,n)}function ae(e,t,r,n){let a=t.match(r);if(!a)return null;let o=a[0],i=me(o,1),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=me(o.slice(0,o.length-e.length),1)}const a=l[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function oe(e,t=!1,r=!0){O("*"===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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,a,o)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function ie(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var le=e=>S.test(e);function se(e,t){let r=me(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function ue(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ce(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function de(e){let t=ce(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function he(e,t,r,n=!1){let a;"string"==typeof e?a=j(e):(a={...e},D(!a.pathname||!a.pathname.includes("?"),ue("?","pathname","search",a)),D(!a.pathname||!a.pathname.includes("#"),ue("#","pathname","hash",a)),D(!a.search||!a.search.includes("#"),ue("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?j(e):e;return n?(n=fe(n),r=n.startsWith("/")||n.startsWith("\\")?se(n.substring(1),"/"):se(n,t)):r=t,{pathname:r,search:ve(a),hash:ge(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var fe=e=>e.replace(/[\\/]{2,}/g,"/"),pe=e=>fe(e.join("/"));function me(e,t=0){let r=e.length;for(;r>t&&47===e.charCodeAt(r-1);)r--;return r===e.length?e:e.slice(0,r)}var ye=e=>me(e).replace(/^\/*/,"/"),ve=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ge=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",we=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},be=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ee=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Re(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Se(e){let t=e.map(e=>e.route.path).filter(Boolean);return pe(t)||"/"}var xe="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ke(e,t){let r=e;if("string"!=typeof r||!S.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(xe)try{let e=new URL(window.location.href),n=x.test(r)?new URL(k(r,e.protocol)):new URL(r),o=ie(n.pathname,t);
11n.origin===e.origin&&null!=o?r=o+n.search+n.hash:a=!0}catch(o){O(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Le=Symbol("Uninstrumented");function Ce(e,t){let r={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(r);for(let n of t)e[n]&&r[n].push(e[n])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=Pe(r.lazy,t.lazy,()=>{});e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let a=e[t],o=r[`lazy.${t}`];if("function"==typeof a&&o.length>0){let e=Pe(o,a,()=>{});e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let a=t[e];if("function"==typeof a&&r[e].length>0){let t=a[Le]??a,o=Pe(r[e],t,(...e)=>De(e[0]));o&&("loader"===e&&!0===t.hydrate&&(o.hydrate=!0),o[Le]=t,n[e]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[Le]??e,n=Pe(r.middleware,t,(...e)=>De(e[0]));return n?(n[Le]=t,n):e})),n}function Pe(e,t,r){return 0===e.length?null:async(...n)=>{let a=await Te(e,r(...n),()=>t(...n),e.length-1);if("error"===a.type)throw a.value;return a.value}}async function Te(e,t,r,n){let a,o=e[n];if(o){let l,s=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=Te(e,t,r,n-1),a=await l,D(a,"Expected a result"),"error"===a.type&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await o(s,t)}catch(i){console.error("An instrumentation function threw an error:",i)}l||await s(),await l}else try{let e=await r();a={type:"success",value:e}}catch(i){a={type:"error",value:i}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function De(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:_e(t),params:{...n},pattern:a,context:Me(r)}}function Oe(e,t){return{currentUrl:A(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 _e(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Me(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===Ae}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var Ae=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var je=new URL("http://localhost");function $e(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),je)}catch{return je}}function Ue(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function Ne(e,t,r,n){let a=null;try{a=null==e?null:new URL(e,r)}catch{}let o=new URL(t,r),i=null!=a&&!Ue(a,r),l=!Ue(o,r);if("reject"===n){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(null==a||!function(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(r)&&(""===t.host||e.slice(r.length).startsWith("//"))}(e,a)||!Ue(a,o)))throw new Error("External navigation is not allowed")}var He,ze,Fe,Ie,Be=["POST","PUT","PATCH","DELETE"],We=new Set(Be),qe=["GET",...Be],Ye=new Set(qe),Ve=new Set([301,302,303,307,308]),Je=new Set([307,308]),Ke={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ge={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Qe=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ze="remix-router-transitions",et=Symbol("ResetLoaderData"),tt=class{constructor(e){E(this,He),E(this,ze),E(this,Fe),E(this,Ie),R(this,He,e),R(this,ze,q(e))}get stableRoutes(){return b(this,He)}get activeRoutes(){return b(this,Fe)??b(this,He)}get branches(){return b(this,Ie)??b(this,ze)}get hasHMRRoutes(){return null!=b(this,Fe)}setRoutes(e){R(this,He,e),R(this,ze,q(e))}setHmrRoutes(e){R(this,Fe,e),R(this,Ie,q(e))}commitHmrRoutes(){b(this,Fe)&&(R(this,He,b(this,Fe)),R(this,ze,b(this,Ie)),R(this,Fe,void 0),R(this,Ie,void 0))}};function rt(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;D(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Qe,o=a;if(e.instrumentations){let t=e.instrumentations;o=e=>({...a(e),...Ce(t.map(e=>
11e.route).filter(Boolean),e)})}let i={},l=new tt(F(e.routes,o,void 0,i)),s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let u,c,d,h=e.dataStrategy||mt,f={...e.future},p=null,m=new Set,y=null,v=null,g=null,w=null,b=null!=e.hydrationData,E=W(l.activeRoutes,e.history.location,s,!1,l.branches),R=!1,S=null;if(null!=E||e.patchRoutesOnNavigation){if(E&&!e.hydrationData){De(E,l.activeRoutes,e.history.location.pathname).active&&(E=null)}if(E)if(E.some(e=>e.route.lazy))u=!1,c=!u;else if(E.some(e=>it(e.route))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,n=E;if(r){let e=E.findIndex(e=>void 0!==r[e.route.id]);n=n.slice(0,e+1)}c=!1,u=!0,n.forEach(e=>{let n=lt(e.route,t,r);c=c||n.renderFallback,u=u&&!n.shouldLoad})}else u=!0,c=!u;else{u=!1,c=!u,E=[];let t=De(null,l.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(R=!0,E=t.matches)}}else{let t=jt(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=At(l.activeRoutes);u=!0,c=!u,E=r,S={[n.id]:t}}let k,L,C={historyAction:e.history.action,location:e.history.location,matches:E,initialized:u,renderFallback:c,navigation:Ke,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},P="POP",T=null,_=!1,N=!1,H=new Map,z=null,I=!1,B=!1,q=new Set,Y=new Map,V=0,J=-1,K=new Map,G=new Set,X=new Map,Q=new Map,Z=new Set,ee=new Map,te=null;function re(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=i[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e})),C={...C,...e};let r=[],n=[];C.fetchers.forEach((e,t)=>{"idle"===e.state&&(Z.has(t)?r.push(t):n.push(t))}),Z.forEach(e=>{C.fetchers.has(e)||Y.has(e)||r.push(e)}),0===m.size&&(y={newErrors:e.errors??null}),[...m].forEach(n=>n(C,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>pe(C.fetchers,e)),n.forEach(e=>C.fetchers.delete(e))}function ne(t,r,{flushSync:n}={}){var a,o;let i,s=null!=C.actionData&&null!=C.navigation.formMethod&&qt(C.navigation.formMethod)&&"loading"===C.navigation.state&&!0!==(null==(a=t.state)?void 0:a._isRedirect);i=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:s?C.actionData:null;let u=r.loaderData?Ot(C.loaderData,r.loaderData,r.matches||[],r.errors):C.loaderData,c=C.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Xe)));let d,h=!I&&Te(t,r.matches||C.matches),f=!0===_||null!=C.navigation.formMethod&&qt(C.navigation.formMethod)&&!0!==(null==(o=t.state)?void 0:o._isRedirect);if(l.commitHmrRoutes(),I||"POP"===P||("PUSH"===P?e.history.push(t,t.state):"REPLACE"===P&&e.history.replace(t,t.state)),"POP"===P){let e=H.get(C.location.pathname);e&&e.has(t.pathname)?d={currentLocation:C.location,nextLocation:t}:H.has(t.pathname)&&(d={currentLocation:t,nextLocation:C.location})}else if(N){let e=H.get(C.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),H.set(C.location.pathname,e)),d={currentLocation:C.location,nextLocation:t}}re({...r,actionData:i,loaderData:u,historyAction:P,location:t,initialized:!0,renderFallback:!1,navigation:Ke,revalidation:"idle",restoreScrollPosition:h,preventScrollReset:f,blockers:c},{viewTransitionOpts:d,flushSync:!0===n}),P="POP",_=!1,N=!1,I=!1,B=!1,null==T||T.resolve(),T=null,null==te||te.resolve(),te=null}async function ae(t,r,a){k&&k.abort(),k=null,P=t,I=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(v&&w){let r=ke(e,t);v[r]=w()}}(C.location,C.matches),_=!0===(a&&a.preventScrollReset),N=!0===(a&&a.enableViewTransition);let u=l.activeRoutes,c=(null==a?void 0:a.initialHydration)&&C.matches&&C.matches.length>0&&!R?C.matches:W(u,r,s,!1,l.branches),d=!0===(a&&a.flushSync);if(c&&C.initialized&&!B&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;
11if(""!==t.hash)return!0;return!1}(C.location,r)&&!(a&&a.submission&&qt(a.submission.formMethod)))return void ne(r,{matches:c},{flushSync:d});let h=De(c,u,r.pathname);if(h.active&&h.matches&&(c=h.matches),!c){let{error:e,notFoundMatches:t,route:n}=xe(r.pathname);return void ne(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:d})}let f=a&&a.overrideNavigation?{...a.overrideNavigation,matches:c,historyAction:t}:void 0;k=new AbortController;let p,m=Lt(e.history,r,k.signal,a&&a.submission),y=e.getContext?await e.getContext():new U;if(a&&a.pendingError)p=[Mt(c).route.id,{type:"error",error:a.pendingError}];else if(a&&a.submission&&qt(a.submission.formMethod)){let u=await async function(t,r,a,u,c,d,h,f,p={}){de();let m,y=function(e,t,r,n){let a={state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text};return a}(r,u,c,a);if(re({navigation:y},{flushSync:!0===p.flushSync}),h){let e=await _e(u,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=At(l.activeRoutes);return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=Mt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=xe(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}u=e.matches}let v=Vt(u,r);if(v.route.action||v.route.lazy){let e=bt(o,i,t,r,u,v,f?[]:n,d),a=await ue(t,r,e,d,null);if(m=a[v.route.id],!m)for(let t of u)if(a[t.route.id]){m=a[t.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else m={type:"error",error:jt(405,{method:t.method,pathname:r.pathname,routeId:v.route.id})};if(It(m)){let r;if(p&&null!=p.replace)r=p.replace;else{r=kt(m.response.headers.get("Location"),new URL(t.url),s,e.history)===C.location.pathname+C.location.search}return await se(t,m,!0,{submission:a,replace:r}),{shortCircuited:!0}}if(Ft(m)){let e=Mt(u,v.route.id);return!0!==(p&&p.replace)&&(P="PUSH"),{matches:u,pendingActionResult:[e.route.id,m,v.route.id]}}return{matches:u,pendingActionResult:[v.route.id,m]}}(m,r,a.submission,c,t,y,h.active,a&&!0===a.initialHydration,{replace:a.replace,flushSync:d});if(u.shortCircuited)return;if(u.pendingActionResult){let[e,t]=u.pendingActionResult;if(Ft(t)&&Re(t.error)&&404===t.error.status)return k=null,void ne(r,{matches:u.matches,loaderData:{},errors:{[e]:t.error}})}c=u.matches||c,p=u.pendingActionResult,f=Kt(r,c,t,a.submission),d=!1,h.active=!1,m=Lt(e.history,m.url,m.signal)}let{shortCircuited:g,matches:b,loaderData:E,errors:S,workingFetchers:x}=await async function(t,r,a,u,c,d,h,f,p,m,y,v,g,w){let b=h||Kt(r,a,u,f),E=f||p||Jt(b),R=!I&&!y;if(d){if(R){let e=oe(g);re({navigation:b,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await _e(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=At(l.activeRoutes);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=Mt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=xe(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}a=e.matches}let S=l.activeRoutes,{dsMatches:x,revalidatingFetchers:L}=ot(t,c,o,i,e.history,C,a,E,r,y?[]:n,!0===y,B,q,Z,X,G,S,s,null!=e.patchRoutesOnNavigation,l.branches,g,w);if(J=++V,!e.dataStrategy&&!x.some(e=>e.shouldLoad)&&!x.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===L.length){let e=new Map(C.fetchers),t=ve(e);return ne(r,{matches:a,loaderData:{},errors:g&&Ft(g[1])?{[g[0]]:g[1].error}:null,..._t(g),...t?{fetchers:e}:{}},{flushSync:v}),{shortCircuited:!0}}if(R){let e={};if(!d){e.navigation=b;let t=oe(g);void 0!==t&&(e.actionData=t)}L.length>0&&(e.fetchers=function(e){let t=new Map(C.fetchers);return e.forEach(e=>{let r=t.get(e.key),n=Gt(void 0,r?r.data:void 0);t.set(e.key,n)}),t}(L)),re(e,{flushSync:v})}
11L.forEach(e=>{me(e.key),e.controller&&Y.set(e.key,e.controller)});let P=()=>L.forEach(e=>me(e.key));k&&k.signal.addEventListener("abort",P);let{loaderResults:T,fetcherResults:D}=await ce(x,L,t,r,c);if(t.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",P);L.forEach(e=>Y.delete(e.key));let O=$t(T);if(O)return await se(t,O.result,!0,{replace:m}),{shortCircuited:!0};if(O=$t(D),O)return G.add(O.key),await se(t,O.result,!0,{replace:m}),{shortCircuited:!0};let _=new Map(C.fetchers),{loaderData:M,errors:A}=Dt(C,a,T,g,L,D,_);y&&C.errors&&(A={...C.errors,...A});let j=ve(_),$=ge(J,_),U=j||$||L.length>0;return{matches:a,loaderData:M,errors:A,...U?{workingFetchers:_}:{}}}(m,r,c,t,y,h.active,f,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,d,p,a&&a.callSiteDefaultShouldRevalidate);g||(k=null,ne(r,{matches:b||c,..._t(p),loaderData:E,errors:S,...x?{fetchers:x}:{}}))}function oe(e){return e&&!Ft(e[1])?{[e[0]]:e[1].data}:C.actionData?0===Object.keys(C.actionData).length?null:C.actionData:void 0}async function se(n,a,o,{submission:i,fetcherSubmission:l,preventScrollReset:u,replace:c}={}){o||(null==T||T.resolve(),T=null),a.response.headers.has("X-Remix-Revalidate")&&(B=!0);let d=a.response.headers.get("Location");D(d,"Expected a Location header on the redirect Response");let h=d,f=new URL(n.url);d=kt(d,f,s,e.history),Ne(h,d,f,"allow-explicit");let p=M(C.location,d,{_isRedirect:!0});if(r){let e=!1;if(a.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(le(d)){const r=$(t,d,!0);e=r.origin!==t.location.origin||null==ie(r.pathname,s)}if(e)return void(c?t.location.replace(d):t.location.assign(d))}k=null;let m=!0===c||a.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:y,formAction:v,formEncType:g}=C.navigation;!i&&!l&&y&&v&&g&&(i=Jt(C.navigation));let w=i||l;if(Je.has(a.response.status)&&w&&qt(w.formMethod))await ae(m,p,{submission:{...w,formAction:d},preventScrollReset:u||_,enableViewTransition:o?N:void 0});else{let e=Kt(p,[],m,i);await ae(m,p,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||_,enableViewTransition:o?N:void 0})}}async function ue(e,t,r,n,a){var o;let i,l={};try{i=await async function(e,t,r,n,a,o){n.some(e=>{var t;return null==(t=e._lazyPromises)?void 0:t.middleware})&&await Promise.all(n.map(e=>{var t;return null==(t=e._lazyPromises)?void 0:t.middleware}));let i={request:t,url:Ct(t,r),pattern:Se(n),params:n[0].params,context:o,matches:n},l=e=>{let t=i;return yt(t,()=>e({...t,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},s=await e({...i,fetcherKey:a,runClientMiddleware:l});try{await Promise.all(n.flatMap(e=>{var t,r;return[null==(t=e._lazyPromises)?void 0:t.handler,null==(r=e._lazyPromises)?void 0:r.route]}))}catch(u){}return s}(h,e,t,r,a,n)}catch(u){return r.filter(e=>e.shouldLoad).forEach(e=>{l[e.route.id]={type:"error",error:u}}),l}if(e.signal.aborted)return l;if(!qt(e.method))for(let s of r){if("error"===(null==(o=i[s.route.id])?void 0:o.type))break;i.hasOwnProperty(s.route.id)||C.loaderData.hasOwnProperty(s.route.id)||C.errors&&C.errors.hasOwnProperty(s.route.id)||!s.shouldCallHandler()||(i[s.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${s.route.id}`)})}for(let[c,d]of Object.entries(i))if(zt(d)){let t=d.result;l[c]={type:"redirect",response:Rt(t,e,c,r,s)}}else l[c]=await Et(d);return l}async function ce(e,t,r,n,a){let o=ue(r,n,e,a,null),i=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ue(e.request,e.path,e.matches,a,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:jt(404,{pathname:e.path})}})}));return{loaderResults:await o,fetcherResults:(await i).reduce((e,t)=>Object.assign(e,t),{})}}function de(){B=!0,X.forEach((e,t)=>{Y.has(t)&&q.add(t),me(t)})}function he(e,t,r={}){let n=new Map(C.fetchers);n.set(e,t),re({fetchers:n},{flushSync:!0===(r&&r.flushSync)})}function fe(e,t,r,n={}){let a=Mt(C.matches,t),o=new Map(C.fetchers);pe(o,e),re({errors:{[a.route.id]:r},fetchers:o},{flushSync:!0===(n&&n.flushSync)})}function pe(e,t){let r=C.fetchers.get(t);!Y.has(t)||r&&"loading"===r.state&&K.has(t)||me(t),X.delete(t),K.delete(t),G.delete(t),Z.delete(t),q.delete(t),e.delete(t)}function me(e,t){let r=Y.get(e);r&&(r.abort(t),Y.delete(e))}function ye(e,t){for(let r of e){let e=t.get(r);D(e,`Expected fetcher: ${r}`);let n=Xt(e.data);t.set(r,n)}}function ve(e){let t=[],r=!1;for(let n of G){let a=e.get(n);D(a,`Expected fetcher: ${n}`),"loading"===a.state&&(G.delete(n),t.push(n),r=!0)}return ye(t,e),r}function ge(e,t){let r=[];for(let[n,a]of K)if(a<e){let e=t.get(n);D(e,`Expected fetcher: ${n}`),"loading"===e.state&&(me(n),K.delete(n),r.push(n))}return ye(r,t),r.length>0}function we(e){C.blockers.delete(e),ee.delete(e)}function be(e,t){let r=C.blockers.get(e)||Xe;D("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(C.blockers);n.set(e,t),re({blockers:n})}function Ee({currentLocation:e,nextLocation:t,historyAction:r}){if(0===ee.size)return;ee.size>1&&O(!1,"A router only supports one blocker at a time");let n=Array.from(ee.entries()),[a,o]=n[n.length-1],i=C.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:r})?a:void 0}function xe(e){let t=jt(404,{pathname:e}),r=l.activeRoutes,{matches:n,route:a}=At(r);return{notFoundMatches:n,route:a,error:t}}function ke(e,t){if(g){return g(e,t.map(e=>function(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}(e,C.loaderData)))||e.key}return e.key}function Te(e,t){if(v){let r=ke(e,t),n=v[r];if("number"==typeof n)return n}return null}function De(t,r,n){if(e.patchRoutesOnNavigation){let e=l.branches;if(!t){return{active:!0,matches:W(r,n,s,!0,e)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:W(r,n,s,!0,e)}}}return{active:!1,matches:null}}async function _e(t,r,n,a){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let u=t;for(;;){let t=i;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:u,fetcherKey:a,patch:(e,r)=>{n.aborted||ut(e,r,l,t,o,!1)}})}catch(c){return{type:"error",error:c,partialMatches:u}}if(n.aborted)return{type:"aborted"};let d=l.branches,h=W(l.activeRoutes,r,s,!1,d),f=null;if(h){if(0===Object.keys(h[0].params).length)return{type:"success",matches:h};if(f=W(l.activeRoutes,r,s,!0,d),!(f&&u.length<f.length&&Me(u,f.slice(0,u.length))))return{type:"success",matches:h}}if(f||(f=W(l.activeRoutes,r,s,!0,d)),!f||Me(u,f))return{type:"success",matches:null};u=f}}function Me(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return d={get basename(){return s},get future(){return f},get state(){return C},get routes(){return l.stableRoutes},get branches(){return l.branches},get manifest(){return i},get window(){return t},initialize:function(){if(p=e.history.listen(({action:t,location:r,delta:n})=>{if(L)return L(),void(L=void 0);O(0===ee.size||null!=n,"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 a=Ee({currentLocation:C.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{L=e});return e.history.go(-1*n),be(a,{state:"blocked",location:r,proceed(){be(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(C.blockers);e.set(a,Xe),re({blockers:e})}}),null==T||T.resolve(),void(T=null)}return ae(t,r)}),r){!function(e,t){try{let r=e.sessionStorage.getItem(Ze);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,H);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ze,JSON.stringify(n))}catch(r){O(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}(t,H);t.addEventListener("pagehide",e),z=()=>t.removeEventListener("pagehide",e)}return C.initialized||ae("POP",C.location,{initialHydration:!0}),d},subscribe:function(e){if(m.add(e),y){let{newErrors:t}=y;y=null,e(C,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>m.delete(e)},enableScrollRestoration:function(e,t,r){if(v=e,w=t,g=r||null,!b&&C.navigation===Ke){b=!0;let e=Te(C.location,C.matches);null!=e&&re({restoreScrollPosition:e})}return()=>{v=null,w=null,g=null}},navigate:async function t(r,n){if(null==T||T.resolve(),T=null,"number"==typeof r){T||(T=Qt());let t=T.promise;return e.history.go(r),t}let a,o=nt(C.location,C.matches,s,r,null==n?void 0:n.fromRouteId,null==n?void 0:n.relative),{path:i,submission:l,error:u}=at(!1,o,n);if(null==n?void 0:n.mask){let t="string"==typeof n.mask?j(n.mask):{...C.location.mask,...n.mask};if(a={pathname:t.pathname??"",search:t.search??"",hash:t.hash??""},x.test(a.pathname))throw new Error("External navigation is not allowed");a.pathname.startsWith("\\")&&(a.pathname=a.pathname.replace(/^\\+/,"/")),Ne("string"==typeof n.mask?n.mask:A(n.mask),A(a),e.history.createURL("/"),"reject")}let c=C.location,d=M(c,i,n&&n.state,void 0,a);d={...d,...e.history.encodeLocation(d)},Ne(null==r?e.history.createHref(C.location):"string"==typeof r?r:A(r),e.history.createHref(d.mask||d),e.history.createURL("/"),"reject");let h=n&&null!=n.replace?n.replace:void 0,f="PUSH";!0===h?f="REPLACE":!1===h||null!=l&&qt(l.formMethod)&&l.formAction===C.location.pathname+C.location.search&&(f="REPLACE");let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,m=!0===(n&&n.flushSync),y=Ee({currentLocation:c,nextLocation:d,historyAction:f});y?be(y,{state:"blocked",location:d,proceed(){be(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,n)},reset(){let e=new Map(C.blockers);e.set(y,Xe),re({blockers:e})}}):await ae(f,d,{submission:l,pendingError:u,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})},fetch:async function(t,r,a,u){me(t);let c=!0===(u&&u.flushSync),d=l.activeRoutes,h=nt(C.location,C.matches,s,a,r,null==u?void 0:u.relative),f=W(d,h,s,!1,l.branches),p=De(f,d,h);if(p.active&&p.matches&&(f=p.matches),!f)return void fe(t,r,jt(404,{pathname:h}),{flushSync:c});let{path:m,submission:y,error:v}=at(!0,h,u);if(v)return void fe(t,r,v,{flushSync:c});let g=e.getContext?await e.getContext():new U,w=!0===(u&&u.preventScrollReset);y&&qt(y.formMethod)?await async function(t,r,a,u,c,d,h,f,p,m){de(),X.delete(t);let y=C.fetchers.get(t);he(t,function(e,t){let r={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};return r}(p,y),{flushSync:h});let v=new AbortController,g=Lt(e.history,a,v.signal,p);if(d){let e=await _e(u,new URL(g.url).pathname,g.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void fe(t,r,e.error,{flushSync:h});if(!e.matches)return void fe(t,r,jt(404,{pathname:a}),{flushSync:h});u=e.matches}let w=Vt(u,a);if(!w.route.action&&!w.route.lazy){let e=jt(405,{method:p.formMethod,pathname:a,routeId:r});return void fe(t,r,e,{flushSync:h})}Y.set(t,v);let b=V,E=bt(o,i,g,a,u,w,n,c),R=await ue(g,a,E,c,t),S=R[w.route.id];if(!S)for(let e of E)if(R[e.route.id]){S=R[e.route.id];break}if(g.signal.aborted)return void(Y.get(t)===v&&Y.delete(t));if(Z.has(t)){if(It(S)||Ft(S))return void he(t,Xt(void 0))}else{if(It(S))return Y.delete(t),J>b?void he(t,Xt(void 0)):(G.add(t),he(t,Gt(p)),se(g,S,!1,{fetcherSubmission:p,preventScrollReset:f}));if(Ft(S))return void fe(t,r,S.error)}let x=C.navigation.location||C.location,L=Lt(e.history,x,v.signal),T=l.activeRoutes,O="idle"!==C.navigation.state?W(T,C.navigation.location,s,!1,l.branches):C.matches;D(O,"Didn't find any matches after fetcher action");let _=++V;K.set(t,_);let{dsMatches:M,revalidatingFetchers:A}=ot(L,c,o,i,e.history,C,O,p,x,n,!1,B,q,Z,X,G,T,s,null!=e.patchRoutesOnNavigation,l.branches,[w.route.id,S],m),j=Gt(p,S.data),$=new Map(C.fetchers);$.set(t,j),A.filter(e=>
11e.key!==t).forEach(e=>{let t=e.key,r=$.get(t),n=Gt(void 0,r?r.data:void 0);$.set(t,n),me(t),e.controller&&Y.set(t,e.controller)}),re({fetchers:$});let U=()=>A.forEach(e=>me(e.key));v.signal.addEventListener("abort",U);let{loaderResults:N,fetcherResults:H}=await ce(M,A,L,x,c);if(v.signal.aborted)return;v.signal.removeEventListener("abort",U),K.delete(t),Y.delete(t),A.forEach(e=>Y.delete(e.key));let z=C.fetchers.has(t),F=e=>{if(!z)return e;let r=new Map(e.fetchers);return r.set(t,Xt(S.data)),{...e,fetchers:r}},I=$t(N);if(I)return C=F(C),se(L,I.result,!1,{preventScrollReset:f});if(I=$t(H),I)return G.add(I.key),C=F(C),se(L,I.result,!1,{preventScrollReset:f});let Q=new Map(C.fetchers);z&&Q.set(t,Xt(S.data));let{loaderData:ee,errors:te}=Dt(C,O,N,void 0,A,H,Q);ge(_,Q),"loading"===C.navigation.state&&_>J?(D(P,"Expected pending action"),k&&k.abort(),ne(C.navigation.location,{matches:O,loaderData:ee,errors:te,fetchers:Q})):(re({errors:te,loaderData:Ot(C.loaderData,ee,O,te),fetchers:Q}),B=!1)}(t,r,m,f,g,p.active,c,w,y,u&&u.defaultShouldRevalidate):(X.set(t,{routeId:r,path:m}),await async function(t,r,a,l,s,u,c,d,h){let f=C.fetchers.get(t);he(t,Gt(h,f?f.data:void 0),{flushSync:c});let p=new AbortController,m=Lt(e.history,a,p.signal);if(u){let e=await _e(l,new URL(m.url).pathname,m.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void fe(t,r,e.error,{flushSync:c});if(!e.matches)return void fe(t,r,jt(404,{pathname:a}),{flushSync:c});l=e.matches}let y=Vt(l,a);Y.set(t,p);let v=V,g=bt(o,i,m,a,l,y,n,s),w=await ue(m,a,g,s,t),b=w[y.route.id];if(!b)for(let e of l)if(w[e.route.id]){b=w[e.route.id];break}Y.get(t)===p&&Y.delete(t);if(m.signal.aborted)return;if(Z.has(t))return void he(t,Xt(void 0));if(It(b))return J>v?void he(t,Xt(void 0)):(G.add(t),void(await se(m,b,!1,{preventScrollReset:d})));if(Ft(b))return void fe(t,r,b.error);he(t,Xt(b.data))}(t,r,m,f,g,p.active,c,w,y))},revalidate:function(){te||(te=Qt()),de(),re({revalidation:"loading"});let e=te.promise;return"submitting"===C.navigation.state?e:"idle"===C.navigation.state?(ae(C.historyAction,C.location,{startUninterruptedRevalidation:!0}),e):(ae(P||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:!0===N}),e)},createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:function(e){return Q.set(e,(Q.get(e)||0)+1),Z.has(e)&&Z.delete(e),C.fetchers.get(e)||Ge},resetFetcher:function(e,t){me(e,null==t?void 0:t.reason),he(e,Xt(null))},deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),Z.add(e)):Q.set(e,t),re({fetchers:new Map(C.fetchers)})},dispose:function(){p&&p(),z&&z(),m.clear(),k&&k.abort(),C.fetchers.forEach((e,t)=>pe(C.fetchers,t)),C.blockers.forEach((e,t)=>we(t))},getBlocker:function(e,t){let r=C.blockers.get(e)||Xe;return ee.get(e)!==t&&ee.set(e,t),r},deleteBlocker:we,patchRoutes:function(e,t,r=!1){ut(e,t,l,i,o,r),l.hasHMRRoutes||re({})},_internalFetchControllers:Y,_internalSetRoutes:function(e){i={},l.setHmrRoutes(F(e,o,void 0,i))},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){re(e)}},e.instrumentations&&(d=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let n of t)e[n]&&r[n].push(e[n])}})),r.navigate.length>0){let t=e.navigate[Le]??e.navigate,n=Pe(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?A(r):".",...Oe(e,n??{})}});n&&(n[Le]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[Le]??e.fetch,n=Pe(r.fetch,t,(...t)=>{let[r,,n,a]=t;return{href:n??".",fetcherKey:r,...Oe(e,a??{})}});n&&(n[Le]=t,e.fetch=n)}return e}(d,e.instrumentations.map(e=>e.router).filter(Boolean))),d}function nt(e,t,r,n,a,o){let i,l;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=he(n||".",de(i),ie(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||""===n||"."===n)&&l){let e=Yt(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return"/"!==r&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:pe([e,t])}({basename:r,pathname:s.pathname})),A(s)}function at(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&(n=r.formMethod,!Ye.has(n.toUpperCase())))return{path:t,error:jt(405,{method:r.formMethod})};var n;let a,o,i=()=>({path:t,error:jt(400,{type:"invalid-body"})}),l=(r.formMethod||"get").toUpperCase(),s=Ut(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!qt(l))return i();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}\n`,""):String(r.body);return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!qt(l))return i();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(d){return i()}}}if(D("function"==typeof FormData,"FormData is not available in this environment"),r.formData)a=Pt(r.formData),o=r.formData;else if(r.body instanceof FormData)a=Pt(r.body),o=r.body;else if(r.body instanceof URLSearchParams)a=r.body,o=Tt(a);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=Tt(a)}catch(d){return i()}let u={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(qt(u.formMethod))return{path:t,submission:u};let c=j(t);return e&&c.search&&Yt(c.search)&&a.append("index",""),c.search=`?${a}`,{path:A(c),submission:u}}function ot(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m,y,v,g,w,b,E){var R;let S,x=b?Ft(b[1])?b[1].error:b[1].data:void 0,k=a.createURL(o.location),L=a.createURL(s);if(c&&o.errors){let e=Object.keys(o.errors)[0];S=i.findIndex(t=>t.route.id===e)}
11else if(b&&Ft(b[1])){let e=b[0];S=i.findIndex(t=>t.route.id===e)-1}let C=b?b[1].statusCode:void 0,P=C&&C>=400,T={currentUrl:k,currentParams:(null==(R=o.matches[0])?void 0:R.params)||{},nextUrl:L,nextParams:i[0].params,...l,actionResult:x,actionStatus:C},D=Se(i),O=i.map((a,i)=>{let{route:l}=a,h=null;if(null!=S&&i>S)h=!1;else if(l.lazy)h=!0;else if(it(l))if(c){let{shouldLoad:e}=lt(l,o.loaderData,o.errors);h=e}else(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a})(o.loaderData,o.matches[i],a)&&(h=!0);else h=!1;if(null!==h)return wt(r,n,e,s,D,a,u,t,h);let f=!1;"boolean"==typeof E?f=E:P?f=!1:(d||k.pathname+k.search===L.pathname+L.search||k.search!==L.search||function(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}(o.matches[i],a))&&(f=!0);let p={...T,defaultShouldRevalidate:f},m=st(a,p);return wt(r,n,e,s,D,a,u,t,m,p,E)}),_=[];return p.forEach((e,l)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(l))return;let s=o.fetchers.get(l),p=s&&"idle"!==s.state&&void 0===s.data,b=W(y,e.path,v??"/",!1,w);if(!b){if(g&&p)return;return void _.push({key:l,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(m.has(l))return;let R=Vt(b,e.path),S=new AbortController,x=Lt(a,e.path,S.signal),k=null;if(h.has(l))h.delete(l),k=bt(r,n,x,e.path,b,R,u,t);else if(p)d&&(k=bt(r,n,x,e.path,b,R,u,t));else{let a;a="boolean"==typeof E?E:!P&&d;let o={...T,defaultShouldRevalidate:a};st(R,o)&&(k=bt(r,n,x,e.path,b,R,u,t,o))}k&&_.push({key:l,routeId:e.routeId,path:e.path,matches:k,match:R,request:x,controller:S})}),{dsMatches:O,revalidatingFetchers:_}}function it(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function lt(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!it(e))return{shouldLoad:!1,renderFallback:!1};let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if("function"==typeof e.loader&&!0===e.loader.hydrate)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function st(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ut(e,t,r,n,a,o){let i;if(e){let t=n[e];D(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),i=t.children}else i=r.activeRoutes;let l=[],s=[];if(t.forEach(e=>{let t=i.find(t=>ct(e,t));t?s.push({existingRoute:t,newRoute:e}):l.push(e)}),l.length>0){let t=F(l,a,[e||"_","patch",String((null==i?void 0:i.length)||"0")],n);i.push(...t)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:e,newRoute:t}=s[u],r=e,[n]=F([t],a,[],{},!0);Object.assign(r,{element:n.element?n.element:r.element,errorElement:n.errorElement?n.errorElement:r.errorElement,hydrateFallbackElement:n.hydrateFallbackElement?n.hydrateFallbackElement:r.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function ct(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||((null==(r=e.children)?void 0:r.every((e,r)=>{var n;return null==(n=t.children)?void 0:n.some(t=>ct(e,t))}))??!1))}He=new WeakMap,ze=new WeakMap,Fe=new WeakMap,Ie=new WeakMap;var dt=new WeakMap,ht=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(D(a,"No route found in manifest"),!a.lazy||"object"!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=dt.get(a);i||(i={},dt.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let t=function(e){return N.has(e)}(e),r=void 0!==a[e]&&"hasErrorBoundary"!==e;if(t)O(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(r)O(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}"object"==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=s,s},ft=new WeakMap;async function pt(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>
11e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function mt(e){return e.matches.some(e=>e.route.middleware)?yt(e,()=>pt(e)):pt(e)}function yt(e,t){return async function(e,t,r,n,a){let{matches:o,...i}=e,l=o.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),s=await vt(i,l,t,r,n,a);return s}(e,t,e=>{if(Wt(t=e)&&(r=t.status,Ve.has(r))&&t.headers.has("Location"))throw e;var t,r;return e},Ht,function(t,r,n){if(n)return Promise.resolve(Object.assign(n.value,{[r]:{type:"error",result:t}}));{let{matches:n}=e,a=Math.min(Math.max(n.findIndex(e=>e.route.id===r),0),Math.max(n.findIndex(e=>e.shouldCallHandler()),0)),o=Mt(n,n[a].route.id).route.id;return Promise.resolve({[o]:{type:"error",result:t}})}})}async function vt(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s){return await r()}let u,[c,d]=s,h=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let l=await vt(e,t,r,n,a,o,i+1);return u={value:l},u.value}catch(l){return u={value:await o(l,c,u)},u.value}};try{let t=await d(e,h),r=null!=t?n(t):void 0;return a(r)?r:u?r??u.value:(u={value:await h()},u.value)}catch(f){return await o(f,c,u)}}function gt(e,t,r,n,a){let o=ht({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o=r[e.id];if(D(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=ft.get(o);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{D("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=z(e),i=void 0!==o[e]&&"hasErrorBoundary"!==e;a?O(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):i?O(!i,`Route "${o.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.`):r[e]=n}Object.assign(o,r),Object.assign(o,{...n(o),lazy:void 0})})();return ft.set(o,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let i,l=Object.keys(e.lazy),s=[];for(let c of l){if(a&&a.includes(c))continue;let o=ht({key:c,route:e,manifest:r,mapRouteProperties:n});o&&(s.push(o),c===t&&(i=o))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return null==u||u.catch(()=>{}),null==i||i.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:i}}(n.route,qt(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function wt(e,t,r,n,a,o,i,l,s,u=null,c){let d=!1,h=gt(e,t,r,o,i);return{...o,_lazyPromises:h,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler:e=>(d=!0,u?st(o,"boolean"==typeof c?{...u,defaultShouldRevalidate:c}:"boolean"==typeof e?{...u,defaultShouldRevalidate:e}:u):s),resolve(e){let{lazy:t,loader:i,middleware:u}=o.route,c=d||s||e&&!qt(r.method)&&(t||i),f=u&&u.length>0&&!i&&!t;return!c||!qt(r.method)&&f?Promise.resolve({type:"data",result:void 0}):async function({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,c=qt(e.method),d=c?"action":"loader",h=a=>{let o,s=new Promise((e,t)=>o=t);u=()=>o(),e.signal.addEventListener("abort",u);let c=o=>"function"!=typeof a?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):a({request:e,url:Ct(e,t),pattern:r,params:n.params,context:l},...void 0!==o?[o]:[]),h=(async()=>{try{return{type:"data",result:await(i?i(e=>c(e)):c())}}catch(e){return{type:"error",result:e}}})();return Promise.race([h,s])};try{let t=c?n.route.action:n.route.loader;if(a||o)if(t){let e,[r]=await Promise.all([h(t).catch(t=>{e=t}),a,o]);if(void 0!==e)throw e;s=r}else{await a;let t=c?n.route.action:n.route.loader;if(!t){if("action"===d){let t=new URL(e.url),r=t.pathname+t.search;throw jt(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([h(t),o])}else{if(!t){let t=new URL(e.url);throw jt(404,{pathname:t.pathname+t.search})}s=await h(t)}}catch(f){return{type:"error",result:f}}finally{u&&e.signal.removeEventListener("abort",u)}return s}({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:null==h?void 0:h.handler,lazyRoutePromise:null==h?void 0:h.route,handlerOverride:e,scopedContext:l})}}}function bt(e,t,r,n,a,o,i,l,s=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:gt(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:wt(e,t,r,n,Se(a),u,i,l,!0,s))}async function Et(e){var t,r,n,a,o;let{result:i,type:l}=e;if(Wt(i)){let e;try{e=await async function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(i)}catch(s){return{type:"error",error:s}}return"error"===l?{type:"error",error:new Ee(i.status,i.statusText,e),statusCode:i.status,headers:i.headers}:{type:"data",data:e,statusCode:i.status,headers:i.headers}}return"error"===l?Bt(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:null==(t=i.init)?void 0:t.status,headers:(null==(r=i.init)?void 0:r.headers)?new Headers(i.init.headers):void 0}:{type:"error",error:Nt(i),statusCode:Re(i)?i.status:void 0,headers:(null==(n=i.init)?void 0:n.headers)?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Re(i)?i.status:void 0}:Bt(i)?{type:"data",data:i.data,statusCode:null==(a=i.init)?void 0:a.status,headers:(null==(o=i.init)?void 0:o.headers)?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function Rt(e,t,r,n,a){let o=e.headers.get("Location");if(D(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!le(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=nt(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var St=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function xt(e){try{return St.includes(new URL(e).protocol)}catch{return!1}}function kt(e,t,r,n){if(le(e)){let n=e,a=x.test(n)?new URL(k(n,t.protocol)):new URL(n);if(xt(a.toString()))throw new Error("Invalid redirect location");let o=null!=ie(a.pathname,r);
11if(a.origin===t.origin&&o)return fe(a.pathname)+a.search+a.hash}try{if(xt(n.createURL(e).toString()))throw new Error("Invalid redirect location")}catch(a){}return e}function Lt(e,t,r,n){let a=e.createURL(Ut(t)).toString(),o={signal:r};if(n&&qt(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=Pt(n.formData):o.body=n.formData}return new Request(a,o)}function Ct(e,t){let r=new URL(e.url),n="string"==typeof t?j(t):t;if(r.pathname=n.pathname||"/",n.search){let e=new URLSearchParams(n.search),t=e.getAll("index");e.delete("index");for(let r of t.filter(Boolean))e.append("index",r);r.search=e.size?`?${e.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function Pt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Tt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Dt(e,t,r,n,a,o,i){let{loaderData:l,errors:s}=function(e,t,r,n=!1,a=!1){let o,i={},l=null,s=!1,u={},c=r&&Ft(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let d=r.route.id,h=t[d];if(D(!It(h),"Cannot handle redirect results in processLoaderData"),Ft(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),l=l||{},a)l[d]=t;else{let r=Mt(e,d);null==l[r.route.id]&&(l[r.route.id]=t)}n||(i[d]=et),s||(s=!0,o=Re(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else i[d]=h.data,h.statusCode&&200!==h.statusCode&&!s&&(o=h.statusCode),h.headers&&(u[d]=h.headers)}),void 0!==c&&r&&(l={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:u}}(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t;if(a&&a.signal.aborted)return;let l=o[r];if(D(l,"Did not find corresponding fetcher result"),Ft(l)){let t=Mt(e.matches,null==n?void 0:n.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:l.error}),i.delete(r)}else if(It(l))D(!1,"Unhandled fetcher revalidation redirect");else{let e=Xt(l.data);i.set(r,e)}}),{loaderData:l,errors:s}}function Ot(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==et).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function _t(e){return e?Ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Mt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function At(e){let t=1===e.length?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 jt(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",l=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new Ee(e||500,i,new Error(l),!0)}function $t(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[e,n]=t[r];
11if(It(n))return{key:e,result:n}}}function Ut(e){return A({..."string"==typeof e?j(e):e,hash:""})}function Nt(e){var t,r;return new Ee((null==(t=e.init)?void 0:t.status)??500,(null==(r=e.init)?void 0:r.statusText)??"Internal Server Error",e.data)}function Ht(e){return null!=e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}(t))}function zt(e){return Wt(e.result)&&Ve.has(e.result.status)}function Ft(e){return"error"===e.type}function It(e){return"redirect"===(e&&e.type)}function Bt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Wt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function qt(e){return We.has(e.toUpperCase())}function Yt(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function Vt(e,t){let r="string"==typeof t?j(t).search:t.search;if(e[e.length-1].route.index&&Yt(r||""))return e[e.length-1];let n=ce(e);return n[n.length-1]}function Jt(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function Kt(e,t,r,n){if(n){return{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}return{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Gt(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Xt(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 Qt(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}});return{promise:r,resolve:e,reject:t}}var Zt=u.createContext(null);Zt.displayName="DataRouter";var er=u.createContext(null);er.displayName="DataRouterState";var tr=u.createContext(!1);function rr(){return u.useContext(tr)}var nr=u.createContext({isTransitioning:!1});nr.displayName="ViewTransition";var ar=u.createContext(new Map);ar.displayName="Fetchers",u.createContext(null).displayName="Await";var or=u.createContext(null);or.displayName="Navigation";var ir=u.createContext(null);ir.displayName="Location";var lr=u.createContext({outlet:null,matches:[],isDataRoute:!1});lr.displayName="Route";var sr=u.createContext(null);sr.displayName="RouteError";var ur="REACT_ROUTER_ERROR";function cr(){return null!=u.useContext(ir)}function dr(){return D(cr(),"useLocation() may be used only in the context of a <Router> component."),u.useContext(ir).location}var hr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fr(e){u.useContext(or).static||u.useLayoutEffect(e)}function pr(){let{isDataRoute:e}=u.useContext(lr);return e?function(){let{router:e}=Lr("useNavigate"),t=Pr("useNavigate"),r=u.useRef(!1);return fr(()=>{r.current=!0}),u.useCallback(async(n,a={})=>{O(r.current,hr),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){D(cr(),"useNavigate() may be used only in the context of a <Router> component.");let e=u.useContext(Zt),{basename:t,navigator:r}=u.useContext(or),{matches:n}=u.useContext(lr),{pathname:a}=dr(),o=JSON.stringify(de(n)),i=u.useRef(!1);return fr(()=>{i.current=!0}),u.useCallback((n,l={})=>{if(O(i.current,hr),!i.current)return;if("number"==typeof n)return void r.go(n);let s=he(n,JSON.parse(o),a,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:pe([t,s.pathname])),Ne("string"==typeof n?n:A(n),r.createHref(s),$e(r),"reject"),(l.replace?r.replace:r.push)(s,l.state,l)},[t,r,o,a,e])}()}var mr=u.createContext(null);function yr(){let{matches:e}=u.useContext(lr),t=e[e.length-1];return(null==t?void 0:t.params)??{}}function vr(e,{relative:t}={}){let{matches:r}=u.useContext(lr),{pathname:n}=dr(),a=JSON.stringify(de(r));return u.useMemo(()=>he(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function gr(e,t,r){var n;D(cr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=u.useContext(or),{matches:o}=u.useContext(lr),i=o[o.length-1],l=i?i.params:{},s=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let e=d&&d.path||"";_r(s,!d||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.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h,f=dr();if(t){let e="string"==typeof t?j(t):t;D("/"===c||(null==(n=e.pathname)?void 0:n.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.`),h=e}else h=f;let p=h.pathname||"/",m=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):B(e,{pathname:m});O(d||null!=y,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),O(null==y||void 0!==y[y.length-1].route.element||void 0!==y[y.length-1].route.Component||void 0!==y[y.length-1].route.lazy,`Matched leaf route at location "${h.pathname}${h.search}${h.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 v=function(e,t=[],r){let n=null==r?void 0:r.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=null==n?void 0:n.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));D(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:o}
11=n,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||s){r.isStatic&&(i=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let s=null==r?void 0:r.onError,c=n&&s?(e,t)=>{var r,a;s(e,{location:n.location,params:(null==(a=null==(r=n.matches)?void 0:r[0])?void 0:a.params)??{},pattern:Se(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,s)=>{let d,h=!1,f=null,p=null;n&&(d=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||br,i&&(l<0&&0===s?(_r("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):l===s&&(h=!0,p=r.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,s+1)),y=()=>{let t;return t=d?f:h?p:r.route.Component?u.createElement(r.route.Component,null):r.route.element?r.route.element:e,u.createElement(xr,{match:r,routeContext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===s)?u.createElement(Er,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:y(),routeC
11ontext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):y()},null)}(y&&y.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:pe([c,a.encodeLocation?a.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:pe([c,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return t&&v?u.createElement(ir.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},v):v}function wr(){let e=function(){var e;let t=u.useContext(sr),r=Cr("useRouteError"),n=Pr("useRouteError");if(void 0!==t)return t;return null==(e=r.errors)?void 0:e[n]}(),t=Re(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=u.createElement(u.Fragment,null,u.createElement("p",null,"ð¿ Hey developer ð"),u.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",u.createElement("code",{style:o},"ErrorBoundary")," or"," ",u.createElement("code",{style:o},"errorElement")," prop on your route.")),u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},t),r?u.createElement("pre",{style:a},r):null,i)}var br=u.createElement(wr,null),Er=class extends u.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.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&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${ur}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new Ee(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?u.createElement(lr.Provider,{value:this.props.routeContext},u.createElement(sr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?u.createElement(Sr,{error:e},t):t}};Er.contextType=tr;var Rr=new WeakMap;function Sr({children:e,error:t}){let{basename:r,navigator:n}=u.useContext(or);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${ur}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let a=Rr.get(t);if(a)throw a;let o=ke(e.location,r),i=o.absoluteURL||o.to;if(Ne(e.location,i,$e(n),"allow-explicit"),xt(i))throw new Error("Invalid redirect location");if(xe&&!Rr.get(t)){if(!o.isExternal&&!e.reloadDocument){const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw Rr.set(t,r),r}window.location.href=i}return u.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i}`})}}return e}function xr({routeContext:e,match:t,children:r}){let n=u.useContext(Zt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),u.createElement(lr.Provider,{value:e},r)}function kr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Lr(e){let t=u.useContext(Zt);return D(t,kr(e)),t}function Cr(e){let t=u.useContext(er);return D(t,kr(e)),t}function Pr(e){let t=function(e){let t=u.useContext(lr);return D(t,kr(e)),t}(e),r=t.matches[t.matches.length-1];return D(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var Tr=0;function Dr(e){let{router:t,basename:r}=Lr("useBlocker"),n=Cr("useBlocker"),[a,o]=u.useState(""),i=u.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:{...n,pathname:ie(n.pathname,r)||n.pathname},nextLocation:{...a,pathname:ie(a.pathname,r)||a.pathname},historyAction:o})},[r,e]);return u.useEffect(()=>{let e=String(++Tr);return o(e),()=>t.deleteBlocker(e)},[t]),u.useEffect(()=>{""!==a&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Xe}var Or={};function _r(e,t,r){t||Or[e]||(Or[e]=!0,O(!1,r))}var Mr={};function Ar(e,t){e||Mr[t]||(Mr[t]=!0,console.warn(t))}var jr=d.useOptimistic,$r=()=>{};function Ur(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&O(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:u.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&O(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:u.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&O(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:u.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Nr=["HydrateFallback","hydrateFallbackElement"],Hr=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>
11{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function zr({router:e,flushSync:t,onError:r,useTransitions:n}){let a=rr();n=a||n;let[o,i]=u.useState(e.state),[l,s]=(c=o,jr?jr(c):[c,$r]);var c;let[d,h]=u.useState(),[f,p]=u.useState({isTransitioning:!1}),[m,y]=u.useState(),[v,g]=u.useState(),[w,b]=u.useState(),E=u.useRef(new Map),R=u.useCallback((a,{deletedFetchers:o,newErrors:l,flushSync:c,viewTransitionOpts:d})=>{l&&r&&Object.values(l).forEach(e=>{var t;return r(e,{location:a.location,params:(null==(t=a.matches[0])?void 0:t.params)??{},pattern:Se(a.matches)})}),a.fetchers.forEach((e,t)=>{void 0!==e.data&&E.current.set(t,e.data)}),o.forEach(e=>E.current.delete(e)),Ar(!1===c||null!=t,'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 f=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(Ar(null==d||f,"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."),d&&f){if(t&&c){t(()=>{v&&(null==m||m.resolve(),v.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:d.currentLocation,nextLocation:d.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>i(a))});return r.finished.finally(()=>{t(()=>{y(void 0),g(void 0),h(void 0),p({isTransitioning:!1})})}),void t(()=>g(r))}v?(null==m||m.resolve(),v.skipTransition(),b({state:a,currentLocation:d.currentLocation,nextLocation:d.nextLocation})):(h(a),p({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}))}else t&&c?t(()=>i(a)):!1===n?i(a):u.startTransition(()=>{!0===n&&s(e=>Fr(e,a)),i(a)})},[e.window,t,v,m,n,s,r]);u.useLayoutEffect(()=>e.subscribe(R),[e,R]),u.useEffect(()=>{f.isTransitioning&&!f.flushSync&&y(new Hr)},[f]),u.useEffect(()=>{if(m&&d&&e.window){let t=d,r=m.promise,a=e.window.document.startViewTransition(async()=>{!1===n?i(t):u.startTransition(()=>{!0===n&&s(e=>Fr(e,t)),i(t)}),await r});a.finished.finally(()=>{y(void 0),g(void 0),h(void 0),p({isTransitioning:!1})}),g(a)}},[d,m,e.window,n,s]),u.useEffect(()=>{m&&d&&l.location.key===d.location.key&&m.resolve()},[m,v,l.location,d]),u.useEffect(()=>{!f.isTransitioning&&w&&(h(w.state),p({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),b(void 0))},[f.isTransitioning,w]);let S=u.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[e]),x=e.basename||"/",k=u.useMemo(()=>({router:e,navigator:S,static:!1,basename:x,onError:r}),[e,S,x,r]);return u.createElement(u.Fragment,null,u.createElement(Zt.Provider,{value:k},u.createElement(er.Provider,{value:l},u.createElement(ar.Provider,{value:E.current},u.createElement(nr.Provider,{value:f},u.createElement(Yr,{basename:x,location:l.location,navigationType:l.historyAction,navigator:S,useTransitions:n},u.createElement(Ir,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Fr(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var Ir=u.memo(function({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return gr(e,void 0,{manifest:t,state:n,isStatic:a,onError:o})});function Br({to:e,replace:t,state:r,relative:n}){D(cr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:o}=u.useContext(or);O(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=u.useContext(lr),{pathname:l}=dr(),s=pr(),c=he(e,de(i),l,"path"===n);Ne("string"==typeof e?e:A(e),o.createHref(c),$e(o),"reject");let d=JSON.stringify(c);return u.useEffect(()=>{s(JSON.parse(d),{replace:t,state:r,relative:n})},[s,d,n,t,r]),null}function Wr(e){return function(e){let t=u.useContext(lr).outlet;return u.useMemo(()=>t&&u.createElement(mr.Provider,{value:e},t),[t,e])}(e.context)}function qr(e){D(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Yr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){D(!cr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=u.useMemo(()=>({basename:l,navigator:a,static:o,useTransitions:i,future:{}}),[l,a,o,i]);"string"==typeof r&&(r=j(r));let{pathname:c="/",search:d="",hash:h="",state:f=null,key:p="default",mask:m}=r,y=u.useMemo(()=>{let e=ie(c,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:f,key:p,mask:m},navigationType:n}},[l,c,d,h,f,p,n,m]);
11return O(null!=y,`<Router basename="${l}"> is not able to match the URL "${c}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==y?null:u.createElement(or.Provider,{value:s},u.createElement(ir.Provider,{children:t,value:y}))}function Vr({children:e,location:t}){return gr(Jr(e),t)}function Jr(e,t=[]){let r=[];return u.Children.forEach(e,(e,n)=>{if(!u.isValidElement(e))return;let a=[...t,n];if(e.type===u.Fragment)return void r.push.apply(r,Jr(e.props.children,a));D(e.type===qr,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),D(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Jr(e.props.children,a)),r.push(o)}),r}var Kr="get",Gr="application/x-www-form-urlencoded";function Xr(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function Qr(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var Zr=null;var en=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tn(e){return null==e||en.has(e)?e:(O(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gr}"`),null)}function rn(e,t){let r,n,a,o,i;if(Xr(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?ie(i,t):null,r=e.getAttribute("method")||Kr,a=tn(e.getAttribute("enctype"))||Gr,o=new FormData(e)}else if(function(e){return Xr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Xr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?ie(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||Kr,a=tn(e.getAttribute("formenctype"))||tn(i.getAttribute("enctype"))||Gr,o=new FormData(i,e),!function(){if(null===Zr)try{new FormData(document.createElement("form"),0),Zr=!1}catch(e){Zr=!0}return Zr}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else{if(Xr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Kr,n=null,a=Gr,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}function nn(e,t){if(!1===e||null==e)throw new Error(t)}function an(e,t,r,n){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:"/"===a.pathname?a.pathname=`_root.${n}`:t&&"/"===ie(a.pathname,t)?a.pathname=`${me(t)}/_root.${n}`:a.pathname=`${me(a.pathname)}.${n}`,a}function on(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function ln(e,t,r){return function(e,t){let r=new Set;return new Set(t),e.reduce((e,t)=>{let n=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(t));return r.has(n)||(r.add(n),e.push({key:n,link:t})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.
11isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(on).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function sn(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null==(n=r[t].route.path)?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{var s;let u=n.routes[t.route.id];if(!u||!u.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:(null==(s=r[0])?void 0:s.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function un(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1),[...new Set(n)];var n}function cn(){let e=u.useContext(Zt);return nn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dn=u.createContext(void 0);function hn(){let e=u.useContext(dn);return nn(e,"You must render this element inside a <HydratedRouter> element"),e}function fn(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function pn({page:e,...t}){let r=rr(),{nonce:n}=hn(),{router:a}=cn(),o=u.useMemo(()=>B(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(null==t.nonce&&n&&(t={...t,nonce:n}),r?u.createElement(mn,{page:e,matches:o,...t}):u.createElement(yn,{page:e,matches:o,...t})):null}function mn({page:e,matches:t,...r}){let n=dr(),{future:a}=hn(),{basename:o}=cn(),i=u.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=an(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),i=!1,l=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?i=!0:l.push(e.route.id);return i&&l.length>0&&r.searchParams.set("_routes",l.join(",")),[r.pathname+r.search]},[o,a.v8_trailingSlashAwareDataRequests,e,n,t]);return u.createElement(u.Fragment,null,i.map(e=>u.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})))}function yn({page:e,matches:t,...r}){let n=dr(),{future:a,manifest:o,routeModules:i}=hn(),{basename:l}=cn(),{loaderData:s,matches:c}=function(){let e=u.useContext(er);return nn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),d=u.useMemo(()=>sn(e,t,c,o,n,"data"),[e,t,c,o,n]),h=u.useMemo(()=>sn(e,t,c,o,n,"assets"),[e,t,c,o,n]),f=u.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,u=!1;if(t.forEach(e=>{var t;let n=o.routes[e.route.id];n&&n.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(null==(t=i[e.route.id])?void 0:t.shouldRevalidate)||n.hasClientLoader?u=!0:r.add(e.route.id))}),0===r.size)return[];let c=an(e,l,a.v8_trailingSlashAwareDataRequests,"data");return u&&r.size>0&&c.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[l,a.v8_trailingSlashAwareDataRequests,s,n,o,d,t,e,i]),p=u.useMemo(()=>un(h,o),[h,o]),m=function(e){let{manifest:t,routeModules:r}=hn(),[n,a]=u.useState([]);return u.useEffect(()=>{let n=!1;return ln(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),n}(h);return u.createElement(u.Fragment,null,f.map(e=>u.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),p.map(e=>u.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),m.map(({key:e,link:t})=>u.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function vn(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}dn.displayName="FrameworkContext";var gn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{gn&&(window.__reactRouterVersion="7.18.3")}catch(On){}function wn(e,t){return rt({basename:null==t?void 0:t.basename,getContext:null==t?void 0:t.getContext,future:null==t?void 0:t.future,history:T({window:null==t?void 0:t.window}),hydrationData:bn(),routes:e,mapRouteProperties:Ur,hydrationRouteProperties:Nr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window,instrumentations:null==t?void 0:t.instrumentations}).initialize()}function bn(){let e=null==window?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:En(e.errors)}),e}function En(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new Ee(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if("string"==typeof a.__subType&&be.includes(a.__subType)){let e=window[a.__subType];if("function"==typeof e)try{let t=new e(a.message);t.stack="",r[n]=t}catch(On){}}if(null==r[n]){let e=new Error(a.message);
11e.stack="",r[n]=e}}else r[n]=a;return r}var Rn=u.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:a,replace:o,mask:i,state:l,target:s,to:c,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:f,...p},m){let{basename:y,navigator:v,useTransitions:g}=u.useContext(or),w="string"==typeof c&&S.test(c),b=ke(c,y),E=function(e,{relative:t}={}){D(cr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=u.useContext(or),{hash:a,pathname:o,search:i}=vr(e,{relative:t}),l=o;return"/"!==r&&(l="/"===o?r:pe([r,o])),n.createHref({pathname:l,search:i,hash:a})}(c=b.to,{relative:n}),R=dr(),x=null;if(i){let e=he(i,[],R.mask?R.mask.pathname:"/",!0);"/"!==y&&(e.pathname="/"===e.pathname?y:pe([y,e.pathname])),x=v.createHref(e)}let[k,L,C]=function(e,t){let r=u.useContext(dn),[n,a]=u.useState(!1),[o,i]=u.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=t,f=u.useRef(null);u.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),u.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{a(!0)},m=()=>{a(!1),i(!1)};return r?"intent"!==e?[o,f,{}]:[o,f,{onFocus:fn(l,p),onBlur:fn(s,m),onMouseEnter:fn(c,p),onMouseLeave:fn(d,m),onTouchStart:fn(h,p)}]:[!1,f,{}]}(r,p),P=function(e,{target:t,replace:r,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:c}={}){let d=pr(),h=dr(),f=vr(e,{relative:i});return u.useCallback(p=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(p,t)){p.preventDefault();let t=void 0!==r?r:A(h)===A(f),m=()=>d(e,{replace:t,mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});c?u.startTransition(()=>m()):m()}},[h,d,f,r,n,a,t,e,o,i,l,s,c])}(c,{replace:o,mask:i,state:l,target:s,preventScrollReset:d,relative:n,viewTransition:h,defaultShouldRevalidate:f,useTransitions:g});let T=!(b.isExternal||a),O=u.createElement("a",{...p,...C,href:(T?x:void 0)||b.absoluteURL||E,onClick:T?function(t){e&&e(t),t.defaultPrevented||P(t)}:e,ref:vn(m,L),target:s,"data-discover":w||"render"!==t?void 0:"true"});return k&&!w?u.createElement(u.Fragment,null,O,u.createElement(pn,{page:E})):O});Rn.displayName="Link";var Sn=u.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:a,to:o,viewTransition:i,children:l,...s},c){let d=vr(o,{relative:s.relative}),h=dr(),f=u.useContext(er),{navigator:p,basename:m}=u.useContext(or),y=null!=f&&function(e,{relative:t}={}){let r=u.useContext(nr);D(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xn("useViewTransitionState"),a=vr(e,{relative:t});if(!r.isTransitioning)return!1;let o=ie(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ie(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ne(a.pathname,i)||null!=ne(a.pathname,o)}(d)&&!0===i,v=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,g=h.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(g=g.toLowerCase(),w=w?w.toLowerCase():null,v=v.toLowerCase()),w&&m&&(w=ie(w,m)||w);const b="/"!==v&&v.endsWith("/")?v.length-1:v.length;let E,R=g===v||!n&&g.startsWith(v)&&"/"===g.charAt(b),S=null!=w&&(w===v||!n&&w.startsWith(v)&&"/"===w.charAt(v.length)),x={isActive:R,isPending:S,isTransitioning:y},k=R?e:void 0;E="function"==typeof r?r(x):[r,R?"active":null,S?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof a?a(x):a;return u.createElement(Rn,{...s,"aria-current":k,className:E,ref:c,style:L,to:o,viewTransition:i},"function"==typeof l?l(x):l)});function xn(e){let t=u.useContext(Zt);return D(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function kn(e){O("undefined"!=typeof URLSearchParams,"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=u.useRef(Qr(e)),r=u.useRef(!1),n=dr(),a=u.useMemo(()=>function(e,t){let r=Qr(e);return t&&t.forEach((e,n)=>
11{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(n.search,r.current?null:t.current),[n.search]),o=pr(),i=u.useCallback((e,t)=>{const n=Qr("function"==typeof e?e(new URLSearchParams(a)):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}Sn.displayName="NavLink",u.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Kr,action:l,onSubmit:s,relative:c,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:y}=u.useContext(or),v=function(){let{router:e}=xn("useSubmit"),{basename:t}=u.useContext(or),r=Pr("useRouteId"),n=e.fetch,a=e.navigate;return u.useCallback(async(e,o={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=rn(e,t);if(!1===o.navigate){let e=o.fetcherKey||Cn();await n(e,r,o.action||i,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,flushSync:o.flushSync})}else await a(o.action||i,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,t,r])}(),g=function(e,{relative:t}={}){let{basename:r}=u.useContext(or),n=u.useContext(lr);D(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...vr(e||".",{relative:t})},i=dr();if(null==e){o.search=i.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();o.search=r?`?${r}`:""}}e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:pe([r,o.pathname]));return A(o)}(l,{relative:c}
11),w="get"===i.toLowerCase()?"get":"post",b="string"==typeof l&&S.test(l);return u.createElement("form",{ref:m,method:w,action:g,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=(null==n?void 0:n.getAttribute("formmethod"))||i,p=()=>v(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:a,state:o,relative:c,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:f});y&&!1!==r?u.startTransition(()=>p()):p()},...p,"data-discover":b||"render"!==e?void 0:"true"})}).displayName="Form";var Ln=0,Cn=()=>`__${String(++Ln)}__`;var Pn=v();const Tn=r(Pn);function Dn(e){return u.createElement(zr,{flushSync:Pn.flushSync,...e})}export{Rn as L,Br as N,Wr as O,c as R,kn as a,dr as b,Pn as c,Sn as d,yr as e,Dr as f,cr as g,r as h,t as i,Vr as j,qr as k,d as l,ne as m,ir as n,s as o,v as p,Tn as q,u as r,wn as s,Dn as t,pr as u,we as v}; 12//# sourceMappingURL=vendor-react-Cg5IBgwO.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.