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))&&(_8.copy(s).invert(),Dm.copy(e.ray).applyMatrix4(_8),!(r.boundingBox!==null&&Dm.intersectsBox(r.boundingBox)===!1)&&this._computeIntersections(e,n,Dm)))}_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,v=f.length;xn.far?null:{distance:u,point:AS.clone(),object:t}}function TS(t,e,n,r,i,s,o,l,c,u){t.getVertexPosition(l,_S),t.getVertexPosition(c,NS),t.getVertexPosition(u,kS);const d=uxe(t,e,n,r,_S,NS,kS,k8);if(d){const h=new xt;my.getBarycoord(k8,_S,NS,kS,h),i&&(d.uv=my.getInterpolatedAttribute(i,l,c,u,h,new qn)),s&&(d.uv1=my.getInterpolatedAttribute(s,l,c,u,h,new qn)),o&&(d.normal=my.getInterpolatedAttribute(o,l,c,u,h,new xt),d.normal.dot(r.direction)>0&&d.normal.multiplyScalar(-1));const f={a:l,b:c,c:u,normal:new xt,materialIndex:0};my.getNormal(_S,NS,kS,f.normal),d.face=f,d.barycoord=h}return d}let i4=class NX extends Nl{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 Do(u,3)),this.setAttribute("normal",new Do(d,3)),this.setAttribute("uv",new Do(h,2));function x(v,g,y,_,N,A,C,j,k,R,M){const D=A/k,G=C/R,U=A/2,W=C/2,L=j/2,ee=k+1,ae=R+1;let Y=0,se=0;const ce=new xt;for(let ye=0;ye0?1:-1,d.push(ce.x,ce.y,ce.z),h.push(ue/k),h.push(1-ye/R),Y+=1}}for(let ye=0;ye to .`)}let f=Wc(),p;if(e){let _=typeof e=="string"?Kb(e):e;ga(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||"/",v=x;if(d!=="/"){let _=d.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=XK(t,{pathname:v});wl(h||g!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),wl(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.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 y=jue(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Gu([d,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?d:Gu([d,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),o,n,r,i);return e&&y?w.createElement(p0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},y):y}function Aue(){let t=Oue(),e=fue(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 Pue=w.createElement(Aue,null),lY=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=_ue(t.digest);n&&(t=n)}let e=t!==void 0?w.createElement(Ml.Provider,{value:this.props.routeContext},w.createElement(NF.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?w.createElement(Mue,{error:t},e):e}};lY.contextType=bue;var GP=new WeakMap;function Mue({children:t,error:e}){let{basename:n}=w.useContext(zo);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=Sue(e.digest);if(r){let i=GP.get(e);if(i)throw i;let s=eY(r.location,n);if(JK&&!GP.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 GP.set(e,o),o}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function Eue({routeContext:t,match:e,children:n}){let r=w.useContext(Yb);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),w.createElement(Ml.Provider,{value:t},n)}function jue(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);ga(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:pue(n.matches),errorInfo:h})}:void 0;return s.reduceRight((d,h,f)=>{let p,x=!1,v=null,g=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,v=h.route.errorElement||Pue,l&&(c<0&&f===0?(cY("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,g=null):c===f&&(x=!0,g=h.route.hydrateFallbackElement||null)));let y=e.concat(s.slice(0,f+1)),_=()=>{let N;return p?N=v:x?N=g:h.route.Component?N=w.createElement(h.route.Component,null):h.route.element?N=h.route.element:N=d,w.createElement(Eue,{match:h,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:N})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?w.createElement(lY,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:_(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):_()},null)}function CF(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Due(t){let e=w.useContext(Yb);return ga(e,CF(t)),e}function Rue(t){let e=w.useContext(KC);return ga(e,CF(t)),e}function Fue(t){let e=w.useContext(Ml);return ga(e,CF(t)),e}function kF(t){let e=Fue(t),n=e.matches[e.matches.length-1];return ga(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Lue(){return kF("useRouteId")}function Oue(){let t=w.useContext(NF),e=Rue("useRouteError"),n=kF("useRouteError");return t!==void 0?t:e.errors?.[n]}function Iue(){let{router:t}=Due("useNavigate"),e=kF("useNavigate"),n=w.useRef(!1);return iY(()=>{n.current=!0}),w.useCallback(async(i,s={})=>{wl(n.current,aY),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var FB={};function cY(t,e,n){!e&&!FB[t]&&(FB[t]=!0,wl(!1,n))}w.memo(zue);function zue({routes:t,future:e,state:n,onError:r}){return oY(t,void 0,n,r,e)}function gb({to:t,replace:e,state:n,relative:r}){ga(Xb()," may be used only in the context of a component.");let{static:i}=w.useContext(zo);wl(!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(Ml),{pathname:o}=Wc(),l=El(),c=_F(t,SF(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 uY(t){return kue(t.context)}function Pr(t){ga(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Uue({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){ga(!Xb(),"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=Kb(n));let{pathname:u="/",search:d="",hash:h="",state:f=null,key:p="default"}=n,x=w.useMemo(()=>{let v=td(u,l);return v==null?null:{location:{pathname:v,search:d,hash:h,state:f,key:p},navigationType:r}},[l,u,d,h,f,p,r]);return wl(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(zo.Provider,{value:c},w.createElement(p0.Provider,{children:e,value:x}))}function Bue({children:t,location:e}){return Tue(a3(t),e)}function a3(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,a3(r.props.children,s));return}ga(r.type===Pr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a component. All component children of must be a or `),ga(!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=a3(r.props.children,s)),n.push(o)}),n}var Y_="get",X_="application/x-www-form-urlencoded";function YC(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Hue(t){return YC(t)&&t.tagName.toLowerCase()==="button"}function $ue(t){return YC(t)&&t.tagName.toLowerCase()==="form"}function Vue(t){return YC(t)&&t.tagName.toLowerCase()==="input"}function que(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Gue(t,e){return t.button===0&&(!e||e==="_self")&&!que(t)}function i3(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 Wue(t,e){let n=i3(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}var lS=null;function Kue(){if(lS===null)try{new FormData(document.createElement("form"),0),lS=!1}catch{lS=!0}return lS}var Yue=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function WP(t){return t!=null&&!Yue.has(t)?(wl(!1,`"${t}" is not a valid \`encType\` for \`