import{N as m,j as p,m as E,s as h,E as y}from"./chunk-EVOBXE3Y-Bmgys8-c.js";import{R as o}from"./index-CFdT0RIo.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"66e9b849450b819e11683314a547a341cb57f7d0"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="de8316b2-d9e9-4e41-833a-3e963df1380d",e._sentryDebugIdIdentifier="sentry-dbid-de8316b2-d9e9-4e41-833a-3e963df1380d")}catch{}})();[...m];function _(e,...t){let n=t[0],a=w(e).replace(/\/:([\w-]+)(\?)?/g,(r,i,l)=>{const d=l===void 0,s=n?.[i];if(d&&s===void 0)throw new Error(`Path '${e}' requires param '${i}' but it was not provided`);return s===void 0?"":"/"+s});if(e.endsWith("*")){const r=n?.["*"];r!==void 0&&(a+="/"+r)}return a||"/"}function w(e){let t=e.length-1,n=e[t];if(n!=="*"&&n!=="/")return e;for(t--;t>=0&&e[t]==="/";t--);return e.slice(0,t+1)}new TextEncoder;(class extends o.Component{constructor(e){super(e),this.state={error:null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:null,location:e.location}:{error:t.error,location:t.location}}render(){return this.state.error?o.createElement(g,{error:this.state.error,renderAppShell:!0}):this.props.children}});function f({renderAppShell:e,title:t,children:n}){return e?o.createElement("html",{lang:"en"},o.createElement("head",null,o.createElement("meta",{charSet:"utf-8"}),o.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),o.createElement("title",null,t)),o.createElement("body",null,o.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n))):n}function g({error:e,renderAppShell:t}){console.error(e);let n=o.createElement("script",{dangerouslySetInnerHTML:{__html:`
        console.log(
          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
        );
      `}});if(p(e))return o.createElement(f,{renderAppShell:t,title:"Unhandled Thrown Response!"},o.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);let a;if(e instanceof Error)a=e;else{let r=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(r)}return o.createElement(f,{renderAppShell:t,title:"Application Error!"},o.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),o.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),n)}function S(e){if(!e)return null;let t=Object.entries(e),n={};for(let[a,r]of t)if(r&&r.__type==="RouteErrorResponse")n[a]=new y(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let i=window[r.__subType];if(typeof i=="function")try{let l=new i(r.message);l.stack=r.stack,n[a]=l}catch{}}if(n[a]==null){let i=new Error(r.message);i.stack=r.stack,n[a]=i}}else n[a]=r;return n}function D({state:e,routes:t,getRouteInfo:n,location:a,basename:r,isSpaMode:i}){let l={...e,loaderData:{...e.loaderData}},d=E(t,a,r);if(d)for(let s of d){let u=s.route.id,c=n(u);h(u,c.clientLoader,c.hasLoader,i)&&(c.hasHydrateFallback||!c.hasLoader)?delete l.loaderData[u]:c.hasLoader||(l.loaderData[u]=null)}return l}export{S as d,D as g,_ as h};
//# sourceMappingURL=chunk-YQSHRJWW-_QGrg8P_.js.map
