"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[165],{23478:(e,t,r)=>{r.d(t,{Zp:()=>eF,bg:()=>eZ,ok:()=>t$,pg:()=>e0,sv:()=>e2,zy:()=>eU});var n,a=r(18225);r(11114);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}var f=new Set(["lazy","caseSensitive","path","id","index","children"]);function p(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=p(e.children,t,o,n)),r}})}function m(e,t,r="/"){return y(e,t,r,!1)}function y(e,t,r,n){let a=b(("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=C([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;let e,n;r.push({path:u,score:(d=t.index,n=(e=u.split("/")).length,e.some(g)&&(n+=-2),d&&(n+=2),e.filter(e=>!g(e)).reduce((e,t)=>e+(v.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 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=w({path:l.relativePath,caseSensitive:l.caseSensitive,end:s},u),d=l.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=w({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:C([o,c.pathname]),pathnameBase:L(C([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=C([o,c.pathnameBase]))}return i}(o[e],t,n)}return i}var v=/^:[\w-]+$/,g=e=>"*"===e;function w(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 b(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 E(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 R(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function S(e){let t=R(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function x(e,t,r,n=!1){let a,o;"string"==typeof e?a=h(e):(l(!(a={...e}).pathname||!a.pathname.includes("?"),E("?","pathname","search",a)),l(!a.pathname||!a.pathname.includes("#"),E("#","pathname","hash",a)),l(!a.search||!a.search.includes("#"),E("#","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="/"){let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?h(e):e;return{pathname:n?n.startsWith("/")?n:(r=t.replace(/\/+$/,"").split("/"),n.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"):t,search:k(a),hash:P(o)}}(a,o),c=s&&"/"!==s&&s.endsWith("/"),d=(i||"."===s)&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var C=e=>e.join("/").replace(/\/\/+/g,"/"),L=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),k=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",P=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",$=(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})},D=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 M(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var T=["POST","PUT","PATCH","DELETE"],A=new Set(T),O=new Set(["GET",...T]),U=new Set([301,302,303,307,308]),j=new Set([307,308]),N={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},F={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},_={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},H=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,I=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),z="remix-router-transitions",B=Symbol("ResetLoaderData");function W(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=x(n||".",S(i),b(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=eb(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:C([r,s.pathname])),d(s)}function J(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&&!function(e){return O.has(e.toUpperCase())}(r.formMethod))return{path:t,error:ed(405,{method:r.formMethod})};let o=()=>({path:t,error:ed(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=ef(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!ew(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(!ew(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=ea(r.formData),a=r.formData;else if(r.body instanceof FormData)n=ea(r.body),a=r.body;else if(r.body instanceof URLSearchParams)a=eo(n=r.body);else if(null==r.body)n=new URLSearchParams,a=new FormData;else try{n=new URLSearchParams(r.body),a=eo(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(ew(u.formMethod))return{path:t,submission:u};let c=h(t);return e&&c.search&&eb(c.search)&&n.append("index",""),c.search=`?${n}`,{path:d(c),submission:u}}function Y(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 V(e,t,r,n,a,o,i,l,s,u,c,d,h,f){let p=f?ep(f[1])?f[1].error:f[1].data:void 0,y=e.createURL(t.location),v=e.createURL(a),g=r;o&&t.errors?g=Y(r,Object.keys(t.errors)[0],!0):f&&ep(f[1])&&(g=Y(r,f[0]));let w=f?f[1].statusCode:void 0,b=w&&w>=400,E=g.filter((e,r)=>{var a,l;let s,u,c,{route:d}=e;if(d.lazy)return!0;if(null==d.loader)return!1;if(o)return q(d,t.loaderData,t.errors);if(a=t.loaderData,s=!(l=t.matches[r])||e.route.id!==l.route.id,u=!a.hasOwnProperty(e.route.id),s||u)return!0;let h=t.matches[r];return X(e,{currentUrl:y,currentParams:h.params,nextUrl:v,nextParams:e.params,...n,actionResult:p,actionStatus:w,defaultShouldRevalidate:!b&&(i||y.pathname+y.search===v.pathname+v.search||y.search!==v.search||(c=h.route.path,h.pathname!==e.pathname||null!=c&&c.endsWith("*")&&h.params["*"]!==e.params["*"]))})}),R=[];return u.forEach((e,a)=>{if(o||!r.some(t=>t.route.id===e.routeId)||s.has(a))return;let u=m(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),g=eE(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:X(g,{currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,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:g,controller:new AbortController})}),[E,R]}function q(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 X(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function K(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=p(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 G(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||f.has(e)||(o[e]=n[e])}Object.assign(a,o),Object.assign(a,{...t(a),lazy:void 0})}async function Z({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 Q(e,t,r,n,a,o,i,l,s,u){let c=o.map(e=>e.route.lazy?G(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?ee(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 ee(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 ed(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 ed(404,{pathname:r})}}catch(e){return{type:"error",result:e}}finally{l&&t.signal.removeEventListener("abort",l)}return i}async function et(e){let{result:t,type:r}=e;if(ev(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 D(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}if("error"===r){if(ey(t)){if(t.data instanceof Error)return{type:"error",error:t.data,statusCode:t.init?.status};t=new D(t.init?.status||500,void 0,t.data)}return{type:"error",error:t,statusCode:M(t)?t.status:void 0}}return ey(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 er(e,t,r){if(H.test(e)){let n=new URL(e.startsWith("//")?t.protocol+e:e),a=null!=b(n.pathname,r);if(n.origin===t.origin&&a)return n.pathname+n.search+n.hash}return e}function en(e,t,r,n){let a=e.createURL(ef(t)).toString(),o={signal:r};if(n&&ew(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=ea(n.formData):o.body=n.formData}return new Request(a,o)}function ea(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function eo(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ei(e,t,r,n,a,o){let{loaderData:i,errors:s}=function(e,t,r,n=!1,a=!1){let o,i={},s=null,u=!1,c={},d=r&&ep(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(!em(f),"Cannot handle redirect results in processLoaderData"),ep(f)){let t=f.error;if(void 0!==d&&(t=d,d=void 0),s=s||{},a)s[h]=t;else{let r=eu(e,h);null==s[r.route.id]&&(s[r.route.id]=t)}n||(i[h]=B),u||(u=!0,o=M(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}}(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(ep(i)){let t=eu(e.matches,n?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(em(i))l(!1,"Unhandled fetcher revalidation redirect");else{let t=eC(i.data);e.fetchers.set(r,t)}}}),{loaderData:i,errors:s}}function el(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==B).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 es(e){return e?ep(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function eu(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 ec(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 ed(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 D(e||500,i,Error(l),!0)}function eh(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(em(n))return{key:r,result:n}}}function ef(e){return d({..."string"==typeof e?h(e):e,hash:""})}function ep(e){return"error"===e.type}function em(e){return"redirect"===(e&&e.type)}function ey(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ev(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function eg(e){return U.has(e)}function ew(e){return A.has(e.toUpperCase())}function eb(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eE(e,t){let r="string"==typeof t?h(t).search:t.search;if(e[e.length-1].route.index&&eb(r||""))return e[e.length-1];let n=R(e);return n[n.length-1]}function eR(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 eS(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 ex(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 eC(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 eL=a.createContext(null);eL.displayName="DataRouter";var ek=a.createContext(null);ek.displayName="DataRouterState";var eP=a.createContext({isTransitioning:!1});eP.displayName="ViewTransition";var e$=a.createContext(new Map);e$.displayName="Fetchers",a.createContext(null).displayName="Await";var eD=a.createContext(null);eD.displayName="Navigation";var eM=a.createContext(null);eM.displayName="Location";var eT=a.createContext({outlet:null,matches:[],isDataRoute:!1});eT.displayName="Route";var eA=a.createContext(null);function eO(){return null!=a.useContext(eM)}function eU(){return l(eO(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(eM).location}eA.displayName="RouteError";var ej="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eN(e){a.useContext(eD).static||a.useLayoutEffect(e)}function eF(){let{isDataRoute:e}=a.useContext(eT);return e?function(){var e;let t;let{router:r}=(e="useNavigate",l(t=a.useContext(eL),eJ(e)),t),n=eY("useNavigate"),o=a.useRef(!1);return eN(()=>{o.current=!0}),a.useCallback(async(e,t={})=>{s(o.current,ej),o.current&&("number"==typeof e?r.navigate(e):await r.navigate(e,{fromRouteId:n,...t}))},[r,n])}():function(){l(eO(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(eL),{basename:t,navigator:r}=a.useContext(eD),{matches:n}=a.useContext(eT),{pathname:o}=eU(),i=JSON.stringify(S(n)),u=a.useRef(!1);return eN(()=>{u.current=!0}),a.useCallback((n,a={})=>{if(s(u.current,ej),!u.current)return;if("number"==typeof n){r.go(n);return}let l=x(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:C([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)},[t,r,i,o,e])}()}var e_=a.createContext(null);function eH(e,{relative:t}={}){let{matches:r}=a.useContext(eT),{pathname:n}=eU(),o=JSON.stringify(S(r));return a.useMemo(()=>x(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function eI(e,t,r,n){let o;l(eO(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=a.useContext(eD),{matches:u}=a.useContext(eT),c=u[u.length-1],d=c?c.params:{},f=c?c.pathname:"/",p=c?c.pathnameBase:"/",y=c&&c.route;{let e=y&&y.path||"";eq(f,!y||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (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=eU();if(t){let e="string"==typeof t?h(t):t;l("/"===p||e.pathname?.startsWith(p),`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 "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),o=e}else o=v;let g=o.pathname||"/",w=g;if("/"!==p){let e=p.replace(/^\//,"").split("/");w="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=m(e,{pathname:w});s(y||null!=b,`No routes matched location "${o.pathname}${o.search}${o.hash}" `),s(null==b||void 0!==b[b.length-1].route.element||void 0!==b[b.length-1].route.Component||void 0!==b[b.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 E=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||ez,s&&(u<0&&0===l?(eq("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(eW,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===l)?a.createElement(eB,{location:r.location,revalidation:r.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},d,e.params),pathname:C([p,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:C([p,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),u,r,n);return t&&E?a.createElement(eM.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...o},navigationType:"POP"}},E):E}var ez=a.createElement(function(){let e=function(){var e;let t;let r=a.useContext(eA),n=(e="useRouteError",l(t=a.useContext(ek),eJ(e)),t),o=eY("useRouteError");return void 0!==r?r:n.errors?.[o]}(),t=M(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),eB=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(eT.Provider,{value:this.props.routeContext},a.createElement(eA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function eW({routeContext:e,match:t,children:r}){let n=a.useContext(eL);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(eT.Provider,{value:e},r)}function eJ(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function eY(e){let t;let r=(l(t=a.useContext(eT),eJ(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}var eV={};function eq(e,t,r){t||eV[e]||(eV[e]=!0,s(!1,r))}var eX={};function eK(e,t){e||eX[t]||(eX[t]=!0,console.warn(t))}function eG(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 eZ(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||I,h={},f=p(e.routes,d,void 0,h),v=e.basename||"/",g=e.dataStrategy||Z,w=e.patchRoutesOnNavigation,E={...e.future},R=null,S=new Set,x=null,C=null,L=null,k=null!=e.hydrationData,P=m(f,e.history.location,v),$=null;if(null==P&&!w){let t=ed(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=ec(f);P=r,$={[n.id]:t}}if(P&&!e.hydrationData&&e4(P,f,e.history.location.pathname).active&&(P=null),P){if(P.some(e=>e.route.lazy))r=!1;else if(P.some(e=>e.route.loader)){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=P.findIndex(e=>void 0!==n[e.route.id]);r=P.slice(0,e+1).every(e=>!q(e.route,t,n))}else r=P.every(e=>!q(e.route,t,n))}else r=!0}else{r=!1,P=[];let t=e4(null,f,e.history.location.pathname);t.active&&t.matches&&(P=t.matches)}let D={historyAction:e.history.action,location:e.history.location,matches:P,initialized:r,navigation:N,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||$,fetchers:new Map,blockers:new Map},T="POP",A=!1,O=!1,B=new Map,Y=null,X=!1,G=!1,ee=new Set,ea=new Map,eo=0,ef=-1,ey=new Map,eg=new Set,eb=new Map,eL=new Map,ek=new Set,eP=new Map,e$=null;function eD(e,t={}){D={...D,...e};let r=[],n=[];D.fetchers.forEach((e,t)=>{"idle"===e.state&&(ek.has(t)?r.push(t):n.push(t))}),[...S].forEach(e=>e(D,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>eY(e)),n.forEach(e=>D.fetchers.delete(e))}function eM(r,n,{flushSync:a}={}){let o,i,l=null!=D.actionData&&null!=D.navigation.formMethod&&ew(D.navigation.formMethod)&&"loading"===D.navigation.state&&r.state?._isRedirect!==!0;o=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?D.actionData:null;let s=n.loaderData?el(D.loaderData,n.loaderData,n.matches||[],n.errors):D.loaderData,u=D.blockers;u.size>0&&(u=new Map(u)).forEach((e,t)=>u.set(t,_));let c=!0===A||null!=D.navigation.formMethod&&ew(D.navigation.formMethod)&&r.state?._isRedirect!==!0;if(t&&(f=t,t=void 0),X||"POP"===T||("PUSH"===T?e.history.push(r,r.state):"REPLACE"===T&&e.history.replace(r,r.state)),"POP"===T){let e=B.get(D.location.pathname);e&&e.has(r.pathname)?i={currentLocation:D.location,nextLocation:r}:B.has(r.pathname)&&(i={currentLocation:r,nextLocation:D.location})}else if(O){let e=B.get(D.location.pathname);e?e.add(r.pathname):(e=new Set([r.pathname]),B.set(D.location.pathname,e)),i={currentLocation:D.location,nextLocation:r}}eD({...n,actionData:o,loaderData:s,historyAction:T,location:r,initialized:!0,navigation:N,revalidation:"idle",restoreScrollPosition:e2(r,n.matches||D.matches),preventScrollReset:c,blockers:u},{viewTransitionOpts:i,flushSync:!0===a}),T="POP",A=!1,O=!1,X=!1,G=!1,e$?.resolve(),e$=null}async function eT(t,r){if("number"==typeof t){e.history.go(t);return}let{path:n,submission:a,error:o}=J(!1,W(D.location,D.matches,v,t,r?.fromRouteId,r?.relative),r),i=D.location,l=c(D.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&&ew(a.formMethod)&&a.formAction===D.location.pathname+D.location.search&&(u="REPLACE");let d=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),f=eQ({currentLocation:i,nextLocation:l,historyAction:u});if(f){eZ(f,{state:"blocked",location:l,proceed(){eZ(f,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),eT(t,r)},reset(){let e=new Map(D.blockers);e.set(f,_),eD({blockers:e})}});return}await eA(u,l,{submission:a,pendingError:o,preventScrollReset:d,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h})}async function eA(r,n,o){var i,l,s;let u;a&&a.abort(),a=null,T=r,X=!0===(o&&o.startUninterruptedRevalidation),i=D.location,l=D.matches,x&&L&&(x[e1(i,l)]=L()),A=!0===(o&&o.preventScrollReset),O=!0===(o&&o.enableViewTransition);let c=t||f,d=o&&o.overrideNavigation,h=m(c,n,v),p=!0===(o&&o.flushSync),y=e4(h,c,n.pathname);if(y.active&&y.matches&&(h=y.matches),!h){let{error:e,notFoundMatches:t,route:r}=e0(n.pathname);eM(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:p});return}if(D.initialized&&!G&&(s=D.location).pathname===n.pathname&&s.search===n.search&&(""===s.hash?""!==n.hash:s.hash===n.hash||""!==n.hash)&&!(o&&o.submission&&ew(o.submission.formMethod))){eM(n,{matches:h},{flushSync:p});return}a=new AbortController;let g=en(e.history,n,a.signal,o&&o.submission);if(o&&o.pendingError)u=[eu(h).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&ew(o.submission.formMethod)){let t=await eO(g,n,o.submission,h,y.active,{replace:o.replace,flushSync:p});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(ep(r)&&M(r.error)&&404===r.error.status){a=null,eM(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}h=t.matches||h,u=t.pendingActionResult,d=eS(n,o.submission),p=!1,y.active=!1,g=en(e.history,g.url,g.signal)}let{shortCircuited:w,matches:b,loaderData:E,errors:R}=await eU(g,n,h,y.active,d,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,p,u);w||(a=null,eM(n,{matches:b||h,...es(u),loaderData:E,errors:R}))}async function eO(e,t,r,n,a,o={}){let i;if(ez(),eD({navigation:{state:"submitting",location:t,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}},{flushSync:!0===o.flushSync}),a){let r=await e3(n,t.pathname,e.signal);if("aborted"===r.type)return{shortCircuited:!0};if("error"===r.type){let e=eu(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}=e0(t.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:r}]}}}let l=eE(n,t);if(l.route.action||l.route.lazy){if(i=(await eH("action",D,e,[l],n,null))[l.route.id],e.signal.aborted)return{shortCircuited:!0}}else i={type:"error",error:ed(405,{method:e.method,pathname:t.pathname,routeId:l.route.id})};if(em(i)){let t;return t=o&&null!=o.replace?o.replace:er(i.response.headers.get("Location"),new URL(e.url),v)===D.location.pathname+D.location.search,await e_(e,i,!0,{submission:r,replace:t}),{shortCircuited:!0}}if(ep(i)){let e=eu(n,l.route.id);return!0!==(o&&o.replace)&&(T="PUSH"),{matches:n,pendingActionResult:[e.route.id,i]}}return{matches:n,pendingActionResult:[l.route.id,i]}}async function eU(r,n,o,i,l,s,u,c,d,h,p){let m=l||eS(n,s),y=s||u||eR(m),g=!X&&!d;if(i){if(g){let e=ej(p);eD({navigation:m,...void 0!==e?{actionData:e}:{}},{flushSync:h})}let e=await e3(o,n.pathname,r.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){let t=eu(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}=e0(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let w=t||f,[b,E]=V(e.history,D,o,y,n,!0===d,G,ee,ek,eb,eg,w,v,p);if(ef=++eo,0===b.length&&0===E.length){let e=eX();return eM(n,{matches:o,loaderData:{},errors:p&&ep(p[1])?{[p[0]]:p[1].error}:null,...es(p),...e?{fetchers:new Map(D.fetchers)}:{}},{flushSync:h}),{shortCircuited:!0}}if(g){let e={};if(!i){e.navigation=m;let t=ej(p);void 0!==t&&(e.actionData=t)}E.length>0&&(e.fetchers=(E.forEach(e=>{let t=D.fetchers.get(e.key),r=ex(void 0,t?t.data:void 0);D.fetchers.set(e.key,r)}),new Map(D.fetchers))),eD(e,{flushSync:h})}E.forEach(e=>{eV(e.key),e.controller&&ea.set(e.key,e.controller)});let R=()=>E.forEach(e=>eV(e.key));a&&a.signal.addEventListener("abort",R);let{loaderResults:S,fetcherResults:x}=await eI(D,o,b,E,r);if(r.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",R),E.forEach(e=>ea.delete(e.key));let C=eh(S);if(C)return await e_(r,C.result,!0,{replace:c}),{shortCircuited:!0};if(C=eh(x))return eg.add(C.key),await e_(r,C.result,!0,{replace:c}),{shortCircuited:!0};let{loaderData:L,errors:k}=ei(D,o,S,p,E,x);d&&D.errors&&(k={...D.errors,...k});let P=eX(),$=eK(ef);return{matches:o,loaderData:L,errors:k,...P||$||E.length>0?{fetchers:new Map(D.fetchers)}:{}}}function ej(e){return e&&!ep(e[1])?{[e[0]]:e[1].data}:D.actionData?0===Object.keys(D.actionData).length?null:D.actionData:void 0}async function eN(r,n,o,i,s,u,c,d,h){function p(e){if(!e.route.action&&!e.route.lazy){let e=ed(405,{method:h.formMethod,pathname:o,routeId:n});return eW(r,n,e,{flushSync:c}),!0}return!1}if(ez(),eb.delete(r),!u&&p(i))return;let y=D.fetchers.get(r);eB(r,{state:"submitting",formMethod:h.formMethod,formAction:h.formAction,formEncType:h.formEncType,formData:h.formData,json:h.json,text:h.text,data:y?y.data:void 0},{flushSync:c});let g=new AbortController,w=en(e.history,o,g.signal,h);if(u){let e=await e3(s,o,w.signal);if("aborted"===e.type)return;if("error"===e.type){eW(r,n,e.error,{flushSync:c});return}if(e.matches){if(p(i=eE(s=e.matches,o)))return}else{eW(r,n,ed(404,{pathname:o}),{flushSync:c});return}}ea.set(r,g);let b=eo,E=(await eH("action",D,w,[i],s,r))[i.route.id];if(w.signal.aborted){ea.get(r)===g&&ea.delete(r);return}if(ek.has(r)){if(em(E)||ep(E)){eB(r,eC(void 0));return}}else{if(em(E))return(ea.delete(r),ef>b)?void eB(r,eC(void 0)):(eg.add(r),eB(r,ex(h)),e_(w,E,!1,{fetcherSubmission:h,preventScrollReset:d}));if(ep(E)){eW(r,n,E.error);return}}let R=D.navigation.location||D.location,S=en(e.history,R,g.signal),x=t||f,C="idle"!==D.navigation.state?m(x,D.navigation.location,v):D.matches;l(C,"Didn't find any matches after fetcher action");let L=++eo;ey.set(r,L);let k=ex(h,E.data);D.fetchers.set(r,k);let[P,$]=V(e.history,D,C,h,R,!1,G,ee,ek,eb,eg,x,v,[i.route.id,E]);$.filter(e=>e.key!==r).forEach(e=>{let t=e.key,r=D.fetchers.get(t),n=ex(void 0,r?r.data:void 0);D.fetchers.set(t,n),eV(t),e.controller&&ea.set(t,e.controller)}),eD({fetchers:new Map(D.fetchers)});let M=()=>$.forEach(e=>eV(e.key));g.signal.addEventListener("abort",M);let{loaderResults:A,fetcherResults:O}=await eI(D,C,P,$,S);if(g.signal.aborted)return;g.signal.removeEventListener("abort",M),ey.delete(r),ea.delete(r),$.forEach(e=>ea.delete(e.key));let U=eh(A);if(U)return e_(S,U.result,!1,{preventScrollReset:d});if(U=eh(O))return eg.add(U.key),e_(S,U.result,!1,{preventScrollReset:d});let{loaderData:j,errors:N}=ei(D,C,A,void 0,$,O);if(D.fetchers.has(r)){let e=eC(E.data);D.fetchers.set(r,e)}eK(L),"loading"===D.navigation.state&&L>ef?(l(T,"Expected pending action"),a&&a.abort(),eM(D.navigation.location,{matches:C,loaderData:j,errors:N,fetchers:new Map(D.fetchers)})):(eD({errors:N,loaderData:el(D.loaderData,j,C,N),fetchers:new Map(D.fetchers)}),G=!1)}async function eF(t,r,n,a,o,i,l,s,u){let c=D.fetchers.get(t);eB(t,ex(u,c?c.data:void 0),{flushSync:l});let d=new AbortController,h=en(e.history,n,d.signal);if(i){let e=await e3(o,n,h.signal);if("aborted"===e.type)return;if("error"===e.type){eW(t,r,e.error,{flushSync:l});return}if(e.matches)a=eE(o=e.matches,n);else{eW(t,r,ed(404,{pathname:n}),{flushSync:l});return}}ea.set(t,d);let f=eo,p=(await eH("loader",D,h,[a],o,t))[a.route.id];if(ea.get(t)===d&&ea.delete(t),!h.signal.aborted){if(ek.has(t)){eB(t,eC(void 0));return}if(em(p)){if(ef>f){eB(t,eC(void 0));return}eg.add(t),await e_(h,p,!1,{preventScrollReset:s});return}if(ep(p)){eW(t,r,p.error);return}eB(t,eC(p.data))}}async function e_(t,r,n,{submission:o,fetcherSubmission:s,preventScrollReset:d,replace:h}={}){r.response.headers.has("X-Remix-Revalidate")&&(G=!0);let f=r.response.headers.get("Location");l(f,"Expected a Location header on the redirect Response"),f=er(f,new URL(t.url),v);let p=c(D.location,f,{_isRedirect:!0});if(u){let t=!1;if(r.response.headers.has("X-Remix-Reload-Document"))t=!0;else if(H.test(f)){let r=e.history.createURL(f);t=r.origin!==i.location.origin||null==b(r.pathname,v)}if(t){h?i.location.replace(f):i.location.assign(f);return}}a=null;let m=!0===h||r.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:y,formAction:g,formEncType:w}=D.navigation;!o&&!s&&y&&g&&w&&(o=eR(D.navigation));let E=o||s;if(j.has(r.response.status)&&E&&ew(E.formMethod))await eA(m,p,{submission:{...E,formAction:f},preventScrollReset:d||A,enableViewTransition:n?O:void 0});else{let e=eS(p,o);await eA(m,p,{overrideNavigation:e,fetcherSubmission:s,preventScrollReset:d||A,enableViewTransition:n?O:void 0})}}async function eH(e,t,r,n,a,o){let i;let s={};try{i=await Q(g,e,t,r,n,a,o,h,d)}catch(e){return n.forEach(t=>{s[t.route.id]={type:"error",error:e}}),s}for(let[e,t]of Object.entries(i)){var u;if(ev((u=t).result)&&U.has(u.result.status)){let n=t.result;s[e]={type:"redirect",response:function(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"),!H.test(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=W(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}(n,r,e,a,v)}}else s[e]=await et(t)}return s}async function eI(t,r,n,a,o){let i=eH("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:ed(404,{pathname:r.path})}});{let n=(await eH("loader",t,en(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 ez(){G=!0,eb.forEach((e,t)=>{ea.has(t)&&ee.add(t),eV(t)})}function eB(e,t,r={}){D.fetchers.set(e,t),eD({fetchers:new Map(D.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function eW(e,t,r,n={}){let a=eu(D.matches,t);eY(e),eD({errors:{[a.route.id]:r},fetchers:new Map(D.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function eJ(e){return eL.set(e,(eL.get(e)||0)+1),ek.has(e)&&ek.delete(e),D.fetchers.get(e)||F}function eY(e){let t=D.fetchers.get(e);ea.has(e)&&!(t&&"loading"===t.state&&ey.has(e))&&eV(e),eb.delete(e),ey.delete(e),eg.delete(e),ek.delete(e),ee.delete(e),D.fetchers.delete(e)}function eV(e){let t=ea.get(e);t&&(t.abort(),ea.delete(e))}function eq(e){for(let t of e){let e=eC(eJ(t).data);D.fetchers.set(t,e)}}function eX(){let e=[],t=!1;for(let r of eg){let n=D.fetchers.get(r);l(n,`Expected fetcher: ${r}`),"loading"===n.state&&(eg.delete(r),e.push(r),t=!0)}return eq(e),t}function eK(e){let t=[];for(let[r,n]of ey)if(n<e){let e=D.fetchers.get(r);l(e,`Expected fetcher: ${r}`),"loading"===e.state&&(eV(r),ey.delete(r),t.push(r))}return eq(t),t.length>0}function eG(e){D.blockers.delete(e),eP.delete(e)}function eZ(e,t){let r=D.blockers.get(e)||_;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(D.blockers);n.set(e,t),eD({blockers:n})}function eQ({currentLocation:e,nextLocation:t,historyAction:r}){if(0===eP.size)return;eP.size>1&&s(!1,"A router only supports one blocker at a time");let n=Array.from(eP.entries()),[a,o]=n[n.length-1],i=D.blockers.get(a);if((!i||"proceeding"!==i.state)&&o({currentLocation:e,nextLocation:t,historyAction:r}))return a}function e0(e){let r=ed(404,{pathname:e}),{matches:n,route:a}=ec(t||f);return{notFoundMatches:n,route:a,error:r}}function e1(e,t){return C&&C(e,t.map(e=>(function(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}})(e,D.loaderData)))||e.key}function e2(e,t){if(x){let r=x[e1(e,t)];if("number"==typeof r)return r}return null}function e4(e,t,r){if(w){if(!e)return{active:!0,matches:y(t,r,v,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:y(t,r,v,!0)}}return{active:!1,matches:null}}async function e3(e,r,n){if(!w)return{type:"success",matches:e};let a=e;for(;;){let e=null==t,o=t||f,i=h;try{await w({path:r,matches:a,patch:(e,t)=>{n.aborted||K(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=m(o,r,v);if(l)return{type:"success",matches:l};let s=y(o,r,v,!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 v},get future(){return E},get state(){return D},get routes(){return f},get window(){return i},initialize:function(){if(R=e.history.listen(({action:t,location:r,delta:n})=>{if(o){o(),o=void 0;return}s(0===eP.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=eQ({currentLocation:D.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{o=e});e.history.go(-1*n),eZ(a,{state:"blocked",location:r,proceed(){eZ(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(D.blockers);e.set(a,_),eD({blockers:e})}});return}return eA(t,r)}),u){!function(e,t){try{let r=e.sessionStorage.getItem(z);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,B);let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(z,JSON.stringify(r))}catch(e){s(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}})(i,B);i.addEventListener("pagehide",e),Y=()=>i.removeEventListener("pagehide",e)}return D.initialized||eA("POP",D.location,{initialHydration:!0}),n},subscribe:function(e){return S.add(e),()=>S.delete(e)},enableScrollRestoration:function(e,t,r){if(x=e,L=t,C=r||null,!k&&D.navigation===N){k=!0;let e=e2(D.location,D.matches);null!=e&&eD({restoreScrollPosition:e})}return()=>{x=null,L=null,C=null}},navigate:eT,fetch:async function(e,r,n,a){eV(e);let o=!0===(a&&a.flushSync),i=t||f,l=W(D.location,D.matches,v,n,r,a?.relative),s=m(i,l,v),u=e4(s,i,l);if(u.active&&u.matches&&(s=u.matches),!s){eW(e,r,ed(404,{pathname:l}),{flushSync:o});return}let{path:c,submission:d,error:h}=J(!0,l,a);if(h){eW(e,r,h,{flushSync:o});return}let p=eE(s,c),y=!0===(a&&a.preventScrollReset);if(d&&ew(d.formMethod)){await eN(e,r,c,p,s,u.active,o,y,d);return}eb.set(e,{routeId:r,path:c}),await eF(e,r,c,p,s,u.active,o,y,d)},revalidate:function(){let e,t,r;e$||(e$={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}),ez(),eD({revalidation:"loading"});let n=e$.promise;return"submitting"===D.navigation.state||("idle"===D.navigation.state?eA(D.historyAction,D.location,{startUninterruptedRevalidation:!0}):eA(T||D.historyAction,D.navigation.location,{overrideNavigation:D.navigation,enableViewTransition:!0===O})),n},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eJ,deleteFetcher:function(e){let t=(eL.get(e)||0)-1;t<=0?(eL.delete(e),ek.add(e)):eL.set(e,t),eD({fetchers:new Map(D.fetchers)})},dispose:function(){R&&R(),Y&&Y(),S.clear(),a&&a.abort(),D.fetchers.forEach((e,t)=>eY(t)),D.blockers.forEach((e,t)=>eG(t))},getBlocker:function(e,t){let r=D.blockers.get(e)||_;return eP.get(e)!==t&&eP.set(e,t),r},deleteBlocker:eG,patchRoutes:function(e,r){let n=null==t;K(e,r,t||f,h,d),n&&(f=[...f],eD({}))},_internalFetchControllers:ea,_internalSetRoutes:function(e){t=p(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:eG,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}var eQ=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 e0({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})=>{o.forEach(e=>m.current.delete(e)),r.fetchers.forEach((e,t)=>{void 0!==e.data&&m.current.set(t,e.data)}),eK(!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(eK(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 eQ)},[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 v=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]),g=e.basename||"/",w=a.useMemo(()=>({router:e,navigator:v,static:!1,basename:g}),[e,v,g]);return a.createElement(a.Fragment,null,a.createElement(eL.Provider,{value:w},a.createElement(ek.Provider,{value:r},a.createElement(e$.Provider,{value:m.current},a.createElement(eP.Provider,{value:l},a.createElement(e4,{basename:g,location:r.location,navigationType:r.historyAction,navigator:v},a.createElement(e1,{routes:e.routes,future:e.future,state:r})))))),null)}var e1=a.memo(function({routes:e,future:t,state:r}){return eI(e,void 0,r,t)});function e2(e){var t;let r;return t=e.context,(r=a.useContext(eT).outlet)?a.createElement(e_.Provider,{value:t},r):r}function e4({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1}){l(!eO(),"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,v=a.useMemo(()=>{let e=b(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!=v,`<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==v)?null:a.createElement(eD.Provider,{value:c},a.createElement(eM.Provider,{children:t,value:v}))}a.Component;var e3="get",e5="application/x-www-form-urlencoded";function e8(e){return null!=e&&"string"==typeof e.tagName}function e9(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 e6=null,e7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function te(e){return null==e||e7.has(e)?e:(s(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${e5}"`),null)}function tt(e,t){if(!1===e||null==e)throw Error(t)}async function tr(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 tn(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)to(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(ta))}async function ta(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 to(e){return null!=e&&"string"==typeof e.page}function ti(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 tl(e,t,r){var n,a;let o,i;return n=(await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await tr(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(ti).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}),o=new Set,i=new Set(void 0),n.reduce((e,t)=>{if(a&&!to(t)&&"script"===t.as&&t.href&&i.has(t.href))return e;let r=JSON.stringify(function(e){let t={};for(let r of Object.keys(e).sort())t[r]=e[r];return t}(t));return o.has(r)||(o.add(r),e.push({key:r,link:t})),e},[])}function ts(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 tu={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},tc=/[&><\u2028\u2029]/g,td=Symbol("SingleFetchRedirect");function th({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(tc,e=>tu[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(th,{context:e,identifier:t+1,reader:r,textDecoder:n,nonce:a})))}async function tf(e,t){let r=await fetch(e,t);if(404===r.status&&!r.headers.has("X-Remix-Response"))throw new D(404,"Not Found",!0);tt(r.body,"No response body to decode");try{let e=await function(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 D(t,n,e)}}return"SingleFetchRedirect"===e?{value:{[td]:r[0]}}:"SingleFetchClassInstance"===e?{value:r[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}(r.body,window);return{status:r.status,data:e.value}}catch(e){throw Error("Unable to decode turbo-stream response")}}function tp(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"),$(e.redirect,{status:e.status,headers:t})}if("data"in e)return e.data;throw Error(`No response found for routeId "${t}"`)}function tm({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:o}=tw();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(tx,null):null)))}a.Component;function ty(){let e=a.useContext(eL);return tt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tv(){let e=a.useContext(ek);return tt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var tg=a.createContext(void 0);function tw(){let e=a.useContext(tg);return tt(e,"You must render this element inside a <HydratedRouter> element"),e}function tb(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function tE({page:e,...t}){let{router:r}=ty(),n=a.useMemo(()=>m(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?a.createElement(tR,{page:e,matches:n,...t}):null}function tR({page:e,matches:t,...r}){let n=eU(),{manifest:o,routeModules:i}=tw(),{loaderData:l,matches:s}=tv(),u=a.useMemo(()=>ts(e,t,s,o,n,"data"),[e,t,s,o,n]),c=a.useMemo(()=>ts(e,t,s,o,n,"assets"),[e,t,s,o,n]),d=a.useMemo(()=>{var r;let a;if(e===n.pathname+n.search+n.hash)return[];let s=new Set,c=!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?c=!0:t.hasClientLoader?c=!0:s.add(e.route.id))}),0===s.size)return[];let d=("/"===(a="string"==typeof(r=e)?new URL(r,"undefined"==typeof window?"server://singlefetch/":window.location.origin):r).pathname?a.pathname="_root.data":a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a);return c&&s.size>0&&d.searchParams.set("_routes",t.filter(e=>s.has(e.route.id)).map(e=>e.route.id).join(",")),[d.pathname+d.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}=tw(),[n,o]=a.useState([]);return a.useEffect(()=>{let n=!1;return tl(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})))}tg.displayName="FrameworkContext";var tS=!1;function tx(e){var t,r;let{manifest:n,serverHandoffString:o,isSpaMode:i,renderMeta:l}=tw(),{router:s,static:u,staticContext:c}=ty(),{matches:d}=tv(),h=!i;l&&(l.didRenderScripts=!0);let f=(t=d,r=0,i&&!tS?[t[0]]:t);a.useEffect(()=>{tS=!0},[]);let p=a.useMemo(()=>{let t=c?`window.__reactRouterContext = ${o};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",r=u?`${n.hmr?.runtime?`import ${JSON.stringify(n.hmr.runtime)};`:""}${h?"":`import ${JSON.stringify(n.url)}`};
${f.map((e,t)=>`import * as route${t} from ${JSON.stringify(n.routes[e.route.id].module)};`).join("\n")}
  ${h?`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=m(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}}(n,s),null,2)};`:""}
  window.__reactRouterRouteModules = {${f.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};

import(${JSON.stringify(n.entry.module)});`:" ";return a.createElement(a.Fragment,null,a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t},type:void 0}),a.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r},type:"module",async:!0}))},[]),y=f.map(e=>{let t=n.routes[e.route.id];return t?(t.imports||[]).concat([t.module]):[]}).flat(1),v=tS?[]:n.entry.imports.concat(y);return tS?null:a.createElement(a.Fragment,null,h?null:a.createElement("link",{rel:"modulepreload",href:n.url,crossOrigin:e.crossOrigin}),a.createElement("link",{rel:"modulepreload",href:n.entry.module,crossOrigin:e.crossOrigin}),[...new Set(v)].map(t=>a.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin})),p)}var tC="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{tC&&(window.__reactRouterVersion="7.1.0")}catch(e){}var tL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tk=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 v,{basename:g}=a.useContext(eD),w="string"==typeof h&&tL.test(h),E=!1;if("string"==typeof h&&w&&(v=h,tC))try{let e=new URL(window.location.href),t=new URL(h.startsWith("//")?e.protocol+h:h),r=b(t.pathname,g);t.origin===e.origin&&null!=r?h=r+t.search+t.hash:E=!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 R=function(e,{relative:t}={}){l(eO(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=a.useContext(eD),{hash:o,pathname:i,search:s}=eH(e,{relative:t}),u=i;return"/"!==r&&(u="/"===i?r:C([r,i])),n.createHref({pathname:u,search:s,hash:o})}(h,{relative:n}),[S,x,L]=function(e,t){let r=a.useContext(tg),[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:tb(s,p),onBlur:tb(u,m),onMouseEnter:tb(c,p),onMouseLeave:tb(d,m),onTouchStart:tb(h,p)}]:[!1,f,{}]}(r,m),k=function(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:i,viewTransition:l}={}){let s=eF(),u=eU(),c=eH(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}),P=a.createElement("a",{...m,...L,href:v||R,onClick:E||o?e:function(t){e&&e(t),t.defaultPrevented||k(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,P,a.createElement(tE,{page:R})):P});function tP(e){var t;let r=a.useContext(eL);return l(r,(t=e,`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`)),r}function t$(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(e9(e)),r=a.useRef(!1),n=eU(),o=a.useMemo(()=>{var e,a;let o;return e=n.search,a=r.current?null:t.current,o=e9(e),a&&a.forEach((e,t)=>{o.has(t)||a.getAll(t).forEach(e=>{o.append(t,e)})}),o},[n.search]),i=eF(),l=a.useCallback((e,t)=>{let n=e9("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)},[i,o]);return[o,l]}tk.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=eH(i,{relative:c.relative}),p=eU(),m=a.useContext(ek),{navigator:y,basename:v}=a.useContext(eD),g=null!=m&&function(e,t={}){let r=a.useContext(eP);l(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=tP("useViewTransitionState"),o=eH(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=b(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=b(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=w(o.pathname,s)||null!=w(o.pathname,i)}(f)&&!0===s,E=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,R=p.pathname,S=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(R=R.toLowerCase(),S=S?S.toLowerCase():null,E=E.toLowerCase()),S&&v&&(S=b(S,v)||S);let x="/"!==E&&E.endsWith("/")?E.length-1:E.length,C=R===E||!n&&R.startsWith(E)&&"/"===R.charAt(x),L=null!=S&&(S===E||!n&&S.startsWith(E)&&"/"===S.charAt(E.length)),k={isActive:C,isPending:L,isTransitioning:g},P=C?e:void 0;h="function"==typeof r?r(k):[r,C?"active":null,L?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let $="function"==typeof o?o(k):o;return a.createElement(tk,{...c,"aria-current":P,className:h,ref:d,style:$,to:i,viewTransition:s},"function"==typeof u?u(k):u)}).displayName="NavLink",a.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:s=e3,action:u,onSubmit:c,relative:h,preventScrollReset:f,viewTransition:p,...m},y)=>{let v=function(){let{router:e}=tP("useSubmit"),{basename:t}=a.useContext(eD),r=eY("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(e8(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?b(i,t):null,r=e.getAttribute("method")||e3,a=te(e.getAttribute("enctype"))||e5,o=new FormData(e)}else if(e8(e)&&"button"===e.tagName.toLowerCase()||e8(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?b(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||e3,a=te(e.getAttribute("formenctype"))||te(i.getAttribute("enctype"))||e5,o=new FormData(i,e),!function(){if(null===e6)try{new FormData(document.createElement("form"),0),e6=!1}catch(e){e6=!0}return e6}()){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(e8(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else r=e3,n=null,a=e5,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||tM();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])}(),g=function(e,{relative:t}={}){let{basename:r}=a.useContext(eD),n=a.useContext(eT);l(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...eH(e||".",{relative:t})},s=eU();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:C([r,i.pathname])),d(i)}(u,{relative:h}),w="get"===s.toLowerCase()?"get":"post",E="string"==typeof u&&tL.test(u);return a.createElement("form",{ref:y,method:w,action:g,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,a=n?.getAttribute("formmethod")||s;v(n||e.currentTarget,{fetcherKey:t,method:a,navigate:r,replace:o,state:i,relative:h,preventScrollReset:f,viewTransition:p})},...m,"data-discover":E||"render"!==e?void 0:"true"})}).displayName="Form";var tD=0,tM=()=>`__${String(++tD)}__`,tT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tA=new TextEncoder,tO=async(e,t)=>{let r=tA.encode(e),n=await tj(t,["sign"]);return e+"."+btoa(String.fromCharCode(...new Uint8Array(await crypto.subtle.sign("HMAC",n,r)))).replace(/=+$/,"")},tU=async(e,t)=>{let r=e.lastIndexOf("."),n=e.slice(0,r),a=e.slice(r+1),o=tA.encode(n),i=await tj(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},tj=async(e,t)=>crypto.subtle.importKey("raw",tA.encode(e),{name:"HMAC",hash:"SHA-256"},!1,t);function tN(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+="%"+tF(r,2):a+="%u"+tF(r,4).toUpperCase();return a}(atob(e))))}catch(e){return{}}}function tF(e,t){let r=e.toString(16);for(;r.length<t;)r="0"+r;return r}var t_=(e=>(e.Development="development",e.Production="production",e.Test="test",e))(t_||{});function tH(e,t){if(e instanceof Error&&"development"!==t){let e=Error("Unexpected Server Error");return e.stack=void 0,e}return e}function tI(e,t){return Object.entries(e).reduce((e,[r,n])=>Object.assign(e,{[r]:tH(n,t)}),{})}var tz={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},tB=/[&><\u2028\u2029]/g;function tW(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];!function(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)}(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&&tJ(r,e),tJ(d,e),tJ(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&&tJ(r,p),tJ(d,p),tJ(c,p),tJ(n,p),p},new Headers)}function tJ(e,t){let r=e.get("Set-Cookie");r&&splitCookiesString(r).forEach(e=>{t.append("Set-Cookie",e)})}function tY({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}),{})}}function tV(e,t,r){let n=t.get("Location");return r&&(n=b(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")}}}}]);