"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[728],{78241:(e,t,r)=>{r.d(t,{N_:()=>t0,Zp:()=>eY,bg:()=>e7,ok:()=>t4,pg:()=>tt,sv:()=>tn,zy:()=>eW});var n,a=r(31111);r(68543);var o=(e=>(e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e))(o||{}),i="popstate";function l(e,t){if(!1===e||null==e)throw Error(t)}function s(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function c(e,t,r=null,n){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?h(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10)}}function d({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 h(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function f(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,s=a.history,h="POP",p=null,m=y();function y(){return(s.state||{idx:null}).idx}function g(){h="POP";let e=y(),t=null==e?null:e-m;m=e,p&&p({action:h,location:w.location,delta:t})}function v(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:d(e);return r=r.replace(/ $/,"%20"),l(t,`No window.location.(origin|href) available to create URL for href: ${r}`),new URL(r,t)}null==m&&(m=0,s.replaceState({...s.state,idx:m},""));let w={get action(){return h},get location(){return e(a,s)},listen(e){if(p)throw Error("A history only accepts one active listener");return a.addEventListener(i,g),p=e,()=>{a.removeEventListener(i,g),p=null}},createHref:e=>t(a,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){h="PUSH";let n=c(w.location,e,t);r&&r(n,e);let i=u(n,m=y()+1),l=w.createHref(n);try{s.pushState(i,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(l)}o&&p&&p({action:h,location:w.location,delta:1})},replace:function(e,t){h="REPLACE";let n=c(w.location,e,t);r&&r(n,e);let a=u(n,m=y()),i=w.createHref(n);s.replaceState(a,"",i),o&&p&&p({action:h,location:w.location,delta:0})},go:e=>s.go(e)};return w}var p=new Set(["lazy","caseSensitive","path","id","index","children"]);function m(e,t,r=[],n={}){return e.map((e,a)=>{let o=[...r,String(a)],i="string"==typeof e.id?e.id:o.join("-");if(l(!0!==e.index||!e.children,"Cannot specify children on an index route"),l(!n[i],`Found a route id collision on id "${i}".  Route id's must be globally unique within Data Router usages`),!0===e.index){let r={...e,...t(e),id:i};return n[i]=r,r}{let r={...e,...t(e),id:i,children:void 0};return n[i]=r,e.children&&(r.children=m(e.children,t,o,n)),r}})}function y(e,t,r="/"){return g(e,t,r,!1)}function g(e,t,r,n){let a=R(("string"==typeof t?h(t):t).pathname||"/",r);if(null==a)return null;let o=function e(t,r=[],n=[],a=""){let o=(t,o,i)=>{let s={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};s.relativePath.startsWith("/")&&(l(s.relativePath.startsWith(a),`Absolute route path "${s.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(a.length));let u=P([a,s.relativePath]),c=n.concat(s);if(t.children&&t.children.length>0&&(l(!0!==t.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),e(t.children,r,c,u)),null!=t.path||t.index){var d,h;let e,n;r.push({path:u,score:(d=u,h=t.index,n=(e=d.split("/")).length,e.some(b)&&(n+=-2),h&&(n+=2),e.filter(e=>!b(e)).reduce((e,t)=>e+(w.test(t)?3:""===t?1:10),n)),routesMeta:c})}};return t.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),s=[];return s.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&s.push(...l),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);!function(e){e.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)})}(o);let i=null;for(let e=0;null==i&&e<o.length;++e){let t=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return s(!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}}(a);i=function(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let l=n[e],s=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=E({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u),d=l.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=E({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:P([o,c.pathname]),pathnameBase:k(P([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=P([o,c.pathnameBase]))}return i}(o[e],t,n)}return i}function v(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}var w=/^:[\w-]+$/,b=e=>"*"===e;function E(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t=!1,r=!0){s("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}let a=l[n];return r&&!a?e[t]=void 0:e[t]=(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function S(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function x(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function C(e){let t=x(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function L(e,t,r,n=!1){let a,o;"string"==typeof e?a=h(e):(l(!(a={...e}).pathname||!a.pathname.includes("?"),S("?","pathname","search",a)),l(!a.pathname||!a.pathname.includes("#"),S("#","pathname","hash",a)),l(!a.search||!a.search.includes("#"),S("#","search","hash",a)));let i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t="/"){var r;let n,{pathname:a,search:o="",hash:i=""}="string"==typeof e?h(e):e;return{pathname:a?a.startsWith("/")?a:(r=a,n=t.replace(/\/+$/,"").split("/"),r.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"):t,search:$(o),hash:D(i)}}(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var P=e=>e.join("/").replace(/\/\/+/g,"/"),k=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",T=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}},A=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},M=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function O(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var U=["POST","PUT","PATCH","DELETE"],j=new Set(U),_=new Set(["GET",...U]),N=new Set([301,302,303,307,308]),F=new Set([307,308]),H={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},I={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},B={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},z=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),q="remix-router-transitions",J=Symbol("ResetLoaderData");function Y(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function V(e,t,r,n,a,o){let i,l;if(a){for(let e of(i=[],t))if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=L(n||".",C(i),R(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||""===n||"."===n)&&l){let e=ek(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return"/"!==r&&(s.pathname="/"===s.pathname?r:P([r,s.pathname])),d(s)}function X(e,t,r){let n,a;if(!r||!(null!=r&&("formData"in r&&null!=r.formData||"body"in r&&void 0!==r.body)))return{path:t};if(r.formMethod&&!eL(r.formMethod))return{path:t,error:eg(405,{method:r.formMethod})};let o=()=>({path:t,error:eg(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=ew(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!eP(i))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}
`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!eP(i))return o();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return o()}}}if(l("function"==typeof FormData,"FormData is not available in this environment"),r.formData)n=eu(r.formData),a=r.formData;else if(r.body instanceof FormData)n=eu(r.body),a=r.body;else if(r.body instanceof URLSearchParams)a=ec(n=r.body);else if(null==r.body)n=new URLSearchParams,a=new FormData;else try{n=new URLSearchParams(r.body),a=ec(n)}catch(e){return o()}let u={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(eP(u.formMethod))return{path:t,submission:u};let c=h(t);return e&&c.search&&ek(c.search)&&n.append("index",""),c.search=`?${n}`,{path:d(c),submission:u}}function K(e,t,r=!1){let n=e.findIndex(e=>e.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function G(e,t,r,n,a,o,i,l,s,u,c,d,h,f){let p=f?eE(f[1])?f[1].error:f[1].data:void 0,m=e.createURL(t.location),g=e.createURL(a),v=r;o&&t.errors?v=K(r,Object.keys(t.errors)[0],!0):f&&eE(f[1])&&(v=K(r,f[0]));let w=f?f[1].statusCode:void 0,b=w&&w>=400,E=v.filter((e,r)=>{var a,l,s,u,c;let d,h,f,{route:y}=e;if(y.lazy)return!0;if(null==y.loader)return!1;if(o)return Z(y,t.loaderData,t.errors);if(a=t.loaderData,l=t.matches[r],s=e,d=!l||s.route.id!==l.route.id,h=!a.hasOwnProperty(s.route.id),d||h)return!0;let v=t.matches[r];return Q(e,{currentUrl:m,currentParams:v.params,nextUrl:g,nextParams:e.params,...n,actionResult:p,actionStatus:w,defaultShouldRevalidate:!b&&(i||m.pathname+m.search===g.pathname+g.search||m.search!==g.search||(u=v,c=e,f=u.route.path,u.pathname!==c.pathname||null!=f&&f.endsWith("*")&&u.params["*"]!==c.params["*"]))})}),R=[];return u.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||s.has(a))return;let u=y(d,e.path,h);if(!u){R.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let f=t.fetchers.get(a),v=e$(u,e.path),E=!1;c.has(a)?E=!1:l.has(a)?(l.delete(a),E=!0):E=f&&"idle"!==f.state&&void 0===f.data?i:Q(v,{currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:g,nextParams:r[r.length-1].params,...n,actionResult:p,actionStatus:w,defaultShouldRevalidate:!b&&i}),E&&R.push({key:a,routeId:e.routeId,path:e.path,matches:u,match:v,controller:new AbortController})}),[E,R]}function Z(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return(!!n||!a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function Q(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function ee(e,t,r,n,a){let o;if(e){let t=n[e];l(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=r;let i=m(t.filter(e=>!o.some(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||t.children.every((t,n)=>r.children?.some(r=>e(t,r))))})(e,t))),a,[e||"_","patch",String(o?.length||"0")],n);o.push(...i)}async function et(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];l(a,"No route found in manifest");let o={};for(let e in n){let t=void 0!==a[e]&&"hasErrorBoundary"!==e;s(!t,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`),t||p.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,{...t(a),lazy:void 0})}async function er({matches:e}){let t=e.filter(e=>e.shouldLoad);return(await Promise.all(t.map(e=>e.resolve()))).reduce((e,r,n)=>Object.assign(e,{[t[n].route.id]:r}),{})}async function en(e,t,r,n,a,o,i,l,s,u){let c=o.map(e=>e.route.lazy?et(e.route,s,l):void 0),d=o.map((e,r)=>{let o=c[r],i=a.some(t=>t.route.id===e.route.id),l=async r=>(r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(i=!0),i?ea(t,n,e,o,r,u):Promise.resolve({type:"data",result:void 0}));return{...e,shouldLoad:i,resolve:l}}),h=await e({matches:d,request:n,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(c)}catch(e){}return h}async function ea(e,t,r,n,a,o){let i,l;let s=n=>{let i;let s=new Promise((e,t)=>i=t);l=()=>i(),t.signal.addEventListener("abort",l);let u=a=>"function"!=typeof n?Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${e}" [routeId: ${r.route.id}]`)):n({request:t,params:r.params,context:o},...void 0!==a?[a]:[]);return Promise.race([(async()=>{try{let e=await (a?a(e=>u(e)):u());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),s])};try{let a=r.route[e];if(n){if(a){let e;let[t]=await Promise.all([s(a).catch(t=>{e=t}),n]);if(void 0!==e)throw e;i=t}else if(await n,a=r.route[e])i=await s(a);else{if("action"!==e)return{type:"data",result:void 0};let n=new URL(t.url),a=n.pathname+n.search;throw eg(405,{method:t.method,pathname:a,routeId:r.route.id})}}else if(a)i=await s(a);else{let e=new URL(t.url),r=e.pathname+e.search;throw eg(404,{pathname:r})}}catch(e){return{type:"error",result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return i}async function eo(e){let{result:t,type:r}=e;if(ex(t)){let e;try{let r=t.headers.get("Content-Type");e=r&&/\bapplication\/json\b/.test(r)?null==t.body?null:await t.json():await t.text()}catch(e){return{type:"error",error:e}}return"error"===r?{type:"error",error:new M(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}if("error"===r)return eS(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new M(t.init?.status||500,void 0,t.data),statusCode:O(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:O(t)?t.status:void 0};return eS(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function ei(e,t,r,n,a){let o=e.headers.get("Location");if(l(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!z.test(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=V(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function el(e,t,r){if(z.test(e)){let n=new URL(e.startsWith("//")?t.protocol+e:e),a=null!=R(n.pathname,r);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function es(e,t,r,n){let a=e.createURL(ew(t)).toString(),o={signal:r};if(n&&eP(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=eu(n.formData):o.body=n.formData}return new Request(a,o)}function eu(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function ec(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ed(e,t,r,n=!1,a=!1){let o,i={},s=null,u=!1,c={},d=r&&eE(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let h=r.route.id,f=t[h];if(l(!eR(f),"Cannot handle redirect results in processLoaderData"),eE(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},a)s[h]=t;else{let r=em(e,h);null==s[r.route.id]&&(s[r.route.id]=t)}n||(i[h]=J),u||(u=!0,o=O(f.error)?f.error.status:500),f.headers&&(c[h]=f.headers)}else i[h]=f.data,f.statusCode&&200!==f.statusCode&&!u&&(o=f.statusCode),f.headers&&(c[h]=f.headers)}),void 0!==d&&r&&(s={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:c}}function eh(e,t,r,n,a,o){let{loaderData:i,errors:s}=ed(t,r,n);return a.forEach(t=>{let{key:r,match:n,controller:a}=t,i=o[r];if(l(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted){if(eE(i)){let t=em(e.matches,n?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(eR(i))l(!1,"Unhandled fetcher revalidation redirect");else{let t=eM(i.data);e.fetchers.set(r,t)}}}),{loaderData:i,errors:s}}function ef(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==J).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function ep(e){return e?eE(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function em(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function ey(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eg(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",l=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new M(e||500,i,Error(l),!0)}function ev(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(eR(n))return{key:r,result:n}}}function ew(e){return d({..."string"==typeof e?h(e):e,hash:""})}function eb(e){return ex(e.result)&&N.has(e.result.status)}function eE(e){return"error"===e.type}function eR(e){return"redirect"===(e&&e.type)}function eS(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ex(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eC(e){return N.has(e)}function eL(e){return _.has(e.toUpperCase())}function eP(e){return j.has(e.toUpperCase())}function ek(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function e$(e,t){let r="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&ek(r||""))return e[e.length-1];let n=x(e);return n[n.length-1]}function eD(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function eT(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 eA(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 eM(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}var eO=a.createContext(null);eO.displayName="DataRouter";var eU=a.createContext(null);eU.displayName="DataRouterState";var ej=a.createContext({isTransitioning:!1});ej.displayName="ViewTransition";var e_=a.createContext(new Map);e_.displayName="Fetchers";var eN=a.createContext(null);eN.displayName="Await";var eF=a.createContext(null);eF.displayName="Navigation";var eH=a.createContext(null);eH.displayName="Location";var eI=a.createContext({outlet:null,matches:[],isDataRoute:!1});eI.displayName="Route";var eB=a.createContext(null);function ez(){return null!=a.useContext(eH)}function eW(){return l(ez(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(eH).location}eB.displayName="RouteError";var eq="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eJ(e){a.useContext(eF).static||a.useLayoutEffect(e)}function eY(){let{isDataRoute:e}=a.useContext(eI);return e?function(){let{router:e}=function(e){let t=a.useContext(eO);return l(t,e0(e)),t}("useNavigate"),t=e2("useNavigate"),r=a.useRef(!1);return eJ(()=>{r.current=!0}),a.useCallback(async(n,a={})=>{s(r.current,eq),r.current&&("number"==typeof n?e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){l(ez(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(eO),{basename:t,navigator:r}=a.useContext(eF),{matches:n}=a.useContext(eI),{pathname:o}=eW(),i=JSON.stringify(C(n)),u=a.useRef(!1);return eJ(()=>{u.current=!0}),a.useCallback((n,a={})=>{if(s(u.current,eq),!u.current)return;if("number"==typeof n){r.go(n);return}let l=L(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:P([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)},[t,r,i,o,e])}()}var eV=a.createContext(null);function eX(e,{relative:t}={}){let{matches:r}=a.useContext(eI),{pathname:n}=eW(),o=JSON.stringify(C(r));return a.useMemo(()=>L(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function eK(e,t,r,n){let o;l(ez(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:u}=a.useContext(eF),{matches:c}=a.useContext(eI),d=c[c.length-1],f=d?d.params:{},p=d?d.pathname:"/",m=d?d.pathnameBase:"/",g=d&&d.route;{let e=g&&g.path||"";e3(p,!g||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let v=eW();if(t){let e="string"==typeof t?h(t):t;l("/"===m||e.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${e.pathname}" was given in the \`location\` prop.`),o=e}else o=v;let w=o.pathname||"/",b=w;if("/"!==m){let e=m.replace(/^\//,"").split("/");b="/"+w.replace(/^\//,"").split("/").slice(e.length).join("/")}let E=!u&&r&&r.matches&&r.matches.length>0?r.matches:y(e,{pathname:b});s(g||null!=E,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),s(null==E||void 0!==E[E.length-1].route.element||void 0!==E[E.length-1].route.Component||void 0!==E[E.length-1].route.lazy,`Matched leaf route at location "${o.pathname}${o.search}${o.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=function(e,t=[],r=null,n=null){if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&i?.[e.route.id]!==void 0);l(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let s=!1,u=-1;if(r)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:n}=r,a=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!n||void 0===n[t.route.id]);if(t.route.lazy||a){s=!0,o=u>=0?o.slice(0,u+1):[o[0]];break}}}return o.reduceRight((e,n,l)=>{let c;let d=!1,h=null,f=null;r&&(c=i&&n.route.id?i[n.route.id]:void 0,h=n.route.errorElement||eG,s&&(u<0&&0===l?(e3("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):u===l&&(d=!0,f=n.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,l+1)),m=()=>{let t;return t=c?h:d?f:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(eQ,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===l)?a.createElement(eZ,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(E&&E.map(e=>Object.assign({},e,{params:Object.assign({},f,e.params),pathname:P([m,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?m:P([m,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),c,r,n);return t&&R?a.createElement(eH.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...o},navigationType:"POP"}},R):R}var eG=a.createElement(function(){let e=e4(),t=O(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=a.createElement(a.Fragment,null,a.createElement("p",null,"\uD83D\uDCBF Hey developer \uD83D\uDC4B"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:o},"ErrorBoundary")," or"," ",a.createElement("code",{style:o},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:{padding:"0.5rem",backgroundColor:n}},r):null,i)},null),eZ=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?a.createElement(eI.Provider,{value:this.props.routeContext},a.createElement(eB.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function eQ({routeContext:e,match:t,children:r}){let n=a.useContext(eO);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(eI.Provider,{value:e},r)}function e0(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function e1(e){let t=a.useContext(eU);return l(t,e0(e)),t}function e2(e){let t;let r=(l(t=a.useContext(eI),e0(e)),t),n=r.matches[r.matches.length-1];return l(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function e4(){let e=a.useContext(eB),t=e1("useRouteError"),r=e2("useRouteError");return void 0!==e?e:t.errors?.[r]}var e5={};function e3(e,t,r){t||e5[e]||(e5[e]=!0,s(!1,r))}var e8={};function e9(e,t){e||e8[t]||(e8[t]=!0,console.warn(t))}function e6(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&s(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&s(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&s(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function e7(e,t){return(function(e){let t,r,n,a,o;let i=e.window?e.window:"undefined"!=typeof window?window:void 0,u=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement;l(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let d=e.mapRouteProperties||W,h={},f=m(e.routes,d,void 0,h),p=e.basename||"/",w=e.dataStrategy||er,b=e.patchRoutesOnNavigation,E={...e.future},S=null,x=new Set,C=null,L=null,P=null,k=null!=e.hydrationData,$=y(f,e.history.location,p),D=!1,T=null;if(null==$&&!b){let t=eg(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=ey(f);$=r,T={[n.id]:t}}if($&&!e.hydrationData&&e3($,f,e.history.location.pathname).active&&($=null),$){if($.some(e=>e.route.lazy))r=!1;else if($.some(e=>e.route.loader)){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=$.findIndex(e=>void 0!==n[e.route.id]);r=$.slice(0,e+1).every(e=>!Z(e.route,t,n))}else r=$.every(e=>!Z(e.route,t,n))}else r=!0}else{r=!1,$=[];let t=e3(null,f,e.history.location.pathname);t.active&&t.matches&&(D=!0,$=t.matches)}let A={historyAction:e.history.action,location:e.history.location,matches:$,initialized:r,navigation:H,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||T,fetchers:new Map,blockers:new Map},M="POP",U=!1,j=!1,_=new Map,N=null,J=!1,Y=!1,K=new Set,Q=new Map,et=0,ea=-1,eu=new Map,ec=new Set,ed=new Map,ew=new Map,eS=new Set,ex=new Map,eC=null;function eL(e,t={}){A={...A,...e};let r=[],n=[];A.fetchers.forEach((e,t)=>{"idle"===e.state&&(eS.has(t)?r.push(t):n.push(t))}),eS.forEach(e=>{A.fetchers.has(e)||Q.has(e)||r.push(e)}),[...x].forEach(e=>e(A,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>eV(e)),n.forEach(e=>A.fetchers.delete(e))}function ek(r,n,{flushSync:a}={}){let o,i,l=null!=A.actionData&&null!=A.navigation.formMethod&&eP(A.navigation.formMethod)&&"loading"===A.navigation.state&&r.state?._isRedirect!==!0;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?A.actionData:null;let s=n.loaderData?ef(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,u=A.blockers;u.size>0&&(u=new Map(u)).forEach((e,t)=>u.set(t,B));let c=!0===U||null!=A.navigation.formMethod&&eP(A.navigation.formMethod)&&r.state?._isRedirect!==!0;if(t&&(f=t,t=void 0),J||"POP"===M||("PUSH"===M?e.history.push(r,r.state):"REPLACE"===M&&e.history.replace(r,r.state)),"POP"===M){let e=_.get(A.location.pathname);e&&e.has(r.pathname)?i={currentLocation:A.location,nextLocation:r}:_.has(r.pathname)&&(i={currentLocation:r,nextLocation:A.location})}else if(j){let e=_.get(A.location.pathname);e?e.add(r.pathname):(e=new Set([r.pathname]),_.set(A.location.pathname,e)),i={currentLocation:A.location,nextLocation:r}}eL({...n,actionData:o,loaderData:s,historyAction:M,location:r,initialized:!0,navigation:H,revalidation:"idle",restoreScrollPosition:e5(r,n.matches||A.matches),preventScrollReset:c,blockers:u},{viewTransitionOpts:i,flushSync:!0===a}),M="POP",U=!1,j=!1,J=!1,Y=!1,eC?.resolve(),eC=null}async function eO(t,r){if("number"==typeof t){e.history.go(t);return}let{path:n,submission:a,error:o}=X(!1,V(A.location,A.matches,p,t,r?.fromRouteId,r?.relative),r),i=A.location,l=c(A.location,n,r&&r.state);l={...l,...e.history.encodeLocation(l)};let s=r&&null!=r.replace?r.replace:void 0,u="PUSH";!0===s?u="REPLACE":!1===s||null!=a&&eP(a.formMethod)&&a.formAction===A.location.pathname+A.location.search&&(u="REPLACE");let d=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),f=e1({currentLocation:i,nextLocation:l,historyAction:u});if(f){e0(f,{state:"blocked",location:l,proceed(){e0(f,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),eO(t,r)},reset(){let e=new Map(A.blockers);e.set(f,B),eL({blockers:e})}});return}await eU(u,l,{submission:a,pendingError:o,preventScrollReset:d,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h})}async function eU(r,n,o){var i,l,s,u;let c;a&&a.abort(),a=null,M=r,J=!0===(o&&o.startUninterruptedRevalidation),i=A.location,l=A.matches,C&&P&&(C[e4(i,l)]=P()),U=!0===(o&&o.preventScrollReset),j=!0===(o&&o.enableViewTransition);let d=t||f,h=o&&o.overrideNavigation,m=o?.initialHydration&&A.matches&&A.matches.length>0&&!D?A.matches:y(d,n,p),g=!0===(o&&o.flushSync);if(m&&A.initialized&&!Y&&(s=A.location,u=n,s.pathname===u.pathname&&s.search===u.search&&(""===s.hash?""!==u.hash:s.hash===u.hash||""!==u.hash))&&!(o&&o.submission&&eP(o.submission.formMethod))){ek(n,{matches:m},{flushSync:g});return}let v=e3(m,d,n.pathname);if(v.active&&v.matches&&(m=v.matches),!m){let{error:e,notFoundMatches:t,route:r}=e2(n.pathname);ek(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:g});return}a=new AbortController;let w=es(e.history,n,a.signal,o&&o.submission);if(o&&o.pendingError)c=[em(m).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&eP(o.submission.formMethod)){let t=await ej(w,n,o.submission,m,v.active,{replace:o.replace,flushSync:g});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(eE(r)&&O(r.error)&&404===r.error.status){a=null,ek(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}m=t.matches||m,c=t.pendingActionResult,h=eT(n,o.submission),g=!1,v.active=!1,w=es(e.history,w.url,w.signal)}let{shortCircuited:b,matches:E,loaderData:R,errors:S}=await e_(w,n,m,v.active,h,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,g,c);!b&&(a=null,ek(n,{matches:E||m,...ep(c),loaderData:R,errors:S}))}async function ej(e,t,r,n,a,o={}){var i;let l;if(eW(),eL({navigation:{state:"submitting",location:t,formMethod:(i=r).formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}},{flushSync:!0===o.flushSync}),a){let r=await e8(n,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=em(r.partialMatches).route.id;return{matches:r.partialMatches,pendingActionResult:[e,{type:"error",error:r.error}]}}if(r.matches)n=r.matches;else{let{notFoundMatches:e,error:r,route:n}=e2(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:r}]}}}let s=e$(n,t);if(s.route.action||s.route.lazy){if(l=(await eB("action",A,e,[s],n,null))[s.route.id],e.signal.aborted)return{shortCircuited:!0}}else l={type:"error",error:eg(405,{method:e.method,pathname:t.pathname,routeId:s.route.id})};if(eR(l)){let t;return t=o&&null!=o.replace?o.replace:el(l.response.headers.get("Location"),new URL(e.url),p)===A.location.pathname+A.location.search,await eI(e,l,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(eE(l)){let e=em(n,s.route.id);return!0!==(o&&o.replace)&&(M="PUSH"),{matches:n,pendingActionResult:[e.route.id,l]}}return{matches:n,pendingActionResult:[s.route.id,l]}}async function e_(r,n,o,i,l,s,u,c,d,h,m){let y=l||eT(n,s),g=s||u||eD(y),v=!J&&!d;if(i){if(v){let e=eN(m);eL({navigation:y,...void 0!==e?{actionData:e}:{}},{flushSync:h})}let e=await e8(o,n.pathname,r.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=em(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)o=e.matches;else{let{error:e,notFoundMatches:t,route:r}=e2(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=t||f,[b,E]=G(e.history,A,o,g,n,!0===d,Y,K,eS,ed,ec,w,p,m);if(ea=++et,0===b.length&&0===E.length){let e=eG();return ek(n,{matches:o,loaderData:{},errors:m&&eE(m[1])?{[m[0]]:m[1].error}:null,...ep(m),...e?{fetchers:new Map(A.fetchers)}:{}},{flushSync:h}),{shortCircuited:!0}}if(v){let e={};if(!i){e.navigation=y;let t=eN(m);void 0!==t&&(e.actionData=t)}E.length>0&&(E.forEach(e=>{let t=A.fetchers.get(e.key),r=eA(void 0,t?t.data:void 0);A.fetchers.set(e.key,r)}),e.fetchers=new Map(A.fetchers)),eL(e,{flushSync:h})}E.forEach(e=>{eX(e.key),e.controller&&Q.set(e.key,e.controller)});let R=()=>E.forEach(e=>eX(e.key));a&&a.signal.addEventListener("abort",R);let{loaderResults:S,fetcherResults:x}=await ez(A,o,b,E,r);if(r.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",R),E.forEach(e=>Q.delete(e.key));let C=ev(S);if(C)return await eI(r,C.result,!0,{replace:c}),{shortCircuited:!0};if(C=ev(x))return ec.add(C.key),await eI(r,C.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:L,errors:P}=eh(A,o,S,m,E,x);d&&A.errors&&(P={...A.errors,...P});let k=eG(),$=eZ(ea);return{matches:o,loaderData:L,errors:P,...k||$||E.length>0?{fetchers:new Map(A.fetchers)}:{}}}function eN(e){return e&&!eE(e[1])?{[e[0]]:e[1].data}:A.actionData?0===Object.keys(A.actionData).length?null:A.actionData:void 0}async function eF(r,n,o,i,s,u,c,d,h){var m,g;function v(e){if(!e.route.action&&!e.route.lazy){let e=eg(405,{method:h.formMethod,pathname:o,routeId:n});return eJ(r,n,e,{flushSync:c}),!0}return!1}if(eW(),ed.delete(r),!u&&v(i))return;let w=A.fetchers.get(r);eq(r,(m=h,g=w,{state:"submitting",formMethod:m.formMethod,formAction:m.formAction,formEncType:m.formEncType,formData:m.formData,json:m.json,text:m.text,data:g?g.data:void 0}),{flushSync:c});let b=new AbortController,E=es(e.history,o,b.signal,h);if(u){let e=await e8(s,o,E.signal);if("aborted"===e.type)return;if("error"===e.type){eJ(r,n,e.error,{flushSync:c});return}if(e.matches){if(v(i=e$(s=e.matches,o)))return}else{eJ(r,n,eg(404,{pathname:o}),{flushSync:c});return}}Q.set(r,b);let R=et,S=(await eB("action",A,E,[i],s,r))[i.route.id];if(E.signal.aborted){Q.get(r)===b&&Q.delete(r);return}if(eS.has(r)){if(eR(S)||eE(S)){eq(r,eM(void 0));return}}else{if(eR(S))return(Q.delete(r),ea>R)?(eq(r,eM(void 0)),void 0):(ec.add(r),eq(r,eA(h)),eI(E,S,!1,{fetcherSubmission:h,preventScrollReset:d}));if(eE(S)){eJ(r,n,S.error);return}}let x=A.navigation.location||A.location,C=es(e.history,x,b.signal),L=t||f,P="idle"!==A.navigation.state?y(L,A.navigation.location,p):A.matches;l(P,"Didn't find any matches after fetcher action");let k=++et;eu.set(r,k);let $=eA(h,S.data);A.fetchers.set(r,$);let[D,T]=G(e.history,A,P,h,x,!1,Y,K,eS,ed,ec,L,p,[i.route.id,S]);T.filter(e=>e.key!==r).forEach(e=>{let t=e.key,r=A.fetchers.get(t),n=eA(void 0,r?r.data:void 0);A.fetchers.set(t,n),eX(t),e.controller&&Q.set(t,e.controller)}),eL({fetchers:new Map(A.fetchers)});let O=()=>T.forEach(e=>eX(e.key));b.signal.addEventListener("abort",O);let{loaderResults:U,fetcherResults:j}=await ez(A,P,D,T,C);if(b.signal.aborted)return;b.signal.removeEventListener("abort",O),eu.delete(r),Q.delete(r),T.forEach(e=>Q.delete(e.key));let _=ev(U);if(_)return eI(C,_.result,!1,{preventScrollReset:d});if(_=ev(j))return ec.add(_.key),eI(C,_.result,!1,{preventScrollReset:d});let{loaderData:N,errors:F}=eh(A,P,U,void 0,T,j);if(A.fetchers.has(r)){let e=eM(S.data);A.fetchers.set(r,e)}eZ(k),"loading"===A.navigation.state&&k>ea?(l(M,"Expected pending action"),a&&a.abort(),ek(A.navigation.location,{matches:P,loaderData:N,errors:F,fetchers:new Map(A.fetchers)})):(eL({errors:F,loaderData:ef(A.loaderData,N,P,F),fetchers:new Map(A.fetchers)}),Y=!1)}async function eH(t,r,n,a,o,i,l,s,u){let c=A.fetchers.get(t);eq(t,eA(u,c?c.data:void 0),{flushSync:l});let d=new AbortController,h=es(e.history,n,d.signal);if(i){let e=await e8(o,n,h.signal);if("aborted"===e.type)return;if("error"===e.type){eJ(t,r,e.error,{flushSync:l});return}if(e.matches)a=e$(o=e.matches,n);else{eJ(t,r,eg(404,{pathname:n}),{flushSync:l});return}}Q.set(t,d);let f=et,p=(await eB("loader",A,h,[a],o,t))[a.route.id];if(Q.get(t)===d&&Q.delete(t),!h.signal.aborted){if(eS.has(t)){eq(t,eM(void 0));return}if(eR(p)){if(ea>f){eq(t,eM(void 0));return}ec.add(t),await eI(h,p,!1,{preventScrollReset:s});return}if(eE(p)){eJ(t,r,p.error);return}eq(t,eM(p.data))}}async function eI(t,r,n,{submission:o,fetcherSubmission:s,preventScrollReset:d,replace:h}={}){r.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let f=r.response.headers.get("Location");l(f,"Expected a Location header on the redirect Response"),f=el(f,new URL(t.url),p);let m=c(A.location,f,{_isRedirect:!0});if(u){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(z.test(f)){let r=e.history.createURL(f);t=r.origin!==i.location.origin||null==R(r.pathname,p)}if(t){h?i.location.replace(f):i.location.assign(f);return}}a=null;let y=!0===h||r.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:g,formAction:v,formEncType:w}=A.navigation;!o&&!s&&g&&v&&w&&(o=eD(A.navigation));let b=o||s;if(F.has(r.response.status)&&b&&eP(b.formMethod))await eU(y,m,{submission:{...b,formAction:f},preventScrollReset:d||U,enableViewTransition:n?j:void 0});else{let e=eT(m,o);await eU(y,m,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:d||U,enableViewTransition:n?j:void 0})}}async function eB(e,t,r,n,a,o){let i;let l={};try{i=await en(w,e,t,r,n,a,o,h,d)}catch(e){return n.forEach(t=>{l[t.route.id]={type:"error",error:e}}),l}for(let[e,t]of Object.entries(i))if(eb(t)){let n=t.result;l[e]={type:"redirect",response:ei(n,r,e,a,p)}}else l[e]=await eo(t);return l}async function ez(t,r,n,a,o){let i=eB("loader",t,o,n,r,null),l=Promise.all(a.map(async r=>{if(!r.matches||!r.match||!r.controller)return Promise.resolve({[r.key]:{type:"error",error:eg(404,{pathname:r.path})}});{let n=(await eB("loader",t,es(e.history,r.path,r.controller.signal),[r.match],r.matches,r.key))[r.match.route.id];return{[r.key]:n}}}));return{loaderResults:await i,fetcherResults:(await l).reduce((e,t)=>Object.assign(e,t),{})}}function eW(){Y=!0,ed.forEach((e,t)=>{Q.has(t)&&K.add(t),eX(t)})}function eq(e,t,r={}){A.fetchers.set(e,t),eL({fetchers:new Map(A.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function eJ(e,t,r,n={}){let a=em(A.matches,t);eV(e),eL({errors:{[a.route.id]:r},fetchers:new Map(A.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function eY(e){return ew.set(e,(ew.get(e)||0)+1),eS.has(e)&&eS.delete(e),A.fetchers.get(e)||I}function eV(e){let t=A.fetchers.get(e);Q.has(e)&&!(t&&"loading"===t.state&&eu.has(e))&&eX(e),ed.delete(e),eu.delete(e),ec.delete(e),eS.delete(e),K.delete(e),A.fetchers.delete(e)}function eX(e){let t=Q.get(e);t&&(t.abort(),Q.delete(e))}function eK(e){for(let t of e){let e=eM(eY(t).data);A.fetchers.set(t,e)}}function eG(){let e=[],t=!1;for(let r of ec){let n=A.fetchers.get(r);l(n,`Expected fetcher: ${r}`),"loading"===n.state&&(ec.delete(r),e.push(r),t=!0)}return eK(e),t}function eZ(e){let t=[];for(let[r,n]of eu)if(n<e){let e=A.fetchers.get(r);l(e,`Expected fetcher: ${r}`),"loading"===e.state&&(eX(r),eu.delete(r),t.push(r))}return eK(t),t.length>0}function eQ(e){A.blockers.delete(e),ex.delete(e)}function e0(e,t){let r=A.blockers.get(e)||B;l("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(A.blockers);n.set(e,t),eL({blockers:n})}function e1({currentLocation:e,nextLocation:t,historyAction:r}){if(0===ex.size)return;ex.size>1&&s(!1,"A router only supports one blocker at a time");let n=Array.from(ex.entries()),[a,o]=n[n.length-1],i=A.blockers.get(a);if((!i||"proceeding"!==i.state)&&o({currentLocation:e,nextLocation:t,historyAction:r}))return a}function e2(e){let r=eg(404,{pathname:e}),{matches:n,route:a}=ey(t||f);return{notFoundMatches:n,route:a,error:r}}function e4(e,t){return L&&L(e,t.map(e=>v(e,A.loaderData)))||e.key}function e5(e,t){if(C){let r=C[e4(e,t)];if("number"==typeof r)return r}return null}function e3(e,t,r){if(b){if(!e)return{active:!0,matches:g(t,r,p,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:g(t,r,p,!0)}}return{active:!1,matches:null}}async function e8(e,r,n){if(!b)return{type:"success",matches:e};let a=e;for(;;){let e=null==t,o=t||f,i=h;try{await b({path:r,matches:a,patch:(e,t)=>{n.aborted||ee(e,t,o,i,d)}})}catch(e){return{type:"error",error:e,partialMatches:a}}finally{e&&!n.aborted&&(f=[...f])}if(n.aborted)return{type:"aborted"};let l=y(o,r,p);if(l)return{type:"success",matches:l};let s=g(o,r,p,!0);if(!s||a.length===s.length&&a.every((e,t)=>e.route.id===s[t].route.id))return{type:"success",matches:null};a=s}}return n={get basename(){return p},get future(){return E},get state(){return A},get routes(){return f},get window(){return i},initialize:function(){if(S=e.history.listen(({action:t,location:r,delta:n})=>{if(o){o(),o=void 0;return}s(0===ex.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=e1({currentLocation:A.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{o=e});e.history.go(-1*n),e0(a,{state:"blocked",location:r,proceed(){e0(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(A.blockers);e.set(a,B),eL({blockers:e})}});return}return eU(t,r)}),u){!function(e,t){try{let r=e.sessionStorage.getItem(q);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(e){}}(i,_);let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(q,JSON.stringify(r))}catch(e){s(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}})(i,_);i.addEventListener("pagehide",e),N=()=>i.removeEventListener("pagehide",e)}return A.initialized||eU("POP",A.location,{initialHydration:!0}),n},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,r){if(C=e,P=t,L=r||null,!k&&A.navigation===H){k=!0;let e=e5(A.location,A.matches);null!=e&&eL({restoreScrollPosition:e})}return()=>{C=null,P=null,L=null}},navigate:eO,fetch:async function e(e,r,n,a){eX(e);let o=!0===(a&&a.flushSync),i=t||f,l=V(A.location,A.matches,p,n,r,a?.relative),s=y(i,l,p),u=e3(s,i,l);if(u.active&&u.matches&&(s=u.matches),!s){eJ(e,r,eg(404,{pathname:l}),{flushSync:o});return}let{path:c,submission:d,error:h}=X(!0,l,a);if(h){eJ(e,r,h,{flushSync:o});return}let m=e$(s,c),g=!0===(a&&a.preventScrollReset);if(d&&eP(d.formMethod)){await eF(e,r,c,m,s,u.active,o,g,d);return}ed.set(e,{routeId:r,path:c}),await eH(e,r,c,m,s,u.active,o,g,d)},revalidate:function(){let e,t,r;eC||(eC={promise:r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{a(e);try{await r}catch(e){}}}),resolve:e,reject:t}),eW(),eL({revalidation:"loading"});let n=eC.promise;return"submitting"===A.navigation.state||("idle"===A.navigation.state?eU(A.historyAction,A.location,{startUninterruptedRevalidation:!0}):eU(M||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:!0===j})),n},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eY,deleteFetcher:function(e){let t=(ew.get(e)||0)-1;t<=0?(ew.delete(e),eS.add(e)):ew.set(e,t),eL({fetchers:new Map(A.fetchers)})},dispose:function(){S&&S(),N&&N(),x.clear(),a&&a.abort(),A.fetchers.forEach((e,t)=>eV(t)),A.blockers.forEach((e,t)=>eQ(t))},getBlocker:function(e,t){let r=A.blockers.get(e)||B;return ex.get(e)!==t&&ex.set(e,t),r},deleteBlocker:eQ,patchRoutes:function(e,r){let n=null==t;ee(e,r,t||f,h,d),n&&(f=[...f],eL({}))},_internalFetchControllers:Q,_internalSetRoutes:function(e){t=m(e,d,void 0,h={})}}})({basename:t?.basename,future:t?.future,history:function(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map((e,t)=>f(e,"string"==typeof e?null:e.state,0===t?"default":void 0));let o=u(null==n?t.length-1:n),i="POP",l=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function f(e,r=null,n){let a=c(t?t[o].pathname:"/",e,r,n);return s("/"===a.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),a}function p(e){return"string"==typeof e?e:d(e)}return{get index(){return o},get action(){return i},get location(){return t[o]},createHref:p,createURL:e=>new URL(p(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?h(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i="PUSH";let n=f(e,r);o+=1,t.splice(o,t.length,n),a&&l&&l({action:i,location:n,delta:1})},replace(e,r){i="REPLACE";let n=f(e,r);t[o]=n,a&&l&&l({action:i,location:n,delta:0})},go(e){i="POP";let r=u(o+e),n=t[r];o=r,l&&l({action:i,location:n,delta:e})},listen:e=>(l=e,()=>{l=null})}}({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:e6,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}var te=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function tt({router:e,flushSync:t}){let[r,n]=a.useState(e.state),[o,i]=a.useState(),[l,s]=a.useState({isTransitioning:!1}),[u,c]=a.useState(),[d,h]=a.useState(),[f,p]=a.useState(),m=a.useRef(new Map),y=a.useCallback((r,{deletedFetchers:o,flushSync:l,viewTransitionOpts:f})=>{r.fetchers.forEach((e,t)=>{void 0!==e.data&&m.current.set(t,e.data)}),o.forEach(e=>m.current.delete(e)),e9(!1===l||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(e9(null==f||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!f||!y){t&&l?t(()=>n(r)):a.startTransition(()=>n(r));return}if(t&&l){t(()=>{d&&(u&&u.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:f.currentLocation,nextLocation:f.nextLocation})});let a=e.window.document.startViewTransition(()=>{t(()=>n(r))});a.finished.finally(()=>{t(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})})}),t(()=>h(a));return}d?(u&&u.resolve(),d.skipTransition(),p({state:r,currentLocation:f.currentLocation,nextLocation:f.nextLocation})):(i(r),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}))},[e.window,t,d,u]);a.useLayoutEffect(()=>e.subscribe(y),[e,y]),a.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new te)},[l]),a.useEffect(()=>{if(u&&o&&e.window){let t=u.promise,r=e.window.document.startViewTransition(async()=>{a.startTransition(()=>n(o)),await t});r.finished.finally(()=>{c(void 0),h(void 0),i(void 0),s({isTransitioning:!1})}),h(r)}},[o,u,e.window]),a.useEffect(()=>{u&&o&&r.location.key===o.location.key&&u.resolve()},[u,d,r.location,o]),a.useEffect(()=>{!l.isTransitioning&&f&&(i(f.state),s({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),p(void 0))},[l.isTransitioning,f]);let g=a.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),v=e.basename||"/",w=a.useMemo(()=>({router:e,navigator:g,static:!1,basename:v}),[e,g,v]);return a.createElement(a.Fragment,null,a.createElement(eO.Provider,{value:w},a.createElement(eU.Provider,{value:r},a.createElement(e_.Provider,{value:m.current},a.createElement(ej.Provider,{value:l},a.createElement(ta,{basename:v,location:r.location,navigationType:r.historyAction,navigator:g},a.createElement(tr,{routes:e.routes,future:e.future,state:r})))))),null)}var tr=a.memo(function({routes:e,future:t,state:r}){return eK(e,void 0,r,t)});function tn(e){var t;let r;return t=e.context,(r=a.useContext(eI).outlet)?a.createElement(eV.Provider,{value:t},r):r}function ta({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1}){l(!ez(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=a.useMemo(()=>({basename:u,navigator:o,static:i,future:{}}),[u,o,i]);"string"==typeof r&&(r=h(r));let{pathname:d="/",search:f="",hash:p="",state:m=null,key:y="default"}=r,g=a.useMemo(()=>{let e=R(d,u);return null==e?null:{location:{pathname:e,search:f,hash:p,state:m,key:y},navigationType:n}},[u,d,f,p,m,y,n]);return(s(null!=g,`<Router basename="${u}"> is not able to match the URL "${d}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),null==g)?null:a.createElement(eF.Provider,{value:c},a.createElement(eH.Provider,{children:t,value:g}))}a.Component;var to="get",ti="application/x-www-form-urlencoded";function tl(e){return null!=e&&"string"==typeof e.tagName}function ts(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var tu=null,tc=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function td(e){return null==e||tc.has(e)?e:(s(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ti}"`),null)}function th(e,t){if(!1===e||null==e)throw Error(t)}async function tf(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(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}async function tp(e,t){if(!e.css&&!t.links||!function(){if(void 0!==n)return n;let e=document.createElement("link");return n=e.relList.supports("preload"),e=null,n}())return;let r=[];if(e.css&&r.push(...e.css.map(e=>({rel:"stylesheet",href:e}))),t.links&&r.push(...t.links()),0===r.length)return;let a=[];for(let e of r)ty(e)||"stylesheet"!==e.rel||a.push({...e,rel:"preload",as:"style"});let o=a.filter(e=>(!e.media||window.matchMedia(e.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`));await Promise.all(o.map(tm))}async function tm(e){return new Promise(t=>{let r=document.createElement("link");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function ty(e){return null!=e&&"string"==typeof e.page}function tg(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function tv(e,t,r){return function(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!ty(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={};for(let r of Object.keys(e).sort())t[r]=e[r];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await tf(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(tg).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function tw(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}var tb={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},tE=/[&><\u2028\u2029]/g;async function tR(e){let t={signal:e.signal};if("GET"!==e.method){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 tS=Symbol("SingleFetchRedirect");function tx({context:e,identifier:t,reader:r,textDecoder:n,nonce:a}){if(!e.renderMeta||!e.renderMeta.didRenderScripts)return null;e.renderMeta.streamCache||(e.renderMeta.streamCache={});let{streamCache:o}=e.renderMeta,i=o[t];if(i||(i=o[t]=r.read().then(e=>{o[t].result={done:e.done,value:n.decode(e.value,{stream:!0})}}).catch(e=>{o[t].error=e})),i.error)throw i.error;if(void 0===i.result)throw i;let{done:l,value:s}=i.result,u=s?React4.createElement("script",{nonce:a,dangerouslySetInnerHTML:{__html:`window.__reactRouterContext.streamController.enqueue(${JSON.stringify(s).replace(tE,e=>tb[e])});`}}):null;return l?React4.createElement(React4.Fragment,null,u,React4.createElement("script",{nonce:a,dangerouslySetInnerHTML:{__html:"window.__reactRouterContext.streamController.close();"}})):React4.createElement(React4.Fragment,null,u,React4.createElement(React4.Suspense,null,React4.createElement(tx,{context:e,identifier:t+1,reader:r,textDecoder:n,nonce:a})))}function tC(e,t,r,n){return e(async()=>{let e=new URL(t);e.searchParams.set("_routes",n);let{data:a}=await tk(e,r);return tD(a,n)})}function tL(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let e of t)e&&r.push(e);for(let t of r)e.searchParams.append("index",t);return e}function tP(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}async function tk(e,t){let r=await fetch(e,t);if(404===r.status&&!r.headers.has("X-Remix-Response"))throw new M(404,"Not Found",!0);if(new Set([100,101,204,205]).has(r.status))return t.method&&"GET"!==t.method?{status:r.status,data:{data:void 0}}:{status:r.status,data:{}};th(r.body,"No response body to decode");try{let e=await t$(r.body,window);return{status:r.status,data:e.value}}catch(e){throw Error("Unable to decode turbo-stream response")}}function t$(e,t){return decode(e,{plugins:[(e,...r)=>{if("SanitizedError"===e){let[e,n,a]=r,o=Error;e&&e in t&&"function"==typeof t[e]&&(o=t[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,t,n]=r;return{value:new M(t,n,e)}}return"SingleFetchRedirect"===e?{value:{[tS]:r[0]}}:"SingleFetchClassInstance"===e?{value:r[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function tD(e,t){let r=e[tS];return r?tT(r,t):void 0!==e[t]?tT(e[t],t):null}function tT(e,t){if("error"in e)throw e.error;if("redirect"in e){let t={};throw e.revalidate&&(t["X-Remix-Revalidate"]="yes"),e.reload&&(t["X-Remix-Reload-Document"]="yes"),e.replace&&(t["X-Remix-Replace"]="yes"),A(e.redirect,{status:e.status,headers:t})}if("data"in e)return e.data;throw Error(`No response found for routeId "${t}"`)}function tA(){let e,t;let r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{a(e);try{await r}catch(e){}}});return{promise:r,resolve:e,reject:t}}function tM({error:e,isOutsideRemixApp:t}){let r;console.error(e);let n=a.createElement("script",{dangerouslySetInnerHTML:{__html:`
        console.log(
          "\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."
        );
      `}});return O(e)?a.createElement(tO,{title:"Unhandled Thrown Response!"},a.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n):(r=e instanceof Error?e:Error(null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e)),a.createElement(tO,{title:"Application Error!",isOutsideRemixApp:t},a.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),a.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n))}function tO({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:o}=tJ();return o.root?.Layout&&!r?n:a.createElement("html",{lang:"en"},a.createElement("head",null,a.createElement("meta",{charSet:"utf-8"}),a.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),a.createElement("title",null,e)),a.createElement("body",null,a.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?a.createElement(tG,null):null)))}function tU(){return React6.createElement(tO,{title:"Loading...",renderScripts:!0},React6.createElement("script",{dangerouslySetInnerHTML:{__html:`
              console.log(
                "\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this " +
                "when your app is loading JS modules and/or running \`clientLoader\` " +
                "functions. Check out https://remix.run/route/hydrate-fallback " +
                "for more information."
              );
            `}}))}a.Component;function tj(e,t,r){if(r){let r=`You cannot call ${"action"===e?"serverAction()":"serverLoader()"} in SPA Mode (routeId: "${t.id}")`;throw console.error(r),new M(400,"Bad Request",Error(r),!0)}let n=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction)throw console.error(n),new M(400,"Bad Request",Error(n),!0)}function t_(e,t){let r="clientAction"===e?"a":"an",n=`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(n),new M(405,"Method Not Allowed",Error(n),!0)}function tN(e,t,r){if(r){var n,a,o;let i;return n=t,a=e.shouldRevalidate,o=r,i=!1,e=>i?a?a(e):e.defaultShouldRevalidate:(i=!0,o.has(n))}if(e.shouldRevalidate){let t=e.shouldRevalidate;return e=>t({...e,defaultShouldRevalidate:!0})}return e.shouldRevalidate}async function tF(e,t){let r=await tf(e,t);return await tp(e,r),{Component:tH(r),ErrorBoundary:r.ErrorBoundary,clientAction:r.clientAction,clientLoader:r.clientLoader,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}function tH(e){if(null!=e.default&&("object"!=typeof e.default||0!==Object.keys(e.default).length))return e.default}var tI=new Set,tB=new Set;function tz(){let e=a.useContext(eO);return th(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tW(){let e=a.useContext(eU);return th(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var tq=a.createContext(void 0);function tJ(){let e=a.useContext(tq);return th(e,"You must render this element inside a <HydratedRouter> element"),e}function tY(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}tq.displayName="FrameworkContext";function tV({page:e,...t}){let{router:r}=tz(),n=a.useMemo(()=>y(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?a.createElement(tX,{page:e,matches:n,...t}):null}function tX({page:e,matches:t,...r}){let n=eW(),{manifest:o,routeModules:i}=tJ(),{loaderData:l,matches:s}=tW(),u=a.useMemo(()=>tw(e,t,s,o,n,"data"),[e,t,s,o,n]),c=a.useMemo(()=>tw(e,t,s,o,n,"assets"),[e,t,s,o,n]),d=a.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,a=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in l&&i[e.route.id]?.shouldRevalidate?a=!0:t.hasClientLoader?a=!0:r.add(e.route.id))}),0===r.size)return[];let s=tP(e);return a&&r.size>0&&s.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[s.pathname+s.search]},[l,n,o,u,t,e,i]),h=a.useMemo(()=>[...new Set(c.map(e=>{let t=o.routes[e.route.id];if(!t)return[];let r=[t.module];return t.imports&&(r=r.concat(t.imports)),r}).flat(1))],[c,o]),f=function(e){let{manifest:t,routeModules:r}=tJ(),[n,o]=a.useState([]);return a.useEffect(()=>{let n=!1;return tv(e,t,r).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,r]),n}(c);return a.createElement(a.Fragment,null,d.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),h.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),f.map(({key:e,link:t})=>a.createElement("link",{key:e,...t})))}var tK=!1;function tG(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:o}=tJ(),{router:i,static:l,staticContext:s}=tz(),{matches:u}=tW(),c=!n;o&&(o.didRenderScripts=!0);let d=function(e,t,r){if(r&&!tK)return[e[0]];return e}(u,null,n);a.useEffect(()=>{tK=!0},[]);let h=a.useMemo(()=>{let n=s?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",o=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${c?"":`import ${JSON.stringify(t.url)}`};
${d.map((e,r)=>`import * as route${r} from ${JSON.stringify(t.routes[e.route.id].module)};`).join("\n")}
  ${c?`window.__reactRouterManifest = ${JSON.stringify(function(e,t){let r=new Set(t.state.matches.map(e=>e.route.id)),n=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(n.pop();n.length>0;)a.push(`/${n.join("/")}`),n.pop();a.forEach(e=>{let n=y(t.routes,e,t.basename);n&&n.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((t,r)=>Object.assign(t,{[r]:e.routes[r]}),{});return{...e,routes:o}}(t,i),null,2)};`:""}
  window.__reactRouterRouteModules = {${d.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};

import(${JSON.stringify(t.entry.module)});`:" ";return a.createElement(a.Fragment,null,a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n},type:void 0}),a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o},type:"module",async:!0}))},[]),f=d.map(e=>{let r=t.routes[e.route.id];return r?(r.imports||[]).concat([r.module]):[]}).flat(1),p=tK?[]:t.entry.imports.concat(f);return tK?null:a.createElement(a.Fragment,null,c?null:a.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin}),a.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),[...new Set(p)].map(t=>a.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin})),h)}var tZ="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{tZ&&(window.__reactRouterVersion="7.1.5")}catch(e){}var tQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t0=a.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:i,state:u,target:c,to:h,preventScrollReset:f,viewTransition:p,...m},y){let g,{basename:v}=a.useContext(eF),w="string"==typeof h&&tQ.test(h),b=!1;if("string"==typeof h&&w&&(g=h,tZ))try{let e=new URL(window.location.href),t=new URL(h.startsWith("//")?e.protocol+h:h),r=R(t.pathname,v);t.origin===e.origin&&null!=r?h=r+t.search+t.hash:b=!0}catch(e){s(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=function(e,{relative:t}={}){l(ez(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=a.useContext(eF),{hash:o,pathname:i,search:s}=eX(e,{relative:t}),u=i;return"/"!==r&&(u="/"===i?r:P([r,i])),n.createHref({pathname:u,search:s,hash:o})}(h,{relative:n}),[S,x,C]=function(e,t){let r=a.useContext(tq),[n,o]=a.useState(!1),[i,l]=a.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:h}=t,f=a.useRef(null);a.useEffect(()=>{if("render"===e&&l(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(n){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{o(!0)},m=()=>{o(!1),l(!1)};return r?"intent"!==e?[i,f,{}]:[i,f,{onFocus:tY(s,p),onBlur:tY(u,m),onMouseEnter:tY(c,p),onMouseLeave:tY(d,m),onTouchStart:tY(h,p)}]:[!1,f,{}]}(r,m),L=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:l}={}){let s=eY(),u=eW(),c=eX(e,{relative:i});return a.useCallback(a=>{0===a.button&&(!t||"_self"===t)&&!(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey)&&(a.preventDefault(),s(e,{replace:void 0!==r?r:d(u)===d(c),state:n,preventScrollReset:o,relative:i,viewTransition:l}))},[u,s,c,r,n,t,e,o,i,l])}(h,{replace:i,state:u,target:c,preventScrollReset:f,relative:n,viewTransition:p}),k=a.createElement("a",{...m,...C,href:g||E,onClick:b||o?e:function(t){e&&e(t),t.defaultPrevented||L(t)},ref:function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(y,x),target:c,"data-discover":w||"render"!==t?void 0:"true"});return S&&!w?a.createElement(a.Fragment,null,k,a.createElement(tV,{page:E})):k});function t1(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function t2(e){let t=a.useContext(eO);return l(t,t1(e)),t}t0.displayName="Link",a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:i,viewTransition:s,children:u,...c},d){let h,f=eX(i,{relative:c.relative}),p=eW(),m=a.useContext(eU),{navigator:y,basename:g}=a.useContext(eF),v=null!=m&&function(e,t={}){let r=a.useContext(ej);l(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=t2("useViewTransitionState"),o=eX(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=R(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=R(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=E(o.pathname,s)||null!=E(o.pathname,i)}(f)&&!0===s,w=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,b=p.pathname,S=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&g&&(S=R(S,g)||S);let x="/"!==w&&w.endsWith("/")?w.length-1:w.length,C=b===w||!n&&b.startsWith(w)&&"/"===b.charAt(x),L=null!=S&&(S===w||!n&&S.startsWith(w)&&"/"===S.charAt(w.length)),P={isActive:C,isPending:L,isTransitioning:v},k=C?e:void 0;h="function"==typeof r?r(P):[r,C?"active":null,L?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let $="function"==typeof o?o(P):o;return a.createElement(t0,{...c,"aria-current":k,className:h,ref:d,style:$,to:i,viewTransition:s},"function"==typeof u?u(P):u)}).displayName="NavLink",a.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=to,action:u,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...m},y)=>{let g=function(){let{router:e}=t2("useSubmit"),{basename:t}=a.useContext(eF),r=e2("useRouteId");return a.useCallback(async(n,a={})=>{let{action:o,method:i,encType:l,formData:s,body:u}=function(e,t){let r,n,a,o,i;if(tl(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?R(i,t):null,r=e.getAttribute("method")||to,a=td(e.getAttribute("enctype"))||ti,o=new FormData(e)}else if(tl(e)&&"button"===e.tagName.toLowerCase()||tl(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?R(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||to,a=td(e.getAttribute("formenctype"))||td(i.getAttribute("enctype"))||ti,o=new FormData(i,e),!function(){if(null===tu)try{new FormData(document.createElement("form"),0),tu=!1}catch(e){tu=!0}return tu}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,n)}}else if(tl(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r=to,n=null,a=ti,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t);if(!1===a.navigate){let t=a.fetcherKey||t3();await e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}(),v=function(e,{relative:t}={}){let{basename:r}=a.useContext(eF),n=a.useContext(eI);l(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...eX(e||".",{relative:t})},s=eW();if(null==e){i.search=s.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();i.search=r?`?${r}`:""}}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(i.pathname="/"===i.pathname?r:P([r,i.pathname])),d(i)}(u,{relative:h}),w="get"===s.toLowerCase()?"get":"post",b="string"==typeof u&&tQ.test(u);return a.createElement("form",{ref:y,method:w,action:v,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,a=n?.getAttribute("formmethod")||s;g(n||e.currentTarget,{fetcherKey:t,method:a,navigate:r,replace:o,state:i,relative:h,preventScrollReset:f,viewTransition:p})},...m,"data-discover":b||"render"!==e?void 0:"true"})}).displayName="Form";function t4(e){s("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=a.useRef(ts(e)),r=a.useRef(!1),n=eW(),o=a.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=ts(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),i=eY(),l=a.useCallback((e,t)=>{let n=ts("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)},[i,o]);return[o,l]}var t5=0,t3=()=>`__${String(++t5)}__`;function t8({routes:e,future:t,state:r}){return eK(e,void 0,r,t)}function t9(e){return"string"==typeof e?e:d(e)}function t6(e){let t="string"==typeof e?e:d(e),r=t7.test(t=t.replace(/ $/,"%20"))?new URL(t):new URL(t,"http://localhost");return{pathname:r.pathname,search:r.search,hash:r.hash}}var t7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,re={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},rt=/[&><\u2028\u2029]/g,rr=new TextEncoder,rn=async(e,t)=>{let r=rr.encode(e),n=await ro(t,["sign"]);return e+"."+btoa(String.fromCharCode(...new Uint8Array(await crypto.subtle.sign("HMAC",n,r)))).replace(/=+$/,"")},ra=async(e,t)=>{let r=e.lastIndexOf("."),n=e.slice(0,r),a=e.slice(r+1),o=rr.encode(n),i=await ro(t,["verify"]),l=function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}(atob(a));return!!await crypto.subtle.verify("HMAC",i,l,o)&&n},ro=async(e,t)=>crypto.subtle.importKey("raw",rr.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);async function ri(e,t){let r=btoa(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;){if("%"===(t=n.charAt(o++))){if("u"===n.charAt(o)){if(r=n.slice(o+1,o+5),/^[\da-f]{4}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=5;continue}}else if(r=n.slice(o,o+2),/^[\da-f]{2}$/i.exec(r)){a+=String.fromCharCode(parseInt(r,16)),o+=2;continue}}a+=t}return a}(encodeURIComponent(JSON.stringify(e))));return t.length>0&&(r=await rn(r,t[0])),r}async function rl(e,t){if(t.length>0){for(let r of t){let t=await ra(e,r);if(!1!==t)return rs(t)}return null}return rs(e)}function rs(e){try{return JSON.parse(decodeURIComponent(function(e){let t,r,n=e.toString(),a="",o=0;for(;o<n.length;)t=n.charAt(o++),/[\w*+\-./@]/.exec(t)?a+=t:(r=t.charCodeAt(0))<256?a+="%"+ru(r,2):a+="%u"+ru(r,4).toUpperCase();return a}(atob(e))))}catch(e){return{}}}function ru(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}var rc=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(rc||{});function rd(e,t){if(e instanceof Error&&"development"!==t){let e=Error("Unexpected Server Error");return e.stack=void 0,e}return e}function rh(e,t){return Object.entries(e).reduce((e,[r,n])=>Object.assign(e,{[r]:rd(n,t)}),{})}function rf(e,t){let r=rd(e,t);return{message:r.message,stack:r.stack}}function rp(e,t){if(!e)return null;let r=Object.entries(e),n={};for(let[e,a]of r)if(O(a))n[e]={...a,__type:"RouteErrorResponse"};else if(a instanceof Error){let r=rd(a,t);n[e]={message:r.message,stack:r.stack,__type:"Error",..."Error"!==r.name?{__subType:r.name}:{}}}else n[e]=a;return n}async function rm(e,t){var r;let n,a;let o=await e({request:(r=function(e){let t=new URL(e.url),r=t.searchParams.getAll("index");t.searchParams.delete("index");let n=[];for(let e of r)e&&n.push(e);for(let e of n)t.searchParams.append("index",e);let a={method:e.method,body:e.body,headers:e.headers,signal:e.signal};return a.body&&(a.duplex="half"),new Request(t.href,a)}(t.request),(n=new URL(r.url)).searchParams.delete("_routes"),(a={method:r.method,body:r.body,headers:r.headers,signal:r.signal}).body&&(a.duplex="half"),new Request(n.href,a)),params:t.params,context:t.context});if(eS(o)&&o.init&&o.init.status&&eC(o.init.status))throw new Response(null,o.init);return o}function ry(e,t){if(!1===e||null==e)throw console.error("The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"),Error(t)}function rg(e){let t={};return Object.values(e).forEach(e=>{if(e){let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}}),t}var rv={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},rw=/[&><\u2028\u2029]/g;function rb(e){return JSON.stringify(e).replace(rw,e=>rv[e])}function rE(e,t){let r,n=t.errors?t.matches.findIndex(e=>t.errors[e.route.id]):-1,a=n>=0?t.matches.slice(0,n+1):t.matches;if(n>=0){let{actionHeaders:e,actionData:a,loaderHeaders:o,loaderData:i}=t;t.matches.slice(n).some(t=>{let n=t.route.id;return!e[n]||a&&a.hasOwnProperty(n)?o[n]&&!i.hasOwnProperty(n)&&(r=o[n]):r=e[n],null!=r})}return a.reduce((n,o,i)=>{let{id:l}=o.route,s=e.routes[l];ry(s,`Route with id "${l}" not found in build`);let u=s.module,c=t.loaderHeaders[l]||new Headers,d=t.actionHeaders[l]||new Headers,h=null!=r&&i===a.length-1,f=h&&r!==c&&r!==d;if(null==u.headers){let e=new Headers(n);return f&&rR(r,e),rR(d,e),rR(c,e),e}let p=new Headers(u.headers?"function"==typeof u.headers?u.headers({loaderHeaders:c,parentHeaders:n,actionHeaders:d,errorHeaders:h?r:void 0}):u.headers:void 0);return f&&rR(r,p),rR(d,p),rR(c,p),rR(n,p),p},new Headers)}function rR(e,t){let r=e.get("Set-Cookie");if(r){let e=splitCookiesString(r),n=new Set(t.getSetCookie());e.forEach(e=>{n.has(e)||t.append("Set-Cookie",e)})}}function rS({isActionDataRequest:e,loadRouteIds:t}={}){return async({request:r,matches:n})=>{if(e&&"GET"===r.method)return{};let a=t?n.filter(e=>t.includes(e.route.id)):n;return(await Promise.all(a.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[a[r].route.id]:t}),{})}}async function rx(e,t,r,n,a,o,i){try{let l,s=new Request(a,{method:n.method,body:n.body,headers:n.headers,signal:n.signal,...n.body?{duplex:"half"}:void 0}),u=await r.query(s,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:rS({isActionDataRequest:!0})});if(ex(u))return{result:rL(u.status,u.headers,e.basename),headers:u.headers,status:202};let c=rE(e,u);if(eC(u.statusCode)&&c.has("Location"))return{result:rL(u.statusCode,c,e.basename),headers:c,status:202};return u.errors&&(Object.values(u.errors).forEach(e=>{(!O(e)||e.error)&&i(e)}),u.errors=rh(u.errors,t)),{result:u.errors?{error:Object.values(u.errors)[0]}:{data:Object.values(u.actionData||{})[0]},headers:c,status:u.statusCode}}catch(e){return i(e),{result:{error:e},headers:new Headers,status:500}}}async function rC(e,t,r,n,a,o,i){try{let l=new Request(a,{headers:n.headers,signal:n.signal}),s=new URL(n.url).searchParams.get("_routes")?.split(",")||void 0,u=await r.query(l,{requestContext:o,skipLoaderErrorBubbling:!0,dataStrategy:rS({loadRouteIds:s})});if(ex(u))return{result:{[tS]:rL(u.status,u.headers,e.basename)},headers:u.headers,status:202};let c=rE(e,u);if(eC(u.statusCode)&&c.has("Location"))return{result:{[tS]:rL(u.statusCode,c,e.basename)},headers:c,status:202};u.errors&&(Object.values(u.errors).forEach(e=>{(!O(e)||e.error)&&i(e)}),u.errors=rh(u.errors,t));let d={};return(s?u.matches.filter(e=>e.route.loader&&s.includes(e.route.id)):u.matches).forEach(e=>{let{id:t}=e.route;u.errors&&u.errors.hasOwnProperty(t)?d[t]={error:u.errors[t]}:u.loaderData.hasOwnProperty(t)&&(d[t]={data:u.loaderData[t]})}),{result:d,headers:c,status:u.statusCode}}catch(e){return i(e),{result:{root:{error:e}},headers:new Headers,status:500}}}function rL(e,t,r){let n=t.get("Location");return r&&(n=R(n,r)||n),{redirect:n,status:e,revalidate:t.has("X-Remix-Revalidate")||t.has("Set-Cookie"),reload:t.has("X-Remix-Reload-Document"),replace:t.has("X-Remix-Replace")}}function rP(e,t,r,n){let a=new AbortController,o=setTimeout(()=>a.abort(Error("Server Timeout")),"number"==typeof r?r:4950);return t.addEventListener("abort",()=>clearTimeout(o)),encode(e,{signal:a.signal,plugins:[e=>{if(e instanceof Error){let{name:t,message:r,stack:a}="production"===n?rd(e,n):e;return["SanitizedError",t,r,a]}if(e instanceof M){let{data:t,status:r,statusText:n}=e;return["ErrorResponse",t,r,n]}if(e&&"object"==typeof e&&tS in e)return["SingleFetchRedirect",e[tS]]}],postPlugins:[e=>{if(e&&"object"==typeof e)return["SingleFetchClassInstance",Object.fromEntries(Object.entries(e))]},()=>["SingleFetchFallback"]]})}var rk=new Set([100,101,204,205,304]);function r$(e,t){let r="Unexpected Server Error";return"production"!==t&&(r+=`

${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}})}function rD(e){return`__flash_${e}__`}}}]);