0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let a=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let f=0,p=c.length;f0&&(r[l]=d,a=!0)}a&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const r=e.attributes;for(const c in r){const d=r[c];this.setAttribute(c,d.clone(n))}const a=e.morphAttributes;for(const c in a){const d=[],f=a[c];for(let p=0,m=f.length;p0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,s=r.length;a(e.far-e.near)**2))&&(z4.copy(a).invert(),dd.copy(e.ray).applyMatrix4(z4),!(i.boundingBox!==null&&dd.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,dd)))}_computeIntersections(e,n,i){let r;const a=this.geometry,s=this.material,o=a.index,l=a.attributes.position,c=a.attributes.uv,d=a.attributes.uv1,f=a.attributes.normal,p=a.groups,m=a.drawRange;if(o!==null)if(Array.isArray(s))for(let y=0,b=p.length;yn.far?null:{distance:c,point:hy.clone(),object:t}}function py(t,e,n,i,r,a,s,o,l,c){t.getVertexPosition(o,cy),t.getVertexPosition(l,uy),t.getVertexPosition(c,dy);const d=zse(t,e,n,i,cy,uy,dy,j4);if(d){const f=new Ge;cg.getBarycoord(j4,cy,uy,dy,f),r&&(d.uv=cg.getInterpolatedAttribute(r,o,l,c,f,new Qt)),a&&(d.uv1=cg.getInterpolatedAttribute(a,o,l,c,f,new Qt)),s&&(d.normal=cg.getInterpolatedAttribute(s,o,l,c,f,new Ge),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const p={a:o,b:l,c,normal:new Ge,materialIndex:0};cg.getNormal(cy,uy,dy,p.normal),d.face=p,d.barycoord=f}return d}let $N=class VG extends Yo{constructor(e=1,n=1,i=1,r=1,a=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:a,depthSegments:s};const o=this;r=Math.floor(r),a=Math.floor(a),s=Math.floor(s);const l=[],c=[],d=[],f=[];let p=0,m=0;y("z","y","x",-1,-1,i,n,e,s,a,0),y("z","y","x",1,-1,i,n,-e,s,a,1),y("x","z","y",1,1,e,i,n,r,s,2),y("x","z","y",1,-1,e,i,-n,r,s,3),y("x","y","z",1,-1,e,n,i,r,a,4),y("x","y","z",-1,-1,e,n,-i,r,a,5),this.setIndex(l),this.setAttribute("position",new fo(c,3)),this.setAttribute("normal",new fo(d,3)),this.setAttribute("uv",new fo(f,2));function y(b,x,g,M,w,E,A,N,R,U,P){const O=E/R,B=A/U,I=E/2,W=A/2,L=N/2,$=R+1,q=U+1;let G=0,K=0;const Q=new Ge;for(let se=0;se0?1:-1,d.push(Q.x,Q.y,Q.z),f.push(X/R),f.push(1-se/U),G+=1}}for(let se=0;se to .`)}let p=Mf(),m;if(e){let M=typeof e=="string"?Gp(e):e;li(d==="/"||M.pathname?.startsWith(d),`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 "${d}" but pathname "${M.pathname}" was given in the \`location\` prop.`),m=M}else m=p;let y=m.pathname||"/",b=y;if(d!=="/"){let M=d.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(M.length).join("/")}let x=RV(t,{pathname:b});po(f||x!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),po(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.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 g=Zee(x&&x.map(M=>Object.assign({},M,{params:Object.assign({},l,M.params),pathname:Gl([d,a.encodeLocation?a.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?d:Gl([d,a.encodeLocation?a.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),s,n,i,r);return e&&g?C.createElement(Q0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},g):g}function qee(){let t=nte(),e=Fee(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),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:a},"ErrorBoundary")," or"," ",C.createElement("code",{style:a},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:r},n):null,s)}var Xee=C.createElement(qee,null),Kee=class extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?C.createElement(Ko.Provider,{value:this.props.routeContext},C.createElement(bN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Yee({routeContext:t,match:e,children:n}){let i=C.useContext($p);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),C.createElement(Ko.Provider,{value:t},n)}function Zee(t,e=[],n=null,i=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,s=n?.errors;if(s!=null){let d=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);li(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,d+1))}let o=!1,l=-1;if(n)for(let d=0;d=0?a=a.slice(0,l+1):a=[a[0]];break}}}let c=n&&i?(d,f)=>{i(d,{location:n.location,params:n.matches?.[0]?.params??{},errorInfo:f})}:void 0;return a.reduceRight((d,f,p)=>{let m,y=!1,b=null,x=null;n&&(m=s&&f.route.id?s[f.route.id]:void 0,b=f.route.errorElement||Xee,o&&(l<0&&p===0?(BV("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,x=null):l===p&&(y=!0,x=f.route.hydrateFallbackElement||null)));let g=e.concat(a.slice(0,p+1)),M=()=>{let w;return m?w=b:y?w=x:f.route.Component?w=C.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,C.createElement(Yee,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?C.createElement(Kee,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:M(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):M()},null)}function _N(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jee(t){let e=C.useContext($p);return li(e,_N(t)),e}function Qee(t){let e=C.useContext(tS);return li(e,_N(t)),e}function ete(t){let e=C.useContext(Ko);return li(e,_N(t)),e}function SN(t){let e=ete(t),n=e.matches[e.matches.length-1];return li(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function tte(){return SN("useRouteId")}function nte(){let t=C.useContext(bN),e=Qee("useRouteError"),n=SN("useRouteError");return t!==void 0?t:e.errors?.[n]}function ite(){let{router:t}=Jee("useNavigate"),e=SN("useNavigate"),n=C.useRef(!1);return UV(()=>{n.current=!0}),C.useCallback(async(r,a={})=>{po(n.current,IV),n.current&&(typeof r=="number"?t.navigate(r):await t.navigate(r,{fromRouteId:e,...a}))},[t,e])}var ZU={};function BV(t,e,n){!e&&!ZU[t]&&(ZU[t]=!0,po(!1,n))}C.memo(rte);function rte({routes:t,future:e,state:n,unstable_onError:i}){return zV(t,void 0,n,i,e)}function ate(t){return $ee(t.context)}function _d(t){li(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function ste({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){li(!ev(),"You cannot render a inside another . You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),o=C.useMemo(()=>({basename:s,navigator:r,static:a,future:{}}),[s,r,a]);typeof n=="string"&&(n=Gp(n));let{pathname:l="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=C.useMemo(()=>{let y=Jl(l,s);return y==null?null:{location:{pathname:y,search:c,hash:d,state:f,key:p},navigationType:i}},[s,l,c,d,f,p,i]);return po(m!=null,` is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the won't render anything.`),m==null?null:C.createElement(Xo.Provider,{value:o},C.createElement(Q0.Provider,{children:e,value:m}))}function ote({children:t,location:e}){return Wee(x2(t),e)}function x2(t,e=[]){let n=[];return C.Children.forEach(t,(i,r)=>{if(!C.isValidElement(i))return;let a=[...e,r];if(i.type===C.Fragment){n.push.apply(n,x2(i.props.children,a));return}li(i.type===_d,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),li(!i.props.index||!i.props.children,"An index route cannot have child routes.");let s={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(s.children=x2(i.props.children,a)),n.push(s)}),n}var Tb="get",Cb="application/x-www-form-urlencoded";function nS(t){return t!=null&&typeof t.tagName=="string"}function lte(t){return nS(t)&&t.tagName.toLowerCase()==="button"}function cte(t){return nS(t)&&t.tagName.toLowerCase()==="form"}function ute(t){return nS(t)&&t.tagName.toLowerCase()==="input"}function dte(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function fte(t,e){return t.button===0&&(!e||e==="_self")&&!dte(t)}var Yx=null;function hte(){if(Yx===null)try{new FormData(document.createElement("form"),0),Yx=!1}catch{Yx=!0}return Yx}var pte=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function UE(t){return t!=null&&!pte.has(t)?(po(!1,`"${t}" is not a valid \`encType\` for \`