129 lines
205 KiB
JavaScript
129 lines
205 KiB
JavaScript
import{r as f,j as g,O as hs,R as T,D as ds,V as pe,Q as Mr,E as Pr,M as fs,m as ps,c as ms}from"./three-eMwtdKkp.js";import{g as gs,s as Lr,i as Ir,a as Cn,b as Tr,c as _s,d as ys,e as ws,f as vs,r as xs,h as bs,j as Fr,k as Es,l as Cs,m as Rs,o as Ss,S as Ms,H as Ps,F as be,n as Ls,p as jr,q as ut,t as Is,u as Rn,v as me,w as Nr,x as Ts,y as Fs,z as js,A as ht,B as Ot,C as Sn,D as Ns,E as zs,G as he,I as Ds,J as Os,K as ks,L as Mn,M as Bs,N as Vs,O as $s,P as As,Q as st,R as Hs,T as Us,U as zr,V as Ws,W as Gs}from"./motion-BIOHP8Ul.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Pn="popstate";function qs(t={}){function e(r,i){let{pathname:s,search:o,hash:a}=r.location;return kt("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Ue(i)}return Xs(e,n,null,t)}function B(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ue(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Ys(){return Math.random().toString(36).substring(2,10)}function Ln(t,e){return{usr:t.state,key:t.key,idx:e}}function kt(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?je(e):e,state:n,key:e&&e.key||r||Ys()}}function Ue({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function je(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function Xs(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function h(){a="POP";let _=u(),w=_==null?null:_-c;c=_,l&&l({action:a,location:y.location,delta:w})}function d(_,w){a="PUSH";let b=kt(y.location,_,w);c=u()+1;let x=Ln(b,c),E=y.createHref(b);try{o.pushState(x,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(E)}s&&l&&l({action:a,location:y.location,delta:1})}function p(_,w){a="REPLACE";let b=kt(y.location,_,w);c=u();let x=Ln(b,c),E=y.createHref(b);o.replaceState(x,"",E),s&&l&&l({action:a,location:y.location,delta:0})}function m(_){return Ks(_)}let y={get action(){return a},get location(){return t(i,o)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Pn,h),l=_,()=>{i.removeEventListener(Pn,h),l=null}},createHref(_){return e(i,_)},createURL:m,encodeLocation(_){let w=m(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:d,replace:p,go(_){return o.go(_)}};return y}function Ks(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),B(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Ue(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Dr(t,e,n="/"){return Qs(t,e,n,!1)}function Qs(t,e,n,r){let i=typeof e=="string"?je(e):e,s=ye(i.pathname||"/",n);if(s==null)return null;let o=Or(t);Zs(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=co(s);a=ao(o[l],c,r)}return a}function Or(t,e=[],n=[],r="",i=!1){let s=(o,a,l=i,c)=>{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&l)return;B(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let h=_e([r,u.relativePath]),d=n.concat(u);o.children&&o.children.length>0&&(B(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),Or(o.children,e,d,h,l)),!(o.path==null&&!o.index)&&e.push({path:h,score:so(h,o.index),routesMeta:d})};return t.forEach((o,a)=>{if(o.path===""||!o.path?.includes("?"))s(o,a);else for(let l of kr(o.path))s(o,a,!0,l)}),e}function kr(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=kr(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Zs(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:oo(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Js=/^:[\w-]+$/,eo=3,to=2,no=1,ro=10,io=-2,In=t=>t==="*";function so(t,e){let n=t.split("/"),r=n.length;return n.some(In)&&(r+=io),e&&(r+=to),n.filter(i=>!In(i)).reduce((i,s)=>i+(Js.test(s)?eo:s===""?no:ro),r)}function oo(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function ao(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",h=dt({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),d=l.route;if(!h&&c&&n&&!r[r.length-1].route.index&&(h=dt({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!h)return null;Object.assign(i,h.params),o.push({params:i,pathname:_e([s,h.pathname]),pathnameBase:po(_e([s,h.pathnameBase])),route:d}),h.pathnameBase!=="/"&&(s=_e([s,h.pathnameBase]))}return o}function dt(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=lo(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:h},d)=>{if(u==="*"){let m=a[d]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const p=a[d];return h&&!p?c[u]=void 0:c[u]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:o,pattern:t}}function lo(t,e=!1,n=!0){ue(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function co(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ue(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function ye(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var Br=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uo=t=>Br.test(t);function ho(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?je(t):t,s;if(n)if(uo(n))s=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),ue(!1,`Pathnames cannot have embedded double slashes - normalizing ${o} -> ${n}`)}n.startsWith("/")?s=Tn(n.substring(1),"/"):s=Tn(n,e)}else s=e;return{pathname:s,search:mo(r),hash:go(i)}}function Tn(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function bt(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fo(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Vr(t){let e=fo(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function $r(t,e,n,r=!1){let i;typeof t=="string"?i=je(t):(i={...t},B(!i.pathname||!i.pathname.includes("?"),bt("?","pathname","search",i)),B(!i.pathname||!i.pathname.includes("#"),bt("#","pathname","hash",i)),B(!i.search||!i.search.includes("#"),bt("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let h=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;i.pathname=d.join("/")}a=h>=0?e[h]:"/"}let l=ho(i,a),c=o&&o!=="/"&&o.endsWith("/"),u=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var _e=t=>t.join("/").replace(/\/\/+/g,"/"),po=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),mo=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,go=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,_o=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yo(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function wo(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ar=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Hr(t,e){let n=t;if(typeof n!="string"||!Br.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ar)try{let s=new URL(window.location.href),o=n.startsWith("//")?new URL(s.protocol+n):new URL(n),a=ye(o.pathname,e);o.origin===s.origin&&a!=null?n=a+o.search+o.hash:i=!0}catch{ue(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ur=["POST","PUT","PATCH","DELETE"];new Set(Ur);var vo=["GET",...Ur];new Set(vo);var Ne=f.createContext(null);Ne.displayName="DataRouter";var wt=f.createContext(null);wt.displayName="DataRouterState";var xo=f.createContext(!1),Wr=f.createContext({isTransitioning:!1});Wr.displayName="ViewTransition";var bo=f.createContext(new Map);bo.displayName="Fetchers";var Eo=f.createContext(null);Eo.displayName="Await";var ae=f.createContext(null);ae.displayName="Navigation";var qe=f.createContext(null);qe.displayName="Location";var we=f.createContext({outlet:null,matches:[],isDataRoute:!1});we.displayName="Route";var Qt=f.createContext(null);Qt.displayName="RouteError";var Gr="REACT_ROUTER_ERROR",Co="REDIRECT",Ro="ROUTE_ERROR_RESPONSE";function So(t){if(t.startsWith(`${Gr}:${Co}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function Mo(t){if(t.startsWith(`${Gr}:${Ro}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new _o(e.status,e.statusText,e.data)}catch{}}function Po(t,{relative:e}={}){B(Ye(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=f.useContext(ae),{hash:i,pathname:s,search:o}=Xe(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:_e([n,s])),r.createHref({pathname:a,search:o,hash:i})}function Ye(){return f.useContext(qe)!=null}function Ee(){return B(Ye(),"useLocation() may be used only in the context of a <Router> component."),f.useContext(qe).location}var qr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yr(t){f.useContext(ae).static||f.useLayoutEffect(t)}function Lo(){let{isDataRoute:t}=f.useContext(we);return t?Ao():Io()}function Io(){B(Ye(),"useNavigate() may be used only in the context of a <Router> component.");let t=f.useContext(Ne),{basename:e,navigator:n}=f.useContext(ae),{matches:r}=f.useContext(we),{pathname:i}=Ee(),s=JSON.stringify(Vr(r)),o=f.useRef(!1);return Yr(()=>{o.current=!0}),f.useCallback((l,c={})=>{if(ue(o.current,qr),!o.current)return;if(typeof l=="number"){n.go(l);return}let u=$r(l,JSON.parse(s),i,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:_e([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,s,i,t])}f.createContext(null);function Xe(t,{relative:e}={}){let{matches:n}=f.useContext(we),{pathname:r}=Ee(),i=JSON.stringify(Vr(n));return f.useMemo(()=>$r(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function To(t,e){return Xr(t,e)}function Xr(t,e,n,r,i){B(Ye(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=f.useContext(ae),{matches:o}=f.useContext(we),a=o[o.length-1],l=a?a.params:{},c=a?a.pathname:"/",u=a?a.pathnameBase:"/",h=a&&a.route;{let b=h&&h.path||"";Qr(c,!h||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
|
|
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let d=Ee(),p;if(e){let b=typeof e=="string"?je(e):e;B(u==="/"||b.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` 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 "${u}" but pathname "${b.pathname}" was given in the \`location\` prop.`),p=b}else p=d;let m=p.pathname||"/",y=m;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let _=Dr(t,{pathname:y});ue(h||_!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ue(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.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 <Outlet /> with a null value by default resulting in an "empty" page.`);let w=Do(_&&_.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:_e([u,s.encodeLocation?s.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:_e([u,s.encodeLocation?s.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,n,r,i);return e&&w?f.createElement(qe.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...p},navigationType:"POP"}},w):w}function Fo(){let t=$o(),e=yo(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=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:s},"ErrorBoundary")," or"," ",f.createElement("code",{style:s},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},e),n?f.createElement("pre",{style:i},n):null,o)}var jo=f.createElement(Fo,null),Kr=class extends f.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=Mo(t.digest);n&&(t=n)}let e=t!==void 0?f.createElement(we.Provider,{value:this.props.routeContext},f.createElement(Qt.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?f.createElement(No,{error:t},e):e}};Kr.contextType=xo;var Et=new WeakMap;function No({children:t,error:e}){let{basename:n}=f.useContext(ae);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=So(e.digest);if(r){let i=Et.get(e);if(i)throw i;let s=Hr(r.location,n);if(Ar&&!Et.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 Et.set(e,o),o}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function zo({routeContext:t,match:e,children:n}){let r=f.useContext(Ne);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),f.createElement(we.Provider,{value:t},n)}function Do(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 u=s.findIndex(h=>h.route.id&&o?.[h.route.id]!==void 0);B(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,u+1))}let a=!1,l=-1;if(n)for(let u=0;u<s.length;u++){let h=s[u];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=u),h.route.id){let{loaderData:d,errors:p}=n,m=h.route.loader&&!d.hasOwnProperty(h.route.id)&&(!p||p[h.route.id]===void 0);if(h.route.lazy||m){a=!0,l>=0?s=s.slice(0,l+1):s=[s[0]];break}}}let c=n&&r?(u,h)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:wo(n.matches),errorInfo:h})}:void 0;return s.reduceRight((u,h,d)=>{let p,m=!1,y=null,_=null;n&&(p=o&&h.route.id?o[h.route.id]:void 0,y=h.route.errorElement||jo,a&&(l<0&&d===0?(Qr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,_=null):l===d&&(m=!0,_=h.route.hydrateFallbackElement||null)));let w=e.concat(s.slice(0,d+1)),b=()=>{let x;return p?x=y:m?x=_:h.route.Component?x=f.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,f.createElement(zo,{match:h,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?f.createElement(Kr,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:b(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):b()},null)}function Zt(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oo(t){let e=f.useContext(Ne);return B(e,Zt(t)),e}function ko(t){let e=f.useContext(wt);return B(e,Zt(t)),e}function Bo(t){let e=f.useContext(we);return B(e,Zt(t)),e}function Jt(t){let e=Bo(t),n=e.matches[e.matches.length-1];return B(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Vo(){return Jt("useRouteId")}function $o(){let t=f.useContext(Qt),e=ko("useRouteError"),n=Jt("useRouteError");return t!==void 0?t:e.errors?.[n]}function Ao(){let{router:t}=Oo("useNavigate"),e=Jt("useNavigate"),n=f.useRef(!1);return Yr(()=>{n.current=!0}),f.useCallback(async(i,s={})=>{ue(n.current,qr),n.current&&(typeof i=="number"?await t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var Fn={};function Qr(t,e,n){!e&&!Fn[t]&&(Fn[t]=!0,ue(!1,n))}f.memo(Ho);function Ho({routes:t,future:e,state:n,onError:r}){return Xr(t,void 0,n,r,e)}function ot(t){B(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Uo({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1,unstable_useTransitions:o}){B(!Ye(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=t.replace(/^\/*/,"/"),l=f.useMemo(()=>({basename:a,navigator:i,static:s,unstable_useTransitions:o,future:{}}),[a,i,s,o]);typeof n=="string"&&(n=je(n));let{pathname:c="/",search:u="",hash:h="",state:d=null,key:p="default"}=n,m=f.useMemo(()=>{let y=ye(c,a);return y==null?null:{location:{pathname:y,search:u,hash:h,state:d,key:p},navigationType:r}},[a,c,u,h,d,p,r]);return ue(m!=null,`<Router basename="${a}"> is not able to match the URL "${c}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:f.createElement(ae.Provider,{value:l},f.createElement(qe.Provider,{children:e,value:m}))}function Wo({children:t,location:e}){return To(Bt(t),e)}function Bt(t,e=[]){let n=[];return f.Children.forEach(t,(r,i)=>{if(!f.isValidElement(r))return;let s=[...e,i];if(r.type===f.Fragment){n.push.apply(n,Bt(r.props.children,s));return}B(r.type===ot,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),B(!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=Bt(r.props.children,s)),n.push(o)}),n}var at="get",lt="application/x-www-form-urlencoded";function vt(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Go(t){return vt(t)&&t.tagName.toLowerCase()==="button"}function qo(t){return vt(t)&&t.tagName.toLowerCase()==="form"}function Yo(t){return vt(t)&&t.tagName.toLowerCase()==="input"}function Xo(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ko(t,e){return t.button===0&&(!e||e==="_self")&&!Xo(t)}var Je=null;function Qo(){if(Je===null)try{new FormData(document.createElement("form"),0),Je=!1}catch{Je=!0}return Je}var Zo=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ct(t){return t!=null&&!Zo.has(t)?(ue(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lt}"`),null):t}function Jo(t,e){let n,r,i,s,o;if(qo(t)){let a=t.getAttribute("action");r=a?ye(a,e):null,n=t.getAttribute("method")||at,i=Ct(t.getAttribute("enctype"))||lt,s=new FormData(t)}else if(Go(t)||Yo(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?ye(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||at,i=Ct(t.getAttribute("formenctype"))||Ct(a.getAttribute("enctype"))||lt,s=new FormData(a,t),!Qo()){let{name:c,type:u,value:h}=t;if(u==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,h)}}else{if(vt(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=at,r=null,i=lt,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function en(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ea(t,e,n,r){let i=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?i.pathname.endsWith("/")?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname==="/"?i.pathname=`_root.${r}`:e&&ye(i.pathname,e)==="/"?i.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,"")}.${r}`,i}async function ta(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function na(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function ra(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await ta(s,n);return o.links?o.links():[]}return[]}));return aa(r.flat(1).filter(na).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function jn(t,e,n,r,i,s){let o=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>n[c].pathname!==l.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==l.params["*"];return s==="assets"?e.filter((l,c)=>o(l,c)||a(l,c)):s==="data"?e.filter((l,c)=>{let u=r.routes[l.route.id];if(!u||!u.hasLoader)return!1;if(o(l,c)||a(l,c))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function ia(t,e,{includeHydrateFallback:n}={}){return sa(t.map(r=>{let i=e.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function sa(t){return[...new Set(t)]}function oa(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function aa(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(oa(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function Zr(){let t=f.useContext(Ne);return en(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function la(){let t=f.useContext(wt);return en(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var tn=f.createContext(void 0);tn.displayName="FrameworkContext";function Jr(){let t=f.useContext(tn);return en(t,"You must render this element inside a <HydratedRouter> element"),t}function ca(t,e){let n=f.useContext(tn),[r,i]=f.useState(!1),[s,o]=f.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:h}=e,d=f.useRef(null);f.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let y=w=>{w.forEach(b=>{o(b.isIntersecting)})},_=new IntersectionObserver(y,{threshold:.5});return d.current&&_.observe(d.current),()=>{_.disconnect()}}},[t]),f.useEffect(()=>{if(r){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,d,{}]:[s,d,{onFocus:Oe(a,p),onBlur:Oe(l,m),onMouseEnter:Oe(c,p),onMouseLeave:Oe(u,m),onTouchStart:Oe(h,p)}]:[!1,d,{}]}function Oe(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function ua({page:t,...e}){let{router:n}=Zr(),r=f.useMemo(()=>Dr(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?f.createElement(da,{page:t,matches:r,...e}):null}function ha(t){let{manifest:e,routeModules:n}=Jr(),[r,i]=f.useState([]);return f.useEffect(()=>{let s=!1;return ra(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function da({page:t,matches:e,...n}){let r=Ee(),{future:i,manifest:s,routeModules:o}=Jr(),{basename:a}=Zr(),{loaderData:l,matches:c}=la(),u=f.useMemo(()=>jn(t,e,c,s,r,"data"),[t,e,c,s,r]),h=f.useMemo(()=>jn(t,e,c,s,r,"assets"),[t,e,c,s,r]),d=f.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let y=new Set,_=!1;if(e.forEach(b=>{let x=s.routes[b.route.id];!x||!x.hasLoader||(!u.some(E=>E.route.id===b.route.id)&&b.route.id in l&&o[b.route.id]?.shouldRevalidate||x.hasClientLoader?_=!0:y.add(b.route.id))}),y.size===0)return[];let w=ea(t,a,i.unstable_trailingSlashAwareDataRequests,"data");return _&&y.size>0&&w.searchParams.set("_routes",e.filter(b=>y.has(b.route.id)).map(b=>b.route.id).join(",")),[w.pathname+w.search]},[a,i.unstable_trailingSlashAwareDataRequests,l,r,s,u,e,t,o]),p=f.useMemo(()=>ia(h,s),[h,s]),m=ha(h);return f.createElement(f.Fragment,null,d.map(y=>f.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),p.map(y=>f.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),m.map(({key:y,link:_})=>f.createElement("link",{key:y,nonce:n.nonce,..._})))}function fa(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var pa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{pa&&(window.__reactRouterVersion="7.12.0")}catch{}function ma({basename:t,children:e,unstable_useTransitions:n,window:r}){let i=f.useRef();i.current==null&&(i.current=qs({window:r,v5Compat:!0}));let s=i.current,[o,a]=f.useState({action:s.action,location:s.location}),l=f.useCallback(c=>{n===!1?a(c):f.startTransition(()=>a(c))},[n]);return f.useLayoutEffect(()=>s.listen(l),[s,l]),f.createElement(Uo,{basename:t,children:e,location:o.location,navigationType:o.action,navigator:s,unstable_useTransitions:n})}var ei=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fe=f.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h,unstable_defaultShouldRevalidate:d,...p},m){let{basename:y,unstable_useTransitions:_}=f.useContext(ae),w=typeof c=="string"&&ei.test(c),b=Hr(c,y);c=b.to;let x=Po(c,{relative:i}),[E,C,S]=ca(r,p),F=wa(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:h,unstable_defaultShouldRevalidate:d,unstable_useTransitions:_});function O(N){e&&e(N),N.defaultPrevented||F(N)}let j=f.createElement("a",{...p,...S,href:b.absoluteURL||x,onClick:b.isExternal||s?e:O,ref:fa(m,C),target:l,"data-discover":!w&&n==="render"?"true":void 0});return E&&!w?f.createElement(f.Fragment,null,j,f.createElement(ua,{page:x})):j});Fe.displayName="Link";var ga=f.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...c},u){let h=Xe(o,{relative:c.relative}),d=Ee(),p=f.useContext(wt),{navigator:m,basename:y}=f.useContext(ae),_=p!=null&&Ca(h)&&a===!0,w=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,b=d.pathname,x=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(b=b.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase()),x&&y&&(x=ye(x,y)||x);const E=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let C=b===w||!i&&b.startsWith(w)&&b.charAt(E)==="/",S=x!=null&&(x===w||!i&&x.startsWith(w)&&x.charAt(w.length)==="/"),F={isActive:C,isPending:S,isTransitioning:_},O=C?e:void 0,j;typeof r=="function"?j=r(F):j=[r,C?"active":null,S?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let N=typeof s=="function"?s(F):s;return f.createElement(Fe,{...c,"aria-current":O,className:j,ref:u,style:N,to:o,viewTransition:a},typeof l=="function"?l(F):l)});ga.displayName="NavLink";var _a=f.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=at,action:a,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:h,unstable_defaultShouldRevalidate:d,...p},m)=>{let{unstable_useTransitions:y}=f.useContext(ae),_=ba(),w=Ea(a,{relative:c}),b=o.toLowerCase()==="get"?"get":"post",x=typeof a=="string"&&ei.test(a),E=C=>{if(l&&l(C),C.defaultPrevented)return;C.preventDefault();let S=C.nativeEvent.submitter,F=S?.getAttribute("formmethod")||o,O=()=>_(S||C.currentTarget,{fetcherKey:e,method:F,navigate:n,replace:i,state:s,relative:c,preventScrollReset:u,viewTransition:h,unstable_defaultShouldRevalidate:d});y&&n!==!1?f.startTransition(()=>O()):O()};return f.createElement("form",{ref:m,method:b,action:w,onSubmit:r?l:E,...p,"data-discover":!x&&t==="render"?"true":void 0})});_a.displayName="Form";function ya(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ti(t){let e=f.useContext(Ne);return B(e,ya(t)),e}function wa(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a,unstable_useTransitions:l}={}){let c=Lo(),u=Ee(),h=Xe(t,{relative:s});return f.useCallback(d=>{if(Ko(d,e)){d.preventDefault();let p=n!==void 0?n:Ue(u)===Ue(h),m=()=>c(t,{replace:p,state:r,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:a});l?f.startTransition(()=>m()):m()}},[u,c,h,n,r,e,t,i,s,o,a,l])}var va=0,xa=()=>`__${String(++va)}__`;function ba(){let{router:t}=ti("useSubmit"),{basename:e}=f.useContext(ae),n=Vo(),r=t.fetch,i=t.navigate;return f.useCallback(async(s,o={})=>{let{action:a,method:l,encType:c,formData:u,body:h}=Jo(s,e);if(o.navigate===!1){let d=o.fetcherKey||xa();await r(d,n,o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:h,formMethod:o.method||l,formEncType:o.encType||c,flushSync:o.flushSync})}else await i(o.action||a,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:h,formMethod:o.method||l,formEncType:o.encType||c,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,e,n])}function Ea(t,{relative:e}={}){let{basename:n}=f.useContext(ae),r=f.useContext(we);B(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Xe(t||".",{relative:e})},o=Ee();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(u=>u==="")){a.delete("index"),l.filter(h=>h).forEach(h=>a.append("index",h));let u=a.toString();s.search=u?`?${u}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:_e([n,s.pathname])),Ue(s)}function Ca(t,{relative:e}={}){let n=f.useContext(Wr);B(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ti("useViewTransitionState"),i=Xe(t,{relative:e});if(!n.isTransitioning)return!1;let s=ye(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ye(n.nextLocation.pathname,r)||n.nextLocation.pathname;return dt(i.pathname,o)!=null||dt(i.pathname,s)!=null}const Ra={nav:{home:"Startseite",about:"Über uns",contact:"Kontakt"},hero:{greeting:"Willkommen bei",company:"Ragusa IT-Consulting",tagline:"Ihr Partner für",rotatingWords:["Webentwicklung","IT-Support","Digitale Lösungen","Tech-Beratung"],cta:"Projekt starten",ctaSecondary:"Mehr erfahren",scroll:"Scrollen"},services:{title:"Unsere Leistungen",subtitle:"Professionelle IT-Lösungen für Ihr Unternehmen",items:[{title:"Webentwicklung",description:"Moderne, responsive Websites und Web-Applikationen mit React, TypeScript und aktuellen Technologien.",icon:"code"},{title:"Tech-Support",description:"Schnelle und zuverlässige technische Unterstützung für Hardware und Software vor Ort.",icon:"support"},{title:"IT-Beratung",description:"Strategische Beratung für Ihre IT-Infrastruktur und digitale Transformation.",icon:"consulting"},{title:"Hosting & Wartung",description:"Zuverlässiges Webhosting, regelmäßige Updates und proaktive Wartung Ihrer Systeme.",icon:"hosting"}]},about:{title:"Über uns",subtitle:"Ihr lokaler IT-Partner",intro:"Ragusa IT-Consulting bietet professionelle IT-Dienstleistungen mit persönlichem Service. Wir kombinieren technische Expertise mit einem tiefen Verständnis für die Bedürfnisse unserer Kunden.",experience:"Mit jahrelanger Erfahrung in der Webentwicklung und IT-Beratung unterstützen wir Unternehmen und Privatpersonen dabei, ihre technischen Herausforderungen zu meistern.",skills:{title:"Technologien",subtitle:"Moderne Tools für moderne Lösungen"},values:{title:"Warum Ragusa IT?",items:[{title:"Persönlicher Service",description:"Direkter Ansprechpartner für alle Ihre IT-Anliegen."},{title:"Lokale Präsenz",description:"Vor-Ort-Support und persönliche Beratungsgespräche."},{title:"Faire Preise",description:"Transparente Preisgestaltung ohne versteckte Kosten."},{title:"Schnelle Reaktion",description:"Kurze Reaktionszeiten bei Anfragen und Problemen."}]}},contact:{title:"Kontakt",subtitle:"Lassen Sie uns zusammenarbeiten",intro:"Haben Sie ein Projekt im Sinn oder benötigen Sie technische Unterstützung? Ich freue mich auf Ihre Nachricht!",form:{name:"Name",namePlaceholder:"Ihr Name",email:"E-Mail",emailPlaceholder:"ihre@email.de",subject:"Betreff",subjectPlaceholder:"Worum geht es?",message:"Nachricht",messagePlaceholder:"Ihre Nachricht...",submit:"Nachricht senden",sending:"Wird gesendet...",success:"Nachricht erfolgreich gesendet! Ich melde mich bald bei Ihnen.",error:"Fehler beim Senden. Bitte versuchen Sie es erneut oder kontaktieren Sie mich direkt."},info:{title:"Kontaktdaten",email:"E-Mail",location:"Standort",github:"GitHub"}},footer:{copyright:"© {year} Ragusa IT-Consulting. Alle Rechte vorbehalten.",madeIn:"Entwickelt in Deutschland mit",love:"Liebe"}},Sa={nav:{home:"Home",about:"About",contact:"Contact"},hero:{greeting:"Welcome to",company:"Ragusa IT-Consulting",tagline:"Your partner for",rotatingWords:["Web Development","IT Support","Digital Solutions","Tech Consulting"],cta:"Start Project",ctaSecondary:"Learn More",scroll:"Scroll"},services:{title:"Our Services",subtitle:"Professional IT solutions for your business",items:[{title:"Web Development",description:"Modern, responsive websites and web applications built with React, TypeScript, and cutting-edge technologies.",icon:"code"},{title:"Tech Support",description:"Fast and reliable technical support for hardware and software, available on-site.",icon:"support"},{title:"IT Consulting",description:"Strategic consulting for your IT infrastructure and digital transformation.",icon:"consulting"},{title:"Hosting & Maintenance",description:"Reliable web hosting, regular updates, and proactive maintenance of your systems.",icon:"hosting"}]},about:{title:"About Us",subtitle:"Your local IT partner",intro:"Ragusa IT-Consulting provides professional IT services with a personal touch. We combine technical expertise with a deep understanding of our clients' needs.",experience:"With years of experience in web development and IT consulting, we help businesses and individuals overcome their technical challenges.",skills:{title:"Technologies",subtitle:"Modern tools for modern solutions"},values:{title:"Why Ragusa IT?",items:[{title:"Personal Service",description:"Direct point of contact for all your IT needs."},{title:"Local Presence",description:"On-site support and in-person consultations."},{title:"Fair Pricing",description:"Transparent pricing with no hidden costs."},{title:"Quick Response",description:"Short response times for inquiries and issues."}]}},contact:{title:"Contact",subtitle:"Let's work together",intro:"Have a project in mind or need technical support? I look forward to hearing from you!",form:{name:"Name",namePlaceholder:"Your name",email:"Email",emailPlaceholder:"your@email.com",subject:"Subject",subjectPlaceholder:"What is it about?",message:"Message",messagePlaceholder:"Your message...",submit:"Send Message",sending:"Sending...",success:"Message sent successfully! I'll get back to you soon.",error:"Error sending message. Please try again or contact me directly."},info:{title:"Contact Info",email:"Email",location:"Location",github:"GitHub"}},footer:{copyright:"© {year} Ragusa IT-Consulting. All rights reserved.",madeIn:"Made in Germany with",love:"love"}},Ma={de:Ra,en:Sa},ni=f.createContext(void 0),ri="ragusa-it-lang";function Pa(){if(typeof window>"u")return"de";const t=localStorage.getItem(ri);return t==="de"||t==="en"?t:navigator.language.split("-")[0]==="en"?"en":"de"}function La({children:t}){const[e,n]=f.useState("de"),[r,i]=f.useState(!1);f.useEffect(()=>{n(Pa()),i(!0)},[]);const s=a=>{n(a),localStorage.setItem(ri,a),document.documentElement.lang=a};f.useEffect(()=>{r&&(document.documentElement.lang=e)},[e,r]);const o={language:e,setLanguage:s,t:Ma[e]};return g.jsx(ni.Provider,{value:o,children:t})}function ze(){const t=f.useContext(ni);if(!t)throw new Error("useTranslation must be used within a LanguageProvider");return t}const ii=f.createContext({});function Ia(t){const e=f.useRef(null);return e.current===null&&(e.current=t()),e.current}const si=typeof window<"u",Ta=si?f.useLayoutEffect:f.useEffect,nn=f.createContext(null),oi=f.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Fa(t=!0){const e=f.useContext(nn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=f.useId();f.useEffect(()=>{if(t)return i(s)},[t]);const o=f.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const ai=f.createContext({strict:!1}),Nn={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let zn=!1;function ja(){if(zn)return;const t={};for(const e in Nn)t[e]={isEnabled:n=>Nn[e].some(r=>!!n[r])};Lr(t),zn=!0}function li(){return ja(),gs()}function Na(t){const e=li();for(const n in t)e[n]={...e[n],...t[n]};Lr(e)}const za=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ft(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||za.has(t)}let ci=t=>!ft(t);function Da(t){typeof t=="function"&&(ci=e=>e.startsWith("on")?!ft(e):t(e))}try{Da(require("@emotion/is-prop-valid").default)}catch{}function Oa(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(ci(i)||n===!0&&ft(i)||!e&&!ft(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xt=f.createContext({});function ka(t,e){if(Ir(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Cn(n)?n:void 0,animate:Cn(r)?r:void 0}}return t.inherit!==!1?e:{}}function Ba(t){const{initial:e,animate:n}=ka(t,f.useContext(xt));return f.useMemo(()=>({initial:e,animate:n}),[Dn(e),Dn(n)])}function Dn(t){return Array.isArray(t)?t.join(" "):t}const rn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ui(t,e,n){for(const r in e)!Tr(e[r])&&!_s(r,n)&&(t[r]=e[r])}function Va({transformTemplate:t},e){return f.useMemo(()=>{const n=rn();return ys(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $a(t,e){const n=t.style||{},r={};return ui(r,n,t),Object.assign(r,Va(t,e)),r}function Aa(t,e){const n={},r=$a(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const hi=()=>({...rn(),attrs:{}});function Ha(t,e,n,r){const i=f.useMemo(()=>{const s=hi();return ws(s,e,vs(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};ui(s,t.style,t),i.style={...s,...i.style}}return i}const Ua=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function sn(t){return typeof t!="string"||t.includes("-")?!1:!!(Ua.indexOf(t)>-1||/[A-Z]/u.test(t))}function Wa(t,e,n,{latestValues:r},i,s=!1,o){const l=(o??sn(t)?Ha:Aa)(e,r,i,t),c=Oa(e,typeof t=="string",s),u=t!==f.Fragment?{...c,...l,ref:n}:{},{children:h}=e,d=f.useMemo(()=>Tr(h)?h.get():h,[h]);return f.createElement(t,{...u,children:d})}function Ga({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:qa(n,r,i,t),renderState:e()}}function qa(t,e,n,r){const i={},s=r(t,{});for(const d in s)i[d]=xs(s[d]);let{initial:o,animate:a}=t;const l=Ir(t),c=bs(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!Fr(h)){const d=Array.isArray(h)?h:[h];for(let p=0;p<d.length;p++){const m=Es(t,d[p]);if(m){const{transitionEnd:y,transition:_,...w}=m;for(const b in w){let x=w[b];if(Array.isArray(x)){const E=u?x.length-1:0;x=x[E]}x!==null&&(i[b]=x)}for(const b in y)i[b]=y[b]}}}return i}const di=t=>(e,n)=>{const r=f.useContext(xt),i=f.useContext(nn),s=()=>Ga(t,e,r,i);return n?s():Ia(s)},Ya=di({scrapeMotionValuesFromProps:Cs,createRenderState:rn}),Xa=di({scrapeMotionValuesFromProps:Rs,createRenderState:hi}),Ka=Symbol.for("motionComponentSymbol");function Qa(t,e,n){const r=f.useRef(n);f.useInsertionEffect(()=>{r.current=n});const i=f.useRef(null);return f.useCallback(s=>{s&&t.onMount?.(s),e&&(s?e.mount(s):e.unmount());const o=r.current;if(typeof o=="function")if(s){const a=o(s);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(s);else o&&(o.current=s)},[e])}const fi=f.createContext({});function Ve(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Za(t,e,n,r,i,s){const{visualElement:o}=f.useContext(xt),a=f.useContext(ai),l=f.useContext(nn),c=f.useContext(oi).reducedMotion,u=f.useRef(null);r=r||a.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:s}));const h=u.current,d=f.useContext(fi);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Ja(u.current,n,i,d);const p=f.useRef(!1);f.useInsertionEffect(()=>{h&&p.current&&h.update(n,l)});const m=n[Ss],y=f.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return Ta(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),f.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),y.current=!1),h.enteringChildren=void 0)}),h}function Ja(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:pi(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ve(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function pi(t){if(t)return t.options.allowProjection!==!1?t.projection:pi(t.parent)}function Rt(t,{forwardMotionProps:e=!1,type:n}={},r,i){r&&Na(r);const s=n?n==="svg":sn(t),o=s?Xa:Ya;function a(c,u){let h;const d={...f.useContext(oi),...c,layoutId:el(c)},{isStatic:p}=d,m=Ba(c),y=o(c,p);if(!p&&si){tl();const _=nl(d);h=_.MeasureLayout,m.visualElement=Za(t,y,d,i,_.ProjectionNode,s)}return g.jsxs(xt.Provider,{value:m,children:[h&&m.visualElement?g.jsx(h,{visualElement:m.visualElement,...d}):null,Wa(t,c,Qa(y,m.visualElement,u),y,p,e,s)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=f.forwardRef(a);return l[Ka]=t,l}function el({layoutId:t}){const e=f.useContext(ii).id;return e&&t!==void 0?e+"-"+t:t}function tl(t,e){f.useContext(ai).strict}function nl(t){const e=li(),{drag:n,layout:r}=e;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n?.isEnabled(t)||r?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function rl(t,e){if(typeof Proxy>"u")return Rt;const n=new Map,r=(s,o)=>Rt(s,o,t,e),i=(s,o)=>r(s,o);return new Proxy(i,{get:(s,o)=>o==="create"?r:(n.has(o)||n.set(o,Rt(o,void 0,t,e)),n.get(o))})}const il=(t,e)=>e.isSVG??sn(t)?new Ms(e):new Ps(e,{allowProjection:t!==f.Fragment});class sl extends be{constructor(e){super(e),e.animationState||(e.animationState=Ls(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Fr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ol=0;class al extends be{constructor(){super(...arguments),this.id=ol++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ll={animation:{Feature:sl},exit:{Feature:al}};function Ke(t){return{point:{x:t.pageX,y:t.pageY}}}const cl=t=>e=>jr(e)&&t(e,Ke(e));function $e(t,e,n,r){return ut(t,e,cl(n),r)}const mi=({current:t})=>t?t.ownerDocument.defaultView:null,On=new Set(["auto","scroll"]);class gi{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Mt(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,y=Is(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!y)return;const{point:_}=p,{timestamp:w}=Rn;this.history.push({..._,timestamp:w});const{onStart:b,onMove:x}=this.handlers;m||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=St(m,this.transformPagePoint),me.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:y,onSessionEnd:_,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Mt(p.type==="pointercancel"?this.lastMoveEventInfo:St(m,this.transformPagePoint),this.history);this.startEvent&&y&&y(p,b),_&&_(p,b)},!jr(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Ke(e),c=St(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=Rn;this.history=[{...u,timestamp:h}];const{onSessionStart:d}=n;d&&d(e,Mt(c,this.history)),this.removeListeners=Nr($e(this.contextWindow,"pointermove",this.handlePointerMove),$e(this.contextWindow,"pointerup",this.handlePointerUp),$e(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const r=getComputedStyle(n);(On.has(r.overflowX)||On.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const r=e===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:i.x-n.x,y:i.y-n.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,i),me.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ts(this.updatePoint)}}function St(t,e){return e?{point:e(t.point)}:t}function kn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Mt({point:t},e){return{point:t,delta:kn(t,_i(e)),offset:kn(t,ul(e)),velocity:hl(e,.1)}}function ul(t){return t[0]}function _i(t){return t[t.length-1]}function hl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=_i(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Fs(e)));)n--;if(!r)return{x:0,y:0};const s=js(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function dl(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?ht(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?ht(n,t,r.max):Math.min(t,n)),t}function Bn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function fl(t,{top:e,left:n,bottom:r,right:i}){return{x:Bn(t.x,n,i),y:Bn(t.y,e,r)}}function Vn(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function pl(t,e){return{x:Vn(t.x,e.x),y:Vn(t.y,e.y)}}function ml(t,e){let n=.5;const r=Ot(t),i=Ot(e);return i>r?n=Sn(e.min,e.max-r,t.min):r>i&&(n=Sn(t.min,t.max-i,e.min)),Ns(0,1,n)}function gl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Vt=.35;function _l(t=Vt){return t===!1?t=0:t===!0&&(t=Vt),{x:$n(t,"left","right"),y:$n(t,"top","bottom")}}function $n(t,e,n){return{min:An(t,e),max:An(t,n)}}function An(t,e){return typeof t=="number"?t:t[e]||0}const yl=new WeakMap;class wl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zs(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=h=>{n?(this.stopAnimation(),this.snapToCursor(Ke(h).point)):this.pauseAnimation()},o=(h,d)=>{this.stopAnimation();const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Vs(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),he(w=>{let b=this.getAxisMotionValue(w).get()||0;if($s.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const E=x.layout.layoutBox[w];E&&(b=Ot(E)*(parseFloat(b)/100))}}this.originPoint[w]=b}),y&&me.postRender(()=>y(h,d)),Mn(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},a=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:_}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:w}=d;if(m&&this.currentDirection===null){this.currentDirection=vl(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),_&&_(h,d)},l=(h,d)=>{this.latestPointerEvent=h,this.latestPanInfo=d,this.stop(h,d),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>he(h=>this.getAnimationState(h)==="paused"&&this.getAxisMotionValue(h).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new gi(e,{onSessionStart:s,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:mi(this.visualElement),element:this.visualElement.current})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&me.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!et(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=dl(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&Ve(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=fl(r.layoutBox,e):this.constraints=!1,this.elastic=_l(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&he(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=gl(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ve(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Ds(r,i.root,this.visualElement.getTransformPagePoint());let o=pl(i.layout.layoutBox,s);if(n){const a=n(Os(o));this.hasMutatedConstraints=!!a,a&&(o=ks(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=he(u=>{if(!et(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?e[u]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Mn(this.visualElement,e),r.start(Bs(e,r,0,n,this.visualElement,!1))}stopAnimation(){he(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){he(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){he(n=>{const{drag:r}=this.getProps();if(!et(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=s.get()||0;s.set(e[n]-ht(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ve(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};he(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=ml({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),he(o=>{if(!et(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(ht(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;yl.set(this.visualElement,this);const e=this.visualElement.current,n=$e(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),h=l.target,d=h!==e&&As(h);c&&u&&!d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ve(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),me.read(r);const o=ut(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(he(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Vt,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function vl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class xl extends be{constructor(e){super(e),this.removeGroupControls=st,this.removeListeners=st,this.controls=new wl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const Hn=t=>(e,n)=>{t&&me.postRender(()=>t(e,n))};class bl extends be{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(e){this.session=new gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hn(e),onStart:Hn(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&me.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=$e(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Pt=!1;class El extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),Pt&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Hs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,Pt=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||me.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Us.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Pt=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function yi(t){const[e,n]=Fa(),r=f.useContext(ii);return g.jsx(El,{...t,layoutGroup:r,switchLayoutGroup:f.useContext(fi),isPresent:e,safeToRemove:n})}const Cl={pan:{Feature:bl},drag:{Feature:xl,ProjectionNode:zr,MeasureLayout:yi}};function Un(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&me.postRender(()=>s(e,Ke(e)))}class Rl extends be{mount(){const{current:e}=this.node;e&&(this.unmount=Ws(e,(n,r)=>(Un(this.node,r,"Start"),i=>Un(this.node,i,"End"))))}unmount(){}}class Sl extends be{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nr(ut(this.node.current,"focus",()=>this.onFocus()),ut(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Wn(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&me.postRender(()=>s(e,Ke(e)))}class Ml extends be{mount(){const{current:e}=this.node;e&&(this.unmount=Gs(e,(n,r)=>(Wn(this.node,r,"Start"),(i,{success:s})=>Wn(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $t=new WeakMap,Lt=new WeakMap,Pl=t=>{const e=$t.get(t.target);e&&e(t)},Ll=t=>{t.forEach(Pl)};function Il({root:t,...e}){const n=t||document;Lt.has(n)||Lt.set(n,{});const r=Lt.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Ll,{root:t,...e})),r[i]}function Tl(t,e,n){const r=Il(e);return $t.set(t,n),r.observe(t),()=>{$t.delete(t),r.unobserve(t)}}const Fl={some:0,all:1};class jl extends be{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Fl[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),d=c?u:h;d&&d(l)};return Tl(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Nl(e,n))&&this.startObserver()}unmount(){}}function Nl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const zl={inView:{Feature:jl},tap:{Feature:Ml},focus:{Feature:Sl},hover:{Feature:Rl}},Dl={layout:{ProjectionNode:zr,MeasureLayout:yi}},Ol={...ll,...zl,...Cl,...Dl},k=rl(Ol,il),kl="_header_6kz3c_1",Bl="_scrolled_6kz3c_11",Vl="_nav_6kz3c_17",$l="_logo_6kz3c_24",Al="_logoImage_6kz3c_30",Hl="_navLinks_6kz3c_35",Ul="_navLink_6kz3c_35",Wl="_active_6kz3c_58",Gl="_activeIndicator_6kz3c_63",ql="_actions_6kz3c_75",Yl="_langToggle_6kz3c_81",Xl="_langDivider_6kz3c_101",Kl="_activeLang_6kz3c_105",Ql="_mobileMenuBtn_6kz3c_109",Zl="_hamburger_6kz3c_119",Jl="_open_6kz3c_150",G={header:kl,scrolled:Bl,nav:Vl,logo:$l,logoImage:Al,navLinks:Hl,navLink:Ul,active:Wl,activeIndicator:Gl,actions:ql,langToggle:Yl,langDivider:Xl,activeLang:Kl,mobileMenuBtn:Ql,hamburger:Zl,open:Jl};function ec(){const{t,language:e,setLanguage:n}=ze(),r=Ee(),[i,s]=f.useState(!1),[o,a]=f.useState(!1),[l,c]=f.useState(0),u=f.useRef(null),h=f.useRef([]),d=[{path:"/",label:t.nav.home},{path:"/about",label:t.nav.about},{path:"/contact",label:t.nav.contact}],p=d.findIndex(y=>y.path===r.pathname);f.useEffect(()=>{const y=()=>{s(window.scrollY>20)};return window.addEventListener("scroll",y,{passive:!0}),()=>window.removeEventListener("scroll",y)},[]),f.useEffect(()=>{a(!1)},[r.pathname]),f.useEffect(()=>{const y=()=>{const _=h.current[p],w=u.current;if(_&&w){const b=w.getBoundingClientRect(),x=_.getBoundingClientRect(),E=x.left-b.left+x.width/2;c(E)}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[p,e]);const m=()=>{n(e==="de"?"en":"de")};return g.jsx(k.header,{className:`${G.header} ${i?G.scrolled:""}`,initial:{y:-100},animate:{y:0},transition:{duration:.5,ease:"easeOut"},children:g.jsxs("nav",{className:`${G.nav} container`,children:[g.jsx(Fe,{to:"/",className:G.logo,children:g.jsx("img",{src:"/logo.svg",alt:"RagusaIT",className:G.logoImage})}),g.jsxs("div",{ref:u,className:`${G.navLinks} ${o?G.open:""}`,children:[d.map((y,_)=>g.jsx(Fe,{ref:w=>{h.current[_]=w},to:y.path,className:`${G.navLink} ${r.pathname===y.path?G.active:""}`,children:y.label},y.path)),p!==-1&&g.jsx(k.div,{className:G.activeIndicator,animate:{x:l},transition:{type:"spring",stiffness:380,damping:30}})]}),g.jsxs("div",{className:G.actions,children:[g.jsxs("button",{onClick:m,className:G.langToggle,"aria-label":`Switch to ${e==="de"?"English":"German"}`,children:[g.jsx("span",{className:e==="de"?G.activeLang:"",children:"DE"}),g.jsx("span",{className:G.langDivider,children:"/"}),g.jsx("span",{className:e==="en"?G.activeLang:"",children:"EN"})]}),g.jsx("button",{className:G.mobileMenuBtn,onClick:()=>a(!o),"aria-label":"Toggle menu","aria-expanded":o,children:g.jsx("span",{className:`${G.hamburger} ${o?G.open:""}`})})]})]})})}const tc="_footer_qrb1s_1",nc="_content_qrb1s_8",rc="_brand_qrb1s_16",ic="_logoImage_qrb1s_23",sc="_copyright_qrb1s_28",oc="_links_qrb1s_34",ac="_socialLink_qrb1s_40",lc="_credit_qrb1s_58",cc="_heart_qrb1s_64",ge={footer:tc,content:nc,brand:rc,logoImage:ic,copyright:sc,links:oc,socialLink:ac,credit:lc,heart:cc};function uc(){const{t}=ze(),e=new Date().getFullYear();return g.jsx("footer",{className:ge.footer,children:g.jsxs("div",{className:`${ge.content} container`,children:[g.jsxs("div",{className:ge.brand,children:[g.jsx("img",{src:"/logo.svg",alt:"RagusaIT",className:ge.logoImage}),g.jsx("p",{className:ge.copyright,children:t.footer.copyright.replace("{year}",String(e))})]}),g.jsx("div",{className:ge.links,children:g.jsx("a",{href:"https://github.com/ragusa-it",target:"_blank",rel:"noopener noreferrer",className:ge.socialLink,"aria-label":"GitHub",children:g.jsx("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor","aria-hidden":"true",children:g.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})})}),g.jsx("div",{className:ge.credit,children:g.jsxs("p",{children:[t.footer.madeIn," ",g.jsx("span",{className:ge.heart,children:t.footer.love})]})})]})})}const hc="_cursor_1b430_1",dc="_cursorDot_1b430_19",fc="_pointer_1b430_31",pc="_clicking_1b430_38",mc="_hidden_1b430_44",Le={cursor:hc,cursorDot:dc,pointer:fc,clicking:pc,hidden:mc};function gc(){const[t,e]=f.useState({x:0,y:0}),[n,r]=f.useState(!1),[i,s]=f.useState(!0),[o,a]=f.useState(!1),l=f.useCallback(p=>{e({x:p.clientX,y:p.clientY}),s(!1);const m=p.target,y=m.tagName==="A"||m.tagName==="BUTTON"||!!m.closest("a")||!!m.closest("button")||window.getComputedStyle(m).cursor==="pointer";r(y)},[]),c=f.useCallback(()=>a(!0),[]),u=f.useCallback(()=>a(!1),[]),h=f.useCallback(()=>s(!0),[]),d=f.useCallback(()=>s(!1),[]);return f.useEffect(()=>{if(!window.matchMedia("(hover: none)").matches)return document.addEventListener("mousemove",l),document.addEventListener("mousedown",c),document.addEventListener("mouseup",u),document.addEventListener("mouseleave",h),document.addEventListener("mouseenter",d),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",u),document.removeEventListener("mouseleave",h),document.removeEventListener("mouseenter",d)}},[l,c,u,h,d]),typeof window<"u"&&window.matchMedia("(hover: none)").matches?null:g.jsxs(g.Fragment,{children:[g.jsx("div",{className:`${Le.cursor} ${n?Le.pointer:""} ${i?Le.hidden:""} ${o?Le.clicking:""}`,style:{left:t.x,top:t.y}}),g.jsx("div",{className:`${Le.cursorDot} ${i?Le.hidden:""}`,style:{left:t.x,top:t.y}})]})}function _c({words:t,typingSpeed:e=100,deletingSpeed:n=50,pauseDuration:r=2e3}){const[i,s]=f.useState(0),[o,a]=f.useState(""),[l,c]=f.useState(!1),[u,h]=f.useState(!1),d=f.useCallback(()=>{const p=t[i];u||(l?(a(p.substring(0,o.length-1)),o.length===0&&(c(!1),s(m=>(m+1)%t.length))):(a(p.substring(0,o.length+1)),o===p&&(h(!0),setTimeout(()=>{h(!1),c(!0)},r))))},[o,i,l,u,t,r]);return f.useEffect(()=>{const m=setTimeout(d,l?n:e);return()=>clearTimeout(m)},[d,l,e,n]),{text:o,isTyping:!l&&!u,isDeleting:l,currentWordIndex:i}}let v;const wi=new Array(128).fill(void 0);wi.push(void 0,null,!0,!1);wi.length;const yc=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&yc.decode();function P(t,e){if(!(t instanceof e))throw new Error(`expected instance of ${e.name}`)}let tt=null;function wc(){return tt!==null&&tt.byteLength!==0||(tt=new Float32Array(v.memory.buffer)),tt}let nt=null;function vc(){return nt!==null&&nt.byteLength!==0||(nt=new Uint32Array(v.memory.buffer)),nt}let J=0;function ke(t,e){const n=e(4*t.length,4)>>>0;return vc().set(t,n/4),J=t.length,n}function xe(t,e){const n=e(4*t.length,4)>>>0;return wc().set(t,n/4),J=t.length,n}const q=Object.freeze({Ball:0,0:"Ball",Cuboid:1,1:"Cuboid",Capsule:2,2:"Capsule",Segment:3,3:"Segment",Polyline:4,4:"Polyline",Triangle:5,5:"Triangle",TriMesh:6,6:"TriMesh",HeightField:7,7:"HeightField",Compound:8,8:"Compound",ConvexPolyhedron:9,9:"ConvexPolyhedron",Cylinder:10,10:"Cylinder",Cone:11,11:"Cone",RoundCuboid:12,12:"RoundCuboid",RoundTriangle:13,13:"RoundTriangle",RoundCylinder:14,14:"RoundCylinder",RoundCone:15,15:"RoundCone",RoundConvexPolyhedron:16,16:"RoundConvexPolyhedron",HalfSpace:17,17:"HalfSpace",Voxels:18,18:"Voxels"});typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawbroadphase_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawccdsolver_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcharactercollision_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcolliderset_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcollidershapecasthit_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcontactforceevent_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcontactmanifold_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawcontactpair_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawdebugrenderpipeline_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawdeserializedworld_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawdynamicraycastvehiclecontroller_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_raweventqueue_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawgenericjoint_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawimpulsejointset_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawintegrationparameters_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawislandmanager_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawkinematiccharactercontroller_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawmultibodyjointset_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawnarrowphase_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawphysicspipeline_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawpidcontroller_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawpointcolliderprojection_free(t>>>0,1)));const Gn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawpointprojection_free(t>>>0,1)));class on{static __wrap(e){e>>>=0;const n=Object.create(on.prototype);return n.__wbg_ptr=e,Gn.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Gn.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawpointprojection_free(e,0)}point(){const e=v.rawpointprojection_point(this.__wbg_ptr);return M.__wrap(e)}isInside(){return v.rawpointprojection_isInside(this.__wbg_ptr)!==0}}typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawraycolliderhit_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawraycolliderintersection_free(t>>>0,1)));const qn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawrayintersection_free(t>>>0,1)));class an{static __wrap(e){e>>>=0;const n=Object.create(an.prototype);return n.__wbg_ptr=e,qn.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,qn.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawrayintersection_free(e,0)}normal(){const e=v.rawcollidershapecasthit_witness1(this.__wbg_ptr);return M.__wrap(e)}time_of_impact(){return v.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}featureType(){return v.rawpointcolliderprojection_featureType(this.__wbg_ptr)}featureId(){const e=v.rawpointcolliderprojection_featureId(this.__wbg_ptr);return e===4294967297?void 0:e}}typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawrigidbodyset_free(t>>>0,1)));const It=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawrotation_free(t>>>0,1)));class ee{static __wrap(e){e>>>=0;const n=Object.create(ee.prototype);return n.__wbg_ptr=e,It.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,It.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawrotation_free(e,0)}constructor(e,n,r,i){const s=v.rawrotation_new(e,n,r,i);return this.__wbg_ptr=s>>>0,It.register(this,this.__wbg_ptr,this),this}static identity(){const e=v.rawrotation_identity();return ee.__wrap(e)}get x(){return v.rawintegrationparameters_dt(this.__wbg_ptr)}get y(){return v.rawkinematiccharactercontroller_offset(this.__wbg_ptr)}get z(){return v.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}get w(){return v.rawrotation_w(this.__wbg_ptr)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawsdpmatrix3_free(t>>>0,1)));typeof FinalizationRegistry>"u"||new FinalizationRegistry((t=>v.__wbg_rawserializationpipeline_free(t>>>0,1)));const Yn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawshape_free(t>>>0,1)));class L{static __wrap(e){e>>>=0;const n=Object.create(L.prototype);return n.__wbg_ptr=e,Yn.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Yn.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawshape_free(e,0)}static cuboid(e,n,r){const i=v.rawshape_cuboid(e,n,r);return L.__wrap(i)}static roundCuboid(e,n,r,i){const s=v.rawshape_roundCuboid(e,n,r,i);return L.__wrap(s)}static ball(e){const n=v.rawshape_ball(e);return L.__wrap(n)}static halfspace(e){P(e,M);const n=v.rawshape_halfspace(e.__wbg_ptr);return L.__wrap(n)}static capsule(e,n){const r=v.rawshape_capsule(e,n);return L.__wrap(r)}static cylinder(e,n){const r=v.rawshape_cylinder(e,n);return L.__wrap(r)}static roundCylinder(e,n,r){const i=v.rawshape_roundCylinder(e,n,r);return L.__wrap(i)}static cone(e,n){const r=v.rawshape_cone(e,n);return L.__wrap(r)}static roundCone(e,n,r){const i=v.rawshape_roundCone(e,n,r);return L.__wrap(i)}static voxels(e,n){P(e,M);const r=ke(n,v.__wbindgen_export_2),i=J,s=v.rawshape_voxels(e.__wbg_ptr,r,i);return L.__wrap(s)}static voxelsFromPoints(e,n){P(e,M);const r=xe(n,v.__wbindgen_export_2),i=J,s=v.rawshape_voxelsFromPoints(e.__wbg_ptr,r,i);return L.__wrap(s)}static polyline(e,n){const r=xe(e,v.__wbindgen_export_2),i=J,s=ke(n,v.__wbindgen_export_2),o=J,a=v.rawshape_polyline(r,i,s,o);return L.__wrap(a)}static trimesh(e,n,r){const i=xe(e,v.__wbindgen_export_2),s=J,o=ke(n,v.__wbindgen_export_2),a=J,l=v.rawshape_trimesh(i,s,o,a,r);return l===0?void 0:L.__wrap(l)}static heightfield(e,n,r,i,s){const o=xe(r,v.__wbindgen_export_2),a=J;P(i,M);const l=v.rawshape_heightfield(e,n,o,a,i.__wbg_ptr,s);return L.__wrap(l)}static segment(e,n){P(e,M),P(n,M);const r=v.rawshape_segment(e.__wbg_ptr,n.__wbg_ptr);return L.__wrap(r)}static triangle(e,n,r){P(e,M),P(n,M),P(r,M);const i=v.rawshape_triangle(e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr);return L.__wrap(i)}static roundTriangle(e,n,r,i){P(e,M),P(n,M),P(r,M);const s=v.rawshape_roundTriangle(e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i);return L.__wrap(s)}static convexHull(e){const n=xe(e,v.__wbindgen_export_2),r=J,i=v.rawshape_convexHull(n,r);return i===0?void 0:L.__wrap(i)}static roundConvexHull(e,n){const r=xe(e,v.__wbindgen_export_2),i=J,s=v.rawshape_roundConvexHull(r,i,n);return s===0?void 0:L.__wrap(s)}static convexMesh(e,n){const r=xe(e,v.__wbindgen_export_2),i=J,s=ke(n,v.__wbindgen_export_2),o=J,a=v.rawshape_convexMesh(r,i,s,o);return a===0?void 0:L.__wrap(a)}static roundConvexMesh(e,n,r){const i=xe(e,v.__wbindgen_export_2),s=J,o=ke(n,v.__wbindgen_export_2),a=J,l=v.rawshape_roundConvexMesh(i,s,o,a,r);return l===0?void 0:L.__wrap(l)}castShape(e,n,r,i,s,o,a,l,c,u){P(e,M),P(n,ee),P(r,M),P(i,L),P(s,M),P(o,ee),P(a,M);const h=v.rawshape_castShape(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s.__wbg_ptr,o.__wbg_ptr,a.__wbg_ptr,l,c,u);return h===0?void 0:ln.__wrap(h)}intersectsShape(e,n,r,i,s){return P(e,M),P(n,ee),P(r,L),P(i,M),P(s,ee),v.rawshape_intersectsShape(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s.__wbg_ptr)!==0}contactShape(e,n,r,i,s,o){P(e,M),P(n,ee),P(r,L),P(i,M),P(s,ee);const a=v.rawshape_contactShape(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s.__wbg_ptr,o);return a===0?void 0:cn.__wrap(a)}containsPoint(e,n,r){return P(e,M),P(n,ee),P(r,M),v.rawshape_containsPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr)!==0}projectPoint(e,n,r,i){P(e,M),P(n,ee),P(r,M);const s=v.rawshape_projectPoint(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i);return on.__wrap(s)}intersectsRay(e,n,r,i,s){return P(e,M),P(n,ee),P(r,M),P(i,M),v.rawshape_intersectsRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s)!==0}castRay(e,n,r,i,s,o){return P(e,M),P(n,ee),P(r,M),P(i,M),v.rawshape_castRay(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s,o)}castRayAndGetNormal(e,n,r,i,s,o){P(e,M),P(n,ee),P(r,M),P(i,M);const a=v.rawshape_castRayAndGetNormal(this.__wbg_ptr,e.__wbg_ptr,n.__wbg_ptr,r.__wbg_ptr,i.__wbg_ptr,s,o);return a===0?void 0:an.__wrap(a)}}const Xn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawshapecasthit_free(t>>>0,1)));class ln{static __wrap(e){e>>>=0;const n=Object.create(ln.prototype);return n.__wbg_ptr=e,Xn.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Xn.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawshapecasthit_free(e,0)}time_of_impact(){return v.rawintegrationparameters_dt(this.__wbg_ptr)}witness1(){const e=v.rawshapecasthit_witness1(this.__wbg_ptr);return M.__wrap(e)}witness2(){const e=v.rawcontactforceevent_total_force(this.__wbg_ptr);return M.__wrap(e)}normal1(){const e=v.rawshapecasthit_normal1(this.__wbg_ptr);return M.__wrap(e)}normal2(){const e=v.rawshapecasthit_normal2(this.__wbg_ptr);return M.__wrap(e)}}const Kn=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawshapecontact_free(t>>>0,1)));class cn{static __wrap(e){e>>>=0;const n=Object.create(cn.prototype);return n.__wbg_ptr=e,Kn.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Kn.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawshapecontact_free(e,0)}distance(){return v.rawkinematiccharactercontroller_maxSlopeClimbAngle(this.__wbg_ptr)}point1(){const e=v.rawpointprojection_point(this.__wbg_ptr);return M.__wrap(e)}point2(){const e=v.rawcollidershapecasthit_witness1(this.__wbg_ptr);return M.__wrap(e)}normal1(){const e=v.rawcollidershapecasthit_witness2(this.__wbg_ptr);return M.__wrap(e)}normal2(){const e=v.rawcharactercollision_translationDeltaApplied(this.__wbg_ptr);return M.__wrap(e)}}const Tt=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>v.__wbg_rawvector_free(t>>>0,1)));class M{static __wrap(e){e>>>=0;const n=Object.create(M.prototype);return n.__wbg_ptr=e,Tt.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Tt.unregister(this),e}free(){const e=this.__destroy_into_raw();v.__wbg_rawvector_free(e,0)}static zero(){const e=v.rawvector_zero();return M.__wrap(e)}constructor(e,n,r){const i=v.rawvector_new(e,n,r);return this.__wbg_ptr=i>>>0,Tt.register(this,this.__wbg_ptr,this),this}get x(){return v.rawintegrationparameters_dt(this.__wbg_ptr)}set x(e){v.rawintegrationparameters_set_dt(this.__wbg_ptr,e)}get y(){return v.rawkinematiccharactercontroller_offset(this.__wbg_ptr)}set y(e){v.rawvector_set_y(this.__wbg_ptr,e)}get z(){return v.rawcollidershapecasthit_time_of_impact(this.__wbg_ptr)}set z(e){v.rawvector_set_z(this.__wbg_ptr,e)}xyz(){const e=v.rawvector_xyz(this.__wbg_ptr);return M.__wrap(e)}yxz(){const e=v.rawvector_yxz(this.__wbg_ptr);return M.__wrap(e)}zxy(){const e=v.rawvector_zxy(this.__wbg_ptr);return M.__wrap(e)}xzy(){const e=v.rawvector_xzy(this.__wbg_ptr);return M.__wrap(e)}yzx(){const e=v.rawvector_yzx(this.__wbg_ptr);return M.__wrap(e)}zyx(){const e=v.rawvector_zyx(this.__wbg_ptr);return M.__wrap(e)}}class xc{constructor(e,n,r){this.x=e,this.y=n,this.z=r}}class R{static new(e,n,r){return new xc(e,n,r)}static intoRaw(e){return new M(e.x,e.y,e.z)}static zeros(){return R.new(0,0,0)}static fromRaw(e){if(!e)return null;let n=R.new(e.x,e.y,e.z);return e.free(),n}static copy(e,n){e.x=n.x,e.y=n.y,e.z=n.z}}class Qn{constructor(e,n,r,i){this.x=e,this.y=n,this.z=r,this.w=i}}class U{static identity(){return new Qn(0,0,0,1)}static fromRaw(e){if(!e)return null;let n=new Qn(e.x,e.y,e.z,e.w);return e.free(),n}static intoRaw(e){return new ee(e.x,e.y,e.z,e.w)}static copy(e,n){e.x=n.x,e.y=n.y,e.z=n.z,e.w=n.w}}var de,Zn,Jn,er,pt,At,A,tr,nr,rr,Se,Ht,ir,sr,Ut,Te;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Fixed=1]="Fixed",t[t.KinematicPositionBased=2]="KinematicPositionBased",t[t.KinematicVelocityBased=3]="KinematicVelocityBased"})(de||(de={}));class fe{constructor(e){this.enabled=!0,this.status=e,this.translation=R.zeros(),this.rotation=U.identity(),this.gravityScale=1,this.linvel=R.zeros(),this.mass=0,this.massOnly=!1,this.centerOfMass=R.zeros(),this.translationsEnabledX=!0,this.translationsEnabledY=!0,this.angvel=R.zeros(),this.principalAngularInertia=R.zeros(),this.angularInertiaLocalFrame=U.identity(),this.translationsEnabledZ=!0,this.rotationsEnabledX=!0,this.rotationsEnabledY=!0,this.rotationsEnabledZ=!0,this.linearDamping=0,this.angularDamping=0,this.canSleep=!0,this.sleeping=!1,this.ccdEnabled=!1,this.softCcdPrediction=0,this.dominanceGroup=0,this.additionalSolverIterations=0}static dynamic(){return new fe(de.Dynamic)}static kinematicPositionBased(){return new fe(de.KinematicPositionBased)}static kinematicVelocityBased(){return new fe(de.KinematicVelocityBased)}static fixed(){return new fe(de.Fixed)}static newDynamic(){return new fe(de.Dynamic)}static newKinematicPositionBased(){return new fe(de.KinematicPositionBased)}static newKinematicVelocityBased(){return new fe(de.KinematicVelocityBased)}static newStatic(){return new fe(de.Fixed)}setDominanceGroup(e){return this.dominanceGroup=e,this}setAdditionalSolverIterations(e){return this.additionalSolverIterations=e,this}setEnabled(e){return this.enabled=e,this}setTranslation(e,n,r){if(typeof e!="number"||typeof n!="number"||typeof r!="number")throw TypeError("The translation components must be numbers.");return this.translation={x:e,y:n,z:r},this}setRotation(e){return U.copy(this.rotation,e),this}setGravityScale(e){return this.gravityScale=e,this}setAdditionalMass(e){return this.mass=e,this.massOnly=!0,this}setLinvel(e,n,r){if(typeof e!="number"||typeof n!="number"||typeof r!="number")throw TypeError("The linvel components must be numbers.");return this.linvel={x:e,y:n,z:r},this}setAngvel(e){return R.copy(this.angvel,e),this}setAdditionalMassProperties(e,n,r,i){return this.mass=e,R.copy(this.centerOfMass,n),R.copy(this.principalAngularInertia,r),U.copy(this.angularInertiaLocalFrame,i),this.massOnly=!1,this}enabledTranslations(e,n,r){return this.translationsEnabledX=e,this.translationsEnabledY=n,this.translationsEnabledZ=r,this}restrictTranslations(e,n,r){return this.enabledTranslations(e,n,r)}lockTranslations(){return this.enabledTranslations(!1,!1,!1)}enabledRotations(e,n,r){return this.rotationsEnabledX=e,this.rotationsEnabledY=n,this.rotationsEnabledZ=r,this}restrictRotations(e,n,r){return this.enabledRotations(e,n,r)}lockRotations(){return this.restrictRotations(!1,!1,!1)}setLinearDamping(e){return this.linearDamping=e,this}setAngularDamping(e){return this.angularDamping=e,this}setCanSleep(e){return this.canSleep=e,this}setSleeping(e){return this.sleeping=e,this}setCcdEnabled(e){return this.ccdEnabled=e,this}setSoftCcdPrediction(e){return this.softCcdPrediction=e,this}setUserData(e){return this.userData=e,this}}(function(t){t[t.Revolute=0]="Revolute",t[t.Fixed=1]="Fixed",t[t.Prismatic=2]="Prismatic",t[t.Rope=3]="Rope",t[t.Spring=4]="Spring",t[t.Spherical=5]="Spherical",t[t.Generic=6]="Generic"})(Zn||(Zn={})),(function(t){t[t.AccelerationBased=0]="AccelerationBased",t[t.ForceBased=1]="ForceBased"})(Jn||(Jn={})),(function(t){t[t.LinX=1]="LinX",t[t.LinY=2]="LinY",t[t.LinZ=4]="LinZ",t[t.AngX=8]="AngX",t[t.AngY=16]="AngY",t[t.AngZ=32]="AngZ"})(er||(er={}));(function(t){t[t.Average=0]="Average",t[t.Min=1]="Min",t[t.Multiply=2]="Multiply",t[t.Max=3]="Max"})(pt||(pt={}));(function(t){t[t.Vertex=0]="Vertex",t[t.Edge=1]="Edge",t[t.Face=2]="Face",t[t.Unknown=3]="Unknown"})(At||(At={}));class un{constructor(e,n,r,i){this.featureType=At.Unknown,this.featureId=void 0,this.timeOfImpact=e,this.normal=n,i!==void 0&&(this.featureId=i),r!==void 0&&(this.featureType=r)}static fromRaw(e){if(!e)return null;const n=new un(e.time_of_impact(),R.fromRaw(e.normal()),e.featureType(),e.featureId());return e.free(),n}}class hn{constructor(e,n){this.point=e,this.isInside=n}static fromRaw(e){if(!e)return null;const n=new hn(R.fromRaw(e.point()),e.isInside());return e.free(),n}}class dn{constructor(e,n,r,i,s){this.time_of_impact=e,this.witness1=n,this.witness2=r,this.normal1=i,this.normal2=s}static fromRaw(e,n){if(!n)return null;const r=new dn(n.time_of_impact(),R.fromRaw(n.witness1()),R.fromRaw(n.witness2()),R.fromRaw(n.normal1()),R.fromRaw(n.normal2()));return n.free(),r}}class fn{constructor(e,n,r,i,s){this.distance=e,this.point1=n,this.point2=r,this.normal1=i,this.normal2=s}static fromRaw(e){if(!e)return null;const n=new fn(e.distance(),R.fromRaw(e.point1()),R.fromRaw(e.point2()),R.fromRaw(e.normal1()),R.fromRaw(e.normal2()));return e.free(),n}}class K{static fromRaw(e,n){const r=e.coShapeType(n);let i,s,o,a,l,c,u;switch(r){case q.Ball:return new vi(e.coRadius(n));case q.Cuboid:return i=e.coHalfExtents(n),new xi(i.x,i.y,i.z);case q.RoundCuboid:return i=e.coHalfExtents(n),s=e.coRoundRadius(n),new bi(i.x,i.y,i.z,s);case q.Capsule:return l=e.coHalfHeight(n),c=e.coRadius(n),new Ei(l,c);case q.Segment:return o=e.coVertices(n),new Ci(R.new(o[0],o[1],o[2]),R.new(o[3],o[4],o[5]));case q.Polyline:return o=e.coVertices(n),a=e.coIndices(n),new Mi(o,a);case q.Triangle:return o=e.coVertices(n),new Ri(R.new(o[0],o[1],o[2]),R.new(o[3],o[4],o[5]),R.new(o[6],o[7],o[8]));case q.RoundTriangle:return o=e.coVertices(n),s=e.coRoundRadius(n),new Si(R.new(o[0],o[1],o[2]),R.new(o[3],o[4],o[5]),R.new(o[6],o[7],o[8]),s);case q.HalfSpace:return u=R.fromRaw(e.coHalfspaceNormal(n)),new bc(u);case q.Voxels:const h=e.coVoxelData(n),d=e.coVoxelSize(n);return new Pi(h,d);case q.TriMesh:o=e.coVertices(n),a=e.coIndices(n);const p=e.coTriMeshFlags(n);return new Li(o,a,p);case q.HeightField:const m=e.coHeightfieldScale(n),y=e.coHeightfieldHeights(n),_=e.coHeightfieldNRows(n),w=e.coHeightfieldNCols(n),b=e.coHeightFieldFlags(n);return new Ii(_,w,y,m,b);case q.ConvexPolyhedron:return o=e.coVertices(n),a=e.coIndices(n),new Wt(o,a);case q.RoundConvexPolyhedron:return o=e.coVertices(n),a=e.coIndices(n),s=e.coRoundRadius(n),new Gt(o,a,s);case q.Cylinder:return l=e.coHalfHeight(n),c=e.coRadius(n),new Ti(l,c);case q.RoundCylinder:return l=e.coHalfHeight(n),c=e.coRadius(n),s=e.coRoundRadius(n),new Fi(l,c,s);case q.Cone:return l=e.coHalfHeight(n),c=e.coRadius(n),new ji(l,c);case q.RoundCone:return l=e.coHalfHeight(n),c=e.coRadius(n),s=e.coRoundRadius(n),new Ni(l,c,s);default:throw new Error("unknown shape type: "+r)}}castShape(e,n,r,i,s,o,a,l,c,u){let h=R.intoRaw(e),d=U.intoRaw(n),p=R.intoRaw(r),m=R.intoRaw(s),y=U.intoRaw(o),_=R.intoRaw(a),w=this.intoRaw(),b=i.intoRaw(),x=dn.fromRaw(null,w.castShape(h,d,p,b,m,y,_,l,c,u));return h.free(),d.free(),p.free(),m.free(),y.free(),_.free(),w.free(),b.free(),x}intersectsShape(e,n,r,i,s){let o=R.intoRaw(e),a=U.intoRaw(n),l=R.intoRaw(i),c=U.intoRaw(s),u=this.intoRaw(),h=r.intoRaw(),d=u.intersectsShape(o,a,h,l,c);return o.free(),a.free(),l.free(),c.free(),u.free(),h.free(),d}contactShape(e,n,r,i,s,o){let a=R.intoRaw(e),l=U.intoRaw(n),c=R.intoRaw(i),u=U.intoRaw(s),h=this.intoRaw(),d=r.intoRaw(),p=fn.fromRaw(h.contactShape(a,l,d,c,u,o));return a.free(),l.free(),c.free(),u.free(),h.free(),d.free(),p}containsPoint(e,n,r){let i=R.intoRaw(e),s=U.intoRaw(n),o=R.intoRaw(r),a=this.intoRaw(),l=a.containsPoint(i,s,o);return i.free(),s.free(),o.free(),a.free(),l}projectPoint(e,n,r,i){let s=R.intoRaw(e),o=U.intoRaw(n),a=R.intoRaw(r),l=this.intoRaw(),c=hn.fromRaw(l.projectPoint(s,o,a,i));return s.free(),o.free(),a.free(),l.free(),c}intersectsRay(e,n,r,i){let s=R.intoRaw(n),o=U.intoRaw(r),a=R.intoRaw(e.origin),l=R.intoRaw(e.dir),c=this.intoRaw(),u=c.intersectsRay(s,o,a,l,i);return s.free(),o.free(),a.free(),l.free(),c.free(),u}castRay(e,n,r,i,s){let o=R.intoRaw(n),a=U.intoRaw(r),l=R.intoRaw(e.origin),c=R.intoRaw(e.dir),u=this.intoRaw(),h=u.castRay(o,a,l,c,i,s);return o.free(),a.free(),l.free(),c.free(),u.free(),h}castRayAndGetNormal(e,n,r,i,s){let o=R.intoRaw(n),a=U.intoRaw(r),l=R.intoRaw(e.origin),c=R.intoRaw(e.dir),u=this.intoRaw(),h=un.fromRaw(u.castRayAndGetNormal(o,a,l,c,i,s));return o.free(),a.free(),l.free(),c.free(),u.free(),h}}(function(t){t[t.Ball=0]="Ball",t[t.Cuboid=1]="Cuboid",t[t.Capsule=2]="Capsule",t[t.Segment=3]="Segment",t[t.Polyline=4]="Polyline",t[t.Triangle=5]="Triangle",t[t.TriMesh=6]="TriMesh",t[t.HeightField=7]="HeightField",t[t.ConvexPolyhedron=9]="ConvexPolyhedron",t[t.Cylinder=10]="Cylinder",t[t.Cone=11]="Cone",t[t.RoundCuboid=12]="RoundCuboid",t[t.RoundTriangle=13]="RoundTriangle",t[t.RoundCylinder=14]="RoundCylinder",t[t.RoundCone=15]="RoundCone",t[t.RoundConvexPolyhedron=16]="RoundConvexPolyhedron",t[t.HalfSpace=17]="HalfSpace",t[t.Voxels=18]="Voxels"})(A||(A={})),(function(t){t[t.FIX_INTERNAL_EDGES=1]="FIX_INTERNAL_EDGES"})(tr||(tr={})),(function(t){t[t.DELETE_BAD_TOPOLOGY_TRIANGLES=4]="DELETE_BAD_TOPOLOGY_TRIANGLES",t[t.ORIENTED=8]="ORIENTED",t[t.MERGE_DUPLICATE_VERTICES=16]="MERGE_DUPLICATE_VERTICES",t[t.DELETE_DEGENERATE_TRIANGLES=32]="DELETE_DEGENERATE_TRIANGLES",t[t.DELETE_DUPLICATE_TRIANGLES=64]="DELETE_DUPLICATE_TRIANGLES",t[t.FIX_INTERNAL_EDGES=144]="FIX_INTERNAL_EDGES"})(nr||(nr={}));class vi extends K{constructor(e){super(),this.type=A.Ball,this.radius=e}intoRaw(){return L.ball(this.radius)}}class bc extends K{constructor(e){super(),this.type=A.HalfSpace,this.normal=e}intoRaw(){let e=R.intoRaw(this.normal),n=L.halfspace(e);return e.free(),n}}class xi extends K{constructor(e,n,r){super(),this.type=A.Cuboid,this.halfExtents=R.new(e,n,r)}intoRaw(){return L.cuboid(this.halfExtents.x,this.halfExtents.y,this.halfExtents.z)}}class bi extends K{constructor(e,n,r,i){super(),this.type=A.RoundCuboid,this.halfExtents=R.new(e,n,r),this.borderRadius=i}intoRaw(){return L.roundCuboid(this.halfExtents.x,this.halfExtents.y,this.halfExtents.z,this.borderRadius)}}class Ei extends K{constructor(e,n){super(),this.type=A.Capsule,this.halfHeight=e,this.radius=n}intoRaw(){return L.capsule(this.halfHeight,this.radius)}}class Ci extends K{constructor(e,n){super(),this.type=A.Segment,this.a=e,this.b=n}intoRaw(){let e=R.intoRaw(this.a),n=R.intoRaw(this.b),r=L.segment(e,n);return e.free(),n.free(),r}}class Ri extends K{constructor(e,n,r){super(),this.type=A.Triangle,this.a=e,this.b=n,this.c=r}intoRaw(){let e=R.intoRaw(this.a),n=R.intoRaw(this.b),r=R.intoRaw(this.c),i=L.triangle(e,n,r);return e.free(),n.free(),r.free(),i}}class Si extends K{constructor(e,n,r,i){super(),this.type=A.RoundTriangle,this.a=e,this.b=n,this.c=r,this.borderRadius=i}intoRaw(){let e=R.intoRaw(this.a),n=R.intoRaw(this.b),r=R.intoRaw(this.c),i=L.roundTriangle(e,n,r,this.borderRadius);return e.free(),n.free(),r.free(),i}}class Mi extends K{constructor(e,n){super(),this.type=A.Polyline,this.vertices=e,this.indices=n??new Uint32Array(0)}intoRaw(){return L.polyline(this.vertices,this.indices)}}class Pi extends K{constructor(e,n){super(),this.type=A.Voxels,this.data=e,this.voxelSize=n}intoRaw(){let e,n=R.intoRaw(this.voxelSize);return e=this.data instanceof Int32Array?L.voxels(n,this.data):L.voxelsFromPoints(n,this.data),n.free(),e}}class Li extends K{constructor(e,n,r){super(),this.type=A.TriMesh,this.vertices=e,this.indices=n,this.flags=r}intoRaw(){return L.trimesh(this.vertices,this.indices,this.flags)}}class Wt extends K{constructor(e,n){super(),this.type=A.ConvexPolyhedron,this.vertices=e,this.indices=n}intoRaw(){return this.indices?L.convexMesh(this.vertices,this.indices):L.convexHull(this.vertices)}}class Gt extends K{constructor(e,n,r){super(),this.type=A.RoundConvexPolyhedron,this.vertices=e,this.indices=n,this.borderRadius=r}intoRaw(){return this.indices?L.roundConvexMesh(this.vertices,this.indices,this.borderRadius):L.roundConvexHull(this.vertices,this.borderRadius)}}class Ii extends K{constructor(e,n,r,i,s){super(),this.type=A.HeightField,this.nrows=e,this.ncols=n,this.heights=r,this.scale=i,this.flags=s}intoRaw(){let e=R.intoRaw(this.scale),n=L.heightfield(this.nrows,this.ncols,this.heights,e,this.flags);return e.free(),n}}class Ti extends K{constructor(e,n){super(),this.type=A.Cylinder,this.halfHeight=e,this.radius=n}intoRaw(){return L.cylinder(this.halfHeight,this.radius)}}class Fi extends K{constructor(e,n,r){super(),this.type=A.RoundCylinder,this.borderRadius=r,this.halfHeight=e,this.radius=n}intoRaw(){return L.roundCylinder(this.halfHeight,this.radius,this.borderRadius)}}class ji extends K{constructor(e,n){super(),this.type=A.Cone,this.halfHeight=e,this.radius=n}intoRaw(){return L.cone(this.halfHeight,this.radius)}}class Ni extends K{constructor(e,n,r){super(),this.type=A.RoundCone,this.halfHeight=e,this.radius=n,this.borderRadius=r}intoRaw(){return L.roundCone(this.halfHeight,this.radius,this.borderRadius)}}(function(t){t[t.None=0]="None",t[t.LinX=1]="LinX",t[t.LinY=2]="LinY",t[t.LinZ=4]="LinZ",t[t.AngX=8]="AngX",t[t.AngY=16]="AngY",t[t.AngZ=32]="AngZ",t[t.AllLin=7]="AllLin",t[t.AllAng=56]="AllAng",t[t.All=63]="All"})(rr||(rr={}));(function(t){t[t.NONE=0]="NONE",t[t.COLLISION_EVENTS=1]="COLLISION_EVENTS",t[t.CONTACT_FORCE_EVENTS=2]="CONTACT_FORCE_EVENTS"})(Se||(Se={}));(function(t){t[t.NONE=0]="NONE",t[t.FILTER_CONTACT_PAIRS=1]="FILTER_CONTACT_PAIRS",t[t.FILTER_INTERSECTION_PAIRS=2]="FILTER_INTERSECTION_PAIRS"})(Ht||(Ht={})),(function(t){t[t.EMPTY=0]="EMPTY",t[t.COMPUTE_IMPULSE=1]="COMPUTE_IMPULSE"})(ir||(ir={})),(function(t){t[t.EXCLUDE_FIXED=1]="EXCLUDE_FIXED",t[t.EXCLUDE_KINEMATIC=2]="EXCLUDE_KINEMATIC",t[t.EXCLUDE_DYNAMIC=4]="EXCLUDE_DYNAMIC",t[t.EXCLUDE_SENSORS=8]="EXCLUDE_SENSORS",t[t.EXCLUDE_SOLIDS=16]="EXCLUDE_SOLIDS",t[t.ONLY_DYNAMIC=3]="ONLY_DYNAMIC",t[t.ONLY_KINEMATIC=5]="ONLY_KINEMATIC",t[t.ONLY_FIXED=6]="ONLY_FIXED"})(sr||(sr={})),(function(t){t[t.DYNAMIC_DYNAMIC=1]="DYNAMIC_DYNAMIC",t[t.DYNAMIC_KINEMATIC=12]="DYNAMIC_KINEMATIC",t[t.DYNAMIC_FIXED=2]="DYNAMIC_FIXED",t[t.KINEMATIC_KINEMATIC=52224]="KINEMATIC_KINEMATIC",t[t.KINEMATIC_FIXED=8704]="KINEMATIC_FIXED",t[t.FIXED_FIXED=32]="FIXED_FIXED",t[t.DEFAULT=15]="DEFAULT",t[t.ALL=60943]="ALL"})(Ut||(Ut={}));(function(t){t[t.Density=0]="Density",t[t.Mass=1]="Mass",t[t.MassProps=2]="MassProps"})(Te||(Te={}));class ${constructor(e){this.enabled=!0,this.shape=e,this.massPropsMode=Te.Density,this.density=1,this.friction=.5,this.restitution=0,this.rotation=U.identity(),this.translation=R.zeros(),this.isSensor=!1,this.collisionGroups=4294967295,this.solverGroups=4294967295,this.frictionCombineRule=pt.Average,this.restitutionCombineRule=pt.Average,this.activeCollisionTypes=Ut.DEFAULT,this.activeEvents=Se.NONE,this.activeHooks=Ht.NONE,this.mass=0,this.centerOfMass=R.zeros(),this.contactForceEventThreshold=0,this.contactSkin=0,this.principalAngularInertia=R.zeros(),this.angularInertiaLocalFrame=U.identity()}static ball(e){const n=new vi(e);return new $(n)}static capsule(e,n){const r=new Ei(e,n);return new $(r)}static segment(e,n){const r=new Ci(e,n);return new $(r)}static triangle(e,n,r){const i=new Ri(e,n,r);return new $(i)}static roundTriangle(e,n,r,i){const s=new Si(e,n,r,i);return new $(s)}static polyline(e,n){const r=new Mi(e,n);return new $(r)}static voxels(e,n){const r=new Pi(e,n);return new $(r)}static trimesh(e,n,r){const i=new Li(e,n,r);return new $(i)}static cuboid(e,n,r){const i=new xi(e,n,r);return new $(i)}static roundCuboid(e,n,r,i){const s=new bi(e,n,r,i);return new $(s)}static heightfield(e,n,r,i,s){const o=new Ii(e,n,r,i,s);return new $(o)}static cylinder(e,n){const r=new Ti(e,n);return new $(r)}static roundCylinder(e,n,r){const i=new Fi(e,n,r);return new $(i)}static cone(e,n){const r=new ji(e,n);return new $(r)}static roundCone(e,n,r){const i=new Ni(e,n,r);return new $(i)}static convexHull(e){const n=new Wt(e,null);return new $(n)}static convexMesh(e,n){const r=new Wt(e,n);return new $(r)}static roundConvexHull(e,n){const r=new Gt(e,null,n);return new $(r)}static roundConvexMesh(e,n,r){const i=new Gt(e,n,r);return new $(i)}setTranslation(e,n,r){if(typeof e!="number"||typeof n!="number"||typeof r!="number")throw TypeError("The translation components must be numbers.");return this.translation={x:e,y:n,z:r},this}setRotation(e){return U.copy(this.rotation,e),this}setSensor(e){return this.isSensor=e,this}setEnabled(e){return this.enabled=e,this}setContactSkin(e){return this.contactSkin=e,this}setDensity(e){return this.massPropsMode=Te.Density,this.density=e,this}setMass(e){return this.massPropsMode=Te.Mass,this.mass=e,this}setMassProperties(e,n,r,i){return this.massPropsMode=Te.MassProps,this.mass=e,R.copy(this.centerOfMass,n),R.copy(this.principalAngularInertia,r),U.copy(this.angularInertiaLocalFrame,i),this}setRestitution(e){return this.restitution=e,this}setFriction(e){return this.friction=e,this}setFrictionCombineRule(e){return this.frictionCombineRule=e,this}setRestitutionCombineRule(e){return this.restitutionCombineRule=e,this}setCollisionGroups(e){return this.collisionGroups=e,this}setSolverGroups(e){return this.solverGroups=e,this}setActiveHooks(e){return this.activeHooks=e,this}setActiveEvents(e){return this.activeEvents=e,this}setActiveCollisionTypes(e){return this.activeCollisionTypes=e,this}setContactForceEventThreshold(e){return this.contactForceEventThreshold=e,this}}for(var Z1={},Ec=[],qt=[],J1=typeof Uint8Array<"u"?Uint8Array:Array,Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ie=0,Cc=Ft.length;Ie<Cc;++Ie)Ec[Ie]=Ft[Ie],qt[Ft.charCodeAt(Ie)]=Ie;qt[45]=62,qt[95]=63;function Rc(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Sc(t){var e=Rc(t,"string");return typeof e=="symbol"?e:e+""}function Mc(t,e,n){return(e=Sc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function or(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function re(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?or(Object(n),!0).forEach(function(r){Mc(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):or(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const Pc=new pe;new hs;const Ae=new fs,ie=new pe,Pe=new Mr,We=new pe,Lc={fixed:1,dynamic:0,kinematicPosition:2,kinematicVelocity:3},zi=t=>Lc[t],Ic=(t,e)=>{const n=Array.from(t);for(let r=0;r<t.length/3;r++)n[r*3]*=e.x,n[r*3+1]*=e.y,n[r*3+2]*=e.z;return n},Di=t=>t?t instanceof Mr?[t.x,t.y,t.z,t.w]:t instanceof pe||t instanceof Pr?[t.x,t.y,t.z]:Array.isArray(t)?t:[t]:[0];function Tc(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function mt(t,e){if(t==null)return{};var n,r,i=Tc(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}const Fc=["mass","linearDamping","angularDamping","type","onCollisionEnter","onCollisionExit","onIntersectionEnter","onIntersectionExit","onContactForce","children","canSleep","ccd","gravityScale","softCcdPrediction","ref"],jc=(t,e,n)=>{const r=e.slice();if(t==="heightfield"){const s=r[3];return s.x*=n.x,s.x*=n.y,s.x*=n.z,r}if(t==="trimesh"||t==="convexHull")return r[0]=Ic(r[0],n),r;const i=[n.x,n.y,n.z,n.x,n.x];return r.map((s,o)=>i[o]*s)},Nc=(t,e,n,r)=>{const i=jc(t.shape,t.args,n),s=$[t.shape](...i);return e.createCollider(s,r?.())},zc=["shape","args"],ar="Please pick ONLY ONE of the `density`, `mass` and `massProperties` options.",Dc=(t,e)=>{if(e.density!==void 0){if(e.mass!==void 0||e.massProperties!==void 0)throw new Error(ar);t.setDensity(e.density);return}if(e.mass!==void 0){if(e.massProperties!==void 0)throw new Error(ar);t.setMass(e.mass);return}e.massProperties!==void 0&&t.setMassProperties(e.massProperties.mass,e.massProperties.centerOfMass,e.massProperties.principalAngularInertia,e.massProperties.angularInertiaLocalFrame)},Oi={sensor:(t,e)=>{t.setSensor(e)},collisionGroups:(t,e)=>{t.setCollisionGroups(e)},solverGroups:(t,e)=>{t.setSolverGroups(e)},friction:(t,e)=>{t.setFriction(e)},frictionCombineRule:(t,e)=>{t.setFrictionCombineRule(e)},restitution:(t,e)=>{t.setRestitution(e)},restitutionCombineRule:(t,e)=>{t.setRestitutionCombineRule(e)},activeCollisionTypes:(t,e)=>{t.setActiveCollisionTypes(e)},contactSkin:(t,e)=>{t.setContactSkin(e)},quaternion:()=>{},position:()=>{},rotation:()=>{},scale:()=>{}},ki=Object.keys(Oi),Oc=(t,e,n)=>{const r=n.get(t.handle);if(r){var i;const s=r.object.parent.getWorldScale(Pc),o=(i=r.worldParent)===null||i===void 0?void 0:i.matrixWorld.clone().invert();r.object.updateWorldMatrix(!0,!1),Ae.copy(r.object.matrixWorld),o&&Ae.premultiply(o),Ae.decompose(ie,Pe,We),t.parent()?(t.setTranslationWrtParent({x:ie.x*s.x,y:ie.y*s.y,z:ie.z*s.z}),t.setRotationWrtParent(Pe)):(t.setTranslation({x:ie.x*s.x,y:ie.y*s.y,z:ie.z*s.z}),t.setRotation(Pe)),ki.forEach(a=>{if(a in e){const l=e[a];Oi[a](t,l,e)}}),Dc(t,e)}},kc=(t,e,n)=>{const r=f.useMemo(()=>ki.flatMap(i=>Di(e[i])),[e]);f.useEffect(()=>{const i=t();Oc(i,e,n)},[...r,t])},Bc=t=>{let e=!1;return t.traverseAncestors(n=>{n.userData.r3RapierType==="MeshCollider"&&(e=!0)}),e},Vc=(t,e,n)=>({collider:t,worldParent:n||void 0,object:e}),$c={cuboid:"cuboid",ball:"ball",hull:"convexHull",trimesh:"trimesh"},Ac=({object:t,ignoreMeshColliders:e=!0,options:n})=>{const r=[];t.updateWorldMatrix(!0,!1);const i=t.matrixWorld.clone().invert(),s=o=>{if("isMesh"in o){if(e&&Bc(o))return;const a=o.getWorldScale(We),l=$c[n.colliders||"cuboid"];o.updateWorldMatrix(!0,!1),Ae.copy(o.matrixWorld).premultiply(i).decompose(ie,Pe,We);const c=new Pr().setFromQuaternion(Pe,"XYZ"),{geometry:u}=o,{args:h,offset:d}=Hc(u,n.colliders||"cuboid"),p=re(re({},Vi(n)),{},{args:h,shape:l,rotation:[c.x,c.y,c.z],position:[ie.x+d.x*a.x,ie.y+d.y*a.y,ie.z+d.z*a.z],scale:[a.x,a.y,a.z]});r.push(p)}};return n.includeInvisible?t.traverse(s):t.traverseVisible(s),r},Hc=(t,e)=>{switch(e){case"cuboid":{t.computeBoundingBox();const{boundingBox:r}=t,i=r.getSize(new pe);return{args:[i.x/2,i.y/2,i.z/2],offset:r.getCenter(new pe)}}case"ball":{t.computeBoundingSphere();const{boundingSphere:r}=t;return{args:[r.radius],offset:r.center}}case"trimesh":{var n;const r=t.index?t.clone():ps(t);return{args:[r.attributes.position.array,(n=r.index)===null||n===void 0?void 0:n.array],offset:new pe}}case"hull":return{args:[t.clone().attributes.position.array],offset:new pe}}return{args:[],offset:new pe}},Bi=t=>({collision:!!(t!=null&&t.onCollisionEnter||t!=null&&t.onCollisionExit||t!=null&&t.onIntersectionEnter||t!=null&&t.onIntersectionExit),contactForce:!!(t!=null&&t.onContactForce)}),Uc=(t,e,n,r={})=>{const{onCollisionEnter:i,onCollisionExit:s,onIntersectionEnter:o,onIntersectionExit:a,onContactForce:l}=e;f.useEffect(()=>{const c=t();if(c){const{collision:u,contactForce:h}=Bi(e),d=u||r.collision,p=h||r.contactForce;d&&p?c.setActiveEvents(Se.COLLISION_EVENTS|Se.CONTACT_FORCE_EVENTS):d?c.setActiveEvents(Se.COLLISION_EVENTS):p&&c.setActiveEvents(Se.CONTACT_FORCE_EVENTS),n.set(c.handle,{onCollisionEnter:i,onCollisionExit:s,onIntersectionEnter:o,onIntersectionExit:a,onContactForce:l})}return()=>{c&&n.delete(c.handle)}},[i,s,o,a,l,r])},Vi=(t={})=>mt(t,Fc),pn=()=>{const t=f.useContext(Wc);if(!t)throw new Error("react-three-rapier: useRapier must be used within <Physics />!");return t},mn=(t,e,n=!0)=>{const[r,i]=f.useState([]);return f.useEffect(()=>{t.current&&e.colliders!==!1&&i(Ac({object:t.current,options:e,ignoreMeshColliders:n}))},[e.colliders]),r},Wc=f.createContext(void 0);function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},X.apply(null,arguments)}const gn=(t,e=null)=>{const n=f.useRef(e);return t&&typeof t!="function"?(t.current||(t.current=n.current),t):n},$i=(t,e,n)=>{const r=f.useRef(void 0),i=f.useCallback(()=>(r.current||(r.current=t()),r.current),n);return f.useEffect(()=>{const s=i(),o=()=>e(s);return()=>{o(),r.current=void 0}},[i]),i},Gc=t=>{var e;const n=zi(t?.type||"dynamic"),r=new fe(n);return r.canSleep=(e=t?.canSleep)!==null&&e!==void 0?e:!0,r},qc=({rigidBody:t,object:e,setMatrix:n,getMatrix:r,worldScale:i,meshType:s="mesh"})=>{e.updateWorldMatrix(!0,!1);const o=e.parent.matrixWorld.clone().invert();return{object:e,rigidBody:t,invertedWorldMatrix:o,setMatrix:n||(a=>{e.matrix.copy(a)}),getMatrix:r||(a=>a.copy(e.matrix)),scale:i||e.getWorldScale(We).clone(),isSleeping:!1,meshType:s}},Yc=["args","colliders","canSleep"],Ai={gravityScale:(t,e)=>{t.setGravityScale(e,!0)},additionalSolverIterations(t,e){t.setAdditionalSolverIterations(e)},linearDamping:(t,e)=>{t.setLinearDamping(e)},angularDamping:(t,e)=>{t.setAngularDamping(e)},dominanceGroup:(t,e)=>{t.setDominanceGroup(e)},enabledRotations:(t,[e,n,r])=>{t.setEnabledRotations(e,n,r,!0)},enabledTranslations:(t,[e,n,r])=>{t.setEnabledTranslations(e,n,r,!0)},lockRotations:(t,e)=>{t.lockRotations(e,!0)},lockTranslations:(t,e)=>{t.lockTranslations(e,!0)},angularVelocity:(t,[e,n,r])=>{t.setAngvel({x:e,y:n,z:r},!0)},linearVelocity:(t,[e,n,r])=>{t.setLinvel({x:e,y:n,z:r},!0)},ccd:(t,e)=>{t.enableCcd(e)},softCcdPrediction:(t,e)=>{t.setSoftCcdPrediction(e)},userData:(t,e)=>{t.userData=e},type(t,e){t.setBodyType(zi(e),!0)},position:()=>{},rotation:()=>{},quaternion:()=>{},scale:()=>{}},Hi=Object.keys(Ai),Xc=(t,e,n,r=!0)=>{if(!t)return;const i=n.get(t.handle);i&&(r&&(i.object.updateWorldMatrix(!0,!1),Ae.copy(i.object.matrixWorld).decompose(ie,Pe,We),t.setTranslation(ie,!1),t.setRotation(Pe,!1)),Hi.forEach(s=>{s in e&&Ai[s](t,e[s])}))},Kc=(t,e,n,r=!0)=>{const i=f.useMemo(()=>Hi.flatMap(s=>Di(e[s])),[e]);f.useEffect(()=>{const s=t();Xc(s,e,n,r)},i)},Qc=(t,e,n)=>{const{onWake:r,onSleep:i,onCollisionEnter:s,onCollisionExit:o,onIntersectionEnter:a,onIntersectionExit:l,onContactForce:c}=e,u={onWake:r,onSleep:i,onCollisionEnter:s,onCollisionExit:o,onIntersectionEnter:a,onIntersectionExit:l,onContactForce:c};f.useEffect(()=>{const h=t();return n.set(h.handle,u),()=>{n.delete(h.handle)}},[r,i,s,o,a,l,c])},Zc=({x:t,y:e,z:n}={x:0,y:0,z:0})=>new pe(t,e,n),se=f.memo(t=>{const{children:e,position:n,rotation:r,quaternion:i,scale:s,name:o}=t,{world:a,colliderEvents:l,colliderStates:c}=pn(),u=Gi(),h=gn(t.ref),d=f.useRef(null),p=zc.flatMap(_=>Array.isArray(t[_])?t[_]:[t[_]]),m=$i(()=>{const _=d.current.getWorldScale(Zc()),w=Nc(t,a,_,u?.getRigidBody);return typeof t.ref=="function"&&t.ref(w),h.current=w,w},_=>{a.getCollider(_.handle)&&a.removeCollider(_,!0)},[...p,u]);f.useEffect(()=>{const _=m();return c.set(_.handle,Vc(_,d.current,u?.ref.current)),()=>{c.delete(_.handle)}},[m]);const y=f.useMemo(()=>re(re({},Vi(u?.options)),t),[t,u?.options]);return kc(m,y,c),Uc(m,y,l,Bi(u?.options)),T.createElement("object3D",{position:n,rotation:r,quaternion:i,scale:s,ref:d,name:o},e)}),Jc=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"cuboid",ref:e})));Jc.displayName="CuboidCollider";const eu=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"roundCuboid",ref:e})));eu.displayName="RoundCuboidCollider";const tu=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"ball",ref:e})));tu.displayName="BallCollider";const nu=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"capsule",ref:e})));nu.displayName="CapsuleCollider";const ru=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"heightfield",ref:e})));ru.displayName="HeightfieldCollider";const iu=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"trimesh",ref:e})));iu.displayName="TrimeshCollider";const su=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"cone",ref:e})));su.displayName="ConeCollider";const ou=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"roundCone",ref:e})));ou.displayName="RoundConeCollider";const Ui=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"cylinder",ref:e})));Ui.displayName="CylinderCollider";Ui.displayName="RoundCylinderCollider";const au=T.forwardRef((t,e)=>T.createElement(se,X({},t,{shape:"convexHull",ref:e})));au.displayName="ConvexHullCollider";const lu=["ref","children","type","position","rotation","scale","quaternion","transformState"],Wi=f.createContext(void 0),Gi=()=>f.useContext(Wi),qi=f.memo(t=>{const{ref:e,children:n,type:r,position:i,rotation:s,scale:o,quaternion:a,transformState:l}=t,c=mt(t,lu),u=f.useRef(null),h=gn(e),{world:d,rigidBodyStates:p,physicsOptions:m,rigidBodyEvents:y}=pn(),_=f.useMemo(()=>re(re(re({},m),t),{},{children:void 0}),[m,t]),w=Yc.flatMap(C=>Array.isArray(_[C])?[..._[C]]:_[C]),b=mn(u,_),x=$i(()=>{const C=Gc(_),S=d.createRigidBody(C);return typeof e=="function"&&e(S),h.current=S,S},C=>{d.getRigidBody(C.handle)&&d.removeRigidBody(C)},w);f.useEffect(()=>{const C=x(),S=qc({rigidBody:C,object:u.current});return p.set(C.handle,t.transformState?t.transformState(S):S),()=>{p.delete(C.handle)}},[x]),Kc(x,_,p),Qc(x,_,y);const E=f.useMemo(()=>({ref:u,getRigidBody:x,options:_}),[x]);return T.createElement(Wi.Provider,{value:E},T.createElement("object3D",X({ref:u},c,{position:i,rotation:s,quaternion:a,scale:o}),n,b.map((C,S)=>T.createElement(se,X({key:S},C)))))});qi.displayName="RigidBody";const cu=f.memo(t=>{const{children:e,type:n}=t,{physicsOptions:r}=pn(),i=f.useRef(null),{options:s}=Gi(),o=f.useMemo(()=>re(re(re({},r),s),{},{children:void 0,colliders:n}),[r,s]),a=mn(i,o,!1);return T.createElement("object3D",{ref:i,userData:{r3RapierType:"MeshCollider"}},e,a.map((l,c)=>T.createElement(se,X({key:c},l))))});cu.displayName="MeshCollider";const uu=["ref"],hu=["children","instances","colliderNodes","position","rotation","quaternion","scale"],du=f.memo(t=>{let{ref:e}=t,n=mt(t,uu);const r=gn(e,[]),i=f.useRef(null),s=f.useRef(null),{children:o,instances:a,colliderNodes:l=[],position:c,rotation:u,quaternion:h,scale:d}=n,p=mt(n,hu),m=mn(i,re(re({},n),{},{children:void 0})),y=()=>{const w=s.current.children[0];if(w&&"isInstancedMesh"in w)return w};f.useEffect(()=>{const w=y();w?w.instanceMatrix.setUsage(ds):console.warn("InstancedRigidBodies expects exactly one child, which must be an InstancedMesh")},[]);const _=(w,b)=>{const x=y();return x?re(re({},w),{},{getMatrix:E=>(x.getMatrixAt(b,E),E),setMatrix:E=>{x.setMatrixAt(b,E),x.instanceMatrix.needsUpdate=!0},meshType:"instancedMesh"}):w};return T.createElement("object3D",X({ref:i},p,{position:c,rotation:u,quaternion:h,scale:d}),T.createElement("object3D",{ref:s},o),a?.map((w,b)=>T.createElement(qi,X({},p,w,{ref:x=>{r.current[b]=x},transformState:x=>_(x,b)}),T.createElement(T.Fragment,null,l.map((x,E)=>T.createElement(f.Fragment,{key:E},x)),m.map((x,E)=>T.createElement(se,X({key:E},x)))))))});du.displayName="InstancedRigidBodies";function He(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function Yt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function fu(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function lr(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function cr(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function pu(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function mu(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function jt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function gu(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function _u(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function ur(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function yu(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function wu(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Xt(t,e){let n=e[0],r=e[1],i=e[2],s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t}function Yi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function hr(t,e,n){let r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2];return t[0]=i*l-s*a,t[1]=s*o-r*l,t[2]=r*a-i*o,t}function vu(t,e,n,r){let i=e[0],s=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t}function xu(t,e,n,r,i){const s=Math.exp(-r*i);let o=e[0],a=e[1],l=e[2];return t[0]=n[0]+(o-n[0])*s,t[1]=n[1]+(a-n[1])*s,t[2]=n[2]+(l-n[2])*s,t}function bu(t,e,n){let r=e[0],i=e[1],s=e[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*s+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*s+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*s+n[14])/o,t}function Eu(t,e,n){let r=e[0],i=e[1],s=e[2],o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*s)/o,t[1]=(n[1]*r+n[5]*i+n[9]*s)/o,t[2]=(n[2]*r+n[6]*i+n[10]*s)/o,t}function Cu(t,e,n){let r=e[0],i=e[1],s=e[2];return t[0]=r*n[0]+i*n[3]+s*n[6],t[1]=r*n[1]+i*n[4]+s*n[7],t[2]=r*n[2]+i*n[5]+s*n[8],t}function Ru(t,e,n){let r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2],c=n[3],u=a*s-l*i,h=l*r-o*s,d=o*i-a*r,p=a*d-l*h,m=l*u-o*d,y=o*h-a*u,_=c*2;return u*=_,h*=_,d*=_,p*=2,m*=2,y*=2,t[0]=r+u+p,t[1]=i+h+m,t[2]=s+d+y,t}const Su=(function(){const t=[0,0,0],e=[0,0,0];return function(n,r){Yt(t,n),Yt(e,r),Xt(t,t),Xt(e,e);let i=Yi(t,e);return i>1?0:i<-1?Math.PI:Math.acos(i)}})();function Mu(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}class ce extends Array{constructor(e=0,n=e,r=e){return super(e,n,r),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this[0]=e}set y(e){this[1]=e}set z(e){this[2]=e}set(e,n=e,r=e){return e.length?this.copy(e):(fu(this,e,n,r),this)}copy(e){return Yt(this,e),this}add(e,n){return n?lr(this,e,n):lr(this,this,e),this}sub(e,n){return n?cr(this,e,n):cr(this,this,e),this}multiply(e){return e.length?pu(this,this,e):jt(this,this,e),this}divide(e){return e.length?mu(this,this,e):jt(this,this,1/e),this}inverse(e=this){return wu(this,e),this}len(){return He(this)}distance(e){return e?gu(this,e):He(this)}squaredLen(){return ur(this)}squaredDistance(e){return e?_u(this,e):ur(this)}negate(e=this){return yu(this,e),this}cross(e,n){return n?hr(this,e,n):hr(this,this,e),this}scale(e){return jt(this,this,e),this}normalize(){return Xt(this,this),this}dot(e){return Yi(this,e)}equals(e){return Mu(this,e)}applyMatrix3(e){return Cu(this,this,e),this}applyMatrix4(e){return bu(this,this,e),this}scaleRotateMatrix4(e){return Eu(this,this,e),this}applyQuaternion(e){return Ru(this,this,e),this}angle(e){return Su(this,e)}lerp(e,n){return vu(this,this,e,n),this}smoothLerp(e,n,r){return xu(this,this,e,n,r),this}clone(){return new ce(this[0],this[1],this[2])}fromArray(e,n=0){return this[0]=e[n],this[1]=e[n+1],this[2]=e[n+2],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e}transformDirection(e){const n=this[0],r=this[1],i=this[2];return this[0]=e[0]*n+e[4]*r+e[8]*i,this[1]=e[1]*n+e[5]*r+e[9]*i,this[2]=e[2]*n+e[6]*r+e[10]*i,this.normalize()}}const dr=new ce;let Pu=1,Lu=1,fr=!1;class Iu{constructor(e,n={}){e.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=e,this.attributes=n,this.id=Pu++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let r in n)this.addAttribute(r,n[r])}addAttribute(e,n){if(this.attributes[e]=n,n.id=Lu++,n.size=n.size||1,n.type=n.type||(n.data.constructor===Float32Array?this.gl.FLOAT:n.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),n.target=e==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,n.normalized=n.normalized||!1,n.stride=n.stride||0,n.offset=n.offset||0,n.count=n.count||(n.stride?n.data.byteLength/n.stride:n.data.length/n.size),n.divisor=n.instanced||0,n.needsUpdate=!1,n.usage=n.usage||this.gl.STATIC_DRAW,n.buffer||this.updateAttribute(n),n.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==n.count*n.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,n.count*n.divisor);this.instancedCount=n.count*n.divisor}else e==="index"?this.drawRange.count=n.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,n.count))}updateAttribute(e){const n=!e.buffer;n&&(e.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==e.buffer&&(this.gl.bindBuffer(e.target,e.buffer),this.glState.boundBuffer=e.buffer),n?this.gl.bufferData(e.target,e.data,e.usage):this.gl.bufferSubData(e.target,0,e.data),e.needsUpdate=!1}setIndex(e){this.addAttribute("index",e)}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}setInstancedCount(e){this.instancedCount=e}createVAO(e){this.VAOs[e.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.bindAttributes(e)}bindAttributes(e){e.attributeLocations.forEach((n,{name:r,type:i})=>{if(!this.attributes[r]){console.warn(`active attribute ${r} not being supplied`);return}const s=this.attributes[r];this.gl.bindBuffer(s.target,s.buffer),this.glState.boundBuffer=s.buffer;let o=1;i===35674&&(o=2),i===35675&&(o=3),i===35676&&(o=4);const a=s.size/o,l=o===1?0:o*o*4,c=o===1?0:o*4;for(let u=0;u<o;u++)this.gl.vertexAttribPointer(n+u,a,s.type,s.normalized,s.stride+l,s.offset+u*c),this.gl.enableVertexAttribArray(n+u),this.gl.renderer.vertexAttribDivisor(n+u,s.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:e,mode:n=this.gl.TRIANGLES}){this.gl.renderer.currentGeometry!==`${this.id}_${e.attributeOrder}`&&(this.VAOs[e.attributeOrder]||this.createVAO(e),this.gl.renderer.bindVertexArray(this.VAOs[e.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${e.attributeOrder}`),e.attributeLocations.forEach((i,{name:s})=>{const o=this.attributes[s];o.needsUpdate&&this.updateAttribute(o)});let r=2;this.attributes.index?.type===this.gl.UNSIGNED_INT&&(r=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r,this.instancedCount):this.gl.renderer.drawArraysInstanced(n,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(n,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*r):this.gl.drawArrays(n,this.drawRange.start,this.drawRange.count)}getPosition(){const e=this.attributes.position;if(e.data)return e;if(!fr)return console.warn("No position buffer data found to compute bounds"),fr=!0}computeBoundingBox(e){e||(e=this.getPosition());const n=e.data,r=e.size;this.bounds||(this.bounds={min:new ce,max:new ce,center:new ce,scale:new ce,radius:1/0});const i=this.bounds.min,s=this.bounds.max,o=this.bounds.center,a=this.bounds.scale;i.set(1/0),s.set(-1/0);for(let l=0,c=n.length;l<c;l+=r){const u=n[l],h=n[l+1],d=n[l+2];i.x=Math.min(u,i.x),i.y=Math.min(h,i.y),i.z=Math.min(d,i.z),s.x=Math.max(u,s.x),s.y=Math.max(h,s.y),s.z=Math.max(d,s.z)}a.sub(s,i),o.add(i,s).divide(2)}computeBoundingSphere(e){e||(e=this.getPosition());const n=e.data,r=e.size;this.bounds||this.computeBoundingBox(e);let i=0;for(let s=0,o=n.length;s<o;s+=r)dr.fromArray(n,s),i=Math.max(i,this.bounds.center.squaredDistance(dr));this.bounds.radius=Math.sqrt(i)}remove(){for(let e in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[e]),delete this.VAOs[e];for(let e in this.attributes)this.gl.deleteBuffer(this.attributes[e].buffer),delete this.attributes[e]}}let Tu=1;const pr={};class Fu{constructor(e,{vertex:n,fragment:r,uniforms:i={},transparent:s=!1,cullFace:o=e.BACK,frontFace:a=e.CCW,depthTest:l=!0,depthWrite:c=!0,depthFunc:u=e.LEQUAL}={}){e.canvas||console.error("gl not passed as first argument to Program"),this.gl=e,this.uniforms=i,this.id=Tu++,n||console.warn("vertex shader not supplied"),r||console.warn("fragment shader not supplied"),this.transparent=s,this.cullFace=o,this.frontFace=a,this.depthTest=l,this.depthWrite=c,this.depthFunc=u,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=e.createShader(e.VERTEX_SHADER),this.fragmentShader=e.createShader(e.FRAGMENT_SHADER),this.program=e.createProgram(),e.attachShader(this.program,this.vertexShader),e.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:n,fragment:r})}setShaders({vertex:e,fragment:n}){if(e&&(this.gl.shaderSource(this.vertexShader,e),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
|
|
Vertex Shader
|
|
${mr(e)}`)),n&&(this.gl.shaderSource(this.fragmentShader,n),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
|
|
Fragment Shader
|
|
${mr(n)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let r=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let o=0;o<r;o++){let a=this.gl.getActiveUniform(this.program,o);this.uniformLocations.set(a,this.gl.getUniformLocation(this.program,a.name));const l=a.name.match(/(\w+)/g);a.uniformName=l[0],a.nameComponents=l.slice(1)}this.attributeLocations=new Map;const i=[],s=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let o=0;o<s;o++){const a=this.gl.getActiveAttrib(this.program,o),l=this.gl.getAttribLocation(this.program,a.name);l!==-1&&(i[l]=a.name,this.attributeLocations.set(a,l))}this.attributeOrder=i.join("")}setBlendFunc(e,n,r,i){this.blendFunc.src=e,this.blendFunc.dst=n,this.blendFunc.srcAlpha=r,this.blendFunc.dstAlpha=i,e&&(this.transparent=!0)}setBlendEquation(e,n){this.blendEquation.modeRGB=e,this.blendEquation.modeAlpha=n}setStencilFunc(e,n,r){this.stencilRef=n,this.stencilFunc.func=e,this.stencilFunc.ref=n,this.stencilFunc.mask=r}setStencilOp(e,n,r){this.stencilOp.stencilFail=e,this.stencilOp.depthFail=n,this.stencilOp.depthPass=r}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:e=!1}={}){let n=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((i,s)=>{let o=this.uniforms[s.uniformName];for(const a of s.nameComponents){if(!o)break;if(a in o)o=o[a];else{if(Array.isArray(o.value))break;o=void 0;break}}if(!o)return gr(`Active uniform ${s.name} has not been supplied`);if(o&&o.value===void 0)return gr(`${s.name} uniform is missing a value parameter`);if(o.value.texture)return n=n+1,o.value.update(n),Nt(this.gl,s.type,i,n);if(o.value.length&&o.value[0].texture){const a=[];return o.value.forEach(l=>{n=n+1,l.update(n),a.push(n)}),Nt(this.gl,s.type,i,a)}Nt(this.gl,s.type,i,o.value)}),this.applyState(),e&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function Nt(t,e,n,r){r=r.length?ju(r):r;const i=t.renderer.state.uniformLocations.get(n);if(r.length)if(i===void 0||i.length!==r.length)t.renderer.state.uniformLocations.set(n,r.slice(0));else{if(Nu(i,r))return;i.set?i.set(r):zu(i,r),t.renderer.state.uniformLocations.set(n,i)}else{if(i===r)return;t.renderer.state.uniformLocations.set(n,r)}switch(e){case 5126:return r.length?t.uniform1fv(n,r):t.uniform1f(n,r);case 35664:return t.uniform2fv(n,r);case 35665:return t.uniform3fv(n,r);case 35666:return t.uniform4fv(n,r);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return r.length?t.uniform1iv(n,r):t.uniform1i(n,r);case 35671:case 35667:return t.uniform2iv(n,r);case 35672:case 35668:return t.uniform3iv(n,r);case 35673:case 35669:return t.uniform4iv(n,r);case 35674:return t.uniformMatrix2fv(n,!1,r);case 35675:return t.uniformMatrix3fv(n,!1,r);case 35676:return t.uniformMatrix4fv(n,!1,r)}}function mr(t){let e=t.split(`
|
|
`);for(let n=0;n<e.length;n++)e[n]=n+1+": "+e[n];return e.join(`
|
|
`)}function ju(t){const e=t.length,n=t[0].length;if(n===void 0)return t;const r=e*n;let i=pr[r];i||(pr[r]=i=new Float32Array(r));for(let s=0;s<e;s++)i.set(t[s],s*n);return i}function Nu(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function zu(t,e){for(let n=0,r=t.length;n<r;n++)t[n]=e[n]}let zt=0;function gr(t){zt>100||(console.warn(t),zt++,zt>100&&console.warn("More than 100 program warnings - stopping logs."))}const Dt=new ce;let Du=1;class Ou{constructor({canvas:e=document.createElement("canvas"),width:n=300,height:r=150,dpr:i=1,alpha:s=!1,depth:o=!0,stencil:a=!1,antialias:l=!1,premultipliedAlpha:c=!1,preserveDrawingBuffer:u=!1,powerPreference:h="default",autoClear:d=!0,webgl:p=2}={}){const m={alpha:s,depth:o,stencil:a,antialias:l,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:h};this.dpr=i,this.alpha=s,this.color=!0,this.depth=o,this.stencil=a,this.premultipliedAlpha=c,this.autoClear=d,this.id=Du++,p===2&&(this.gl=e.getContext("webgl2",m)),this.isWebgl2=!!this.gl,this.gl||(this.gl=e.getContext("webgl",m)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(n,r),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(e,n){this.width=e,this.height=n,this.gl.canvas.width=e*this.dpr,this.gl.canvas.height=n*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:e+"px",height:n+"px"})}setViewport(e,n,r=0,i=0){this.state.viewport.width===e&&this.state.viewport.height===n||(this.state.viewport.width=e,this.state.viewport.height=n,this.state.viewport.x=r,this.state.viewport.y=i,this.gl.viewport(r,i,e,n))}setScissor(e,n,r=0,i=0){this.gl.scissor(r,i,e,n)}enable(e){this.state[e]!==!0&&(this.gl.enable(e),this.state[e]=!0)}disable(e){this.state[e]!==!1&&(this.gl.disable(e),this.state[e]=!1)}setBlendFunc(e,n,r,i){this.state.blendFunc.src===e&&this.state.blendFunc.dst===n&&this.state.blendFunc.srcAlpha===r&&this.state.blendFunc.dstAlpha===i||(this.state.blendFunc.src=e,this.state.blendFunc.dst=n,this.state.blendFunc.srcAlpha=r,this.state.blendFunc.dstAlpha=i,r!==void 0?this.gl.blendFuncSeparate(e,n,r,i):this.gl.blendFunc(e,n))}setBlendEquation(e,n){e=e||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===e&&this.state.blendEquation.modeAlpha===n)&&(this.state.blendEquation.modeRGB=e,this.state.blendEquation.modeAlpha=n,n!==void 0?this.gl.blendEquationSeparate(e,n):this.gl.blendEquation(e))}setCullFace(e){this.state.cullFace!==e&&(this.state.cullFace=e,this.gl.cullFace(e))}setFrontFace(e){this.state.frontFace!==e&&(this.state.frontFace=e,this.gl.frontFace(e))}setDepthMask(e){this.state.depthMask!==e&&(this.state.depthMask=e,this.gl.depthMask(e))}setDepthFunc(e){this.state.depthFunc!==e&&(this.state.depthFunc=e,this.gl.depthFunc(e))}setStencilMask(e){this.state.stencilMask!==e&&(this.state.stencilMask=e,this.gl.stencilMask(e))}setStencilFunc(e,n,r){this.state.stencilFunc===e&&this.state.stencilRef===n&&this.state.stencilFuncMask===r||(this.state.stencilFunc=e||this.gl.ALWAYS,this.state.stencilRef=n||0,this.state.stencilFuncMask=r||0,this.gl.stencilFunc(e||this.gl.ALWAYS,n||0,r||0))}setStencilOp(e,n,r){this.state.stencilFail===e&&this.state.stencilDepthFail===n&&this.state.stencilDepthPass===r||(this.state.stencilFail=e,this.state.stencilDepthFail=n,this.state.stencilDepthPass=r,this.gl.stencilOp(e,n,r))}activeTexture(e){this.state.activeTextureUnit!==e&&(this.state.activeTextureUnit=e,this.gl.activeTexture(this.gl.TEXTURE0+e))}bindFramebuffer({target:e=this.gl.FRAMEBUFFER,buffer:n=null}={}){this.state.framebuffer!==n&&(this.state.framebuffer=n,this.gl.bindFramebuffer(e,n))}getExtension(e,n,r){return n&&this.gl[n]?this.gl[n].bind(this.gl):(this.extensions[e]||(this.extensions[e]=this.gl.getExtension(e)),n?this.extensions[e]?this.extensions[e][r].bind(this.extensions[e]):null:this.extensions[e])}sortOpaque(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.program.id!==n.program.id?e.program.id-n.program.id:e.zDepth!==n.zDepth?e.zDepth-n.zDepth:n.id-e.id}sortTransparent(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.zDepth!==n.zDepth?n.zDepth-e.zDepth:n.id-e.id}sortUI(e,n){return e.renderOrder!==n.renderOrder?e.renderOrder-n.renderOrder:e.program.id!==n.program.id?e.program.id-n.program.id:n.id-e.id}getRenderList({scene:e,camera:n,frustumCull:r,sort:i}){let s=[];if(n&&r&&n.updateFrustum(),e.traverse(o=>{if(!o.visible)return!0;o.draw&&(r&&o.frustumCulled&&n&&!n.frustumIntersectsMesh(o)||s.push(o))}),i){const o=[],a=[],l=[];s.forEach(c=>{c.program.transparent?c.program.depthTest?a.push(c):l.push(c):o.push(c),c.zDepth=0,!(c.renderOrder!==0||!c.program.depthTest||!n)&&(c.worldMatrix.getTranslation(Dt),Dt.applyMatrix4(n.projectionViewMatrix),c.zDepth=Dt.z)}),o.sort(this.sortOpaque),a.sort(this.sortTransparent),l.sort(this.sortUI),s=o.concat(a,l)}return s}render({scene:e,camera:n,target:r=null,update:i=!0,sort:s=!0,frustumCull:o=!0,clear:a}){r===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(r),this.setViewport(r.width,r.height)),(a||this.autoClear&&a!==!1)&&(this.depth&&(!r||r.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!r||r.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),i&&e.updateMatrixWorld(),n&&n.updateMatrixWorld(),this.getRenderList({scene:e,camera:n,frustumCull:o,sort:s}).forEach(c=>{c.draw({camera:n})})}}function ku(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Bu(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function Vu(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=s*o,t}function $u(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Au(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Hu(t,e,n){n=n*.5;let r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function _r(t,e,n){let r=e[0],i=e[1],s=e[2],o=e[3],a=n[0],l=n[1],c=n[2],u=n[3];return t[0]=r*u+o*a+i*c-s*l,t[1]=i*u+o*l+s*a-r*c,t[2]=s*u+o*c+r*l-i*a,t[3]=o*u-r*a-i*l-s*c,t}function Uu(t,e,n){n*=.5;let r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+o*a,t[1]=i*l+s*a,t[2]=s*l-i*a,t[3]=o*l-r*a,t}function Wu(t,e,n){n*=.5;let r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l-s*a,t[1]=i*l+o*a,t[2]=s*l+r*a,t[3]=o*l-i*a,t}function Gu(t,e,n){n*=.5;let r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+i*a,t[1]=i*l-r*a,t[2]=s*l+o*a,t[3]=o*l-s*a,t}function qu(t,e,n,r){let i=e[0],s=e[1],o=e[2],a=e[3],l=n[0],c=n[1],u=n[2],h=n[3],d,p,m,y,_;return p=i*l+s*c+o*u+a*h,p<0&&(p=-p,l=-l,c=-c,u=-u,h=-h),1-p>1e-6?(d=Math.acos(p),m=Math.sin(d),y=Math.sin((1-r)*d)/m,_=Math.sin(r*d)/m):(y=1-r,_=r),t[0]=y*i+_*l,t[1]=y*s+_*c,t[2]=y*o+_*u,t[3]=y*a+_*h,t}function Yu(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s,a=o?1/o:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=s*a,t}function Xu(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function Ku(t,e){let n=e[0]+e[4]+e[8],r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);let s=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[s*3+s]-e[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[s*3+o]-e[o*3+s])*r,t[s]=(e[s*3+i]+e[i*3+s])*r,t[o]=(e[o*3+i]+e[i*3+o])*r}return t}function Qu(t,e,n="YXZ"){let r=Math.sin(e[0]*.5),i=Math.cos(e[0]*.5),s=Math.sin(e[1]*.5),o=Math.cos(e[1]*.5),a=Math.sin(e[2]*.5),l=Math.cos(e[2]*.5);return n==="XYZ"?(t[0]=r*o*l+i*s*a,t[1]=i*s*l-r*o*a,t[2]=i*o*a+r*s*l,t[3]=i*o*l-r*s*a):n==="YXZ"?(t[0]=r*o*l+i*s*a,t[1]=i*s*l-r*o*a,t[2]=i*o*a-r*s*l,t[3]=i*o*l+r*s*a):n==="ZXY"?(t[0]=r*o*l-i*s*a,t[1]=i*s*l+r*o*a,t[2]=i*o*a+r*s*l,t[3]=i*o*l-r*s*a):n==="ZYX"?(t[0]=r*o*l-i*s*a,t[1]=i*s*l+r*o*a,t[2]=i*o*a-r*s*l,t[3]=i*o*l+r*s*a):n==="YZX"?(t[0]=r*o*l+i*s*a,t[1]=i*s*l+r*o*a,t[2]=i*o*a-r*s*l,t[3]=i*o*l-r*s*a):n==="XZY"&&(t[0]=r*o*l-i*s*a,t[1]=i*s*l-r*o*a,t[2]=i*o*a+r*s*l,t[3]=i*o*l+r*s*a),t}const Zu=ku,Ju=Bu,eh=$u,th=Vu;class nh extends Array{constructor(e=0,n=0,r=0,i=1){super(e,n,r,i),this.onChange=()=>{},this._target=this;const s=["0","1","2","3"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set w(e){this._target[3]=e,this.onChange()}identity(){return Au(this._target),this.onChange(),this}set(e,n,r,i){return e.length?this.copy(e):(Ju(this._target,e,n,r,i),this.onChange(),this)}rotateX(e){return Uu(this._target,this._target,e),this.onChange(),this}rotateY(e){return Wu(this._target,this._target,e),this.onChange(),this}rotateZ(e){return Gu(this._target,this._target,e),this.onChange(),this}inverse(e=this._target){return Yu(this._target,e),this.onChange(),this}conjugate(e=this._target){return Xu(this._target,e),this.onChange(),this}copy(e){return Zu(this._target,e),this.onChange(),this}normalize(e=this._target){return th(this._target,e),this.onChange(),this}multiply(e,n){return n?_r(this._target,e,n):_r(this._target,this._target,e),this.onChange(),this}dot(e){return eh(this._target,e)}fromMatrix3(e){return Ku(this._target,e),this.onChange(),this}fromEuler(e,n){return Qu(this._target,e,e.order),n||this.onChange(),this}fromAxisAngle(e,n){return Hu(this._target,e,n),this.onChange(),this}slerp(e,n){return qu(this._target,this._target,e,n),this.onChange(),this}fromArray(e,n=0){return this._target[0]=e[n],this._target[1]=e[n+1],this._target[2]=e[n+2],this._target[3]=e[n+3],this.onChange(),this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e[n+3]=this[3],e}}const rh=1e-6;function ih(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function sh(t,e,n,r,i,s,o,a,l,c,u,h,d,p,m,y,_){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=o,t[6]=a,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=d,t[12]=p,t[13]=m,t[14]=y,t[15]=_,t}function oh(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ah(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],m=e[12],y=e[13],_=e[14],w=e[15],b=n*a-r*o,x=n*l-i*o,E=n*c-s*o,C=r*l-i*a,S=r*c-s*a,F=i*c-s*l,O=u*y-h*m,j=u*_-d*m,N=u*w-p*m,D=h*_-d*y,z=h*w-p*y,H=d*w-p*_,I=b*H-x*z+E*D+C*N-S*j+F*O;return I?(I=1/I,t[0]=(a*H-l*z+c*D)*I,t[1]=(i*z-r*H-s*D)*I,t[2]=(y*F-_*S+w*C)*I,t[3]=(d*S-h*F-p*C)*I,t[4]=(l*N-o*H-c*j)*I,t[5]=(n*H-i*N+s*j)*I,t[6]=(_*E-m*F-w*x)*I,t[7]=(u*F-d*E+p*x)*I,t[8]=(o*z-a*N+c*O)*I,t[9]=(r*N-n*z-s*O)*I,t[10]=(m*S-y*E+w*b)*I,t[11]=(h*E-u*S-p*b)*I,t[12]=(a*j-o*D-l*O)*I,t[13]=(n*D-r*j+i*O)*I,t[14]=(y*x-m*C-_*b)*I,t[15]=(u*C-h*x+d*b)*I,t):null}function Xi(t){let e=t[0],n=t[1],r=t[2],i=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],p=t[12],m=t[13],y=t[14],_=t[15],w=e*o-n*s,b=e*a-r*s,x=e*l-i*s,E=n*a-r*o,C=n*l-i*o,S=r*l-i*a,F=c*m-u*p,O=c*y-h*p,j=c*_-d*p,N=u*y-h*m,D=u*_-d*m,z=h*_-d*y;return w*z-b*D+x*N+E*j-C*O+S*F}function yr(t,e,n){let r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],p=e[10],m=e[11],y=e[12],_=e[13],w=e[14],b=e[15],x=n[0],E=n[1],C=n[2],S=n[3];return t[0]=x*r+E*a+C*h+S*y,t[1]=x*i+E*l+C*d+S*_,t[2]=x*s+E*c+C*p+S*w,t[3]=x*o+E*u+C*m+S*b,x=n[4],E=n[5],C=n[6],S=n[7],t[4]=x*r+E*a+C*h+S*y,t[5]=x*i+E*l+C*d+S*_,t[6]=x*s+E*c+C*p+S*w,t[7]=x*o+E*u+C*m+S*b,x=n[8],E=n[9],C=n[10],S=n[11],t[8]=x*r+E*a+C*h+S*y,t[9]=x*i+E*l+C*d+S*_,t[10]=x*s+E*c+C*p+S*w,t[11]=x*o+E*u+C*m+S*b,x=n[12],E=n[13],C=n[14],S=n[15],t[12]=x*r+E*a+C*h+S*y,t[13]=x*i+E*l+C*d+S*_,t[14]=x*s+E*c+C*p+S*w,t[15]=x*o+E*u+C*m+S*b,t}function lh(t,e,n){let r=n[0],i=n[1],s=n[2],o,a,l,c,u,h,d,p,m,y,_,w;return e===t?(t[12]=e[0]*r+e[4]*i+e[8]*s+e[12],t[13]=e[1]*r+e[5]*i+e[9]*s+e[13],t[14]=e[2]*r+e[6]*i+e[10]*s+e[14],t[15]=e[3]*r+e[7]*i+e[11]*s+e[15]):(o=e[0],a=e[1],l=e[2],c=e[3],u=e[4],h=e[5],d=e[6],p=e[7],m=e[8],y=e[9],_=e[10],w=e[11],t[0]=o,t[1]=a,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=d,t[7]=p,t[8]=m,t[9]=y,t[10]=_,t[11]=w,t[12]=o*r+u*i+m*s+e[12],t[13]=a*r+h*i+y*s+e[13],t[14]=l*r+d*i+_*s+e[14],t[15]=c*r+p*i+w*s+e[15]),t}function ch(t,e,n){let r=n[0],i=n[1],s=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function uh(t,e,n,r){let i=r[0],s=r[1],o=r[2],a=Math.hypot(i,s,o),l,c,u,h,d,p,m,y,_,w,b,x,E,C,S,F,O,j,N,D,z,H,I,te;return Math.abs(a)<rh?null:(a=1/a,i*=a,s*=a,o*=a,l=Math.sin(n),c=Math.cos(n),u=1-c,h=e[0],d=e[1],p=e[2],m=e[3],y=e[4],_=e[5],w=e[6],b=e[7],x=e[8],E=e[9],C=e[10],S=e[11],F=i*i*u+c,O=s*i*u+o*l,j=o*i*u-s*l,N=i*s*u-o*l,D=s*s*u+c,z=o*s*u+i*l,H=i*o*u+s*l,I=s*o*u-i*l,te=o*o*u+c,t[0]=h*F+y*O+x*j,t[1]=d*F+_*O+E*j,t[2]=p*F+w*O+C*j,t[3]=m*F+b*O+S*j,t[4]=h*N+y*D+x*z,t[5]=d*N+_*D+E*z,t[6]=p*N+w*D+C*z,t[7]=m*N+b*D+S*z,t[8]=h*H+y*I+x*te,t[9]=d*H+_*I+E*te,t[10]=p*H+w*I+C*te,t[11]=m*H+b*I+S*te,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function hh(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function Ki(t,e){let n=e[0],r=e[1],i=e[2],s=e[4],o=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(s,o,a),t[2]=Math.hypot(l,c,u),t}function dh(t){let e=t[0],n=t[1],r=t[2],i=t[4],s=t[5],o=t[6],a=t[8],l=t[9],c=t[10];const u=e*e+n*n+r*r,h=i*i+s*s+o*o,d=a*a+l*l+c*c;return Math.sqrt(Math.max(u,h,d))}const Qi=(function(){const t=[1,1,1];return function(e,n){let r=t;Ki(r,n);let i=1/r[0],s=1/r[1],o=1/r[2],a=n[0]*i,l=n[1]*s,c=n[2]*o,u=n[4]*i,h=n[5]*s,d=n[6]*o,p=n[8]*i,m=n[9]*s,y=n[10]*o,_=a+h+y,w=0;return _>0?(w=Math.sqrt(_+1)*2,e[3]=.25*w,e[0]=(d-m)/w,e[1]=(p-c)/w,e[2]=(l-u)/w):a>h&&a>y?(w=Math.sqrt(1+a-h-y)*2,e[3]=(d-m)/w,e[0]=.25*w,e[1]=(l+u)/w,e[2]=(p+c)/w):h>y?(w=Math.sqrt(1+h-a-y)*2,e[3]=(p-c)/w,e[0]=(l+u)/w,e[1]=.25*w,e[2]=(d+m)/w):(w=Math.sqrt(1+y-a-h)*2,e[3]=(l-u)/w,e[0]=(p+c)/w,e[1]=(d+m)/w,e[2]=.25*w),e}})();function fh(t,e,n,r){let i=He([t[0],t[1],t[2]]);const s=He([t[4],t[5],t[6]]),o=He([t[8],t[9],t[10]]);Xi(t)<0&&(i=-i),n[0]=t[12],n[1]=t[13],n[2]=t[14];const l=t.slice(),c=1/i,u=1/s,h=1/o;l[0]*=c,l[1]*=c,l[2]*=c,l[4]*=u,l[5]*=u,l[6]*=u,l[8]*=h,l[9]*=h,l[10]*=h,Qi(e,l),r[0]=i,r[1]=s,r[2]=o}function ph(t,e,n,r){const i=t,s=e[0],o=e[1],a=e[2],l=e[3],c=s+s,u=o+o,h=a+a,d=s*c,p=s*u,m=s*h,y=o*u,_=o*h,w=a*h,b=l*c,x=l*u,E=l*h,C=r[0],S=r[1],F=r[2];return i[0]=(1-(y+w))*C,i[1]=(p+E)*C,i[2]=(m-x)*C,i[3]=0,i[4]=(p-E)*S,i[5]=(1-(d+w))*S,i[6]=(_+b)*S,i[7]=0,i[8]=(m+x)*F,i[9]=(_-b)*F,i[10]=(1-(d+y))*F,i[11]=0,i[12]=n[0],i[13]=n[1],i[14]=n[2],i[15]=1,i}function mh(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,l=i+i,c=n*o,u=r*o,h=r*a,d=i*o,p=i*a,m=i*l,y=s*o,_=s*a,w=s*l;return t[0]=1-h-m,t[1]=u+w,t[2]=d-_,t[3]=0,t[4]=u-w,t[5]=1-c-m,t[6]=p+y,t[7]=0,t[8]=d+_,t[9]=p-y,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gh(t,e,n,r,i){let s=1/Math.tan(e/2),o=1/(r-i);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*o,t[15]=0,t}function _h(t,e,n,r,i,s,o){let a=1/(e-n),l=1/(r-i),c=1/(s-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*l,t[14]=(o+s)*c,t[15]=1,t}function yh(t,e,n,r){let i=e[0],s=e[1],o=e[2],a=r[0],l=r[1],c=r[2],u=i-n[0],h=s-n[1],d=o-n[2],p=u*u+h*h+d*d;p===0?d=1:(p=1/Math.sqrt(p),u*=p,h*=p,d*=p);let m=l*d-c*h,y=c*u-a*d,_=a*h-l*u;return p=m*m+y*y+_*_,p===0&&(c?a+=1e-6:l?c+=1e-6:l+=1e-6,m=l*d-c*h,y=c*u-a*d,_=a*h-l*u,p=m*m+y*y+_*_),p=1/Math.sqrt(p),m*=p,y*=p,_*=p,t[0]=m,t[1]=y,t[2]=_,t[3]=0,t[4]=h*_-d*y,t[5]=d*m-u*_,t[6]=u*y-h*m,t[7]=0,t[8]=u,t[9]=h,t[10]=d,t[11]=0,t[12]=i,t[13]=s,t[14]=o,t[15]=1,t}function wr(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function vr(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function wh(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}class gt extends Array{constructor(e=1,n=0,r=0,i=0,s=0,o=1,a=0,l=0,c=0,u=0,h=1,d=0,p=0,m=0,y=0,_=1){return super(e,n,r,i,s,o,a,l,c,u,h,d,p,m,y,_),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(e){this[12]=e}set y(e){this[13]=e}set z(e){this[14]=e}set w(e){this[15]=e}set(e,n,r,i,s,o,a,l,c,u,h,d,p,m,y,_){return e.length?this.copy(e):(sh(this,e,n,r,i,s,o,a,l,c,u,h,d,p,m,y,_),this)}translate(e,n=this){return lh(this,n,e),this}rotate(e,n,r=this){return uh(this,r,e,n),this}scale(e,n=this){return ch(this,n,typeof e=="number"?[e,e,e]:e),this}add(e,n){return n?wr(this,e,n):wr(this,this,e),this}sub(e,n){return n?vr(this,e,n):vr(this,this,e),this}multiply(e,n){return e.length?n?yr(this,e,n):yr(this,this,e):wh(this,this,e),this}identity(){return oh(this),this}copy(e){return ih(this,e),this}fromPerspective({fov:e,aspect:n,near:r,far:i}={}){return gh(this,e,n,r,i),this}fromOrthogonal({left:e,right:n,bottom:r,top:i,near:s,far:o}){return _h(this,e,n,r,i,s,o),this}fromQuaternion(e){return mh(this,e),this}setPosition(e){return this.x=e[0],this.y=e[1],this.z=e[2],this}inverse(e=this){return ah(this,e),this}compose(e,n,r){return ph(this,e,n,r),this}decompose(e,n,r){return fh(this,e,n,r),this}getRotation(e){return Qi(e,this),this}getTranslation(e){return hh(e,this),this}getScaling(e){return Ki(e,this),this}getMaxScaleOnAxis(){return dh(this)}lookAt(e,n,r){return yh(this,e,n,r),this}determinant(){return Xi(this)}fromArray(e,n=0){return this[0]=e[n],this[1]=e[n+1],this[2]=e[n+2],this[3]=e[n+3],this[4]=e[n+4],this[5]=e[n+5],this[6]=e[n+6],this[7]=e[n+7],this[8]=e[n+8],this[9]=e[n+9],this[10]=e[n+10],this[11]=e[n+11],this[12]=e[n+12],this[13]=e[n+13],this[14]=e[n+14],this[15]=e[n+15],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e[n+3]=this[3],e[n+4]=this[4],e[n+5]=this[5],e[n+6]=this[6],e[n+7]=this[7],e[n+8]=this[8],e[n+9]=this[9],e[n+10]=this[10],e[n+11]=this[11],e[n+12]=this[12],e[n+13]=this[13],e[n+14]=this[14],e[n+15]=this[15],e}}function vh(t,e,n="YXZ"){return n==="XYZ"?(t[1]=Math.asin(Math.min(Math.max(e[8],-1),1)),Math.abs(e[8])<.99999?(t[0]=Math.atan2(-e[9],e[10]),t[2]=Math.atan2(-e[4],e[0])):(t[0]=Math.atan2(e[6],e[5]),t[2]=0)):n==="YXZ"?(t[0]=Math.asin(-Math.min(Math.max(e[9],-1),1)),Math.abs(e[9])<.99999?(t[1]=Math.atan2(e[8],e[10]),t[2]=Math.atan2(e[1],e[5])):(t[1]=Math.atan2(-e[2],e[0]),t[2]=0)):n==="ZXY"?(t[0]=Math.asin(Math.min(Math.max(e[6],-1),1)),Math.abs(e[6])<.99999?(t[1]=Math.atan2(-e[2],e[10]),t[2]=Math.atan2(-e[4],e[5])):(t[1]=0,t[2]=Math.atan2(e[1],e[0]))):n==="ZYX"?(t[1]=Math.asin(-Math.min(Math.max(e[2],-1),1)),Math.abs(e[2])<.99999?(t[0]=Math.atan2(e[6],e[10]),t[2]=Math.atan2(e[1],e[0])):(t[0]=0,t[2]=Math.atan2(-e[4],e[5]))):n==="YZX"?(t[2]=Math.asin(Math.min(Math.max(e[1],-1),1)),Math.abs(e[1])<.99999?(t[0]=Math.atan2(-e[9],e[5]),t[1]=Math.atan2(-e[2],e[0])):(t[0]=0,t[1]=Math.atan2(e[8],e[10]))):n==="XZY"&&(t[2]=Math.asin(-Math.min(Math.max(e[4],-1),1)),Math.abs(e[4])<.99999?(t[0]=Math.atan2(e[6],e[5]),t[1]=Math.atan2(e[8],e[0])):(t[0]=Math.atan2(-e[9],e[10]),t[1]=0)),t}const xr=new gt;class xh extends Array{constructor(e=0,n=e,r=e,i="YXZ"){super(e,n,r),this.order=i,this.onChange=()=>{},this._target=this;const s=["0","1","2"];return new Proxy(this,{set(o,a){const l=Reflect.set(...arguments);return l&&s.includes(a)&&o.onChange(),l}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(e){this._target[0]=e,this.onChange()}set y(e){this._target[1]=e,this.onChange()}set z(e){this._target[2]=e,this.onChange()}set(e,n=e,r=e){return e.length?this.copy(e):(this._target[0]=e,this._target[1]=n,this._target[2]=r,this.onChange(),this)}copy(e){return this._target[0]=e[0],this._target[1]=e[1],this._target[2]=e[2],this.onChange(),this}reorder(e){return this._target.order=e,this.onChange(),this}fromRotationMatrix(e,n=this.order){return vh(this._target,e,n),this.onChange(),this}fromQuaternion(e,n=this.order,r){return xr.fromQuaternion(e),this._target.fromRotationMatrix(xr,n),r||this.onChange(),this}fromArray(e,n=0){return this._target[0]=e[n],this._target[1]=e[n+1],this._target[2]=e[n+2],this}toArray(e=[],n=0){return e[n]=this[0],e[n+1]=this[1],e[n+2]=this[2],e}}class bh{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new gt,this.worldMatrix=new gt,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new ce,this.quaternion=new nh,this.scale=new ce(1),this.rotation=new xh,this.up=new ce(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(e,n=!0){this.parent&&e!==this.parent&&this.parent.removeChild(this,!1),this.parent=e,n&&e&&e.addChild(this,!1)}addChild(e,n=!0){~this.children.indexOf(e)||this.children.push(e),n&&e.setParent(this,!1)}removeChild(e,n=!0){~this.children.indexOf(e)&&this.children.splice(this.children.indexOf(e),1),n&&e.setParent(null,!1)}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||e)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,e=!0);for(let n=0,r=this.children.length;n<r;n++)this.children[n].updateMatrixWorld(e)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(e){if(!e(this))for(let n=0,r=this.children.length;n<r;n++)this.children[n].traverse(e)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(e,n=!1){n?this.matrix.lookAt(this.position,e,this.up):this.matrix.lookAt(e,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function Eh(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function Ch(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,l=i+i,c=n*o,u=r*o,h=r*a,d=i*o,p=i*a,m=i*l,y=s*o,_=s*a,w=s*l;return t[0]=1-h-m,t[3]=u-w,t[6]=d+_,t[1]=u+w,t[4]=1-c-m,t[7]=p-y,t[2]=d-_,t[5]=p+y,t[8]=1-c-h,t}function Rh(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Sh(t,e,n,r,i,s,o,a,l,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=s,t[5]=o,t[6]=a,t[7]=l,t[8]=c,t}function Mh(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Ph(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,d=-u*s+a*l,p=c*s-o*l,m=n*h+r*d+i*p;return m?(m=1/m,t[0]=h*m,t[1]=(-u*r+i*c)*m,t[2]=(a*r-i*o)*m,t[3]=d*m,t[4]=(u*n-i*l)*m,t[5]=(-a*n+i*s)*m,t[6]=p*m,t[7]=(-c*n+r*l)*m,t[8]=(o*n-r*s)*m,t):null}function br(t,e,n){let r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1],m=n[2],y=n[3],_=n[4],w=n[5],b=n[6],x=n[7],E=n[8];return t[0]=d*r+p*o+m*c,t[1]=d*i+p*a+m*u,t[2]=d*s+p*l+m*h,t[3]=y*r+_*o+w*c,t[4]=y*i+_*a+w*u,t[5]=y*s+_*l+w*h,t[6]=b*r+x*o+E*c,t[7]=b*i+x*a+E*u,t[8]=b*s+x*l+E*h,t}function Lh(t,e,n){let r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],p=n[1];return t[0]=r,t[1]=i,t[2]=s,t[3]=o,t[4]=a,t[5]=l,t[6]=d*r+p*o+c,t[7]=d*i+p*a+u,t[8]=d*s+p*l+h,t}function Ih(t,e,n){let r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),p=Math.cos(n);return t[0]=p*r+d*o,t[1]=p*i+d*a,t[2]=p*s+d*l,t[3]=p*o-d*r,t[4]=p*a-d*i,t[5]=p*l-d*s,t[6]=c,t[7]=u,t[8]=h,t}function Th(t,e,n){let r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Fh(t,e){let n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],p=e[11],m=e[12],y=e[13],_=e[14],w=e[15],b=n*a-r*o,x=n*l-i*o,E=n*c-s*o,C=r*l-i*a,S=r*c-s*a,F=i*c-s*l,O=u*y-h*m,j=u*_-d*m,N=u*w-p*m,D=h*_-d*y,z=h*w-p*y,H=d*w-p*_,I=b*H-x*z+E*D+C*N-S*j+F*O;return I?(I=1/I,t[0]=(a*H-l*z+c*D)*I,t[1]=(l*N-o*H-c*j)*I,t[2]=(o*z-a*N+c*O)*I,t[3]=(i*z-r*H-s*D)*I,t[4]=(n*H-i*N+s*j)*I,t[5]=(r*N-n*z-s*O)*I,t[6]=(y*F-_*S+w*C)*I,t[7]=(_*E-m*F-w*x)*I,t[8]=(m*S-y*E+w*b)*I,t):null}class jh extends Array{constructor(e=1,n=0,r=0,i=0,s=1,o=0,a=0,l=0,c=1){return super(e,n,r,i,s,o,a,l,c),this}set(e,n,r,i,s,o,a,l,c){return e.length?this.copy(e):(Sh(this,e,n,r,i,s,o,a,l,c),this)}translate(e,n=this){return Lh(this,n,e),this}rotate(e,n=this){return Ih(this,n,e),this}scale(e,n=this){return Th(this,n,e),this}multiply(e,n){return n?br(this,e,n):br(this,this,e),this}identity(){return Mh(this),this}copy(e){return Rh(this,e),this}fromMatrix4(e){return Eh(this,e),this}fromQuaternion(e){return Ch(this,e),this}fromBasis(e,n,r){return this.set(e[0],e[1],e[2],n[0],n[1],n[2],r[0],r[1],r[2]),this}inverse(e=this){return Ph(this,e),this}getNormalMatrix(e){return Fh(this,e),this}}let Nh=0;class zh extends bh{constructor(e,{geometry:n,program:r,mode:i=e.TRIANGLES,frustumCulled:s=!0,renderOrder:o=0}={}){super(),e.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=e,this.id=Nh++,this.geometry=n,this.program=r,this.mode=i,this.frustumCulled=s,this.renderOrder=o,this.modelViewMatrix=new gt,this.normalMatrix=new jh,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(e){return this.beforeRenderCallbacks.push(e),this}onAfterRender(e){return this.afterRenderCallbacks.push(e),this}draw({camera:e}={}){e&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=e.projectionMatrix,this.program.uniforms.cameraPosition.value=e.worldPosition,this.program.uniforms.viewMatrix.value=e.viewMatrix,this.modelViewMatrix.multiply(e.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}));let n=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:n}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(r=>r&&r({mesh:this,camera:e}))}}class Dh extends Iu{constructor(e,{attributes:n={}}={}){Object.assign(n,{position:{size:2,data:new Float32Array([-1,-1,3,-1,-1,3])},uv:{size:2,data:new Float32Array([0,0,2,0,0,2])}}),super(e,n)}}const rt=8,Oh=t=>{const e=t.replace("#","").padEnd(6,"0"),n=parseInt(e.slice(0,2),16)/255,r=parseInt(e.slice(2,4),16)/255,i=parseInt(e.slice(4,6),16)/255;return[n,r,i]},kh=t=>{const e=(t&&t.length?t:["#FF9FFC","#5227FF"]).slice(0,rt);for(e.length===1&&e.push(e[0]);e.length<rt;)e.push(e[e.length-1]);const n=[];for(let i=0;i<rt;i++)n.push(Oh(e[i]));const r=Math.max(2,Math.min(rt,t?.length??2));return{arr:n,count:r}},Bh=({className:t,dpr:e,paused:n=!1,gradientColors:r,angle:i=0,noise:s=.3,blindCount:o=16,blindMinWidth:a=60,mouseDampening:l=.15,mirrorGradient:c=!1,spotlightRadius:u=.5,spotlightSoftness:h=1,spotlightOpacity:d=1,distortAmount:p=0,shineDirection:m="left",mixBlendMode:y="lighten"})=>{const _=f.useRef(null),w=f.useRef(null),b=f.useRef(null),x=f.useRef(null),E=f.useRef(null),C=f.useRef(null),S=f.useRef([0,0]),F=f.useRef(0),O=f.useRef(!0);return f.useEffect(()=>{const j=_.current;if(!j)return;const N=new Ou({dpr:e??(typeof window<"u"&&window.devicePixelRatio||1),alpha:!0,antialias:!0});C.current=N;const D=N.gl,z=D.canvas;z.style.width="100%",z.style.height="100%",z.style.display="block",j.appendChild(z);const H=`
|
|
attribute vec2 position;
|
|
attribute vec2 uv;
|
|
varying vec2 vUv;
|
|
|
|
void main() {
|
|
vUv = uv;
|
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
}
|
|
`,I=`
|
|
#ifdef GL_ES
|
|
precision mediump float;
|
|
#endif
|
|
|
|
uniform vec3 iResolution;
|
|
uniform vec2 iMouse;
|
|
uniform float iTime;
|
|
|
|
uniform float uAngle;
|
|
uniform float uNoise;
|
|
uniform float uBlindCount;
|
|
uniform float uSpotlightRadius;
|
|
uniform float uSpotlightSoftness;
|
|
uniform float uSpotlightOpacity;
|
|
uniform float uMirror;
|
|
uniform float uDistort;
|
|
uniform float uShineFlip;
|
|
uniform vec3 uColor0;
|
|
uniform vec3 uColor1;
|
|
uniform vec3 uColor2;
|
|
uniform vec3 uColor3;
|
|
uniform vec3 uColor4;
|
|
uniform vec3 uColor5;
|
|
uniform vec3 uColor6;
|
|
uniform vec3 uColor7;
|
|
uniform int uColorCount;
|
|
|
|
varying vec2 vUv;
|
|
|
|
float rand(vec2 co){
|
|
return fract(sin(dot(co, vec2(12.9898,78.233))) * 43758.5453);
|
|
}
|
|
|
|
vec2 rotate2D(vec2 p, float a){
|
|
float c = cos(a);
|
|
float s = sin(a);
|
|
return mat2(c, -s, s, c) * p;
|
|
}
|
|
|
|
vec3 getGradientColor(float t){
|
|
float tt = clamp(t, 0.0, 1.0);
|
|
int count = uColorCount;
|
|
if (count < 2) count = 2;
|
|
float scaled = tt * float(count - 1);
|
|
float seg = floor(scaled);
|
|
float f = fract(scaled);
|
|
|
|
if (seg < 1.0) return mix(uColor0, uColor1, f);
|
|
if (seg < 2.0 && count > 2) return mix(uColor1, uColor2, f);
|
|
if (seg < 3.0 && count > 3) return mix(uColor2, uColor3, f);
|
|
if (seg < 4.0 && count > 4) return mix(uColor3, uColor4, f);
|
|
if (seg < 5.0 && count > 5) return mix(uColor4, uColor5, f);
|
|
if (seg < 6.0 && count > 6) return mix(uColor5, uColor6, f);
|
|
if (seg < 7.0 && count > 7) return mix(uColor6, uColor7, f);
|
|
if (count > 7) return uColor7;
|
|
if (count > 6) return uColor6;
|
|
if (count > 5) return uColor5;
|
|
if (count > 4) return uColor4;
|
|
if (count > 3) return uColor3;
|
|
if (count > 2) return uColor2;
|
|
return uColor1;
|
|
}
|
|
|
|
void mainImage( out vec4 fragColor, in vec2 fragCoord )
|
|
{
|
|
vec2 uv0 = fragCoord.xy / iResolution.xy;
|
|
|
|
float aspect = iResolution.x / iResolution.y;
|
|
vec2 p = uv0 * 2.0 - 1.0;
|
|
p.x *= aspect;
|
|
vec2 pr = rotate2D(p, uAngle);
|
|
pr.x /= aspect;
|
|
vec2 uv = pr * 0.5 + 0.5;
|
|
|
|
vec2 uvMod = uv;
|
|
if (uDistort > 0.0) {
|
|
float a = uvMod.y * 6.0;
|
|
float b = uvMod.x * 6.0;
|
|
float w = 0.01 * uDistort;
|
|
uvMod.x += sin(a) * w;
|
|
uvMod.y += cos(b) * w;
|
|
}
|
|
float t = uvMod.x;
|
|
if (uMirror > 0.5) {
|
|
t = 1.0 - abs(1.0 - 2.0 * fract(t));
|
|
}
|
|
vec3 base = getGradientColor(t);
|
|
|
|
vec2 offset = vec2(iMouse.x/iResolution.x, iMouse.y/iResolution.y);
|
|
float d = length(uv0 - offset);
|
|
float r = max(uSpotlightRadius, 1e-4);
|
|
float dn = d / r;
|
|
float spot = (1.0 - 2.0 * pow(dn, uSpotlightSoftness)) * uSpotlightOpacity;
|
|
vec3 cir = vec3(spot);
|
|
float stripe = fract(uvMod.x * max(uBlindCount, 1.0));
|
|
if (uShineFlip > 0.5) stripe = 1.0 - stripe;
|
|
vec3 ran = vec3(stripe);
|
|
|
|
vec3 col = cir + base - ran;
|
|
col += (rand(gl_FragCoord.xy + iTime) - 0.5) * uNoise;
|
|
|
|
fragColor = vec4(col, 1.0);
|
|
}
|
|
|
|
void main() {
|
|
vec4 color;
|
|
mainImage(color, vUv * iResolution.xy);
|
|
gl_FragColor = color;
|
|
}
|
|
`,{arr:te,count:cs}=kh(r),ve={iResolution:{value:[D.drawingBufferWidth,D.drawingBufferHeight,1]},iMouse:{value:[0,0]},iTime:{value:0},uAngle:{value:i*Math.PI/180},uNoise:{value:s},uBlindCount:{value:Math.max(1,o)},uSpotlightRadius:{value:u},uSpotlightSoftness:{value:h},uSpotlightOpacity:{value:d},uMirror:{value:c?1:0},uDistort:{value:p},uShineFlip:{value:m==="right"?1:0},uColor0:{value:te[0]},uColor1:{value:te[1]},uColor2:{value:te[2]},uColor3:{value:te[3]},uColor4:{value:te[4]},uColor5:{value:te[5]},uColor6:{value:te[6]},uColor7:{value:te[7]},uColorCount:{value:cs}},yn=new Fu(D,{vertex:H,fragment:I,uniforms:ve});b.current=yn;const wn=new Dh(D);E.current=wn;const us=new zh(D,{geometry:wn,program:yn});x.current=us;const vn=()=>{const Q=j.getBoundingClientRect();if(N.setSize(Q.width,Q.height),ve.iResolution.value=[D.drawingBufferWidth,D.drawingBufferHeight,1],a&&a>0){const W=Math.max(1,Math.floor(Q.width/a)),oe=o?Math.min(o,W):W;ve.uBlindCount.value=Math.max(1,oe)}else ve.uBlindCount.value=Math.max(1,o);if(O.current){O.current=!1;const W=D.drawingBufferWidth/2,oe=D.drawingBufferHeight/2;ve.iMouse.value=[W,oe],S.current=[W,oe]}};vn();const xn=new ResizeObserver(vn);xn.observe(j);const bn=Q=>{const W=z.getBoundingClientRect(),oe=N.dpr||1,Re=(Q.clientX-W.left)*oe,De=(W.height-(Q.clientY-W.top))*oe;S.current=[Re,De],l<=0&&(ve.iMouse.value=[Re,De])};z.addEventListener("pointermove",bn);const En=Q=>{if(w.current=requestAnimationFrame(En),ve.iTime.value=Q*.001,l>0){F.current||(F.current=Q);const W=(Q-F.current)/1e3;F.current=Q;const oe=Math.max(1e-4,l);let Re=1-Math.exp(-W/oe);Re>1&&(Re=1);const De=S.current,Ze=ve.iMouse.value;Ze[0]+=(De[0]-Ze[0])*Re,Ze[1]+=(De[1]-Ze[1])*Re}else F.current=Q;if(!n&&b.current&&x.current)try{N.render({scene:x.current})}catch(W){console.error(W)}};return w.current=requestAnimationFrame(En),()=>{w.current&&cancelAnimationFrame(w.current),z.removeEventListener("pointermove",bn),xn.disconnect(),z.parentElement===j&&j.removeChild(z);const Q=(W,oe)=>{W&&typeof W[oe]=="function"&&W[oe].call(W)};Q(b.current,"remove"),Q(E.current,"remove"),Q(x.current,"remove"),Q(C.current,"destroy"),b.current=null,E.current=null,x.current=null,C.current=null}},[e,n,r,i,s,o,a,l,c,u,h,d,p,m]),g.jsx("div",{ref:_,className:`gradient-blinds-container ${t}`,style:{...y&&{mixBlendMode:y}}})},Vh="_button_yjd5k_1",$h="_sm_yjd5k_23",Ah="_md_yjd5k_28",Hh="_lg_yjd5k_33",Uh="_primary_yjd5k_39",Wh="_secondary_yjd5k_49",Gh="_outline_yjd5k_58",qh="_loader_yjd5k_69",Yh="_spin_yjd5k_1",it={button:Vh,sm:$h,md:Ah,lg:Hh,primary:Uh,secondary:Wh,outline:Gh,loader:qh,spin:Yh};function Kt({variant:t="primary",size:e="md",children:n,isLoading:r,disabled:i,className:s,type:o="button",onClick:a}){return g.jsx(k.button,{type:o,className:`${it.button} ${it[t]} ${it[e]} ${s||""}`,disabled:i||r,whileHover:{scale:1.02},whileTap:{scale:.98},onClick:a,children:r?g.jsx("span",{className:it.loader}):n})}const Xh="_card_mghl3_1",Kh="_hoverable_mghl3_13",Qh="_icon_mghl3_22",Zh="_title_mghl3_39",Jh="_description_mghl3_46",Ge={card:Xh,hoverable:Kh,icon:Qh,title:Zh,description:Jh};function Me({children:t,className:e,hover:n=!0}){return g.jsx(k.div,{className:`${Ge.card} ${n?Ge.hoverable:""} ${e||""}`,whileHover:n?{y:-4}:void 0,transition:{duration:.2},children:t})}function ed({children:t}){return g.jsx("div",{className:Ge.icon,children:t})}function td({children:t}){return g.jsx("h3",{className:Ge.title,children:t})}function nd({children:t}){return g.jsx("p",{className:Ge.description,children:t})}Me.Icon=ed;Me.Title=td;Me.Description=nd;const rd="_field_1azqc_1",id="_label_1azqc_7",sd="_input_1azqc_13",od="_textarea_1azqc_42",ad="_hasError_1azqc_47",ld="_error_1azqc_55",le={field:rd,label:id,input:sd,textarea:od,hasError:ad,error:ld},ct=f.forwardRef(({label:t,error:e,id:n,className:r,...i},s)=>{const o=n||t.toLowerCase().replace(/\s+/g,"-");return g.jsxs("div",{className:`${le.field} ${e?le.hasError:""} ${r||""}`,children:[g.jsx("label",{htmlFor:o,className:le.label,children:t}),g.jsx("input",{ref:s,id:o,className:le.input,...i}),e&&g.jsx("span",{className:le.error,children:e})]})});ct.displayName="Input";const Zi=f.forwardRef(({label:t,error:e,id:n,className:r,...i},s)=>{const o=n||t.toLowerCase().replace(/\s+/g,"-");return g.jsxs("div",{className:`${le.field} ${e?le.hasError:""} ${r||""}`,children:[g.jsx("label",{htmlFor:o,className:le.label,children:t}),g.jsx("textarea",{ref:s,id:o,className:`${le.input} ${le.textarea}`,...i}),e&&g.jsx("span",{className:le.error,children:e})]})});Zi.displayName="Textarea";const cd="_hero_lgffv_1",ud="_backgroundContainer_lgffv_12",hd="_content_lgffv_21",dd="_text_lgffv_29",fd="_greeting_lgffv_34",pd="_title_lgffv_43",md="_tagline_lgffv_70",gd="_typed_lgffv_82",_d="_cursor_lgffv_89",yd="_cta_lgffv_104",wd="_scrollIndicator_lgffv_112",vd="_scrollMouse_lgffv_124",xd="_scrollWheel_lgffv_134",bd="_scrollText_lgffv_141",ne={hero:cd,backgroundContainer:ud,content:hd,text:dd,greeting:fd,title:pd,tagline:md,typed:gd,cursor:_d,cta:yd,scrollIndicator:wd,scrollMouse:vd,scrollWheel:xd,scrollText:bd};function Ed(){const{t}=ze(),[e,n]=f.useState(!0);f.useEffect(()=>{const i=()=>{n(window.scrollY<50)};return window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[]);const{text:r}=_c({words:t.hero.rotatingWords,typingSpeed:80,deletingSpeed:40,pauseDuration:2500});return g.jsxs("section",{className:ne.hero,children:[g.jsx("div",{className:ne.backgroundContainer,children:g.jsx(Bh,{gradientColors:["#26a269","#8ff0a4"],angle:134,noise:.31,blindCount:12,blindMinWidth:50,spotlightRadius:.5,spotlightSoftness:1,spotlightOpacity:1,mouseDampening:.15,distortAmount:13,shineDirection:"left",mixBlendMode:"lighten"})}),g.jsx("div",{className:`${ne.content} container`,children:g.jsxs(k.div,{className:ne.text,initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,ease:"easeOut"},children:[g.jsx(k.p,{className:ne.greeting,initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:t.hero.greeting}),g.jsx(k.h1,{className:ne.title,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3,duration:.5},children:t.hero.company}),g.jsxs(k.div,{className:ne.tagline,initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},children:[g.jsx("span",{children:t.hero.tagline}),g.jsxs("span",{className:ne.typed,children:[r,g.jsx("span",{className:ne.cursor,children:"|"})]})]}),g.jsxs(k.div,{className:ne.cta,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.7,duration:.5},children:[g.jsx(Fe,{to:"/contact",children:g.jsx(Kt,{variant:"primary",size:"lg",children:t.hero.cta})}),g.jsx(Fe,{to:"/about",children:g.jsx(Kt,{variant:"outline",size:"lg",children:t.hero.ctaSecondary})})]})]})}),e&&g.jsxs(k.div,{className:ne.scrollIndicator,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:[g.jsx(k.div,{className:ne.scrollMouse,animate:{y:[0,8,0]},transition:{repeat:1/0,duration:1.5,ease:"easeInOut"},children:g.jsx("span",{className:ne.scrollWheel})}),g.jsx("span",{className:ne.scrollText,children:t.hero.scroll})]})]})}const Cd="_services_1bb0v_1",Rd="_header_1bb0v_6",Sd="_title_1bb0v_11",Md="_subtitle_1bb0v_18",Pd="_grid_1bb0v_26",Be={services:Cd,header:Rd,title:Sd,subtitle:Md,grid:Pd},Ld={code:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("polyline",{points:"16 18 22 12 16 6"}),g.jsx("polyline",{points:"8 6 2 12 8 18"})]}),support:g.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:g.jsx("path",{d:"M21 12a9 9 0 0 1-9 9m9-9a9 9 0 0 0-9-9m9 9H3m9 9a9 9 0 0 1-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 0 1 9-9"})}),consulting:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),g.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),hosting:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("rect",{x:"2",y:"2",width:"20",height:"8",rx:"2",ry:"2"}),g.jsx("rect",{x:"2",y:"14",width:"20",height:"8",rx:"2",ry:"2"}),g.jsx("line",{x1:"6",y1:"6",x2:"6.01",y2:"6"}),g.jsx("line",{x1:"6",y1:"18",x2:"6.01",y2:"18"})]})},Id={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.15}}},Td={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.4,0,.2,1]}}};function Fd(){const{t}=ze();return g.jsx("section",{className:Be.services,children:g.jsxs("div",{className:"container",children:[g.jsxs(k.div,{className:Be.header,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-100px"},transition:{duration:.5},children:[g.jsx("h2",{className:Be.title,children:t.services.title}),g.jsx("p",{className:Be.subtitle,children:t.services.subtitle})]}),g.jsx(k.div,{className:Be.grid,variants:Id,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-50px"},children:t.services.items.map((e,n)=>g.jsx(k.div,{variants:Td,children:g.jsxs(Me,{children:[g.jsx(Me.Icon,{children:Ld[e.icon]}),g.jsx(Me.Title,{children:e.title}),g.jsx(Me.Description,{children:e.description})]})},n))})]})})}function jd(){return g.jsxs("main",{children:[g.jsx(Ed,{}),g.jsx(Fd,{})]})}var Ji={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Er=T.createContext&&T.createContext(Ji),Nd=["attr","size","title"];function zd(t,e){if(t==null)return{};var n=Dd(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Dd(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function _t(){return _t=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_t.apply(this,arguments)}function Cr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cr(Object(n),!0).forEach(function(r){Od(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cr(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Od(t,e,n){return e=kd(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kd(t){var e=Bd(t,"string");return typeof e=="symbol"?e:e+""}function Bd(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function es(t){return t&&t.map((e,n)=>T.createElement(e.tag,yt({key:n},e.attr),es(e.child)))}function Ce(t){return e=>T.createElement(Vd,_t({attr:yt({},t.attr)},e),es(t.child))}function Vd(t){var e=n=>{var{attr:r,size:i,title:s}=t,o=zd(t,Nd),a=i||n.size||"1em",l;return n.className&&(l=n.className),t.className&&(l=(l?l+" ":"")+t.className),T.createElement("svg",_t({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:yt(yt({color:t.color||n.color},n.style),t.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&T.createElement("title",null,s),t.children)};return Er!==void 0?T.createElement(Er.Consumer,null,n=>e(n)):e(Ji)}function $d(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},child:[]}]})(t)}function Ad(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.455 8.369c-.538-.748-1.778-2.285-3.681-4.569-.826-.991-1.535-1.832-1.884-2.245a146 146 0 0 0-.488-.576l-.207-.245-.113-.133-.022-.032-.01-.005L12.57 0l-.609.488c-1.555 1.246-2.828 2.851-3.681 4.64-.523 1.064-.864 2.105-1.043 3.176-.047.241-.088.489-.121.738-.209-.017-.421-.028-.632-.033-.018-.001-.035-.002-.059-.003a7.46 7.46 0 0 0-2.28.274l-.317.089-.163.286c-.765 1.342-1.198 2.869-1.252 4.416-.07 2.01.477 3.954 1.583 5.625 1.082 1.633 2.61 2.882 4.42 3.611l.236.095.071.025.003-.001a9.59 9.59 0 0 0 2.941.568q.171.006.342.006c1.273 0 2.513-.249 3.69-.742l.008.004.313-.145a9.63 9.63 0 0 0 3.927-3.335c1.01-1.49 1.577-3.234 1.641-5.042.075-2.161-.643-4.304-2.133-6.371m-7.083 6.695c.328 1.244.264 2.44-.191 3.558-1.135-1.12-1.967-2.352-2.475-3.665-.543-1.404-.87-2.74-.974-3.975.48.157.922.366 1.315.622 1.132.737 1.914 1.902 2.325 3.461zm.207 6.022c.482.368.99.712 1.513 1.028-.771.21-1.565.302-2.369.273a8 8 0 0 1-.373-.022c.458-.394.869-.823 1.228-1.279zm1.347-6.431c-.516-1.957-1.527-3.437-3.002-4.398-.647-.421-1.385-.741-2.194-.95.011-.134.026-.268.043-.4.014-.113.03-.216.046-.313.133-.689.332-1.37.589-2.025.099-.25.206-.499.321-.74l.004-.008c.177-.358.376-.719.61-1.105l.092-.152-.003-.001c.544-.851 1.197-1.627 1.942-2.311l.288.341c.672.796 1.304 1.548 1.878 2.237 1.291 1.549 2.966 3.583 3.612 4.48 1.277 1.771 1.893 3.579 1.83 5.375-.049 1.395-.461 2.755-1.195 3.933-.694 1.116-1.661 2.05-2.8 2.708-.636-.318-1.559-.839-2.539-1.599.79-1.575.952-3.28.479-5.072zm-2.575 5.397c-.725.939-1.587 1.55-2.09 1.856-.081-.029-.163-.06-.243-.093l-.065-.026c-1.49-.616-2.747-1.656-3.635-3.01-.907-1.384-1.356-2.993-1.298-4.653.041-1.19.338-2.327.882-3.379.316-.07.638-.114.96-.131l.084-.002c.162-.003.324-.003.478 0 .227.011.454.035.677.07.073 1.513.445 3.145 1.105 4.852.637 1.644 1.694 3.162 3.144 4.515z"},child:[]}]})(t)}function Hd(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.546 10.93L13.067.452c-.604-.603-1.582-.603-2.188 0L8.708 2.627l2.76 2.76c.645-.215 1.379-.07 1.889.441.516.515.658 1.258.438 1.9l2.658 2.66c.645-.223 1.387-.078 1.9.435.721.72.721 1.884 0 2.604-.719.719-1.881.719-2.6 0-.539-.541-.674-1.337-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348.713.721.713 1.883 0 2.6-.719.721-1.889.721-2.609 0-.719-.719-.719-1.879 0-2.598.182-.18.387-.316.605-.406V8.835c-.217-.091-.424-.222-.6-.401-.545-.545-.676-1.342-.396-2.009L7.636 3.7.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477c.604.604 1.582.604 2.186 0l10.43-10.43c.605-.603.605-1.582 0-2.187"},child:[]}]})(t)}function Ud(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z"},child:[]}]})(t)}function Wd(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.5594 14.7228a.5269.5269 0 0 0-.0563-.1191c-.139-.2632-.4768-.3418-1.0074-.2321-1.6533.3411-2.2935.1312-2.5256-.0191 1.342-2.0482 2.445-4.522 3.0411-6.8297.2714-1.0507.7982-3.5237.1222-4.7316a1.5641 1.5641 0 0 0-.1509-.235C21.6931.9086 19.8007.0248 17.5099.0005c-1.4947-.0158-2.7705.3461-3.1161.4794a9.449 9.449 0 0 0-.5159-.0816 8.044 8.044 0 0 0-1.3114-.1278c-1.1822-.0184-2.2038.2642-3.0498.8406-.8573-.3211-4.7888-1.645-7.2219.0788C.9359 2.1526.3086 3.8733.4302 6.3043c.0409.818.5069 3.334 1.2423 5.7436.4598 1.5065.9387 2.7019 1.4334 3.582.553.9942 1.1259 1.5933 1.7143 1.7895.4474.1491 1.1327.1441 1.8581-.7279.8012-.9635 1.5903-1.8258 1.9446-2.2069.4351.2355.9064.3625 1.39.3772a.0569.0569 0 0 0 .0004.0041 11.0312 11.0312 0 0 0-.2472.3054c-.3389.4302-.4094.5197-1.5002.7443-.3102.064-1.1344.2339-1.1464.8115-.0025.1224.0329.2309.0919.3268.2269.4231.9216.6097 1.015.6331 1.3345.3335 2.5044.092 3.3714-.6787-.017 2.231.0775 4.4174.3454 5.0874.2212.5529.7618 1.9045 2.4692 1.9043.2505 0 .5263-.0291.8296-.0941 1.7819-.3821 2.5557-1.1696 2.855-2.9059.1503-.8707.4016-2.8753.5388-4.1012.0169-.0703.0357-.1207.057-.1362.0007-.0005.0697-.0471.4272.0307a.3673.3673 0 0 0 .0443.0068l.2539.0223.0149.001c.8468.0384 1.9114-.1426 2.5312-.4308.6438-.2988 1.8057-1.0323 1.5951-1.6698zM2.371 11.8765c-.7435-2.4358-1.1779-4.8851-1.2123-5.5719-.1086-2.1714.4171-3.6829 1.5623-4.4927 1.8367-1.2986 4.8398-.5408 6.108-.13-.0032.0032-.0066.0061-.0098.0094-2.0238 2.044-1.9758 5.536-1.9708 5.7495-.0002.0823.0066.1989.0162.3593.0348.5873.0996 1.6804-.0735 2.9184-.1609 1.1504.1937 2.2764.9728 3.0892.0806.0841.1648.1631.2518.2374-.3468.3714-1.1004 1.1926-1.9025 2.1576-.5677.6825-.9597.5517-1.0886.5087-.3919-.1307-.813-.5871-1.2381-1.3223-.4796-.839-.9635-2.0317-1.4155-3.5126zm6.0072 5.0871c-.1711-.0428-.3271-.1132-.4322-.1772.0889-.0394.2374-.0902.4833-.1409 1.2833-.2641 1.4815-.4506 1.9143-1.0002.0992-.126.2116-.2687.3673-.4426a.3549.3549 0 0 0 .0737-.1298c.1708-.1513.2724-.1099.4369-.0417.156.0646.3078.26.3695.4752.0291.1016.0619.2945-.0452.4444-.9043 1.2658-2.2216 1.2494-3.1676 1.0128zm2.094-3.988-.0525.141c-.133.3566-.2567.6881-.3334 1.003-.6674-.0021-1.3168-.2872-1.8105-.8024-.6279-.6551-.9131-1.5664-.7825-2.5004.1828-1.3079.1153-2.4468.079-3.0586-.005-.0857-.0095-.1607-.0122-.2199.2957-.2621 1.6659-.9962 2.6429-.7724.4459.1022.7176.4057.8305.928.5846 2.7038.0774 3.8307-.3302 4.7363-.084.1866-.1633.3629-.2311.5454zm7.3637 4.5725c-.0169.1768-.0358.376-.0618.5959l-.146.4383a.3547.3547 0 0 0-.0182.1077c-.0059.4747-.054.6489-.115.8693-.0634.2292-.1353.4891-.1794 1.0575-.11 1.4143-.8782 2.2267-2.4172 2.5565-1.5155.3251-1.7843-.4968-2.0212-1.2217a6.5824 6.5824 0 0 0-.0769-.2266c-.2154-.5858-.1911-1.4119-.1574-2.5551.0165-.5612-.0249-1.9013-.3302-2.6462.0044-.2932.0106-.5909.019-.8918a.3529.3529 0 0 0-.0153-.1126 1.4927 1.4927 0 0 0-.0439-.208c-.1226-.4283-.4213-.7866-.7797-.9351-.1424-.059-.4038-.1672-.7178-.0869.067-.276.1831-.5875.309-.9249l.0529-.142c.0595-.16.134-.3257.213-.5012.4265-.9476 1.0106-2.2453.3766-5.1772-.2374-1.0981-1.0304-1.6343-2.2324-1.5098-.7207.0746-1.3799.3654-1.7088.5321a5.6716 5.6716 0 0 0-.1958.1041c.0918-1.1064.4386-3.1741 1.7357-4.4823a4.0306 4.0306 0 0 1 .3033-.276.3532.3532 0 0 0 .1447-.0644c.7524-.5706 1.6945-.8506 2.802-.8325.4091.0067.8017.0339 1.1742.081 1.939.3544 3.2439 1.4468 4.0359 2.3827.8143.9623 1.2552 1.9315 1.4312 2.4543-1.3232-.1346-2.2234.1268-2.6797.779-.9926 1.4189.543 4.1729 1.2811 5.4964.1353.2426.2522.4522.2889.5413.2403.5825.5515.9713.7787 1.2552.0696.087.1372.1714.1885.245-.4008.1155-1.1208.3825-1.0552 1.717-.0123.1563-.0423.4469-.0834.8148-.0461.2077-.0702.4603-.0994.7662zm.8905-1.6211c-.0405-.8316.2691-.9185.5967-1.0105a2.8566 2.8566 0 0 0 .135-.0406 1.202 1.202 0 0 0 .1342.103c.5703.3765 1.5823.4213 3.0068.1344-.2016.1769-.5189.3994-.9533.6011-.4098.1903-1.0957.333-1.7473.3636-.7197.0336-1.0859-.0807-1.1721-.151zm.5695-9.2712c-.0059.3508-.0542.6692-.1054 1.0017-.055.3576-.112.7274-.1264 1.1762-.0142.4368.0404.8909.0932 1.3301.1066.887.216 1.8003-.2075 2.7014a3.5272 3.5272 0 0 1-.1876-.3856c-.0527-.1276-.1669-.3326-.3251-.6162-.6156-1.1041-2.0574-3.6896-1.3193-4.7446.3795-.5427 1.3408-.5661 2.1781-.463zm.2284 7.0137a12.3762 12.3762 0 0 0-.0853-.1074l-.0355-.0444c.7262-1.1995.5842-2.3862.4578-3.4385-.0519-.4318-.1009-.8396-.0885-1.2226.0129-.4061.0666-.7543.1185-1.0911.0639-.415.1288-.8443.1109-1.3505.0134-.0531.0188-.1158.0118-.1902-.0457-.4855-.5999-1.938-1.7294-3.253-.6076-.7073-1.4896-1.4972-2.6889-2.0395.5251-.1066 1.2328-.2035 2.0244-.1859 2.0515.0456 3.6746.8135 4.8242 2.2824a.908.908 0 0 1 .0667.1002c.7231 1.3556-.2762 6.2751-2.9867 10.5405zm-8.8166-6.1162c-.025.1794-.3089.4225-.6211.4225a.5821.5821 0 0 1-.0809-.0056c-.1873-.026-.3765-.144-.5059-.3156-.0458-.0605-.1203-.178-.1055-.2844.0055-.0401.0261-.0985.0925-.1488.1182-.0894.3518-.1226.6096-.0867.3163.0441.6426.1938.6113.4186zm7.9305-.4114c.0111.0792-.049.201-.1531.3102-.0683.0717-.212.1961-.4079.2232a.5456.5456 0 0 1-.075.0052c-.2935 0-.5414-.2344-.5607-.3717-.024-.1765.2641-.3106.5611-.352.297-.0414.6111.0088.6356.1851z"},child:[]}]})(t)}function Gd(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z"},child:[]}]})(t)}function qd(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"},child:[]}]})(t)}function Yd(t){return Ce({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M1.125 0C.502 0 0 .502 0 1.125v21.75C0 23.498.502 24 1.125 24h21.75c.623 0 1.125-.502 1.125-1.125V1.125C24 .502 23.498 0 22.875 0zm17.363 9.75c.612 0 1.154.037 1.627.111a6.38 6.38 0 0 1 1.306.34v2.458a3.95 3.95 0 0 0-.643-.361 5.093 5.093 0 0 0-.717-.26 5.453 5.453 0 0 0-1.426-.2c-.3 0-.573.028-.819.086a2.1 2.1 0 0 0-.623.242c-.17.104-.3.229-.393.374a.888.888 0 0 0-.14.49c0 .196.053.373.156.529.104.156.252.304.443.444s.423.276.696.41c.273.135.582.274.926.416.47.197.892.407 1.266.628.374.222.695.473.963.753.268.279.472.598.614.957.142.359.214.776.214 1.253 0 .657-.125 1.21-.373 1.656a3.033 3.033 0 0 1-1.012 1.085 4.38 4.38 0 0 1-1.487.596c-.566.12-1.163.18-1.79.18a9.916 9.916 0 0 1-1.84-.164 5.544 5.544 0 0 1-1.512-.493v-2.63a5.033 5.033 0 0 0 3.237 1.2c.333 0 .624-.03.872-.09.249-.06.456-.144.623-.25.166-.108.29-.234.373-.38a1.023 1.023 0 0 0-.074-1.089 2.12 2.12 0 0 0-.537-.5 5.597 5.597 0 0 0-.807-.444 27.72 27.72 0 0 0-1.007-.436c-.918-.383-1.602-.852-2.053-1.405-.45-.553-.676-1.222-.676-2.005 0-.614.123-1.141.369-1.582.246-.441.58-.804 1.004-1.089a4.494 4.494 0 0 1 1.47-.629 7.536 7.536 0 0 1 1.77-.201zm-15.113.188h9.563v2.166H9.506v9.646H6.789v-9.646H3.375z"},child:[]}]})(t)}const Xd="_about_1n62r_1",Kd="_hero_1n62r_6",Qd="_title_1n62r_16",Zd="_subtitle_1n62r_22",Jd="_intro_1n62r_29",e1="_introContent_1n62r_33",t1="_introText_1n62r_38",n1="_sectionHeader_1n62r_47",r1="_skills_1n62r_63",i1="_techGrid_1n62r_68",s1="_techCard_1n62r_76",o1="_techIcon_1n62r_93",a1="_techName_1n62r_97",l1="_values_1n62r_104",c1="_valuesGrid_1n62r_108",u1="_valueCard_1n62r_114",h1="_valueNumber_1n62r_126",d1="_valueTitle_1n62r_134",f1="_valueDescription_1n62r_140",V={about:Xd,hero:Kd,title:Qd,subtitle:Zd,intro:Jd,introContent:e1,introText:t1,sectionHeader:n1,skills:r1,techGrid:i1,techCard:s1,techIcon:o1,techName:a1,values:l1,valuesGrid:c1,valueCard:u1,valueNumber:h1,valueTitle:d1,valueDescription:f1},p1=[{name:"React",icon:qd},{name:"TypeScript",icon:Yd},{name:"Node.js",icon:Ud},{name:"Python",icon:Gd},{name:"Firebase",icon:Ad},{name:"PostgreSQL",icon:Wd},{name:"Docker",icon:$d},{name:"Git",icon:Hd}],Rr={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},Sr={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.4}}};function m1(){const{t}=ze();return g.jsxs("main",{className:V.about,children:[g.jsx("section",{className:V.hero,children:g.jsx("div",{className:"container",children:g.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},children:[g.jsx("h1",{className:V.title,children:t.about.title}),g.jsx("p",{className:V.subtitle,children:t.about.subtitle})]})})}),g.jsx("section",{className:V.intro,children:g.jsx("div",{className:"container",children:g.jsxs(k.div,{className:V.introContent,initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[g.jsx("p",{className:V.introText,children:t.about.intro}),g.jsx("p",{className:V.introText,children:t.about.experience})]})})}),g.jsx("section",{className:V.skills,children:g.jsxs("div",{className:"container",children:[g.jsxs(k.div,{className:V.sectionHeader,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[g.jsx("h2",{children:t.about.skills.title}),g.jsx("p",{children:t.about.skills.subtitle})]}),g.jsx(k.div,{className:V.techGrid,variants:Rr,initial:"hidden",whileInView:"visible",viewport:{once:!0},children:p1.map(e=>g.jsxs(k.div,{className:V.techCard,variants:Sr,whileHover:{scale:1.05,y:-4},children:[g.jsx("span",{className:V.techIcon,children:g.jsx(e.icon,{})}),g.jsx("span",{className:V.techName,children:e.name})]},e.name))})]})}),g.jsx("section",{className:V.values,children:g.jsxs("div",{className:"container",children:[g.jsx(k.div,{className:V.sectionHeader,initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:g.jsx("h2",{children:t.about.values.title})}),g.jsx(k.div,{className:V.valuesGrid,variants:Rr,initial:"hidden",whileInView:"visible",viewport:{once:!0},children:t.about.values.items.map((e,n)=>g.jsxs(k.div,{className:V.valueCard,variants:Sr,children:[g.jsxs("div",{className:V.valueNumber,children:["0",n+1]}),g.jsx("h3",{className:V.valueTitle,children:e.title}),g.jsx("p",{className:V.valueDescription,children:e.description})]},n))})]})})]})}class Qe{constructor(e=0,n="Network Error"){this.status=e,this.text=n}}const g1=()=>{if(!(typeof localStorage>"u"))return{get:t=>Promise.resolve(localStorage.getItem(t)),set:(t,e)=>Promise.resolve(localStorage.setItem(t,e)),remove:t=>Promise.resolve(localStorage.removeItem(t))}},Z={origin:"https://api.emailjs.com",blockHeadless:!1,storageProvider:g1()},_n=t=>t?typeof t=="string"?{publicKey:t}:t.toString()==="[object Object]"?t:{}:{},_1=(t,e="https://api.emailjs.com")=>{if(!t)return;const n=_n(t);Z.publicKey=n.publicKey,Z.blockHeadless=n.blockHeadless,Z.storageProvider=n.storageProvider,Z.blockList=n.blockList,Z.limitRate=n.limitRate,Z.origin=n.origin||e},ts=async(t,e,n={})=>{const r=await fetch(Z.origin+t,{method:"POST",headers:n,body:e}),i=await r.text(),s=new Qe(r.status,i);if(r.ok)return s;throw s},ns=(t,e,n)=>{if(!t||typeof t!="string")throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e||typeof e!="string")throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!n||typeof n!="string")throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates"},y1=t=>{if(t&&t.toString()!=="[object Object]")throw"The template params have to be the object. Visit https://www.emailjs.com/docs/sdk/send/"},rs=t=>t.webdriver||!t.languages||t.languages.length===0,is=()=>new Qe(451,"Unavailable For Headless Browser"),w1=(t,e)=>{if(!Array.isArray(t))throw"The BlockList list has to be an array";if(typeof e!="string")throw"The BlockList watchVariable has to be a string"},v1=t=>!t.list?.length||!t.watchVariable,x1=(t,e)=>t instanceof FormData?t.get(e):t[e],ss=(t,e)=>{if(v1(t))return!1;w1(t.list,t.watchVariable);const n=x1(e,t.watchVariable);return typeof n!="string"?!1:t.list.includes(n)},os=()=>new Qe(403,"Forbidden"),b1=(t,e)=>{if(typeof t!="number"||t<0)throw"The LimitRate throttle has to be a positive number";if(e&&typeof e!="string")throw"The LimitRate ID has to be a non-empty string"},E1=async(t,e,n)=>{const r=Number(await n.get(t)||0);return e-Date.now()+r},as=async(t,e,n)=>{if(!e.throttle||!n)return!1;b1(e.throttle,e.id);const r=e.id||t;return await E1(r,e.throttle,n)>0?!0:(await n.set(r,Date.now().toString()),!1)},ls=()=>new Qe(429,"Too Many Requests"),C1=async(t,e,n,r)=>{const i=_n(r),s=i.publicKey||Z.publicKey,o=i.blockHeadless||Z.blockHeadless,a=i.storageProvider||Z.storageProvider,l={...Z.blockList,...i.blockList},c={...Z.limitRate,...i.limitRate};return o&&rs(navigator)?Promise.reject(is()):(ns(s,t,e),y1(n),n&&ss(l,n)?Promise.reject(os()):await as(location.pathname,c,a)?Promise.reject(ls()):ts("/api/v1.0/email/send",JSON.stringify({lib_version:"4.4.1",user_id:s,service_id:t,template_id:e,template_params:n}),{"Content-type":"application/json"}))},R1=t=>{if(!t||t.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of the form"},S1=t=>typeof t=="string"?document.querySelector(t):t,M1=async(t,e,n,r)=>{const i=_n(r),s=i.publicKey||Z.publicKey,o=i.blockHeadless||Z.blockHeadless,a=Z.storageProvider||i.storageProvider,l={...Z.blockList,...i.blockList},c={...Z.limitRate,...i.limitRate};if(o&&rs(navigator))return Promise.reject(is());const u=S1(n);ns(s,t,e),R1(u);const h=new FormData(u);return ss(l,h)?Promise.reject(os()):await as(location.pathname,c,a)?Promise.reject(ls()):(h.append("lib_version","4.4.1"),h.append("service_id",t),h.append("template_id",e),h.append("user_id",s),ts("/api/v1.0/email/send-form",h))},P1={init:_1,send:C1,sendForm:M1,EmailJSResponseStatus:Qe},L1="_contact_1lm51_1",I1="_hero_1lm51_6",T1="_title_1lm51_16",F1="_subtitle_1lm51_22",j1="_content_1lm51_29",N1="_grid_1lm51_33",z1="_formSection_1lm51_46",D1="_intro_1lm51_50",O1="_form_1lm51_46",k1="_success_1lm51_63",B1="_error_1lm51_72",V1="_infoSection_1lm51_82",$1="_infoTitle_1lm51_90",A1="_infoList_1lm51_96",H1="_infoItem_1lm51_102",U1="_infoIcon_1lm51_108",Y={contact:L1,hero:I1,title:T1,subtitle:F1,content:j1,grid:N1,formSection:z1,intro:D1,form:O1,success:k1,error:B1,infoSection:V1,infoTitle:$1,infoList:A1,infoItem:H1,infoIcon:U1},W1="YOUR_SERVICE_ID",G1="YOUR_TEMPLATE_ID",q1="YOUR_PUBLIC_KEY";function Y1(){const{t}=ze(),[e,n]=f.useState({name:"",email:"",subject:"",message:""}),[r,i]=f.useState({}),[s,o]=f.useState(!1),[a,l]=f.useState("idle"),c=()=>{const d={};return e.name.trim()||(d.name="Required"),e.email.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.email)||(d.email="Invalid email"):d.email="Required",e.subject.trim()||(d.subject="Required"),e.message.trim()||(d.message="Required"),i(d),Object.keys(d).length===0},u=async d=>{if(d.preventDefault(),!!c()){o(!0),l("idle");try{await P1.send(W1,G1,{from_name:e.name,from_email:e.email,subject:e.subject,message:e.message},q1),l("success"),n({name:"",email:"",subject:"",message:""})}catch{l("error")}finally{o(!1)}}},h=(d,p)=>{n(m=>({...m,[d]:p})),r[d]&&i(m=>({...m,[d]:void 0}))};return g.jsxs("main",{className:Y.contact,children:[g.jsx("section",{className:Y.hero,children:g.jsx("div",{className:"container",children:g.jsxs(k.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6},children:[g.jsx("h1",{className:Y.title,children:t.contact.title}),g.jsx("p",{className:Y.subtitle,children:t.contact.subtitle})]})})}),g.jsx("section",{className:Y.content,children:g.jsx("div",{className:"container",children:g.jsxs("div",{className:Y.grid,children:[g.jsxs(k.div,{className:Y.formSection,initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.5,delay:.2},children:[g.jsx("p",{className:Y.intro,children:t.contact.intro}),g.jsxs("form",{onSubmit:u,className:Y.form,children:[g.jsx(ct,{label:t.contact.form.name,placeholder:t.contact.form.namePlaceholder,value:e.name,onChange:d=>h("name",d.target.value),error:r.name}),g.jsx(ct,{label:t.contact.form.email,type:"email",placeholder:t.contact.form.emailPlaceholder,value:e.email,onChange:d=>h("email",d.target.value),error:r.email}),g.jsx(ct,{label:t.contact.form.subject,placeholder:t.contact.form.subjectPlaceholder,value:e.subject,onChange:d=>h("subject",d.target.value),error:r.subject}),g.jsx(Zi,{label:t.contact.form.message,placeholder:t.contact.form.messagePlaceholder,value:e.message,onChange:d=>h("message",d.target.value),error:r.message,rows:6}),g.jsx(Kt,{type:"submit",variant:"primary",size:"lg",isLoading:s,disabled:s,children:s?t.contact.form.sending:t.contact.form.submit}),a==="success"&&g.jsx(k.p,{className:Y.success,initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:t.contact.form.success}),a==="error"&&g.jsx(k.p,{className:Y.error,initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:t.contact.form.error})]})]}),g.jsxs(k.div,{className:Y.infoSection,initial:{opacity:0,x:30},animate:{opacity:1,x:0},transition:{duration:.5,delay:.3},children:[g.jsx("h2",{className:Y.infoTitle,children:t.contact.info.title}),g.jsxs("div",{className:Y.infoList,children:[g.jsxs("div",{className:Y.infoItem,children:[g.jsx("div",{className:Y.infoIcon,children:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),g.jsx("polyline",{points:"22,6 12,13 2,6"})]})}),g.jsxs("div",{children:[g.jsx("h3",{children:t.contact.info.email}),g.jsx("a",{href:"mailto:info@ragusa-it.dev",children:"info@ragusa-it.dev"})]})]}),g.jsxs("div",{className:Y.infoItem,children:[g.jsx("div",{className:Y.infoIcon,children:g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",children:g.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})}),g.jsxs("div",{children:[g.jsx("h3",{children:t.contact.info.github}),g.jsx("a",{href:"https://github.com/ragusa-it",target:"_blank",rel:"noopener noreferrer",children:"github.com/ragusa-it"})]})]})]})]})]})})})]})}function X1(){return g.jsx(La,{children:g.jsxs(ma,{children:[g.jsx(gc,{}),g.jsx(ec,{}),g.jsxs(Wo,{children:[g.jsx(ot,{path:"/",element:g.jsx(jd,{})}),g.jsx(ot,{path:"/about",element:g.jsx(m1,{})}),g.jsx(ot,{path:"/contact",element:g.jsx(Y1,{})})]}),g.jsx(uc,{})]})})}ms.createRoot(document.getElementById("root")).render(g.jsx(f.StrictMode,{children:g.jsx(X1,{})}));
|