PageSourceSearch

https://data.gov.bh/static/assets/index-DRJLwv9Q.js

js data.gov.bh collected 2026-10-02 14:37:07 UTC 68,583 bytes, 2 lines download raw bytes

1import{m as _,r as v,cN as Er,cY as dn}from"./automationAxios-iy0n8IC9.js";const fn={en:_("English"),fr:_("French"),nl:_("Dutch"),pt:_("Portuguese"),it:_("Italian"),ar:_("Arabic"),de:_("German"),es:_("Spanish"),ca:_("Catalan"),eu:_("Basque"),sv:_("Swedish")},Sr={"en-us":[_("English"),_("United States")],"en-gb":[_("English"),_("United Kingdom")],"fr-fr":[_("French"),_("France")],"fr-ch":[_("French"),_("Switzerland")],"nl-nl":[_("Dutch"),_("Netherlands")],"pt-pt":[_("Portuguese"),_("Portugal")],"it-it":[_("Italian"),_("Italy")],"it-ch":[_("Italian"),_("Switzerland")],"ar-001":[_("Arabic"),_("World")],"de-de":[_("German"),_("Germany")],"de-ch":[_("German"),_("Switzerland")],"es-es":[_("Spanish"),_("Spain")],"ca-es":[_("Catalan"),_("Spain")],eu:[_("Basque"),null],"sv-se":[_("Swedish"),_("Sweden")]},Ya=["en","fr","ca","es","nl","de"],Xa=["en","fr"],hn=e=>Object.entries(fn).map(([t,r])=>({label:e.translate(r),value:t})),Qa=(e,t)=>{const r=hn(e),n=[{label:e.translate("Domain languages"),options:r.filter(({value:a})=>t.includes(a))}];return t.length!==r.length&&n.push({label:e.translate("Other languages"),options:r.filter(({value:a})=>!t.includes(a))}),n},Za=(e,t)=>t.find(r=>r===e)||t[0]||"en";function xr(e,t,r){return r?`${e.translate(t)} (${e.translate(r)})`:e.translate(t)}const qa=e=>Object.entries(Sr).reduce((t,[r,n])=>({...t,[r]:xr(e,n[0],n[1])}),{}),ei=e=>Object.entries(Sr).map(([t,r])=>({label:xr(e,r[0],r[1]),value:t}));function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(this,arguments)}var V;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(V||(V={}));const qt="popstate";function Pr(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((g,E)=>h(g,typeof g=="string"?null:g.state,E===0?"default":void 0));let l=u(r??a.length-1),i=V.Pop,c=null;function u(g){return Math.min(Math.max(g,0),a.length-1)}function f(){return a[l]}function h(g,E,R){E===void 0&&(E=null);let C=ke(a?f().pathname:"/",g,E,R);return Re(C.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(g)),C}function m(g){return typeof g=="string"?g:Ee(g)}return{get index(){return l},get action(){return i},get location(){return f()},createHref:m,createURL(g){return new URL(m(g),"http://localhost")},encodeLocation(g){let E=typeof g=="string"?pe(g):g;return{pathname:E.pathname||"",search:E.search||"",hash:E.hash||""}},push(g,E){i=V.Push;let R=h(g,E);l+=1,a.splice(l,a.length,R),n&&c&&c({action:i,location:R,delta:1})},replace(g,E){i=V.Replace;let R=h(g,E);a[l]=R,n&&c&&c({action:i,location:R,delta:0})},go(g){i=V.Pop;let E=u(l+g),R=a[E];l=E,c&&c({action:i,location:R,delta:g})},listen(g){return c=g,()=>{c=null}}}}function mn(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:i,hash:c}=n.location;return ke("",{pathname:l,search:i,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ee(a)}return vn(t,r,null,e)}function I(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Re(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pn(){return Math.random().toString(36).substr(2,8)}function er(e,t){return{usr:e.state,key:e.key,idx:t}}function ke(e,t,r,n){return r===void 0&&(r=null),$({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?pe(t):t,{state:r,key:t&&t.key||n||pn()})}function Ee(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function pe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function vn(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,i=a.history,c=V.Pop,u=null,f=h();f==null&&(f=0,i.replaceState($({},i.state,{idx:f}),""));function h(){return(i.state||{idx:null}).idx}function m(){c=V.Pop;let C=h(),B=C==null?null:C-f;f=C,u&&u({action:c,location:R.location,delta:B})}function w(C,B){c=V.Push;let M=ke(R.location,C,B);f=h()+1;let k=er(M,f),J=R.createHref(M);try{i.pushState(k,"",J)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;a.location.assign(J)}l&&u&&u({action:c,location:R.location,delta:1})}function g(C,B){c=V.Replace;let M=ke(R.location,C,B);f=h();let k=er(M,f),J=R.createHref(M);i.replaceState(k,"",J),l&&u&&u({action:c,location:R.location,delta:0})}function E(C){let B=a.location.origin!=="null"?a.location.origin:a.location.href,M=typeof C=="string"?C:Ee(C);return M=M.replace(/ $/,"%20"),I(B,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,B)}let R={get action(){return c},get location(){return e(a,i)},listen(C){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(qt,m),u=C,()=>{a.removeEventListener(qt,m),u=null}},createHref(C){return t(a,C)},createURL:E,encodeLocation(C){let B=E(C);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:w,replace:g,go(C){return i.go(C)}};return R}var z;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(z||(z={}));
vendor: 47,840 bytes, lines 1-2
1const gn=new Set(["lazy","caseSensitive","path","id","index","children"]);function yn(e){return e.index===!0}function gt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let i=[...r,String(l)],c=typeof a.id=="string"?a.id:i.join("-");if(I(a.index!==!0||!a.children,"Cannot specify children on an index route"),I(!n[c],'Found a route id collision on id "'+c+`".  Route id's must be globally unique within Data Router usages`),yn(a)){let u=$({},a,t(a),{id:c});return n[c]=u,u}else{let u=$({},a,t(a),{id:c,children:void 0});return n[c]=u,a.children&&(u.children=gt(a.children,t,i,n)),u}})}function Me(e,t,r){return r===void 0&&(r="/"),vt(e,t,r,!1)}function vt(e,t,r,n){let a=typeof t=="string"?pe(t):t,l=Oe(a.pathname||"/",r);if(l==null)return null;let i=Dr(e);wn(i);let c=null;for(let u=0;c==null&&u<i.length;++u){let f=Tn(l);c=Cn(i[u],f,n)}return c}function Lr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function Dr(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,i,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:i,route:l};u.relativePath.startsWith("/")&&(I(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let f=me([n,u.relativePath]),h=r.concat(u);l.children&&l.children.length>0&&(I(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Dr(l.children,t,h,f)),!(l.path==null&&!l.index)&&t.push({path:f,score:Ln(f,l.index),routesMeta:h})};return e.forEach((l,i)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))a(l,i);else for(let u of Cr(l.path))a(l,i,u)}),t}function Cr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let i=Cr(n.join("/")),c=[];return c.push(...i.map(u=>u===""?l:[l,u].join("/"))),a&&c.push(...i),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function wn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Dn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const bn=/^:[\w-]+$/,Rn=3,En=2,Sn=1,xn=10,Pn=-2,tr=e=>e==="*";function Ln(e,t){let r=e.split("/"),n=r.length;return r.some(tr)&&(n+=Pn),t&&(n+=En),r.filter(a=>!tr(a)).reduce((a,l)=>a+(bn.test(l)?Rn:l===""?Sn:xn),n)}function Dn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Cn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},l="/",i=[];for(let c=0;c<n.length;++c){let u=n[c],f=c===n.length-1,h=l==="/"?t:t.slice(l.length)||"/",m=rr({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},h),w=u.route;if(!m&&f&&r&&!n[n.length-1].route.index&&(m=rr({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},h)),!m)return null;Object.assign(a,m.params),i.push({params:a,pathname:me([l,m.pathname]),pathnameBase:In(me([l,m.pathnameBase])),route:w}),m.pathnameBase!=="/"&&(l=me([l,m.pathnameBase]))}return i}function rr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Mn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],i=l.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((f,h,m)=>{let{paramName:w,isOptional:g}=h;if(w==="*"){let R=c[m]||"";i=l.slice(0,l.length-R.length).replace(/(.)\/+$/,"$1")}const E=c[m];return g&&!E?f[w]=void 0:f[w]=(E||"").replace(/%2F/g,"/"),f},{}),pathname:l,pathnameBase:i,pattern:e}}function Mn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Re(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Tn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Re(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Oe(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const Un=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,On=e=>Un.test(e);function _n(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?pe(e):e,l;if(r)if(On(r))l=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),Re(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?l=nr(r.substring(1),"/"):l=nr(r,t)}else l=t;return{pathname:l,search:Fn(n),hash:Nn(a)}}function nr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Pt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Mr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wt(e,t){let r=Mr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function bt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=pe(e):(a=$({},e),I(!a.pathname||!a.pathname.includes("?"),Pt("?","pathname","search",a)),I(!a.pathname||!a.pathname.includes("#"),Pt("#","pathname","hash",a)),I(!a.search||!a.search.includes("#"),Pt("#","search","hash",a)));let l=e===""||a.pathname==="",i=l?"/":a.pathname,c;if(i==null)c=r;else{let m=t.length-1;if(!n&&i.startsWith("..")){let w=i.split("/");for(;w[0]==="..";)w.shift(),m-=1;a.pathname=w.join("/")}c=m>=0?t[m]:"/"}let u=_n(a,c),f=i&&i!=="/"&&i.endsWith("/"),h=(l||i===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||h)&&(u.pathname+="/"),u}const me=e=>e.join("/").replace(/\/\/+/g,"/"),In=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Fn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class yt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function et(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tr=["post","put","patch","delete"],An=new Set(Tr),jn=["get",...Tr],Bn=new Set(jn),zn=new Set([301,302,303,307,308]),kn=new Set([307,308]),Lt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Xe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},It=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ur="remix-router-transitions";function Or(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",n=!r;I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let o=e.detectErrorBoundary;a=s=>({hasErrorBoundary:o(s)})}else a=Wn;let l={},i=gt(e.routes,a,void 0,l),c,u=e.basename||"/",f=e.dataStrategy||Gn,h=e.patchRoutesOnNavigation,m=$({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),w=null,g=new Set,E=null,R=null,C=null,B=e.hydrationData!=null,M=Me(i,e.history.location,u),k=!1,J=null;if(M==null&&!h){let o=ne(404,{pathname:e.history.location.pathname}),{matches:s,route:d}=mr(i);M=s,J={[d.id]:o}}M&&!e.hydrationData&&ct(M,i,e.history.location.pathname).active&&(M=null);let Y;if(M)if(M.some(o=>o.route.lazy))Y=!1;else if(!M.some(o=>o.route.loader))Y=!0;else if(m.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null;if(s){let d=M.findIndex(y=>s[y.route.id]!==void 0);Y=M.slice(0,d+1).every(y=>!Mt(y.route,o,s))}else Y=M.every(d=>!Mt(d.route,o,s))}else Y=e.hydrationData!=null;else if(Y=!1,M=[],m.v7_partialHydration){let o=ct(null,i,e.history.location.pathname);o.active&&o.matches&&(k=!0,M=o.matches)}let Se,p={historyAction:e.history.action,location:e.history.location,matches:M,initialized:Y,navigation:Lt,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||J,fetchers:new Map,blockers:new Map},U=V.Pop,W=!1,F,ee=!1,X=new Map,ae=null,re=!1,ce=!1,at=[],it=new Set,Z=new Map,ot=0,Ve=-1,Ie=new Map,de=new Set,Fe=new Map,$e=new Map,oe=new Set,xe=new Map,Pe=new Map,lt;function Gr(){if(w=e.history.listen(o=>{let{action:s,location:d,delta:y}=o;if(lt){lt(),lt=void 0;return}Re(Pe.size===0||y!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let b=Yt({currentLocation:p.location,nextLocation:d,historyAction:s});if(b&&y!=null){let D=new Promise(T=>{lt=T});e.history.go(y*-1),ut(b,{state:"blocked",location:d,proceed(){ut(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),D.then(()=>e.history.go(y))},reset(){let T=new Map(p.blockers);T.set(b,Xe),te({blockers:T})}});return}return Le(s,d)}),r){la(t,X);let o=()=>sa(t,X);t.addEventListener("pagehide",o),ae=()=>t.removeEventListener("pagehide",o)}return p.initialized||Le(V.Pop,p.location,{initialHydration:!0}),Se}function Jr(){w&&w(),ae&&ae(),g.clear(),F&&F.abort(),p.fetchers.forEach((o,s)=>st(s)),p.blockers.forEach((o,s)=>Jt(s))}function Yr(o){return g.add(o),()=>g.delete(o)}function te(o,s){s===void 0&&(s={}),p=$({},p,o);let d=[],y=[];m.v7_fetcherPersist&&p.fetchers.forEach((b,D)=>{b.state==="idle"&&(oe.has(D)?y.push(D):d.push(D))}),oe.forEach(b=>{!p.fetchers.has(b)&&!Z.has(b)&&y.push(b)}),[...g].forEach(b=>b(p,{deletedFetchers:y,viewTransitionOpts:s.viewTransitionOpts,flushSync:s.flushSync===!0})),m.v7_fetcherPersist?(d.forEach(b=>p.fetchers.delete(b)),y.forEach(b=>st(b))):y.forEach(b=>oe.delete(b))}function Ne(o,s,d){var y,b;let{flushSync:D}=d===void 0?{}:d,T=p.actionData!=null&&p.navigation.formMethod!=null&&le(p.navigation.formMethod)&&p.navigation.state==="loading"&&((y=o.state)==null?void 0:y._isRedirect)!==!0,x;s.actionData?Object.keys(s.actionData).length>0?x=s.actionData:x=null:T?x=p.actionData:x=null;let P=s.loaderData?fr(p.loaderData,s.loaderData,s.matches||[],s.errors):p.loaderData,S=p.blockers;S.size>0&&(S=new Map(S),S.forEach((N,q)=>S.set(q,Xe)));let L=W===!0||p.navigation.formMethod!=null&&le(p.navigation.formMethod)&&((b=o.state)==null?void 0:b._isRedirect)!==!0;c&&(i=c,c=void 0),re||U===V.Pop||(U===V.Push?e.history.push(o,o.state):U===V.Replace&&e.history.replace(o,o.state));let O;if(U===V.Pop){let N=X.get(p.location.pathname);N&&N.has(o.pathname)?O={currentLocation:p.location,nextLocation:o}:X.has(o.pathname)&&(O={currentLocation:o,nextLocation:p.location})}else if(ee){let N=X.get(p.location.pathname);N?N.add(o.pathname):(N=new Set([o.pathname]),X.set(p.location.pathname,N)),O={currentLocation:p.location,nextLocation:o}}te($({},s,{actionData:x,loaderData:P,historyAction:U,location:o,initialized:!0,navigation:Lt,revalidation:"idle",restoreScrollPosition:Qt(o,s.matches||p.matches),preventScrollReset:L,blockers:S}),{viewTransitionOpts:O,flushSync:D===!0}),U=V.Pop,W=!1,ee=!1,re=!1,ce=!1,at=[]}async function kt(o,s){if(typeof o=="number"){e.history.go(o);return}let d=Ct(p.location,p.matches,u,m.v7_prependBasename,o,m.v7_relativeSplatPath,s?.fromRouteId,s?.relative),{path:y,submission:b,error:D}=ar(m.v7_normalizeFormMethod,!1,d,s),T=p.location,x=ke(p.location,y,s&&s.state);x=$({},x,e.history.encodeLocation(x));let P=s&&s.replace!=null?s.replace:void 0,S=V.Push;P===!0?S=V.Replace:P===!1||b!=null&&le(b.formMethod)&&b.formAction===p.location.pathname+p.location.search&&(S=V.Replace);let L=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,O=(s&&s.flushSync)===!0,N=Yt({currentLocation:T,nextLocation:x,historyAction:S});if(N){ut(N,{state:"blocked",location:x,proceed(){ut(N,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),kt(o,s)},reset(){let q=new Map(p.blockers);q.set(N,Xe),te({blockers:q})}});return}return await Le(S,x,{submission:b,pendingError:D,preventScrollReset:L,replace:s&&s.replace,enableViewTransition:s&&s.viewTransition,flushSync:O})}function Xr(){if(Rt(),te({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){Le(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}Le(U||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation,enableViewTransition:ee===!0})}}async function Le(o,s,d){F&&F.abort(),F=null,U=o,re=(d&&d.startUninterruptedRevalidation)===!0,ln(p.location,p.matches),W=(d&&d.preventScrollReset)===!0,ee=(d&&d.enableViewTransition)===!0;let y=c||i,b=d&&d.overrideNavigation,D=d!=null&&d.initialHydration&&p.matches&&p.matches.length>0&&!k?p.matches:Me(y,s,u),T=(d&&d.flushSync)===!0;if(D&&p.initialized&&!ce&&qn(p.location,s)&&!(d&&d.submission&&le(d.submission.formMethod))){Ne(s,{matches:D},{flushSync:T});return}let x=ct(D,y,s.pathname);if(x.active&&x.matches&&(D=x.matches),!D){let{error:H,notFoundMatches:j,route:K}=Et(s.pathname);Ne(s,{matches:j,loaderData:{},errors:{[K.id]:H}},{flushSync:T});return}F=new AbortController;let P=ze(e.history,s,F.signal,d&&d.submission),S;if(d&&d.pendingError)S=[Te(D).route.id,{type:z.error,error:d.pendingError}];else if(d&&d.submission&&le(d.submission.formMethod)){let H=await Qr(P,s,d.submission,D,x.active,{replace:d.replace,flushSync:T});if(H.shortCircuited)return;if(H.pendingActionResult){let[j,K]=H.pendingActionResult;if(ie(K)&&et(K.error)&&K.error.status===404){F=null,Ne(s,{matches:H.matches,loaderData:{},errors:{[j]:K.error}});return}}D=H.matches||D,S=H.pendingActionResult,b=Dt(s,d.submission),T=!1,x.active=!1,P=ze(e.history,P.url,P.signal)}let{shortCircuited:L,matches:O,loaderData:N,errors:q}=await Zr(P,s,D,x.active,b,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,T,S);L||(F=null,Ne(s,$({matches:O||D},hr(S),{loaderData:N,errors:q})))}async function Qr(o,s,d,y,b,D){D===void 0&&(D={}),Rt();let T=ia(s,d);if(te({navigation:T},{flushSync:D.flushSync===!0}),b){let S=await dt(y,s.pathname,o.signal);if(S.type==="aborted")return{shortCircuited:!0};if(S.type==="error"){let L=Te(S.partialMatches).route.id;return{matches:S.partialMatches,pendingActionResult:[L,{type:z.error,error:S.error}]}}else if(S.matches)y=S.matches;else{let{notFoundMatches:L,error:O,route:N}=Et(s.pathname);return{matches:L,pendingActionResult:[N.id,{type:z.error,error:O}]}}}let x,P=qe(y,s);if(!P.route.action&&!P.route.lazy)x={type:z.error,error:ne(405,{method:o.method,pathname:s.pathname,routeId:P.route.id})};else if(x=(await Ke("action",p,o,[P],y,null))[P.route.id],o.signal.aborted)return{shortCircuited:!0};if(Ue(x)){let S;return D&&D.replace!=null?S=D.replace:S=ur(x.response.headers.get("Location"),new URL(o.url),u,e.history)===p.location.pathname+p.location.search,await De(o,x,!0,{submission:d,replace:S}),{shortCircuited:!0}}if(be(x))throw ne(400,{type:"defer-action"});if(ie(x)){let S=Te(y,P.route.id);return(D&&D.replace)!==!0&&(U=V.Push),{matches:y,pendingActionResult:[S.route.id,x]}}return{matches:y,pendingActionResult:[P.route.id,x]}}async function Zr(o,s,d,y,b,D,T,x,P,S,L){let O=b||Dt(s,D),N=D||T||vr(O),q=!re&&(!m.v7_partialHydration||!P);if(y){if(q){let G=Ht(L);te($({navigation:O},G!==void 0?{actionData:G}:{}),{flushSync:S})}let A=await dt(d,s.pathname,o.signal);if(A.type==="aborted")return{shortCircuited:!0};if(A.type==="error"){let G=Te(A.partialMatches).route.id;return{matches:A.partialMatches,loaderData:{},errors:{[G]:A.error}}}else if(A.matches)d=A.matches;else{let{error:G,notFoundMatches:je,route:Ye}=Et(s.pathname);return{matches:je,loaderData:{},errors:{[Ye.id]:G}}}}let H=c||i,[j,K]=or(e.history,p,d,N,s,m.v7_partialHydration&&P===!0,m.v7_skipActionErrorRevalidation,ce,at,it,oe,Fe,de,H,u,L);if(St(A=>!(d&&d.some(G=>G.route.id===A))||j&&j.some(G=>G.route.id===A)),Ve=++ot,j.length===0&&K.length===0){let A=Kt();return Ne(s,$({matches:d,loaderData:{},errors:L&&ie(L[1])?{[L[0]]:L[1].error}:null},hr(L),A?{fetchers:new Map(p.fetchers)}:{}),{flushSync:S}),{shortCircuited:!0}}if(q){let A={};if(!y){A.navigation=O;let G=Ht(L);G!==void 0&&(A.actionData=G)}K.length>0&&(A.fetchers=qr(K)),te(A,{flushSync:S})}K.forEach(A=>{ye(A.key),A.controller&&Z.set(A.key,A.controller)});let Ae=()=>K.forEach(A=>ye(A.key));F&&F.signal.addEventListener("abort",Ae);let{loaderResults:Ge,fetcherResults:he}=await Wt(p,d,j,K,o);if(o.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",Ae),K.forEach(A=>Z.delete(A.key));let se=mt(Ge);if(se)return await De(o,se.result,!0,{replace:x}),{shortCircuited:!0};if(se=mt(he),se)return de.add(se.key),await De(o,se.result,!0,{replace:x}),{shortCircuited:!0};let{loaderData:xt,errors:Je}=dr(p,d,Ge,L,K,he,xe);xe.forEach((A,G)=>{A.subscribe(je=>{(je||A.done)&&xe.delete(G)})}),m.v7_partialHydration&&P&&p.errors&&(Je=$({},p.errors,Je));let Ce=Kt(),ft=Gt(Ve),ht=Ce||ft||K.length>0;return $({matches:d,loaderData:xt,errors:Je},ht?{fetchers:new Map(p.fetchers)}:{})}function Ht(o){if(o&&!ie(o[1]))return{[o[0]]:o[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function qr(o){return o.forEach(s=>{let d=p.fetchers.get(s.key),y=Qe(void 0,d?d.data:void 0);p.fetchers.set(s.key,y)}),new Map(p.fetchers)}function en(o,s,d,y){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ye(o);let b=(y&&y.flushSync)===!0,D=c||i,T=Ct(p.location,p.matches,u,m.v7_prependBasename,d,m.v7_relativeSplatPath,s,y?.relative),x=Me(D,T,u),P=ct(x,D,T);if(P.active&&P.matches&&(x=P.matches),!x){fe(o,s,ne(404,{pathname:T}),{flushSync:b});return}let{path:S,submission:L,error:O}=ar(m.v7_normalizeFormMethod,!0,T,y);if(O){fe(o,s,O,{flushSync:b});return}let N=qe(x,S),q=(y&&y.preventScrollReset)===!0;if(L&&le(L.formMethod)){tn(o,s,S,N,x,P.active,b,q,L);return}Fe.set(o,{routeId:s,path:S}),rn(o,s,S,N,x,P.active,b,q,L)}async function tn(o,s,d,y,b,D,T,x,P){Rt(),Fe.delete(o);function S(Q){if(!Q.route.action&&!Q.route.lazy){let Be=ne(405,{method:P.formMethod,pathname:d,routeId:s});return fe(o,s,Be,{flushSync:T}),!0}return!1}if(!D&&S(y))return;let L=p.fetchers.get(o);ge(o,oa(P,L),{flushSync:T});let O=new AbortController,N=ze(e.history,d,O.signal,P);if(D){let Q=await dt(b,new URL(N.url).pathname,N.signal,o);if(Q.type==="aborted")return;if(Q.type==="error"){fe(o,s,Q.error,{flushSync:T});return}else if(Q.matches){if(b=Q.matches,y=qe(b,d),S(y))return}else{fe(o,s,ne(404,{pathname:d}),{flushSync:T});return}}Z.set(o,O);let q=ot,j=(await Ke("action",p,N,[y],b,o))[y.route.id];if(N.signal.aborted){Z.get(o)===O&&Z.delete(o);return}if(m.v7_fetcherPersist&&oe.has(o)){if(Ue(j)||ie(j)){ge(o,we(void 0));return}}else{if(Ue(j))if(Z.delete(o),Ve>q){ge(o,we(void 0));return}else return de.add(o),ge(o,Qe(P)),De(N,j,!1,{fetcherSubmission:P,preventScrollReset:x});if(ie(j)){fe(o,s,j.error);return}}if(be(j))throw ne(400,{type:"defer-action"});let K=p.navigation.location||p.location,Ae=ze(e.history,K,O.signal),Ge=c||i,he=p.navigation.state!=="idle"?Me(Ge,p.navigation.location,u):p.matches;I(he,"Didn't find any matches after fetcher action");let se=++ot;Ie.set(o,se);let xt=Qe(P,j.data);p.fetchers.set(o,xt);let[Je,Ce]=or(e.history,p,he,P,K,!1,m.v7_skipActionErrorRevalidation,ce,at,it,oe,Fe,de,Ge,u,[y.route.id,j]);Ce.filter(Q=>Q.key!==o).forEach(Q=>{let Be=Q.key,Zt=p.fetchers.get(Be),cn=Qe(void 0,Zt?Zt.data:void 0);p.fetchers.set(Be,cn),ye(Be),Q.controller&&Z.set(Be,Q.controller)}),te({fetchers:new Map(p.fetchers)});let ft=()=>Ce.forEach(Q=>ye(Q.key));O.signal.addEventListener("abort",ft);let{loaderResults:ht,fetcherResults:A}=await Wt(p,he,Je,Ce,Ae);if(O.signal.aborted)return;O.signal.removeEventListener("abort",ft),Ie.delete(o),Z.delete(o),Ce.forEach(Q=>Z.delete(Q.key));let G=mt(ht);if(G)return De(Ae,G.result,!1,{preventScrollReset:x});if(G=mt(A),G)return de.add(G.key),De(Ae,G.result,!1,{preventScrollReset:x});let{loaderData:je,errors:Ye}=dr(p,he,ht,void 0,Ce,A,xe);if(p.fetchers.has(o)){let Q=we(j.data);p.fetchers.set(o,Q)}Gt(se),p.navigation.state==="loading"&&se>Ve?(I(U,"Expected pending action"),F&&F.abort(),Ne(p.navigation.location,{matches:he,loaderData:je,errors:Ye,fetchers:new Map(p.fetchers)})):(te({errors:Ye,loaderData:fr(p.loaderData,je,he,Ye),fetchers:new Map(p.fetchers)}),ce=!1)}async function rn(o,s,d,y,b,D,T,x,P){let S=p.fetchers.get(o);ge(o,Qe(P,S?S.data:void 0),{flushSync:T});let L=new AbortController,O=ze(e.history,d,L.signal);if(D){let j=await dt(b,new URL(O.url).pathname,O.signal,o);if(j.type==="aborted")return;if(j.type==="error"){fe(o,s,j.error,{flushSync:T});return}else if(j.matches)b=j.matches,y=qe(b,d);else{fe(o,s,ne(404,{pathname:d}),{flushSync:T});return}}Z.set(o,L);let N=ot,H=(await Ke("loader",p,O,[y],b,o))[y.route.id];if(be(H)&&(H=await Ft(H,O.signal,!0)||H),Z.get(o)===L&&Z.delete(o),!O.signal.aborted){if(oe.has(o)){ge(o,we(void 0));return}if(Ue(H))if(Ve>N){ge(o,we(void 0));return}else{de.add(o),await De(O,H,!1,{preventScrollReset:x});return}if(ie(H)){fe(o,s,H.error);return}I(!be(H),"Unhandled fetcher deferred data"),ge(o,we(H.data))}}async function De(o,s,d,y){let{submission:b,fetcherSubmission:D,preventScrollReset:T,replace:x}=y===void 0?{}:y;s.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let P=s.response.headers.get("Location");I(P,"Expected a Location header on the redirect Response"),P=ur(P,new URL(o.url),u,e.history);let S=ke(p.location,P,{_isRedirect:!0});if(r){let j=!1;if(s.response.headers.has("X-Remix-Reload-Document"))j=!0;else if(It.test(P)){const K=e.history.createURL(P);j=K.origin!==t.location.origin||Oe(K.pathname,u)==null}if(j){x?t.location.replace(P):t.location.assign(P);return}}F=null;let L=x===!0||s.response.headers.has("X-Remix-Replace")?V.Replace:V.Push,{formMethod:O,formAction:N,formEncType:q}=p.navigation;!b&&!D&&O&&N&&q&&(b=vr(p.navigation));let H=b||D;if(kn.has(s.response.status)&&H&&le(H.formMethod))await Le(L,S,{submission:$({},H,{formAction:P}),preventScrollReset:T||W,enableViewTransition:d?ee:void 0});else{let j=Dt(S,b);await Le(L,S,{overrideNavigation:j,fetcherSubmission:D,preventScrollReset:T||W,enableViewTransition:d?ee:void 0})}}async function Ke(o,s,d,y,b,D){let T,x={};try{T=await Jn(f,o,s,d,y,b,D,l,a)}catch(P){return y.forEach(S=>{x[S.route.id]={type:z.error,error:P}}),x}for(let[P,S]of Object.entries(T))if(ea(S)){let L=S.result;x[P]={type:z.redirect,response:Qn(L,d,P,b,u,m.v7_relativeSplatPath)}}else x[P]=await Xn(S);return x}async function Wt(o,s,d,y,b){let D=o.matches,T=Ke("loader",o,b,d,s,null),x=Promise.all(y.map(async L=>{if(L.matches&&L.match&&L.controller){let N=(await Ke("loader",o,ze(e.history,L.path,L.controller.signal),[L.match],L.matches,L.key))[L.match.route.id];return{[L.key]:N}}else return Promise.resolve({[L.key]:{type:z.error,error:ne(404,{pathname:L.path})}})})),P=await T,S=(await x).reduce((L,O)=>Object.assign(L,O),{});return await Promise.all([na(s,P,b.signal,D,o.loaderData),aa(s,S,y)]),{loaderResults:P,fetcherResults:S}}function Rt(){ce=!0,at.push(...St()),Fe.forEach((o,s)=>{Z.has(s)&&it.add(s),ye(s)})}function ge(o,s,d){d===void 0&&(d={}),p.fetchers.set(o,s),te({fetchers:new Map(p.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function fe(o,s,d,y){y===void 0&&(y={});let b=Te(p.matches,s);st(o),te({errors:{[b.route.id]:d},fetchers:new Map(p.fetchers)},{flushSync:(y&&y.flushSync)===!0})}function Vt(o){return $e.set(o,($e.get(o)||0)+1),oe.has(o)&&oe.delete(o),p.fetchers.get(o)||Hn}function st(o){let s=p.fetchers.get(o);Z.has(o)&&!(s&&s.state==="loading"&&Ie.has(o))&&ye(o),Fe.delete(o),Ie.delete(o),de.delete(o),m.v7_fetcherPersist&&oe.delete(o),it.delete(o),p.fetchers.delete(o)}function nn(o){let s=($e.get(o)||0)-1;s<=0?($e.delete(o),oe.add(o),m.v7_fetcherPersist||st(o)):$e.set(o,s),te({fetchers:new Map(p.fetchers)})}function ye(o){let s=Z.get(o);s&&(s.abort(),Z.delete(o))}function $t(o){for(let s of o){let d=Vt(s),y=we(d.data);p.fetchers.set(s,y)}}function Kt(){let o=[],s=!1;for(let d of de){let y=p.fetchers.get(d);I(y,"Expected fetcher: "+d),y.state==="loading"&&(de.delete(d),o.push(d),s=!0)}return $t(o),s}function Gt(o){let s=[];for(let[d,y]of Ie)if(y<o){let b=p.fetchers.get(d);I(b,"Expected fetcher: "+d),b.state==="loading"&&(ye(d),Ie.delete(d),s.push(d))}return $t(s),s.length>0}function an(o,s){let d=p.blockers.get(o)||Xe;return Pe.get(o)!==s&&Pe.set(o,s),d}function Jt(o){p.blockers.delete(o),Pe.delete(o)}function ut(o,s){let d=p.blockers.get(o)||Xe;I(d.state==="unblocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="proceeding"||d.state==="blocked"&&s.state==="unblocked"||d.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+s.state);let y=new Map(p.blockers);y.set(o,s),te({blockers:y})}function Yt(o){let{currentLocation:s,nextLocation:d,historyAction:y}=o;if(Pe.size===0)return;Pe.size>1&&Re(!1,"A router only supports one blocker at a time");let b=Array.from(Pe.entries()),[D,T]=b[b.length-1],x=p.blockers.get(D);if(!(x&&x.state==="proceeding")&&T({currentLocation:s,nextLocation:d,historyAction:y}))return D}function Et(o){let s=ne(404,{pathname:o}),d=c||i,{matches:y,route:b}=mr(d);return St(),{notFoundMatches:y,route:b,error:s}}function St(o){let s=[];return xe.forEach((d,y)=>{(!o||o(y))&&(d.cancel(),s.push(y),xe.delete(y))}),s}function on(o,s,d){if(E=o,C=s,R=d||null,!B&&p.navigation===Lt){B=!0;let y=Qt(p.location,p.matches);y!=null&&te({restoreScrollPosition:y})}return()=>{E=null,C=null,R=null}}function Xt(o,s){return R&&R(o,s.map(y=>Lr(y,p.loaderData)))||o.key}function ln(o,s){if(E&&C){let d=Xt(o,s);E[d]=C()}}function Qt(o,s){if(E){let d=Xt(o,s),y=E[d];if(typeof y=="number")return y}return null}function ct(o,s,d){if(h)if(o){if(Object.keys(o[0].params).length>0)return{active:!0,matches:vt(s,d,u,!0)}}else return{active:!0,matches:vt(s,d,u,!0)||[]};return{active:!1,matches:null}}async function dt(o,s,d,y){if(!h)return{type:"success",matches:o};let b=o;for(;;){let D=c==null,T=c||i,x=l;try{await h({signal:d,path:s,matches:b,fetcherKey:y,patch:(L,O)=>{d.aborted||sr(L,O,T,x,a)}})}catch(L){return{type:"error",error:L,partialMatches:b}}finally{D&&!d.aborted&&(i=[...i])}if(d.aborted)return{type:"aborted"};let P=Me(T,s,u);if(P)return{type:"success",matches:P};let S=vt(T,s,u,!0);if(!S||b.length===S.length&&b.every((L,O)=>L.route.id===S[O].route.id))return{type:"success",matches:null};b=S}}function sn(o){l={},c=gt(o,a,void 0,l)}function un(o,s){let d=c==null;sr(o,s,c||i,l,a),d&&(i=[...i],te({}))}return Se={get basename(){return u},get future(){return m},get state(){return p},get routes(){return i},get window(){return t},initialize:Gr,subscribe:Yr,enableScrollRestoration:on,navigate:kt,fetch:en,revalidate:Xr,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:Vt,deleteFetcher:nn,dispose:Jr,getBlocker:an,deleteBlocker:Jt,patchRoutes:un,_internalFetchControllers:Z,_internalActiveDeferreds:xe,_internalSetRoutes:sn},Se}function Vn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ct(e,t,r,n,a,l,i,c){let u,f;if(i){u=[];for(let m of t)if(u.push(m),m.route.id===i){f=m;break}}else u=t,f=t[t.length-1];let h=bt(a||".",wt(u,l),Oe(e.pathname,r)||e.pathname,c==="path");if(a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&f){let m=Nt(h.search);if(f.route.index&&!m)h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let w=new URLSearchParams(h.search),g=w.getAll("index");w.delete("index"),g.filter(R=>R).forEach(R=>w.append("index",R));let E=w.toString();h.search=E?"?"+E:""}}return n&&r!=="/"&&(h.pathname=h.pathname==="/"?r:me([r,h.pathname])),Ee(h)}function ar(e,t,r,n){if(!n||!Vn(n))return{path:r};if(n.formMethod&&!ra(n.formMethod))return{path:r,error:ne(405,{method:n.formMethod})};let a=()=>({path:r,error:ne(400,{type:"invalid-body"})}),l=n.formMethod||"get",i=e?l.toUpperCase():l.toLowerCase(),c=Fr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!le(i))return a();let w=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,E)=>{let[R,C]=E;return""+g+R+"="+C+`
2`},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:w}}}else if(n.formEncType==="application/json"){if(!le(i))return a();try{let w=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:c,formEncType:n.formEncType,formData:void 0,json:w,text:void 0}}}catch{return a()}}}I(typeof FormData=="function","FormData is not available in this environment");let u,f;if(n.formData)u=Tt(n.formData),f=n.formData;else if(n.body instanceof FormData)u=Tt(n.body),f=n.body;else if(n.body instanceof URLSearchParams)u=n.body,f=cr(u);else if(n.body==null)u=new URLSearchParams,f=new FormData;else try{u=new URLSearchParams(n.body),f=cr(u)}catch{return a()}let h={formMethod:i,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(le(h.formMethod))return{path:r,submission:h};let m=pe(r);return t&&m.search&&Nt(m.search)&&u.append("index",""),m.search="?"+u,{path:Ee(m),submission:h}}function ir(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function or(e,t,r,n,a,l,i,c,u,f,h,m,w,g,E,R){let C=R?ie(R[1])?R[1].error:R[1].data:void 0,B=e.createURL(t.location),M=e.createURL(a),k=r;l&&t.errors?k=ir(r,Object.keys(t.errors)[0],!0):R&&ie(R[1])&&(k=ir(r,R[0]));let J=R?R[1].statusCode:void 0,Y=i&&J&&J>=400,Se=k.filter((U,W)=>{let{route:F}=U;if(F.lazy)return!0;if(F.loader==null)return!1;if(l)return Mt(F,t.loaderData,t.errors);if($n(t.loaderData,t.matches[W],U)||u.some(ae=>ae===U.route.id))return!0;let ee=t.matches[W],X=U;return lr(U,$({currentUrl:B,currentParams:ee.params,nextUrl:M,nextParams:X.params},n,{actionResult:C,actionStatus:J,defaultShouldRevalidate:Y?!1:c||B.pathname+B.search===M.pathname+M.search||B.search!==M.search||_r(ee,X)}))}),p=[];return m.forEach((U,W)=>{if(l||!r.some(re=>re.route.id===U.routeId)||h.has(W))return;let F=Me(g,U.path,E);if(!F){p.push({key:W,routeId:U.routeId,path:U.path,matches:null,match:null,controller:null});return}let ee=t.fetchers.get(W),X=qe(F,U.path),ae=!1;w.has(W)?ae=!1:f.has(W)?(f.delete(W),ae=!0):ee&&ee.state!=="idle"&&ee.data===void 0?ae=c:ae=lr(X,$({currentUrl:B,currentParams:t.matches[t.matches.length-1].params,nextUrl:M,nextParams:r[r.length-1].params},n,{actionResult:C,actionStatus:J,defaultShouldRevalidate:Y?!1:c})),ae&&p.push({key:W,routeId:U.routeId,path:U.path,matches:F,match:X,controller:new AbortController})}),[Se,p]}function Mt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function $n(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function _r(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function lr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function sr(e,t,r,n,a){var l;let i;if(e){let f=n[e];I(f,"No route found to patch children into: routeId = "+e),f.children||(f.children=[]),i=f.children}else i=r;let c=t.filter(f=>!i.some(h=>Ir(f,h))),u=gt(c,a,[e||"_","patch",String(((l=i)==null?void 0:l.length)||"0")],n);i.push(...u)}function Ir(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,n)=>{var a;return(a=t.children)==null?void 0:a.some(l=>Ir(r,l))}):!1}async function Kn(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];I(a,"No route found in manifest");let l={};for(let i in n){let u=a[i]!==void 0&&i!=="hasErrorBoundary";Re(!u,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!gn.has(i)&&(l[i]=n[i])}Object.assign(a,l),Object.assign(a,$({},t(a),{lazy:void 0}))}async function Gn(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,l,i)=>Object.assign(a,{[r[i].route.id]:l}),{})}async function Jn(e,t,r,n,a,l,i,c,u,f){let h=l.map(g=>g.route.lazy?Kn(g.route,u,c):void 0),m=l.map((g,E)=>{let R=h[E],C=a.some(M=>M.route.id===g.route.id);return $({},g,{shouldLoad:C,resolve:async M=>(M&&n.method==="GET"&&(g.route.lazy||g.route.loader)&&(C=!0),C?Yn(t,n,g,R,M,f):Promise.resolve({type:z.data,result:void 0}))})}),w=await e({matches:m,request:n,params:l[0].params,fetcherKey:i,context:f});try{await Promise.all(h)}catch{}return w}async function Yn(e,t,r,n,a,l){let i,c,u=f=>{let h,m=new Promise((E,R)=>h=R);c=()=>h(),t.signal.addEventListener("abort",c);let w=E=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:l},...E!==void 0?[E]:[]),g=(async()=>{try{return{type:"data",result:await(a?a(R=>w(R)):w())}}catch(E){return{type:"error",result:E}}})();return Promise.race([g,m])};try{let f=r.route[e];if(n)if(f){let h,[m]=await Promise.all([u(f).catch(w=>{h=w}),n]);if(h!==void 0)throw h;i=m}else if(await n,f=r.route[e],f)i=await u(f);else if(e==="action"){let h=new URL(t.url),m=h.pathname+h.search;throw ne(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:z.data,result:void 0};else if(f)i=await u(f);else{let h=new URL(t.url),m=h.pathname+h.search;throw ne(404,{pathname:m})}I(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:z.error,result:f}}finally{c&&t.signal.removeEventListener("abort",c)}return i}async function Xn(e){let{result:t,type:r}=e;if(Nr(t)){let m;try{let w=t.headers.get("Content-Type");w&&/\bapplication\/json\b/.test(w)?t.body==null?m=null:m=await t.json():m=await t.text()}catch(w){return{type:z.error,error:w}}return r===z.error?{type:z.error,error:new yt(t.status,t.statusText,m),statusCode:t.status,headers:t.headers}:{type:z.data,data:m,statusCode:t.status,headers:t.headers}}if(r===z.error){if(pr(t)){var n,a;if(t.data instanceof Error){var l,i;return{type:z.error,error:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:z.error,error:new yt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:et(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:z.error,error:t,statusCode:et(t)?t.status:void 0}}if(ta(t)){var c,u;return{type:z.deferred,deferredData:t,statusCode:(c=t.init)==null?void 0:c.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(pr(t)){var f,h;return{type:z.data,data:t.data,statusCode:(f=t.init)==null?void 0:f.status,headers:(h=t.init)!=null&&h.headers?new Headers(t.init.headers):void 0}}return{type:z.data,data:t}}function Qn(e,t,r,n,a,l){let i=e.headers.get("Location");if(I(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!It.test(i)){let c=n.slice(0,n.findIndex(u=>u.route.id===r)+1);i=Ct(new URL(t.url),c,a,!0,i,l),e.headers.set("Location",i)}return e}function ur(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(It.test(e)){let l=e,i=l.startsWith("//")?new URL(t.protocol+l):new URL(l);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let c=Oe(i.pathname,r)!=null;if(i.origin===t.origin&&c)return i.pathname+i.search+i.hash}try{let l=n.createURL(e);if(a.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return e}function ze(e,t,r,n){let a=e.createURL(Fr(t)).toString(),l={signal:r};if(n&&le(n.formMethod)){let{formMethod:i,formEncType:c}=n;l.method=i.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(n.json)):c==="text/plain"?l.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?l.body=Tt(n.formData):l.body=n.formData}return new Request(a,l)}function Tt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function cr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Zn(e,t,r,n,a){let l={},i=null,c,u=!1,f={},h=r&&ie(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let w=m.route.id,g=t[w];if(I(!Ue(g),"Cannot handle redirect results in processLoaderData"),ie(g)){let E=g.error;h!==void 0&&(E=h,h=void 0),i=i||{};{let R=Te(e,w);i[R.route.id]==null&&(i[R.route.id]=E)}l[w]=void 0,u||(u=!0,c=et(g.error)?g.error.status:500),g.headers&&(f[w]=g.headers)}else be(g)?(n.set(w,g.deferredData),l[w]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!u&&(c=g.statusCode),g.headers&&(f[w]=g.headers)):(l[w]=g.data,g.statusCode&&g.statusCode!==200&&!u&&(c=g.statusCode),g.headers&&(f[w]=g.headers))}),h!==void 0&&r&&(i={[r[0]]:h},l[r[0]]=void 0),{loaderData:l,errors:i,statusCode:c||200,loaderHeaders:f}}function dr(e,t,r,n,a,l,i){let{loaderData:c,errors:u}=Zn(t,r,n,i);return a.forEach(f=>{let{key:h,match:m,controller:w}=f,g=l[h];if(I(g,"Did not find corresponding fetcher result"),!(w&&w.signal.aborted))if(ie(g)){let E=Te(e.matches,m?.route.id);u&&u[E.route.id]||(u=$({},u,{[E.route.id]:g.error})),e.fetchers.delete(h)}else if(Ue(g))I(!1,"Unhandled fetcher revalidation redirect");else if(be(g))I(!1,"Unhandled fetcher deferred data");else{let E=we(g.data);e.fetchers.set(h,E)}}),{loaderData:c,errors:u}}function fr(e,t,r,n){let a=$({},t);for(let l of r){let i=l.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&l.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function hr(e){return e?ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Te(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function mr(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 ne(e,t){let{pathname:r,routeId:n,method:a,type:l,message:i}=t===void 0?{}:t,c="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(c="Bad Request",a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?u="defer() is not supported in actions":l==="invalid-body"&&(u="Unable to encode submission body")):e===403?(c="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",u='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new yt(e||500,c,new Error(u),!0)}function mt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Ue(a))return{key:n,result:a}}}function Fr(e){let t=typeof e=="string"?pe(e):e;return Ee($({},t,{hash:""}))}function qn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ea(e){return Nr(e.result)&&zn.has(e.result.status)}function be(e){return e.type===z.deferred}function ie(e){return e.type===z.error}function Ue(e){return(e&&e.type)===z.redirect}function pr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function ta(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Nr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ra(e){return Bn.has(e.toLowerCase())}function le(e){return An.has(e.toLowerCase())}async function na(e,t,r,n,a){let l=Object.entries(t);for(let i=0;i<l.length;i++){let[c,u]=l[i],f=e.find(w=>w?.route.id===c);if(!f)continue;let h=n.find(w=>w.route.id===f.route.id),m=h!=null&&!_r(h,f)&&(a&&a[f.route.id])!==void 0;be(u)&&m&&await Ft(u,r,!1).then(w=>{w&&(t[c]=w)})}}async function aa(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:l,controller:i}=r[n],c=t[a];e.find(f=>f?.route.id===l)&&be(c)&&(I(i,"Expected an AbortController for revalidating fetcher deferred result"),await Ft(c,i.signal,!0).then(f=>{f&&(t[a]=f)}))}}async function Ft(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:z.data,data:e.deferredData.unwrappedData}}catch(a){return{type:z.error,error:a}}return{type:z.data,data:e.deferredData.data}}}function Nt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function qe(e,t){let r=typeof t=="string"?pe(t).search:t.search;if(e[e.length-1].route.index&&Nt(r||""))return e[e.length-1];let n=Mr(e);return n[n.length-1]}function vr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Dt(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 ia(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 Qe(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 oa(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 we(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 la(e,t){try{let r=e.sessionStorage.getItem(Ur);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function sa(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Ur,JSON.stringify(r))}catch(n){Re(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}const rt=v.createContext(null),At=v.createContext(null),ve=v.createContext(null),jt=v.createContext(null),ue=v.createContext({outlet:null,matches:[],isDataRoute:!1}),Ar=v.createContext(null);function ua(e,t){let{relative:r}=t===void 0?{}:t;We()||I(!1);let{basename:n,navigator:a}=v.useContext(ve),{hash:l,pathname:i,search:c}=zr(e,{relative:r}),u=i;return n!=="/"&&(u=i==="/"?n:me([n,i])),a.createHref({pathname:u,search:c,hash:l})}function We(){return v.useContext(jt)!=null}function _e(){return We()||I(!1),v.useContext(jt).location}function jr(e){v.useContext(ve).static||v.useLayoutEffect(e)}function Bt(){let{isDataRoute:e}=v.useContext(ue);return e?Ea():ca()}function ca(){We()||I(!1);let e=v.useContext(rt),{basename:t,future:r,navigator:n}=v.useContext(ve),{matches:a}=v.useContext(ue),{pathname:l}=_e(),i=JSON.stringify(wt(a,r.v7_relativeSplatPath)),c=v.useRef(!1);return jr(()=>{c.current=!0}),v.useCallback(function(f,h){if(h===void 0&&(h={}),!c.current)return;if(typeof f=="number"){n.go(f);return}let m=bt(f,JSON.parse(i),l,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:me([t,m.pathname])),(h.replace?n.replace:n.push)(m,h.state,h)},[t,n,i,l,e])}const Br=v.createContext(null);function ti(){return v.useContext(Br)}function da(e){let t=v.useContext(ue).outlet;return t&&v.createElement(Br.Provider,{value:e},t)}function ri(){let{matches:e}=v.useContext(ue),t=e[e.length-1];return t?t.params:{}}function zr(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(ve),{matches:a}=v.useContext(ue),{pathname:l}=_e(),i=JSON.stringify(wt(a,n.v7_relativeSplatPath));return v.useMemo(()=>bt(e,JSON.parse(i),l,r==="path"),[e,i,l,r])}function fa(e,t,r,n){We()||I(!1);let{navigator:a}=v.useContext(ve),{matches:l}=v.useContext(ue),i=l[l.length-1],c=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let f=_e(),h;h=f;let m=h.pathname||"/",w=m;if(u!=="/"){let R=u.replace(/^\//,"").split("/");w="/"+m.replace(/^\//,"").split("/").slice(R.length).join("/")}let g=Me(e,{pathname:w});return ga(g&&g.map(R=>Object.assign({},R,{params:Object.assign({},c,R.params),pathname:me([u,a.encodeLocation?a.encodeLocation(R.pathname).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?u:me([u,a.encodeLocation?a.encodeLocation(R.pathnameBase).pathname:R.pathnameBase])})),l,r,n)}function ha(){let e=Ra(),t=et(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application 
2Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:a},r):null,null)}const ma=v.createElement(ha,null);class pa extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?v.createElement(ue.Provider,{value:this.props.routeContext},v.createElement(Ar.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function va(e){let{routeContext:t,match:r,children:n}=e,a=v.useContext(rt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(ue.Provider,{value:t},n)}function ga(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let h=i.findIndex(m=>m.route.id&&c?.[m.route.id]!==void 0);h>=0||I(!1),i=i.slice(0,Math.min(i.length,h+1))}let u=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(let h=0;h<i.length;h++){let m=i[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(f=h),m.route.id){let{loaderData:w,errors:g}=r,E=m.route.loader&&w[m.route.id]===void 0&&(!g||g[m.route.id]===void 0);if(m.route.lazy||E){u=!0,f>=0?i=i.slice(0,f+1):i=[i[0]];break}}}return i.reduceRight((h,m,w)=>{let g,E=!1,R=null,C=null;r&&(g=c&&m.route.id?c[m.route.id]:void 0,R=m.route.errorElement||ma,u&&(f<0&&w===0?(Sa("route-fallback"),E=!0,C=null):f===w&&(E=!0,C=m.route.hydrateFallbackElement||null)));let B=t.concat(i.slice(0,w+1)),M=()=>{let k;return g?k=R:E?k=C:m.route.Component?k=v.createElement(m.route.Component,null):m.route.element?k=m.route.element:k=h,v.createElement(va,{match:m,routeContext:{outlet:h,matches:B,isDataRoute:r!=null},children:k})};return r&&(m.route.ErrorBoundary||m.route.errorElement||w===0)?v.createElement(pa,{location:r.location,revalidation:r.revalidation,component:R,error:g,children:M(),routeContext:{outlet:null,matches:B,isDataRoute:!0}}):M()},null)}var kr=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(kr||{}),Hr=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(Hr||{});function Wr(e){let t=v.useContext(rt);return t||I(!1),t}function nt(e){let t=v.useContext(At);return t||I(!1),t}function ya(e){let t=v.useContext(ue);return t||I(!1),t}function zt(e){let t=ya(),r=t.matches[t.matches.length-1];return r.route.id||I(!1),r.route.id}function wa(){return nt().navigation}function ni(){let e=Wr(),t=nt();return v.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function ba(){let{matches:e,loaderData:t}=nt();return v.useMemo(()=>e.map(r=>Lr(r,t)),[e,t])}function ai(){let e=nt(),t=zt();if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function Ra(){var e;let t=v.useContext(Ar),r=nt(),n=zt();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ea(){let{router:e}=Wr(kr.UseNavigateStable),t=zt(Hr.UseNavigateStable),r=v.useRef(!1);return jr(()=>{r.current=!0}),v.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,tt({fromRouteId:t},l)))},[e,t])}const gr={};function Sa(e,t,r){gr[e]||(gr[e]=!0)}function Vr(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}const xa="startTransition",yr=Er[xa];function ii(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:l}=e,i=v.useRef();i.current==null&&(i.current=Pr({initialEntries:n,initialIndex:a,v5Compat:!0}));let c=i.current,[u,f]=v.useState({action:c.action,location:c.location}),{v7_startTransition:h}=l||{},m=v.useCallback(w=>{h&&yr?yr(()=>f(w)):f(w)},[f,h]);return v.useLayoutEffect(()=>c.listen(m),[c,m]),v.useEffect(()=>Vr(l),[l]),v.createElement($r,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:c,future:l})}function oi(e){let{to:t,replace:r,state:n,relative:a}=e;We()||I(!1);let{future:l,static:i}=v.useContext(ve),{matches:c}=v.useContext(ue),{pathname:u}=_e(),f=Bt(),h=bt(t,wt(c,l.v7_relativeSplatPath),u,a==="path"),m=JSON.stringify(h);return v.useEffect(()=>f(JSON.parse(m),{replace:r,state:n,relative:a}),[f,m,a,r,n]),null}function li(e){return da(e.context)}function $r(e){let{basename:t="/",children:r=null,location:n,navigationType:a=V.Pop,navigator:l,static:i=!1,future:c}=e;We()&&I(!1);let u=t.replace(/^\/*/,"/"),f=v.useMemo(()=>({basename:u,navigator:l,static:i,future:tt({v7_relativeSplatPath:!1},c)}),[u,c,l,i]);typeof n=="string"&&(n=pe(n));let{pathname:h="/",search:m="",hash:w="",state:g=null,key:E="default"}=n,R=v.useMemo(()=>{let C=Oe(h,u);return C==null?null:{location:{pathname:C,search:m,hash:w,state:g,key:E},navigationType:a}},[u,h,m,w,g,E,a]);return R==null?null:v.createElement(ve.Provider,{value:f},v.createElement(jt.Provider,{children:r,value:R}))}new Promise(()=>{});function Kr(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:v.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function si(e,t){return Or({basename:t?.basename,future:tt({}
2,t?.future,{v7_prependBasename:!0}),history:Pr({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,mapRouteProperties:Kr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation}).initialize()}function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},He.apply(this,arguments)}function Pa(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,l;for(l=0;l<n.length;l++)a=n[l],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function La(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Da(e,t){return e.button===0&&(!t||t==="_self")&&!La(e)}function Ut(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Ca(e,t){let r=Ut(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(l=>{r.append(a,l)})}),r}const Ma=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ta="6";try{window.__reactRouterVersion=Ta}catch{}function ui(e,t){return Or({basename:t?.basename,future:He({},t?.future,{v7_prependBasename:!0}),history:mn({window:t?.window}),hydrationData:t?.hydrationData||Ua(),routes:e,mapRouteProperties:Kr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Ua(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=He({},t,{errors:Oa(t.errors)})),t}function Oa(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new yt(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let l=window[a.__subType];if(typeof l=="function")try{let i=new l(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let l=new Error(a.message);l.stack="",r[n]=l}}else r[n]=a;return r}const _a=v.createContext({isTransitioning:!1}),Ia=v.createContext(new Map),Fa="startTransition",wr=Er[Fa],Na="flushSync",br=dn[Na];function Aa(e){wr?wr(e):e()}function Ze(e){br?br(e):e()}class ja{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function ci(e){let{fallbackElement:t,router:r,future:n}=e,[a,l]=v.useState(r.state),[i,c]=v.useState(),[u,f]=v.useState({isTransitioning:!1}),[h,m]=v.useState(),[w,g]=v.useState(),[E,R]=v.useState(),C=v.useRef(new Map),{v7_startTransition:B}=n||{},M=v.useCallback(U=>{B?Aa(U):U()},[B]),k=v.useCallback((U,W)=>{let{deletedFetchers:F,flushSync:ee,viewTransitionOpts:X}=W;U.fetchers.forEach((re,ce)=>{re.data!==void 0&&C.current.set(ce,re.data)}),F.forEach(re=>C.current.delete(re));let ae=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!X||ae){ee?Ze(()=>l(U)):M(()=>l(U));return}if(ee){Ze(()=>{w&&(h&&h.resolve(),w.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let re=r.window.document.startViewTransition(()=>{Ze(()=>l(U))});re.finished.finally(()=>{Ze(()=>{m(void 0),g(void 0),c(void 0),f({isTransitioning:!1})})}),Ze(()=>g(re));return}w?(h&&h.resolve(),w.skipTransition(),R({state:U,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(c(U),f({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[r.window,w,h,C,M]);v.useLayoutEffect(()=>r.subscribe(k),[r,k]),v.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new ja)},[u]),v.useEffect(()=>{if(h&&i&&r.window){let U=i,W=h.promise,F=r.window.document.startViewTransition(async()=>{M(()=>l(U)),await W});F.finished.finally(()=>{m(void 0),g(void 0),c(void 0),f({isTransitioning:!1})}),g(F)}},[M,i,h,r.window]),v.useEffect(()=>{h&&i&&a.location.key===i.location.key&&h.resolve()},[h,w,a.location,i]),v.useEffect(()=>{!u.isTransitioning&&E&&(c(E.state),f({isTransitioning:!0,flushSync:!1,currentLocation:E.currentLocation,nextLocation:E.nextLocation}),R(void 0))},[u.isTransitioning,E]),v.useEffect(()=>{},[]);let J=v.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:U=>r.navigate(U),push:(U,W,F)=>r.navigate(U,{state:W,preventScrollReset:F?.preventScrollReset}),replace:(U,W,F)=>r.navigate(U,{replace:!0,state:W,preventScrollReset:F?.preventScrollReset})}),[r]),Y=r.basename||"/",Se=v.useMemo(()=>({router:r,navigator:J,static:!1,basename:Y}),[r,J,Y]),p=v.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return v.useEffect(()=>Vr(n,r.future),[n,r.future]),v.createElement(v.Fragment,null,v.createElement(rt.Provider,{value:Se},v.createElement(At.Provider,{value:a},v.createElement(Ia.Provider,{value:C.current},v.createElement(_a.Provider,{value:u},v.createElement($r,{basename:Y,location:a.location,navigationType:a.historyAction,navigator:J,future:p}
2,a.initialized||r.future.v7_partialHydration?v.createElement(Ba,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Ba=v.memo(za);function za(e){let{routes:t,future:r,state:n}=e;return fa(t,void 0,n,r)}const ka=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ha=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,di=v.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:l,replace:i,state:c,target:u,to:f,preventScrollReset:h,viewTransition:m}=t,w=Pa(t,Ma),{basename:g}=v.useContext(ve),E,R=!1;if(typeof f=="string"&&Ha.test(f)&&(E=f,ka))try{let k=new URL(window.location.href),J=f.startsWith("//")?new URL(k.protocol+f):new URL(f),Y=Oe(J.pathname,g);J.origin===k.origin&&Y!=null?f=Y+J.search+J.hash:R=!0}catch{}let C=ua(f,{relative:a}),B=$a(f,{replace:i,state:c,target:u,preventScrollReset:h,relative:a,viewTransition:m});function M(k){n&&n(k),k.defaultPrevented||B(k)}return v.createElement("a",He({},w,{href:E||C,onClick:R||l?n:M,ref:r,target:u}))});function fi(e){let{getKey:t,storageKey:r}=e;return Ka({getKey:t,storageKey:r}),null}var Ot;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ot||(Ot={}));var _t;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(_t||(_t={}));function Wa(e){let t=v.useContext(rt);return t||I(!1),t}function Va(e){let t=v.useContext(At);return t||I(!1),t}function $a(e,t){let{target:r,replace:n,state:a,preventScrollReset:l,relative:i,viewTransition:c}=t===void 0?{}:t,u=Bt(),f=_e(),h=zr(e,{relative:i});return v.useCallback(m=>{if(Da(m,r)){m.preventDefault();let w=n!==void 0?n:Ee(f)===Ee(h);u(e,{replace:w,state:a,preventScrollReset:l,relative:i,viewTransition:c})}},[f,u,h,n,a,r,e,l,i,c])}function hi(e){let t=v.useRef(Ut(e)),r=v.useRef(!1),n=_e(),a=v.useMemo(()=>Ca(n.search,r.current?null:t.current),[n.search]),l=Bt(),i=v.useCallback((c,u)=>{const f=Ut(typeof c=="function"?c(a):c);r.current=!0,l("?"+f,u)},[l,a]);return[a,i]}const Rr="react-router-scroll-positions";let pt={};function Ka(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=Wa(Ot.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:l}=Va(_t.UseScrollRestoration),{basename:i}=v.useContext(ve),c=_e(),u=ba(),f=wa();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Ga(v.useCallback(()=>{if(f.state==="idle"){let h=(t?t(c,u):null)||c.key;pt[h]=window.scrollY}try{sessionStorage.setItem(r||Rr,JSON.stringify(pt))}catch{}window.history.scrollRestoration="auto"},[r,t,f.state,c,u])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let h=sessionStorage.getItem(r||Rr);h&&(pt=JSON.parse(h))}catch{}},[r]),v.useLayoutEffect(()=>{let h=t&&i!=="/"?(w,g)=>t(He({},w,{pathname:Oe(w.pathname,i)||w.pathname}),g):t,m=n?.enableScrollRestoration(pt,()=>window.scrollY,h);return()=>m&&m()},[n,i,t]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(c.hash){let h=document.getElementById(decodeURIComponent(c.hash.slice(1)));if(h){h.scrollIntoView();return}}l!==!0&&window.scrollTo(0,0)}},[c,a,l]))}function Ga(e,t){let{capture:r}={};v.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}export{Ya as B,Xa as D,di as L,ii as M,oi as N,li as O,fn as R,fi as S,Za as a,hn as b,si as c,ci as d,ti as e,ai as f,Qa as g,ba as h,Bt as i,ni as j,ua as k,hi as l,qa as m,ei as n,Ra as o,ri as p,zr as q,ui as r,_e as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.