function it(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}},v={};var be;function ut(){if(be)return v;be=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),i=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function _(o){return o===null||typeof o!="object"?null:(o=y&&o[y]||o["@@iterator"],typeof o=="function"?o:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function w(o,p,C){this.props=o,this.context=p,this.refs=m,this.updater=C||E}w.prototype.isReactComponent={},w.prototype.setState=function(o,p){if(typeof o!="object"&&typeof o!="function"&&o!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,o,p,"setState")},w.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function S(){}S.prototype=w.prototype;function x(o,p,C){this.props=o,this.context=p,this.refs=m,this.updater=C||E}var $=x.prototype=new S;$.constructor=x,g($,w.prototype),$.isPureReactComponent=!0;var k=Array.isArray;function N(){}var b={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function j(o,p,C){var R=C.ref;return{$$typeof:e,type:o,key:p,ref:R!==void 0?R:null,props:C}}function J(o,p){return j(o.type,p,o.props)}function X(o){return typeof o=="object"&&o!==null&&o.$$typeof===e}function fe(o){var p={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(C){return p[C]})}var Q=/\/+/g;function q(o,p){return typeof o=="object"&&o!==null&&o.key!=null?fe(""+o.key):p.toString(36)}function M(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(N,N):(o.status="pending",o.then(function(p){o.status==="pending"&&(o.status="fulfilled",o.value=p)},function(p){o.status==="pending"&&(o.status="rejected",o.reason=p)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function K(o,p,C,R,P){var T=typeof o;(T==="undefined"||T==="boolean")&&(o=null);var L=!1;if(o===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(o.$$typeof){case e:case t:L=!0;break;case d:return L=o._init,K(L(o._payload),p,C,R,P)}}if(L)return P=P(o),L=R===""?"."+q(o,0):R,k(P)?(C="",L!=null&&(C=L.replace(Q,"$&/")+"/"),K(P,p,C,"",function(ot){return ot})):P!=null&&(X(P)&&(P=J(P,C+(P.key==null||o&&o.key===P.key?"":(""+P.key).replace(Q,"$&/")+"/")+L)),p.push(P)),1;L=0;var H=R===""?".":R+":";if(k(o))for(var D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),he.exports=lt(),he.exports}var Oe="popstate";function ke(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ct(e={}){function t(r,a){let u=a.state?.masked,{pathname:s,search:f,hash:l}=u||r.location;return ge("",{pathname:s,search:f,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default",u?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:ee(a)}return dt(t,n,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function F(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ft(){return Math.random().toString(36).substring(2,10)}function $e(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ge(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?G(t):t,state:n,key:t&&t.key||r||ft(),unstable_mask:a}}function ee({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 G(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 dt(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:u=!1}=r,s=a.history,f="POP",l=null,i=d();i==null&&(i=0,s.replaceState({...s.state,idx:i},""));function d(){return(s.state||{idx:null}).idx}function h(){f="POP";let m=d(),w=m==null?null:m-i;i=m,l&&l({action:f,location:g.location,delta:w})}function y(m,w){f="PUSH";let S=ke(m)?m:ge(g.location,m,w);i=d()+1;let x=$e(S,i),$=g.createHref(S.unstable_mask||S);try{s.pushState(x,"",$)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign($)}u&&l&&l({action:f,location:g.location,delta:1})}function _(m,w){f="REPLACE";let S=ke(m)?m:ge(g.location,m,w);i=d();let x=$e(S,i),$=g.createHref(S.unstable_mask||S);s.replaceState(x,"",$),u&&l&&l({action:f,location:g.location,delta:0})}function E(m){return ht(m)}let g={get action(){return f},get location(){return e(a,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Oe,h),l=m,()=>{a.removeEventListener(Oe,h),l=null}},createHref(m){return t(a,m)},createURL:E,encodeLocation(m){let w=E(m);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:y,replace:_,go(m){return s.go(m)}};return g}function ht(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),O(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ee(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function He(e,t,n="/"){return pt(e,t,n,!1)}function pt(e,t,n,r){let a=typeof t=="string"?G(t):t,u=W(a.pathname||"/",n);if(u==null)return null;let s=Ue(e);mt(s);let f=null;for(let l=0;f==null&&l{let d={relativePath:i===void 0?s.path||"":i,caseSensitive:s.caseSensitive===!0,childrenIndex:f,route:s};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(r)&&l)return;O(d.relativePath.startsWith(r),`Absolute route path "${d.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(r.length)}let h=U([r,d.relativePath]),y=n.concat(d);s.children&&s.children.length>0&&(O(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Ue(s.children,t,y,h,l)),!(s.path==null&&!s.index)&&t.push({path:h,score:Ct(h,s.index),routesMeta:y})};return e.forEach((s,f)=>{if(s.path===""||!s.path?.includes("?"))u(s,f);else for(let l of Fe(s.path))u(s,f,!0,l)}),t}function Fe(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),u=n.replace(/\?$/,"");if(r.length===0)return a?[u,""]:[u];let s=Fe(r.join("/")),f=[];return f.push(...s.map(l=>l===""?u:[u,l].join("/"))),a&&f.push(...s),f.map(l=>e.startsWith("/")&&l===""?"/":l)}function mt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_t(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var yt=/^:[\w-]+$/,gt=3,vt=2,Rt=1,Et=10,wt=-2,Ae=e=>e==="*";function Ct(e,t){let n=e.split("/"),r=n.length;return n.some(Ae)&&(r+=wt),t&&(r+=vt),n.filter(a=>!Ae(a)).reduce((a,u)=>a+(yt.test(u)?gt:u===""?Rt:Et),r)}function _t(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function St(e,t,n=!1){let{routesMeta:r}=e,a={},u="/",s=[];for(let f=0;f{if(d==="*"){let E=f[y]||"";s=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const _=f[y];return h&&!_?i[d]=void 0:i[d]=(_||"").replace(/%2F/g,"/"),i},{}),pathname:u,pathnameBase:s,pattern:e}}function xt(e,t=!1,n=!0){F(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,f,l,i,d)=>{if(r.push({paramName:f,isOptional:l!=null}),l){let h=d.charAt(i+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function bt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return F(!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 W(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)||"/"}var Pt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Tt(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?G(e):e,u;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?u=De(n.substring(1),"/"):u=De(n,t)):u=t,{pathname:u,search:kt(r),hash:$t(a)}}function De(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function pe(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 Lt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Be(e){let t=Lt(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Re(e,t,n,r=!1){let a;typeof e=="string"?a=G(e):(a={...e},O(!a.pathname||!a.pathname.includes("?"),pe("?","pathname","search",a)),O(!a.pathname||!a.pathname.includes("#"),pe("#","pathname","hash",a)),O(!a.search||!a.search.includes("#"),pe("#","search","hash",a)));let u=e===""||a.pathname==="",s=u?"/":a.pathname,f;if(s==null)f=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let y=s.split("/");for(;y[0]==="..";)y.shift(),h-=1;a.pathname=y.join("/")}f=h>=0?t[h]:"/"}let l=Tt(a,f),i=s&&s!=="/"&&s.endsWith("/"),d=(u||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(i||d)&&(l.pathname+="/"),l}var U=e=>e.join("/").replace(/\/\/+/g,"/"),Ot=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$t=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,At=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Dt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Nt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function We(e,t){let n=e;if(typeof n!="string"||!Pt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(je)try{let u=new URL(window.location.href),s=n.startsWith("//")?new URL(u.protocol+n):new URL(n),f=W(s.pathname,t);s.origin===u.origin&&f!=null?n=f+s.search+s.hash:a=!0}catch{F(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ye=["POST","PUT","PATCH","DELETE"];new Set(Ye);var It=["GET",...Ye];new Set(It);var V=c.createContext(null);V.displayName="DataRouter";var se=c.createContext(null);se.displayName="DataRouterState";var Mt=c.createContext(!1),ze=c.createContext({isTransitioning:!1});ze.displayName="ViewTransition";var Ht=c.createContext(new Map);Ht.displayName="Fetchers";var Ut=c.createContext(null);Ut.displayName="Await";var I=c.createContext(null);I.displayName="Navigation";var te=c.createContext(null);te.displayName="Location";var Y=c.createContext({outlet:null,matches:[],isDataRoute:!1});Y.displayName="Route";var Ee=c.createContext(null);Ee.displayName="RouteError";var qe="REACT_ROUTER_ERROR",Ft="REDIRECT",Bt="ROUTE_ERROR_RESPONSE";function jt(e){if(e.startsWith(`${qe}:${Ft}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Wt(e){if(e.startsWith(`${qe}:${Bt}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new At(t.status,t.statusText,t.data)}catch{}}function Yt(e,{relative:t}={}){O(re(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=c.useContext(I),{hash:a,pathname:u,search:s}=ne(e,{relative:t}),f=u;return n!=="/"&&(f=u==="/"?n:U([n,u])),r.createHref({pathname:f,search:s,hash:a})}function re(){return c.useContext(te)!=null}function z(){return O(re(),"useLocation() may be used only in the context of a component."),c.useContext(te).location}var Ke="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ge(e){c.useContext(I).static||c.useLayoutEffect(e)}function zt(){let{isDataRoute:e}=c.useContext(Y);return e?ar():qt()}function qt(){O(re(),"useNavigate() may be used only in the context of a component.");let e=c.useContext(V),{basename:t,navigator:n}=c.useContext(I),{matches:r}=c.useContext(Y),{pathname:a}=z(),u=JSON.stringify(Be(r)),s=c.useRef(!1);return Ge(()=>{s.current=!0}),c.useCallback((l,i={})=>{if(F(s.current,Ke),!s.current)return;if(typeof l=="number"){n.go(l);return}let d=Re(l,JSON.parse(u),a,i.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:U([t,d.pathname])),(i.replace?n.replace:n.push)(d,i.state,i)},[t,n,u,a,e])}c.createContext(null);function ne(e,{relative:t}={}){let{matches:n}=c.useContext(Y),{pathname:r}=z(),a=JSON.stringify(Be(n));return c.useMemo(()=>Re(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function Kt(e,t){return Ve(e,t)}function Ve(e,t,n){O(re(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=c.useContext(I),{matches:a}=c.useContext(Y),u=a[a.length-1],s=u?u.params:{},f=u?u.pathname:"/",l=u?u.pathnameBase:"/",i=u&&u.route;{let m=i&&i.path||"";Xe(f,!i||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (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 d=z(),h;if(t){let m=typeof t=="string"?G(t):t;O(l==="/"||m.pathname?.startsWith(l),`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 "${l}" but pathname "${m.pathname}" was given in the \`location\` prop.`),h=m}else h=d;let y=h.pathname||"/",_=y;if(l!=="/"){let m=l.replace(/^\//,"").split("/");_="/"+y.replace(/^\//,"").split("/").slice(m.length).join("/")}let E=He(e,{pathname:_});F(i||E!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),F(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.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 g=Qt(E&&E.map(m=>Object.assign({},m,{params:Object.assign({},s,m.params),pathname:U([l,r.encodeLocation?r.encodeLocation(m.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:U([l,r.encodeLocation?r.encodeLocation(m.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),a,n);return t&&g?c.createElement(te.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},g):g}function Gt(){let e=nr(),t=Dt(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)",a={padding:"0.5rem",backgroundColor:r},u={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),n?c.createElement("pre",{style:a},n):null,s)}var Vt=c.createElement(Gt,null),Je=class extends c.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.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Wt(e.digest);n&&(e=n)}let t=e!==void 0?c.createElement(Y.Provider,{value:this.props.routeContext},c.createElement(Ee.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(Jt,{error:e},t):t}};Je.contextType=Mt;var me=new WeakMap;function Jt({children:e,error:t}){let{basename:n}=c.useContext(I);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=jt(t.digest);if(r){let a=me.get(t);if(a)throw a;let u=We(r.location,n);if(je&&!me.get(t))if(u.isExternal||r.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:r.replace}));throw me.set(t,s),s}return c.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function Xt({routeContext:e,match:t,children:n}){let r=c.useContext(V);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(Y.Provider,{value:e},n)}function Qt(e,t=[],n){let r=n?.state;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 a=e,u=r?.errors;if(u!=null){let d=a.findIndex(h=>h.route.id&&u?.[h.route.id]!==void 0);O(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let s=!1,f=-1;if(n&&r){s=r.renderFallback;for(let d=0;d=0?a=a.slice(0,f+1):a=[a[0]];break}}}}let l=n?.onError,i=r&&l?(d,h)=>{l(d,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:Nt(r.matches),errorInfo:h})}:void 0;return a.reduceRight((d,h,y)=>{let _,E=!1,g=null,m=null;r&&(_=u&&h.route.id?u[h.route.id]:void 0,g=h.route.errorElement||Vt,s&&(f<0&&y===0?(Xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,m=null):f===y&&(E=!0,m=h.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,y+1)),S=()=>{let x;return _?x=g:E?x=m:h.route.Component?x=c.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,c.createElement(Xt,{match:h,routeContext:{outlet:d,matches:w,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||y===0)?c.createElement(Je,{location:r.location,revalidation:r.revalidation,component:g,error:_,children:S(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:i}):S()},null)}function we(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zt(e){let t=c.useContext(V);return O(t,we(e)),t}function er(e){let t=c.useContext(se);return O(t,we(e)),t}function tr(e){let t=c.useContext(Y);return O(t,we(e)),t}function Ce(e){let t=tr(e),n=t.matches[t.matches.length-1];return O(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function rr(){return Ce("useRouteId")}function nr(){let e=c.useContext(Ee),t=er("useRouteError"),n=Ce("useRouteError");return e!==void 0?e:t.errors?.[n]}function ar(){let{router:e}=Zt("useNavigate"),t=Ce("useNavigate"),n=c.useRef(!1);return Ge(()=>{n.current=!0}),c.useCallback(async(a,u={})=>{F(n.current,Ke),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...u}))},[e,t])}var Ne={};function Xe(e,t,n){!t&&!Ne[e]&&(Ne[e]=!0,F(!1,n))}c.memo(or);function or({routes:e,future:t,state:n,isStatic:r,onError:a}){return Ve(e,void 0,{state:n,isStatic:r,onError:a})}function ir(e){O(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ur({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:u=!1,unstable_useTransitions:s}){O(!re(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),l=c.useMemo(()=>({basename:f,navigator:a,static:u,unstable_useTransitions:s,future:{}}),[f,a,u,s]);typeof n=="string"&&(n=G(n));let{pathname:i="/",search:d="",hash:h="",state:y=null,key:_="default",unstable_mask:E}=n,g=c.useMemo(()=>{let m=W(i,f);return m==null?null:{location:{pathname:m,search:d,hash:h,state:y,key:_,unstable_mask:E},navigationType:r}},[f,i,d,h,y,_,r,E]);return F(g!=null,` is not able to match the URL "${i}${d}${h}" because it does not start with the basename, so the won't render anything.`),g==null?null:c.createElement(I.Provider,{value:l},c.createElement(te.Provider,{children:t,value:g}))}function Br({children:e,location:t}){return Kt(ve(e),t)}function ve(e,t=[]){let n=[];return c.Children.forEach(e,(r,a)=>{if(!c.isValidElement(r))return;let u=[...t,a];if(r.type===c.Fragment){n.push.apply(n,ve(r.props.children,u));return}O(r.type===ir,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),O(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||u.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,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&&(s.children=ve(r.props.children,u)),n.push(s)}),n}var ie="get",ue="application/x-www-form-urlencoded";function ce(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function lr(e){return ce(e)&&e.tagName.toLowerCase()==="button"}function sr(e){return ce(e)&&e.tagName.toLowerCase()==="form"}function cr(e){return ce(e)&&e.tagName.toLowerCase()==="input"}function fr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dr(e,t){return e.button===0&&(!t||t==="_self")&&!fr(e)}var oe=null;function hr(){if(oe===null)try{new FormData(document.createElement("form"),0),oe=!1}catch{oe=!0}return oe}var pr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ye(e){return e!=null&&!pr.has(e)?(F(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ue}"`),null):e}function mr(e,t){let n,r,a,u,s;if(sr(e)){let f=e.getAttribute("action");r=f?W(f,t):null,n=e.getAttribute("method")||ie,a=ye(e.getAttribute("enctype"))||ue,u=new FormData(e)}else if(lr(e)||cr(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a