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))&&(Y4.copy(a).invert(),xd.copy(e.ray).applyMatrix4(Y4),!(i.boundingBox!==null&&xd.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,xd)))}_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:vy.clone(),object:t}}function xy(t,e,n,i,r,a,s,o,l,c){t.getVertexPosition(o,hy),t.getVertexPosition(l,py),t.getVertexPosition(c,my);const d=Qse(t,e,n,i,hy,py,my,Q4);if(d){const f=new Ge;mg.getBarycoord(Q4,hy,py,my,f),r&&(d.uv=mg.getInterpolatedAttribute(r,o,l,c,f,new Jt)),a&&(d.uv1=mg.getInterpolatedAttribute(a,o,l,c,f,new Jt)),s&&(d.normal=mg.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};mg.getNormal(hy,py,my,p.normal),d.face=p,d.barycoord=f}return d}let tP=class ZG extends Jo{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 ho(c,3)),this.setAttribute("normal",new ho(d,3)),this.setAttribute("uv",new ho(f,2));function y(b,x,g,M,w,E,A,N,T,U,P){const O=E/T,B=A/U,F=E/2,q=A/2,L=N/2,W=T+1,G=U+1;let $=0,Y=0;const J=new Ge;for(let se=0;se0?1:-1,d.push(J.x,J.y,J.z),f.push(K/T),f.push(1-se/U),$+=1}}for(let se=0;se to .`)}let p=qu(),m;if(e){let M=typeof e=="string"?Zp(e):e;di(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=jV(t,{pathname:b});mo(f||x!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),mo(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=ste(x&&x.map(M=>Object.assign({},M,{params:Object.assign({},l,M.params),pathname:ql([d,a.encodeLocation?a.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?d:ql([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(rv.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},g):g}function nte(){let t=dte(),e=qee(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 ite=C.createElement(nte,null),rte=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(Zo.Provider,{value:this.props.routeContext},C.createElement(RN.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ate({routeContext:t,match:e,children:n}){let i=C.useContext(Qp);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),C.createElement(Zo.Provider,{value:t},n)}function ste(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);di(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||ite,o&&(l<0&&p===0?(QV("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(ate,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?C.createElement(rte,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:M(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):M()},null)}function NN(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ote(t){let e=C.useContext(Qp);return di(e,NN(t)),e}function lte(t){let e=C.useContext(oS);return di(e,NN(t)),e}function cte(t){let e=C.useContext(Zo);return di(e,NN(t)),e}function PN(t){let e=cte(t),n=e.matches[e.matches.length-1];return di(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function ute(){return PN("useRouteId")}function dte(){let t=C.useContext(RN),e=lte("useRouteError"),n=PN("useRouteError");return t!==void 0?t:e.errors?.[n]}function fte(){let{router:t}=ote("useNavigate"),e=PN("useNavigate"),n=C.useRef(!1);return KV(()=>{n.current=!0}),C.useCallback(async(r,a={})=>{mo(n.current,XV),n.current&&(typeof r=="number"?t.navigate(r):await t.navigate(r,{fromRouteId:e,...a}))},[t,e])}var l4={};function QV(t,e,n){!e&&!l4[t]&&(l4[t]=!0,mo(!1,n))}C.memo(hte);function hte({routes:t,future:e,state:n,unstable_onError:i}){return ZV(t,void 0,n,i,e)}function pte(t){return ete(t.context)}function ru(t){di(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function mte({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){di(!av(),"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=Zp(n));let{pathname:l="/",search:c="",hash:d="",state:f=null,key:p="default"}=n,m=C.useMemo(()=>{let y=tc(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 mo(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(Yo.Provider,{value:o},C.createElement(rv.Provider,{children:e,value:m}))}function gte({children:t,location:e}){return tte(T2(t),e)}function T2(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,T2(i.props.children,a));return}di(i.type===ru,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),di(!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=T2(i.props.children,a)),n.push(s)}),n}var Db="get",Ob="application/x-www-form-urlencoded";function lS(t){return t!=null&&typeof t.tagName=="string"}function vte(t){return lS(t)&&t.tagName.toLowerCase()==="button"}function xte(t){return lS(t)&&t.tagName.toLowerCase()==="form"}function yte(t){return lS(t)&&t.tagName.toLowerCase()==="input"}function bte(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function _te(t,e){return t.button===0&&(!e||e==="_self")&&!bte(t)}var ey=null;function Ste(){if(ey===null)try{new FormData(document.createElement("form"),0),ey=!1}catch{ey=!0}return ey}var wte=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $E(t){return t!=null&&!wte.has(t)?(mo(!1,`"${t}" is not a valid \`encType\` for \`