import{r as l}from"./vendor-react-core-DjsjKnCi.js";import"./vendor-other-CdRIx1s3.js";/** * react-router v7.1.5 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */var le="popstate";function Se(e={}){function t(a,r){let{pathname:o,search:s,hash:c}=a.location;return G("",{pathname:o,search:s,hash:c},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(a,r){return typeof r=="string"?r:M(r)}return ke(t,n,null,e)}function E(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Le(){return Math.random().toString(36).substring(2,10)}function ie(e,t){return{usr:e.state,key:e.key,idx:t}}function G(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?T(t):t,state:n,key:t&&t.key||a||Le()}}function M({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function T(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function ke(e,t,n,a={}){let{window:r=document.defaultView,v5Compat:o=!1}=a,s=r.history,c="POP",u=null,i=f();i==null&&(i=0,s.replaceState({...s.state,idx:i},""));function f(){return(s.state||{idx:null}).idx}function h(){c="POP";let d=f(),p=d==null?null:d-i;i=d,u&&u({action:c,location:v.location,delta:p})}function g(d,p){c="PUSH";let x=G(v.location,d,p);i=f()+1;let y=ie(x,i),R=v.createHref(x);try{s.pushState(y,"",R)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;r.location.assign(R)}o&&u&&u({action:c,location:v.location,delta:1})}function m(d,p){c="REPLACE";let x=G(v.location,d,p);i=f();let y=ie(x,i),R=v.createHref(x);s.replaceState(y,"",R),o&&u&&u({action:c,location:v.location,delta:0})}function w(d){let p=r.location.origin!=="null"?r.location.origin:r.location.href,x=typeof d=="string"?d:M(d);return x=x.replace(/ $/,"%20"),E(p,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,p)}let v={get action(){return c},get location(){return e(r,s)},listen(d){if(u)throw new Error("A history only accepts one active listener");return r.addEventListener(le,h),u=d,()=>{r.removeEventListener(le,h),u=null}},createHref(d){return t(r,d)},createURL:w,encodeLocation(d){let p=w(d);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:g,replace:m,go(d){return s.go(d)}};return v}function fe(e,t,n="/"){return $e(e,t,n,!1)}function $e(e,t,n,a){let r=typeof t=="string"?T(t):t,o=$(r.pathname||"/",n);if(o==null)return null;let s=he(e);Fe(s);let c=null;for(let u=0;c==null&&u{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(E(u.relativePath.startsWith(a),`Absolute route path "${u.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(a.length));let i=k([a,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(E(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${i}".`),he(o.children,t,f,i)),!(o.path==null&&!o.index)&&t.push({path:i,score:Me(i,o.index),routesMeta:f})};return e.forEach((o,s)=>{var c;if(o.path===""||!((c=o.path)!=null&&c.includes("?")))r(o,s);else for(let u of de(o.path))r(o,s,u)}),t}function de(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return r?[o,""]:[o];let s=de(a.join("/")),c=[];return c.push(...s.map(u=>u===""?o:[o,u].join("/"))),r&&c.push(...s),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function Fe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ae(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var Ne=/^:[\w-]+$/,Te=3,Ie=2,De=1,Be=10,Oe=-2,ue=e=>e==="*";function Me(e,t){let n=e.split("/"),a=n.length;return n.some(ue)&&(a+=Oe),t&&(a+=Ie),n.filter(r=>!ue(r)).reduce((r,o)=>r+(Ne.test(o)?Te:o===""?De:Be),a)}function Ae(e,t){return e.length===t.length&&e.slice(0,-1).every((a,r)=>a===t[r])?e[e.length-1]-t[t.length-1]:0}function Ue(e,t,n=!1){let{routesMeta:a}=e,r={},o="/",s=[];for(let c=0;c{if(f==="*"){let w=c[g]||"";s=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const m=c[g];return h&&!m?i[f]=void 0:i[f]=(m||"").replace(/%2F/g,"/"),i},{}),pathname:o,pathnameBase:s,pattern:e}}function We(e,t=!1,n=!0){P(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=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,u)=>(a.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),a]}function He(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return P(!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 $(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function _e(e,t="/"){let{pathname:n,search:a="",hash:r=""}=typeof e=="string"?T(e):e;return{pathname:n?n.startsWith("/")?n:Ve(n,t):t,search:Ke(a),hash:je(r)}}function Ve(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function Y(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function ze(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Q(e){let t=ze(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Z(e,t,n,a=!1){let r;typeof e=="string"?r=T(e):(r={...e},E(!r.pathname||!r.pathname.includes("?"),Y("?","pathname","search",r)),E(!r.pathname||!r.pathname.includes("#"),Y("#","pathname","hash",r)),E(!r.search||!r.search.includes("#"),Y("#","search","hash",r)));let o=e===""||r.pathname==="",s=o?"/":r.pathname,c;if(s==null)c=n;else{let h=t.length-1;if(!a&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),h-=1;r.pathname=g.join("/")}c=h>=0?t[h]:"/"}let u=_e(r,c),i=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(i||f)&&(u.pathname+="/"),u}var k=e=>e.join("/").replace(/\/\/+/g,"/"),Je=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ke=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,je=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ye(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var me=["POST","PUT","PATCH","DELETE"];new Set(me);var qe=["GET",...me];new Set(qe);var I=l.createContext(null);I.displayName="DataRouter";var K=l.createContext(null);K.displayName="DataRouterState";var pe=l.createContext({isTransitioning:!1});pe.displayName="ViewTransition";var Ge=l.createContext(new Map);Ge.displayName="Fetchers";var Xe=l.createContext(null);Xe.displayName="Await";var S=l.createContext(null);S.displayName="Navigation";var A=l.createContext(null);A.displayName="Location";var L=l.createContext({outlet:null,matches:[],isDataRoute:!1});L.displayName="Route";var ee=l.createContext(null);ee.displayName="RouteError";function Qe(e,{relative:t}={}){E(D(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:a}=l.useContext(S),{hash:r,pathname:o,search:s}=U(e,{relative:t}),c=o;return n!=="/"&&(c=o==="/"?n:k([n,o])),a.createHref({pathname:c,search:s,hash:r})}function D(){return l.useContext(A)!=null}function F(){return E(D(),"useLocation() may be used only in the context of a component."),l.useContext(A).location}var ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ge(e){l.useContext(S).static||l.useLayoutEffect(e)}function ve(){let{isDataRoute:e}=l.useContext(L);return e?dt():Ze()}function Ze(){E(D(),"useNavigate() may be used only in the context of a component.");let e=l.useContext(I),{basename:t,navigator:n}=l.useContext(S),{matches:a}=l.useContext(L),{pathname:r}=F(),o=JSON.stringify(Q(a)),s=l.useRef(!1);return ge(()=>{s.current=!0}),l.useCallback((u,i={})=>{if(P(s.current,ye),!s.current)return;if(typeof u=="number"){n.go(u);return}let f=Z(u,JSON.parse(o),r,i.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:k([t,f.pathname])),(i.replace?n.replace:n.push)(f,i.state,i)},[t,n,o,r,e])}var et=l.createContext(null);function tt(e){let t=l.useContext(L).outlet;return t&&l.createElement(et.Provider,{value:e},t)}function U(e,{relative:t}={}){let{matches:n}=l.useContext(L),{pathname:a}=F(),r=JSON.stringify(Q(n));return l.useMemo(()=>Z(e,JSON.parse(r),a,t==="path"),[e,r,a,t])}function nt(e,t){return we(e,t)}function we(e,t,n,a){var x;E(D(),"useRoutes() may be used only in the context of a component.");let{navigator:r,static:o}=l.useContext(S),{matches:s}=l.useContext(L),c=s[s.length-1],u=c?c.params:{},i=c?c.pathname:"/",f=c?c.pathnameBase:"/",h=c&&c.route;{let y=h&&h.path||"";xe(i,!h||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${i}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let g=F(),m;if(t){let y=typeof t=="string"?T(t):t;E(f==="/"||((x=y.pathname)==null?void 0:x.startsWith(f)),`When overriding the location using \`\` 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 "${f}" but pathname "${y.pathname}" was given in the \`location\` prop.`),m=y}else m=g;let w=m.pathname||"/",v=w;if(f!=="/"){let y=f.replace(/^\//,"").split("/");v="/"+w.replace(/^\//,"").split("/").slice(y.length).join("/")}let d=!o&&n&&n.matches&&n.matches.length>0?n.matches:fe(e,{pathname:v});P(h||d!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),P(d==null||d[d.length-1].route.element!==void 0||d[d.length-1].route.Component!==void 0||d[d.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let p=it(d&&d.map(y=>Object.assign({},y,{params:Object.assign({},u,y.params),pathname:k([f,r.encodeLocation?r.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?f:k([f,r.encodeLocation?r.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,n,a);return t&&p?l.createElement(A.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},p):p}function rt(){let e=ht(),t=Ye(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:o},"ErrorBoundary")," or"," ",l.createElement("code",{style:o},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),n?l.createElement("pre",{style:r},n):null,s)}var at=l.createElement(rt,null),ot=class extends l.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?l.createElement(L.Provider,{value:this.props.routeContext},l.createElement(ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function lt({routeContext:e,match:t,children:n}){let a=l.useContext(I);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(L.Provider,{value:e},n)}function it(e,t=[],n=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let r=e,o=n==null?void 0:n.errors;if(o!=null){let u=r.findIndex(i=>i.route.id&&(o==null?void 0:o[i.route.id])!==void 0);E(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),r=r.slice(0,Math.min(r.length,u+1))}let s=!1,c=-1;if(n)for(let u=0;u=0?r=r.slice(0,c+1):r=[r[0]];break}}}return r.reduceRight((u,i,f)=>{let h,g=!1,m=null,w=null;n&&(h=o&&i.route.id?o[i.route.id]:void 0,m=i.route.errorElement||at,s&&(c<0&&f===0?(xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):c===f&&(g=!0,w=i.route.hydrateFallbackElement||null)));let v=t.concat(r.slice(0,f+1)),d=()=>{let p;return h?p=m:g?p=w:i.route.Component?p=l.createElement(i.route.Component,null):i.route.element?p=i.route.element:p=u,l.createElement(lt,{match:i,routeContext:{outlet:u,matches:v,isDataRoute:n!=null},children:p})};return n&&(i.route.ErrorBoundary||i.route.errorElement||f===0)?l.createElement(ot,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:d(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):d()},null)}function te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ut(e){let t=l.useContext(I);return E(t,te(e)),t}function st(e){let t=l.useContext(K);return E(t,te(e)),t}function ct(e){let t=l.useContext(L);return E(t,te(e)),t}function ne(e){let t=ct(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ft(){return ne("useRouteId")}function ht(){var a;let e=l.useContext(ee),t=st("useRouteError"),n=ne("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function dt(){let{router:e}=ut("useNavigate"),t=ne("useNavigate"),n=l.useRef(!1);return ge(()=>{n.current=!0}),l.useCallback(async(r,o={})=>{P(n.current,ye),n.current&&(typeof r=="number"?e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}var se={};function xe(e,t,n){!t&&!se[e]&&(se[e]=!0,P(!1,n))}l.memo(mt);function mt({routes:e,future:t,state:n}){return we(e,void 0,n,t)}function Xt({to:e,replace:t,state:n,relative:a}){E(D()," may be used only in the context of a component.");let{static:r}=l.useContext(S);P(!r," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:o}=l.useContext(L),{pathname:s}=F(),c=ve(),u=Z(e,Q(o),s,a==="path"),i=JSON.stringify(u);return l.useEffect(()=>{c(JSON.parse(i),{replace:t,state:n,relative:a})},[c,i,a,t,n]),null}function Qt(e){return tt(e.context)}function pt(e){E(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function yt({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:r,static:o=!1}){E(!D(),"You cannot render a inside another . You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),c=l.useMemo(()=>({basename:s,navigator:r,static:o,future:{}}),[s,r,o]);typeof n=="string"&&(n=T(n));let{pathname:u="/",search:i="",hash:f="",state:h=null,key:g="default"}=n,m=l.useMemo(()=>{let w=$(u,s);return w==null?null:{location:{pathname:w,search:i,hash:f,state:h,key:g},navigationType:a}},[s,u,i,f,h,g,a]);return P(m!=null,` is not able to match the URL "${u}${i}${f}" because it does not start with the basename, so the won't render anything.`),m==null?null:l.createElement(S.Provider,{value:c},l.createElement(A.Provider,{children:t,value:m}))}function Zt({children:e,location:t}){return nt(X(e),t)}function X(e,t=[]){let n=[];return l.Children.forEach(e,(a,r)=>{if(!l.isValidElement(a))return;let o=[...t,r];if(a.type===l.Fragment){n.push.apply(n,X(a.props.children,o));return}E(a.type===pt,`[${typeof a.type=="string"?a.type:a.type.name}] is not a component. All component children of must be a or `),E(!a.props.index||!a.props.children,"An index route cannot have child routes.");let s={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,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&&(s.children=X(a.props.children,o)),n.push(s)}),n}var V="get",z="application/x-www-form-urlencoded";function j(e){return e!=null&&typeof e.tagName=="string"}function gt(e){return j(e)&&e.tagName.toLowerCase()==="button"}function vt(e){return j(e)&&e.tagName.toLowerCase()==="form"}function wt(e){return j(e)&&e.tagName.toLowerCase()==="input"}function xt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Et(e,t){return e.button===0&&(!t||t==="_self")&&!xt(e)}var _=null;function Rt(){if(_===null)try{new FormData(document.createElement("form"),0),_=!1}catch{_=!0}return _}var Ct=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function q(e){return e!=null&&!Ct.has(e)?(P(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${z}"`),null):e}function bt(e,t){let n,a,r,o,s;if(vt(e)){let c=e.getAttribute("action");a=c?$(c,t):null,n=e.getAttribute("method")||V,r=q(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(gt(e)||wt(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a