@mcp-use/inspector 0.12.4 → 0.12.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{r as d,R as ce,b as Ii,c as Hi}from"./index-azxbEkS4.js";var Ct={},Ia;function ji(){if(Ia)return Ct;Ia=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.parse=i,Ct.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function i(m,p){const h=new o,g=m.length;if(g<2)return h;const y=p?.decode||c;let w=0;do{const R=m.indexOf("=",w);if(R===-1)break;const C=m.indexOf(";",w),x=C===-1?g:C;if(R>x){w=m.lastIndexOf(";",R-1)+1;continue}const P=s(m,w,R),D=l(m,R,P),E=m.slice(P,D);if(h[E]===void 0){let F=s(m,R+1,x),T=l(m,x,F);const M=y(m.slice(F,T));h[E]=M}w=x+1}while(w<g);return h}function s(m,p,h){do{const g=m.charCodeAt(p);if(g!==32&&g!==9)return p}while(++p<h);return h}function l(m,p,h){for(;p>h;){const g=m.charCodeAt(--p);if(g!==32&&g!==9)return p+1}return h}function u(m,p,h){const g=h?.encode||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const y=g(p);if(!t.test(y))throw new TypeError(`argument val is invalid: ${p}`);let w=m+"="+y;if(!h)return w;if(h.maxAge!==void 0){if(!Number.isInteger(h.maxAge))throw new TypeError(`option maxAge is invalid: ${h.maxAge}`);w+="; Max-Age="+h.maxAge}if(h.domain){if(!r.test(h.domain))throw new TypeError(`option domain is invalid: ${h.domain}`);w+="; Domain="+h.domain}if(h.path){if(!a.test(h.path))throw new TypeError(`option path is invalid: ${h.path}`);w+="; Path="+h.path}if(h.expires){if(!f(h.expires)||!Number.isFinite(h.expires.valueOf()))throw new TypeError(`option expires is invalid: ${h.expires}`);w+="; Expires="+h.expires.toUTCString()}if(h.httpOnly&&(w+="; HttpOnly"),h.secure&&(w+="; Secure"),h.partitioned&&(w+="; Partitioned"),h.priority)switch(typeof h.priority=="string"?h.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${h.priority}`)}if(h.sameSite)switch(typeof h.sameSite=="string"?h.sameSite.toLowerCase():h.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${h.sameSite}`)}return w}function c(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function f(m){return n.call(m)==="[object Date]"}return Ct}var Ha=ji(),st={exports:{}},ja;function Ui(){if(ja)return st.exports;ja=1;var e={decodeValues:!0,map:!1,silent:!1};function t(l){return typeof l!="string"||l in{}}function r(){return Object.create(null)}function a(l){return typeof l=="string"&&!!l.trim()}function n(l,u){var c=l.split(";").filter(a),f=c.shift(),m=o(f),p=m.name,h=m.value;if(u=u?Object.assign({},e,u):e,t(p))return null;try{h=u.decodeValues?decodeURIComponent(h):h}catch(y){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",y)}var g=r();return g.name=p,g.value=h,c.forEach(function(y){var w=y.split("="),R=w.shift().trimLeft().toLowerCase();if(!t(R)){var C=w.join("=");if(R==="expires")g.expires=new Date(C);else if(R==="max-age"){var x=parseInt(C,10);Number.isNaN(x)||(g.maxAge=x)}else R==="secure"?g.secure=!0:R==="httponly"?g.httpOnly=!0:R==="samesite"?g.sameSite=C:R==="partitioned"?g.partitioned=!0:R&&(g[R]=C)}}),g}function o(l){var u="",c="",f=l.split("=");return f.length>1?(u=f.shift(),c=f.join("=")):c=l,{name:u,value:c}}function i(l,u){if(u=u?Object.assign({},e,u):e,!l)return u.map?r():[];if(l.headers)if(typeof l.headers.getSetCookie=="function")l=l.headers.getSetCookie();else if(l.headers["set-cookie"])l=l.headers["set-cookie"];else{var c=l.headers[Object.keys(l.headers).find(function(m){return m.toLowerCase()==="set-cookie"})];!c&&l.headers.cookie&&!u.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),l=c}if(Array.isArray(l)||(l=[l]),u.map){var f=r();return l.filter(a).reduce(function(m,p){var h=n(p,u);return h&&!t(h.name)&&(m[h.name]=h),m},f)}else return l.filter(a).map(function(m){return n(m,u)}).filter(Boolean)}function s(l){if(Array.isArray(l))return l;if(typeof l!="string")return[];var u=[],c=0,f,m,p,h,g;function y(){for(;c<l.length&&/\s/.test(l.charAt(c));)c+=1;return c<l.length}function w(){return m=l.charAt(c),m!=="="&&m!==";"&&m!==","}for(;c<l.length;){for(f=c,g=!1;y();)if(m=l.charAt(c),m===","){for(p=c,c+=1,y(),h=c;c<l.length&&w();)c+=1;c<l.length&&l.charAt(c)==="="?(g=!0,c=h,u.push(l.substring(f,p)),f=c):c=p+1}else c+=1;(!g||c>=l.length)&&u.push(l.substring(f,l.length))}return u}return st.exports=i,st.exports.parse=i,st.exports.parseString=n,st.exports.splitCookiesString=s,st.exports}var zi=Ui();var Pn=e=>{throw TypeError(e)},Bi=(e,t,r)=>t.has(e)||Pn("Cannot "+r),xr=(e,t,r)=>(Bi(e,t,"read from private field"),r?r.call(e):t.get(e)),Wi=(e,t,r)=>t.has(e)?Pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Vi=(e=>(e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e))(Vi||{}),Ua="popstate";function Dn(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((p,h)=>c(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let o=l(r??n.length-1),i="POP",s=null;function l(p){return Math.min(Math.max(p,0),n.length-1)}function u(){return n[o]}function c(p,h=null,g){let y=$e(n?u().pathname:"/",p,h,g);return X(y.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(p)}`),y}function f(p){return typeof p=="string"?p:he(p)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:f,createURL(p){return new URL(f(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?Pe(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){i="PUSH";let g=c(p,h);o+=1,n.splice(o,n.length,g),a&&s&&s({action:i,location:g,delta:1})},replace(p,h){i="REPLACE";let g=c(p,h);n[o]=g,a&&s&&s({action:i,location:g,delta:0})},go(p){i="POP";let h=l(o+p),g=n[h];o=h,s&&s({action:i,location:g,delta:p})},listen(p){return s=p,()=>{s=null}}}}function qr(e={}){function t(a,n){let{pathname:o,search:i,hash:s}=a.location;return $e("",{pathname:o,search:i,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:he(n)}return _n(t,r,null,e)}function Ln(e={}){function t(n,o){let{pathname:i="/",search:s="",hash:l=""}=Pe(n.location.hash.substring(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),$e("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){let i=n.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let l=n.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof o=="string"?o:he(o))}function a(n,o){X(n.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return _n(t,r,a,e)}function A(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yi(){return Math.random().toString(36).substring(2,10)}function za(e,t){return{usr:e.state,key:e.key,idx:t}}function $e(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Pe(t):t,state:r,key:t&&t.key||a||Yi()}}function he({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 Pe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function _n(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,s="POP",l=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function f(){s="POP";let y=c(),w=y==null?null:y-u;u=y,l&&l({action:s,location:g.location,delta:w})}function m(y,w){s="PUSH";let R=$e(g.location,y,w);r&&r(R,y),u=c()+1;let C=za(R,u),x=g.createHref(R);try{i.pushState(C,"",x)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;n.location.assign(x)}o&&l&&l({action:s,location:g.location,delta:1})}function p(y,w){s="REPLACE";let R=$e(g.location,y,w);r&&r(R,y),u=c();let C=za(R,u),x=g.createHref(R);i.replaceState(C,"",x),o&&l&&l({action:s,location:g.location,delta:0})}function h(y){return Tn(y)}let g={get action(){return s},get location(){return e(n,i)},listen(y){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(Ua,f),l=y,()=>{n.removeEventListener(Ua,f),l=null}},createHref(y){return t(n,y)},createURL:h,encodeLocation(y){let w=h(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:p,go(y){return i.go(y)}};return g}function Tn(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),A(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:he(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function Ec(e){return{defaultValue:e}}var Lt,Ae=class{constructor(e){if(Wi(this,Lt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(xr(this,Lt).has(e))return xr(this,Lt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){xr(this,Lt).set(e,t)}};Lt=new WeakMap;var Ji=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ki(e){return Ji.has(e)}var Xi=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Gi(e){return Xi.has(e)}function Qi(e){return e.index===!0}function Ve(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let s=[...r,String(i)],l=typeof o.id=="string"?o.id:s.join("-");if(A(o.index!==!0||!o.children,"Cannot specify children on an index route"),A(n||!a[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),Qi(o)){let u={...o,id:l};return a[l]=Ba(u,t(u)),u}else{let u={...o,id:l,children:void 0};return a[l]=Ba(u,t(u)),o.children&&(u.children=Ve(o.children,t,s,a,n)),u}})}function Ba(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ge(e,t,r="/"){return Jt(e,t,r,!1)}function Jt(e,t,r,a){let n=typeof t=="string"?Pe(t):t,o=ne(n.pathname||"/",r);if(o==null)return null;let i=Fn(e);qi(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let u=Nn(o);s=ll(i[l],u,a)}return s}function Mn(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Fn(e,t=[],r=[],a="",n=!1){let o=(i,s,l=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&l)return;A(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let f=Me([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(A(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Fn(i.children,t,m,f,l)),!(i.path==null&&!i.index)&&t.push({path:f,score:ol(f,i.index),routesMeta:m})};return e.forEach((i,s)=>{if(i.path===""||!i.path?.includes("?"))o(i,s);else for(let l of kn(i.path))o(i,s,!0,l)}),t}function kn(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=kn(a.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),n&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function qi(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:il(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Zi=/^:[\w-]+$/,el=3,tl=2,rl=1,al=10,nl=-2,Wa=e=>e==="*";function ol(e,t){let r=e.split("/"),a=r.length;return r.some(Wa)&&(a+=nl),t&&(a+=tl),r.filter(n=>!Wa(n)).reduce((n,o)=>n+(Zi.test(o)?el:o===""?rl:al),a)}function il(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function ll(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let s=0;s<a.length;++s){let l=a[s],u=s===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=_t({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),m=l.route;if(!f&&u&&r&&!a[a.length-1].route.index&&(f=_t({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(n,f.params),i.push({params:n,pathname:Me([o,f.pathname]),pathnameBase:dl(Me([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=Me([o,f.pathnameBase]))}return i}function bc(e,t={}){let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(X(!1,`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`),r=r.replace(/\*$/,"/*"));const a=r.startsWith("/")?"/":"",n=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,l)=>{if(s===l.length-1&&i==="*")return n(t["*"]);const c=i.match(/^:([\w-]+)(\??)$/);if(c){const[,f,m]=c;let p=t[f];return A(m==="?"||p!=null,`Missing ":${f}" param`),encodeURIComponent(n(p))}return i.replace(/\?$/g,"")}).filter(i=>!!i);return a+o.join("/")}function _t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=On(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:f},m)=>{if(c==="*"){let h=s[m]||"";i=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=s[m];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function On(e,t=!1,r=!0){X(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(a.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Nn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return X(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ne(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function sl({basename:e,pathname:t}){return t==="/"?e:Me([e,t])}function ul(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Pe(e):e;return{pathname:r?r.startsWith("/")?r:cl(r,t):t,search:fl(a),hash:hl(n)}}function cl(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Pr(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function An(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ir(e){let t=An(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function lr(e,t,r,a=!1){let n;typeof e=="string"?n=Pe(e):(n={...e},A(!n.pathname||!n.pathname.includes("?"),Pr("?","pathname","search",n)),A(!n.pathname||!n.pathname.includes("#"),Pr("#","pathname","hash",n)),A(!n.search||!n.search.includes("#"),Pr("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,s;if(i==null)s=r;else{let f=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;n.pathname=m.join("/")}s=f>=0?t[f]:"/"}let l=ul(n,s),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Me=e=>e.join("/").replace(/\/\/+/g,"/"),dl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fl=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hl=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ml=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function pl(e,t){return new ml(e,typeof t=="number"?{status:t}:t)}var sr=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},yl=(e,t)=>{let r=sr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},vl=(e,t)=>{let r=sr(e,t);return r.headers.set("X-Remix-Replace","true"),r},pe=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function re(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dt(e){return e.filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ue=Symbol("Uninstrumented");function $n(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let s of i)o[s]&&r[s].push(o[s])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=rt(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],s=r[`lazy.${o}`];if(typeof i=="function"&&s.length>0){let l=rt(s,i,()=>{});l&&(a.lazy=Object.assign(a.lazy||{},{[o]:l}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[Ue]??o,s=rt(r[n],i,(...l)=>Va(l[0]));s&&(s[Ue]=i,a[n]=s)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Ue]??n,i=rt(r.middleware,o,(...s)=>Va(s[0]));return i?(i[Ue]=o,i):n})),a}function gl(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[Ue]??e.navigate,n=rt(r.navigate,a,(...o)=>{let[i,s]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?he(i):".",...Ya(e,s??{})}});n&&(n[Ue]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Ue]??e.fetch,n=rt(r.fetch,a,(...o)=>{let[i,,s,l]=o;return{href:s??".",fetcherKey:i,...Ya(e,l??{})}});n&&(n[Ue]=a,e.fetch=n)}return e}function wl(e,t){let r={request:[]};t.forEach(n=>n({instrument(o){let i=Object.keys(o);for(let s of i)o[s]&&r[s].push(o[s])}}));let a=e;return r.request.length>0&&(a=rt(r.request,e,(...n)=>{let[o,i]=n;return{request:Hn(o),context:i!=null?jn(i):i}})),a}function rt(e,t,r){return e.length===0?null:async(...a)=>{let n=await In(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function In(e,t,r,a){let n=e[a],o;if(n){let i,s=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=In(e,t,r,a-1),o=await i,A(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}i||await s(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Va(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:Hn(t),params:{...a},unstable_pattern:n,context:jn(r)}}function Ya(e,t){return{currentUrl:he(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Hn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function jn(e){if(El(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Rl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function El(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Rl}var Un=["POST","PUT","PATCH","DELETE"],bl=new Set(Un),Sl=["GET",...Un],Cl=new Set(Sl),zn=new Set([301,302,303,307,308]),xl=new Set([307,308]),Kt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Pl=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=e=>Pl.test(e),Bn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Wn="remix-router-transitions",Vn=Symbol("ResetLoaderData");function ur(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";A(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||Bn,o=n;if(e.unstable_instrumentations){let v=e.unstable_instrumentations;o=b=>({...n(b),...$n(v.map(S=>S.route).filter(Boolean),b)})}let i={},s=Ve(e.routes,o,void 0,i),l,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c=e.dataStrategy||Fl,f={...e.future},m=null,p=new Set,h=null,g=null,y=null,w=e.hydrationData!=null,R=ge(s,e.history.location,u),C=!1,x=null,P;if(R==null&&!e.patchRoutesOnNavigation){let v=te(404,{pathname:e.history.location.pathname}),{matches:b,route:S}=ct(s);P=!0,R=b,x={[S.id]:v}}else if(R&&!e.hydrationData&&$t(R,s,e.history.location.pathname).active&&(R=null),R)if(R.some(v=>v.route.lazy))P=!1;else if(!R.some(v=>ta(v.route)))P=!0;else{let v=e.hydrationData?e.hydrationData.loaderData:null,b=e.hydrationData?e.hydrationData.errors:null;if(b){let S=R.findIndex(L=>b[L.route.id]!==void 0);P=R.slice(0,S+1).every(L=>!Ar(L.route,v,b))}else P=R.every(S=>!Ar(S.route,v,b))}else{P=!1,R=[];let v=$t(null,s,e.history.location.pathname);v.active&&v.matches&&(C=!0,R=v.matches)}let D,E={historyAction:e.history.action,location:e.history.location,matches:R,initialized:P,navigation:Kt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},F="POP",T=!1,M,N=!1,Y=new Map,G=null,B=!1,K=!1,le=new Set,J=new Map,be=0,ye=-1,De=new Map,ve=new Set,Se=new Map,Le=new Map,_e=new Set,Ke=new Map,Nt,Rt=null;function Ri(){if(m=e.history.listen(({action:v,location:b,delta:S})=>{if(Nt){Nt(),Nt=void 0;return}X(Ke.size===0||S!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let L=Oa({currentLocation:E.location,nextLocation:b,historyAction:v});if(L&&S!=null){let _=new Promise($=>{Nt=$});e.history.go(S*-1),At(L,{state:"blocked",location:b,proceed(){At(L,{state:"proceeding",proceed:void 0,reset:void 0,location:b}),_.then(()=>e.history.go(S))},reset(){let $=new Map(E.blockers);$.set(L,tt),se({blockers:$})}});return}return Xe(v,b)}),r){Hl(t,Y);let v=()=>jl(t,Y);t.addEventListener("pagehide",v),G=()=>t.removeEventListener("pagehide",v)}return E.initialized||Xe("POP",E.location,{initialHydration:!0}),D}function Ei(){m&&m(),G&&G(),p.clear(),M&&M.abort(),E.fetchers.forEach((v,b)=>br(b)),E.blockers.forEach((v,b)=>ka(b))}function bi(v){return p.add(v),()=>p.delete(v)}function se(v,b={}){v.matches&&(v.matches=v.matches.map(_=>{let $=i[_.route.id],H=_.route;return H.element!==$.element||H.errorElement!==$.errorElement||H.hydrateFallbackElement!==$.hydrateFallbackElement?{..._,route:$}:_})),E={...E,...v};let S=[],L=[];E.fetchers.forEach((_,$)=>{_.state==="idle"&&(_e.has($)?S.push($):L.push($))}),_e.forEach(_=>{!E.fetchers.has(_)&&!J.has(_)&&S.push(_)}),[...p].forEach(_=>_(E,{deletedFetchers:S,viewTransitionOpts:b.viewTransitionOpts,flushSync:b.flushSync===!0})),S.forEach(_=>br(_)),L.forEach(_=>E.fetchers.delete(_))}function it(v,b,{flushSync:S}={}){let L=E.actionData!=null&&E.navigation.formMethod!=null&&de(E.navigation.formMethod)&&E.navigation.state==="loading"&&v.state?._isRedirect!==!0,_;b.actionData?Object.keys(b.actionData).length>0?_=b.actionData:_=null:L?_=E.actionData:_=null;let $=b.loaderData?nn(E.loaderData,b.loaderData,b.matches||[],b.errors):E.loaderData,H=E.blockers;H.size>0&&(H=new Map(H),H.forEach((j,I)=>H.set(I,tt)));let O=B?!1:Aa(v,b.matches||E.matches),U=T===!0||E.navigation.formMethod!=null&&de(E.navigation.formMethod)&&v.state?._isRedirect!==!0;l&&(s=l,l=void 0),B||F==="POP"||(F==="PUSH"?e.history.push(v,v.state):F==="REPLACE"&&e.history.replace(v,v.state));let z;if(F==="POP"){let j=Y.get(E.location.pathname);j&&j.has(v.pathname)?z={currentLocation:E.location,nextLocation:v}:Y.has(v.pathname)&&(z={currentLocation:v,nextLocation:E.location})}else if(N){let j=Y.get(E.location.pathname);j?j.add(v.pathname):(j=new Set([v.pathname]),Y.set(E.location.pathname,j)),z={currentLocation:E.location,nextLocation:v}}se({...b,actionData:_,loaderData:$,historyAction:F,location:v,initialized:!0,navigation:Kt,revalidation:"idle",restoreScrollPosition:O,preventScrollReset:U,blockers:H},{viewTransitionOpts:z,flushSync:S===!0}),F="POP",T=!1,N=!1,B=!1,K=!1,Rt?.resolve(),Rt=null}async function Pa(v,b){if(typeof v=="number"){e.history.go(v);return}let S=Nr(E.location,E.matches,u,v,b?.fromRouteId,b?.relative),{path:L,submission:_,error:$}=Ka(!1,S,b),H=E.location,O=$e(E.location,L,b&&b.state);O={...O,...e.history.encodeLocation(O)};let U=b&&b.replace!=null?b.replace:void 0,z="PUSH";U===!0?z="REPLACE":U===!1||_!=null&&de(_.formMethod)&&_.formAction===E.location.pathname+E.location.search&&(z="REPLACE");let j=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,I=(b&&b.flushSync)===!0,W=Oa({currentLocation:H,nextLocation:O,historyAction:z});if(W){At(W,{state:"blocked",location:O,proceed(){At(W,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),Pa(v,b)},reset(){let q=new Map(E.blockers);q.set(W,tt),se({blockers:q})}});return}await Xe(z,O,{submission:_,pendingError:$,preventScrollReset:j,replace:b&&b.replace,enableViewTransition:b&&b.viewTransition,flushSync:I})}function Si(){Rt||(Rt=Ul()),Er(),se({revalidation:"loading"});let v=Rt.promise;return E.navigation.state==="submitting"?v:E.navigation.state==="idle"?(Xe(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),v):(Xe(F||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:N===!0}),v)}async function Xe(v,b,S){M&&M.abort(),M=null,F=v,B=(S&&S.startUninterruptedRevalidation)===!0,Oi(E.location,E.matches),T=(S&&S.preventScrollReset)===!0,N=(S&&S.enableViewTransition)===!0;let L=l||s,_=S&&S.overrideNavigation,$=S?.initialHydration&&E.matches&&E.matches.length>0&&!C?E.matches:ge(L,b,u),H=(S&&S.flushSync)===!0;if($&&E.initialized&&!K&&Ol(E.location,b)&&!(S&&S.submission&&de(S.submission.formMethod))){it(b,{matches:$},{flushSync:H});return}let O=$t($,L,b.pathname);if(O.active&&O.matches&&($=O.matches),!$){let{error:me,notFoundMatches:Z,route:Q}=Sr(b.pathname);it(b,{matches:Z,loaderData:{},errors:{[Q.id]:me}},{flushSync:H});return}M=new AbortController;let U=ut(e.history,b,M.signal,S&&S.submission),z=e.getContext?await e.getContext():new Ae,j;if(S&&S.pendingError)j=[xe($).route.id,{type:"error",error:S.pendingError}];else if(S&&S.submission&&de(S.submission.formMethod)){let me=await Ci(U,b,S.submission,$,z,O.active,S&&S.initialHydration===!0,{replace:S.replace,flushSync:H});if(me.shortCircuited)return;if(me.pendingActionResult){let[Z,Q]=me.pendingActionResult;if(ie(Q)&&re(Q.error)&&Q.error.status===404){M=null,it(b,{matches:me.matches,loaderData:{},errors:{[Z]:Q.error}});return}}$=me.matches||$,j=me.pendingActionResult,_=Dr(b,S.submission),H=!1,O.active=!1,U=ut(e.history,U.url,U.signal)}let{shortCircuited:I,matches:W,loaderData:q,errors:oe}=await xi(U,b,$,z,O.active,_,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,H,j);I||(M=null,it(b,{matches:W||$,...on(j),loaderData:q,errors:oe}))}async function Ci(v,b,S,L,_,$,H,O={}){Er();let U=$l(b,S);if(se({navigation:U},{flushSync:O.flushSync===!0}),$){let I=await It(L,b.pathname,v.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){if(I.partialMatches.length===0){let{matches:q,route:oe}=ct(s);return{matches:q,pendingActionResult:[oe.id,{type:"error",error:I.error}]}}let W=xe(I.partialMatches).route.id;return{matches:I.partialMatches,pendingActionResult:[W,{type:"error",error:I.error}]}}else if(I.matches)L=I.matches;else{let{notFoundMatches:W,error:q,route:oe}=Sr(b.pathname);return{matches:W,pendingActionResult:[oe.id,{type:"error",error:q}]}}}let z,j=ft(L,b);if(!j.route.action&&!j.route.lazy)z={type:"error",error:te(405,{method:v.method,pathname:b.pathname,routeId:j.route.id})};else{let I=Be(o,i,v,L,j,H?[]:a,_),W=await Et(v,I,_,null);if(z=W[j.route.id],!z){for(let q of L)if(W[q.route.id]){z=W[q.route.id];break}}if(v.signal.aborted)return{shortCircuited:!0}}if(ze(z)){let I;return O&&O.replace!=null?I=O.replace:I=tn(z.response.headers.get("Location"),new URL(v.url),u)===E.location.pathname+E.location.search,await Ge(v,z,!0,{submission:S,replace:I}),{shortCircuited:!0}}if(ie(z)){let I=xe(L,j.route.id);return(O&&O.replace)!==!0&&(F="PUSH"),{matches:L,pendingActionResult:[I.route.id,z,j.route.id]}}return{matches:L,pendingActionResult:[j.route.id,z]}}async function xi(v,b,S,L,_,$,H,O,U,z,j,I){let W=$||Dr(b,H),q=H||O||ln(W),oe=!B&&!z;if(_){if(oe){let ue=Da(I);se({navigation:W,...ue!==void 0?{actionData:ue}:{}},{flushSync:j})}let V=await It(S,b.pathname,v.signal);if(V.type==="aborted")return{shortCircuited:!0};if(V.type==="error"){if(V.partialMatches.length===0){let{matches:lt,route:Ze}=ct(s);return{matches:lt,loaderData:{},errors:{[Ze.id]:V.error}}}let ue=xe(V.partialMatches).route.id;return{matches:V.partialMatches,loaderData:{},errors:{[ue]:V.error}}}else if(V.matches)S=V.matches;else{let{error:ue,notFoundMatches:lt,route:Ze}=Sr(b.pathname);return{matches:lt,loaderData:{},errors:{[Ze.id]:ue}}}}let me=l||s,{dsMatches:Z,revalidatingFetchers:Q}=Xa(v,L,o,i,e.history,E,S,q,b,z?[]:a,z===!0,K,le,_e,Se,ve,me,u,e.patchRoutesOnNavigation!=null,I);if(ye=++be,!e.dataStrategy&&!Z.some(V=>V.shouldLoad)&&!Z.some(V=>V.route.middleware&&V.route.middleware.length>0)&&Q.length===0){let V=Ma();return it(b,{matches:S,loaderData:{},errors:I&&ie(I[1])?{[I[0]]:I[1].error}:null,...on(I),...V?{fetchers:new Map(E.fetchers)}:{}},{flushSync:j}),{shortCircuited:!0}}if(oe){let V={};if(!_){V.navigation=W;let ue=Da(I);ue!==void 0&&(V.actionData=ue)}Q.length>0&&(V.fetchers=Pi(Q)),se(V,{flushSync:j})}Q.forEach(V=>{Oe(V.key),V.controller&&J.set(V.key,V.controller)});let Qe=()=>Q.forEach(V=>Oe(V.key));M&&M.signal.addEventListener("abort",Qe);let{loaderResults:bt,fetcherResults:je}=await La(Z,Q,v,L);if(v.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Qe),Q.forEach(V=>J.delete(V.key));let Te=zt(bt);if(Te)return await Ge(v,Te.result,!0,{replace:U}),{shortCircuited:!0};if(Te=zt(je),Te)return ve.add(Te.key),await Ge(v,Te.result,!0,{replace:U}),{shortCircuited:!0};let{loaderData:Cr,errors:St}=an(E,S,bt,I,Q,je);z&&E.errors&&(St={...E.errors,...St});let qe=Ma(),Ht=Fa(ye),jt=qe||Ht||Q.length>0;return{matches:S,loaderData:Cr,errors:St,...jt?{fetchers:new Map(E.fetchers)}:{}}}function Da(v){if(v&&!ie(v[1]))return{[v[0]]:v[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Pi(v){return v.forEach(b=>{let S=E.fetchers.get(b.key),L=xt(void 0,S?S.data:void 0);E.fetchers.set(b.key,L)}),new Map(E.fetchers)}async function Di(v,b,S,L){Oe(v);let _=(L&&L.flushSync)===!0,$=l||s,H=Nr(E.location,E.matches,u,S,b,L?.relative),O=ge($,H,u),U=$t(O,$,H);if(U.active&&U.matches&&(O=U.matches),!O){ke(v,b,te(404,{pathname:H}),{flushSync:_});return}let{path:z,submission:j,error:I}=Ka(!0,H,L);if(I){ke(v,b,I,{flushSync:_});return}let W=e.getContext?await e.getContext():new Ae,q=(L&&L.preventScrollReset)===!0;if(j&&de(j.formMethod)){await Li(v,b,z,O,W,U.active,_,q,j);return}Se.set(v,{routeId:b,path:z}),await _i(v,b,z,O,W,U.active,_,q,j)}async function Li(v,b,S,L,_,$,H,O,U){Er(),Se.delete(v);let z=E.fetchers.get(v);Fe(v,Il(U,z),{flushSync:H});let j=new AbortController,I=ut(e.history,S,j.signal,U);if($){let ae=await It(L,new URL(I.url).pathname,I.signal,v);if(ae.type==="aborted")return;if(ae.type==="error"){ke(v,b,ae.error,{flushSync:H});return}else if(ae.matches)L=ae.matches;else{ke(v,b,te(404,{pathname:S}),{flushSync:H});return}}let W=ft(L,S);if(!W.route.action&&!W.route.lazy){let ae=te(405,{method:U.formMethod,pathname:S,routeId:b});ke(v,b,ae,{flushSync:H});return}J.set(v,j);let q=be,oe=Be(o,i,I,L,W,a,_),Z=(await Et(I,oe,_,v))[W.route.id];if(I.signal.aborted){J.get(v)===j&&J.delete(v);return}if(_e.has(v)){if(ze(Z)||ie(Z)){Fe(v,Ne(void 0));return}}else{if(ze(Z))if(J.delete(v),ye>q){Fe(v,Ne(void 0));return}else return ve.add(v),Fe(v,xt(U)),Ge(I,Z,!1,{fetcherSubmission:U,preventScrollReset:O});if(ie(Z)){ke(v,b,Z.error);return}}let Q=E.navigation.location||E.location,Qe=ut(e.history,Q,j.signal),bt=l||s,je=E.navigation.state!=="idle"?ge(bt,E.navigation.location,u):E.matches;A(je,"Didn't find any matches after fetcher action");let Te=++be;De.set(v,Te);let Cr=xt(U,Z.data);E.fetchers.set(v,Cr);let{dsMatches:St,revalidatingFetchers:qe}=Xa(Qe,_,o,i,e.history,E,je,U,Q,a,!1,K,le,_e,Se,ve,bt,u,e.patchRoutesOnNavigation!=null,[W.route.id,Z]);qe.filter(ae=>ae.key!==v).forEach(ae=>{let Ut=ae.key,$a=E.fetchers.get(Ut),$i=xt(void 0,$a?$a.data:void 0);E.fetchers.set(Ut,$i),Oe(Ut),ae.controller&&J.set(Ut,ae.controller)}),se({fetchers:new Map(E.fetchers)});let Ht=()=>qe.forEach(ae=>Oe(ae.key));j.signal.addEventListener("abort",Ht);let{loaderResults:jt,fetcherResults:V}=await La(St,qe,Qe,_);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",Ht),De.delete(v),J.delete(v),qe.forEach(ae=>J.delete(ae.key)),E.fetchers.has(v)){let ae=Ne(Z.data);E.fetchers.set(v,ae)}let ue=zt(jt);if(ue)return Ge(Qe,ue.result,!1,{preventScrollReset:O});if(ue=zt(V),ue)return ve.add(ue.key),Ge(Qe,ue.result,!1,{preventScrollReset:O});let{loaderData:lt,errors:Ze}=an(E,je,jt,void 0,qe,V);Fa(Te),E.navigation.state==="loading"&&Te>ye?(A(F,"Expected pending action"),M&&M.abort(),it(E.navigation.location,{matches:je,loaderData:lt,errors:Ze,fetchers:new Map(E.fetchers)})):(se({errors:Ze,loaderData:nn(E.loaderData,lt,je,Ze),fetchers:new Map(E.fetchers)}),K=!1)}async function _i(v,b,S,L,_,$,H,O,U){let z=E.fetchers.get(v);Fe(v,xt(U,z?z.data:void 0),{flushSync:H});let j=new AbortController,I=ut(e.history,S,j.signal);if($){let Q=await It(L,new URL(I.url).pathname,I.signal,v);if(Q.type==="aborted")return;if(Q.type==="error"){ke(v,b,Q.error,{flushSync:H});return}else if(Q.matches)L=Q.matches;else{ke(v,b,te(404,{pathname:S}),{flushSync:H});return}}let W=ft(L,S);J.set(v,j);let q=be,oe=Be(o,i,I,L,W,a,_),Z=(await Et(I,oe,_,v))[W.route.id];if(J.get(v)===j&&J.delete(v),!I.signal.aborted){if(_e.has(v)){Fe(v,Ne(void 0));return}if(ze(Z))if(ye>q){Fe(v,Ne(void 0));return}else{ve.add(v),await Ge(I,Z,!1,{preventScrollReset:O});return}if(ie(Z)){ke(v,b,Z.error);return}Fe(v,Ne(Z.data))}}async function Ge(v,b,S,{submission:L,fetcherSubmission:_,preventScrollReset:$,replace:H}={}){b.response.headers.has("X-Remix-Revalidate")&&(K=!0);let O=b.response.headers.get("Location");A(O,"Expected a Location header on the redirect Response"),O=tn(O,new URL(v.url),u);let U=$e(E.location,O,{_isRedirect:!0});if(r){let oe=!1;if(b.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(ea(O)){const me=Tn(O,!0);oe=me.origin!==t.location.origin||ne(me.pathname,u)==null}if(oe){H?t.location.replace(O):t.location.assign(O);return}}M=null;let z=H===!0||b.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:j,formAction:I,formEncType:W}=E.navigation;!L&&!_&&j&&I&&W&&(L=ln(E.navigation));let q=L||_;if(xl.has(b.response.status)&&q&&de(q.formMethod))await Xe(z,U,{submission:{...q,formAction:O},preventScrollReset:$||T,enableViewTransition:S?N:void 0});else{let oe=Dr(U,L);await Xe(z,U,{overrideNavigation:oe,fetcherSubmission:_,preventScrollReset:$||T,enableViewTransition:S?N:void 0})}}async function Et(v,b,S,L){let _,$={};try{_=await Zn(c,v,b,L,S,!1)}catch(H){return b.filter(O=>O.shouldLoad).forEach(O=>{$[O.route.id]={type:"error",error:H}}),$}if(v.signal.aborted)return $;for(let[H,O]of Object.entries(_))if(io(O)){let U=O.result;$[H]={type:"redirect",response:ro(U,v,H,b,u)}}else $[H]=await to(O);return $}async function La(v,b,S,L){let _=Et(S,v,L,null),$=Promise.all(b.map(async U=>{if(U.matches&&U.match&&U.request&&U.controller){let j=(await Et(U.request,U.matches,L,U.key))[U.match.route.id];return{[U.key]:j}}else return Promise.resolve({[U.key]:{type:"error",error:te(404,{pathname:U.path})}})})),H=await _,O=(await $).reduce((U,z)=>Object.assign(U,z),{});return{loaderResults:H,fetcherResults:O}}function Er(){K=!0,Se.forEach((v,b)=>{J.has(b)&&le.add(b),Oe(b)})}function Fe(v,b,S={}){E.fetchers.set(v,b),se({fetchers:new Map(E.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function ke(v,b,S,L={}){let _=xe(E.matches,b);br(v),se({errors:{[_.route.id]:S},fetchers:new Map(E.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function _a(v){return Le.set(v,(Le.get(v)||0)+1),_e.has(v)&&_e.delete(v),E.fetchers.get(v)||Zr}function Ti(v,b){Oe(v,b?.reason),Fe(v,Ne(null))}function br(v){let b=E.fetchers.get(v);J.has(v)&&!(b&&b.state==="loading"&&De.has(v))&&Oe(v),Se.delete(v),De.delete(v),ve.delete(v),_e.delete(v),le.delete(v),E.fetchers.delete(v)}function Mi(v){let b=(Le.get(v)||0)-1;b<=0?(Le.delete(v),_e.add(v)):Le.set(v,b),se({fetchers:new Map(E.fetchers)})}function Oe(v,b){let S=J.get(v);S&&(S.abort(b),J.delete(v))}function Ta(v){for(let b of v){let S=_a(b),L=Ne(S.data);E.fetchers.set(b,L)}}function Ma(){let v=[],b=!1;for(let S of ve){let L=E.fetchers.get(S);A(L,`Expected fetcher: ${S}`),L.state==="loading"&&(ve.delete(S),v.push(S),b=!0)}return Ta(v),b}function Fa(v){let b=[];for(let[S,L]of De)if(L<v){let _=E.fetchers.get(S);A(_,`Expected fetcher: ${S}`),_.state==="loading"&&(Oe(S),De.delete(S),b.push(S))}return Ta(b),b.length>0}function Fi(v,b){let S=E.blockers.get(v)||tt;return Ke.get(v)!==b&&Ke.set(v,b),S}function ka(v){E.blockers.delete(v),Ke.delete(v)}function At(v,b){let S=E.blockers.get(v)||tt;A(S.state==="unblocked"&&b.state==="blocked"||S.state==="blocked"&&b.state==="blocked"||S.state==="blocked"&&b.state==="proceeding"||S.state==="blocked"&&b.state==="unblocked"||S.state==="proceeding"&&b.state==="unblocked",`Invalid blocker state transition: ${S.state} -> ${b.state}`);let L=new Map(E.blockers);L.set(v,b),se({blockers:L})}function Oa({currentLocation:v,nextLocation:b,historyAction:S}){if(Ke.size===0)return;Ke.size>1&&X(!1,"A router only supports one blocker at a time");let L=Array.from(Ke.entries()),[_,$]=L[L.length-1],H=E.blockers.get(_);if(!(H&&H.state==="proceeding")&&$({currentLocation:v,nextLocation:b,historyAction:S}))return _}function Sr(v){let b=te(404,{pathname:v}),S=l||s,{matches:L,route:_}=ct(S);return{notFoundMatches:L,route:_,error:b}}function ki(v,b,S){if(h=v,y=b,g=S||null,!w&&E.navigation===Kt){w=!0;let L=Aa(E.location,E.matches);L!=null&&se({restoreScrollPosition:L})}return()=>{h=null,y=null,g=null}}function Na(v,b){return g&&g(v,b.map(L=>Mn(L,E.loaderData)))||v.key}function Oi(v,b){if(h&&y){let S=Na(v,b);h[S]=y()}}function Aa(v,b){if(h){let S=Na(v,b),L=h[S];if(typeof L=="number")return L}return null}function $t(v,b,S){if(e.patchRoutesOnNavigation)if(v){if(Object.keys(v[0].params).length>0)return{active:!0,matches:Jt(b,S,u,!0)}}else return{active:!0,matches:Jt(b,S,u,!0)||[]};return{active:!1,matches:null}}async function It(v,b,S,L){if(!e.patchRoutesOnNavigation)return{type:"success",matches:v};let _=v;for(;;){let $=l==null,H=l||s,O=i;try{await e.patchRoutesOnNavigation({signal:S,path:b,matches:_,fetcherKey:L,patch:(j,I)=>{S.aborted||Ga(j,I,H,O,o,!1)}})}catch(j){return{type:"error",error:j,partialMatches:_}}finally{$&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let U=ge(H,b,u);if(U)return{type:"success",matches:U};let z=Jt(H,b,u,!0);if(!z||_.length===z.length&&_.every((j,I)=>j.route.id===z[I].route.id))return{type:"success",matches:null};_=z}}function Ni(v){i={},l=Ve(v,o,void 0,i)}function Ai(v,b,S=!1){let L=l==null;Ga(v,b,l||s,i,o,S),L&&(s=[...s],se({}))}return D={get basename(){return u},get future(){return f},get state(){return E},get routes(){return s},get window(){return t},initialize:Ri,subscribe:bi,enableScrollRestoration:ki,navigate:Pa,fetch:Di,revalidate:Si,createHref:v=>e.history.createHref(v),encodeLocation:v=>e.history.encodeLocation(v),getFetcher:_a,resetFetcher:Ti,deleteFetcher:Mi,dispose:Ei,getBlocker:Fi,deleteBlocker:ka,patchRoutes:Ai,_internalFetchControllers:J,_internalSetRoutes:Ni,_internalSetStateDoNotUseOrYouWillBreakYourApp(v){se(v)}},e.unstable_instrumentations&&(D=gl(D,e.unstable_instrumentations.map(v=>v.router).filter(Boolean))),D}function Yn(e,t){A(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},a=(t?t.basename:null)||"/",n=t?.mapRouteProperties||Bn,o=n;if(t?.unstable_instrumentations){let p=t.unstable_instrumentations;o=h=>({...n(h),...$n(p.map(g=>g.route).filter(Boolean),h)})}let i=Ve(e,o,void 0,r);async function s(p,{requestContext:h,filterMatchesToLoad:g,skipLoaderErrorBubbling:y,skipRevalidation:w,dataStrategy:R,generateMiddlewareResponse:C}={}){let x=new URL(p.url),P=p.method,D=$e("",he(x),null,"default"),E=ge(i,D,a);if(h=h??new Ae,!jr(P)&&P!=="HEAD"){let T=te(405,{method:P}),{matches:M,route:N}=ct(i),Y={basename:a,location:D,matches:M,loaderData:{},actionData:null,errors:{[N.id]:T},statusCode:T.status,loaderHeaders:{},actionHeaders:{}};return C?C(()=>Promise.resolve(Y)):Y}else if(!E){let T=te(404,{pathname:D.pathname}),{matches:M,route:N}=ct(i),Y={basename:a,location:D,matches:M,loaderData:{},actionData:null,errors:{[N.id]:T},statusCode:T.status,loaderHeaders:{},actionHeaders:{}};return C?C(()=>Promise.resolve(Y)):Y}if(C){A(h instanceof Ae,"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`");try{await Za(E,r,o);let T,M=await en({request:p,unstable_pattern:dt(E.map(N=>N.route.path)),matches:E,params:E[0].params,context:h},async()=>await C(async(Y,G={})=>{let B=await u(Y,D,E,h,R||null,y===!0,null,"filterMatchesToLoad"in G?G.filterMatchesToLoad??null:g??null,w===!0);return ee(B)?B:(T={location:D,basename:a,...B},T)}),async(N,Y)=>{if(er(N))return N;if(ee(N))try{N=new pe(N.status,N.statusText,await eo(N))}catch(G){N=G}if(We(N)&&(N=Nl(N)),T){Y in T.loaderData&&(T.loaderData[Y]=void 0);let G=Jn(i,T,N,y?Y:xe(E,Y).route.id);return C(()=>Promise.resolve(G))}else{let G=y?Y:xe(E,E.find(K=>K.route.id===Y||K.route.loader)?.route.id||Y).route.id,B={matches:E,location:D,basename:a,loaderData:{},actionData:null,errors:{[G]:N},statusCode:re(N)?N.status:500,actionHeaders:{},loaderHeaders:{}};return C(()=>Promise.resolve(B))}});return A(ee(M),"Expected a response in query()"),M}catch(T){if(ee(T))return T;throw T}}let F=await u(p,D,E,h,R||null,y===!0,null,g||null,w===!0);return ee(F)?F:{location:D,basename:a,...F}}async function l(p,{routeId:h,requestContext:g,dataStrategy:y,generateMiddlewareResponse:w}={}){let R=new URL(p.url),C=p.method,x=$e("",he(R),null,"default"),P=ge(i,x,a);if(g=g??new Ae,!jr(C)&&C!=="HEAD"&&C!=="OPTIONS")throw te(405,{method:C});if(!P)throw te(404,{pathname:x.pathname});let D=h?P.find(T=>T.route.id===h):ft(P,x);if(h&&!D)throw te(403,{pathname:x.pathname,routeId:h});if(!D)throw te(404,{pathname:x.pathname});if(w)return A(g instanceof Ae,"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"),await Za(P,r,o),await en({request:p,unstable_pattern:dt(P.map(M=>M.route.path)),matches:P,params:P[0].params,context:g},async()=>await w(async N=>{let Y=await u(N,x,P,g,y||null,!1,D,null,!1),G=F(Y);return ee(G)?G:typeof G=="string"?new Response(G):Response.json(G)}),M=>{if(We(M))return Promise.resolve(Hr(M));if(ee(M))return Promise.resolve(M);throw M});let E=await u(p,x,P,g,y||null,!1,D,null,!1);return F(E);function F(T){if(ee(T))return T;let M=T.errors?Object.values(T.errors)[0]:void 0;if(M!==void 0)throw M;if(T.actionData)return Object.values(T.actionData)[0];if(T.loaderData)return Object.values(T.loaderData)[0]}}async function u(p,h,g,y,w,R,C,x,P){A(p.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(de(p.method))return await c(p,g,C||ft(g,h),y,w,R,C!=null,x,P);let D=await f(p,g,y,w,R,C,x);return ee(D)?D:{...D,actionData:null,actionHeaders:{}}}catch(D){if(oo(D)&&ee(D.result)){if(D.type==="error")throw D.result;return D.result}if(er(D))return D;throw D}}async function c(p,h,g,y,w,R,C,x,P){let D;if(!g.route.action&&!g.route.lazy){let T=te(405,{method:p.method,pathname:new URL(p.url).pathname,routeId:g.route.id});if(C)throw T;D={type:"error",error:T}}else{let T=Be(o,r,p,h,g,[],y);D=(await m(p,T,C,y,w))[g.route.id],p.signal.aborted&&Ja(p,C)}if(ze(D))throw new Response(null,{status:D.response.status,headers:{Location:D.response.headers.get("Location")}});if(C){if(ie(D))throw D.error;return{matches:[g],loaderData:{},actionData:{[g.route.id]:D.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(P)if(ie(D)){let T=R?g:xe(h,g.route.id);return{statusCode:re(D.error)?D.error.status:D.statusCode!=null?D.statusCode:500,actionData:null,actionHeaders:{...D.headers?{[g.route.id]:D.headers}:{}},matches:h,loaderData:{},errors:{[T.route.id]:D.error},loaderHeaders:{}}}else return{actionData:{[g.route.id]:D.data},actionHeaders:D.headers?{[g.route.id]:D.headers}:{},matches:h,loaderData:{},errors:null,statusCode:D.statusCode||200,loaderHeaders:{}};let E=new Request(p.url,{headers:p.headers,redirect:p.redirect,signal:p.signal});if(ie(D)){let T=R?g:xe(h,g.route.id);return{...await f(E,h,y,w,R,null,x,[T.route.id,D]),statusCode:re(D.error)?D.error.status:D.statusCode!=null?D.statusCode:500,actionData:null,actionHeaders:{...D.headers?{[g.route.id]:D.headers}:{}}}}return{...await f(E,h,y,w,R,null,x),actionData:{[g.route.id]:D.data},...D.statusCode?{statusCode:D.statusCode}:{},actionHeaders:D.headers?{[g.route.id]:D.headers}:{}}}async function f(p,h,g,y,w,R,C,x){let P=R!=null;if(P&&!R?.route.loader&&!R?.route.lazy)throw te(400,{method:p.method,pathname:new URL(p.url).pathname,routeId:R?.route.id});let D;if(R)D=Be(o,r,p,h,R,[],g);else{let T=x&&ie(x[1])?h.findIndex(N=>N.route.id===x[0])-1:void 0,M=dt(h.map(N=>N.route.path));D=h.map((N,Y)=>T!=null&&Y>T?Tt(o,r,p,M,N,[],g,!1):Tt(o,r,p,M,N,[],g,(N.route.loader||N.route.lazy)!=null&&(!C||C(N))))}if(!y&&!D.some(T=>T.shouldLoad))return{matches:h,loaderData:{},errors:x&&ie(x[1])?{[x[0]]:x[1].error}:null,statusCode:200,loaderHeaders:{}};let E=await m(p,D,P,g,y);return p.signal.aborted&&Ja(p,P),{...ao(h,E,x,!0,w),matches:h}}async function m(p,h,g,y,w){let R=await Zn(w||$r,p,h,null,y,!0),C={};return await Promise.all(h.map(async x=>{if(!(x.route.id in R))return;let P=R[x.route.id];if(io(P)){let D=P.result;throw ro(D,p,x.route.id,h,a)}if(g){if(ee(P.result))throw P;if(We(P.result))throw Hr(P.result)}C[x.route.id]=await to(P)})),C}return{dataRoutes:i,query:s,queryRoute:l}}function Jn(e,t,r,a){let n=a||t._deepestRenderedBoundaryId||e[0].id;return{...t,statusCode:re(r)?r.status:500,errors:{[n]:r}}}function Ja(e,t){if(e.signal.reason!==void 0)throw e.signal.reason;let r=t?"queryRoute":"query";throw new Error(`${r}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function Dl(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nr(e,t,r,a,n,o){let i,s;if(n){i=[];for(let u of t)if(i.push(u),u.route.id===n){s=u;break}}else i=t,s=t[t.length-1];let l=lr(a||".",ir(i),ne(e.pathname,r)||e.pathname,o==="path");if(a==null&&(l.search=e.search,l.hash=e.hash),(a==null||a===""||a===".")&&s){let u=aa(l.search);if(s.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&u){let c=new URLSearchParams(l.search),f=c.getAll("index");c.delete("index"),f.filter(p=>p).forEach(p=>c.append("index",p));let m=c.toString();l.search=m?`?${m}`:""}}return r!=="/"&&(l.pathname=sl({basename:r,pathname:l.pathname})),he(l)}function Ka(e,t,r){if(!r||!Dl(r))return{path:t};if(r.formMethod&&!jr(r.formMethod))return{path:t,error:te(405,{method:r.formMethod})};let a=()=>({path:t,error:te(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=no(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!de(o))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[p,h])=>`${m}${p}=${h}
1
+ import{r as d,R as ce,b as Ii,c as Hi}from"./index-ubmd7JRV.js";var Ct={},Ia;function ji(){if(Ia)return Ct;Ia=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.parse=i,Ct.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,o=(()=>{const m=function(){};return m.prototype=Object.create(null),m})();function i(m,p){const h=new o,g=m.length;if(g<2)return h;const y=p?.decode||c;let w=0;do{const R=m.indexOf("=",w);if(R===-1)break;const C=m.indexOf(";",w),x=C===-1?g:C;if(R>x){w=m.lastIndexOf(";",R-1)+1;continue}const P=s(m,w,R),D=l(m,R,P),E=m.slice(P,D);if(h[E]===void 0){let F=s(m,R+1,x),T=l(m,x,F);const M=y(m.slice(F,T));h[E]=M}w=x+1}while(w<g);return h}function s(m,p,h){do{const g=m.charCodeAt(p);if(g!==32&&g!==9)return p}while(++p<h);return h}function l(m,p,h){for(;p>h;){const g=m.charCodeAt(--p);if(g!==32&&g!==9)return p+1}return h}function u(m,p,h){const g=h?.encode||encodeURIComponent;if(!e.test(m))throw new TypeError(`argument name is invalid: ${m}`);const y=g(p);if(!t.test(y))throw new TypeError(`argument val is invalid: ${p}`);let w=m+"="+y;if(!h)return w;if(h.maxAge!==void 0){if(!Number.isInteger(h.maxAge))throw new TypeError(`option maxAge is invalid: ${h.maxAge}`);w+="; Max-Age="+h.maxAge}if(h.domain){if(!r.test(h.domain))throw new TypeError(`option domain is invalid: ${h.domain}`);w+="; Domain="+h.domain}if(h.path){if(!a.test(h.path))throw new TypeError(`option path is invalid: ${h.path}`);w+="; Path="+h.path}if(h.expires){if(!f(h.expires)||!Number.isFinite(h.expires.valueOf()))throw new TypeError(`option expires is invalid: ${h.expires}`);w+="; Expires="+h.expires.toUTCString()}if(h.httpOnly&&(w+="; HttpOnly"),h.secure&&(w+="; Secure"),h.partitioned&&(w+="; Partitioned"),h.priority)switch(typeof h.priority=="string"?h.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${h.priority}`)}if(h.sameSite)switch(typeof h.sameSite=="string"?h.sameSite.toLowerCase():h.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${h.sameSite}`)}return w}function c(m){if(m.indexOf("%")===-1)return m;try{return decodeURIComponent(m)}catch{return m}}function f(m){return n.call(m)==="[object Date]"}return Ct}var Ha=ji(),st={exports:{}},ja;function Ui(){if(ja)return st.exports;ja=1;var e={decodeValues:!0,map:!1,silent:!1};function t(l){return typeof l!="string"||l in{}}function r(){return Object.create(null)}function a(l){return typeof l=="string"&&!!l.trim()}function n(l,u){var c=l.split(";").filter(a),f=c.shift(),m=o(f),p=m.name,h=m.value;if(u=u?Object.assign({},e,u):e,t(p))return null;try{h=u.decodeValues?decodeURIComponent(h):h}catch(y){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",y)}var g=r();return g.name=p,g.value=h,c.forEach(function(y){var w=y.split("="),R=w.shift().trimLeft().toLowerCase();if(!t(R)){var C=w.join("=");if(R==="expires")g.expires=new Date(C);else if(R==="max-age"){var x=parseInt(C,10);Number.isNaN(x)||(g.maxAge=x)}else R==="secure"?g.secure=!0:R==="httponly"?g.httpOnly=!0:R==="samesite"?g.sameSite=C:R==="partitioned"?g.partitioned=!0:R&&(g[R]=C)}}),g}function o(l){var u="",c="",f=l.split("=");return f.length>1?(u=f.shift(),c=f.join("=")):c=l,{name:u,value:c}}function i(l,u){if(u=u?Object.assign({},e,u):e,!l)return u.map?r():[];if(l.headers)if(typeof l.headers.getSetCookie=="function")l=l.headers.getSetCookie();else if(l.headers["set-cookie"])l=l.headers["set-cookie"];else{var c=l.headers[Object.keys(l.headers).find(function(m){return m.toLowerCase()==="set-cookie"})];!c&&l.headers.cookie&&!u.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),l=c}if(Array.isArray(l)||(l=[l]),u.map){var f=r();return l.filter(a).reduce(function(m,p){var h=n(p,u);return h&&!t(h.name)&&(m[h.name]=h),m},f)}else return l.filter(a).map(function(m){return n(m,u)}).filter(Boolean)}function s(l){if(Array.isArray(l))return l;if(typeof l!="string")return[];var u=[],c=0,f,m,p,h,g;function y(){for(;c<l.length&&/\s/.test(l.charAt(c));)c+=1;return c<l.length}function w(){return m=l.charAt(c),m!=="="&&m!==";"&&m!==","}for(;c<l.length;){for(f=c,g=!1;y();)if(m=l.charAt(c),m===","){for(p=c,c+=1,y(),h=c;c<l.length&&w();)c+=1;c<l.length&&l.charAt(c)==="="?(g=!0,c=h,u.push(l.substring(f,p)),f=c):c=p+1}else c+=1;(!g||c>=l.length)&&u.push(l.substring(f,l.length))}return u}return st.exports=i,st.exports.parse=i,st.exports.parseString=n,st.exports.splitCookiesString=s,st.exports}var zi=Ui();var Pn=e=>{throw TypeError(e)},Bi=(e,t,r)=>t.has(e)||Pn("Cannot "+r),xr=(e,t,r)=>(Bi(e,t,"read from private field"),r?r.call(e):t.get(e)),Wi=(e,t,r)=>t.has(e)?Pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Vi=(e=>(e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE",e))(Vi||{}),Ua="popstate";function Dn(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((p,h)=>c(p,typeof p=="string"?null:p.state,h===0?"default":void 0));let o=l(r??n.length-1),i="POP",s=null;function l(p){return Math.min(Math.max(p,0),n.length-1)}function u(){return n[o]}function c(p,h=null,g){let y=$e(n?u().pathname:"/",p,h,g);return X(y.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(p)}`),y}function f(p){return typeof p=="string"?p:he(p)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:f,createURL(p){return new URL(f(p),"http://localhost")},encodeLocation(p){let h=typeof p=="string"?Pe(p):p;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(p,h){i="PUSH";let g=c(p,h);o+=1,n.splice(o,n.length,g),a&&s&&s({action:i,location:g,delta:1})},replace(p,h){i="REPLACE";let g=c(p,h);n[o]=g,a&&s&&s({action:i,location:g,delta:0})},go(p){i="POP";let h=l(o+p),g=n[h];o=h,s&&s({action:i,location:g,delta:p})},listen(p){return s=p,()=>{s=null}}}}function qr(e={}){function t(a,n){let{pathname:o,search:i,hash:s}=a.location;return $e("",{pathname:o,search:i,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:he(n)}return _n(t,r,null,e)}function Ln(e={}){function t(n,o){let{pathname:i="/",search:s="",hash:l=""}=Pe(n.location.hash.substring(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),$e("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){let i=n.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let l=n.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof o=="string"?o:he(o))}function a(n,o){X(n.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return _n(t,r,a,e)}function A(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Yi(){return Math.random().toString(36).substring(2,10)}function za(e,t){return{usr:e.state,key:e.key,idx:t}}function $e(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Pe(t):t,state:r,key:t&&t.key||a||Yi()}}function he({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 Pe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function _n(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,s="POP",l=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function f(){s="POP";let y=c(),w=y==null?null:y-u;u=y,l&&l({action:s,location:g.location,delta:w})}function m(y,w){s="PUSH";let R=$e(g.location,y,w);r&&r(R,y),u=c()+1;let C=za(R,u),x=g.createHref(R);try{i.pushState(C,"",x)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;n.location.assign(x)}o&&l&&l({action:s,location:g.location,delta:1})}function p(y,w){s="REPLACE";let R=$e(g.location,y,w);r&&r(R,y),u=c();let C=za(R,u),x=g.createHref(R);i.replaceState(C,"",x),o&&l&&l({action:s,location:g.location,delta:0})}function h(y){return Tn(y)}let g={get action(){return s},get location(){return e(n,i)},listen(y){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(Ua,f),l=y,()=>{n.removeEventListener(Ua,f),l=null}},createHref(y){return t(n,y)},createURL:h,encodeLocation(y){let w=h(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:p,go(y){return i.go(y)}};return g}function Tn(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),A(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:he(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function Ec(e){return{defaultValue:e}}var Lt,Ae=class{constructor(e){if(Wi(this,Lt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(xr(this,Lt).has(e))return xr(this,Lt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){xr(this,Lt).set(e,t)}};Lt=new WeakMap;var Ji=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ki(e){return Ji.has(e)}var Xi=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Gi(e){return Xi.has(e)}function Qi(e){return e.index===!0}function Ve(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let s=[...r,String(i)],l=typeof o.id=="string"?o.id:s.join("-");if(A(o.index!==!0||!o.children,"Cannot specify children on an index route"),A(n||!a[l],`Found a route id collision on id "${l}". Route id's must be globally unique within Data Router usages`),Qi(o)){let u={...o,id:l};return a[l]=Ba(u,t(u)),u}else{let u={...o,id:l,children:void 0};return a[l]=Ba(u,t(u)),o.children&&(u.children=Ve(o.children,t,s,a,n)),u}})}function Ba(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function ge(e,t,r="/"){return Jt(e,t,r,!1)}function Jt(e,t,r,a){let n=typeof t=="string"?Pe(t):t,o=ne(n.pathname||"/",r);if(o==null)return null;let i=Fn(e);qi(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let u=Nn(o);s=ll(i[l],u,a)}return s}function Mn(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Fn(e,t=[],r=[],a="",n=!1){let o=(i,s,l=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&l)return;A(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let f=Me([a,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(A(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Fn(i.children,t,m,f,l)),!(i.path==null&&!i.index)&&t.push({path:f,score:ol(f,i.index),routesMeta:m})};return e.forEach((i,s)=>{if(i.path===""||!i.path?.includes("?"))o(i,s);else for(let l of kn(i.path))o(i,s,!0,l)}),t}function kn(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=kn(a.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),n&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function qi(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:il(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Zi=/^:[\w-]+$/,el=3,tl=2,rl=1,al=10,nl=-2,Wa=e=>e==="*";function ol(e,t){let r=e.split("/"),a=r.length;return r.some(Wa)&&(a+=nl),t&&(a+=tl),r.filter(n=>!Wa(n)).reduce((n,o)=>n+(Zi.test(o)?el:o===""?rl:al),a)}function il(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function ll(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let s=0;s<a.length;++s){let l=a[s],u=s===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",f=_t({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),m=l.route;if(!f&&u&&r&&!a[a.length-1].route.index&&(f=_t({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(n,f.params),i.push({params:n,pathname:Me([o,f.pathname]),pathnameBase:dl(Me([o,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(o=Me([o,f.pathnameBase]))}return i}function bc(e,t={}){let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(X(!1,`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`),r=r.replace(/\*$/,"/*"));const a=r.startsWith("/")?"/":"",n=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,l)=>{if(s===l.length-1&&i==="*")return n(t["*"]);const c=i.match(/^:([\w-]+)(\??)$/);if(c){const[,f,m]=c;let p=t[f];return A(m==="?"||p!=null,`Missing ":${f}" param`),encodeURIComponent(n(p))}return i.replace(/\?$/g,"")}).filter(i=>!!i);return a+o.join("/")}function _t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=On(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:f},m)=>{if(c==="*"){let h=s[m]||"";i=o.slice(0,o.length-h.length).replace(/(.)\/+$/,"$1")}const p=s[m];return f&&!p?u[c]=void 0:u[c]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function On(e,t=!1,r=!0){X(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(a.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Nn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return X(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ne(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function sl({basename:e,pathname:t}){return t==="/"?e:Me([e,t])}function ul(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Pe(e):e;return{pathname:r?r.startsWith("/")?r:cl(r,t):t,search:fl(a),hash:hl(n)}}function cl(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Pr(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function An(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ir(e){let t=An(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function lr(e,t,r,a=!1){let n;typeof e=="string"?n=Pe(e):(n={...e},A(!n.pathname||!n.pathname.includes("?"),Pr("?","pathname","search",n)),A(!n.pathname||!n.pathname.includes("#"),Pr("#","pathname","hash",n)),A(!n.search||!n.search.includes("#"),Pr("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,s;if(i==null)s=r;else{let f=t.length-1;if(!a&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),f-=1;n.pathname=m.join("/")}s=f>=0?t[f]:"/"}let l=ul(n,s),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var Me=e=>e.join("/").replace(/\/\/+/g,"/"),dl=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),fl=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hl=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ml=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function pl(e,t){return new ml(e,typeof t=="number"?{status:t}:t)}var sr=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},yl=(e,t)=>{let r=sr(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},vl=(e,t)=>{let r=sr(e,t);return r.headers.set("X-Remix-Replace","true"),r},pe=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function re(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function dt(e){return e.filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ue=Symbol("Uninstrumented");function $n(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let s of i)o[s]&&r[s].push(o[s])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=rt(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],s=r[`lazy.${o}`];if(typeof i=="function"&&s.length>0){let l=rt(s,i,()=>{});l&&(a.lazy=Object.assign(a.lazy||{},{[o]:l}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[Ue]??o,s=rt(r[n],i,(...l)=>Va(l[0]));s&&(s[Ue]=i,a[n]=s)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Ue]??n,i=rt(r.middleware,o,(...s)=>Va(s[0]));return i?(i[Ue]=o,i):n})),a}function gl(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[Ue]??e.navigate,n=rt(r.navigate,a,(...o)=>{let[i,s]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?he(i):".",...Ya(e,s??{})}});n&&(n[Ue]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Ue]??e.fetch,n=rt(r.fetch,a,(...o)=>{let[i,,s,l]=o;return{href:s??".",fetcherKey:i,...Ya(e,l??{})}});n&&(n[Ue]=a,e.fetch=n)}return e}function wl(e,t){let r={request:[]};t.forEach(n=>n({instrument(o){let i=Object.keys(o);for(let s of i)o[s]&&r[s].push(o[s])}}));let a=e;return r.request.length>0&&(a=rt(r.request,e,(...n)=>{let[o,i]=n;return{request:Hn(o),context:i!=null?jn(i):i}})),a}function rt(e,t,r){return e.length===0?null:async(...a)=>{let n=await In(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function In(e,t,r,a){let n=e[a],o;if(n){let i,s=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=In(e,t,r,a-1),o=await i,A(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(s,t)}catch(l){console.error("An instrumentation function threw an error:",l)}i||await s(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Va(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:Hn(t),params:{...a},unstable_pattern:n,context:jn(r)}}function Ya(e,t){return{currentUrl:he(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Hn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function jn(e){if(El(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Rl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function El(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Rl}var Un=["POST","PUT","PATCH","DELETE"],bl=new Set(Un),Sl=["GET",...Un],Cl=new Set(Sl),zn=new Set([301,302,303,307,308]),xl=new Set([307,308]),Kt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Zr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Pl=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=e=>Pl.test(e),Bn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Wn="remix-router-transitions",Vn=Symbol("ResetLoaderData");function ur(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";A(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||Bn,o=n;if(e.unstable_instrumentations){let v=e.unstable_instrumentations;o=b=>({...n(b),...$n(v.map(S=>S.route).filter(Boolean),b)})}let i={},s=Ve(e.routes,o,void 0,i),l,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c=e.dataStrategy||Fl,f={...e.future},m=null,p=new Set,h=null,g=null,y=null,w=e.hydrationData!=null,R=ge(s,e.history.location,u),C=!1,x=null,P;if(R==null&&!e.patchRoutesOnNavigation){let v=te(404,{pathname:e.history.location.pathname}),{matches:b,route:S}=ct(s);P=!0,R=b,x={[S.id]:v}}else if(R&&!e.hydrationData&&$t(R,s,e.history.location.pathname).active&&(R=null),R)if(R.some(v=>v.route.lazy))P=!1;else if(!R.some(v=>ta(v.route)))P=!0;else{let v=e.hydrationData?e.hydrationData.loaderData:null,b=e.hydrationData?e.hydrationData.errors:null;if(b){let S=R.findIndex(L=>b[L.route.id]!==void 0);P=R.slice(0,S+1).every(L=>!Ar(L.route,v,b))}else P=R.every(S=>!Ar(S.route,v,b))}else{P=!1,R=[];let v=$t(null,s,e.history.location.pathname);v.active&&v.matches&&(C=!0,R=v.matches)}let D,E={historyAction:e.history.action,location:e.history.location,matches:R,initialized:P,navigation:Kt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},F="POP",T=!1,M,N=!1,Y=new Map,G=null,B=!1,K=!1,le=new Set,J=new Map,be=0,ye=-1,De=new Map,ve=new Set,Se=new Map,Le=new Map,_e=new Set,Ke=new Map,Nt,Rt=null;function Ri(){if(m=e.history.listen(({action:v,location:b,delta:S})=>{if(Nt){Nt(),Nt=void 0;return}X(Ke.size===0||S!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let L=Oa({currentLocation:E.location,nextLocation:b,historyAction:v});if(L&&S!=null){let _=new Promise($=>{Nt=$});e.history.go(S*-1),At(L,{state:"blocked",location:b,proceed(){At(L,{state:"proceeding",proceed:void 0,reset:void 0,location:b}),_.then(()=>e.history.go(S))},reset(){let $=new Map(E.blockers);$.set(L,tt),se({blockers:$})}});return}return Xe(v,b)}),r){Hl(t,Y);let v=()=>jl(t,Y);t.addEventListener("pagehide",v),G=()=>t.removeEventListener("pagehide",v)}return E.initialized||Xe("POP",E.location,{initialHydration:!0}),D}function Ei(){m&&m(),G&&G(),p.clear(),M&&M.abort(),E.fetchers.forEach((v,b)=>br(b)),E.blockers.forEach((v,b)=>ka(b))}function bi(v){return p.add(v),()=>p.delete(v)}function se(v,b={}){v.matches&&(v.matches=v.matches.map(_=>{let $=i[_.route.id],H=_.route;return H.element!==$.element||H.errorElement!==$.errorElement||H.hydrateFallbackElement!==$.hydrateFallbackElement?{..._,route:$}:_})),E={...E,...v};let S=[],L=[];E.fetchers.forEach((_,$)=>{_.state==="idle"&&(_e.has($)?S.push($):L.push($))}),_e.forEach(_=>{!E.fetchers.has(_)&&!J.has(_)&&S.push(_)}),[...p].forEach(_=>_(E,{deletedFetchers:S,viewTransitionOpts:b.viewTransitionOpts,flushSync:b.flushSync===!0})),S.forEach(_=>br(_)),L.forEach(_=>E.fetchers.delete(_))}function it(v,b,{flushSync:S}={}){let L=E.actionData!=null&&E.navigation.formMethod!=null&&de(E.navigation.formMethod)&&E.navigation.state==="loading"&&v.state?._isRedirect!==!0,_;b.actionData?Object.keys(b.actionData).length>0?_=b.actionData:_=null:L?_=E.actionData:_=null;let $=b.loaderData?nn(E.loaderData,b.loaderData,b.matches||[],b.errors):E.loaderData,H=E.blockers;H.size>0&&(H=new Map(H),H.forEach((j,I)=>H.set(I,tt)));let O=B?!1:Aa(v,b.matches||E.matches),U=T===!0||E.navigation.formMethod!=null&&de(E.navigation.formMethod)&&v.state?._isRedirect!==!0;l&&(s=l,l=void 0),B||F==="POP"||(F==="PUSH"?e.history.push(v,v.state):F==="REPLACE"&&e.history.replace(v,v.state));let z;if(F==="POP"){let j=Y.get(E.location.pathname);j&&j.has(v.pathname)?z={currentLocation:E.location,nextLocation:v}:Y.has(v.pathname)&&(z={currentLocation:v,nextLocation:E.location})}else if(N){let j=Y.get(E.location.pathname);j?j.add(v.pathname):(j=new Set([v.pathname]),Y.set(E.location.pathname,j)),z={currentLocation:E.location,nextLocation:v}}se({...b,actionData:_,loaderData:$,historyAction:F,location:v,initialized:!0,navigation:Kt,revalidation:"idle",restoreScrollPosition:O,preventScrollReset:U,blockers:H},{viewTransitionOpts:z,flushSync:S===!0}),F="POP",T=!1,N=!1,B=!1,K=!1,Rt?.resolve(),Rt=null}async function Pa(v,b){if(typeof v=="number"){e.history.go(v);return}let S=Nr(E.location,E.matches,u,v,b?.fromRouteId,b?.relative),{path:L,submission:_,error:$}=Ka(!1,S,b),H=E.location,O=$e(E.location,L,b&&b.state);O={...O,...e.history.encodeLocation(O)};let U=b&&b.replace!=null?b.replace:void 0,z="PUSH";U===!0?z="REPLACE":U===!1||_!=null&&de(_.formMethod)&&_.formAction===E.location.pathname+E.location.search&&(z="REPLACE");let j=b&&"preventScrollReset"in b?b.preventScrollReset===!0:void 0,I=(b&&b.flushSync)===!0,W=Oa({currentLocation:H,nextLocation:O,historyAction:z});if(W){At(W,{state:"blocked",location:O,proceed(){At(W,{state:"proceeding",proceed:void 0,reset:void 0,location:O}),Pa(v,b)},reset(){let q=new Map(E.blockers);q.set(W,tt),se({blockers:q})}});return}await Xe(z,O,{submission:_,pendingError:$,preventScrollReset:j,replace:b&&b.replace,enableViewTransition:b&&b.viewTransition,flushSync:I})}function Si(){Rt||(Rt=Ul()),Er(),se({revalidation:"loading"});let v=Rt.promise;return E.navigation.state==="submitting"?v:E.navigation.state==="idle"?(Xe(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),v):(Xe(F||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:N===!0}),v)}async function Xe(v,b,S){M&&M.abort(),M=null,F=v,B=(S&&S.startUninterruptedRevalidation)===!0,Oi(E.location,E.matches),T=(S&&S.preventScrollReset)===!0,N=(S&&S.enableViewTransition)===!0;let L=l||s,_=S&&S.overrideNavigation,$=S?.initialHydration&&E.matches&&E.matches.length>0&&!C?E.matches:ge(L,b,u),H=(S&&S.flushSync)===!0;if($&&E.initialized&&!K&&Ol(E.location,b)&&!(S&&S.submission&&de(S.submission.formMethod))){it(b,{matches:$},{flushSync:H});return}let O=$t($,L,b.pathname);if(O.active&&O.matches&&($=O.matches),!$){let{error:me,notFoundMatches:Z,route:Q}=Sr(b.pathname);it(b,{matches:Z,loaderData:{},errors:{[Q.id]:me}},{flushSync:H});return}M=new AbortController;let U=ut(e.history,b,M.signal,S&&S.submission),z=e.getContext?await e.getContext():new Ae,j;if(S&&S.pendingError)j=[xe($).route.id,{type:"error",error:S.pendingError}];else if(S&&S.submission&&de(S.submission.formMethod)){let me=await Ci(U,b,S.submission,$,z,O.active,S&&S.initialHydration===!0,{replace:S.replace,flushSync:H});if(me.shortCircuited)return;if(me.pendingActionResult){let[Z,Q]=me.pendingActionResult;if(ie(Q)&&re(Q.error)&&Q.error.status===404){M=null,it(b,{matches:me.matches,loaderData:{},errors:{[Z]:Q.error}});return}}$=me.matches||$,j=me.pendingActionResult,_=Dr(b,S.submission),H=!1,O.active=!1,U=ut(e.history,U.url,U.signal)}let{shortCircuited:I,matches:W,loaderData:q,errors:oe}=await xi(U,b,$,z,O.active,_,S&&S.submission,S&&S.fetcherSubmission,S&&S.replace,S&&S.initialHydration===!0,H,j);I||(M=null,it(b,{matches:W||$,...on(j),loaderData:q,errors:oe}))}async function Ci(v,b,S,L,_,$,H,O={}){Er();let U=$l(b,S);if(se({navigation:U},{flushSync:O.flushSync===!0}),$){let I=await It(L,b.pathname,v.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){if(I.partialMatches.length===0){let{matches:q,route:oe}=ct(s);return{matches:q,pendingActionResult:[oe.id,{type:"error",error:I.error}]}}let W=xe(I.partialMatches).route.id;return{matches:I.partialMatches,pendingActionResult:[W,{type:"error",error:I.error}]}}else if(I.matches)L=I.matches;else{let{notFoundMatches:W,error:q,route:oe}=Sr(b.pathname);return{matches:W,pendingActionResult:[oe.id,{type:"error",error:q}]}}}let z,j=ft(L,b);if(!j.route.action&&!j.route.lazy)z={type:"error",error:te(405,{method:v.method,pathname:b.pathname,routeId:j.route.id})};else{let I=Be(o,i,v,L,j,H?[]:a,_),W=await Et(v,I,_,null);if(z=W[j.route.id],!z){for(let q of L)if(W[q.route.id]){z=W[q.route.id];break}}if(v.signal.aborted)return{shortCircuited:!0}}if(ze(z)){let I;return O&&O.replace!=null?I=O.replace:I=tn(z.response.headers.get("Location"),new URL(v.url),u)===E.location.pathname+E.location.search,await Ge(v,z,!0,{submission:S,replace:I}),{shortCircuited:!0}}if(ie(z)){let I=xe(L,j.route.id);return(O&&O.replace)!==!0&&(F="PUSH"),{matches:L,pendingActionResult:[I.route.id,z,j.route.id]}}return{matches:L,pendingActionResult:[j.route.id,z]}}async function xi(v,b,S,L,_,$,H,O,U,z,j,I){let W=$||Dr(b,H),q=H||O||ln(W),oe=!B&&!z;if(_){if(oe){let ue=Da(I);se({navigation:W,...ue!==void 0?{actionData:ue}:{}},{flushSync:j})}let V=await It(S,b.pathname,v.signal);if(V.type==="aborted")return{shortCircuited:!0};if(V.type==="error"){if(V.partialMatches.length===0){let{matches:lt,route:Ze}=ct(s);return{matches:lt,loaderData:{},errors:{[Ze.id]:V.error}}}let ue=xe(V.partialMatches).route.id;return{matches:V.partialMatches,loaderData:{},errors:{[ue]:V.error}}}else if(V.matches)S=V.matches;else{let{error:ue,notFoundMatches:lt,route:Ze}=Sr(b.pathname);return{matches:lt,loaderData:{},errors:{[Ze.id]:ue}}}}let me=l||s,{dsMatches:Z,revalidatingFetchers:Q}=Xa(v,L,o,i,e.history,E,S,q,b,z?[]:a,z===!0,K,le,_e,Se,ve,me,u,e.patchRoutesOnNavigation!=null,I);if(ye=++be,!e.dataStrategy&&!Z.some(V=>V.shouldLoad)&&!Z.some(V=>V.route.middleware&&V.route.middleware.length>0)&&Q.length===0){let V=Ma();return it(b,{matches:S,loaderData:{},errors:I&&ie(I[1])?{[I[0]]:I[1].error}:null,...on(I),...V?{fetchers:new Map(E.fetchers)}:{}},{flushSync:j}),{shortCircuited:!0}}if(oe){let V={};if(!_){V.navigation=W;let ue=Da(I);ue!==void 0&&(V.actionData=ue)}Q.length>0&&(V.fetchers=Pi(Q)),se(V,{flushSync:j})}Q.forEach(V=>{Oe(V.key),V.controller&&J.set(V.key,V.controller)});let Qe=()=>Q.forEach(V=>Oe(V.key));M&&M.signal.addEventListener("abort",Qe);let{loaderResults:bt,fetcherResults:je}=await La(Z,Q,v,L);if(v.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Qe),Q.forEach(V=>J.delete(V.key));let Te=zt(bt);if(Te)return await Ge(v,Te.result,!0,{replace:U}),{shortCircuited:!0};if(Te=zt(je),Te)return ve.add(Te.key),await Ge(v,Te.result,!0,{replace:U}),{shortCircuited:!0};let{loaderData:Cr,errors:St}=an(E,S,bt,I,Q,je);z&&E.errors&&(St={...E.errors,...St});let qe=Ma(),Ht=Fa(ye),jt=qe||Ht||Q.length>0;return{matches:S,loaderData:Cr,errors:St,...jt?{fetchers:new Map(E.fetchers)}:{}}}function Da(v){if(v&&!ie(v[1]))return{[v[0]]:v[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Pi(v){return v.forEach(b=>{let S=E.fetchers.get(b.key),L=xt(void 0,S?S.data:void 0);E.fetchers.set(b.key,L)}),new Map(E.fetchers)}async function Di(v,b,S,L){Oe(v);let _=(L&&L.flushSync)===!0,$=l||s,H=Nr(E.location,E.matches,u,S,b,L?.relative),O=ge($,H,u),U=$t(O,$,H);if(U.active&&U.matches&&(O=U.matches),!O){ke(v,b,te(404,{pathname:H}),{flushSync:_});return}let{path:z,submission:j,error:I}=Ka(!0,H,L);if(I){ke(v,b,I,{flushSync:_});return}let W=e.getContext?await e.getContext():new Ae,q=(L&&L.preventScrollReset)===!0;if(j&&de(j.formMethod)){await Li(v,b,z,O,W,U.active,_,q,j);return}Se.set(v,{routeId:b,path:z}),await _i(v,b,z,O,W,U.active,_,q,j)}async function Li(v,b,S,L,_,$,H,O,U){Er(),Se.delete(v);let z=E.fetchers.get(v);Fe(v,Il(U,z),{flushSync:H});let j=new AbortController,I=ut(e.history,S,j.signal,U);if($){let ae=await It(L,new URL(I.url).pathname,I.signal,v);if(ae.type==="aborted")return;if(ae.type==="error"){ke(v,b,ae.error,{flushSync:H});return}else if(ae.matches)L=ae.matches;else{ke(v,b,te(404,{pathname:S}),{flushSync:H});return}}let W=ft(L,S);if(!W.route.action&&!W.route.lazy){let ae=te(405,{method:U.formMethod,pathname:S,routeId:b});ke(v,b,ae,{flushSync:H});return}J.set(v,j);let q=be,oe=Be(o,i,I,L,W,a,_),Z=(await Et(I,oe,_,v))[W.route.id];if(I.signal.aborted){J.get(v)===j&&J.delete(v);return}if(_e.has(v)){if(ze(Z)||ie(Z)){Fe(v,Ne(void 0));return}}else{if(ze(Z))if(J.delete(v),ye>q){Fe(v,Ne(void 0));return}else return ve.add(v),Fe(v,xt(U)),Ge(I,Z,!1,{fetcherSubmission:U,preventScrollReset:O});if(ie(Z)){ke(v,b,Z.error);return}}let Q=E.navigation.location||E.location,Qe=ut(e.history,Q,j.signal),bt=l||s,je=E.navigation.state!=="idle"?ge(bt,E.navigation.location,u):E.matches;A(je,"Didn't find any matches after fetcher action");let Te=++be;De.set(v,Te);let Cr=xt(U,Z.data);E.fetchers.set(v,Cr);let{dsMatches:St,revalidatingFetchers:qe}=Xa(Qe,_,o,i,e.history,E,je,U,Q,a,!1,K,le,_e,Se,ve,bt,u,e.patchRoutesOnNavigation!=null,[W.route.id,Z]);qe.filter(ae=>ae.key!==v).forEach(ae=>{let Ut=ae.key,$a=E.fetchers.get(Ut),$i=xt(void 0,$a?$a.data:void 0);E.fetchers.set(Ut,$i),Oe(Ut),ae.controller&&J.set(Ut,ae.controller)}),se({fetchers:new Map(E.fetchers)});let Ht=()=>qe.forEach(ae=>Oe(ae.key));j.signal.addEventListener("abort",Ht);let{loaderResults:jt,fetcherResults:V}=await La(St,qe,Qe,_);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",Ht),De.delete(v),J.delete(v),qe.forEach(ae=>J.delete(ae.key)),E.fetchers.has(v)){let ae=Ne(Z.data);E.fetchers.set(v,ae)}let ue=zt(jt);if(ue)return Ge(Qe,ue.result,!1,{preventScrollReset:O});if(ue=zt(V),ue)return ve.add(ue.key),Ge(Qe,ue.result,!1,{preventScrollReset:O});let{loaderData:lt,errors:Ze}=an(E,je,jt,void 0,qe,V);Fa(Te),E.navigation.state==="loading"&&Te>ye?(A(F,"Expected pending action"),M&&M.abort(),it(E.navigation.location,{matches:je,loaderData:lt,errors:Ze,fetchers:new Map(E.fetchers)})):(se({errors:Ze,loaderData:nn(E.loaderData,lt,je,Ze),fetchers:new Map(E.fetchers)}),K=!1)}async function _i(v,b,S,L,_,$,H,O,U){let z=E.fetchers.get(v);Fe(v,xt(U,z?z.data:void 0),{flushSync:H});let j=new AbortController,I=ut(e.history,S,j.signal);if($){let Q=await It(L,new URL(I.url).pathname,I.signal,v);if(Q.type==="aborted")return;if(Q.type==="error"){ke(v,b,Q.error,{flushSync:H});return}else if(Q.matches)L=Q.matches;else{ke(v,b,te(404,{pathname:S}),{flushSync:H});return}}let W=ft(L,S);J.set(v,j);let q=be,oe=Be(o,i,I,L,W,a,_),Z=(await Et(I,oe,_,v))[W.route.id];if(J.get(v)===j&&J.delete(v),!I.signal.aborted){if(_e.has(v)){Fe(v,Ne(void 0));return}if(ze(Z))if(ye>q){Fe(v,Ne(void 0));return}else{ve.add(v),await Ge(I,Z,!1,{preventScrollReset:O});return}if(ie(Z)){ke(v,b,Z.error);return}Fe(v,Ne(Z.data))}}async function Ge(v,b,S,{submission:L,fetcherSubmission:_,preventScrollReset:$,replace:H}={}){b.response.headers.has("X-Remix-Revalidate")&&(K=!0);let O=b.response.headers.get("Location");A(O,"Expected a Location header on the redirect Response"),O=tn(O,new URL(v.url),u);let U=$e(E.location,O,{_isRedirect:!0});if(r){let oe=!1;if(b.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(ea(O)){const me=Tn(O,!0);oe=me.origin!==t.location.origin||ne(me.pathname,u)==null}if(oe){H?t.location.replace(O):t.location.assign(O);return}}M=null;let z=H===!0||b.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:j,formAction:I,formEncType:W}=E.navigation;!L&&!_&&j&&I&&W&&(L=ln(E.navigation));let q=L||_;if(xl.has(b.response.status)&&q&&de(q.formMethod))await Xe(z,U,{submission:{...q,formAction:O},preventScrollReset:$||T,enableViewTransition:S?N:void 0});else{let oe=Dr(U,L);await Xe(z,U,{overrideNavigation:oe,fetcherSubmission:_,preventScrollReset:$||T,enableViewTransition:S?N:void 0})}}async function Et(v,b,S,L){let _,$={};try{_=await Zn(c,v,b,L,S,!1)}catch(H){return b.filter(O=>O.shouldLoad).forEach(O=>{$[O.route.id]={type:"error",error:H}}),$}if(v.signal.aborted)return $;for(let[H,O]of Object.entries(_))if(io(O)){let U=O.result;$[H]={type:"redirect",response:ro(U,v,H,b,u)}}else $[H]=await to(O);return $}async function La(v,b,S,L){let _=Et(S,v,L,null),$=Promise.all(b.map(async U=>{if(U.matches&&U.match&&U.request&&U.controller){let j=(await Et(U.request,U.matches,L,U.key))[U.match.route.id];return{[U.key]:j}}else return Promise.resolve({[U.key]:{type:"error",error:te(404,{pathname:U.path})}})})),H=await _,O=(await $).reduce((U,z)=>Object.assign(U,z),{});return{loaderResults:H,fetcherResults:O}}function Er(){K=!0,Se.forEach((v,b)=>{J.has(b)&&le.add(b),Oe(b)})}function Fe(v,b,S={}){E.fetchers.set(v,b),se({fetchers:new Map(E.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function ke(v,b,S,L={}){let _=xe(E.matches,b);br(v),se({errors:{[_.route.id]:S},fetchers:new Map(E.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function _a(v){return Le.set(v,(Le.get(v)||0)+1),_e.has(v)&&_e.delete(v),E.fetchers.get(v)||Zr}function Ti(v,b){Oe(v,b?.reason),Fe(v,Ne(null))}function br(v){let b=E.fetchers.get(v);J.has(v)&&!(b&&b.state==="loading"&&De.has(v))&&Oe(v),Se.delete(v),De.delete(v),ve.delete(v),_e.delete(v),le.delete(v),E.fetchers.delete(v)}function Mi(v){let b=(Le.get(v)||0)-1;b<=0?(Le.delete(v),_e.add(v)):Le.set(v,b),se({fetchers:new Map(E.fetchers)})}function Oe(v,b){let S=J.get(v);S&&(S.abort(b),J.delete(v))}function Ta(v){for(let b of v){let S=_a(b),L=Ne(S.data);E.fetchers.set(b,L)}}function Ma(){let v=[],b=!1;for(let S of ve){let L=E.fetchers.get(S);A(L,`Expected fetcher: ${S}`),L.state==="loading"&&(ve.delete(S),v.push(S),b=!0)}return Ta(v),b}function Fa(v){let b=[];for(let[S,L]of De)if(L<v){let _=E.fetchers.get(S);A(_,`Expected fetcher: ${S}`),_.state==="loading"&&(Oe(S),De.delete(S),b.push(S))}return Ta(b),b.length>0}function Fi(v,b){let S=E.blockers.get(v)||tt;return Ke.get(v)!==b&&Ke.set(v,b),S}function ka(v){E.blockers.delete(v),Ke.delete(v)}function At(v,b){let S=E.blockers.get(v)||tt;A(S.state==="unblocked"&&b.state==="blocked"||S.state==="blocked"&&b.state==="blocked"||S.state==="blocked"&&b.state==="proceeding"||S.state==="blocked"&&b.state==="unblocked"||S.state==="proceeding"&&b.state==="unblocked",`Invalid blocker state transition: ${S.state} -> ${b.state}`);let L=new Map(E.blockers);L.set(v,b),se({blockers:L})}function Oa({currentLocation:v,nextLocation:b,historyAction:S}){if(Ke.size===0)return;Ke.size>1&&X(!1,"A router only supports one blocker at a time");let L=Array.from(Ke.entries()),[_,$]=L[L.length-1],H=E.blockers.get(_);if(!(H&&H.state==="proceeding")&&$({currentLocation:v,nextLocation:b,historyAction:S}))return _}function Sr(v){let b=te(404,{pathname:v}),S=l||s,{matches:L,route:_}=ct(S);return{notFoundMatches:L,route:_,error:b}}function ki(v,b,S){if(h=v,y=b,g=S||null,!w&&E.navigation===Kt){w=!0;let L=Aa(E.location,E.matches);L!=null&&se({restoreScrollPosition:L})}return()=>{h=null,y=null,g=null}}function Na(v,b){return g&&g(v,b.map(L=>Mn(L,E.loaderData)))||v.key}function Oi(v,b){if(h&&y){let S=Na(v,b);h[S]=y()}}function Aa(v,b){if(h){let S=Na(v,b),L=h[S];if(typeof L=="number")return L}return null}function $t(v,b,S){if(e.patchRoutesOnNavigation)if(v){if(Object.keys(v[0].params).length>0)return{active:!0,matches:Jt(b,S,u,!0)}}else return{active:!0,matches:Jt(b,S,u,!0)||[]};return{active:!1,matches:null}}async function It(v,b,S,L){if(!e.patchRoutesOnNavigation)return{type:"success",matches:v};let _=v;for(;;){let $=l==null,H=l||s,O=i;try{await e.patchRoutesOnNavigation({signal:S,path:b,matches:_,fetcherKey:L,patch:(j,I)=>{S.aborted||Ga(j,I,H,O,o,!1)}})}catch(j){return{type:"error",error:j,partialMatches:_}}finally{$&&!S.aborted&&(s=[...s])}if(S.aborted)return{type:"aborted"};let U=ge(H,b,u);if(U)return{type:"success",matches:U};let z=Jt(H,b,u,!0);if(!z||_.length===z.length&&_.every((j,I)=>j.route.id===z[I].route.id))return{type:"success",matches:null};_=z}}function Ni(v){i={},l=Ve(v,o,void 0,i)}function Ai(v,b,S=!1){let L=l==null;Ga(v,b,l||s,i,o,S),L&&(s=[...s],se({}))}return D={get basename(){return u},get future(){return f},get state(){return E},get routes(){return s},get window(){return t},initialize:Ri,subscribe:bi,enableScrollRestoration:ki,navigate:Pa,fetch:Di,revalidate:Si,createHref:v=>e.history.createHref(v),encodeLocation:v=>e.history.encodeLocation(v),getFetcher:_a,resetFetcher:Ti,deleteFetcher:Mi,dispose:Ei,getBlocker:Fi,deleteBlocker:ka,patchRoutes:Ai,_internalFetchControllers:J,_internalSetRoutes:Ni,_internalSetStateDoNotUseOrYouWillBreakYourApp(v){se(v)}},e.unstable_instrumentations&&(D=gl(D,e.unstable_instrumentations.map(v=>v.router).filter(Boolean))),D}function Yn(e,t){A(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},a=(t?t.basename:null)||"/",n=t?.mapRouteProperties||Bn,o=n;if(t?.unstable_instrumentations){let p=t.unstable_instrumentations;o=h=>({...n(h),...$n(p.map(g=>g.route).filter(Boolean),h)})}let i=Ve(e,o,void 0,r);async function s(p,{requestContext:h,filterMatchesToLoad:g,skipLoaderErrorBubbling:y,skipRevalidation:w,dataStrategy:R,generateMiddlewareResponse:C}={}){let x=new URL(p.url),P=p.method,D=$e("",he(x),null,"default"),E=ge(i,D,a);if(h=h??new Ae,!jr(P)&&P!=="HEAD"){let T=te(405,{method:P}),{matches:M,route:N}=ct(i),Y={basename:a,location:D,matches:M,loaderData:{},actionData:null,errors:{[N.id]:T},statusCode:T.status,loaderHeaders:{},actionHeaders:{}};return C?C(()=>Promise.resolve(Y)):Y}else if(!E){let T=te(404,{pathname:D.pathname}),{matches:M,route:N}=ct(i),Y={basename:a,location:D,matches:M,loaderData:{},actionData:null,errors:{[N.id]:T},statusCode:T.status,loaderHeaders:{},actionHeaders:{}};return C?C(()=>Promise.resolve(Y)):Y}if(C){A(h instanceof Ae,"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`");try{await Za(E,r,o);let T,M=await en({request:p,unstable_pattern:dt(E.map(N=>N.route.path)),matches:E,params:E[0].params,context:h},async()=>await C(async(Y,G={})=>{let B=await u(Y,D,E,h,R||null,y===!0,null,"filterMatchesToLoad"in G?G.filterMatchesToLoad??null:g??null,w===!0);return ee(B)?B:(T={location:D,basename:a,...B},T)}),async(N,Y)=>{if(er(N))return N;if(ee(N))try{N=new pe(N.status,N.statusText,await eo(N))}catch(G){N=G}if(We(N)&&(N=Nl(N)),T){Y in T.loaderData&&(T.loaderData[Y]=void 0);let G=Jn(i,T,N,y?Y:xe(E,Y).route.id);return C(()=>Promise.resolve(G))}else{let G=y?Y:xe(E,E.find(K=>K.route.id===Y||K.route.loader)?.route.id||Y).route.id,B={matches:E,location:D,basename:a,loaderData:{},actionData:null,errors:{[G]:N},statusCode:re(N)?N.status:500,actionHeaders:{},loaderHeaders:{}};return C(()=>Promise.resolve(B))}});return A(ee(M),"Expected a response in query()"),M}catch(T){if(ee(T))return T;throw T}}let F=await u(p,D,E,h,R||null,y===!0,null,g||null,w===!0);return ee(F)?F:{location:D,basename:a,...F}}async function l(p,{routeId:h,requestContext:g,dataStrategy:y,generateMiddlewareResponse:w}={}){let R=new URL(p.url),C=p.method,x=$e("",he(R),null,"default"),P=ge(i,x,a);if(g=g??new Ae,!jr(C)&&C!=="HEAD"&&C!=="OPTIONS")throw te(405,{method:C});if(!P)throw te(404,{pathname:x.pathname});let D=h?P.find(T=>T.route.id===h):ft(P,x);if(h&&!D)throw te(403,{pathname:x.pathname,routeId:h});if(!D)throw te(404,{pathname:x.pathname});if(w)return A(g instanceof Ae,"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"),await Za(P,r,o),await en({request:p,unstable_pattern:dt(P.map(M=>M.route.path)),matches:P,params:P[0].params,context:g},async()=>await w(async N=>{let Y=await u(N,x,P,g,y||null,!1,D,null,!1),G=F(Y);return ee(G)?G:typeof G=="string"?new Response(G):Response.json(G)}),M=>{if(We(M))return Promise.resolve(Hr(M));if(ee(M))return Promise.resolve(M);throw M});let E=await u(p,x,P,g,y||null,!1,D,null,!1);return F(E);function F(T){if(ee(T))return T;let M=T.errors?Object.values(T.errors)[0]:void 0;if(M!==void 0)throw M;if(T.actionData)return Object.values(T.actionData)[0];if(T.loaderData)return Object.values(T.loaderData)[0]}}async function u(p,h,g,y,w,R,C,x,P){A(p.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(de(p.method))return await c(p,g,C||ft(g,h),y,w,R,C!=null,x,P);let D=await f(p,g,y,w,R,C,x);return ee(D)?D:{...D,actionData:null,actionHeaders:{}}}catch(D){if(oo(D)&&ee(D.result)){if(D.type==="error")throw D.result;return D.result}if(er(D))return D;throw D}}async function c(p,h,g,y,w,R,C,x,P){let D;if(!g.route.action&&!g.route.lazy){let T=te(405,{method:p.method,pathname:new URL(p.url).pathname,routeId:g.route.id});if(C)throw T;D={type:"error",error:T}}else{let T=Be(o,r,p,h,g,[],y);D=(await m(p,T,C,y,w))[g.route.id],p.signal.aborted&&Ja(p,C)}if(ze(D))throw new Response(null,{status:D.response.status,headers:{Location:D.response.headers.get("Location")}});if(C){if(ie(D))throw D.error;return{matches:[g],loaderData:{},actionData:{[g.route.id]:D.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(P)if(ie(D)){let T=R?g:xe(h,g.route.id);return{statusCode:re(D.error)?D.error.status:D.statusCode!=null?D.statusCode:500,actionData:null,actionHeaders:{...D.headers?{[g.route.id]:D.headers}:{}},matches:h,loaderData:{},errors:{[T.route.id]:D.error},loaderHeaders:{}}}else return{actionData:{[g.route.id]:D.data},actionHeaders:D.headers?{[g.route.id]:D.headers}:{},matches:h,loaderData:{},errors:null,statusCode:D.statusCode||200,loaderHeaders:{}};let E=new Request(p.url,{headers:p.headers,redirect:p.redirect,signal:p.signal});if(ie(D)){let T=R?g:xe(h,g.route.id);return{...await f(E,h,y,w,R,null,x,[T.route.id,D]),statusCode:re(D.error)?D.error.status:D.statusCode!=null?D.statusCode:500,actionData:null,actionHeaders:{...D.headers?{[g.route.id]:D.headers}:{}}}}return{...await f(E,h,y,w,R,null,x),actionData:{[g.route.id]:D.data},...D.statusCode?{statusCode:D.statusCode}:{},actionHeaders:D.headers?{[g.route.id]:D.headers}:{}}}async function f(p,h,g,y,w,R,C,x){let P=R!=null;if(P&&!R?.route.loader&&!R?.route.lazy)throw te(400,{method:p.method,pathname:new URL(p.url).pathname,routeId:R?.route.id});let D;if(R)D=Be(o,r,p,h,R,[],g);else{let T=x&&ie(x[1])?h.findIndex(N=>N.route.id===x[0])-1:void 0,M=dt(h.map(N=>N.route.path));D=h.map((N,Y)=>T!=null&&Y>T?Tt(o,r,p,M,N,[],g,!1):Tt(o,r,p,M,N,[],g,(N.route.loader||N.route.lazy)!=null&&(!C||C(N))))}if(!y&&!D.some(T=>T.shouldLoad))return{matches:h,loaderData:{},errors:x&&ie(x[1])?{[x[0]]:x[1].error}:null,statusCode:200,loaderHeaders:{}};let E=await m(p,D,P,g,y);return p.signal.aborted&&Ja(p,P),{...ao(h,E,x,!0,w),matches:h}}async function m(p,h,g,y,w){let R=await Zn(w||$r,p,h,null,y,!0),C={};return await Promise.all(h.map(async x=>{if(!(x.route.id in R))return;let P=R[x.route.id];if(io(P)){let D=P.result;throw ro(D,p,x.route.id,h,a)}if(g){if(ee(P.result))throw P;if(We(P.result))throw Hr(P.result)}C[x.route.id]=await to(P)})),C}return{dataRoutes:i,query:s,queryRoute:l}}function Jn(e,t,r,a){let n=a||t._deepestRenderedBoundaryId||e[0].id;return{...t,statusCode:re(r)?r.status:500,errors:{[n]:r}}}function Ja(e,t){if(e.signal.reason!==void 0)throw e.signal.reason;let r=t?"queryRoute":"query";throw new Error(`${r}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function Dl(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Nr(e,t,r,a,n,o){let i,s;if(n){i=[];for(let u of t)if(i.push(u),u.route.id===n){s=u;break}}else i=t,s=t[t.length-1];let l=lr(a||".",ir(i),ne(e.pathname,r)||e.pathname,o==="path");if(a==null&&(l.search=e.search,l.hash=e.hash),(a==null||a===""||a===".")&&s){let u=aa(l.search);if(s.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&u){let c=new URLSearchParams(l.search),f=c.getAll("index");c.delete("index"),f.filter(p=>p).forEach(p=>c.append("index",p));let m=c.toString();l.search=m?`?${m}`:""}}return r!=="/"&&(l.pathname=sl({basename:r,pathname:l.pathname})),he(l)}function Ka(e,t,r){if(!r||!Dl(r))return{path:t};if(r.formMethod&&!jr(r.formMethod))return{path:t,error:te(405,{method:r.formMethod})};let a=()=>({path:t,error:te(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=no(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!de(o))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[p,h])=>`${m}${p}=${h}
2
2
  `,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!de(o))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}A(typeof FormData=="function","FormData is not available in this environment");let s,l;if(r.formData)s=Ir(r.formData),l=r.formData;else if(r.body instanceof FormData)s=Ir(r.body),l=r.body;else if(r.body instanceof URLSearchParams)s=r.body,l=rn(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=rn(s)}catch{return a()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(de(u.formMethod))return{path:t,submission:u};let c=Pe(t);return e&&c.search&&aa(c.search)&&s.append("index",""),c.search=`?${s}`,{path:he(c),submission:u}}function Xa(e,t,r,a,n,o,i,s,l,u,c,f,m,p,h,g,y,w,R,C){let x=C?ie(C[1])?C[1].error:C[1].data:void 0,P=n.createURL(o.location),D=n.createURL(l),E;if(c&&o.errors){let B=Object.keys(o.errors)[0];E=i.findIndex(K=>K.route.id===B)}else if(C&&ie(C[1])){let B=C[0];E=i.findIndex(K=>K.route.id===B)-1}let F=C?C[1].statusCode:void 0,T=F&&F>=400,M={currentUrl:P,currentParams:o.matches[0]?.params||{},nextUrl:D,nextParams:i[0].params,...s,actionResult:x,actionStatus:F},N=dt(i.map(B=>B.route.path)),Y=i.map((B,K)=>{let{route:le}=B,J=null;if(E!=null&&K>E?J=!1:le.lazy?J=!0:ta(le)?c?J=Ar(le,o.loaderData,o.errors):Ll(o.loaderData,o.matches[K],B)&&(J=!0):J=!1,J!==null)return Tt(r,a,e,N,B,u,t,J);let be=T?!1:f||P.pathname+P.search===D.pathname+D.search||P.search!==D.search||_l(o.matches[K],B),ye={...M,defaultShouldRevalidate:be},De=Zt(B,ye);return Tt(r,a,e,N,B,u,t,De,ye)}),G=[];return h.forEach((B,K)=>{if(c||!i.some(Le=>Le.route.id===B.routeId)||p.has(K))return;let le=o.fetchers.get(K),J=le&&le.state!=="idle"&&le.data===void 0,be=ge(y,B.path,w);if(!be){if(R&&J)return;G.push({key:K,routeId:B.routeId,path:B.path,matches:null,match:null,request:null,controller:null});return}if(g.has(K))return;let ye=ft(be,B.path),De=new AbortController,ve=ut(n,B.path,De.signal),Se=null;if(m.has(K))m.delete(K),Se=Be(r,a,ve,be,ye,u,t);else if(J)f&&(Se=Be(r,a,ve,be,ye,u,t));else{let Le={...M,defaultShouldRevalidate:T?!1:f};Zt(ye,Le)&&(Se=Be(r,a,ve,be,ye,u,t,Le))}Se&&G.push({key:K,routeId:B.routeId,path:B.path,matches:Se,match:ye,request:ve,controller:De})}),{dsMatches:Y,revalidatingFetchers:G}}function ta(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ar(e,t,r){if(e.lazy)return!0;if(!ta(e))return!1;let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;return!a&&n?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!n}function Ll(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function _l(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Zt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Ga(e,t,r,a,n,o){let i;if(e){let u=a[e];A(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let s=[],l=[];if(t.forEach(u=>{let c=i.find(f=>Kn(u,f));c?l.push({existingRoute:c,newRoute:u}):s.push(u)}),s.length>0){let u=Ve(s,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...u)}if(o&&l.length>0)for(let u=0;u<l.length;u++){let{existingRoute:c,newRoute:f}=l[u],m=c,[p]=Ve([f],n,[],{},!0);Object.assign(m,{element:p.element?p.element:m.element,errorElement:p.errorElement?p.errorElement:m.errorElement,hydrateFallbackElement:p.hydrateFallbackElement?p.hydrateFallbackElement:m.hydrateFallbackElement})}}function Kn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,a)=>t.children?.some(n=>Kn(r,n))):!1}var Qa=new WeakMap,ra=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(A(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=Qa.get(n);i||(i={},Qa.set(n,i));let s=i[e];if(s)return s;let l=(async()=>{let u=Ki(e),f=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)X(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(f)X(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await o();m!=null&&(Object.assign(n,{[e]:m}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(m=>m===void 0)&&(n.lazy=void 0))})();return i[e]=l,l},qa=new WeakMap;function Tl(e,t,r,a,n){let o=r[e.id];if(A(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=qa.get(o);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let f=(async()=>{A(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),p={};for(let h in m){let g=m[h];if(g===void 0)continue;let y=Gi(h),R=o[h]!==void 0&&h!=="hasErrorBoundary";y?X(!y,"Route property "+h+" is not a supported property to be returned from a lazy route function. This property will be ignored."):R?X(!R,`Route "${o.id}" has a static property "${h}" defined but its lazy function is also returning a value for this property. The lazy route property "${h}" will be ignored.`):p[h]=g}Object.assign(o,p),Object.assign(o,{...a(o),lazy:void 0})})();return qa.set(o,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let i=Object.keys(e.lazy),s=[],l;for(let c of i){if(n&&n.includes(c))continue;let f=ra({key:c,route:e,manifest:r,mapRouteProperties:a});f&&(s.push(f),c===t&&(l=f))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return u?.catch(()=>{}),l?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:l}}function Ml(e){return e!==void 0}function Za(e,t,r){let a=e.map(({route:n})=>{if(!(typeof n.lazy!="object"||!n.lazy.middleware))return ra({key:"middleware",route:n,manifest:t,mapRouteProperties:r})}).filter(Ml);return a.length>0?Promise.all(a):void 0}async function $r(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function Fl(e){return e.matches.some(t=>t.route.middleware)?Xn(e,()=>$r(e)):$r(e)}function en(e,t,r){return Gn(e,t,a,ee,r);function a(n){return We(n)?Hr(n):n}}function Xn(e,t){return Gn(e,t,a=>a,Al,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,s=Math.min(Math.max(i.findIndex(u=>u.route.id===n),0),Math.max(i.findIndex(u=>u.unstable_shouldCallHandler()),0)),l=xe(i,i[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:a}})}}}async function Gn(e,t,r,a,n){let{matches:o,request:i,params:s,context:l,unstable_pattern:u}=e,c=o.flatMap(m=>m.route.middleware?m.route.middleware.map(p=>[m.route.id,p]):[]);return await Qn({request:i,params:s,context:l,unstable_pattern:u},c,t,r,a,n)}async function Qn(e,t,r,a,n,o,i=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??new Error(`Request aborted: ${s.method} ${s.url}`);let l=t[i];if(!l)return await r();let[u,c]=l,f,m=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");try{return f={value:await Qn(e,t,r,a,n,o,i+1)},f.value}catch(p){return f={value:await o(p,u,f)},f.value}};try{let p=await c(e,m),h=p!=null?a(p):void 0;return n(h)?h:f?h??f.value:(f={value:await m()},f.value)}catch(p){return await o(p,u,f)}}function qn(e,t,r,a,n){let o=ra({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=Tl(a.route,de(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Tt(e,t,r,a,n,o,i,s,l=null){let u=!1,c=qn(e,t,r,n,o);return{...n,_lazyPromises:c,shouldLoad:s,unstable_shouldRevalidateArgs:l,unstable_shouldCallHandler(f){return u=!0,l?typeof f=="boolean"?Zt(n,{...l,defaultShouldRevalidate:f}):Zt(n,l):s},resolve(f){let{lazy:m,loader:p,middleware:h}=n.route,g=u||s||f&&!de(r.method)&&(m||p),y=h&&h.length>0&&!p&&!m;return g&&(de(r.method)||!y)?kl({request:r,unstable_pattern:a,match:n,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:f,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function Be(e,t,r,a,n,o,i,s=null){return a.map(l=>l.route.id!==n.route.id?{...l,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:qn(e,t,r,l,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Tt(e,t,r,dt(a.map(u=>u.route.path)),l,o,i,!0,s))}async function Zn(e,t,r,a,n,o){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let i={request:t,unstable_pattern:dt(r.map(u=>u.route.path)),params:r[0].params,context:n,matches:r},l=await e({...i,fetcherKey:a,runClientMiddleware:o?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:u=>{let c=i;return Xn(c,()=>u({...c,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return l}async function kl({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:n,handlerOverride:o,scopedContext:i}){let s,l,u=de(e.method),c=u?"action":"loader",f=m=>{let p,h=new Promise((w,R)=>p=R);l=()=>p(),e.signal.addEventListener("abort",l);let g=w=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${r.route.id}]`)):m({request:e,unstable_pattern:t,params:r.params,context:i},...w!==void 0?[w]:[]),y=(async()=>{try{return{type:"data",result:await(o?o(R=>g(R)):g())}}catch(w){return{type:"error",result:w}}})();return Promise.race([y,h])};try{let m=u?r.route.action:r.route.loader;if(a||n)if(m){let p,[h]=await Promise.all([f(m).catch(g=>{p=g}),a,n]);if(p!==void 0)throw p;s=h}else{await a;let p=u?r.route.action:r.route.loader;if(p)[s]=await Promise.all([f(p),n]);else if(c==="action"){let h=new URL(e.url),g=h.pathname+h.search;throw te(405,{method:e.method,pathname:g,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)s=await f(m);else{let p=new URL(e.url),h=p.pathname+p.search;throw te(404,{pathname:h})}}catch(m){return{type:"error",result:m}}finally{l&&e.signal.removeEventListener("abort",l)}return s}async function eo(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function to(e){let{result:t,type:r}=e;if(ee(t)){let a;try{a=await eo(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new pe(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?We(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 pe(t.init?.status||500,void 0,t.data),statusCode:re(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:re(t)?t.status:void 0}:We(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 ro(e,t,r,a,n){let o=e.headers.get("Location");if(A(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!ea(o)){let i=a.slice(0,a.findIndex(s=>s.route.id===r)+1);o=Nr(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}function tn(e,t,r){if(ea(e)){let a=e,n=a.startsWith("//")?new URL(t.protocol+a):new URL(a),o=ne(n.pathname,r)!=null;if(n.origin===t.origin&&o)return n.pathname+n.search+n.hash}return e}function ut(e,t,r,a){let n=e.createURL(no(t)).toString(),o={signal:r};if(a&&de(a.formMethod)){let{formMethod:i,formEncType:s}=a;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(a.json)):s==="text/plain"?o.body=a.text:s==="application/x-www-form-urlencoded"&&a.formData?o.body=Ir(a.formData):o.body=a.formData}return new Request(n,o)}function Ir(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function rn(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function ao(e,t,r,a=!1,n=!1){let o={},i=null,s,l=!1,u={},c=r&&ie(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let m=f.route.id,p=t[m];if(A(!ze(p),"Cannot handle redirect results in processLoaderData"),ie(p)){let h=p.error;if(c!==void 0&&(h=c,c=void 0),i=i||{},n)i[m]=h;else{let g=xe(e,m);i[g.route.id]==null&&(i[g.route.id]=h)}a||(o[m]=Vn),l||(l=!0,s=re(p.error)?p.error.status:500),p.headers&&(u[m]=p.headers)}else o[m]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(s=p.statusCode),p.headers&&(u[m]=p.headers)}),c!==void 0&&r&&(i={[r[0]]:c},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:s||200,loaderHeaders:u}}function an(e,t,r,a,n,o){let{loaderData:i,errors:s}=ao(t,r,a);return n.filter(l=>!l.matches||l.matches.some(u=>u.shouldLoad)).forEach(l=>{let{key:u,match:c,controller:f}=l;if(f&&f.signal.aborted)return;let m=o[u];if(A(m,"Did not find corresponding fetcher result"),ie(m)){let p=xe(e.matches,c?.route.id);s&&s[p.route.id]||(s={...s,[p.route.id]:m.error}),e.fetchers.delete(u)}else if(ze(m))A(!1,"Unhandled fetcher revalidation redirect");else{let p=Ne(m.data);e.fetchers.set(u,p)}}),{loaderData:i,errors:s}}function nn(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Vn).reduce((o,[i,s])=>(o[i]=s,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function on(e){return e?ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xe(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function ct(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function te(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?s=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(s="Unable to encode submission body")):e===403?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",s=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?s=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(s=`Invalid request method "${a.toUpperCase()}"`)),new pe(e||500,i,new Error(s),!0)}function zt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(ze(n))return{key:a,result:n}}}function no(e){let t=typeof e=="string"?Pe(e):e;return he({...t,hash:""})}function Ol(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Hr(e){return Response.json(e.data,e.init??void 0)}function Nl(e){return new pe(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Al(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&oo(r))}function oo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function io(e){return ee(e.result)&&zn.has(e.result.status)}function ie(e){return e.type==="error"}function ze(e){return(e&&e.type)==="redirect"}function We(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ee(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function cr(e){return zn.has(e)}function er(e){return ee(e)&&cr(e.status)&&e.headers.has("Location")}function jr(e){return Cl.has(e.toUpperCase())}function de(e){return bl.has(e.toUpperCase())}function aa(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ft(e,t){let r=typeof t=="string"?Pe(t).search:t.search;if(e[e.length-1].route.index&&aa(r||""))return e[e.length-1];let a=An(e);return a[a.length-1]}function ln(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function Dr(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 $l(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function xt(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 Il(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ne(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Hl(e,t){try{let r=e.sessionStorage.getItem(Wn);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function jl(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Wn,JSON.stringify(r))}catch(a){X(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Ul(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Ie=d.createContext(null);Ie.displayName="DataRouter";var at=d.createContext(null);at.displayName="DataRouterState";var lo=d.createContext(!1);function zl(){return d.useContext(lo)}var dr=d.createContext({isTransitioning:!1});dr.displayName="ViewTransition";var fr=d.createContext(new Map);fr.displayName="Fetchers";var pt=d.createContext(null);pt.displayName="Await";var Sc=e=>d.createElement(pt.Provider,e),we=d.createContext(null);we.displayName="Navigation";var yt=d.createContext(null);yt.displayName="Location";var Re=d.createContext({outlet:null,matches:[],isDataRoute:!1});Re.displayName="Route";var na=d.createContext(null);na.displayName="RouteError";function Bl(e,{relative:t}={}){A(nt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=d.useContext(we),{hash:n,pathname:o,search:i}=Ot(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:Me([r,o])),a.createHref({pathname:s,search:i,hash:n})}function nt(){return d.useContext(yt)!=null}function Ee(){return A(nt(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(yt).location}function Cc(){return d.useContext(yt).navigationType}function xc(e){A(nt(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Ee();return d.useMemo(()=>_t(e,Nn(t)),[t,e])}var so="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uo(e){d.useContext(we).static||d.useLayoutEffect(e)}function oa(){let{isDataRoute:e}=d.useContext(Re);return e?as():Wl()}function Wl(){A(nt(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Ie),{basename:t,navigator:r}=d.useContext(we),{matches:a}=d.useContext(Re),{pathname:n}=Ee(),o=JSON.stringify(ir(a)),i=d.useRef(!1);return uo(()=>{i.current=!0}),d.useCallback((l,u={})=>{if(X(i.current,so),!i.current)return;if(typeof l=="number"){r.go(l);return}let c=lr(l,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Me([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var co=d.createContext(null);function Pc(){return d.useContext(co)}function Vl(e){let t=d.useContext(Re).outlet;return d.useMemo(()=>t&&d.createElement(co.Provider,{value:e},t),[t,e])}function ia(){let{matches:e}=d.useContext(Re),t=e[e.length-1];return t?t.params:{}}function Ot(e,{relative:t}={}){let{matches:r}=d.useContext(Re),{pathname:a}=Ee(),n=JSON.stringify(ir(r));return d.useMemo(()=>lr(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Yl(e,t){return la(e,t)}function la(e,t,r,a,n){A(nt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=d.useContext(we),{matches:i}=d.useContext(Re),s=i[i.length-1],l=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",f=s&&s.route;{let R=f&&f.path||"";ho(u,!f||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
3
3
 
4
4
  Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let m=Ee(),p;if(t){let R=typeof t=="string"?Pe(t):t;A(c==="/"||R.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${R.pathname}" was given in the \`location\` prop.`),p=R}else p=m;let h=p.pathname||"/",g=h;if(c!=="/"){let R=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(R.length).join("/")}let y=ge(e,{pathname:g});X(f||y!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),X(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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 w=fo(y&&y.map(R=>Object.assign({},R,{params:Object.assign({},l,R.params),pathname:Me([c,o.encodeLocation?o.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?c:Me([c,o.encodeLocation?o.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),i,r,a,n);return t&&w?d.createElement(yt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},w):w}function Jl(){let e=hr(),t=re(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:o},"ErrorBoundary")," or"," ",d.createElement("code",{style:o},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:n},r):null,i)}var Kl=d.createElement(Jl,null),Xl=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?d.createElement(Re.Provider,{value:this.props.routeContext},d.createElement(na.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Gl({routeContext:e,match:t,children:r}){let a=d.useContext(Ie);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Re.Provider,{value:e},r)}function fo(e,t=[],r=null,a=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let u=o.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);A(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,u+1))}let s=!1,l=-1;if(r)for(let u=0;u<o.length;u++){let c=o[u];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=u),c.route.id){let{loaderData:f,errors:m}=r,p=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!m||m[c.route.id]===void 0);if(c.route.lazy||p){s=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((u,c,f)=>{let m,p=!1,h=null,g=null;r&&(m=i&&c.route.id?i[c.route.id]:void 0,h=c.route.errorElement||Kl,s&&(l<0&&f===0?(ho("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,g=null):l===f&&(p=!0,g=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),w=()=>{let R;return m?R=h:p?R=g:c.route.Component?R=d.createElement(c.route.Component,null):c.route.element?R=c.route.element:R=u,d.createElement(Gl,{match:c,routeContext:{outlet:u,matches:y,isDataRoute:r!=null},children:R})};return r&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?d.createElement(Xl,{location:r.location,revalidation:r.revalidation,component:h,error:m,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0},unstable_onError:a}):w()},null)}function sa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ua(e){let t=d.useContext(Ie);return A(t,sa(e)),t}function He(e){let t=d.useContext(at);return A(t,sa(e)),t}function Ql(e){let t=d.useContext(Re);return A(t,sa(e)),t}function vt(e){let t=Ql(e),r=t.matches[t.matches.length-1];return A(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ql(){return vt("useRouteId")}function Zl(){return He("useNavigation").navigation}function Dc(){let e=ua("useRevalidator"),t=He("useRevalidator"),r=d.useCallback(async()=>{await e.router.revalidate()},[e.router]);return d.useMemo(()=>({revalidate:r,state:t.revalidation}),[r,t.revalidation])}function ca(){let{matches:e,loaderData:t}=He("useMatches");return d.useMemo(()=>e.map(r=>Mn(r,t)),[e,t])}function da(){let e=He("useLoaderData"),t=vt("useLoaderData");return e.loaderData[t]}function Lc(e){return He("useRouteLoaderData").loaderData[e]}function fa(){let e=He("useActionData"),t=vt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function hr(){let e=d.useContext(na),t=He("useRouteError"),r=vt("useRouteError");return e!==void 0?e:t.errors?.[r]}function es(){return d.useContext(pt)?._data}function _c(){return d.useContext(pt)?._error}var ts=0;function rs(e){let{router:t,basename:r}=ua("useBlocker"),a=He("useBlocker"),[n,o]=d.useState(""),i=d.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:u,historyAction:c}=s;return e({currentLocation:{...l,pathname:ne(l.pathname,r)||l.pathname},nextLocation:{...u,pathname:ne(u.pathname,r)||u.pathname},historyAction:c})},[r,e]);return d.useEffect(()=>{let s=String(++ts);return o(s),()=>t.deleteBlocker(s)},[t]),d.useEffect(()=>{n!==""&&t.getBlocker(n,i)},[t,n,i]),n&&a.blockers.has(n)?a.blockers.get(n):tt}function as(){let{router:e}=ua("useNavigate"),t=vt("useNavigate"),r=d.useRef(!1);return uo(()=>{r.current=!0}),d.useCallback(async(n,o={})=>{X(r.current,so),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var sn={};function ho(e,t,r){!t&&!sn[e]&&(sn[e]=!0,X(!1,r))}function Tc(...e){const t=vt("useRoute"),r=e[0]??t,a=He("useRoute"),n=a.matches.find(({route:o})=>o.id===r);if(n!==void 0)return{handle:n.route.handle,loaderData:a.loaderData[r],actionData:a.actionData?.[r]}}var un={};function Mt(e,t){!e&&!un[t]&&(un[t]=!0,console.warn(t))}function gt(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&X(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&X(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&X(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var mr=["HydrateFallback","hydrateFallbackElement"];function ns(e,t){return ur({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Dn({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:mr,mapRouteProperties:gt,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}var os=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function mo({router:e,flushSync:t,unstable_onError:r}){let[a,n]=d.useState(e.state),[o,i]=d.useState(),[s,l]=d.useState({isTransitioning:!1}),[u,c]=d.useState(),[f,m]=d.useState(),[p,h]=d.useState(),g=d.useRef(new Map),y=d.useCallback(P=>{n(D=>(P.errors&&r&&Object.entries(P.errors).forEach(([E,F])=>{D.errors?.[E]!==F&&r(F)}),P))},[r]),w=d.useCallback((P,{deletedFetchers:D,flushSync:E,viewTransitionOpts:F})=>{P.fetchers.forEach((M,N)=>{M.data!==void 0&&g.current.set(N,M.data)}),D.forEach(M=>g.current.delete(M)),Mt(E===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let T=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Mt(F==null||T,"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||!T){t&&E?t(()=>y(P)):d.startTransition(()=>y(P));return}if(t&&E){t(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let M=e.window.document.startViewTransition(()=>{t(()=>y(P))});M.finished.finally(()=>{t(()=>{c(void 0),m(void 0),i(void 0),l({isTransitioning:!1})})}),t(()=>m(M));return}f?(u&&u.resolve(),f.skipTransition(),h({state:P,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(i(P),l({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[e.window,t,f,u,y]);d.useLayoutEffect(()=>e.subscribe(w),[e,w]),d.useEffect(()=>{s.isTransitioning&&!s.flushSync&&c(new os)},[s]),d.useEffect(()=>{if(u&&o&&e.window){let P=o,D=u.promise,E=e.window.document.startViewTransition(async()=>{d.startTransition(()=>y(P)),await D});E.finished.finally(()=>{c(void 0),m(void 0),i(void 0),l({isTransitioning:!1})}),m(E)}},[o,u,e.window,y]),d.useEffect(()=>{u&&o&&a.location.key===o.location.key&&u.resolve()},[u,f,a.location,o]),d.useEffect(()=>{!s.isTransitioning&&p&&(i(p.state),l({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),h(void 0))},[s.isTransitioning,p]);let R=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:P=>e.navigate(P),push:(P,D,E)=>e.navigate(P,{state:D,preventScrollReset:E?.preventScrollReset}),replace:(P,D,E)=>e.navigate(P,{replace:!0,state:D,preventScrollReset:E?.preventScrollReset})}),[e]),C=e.basename||"/",x=d.useMemo(()=>({router:e,navigator:R,static:!1,basename:C,unstable_onError:r}),[e,R,C,r]);return d.createElement(d.Fragment,null,d.createElement(Ie.Provider,{value:x},d.createElement(at.Provider,{value:a},d.createElement(fr.Provider,{value:g.current},d.createElement(dr.Provider,{value:s},d.createElement(ot,{basename:C,location:a.location,navigationType:a.historyAction,navigator:R},d.createElement(is,{routes:e.routes,future:e.future,state:a,unstable_onError:r})))))),null)}var is=d.memo(ls);function ls({routes:e,future:t,state:r,unstable_onError:a}){return la(e,void 0,r,a,t)}function Mc({basename:e,children:t,initialEntries:r,initialIndex:a}){let n=d.useRef();n.current==null&&(n.current=Dn({initialEntries:r,initialIndex:a,v5Compat:!0}));let o=n.current,[i,s]=d.useState({action:o.action,location:o.location}),l=d.useCallback(u=>{d.startTransition(()=>s(u))},[s]);return d.useLayoutEffect(()=>o.listen(l),[o,l]),d.createElement(ot,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}function Fc({to:e,replace:t,state:r,relative:a}){A(nt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=d.useContext(we);X(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=d.useContext(Re),{pathname:i}=Ee(),s=oa(),l=lr(e,ir(o),i,a==="path"),u=JSON.stringify(l);return d.useEffect(()=>{s(JSON.parse(u),{replace:t,state:r,relative:a})},[s,u,a,t,r]),null}function ss(e){return Vl(e.context)}function us(e){A(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ot({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1}){A(!nt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),s=d.useMemo(()=>({basename:i,navigator:n,static:o,future:{}}),[i,n,o]);typeof r=="string"&&(r=Pe(r));let{pathname:l="/",search:u="",hash:c="",state:f=null,key:m="default"}=r,p=d.useMemo(()=>{let h=ne(l,i);return h==null?null:{location:{pathname:h,search:u,hash:c,state:f,key:m},navigationType:a}},[i,l,u,c,f,m,a]);return X(p!=null,`<Router basename="${i}"> is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:d.createElement(we.Provider,{value:s},d.createElement(yt.Provider,{children:t,value:p}))}function kc({children:e,location:t}){return Yl(tr(e),t)}function Oc({children:e,errorElement:t,resolve:r}){let a=d.useContext(Ie);return d.createElement(cs,{resolve:r,errorElement:t,unstable_onError:a?.unstable_onError},d.createElement(ds,null,e))}var cs=class extends d.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,a=null,n=0;if(!(r instanceof Promise))n=1,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>r});else if(this.state.error){n=2;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else r._tracked?(a=r,n="_error"in a?2:"_data"in a?1:0):(n=0,Object.defineProperty(r,"_tracked",{get:()=>!0}),a=r.then(o=>Object.defineProperty(r,"_data",{get:()=>o}),o=>{this.props.unstable_onError?.(o),Object.defineProperty(r,"_error",{get:()=>o})}));if(n===2&&!t)throw a._error;if(n===2)return d.createElement(pt.Provider,{value:a,children:t});if(n===1)return d.createElement(pt.Provider,{value:a,children:e});throw a}};function ds({children:e}){let t=es(),r=typeof e=="function"?e(t):e;return d.createElement(d.Fragment,null,r)}function tr(e,t=[]){let r=[];return d.Children.forEach(e,(a,n)=>{if(!d.isValidElement(a))return;let o=[...t,n];if(a.type===d.Fragment){r.push.apply(r,tr(a.props.children,o));return}A(a.type===us,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),A(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=tr(a.props.children,o)),r.push(i)}),r}var Nc=tr;function Ac(e){return fo(e)}function po(){return{params:ia(),loaderData:da(),actionData:fa(),matches:ca()}}function $c({children:e}){const t=po();return d.cloneElement(e,t)}function fs(e){return function(){const r=po();return d.createElement(e,r)}}function yo(){return{params:ia(),loaderData:da(),actionData:fa()}}function Ic({children:e}){const t=yo();return d.cloneElement(e,t)}function hs(e){return function(){const r=yo();return d.createElement(e,r)}}function vo(){return{params:ia(),loaderData:da(),actionData:fa(),error:hr()}}function Hc({children:e}){const t=vo();return d.cloneElement(e,t)}function ms(e){return function(){const r=vo();return d.createElement(e,r)}}var Xt="get",Gt="application/x-www-form-urlencoded";function pr(e){return e!=null&&typeof e.tagName=="string"}function ps(e){return pr(e)&&e.tagName.toLowerCase()==="button"}function ys(e){return pr(e)&&e.tagName.toLowerCase()==="form"}function vs(e){return pr(e)&&e.tagName.toLowerCase()==="input"}function gs(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ws(e,t){return e.button===0&&(!t||t==="_self")&&!gs(e)}function Ur(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Rs(e,t){let r=Ur(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Bt=null;function Es(){if(Bt===null)try{new FormData(document.createElement("form"),0),Bt=!1}catch{Bt=!0}return Bt}var bs=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lr(e){return e!=null&&!bs.has(e)?(X(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gt}"`),null):e}function Ss(e,t){let r,a,n,o,i;if(ys(e)){let s=e.getAttribute("action");a=s?ne(s,t):null,r=e.getAttribute("method")||Xt,n=Lr(e.getAttribute("enctype"))||Gt,o=new FormData(e)}else if(ps(e)||vs(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(a=l?ne(l,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||Xt,n=Lr(e.getAttribute("formenctype"))||Lr(s.getAttribute("enctype"))||Gt,o=new FormData(s,e),!Es()){let{name:u,type:c,value:f}=e;if(c==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}else u&&o.append(u,f)}}else{if(pr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xt,a=null,n=Gt,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var go=-1,wo=-2,Ro=-3,Eo=-4,ha=-5,bo=-6,So=-7,Co="B",xo="D",ht="E",zr="M",Po="N",mt="P",Do="R",Br="S",Lo="Y",_o="U",Wr="Z",To=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Cs(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),o=(t+n).split(`
@@ -1,4 +1,4 @@
1
- import{e as St,g as zo}from"./index-azxbEkS4.js";import{u as Go}from"./util-t-trnxQI.js";import{_ as $o}from"./__vite-browser-external-D7Ct-6yo.js";import{r as Yo}from"./index-DRz5BQNA.js";import{p as Vo}from"./path-C2bN6h38.js";function Ko(r,i){for(var g=0;g<i.length;g++){const E=i[g];if(typeof E!="string"&&!Array.isArray(E)){for(const d in E)if(d!=="default"&&!(d in r)){const l=Object.getOwnPropertyDescriptor(E,d);l&&Object.defineProperty(r,d,l.get?l:{enumerable:!0,get:()=>E[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var Pt={},ze={},Tt,rn;function ye(){if(rn)return Tt;rn=1;function r(m){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(m)}function i(m,s,c){return Object.defineProperty(m,"prototype",{writable:!1}),m}function g(m,s){if(!(m instanceof s))throw new TypeError("Cannot call a class as a function")}function E(m,s,c){return s=p(s),d(m,_()?Reflect.construct(s,c||[],p(m).constructor):s.apply(m,c))}function d(m,s){if(s&&(r(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(m)}function l(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function h(m,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(s&&s.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),s&&x(m,s)}function t(m){var s=typeof Map=="function"?new Map:void 0;return t=function(a){if(a===null||!y(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(a))return s.get(a);s.set(a,o)}function o(){return u(a,arguments,p(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),x(o,a)},t(m)}function u(m,s,c){if(_())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,s);var o=new(m.bind.apply(m,a));return c&&x(o,c.prototype),o}function _(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_=function(){return!!m})()}function y(m){try{return Function.toString.call(m).indexOf("[native code]")!==-1}catch{return typeof m=="function"}}function x(m,s){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,a){return c.__proto__=a,c},x(m,s)}function p(m){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},p(m)}var w=(function(m){function s(c){var a;return g(this,s),a=E(this,s,[`Format functions must be synchronous taking a two arguments: (info, opts)
1
+ import{e as St,g as zo}from"./index-ubmd7JRV.js";import{u as Go}from"./util-t-trnxQI.js";import{_ as $o}from"./__vite-browser-external-D7Ct-6yo.js";import{r as Yo}from"./index-DRz5BQNA.js";import{p as Vo}from"./path-C2bN6h38.js";function Ko(r,i){for(var g=0;g<i.length;g++){const E=i[g];if(typeof E!="string"&&!Array.isArray(E)){for(const d in E)if(d!=="default"&&!(d in r)){const l=Object.getOwnPropertyDescriptor(E,d);l&&Object.defineProperty(r,d,l.get?l:{enumerable:!0,get:()=>E[d]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var Pt={},ze={},Tt,rn;function ye(){if(rn)return Tt;rn=1;function r(m){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},r(m)}function i(m,s,c){return Object.defineProperty(m,"prototype",{writable:!1}),m}function g(m,s){if(!(m instanceof s))throw new TypeError("Cannot call a class as a function")}function E(m,s,c){return s=p(s),d(m,_()?Reflect.construct(s,c||[],p(m).constructor):s.apply(m,c))}function d(m,s){if(s&&(r(s)=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(m)}function l(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function h(m,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(s&&s.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),s&&x(m,s)}function t(m){var s=typeof Map=="function"?new Map:void 0;return t=function(a){if(a===null||!y(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(s!==void 0){if(s.has(a))return s.get(a);s.set(a,o)}function o(){return u(a,arguments,p(this).constructor)}return o.prototype=Object.create(a.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),x(o,a)},t(m)}function u(m,s,c){if(_())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,s);var o=new(m.bind.apply(m,a));return c&&x(o,c.prototype),o}function _(){try{var m=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_=function(){return!!m})()}function y(m){try{return Function.toString.call(m).indexOf("[native code]")!==-1}catch{return typeof m=="function"}}function x(m,s){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,a){return c.__proto__=a,c},x(m,s)}function p(m){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},p(m)}var w=(function(m){function s(c){var a;return g(this,s),a=E(this,s,[`Format functions must be synchronous taking a two arguments: (info, opts)
2
2
  Found: `.concat(c.toString().split(`
3
3
  `)[0],`
4
4
  `)]),Error.captureStackTrace(a,s),a}return h(s,m),i(s)})(t(Error));return Tt=function(m){if(m.length>2)throw new w(m);function s(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=a}s.prototype.transform=m;function c(a){return new s(a)}return c.Format=s,c},Tt}var Be={exports:{}},jt={exports:{}},Lt={exports:{}};const _e=St(Go);var Mt={exports:{}},nn;function Jo(){return nn||(nn=1,(function(r){var i={};r.exports=i;var g={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(g).forEach(function(E){var d=g[E],l=i[E]=[];l.open="\x1B["+d[0]+"m",l.close="\x1B["+d[1]+"m"})})(Mt)),Mt.exports}const be=St($o);var At,on;function Zo(){return on||(on=1,At=function(r,i){i=i||process.argv||[];var g=i.indexOf("--"),E=/^-{1,2}/.test(r)?"":"--",d=i.indexOf(E+r);return d!==-1&&(g===-1?!0:d<g)}),At}var Ct,an;function Qo(){if(an)return Ct;an=1;var r={},i=Zo(),g=r,E=void 0;i("no-color")||i("no-colors")||i("color=false")?E=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(E=!0),"FORCE_COLOR"in g&&(E=g.FORCE_COLOR.length===0||parseInt(g.FORCE_COLOR,10)!==0);function d(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function l(t){if(E===!1)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(t&&!t.isTTY&&E!==!0)return 0;var u=E?1:0;if("CI"in g)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(y){return y in g})||g.CI_NAME==="codeship"?1:u;if("TEAMCITY_VERSION"in g)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(g.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in g){var _=parseInt((g.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(g.TERM_PROGRAM){case"iTerm.app":return _>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(g.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(g.TERM)||"COLORTERM"in g?1:(g.TERM==="dumb",u)}function h(t){var u=l(t);return d(u)}return Ct={supportsColor:h,stdout:h(process.stdout),stderr:h(process.stderr)},Ct}var It={exports:{}},un;function Xo(){return un||(un=1,(function(r){r.exports=function(g,E){var d="";g=g||"Run the trap, drop the bass",g=g.split("");var l={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return g.forEach(function(h){h=h.toLowerCase();var t=l[h]||[" "],u=Math.floor(Math.random()*t.length);typeof l[h]<"u"?d+=l[h][u]:d+=h}),d}})(It)),It.exports}var qt={exports:{}},sn;function ea(){return sn||(sn=1,(function(r){r.exports=function(g,E){g=g||" he is here ";var d={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},l=[].concat(d.up,d.down,d.mid);function h(_){var y=Math.floor(Math.random()*_);return y}function t(_){var y=!1;return l.filter(function(x){y=x===_}),y}function u(_,y){var x="",p,w;y=y||{},y.up=typeof y.up<"u"?y.up:!0,y.mid=typeof y.mid<"u"?y.mid:!0,y.down=typeof y.down<"u"?y.down:!0,y.size=typeof y.size<"u"?y.size:"maxi",_=_.split("");for(w in _)if(!t(w)){switch(x=x+_[w],p={up:0,down:0,mid:0},y.size){case"mini":p.up=h(8),p.mid=h(2),p.down=h(8);break;case"maxi":p.up=h(16)+3,p.mid=h(4)+1,p.down=h(64)+3;break;default:p.up=h(8)+1,p.mid=h(6)/2,p.down=h(8)+1;break}var m=["up","mid","down"];for(var s in m)for(var c=m[s],a=0;a<=p[c];a++)y[c]&&(x=x+d[c][h(d[c].length)])}return x}return u(g,E)}})(qt)),qt.exports}var Bt={exports:{}},fn;function ta(){return fn||(fn=1,(function(r){r.exports=function(i){return function(g,E,d){if(g===" ")return g;switch(E%3){case 0:return i.red(g);case 1:return i.white(g);case 2:return i.blue(g)}}}})(Bt)),Bt.exports}var Nt={exports:{}},ln;function ra(){return ln||(ln=1,(function(r){r.exports=function(i){return function(g,E,d){return E%2===0?g:i.inverse(g)}}})(Nt)),Nt.exports}var Ft={exports:{}},cn;function na(){return cn||(cn=1,(function(r){r.exports=function(i){var g=["red","yellow","green","blue","magenta"];return function(E,d,l){return E===" "?E:i[g[d++%g.length]](E)}}})(Ft)),Ft.exports}var Dt={exports:{}},hn;function ia(){return hn||(hn=1,(function(r){r.exports=function(i){var g=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(E,d,l){return E===" "?E:i[g[Math.round(Math.random()*(g.length-2))]](E)}}})(Dt)),Dt.exports}var pn;function oa(){return pn||(pn=1,(function(r){var i={};r.exports=i,i.themes={};var g=_e,E=i.styles=Jo(),d=Object.defineProperties,l=new RegExp(/[\r\n]+/g);i.supportsColor=Qo().supportsColor,typeof i.enabled>"u"&&(i.enabled=i.supportsColor()!==!1),i.enable=function(){i.enabled=!0},i.disable=function(){i.enabled=!1},i.stripColors=i.strip=function(s){return(""+s).replace(/\x1B\[\d+m/g,"")},i.stylize=function(c,a){if(!i.enabled)return c+"";var o=E[a];return!o&&a in i?i[a](c):o.open+c+o.close};var h=/[|\\{}()[\]^$+*?.]/g,t=function(s){if(typeof s!="string")throw new TypeError("Expected a string");return s.replace(h,"\\$&")};function u(s){var c=function a(){return x.apply(a,arguments)};return c._styles=s,c.__proto__=y,c}var _=(function(){var s={};return E.grey=E.gray,Object.keys(E).forEach(function(c){E[c].closeRe=new RegExp(t(E[c].close),"g"),s[c]={get:function(){return u(this._styles.concat(c))}}}),s})(),y=d(function(){},_);function x(){var s=Array.prototype.slice.call(arguments),c=s.map(function(S){return S!=null&&S.constructor===String?S:g.inspect(S)}).join(" ");if(!i.enabled||!c)return c;for(var a=c.indexOf(`
@@ -27,9 +27,9 @@
27
27
  rel="stylesheet"
28
28
  />
29
29
  <title>Inspector | mcp-use</title>
30
- <script type="module" crossorigin src="/inspector/assets/index-azxbEkS4.js"></script>
30
+ <script type="module" crossorigin src="/inspector/assets/index-ubmd7JRV.js"></script>
31
31
  <link rel="stylesheet" crossorigin href="/inspector/assets/index-beDRbW3x.css">
32
- <script>window.__INSPECTOR_VERSION__ = "0.12.4";</script>
32
+ <script>window.__INSPECTOR_VERSION__ = "0.12.6";</script>
33
33
  </head>
34
34
  <body>
35
35
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-use/inspector",
3
3
  "type": "module",
4
- "version": "0.12.4",
4
+ "version": "0.12.6",
5
5
  "description": "MCP Inspector - A tool for inspecting and debugging MCP servers",
6
6
  "author": "",
7
7
  "license": "MIT",
@@ -83,7 +83,7 @@
83
83
  "sonner": "^2.0.7",
84
84
  "tailwind-merge": "^3.4.0",
85
85
  "vite-express": "^0.21.1",
86
- "mcp-use": "1.10.4"
86
+ "mcp-use": "1.10.6"
87
87
  },
88
88
  "publishConfig": {
89
89
  "access": "public"