import{b as ro,r as b,a as Ps,R as me,d as za,e as eT,f as $4,j as Qe}from"./react-Bz43BsOl.js";import{a as Pn,v as C4,g as tT}from"./lodash-Ce5o8cht.js";var nd={exports:{}},rd={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Kg;function nT(){if(Kg)return rd;Kg=1;var e=ro();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var h=f(),p=r({inst:{value:h,getSnapshot:f}}),m=p[0].inst,g=p[1];return o(function(){m.value=h,m.getSnapshot=f,u(m)&&g({inst:m})},[d,h,f]),i(function(){return u(m)&&g({inst:m}),d(function(){u(m)&&g({inst:m})})},[d]),a(h),h}function u(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function l(d,f){return f()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return rd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,rd}var Hg;function S4(){return Hg||(Hg=1,nd.exports=nT()),nd.exports}var rT=S4(),id={exports:{}},od={};/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var zg;function iT(){if(zg)return od;zg=1;var e=ro(),t=S4();function n(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,u=e.useDebugValue;return od.useSyncExternalStoreWithSelector=function(l,c,d,f,h){var p=o(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=s(function(){function v(k){if(!y){if(y=!0,D=k,k=f(k),h!==void 0&&m.hasValue){var M=m.value;if(h(M,k))return T=M}return T=k}if(M=T,r(D,k))return M;var w=f(k);return h!==void 0&&h(M,w)?(D=k,M):(D=k,T=w)}var y=!1,D,T,C=d===void 0?null:d;return[function(){return v(c())},C===null?void 0:function(){return v(C())}]},[c,d,f,h]);var g=i(l,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=g},[g]),u(g),g},od}var Wg;function oT(){return Wg||(Wg=1,id.exports=iT()),id.exports}var aT=oT();function sT(e){e()}let D4=sT;const uT=e=>D4=e,lT=()=>D4,qg=Symbol.for("react-redux-context"),Gg=typeof globalThis<"u"?globalThis:{};function cT(){var e;if(!b.createContext)return{};const t=(e=Gg[qg])!=null?e:Gg[qg]=new Map;let n=t.get(b.createContext);return n||(n=b.createContext(null),t.set(b.createContext,n)),n}const Ar=cT();function Vp(e=Ar){return function(){return b.useContext(e)}}const T4=Vp(),R4=()=>{throw new Error("uSES not initialized!")};let A4=R4;const dT=e=>{A4=e},fT=(e,t)=>e===t;function hT(e=Ar){const t=e===Ar?T4:Vp(e);return function(r,i={}){const{equalityFn:o=fT,stabilityCheck:a=void 0,noopCheck:s=void 0}=typeof i=="function"?{equalityFn:i}:i,{store:u,subscription:l,getServerState:c,stabilityCheck:d,noopCheck:f}=t();b.useRef(!0);const h=b.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,a]),p=A4(l.addNestedSub,u.getState,c||u.getState,h,o);return b.useDebugValue(p),p}}const pT=hT();function xe(){return xe=Object.assign?Object.assign.bind():function(e){for(var t=1;tt(i(...o)))}return n}function ch(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function ev(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function P4(e,t){return function(r,{displayName:i}){const o=function(s,u){return o.dependsOnOwnProps?o.mapToProps(s,u):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,u){o.mapToProps=e,o.dependsOnOwnProps=ev(e);let l=o(s,u);return typeof l=="function"&&(o.mapToProps=l,o.dependsOnOwnProps=ev(l),l=o(s,u)),l},o}}function O4(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function DT(e){return e&&typeof e=="object"?ch(t=>ST(e,t)):e?typeof e=="function"?P4(e):O4(e,"mapDispatchToProps"):ch(t=>({dispatch:t}))}function TT(e){return e?typeof e=="function"?P4(e):O4(e,"mapStateToProps"):ch(()=>({}))}function RT(e,t,n){return xe({},n,e,t)}function AT(e){return()=>RT}function PT(){const e=lT();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const tv={notify(){},get:()=>[]};function I4(e,t){let n,r=tv,i=0,o=!1;function a(m){c();const g=r.subscribe(m);let v=!1;return()=>{v||(v=!0,g(),d())}}function s(){r.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return o}function c(){i++,n||(n=t?t.addNestedSub(u):e.subscribe(u),r=PT())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=tv)}function f(){o||(o=!0,c())}function h(){o&&(o=!1,d())}const p={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:f,tryUnsubscribe:h,getListeners:()=>r};return p}const OT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",vl=OT?b.useLayoutEffect:b.useEffect;function nv(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function oi(e,t){if(nv(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{k4=e},MT=[null,null];function _T(e,t,n){vl(()=>e(...t),n)}function FT(e,t,n,r,i,o){e.current=r,n.current=!1,i.current&&(i.current=null,o())}function LT(e,t,n,r,i,o,a,s,u,l,c){if(!e)return()=>{};let d=!1,f=null;const h=()=>{if(d||!s.current)return;const m=t.getState();let g,v;try{g=r(m,i.current)}catch(y){v=y,f=y}v||(f=null),g===o.current?a.current||l():(o.current=g,u.current=g,a.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function NT(e,t){return e===t}function jK(e,t,n,{pure:r,areStatesEqual:i=NT,areOwnPropsEqual:o=oi,areStatePropsEqual:a=oi,areMergedPropsEqual:s=oi,forwardRef:u=!1,context:l=Ar}={}){const c=l,d=TT(e),f=DT(t),h=AT(),p=!!e;return g=>{const v=g.displayName||g.name||"Component",y=`Connect(${v})`,D={shouldHandleStateChanges:p,displayName:y,wrappedComponentName:v,WrappedComponent:g,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:h,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function T(M){const[w,A,S]=b.useMemo(()=>{const{reactReduxForwardedRef:j}=M,J=xn(M,IT);return[M.context,j,J]},[M]),E=b.useMemo(()=>w&&w.Consumer&&wT.isContextConsumer(b.createElement(w.Consumer,null))?w:c,[w,c]),R=b.useContext(E),$=!!M.store&&!!M.store.getState&&!!M.store.dispatch,x=!!R&&!!R.store,I=$?M.store:R.store,F=x?R.getServerState:I.getState,P=b.useMemo(()=>CT(I.dispatch,D),[I]),[O,_]=b.useMemo(()=>{if(!p)return MT;const j=I4(I,$?void 0:R.subscription),J=j.notifyNestedSubs.bind(j);return[j,J]},[I,$,R]),L=b.useMemo(()=>$?R:xe({},R,{subscription:O}),[$,R,O]),N=b.useRef(),U=b.useRef(S),B=b.useRef(),H=b.useRef(!1);b.useRef(!1);const V=b.useRef(!1),z=b.useRef();vl(()=>(V.current=!0,()=>{V.current=!1}),[]);const Y=b.useMemo(()=>()=>B.current&&S===U.current?B.current:P(I.getState(),S),[I,S]),X=b.useMemo(()=>J=>O?LT(p,I,O,P,U,N,H,V,B,_,J):()=>{},[O]);_T(FT,[U,N,H,S,B,_]);let Q;try{Q=k4(X,Y,F?()=>P(F(),S):Y)}catch(j){throw z.current&&(j.message+=` The error may be correlated with this previous error: ${z.current.stack} `),j}vl(()=>{z.current=void 0,B.current=void 0,N.current=Q});const G=b.useMemo(()=>b.createElement(g,xe({},Q,{ref:A})),[A,g,Q]);return b.useMemo(()=>p?b.createElement(E.Provider,{value:L},G):G,[E,G,L])}const k=b.memo(T);if(k.WrappedComponent=g,k.displayName=T.displayName=y,u){const w=b.forwardRef(function(S,E){return b.createElement(k,xe({},S,{reactReduxForwardedRef:E}))});return w.displayName=y,w.WrappedComponent=g,lh(w,g)}return lh(k,g)}}function KK({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:o="once"}){const a=b.useMemo(()=>{const l=I4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:o}},[e,r,i,o]),s=b.useMemo(()=>e.getState(),[e]);vl(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,s]);const u=t||Ar;return b.createElement(u.Provider,{value:a},n)}function M4(e=Ar){const t=e===Ar?T4:Vp(e);return function(){const{store:r}=t();return r}}const _4=M4();function BT(e=Ar){const t=e===Ar?_4:M4(e);return function(){return t().dispatch}}const VT=BT();dT(aT.useSyncExternalStoreWithSelector);kT(rT.useSyncExternalStore);uT(Ps.unstable_batchedUpdates);/** * react-router v7.8.2 * * 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 rv="popstate";function UT(e={}){function t(r,i){let{pathname:o,search:a,hash:s}=r.location;return dh("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ss(i)}return KT(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Sn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jT(){return Math.random().toString(36).substring(2,10)}function iv(e,t){return{usr:e.state,key:e.key,idx:t}}function dh(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Qo(t):t,state:n,key:t&&t.key||r||jT()}}function ss({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 Qo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function KT(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",u=null,l=c();l==null&&(l=0,a.replaceState({...a.state,idx:l},""));function c(){return(a.state||{idx:null}).idx}function d(){s="POP";let g=c(),v=g==null?null:g-l;l=g,u&&u({action:s,location:m.location,delta:v})}function f(g,v){s="PUSH";let y=dh(m.location,g,v);l=c()+1;let D=iv(y,l),T=m.createHref(y);try{a.pushState(D,"",T)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(T)}o&&u&&u({action:s,location:m.location,delta:1})}function h(g,v){s="REPLACE";let y=dh(m.location,g,v);l=c();let D=iv(y,l),T=m.createHref(y);a.replaceState(D,"",T),o&&u&&u({action:s,location:m.location,delta:0})}function p(g){return HT(g)}let m={get action(){return s},get location(){return e(i,a)},listen(g){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(rv,d),u=g,()=>{i.removeEventListener(rv,d),u=null}},createHref(g){return t(i,g)},createURL:p,encodeLocation(g){let v=p(g);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(g){return a.go(g)}};return m}function HT(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ke(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ss(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function F4(e,t,n="/"){return zT(e,t,n,!1)}function zT(e,t,n,r){let i=typeof t=="string"?Qo(t):t,o=Pr(i.pathname||"/",n);if(o==null)return null;let a=L4(e);WT(a);let s=null;for(let u=0;s==null&&u{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(r)&&u)return;Ke(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let d=Sr([r,c.relativePath]),f=n.concat(c);a.children&&a.children.length>0&&(Ke(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),L4(a.children,t,f,d,u)),!(a.path==null&&!a.index)&&t.push({path:d,score:JT(d,a.index),routesMeta:f})};return e.forEach((a,s)=>{if(a.path===""||!a.path?.includes("?"))o(a,s);else for(let u of N4(a.path))o(a,s,!0,u)}),t}function N4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=N4(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function WT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:eR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var qT=/^:[\w-]+$/,GT=3,YT=2,ZT=1,XT=10,QT=-2,ov=e=>e==="*";function JT(e,t){let n=e.split("/"),r=n.length;return n.some(ov)&&(r+=QT),t&&(r+=YT),n.filter(i=>!ov(i)).reduce((i,o)=>i+(qT.test(o)?GT:o===""?ZT:XT),r)}function eR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function tR(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{if(c==="*"){let p=s[f]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const h=s[f];return d&&!h?l[c]=void 0:l[c]=(h||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function nR(e,t=!1,n=!0){Sn(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function rR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Sn(!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 Pr(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function iR(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Qo(e):e;return{pathname:n?n.startsWith("/")?n:oR(n,t):t,search:uR(r),hash:lR(i)}}function oR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ld(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. 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 aR(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Up(e){let t=aR(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function jp(e,t,n,r=!1){let i;typeof e=="string"?i=Qo(e):(i={...e},Ke(!i.pathname||!i.pathname.includes("?"),ld("?","pathname","search",i)),Ke(!i.pathname||!i.pathname.includes("#"),ld("#","pathname","hash",i)),Ke(!i.search||!i.search.includes("#"),ld("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}s=d>=0?t[d]:"/"}let u=iR(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}var Sr=e=>e.join("/").replace(/\/\/+/g,"/"),sR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var B4=["POST","PUT","PATCH","DELETE"];new Set(B4);var dR=["GET",...B4];new Set(dR);var Jo=b.createContext(null);Jo.displayName="DataRouter";var lc=b.createContext(null);lc.displayName="DataRouterState";b.createContext(!1);var V4=b.createContext({isTransitioning:!1});V4.displayName="ViewTransition";var fR=b.createContext(new Map);fR.displayName="Fetchers";var hR=b.createContext(null);hR.displayName="Await";var Hn=b.createContext(null);Hn.displayName="Navigation";var ea=b.createContext(null);ea.displayName="Location";var zn=b.createContext({outlet:null,matches:[],isDataRoute:!1});zn.displayName="Route";var Kp=b.createContext(null);Kp.displayName="RouteError";function pR(e,{relative:t}={}){Ke(ta(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=b.useContext(Hn),{hash:i,pathname:o,search:a}=Os(e,{relative:t}),s=o;return n!=="/"&&(s=o==="/"?n:Sr([n,o])),r.createHref({pathname:s,search:a,hash:i})}function ta(){return b.useContext(ea)!=null}function Fr(){return Ke(ta(),"useLocation() may be used only in the context of a component."),b.useContext(ea).location}function HK(){return b.useContext(ea).navigationType}var U4="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function j4(e){b.useContext(Hn).static||b.useLayoutEffect(e)}function Hp(){let{isDataRoute:e}=b.useContext(zn);return e?TR():mR()}function mR(){Ke(ta(),"useNavigate() may be used only in the context of a component.");let e=b.useContext(Jo),{basename:t,navigator:n}=b.useContext(Hn),{matches:r}=b.useContext(zn),{pathname:i}=Fr(),o=JSON.stringify(Up(r)),a=b.useRef(!1);return j4(()=>{a.current=!0}),b.useCallback((u,l={})=>{if(Sn(a.current,U4),!a.current)return;if(typeof u=="number"){n.go(u);return}let c=jp(u,JSON.parse(o),i,l.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Sr([t,c.pathname])),(l.replace?n.replace:n.push)(c,l.state,l)},[t,n,o,i,e])}b.createContext(null);function zK(){let{matches:e}=b.useContext(zn),t=e[e.length-1];return t?t.params:{}}function Os(e,{relative:t}={}){let{matches:n}=b.useContext(zn),{pathname:r}=Fr(),i=JSON.stringify(Up(n));return b.useMemo(()=>jp(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function gR(e,t){return K4(e,t)}function K4(e,t,n,r,i){Ke(ta(),"useRoutes() may be used only in the context of a component.");let{navigator:o}=b.useContext(Hn),{matches:a}=b.useContext(zn),s=a[a.length-1],u=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;{let y=d&&d.path||"";H4(l,!d||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${l}" (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 f=Fr(),h;if(t){let y=typeof t=="string"?Qo(t):t;Ke(c==="/"||y.pathname?.startsWith(c),`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 "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),h=y}else h=f;let p=h.pathname||"/",m=p;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=F4(e,{pathname:m});Sn(d||g!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Sn(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.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 v=wR(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},u,y.params),pathname:Sr([c,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:Sr([c,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r,i);return t&&v?b.createElement(ea.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},v):v}function vR(){let e=DR(),t=cR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:i},n):null,a)}var yR=b.createElement(vR,null),bR=class extends b.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?b.createElement(zn.Provider,{value:this.props.routeContext},b.createElement(Kp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ER({routeContext:e,match:t,children:n}){let r=b.useContext(Jo);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(zn.Provider,{value:e},n)}function wR(e,t=[],n=null,r=null,i=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 o=e,a=n?.errors;if(a!=null){let l=o.findIndex(c=>c.route.id&&a?.[c.route.id]!==void 0);Ke(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,l+1))}let s=!1,u=-1;if(n)for(let l=0;l=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((l,c,d)=>{let f,h=!1,p=null,m=null;n&&(f=a&&c.route.id?a[c.route.id]:void 0,p=c.route.errorElement||yR,s&&(u<0&&d===0?(H4("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,m=null):u===d&&(h=!0,m=c.route.hydrateFallbackElement||null)));let g=t.concat(o.slice(0,d+1)),v=()=>{let y;return f?y=p:h?y=m:c.route.Component?y=b.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=l,b.createElement(ER,{match:c,routeContext:{outlet:l,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?b.createElement(bR,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0},unstable_onError:r}):v()},null)}function zp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xR(e){let t=b.useContext(Jo);return Ke(t,zp(e)),t}function $R(e){let t=b.useContext(lc);return Ke(t,zp(e)),t}function CR(e){let t=b.useContext(zn);return Ke(t,zp(e)),t}function Wp(e){let t=CR(e),n=t.matches[t.matches.length-1];return Ke(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function SR(){return Wp("useRouteId")}function DR(){let e=b.useContext(Kp),t=$R("useRouteError"),n=Wp("useRouteError");return e!==void 0?e:t.errors?.[n]}function TR(){let{router:e}=xR("useNavigate"),t=Wp("useNavigate"),n=b.useRef(!1);return j4(()=>{n.current=!0}),b.useCallback(async(i,o={})=>{Sn(n.current,U4),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var av={};function H4(e,t,n){!t&&!av[e]&&(av[e]=!0,Sn(!1,n))}b.memo(RR);function RR({routes:e,future:t,state:n,unstable_onError:r}){return K4(e,void 0,n,r,t)}function WK({to:e,replace:t,state:n,relative:r}){Ke(ta()," may be used only in the context of a component.");let{static:i}=b.useContext(Hn);Sn(!i," 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}=b.useContext(zn),{pathname:a}=Fr(),s=Hp(),u=jp(e,Up(o),a,r==="path"),l=JSON.stringify(u);return b.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function AR(e){Ke(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function PR({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){Ke(!ta(),"You cannot render a inside another . You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=b.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=Qo(n));let{pathname:u="/",search:l="",hash:c="",state:d=null,key:f="default"}=n,h=b.useMemo(()=>{let p=Pr(u,a);return p==null?null:{location:{pathname:p,search:l,hash:c,state:d,key:f},navigationType:r}},[a,u,l,c,d,f,r]);return Sn(h!=null,` is not able to match the URL "${u}${l}${c}" because it does not start with the basename, so the won't render anything.`),h==null?null:b.createElement(Hn.Provider,{value:s},b.createElement(ea.Provider,{children:t,value:h}))}function qK({children:e,location:t}){return gR(fh(e),t)}function fh(e,t=[]){let n=[];return b.Children.forEach(e,(r,i)=>{if(!b.isValidElement(r))return;let o=[...t,i];if(r.type===b.Fragment){n.push.apply(n,fh(r.props.children,o));return}Ke(r.type===AR,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),Ke(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=fh(r.props.children,o)),n.push(a)}),n}var Xu="get",Qu="application/x-www-form-urlencoded";function cc(e){return e!=null&&typeof e.tagName=="string"}function OR(e){return cc(e)&&e.tagName.toLowerCase()==="button"}function IR(e){return cc(e)&&e.tagName.toLowerCase()==="form"}function kR(e){return cc(e)&&e.tagName.toLowerCase()==="input"}function MR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _R(e,t){return e.button===0&&(!t||t==="_self")&&!MR(e)}function hh(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function FR(e,t){let n=hh(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var su=null;function LR(){if(su===null)try{new FormData(document.createElement("form"),0),su=!1}catch{su=!0}return su}var NR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cd(e){return e!=null&&!NR.has(e)?(Sn(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Qu}"`),null):e}function BR(e,t){let n,r,i,o,a;if(IR(e)){let s=e.getAttribute("action");r=s?Pr(s,t):null,n=e.getAttribute("method")||Xu,i=cd(e.getAttribute("enctype"))||Qu,o=new FormData(e)}else if(OR(e)||kR(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a