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