ocearo-ui 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +1 -1
- package/_next/static/chunks/{12.3c555f633acd3b9c.js → 12.a4273af9b82657f2.js} +1 -1
- package/_next/static/chunks/{138.1972cf3c9fc39df0.js → 138.b9389f70773e44e6.js} +1 -1
- package/_next/static/chunks/188.1839b14fedef7718.js +1 -0
- package/_next/static/chunks/{254.d042953e9156f0e7.js → 250.b26c37701919cf5c.js} +156 -3
- package/_next/static/chunks/412.9a891f540865cbd8.js +1 -0
- package/_next/static/chunks/73.082ba53f0fe04b93.js +1 -0
- package/_next/static/chunks/870fdd6f.a18fe21a954fd3ab.js +1 -0
- package/_next/static/chunks/890.6c4341abc0cc6952.js +1 -0
- package/_next/static/chunks/909.d374a5e93b208fb5.js +1 -0
- package/_next/static/chunks/app/page-e48f8e53cd8e002b.js +1 -0
- package/_next/static/chunks/webpack-9a7f6430a15895de.js +1 -0
- package/_next/static/css/6325556caecccba7.css +3 -0
- package/assets/moon.jpg +0 -0
- package/index.html +1 -1
- package/index.txt +2 -2
- package/{ocearo-ui-0.1.8.tgz → ocearo-ui-0.1.9.tgz} +0 -0
- package/package.json +1 -1
- package/_next/static/chunks/188.102e24d1c73f2baa.js +0 -1
- package/_next/static/chunks/412.927fb0f82cf9570b.js +0 -1
- package/_next/static/chunks/73.533710ccf02691fb.js +0 -1
- package/_next/static/chunks/870fdd6f.61611821188a7cf1.js +0 -1
- package/_next/static/chunks/890.57a71aa88c340321.js +0 -1
- package/_next/static/chunks/909.ff1ef545a0ddfff8.js +0 -1
- package/_next/static/chunks/app/page-f18f860fdab1cfd6.js +0 -1
- package/_next/static/chunks/webpack-e20f87e20b6a3b07.js +0 -1
- package/_next/static/css/b6eeac7d4f08f3a7.css +0 -3
- /package/_next/static/{L8gaZ4BxIvTwzVCBztXQX → nyFVKP2yXAawJ4xdgBsdG}/_buildManifest.js +0 -0
- /package/_next/static/{L8gaZ4BxIvTwzVCBztXQX → nyFVKP2yXAawJ4xdgBsdG}/_ssgManifest.js +0 -0
package/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="preload" href="/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff" as="font" crossorigin="" type="font/woff"/><link rel="stylesheet" href="/ocearo-ui/_next/static/css/6325556caecccba7.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/webpack-9a7f6430a15895de.js"/><script src="/ocearo-ui/_next/static/chunks/fd9d1056-50d0a3499460e502.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/117-1ad4a6b37bfc6738.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/main-app-ed02033afba81a43.js" async=""></script><meta name="robots" content="noindex"/><link rel="manifest" href="./manifest.json"/><meta name="theme-color" content="#4bbcd8"/><link rel="icon" type="image/png" href="./favicon-96x96.png" sizes="96x96"/><link rel="icon" type="image/svg+xml" href="./favicon.svg"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><title>404: This page could not be found.</title><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><meta name="next-size-adjust"/><script src="/ocearo-ui/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_873ced __variable_6df010 antialiased"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/ocearo-ui/_next/static/chunks/webpack-9a7f6430a15895de.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/ocearo-ui/_next/static/media/4473ecc91f70f139-s.p.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n2:HL[\"/ocearo-ui/_next/static/media/463dafcda517f24f-s.p.woff\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff\"}]\n3:HL[\"/ocearo-ui/_next/static/css/6325556caecccba7.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[12846,[],\"\"]\n6:I[4707,[],\"\"]\n7:I[36423,[],\"\"]\nd:I[61060,[],\"\"]\n8:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n9:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\na:{\"display\":\"inline-block\"}\nb:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"nyFVKP2yXAawJ4xdgBsdG\",\"assetPrefix\":\"/ocearo-ui\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/css/6325556caecccba7.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"link\",null,{\"rel\":\"manifest\",\"href\":\"./manifest.json\"}],[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#4bbcd8\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"type\":\"image/png\",\"href\":\"./favicon-96x96.png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",null,{\"rel\":\"icon\",\"type\":\"image/svg+xml\",\"href\":\"./favicon.svg\"}],[\"$\",\"link\",null,{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",null,{\"rel\":\"apple-touch-icon\",\"sizes\":\"180x180\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"meta\",null,{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}]]}],[\"$\",\"body\",null,{\"className\":\"__variable_873ced __variable_6df010 antialiased\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$9\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$b\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{12012:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{12012:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var l=n(57437),r=n(2265),a=n(51268),i=n(35217),s=n(53082);let c={waterTemp:{key:"waterTemp",path:"environment.water.temperature",icon:i.L02,label:"Water Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},airTemp:{key:"airTemp",path:"environment.outside.temperature",icon:i.whq,label:"Air Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},exhaustTemp:{key:"exhaustTemp",path:"propulsion.main.exhaustTemperature",icon:i.Rpv,label:"Exhaust Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5},fridgeTemp:{key:"fridgeTemp",path:"environment.inside.fridge.temperature",icon:i.jOV,label:"Fridge Temperature",format:e=>"".concat(e,"\xb0C"),transform:s.G5}},o=e=>{let{mode:t,value:n,icon:r,nightMode:i}=e;return n||0===n?(0,l.jsxs)("div",{className:"flex items-center text-2xl ".concat(i?"text-red-500":"text-white"),children:[(0,l.jsx)(a.G,{icon:r,className:"mr-2"}),(0,l.jsx)("span",{children:c[t].format(n)})]}):null};var u=()=>{let{nightMode:e,getSignalKValue:t}=(0,s.yC)(),[n,a]=(0,r.useState)([]),[i,u]=(0,r.useState)(null),m=(0,r.useMemo)(()=>Object.entries(c).reduce((e,n)=>{let[l,r]=n,a=t(r.path);return e[l]=null!==a?r.transform(a):null,e},{}),[t]);(0,r.useEffect)(()=>{let e=Object.entries(m).filter(e=>{let[t,n]=e;return null!==n}).map(e=>{let[t]=e;return t});a(e),e.length>0&&!e.includes(i)&&u(e[0])},[m,i]);let x=()=>{if(n.length<=1)return;let e=(n.indexOf(i)+1)%n.length;u(n[e])};return 0===n.length?(0,l.jsx)("div",{className:"text-2xl ".concat(e?"text-red-500":"text-white"),children:(0,l.jsx)("span",{children:"NA"})}):(0,l.jsx)("div",{className:"cursor-pointer flex items-center space-x-2",onClick:x,title:"Toggle Temperature Display (".concat(n.length," sensors available)"),role:"button",tabIndex:0,onKeyPress:e=>"Enter"===e.key&&x(),"aria-label":i?c[i].label:"No temperature data available",children:i&&(0,l.jsx)(o,{mode:i,value:m[i],icon:c[i].icon,nightMode:e})})};let m={pressure:{key:"pressure",path:"environment.outside.pressure",icon:i.uM9,format:e=>"".concat(e," hPa"),transform:s.NU},humidity:{key:"humidity",path:"environment.inside.relativeHumidity",icon:i.Zkk,format:e=>"".concat(e.toFixed(1),"%"),transform:e=>100*e},voc:{key:"voc",path:"environment.inside.voc",icon:i.DSs,format:e=>"".concat(e," ppm"),transform:e=>e}},x=e=>{let{mode:t,value:n,icon:r,nightMode:i}=e;return n||0===n?(0,l.jsxs)("div",{className:"flex items-center text-2xl ".concat(i?"text-red-500":"text-white"),children:[(0,l.jsx)(a.G,{icon:r,className:"mr-2"}),(0,l.jsx)("span",{children:m[t].format(n)})]}):null};var d=()=>{let{nightMode:e,getSignalKValue:t}=(0,s.yC)(),[n,a]=(0,r.useState)([]),[i,c]=(0,r.useState)(null),o=(0,r.useMemo)(()=>Object.entries(m).reduce((e,n)=>{let[l,r]=n,a=t(r.path);return e[l]=null!==a?r.transform(a):null,e},{}),[t]);(0,r.useEffect)(()=>{let e=Object.entries(o).filter(e=>{let[t,n]=e;return null!==n}).map(e=>{let[t]=e;return t});a(e),e.length>0&&!e.includes(i)&&c(e[0])},[o,i]);let u=()=>{if(n.length<=1)return;let e=(n.indexOf(i)+1)%n.length;c(n[e])};return 0===n.length?(0,l.jsx)("div",{className:"text-2xl ".concat(e?"text-red-500":"text-white"),children:(0,l.jsx)("span",{children:"NA"})}):(0,l.jsx)("div",{className:"cursor-pointer flex items-center space-x-2",onClick:u,title:"Toggle Environmental Display (".concat(n.length," modes available)"),role:"button",tabIndex:0,onKeyPress:e=>"Enter"===e.key&&u(),children:i&&(0,l.jsx)(x,{mode:i,value:o[i],icon:m[i].icon,nightMode:e})})};let h=e=>{let{icon:t,onClick:n,label:r,textColor:i}=e;return(0,l.jsx)("button",{onClick:n,className:"".concat(i," text-2xl flex items-center justify-center hover:text-gray-300 transition-colors duration-200"),"aria-label":r,children:(0,l.jsx)(a.G,{icon:t})})};var p=e=>{let{setRightView:t,toggleSettings:n,toggleAppMenu:r}=e,{nightMode:a}=(0,s.yC)(),c=a?"text-oNight":"text-white",o=[{section:"left",items:[{icon:i.lnS,onClick:()=>n(),label:"Settings"}]},{section:"center",items:[{icon:i.tLL,onClick:()=>t("navigation"),label:"Navigation"},{icon:i.S9Y,onClick:()=>t("weather"),label:"Weather"},{icon:i.szN,onClick:r,label:"App Menu"},{icon:i.iGi,onClick:()=>t("manual"),label:"Manual"},{icon:i.HLz,onClick:()=>t("instrument"),label:"Instrument"}]}],m=e=>{let t=o.find(t=>t.section===e);return t?t.items.map((t,n)=>(0,l.jsx)(h,{icon:t.icon,onClick:t.onClick,label:t.label,textColor:c},"".concat(e,"-").concat(n))):null};return(0,l.jsxs)("div",{className:"flex items-center w-full h-full bg-black px-4",children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center space-x-10",children:[m("left"),(0,l.jsx)(u,{})]}),(0,l.jsx)("div",{className:"flex-1 flex items-center justify-center space-x-10",children:m("center")}),(0,l.jsx)("div",{className:"flex-1 flex items-center justify-end space-x-10",children:(0,l.jsx)(d,{})})]})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[138],{59138:function(e,t,l){l.r(t);var n=l(57437),s=l(2265),a=l(53082),i=l(33145),o=l(51268),c=l(35217);t.default=()=>{let{nightMode:e}=(0,a.yC)(),[t,l]=(0,s.useState)(null),[r,d]=(0,s.useState)(!1),m=e=>{l(e),d(!1)},x=e=>{window.open(e,"_blank","noopener,noreferrer")};return(0,n.jsx)("div",{className:"bg-rightPaneBg flex flex-col h-full p-6 overflow-auto",children:t?(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4 pb-2 border-b border-gray-700",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("button",{onClick:()=>{l(null),d(!1)},className:"p-2 rounded-full hover:bg-gray-700","aria-label":"Close",children:(0,n.jsx)(o.G,{icon:c.NBC,size:"lg",className:"".concat(e?"text-oNight":"text-white")})})]}),(0,n.jsx)("div",{className:"flex-1 rounded-lg overflow-hidden",children:t.external?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6 shadow-lg",children:[(0,n.jsx)("div",{className:"w-32 h-32 mb-4 relative",children:(0,n.jsx)(i.default,{src:t.icon,alt:t.name,className:"w-full h-full object-contain",width:128,height:128})}),(0,n.jsx)("p",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("p",{className:"text-sm ".concat(e?"text-oNight":"text-white"," opacity-80 mb-4 text-center"),children:"This service will open in a new browser window"}),(0,n.jsxs)("button",{onClick:()=>x(t.url),className:"px-4 py-2 rounded-md flex items-center ".concat(e?"bg-oNight hover:bg-oRed":"bg-oBlue hover:bg-blue-600"," text-white transition-colors"),children:[(0,n.jsxs)("span",{children:["Open ",t.name]}),(0,n.jsx)(o.G,{icon:c.Xjp,className:"ml-2 text-sm"})]})]}):r?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6",children:[(0,n.jsxs)("p",{className:"mb-3 ".concat(e?"text-oNight":"text-white"),children:["Unable to embed ",t.name]}),(0,n.jsxs)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"underline flex items-center ".concat(e?"text-oNight hover:text-oRed":"text-white hover:text-blue-300"),children:[(0,n.jsx)("span",{children:"Open in new tab"}),(0,n.jsx)(o.G,{icon:c.Xjp,className:"ml-1 text-sm"})]})]}):(0,n.jsx)("iframe",{src:t.url,title:t.name,className:"w-full h-full rounded-lg border-0",allow:"autoplay; encrypted-media",allowFullScreen:!0,loading:"lazy",onError:()=>{d(!0)}})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"," mb-4"),children:"Media Services"}),(0,n.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-6",children:[{name:"Netflix",url:"https://www.netflix.com",icon:"./icons/mediaplayer/netflix.png",external:!0},{name:"YouTube",url:"https://www.youtube.com",icon:"./icons/mediaplayer/youtube.png",external:!0},{name:"Disney+",url:"https://www.disneyplus.com",icon:"./icons/mediaplayer/disneyplus.png",external:!0},{name:"Prime Video",url:"https://www.primevideo.com",icon:"./icons/mediaplayer/amazon.png",external:!0},{name:"Spotify",url:"https://open.spotify.com/embed/playlist/37i9dQZF1DXcBWIGoYBM5M",icon:"
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[138],{59138:function(e,t,l){l.r(t);var n=l(57437),s=l(2265),a=l(53082),i=l(33145),o=l(51268),c=l(35217);t.default=()=>{let{nightMode:e}=(0,a.yC)(),[t,l]=(0,s.useState)(null),[r,d]=(0,s.useState)(!1),m=e=>{l(e),d(!1)},x=e=>{window.open(e,"_blank","noopener,noreferrer")};return(0,n.jsx)("div",{className:"bg-rightPaneBg flex flex-col h-full p-6 overflow-auto",children:t?(0,n.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,n.jsxs)("div",{className:"flex justify-between items-center mb-4 pb-2 border-b border-gray-700",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("button",{onClick:()=>{l(null),d(!1)},className:"p-2 rounded-full hover:bg-gray-700","aria-label":"Close",children:(0,n.jsx)(o.G,{icon:c.NBC,size:"lg",className:"".concat(e?"text-oNight":"text-white")})})]}),(0,n.jsx)("div",{className:"flex-1 rounded-lg overflow-hidden",children:t.external?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6 shadow-lg",children:[(0,n.jsx)("div",{className:"w-32 h-32 mb-4 relative",children:(0,n.jsx)(i.default,{src:t.icon,alt:t.name,className:"w-full h-full object-contain",width:128,height:128})}),(0,n.jsx)("p",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"),children:t.name}),(0,n.jsx)("p",{className:"text-sm ".concat(e?"text-oNight":"text-white"," opacity-80 mb-4 text-center"),children:"This service will open in a new browser window"}),(0,n.jsxs)("button",{onClick:()=>x(t.url),className:"px-4 py-2 rounded-md flex items-center ".concat(e?"bg-oNight hover:bg-oRed":"bg-oBlue hover:bg-blue-600"," text-white transition-colors"),children:[(0,n.jsxs)("span",{children:["Open ",t.name]}),(0,n.jsx)(o.G,{icon:c.Xjp,className:"ml-2 text-sm"})]})]}):r?(0,n.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center bg-oGray2 rounded-lg p-6",children:[(0,n.jsxs)("p",{className:"mb-3 ".concat(e?"text-oNight":"text-white"),children:["Unable to embed ",t.name]}),(0,n.jsxs)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"underline flex items-center ".concat(e?"text-oNight hover:text-oRed":"text-white hover:text-blue-300"),children:[(0,n.jsx)("span",{children:"Open in new tab"}),(0,n.jsx)(o.G,{icon:c.Xjp,className:"ml-1 text-sm"})]})]}):(0,n.jsx)("iframe",{src:t.url,title:t.name,className:"w-full h-full rounded-lg border-0",allow:"autoplay; encrypted-media",allowFullScreen:!0,loading:"lazy",onError:()=>{d(!0)}})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-lg font-semibold ".concat(e?"text-oNight":"text-white"," mb-4"),children:"Media Services"}),(0,n.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-6",children:[{name:"Netflix",url:"https://www.netflix.com",icon:"./icons/mediaplayer/netflix.png",external:!0},{name:"YouTube",url:"https://www.youtube.com",icon:"./icons/mediaplayer/youtube.png",external:!0},{name:"Disney+",url:"https://www.disneyplus.com",icon:"./icons/mediaplayer/disneyplus.png",external:!0},{name:"Prime Video",url:"https://www.primevideo.com",icon:"./icons/mediaplayer/amazon.png",external:!0},{name:"Spotify",url:"https://open.spotify.com/embed/playlist/37i9dQZF1DXcBWIGoYBM5M",icon:"./icons/mediaplayer/spotify.png"},{name:"Deezer",url:"https://widget.deezer.com/widget/dark/playlist/1479458365",icon:"./icons/mediaplayer/deezer.png"}].map(t=>(0,n.jsxs)("button",{onClick:()=>m(t),className:"bg-oGray2 p-4 rounded-lg flex flex-col items-center justify-center transition-colors hover:bg-gray-700 shadow-lg",children:[(0,n.jsx)("div",{className:"w-24 h-24 mb-3",children:(0,n.jsx)(i.default,{src:t.icon,alt:t.name,className:"w-full h-full object-contain",width:96,height:96})}),(0,n.jsx)("span",{className:"text-sm font-medium ".concat(e?"text-oNight":"text-white"),children:t.name}),t.external&&(0,n.jsx)(o.G,{icon:c.Xjp,className:"text-sm mt-1 ".concat(e?"text-oNight":"text-white"," opacity-80")})]},t.name))})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[188],{95723:function(e,t,n){var r=n(57437),a=n(2265),o=n(40718),i=n.n(o),s=n(53082),l=n(72079),h=n(45476);let M={TRUE_WIND:1,APP_WIND:1},T=e=>{let{position:t=[0,0,0],rotation:n=[0,0,0],speed:a,color:o="#ffffff",fontSize:i=.5,textPosition:s=[0,.8,0],arrowSize:M=1}=e;return(0,r.jsxs)("group",{position:t,rotation:n,children:[(0,r.jsx)(h.x,{characters:".0123456789",color:o,fontSize:i*M,position:s,font:"fonts/Roboto-Bold.ttf",anchorX:"center",anchorY:"middle",children:a.toFixed(1)}),(0,r.jsxs)("mesh",{children:[(0,r.jsx)("shapeGeometry",{args:[new l.bnF([new l.FM8(0,0),new l.FM8(.5*M*Math.cos(5*Math.PI/6),.5*M*Math.sin(5*Math.PI/6)),new l.FM8(0,-.577*M),new l.FM8(-.5*M*Math.cos(5*Math.PI/6),.5*M*Math.sin(5*Math.PI/6)),new l.FM8(0,0)])]}),(0,r.jsx)("meshStandardMaterial",{color:o,side:l.ehD})]})]})};T.propTypes={position:i().oneOfType([i().instanceOf(l.Pa4),i().arrayOf(i().number)]).isRequired,rotation:i().arrayOf(i().number).isRequired,speed:i().number.isRequired,color:i().oneOfType([i().string,i().number]).isRequired,fontSize:i().number,textPosition:i().arrayOf(i().number),arrowSize:i().number};let u=e=>{let{outerRadius:t}=e,{getSignalKValue:n}=(0,s.yC)(),o=Math.PI/2-n("environment.wind.angleTrueGround")||0,i=(0,s.HQ)(n("environment.wind.speedOverGround"))||0,h=Math.PI/2-n("environment.wind.angleApparent")||0,u=(0,s.HQ)(n("environment.wind.speedApparent"))||0,d=(0,a.useMemo)(()=>new l.Pa4((t+.7)*Math.cos(o),0,-(t+.7)*Math.sin(o)),[t,o]),c=(0,a.useMemo)(()=>new l.Pa4((t+.7)*Math.cos(h),0,-(t+.7)*Math.sin(h)),[t,h]);return(0,r.jsxs)("group",{children:[i>0&&(0,r.jsx)(T,{position:d,rotation:[-Math.PI/2,0,-(Math.PI/2-o)],speed:i,color:"#0000FF",fontSize:M.TRUE_WIND}),u>0&&(0,r.jsx)(T,{position:c,rotation:[-Math.PI/2,0,-(Math.PI/2-h)],speed:u,color:s.gK,fontSize:M.APP_WIND})]})};u.propTypes={outerRadius:i().number.isRequired},t.Z=u},97188:function(e,t,n){n.r(t),n.d(t,{default:function(){return m}});var r=n(57437),a=n(2265),o=n(68328),i=n(44725),s=n(85903),l=n(5550),h=n(11909),M=n(53082),T=n(95723),u=n(72079);let d={MOBILE_TEMPLATE:{COLOR:"yellow",WIDTH_FACTOR:.8,LENGTH_FACTOR:2.5,MAX_LENGTH_MULTIPLIER:3.5,CURVATURE_SENSITIVITY:{RUDDER:1.5,WIND:.25,CURRENT:.3,LEEWAY:.15,DRIFT:.1}},NEUTRAL_TEMPLATE:{COLOR:"blue",WIDTH_FACTOR:.7,LENGTH_FACTOR:.9},ANTICOLLISION_TEMPLATE:{COLOR:"red",WIDTH_FACTOR:1.5,LENGTH_FACTOR:.8}};var c=e=>{let{rudderAngle:t=0,sog:n=5,boatWidth:o=2,windSpeed:i=0,windDirection:s=0,currentSpeed:l=0,currentDirection:h=0,leewayAngle:M=0,driftFactor:T=0,maxCurvePoints:c=50}=e,f=(0,a.useRef)(),E=(0,a.useRef)(),I=(0,a.useRef)(),p=(0,a.useCallback)(()=>{let e=e=>u.M8C.degToRad(e),t=e(s),n=e(M),r=Math.cos(t+n)*i*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.WIND,a=Math.sin(t+n)*i*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.WIND,o=e(h),c=Math.cos(o)*l*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.CURRENT,f=Math.sin(o)*l*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.CURRENT;return{x:(r+c)*(1+T*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.DRIFT),z:(a+f)*(1+T*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.DRIFT)}},[i,s,l,h,M,T]),R=(0,a.useCallback)(()=>{let e=o*d.MOBILE_TEMPLATE.MAX_LENGTH_MULTIPLIER,n=Math.min(2*o*d.MOBILE_TEMPLATE.LENGTH_FACTOR,e),r=[],a=1.5*p().x;if(.1>Math.abs(t)){let e=.5*a,t=Math.max(o/Math.tan(u.M8C.degToRad(5+Math.abs(e))),.5*o),i=n/t,s=new u.FM8(e>0?t:-t,0),l=e>0?Math.PI:0;for(let n=0;n<=c;n++){let a=l+n/c*(e>0?i:-i),o=s.x+t*Math.cos(a),h=s.y+t*Math.sin(a);r.push(new u.Pa4(o,0,h))}}else{let e=u.M8C.clamp(1.2*Math.abs(t)+a,0,85),i=o/Math.tan(u.M8C.degToRad(e*d.MOBILE_TEMPLATE.CURVATURE_SENSITIVITY.RUDDER)),s=u.M8C.clamp(n/i,0,1.25*Math.PI);if(t>0){let e=new u.FM8(i,0),t=Math.PI;for(let n=0;n<=c;n++){let a=n/c,o=u.M8C.lerp(t,t+s,a),l=e.x+i*Math.cos(o),h=e.y+i*Math.sin(o);r.push(new u.Pa4(l,0,h))}}else{let e=new u.FM8(-i,0);for(let t=0;t<=c;t++){let n=t/c,a=u.M8C.lerp(0,0-s,n),o=e.x+i*Math.cos(a),l=e.y+i*Math.sin(a);r.push(new u.Pa4(o,0,l))}}}let i=r.map((e,t)=>{let n;(n=0===t?r[1].clone().sub(e):e.clone().sub(r[t-1])).normalize();let a=new u.Pa4(-n.z,0,n.x),i=o/1.8;return{left:e.clone().add(a.multiplyScalar(i)),right:e.clone().sub(a.multiplyScalar(i))}});return[...i.map(e=>e.left),i[i.length-1].right,...i.reverse().map(e=>e.right)]},[o,t,c,p]),m=(0,a.useCallback)(e=>{if("MOBILE_TEMPLATE"===e)return R();let t=d[e],n=2*o*t.LENGTH_FACTOR,r=o*t.WIDTH_FACTOR,a=[],i=Math.floor(c/4);for(let e=0;e<=i;e++){let t=e/i;a.push(new u.Pa4(-r/2,0,-n*t))}a.push(new u.Pa4(r/2,0,-n));for(let e=i;e>=0;e--){let t=e/i;a.push(new u.Pa4(r/2,0,-n*t))}return a},[o,c,R]);return(0,a.useEffect)(()=>{f.current&&E.current&&I.current&&(f.current.geometry.setFromPoints(m("MOBILE_TEMPLATE")),E.current.geometry.setFromPoints(m("NEUTRAL_TEMPLATE")),I.current.geometry.setFromPoints(m("ANTICOLLISION_TEMPLATE")))},[m]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("line",{ref:f,children:[(0,r.jsx)("bufferGeometry",{}),(0,r.jsx)("lineBasicMaterial",{color:d.MOBILE_TEMPLATE.COLOR,linewidth:2})]}),(0,r.jsxs)("line",{ref:E,children:[(0,r.jsx)("bufferGeometry",{}),(0,r.jsx)("lineBasicMaterial",{color:d.NEUTRAL_TEMPLATE.COLOR,linewidth:2})]}),(0,r.jsxs)("line",{ref:I,children:[(0,r.jsx)("bufferGeometry",{}),(0,r.jsx)("lineBasicMaterial",{color:d.ANTICOLLISION_TEMPLATE.COLOR,linewidth:2})]})]})},f=n(40718),E=n.n(f),I=n(45476);let p=e=>{let{position:t,rotation:n,speed:a,color:o="#ffffff",fontSize:i=.5,textPosition:s=[0,.8,0],arrowSize:l=1}=e;return(0,r.jsxs)("group",{position:t,rotation:n,children:[(0,r.jsx)(I.x,{characters:"0123456789.",color:o,fontSize:i*l,position:s,font:"fonts/Roboto-Bold.ttf",anchorX:"center",anchorY:"middle",children:a.toFixed(1)}),(0,r.jsxs)("mesh",{children:[(0,r.jsx)("shapeGeometry",{args:[new u.bnF([new u.FM8(0,0),new u.FM8(.5*l*Math.cos(5*Math.PI/6),.5*l*Math.sin(5*Math.PI/6)),new u.FM8(0,-.577*l),new u.FM8(-.5*l*Math.cos(5*Math.PI/6),.5*l*Math.sin(5*Math.PI/6)),new u.FM8(0,0)])]}),(0,r.jsx)("meshStandardMaterial",{color:o,side:u.ehD})]})]})};p.propTypes={position:E().arrayOf(E().number),rotation:E().arrayOf(E().number),speed:E().number.isRequired,color:E().string,fontSize:E().number,textPosition:E().arrayOf(E().number),arrowSize:E().number},p.defaultProps={position:[0,0,0],rotation:[0,0,0],color:"#ffffff",fontSize:.5,textPosition:[0,.8,0],arrowSize:1};let R=e=>{let{outerRadius:t}=e,{getSignalKValue:n}=(0,M.yC)(),o=n("environment.current")||{setTrue:0,drift:0},i=(0,a.useMemo)(()=>{let e=o.setTrue||0;return[(t+.7)*Math.cos(e),0,-(t+.7)*Math.sin(e)]},[t,o.setTrue]);return!o.drift||o.drift<=0?null:(0,r.jsx)("group",{children:(0,r.jsx)(p,{position:i,rotation:[-Math.PI/2,0,-(Math.PI/2-(o.setTrue||0))],speed:o.drift,color:M.FV,arrowSize:1.2})})};R.propTypes={outerRadius:E().number.isRequired};var m=e=>{let{onUpdateInfoPanel:t}=e,n=(0,a.useRef)(),{getSignalKValue:u}=(0,M.yC)(),d=u("steering.rudderAngle")||0,f=u("navigation.speedOverGround")||0,E=u("environment.wind.angleApparent")||0,I=(0,M.HQ)(u("environment.wind.speedApparent"))||0,p=u("environment.current")||{setTrue:0,drift:0};return(0,r.jsxs)(a.Suspense,{fallback:(0,r.jsx)(o.V,{center:!0,children:"Loading..."}),children:[(0,r.jsx)(i.c,{makeDefault:!0,fov:60,near:1,far:1e3,position:[0,1,10]}),(0,r.jsx)(s.z,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4}),(0,r.jsx)(l.qA,{files:"./assets/ocearo_env.hdr",background:!1,intensity:.8}),(0,r.jsx)("ambientLight",{intensity:.6}),(0,r.jsx)("spotLight",{position:[15,30,20],intensity:1.8,angle:Math.PI/6,penumbra:.5,castShadow:!0,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,"shadow-camera-near":.5,"shadow-camera-far":50,"shadow-bias":-.0001}),(0,r.jsx)("directionalLight",{position:[-10,20,10],intensity:1.5,castShadow:!0,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,"shadow-camera-near":.5,"shadow-camera-far":50,"shadow-bias":-.0001,color:"#ffd1a6"}),(0,r.jsx)("pointLight",{position:[-10,10,-10],intensity:.7}),(0,r.jsxs)("group",{position:[0,-3,0],children:[(0,r.jsx)(h.Z,{position:[0,0,.7],scale:[.5,.5,.5],ref:n,showSail:!1,onUpdateInfoPanel:t}),(0,r.jsx)(T.Z,{outerRadius:5}),(0,r.jsx)(R,{outerRadius:5}),(0,r.jsx)("group",{position:[0,0,-5],children:(0,r.jsx)(c,{rudderAngle:d,sog:f,windSpeed:I,windDirection:E,currentSpeed:p.drift,currentDirection:p.setTrue,boatWidth:2,leewayAngle:Math.min(Math.sin(Math.abs(E*Math.PI/180))*I*.02,10),driftFactor:f<.1?0:Math.min(p.drift/f,1),maxCurvePoints:100})})]})]})}}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[250],{58181:function(e,t,i){let n,o;i.d(t,{x:function(){return B}});var r=i(1119),a=i(2265),s=i(72079),l=i(21276);let c=new s.ZzF,u=new s.Pa4;class d extends s.L5s{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new s.a$l([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new s.a$l([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,i=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),i.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let i=new s.$TI(t,6,1);return this.setAttribute("instanceStart",new s.kB5(i,3,0)),this.setAttribute("instanceEnd",new s.kB5(i,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));let n=new s.$TI(i,2*t,1);return this.setAttribute("instanceColorStart",new s.kB5(n,t,0)),this.setAttribute("instanceColorEnd",new s.kB5(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new s.Uk6(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new s.ZzF);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),c.setFromBufferAttribute(t),this.boundingBox.union(c))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new s.aLr),null===this.boundingBox&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){let i=this.boundingSphere.center;this.boundingBox.getCenter(i);let n=0;for(let o=0,r=e.count;o<r;o++)u.fromBufferAttribute(e,o),n=Math.max(n,i.distanceToSquared(u)),u.fromBufferAttribute(t,o),n=Math.max(n,i.distanceToSquared(u));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}var f=i(51448),m=i(49074);class p extends s.jyz{constructor(e){super({type:"LineMaterial",uniforms:s.rDY.clone(s.rDY.merge([f.UniformsLib.common,f.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new s.FM8(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
|
|
2
2
|
#include <common>
|
|
3
3
|
#include <fog_pars_vertex>
|
|
4
4
|
#include <logdepthbuf_pars_vertex>
|
|
@@ -406,7 +406,160 @@
|
|
|
406
406
|
#include <premultiplied_alpha_fragment>
|
|
407
407
|
|
|
408
408
|
}
|
|
409
|
-
`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let v=m.i>=125?"uv1":"uv2",h=new s.Ltg,g=new s.Pa4,y=new s.Pa4,
|
|
409
|
+
`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let v=m.i>=125?"uv1":"uv2",h=new s.Ltg,g=new s.Pa4,y=new s.Pa4,x=new s.Ltg,w=new s.Ltg,S=new s.Ltg,b=new s.Pa4,E=new s.yGw,_=new s.Zzh,L=new s.Pa4,M=new s.ZzF,C=new s.aLr,z=new s.Ltg;function P(e,t,i){return z.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),z.multiplyScalar(1/z.w),z.x=o/i.width,z.y=o/i.height,z.applyMatrix4(e.projectionMatrixInverse),z.multiplyScalar(1/z.w),Math.abs(Math.max(z.x,z.y))}class A extends s.Kj0{constructor(e=new d,t=new p({color:16777215*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,i=e.attributes.instanceEnd,n=new Float32Array(2*t.count);for(let e=0,o=0,r=t.count;e<r;e++,o+=2)g.fromBufferAttribute(t,e),y.fromBufferAttribute(i,e),n[o]=0===o?0:n[o-1],n[o+1]=n[o]+g.distanceTo(y);let o=new s.$TI(n,2,1);return e.setAttribute("instanceDistanceStart",new s.kB5(o,1,0)),e.setAttribute("instanceDistanceEnd",new s.kB5(o,1,1)),this}raycast(e,t){let i,r;let a=this.material.worldUnits,l=e.camera;null!==l||a||console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let c=void 0!==e.params.Line2&&e.params.Line2.threshold||0;n=e.ray;let u=this.matrixWorld,d=this.geometry,f=this.material;if(o=f.linewidth+c,null===d.boundingSphere&&d.computeBoundingSphere(),C.copy(d.boundingSphere).applyMatrix4(u),a)i=.5*o;else{let e=Math.max(l.near,C.distanceToPoint(n.origin));i=P(l,e,f.resolution)}if(C.radius+=i,!1!==n.intersectsSphere(C)){if(null===d.boundingBox&&d.computeBoundingBox(),M.copy(d.boundingBox).applyMatrix4(u),a)r=.5*o;else{let e=Math.max(l.near,M.distanceToPoint(n.origin));r=P(l,e,f.resolution)}M.expandByScalar(r),!1!==n.intersectsBox(M)&&(a?function(e,t){let i=e.matrixWorld,r=e.geometry,a=r.attributes.instanceStart,l=r.attributes.instanceEnd,c=Math.min(r.instanceCount,a.count);for(let r=0;r<c;r++){_.start.fromBufferAttribute(a,r),_.end.fromBufferAttribute(l,r),_.applyMatrix4(i);let c=new s.Pa4,u=new s.Pa4;n.distanceSqToSegment(_.start,_.end,u,c),u.distanceTo(c)<.5*o&&t.push({point:u,pointOnLine:c,distance:n.origin.distanceTo(u),object:e,face:null,faceIndex:r,uv:null,[v]:null})}}(this,t):function(e,t,i){let r=t.projectionMatrix,a=e.material.resolution,l=e.matrixWorld,c=e.geometry,u=c.attributes.instanceStart,d=c.attributes.instanceEnd,f=Math.min(c.instanceCount,u.count),m=-t.near;n.at(1,S),S.w=1,S.applyMatrix4(t.matrixWorldInverse),S.applyMatrix4(r),S.multiplyScalar(1/S.w),S.x*=a.x/2,S.y*=a.y/2,S.z=0,b.copy(S),E.multiplyMatrices(t.matrixWorldInverse,l);for(let t=0;t<f;t++){if(x.fromBufferAttribute(u,t),w.fromBufferAttribute(d,t),x.w=1,w.w=1,x.applyMatrix4(E),w.applyMatrix4(E),x.z>m&&w.z>m)continue;if(x.z>m){let e=x.z-w.z,t=(x.z-m)/e;x.lerp(w,t)}else if(w.z>m){let e=w.z-x.z,t=(w.z-m)/e;w.lerp(x,t)}x.applyMatrix4(r),w.applyMatrix4(r),x.multiplyScalar(1/x.w),w.multiplyScalar(1/w.w),x.x*=a.x/2,x.y*=a.y/2,w.x*=a.x/2,w.y*=a.y/2,_.start.copy(x),_.start.z=0,_.end.copy(w),_.end.z=0;let c=_.closestPointToPointParameter(b,!0);_.at(c,L);let f=s.M8C.lerp(x.z,w.z,c),p=f>=-1&&f<=1,h=b.distanceTo(L)<.5*o;if(p&&h){_.start.fromBufferAttribute(u,t),_.end.fromBufferAttribute(d,t),_.start.applyMatrix4(l),_.end.applyMatrix4(l);let o=new s.Pa4,r=new s.Pa4;n.distanceSqToSegment(_.start,_.end,r,o),i.push({point:r,pointOnLine:o,distance:n.origin.distanceTo(r),object:e,face:null,faceIndex:t,uv:null,[v]:null})}}}(this,l,t))}}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(h),this.material.uniforms.resolution.value.set(h.z,h.w))}}class D extends d{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,i=new Float32Array(2*t);for(let n=0;n<t;n+=3)i[2*n]=e[n],i[2*n+1]=e[n+1],i[2*n+2]=e[n+2],i[2*n+3]=e[n+3],i[2*n+4]=e[n+4],i[2*n+5]=e[n+5];return super.setPositions(i),this}setColors(e,t=3){let i=e.length-t,n=new Float32Array(2*i);if(3===t)for(let o=0;o<i;o+=t)n[2*o]=e[o],n[2*o+1]=e[o+1],n[2*o+2]=e[o+2],n[2*o+3]=e[o+3],n[2*o+4]=e[o+4],n[2*o+5]=e[o+5];else for(let o=0;o<i;o+=t)n[2*o]=e[o],n[2*o+1]=e[o+1],n[2*o+2]=e[o+2],n[2*o+3]=e[o+3],n[2*o+4]=e[o+4],n[2*o+5]=e[o+5],n[2*o+6]=e[o+6],n[2*o+7]=e[o+7];return super.setColors(n,t),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class U extends A{constructor(e=new D,t=new p({color:16777215*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}let B=a.forwardRef(function({points:e,color:t=16777215,vertexColors:i,linewidth:n,lineWidth:o,segments:c,dashed:u,...f},m){var v,h;let g=(0,l.D)(e=>e.size),y=a.useMemo(()=>c?new A:new U,[c]),[x]=a.useState(()=>new p),w=(null==i||null==(v=i[0])?void 0:v.length)===4?4:3,S=a.useMemo(()=>{let n=c?new d:new D,o=e.map(e=>{let t=Array.isArray(e);return e instanceof s.Pa4||e instanceof s.Ltg?[e.x,e.y,e.z]:e instanceof s.FM8?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e});if(n.setPositions(o.flat()),i){t=16777215;let e=i.map(e=>e instanceof s.Ilk?e.toArray():e);n.setColors(e.flat(),w)}return n},[e,c,i,w]);return a.useLayoutEffect(()=>{y.computeLineDistances()},[e,y]),a.useLayoutEffect(()=>{u?x.defines.USE_DASH="":delete x.defines.USE_DASH,x.needsUpdate=!0},[u,x]),a.useEffect(()=>()=>{S.dispose(),x.dispose()},[S]),a.createElement("primitive",(0,r.Z)({object:y,ref:m},f),a.createElement("primitive",{object:S,attach:"geometry"}),a.createElement("primitive",(0,r.Z)({object:x,attach:"material",color:t,vertexColors:!!i,resolution:[g.width,g.height],linewidth:null!==(h=null!=n?n:o)&&void 0!==h?h:1,dashed:u,transparent:4===w},f)))})},79257:function(e,t,i){i.d(t,{mE:function(){return s}});var n=i(2265),o=i(72079),r=i(21276);let a=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function s(e,t){let i=(0,r.D)(e=>e.gl),s=(0,r.H)(o.dpR,a(e)?Object.values(e):e);return(0,n.useLayoutEffect)(()=>{null==t||t(s)},[t]),(0,n.useEffect)(()=>{if("initTexture"in i){let e=[];Array.isArray(s)?e=s:s instanceof o.xEZ?e=[s]:a(s)&&(e=Object.values(s)),e.forEach(e=>{e instanceof o.xEZ&&i.initTexture(e)})}},[i,s]),(0,n.useMemo)(()=>{if(!a(e))return s;{let t={},i=0;for(let n in e)t[n]=s[i++];return t}},[e,s])}s.preload=e=>r.H.preload(o.dpR,e),s.clear=e=>r.H.clear(o.dpR,e)},88345:function(e,t,i){i.d(t,{g:function(){return o}});var n=i(72079);function o(e,t,i,o){let r=class extends n.jyz{constructor(r={}){let a=Object.entries(e);super({uniforms:a.reduce((e,[t,i])=>{let o=n.rDY.clone({[t]:{value:i}});return{...e,...o}},{}),vertexShader:t,fragmentShader:i}),this.key="",a.forEach(([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t})),Object.assign(this,r),o&&o(this)}};return r.key=n.M8C.generateUUID(),r}},1:function(e,t,i){i.d(t,{FM:function(){return s},aL:function(){return a}});var n=i(1119),o=i(2265);function r(e,t){let i=e+"Geometry";return o.forwardRef(({args:e,children:r,...a},s)=>{let l=o.useRef(null);return o.useImperativeHandle(s,()=>l.current),o.useLayoutEffect(()=>void(null==t||t(l.current))),o.createElement("mesh",(0,n.Z)({ref:l},a),o.createElement(i,{attach:"geometry",args:e}),r)})}let a=r("sphere"),s=r("ring")},33866:function(e,t,i){i.d(t,{q:function(){return o}});var n=i(72079);class o extends n.Kj0{constructor(){let e=o.SkyShader;super(new n.DvJ(1,1,1),new n.jyz({name:e.name,uniforms:n.rDY.clone(e.uniforms),vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,side:n._Li,depthWrite:!1})),this.isSky=!0}}o.SkyShader={name:"SkyShader",uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new n.Pa4},up:{value:new n.Pa4(0,1,0)}},vertexShader:`
|
|
410
|
+
uniform vec3 sunPosition;
|
|
411
|
+
uniform float rayleigh;
|
|
412
|
+
uniform float turbidity;
|
|
413
|
+
uniform float mieCoefficient;
|
|
414
|
+
uniform vec3 up;
|
|
415
|
+
|
|
416
|
+
varying vec3 vWorldPosition;
|
|
417
|
+
varying vec3 vSunDirection;
|
|
418
|
+
varying float vSunfade;
|
|
419
|
+
varying vec3 vBetaR;
|
|
420
|
+
varying vec3 vBetaM;
|
|
421
|
+
varying float vSunE;
|
|
422
|
+
|
|
423
|
+
// constants for atmospheric scattering
|
|
424
|
+
const float e = 2.71828182845904523536028747135266249775724709369995957;
|
|
425
|
+
const float pi = 3.141592653589793238462643383279502884197169;
|
|
426
|
+
|
|
427
|
+
// wavelength of used primaries, according to preetham
|
|
428
|
+
const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );
|
|
429
|
+
// this pre-calculation replaces older TotalRayleigh(vec3 lambda) function:
|
|
430
|
+
// (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))
|
|
431
|
+
const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );
|
|
432
|
+
|
|
433
|
+
// mie stuff
|
|
434
|
+
// K coefficient for the primaries
|
|
435
|
+
const float v = 4.0;
|
|
436
|
+
const vec3 K = vec3( 0.686, 0.678, 0.666 );
|
|
437
|
+
// MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K
|
|
438
|
+
const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );
|
|
439
|
+
|
|
440
|
+
// earth shadow hack
|
|
441
|
+
// cutoffAngle = pi / 1.95;
|
|
442
|
+
const float cutoffAngle = 1.6110731556870734;
|
|
443
|
+
const float steepness = 1.5;
|
|
444
|
+
const float EE = 1000.0;
|
|
445
|
+
|
|
446
|
+
float sunIntensity( float zenithAngleCos ) {
|
|
447
|
+
zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );
|
|
448
|
+
return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
vec3 totalMie( float T ) {
|
|
452
|
+
float c = ( 0.2 * T ) * 10E-18;
|
|
453
|
+
return 0.434 * c * MieConst;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
void main() {
|
|
457
|
+
|
|
458
|
+
vec4 worldPosition = modelMatrix * vec4( position, 1.0 );
|
|
459
|
+
vWorldPosition = worldPosition.xyz;
|
|
460
|
+
|
|
461
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
462
|
+
gl_Position.z = gl_Position.w; // set z to camera.far
|
|
463
|
+
|
|
464
|
+
vSunDirection = normalize( sunPosition );
|
|
465
|
+
|
|
466
|
+
vSunE = sunIntensity( dot( vSunDirection, up ) );
|
|
467
|
+
|
|
468
|
+
vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );
|
|
469
|
+
|
|
470
|
+
float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );
|
|
471
|
+
|
|
472
|
+
// extinction (absorption + out scattering)
|
|
473
|
+
// rayleigh coefficients
|
|
474
|
+
vBetaR = totalRayleigh * rayleighCoefficient;
|
|
475
|
+
|
|
476
|
+
// mie coefficients
|
|
477
|
+
vBetaM = totalMie( turbidity ) * mieCoefficient;
|
|
478
|
+
|
|
479
|
+
}`,fragmentShader:`
|
|
480
|
+
varying vec3 vWorldPosition;
|
|
481
|
+
varying vec3 vSunDirection;
|
|
482
|
+
varying float vSunfade;
|
|
483
|
+
varying vec3 vBetaR;
|
|
484
|
+
varying vec3 vBetaM;
|
|
485
|
+
varying float vSunE;
|
|
486
|
+
|
|
487
|
+
uniform float mieDirectionalG;
|
|
488
|
+
uniform vec3 up;
|
|
489
|
+
|
|
490
|
+
// constants for atmospheric scattering
|
|
491
|
+
const float pi = 3.141592653589793238462643383279502884197169;
|
|
492
|
+
|
|
493
|
+
const float n = 1.0003; // refractive index of air
|
|
494
|
+
const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)
|
|
495
|
+
|
|
496
|
+
// optical length at zenith for molecules
|
|
497
|
+
const float rayleighZenithLength = 8.4E3;
|
|
498
|
+
const float mieZenithLength = 1.25E3;
|
|
499
|
+
// 66 arc seconds -> degrees, and the cosine of that
|
|
500
|
+
const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;
|
|
501
|
+
|
|
502
|
+
// 3.0 / ( 16.0 * pi )
|
|
503
|
+
const float THREE_OVER_SIXTEENPI = 0.05968310365946075;
|
|
504
|
+
// 1.0 / ( 4.0 * pi )
|
|
505
|
+
const float ONE_OVER_FOURPI = 0.07957747154594767;
|
|
506
|
+
|
|
507
|
+
float rayleighPhase( float cosTheta ) {
|
|
508
|
+
return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
float hgPhase( float cosTheta, float g ) {
|
|
512
|
+
float g2 = pow( g, 2.0 );
|
|
513
|
+
float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );
|
|
514
|
+
return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
void main() {
|
|
518
|
+
|
|
519
|
+
vec3 direction = normalize( vWorldPosition - cameraPosition );
|
|
520
|
+
|
|
521
|
+
// optical length
|
|
522
|
+
// cutoff angle at 90 to avoid singularity in next formula.
|
|
523
|
+
float zenithAngle = acos( max( 0.0, dot( up, direction ) ) );
|
|
524
|
+
float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );
|
|
525
|
+
float sR = rayleighZenithLength * inverse;
|
|
526
|
+
float sM = mieZenithLength * inverse;
|
|
527
|
+
|
|
528
|
+
// combined extinction factor
|
|
529
|
+
vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );
|
|
530
|
+
|
|
531
|
+
// in scattering
|
|
532
|
+
float cosTheta = dot( direction, vSunDirection );
|
|
533
|
+
|
|
534
|
+
float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );
|
|
535
|
+
vec3 betaRTheta = vBetaR * rPhase;
|
|
536
|
+
|
|
537
|
+
float mPhase = hgPhase( cosTheta, mieDirectionalG );
|
|
538
|
+
vec3 betaMTheta = vBetaM * mPhase;
|
|
539
|
+
|
|
540
|
+
vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );
|
|
541
|
+
Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );
|
|
542
|
+
|
|
543
|
+
// nightsky
|
|
544
|
+
float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]
|
|
545
|
+
float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]
|
|
546
|
+
vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );
|
|
547
|
+
vec3 L0 = vec3( 0.1 ) * Fex;
|
|
548
|
+
|
|
549
|
+
// composition + solar disc
|
|
550
|
+
float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );
|
|
551
|
+
L0 += ( vSunE * 19000.0 * Fex ) * sundisk;
|
|
552
|
+
|
|
553
|
+
vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );
|
|
554
|
+
|
|
555
|
+
vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );
|
|
556
|
+
|
|
557
|
+
gl_FragColor = vec4( retColor, 1.0 );
|
|
558
|
+
|
|
559
|
+
#include <tonemapping_fragment>
|
|
560
|
+
#include <colorspace_fragment>
|
|
561
|
+
|
|
562
|
+
}`}},54752:function(e,t,i){i.d(t,{B:function(){return r}});var n=i(72079),o=i(51448);class r extends n.Kj0{constructor(e,t={}){super(e),this.isWater=!0;let i=this,r=void 0!==t.textureWidth?t.textureWidth:512,a=void 0!==t.textureHeight?t.textureHeight:512,s=void 0!==t.clipBias?t.clipBias:0,l=void 0!==t.alpha?t.alpha:1,c=void 0!==t.time?t.time:0,u=void 0!==t.waterNormals?t.waterNormals:null,d=void 0!==t.sunDirection?t.sunDirection:new n.Pa4(.70707,.70707,0),f=new n.Ilk(void 0!==t.sunColor?t.sunColor:16777215),m=new n.Ilk(void 0!==t.waterColor?t.waterColor:8355711),p=void 0!==t.eye?t.eye:new n.Pa4(0,0,0),v=void 0!==t.distortionScale?t.distortionScale:20,h=void 0!==t.side?t.side:n.Wl3,g=void 0!==t.fog&&t.fog,y=new n.JOQ,x=new n.Pa4,w=new n.Pa4,S=new n.Pa4,b=new n.yGw,E=new n.Pa4(0,0,-1),_=new n.Ltg,L=new n.Pa4,M=new n.Pa4,C=new n.Ltg,z=new n.yGw,P=new n.cPb,A=new n.dd2(r,a),D={name:"MirrorShader",uniforms:n.rDY.merge([o.UniformsLib.fog,o.UniformsLib.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new n.yGw},sunColor:{value:new n.Ilk(8355711)},sunDirection:{value:new n.Pa4(.70707,.70707,0)},eye:{value:new n.Pa4},waterColor:{value:new n.Ilk(5592405)}}]),vertexShader:`
|
|
410
563
|
uniform mat4 textureMatrix;
|
|
411
564
|
uniform float time;
|
|
412
565
|
|
|
@@ -502,4 +655,4 @@
|
|
|
502
655
|
#include <tonemapping_fragment>
|
|
503
656
|
#include <colorspace_fragment>
|
|
504
657
|
#include <fog_fragment>
|
|
505
|
-
}`},
|
|
658
|
+
}`},U=new n.jyz({name:D.name,uniforms:n.rDY.clone(D.uniforms),vertexShader:D.vertexShader,fragmentShader:D.fragmentShader,lights:!0,side:h,fog:g});U.uniforms.mirrorSampler.value=A.texture,U.uniforms.textureMatrix.value=z,U.uniforms.alpha.value=l,U.uniforms.time.value=c,U.uniforms.normalSampler.value=u,U.uniforms.sunColor.value=f,U.uniforms.waterColor.value=m,U.uniforms.sunDirection.value=d,U.uniforms.distortionScale.value=v,U.uniforms.eye.value=p,i.material=U,i.onBeforeRender=function(e,t,n){if(w.setFromMatrixPosition(i.matrixWorld),S.setFromMatrixPosition(n.matrixWorld),b.extractRotation(i.matrixWorld),x.set(0,0,1),x.applyMatrix4(b),L.subVectors(w,S),L.dot(x)>0)return;L.reflect(x).negate(),L.add(w),b.extractRotation(n.matrixWorld),E.set(0,0,-1),E.applyMatrix4(b),E.add(S),M.subVectors(w,E),M.reflect(x).negate(),M.add(w),P.position.copy(L),P.up.set(0,1,0),P.up.applyMatrix4(b),P.up.reflect(x),P.lookAt(M),P.far=n.far,P.updateMatrixWorld(),P.projectionMatrix.copy(n.projectionMatrix),z.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),z.multiply(P.projectionMatrix),z.multiply(P.matrixWorldInverse),y.setFromNormalAndCoplanarPoint(x,w),y.applyMatrix4(P.matrixWorldInverse),_.set(y.normal.x,y.normal.y,y.normal.z,y.constant);let o=P.projectionMatrix;C.x=(Math.sign(_.x)+o.elements[8])/o.elements[0],C.y=(Math.sign(_.y)+o.elements[9])/o.elements[5],C.z=-1,C.w=(1+o.elements[10])/o.elements[14],_.multiplyScalar(2/_.dot(C)),o.elements[2]=_.x,o.elements[6]=_.y,o.elements[10]=_.z+1-s,o.elements[14]=_.w,p.setFromMatrixPosition(n.matrixWorld);let r=e.getRenderTarget(),a=e.xr.enabled,l=e.shadowMap.autoUpdate;i.visible=!1,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(A),e.state.buffers.depth.setMask(!0),!1===e.autoClear&&e.clear(),e.render(t,P),i.visible=!0,e.xr.enabled=a,e.shadowMap.autoUpdate=l,e.setRenderTarget(r);let c=n.viewport;void 0!==c&&e.state.viewport(c)}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[412],{6412:function(e,t,a){a.r(t),a.d(t,{default:function(){return A}});var l=a(57437),s=a(21276),o=a(36496),n=a(30166),r=a(53082),c=a(72079),i=a(2265),d=a(51268),u=a(35217),h=()=>{let{nightMode:e,setNightMode:t,states:a,toggleState:s}=(0,r.yC)(),o=(0,i.useRef)(a.autopilot),n=e?"text-oNight":"text-oGray",c=e=>{let t={autopilot:"autopilot"===e,anchorWatch:"anchorWatch"===e,parkingMode:"parkingMode"===e};Object.keys(t).forEach(e=>{s(e,t[e])})};return(0,i.useEffect)(()=>{a.autopilot&&!o.current&&s("showPolar",!0),o.current=a.autopilot},[a.autopilot,s]),(0,l.jsxs)("div",{className:"text-lg",children:[(0,l.jsx)("button",{onClick:()=>c("autopilot"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.lnS,className:a.autopilot?"text-oBlue":n})}),(0,l.jsx)("button",{onClick:()=>c("anchorWatch"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.SJR,className:a.anchorWatch?"text-oYellow":n})}),(0,l.jsx)("button",{onClick:()=>c("parkingMode"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.BQ9,className:a.parkingMode?"text-oGreen":n})}),(0,l.jsx)("button",{onClick:()=>t(!e),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.DBF,className:e?"text-oNight":n})}),(0,l.jsx)("button",{onClick:()=>s("showOcean"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.L02,className:a.showOcean?"text-oBlue":n})}),a.autopilot&&!a.showOcean&&(0,l.jsx)("button",{onClick:()=>s("showPolar"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.GTN,className:a.showPolar?"text-oBlue":n})}),a.autopilot&&(0,l.jsx)("button",{onClick:()=>s("ais"),className:"p-1",children:(0,l.jsx)(d.G,{icon:u.mDh,className:a.ais?"text-oGreen":n})})]})},x=a(15008);let b={BATTERIES:"batteries",TANKS:"tanks"},p={FRESH_WATER:{id:"freshWater",label:"Fresh Water",path:"tanks.freshWater.0.currentLevel",icon:u.Zkk,color:"bg-oBlue"},FUEL:{id:"fuel",label:"Fuel",path:"tanks.fuel.0.currentLevel",icon:u.q16,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",label:"Black Water",path:"tanks.blackWater.0.currentLevel",icon:u.NId,color:"bg-oGray"}},m=e=>{let{level:t,type:a}=e,[s,o]=(0,i.useState)(!1),n=Math.max(0,Math.min(100,t)),{label:r,icon:c,color:u}=p[a];return(0,l.jsxs)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:c})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(u," transition-all duration-300 rounded-sm"),style:{width:"".concat(n,"%")}}),(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(n<=20?"text-oRed animate-pulse":""),children:[n,"%"]})]})]}),s&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:[r,": ",n,"%"]})]})},f=e=>{let{batteryLevel:t,batteryNumber:a,voltage:s}=e,[o,n]=(0,i.useState)(!1),r=Math.max(0,Math.min(100,t)),c=(0,x.d3)(s),h=(0,i.useMemo)(()=>(0,x.z)(r),[r]);return(0,l.jsx)("div",{className:"flex items-center space-x-3 relative",onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,l.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,l.jsx)("span",{className:"text-sm",children:(0,l.jsx)(d.G,{icon:u.BDt})}),(0,l.jsxs)("div",{className:"relative w-8 h-4 bg-oGray rounded-sm border border-oGray flex items-center justify-center",children:[(0,l.jsx)("div",{className:"absolute -right-1 w-1 h-3 bg-oGray rounded-sm"}),(0,l.jsx)("div",{className:"absolute left-0 top-0 h-full ".concat(h," transition-all duration-300 rounded-sm"),style:{width:"".concat(r,"%")}}),c?(0,l.jsx)("span",{className:"relative z-10 text-xs text-white font-bold",children:"⚡︎"}):(0,l.jsxs)("span",{className:"relative z-10 text-xs text-white font-bold ".concat(r<=x.vp.DANGER_THRESHOLD?"text-oRed animate-pulse":""),children:[r,"%"]})]}),o&&(0,l.jsxs)("div",{className:"absolute -left-20 top-6 bg-gray-800 text-white px-2 py-1 rounded text-xs whitespace-nowrap z-20",children:["Voltage: ",null==s?void 0:s.toFixed(1),"V ",c&&"(Charging)"]})]})})};var v=()=>{let{nightMode:e,getSignalKValue:t}=(0,r.yC)(),[a,s]=(0,i.useState)(b.BATTERIES),o=(0,i.useMemo)(()=>{let e=t("electrical.batteries.1.capacity.stateOfCharge"),a=t("electrical.batteries.1.voltage");return[{level:null===e?(0,x.Si)(a):e,number:1,voltage:a}].filter(e=>null!==e.level)},[t]),n=(0,i.useMemo)(()=>({FRESH_WATER:t(p.FRESH_WATER.path)||40,FUEL:t(p.FUEL.path)||75,BLACK_WATER:t(p.BLACK_WATER.path)||20}),[t]),c=()=>{s(e=>e===b.BATTERIES?b.TANKS:b.BATTERIES)},d=a===b.BATTERIES;return(0,l.jsx)("div",{className:"".concat(e?"text-oNight":"text-oGray"," rounded-lg transition-all duration-300 hover:bg-gray-800/10 cursor-pointer"),onClick:c,role:"button",tabIndex:0,"aria-label":"Toggle between ".concat(d?"tanks":"batteries"," display"),onKeyDown:e=>"Enter"===e.key&&c(),children:d?(0,l.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,l.jsx)(f,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,l.jsx)("div",{className:"space-y-2",children:Object.keys(p).map(e=>(0,l.jsx)(m,{type:e,level:n[e]},e))})})};let N=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(250),a.e(909),a.e(890)]).then(a.bind(a,10890)),{loadableGenerated:{webpack:()=>[10890]},ssr:!1}),j=(0,n.default)(()=>Promise.all([a.e(918),a.e(226),a.e(687),a.e(909),a.e(188)]).then(a.bind(a,97188)),{loadableGenerated:{webpack:()=>[97188]},ssr:!1}),g=(0,n.default)(()=>Promise.all([a.e(226),a.e(909),a.e(197)]).then(a.bind(a,62197)),{loadableGenerated:{webpack:()=>[62197]},ssr:!1}),w=(0,n.default)(()=>a.e(751).then(a.bind(a,95751)),{loadableGenerated:{webpack:()=>[95751]}}),E=(0,n.default)(()=>a.e(353).then(a.bind(a,22353)),{loadableGenerated:{webpack:()=>[22353]}}),R=(0,n.default)(()=>a.e(610).then(a.bind(a,48610)),{loadableGenerated:{webpack:()=>[48610]}}),G=(0,n.default)(()=>a.e(59).then(a.bind(a,53059)),{loadableGenerated:{webpack:()=>[53059]}}),k=(0,n.default)(()=>a.e(728).then(a.bind(a,66728)),{loadableGenerated:{webpack:()=>[66728]}}),y=(0,n.default)(()=>a.e(949).then(a.bind(a,76949)),{loadableGenerated:{webpack:()=>[76949]}}),_=()=>{let{gl:e,scene:t}=(0,s.D)();return(0,i.useEffect)(()=>{if(window&&e){window.__OCEARO_RENDERER=e;let t=setInterval(()=>{e&&e.info&&(window.__OCEARO_RENDER_INFO=e.info)},1e3);return()=>{delete window.__OCEARO_RENDERER,delete window.__OCEARO_RENDER_INFO,clearInterval(t)}}},[e,t]),null};var A=()=>{let{states:e}=(0,r.yC)(),[t,a]=(0,i.useState)(null);return(0,l.jsxs)("div",{className:"w-full h-full relative ",children:[(0,l.jsxs)("div",{className:"absolute top-2 left-2 z-10 space-y-0",children:[(0,l.jsx)(h,{}),!e.anchorWatch&&(0,l.jsx)(w,{}),e.anchorWatch&&(0,l.jsx)(G,{})]}),(0,l.jsxs)("div",{className:"absolute top-2 right-2 z-20 flex flex-col items-end",children:[(0,l.jsx)("div",{className:"mb-2",children:(0,l.jsx)(y,{content:t})}),(0,l.jsx)(v,{})]}),(0,l.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(k,{})}),(0,l.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,l.jsx)(R,{})}),!e.anchorWatch&&(0,l.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,l.jsx)(E,{})}),(0,l.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,l.jsxs)(o.Xz,{style:{width:"100%",height:"100%"},shadows:!1,dpr:Math.min(window.devicePixelRatio,1.5),performance:{min:.5},gl:{antialias:!0,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:c.uL9,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,l.jsx)(_,{}),e.parkingMode?(0,l.jsx)(j,{onUpdateInfoPanel:a}):e.anchorWatch?(0,l.jsx)(g,{onUpdateInfoPanel:a}):(0,l.jsx)(N,{onUpdateInfoPanel:a})]})})]})}},15008:function(e,t,a){a.d(t,{Si:function(){return s},d3:function(){return o},vp:function(){return l},z:function(){return n}});let l={WARNING_THRESHOLD:50,DANGER_THRESHOLD:20,CHARGING_THRESHOLD:13.2,MIN_VOLTAGE:10.5,MAX_VOLTAGE:14.4},s=e=>{if(!e||"number"!=typeof e)return 0;if(e>=13)return 100;if(e<=l.MIN_VOLTAGE)return 0;let t=[{voltage:12.85,soc:100},{voltage:12.75,soc:90},{voltage:12.65,soc:80},{voltage:12.55,soc:70},{voltage:12.45,soc:60},{voltage:12.35,soc:50},{voltage:12.25,soc:40},{voltage:12.15,soc:30},{voltage:12.05,soc:20},{voltage:11.95,soc:15},{voltage:11.8,soc:10},{voltage:11.6,soc:5},{voltage:10.5,soc:0}];for(let a=0;a<t.length-1;a++)if(e>=t[a+1].voltage){let l=t[a].voltage,s=t[a+1].voltage,o=t[a].soc,n=t[a+1].soc;return Math.round(n+(e-s)/(l-s)*(o-n))}return 0},o=e=>e>l.CHARGING_THRESHOLD,n=e=>e>l.WARNING_THRESHOLD?"bg-oGreen":e>l.DANGER_THRESHOLD?"bg-oYellow":"bg-oRed"}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{69073:function(e,s,l){l.r(s);var a=l(57437),t=l(2265),n=l(63321);s.default=e=>{var s;let{onSave:l}=e,c=n.Z.getAll(),i=n.Z.getComputedSignalKUrl(),r=n.Z.getBoatsData(),[d,o]=(0,t.useState)(c),[m,x]=(0,t.useState)(!!c.username||!!c.password),[u,h]=(0,t.useState)(!1),[g,b]=(0,t.useState)(null),[p,j]=(0,t.useState)(!1),v=(0,t.useCallback)(e=>{j(JSON.stringify(e)!==JSON.stringify(c))},[c]);(0,t.useEffect)(()=>{(async()=>{let e=n.Z.getAll();o(e),e.selectedBoat&&b(r.find(s=>s.name===e.selectedBoat)||null)})()},[r]);let f=e=>{let s={...d,...e};o(s),v(s);let a={...s};u?m||(a.username="",a.password=""):(a.signalkUrl=i,a.username="",a.password=""),n.Z.saveConfig(a),null==l||l(a),j(!1)};return(0,a.jsxs)("div",{className:"p-4 text-white",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold mb-4",children:"Ocearo Configuration"}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Connection Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:u,onChange:e=>{h(e.target.checked),v(d)}}),"Set SignalK URL",!u&&(0,a.jsxs)("span",{className:"ml-2",children:["(",i,")"]})]})}),u&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"SignalK Server URL:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:d.signalkUrl||"",onChange:e=>f({signalkUrl:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:m,onChange:e=>{x(e.target.checked),v(d)}}),"Use Authentication"]})}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Username:"}),(0,a.jsx)("input",{type:"text",className:"border p-2 w-full text-black rounded",value:d.username||"",onChange:e=>f({username:e.target.value})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Password:"}),(0,a.jsx)("input",{type:"password",className:"border p-2 w-full text-black rounded",value:d.password||"",onChange:e=>f({password:e.target.value})})]})]})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Vessel Settings"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Select Vessel:"}),(0,a.jsxs)("select",{className:"border p-2 w-full text-black rounded",value:d.selectedBoat||"",onChange:e=>{let s=e.target.value;b(r.find(e=>e.name===s)||null),f({selectedBoat:s})},children:[(0,a.jsx)("option",{value:"",children:"-- Select a Vessel --"}),r.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.name))]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block font-medium mb-1",children:"Vessel Color:"}),(0,a.jsx)("input",{type:"color",className:"w-full h-10 rounded",value:d.primaryColor||"#000000",onChange:e=>f({primaryColor:e.target.value})})]}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:d.metallicEffect||!1,onChange:e=>f({metallicEffect:e.target.checked})}),"Enable Metallic Effect"]})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Advanced Settings"}),(0,a.jsx)("div",{children:(0,a.jsxs)("label",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",className:"mr-2",checked:d.debugMode||!1,onChange:e=>f({debugMode:e.target.checked,signalkUrl:i})}),"Debug Mode"]})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{className:"block text-sm font-medium",children:["AIS Length Scaling Factor",(0,a.jsx)("div",{className:"text-xs text-gray-500",children:"Controls the scaling of AIS boats on the map (default: 0.7)"})]}),(0,a.jsx)("input",{type:"number",className:"w-full p-2 border rounded text-black",value:d.aisLengthScalingFactor||.7,step:"0.1",min:"0.1",max:"2.0",onChange:e=>f({aisLengthScalingFactor:parseFloat(e.target.value)})})]}),g&&d.debugMode&&(0,a.jsxs)("div",{className:"space-y-2 text-sm text-gray-400",children:[(0,a.jsxs)("div",{children:["3D Model: ",g.modelPath]}),(0,a.jsxs)("div",{children:["Features: ",null===(s=g.capabilities)||void 0===s?void 0:s.join(", ")]})]})]}),(0,a.jsxs)("div",{className:"flex space-x-4 pt-4",children:[(0,a.jsx)("button",{onClick:()=>{let e={...d};u?m||(e.username="",e.password=""):(e.signalkUrl=i,e.username="",e.password=""),n.Z.saveConfig(e),null==l||l(e),j(!1)},disabled:!p,className:"px-4 py-2 rounded ".concat(p?"bg-oBlue text-white hover:bg-blue-600":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:p?"Save Changes":"Saved"}),(0,a.jsx)("button",{onClick:()=>{let e=n.Z.getDefaultConfig();o(e),x(!1),h(!1),n.Z.saveConfig(e),j(!1)},className:"bg-oRed text-white px-4 py-2 rounded hover:bg-red-600",children:"Reset Configuration"})]})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[676],{35217:function(c,l,s){s.d(l,{$v3:function(){return i},BDt:function(){return k},BQ9:function(){return C},DBF:function(){return G},DSs:function(){return q},GTN:function(){return e},HLz:function(){return v},ItS:function(){return p},IyC:function(){return j},Kb6:function(){return _},L02:function(){return d},NBC:function(){return D},NId:function(){return b},RoX:function(){return w},Rpv:function(){return L},S9Y:function(){return R},SJR:function(){return I},TL5:function(){return B},Tr1:function(){return a},Xjp:function(){return N},Zkk:function(){return y},ccn:function(){return r},d8e:function(){return T},dT$:function(){return m},hGM:function(){return M},iGi:function(){return S},jOV:function(){return u},lnS:function(){return g},mDh:function(){return h},q16:function(){return f},szN:function(){return x},tLL:function(){return z},uM9:function(){return n},whq:function(){return o},zvy:function(){return t}});let n={prefix:"fas",iconName:"cloud",icon:[640,512,[9729],"f0c2","M0 336c0 79.5 64.5 144 144 144l368 0c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"]},e={prefix:"fas",iconName:"compass",icon:[512,512,[129517],"f14e","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},i={prefix:"fas",iconName:"memory",icon:[576,512,[],"f538","M64 64C28.7 64 0 92.7 0 128l0 7.4c0 6.8 4.4 12.6 10.1 16.3C23.3 160.3 32 175.1 32 192s-8.7 31.7-21.9 40.3C4.4 236 0 241.8 0 248.6L0 320l576 0 0-71.4c0-6.8-4.4-12.6-10.1-16.3C552.7 223.7 544 208.9 544 192s8.7-31.7 21.9-40.3c5.7-3.7 10.1-9.5 10.1-16.3l0-7.4c0-35.3-28.7-64-64-64L64 64zM576 352L0 352l0 64c0 17.7 14.3 32 32 32l48 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 96 0 0-32c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 48 0c17.7 0 32-14.3 32-32l0-64zM192 160l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 64c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64c0-17.7 14.3-32 32-32s32 14.3 32 32z"]},f={prefix:"fas",iconName:"gas-pump",icon:[512,512,[9981],"f52f","M32 64C32 28.7 60.7 0 96 0L256 0c35.3 0 64 28.7 64 64l0 192 8 0c48.6 0 88 39.4 88 88l0 32c0 13.3 10.7 24 24 24s24-10.7 24-24l0-154c-27.6-7.1-48-32.2-48-62l0-64L384 64c-8.8-8.8-8.8-23.2 0-32s23.2-8.8 32 0l77.3 77.3c12 12 18.7 28.3 18.7 45.3l0 13.5 0 24 0 32 0 152c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-32c0-22.1-17.9-40-40-40l-8 0 0 144c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 512c-17.7 0-32-14.3-32-32s14.3-32 32-32L32 64zM96 80l0 96c0 8.8 7.2 16 16 16l128 0c8.8 0 16-7.2 16-16l0-96c0-8.8-7.2-16-16-16L112 64c-8.8 0-16 7.2-16 16z"]},r={prefix:"fas",iconName:"temperature-half",icon:[320,512,[127777,"temperature-2","thermometer-2","thermometer-half"],"f2c9","M160 64c-26.5 0-48 21.5-48 48l0 164.5c0 17.3-7.1 31.9-15.3 42.5C86.2 332.6 80 349.5 80 368c0 44.2 35.8 80 80 80s80-35.8 80-80c0-18.5-6.2-35.4-16.7-48.9c-8.2-10.6-15.3-25.2-15.3-42.5L208 112c0-26.5-21.5-48-48-48zM48 112C48 50.2 98.1 0 160 0s112 50.1 112 112l0 164.4c0 .1 .1 .3 .2 .6c.2 .6 .8 1.6 1.7 2.8c18.9 24.4 30.1 55 30.1 88.1c0 79.5-64.5 144-144 144S16 447.5 16 368c0-33.2 11.2-63.8 30.1-88.1c.9-1.2 1.5-2.2 1.7-2.8c.1-.3 .2-.5 .2-.6L48 112zM208 368c0 26.5-21.5 48-48 48s-48-21.5-48-48c0-20.9 13.4-38.7 32-45.3L144 208c0-8.8 7.2-16 16-16s16 7.2 16 16l0 114.7c18.6 6.6 32 24.4 32 45.3z"]},o=r,a={prefix:"fas",iconName:"charging-station",icon:[576,512,[],"f5e7","M96 0C60.7 0 32 28.7 32 64l0 384c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l0-144 16 0c22.1 0 40 17.9 40 40l0 32c0 39.8 32.2 72 72 72s72-32.2 72-72l0-123.7c32.5-10.2 56-40.5 56-76.3l0-32c0-8.8-7.2-16-16-16l-16 0 0-48c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-32 0 0-48c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48-16 0c-8.8 0-16 7.2-16 16l0 32c0 35.8 23.5 66.1 56 76.3L472 376c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32c0-48.6-39.4-88-88-88l-16 0 0-192c0-35.3-28.7-64-64-64L96 0zM216.9 82.7c6 4 8.5 11.5 6.3 18.3l-25 74.9 57.8 0c6.7 0 12.7 4.2 15 10.4s.5 13.3-4.6 17.7l-112 96c-5.5 4.7-13.4 5.1-19.3 1.1s-8.5-11.5-6.3-18.3l25-74.9L96 208c-6.7 0-12.7-4.2-15-10.4s-.5-13.3 4.6-17.7l112-96c5.5-4.7 13.4-5.1 19.3-1.1z"]},t={prefix:"fas",iconName:"microchip",icon:[512,512,[],"f2db","M176 24c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c-35.3 0-64 28.7-64 64l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0 0 56-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c0 35.3 28.7 64 64 64l0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40 56 0 0 40c0 13.3 10.7 24 24 24s24-10.7 24-24l0-40c35.3 0 64-28.7 64-64l40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0 0-56 40 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-40 0c0-35.3-28.7-64-64-64l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40-56 0 0-40zM160 128l192 0c17.7 0 32 14.3 32 32l0 192c0 17.7-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32l0-192c0-17.7 14.3-32 32-32zm192 32l-192 0 0 192 192 0 0-192z"]},L={prefix:"fas",iconName:"fire",icon:[448,512,[128293],"f06d","M159.3 5.4c7.8-7.3 19.9-7.2 27.7 .1c27.6 25.9 53.5 53.8 77.7 84c11-14.4 23.5-30.1 37-42.9c7.9-7.4 20.1-7.4 28 .1c34.6 33 63.9 76.6 84.5 118c20.3 40.8 33.8 82.5 33.8 111.9C448 404.2 348.2 512 224 512C98.4 512 0 404.1 0 276.5c0-38.4 17.8-85.3 45.4-131.7C73.3 97.7 112.7 48.6 159.3 5.4zM225.7 416c25.3 0 47.7-7 68.8-21c42.1-29.4 53.4-88.2 28.1-134.4c-4.5-9-16-9.6-22.5-2l-25.2 29.3c-6.6 7.6-18.5 7.4-24.7-.5c-16.5-21-46-58.5-62.8-79.8c-6.3-8-18.3-8.1-24.7-.1c-33.8 42.5-50.8 69.3-50.8 99.4C112 375.4 162.6 416 225.7 416z"]},z={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},u={prefix:"fas",iconName:"snowflake",icon:[448,512,[10052,10054],"f2dc","M224 0c17.7 0 32 14.3 32 32l0 30.1 15-15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-49 49 0 70.3 61.4-35.8 17.7-66.1c3.4-12.8 16.6-20.4 29.4-17s20.4 16.6 17 29.4l-5.2 19.3 23.6-13.8c15.3-8.9 34.9-3.7 43.8 11.5s3.8 34.9-11.5 43.8l-25.3 14.8 21.7 5.8c12.8 3.4 20.4 16.6 17 29.4s-16.6 20.4-29.4 17l-67.7-18.1L287.5 256l60.9 35.5 67.7-18.1c12.8-3.4 26 4.2 29.4 17s-4.2 26-17 29.4l-21.7 5.8 25.3 14.8c15.3 8.9 20.4 28.5 11.5 43.8s-28.5 20.4-43.8 11.5l-23.6-13.8 5.2 19.3c3.4 12.8-4.2 26-17 29.4s-26-4.2-29.4-17l-17.7-66.1L256 311.7l0 70.3 49 49c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-15-15 0 30.1c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-30.1-15 15c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l49-49 0-70.3-61.4 35.8-17.7 66.1c-3.4 12.8-16.6 20.4-29.4 17s-20.4-16.6-17-29.4l5.2-19.3L48.1 395.6c-15.3 8.9-34.9 3.7-43.8-11.5s-3.7-34.9 11.5-43.8l25.3-14.8-21.7-5.8c-12.8-3.4-20.4-16.6-17-29.4s16.6-20.4 29.4-17l67.7 18.1L160.5 256 99.6 220.5 31.9 238.6c-12.8 3.4-26-4.2-29.4-17s4.2-26 17-29.4l21.7-5.8L15.9 171.6C.6 162.7-4.5 143.1 4.4 127.9s28.5-20.4 43.8-11.5l23.6 13.8-5.2-19.3c-3.4-12.8 4.2-26 17-29.4s26 4.2 29.4 17l17.7 66.1L192 200.3l0-70.3L143 81c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l15 15L192 32c0-17.7 14.3-32 32-32z"]},m={prefix:"fas",iconName:"code",icon:[640,512,[],"f121","M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"]},M={prefix:"fas",iconName:"cube",icon:[512,512,[],"f1b2","M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6l0 242.9c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4L0 134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1 0-188L288 246.6l0 188z"]},C={prefix:"fas",iconName:"square-parking",icon:[448,512,[127359,"parking"],"f540","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM192 256l48 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-48 0 0 64zm48 64l-48 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-64 0-120c0-22.1 17.9-40 40-40l72 0c53 0 96 43 96 96s-43 96-96 96z"]},p={prefix:"fas",iconName:"headphones",icon:[512,512,[127911],"f025","M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6c26.5 0 48 21.5 48 48l0 128c0 26.5-21.5 48-48 48c-44.2 0-80-35.8-80-80l0-16 0-48 0-48C0 146.6 114.6 32 256 32s256 114.6 256 256l0 48 0 48 0 16c0 44.2-35.8 80-80 80c-26.5 0-48-21.5-48-48l0-128c0-26.5 21.5-48 48-48c10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z"]},N={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},x={prefix:"fas",iconName:"table-cells",icon:[512,512,["th"],"f00a","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm88 64l0 64-88 0 0-64 88 0zm56 0l88 0 0 64-88 0 0-64zm240 0l0 64-88 0 0-64 88 0zM64 224l88 0 0 64-88 0 0-64zm232 0l0 64-88 0 0-64 88 0zm64 0l88 0 0 64-88 0 0-64zM152 352l0 64-88 0 0-64 88 0zm56 0l88 0 0 64-88 0 0-64zm240 0l0 64-88 0 0-64 88 0z"]},h={prefix:"fas",iconName:"satellite",icon:[512,512,[128752],"f7bf","M233 7c-9.4-9.4-24.6-9.4-33.9 0l-96 96c-9.4 9.4-9.4 24.6 0 33.9l89.4 89.4-15.5 15.5C152.3 230.4 124.9 224 96 224c-31.7 0-61.5 7.7-87.8 21.2c-9 4.7-10.3 16.7-3.1 23.8L112.7 376.7 96.3 393.1c-2.6-.7-5.4-1.1-8.3-1.1c-17.7 0-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32c0-2.9-.4-5.6-1.1-8.3l16.4-16.4L242.9 506.9c7.2 7.2 19.2 5.9 23.8-3.1C280.3 477.5 288 447.7 288 416c0-28.9-6.4-56.3-17.8-80.9l15.5-15.5L375 409c9.4 9.4 24.6 9.4 33.9 0l96-96c9.4-9.4 9.4-24.6 0-33.9l-89.4-89.4 55-55c12.5-12.5 12.5-32.8 0-45.3l-48-48c-12.5-12.5-32.8-12.5-45.3 0l-55 55L233 7zm159 351l-72.4-72.4 62.1-62.1L454.1 296 392 358.1zM226.3 192.4L153.9 120 216 57.9l72.4 72.4-62.1 62.1z"]},d={prefix:"fas",iconName:"water",icon:[576,512,[],"f773","M269.5 69.9c11.1-7.9 25.9-7.9 37 0C329 85.4 356.5 96 384 96c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 149.7 417 160 384 160c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4C42.8 92.6 61 83.5 75.3 71.6c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 85.2 165.1 96 192 96c27.5 0 55-10.6 77.5-26.1zm37 288C329 373.4 356.5 384 384 384c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 437.7 417 448 384 448c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 373.2 165.1 384 192 384c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0zm0-144C329 229.4 356.5 240 384 240c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 293.7 417 304 384 304c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.5 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 229.2 165.1 240 192 240c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},g={prefix:"fas",iconName:"ship",icon:[576,512,[128674],"f21a","M192 32c0-17.7 14.3-32 32-32L352 0c17.7 0 32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 128 44.4 14.8c23.1 7.7 29.5 37.5 11.5 53.9l-101 92.6c-16.2 9.4-34.7 15.1-50.9 15.1c-19.6 0-40.8-7.7-59.2-20.3c-22.1-15.5-51.6-15.5-73.7 0c-17.1 11.8-38 20.3-59.2 20.3c-16.2 0-34.7-5.7-50.9-15.1l-101-92.6c-18-16.5-11.6-46.2 11.5-53.9L96 240l0-128c0-26.5 21.5-48 48-48l48 0 0-32zM160 218.7l107.8-35.9c13.1-4.4 27.3-4.4 40.5 0L416 218.7l0-90.7-256 0 0 90.7zM306.5 421.9C329 437.4 356.5 448 384 448c26.9 0 55.4-10.8 77.4-26.1c0 0 0 0 0 0c11.9-8.5 28.1-7.8 39.2 1.7c14.4 11.9 32.5 21 50.6 25.2c17.2 4 27.9 21.2 23.9 38.4s-21.2 27.9-38.4 23.9c-24.5-5.7-44.9-16.5-58.2-25C449.5 501.7 417 512 384 512c-31.9 0-60.6-9.9-80.4-18.9c-5.8-2.7-11.1-5.3-15.6-7.7c-4.5 2.4-9.7 5.1-15.6 7.7c-19.8 9-48.5 18.9-80.4 18.9c-33 0-65.5-10.3-94.5-25.8c-13.4 8.4-33.7 19.3-58.2 25c-17.2 4-34.4-6.7-38.4-23.9s6.7-34.4 23.9-38.4c18.1-4.2 36.2-13.3 50.6-25.2c11.1-9.4 27.3-10.1 39.2-1.7c0 0 0 0 0 0C136.7 437.2 165.1 448 192 448c27.5 0 55-10.6 77.5-26.1c11.1-7.9 25.9-7.9 37 0z"]},k={prefix:"fas",iconName:"bolt",icon:[448,512,[9889,"zap"],"f0e7","M349.4 44.6c5.9-13.7 1.5-29.7-10.6-38.5s-28.6-8-39.9 1.8l-256 224c-10 8.8-13.6 22.9-8.9 35.3S50.7 288 64 288l111.5 0L98.6 467.4c-5.9 13.7-1.5 29.7 10.6 38.5s28.6 8 39.9-1.8l256-224c10-8.8 13.6-22.9 8.9-35.3s-16.6-20.7-30-20.7l-111.5 0L349.4 44.6z"]},b={prefix:"fas",iconName:"toilet",icon:[448,512,[128701],"f7d8","M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 148.9c-1.9 1.4-3.8 2.9-5.6 4.4C10.9 214.5 0 232.9 0 256c0 46.9 14.3 84.1 37 112.5c14.2 17.7 31.1 31.3 48.5 41.8L65.6 469.9c-3.3 9.8-1.6 20.5 4.4 28.8s15.7 13.3 26 13.3l256 0c10.3 0 19.9-4.9 26-13.3s7.7-19.1 4.4-28.8l-19.8-59.5c17.4-10.5 34.3-24.1 48.5-41.8c22.7-28.4 37-65.5 37-112.5c0-23.1-10.9-41.5-26.4-54.6c-1.8-1.5-3.7-3-5.6-4.4L416 48l8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM384 256.3c0 1-.3 2.6-3.8 5.6c-4.8 4.1-14 9-29.3 13.4C320.5 284 276.1 288 224 288s-96.5-4-126.9-12.8c-15.3-4.4-24.5-9.3-29.3-13.4c-3.5-3-3.8-4.6-3.8-5.6l0-.3c0 0 0-.1 0-.1c0-1 0-2.5 3.8-5.8c4.8-4.1 14-9 29.3-13.4C127.5 228 171.9 224 224 224s96.5 4 126.9 12.8c15.3 4.4 24.5 9.3 29.3 13.4c3.8 3.2 3.8 4.8 3.8 5.8c0 0 0 .1 0 .1l0 .3zM328.2 384l-.2 .5 0-.5 .2 0zM112 64l32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"]},S={prefix:"fas",iconName:"handshake-angle",icon:[640,512,["hands-helping"],"f4c4","M544 248l0 3.3 69.7-69.7c21.9-21.9 21.9-57.3 0-79.2L535.6 24.4c-21.9-21.9-57.3-21.9-79.2 0L416.3 64.5c-2.7-.3-5.5-.5-8.3-.5L296 64c-37.1 0-67.6 28-71.6 64l-.4 0 0 120c0 22.1 17.9 40 40 40s40-17.9 40-40l0-72c0 0 0-.1 0-.1l0-15.9 16 0 136 0c0 0 0 0 .1 0l7.9 0c44.2 0 80 35.8 80 80l0 8zM336 192l0 56c0 39.8-32.2 72-72 72s-72-32.2-72-72l0-118.6c-35.9 6.2-65.8 32.3-76 68.2L99.5 255.2 26.3 328.4c-21.9 21.9-21.9 57.3 0 79.2l78.1 78.1c21.9 21.9 57.3 21.9 79.2 0l37.7-37.7c.9 0 1.8 .1 2.7 .1l160 0c26.5 0 48-21.5 48-48c0-5.6-1-11-2.7-16l2.7 0c26.5 0 48-21.5 48-48c0-12.8-5-24.4-13.2-33c25.7-5 45.1-27.6 45.2-54.8l0-.4c-.1-30.8-25.1-55.8-56-55.8c0 0 0 0 0 0l-120 0z"]},y={prefix:"fas",iconName:"droplet",icon:[384,512,[128167,"tint"],"f043","M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0l1.8 0c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z"]},v={prefix:"fas",iconName:"gauge-high",icon:[512,512,[62461,"tachometer-alt","tachometer-alt-fast"],"f625","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM256 416c35.3 0 64-28.7 64-64c0-17.4-6.9-33.1-18.1-44.6L366 161.7c5.3-12.1-.2-26.3-12.3-31.6s-26.3 .2-31.6 12.3L257.9 288c-.6 0-1.3 0-1.9 0c-35.3 0-64 28.7-64 64s28.7 64 64 64zM176 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM96 288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm352-32a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},w={prefix:"fas",iconName:"battery-full",icon:[576,512,[128267,"battery","battery-5"],"f240","M464 160c8.8 0 16 7.2 16 16l0 160c0 8.8-7.2 16-16 16L80 352c-8.8 0-16-7.2-16-16l0-160c0-8.8 7.2-16 16-16l384 0zM80 96C35.8 96 0 131.8 0 176L0 336c0 44.2 35.8 80 80 80l384 0c44.2 0 80-35.8 80-80l0-16c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l0-16c0-44.2-35.8-80-80-80L80 96zm368 96L96 192l0 128 352 0 0-128z"]},q={prefix:"fas",iconName:"wind",icon:[512,512,[],"f72e","M288 32c0 17.7 14.3 32 32 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c53 0 96-43 96-96s-43-96-96-96L320 0c-17.7 0-32 14.3-32 32zm64 352c0 17.7 14.3 32 32 32l32 0c53 0 96-43 96-96s-43-96-96-96L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32zM128 512l32 0c53 0 96-43 96-96s-43-96-96-96L32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},B={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},D={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},T={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},_={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},G={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},I={prefix:"fas",iconName:"anchor",icon:[576,512,[9875],"f13d","M320 96a32 32 0 1 1 -64 0 32 32 0 1 1 64 0zm21.1 80C367 158.8 384 129.4 384 96c0-53-43-96-96-96s-96 43-96 96c0 33.4 17 62.8 42.9 80L224 176c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0 0 208-48 0c-53 0-96-43-96-96l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L97 263c-9.4-9.4-24.6-9.4-33.9 0L7 319c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 88.4 71.6 160 160 160l80 0 80 0c88.4 0 160-71.6 160-160l0-6.1 7 7c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-56-56c-9.4-9.4-24.6-9.4-33.9 0l-56 56c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l7-7 0 6.1c0 53-43 96-96 96l-48 0 0-208 32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-10.9 0z"]},R={prefix:"fas",iconName:"cloud-sun",icon:[640,512,[9925],"f6c4","M294.2 1.2c5.1 2.1 8.7 6.7 9.6 12.1l14.1 84.7 84.7 14.1c5.4 .9 10 4.5 12.1 9.6s1.5 10.9-1.6 15.4l-38.5 55c-2.2-.1-4.4-.2-6.7-.2c-23.3 0-45.1 6.2-64 17.1l0-1.1c0-53-43-96-96-96s-96 43-96 96s43 96 96 96c8.1 0 15.9-1 23.4-2.9c-36.6 18.1-63.3 53.1-69.8 94.9l-24.4 17c-4.5 3.2-10.3 3.8-15.4 1.6s-8.7-6.7-9.6-12.1L98.1 317.9 13.4 303.8c-5.4-.9-10-4.5-12.1-9.6s-1.5-10.9 1.6-15.4L52.5 208 2.9 137.2c-3.2-4.5-3.8-10.3-1.6-15.4s6.7-8.7 12.1-9.6L98.1 98.1l14.1-84.7c.9-5.4 4.5-10 9.6-12.1s10.9-1.5 15.4 1.6L208 52.5 278.8 2.9c4.5-3.2 10.3-3.8 15.4-1.6zM144 208a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM639.9 431.9c0 44.2-35.8 80-80 80l-271.9 0c-53 0-96-43-96-96c0-47.6 34.6-87 80-94.6l0-1.3c0-53 43-96 96-96c34.9 0 65.4 18.6 82.2 46.4c13-9.1 28.8-14.4 45.8-14.4c44.2 0 80 35.8 80 80c0 5.9-.6 11.7-1.9 17.2c37.4 6.7 65.8 39.4 65.8 78.7z"]},j={prefix:"fas",iconName:"video",icon:[576,512,["video-camera"],"f03d","M0 128C0 92.7 28.7 64 64 64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2l0 256c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1l0-17.1 0-128 0-17.1 14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"]}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{29927:function(e,n,t){var o={"./default/Scene.jsx":[42967,967],"./optimist/Scene.jsx":[96154,154],"./sailboat/Scene.jsx":[82274,274],"./ship/Scene.jsx":[75221,221],"./windsurf/Scene.jsx":[92975,975]};function a(e){if(!t.o(o,e))return Promise.resolve().then(function(){var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n});var n=o[e],a=n[0];return t.e(n[1]).then(function(){return t(a)})}a.keys=function(){return Object.keys(o)},a.id=29927,e.exports=a},10890:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return $}});var o=t(57437),a=t(2265),r=t(68328),i=t(44725),l=t(85903),s=t(5550),c=t(11909),u=t(21276),d=t(88345),g=t(72079),h=t(53082);let m=(0,d.g)({time:0,speed:1,scale:3,opacity:.5,color:new g.Ilk(7895160),foamColor:new g.Ilk(16777215),waterColor:new g.Ilk(26367),rainbowActive:0},"\n varying vec2 vUv;\n varying float vElevation;\n \n void main() {\n vUv = uv;\n \n // Add subtle vertex displacement for a wavy effect.\n float elevation = sin(position.x * 0.2 + position.y * 0.3) * 0.1;\n vElevation = elevation;\n vec3 newPosition = position + normal * elevation;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0);\n }\n ","\n uniform float time;\n uniform float speed;\n uniform float scale;\n uniform float opacity;\n uniform vec3 color;\n uniform vec3 foamColor;\n uniform vec3 waterColor;\n uniform float rainbowActive; // Controls whether the rainbow effect is applied.\n\n varying vec2 vUv;\n varying float vElevation;\n\n // Standard noise functions.\n vec4 permute(vec4 x) {\n return mod(((x * 34.0) + 1.0) * x, 289.0);\n }\n\n vec2 fade(vec2 t) {\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n }\n\n float cnoise(vec2 P) {\n vec4 Pi = floor(P.xyxy) + vec4(0.0, 0.0, 1.0, 1.0);\n vec4 Pf = fract(P.xyxy) - vec4(0.0, 0.0, 1.0, 1.0);\n Pi = mod(Pi, 289.0);\n vec4 ix = Pi.xzxz;\n vec4 iy = Pi.yyww;\n vec4 fx = Pf.xzxz;\n vec4 fy = Pf.yyww;\n vec4 i = permute(permute(ix) + iy);\n vec4 gx = 2.0 * fract(i * 0.0243902439) - 1.0;\n vec4 gy = abs(gx) - 0.5;\n vec4 tx = floor(gx + 0.5);\n gx = gx - tx;\n vec2 g00 = vec2(gx.x, gy.x);\n vec2 g10 = vec2(gx.y, gy.y);\n vec2 g01 = vec2(gx.z, gy.z);\n vec2 g11 = vec2(gx.w, gy.w);\n vec4 norm = 1.79284291400159 - 0.85373472095314 *\n vec4(dot(g00, g00), dot(g10, g10), dot(g01, g01), dot(g11, g11));\n g00 *= norm.x;\n g10 *= norm.y;\n g01 *= norm.z;\n g11 *= norm.w;\n float n00 = dot(g00, vec2(fx.x, fy.x));\n float n10 = dot(g10, vec2(fx.y, fy.y));\n float n01 = dot(g01, vec2(fx.z, fy.z));\n float n11 = dot(g11, vec2(fx.w, fy.w));\n vec2 fade_xy = fade(Pf.xy);\n vec2 n_x = mix(vec2(n00, n01), vec2(n10, n11), fade_xy.x);\n float n_xy = mix(n_x.x, n_x.y, fade_xy.y);\n return 2.3 * n_xy;\n }\n\n // HSL to RGB conversion function.\n vec3 hsl2rgb(vec3 hsl) {\n vec3 rgb = clamp(abs(mod(hsl.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0,\n 0.0, 1.0);\n rgb = rgb * rgb * (3.0 - 2.0 * rgb);\n return hsl.z + hsl.y * (rgb - 0.5) * (1.0 - abs(2.0 * hsl.z - 1.0));\n }\n\n void main() {\n // Combine multiple layers of noise to build a complex water pattern.\n float baseNoise = cnoise(vUv * scale + vec2(time * speed, 0.0));\n float detailNoise = cnoise(vUv * scale * 2.0 + vec2(time * speed * 1.5, 0.0)) * 0.5;\n float turbulence = cnoise(vUv * scale * 4.0 + vec2(time * speed * 2.0, 0.0)) * 0.25;\n float noise = baseNoise + detailNoise + turbulence;\n \n // Create a wake pattern.\n float wake = smoothstep(0.3, 0.7, 1.0 - abs(vUv.x - 0.5) * 2.0);\n \n // Create a foam effect.\n float foam = smoothstep(0.4, 0.6, noise + wake);\n \n // Mix water and foam colors, then blend in the base color.\n vec3 finalColor = mix(waterColor, foamColor, foam);\n finalColor = mix(finalColor, color, wake * 0.5);\n \n // Adjust dynamic opacity.\n float alpha = opacity * (wake + foam * 0.5) * (1.0 - vUv.y);\n \n // Add wave highlights.\n float highlight = smoothstep(0.2, 0.4, noise + wake) *\n (1.0 - smoothstep(0.4, 0.6, noise + wake));\n finalColor += highlight * foamColor * 0.5;\n \n // --- Rainbow Effect ---\n // When rainbowActive is enabled, overlay a dynamic rainbow gradient.\n if (rainbowActive > 0.5) {\n // Cycle the hue based on the horizontal UV and time.\n float rainbowHue = mod(vUv.x + time * 0.5, 1.0);\n vec3 rainbowColor = hsl2rgb(vec3(rainbowHue, 1.0, 0.5));\n // Blend the rainbow with the original finalColor.\n finalColor = mix(finalColor, rainbowColor, 0.7);\n }\n \n gl_FragColor = vec4(finalColor, alpha);\n }\n ");(0,u.e)({TrailShaderMaterial:m});let f=e=>{let{color:n="#787878",waterColor:t="#0066ff",foamColor:r="#ffffff",speed:i=1,scale:l=3,opacity:s=.5}=e,c=(0,a.useRef)(),{getSignalKValue:d}=(0,h.yC)();return(0,u.F)((e,n)=>{if(c.current){c.current.uniforms.time.value+=n;let e="auto"==d("steering.autopilot.state");c.current.uniforms.rainbowActive.value=e?1:0}}),(0,o.jsxs)("mesh",{rotation:[-Math.PI/2,0,Math.PI/2],position:[0,0,22.5],children:[(0,o.jsx)("planeGeometry",{args:[40,2.2,128,32]}),(0,o.jsx)("trailShaderMaterial",{ref:c,color:new g.Ilk(n),waterColor:new g.Ilk(t),foamColor:new g.Ilk(r),speed:i,scale:l,opacity:s,transparent:!0,depthWrite:!1,blending:g.WMw})]})};var v=t(54752),p=t(33866),x=t(79257);(0,u.e)({Water:v.B,Sky:p.q});var M=function(){let{nightMode:e}=(0,h.yC)(),n=(0,a.useRef)(),t=(0,a.useRef)(),r=(0,a.useRef)(),i=(0,u.D)(e=>e.gl),l=(0,u.D)(e=>e.scene),s=(0,a.useMemo)(()=>new g.Pa4,[]),c=(0,x.mE)("assets/moon.jpg"),d=(0,u.H)(g.dpR,"assets/waternormals.jpg");(0,a.useMemo)(()=>{d.wrapS=d.wrapT=g.rpg},[d]);let m=(0,a.useMemo)(()=>new g._12(5e3,5e3,32,32),[]),f=(0,a.useMemo)(()=>({textureWidth:256,textureHeight:256,waterNormals:d,sunDirection:new g.Pa4,sunColor:e?12642559:16777215,waterColor:e?6702:30668,distortionScale:2,format:i.encoding,reflectivity:0}),[d,i.encoding,e]);(0,u.F)(()=>{let o=e?45:2,a=e?30:180;if(t.current){let r=t.current.material.uniforms;e?(r.turbidity.value=.2,r.rayleigh.value=.5,r.mieCoefficient.value=.01,r.mieDirectionalG.value=.8):(r.turbidity.value=1,r.rayleigh.value=1,r.mieCoefficient.value=.003,r.mieDirectionalG.value=.5);let i=g.M8C.degToRad(90-o),l=g.M8C.degToRad(a);s.setFromSphericalCoords(1,i,l),r.sunPosition.value.copy(s),n.current&&n.current.material.uniforms.sunDirection.value.copy(s).normalize()}},[]),(0,a.useEffect)(()=>(e?l.background=new g.Ilk(2068):l.background=new g.Ilk(8900331),()=>{l.background=null,l.environment=null}),[l,e]);let v=0;return(0,u.F)((e,t)=>{(v+=t)>.1&&(n.current&&(n.current.material.uniforms.time.value+=.5*v),v=0)}),(0,o.jsxs)(o.Fragment,{children:[!e&&(0,o.jsx)("sky",{ref:t,scale:1e4}),e&&(0,o.jsxs)("mesh",{ref:r,position:[600,200,-1500],children:[(0,o.jsx)("sphereGeometry",{args:[80,32,32]}),(0,o.jsx)("meshStandardMaterial",{map:c,emissive:16777215,emissiveIntensity:.8})]}),(0,o.jsx)("water",{ref:n,args:[m,f],"rotation-x":-Math.PI/2,position:[0,-.5,0]})]})},w=t(14578),y=t(63321);let b=(0,a.createContext)(),j=()=>(0,a.useContext)(b),P=(e,n,t,o)=>{let a=t.split(".").reduce((e,n)=>null==e?void 0:e[n],o);void 0!==a&&(e[n]=a)},C=e=>{let{children:n}=e,[t,r]=(0,a.useState)({}),[i,l]=(0,a.useState)([]),s=(0,a.useRef)(null),c=(0,a.useRef)({});return(0,a.useEffect)(()=>{let e=async e=>{console.log("Fetching static vessel information...");try{let n=await e.API().then(e=>e.vessels()),t=Object.entries(n).map(e=>{let[n,t]=e,o={mmsi:n};return P(o,"name","name",t),P(o,"latitude","navigation.position.value.latitude",t),P(o,"longitude","navigation.position.value.longitude",t),P(o,"sog","navigation.speedOverGround.value",t),P(o,"cog","navigation.courseOverGroundTrue.value",t),P(o,"cogMagnetic","navigation.courseOverGroundMagnetic.value",t),P(o,"heading","navigation.headingTrue.value",t),P(o,"headingMagnetic","navigation.headingMagnetic.value",t),P(o,"length","design.length.value.overall",t),P(o,"beam","design.beam.value",t),P(o,"callsign","communication.callsignVhf",t),P(o,"shipType","design.aisShipType.value.id",t),o.lastUpdate=Date.now(),o});console.log("Fetched ".concat(t.length," vessels.")),l(t);let o={};t.forEach(e=>{e.mmsi&&(null!==e.latitude||null!==e.longitude)&&(o[e.mmsi]=e)}),Object.keys(o).length>0&&(console.log("Initializing AIS data with ".concat(Object.keys(o).length," vessels")),r(o))}catch(e){console.error("Error fetching static vessel info:",e)}},n=e=>{if(!(null==e?void 0:e.updates)){console.warn("Delta is missing or does not contain updates:",e);return}let n=e=>({mmsi:e,name:"unknown",latitude:null,longitude:null,sog:null,cog:null,cogMagnetic:null,heading:null,headingMagnetic:null}),t=e.context.replace("vessels.","");if(!t){console.warn("Update missing MMSI context:",e);return}c.current[t]=Date.now(),r(o=>{let a=o[t]||n(t);return a.lastUpdate=c.current[t],e.updates.forEach(e=>{e.values.forEach(e=>{switch(e.path){case"name":a.name=e.value;break;case"navigation.position":a.latitude=e.value.latitude,a.longitude=e.value.longitude;break;case"navigation.speedOverGround":a.sog=e.value;break;case"navigation.courseOverGroundTrue":a.cog=e.value;break;case"navigation.courseOverGroundMagnetic":a.cogMagnetic=e.value;break;case"navigation.headingTrue":a.heading=e.value;break;case"navigation.headingMagnetic":a.headingMagnetic=e.value}})}),{...o,[t]:a}})};return(async()=>{try{let{signalkUrl:t}=y.Z.getAll();if(console.log("SignalK URL:",t),!t)throw Error("SignalK URL is undefined or invalid.");let[o,a]=t.replace(/https?:\/\//,"").split(":");console.log("Connecting to SignalK at hostname: ".concat(o,", port: ").concat(a));let r=new w.default({hostname:o||"localhost",port:parseInt(a)||3e3,useTLS:t.startsWith("https"),reconnect:!0,autoConnect:!1,notifications:!1,subscriptions:[{context:"vessels.*",subscribe:[{path:"navigation.position"},{path:"navigation.speedOverGround"},{path:"navigation.courseOverGroundTrue"},{path:"navigation.courseOverGroundMagnetic"},{path:"navigation.headingTrue"},{path:"navigation.headingMagnetic"}]}]});s.current=r,await r.connect(),console.log("SignalK client connected."),await e(r),r.on("delta",n)}catch(e){console.error("Error connecting to SignalK:",e)}})(),()=>{var e;console.log("Disconnecting SignalK client..."),null===(e=s.current)||void 0===e||e.disconnect()}},[]),(0,o.jsx)(b.Provider,{value:{aisData:t,vesselIds:i},children:n})};var I=t(45476);let S=async e=>{try{let n=await t(29927)("./".concat(e,"/Scene.jsx"));return n.default?n.default:n.Model}catch(n){throw console.error("Error loading ".concat(e," component:"),n),n}},R=e=>0===e?"windsurf":30===e?"optimist":36===e?"sailboat":"ship",E=(0,a.forwardRef)((e,n)=>{let{position:t,visible:r,boatData:i,onHover:l}=e,[s,c]=(0,a.useState)(null),u=R(i.shipType);if((0,a.useEffect)(()=>{let e=!0;return S(u).then(n=>{e&&c(()=>n)}).catch(e=>console.error("Failed to load ".concat(u,":"),e)),()=>{e=!1}},[u]),!s)return null;let d=[i.name?function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=null!=n?"".concat(n).concat(t):"N/A";return"".concat(e,": ").concat(o,"\n")}("Name",i.name,""):"MMSI ".concat(i.mmsi.replace("urn:mrn:imo:mmsi:",""),"\n")].join(""),g=Math.max(i.length||10,4)/10;return(0,o.jsxs)("group",{ref:n,position:t,visible:r,children:[(0,o.jsx)("group",{onClick:e=>{e.stopPropagation(),s&&l&&l(i),console.log("Clicked on boat:",i.name||i.mmsi)},children:(0,o.jsx)(s,{scale:[g,g,g]})}),(0,o.jsx)("group",{position:[1.5,4,0],children:(0,o.jsx)(I.x,{position:[0,0,0],fontSize:.4,maxWidth:3,lineHeight:1.2,textAlign:"left",color:"white",anchorX:"center",anchorY:"middle",font:"fonts/Roboto-Bold.ttf",renderOrder:1e3,depthTest:!1,children:d})})]})});E.displayName="AISBoat";let O=e=>{if(e.material)return e;for(let n of e.children){let e=O(n);if(e)return e}return null},T=(e,n,t,o)=>void 0===e||void 0===n||void 0===t||void 0===o?{x:0,y:0}:{x:-(Math.PI/180*(n-o)*6371e3)*Math.cos(Math.PI/180*t),y:Math.PI/180*(e-t)*6371e3},_=(e,n)=>{let t=y.Z.get("aisLengthScalingFactor")||.7;if(null!=e.sog&&null!=e.cog){let o=.51444*e.sog;return{deltaX:o*n*Math.sin(e.cog*Math.PI/180)*t,deltaY:o*n*Math.cos(e.cog*Math.PI/180)*t}}return{deltaX:0,deltaY:0}},k=function(e,n,t){let o=!(arguments.length>3)||void 0===arguments[3]||arguments[3],a=y.Z.get("aisLengthScalingFactor")||.7,r=n*a,i=t*a;o?(e.position.x+=(r-e.position.x)*.1,e.position.z+=(i-e.position.z)*.1):e.position.set(r,0,i)},N=function(e,n){let t=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=-n*Math.PI/180%(2*Math.PI);t?e.children[0].rotation.y=e.children[0].rotation.y+(o-e.children[0].rotation.y)*.1:e.children[0].rotation.y=o,e.mmsi&&1>Math.abs(n%45)&&console.log("Boat ".concat(e.mmsi," rotation: ").concat(n,"\xb0 (").concat(o," rad)"))};var A=e=>{let{onUpdateInfoPanel:n}=e,{aisData:t,vesselIds:r}=j(),i=(0,a.useRef)({}),l=(0,a.useRef)(null),{getSignalKValue:s}=(0,h.yC)(),[c,d]=(0,a.useState)(null),g=(0,a.useRef)(0),m=()=>y.Z.get("aisLengthScalingFactor")||.7,f=500*m(),v=550*m(),p=3e3*m();(0,a.useRef)(!1),(0,u.F)(()=>{let e=s("navigation.position"),n=s("navigation.speedOverGround"),o=s("navigation.headingTrue")||s("navigation.headingMagnetic"),a=s("navigation.courseOverGroundTrue")||s("navigation.courseOverGroundMagnetic"),r=(a?180/Math.PI*a:null)||(o?180/Math.PI*o:null)||0;if(g.current=r,0!==r&&console.log("My boat rotation angle: ".concat(r.toFixed(1),"\xb0 (converted from ").concat((r*Math.PI/180).toFixed(2)," radians)")),l.current=e,!(null==e?void 0:e.latitude)||!(null==e?void 0:e.longitude)||!Object.keys(i.current).length)return;let c=performance.now();Object.values(t).forEach(t=>{if(null==t.latitude||null==t.longitude||!i.current[t.mmsi])return;let o=i.current[t.mmsi];if(!o)return;let a=t.lastUpdate||c,{x:r,y:l}=T(t.latitude,t.longitude,e.latitude,e.longitude),s=0,u=0;null!=n&&n>0&&c-a>1e3&&({deltaX:s,deltaY:u}=_(t,(c-a)/1e3));let d=r+s,h=l+u,x=Math.sqrt((d*m())**2+(h*m())**2);if(0===d&&0===h){o.visible=!1;return}if(x>0&&x<=p){o.visible=!0,o.currentColor||(o.currentColor=x<f?"red":"white");let e=o.currentColor;"red"===o.currentColor&&x>v?e="white":"white"===o.currentColor&&x<f&&(e="red"),k(o,d,h,!0);let n=null!==t.cog?180/Math.PI*t.cog:null!==t.cogMagnetic?180/Math.PI*t.cogMagnetic:null,a=null!==t.heading?180/Math.PI*t.heading:null!==t.headingMagnetic?180/Math.PI*t.headingMagnetic:null,r=null!==n?n:null!==a?a:0,i=r-g.current;o.mmsi&&Math.abs(r-(o.lastLoggedAngle||0))>10&&(console.log("Boat ".concat(o.mmsi," - Absolute angle: ").concat(r.toFixed(1),"\xb0, Relative: ").concat(i.toFixed(1),"\xb0")),o.lastLoggedAngle=r),N(o,i,!0);let l=O(o.children[0]);l?(o.redMaterial||(o.redMaterial=l.material.clone(),o.redMaterial.color.set("red")),o.whiteMaterial||(o.whiteMaterial=l.material.clone(),o.whiteMaterial.color.set("white")),"red"===e&&"red"!==o.currentMaterial?(l.material=o.redMaterial,o.currentMaterial="red",console.log("Swapped material to red for boat ".concat(t.mmsi))):"white"===e&&"white"!==o.currentMaterial&&(l.material=o.whiteMaterial,o.currentMaterial="white",console.log("Swapped material to white for boat ".concat(t.mmsi))),o.currentColor=e):console.warn("Material not found for boat ".concat(t.mmsi))}else o.visible=!1})});let x=(0,a.useMemo)(()=>{let e=l.current;return(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?r.filter(e=>{if(!e.mmsi||e.mmsi.startsWith("urn:mrn:signalk:uuid:")||e.mmsi.startsWith("227925790")||e.mmsi.startsWith("urn:mrn:imo:mmsi:230035780"))return!1;let n=t[e.mmsi];return!!n&&null!==n.latitude&&null!==n.longitude}).map(n=>{let a=t[n.mmsi],r=T(a.latitude,a.longitude,e.latitude,e.longitude);if(0===r.x&&0===r.y)return!1;let l=y.Z.get("aisLengthScalingFactor")||.7,s=r.x*l,u=r.y*l,g=Math.sqrt(s*s+u*u)<=p;return(0,o.jsx)(E,{ref:e=>{e&&(e.mmsi=n.mmsi,i.current[n.mmsi]=e)},position:[s,0,u],visible:g,boatData:{...n,...a},onHover:e=>{c&&e&&c.mmsi===e.mmsi?d(null):d(e)}},n.mmsi)}):[]},[r,t,p,c]),M=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return null==n||""===n||"string"==typeof n&&0===n.trim().length?null:(o&&(n=Math.abs(n)<=2*Math.PI?Math.round((180*n/Math.PI+360)%360):Math.round(n)),"".concat(e,": ").concat(n).concat(t))},w=c?[M("Name",c.name),M("MMSI",(e=>{if(!e)return null;let n=e;for(let e of["urn:mrn:imo:mmsi:","urn:mrn:signalk:uuid:"])if(n.startsWith(e)){n=n.substring(e.length);break}return n})(c.mmsi)),M("Distance",(e=>{if(!e||!l.current)return null;let n=l.current;if(!(null==n?void 0:n.latitude)||!(null==n?void 0:n.longitude)||!e.latitude||!e.longitude)return null;let{x:t,y:o}=T(e.latitude,e.longitude,n.latitude,n.longitude);return Math.round(Math.sqrt(t*t+o*o)/1852*10)/10})(c)," NM"),M("Length",c.length,"m"),M("Type",c.shipType),M("SOG",c.sog," kts"),M("COG",c.cog,"\xb0",!0),M("Heading",c.heading,"\xb0",!0),M("Beam",c.beam,"m"),M("Draft",c.draft,"m"),M("Callsign",c.callsign),M("Destination",c.destination)].filter(e=>null!==e).join("\n"):"";return a.useEffect(()=>{n&&n(w)},[c,w,n]),(0,o.jsxs)(o.Fragment,{children:[x,c&&(0,o.jsx)("group",{position:[0,1,0],children:(0,o.jsxs)("mesh",{scale:[.1,.1,.1],visible:!1,children:[(0,o.jsx)("boxGeometry",{}),(0,o.jsx)("meshBasicMaterial",{color:"yellow"})]})})]})},F=t(1);let G=a.memo(e=>{let{radius:n,isOuter:t,markerColorPrimary:r,markerColorGreen:i,markerColorRed:l}=e,s=(0,a.useMemo)(()=>{let e=[];for(let a=0;a<360;a+=10){let s=g.M8C.degToRad(a-90),c=a%30==0,u=t?c?.4:.2:c?.3:.15,d=(n+.5*u+.2)*Math.cos(s),h=(n+.5*u+.2)*Math.sin(s),m=t&&a>0&&a<61,f=t&&a>=300&&a<360,v=m?i:f?l:r;if(!t&&c){let n=0===a?"N":a.toString();e.push((0,o.jsx)(I.x,{characters:"N0123456789",position:[d,.01,h],color:r,fontSize:.5,rotation:[-Math.PI/2,0,Math.PI/2-s],font:"fonts/Roboto-Bold.ttf",anchorY:"middle",children:n},"text-".concat(a)))}else e.push((0,o.jsx)(F.aL,{args:[u/2,16,16],position:[d,0,h],children:(0,o.jsx)("meshBasicMaterial",{color:v})},"marker-".concat(t?"outer":"inner","-").concat(a)))}return e},[n,t,r,i,l]);return(0,o.jsx)(o.Fragment,{children:s})});G.displayName="StaticMarkers";let D=a.memo(e=>{let{innerRadius:n,outerRadius:t,dialColor:a,opacity:r=1,transparent:i=!1}=e;return(0,o.jsx)(F.FM,{args:[n,t,64],rotation:[Math.PI/2,0,0],children:(0,o.jsx)("meshBasicMaterial",{color:a,side:g.ehD,transparent:i,opacity:r})})});D.displayName="StaticRing";let L=e=>{let{outerRadius:n,innerRadius:t}=e,r=h.FV,i=h.HH,{nightMode:l,getSignalKValue:s}=(0,h.yC)(),c=l?h.eF:16777215,u=s("navigation.headingTrue")||s("navigation.headingMagnetic"),d=s("navigation.courseOverGroundTrue")||s("navigation.courseOverGroundMagnetic"),g=(0,a.useMemo)(()=>({innerRadius:t,outerRadius:n,dialColor:c,markerColorPrimary:0,markerColorGreen:r,markerColorRed:i}),[t,n,c,0,r,i]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("group",{rotation:[0,(d||u||0)+Math.PI,0],children:[(0,o.jsx)(D,{innerRadius:g.innerRadius,outerRadius:g.outerRadius,dialColor:g.dialColor}),(0,o.jsx)(G,{radius:g.innerRadius,isOuter:!1,markerColorPrimary:g.markerColorPrimary,markerColorGreen:g.markerColorGreen,markerColorRed:g.markerColorRed})]}),(0,o.jsxs)("group",{children:[(0,o.jsx)(D,{innerRadius:g.innerRadius+1,outerRadius:g.outerRadius+1,dialColor:g.dialColor,transparent:!0,opacity:.5}),(0,o.jsx)(G,{radius:g.innerRadius+1,isOuter:!0,markerColorPrimary:g.markerColorPrimary,markerColorGreen:g.markerColorGreen,markerColorRed:g.markerColorRed})]})]})};L.displayName="CompassDial";var U=t(95723),z=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(L,{outerRadius:5.6,innerRadius:5}),(0,o.jsx)(U.Z,{outerRadius:5.6+1.1})]}),H=t(58181),W=JSON.parse('{"N":{"52":[4.98,5.86,6.31,6.45,6.51,6.52,6.41],"60":[5.25,6.11,6.56,6.73,6.79,6.82,6.79],"75":[5.45,6.33,6.77,7.01,7.13,7.2,7.24],"90":[5.66,6.55,7,7.25,7.38,7.53,7.7],"110":[5.49,6.49,7.04,7.4,7.69,7.97,8.38],"120":[5.32,6.36,6.97,7.39,7.77,8.1,8.6],"135":[4.81,5.92,6.68,7.15,7.55,7.95,8.85],"150":[4.09,5.17,6.04,6.61,6.99,7.31,7.93],"angles":[52,60,75,90,110,120,135,150],"speeds":[6,8,10,12,14,16,20],"beat_angle":[43.6,42,41.2,41.2,41.7,42.1,44.2],"beat_vmg":[3.26,3.91,4.24,4.34,4.36,4.34,4.16],"run_angle":[144.8,147.8,148.5,149.6,171.8,175.4,177.2],"run_vmg":[3.54,4.48,5.23,5.73,6.17,6.67,7.36]}}');let B={DEG2RAD:Math.PI/180,ROTATION_INTERPOLATION_FACTOR:.05,SOG_SMOOTHING_FACTOR:.1,DEFAULT_SOG:3,ANGLE_INCREMENT:10,SPHERE_SIZE:.4,SPHERE_SEGMENTS:32,DEFAULT_LINE_WIDTH:1,PLOTS_COUNT:5,FRAME_TO_MINUTE_RATIO:3600},Z=(e,n)=>26.8224*e*n*.1,q=(e,n,t)=>{if(!e||!n)return new g.Pa4(0,0,0);let o=e*B.DEG2RAD,a=Z(n,t);return new g.Pa4(a*Math.sin(o),0,-a*Math.cos(o))},K=(e,n)=>{if(!(null==e?void 0:e.length))return 0;let t=0,o=e.length-1;for(;t<o;){let a=Math.floor((t+o)/2);e[a]<n?t=a+1:o=a}return t},V=e=>{let{position:n,color:t}=e;return n?(0,o.jsxs)("mesh",{position:n,children:[(0,o.jsx)("sphereGeometry",{args:[B.SPHERE_SIZE,B.SPHERE_SEGMENTS,B.SPHERE_SEGMENTS]}),(0,o.jsx)("meshStandardMaterial",{color:t})]}):null},Y=e=>{let{points:n,color:t}=e;return(null==n?void 0:n.length)?(0,o.jsx)(H.x,{points:n,color:t,lineWidth:B.DEFAULT_LINE_WIDTH}):null},X=a.memo(e=>{let{timeInMinute:n,windSpeed:t}=e,r=(0,a.useRef)(W.N),i=(0,a.useCallback)((e,n,t,o)=>{if(!(null==e?void 0:e.length)||!(null==n?void 0:n.length)||e.length<=t||n.length<=t)return console.warn("Invalid angle or VMG data"),null;let a=e[t],r=n[t],i=a*B.DEG2RAD,l=Z(r,o);return new g.Pa4(l*Math.sin(i),0,-l*Math.cos(i))},[]),l=(0,a.useCallback)((e,n)=>{let{speeds:t,angles:o,beat_angle:a,beat_vmg:i,run_angle:l,run_vmg:s}=r.current;if(!(null==t?void 0:t.length)||!(null==o?void 0:o.length))return console.warn("Invalid polar data"),null;let c=(e,n,t)=>e+t*(n-e),u=[],d=(e,t,o)=>{for(let a=e;a<=t;a+=B.ANGLE_INCREMENT)u.push(q(a,o(a),n))};d(0,a[e]-B.ANGLE_INCREMENT,n=>c(0,i[e],n/a[e]));let h=q(a[e],i[e],n);u.push(h),o.forEach(t=>{if(t>a[e]&&t<l[e]){var o;let a=(null===(o=r.current[Math.floor(t)])||void 0===o?void 0:o[e])||0;u.push(q(t,a,n))}});let m=q(l[e],s[e],n);return u.push(m),d(l[e]+B.ANGLE_INCREMENT,180,()=>s[e]),new g.YT8(u,!0)},[]),s=(0,a.useMemo)(()=>{var e;let o=r.current;if(!(null==o?void 0:null===(e=o.speeds)||void 0===e?void 0:e.length))return console.warn("Invalid polar data structure"),{curve:null,beat:null,run:null};let a=K(o.speeds,t);return{curve:l(a,n),beat:i(o.beat_angle,o.beat_vmg,a,n),run:i(o.run_angle,o.run_vmg,a,n)}},[n,t,i,l]);return(0,o.jsx)(o.Fragment,{children:[0,-Math.PI].map((e,n)=>(0,o.jsxs)("group",{position:[0,-.7,0],rotation:[0,0,e],children:[s.curve&&(0,o.jsx)(Y,{points:s.curve.getPoints(100),color:h.gK}),(0,o.jsx)(V,{position:s.beat,color:h.FV}),(0,o.jsx)(V,{position:s.run,color:h.HH})]},n))})});X.displayName="PolarPlot";var Q=function(){let e=(0,a.useRef)([]),[n,t]=(0,a.useState)([]),r=(0,a.useRef)(0),i=(0,a.useRef)([]),l=(0,a.useRef)(B.DEFAULT_SOG),{getSignalKValue:s}=(0,h.yC)(),c=-s("environment.wind.angleApparent"),d=(0,h.HQ)(s("environment.wind.speedOverGround"))||0,m=s("navigation.speedOverGround")||B.DEFAULT_SOG,f=(0,a.useRef)(d),[v,p]=(0,a.useState)(Date.now()),x=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let n=Array.from({length:B.PLOTS_COUNT},(e,n)=>({id:n,timeInMinute:5*(n+1)}));return t(n),e.current=n.map(()=>new g.ZAu),i.current=Array(B.PLOTS_COUNT).fill(0),x.current=setInterval(()=>{p(Date.now()),r.current=0,console.log("Forcing redraw of polar plots")},12e4),()=>{x.current&&clearInterval(x.current)}},[]),(0,a.useEffect)(()=>{Math.abs(f.current-d)>5&&(console.log("Wind speed changed from ".concat(f.current," to ").concat(d,", recreating polar curves")),p(Date.now()),r.current=0,f.current=d)},[d]),(0,u.F)((t,o)=>{r.current+=1,l.current=g.M8C.lerp(l.current,m,B.SOG_SMOOTHING_FACTOR),n.forEach((n,t)=>{let o=e.current[t];if(o&&n.timeInMinute-r.current/B.FRAME_TO_MINUTE_RATIO>0){let e=i.current[t],n=g.M8C.lerp(e,c,B.ROTATION_INTERPOLATION_FACTOR);o.rotation.set(0,n,0),i.current[t]=n}})}),(0,o.jsx)(o.Fragment,{children:n.map((n,t)=>(0,o.jsx)("group",{ref:n=>{n&&(e.current[t]=n)},children:(0,o.jsx)(X,{timeInMinute:n.timeInMinute,windSpeed:d},"plot-".concat(v,"-").concat(t))},"".concat(n.id,"-").concat(v)))})},J=()=>{let{states:e,nightMode:n}=(0,h.yC)(),t=n?.2:.4;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("ambientLight",{intensity:n?.3:.5}),(0,o.jsx)("directionalLight",{position:[0,70,-100],intensity:n?.8:1.4,castShadow:!0,"shadow-mapSize-width":1024,"shadow-mapSize-height":1024,"shadow-camera-near":.5,"shadow-camera-far":200,"shadow-camera-left":-50,"shadow-camera-right":50,"shadow-camera-top":50,"shadow-camera-bottom":-50,"shadow-bias":-.0001,color:n?"#c8e6ff":"#ffffff"}),(0,o.jsx)("pointLight",{position:[0,40,-80],intensity:2.5*t,distance:150,decay:2}),(0,o.jsx)("pointLight",{position:[0,30,100],intensity:.8*t,distance:120,decay:2})]})},$=e=>{let{onUpdateInfoPanel:n}=e,{states:t,getSignalKValue:u}=(0,h.yC)();y.Z.getAll();let d=(0,a.useRef)();return(0,o.jsxs)(a.Suspense,{fallback:(0,o.jsx)(r.V,{children:"Loading..."}),children:[(0,o.jsx)(i.c,{makeDefault:!0,fov:60,near:5,far:500,position:[0,5,20]}),(0,o.jsx)(l.z,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4,enableDamping:!1,zoomSpeed:.5,rotateSpeed:.5}),(0,o.jsx)(s.qA,{files:"./assets/ocearo_env.hdr",background:!1,intensity:.8,resolution:256}),(0,o.jsx)(J,{}),(0,o.jsxs)("group",{position:[0,-3,0],children:[(0,o.jsx)(c.Z,{position:[0,0,.7],scale:[.7,.7,.7],ref:d,showSail:!0,onUpdateInfoPanel:n}),t.showOcean&&(0,o.jsx)(M,{}),(0,o.jsx)(f,{}),t.showPolar&&!t.showOcean&&(0,o.jsx)(Q,{}),t.ais&&(0,o.jsx)(C,{children:(0,o.jsx)(A,{onUpdateInfoPanel:n})}),(0,o.jsx)(z,{visible:!1})]})]})}},95723:function(e,n,t){"use strict";var o=t(57437),a=t(2265),r=t(40718),i=t.n(r),l=t(53082),s=t(72079),c=t(45476);let u={TRUE_WIND:1,APP_WIND:1},d=e=>{let{position:n=[0,0,0],rotation:t=[0,0,0],speed:a,color:r="#ffffff",fontSize:i=.5,textPosition:l=[0,.8,0],arrowSize:u=1}=e;return(0,o.jsxs)("group",{position:n,rotation:t,children:[(0,o.jsx)(c.x,{characters:".0123456789",color:r,fontSize:i*u,position:l,font:"fonts/Roboto-Bold.ttf",anchorX:"center",anchorY:"middle",children:a.toFixed(1)}),(0,o.jsxs)("mesh",{children:[(0,o.jsx)("shapeGeometry",{args:[new s.bnF([new s.FM8(0,0),new s.FM8(.5*u*Math.cos(5*Math.PI/6),.5*u*Math.sin(5*Math.PI/6)),new s.FM8(0,-.577*u),new s.FM8(-.5*u*Math.cos(5*Math.PI/6),.5*u*Math.sin(5*Math.PI/6)),new s.FM8(0,0)])]}),(0,o.jsx)("meshStandardMaterial",{color:r,side:s.ehD})]})]})};d.propTypes={position:i().oneOfType([i().instanceOf(s.Pa4),i().arrayOf(i().number)]).isRequired,rotation:i().arrayOf(i().number).isRequired,speed:i().number.isRequired,color:i().oneOfType([i().string,i().number]).isRequired,fontSize:i().number,textPosition:i().arrayOf(i().number),arrowSize:i().number};let g=e=>{let{outerRadius:n}=e,{getSignalKValue:t}=(0,l.yC)(),r=Math.PI/2-t("environment.wind.angleTrueGround")||0,i=(0,l.HQ)(t("environment.wind.speedOverGround"))||0,c=Math.PI/2-t("environment.wind.angleApparent")||0,g=(0,l.HQ)(t("environment.wind.speedApparent"))||0,h=(0,a.useMemo)(()=>new s.Pa4((n+.7)*Math.cos(r),0,-(n+.7)*Math.sin(r)),[n,r]),m=(0,a.useMemo)(()=>new s.Pa4((n+.7)*Math.cos(c),0,-(n+.7)*Math.sin(c)),[n,c]);return(0,o.jsxs)("group",{children:[i>0&&(0,o.jsx)(d,{position:h,rotation:[-Math.PI/2,0,-(Math.PI/2-r)],speed:i,color:"#0000FF",fontSize:u.TRUE_WIND}),g>0&&(0,o.jsx)(d,{position:m,rotation:[-Math.PI/2,0,-(Math.PI/2-c)],speed:g,color:l.gK,fontSize:u.APP_WIND})]})};g.propTypes={outerRadius:i().number.isRequired},n.Z=g}}]);
|