1import{r as c,R as Gn}from"./index-x-_6-L0V.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bdc5250c-8220-4fb3-902f-1088969e7a28",e._sentryDebugIdIdentifier="sentry-dbid-bdc5250c-8220-4fb3-902f-1088969e7a28")}catch{}})();/** 2 * react-router v7.14.2 3 * 4 * Copyright (c) Remix Software Inc. 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.md file in the root directory of this source tree. 8 * 9 * @license MIT 10 */var Ma=e=>{throw TypeError(e)},Xn=(e,t,r)=>t.has(e)||Ma("Cannot "+r),qt=(e,t,r)=>(Xn(e,t,"read from private field"),r?r.call(e):t.get(e)),qn=(e,t,r)=>t.has(e)?Ma("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Gr="popstate";function Xr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function cs(e={}){function t(a,n){var u;let o=(u=n.state)==null?void 0:u.masked,{pathname:l,search:i,hash:s}=o||a.location;return ct("",{pathname:l,search:i,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:xe(n)}return Zn(t,r,null,e)}function j(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ee(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qn(){return Math.random().toString(36).substring(2,10)}function qr(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ct(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ce(t):t,state:r,key:t&&t.key||a||Qn(),unstable_mask:n}}function xe({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ce(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Zn(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,l=n.history,i="POP",s=null,u=h();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function h(){return(l.state||{idx:null}).idx}function d(){i="POP";let v=h(),C=v==null?null:v-u;u=v,s&&s({action:i,location:R.location,delta:C})}function m(v,C){i="PUSH";let S=Xr(v)?v:ct(R.location,v,C);u=h()+1;let D=qr(S,u),I=R.createHref(S.unstable_mask||S);try{l.pushState(D,"",I)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;n.location.assign(I)}o&&s&&s({action:i,location:R.location,delta:1})}function y(v,C){i="REPLACE";let S=Xr(v)?v:ct(R.location,v,C);u=h();let D=qr(S,u),I=R.createHref(S.unstable_mask||S);l.replaceState(D,"",I),o&&s&&s({action:i,location:R.location,delta:0})}function E(v){return Da(v)}let R={get action(){return i},get location(){return e(n,l)},listen(v){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Gr,d),s=v,()=>{n.removeEventListener(Gr,d),s=null}},createHref(v){return t(n,v)},createURL:E,encodeLocation(v){let C=E(v);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:m,replace:y,go(v){return l.go(v)}};return R}function Da(e,t=!1){let r="http://localhost";
10typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),j(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:xe(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var it,Qr=class{constructor(e){if(qn(this,it,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(qt(this,it).has(e))return qt(this,it).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){qt(this,it).set(e,t)}};it=new WeakMap;var eo=new Set(["lazy","caseSensitive","path","id","index","children"]);function to(e){return eo.has(e)}var ro=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function ao(e){return ro.has(e)}function no(e){return e.index===!0}function dt(e,t,r=[],a={},n=!1){return e.map((o,l)=>{let i=[...r,String(l)],s=typeof o.id=="string"?o.id:i.join("-");if(j(o.index!==!0||!o.children,"Cannot specify children on an index route"),j(n||!a[s],`Found a route id collision on i
10d "${s}". Route id's must be globally unique within Data Router usages`),no(o)){let u={...o,id:s};return a[s]=Zr(u,t(u)),u}else{let u={...o,id:s,children:void 0};return a[s]=Zr(u,t(u)),o.children&&(u.children=dt(o.children,t,i,a,n)),u}})}function Zr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Fe(e,t,r="/"){return st(e,t,r,!1)}function st(e,t,r,a){let n=typeof t=="string"?Ce(t):t,o=ce(n.pathname||"/",r);if(o==null)return null;let l=Fa(e);oo(l);let i=null;for(let s=0;i==null&&s<l.length;++s){let u=yo(o);i=po(l[s],u,a)}return i}function Ta(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Fa(e,t=[],r=[],a="",n=!1){let o=(l,i,s=n,u)=>{let h={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:i,route:l};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&s)return;j(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let d=ye([a,h.relativePath]),m=r.concat(h);l.children&&l.children.length>0&&(j(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Fa(l.children,t,m,d,s)),!(l.path==null&&!l.index)&&t.push({path:d,score:ho(d,l.index),routesMeta:m})};return e.forEach((l,i)=>{var s;if(l.path===""||!((s=l.path)!=null&&s.includes("?")))o(l,i);else for(let u of ka(l.path))o(l,i,!0,u)}),t}function ka(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let l=ka(a.join("/")),i=[];return i.push(...l.map(s=>s===""?o:[o,s].join("/"))),n&&i.push(...l),i.map(s=>e.startsWith("/")&&s===""?"/":s)}function oo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mo(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var lo=/^:[\w-]+$/,io=3,so=2,uo=1,co=10,fo=-2,ea=e=>e==="*";function ho(e,t){let r=e.split("/"),a=r.length;return r.some(ea)&&(a+=fo),t&&(a+=so),r.filter(n=>!ea(n)).reduce((n,o)=>n+(lo.test(o)?io:o===""?uo:co),a)}function mo(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function po(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",l=[];for(let i=0;i<a.length;++i){let s=a[i],u=i===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",d=_t({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},h),m=s.route;if(!d&&u&&r&&!a[a.length-1].route.index&&(d=_t({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!d)return null;
10Object.assign(n,d.params),l.push({params:n,pathname:ye([o,d.pathname]),pathnameBase:wo(ye([o,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(o=ye([o,d.pathnameBase]))}return l}function _t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Oa(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],l=o.replace(/(.)\/+$/,"$1"),i=n.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:d},m)=>{if(h==="*"){let E=i[m]||"";l=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const y=i[m];return d&&!y?u[h]=void 0:u[h]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:l,pattern:e}}function Oa(e,t=!1,r=!0){ee(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 a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,i,s,u,h)=>{if(a.push({paramName:i,isOptional:s!=null}),s){let d=h.charAt(u+l.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function yo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ee(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ce(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function vo({basename:e,pathname:t}){return t==="/"?e:ye([e,t])}var Ia=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vr=e=>Ia.test(e);function go(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ce(e):e,o;return r?(r=wr(r),r.startsWith("/")?o=ta(r.substring(1),"/"):o=ta(r,t)):o=t,{pathname:o,search:Eo(a),hash:Ro(n)}}function ta(e,t){let r=At(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Qt(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. 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 _a(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function gr(e){let t=_a(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Ut(e,t,r,a=!1){let n;typeof e=="string"?n=Ce(e):(n={...e},j(!n.pathname||!n.pathname.includes("?"),Qt("?","pathname","search",n)),j(!n.pathname||!n.pathname.includes("#"),Qt("#","pathname","hash",n)),j(!n.search||!n.search.includes("#"),Qt("#","search","hash",n)));let o=e===""||n.pathname==="",l=o?"/":n.pathname,i;if(l==null)i=r;else{let d=t.length-1;if(!a&&l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),d-=1;n.pathname=m.join("/")}i=d>=0?t[d]:"/"}let s=go(n,i),u=l&&l!=="/"&&l.endsWith("/"),h=(o||l===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var wr=e=>e.replace(/\/\/+/g,"/"),ye=e=>wr(e.join("/")),At=e=>e.replace(/\/+$/,""),wo=e=>At(e).replace(/^\/*/,"/"),Eo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ro=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,bo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function So(e,t){return new bo(e,typeof t=="number"?{status:t}:t)}var xo=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},_e=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ve(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function tt(e){let t=e.map(r=>
10r.route.path).filter(Boolean);return ye(t)||"/"}var Aa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Na(e,t){let r=e;if(typeof r!="string"||!Ia.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Aa)try{let o=new URL(window.location.href),l=r.startsWith("//")?new URL(o.protocol+r):new URL(r),i=ce(l.pathname,t);l.origin===o.origin&&i!=null?r=i+l.search+l.hash:n=!0}catch{ee(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var Ie=Symbol("Uninstrumented");function Lo(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let l=Object.keys(r);for(let i of l)o[i]&&r[i].push(o[i])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=Ze(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let l=n[o],i=r[`lazy.${o}`];if(typeof l=="function"&&i.length>0){let s=Ze(i,l,()=>{});s&&(a.lazy=Object.assign(a.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let l=o[Ie]??o,i=Ze(r[n],l,(...s)=>ra(s[0]));i&&(n==="loader"&&l.hydrate===!0&&(i.hydrate=!0),i[Ie]=l,a[n]=i)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Ie]??n,l=Ze(r.middleware,o,(...i)=>ra(i[0]));return l?(l[Ie]=o,l):n})),a}function Co(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let l of o)n[l]&&r[l].push(n[l])}})),r.navigate.length>0){let a=e.navigate[Ie]??e.navigate,n=Ze(r.navigate,a,(...o)=>{let[l,i]=o;return{to:typeof l=="number"||typeof l=="string"?l:l?xe(l):".",...aa(e,i??{})}});n&&(n[Ie]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Ie]??e.fetch,n=Ze(r.fetch,a,(...o)=>{let[l,,i,s]=o;return{href:i??".",fetcherKey:l,...aa(e,s??{})}});n&&(n[Ie]=a,e.fetch=n)}return e}function Ze(e,t,r){return e.length===0?null:async(...a)=>{let n=await $a(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function $a(e,t,r,a){let n=e[a],o;if(n){let l,i=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=$a(e,t,r,a-1),o=await l,j(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(i,t)}catch(s){console.error("An instrumentation function threw an error:",s)}l||await i(),await l}else try{o={type:"success",value:await r()}}catch(l){o={type:"error",value:l}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ra(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:Po(t),params:{...a},unstable_pattern:n,context:Mo(r)}}function aa(e,t){return{currentUrl:xe(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 Po(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Mo(e){if(To(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Do=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function To(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Do}var ja=["POST","PUT","PATCH","DELETE"],Fo=new Set(ja),ko=["GET",...ja],Oo=new Set(ko),Ua=new Set([301,302,303,307,308]),Io=new Set([307,308]),Zt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},za={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},_o=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ha="remix-router-transitions",Ba=Symbol("ResetLoaderData");function ds(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";j(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||_o,o=n;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=p=>({...n(p),...Lo(f.map(w=>
10w.route).filter(Boolean),p)})}let l={},i=dt(e.routes,o,void 0,l),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Uo,d={unstable_passThroughRequests:!1,...e.future},m=null,y=new Set,E=null,R=null,v=null,C=e.hydrationData!=null,S=Fe(i,e.history.location,u),D=!1,I=null,x,P;if(S==null&&!e.patchRoutesOnNavigation){let f=Re(404,{pathname:e.history.location.pathname}),{matches:p,route:w}=xt(i);x=!0,P=!x,S=p,I={[w.id]:f}}else if(S&&!e.hydrationData&&wt(S,i,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))x=!1,P=!x;else if(!S.some(f=>Er(f.route)))x=!0,P=!x;else{let f=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null,w=S;if(p){let b=S.findIndex(L=>p[L.route.id]!==void 0);w=w.slice(0,b+1)}P=!1,x=!0,w.forEach(b=>{let L=Wa(b.route,f,p);P=P||L.renderFallback,x=x&&!L.shouldLoad})}else{x=!1,P=!x,S=[];let f=wt(null,i,e.history.location.pathname);f.active&&f.matches&&(D=!0,S=f.matches)}let T,g={historyAction:e.history.action,location:e.history.location,matches:S,initialized:x,renderFallback:P,navigation:Zt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||I,fetchers:new Map,blockers:new Map},_="POP",U=null,J=!1,W,q=!1,Q=new Map,B=null,H=!1,X=!1,ge=new Set,G=new Map,ae=0,de=-1,Se=new Map,oe=new Set,we=new Map,Ee=new Map,he=new Set,
10Ne=new Map,vt,$e=null;function Fn(){if(m=e.history.listen(({action:f,location:p,delta:w})=>{if(vt){vt(),vt=void 0;return}ee(Ne.size===0||w!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let b=Wr({currentLocation:g.location,nextLocation:p,historyAction:f});if(b&&w!=null){let L=new Promise(A=>{vt=A});e.history.go(w*-1),gt(b,{state:"blocked",location:p,proceed(){gt(b,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),L.then(()=>e.history.go(w))},reset(){let A=new Map(g.blockers);A.set(b,qe),le({blockers:A})}}),U==null||U.resolve(),U=null;return}return je(f,p)}),r){nl(t,Q);let f=()=>ol(t,Q);t.addEventListener("pagehide",f),B=()=>t.removeEventListener("pagehide",f)}return g.initialized||je("POP",g.location,{initialHydration:!0}),T}function kn(){m&&m(),B&&B(),y.clear(),W&&W.abort(),g.fetchers.forEach((f,p)=>Kt(p)),g.blockers.forEach((f,p)=>Br(p))}function On(f){return y.add(f),()=>y.delete(f)}function le(f,p={}){f.matches&&(f.matches=f.matches.map(L=>{let A=l[L.route.id],k=L.route;return k.element!==A.element||k.errorElement!==A.errorElement||k.hydrateFallbackElement!==A.hydrateFallbackElement?{...L,route:A}:L})),g={...g,...f};let w=[],b=[];g.fetchers.forEach((L,A)=>{L.state==="idle"&&(he.has(A)?w.push(A):b.push(A))}),he.forEach(L=>{!g.fetchers.has(L)&&!G.has(L)&&w.push(L)}),[...y].forEach(L=>L(g,{deletedFetchers:w,newErrors:f.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),w.forEach(L=>Kt(L)),b.forEach(L=>g.fetchers.delete(L))}function Ge(f,p,{flushSync:w}={}){var $,O;let b=g.actionData!=null&&g.navigation.formMethod!=null&&se(g.navigation.formMethod)&&g.navigation.state==="loading"&&(($=f.state)==null?void 0:$._isRedirect)!==!0,L;p.actionData?Object.keys(p.actionData).length>0?L=p.actionData:L=null:b?L=g.actionData:L=null;let A=p.loaderData?ma(g.loaderData,p.loaderData,p.matches||[],p.errors):g.loaderData,k=g.blockers;k.size>0&&(k=new Map(k),k.forEach((z,V)=>k.set(V,qe)));let N=H?!1:Yr(f,p.matches||g.matches),F=J===!0||g.navigation.formMethod!=null&&se(g.navigation.formMethod)&&((O=f.state)==null?void 0:O._isRedirect)!==!0;s&&(i=s,s=void 0),H||_==="POP"||(_==="PUSH"?e.history.push(f,f.state):_==="REPLACE"&&e.history.replace(f,f.state));let M;if(_==="POP"){let z=Q.get(g.location.pathname);z&&z.has(f.pathname)?M={currentLocation:g.location,nextLocation:f}:Q.has(f.pathname)&&(M={currentLocation:f,nextLocation:g.location})}else if(q){let z=Q.get(g.location.pathname);z?z.add(f.pathname):(z=new Set([f.pathname]),Q.set(g.location.pathname,z)),M={currentLocation:g.location,nextLocation:f}}le({...p,actionData:L,loaderData:A,historyAction:_,location:f,initialized:!0,renderFallback:!1,navigation:Zt,revalidation:"idle",restoreScrollPosition:N,preventScrollReset:F,blockers:k},{viewTransitionOpts:M,flushSync:w===!0}),_="POP",J=!1,q=!1,H=!1,X=!1,U==null||U.resolve(),U=null,$e==null||$e.resolve(),$e=null}async function Ar(f,p){if(U==null||U.resolve(),U=null,typeof f=="number"){U||(U=va());let Z=U.promise;return e.history.go(f),Z}let w=or(g.location,g.matches,u,f,p==null?void 0:p.fromRouteId,p==null?void 0:p.relative),{path:b,submission:L,error:A}=na(!1,w,p),k;p!=null&&p.unstable_mask&&(k={pathname:"",search:"",hash:"",...typeof p.unstable_mask=="str
10ing"?Ce(p.unstable_mask):{...g.location.unstable_mask,...p.unstable_mask}});let N=g.location,F=ct(N,b,p&&p.state,void 0,k);F={...F,...e.history.encodeLocation(F)};let M=p&&p.replace!=null?p.replace:void 0,$="PUSH";M===!0?$="REPLACE":M===!1||L!=null&&se(L.formMethod)&&L.formAction===g.location.pathname+g.location.search&&($="REPLACE");let O=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,z=(p&&p.flushSync)===!0,V=Wr({currentLocation:N,nextLocation:F,historyAction:$});if(V){gt(V,{state:"blocked",location:F,proceed(){gt(V,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),Ar(f,p)},reset(){let Z=new Map(g.blockers);Z.set(V,qe),le({blockers:Z})}});return}await je($,F,{submission:L,pendingError:A,preventScrollReset:O,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:z,callSiteDefaultShouldRevalidate:p&&p.unstable_defaultShouldRevalidate})}function In(){$e||($e=va()),Jt(),le({revalidation:"loading"});let f=$e.promise;return g.navigation.state==="submitting"?f:g.navigation.state==="idle"?(je(g.historyAction,g.location,{startUninterruptedRevalidation:!0}),f):(je(_||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation,enableViewTransition:q===!0}),f)}async function je(f,p,w){W&&W.abort(),W=null,_=f,H=(w&&w.startUninterruptedRevalidation)===!0,Vn(g.location,g.matches),J=(w&&w.preventScrollReset)===!0,q=(w&&w.enableViewTransition)===!0;let b=s||i,L=w&&w.overrideNavigation,A=w!=null&&w.initialHydration&&g.matches&&g.matches.length>0&&!D?g.matches:Fe(b,p,u),k=(w&&w.flushSync)===!0;if(A&&g.initialized&&!X&&Ko(g.location,p)&&!(w&&w.submission&&se(w.submission.formMethod))){Ge(p,{matches:A},{flushSync:k});return}let N=wt(A,b,p.pathname);if(N.active&&N.matches&&(A=N.matches),!A){let{error:re,notFoundMatches:ne,route:K}=Gt(p.pathname);Ge(p,{matches:ne,loaderData:{},errors:{[K.id]:re}},{flushSync:k});return}W=new AbortController;let F=Qe(e.history,p,W.signal,w&&w.submission),M=e.getContext?await e.getContext():new Qr,$;if(w&&w.pendingError)$=[Oe(A).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&se(w.submission.formMethod)){let re=await _n(F,p,w.submission,A,M,N.active,w&&w.initialHydration===!0,{replace:w.replace,flushSync:k});if(re.shortCircuited)return;if(re.pendingActionResult){let[ne,K]=re.pendingActionResult;if(pe(K)&&Ve(K.error)&&K.error.status===404){W=null,Ge(p,{matches:re.matches,loaderData:{},errors:{[ne]:K.error}});return}}A=re.matches||A,$=re.pendingActionResult,L=er(p,w.submission),k=!1,N.active=!1,F=Qe(e.history,F.url,F.signal)}let{shortCircuited:O,matches:z,loaderData:V,errors:Z}=await An(F,p,A,M,N.active,L,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,k,$,w&&w.callSiteDefaultShouldRevalidate);O||(W=null,Ge(p,{matches:z||A,...pa($),loaderData:V,errors:Z}))}async function _n(f,p,w,b,L,A,k,N={}){Jt();let F=rl(p,w);if(le({navigation:F},{flushSync:N.flushSync===!0}),A){let O=await Et(b,p.pathname,f.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){if(O.partialMatches.length===0){let{matches:V,route:Z}=xt(i);return{matches:V,pendingActionResult:[Z.id,{type:"error",error:O.error}]}}let z=Oe(O.partialMatches).route.id;return{matches:O.partialMatches,pendingActionResult:[z,{type:"error",error:O.error}]}}else if(O.matches)b=O.matches;else{let{notFoundMatches:z,error:V,route:Z}=Gt(p.pathname);return{matches:z,pendingActionResult:[Z.id,{type:"error",error:V}]}}}let M,$=Ft(b,p);if(!$.route.action&&!$.route.lazy)M={type:"error",error:Re(405,{method:f.method,pathname:p.pathname,routeId:$.route.id})};else{let O=et(o,l,f,p,b,$,k?[]:a,L),z=await rt(f,p,O,L,null);if(M=z[$.route.id],!M){for(let V of b)if(z[V.route.id]){M=z[V.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(We(M)){let O;return N&&N.replace!=null?O=N.replace:O=da(M.response.headers.get("Location"),new URL(f.url),u,e.history)===g.location.pathname+g.location.search,await Ue(f,M,!0,{submission:w,replace:O}),{shortCircuited:!0}}if(pe(M)){let O=Oe(b,$.route.id);return(N&&N.replace)!==!0&&(_="PUSH"),{matches:b,pendingActionResult:[O.route.id,M,$.route.id]}}return{matches:b,pendingActionResult:[$.route.id,M]}}async function An(f,p,w,b,L,A,k,N,F,M,$,O,z){let V=A||er(p,k),Z=k||N||ya(V),re=!H&&!M;if(L){if(re){let ie=Nr(O);le({navigation:V,...ie!==void 0?{actionData:ie}:{}},{flushSync:$})}let Y=await Et(w,p.pathname,f.signal);if(Y.type==="aborted")return{shortCircuited:!0};if(Y.type==="error"){if(Y.partialMatches.length===0){let{matches:Xe,route:Be}=xt(i);return{matches:Xe,loaderData:{},errors:{[Be.id]:Y.error}}}let ie=Oe(Y.partialMatches).route.id;return{matches:Y.partialMatches,loaderData:{},errors:{[ie]:Y.error}}}else if(Y.matches)w=Y.matches;else{let{error:ie,notFoundMatches:Xe,route:Be}=Gt(p.pathname);return{matches:Xe,loaderData:{},errors:{[Be.id]:ie}}}}let ne=s||i,{dsMatches:K,revalidatingFetchers:me}=oa(f,b,o,l,e.history,g,w,Z,p,M?[]:a,M===!0,X,ge,he,we,oe,ne,u,e.patchRoutesOnNavigation!=null,O,z);if(de=++ae,!e.dataStrategy&&!K.some(Y=>Y.shouldLoad)&&!K.some(Y=>Y.route.middleware&&Y.route.middleware.length>0)&&me.length===0){let Y=zr();return Ge(p,{matches:w,loaderData:{},errors:O&&pe(O[1])?{[O[0]]:O[1].error}:null,...pa(O),...Y?{fetchers:new Map(g.fetchers)}:{}},{flushSync:$}),{shortCircuited:!0}}if(re){let Y={};
10if(!L){Y.navigation=V;let ie=Nr(O);ie!==void 0&&(Y.actionData=ie)}me.length>0&&(Y.fetchers=Nn(me)),le(Y,{flushSync:$})}me.forEach(Y=>{De(Y.key),Y.controller&&G.set(Y.key,Y.controller)});let ze=()=>me.forEach(Y=>De(Y.key));W&&W.signal.addEventListener("abort",ze);let{loaderResults:at,fetcherResults:ke}=await $r(K,me,f,p,b);if(f.signal.aborted)return{shortCircuited:!0};W&&W.signal.removeEventListener("abort",ze),me.forEach(Y=>G.delete(Y.key));let Le=Lt(at);if(Le)return await Ue(f,Le.result,!0,{replace:F}),{shortCircuited:!0};if(Le=Lt(ke),Le)return oe.add(Le.key),await Ue(f,Le.result,!0,{replace:F}),{shortCircuited:!0};let{loaderData:Xt,errors:nt}=ha(g,w,at,O,me,ke);M&&g.errors&&(nt={...g.errors,...nt});let He=zr(),Rt=Hr(de),bt=He||Rt||me.length>0;return{matches:w,loaderData:Xt,errors:nt,...bt?{fetchers:new Map(g.fetchers)}:{}}}function Nr(f){if(f&&!pe(f[1]))return{[f[0]]:f[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function Nn(f){return f.forEach(p=>{let w=g.fetchers.get(p.key),b=ot(void 0,w?w.data:void 0);g.fetchers.set(p.key,b)}),new Map(g.fetchers)}async function $n(f,p,w,b){De(f);let L=(b&&b.flushSync)===!0,A=s||i,k=or(g.location,g.matches,u,w,p,b==null?void 0:b.relative),N=Fe(A,k,u),F=wt(N,A,k);if(F.active&&F.matches&&(N=F.matches),!N){Me(f,p,Re(404,{pathname:k}),{flushSync:L});return}let{path:M,submission:$,error:O}=na(!0,k,b);if(O){Me(f,p,O,{flushSync:L});return}let z=e.getContext?await e.getContext():new Qr,V=(b&&b.preventScrollReset)===!0;if($&&se($.formMethod)){await jn(f,p,M,N,z,F.active,L,V,$,b&&b.unstable_defaultShouldRevalidate);return}we.set(f,{routeId:p,path:M}),await Un(f,p,M,N,z,F.active,L,V,$)}async function jn(f,p,w,b,L,A,k,N,F,M){Jt(),we.delete(f);let $=g.fetchers.get(f);Pe(f,al(F,$),{flushSync:k});let O=new AbortController,z=Qe(e.history,w,O.signal,F);if(A){let te=await Et(b,new URL(z.url).pathname,z.signal,f);if(te.type==="aborted")return;if(te.type==="error"){Me(f,p,te.error,{flushSync:k});return}else if(te.matches)b=te.matches;else{Me(f,p,Re(404,{pathname:w}),{flushSync:k});return}}let V=Ft(b,w);if(!V.route.action&&!V.route.lazy){let te=Re(405,{method:F.formMethod,pathname:w,routeId:p});Me(f,p,te,{flushSync:k});return}G.set(f,O);let Z=ae,re=et(o,l,z,w,b,V,a,L),ne=await rt(z,w,re,L,f),K=ne[V.route.id];if(!K){for(let te of re)if(ne[te.route.id]){K=ne[te.route.id];break}}if(z.signal.aborted){G.get(f)===O&&G.delete(f);return}if(he.has(f)){if(We(K)||pe(K)){Pe(f,Te(void 0));return}}else{if(We(K))if(G.delete(f),de>Z){Pe(f,Te(void 0));return}else return oe.add(f),Pe(f,ot(F)),Ue(z,K,!1,{fetcherSubmission:F,preventScrollReset:N});if(pe(K)){Me(f,p,K.error);return}}let me=g.navigation.location||g.location,ze=Qe(e.history,me,O.signal),at=s||i,ke=g.navigation.state!=="idle"?Fe(at,g.navigation.location,u):g.matches;j(ke,"Didn't find any matches after fetcher action");let Le=++ae;Se.set(f,Le);let Xt=ot(F,K.data);g.fetchers.set(f,Xt);let{dsMatches:nt,revalidatingFetchers:He}=oa(ze,L,o,l,e.history,g,ke,F,me,a,!1,X,ge,he,we,oe,at,u,e.patchRoutesOnNavigation!=null,[V.route.id,K],M);He.filter(te=>te.key!==f).forEach(te=>{let St=te.key,Kr=g.fetchers.get(St),Kn=ot(void 0,Kr?Kr.data:void 0);g.fetchers.set(St,Kn),De(St),te.controller&&G.set(St,te.controller)}),le({fetchers:new Map(g.fetchers)});let Rt=()=>He.forEach(te=>De(te.key));O.signal.addEventListener("abort",Rt);let{loaderResults:bt,fetcherResults:Y}=await $r(nt,He,ze,me,L);if(O.signal.aborted)return;if(O.signal.removeEventListener("abort",Rt),Se.delete(f),G.delete(f),He.forEach(te=>G.delete(te.key)),g.fetchers.has(f)){let te=Te(K.data);g.fetchers.set(f,te)}let ie=Lt(bt);if(ie)return Ue(ze,ie.result,!1,{preventScrollReset:N});if(ie=Lt(Y),ie)return oe.add(ie.key),Ue(ze,ie.result,!1,{preventScrollReset:N});let{loaderData:Xe,errors:Be}=ha(g,ke,bt,void 0,He,Y);Hr(Le),g.navigation.state==="loading"&&Le>de?(j(_,"Expected pending action"),W&&W.abort(),Ge(g.navigation.location,{matches:ke,loaderData:Xe,errors:Be,fetchers:new Map(g.fetchers)})):(le({errors:Be,loaderData:ma(g.loaderData,Xe,ke,Be),fetchers:new Map(g.fetchers)}),X=!1)}async function Un(f,p,w,b,L,A,k,N,F){let M=g.fetchers.get(f);Pe(f,ot(F,M?M.data:void 0),{flushSync:k});let $=new AbortController,O=Qe(e.history,w,$.signal);if(A){let K=await Et(b,new URL(O.url).pathname,O.signal,f);if(K.type==="aborted")return;if(K.type==="error"){Me(f,p,K.error,{flushSync:k});return}else if(K.matches)b=K.matches;else{Me(f,p,Re(404,{pathname:w}),{flushSync:k});return}}let z=Ft(b,w);G.set(f,$);let V=ae,Z=et(o,l,O,w,b,z,a,L),re=await rt(O,w,Z,L,f),ne=re[z.route.id];if(!ne){for(let K of b)if(re[K.route.id]){ne=re[K.route.id];break}}if(G.get(f)===$&&G.delete(f),!O.signal.aborted){if(he.has(f)){Pe(f,Te(void 0));return}if(We(ne))if(de>V){Pe(f,Te(void 0));return}else{oe.add(f),await Ue(O,ne,!1,{preventScrollReset:N});return}if(pe(ne)){Me(f,p,ne.error);return}Pe(f,Te(ne.data))}}async function Ue(f,p,w,{submission:b,fetcherSubmission:L,preventScrollReset:A,replace:k}={}){w||(U==null||U.resolve(),U=null),p.response.headers.has("X-Remix-Revalidate")&&(X=!0);let N=p.response.headers.get("Location");j(N,"Expected a Location header on the redirect Response"),N=da(N,new URL(f.url),u,e.history);let F=ct(g.location,N,{_isRedirect:!0});if(r){let Z=!1;if(p.response.headers.has("X-Remix-Reload-Document"))Z=!0;else if(vr(N)){const re=Da(N,!0);Z=re.origin!==t.location.origin||ce(re.pathname,u)==null}if(Z){k?t.location.replace(N):t.location.assign(N);return}}W=null;let M=k===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:$,formAction:O,formEncType:z}=g.navigation;!b&&!L&&$&&O&&z&&(b=ya(g.navigation));let V=b||L;if(Io.has(p.response.status)&&V&&se(V.formMethod))await je(M,F,{submission:{...V,formAction:N},preventScrollReset:A||J,enableViewTransition:w?q:void 0});else{let Z=er(F,b);await je(M,F,{overrideNavigation:Z,fetcherSubmission:L,preventScrollReset:A||J,enableViewTransition:w?q:void 0})}}async function rt(f,p,w,b,L){var N;let A,k={};try{A=await Ho(h,f,p,w,L,b,!1)}catch(F){return w.filter(M=>
10M.shouldLoad).forEach(M=>{k[M.route.id]={type:"error",error:F}}),k}if(f.signal.aborted)return k;if(!se(f.method))for(let F of w){if(((N=A[F.route.id])==null?void 0:N.type)==="error")break;!A.hasOwnProperty(F.route.id)&&!g.loaderData.hasOwnProperty(F.route.id)&&(!g.errors||!g.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(A[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,M]of Object.entries(A))if(Qo(M)){let $=M.result;k[F]={type:"redirect",response:Yo($,f,F,w,u)}}else k[F]=await Vo(M);return k}async function $r(f,p,w,b,L){let A=rt(w,b,f,L,null),k=Promise.all(p.map(async M=>{if(M.matches&&M.match&&M.request&&M.controller){let O=(await rt(M.request,M.path,M.matches,L,M.key))[M.match.route.id];return{[M.key]:O}}else return Promise.resolve({[M.key]:{type:"error",error:Re(404,{pathname:M.path})}})})),N=await A,F=(await k).reduce((M,$)=>Object.assign(M,$),{});return{loaderResults:N,fetcherResults:F}}function Jt(){X=!0,we.forEach((f,p)=>{G.has(p)&&ge.add(p),De(p)})}function Pe(f,p,w={}){g.fetchers.set(f,p),le({fetchers:new Map(g.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function Me(f,p,w,b={}){let L=Oe(g.matches,p);Kt(f),le({errors:{[L.route.id]:w},fetchers:new Map(g.fetchers)},{flushSync:(b&&b.flushSync)===!0})}function jr(f){return Ee.set(f,(Ee.get(f)||0)+1),he.has(f)&&he.delete(f),g.fetchers.get(f)||za}function zn(f,p){De(f,p==null?void 0:p.reason),Pe(f,Te(null))}function Kt(f){let p=g.fetchers.get(f);G.has(f)&&!(p&&p.state==="loading"&&Se.has(f))&&De(f),we.delete(f),Se.delete(f),oe.delete(f),he.delete(f),ge.delete(f),g.fetchers.delete(f)}function Hn(f){let p=(Ee.get(f)||0)-1;p<=0?(Ee.delete(f),he.add(f)):Ee.set(f,p),le({fetchers:new Map(g.fetchers)})}function De(f,p){let w=G.get(f);w&&(w.abort(p),G.delete(f))}function Ur(f){for(let p of f){let w=jr(p),b=Te(w.data);g.fetchers.set(p,b)}}function zr(){let f=[],p=!1;for(let w of oe){let b=g.fetchers.get(w);j(b,`Expected fetcher: ${w}`),b.state==="loading"&&(oe.delete(w),f.push(w),p=!0)}return Ur(f),p}function Hr(f){let p=[];for(let[w,b]of Se)if(b<f){let L=g.fetchers.get(w);j(L,`Expected fetcher: ${w}`),L.state==="loading"&&(De(w),Se.delete(w),p.push(w))}return Ur(p),p.length>0}function Bn(f,p){let w=g.blockers.get(f)||qe;return Ne.get(f)!==p&&Ne.set(f,p),w}function Br(f){g.blockers.delete(f),Ne.delete(f)}function gt(f,p){let w=g.blockers.get(f)||qe;j(w.state==="unblocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="proceeding"||w.state==="blocked"&&p.state==="unblocked"||w.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${p.state}`);let b=new Map(g.blockers);b.set(f,p),le({blockers:b})}function Wr({currentLocation:f,nextLocation:p,historyAction:w}){if(Ne.size===0)return;Ne.size>1&&ee(!1,"A router only supports one blocker at a time");let b=Array.from(Ne.entries()),[L,A]=b[b.length-1],k=g.blockers.get(L);if(!(k&&k.state==="proceeding")&&A({currentLocation:f,nextLocation:p,historyAction:w}))return L}function Gt(f){let p=Re(404,{pathname:f}),w=s||i,{matches:b,route:L}=xt(w);return{notFoundMatches:b,route:L,error:p}}function Wn(f,p,w){if(E=f,v=p,R=w||null,!C&&g.navigation===Zt){C=!0;let b=Yr(g.location,g.matches);b!=null&&le({restoreScrollPosition:b})}return()=>{E=null,v=null,R=null}}function Vr(f,p){return R&&R(f,p.map(b=>Ta(b,g.loaderData)))||f.key}function Vn(f,p){if(E&&v){let w=Vr(f,p);E[w]=v()}}function Yr(f,p){if(E){let w=Vr(f,p),b=E[w];if(typeof b=="number")return b}return null}function wt(f,p,w){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:st(p,w,u,!0)}}else return{active:!0,matches:st(p,w,u,!0)||[]};return{active:!1,matches:null}}async function Et(f,p,w,b){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let L=f;for(;;){let A=s==null,k=s||i,N=l;try{await e.patchRoutesOnNavigation({signal:w,path:p,matches:L,fetcherKey:b,patch:($,O)=>{w.aborted||la($,O,k,N,o,!1)}})}catch($){return{type:"error",error:$,partialMatches:L}}finally{A&&!w.aborted&&(i=[...i])}if(w.aborted)return{type:"aborted"};let F=Fe(k,p,u),M=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(M=st(k,p,u,!0),!(M&&L.length<M.length&&Jr(L,M.slice(0,L.length))))return{type:"success",matches:F}}if(M||(M=st(k,p,u,!0)),!M||Jr(L,M))return{type:"success",matches:null};L=M}}function Jr(f,p){return f.length===p.length&&f.every((w,b)=>w.route.id===p[b].route.id)}function Yn(f){l={},s=dt(f,o,void 0,l)}function Jn(f,p,w=!1){let b=s==null;la(f,p,s||i,l,o,w),b&&(i=[...i],le({}))}return T={get basename(){return u},get future(){return d},get state(){return g},get routes(){return i},get window(){return t},initialize:Fn,subscribe:On,enableScrollRestoration:Wn,navigate:Ar,fetch:$n,revalidate:In,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:jr,resetFetcher:zn,deleteFetcher:Hn,dispose:kn,getBlocker:Bn,deleteBlocker:Br,patchRoutes:Jn,_internalFetchControllers:G,_internalSetRoutes:Yn,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){le(f)}},e.unstable_instrumentations&&(T=Co(T,e.unstable_instrumentations.map(f=>
10f.router).filter(Boolean))),T}function Ao(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function or(e,t,r,a,n,o){let l,i;if(n){l=[];for(let u of t)if(l.push(u),u.route.id===n){i=u;break}}else l=t,i=t[t.length-1];let s=Ut(a||".",gr(l),ce(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&i){let u=Rr(s.search);if(i.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!i.route.index&&u){let h=new URLSearchParams(s.search),d=h.getAll("index");h.delete("index"),d.filter(y=>y).forEach(y=>h.append("index",y));let m=h.toString();s.search=m?`?${m}`:""}}return r!=="/"&&(s.pathname=vo({basename:r,pathname:s.pathname})),xe(s)}function na(e,t,r){if(!r||!Ao(r))return{path:t};if(r.formMethod&&!tl(r.formMethod))return{path:t,error:Re(405,{method:r.formMethod})};let a=()=>({path:t,error:Re(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),l=qa(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!se(o))return a();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[y,E])=>`${m}${y}=${E} 11`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!se(o))return a();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}j(typeof FormData=="function","FormData is not available in this environment");let i,s;if(r.formData)i=ir(r.formData),s=r.formData;else if(r.body instanceof FormData)i=ir(r.body),s=r.body;else if(r.body instanceof URLSearchParams)i=r.body,s=fa(i);else if(r.body==null)i=new URLSearchParams,s=new FormData;else try{i=new URLSearchParams(r.body),s=fa(i)}catch{return a()}let u={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(se(u.formMethod))return{path:t,submission:u};let h=Ce(t);return e&&h.search&&Rr(h.search)&&i.append("index",""),h.search=`?${i}`,{path:xe(h),submission:u}}function oa(e,t,r,a,n,o,l,i,s,u,h,d,m,y,E,R,v,C,S,D,I){var B;let x=D?pe(D[1])?D[1].error:D[1].data:void 0,P=n.createURL(o.location),T=n.createURL(s),g;if(h&&o.errors){let H=Object.keys(o.errors)[0];g=l.findIndex(X=>X.route.id===H)}else if(D&&pe(D[1])){let H=D[0];g=l.findIndex(X=>X.route.id===H)-1}let _=D?D[1].statusCode:void 0,U=_&&_>=400,J={currentUrl:P,currentParams:((B=o.matches[0])==null?void 0:B.params)||{},nextUrl:T,nextParams:l[0].params,...i,actionResult:x,actionStatus:_},W=tt(l),q=l.map((H,X)=>{let{route:ge}=H,G=null;if(g!=null&&X>g)G=!1;else if(ge.lazy)G=!0;else if(!Er(ge))G=!1;else if(h){let{shouldLoad:oe}=Wa(ge,o.loaderData,o.errors);G=oe}else No(o.loaderData,o.matches[X],H)&&(G=!0);if(G!==null)return lr(r,a,e,s,W,H,u,t,G);let ae=!1;typeof I=="boolean"?ae=I:U?ae=!1:(d||P.pathname+P.search===T.pathname+T.search||P.search!==T.search||$o(o.matches[X],H))&&(ae=!0);let de={...J,defaultShouldRevalidate:ae},Se=ut(H,de);return lr(r,a,e,s,W,H,u,t,Se,de,I)}),Q=[];return E.forEach((H,X)=>{if(h||!l.some(Ee=>Ee.route.id===H.routeId)||y.has(X))return;let ge=o.fetchers.get(X),G=ge&&ge.state!=="idle"&&ge.data===void 0,ae=Fe(v,H.path,C);if(!ae){if(S&&G)return;Q.push({key:X,routeId:H.routeId,path:H.path,matches:null,match:null,request:null,controller:null});return}if(R.has(X))return;let de=Ft(ae,H.path),Se=new AbortController,oe=Qe(n,H.path,Se.signal),we=null;if(m.has(X))m.delete(X),we=et(r,a,oe,H.path,ae,de,u,t);else if(G)d&&(we=et(r,a,oe,H.path,ae,de,u,t));else{let Ee;typeof I=="boolean"?Ee=I:U?Ee=!1:Ee=d;let he={...J,defaultShouldRevalidate:Ee};ut(de,he)&&(we=et(r,a,oe,H.path,ae,de,u,t,he))}we&&Q.push({key:X,routeId:H.routeId,path:H.path,matches:we,match:de,request:oe,controller:Se})}),{dsMatches:q,revalidatingFetchers:Q}}function Er(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Wa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Er(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;if(!a&&n)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!n;return{shouldLoad:o,renderFallback:o}}function No(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function $o(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ut(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function la(e,t,r,a,n,o){let l;if(e){let u=a[e];j(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),l=u.children}else l=r;let i=[],s=[];if(t.forEach(u=>{let h=l.find(d=>Va(u,d));h?s.push({existingRoute:h,newRoute:u}):i.push(u)}),i.length>0){let u=dt(i,n,[e||"_","patch",String((l==null?void 0:l.length)||"0")],a);l.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:h,newRoute:d}=s[u],m=h,[y]=dt([d],n,[],{},!0);Object.assign(m,{element:y.element?y.element:m.element,errorElement:y.errorElement?y.errorElement:m.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:m.hydrateFallbackElement})}}function Va(e,t){var r;return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:((r=e.children)==null?void 0:r.every((a,n)=>{var o;return(o=t.children)==null?void 0:o.some(l=>Va(a,l))}))??!1:!1}var ia=new WeakMap,Ya=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(j(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let l=ia.get(n);l||(l={},ia.set(n,l));let i=l[e];
11if(i)return i;let s=(async()=>{let u=to(e),d=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)ee(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(d)ee(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await o();m!=null&&(Object.assign(n,{[e]:m}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(m=>m===void 0)&&(n.lazy=void 0))})();return l[e]=s,s},sa=new WeakMap;function jo(e,t,r,a,n){let o=r[e.id];if(j(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=sa.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let d=(async()=>{j(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),y={};for(let E in m){let R=m[E];if(R===void 0)continue;let v=ao(E),S=o[E]!==void 0&&E!=="hasErrorBoundary";v?ee(!v,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?ee(!S,`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.`):y[E]=R}Object.assign(o,y),Object.assign(o,{...a(o),lazy:void 0})})();return sa.set(o,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let l=Object.keys(e.lazy),i=[],s;for(let h of l){if(n&&n.includes(h))continue;let d=Ya({key:h,route:e,manifest:r,mapRouteProperties:a});d&&(i.push(d),h===t&&(s=d))}let u=i.length>0?Promise.all(i).then(()=>{}):void 0;return u==null||u.catch(()=>{}),s==null||s.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function ua(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function Uo(e){return e.matches.some(t=>t.route.middleware)?Ja(e,()=>ua(e)):ua(e)}function Ja(e,t){return zo(e,t,a=>{if(el(a))throw a;return a},Xo,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:l}=e,i=Math.min(Math.max(l.findIndex(u=>u.route.id===n),0),Math.max(l.findIndex(u=>u.shouldCallHandler()),0)),s=Oe(l,l[i].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function zo(e,t,r,a,n){let{matches:o,...l}=e,i=o.flatMap(u=>u.route.middleware?u.route.middleware.map(h=>[u.route.id,h]):[]);return await Ka(l,i,t,r,a,n)}async function Ka(e,t,r,a,n,o,l=0){let{request:i}=e;if(i.signal.aborted)throw i.signal.reason??new Error(`Request aborted: ${i.method} ${i.url}`);let s=t[l];if(!s)return await r();let[u,h]=s,d,m=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await Ka(e,t,r,a,n,o,l+1)},d.value}catch(y){return d={value:await o(y,u,d)},d.value}};try{let y=await h(e,m),E=y!=null?a(y):void 0;return n(E)?E:d?E??d.value:(d={value:await m()},d.value)}catch(y){return await o(y,u,d)}}function Ga(e,t,r,a,n){let o=Ya({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),l=jo(a.route,se(r.method)?"action":"loader",t,e,n);return{middleware:o,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function lr(e,t,r,a,n,o,l,i,s,u=null,h){let d=!1,m=Ga(e,t,r,o,l);return{...o,_lazyPromises:m,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(y){return d=!0,u?typeof h=="boolean"?ut(o,{...u,defaultShouldRevalidate:h}):typeof y=="boolean"?ut(o,{...u,defaultShouldRevalidate:y}):ut(o,u):s},resolve(y){let{lazy:E,loader:R,middleware:v}=o.route,C=d||s||y&&!se(r.method)&&(E||R),S=v&&v.length>0&&!R&&!E;return C&&(se(r.method)||!S)?Bo({request:r,path:a,unstable_pattern:n,match:o,lazyHandlerPromise:m==null?void 0:m.handler,lazyRoutePromise:m==null?void 0:m.route,handlerOverride:y,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function et(e,t,r,a,n,o,l,i,s=null){return n.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ga(e,t,r,u,l),resolve:()=>Promise.resolve({type:"data",result:void 0})}:lr(e,t,r,a,tt(n),u,l,i,!0,s))}async function Ho(e,t,r,a,n,o,l){a.some(h=>{var d;return(d=h._lazyPromises)==null?void 0:d.middleware})&&await Promise.all(a.map(h=>{var d;return(d=h._lazyPromises)==null?void 0:d.middleware}));let i={request:t,unstable_url:Xa(t,r),unstable_pattern:tt(a),params:a[0].params,context:o,matches:a},u=await e({...i,fetcherKey:n,runClientMiddleware:h=>{let d=i;return Ja(d,()=>h({...d,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(h=>{var d,m;return[(d=h._lazyPromises)==null?void 0:d.handler,(m=h._lazyPromises)==null?void 0:m.route]}))}catch{}return u}async function Bo({request:e,path:t,unstable_pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:l,scopedContext:i}){let s,u,h=se(e.method),d=h?"action":"loader",m=y=>{let E,R=new Promise((S,D)=>E=D);u=()=>E(),e.signal.addEventListener("abort",u);let v=S=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${a.route.id}]`)):y({request:e,unstable_url:Xa(e,t),unstable_pattern:r,params:a.params,context:i},...S!==void 0?[S]:[]),C=(async()=>{try{return{type:"data",result:await(l?l(D=>v(D)):v())}}catch(S){return{type:"error",result:S}}})();
11return Promise.race([C,R])};try{let y=h?a.route.action:a.route.loader;if(n||o)if(y){let E,[R]=await Promise.all([m(y).catch(v=>{E=v}),n,o]);if(E!==void 0)throw E;s=R}else{await n;let E=h?a.route.action:a.route.loader;if(E)[s]=await Promise.all([m(E),o]);else if(d==="action"){let R=new URL(e.url),v=R.pathname+R.search;throw Re(405,{method:e.method,pathname:v,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(y)s=await m(y);else{let E=new URL(e.url),R=E.pathname+E.search;throw Re(404,{pathname:R})}}catch(y){return{type:"error",result:y}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function Wo(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Vo(e){var a,n,o,l,i;let{result:t,type:r}=e;if(zt(t)){let s;try{s=await Wo(t)}catch(u){return{type:"error",error:u}}return r==="error"?{type:"error",error:new _e(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return r==="error"?sr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(n=t.init)!=null&&n.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Go(t),statusCode:Ve(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ve(t)?t.status:void 0}:sr(t)?{type:"data",data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Yo(e,t,r,a,n){let o=e.headers.get("Location");if(j(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!vr(o)){let l=a.slice(0,a.findIndex(i=>i.route.id===r)+1);o=or(new URL(t.url),l,n,o),e.headers.set("Location",o)}return e}var ca=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function da(e,t,r,a){if(vr(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(ca.includes(o.protocol))throw new Error("Invalid redirect location");let l=ce(o.pathname,r)!=null;if(o.origin===t.origin&&l)return wr(o.pathname)+o.search+o.hash}try{let n=a.createURL(e);if(ca.includes(n.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Qe(e,t,r,a){let n=e.createURL(qa(t)).toString(),o={signal:r};if(a&&se(a.formMethod)){let{formMethod:l,formEncType:i}=a;o.method=l.toUpperCase(),i==="application/json"?(o.headers=new Headers({"Content-Type":i}),o.body=JSON.stringify(a.json)):i==="text/plain"?o.body=a.text:i==="application/x-www-form-urlencoded"&&a.formData?o.body=ir(a.formData):o.body=a.formData}return new Request(n,o)}function Xa(e,t){let r=new URL(e.url),a=typeof t=="string"?Ce(t):t;if(r.pathname=a.pathname||"/",a.search){let n=new URLSearchParams(a.search),o=n.getAll("index");n.delete("index");for(let l of o.filter(Boolean))n.append("index",l);r.search=n.size?`?${n.toString()}`:""}else r.search="";return r.hash=a.hash||"",r}function ir(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function fa(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function Jo(e,t,r,a=!1,n=!1){let o={},l=null,i,s=!1,u={},h=r&&pe(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let m=d.route.id,y=t[m];if(j(!We(y),"Cannot handle redirect results in processLoaderData"),pe(y)){let E=y.error;if(h!==void 0&&(E=h,h=void 0),l=l||{},n)l[m]=E;else{let R=Oe(e,m);l[R.route.id]==null&&(l[R.route.id]=E)}
11a||(o[m]=Ba),s||(s=!0,i=Ve(y.error)?y.error.status:500),y.headers&&(u[m]=y.headers)}else o[m]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(i=y.statusCode),y.headers&&(u[m]=y.headers)}),h!==void 0&&r&&(l={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:l,statusCode:i||200,loaderHeaders:u}}function ha(e,t,r,a,n,o){let{loaderData:l,errors:i}=Jo(t,r,a);return n.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:h,controller:d}=s;if(d&&d.signal.aborted)return;let m=o[u];if(j(m,"Did not find corresponding fetcher result"),pe(m)){let y=Oe(e.matches,h==null?void 0:h.route.id);i&&i[y.route.id]||(i={...i,[y.route.id]:m.error}),e.fetchers.delete(u)}else if(We(m))j(!1,"Unhandled fetcher revalidation redirect");else{let y=Te(m.data);e.fetchers.set(u,y)}}),{loaderData:l,errors:i}}function ma(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Ba).reduce((o,[l,i])=>(o[l]=i,o),{});for(let o of r){let l=o.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&o.route.loader&&(n[l]=e[l]),a&&a.hasOwnProperty(l))break}return n}function pa(e){return e?pe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oe(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function xt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Re(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let l="Unknown Server Error",i="Unknown @remix-run/router error";return e===400?(l="Bad Request",a&&t&&r?i=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(i="Unable to encode submission body")):e===403?(l="Forbidden",i=`Route "${r}" does not match URL "${t}"`):e===404?(l="Not Found",i=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",a&&t&&r?i=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(i=`Invalid request method "${a.toUpperCase()}"`)),new _e(e||500,l,new Error(i),!0)}function Lt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(We(n))return{key:a,result:n}}}function qa(e){let t=typeof e=="string"?Ce(e):e;return xe({...t,hash:""})}function Ko(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Go(e){var t,r;return new _e(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function Xo(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&qo(r))}function qo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Qo(e){return zt(e.result)&&Ua.has(e.result.status)}function pe(e){return e.type==="error"}function We(e){return(e&&e.type)==="redirect"}function sr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function zt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Zo(e){return Ua.has(e)}function el(e){return zt(e)&&Zo(e.status)&&e.headers.has("Location")}function tl(e){return Oo.has(e.toUpperCase())}function se(e){return Fo.has(e.toUpperCase())}function Rr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ft(e,t){let r=typeof t=="string"?Ce(t).search:t.search;if(e[e.length-1].route.index&&Rr(r||""))return e[e.length-1];let a=_a(e);return a[a.length-1]}function ya(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:l}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:l,text:void 0}}}function er(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function rl(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ot(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function al(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Te(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 nl(e,t){try{let r=e.sessionStorage.getItem(Ha);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function ol(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Ha,JSON.stringify(r))}catch(a){ee(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function va(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>
11{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Ae=c.createContext(null);Ae.displayName="DataRouter";var Ye=c.createContext(null);Ye.displayName="DataRouterState";var Qa=c.createContext(!1);function br(){return c.useContext(Qa)}var Sr=c.createContext({isTransitioning:!1});Sr.displayName="ViewTransition";var xr=c.createContext(new Map);xr.displayName="Fetchers";var Nt=c.createContext(null);Nt.displayName="Await";var fe=c.createContext(null);fe.displayName="Navigation";var ht=c.createContext(null);ht.displayName="Location";var be=c.createContext({outlet:null,matches:[],isDataRoute:!1});be.displayName="Route";var Lr=c.createContext(null);Lr.displayName="RouteError";var Za="REACT_ROUTER_ERROR",ll="REDIRECT",il="ROUTE_ERROR_RESPONSE";function sl(e){if(e.startsWith(`${Za}:${ll}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ul(e){if(e.startsWith(`${Za}:${il}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new _e(t.status,t.statusText,t.data)}catch{}}function cl(e,{relative:t}={}){j(mt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=c.useContext(fe),{hash:n,pathname:o,search:l}=pt(e,{relative:t}),i=o;return r!=="/"&&(i=o==="/"?r:ye([r,o])),a.createHref({pathname:i,search:l,hash:n})}function mt(){return c.useContext(ht)!=null}function ve(){return j(mt(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(ht).location}function fs(){return c.useContext(ht).navigationType}var en="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function tn(e){c.useContext(fe).static||c.useLayoutEffect(e)}function rn(){let{isDataRoute:e}=c.useContext(be);return e?xl():dl()}function dl(){j(mt(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(Ae),{basename:t,navigator:r}=c.useContext(fe),{matches:a}=c.useContext(be),{pathname:n}=ve(),o=JSON.stringify(gr(a)),l=c.useRef(!1);return tn(()=>{l.current=!0}),c.useCallback((s,u={})=>{if(ee(l.current,en),!l.current)return;if(typeof s=="number"){r.go(s);return}let h=Ut(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ye([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,n,e])}var an=c.createContext(null);function hs(){return c.useContext(an)}function fl(e){let t=c.useContext(be).outlet;return c.useMemo(()=>t&&c.createElement(an.Provider,{value:e},t),[t,e])}function nn(){let{matches:e}=c.useContext(be),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function pt(e,{relative:t}={}){let{matches:r}=c.useContext(be),{pathname:a}=ve(),n=JSON.stringify(gr(r));return c.useMemo(()=>Ut(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function hl(e,t,r){j(mt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=c.useContext(fe),{matches:n}=c.useContext(be),o=n[n.length-1],l=o?o.params:{},i=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let v=u&&u.path||"";un(i,!u||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${i}" (under <Route path="${v}">) 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. 12 13Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let h=ve(),d;d=h;let m=d.pathname||"/",y=m;if(s!=="/"){let v=s.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(v.length).join("/")}let E=Fe(e,{pathname:y});return ee(u||E!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),ee(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),gl(E&&E.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:ye([s,a.encodeLocation?a.encodeLocation(v.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:ye([s,a.encodeLocation?a.encodeLocation(v.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),n,r)}function ml(){let e=Dr(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=c.
13createElement(c.Fragment,null,c.createElement("p",null,"ð¿ Hey developer ð"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:n},r):null,l)}var pl=c.createElement(ml,null),on=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?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&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=ul(e.digest);r&&(e=r)}let t=e!==void 0?c.createElement(be.Provider,{value:this.props.routeContext},c.createElement(Lr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(yl,{error:e},t):t}};on.contextType=Qa;var tr=new WeakMap;function yl({children:e,error:t}){let{basename:r}=c.useContext(fe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=sl(t.digest);if(a){let n=tr.get(t);if(n)throw n;let o=Na(a.location,r);if(Aa&&!tr.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw tr.set(t,l),l}return c.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function vl({routeContext:e,match:t,children:r}){let a=c.useContext(Ae);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(be.Provider,{value:e},r)}function gl(e,t=[],r){let a=r==null?void 0:r.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a==null?void 0:a.errors;if(o!=null){let h=n.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);j(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,h+1))}let l=!1,i=-1;if(r&&a){l=a.renderFallback;for(let h=0;h<n.length;h++){let d=n[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(i=h),d.route.id){let{loaderData:m,errors:y}=a,E=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!y||y[d.route.id]===void 0);if(d.route.lazy||E){r.isStatic&&(l=!0),i>=0?n=n.slice(0,i+1):n=[n[0]];break}}}}let s=r==null?void 0:r.onError,u=a&&s?(h,d)=>{var m,y;s(h,{location:a.location,params:((y=(m=a.matches)==null?void 0:m[0])==null?void 0:y.params)??{},unstable_pattern:tt(a.matches),errorInfo:d})}:void 0;return n.reduceRight((h,d,m)=>{let y,E=!1,R=null,v=null;a&&(y=o&&d.route.id?o[d.route.id]:void 0,R=d.route.errorElement||pl,l&&(i<0&&m===0?(un("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,v=null):i===m&&(E=!0,v=d.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,m+1)),S=()=>{let D;return y?D=R:E?D=v:d.route.Component?D=c.createElement(d.route.Component,null):d.route.element?D=d.route.element:D=h,c.createElement(vl,{match:d,routeContext:{outlet:h,matches:C,isDataRoute:a!=null},children:D})};return a&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?c.createElement(on,{location:a.location,revalidation:a.revalidation,component:R,error:y,children:S(),routeC
13ontext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):S()},null)}function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pr(e){let t=c.useContext(Ae);return j(t,Cr(e)),t}function Je(e){let t=c.useContext(Ye);return j(t,Cr(e)),t}function wl(e){let t=c.useContext(be);return j(t,Cr(e)),t}function yt(e){let t=wl(e),r=t.matches[t.matches.length-1];return j(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function El(){return yt("useRouteId")}function Rl(){return Je("useNavigation").navigation}function ms(){let e=Pr("useRevalidator"),t=Je("useRevalidator"),r=c.useCallback(async()=>{await e.router.revalidate()},[e.router]);return c.useMemo(()=>({revalidate:r,state:t.revalidation}),[r,t.revalidation])}function Mr(){let{matches:e,loaderData:t}=Je("useMatches");return c.useMemo(()=>e.map(r=>Ta(r,t)),[e,t])}function ln(){let e=Je("useLoaderData"),t=yt("useLoaderData");return e.loaderData[t]}function sn(){let e=Je("useActionData"),t=yt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Dr(){var a;let e=c.useContext(Lr),t=Je("useRouteError"),r=yt("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function bl(){let e=c.useContext(Nt);return e==null?void 0:e._data}var Sl=0;function ps(e){let{router:t,basename:r}=Pr("useBlocker"),a=Je("useBlocker"),[n,o]=c.useState(""),l=c.useCallback(i=>{if(typeof e!="function")return!!e;if(r==="/")return e(i);let{currentLocation:s,nextLocation:u,historyAction:h}=i;return e({currentLocation:{...s,pathname:ce(s.pathname,r)||s.pathname},nextLocation:{...u,pathname:ce(u.pathname,r)||u.pathname},historyAction:h})},[r,e]);return c.useEffect(()=>{let i=String(++Sl);return o(i),()=>t.deleteBlocker(i)},[t]),c.useEffect(()=>{n!==""&&t.getBlocker(n,l)},[t,n,l]),n&&a.blockers.has(n)?a.blockers.get(n):qe}function xl(){let{router:e}=Pr("useNavigate"),t=yt("useNavigate"),r=c.useRef(!1);return tn(()=>{r.current=!0}),c.useCallback(async(n,o={})=>{ee(r.current,en),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var ga={};function un(e,t,r){!t&&!ga[e]&&(ga[e]=!0,ee(!1,r))}var wa={};function ur(e,t){!e&&!wa[t]&&(wa[t]=!0,console.warn(t))}var Ll="useOptimistic",Ea=Gn[Ll],Cl=()=>{};function Pl(e){return Ea?Ea(e):[e,Cl]}function ys(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ee(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:c.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ee(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:c.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ee(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:c.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var vs=["HydrateFallback","hydrateFallbackElement"],Ml=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function gs({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=br()||a;let[o,l]=c.useState(e.state),[i,s]=Pl(o),[u,h]=c.useState(),[d,m]=c.useState({isTransitioning:!1}),[y,E]=c.useState(),[R,v]=c.useState(),[C,S]=c.useState(),D=c.useRef(new Map),I=c.useCallback((_,{deletedFetchers:U,newErrors:J,flushSync:W,viewTransitionOpts:q})=>{J&&r&&Object.values(J).forEach(B=>{var H;return r(B,{location:_.location,params:((H=_.matches[0])==null?void 0:H.params)??{},unstable_pattern:tt(_.matches)})}),_.fetchers.forEach((B,H)=>{B.data!==void 0&&D.current.set(H,B.data)}),U.forEach(B=>D.current.delete(B)),ur(W===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Q=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(ur(q==null||Q,"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."),!q||!Q){t&&W?t(()=>l(_)):a===!1?l(_):c.startTransition(()=>{a===!0&&s(B=>Ra(B,_)),l(_)}
13);return}if(t&&W){t(()=>{R&&(y==null||y.resolve(),R.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let B=e.window.document.startViewTransition(()=>{t(()=>l(_))});B.finished.finally(()=>{t(()=>{E(void 0),v(void 0),h(void 0),m({isTransitioning:!1})})}),t(()=>v(B));return}R?(y==null||y.resolve(),R.skipTransition(),S({state:_,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(h(_),m({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[e.window,t,R,y,a,s,r]);c.useLayoutEffect(()=>e.subscribe(I),[e,I]);let x=i.initialized;c.useLayoutEffect(()=>{!x&&e.state.initialized&&I(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[x,I,e.state]),c.useEffect(()=>{d.isTransitioning&&!d.flushSync&&E(new Ml)},[d]),c.useEffect(()=>{if(y&&u&&e.window){let _=u,U=y.promise,J=e.window.document.startViewTransition(async()=>{a===!1?l(_):c.startTransition(()=>{a===!0&&s(W=>Ra(W,_)),l(_)}),await U});J.finished.finally(()=>{E(void 0),v(void 0),h(void 0),m({isTransitioning:!1})}),v(J)}},[u,y,e.window,a,s]),c.useEffect(()=>{y&&u&&i.location.key===u.location.key&&y.resolve()},[y,R,i.location,u]),c.useEffect(()=>{!d.isTransitioning&&C&&(h(C.state),m({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[d.isTransitioning,C]);let P=c.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:_=>e.navigate(_),push:(_,U,J)=>e.navigate(_,{state:U,preventScrollReset:J==null?void 0:J.preventScrollReset}),replace:(_,U,J)=>e.navigate(_,{replace:!0,state:U,preventScrollReset:J==null?void 0:J.preventScrollReset})}),[e]),T=e.basename||"/",g=c.useMemo(()=>({router:e,navigator:P,static:!1,basename:T,onError:r}),[e,P,T,r]);return c.createElement(c.Fragment,null,c.createElement(Ae.Provider,{value:g},c.createElement(Ye.Provider,{value:i},c.createElement(xr.Provider,{value:D.current},c.createElement(Sr.Provider,{value:d},c.createElement(kl,{basename:T,location:i.location,navigationType:i.historyAction,navigator:P,unstable_useTransitions:a},c.createElement(Dl,{routes:e.routes,future:e.future,state:i,isStatic:!1,onError:r})))))),null)}function Ra(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Dl=c.memo(Tl);function Tl({routes:e,future:t,state:r,isStatic:a,onError:n}){return hl(e,void 0,{state:r,isStatic:a,onError:n})}function ws(e){return fl(e.context)}function Fl(e){j(!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 kl({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,unstable_useTransitions:l}){j(!mt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),s=c.useMemo(()=>({basename:i,navigator:n,static:o,unstable_useTransitions:l,future:{}}),[i,n,o,l]);typeof r=="string"&&(r=Ce(r));let{pathname:u="/",search:h="",hash:d="",state:m=null,key:y="default",unstable_mask:E}=r,R=c.useMemo(()=>{let v=ce(u,i);return v==null?null:{location:{pathname:v,search:h,hash:d,state:m,key:y,unstable_mask:E},navigationType:a}},[i,u,h,d,m,y,a,E]);return ee(R!=null,`<Router basename="${i}"> is not able to match the URL "${u}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:c.createElement(fe.Provider,{value:s},c.createElement(ht.Provider,{children:t,value:R}))}function Es({children:e,errorElement:t,resolve:r}){let a=c.useContext(Ae),n=c.useContext(Ye),o=c.useCallback((l,i)=>{var s;a&&a.onError&&n&&a.onError(l,{location:n.location,params:((s=n.matches[0])==null?void 0:s.params)||{},unstable_pattern:tt(n.matches),errorInfo:i})},[a,n]);return c.createElement(Ol,{resolve:r,errorElement:t,onError:o},c.createElement(Il,null,e))}var Ol=class extends c.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,a=null,n=0;
13if(!(r instanceof Promise))n=1,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>r});else if(this.state.error){n=2;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else r._tracked?(a=r,n="_error"in a?2:"_data"in a?1:0):(n=0,Object.defineProperty(r,"_tracked",{get:()=>!0}),a=r.then(o=>Object.defineProperty(r,"_data",{get:()=>o}),o=>{var l,i;(i=(l=this.props).onError)==null||i.call(l,o),Object.defineProperty(r,"_error",{get:()=>o})}));if(n===2&&!t)throw a._error;if(n===2)return c.createElement(Nt.Provider,{value:a,children:t});if(n===1)return c.createElement(Nt.Provider,{value:a,children:e});throw a}};function Il({children:e}){let t=bl(),r=typeof e=="function"?e(t):e;return c.createElement(c.Fragment,null,r)}function ba(e,t=[]){let r=[];return c.Children.forEach(e,(a,n)=>{if(!c.isValidElement(a))return;let o=[...t,n];if(a.type===c.Fragment){r.push.apply(r,ba(a.props.children,o));return}j(a.type===Fl,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),j(!a.props.index||!a.props.children,"An index route cannot have child routes.");let l={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(l.children=ba(a.props.children,o)),r.push(l)}),r}function _l(){return{params:nn(),loaderData:ln(),actionData:sn(),matches:Mr()}}function Rs(e){return function(){const r=_l();return c.createElement(e,r)}}function Al(){return{params:nn(),loaderData:ln(),actionData:sn(),error:Dr()}}function bs(e){return function(){const r=Al();return c.createElement(e,r)}}var kt="get",Ot="application/x-www-form-urlencoded";function Ht(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Nl(e){return Ht(e)&&e.tagName.toLowerCase()==="button"}function $l(e){return Ht(e)&&e.tagName.toLowerCase()==="form"}function jl(e){return Ht(e)&&e.tagName.toLowerCase()==="input"}function Ul(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function zl(e,t){return e.button===0&&(!t||t==="_self")&&!Ul(e)}function cr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Hl(e,t){let r=cr(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Ct=null;function Bl(){if(Ct===null)try{new FormData(document.createElement("form"),0),Ct=!1}catch{Ct=!0}return Ct}var Wl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rr(e){return e!=null&&!Wl.has(e)?(ee(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ot}"`),null):e}function Vl(e,t){let r,a,n,o,l;if($l(e)){let i=e.getAttribute("action");a=i?ce(i,t):null,r=e.getAttribute("method")||kt,n=rr(e.getAttribute("enctype"))||Ot,o=new FormData(e)}else if(Nl(e)||jl(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(a=s?ce(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||kt,n=rr(e.getAttribute("formenctype"))||rr(i.getAttribute("enctype"))||Ot,o=new FormData(i,e),!Bl()){let{name:u,type:h,value:d}=e;if(h==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,d)}}else{if(Ht(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=kt,a=null,n=Ot,l=e}return o&&n==="text/plain"&&(l=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:l}}var Yl=-1,Jl=-2,Kl=-3,Gl=-4,Xl=-5,ql=-6,Ql=-7,Zl="B",ei="D",cn="E",ti="M",ri="N",dn="P",ai="R",
13ni="S",oi="Y",li="U",ii="Z",fn=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],hn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function si(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),o=(t+n).split(` 14`);t=o.pop()||"";for(const l of o)a.enqueue(l)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Pt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function dr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return Sa.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const a=r.length;for(const n of e)r.push(n);return t.length=r.length,Sa.call(this,a)}function Sa(e){const{hydrated:t,values:r,deferred:a,plugins:n}=this;let o;const l=[[e,s=>{o=s}]];let i=[];for(;l.length>0;){const[s,u]=l.pop();switch(s){case Ql:u(void 0);continue;case Xl:u(null);continue;case Jl:u(NaN);continue;case ql:u(1/0);continue;case Kl:u(-1/0);continue;case Gl:u(-0);continue}if(t[s]){u(t[s]);continue}const h=r[s];if(!h||typeof h!="object"){t[s]=h,u(h);continue}if(Array.isArray(h))if(typeof h[0]=="string"){const[d,m,y]=h;switch(d){case ei:u(t[s]=new Date(m));continue;case li:u(t[s]=new URL(m));continue;case Zl:u(t[s]=BigInt(m));continue;case ai:u(t[s]=new RegExp(m,y));continue;case oi:u(t[s]=Symbol.for(m));continue;case ni:const E=new Set;t[s]=E;for(let I=h.length-1;I>0;I--)l.push([h[I],x=>{E.add(x)}]);u(E);continue;case ti:const R=new Map;t[s]=R;for(let I=h.length-2;I>0;I-=2){const x=[];l.push([h[I+1],P=>{x[1]=P}]),l.push([h[I],P=>{x[0]=P}]),i.push(()=>{R.set(x[0],x[1])})}u(R);continue;case ri:const v=Object.create(null);t[s]=v;for(const I of Object.keys(m).reverse()){const x=[];l.push([m[I],P=>{x[1]=P}]),l.push([Number(I.slice(1)),P=>{x[0]=P}]),i.push(()=>{v[x[0]]=x[1]})}u(v);continue;case dn:if(t[m])u(t[s]=t[m]);else{const I=new hn;a[m]=I,u(t[s]=I.promise)}continue;case cn:const[,C,S]=h;let D=S&&Pt&&fn.includes(S)&&S in Pt&&typeof Pt[S]=="function"?new Pt[S](C):new Error(C);t[s]=D,u(D);continue;case ii:u(t[s]=t[m]);continue;default:if(Array.isArray(n)){const I=[],x=h.slice(1);for(let P=0;P<x.length;P++){const T=x[P];l.push([T,g=>{I[P]=g}])}i.push(()=>{for(const P of n){const T=P(h[0],...I);if(T){u(t[s]=T.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const d=[];t[s]=d;for(let m=0;m<h.length;m++){const y=h[m];y!==Yl&&l.push([y,E=>{d[m]=E}])}u(d);continue}else{const d={};t[s]=d;for(const m of Object.keys(h).reverse()){const y=[];l.push([h[m],E=>{y[1]=E}]),l.push([Number(m.slice(1)),E=>{y[0]=E}]),i.push(()=>{d[y[0]]=y[1]})}u(d);continue}}for(;i.length>0;)i.pop()();return o}async function ui(e,t){const{plugins:r}=t??{},a=new hn,n=e.pipeThrough(si()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},l=await ci.call(o,n);let i=a.promise;return l.done?a.resolve():i=di.call(o,n).then(a.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);a.reject(s)}),{done:i.then(()=>n.closed),value:l.value}}async function ci(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:dr.call(this,r)}}async function di(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case dn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const l=r.slice(a+1);let i;try{i=JSON.parse(l)}catch{throw new SyntaxError}const s=dr.call(this,i);o.resolve(s);break}case cn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const l=r.slice(a+1);let i;try{i=JSON.parse(l)}catch{throw new SyntaxError}const s=dr.call(this,i);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function fi(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var hi={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},mi=/[&><\u2028\u2029]/g;function fr(e){return e.replace(mi,t=>hi[t])}function ue(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}
14var hr=Symbol("SingleFetchRedirect"),mn=class extends Error{},pi=202,yi=new Set([100,101,204,205]);function Ss(e,t,r,a,n,o){let l=vi(e,i=>{let s=t.routes[i.route.id];ue(s,"Route not found in manifest");let u=r[i.route.id];return{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader,hasShouldRevalidate:!!(u!=null&&u.shouldRevalidate)}},xi,a,n,o);return async i=>i.runClientMiddleware(l)}function vi(e,t,r,a,n,o,l=()=>!0){return async i=>{let{request:s,matches:u,fetcherKey:h}=i,d=e();if(s.method!=="GET")return gi(i,r,n,o);let m=u.some(y=>{let{hasLoader:E,hasClientLoader:R}=t(y);return y.shouldCallHandler()&&E&&!R});return!a&&!m?wi(i,t,r,n,o):h?bi(i,r,n,o):Ei(i,d,t,r,a,n,o,l)}}async function gi(e,t,r,a){let n=e.matches.find(i=>i.shouldCallHandler());ue(n,"No action match found");let o,l=await n.resolve(async i=>await i(async()=>{let{data:u,status:h}=await t(e,r,a,[n.route.id]);return o=h,ft(u,n.route.id)}));return zt(l.result)||Ve(l.result)||sr(l.result)?{[n.route.id]:l}:{[n.route.id]:{type:l.type,result:So(l.result,o)}}}async function wi(e,t,r,a,n){let o=e.matches.filter(i=>i.shouldCallHandler()),l={};return await Promise.all(o.map(i=>i.resolve(async s=>{try{let{hasClientLoader:u}=t(i),h=i.route.id,d=u?await s(async()=>{let{data:m}=await r(e,a,n,[h]);return ft(m,h)}):await s();l[i.route.id]={type:"data",result:d}}catch(u){l[i.route.id]={type:"error",result:u}}}))),l}async function Ei(e,t,r,a,n,o,l,i=()=>!0){let s=new Set,u=!1,h=e.matches.map(()=>xa()),d=xa(),m={},y=Promise.all(e.matches.map(async(R,v)=>R.resolve(async C=>{h[v].resolve();let S=R.route.id,{hasLoader:D,hasClientLoader:I,hasShouldRevalidate:x}=r(R),P=!R.shouldRevalidateArgs||R.shouldRevalidateArgs.actionStatus==null||R.shouldRevalidateArgs.actionStatus<400;if(!R.shouldCallHandler(P)){u||(u=R.shouldRevalidateArgs!=null&&D&&x===!0);return}if(i(R)&&I){D&&(u=!0);try{let g=await C(async()=>{let{data:_}=await a(e,o,l,[S]);return ft(_,S)});m[S]={type:"data",result:g}}catch(g){m[S]={type:"error",result:g}}return}D&&s.add(S);try{let g=await C(async()=>{let _=await d.promise;return ft(_,S)});m[S]={type:"data",result:g}}catch(g){m[S]={type:"error",result:g}}})));if(await Promise.all(h.map(R=>R.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)d.resolve({routes:{}});else{let R=n&&u&&s.size>0?[...s.keys()]:void 0;try{let v=await a(e,o,l,R);d.resolve(v.data)}catch(v){d.reject(v)}}return await y,await Ri(d.promise,e.matches,s,m),m}async function Ri(e,t,r,a){var n;try{let o,l=await e;if("routes"in l){for(let i of t)if(i.route.id in l.routes){let s=l.routes[i.route.id];if("error"in s){o=s.error,((n=a[i.route.id])==null?void 0:n.result)==null&&(a[i.route.id]={type:"error",result:o});break}}}o!==void 0&&Array.from(r.values()).forEach(i=>{a[i].result instanceof mn&&(a[i].result=o)})}catch{}}async function bi(e,t,r,a){let n=e.matches.find(i=>i.shouldCallHandler());ue(n,"No fetcher match found");let o=n.route.id,l=await n.resolve(async i=>i(async()=>{let{data:s}=await t(e,r,a,[o]);return ft(s,o)}));return{[n.route.id]:l}}function Si(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let a of t)a&&r.push(a);for(let a of r)e.searchParams.append("index",a);return e}function Tr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&ce(n.pathname,t)==="/"?n.pathname=`${At(t)}/_root.${a}`:n.pathname=`${At(n.pathname)}.${a}`,n}async function xi(e,t,r,a){let{request:n}=e,o=Tr(n.url,t,r,"data");n.method==="GET"&&(o=Si(o),a&&o.searchParams.set("_routes",a.join(",")));let l=await fetch(o,await fi(n));if(l.status>=400&&!l.headers.has("X-Remix-Response"))throw new _e(l.status,l.statusText,await l.text());if(l.status===204&&l.headers.has("X-Remix-Redirect"))return{status:pi,data:{redirect:{redirect:l.headers.get("X-Remix-Redirect"),status:Number(l.headers.get("X-Remix-Status")||"302"),revalidate:l.headers.get("X-Remix-Revalidate")==="true",reload:l.headers.get("X-Remix-Reload-Document")==="true",replace:l.headers.get("X-Remix-Replace")==="true"}}};if(yi.has(l.status)){let i={};return a&&n.method!=="GET"&&(i[a[0]]={data:void 0}),{status:l.status,data:{routes:i}}}ue(l.body,"No response body to decode");try{let i=await Li(l.body,window),s;if(n.method==="GET"){let u=i.value;hr in u?s={redirect:u[hr]}:s={routes:u}}else{let u=i.value,h=a==null?void 0:a[0];ue(h,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[h]:u}}}return{status:l.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Li(e,t){return ui(e,{plugins:[(r,...a)=>{if(r==="SanitizedError"){let[n,o,l]=a,i=Error;n&&fn.includes(n)&&n in t&&typeof t[n]=="function"&&(i=t[n]);let s=new i(o);return s.stack=l,{value:s}}if(r==="ErrorResponse"){let[n,o,l]=a;return{value:new _e(o,l,n)}}if(r==="SingleFetchRedirect")return{value:{[hr]:a[0]}};if(r==="SingleFetchClassInstance")return{value:a[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function ft(e,t){if("redirect"in e){let{redirect:a,revalidate:n,reload:o,replace:l,status:i}=e.redirect;throw xo(a,{status:i,headers:{...n?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...l?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new mn(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function xa(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>
14{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function pn(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.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ci(e,t,r){let a=e.map(o=>{var s;let l=t[o.route.id],i=r.routes[o.route.id];return[i&&i.css?i.css.map(u=>({rel:"stylesheet",href:u})):[],((s=l==null?void 0:l.links)==null?void 0:s.call(l))||[]]}).flat(2),n=kr(e,r);return wn(a,n)}function yn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Pi(e){if(!e.css)return;let t=yn(e);await Promise.all(t.map(gn))}async function vn(e,t){if(!e.css&&!t.links||!ki())return;let r=[];if(e.css&&r.push(...yn(e)),t.links&&r.push(...t.links()),r.length===0)return;let a=[];for(let n of r)!Fr(n)&&n.rel==="stylesheet"&&a.push({...n,rel:"preload",as:"style"});await Promise.all(a.map(gn))}async function gn(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function a(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{a(),t()},r.onerror=()=>{a(),t()},document.head.appendChild(r)})}function Fr(e){return e!=null&&typeof e.page=="string"}function Mi(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Di(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let l=await pn(o,r);return l.links?l.links():[]}return[]}));return wn(a.flat(1).filter(Mi).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function La(e,t,r,a,n,o){let l=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,i=(s,u)=>{var h;return r[u].pathname!==s.pathname||((h=r[u].route.path)==null?void 0:h.endsWith("*"))&&r[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>l(s,u)||i(s,u)):o==="data"?t.filter((s,u)=>{var d;let h=a.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(l(s,u)||i(s,u))return!0;
14if(s.route.shouldRevalidate){let m=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function kr(e,t,{includeHydrateFallback:r}={}){return Ti(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Ti(e){return[...new Set(e)]}function Fi(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function wn(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Fr(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let i=JSON.stringify(Fi(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}var Mt;function ki(){if(Mt!==void 0)return Mt;let e=document.createElement("link");return Mt=e.relList.supports("preload"),e=null,Mt}function Oi(){return c.createElement(mr,{title:"Loading...",renderScripts:!0},c.createElement("script",{dangerouslySetInnerHTML:{__html:` 15 console.log( 16 "ð¿ Hey developer ð. You can provide a way better UX than this " + 17 "when your app is loading JS modules and/or running \`clientLoader\` " + 18 "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " + 19 "for more information." 20 ); 21 `}}))}function En(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Ii(e,t,r){let a=Rn(t),n=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Oi:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>c.createElement(xn,{error:Dr()}):void 0;return e.id==="root"&&t.Layout?{...a?{element:c.createElement(t.Layout,null,c.createElement(a,null))}:{Component:a},...o?{errorElement:c.createElement(t.Layout,null,c.createElement(o,null))}:{ErrorBoundary:o},...n?{hydrateFallbackElement:c.createElement(t.Layout,null,c.createElement(n,null))}:{HydrateFallback:n}}:{Component:a,ErrorBoundary:o,HydrateFallback:n}}function xs(e,t,r,a,n,o){return Or(t,r,a,n,o,"",En(t),e)}function Dt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let a=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(a),new _e(400,"Bad Request",new Error(a),!0)}}function ar(e,t){let r=e==="clientAction"?"a":"an",a=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(a),new _e(405,"Method Not Allowed",new Error(a),!0)}function Or(e,t,r,a,n,o="",l=En(e),i){return(l[o]||[]).map(s=>{var S,D,I;let u=t[s.id];function h(x){return ue(typeof x=="function","No single fetch function available for route handler"),x()}function d(x){return s.hasLoader?h(x):Promise.resolve(null)}function m(x){if(!s.hasAction)throw ar("action",s.id);return h(x)}function y(x){import(x)}function E(x){x.clientActionModule&&y(x.clientActionModule),x.clientLoaderModule&&y(x.clientLoaderModule)}async function R(x){let P=t[s.id],T=P?vn(s,P):Promise.resolve();try{return x()}finally{await T}}let v={id:s.id,index:s.index,path:s.path};if(u){Object.assign(v,{...v,...Ii(s,u,n),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Ca(v.path,u,s,a,i)});let x=r&&r.loaderData&&s.id in r.loaderData,P=x?(S=r==null?void 0:r.loaderData)==null?void 0:S[s.id]:void 0,T=r&&r.errors&&s.id in r.errors,g=T?(D=r==null?void 0:r.errors)==null?void 0:D[s.id]:void 0,_=i==null&&(((I=u.clientLoader)==null?void 0:I.hydrate)===!0||!s.hasLoader);v.loader=async({request:U,params:J,context:W,unstable_pattern:q,unstable_url:Q},B)=>{try{return await R(async()=>(ue(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:U,params:J,context:W,unstable_pattern:q,unstable_url:Q,async serverLoader(){if
21(Dt("loader",s),_){if(x)return P;if(T)throw g}return d(B)}}):d(B)))}finally{_=!1}},v.loader.hydrate=Ni(s.id,u.clientLoader,s.hasLoader,n),v.action=({request:U,params:J,context:W,unstable_pattern:q,unstable_url:Q},B)=>R(async()=>{if(ue(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(n)throw ar("clientAction",s.id);return m(B)}return u.clientAction({request:U,params:J,context:W,unstable_pattern:q,unstable_url:Q,async serverAction(){return Dt("action",s),m(B)}})})}else{s.hasClientLoader||(v.loader=(T,g)=>R(()=>d(g))),s.hasClientAction||(v.action=(T,g)=>R(()=>{if(n)throw ar("clientAction",s.id);return m(g)}));let x;async function P(){return x?await x:(x=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(g=>setTimeout(g,0));let T=Ai(s,t);return E(s),await T})(),await x)}v.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:T}=s.clientLoaderModule?await import(s.clientLoaderModule):await P();return ue(T,"No `clientLoader` export found"),(g,_)=>T({...g,async serverLoader(){return Dt("loader",s),d(_)}})}:void 0,action:s.hasClientAction?async()=>{let T=s.clientActionModule?import(s.clientActionModule):P();E(s);let{clientAction:g}=await T;return ue(g,"No `clientAction` export found"),(_,U)=>g({..._,async serverAction(){return Dt("action",s),m(U)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:T}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await P();return ue(T,"No `clientMiddleware` export found"),T}:void 0,shouldRevalidate:async()=>{let T=await P();return Ca(v.path,T,s,a,i)},handle:async()=>(await P()).handle,Component:async()=>(await P()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await P()).ErrorBoundary:void 0}}let C=Or(e,t,r,a,n,s.id,l,i);return C.length>0&&(v.children=C),v})}function Ca(e,t,r,a,n){if(n)return _i(r.id,t.shouldRevalidate,n);if(!a&&r.hasLoader&&!r.hasClientLoader){let o=e?Oa(e)[1].map(i=>i.paramName):[];const l=i=>o.some(s=>i.currentParams[s]!==i.nextParams[s]);if(t.shouldRevalidate){let i=t.shouldRevalidate;return s=>i({...s,defaultShouldRevalidate:l(s)})}else return i=>l(i)}return t.shouldRevalidate}function _i(e,t,r){let a=!1;return n=>a?t?t(n):n.defaultShouldRevalidate:(a=!0,r.has(e))}async function Ai(e,t){let r=pn(e,t),a=Pi(e),n=await r;return await Promise.all([a,vn(e,n)]),{Component:Rn(n),ErrorBoundary:n.ErrorBoundary,clientMiddleware:n.clientMiddleware,clientAction:n.clientAction,clientLoader:n.clientLoader,handle:n.handle,links:n.links,meta:n.meta,shouldRevalidate:n.shouldRevalidate}}function Rn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Ni(e,t,r,a){return a&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var It=new Set,$i=1e3,$t=new Set,ji=7680;function Ir(e,t){return e.mode==="lazy"&&t===!0}function Ui({sri:e,...t},r){let a=new Set(r.state.matches.map(i=>i.route.id)),n=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(n.pop();n.length>0;)o.push(`/${n.join("/")}`),n.pop();o.forEach(i=>{let s=Fe(r.routes,i,r.basename);s&&s.forEach(u=>a.add(u.route.id))});let l=[...a].reduce((i,s)=>Object.assign(i,{[s]:t.routes[s]}),{});return{...t,routes:l,sri:e?!0:void 0}}function Ls(e,t,r,a,n,o,l){if(Ir(n,a))return async({path:i,patch:s,signal:u,fetcherKey:h})=>{if($t.has(i))return;let{state:d}=e();await bn([i],h?window.location.href:xe(d.navigation.location||d.location),t,r,a,o,l,n.manifestPath,s,u)}}function Cs(e,t,r,a,n,o){c.useEffect(()=>{var h,d;if(!Ir(n,a)||((d=(h=window.navigator)==null?void 0:h.connection)==null?void 0:d.saveData)===!0)return;function l(m){let y=m.tagName==="FORM"?m.getAttribute("action"):m.getAttribute("href");if(!y)return;let E=m.tagName==="A"?m.pathname:new URL(y,window.location.origin).pathname;$t.has(E)||It.add(E)}async function i(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(l);let m=Array.from(It.keys()).filter(y=>$t.has(y)?(It.delete(y),!1):!0);if(m.length!==0)try{await bn(m,null,t,r,a,o,e.basename,n.manifestPath,e.patchRoutes)}catch(y){console.error("Failed to fetch manifest patches",y)}}let s=Bi(i,100);i();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[a,o,t,r,e,n])}function zi(e,t){let r=e||"/__manifest";return t==null?r:ye([t,r])}var nr="react-router-manifest-version";async function bn(e,t,r,a,n,o,l,i,s,u){const h=new URLSearchParams;h.set("paths",e.sort().join(",")),h.set("version",r.version);let d=new URL(zi(i,l),window.location.origin);if(d.search=h.toString(),d.toString().length>ji){It.clear();return}let m;try{let v=await fetch(d,{signal:u});if(v.ok){if(v.status===204&&v.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a
21new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(nr)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(nr,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(v.status>=400)throw new Error(await v.text())}else throw new Error(`${v.status} ${v.statusText}`);try{sessionStorage.removeItem(nr)}catch{}m=await v.json()}catch(v){if(u!=null&&u.aborted)return;throw v}let y=new Set(Object.keys(r.routes)),E=Object.values(m).reduce((v,C)=>(C&&!y.has(C.id)&&(v[C.id]=C),v),{});Object.assign(r.routes,E),e.forEach(v=>Hi(v,$t));let R=new Set;Object.values(E).forEach(v=>{v&&(!v.parentId||!E[v.parentId])&&R.add(v.parentId)}),R.forEach(v=>s(v||null,Or(E,a,null,n,o,v)))}function Hi(e,t){if(t.size>=$i){let r=t.values().next().value;t.delete(r)}t.add(e)}function Bi(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}function Bt(){let e=c.useContext(Ae);return ue(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Wt(){let e=c.useContext(Ye);return ue(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vt=c.createContext(void 0);Vt.displayName="FrameworkContext";function Ke(){let e=c.useContext(Vt);return ue(e,"You must render this element inside a <HydratedRouter> element"),e}function Wi(e,t){let r=c.useContext(Vt),[a,n]=c.useState(!1),[o,l]=c.useState(!1),{onFocus:i,onBlur:s,onMouseEnter:u,onMouseLeave:h,onTouchStart:d}=t,m=c.useRef(null);c.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let R=C=>{C.forEach(S=>{l(S.isIntersecting)})},v=new IntersectionObserver(R,{threshold:.5});return m.current&&v.observe(m.current),()=>{v.disconnect()}}},[e]),c.useEffect(()=>{if(a){let R=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(R)}}},[a]);let y=()=>{n(!0)},E=()=>{n(!1),l(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:lt(i,y),onBlur:lt(s,E),onMouseEnter:lt(u,y),onMouseLeave:lt(h,E),onTouchStart:lt(d,y)}]:[!1,m,{}]}function lt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function _r(e,t,r){if(r&&!jt)return[e[0]];if(t){let a=e.findIndex(n=>t[n.route.id]!==void 0);return e.slice(0,a+1)}return e}var Pa="data-react-router-critical-css";function Ps({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:a,routeModules:n,criticalCss:o}=Ke(),{errors:l,matches:i}=Wt(),s=_r(i,l,r),u=c.useMemo(()=>Ci(s,n,a),[s,n,a]);return c.createElement(c.Fragment,null,typeof o=="string"?c.createElement("style",{[Pa]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?c.createElement("link",{[Pa]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:h,link:d})=>Fr(d)?c.createElement(Sn,{key:h,nonce:e,...d,crossOrigin:d.crossOrigin??t}):c.createElement("link",{key:h,nonce:e,...d,crossOrigin:d.crossOrigin??t})))}function Sn({page:e,...t}){let r=br(),{router:a}=Bt(),n=c.useMemo(()=>Fe(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?r?c.createElement(Yi,{page:e,matches:n,...t}):c.createElement(Ji,{page:e,matches:n,...t}):null}function Vi(e){let{manifest:t,routeModules:r}=Ke(),[a,n]=c.useState([]);return c.useEffect(()=>{let o=!1;return Di(e,t,r).then(l=>{o||n(l)}),()=>{o=!0}},[e,t,r]),a}function Yi({page:e,matches:t,...r}){let a=ve(),{future:n}=Ke(),{basename:o}=Bt(),l=c.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let i=Tr(e,o,n.unstable_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let h of t)typeof h.route.shouldRevalidate=="function"?s=!0:u.push(h.route.id);return s&&u.length>0&&i.searchParams.set("_routes",u.join(",")),[i.pathname+i.search]},[o,n.unstable_trailingSlashAwareDataRequests,e,a,t]);return c.createElement(c.Fragment,null,l.map(i=>c.createElement("link",{key:i,rel:"prefetch",as:"fetch",href:i,...r})))}function Ji({page:e,matches:t,...r}){let a=ve(),{future:n,manifest:o,routeModules:l}=Ke(),{basename:i}=Bt(),{loaderData:s,matches:u}=Wt(),h=c.useMemo(()=>La(e,t,u,o,a,"data"),[e,t,u,o,a]),d=c.useMemo(()=>La(e,t,u,o,a,"assets"),[e,t,u,o,a]),m=c.useMemo(()=>
21{if(e===a.pathname+a.search+a.hash)return[];let R=new Set,v=!1;if(t.forEach(S=>{var I;let D=o.routes[S.route.id];!D||!D.hasLoader||(!h.some(x=>x.route.id===S.route.id)&&S.route.id in s&&((I=l[S.route.id])!=null&&I.shouldRevalidate)||D.hasClientLoader?v=!0:R.add(S.route.id))}),R.size===0)return[];let C=Tr(e,i,n.unstable_trailingSlashAwareDataRequests,"data");return v&&R.size>0&&C.searchParams.set("_routes",t.filter(S=>R.has(S.route.id)).map(S=>S.route.id).join(",")),[C.pathname+C.search]},[i,n.unstable_trailingSlashAwareDataRequests,s,a,o,h,t,e,l]),y=c.useMemo(()=>kr(d,o),[d,o]),E=Vi(d);return c.createElement(c.Fragment,null,m.map(R=>c.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...r})),y.map(R=>c.createElement("link",{key:R,rel:"modulepreload",href:R,...r})),E.map(({key:R,link:v})=>c.createElement("link",{key:R,nonce:r.nonce,...v,crossOrigin:v.crossOrigin??r.crossOrigin})))}function Ms(){let{isSpaMode:e,routeModules:t}=Ke(),{errors:r,matches:a,loaderData:n}=Wt(),o=ve(),l=_r(a,r,e),i=null;r&&(i=r[l[l.length-1].route.id]);let s=[],u=null,h=[];for(let d=0;d<l.length;d++){let m=l[d],y=m.route.id,E=n[y],R=m.params,v=t[y],C=[],S={id:y,data:E,loaderData:E,meta:[],params:m.params,pathname:m.pathname,handle:m.route.handle,error:i};if(h[d]=S,v!=null&&v.meta?C=typeof v.meta=="function"?v.meta({data:E,loaderData:E,params:R,location:o,matches:h,error:i}):Array.isArray(v.meta)?[...v.meta]:v.meta:u&&(C=[...u]),C=C||[],!Array.isArray(C))throw new Error("The route at "+m.route.path+` returns an invalid value. All route meta functions must return an array of meta objects. 22 23To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);S.meta=C,h[d]=S,s=[...C],u=s}return c.createElement(c.Fragment,null,s.flat().map(d=>{if(!d)return null;if("tagName"in d){let{tagName:m,...y}=d;if(!Ki(m))return console.warn(`A meta object uses an invalid tagName: ${m}. Expected either 'link' or 'meta'`),null;let E=m;return c.createElement(E,{key:JSON.stringify(y),...y})}if("title"in d)return c.createElement("title",{key:"title"},String(d.title));if("charset"in d&&(d.charSet??(d.charSet=d.charset),delete d.charset),"charSet"in d&&d.charSet!=null)return typeof d.charSet=="string"?c.createElement("meta",{key:"charSet",charSet:d.charSet}):null;if("script:ld+json"in d)try{let m=JSON.stringify(d["script:ld+json"]);return c.createElement("script",{key:`script:ld+json:${m}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:fr(m)}})}catch{return null}return c.createElement("meta",{key:JSON.stringify(d),...d})}))}function Ki(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var jt=!1;function Gi(){jt=!0}function Xi(e){let{manifest:t,serverHandoffString:r,isSpaMode:a,renderMeta:n,routeDiscovery:o,ssr:l}=Ke(),{router:i,static:s,staticContext:u}=Bt(),{matches:h}=Wt(),d=br(),m=Ir(o,l);n&&(n.didRenderScripts=!0);let y=_r(h,null,a);c.useEffect(()=>{Gi()},[]);let E=c.useMemo(()=>{var I;if(d)return null;let S=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",D=s?`${(I=t.hmr)!=null&&I.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${m?"":`import ${JSON.stringify(t.url)}`}; 24${y.map((x,P)=>{let T=`route${P}`,g=t.routes[x.route.id];ue(g,`Route ${x.route.id} not found in manifest`);let{clientActionModule:_,clientLoaderModule:U,clientMiddlewareModule:J,hydrateFallbackModule:W,module:q}=g,Q=[..._?[{module:_,varName:`${T}_clientAction`}]:[],...U?[{module:U,varName:`${T}_clientLoader`}]:[],...J?[{module:J,varName:`${T}_clientMiddleware`}]:[],...W?[{module:W,varName:`${T}_HydrateFallback`}]:[],{module:q,varName:`${T}_main`}];if(Q.length===1)return`import * as ${T} from ${JSON.stringify(q)};`;let B=Q.map(X=>`import * as ${X.varName} from "${X.module}";`).join(` 25`),H=`const ${T} = {${Q.map(X=>`...${X.varName}`).join(",")}};`;return[B,H].join(` 26`)}).join(` 27`)} 28 ${m?`window.__reactRouterManifest = ${JSON.stringify(Ui(t,i),null,2)};`:""} 29 window.__reactRouterRouteModules = {${y.map((x,P)=>`${JSON.stringify(x.route.id)}:route${P}`).join(",")}}; 30 31import(${JSON.stringify(t.entry.module)});`:" ";return c.createElement(c.Fragment,null,c.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:S},type:void 0}),c.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:D},type:"module",async:!0}))},[]),R=jt||d?[]:qi(t.entry.imports.concat(kr(y,t,{includeHydrateFallback:!0}))),v=typeof t.sri=="object"?t.sri:{};return ur(!d,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),jt||d?null:c.
31createElement(c.Fragment,null,typeof t.sri=="object"?c.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,m?null:c.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),c.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),R.map(C=>c.createElement("link",{key:C,rel:"modulepreload",href:C,crossOrigin:e.crossOrigin,integrity:v[C],suppressHydrationWarning:!0})),E)}function qi(e){return[...new Set(e)]}function Qi(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ds=class extends c.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?c.createElement(xn,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function xn({error:e,isOutsideRemixApp:t}){console.error(e);let r=c.createElement("script",{dangerouslySetInnerHTML:{__html:` 32 console.log( 33 "ð¿ Hey developer ð. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information." 34 ); 35 `}});if(Ve(e))return c.createElement(mr,{title:"Unhandled Thrown Response!"},c.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return c.createElement(mr,{title:"Application Error!",isOutsideRemixApp:t},c.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),c.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function mr({title:e,renderScripts:t,isOutsideRemixApp:r,children:a}){var o;let{routeModules:n}=Ke();return(o=n.root)!=null&&o.Layout&&!r?a:c.createElement("html",{lang:"en"},c.createElement("head",null,c.createElement("meta",{charSet:"utf-8"}),c.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),c.createElement("title",null,e)),c.createElement("body",null,c.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,t?c.createElement(Xi,null):null)))}var Zi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zi&&(window.__reactRouterVersion="7.14.2")}catch{}var Ln=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Cn=c.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:l,unstable_mask:i,state:s,target:u,to:h,preventScrollReset:d,viewTransition:m,unstable_defaultShouldRevalidate:y,...E},R){let{basename:v,navigator:C,unstable_useTransitions:S}=c.useContext(fe),D=typeof h=="string"&&Ln.test(h),I=Na(h,v);h=I.to;let x=cl(h,{relative:n}),P=ve(),T=null;if(i){let B=Ut(i,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);v!=="/"&&(B.pathname=B.pathname==="/"?v:ye([v,B.pathname])),T=C.createHref(B)}let[g,_,U]=Wi(a,E),J=rs(h,{replace:l,unstable_mask:i,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:m,unstable_defaultShouldRevalidate:y,unstable_useTransitions:S});function W(B){t&&t(B),B.defaultPrevented||J(B)}let q=!(I.isExternal||o),Q=c.createElement("a",{...E,...U,href:(q?T:void 0)||I.absoluteURL||x,onClick:q?W:t,ref:Qi(R,_),target:u,"data-discover":!D&&r==="render"?"true":void 0});return g&&!D?c.createElement(c.Fragment,null,Q,c.createElement(Sn,{page:x})):Q});Cn.displayName="Link";var es=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:l,viewTransition:i,children:s,...u},h){let d=pt(l,{relative:u.relative}),m=ve(),y=c.useContext(Ye),{navigator:E,basename:R}=c.useContext(fe),v=y!=null&&ss(d)&&i===!0,C=E.encodeLocation?E.encodeLocation(d).pathname:d.pathname,S=m.pathname,D=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(S=S.toLowerCase(),D=D?D.toLowerCase():null,C=C.toLowerCase()),D&&R&&(D=ce(D,R)||D);const I=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let x=S===C||!n&&S.startsWith(C)&&S.charAt(I)==="/",P=D!=null&&(D===C||!n&&D.startsWith(C)&&D.charAt(C.length)==="/"),T={isActive:x,isPending:P,isTransitioning:v},g=x?t:void 0,_;typeof a=="function"?_=a(T):_=[a,x?"active":null,P?"pending":null,v?"transitioning":null].filter(
35Boolean).join(" ");let U=typeof o=="function"?o(T):o;return c.createElement(Cn,{...u,"aria-current":g,className:_,ref:h,style:U,to:l,viewTransition:i},typeof s=="function"?s(T):s)});es.displayName="NavLink";var Pn=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:l=kt,action:i,onSubmit:s,relative:u,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:m,...y},E)=>{let{unstable_useTransitions:R}=c.useContext(fe),v=Tn(),C=os(i,{relative:u}),S=l.toLowerCase()==="get"?"get":"post",D=typeof i=="string"&&Ln.test(i),I=x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let P=x.nativeEvent.submitter,T=(P==null?void 0:P.getAttribute("formmethod"))||l,g=()=>v(P||x.currentTarget,{fetcherKey:t,method:T,navigate:r,replace:n,state:o,relative:u,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:m});R&&r!==!1?c.startTransition(()=>g()):g()};return c.createElement("form",{ref:E,method:S,action:C,onSubmit:a?s:I,...y,"data-discover":!D&&e==="render"?"true":void 0})});Pn.displayName="Form";function ts({getKey:e,storageKey:t,...r}){let a=c.useContext(Vt),{basename:n}=c.useContext(fe),o=ve(),l=Mr();ls({getKey:e,storageKey:t});let i=c.useMemo(()=>{if(!a||!e)return null;let u=yr(o,l,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,h)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[h||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return c.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${fr(JSON.stringify(t||pr))}, ${fr(JSON.stringify(i))})`}})}ts.displayName="ScrollRestoration";function Mn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yt(e){let t=c.useContext(Ae);return j(t,Mn(e)),t}function Dn(e){let t=c.useContext(Ye);return j(t,Mn(e)),t}function rs(e,{target:t,replace:r,unstable_mask:a,state:n,preventScrollReset:o,relative:l,viewTransition:i,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let h=rn(),d=ve(),m=pt(e,{relative:l});return c.useCallback(y=>{if(zl(y,t)){y.preventDefault();let E=r!==void 0?r:xe(d)===xe(m),R=()=>h(e,{replace:E,unstable_mask:a,state:n,preventScrollReset:o,relative:l,viewTransition:i,unstable_defaultShouldRevalidate:s});u?c.startTransition(()=>R()):R()}},[d,h,m,r,a,n,t,e,o,l,i,s,u])}function Ts(e){ee(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=c.useRef(cr(e)),r=c.useRef(!1),a=ve(),n=c.useMemo(()=>Hl(a.search,r.current?null:t.current),[a.search]),o=rn(),l=c.useCallback((i,s)=>{const u=cr(typeof i=="function"?i(new URLSearchParams(n)):i);r.current=!0,o("?"+u,s)},[o,n]);return[n,l]}var as=0,ns=()=>`__${String(++as)}__`;function Tn(){let{router:e}=Yt("useSubmit"),{basename:t}=c.useContext(fe),r=El(),a=e.fetch,n=e.navigate;return c.useCallback(async(o,l={})=>{let{action:i,method:s,encType:u,formData:h,body:d}=Vl(o,t);if(l.navigate===!1){let m=l.fetcherKey||ns();await a(m,r,l.action||i,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:d,formMethod:l.method||s,formEncType:l.encType||u,flushSync:l.flushSync})}else await n(l.action||i,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:h,body:d,formMethod:l.method||s,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:r,flushSync:l.flushSync,viewTransition:l.viewTransition})},[a,n,t,r])}function os(e,{relative:t}={}){let{basename:r}=c.useContext(fe),a=c.useContext(be);j(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...pt(e||".",{relative:t})},l=ve();if(e==null){o.search=l.search;let i=new URLSearchParams(o.search),s=i.getAll("index");if(s.some(h=>h==="")){i.delete("index"),s.filter(d=>
35d).forEach(d=>i.append("index",d));let h=i.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:ye([r,o.pathname])),xe(o)}function Fs({key:e}={}){var x;let{router:t}=Yt("useFetcher"),r=Dn("useFetcher"),a=c.useContext(xr),n=c.useContext(be),o=(x=n.matches[n.matches.length-1])==null?void 0:x.route.id;j(a,"useFetcher must be used inside a FetchersContext"),j(n,"useFetcher must be used inside a RouteContext"),j(o!=null,'useFetcher can only be used on routes that contain a unique "id"');let l=c.useId(),[i,s]=c.useState(e||l);e&&e!==i&&s(e);let{deleteFetcher:u,getFetcher:h,resetFetcher:d,fetch:m}=t;c.useEffect(()=>(h(i),()=>u(i)),[u,h,i]);let y=c.useCallback(async(P,T)=>{j(o,"No routeId available for fetcher.load()"),await m(i,o,P,T)},[i,o,m]),E=Tn(),R=c.useCallback(async(P,T)=>{await E(P,{...T,navigate:!1,fetcherKey:i})},[i,E]),v=c.useCallback(P=>d(i,P),[d,i]),C=c.useMemo(()=>{let P=c.forwardRef((T,g)=>c.createElement(Pn,{...T,navigate:!1,fetcherKey:i,ref:g}));return P.displayName="fetcher.Form",P},[i]),S=r.fetchers.get(i)||za,D=a.get(i);return c.useMemo(()=>({Form:C,submit:R,load:y,reset:v,...S,data:D}),[C,R,y,v,S,D])}var pr="react-router-scroll-positions",Tt={};function yr(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:ce(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function ls({getKey:e,storageKey:t}={}){let{router:r}=Yt("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=Dn("useScrollRestoration"),{basename:o}=c.useContext(fe),l=ve(),i=Mr(),s=Rl();c.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),is(c.useCallback(()=>{if(s.state==="idle"){let u=yr(l,i,o,e);Tt[u]=window.scrollY}try{sessionStorage.setItem(t||pr,JSON.stringify(Tt))}catch(u){ee(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,l,i,t])),typeof document<"u"&&(c.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||pr);u&&(Tt=JSON.parse(u))}catch{}},[t]),c.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(Tt,()=>window.scrollY,e?(h,d)=>yr(h,d,o,e):void 0);return()=>u&&u()},[r,o,e]),c.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(l.hash){let u=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{ee(!1,`"${l.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[l,a,n]))}function is(e,t){let{capture:r}={};c.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function ss(e,{relative:t}={}){let r=c.useContext(Sr);j(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Yt("useViewTransitionState"),n=pt(e,{relative:t});if(!r.isTransitioning)return!1;let o=ce(r.currentLocation.pathname,a)||r.currentLocation.pathname,l=ce(r.nextLocation.pathname,a)||r.nextLocation.pathname;return _t(n.pathname,l)!=null||_t(n.pathname,o)!=null}export{Es as A,ds as B,Ls as C,Ss as D,_e as E,Vt as F,cs as G,xs as H,ys as I,vs as J,ba as K,Cn as L,Ms as M,es as N,ws as O,fs as P,hs as Q,Ds as R,ts as S,Rl as a,ve as b,rn as c,sn as d,Fs as e,nn as f,Ts as g,Mr as h,Dr as i,Ve as j,ms as k,Tn as l,ps as m,bs as n,Ps as o,Xi as p,Fe as q,yi as r,Ni as s,j as t,ln as u,Cs as v,Rs as w,gs as x,Li as y,Or as z}; 36//# sourceMappingURL=chunk-EVOBXE3Y-DElDNV1f.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.