0&&(i[c]=d,s=!0)}s&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const l=this.boundingSphere;return l!==null&&(e.data.boundingSphere=l.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 r=e.index;r!==null&&this.setIndex(r.clone());const i=e.attributes;for(const u in i){const d=i[u];this.setAttribute(u,d.clone(n))}const s=e.morphAttributes;for(const u in s){const d=[],h=s[u];for(let f=0,p=h.length;f0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=i.length;s(e.far-e.near)**2))&&(b8.copy(s).invert(),Rm.copy(e.ray).applyMatrix4(b8),!(r.boundingBox!==null&&Rm.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,Rm)))}_computeIntersections(e,n,r){let i;const s=this.geometry,o=this.material,l=s.index,c=s.attributes.position,u=s.attributes.uv,d=s.attributes.uv1,h=s.attributes.normal,f=s.groups,p=s.drawRange;if(l!==null)if(Array.isArray(o))for(let x=0,y=f.length;xn.far?null:{distance:u,point:ES.clone(),object:t}}function jS(t,e,n,r,i,s,o,l,c,u){t.getVertexPosition(l,AS),t.getVertexPosition(c,TS),t.getVertexPosition(u,MS);const d=pbe(t,e,n,r,AS,TS,MS,y8);if(d){const h=new ft;hy.getBarycoord(y8,AS,TS,MS,h),i&&(d.uv=hy.getInterpolatedAttribute(i,l,c,u,h,new Un)),s&&(d.uv1=hy.getInterpolatedAttribute(s,l,c,u,h,new Un)),o&&(d.normal=hy.getInterpolatedAttribute(o,l,c,u,h,new ft),d.normal.dot(r.direction)>0&&d.normal.multiplyScalar(-1));const f={a:l,b:c,c:u,normal:new ft,materialIndex:0};hy.getNormal(AS,TS,MS,f.normal),d.face=f,d.barycoord=h}return d}let rL=class ZX extends yl{constructor(e=1,n=1,r=1,i=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:s,depthSegments:o};const l=this;i=Math.floor(i),s=Math.floor(s),o=Math.floor(o);const c=[],u=[],d=[],h=[];let f=0,p=0;x("z","y","x",-1,-1,r,n,e,o,s,0),x("z","y","x",1,-1,r,n,-e,o,s,1),x("x","z","y",1,1,e,r,n,i,o,2),x("x","z","y",1,-1,e,r,-n,i,o,3),x("x","y","z",1,-1,e,n,r,i,s,4),x("x","y","z",-1,-1,e,n,-r,i,s,5),this.setIndex(c),this.setAttribute("position",new Po(u,3)),this.setAttribute("normal",new Po(d,3)),this.setAttribute("uv",new Po(h,2));function x(y,b,v,_,N,T,k,M,C,j,P){const E=T/C,U=k/j,O=T/2,B=k/2,R=M/2,q=C+1,G=j+1;let z=0,K=0;const Y=new ft;for(let oe=0;oe0?1:-1,d.push(Y.x,Y.y,Y.z),h.push(X/C),h.push(1-oe/j),z+=1}}for(let oe=0;oe to .`)}let f=Hc(),p;if(e){let _=typeof e=="string"?Fb(e):e;ci(d==="/"||_.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 "${_.pathname}" was given in the \`location\` prop.`),p=_}else p=f;let x=p.pathname||"/",y=x;if(d!=="/"){let _=d.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let b=mK(t,{pathname:y});bl(h||b!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),bl(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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=Hce(b&&b.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:$u([d,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?d:$u([d,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),o,n,r,i);return e&&v?w.createElement(r0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},v):v}function Ice(){let t=Wce(),e=_ce(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",t),o=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:s},"ErrorBoundary")," or"," ",w.createElement("code",{style:s},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},e),n?w.createElement("pre",{style:i},n):null,o)}var zce=w.createElement(Ice,null),NK=class extends w.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(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=jce(t.digest);n&&(t=n)}let e=t!==void 0?w.createElement(Nl.Provider,{value:this.props.routeContext},w.createElement(rF.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?w.createElement(Uce,{error:t},e):e}};NK.contextType=kce;var DM=new WeakMap;function Uce({children:t,error:e}){let{basename:n}=w.useContext(Io);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=Ece(e.digest);if(r){let i=DM.get(e);if(i)throw i;let s=bK(r.location,n);if(gK&&!DM.get(e))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const o=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw DM.set(e,o),o}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function Bce({routeContext:t,match:e,children:n}){let r=w.useContext(Lb);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),w.createElement(Nl.Provider,{value:t},n)}function Hce(t,e=[],n=null,r=null,i=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 s=t,o=n?.errors;if(o!=null){let d=s.findIndex(h=>h.route.id&&o?.[h.route.id]!==void 0);ci(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,c=-1;if(n)for(let d=0;d=0?s=s.slice(0,c+1):s=[s[0]];break}}}let u=n&&r?(d,h)=>{r(d,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Nce(n.matches),errorInfo:h})}:void 0;return s.reduceRight((d,h,f)=>{let p,x=!1,y=null,b=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,y=h.route.errorElement||zce,l&&(c<0&&f===0?(CK("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,b=null):c===f&&(x=!0,b=h.route.hydrateFallbackElement||null)));let v=e.concat(s.slice(0,f+1)),_=()=>{let N;return p?N=y:x?N=b:h.route.Component?N=w.createElement(h.route.Component,null):h.route.element?N=h.route.element:N=d,w.createElement(Bce,{match:h,routeContext:{outlet:d,matches:v,isDataRoute:n!=null},children:N})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?w.createElement(NK,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:_(),routeContext:{outlet:null,matches:v,isDataRoute:!0},onError:u}):_()},null)}function iF(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $ce(t){let e=w.useContext(Lb);return ci(e,iF(t)),e}function Vce(t){let e=w.useContext(FC);return ci(e,iF(t)),e}function qce(t){let e=w.useContext(Nl);return ci(e,iF(t)),e}function aF(t){let e=qce(t),n=e.matches[e.matches.length-1];return ci(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Gce(){return aF("useRouteId")}function Wce(){let t=w.useContext(rF),e=Vce("useRouteError"),n=aF("useRouteError");return t!==void 0?t:e.errors?.[n]}function Kce(){let{router:t}=$ce("useNavigate"),e=aF("useNavigate"),n=w.useRef(!1);return SK(()=>{n.current=!0}),w.useCallback(async(i,s={})=>{bl(n.current,wK),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var hB={};function CK(t,e,n){!e&&!hB[t]&&(hB[t]=!0,bl(!1,n))}w.memo(Xce);function Xce({routes:t,future:e,state:n,onError:r}){return _K(t,void 0,n,r,e)}function ib({to:t,replace:e,state:n,relative:r}){ci(Ob()," may be used only in the context of a component.");let{static:i}=w.useContext(Io);bl(!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:s}=w.useContext(Nl),{pathname:o}=Hc(),l=nc(),c=nF(t,tF(s),o,r==="path"),u=JSON.stringify(c);return w.useEffect(()=>{l(JSON.parse(u),{replace:e,state:n,relative:r})},[l,u,r,e,n]),null}function Yce(t){return Lce(t.context)}function fi(t){ci(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Qce({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){ci(!Ob(),"You cannot render a inside another . You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:l,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[l,i,s,o]);typeof n=="string"&&(n=Fb(n));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:p="default"}=n,x=w.useMemo(()=>{let y=Zu(u,l);return y==null?null:{location:{pathname:y,search:d,hash:h,state:f,key:p},navigationType:r}},[l,u,d,h,f,p,r]);return bl(x!=null,` is not able to match the URL "${u}${d}${h}" because it does not start with the basename, so the won't render anything.`),x==null?null:w.createElement(Io.Provider,{value:c},w.createElement(r0.Provider,{children:e,value:x}))}function Zce({children:t,location:e}){return Oce(Uj(t),e)}function Uj(t,e=[]){let n=[];return w.Children.forEach(t,(r,i)=>{if(!w.isValidElement(r))return;let s=[...e,i];if(r.type===w.Fragment){n.push.apply(n,Uj(r.props.children,s));return}ci(r.type===fi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ci(!r.props.index||!r.props.children,"An index route cannot have child routes.");let o={id:r.props.id||s.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&&(o.children=Uj(r.props.children,s)),n.push(o)}),n}var F_="get",L_="application/x-www-form-urlencoded";function LC(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Jce(t){return LC(t)&&t.tagName.toLowerCase()==="button"}function eue(t){return LC(t)&&t.tagName.toLowerCase()==="form"}function tue(t){return LC(t)&&t.tagName.toLowerCase()==="input"}function nue(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function rue(t,e){return t.button===0&&(!e||e==="_self")&&!nue(t)}function Bj(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function iue(t,e){let n=Bj(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var Yw=null;function aue(){if(Yw===null)try{new FormData(document.createElement("form"),0),Yw=!1}catch{Yw=!0}return Yw}var sue=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function RM(t){return t!=null&&!sue.has(t)?(bl(!1,`"${t}" is not a valid \`encType\` for \`