ocearo-ui 0.1.18 → 0.1.21
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/README.fr.md +11 -13
- package/README.md +11 -13
- package/__next.__PAGE__.txt +4 -4
- package/__next._full.txt +12 -12
- package/__next._head.txt +4 -4
- package/__next._index.txt +4 -4
- package/__next._tree.txt +2 -2
- package/_next/static/chunks/009rlietvsaq2.js +1 -0
- package/_next/static/chunks/070stlm97b9a2.js +1 -0
- package/_next/static/chunks/08gn5_gd6amkq.js +1 -0
- package/_next/static/chunks/{1a24eba0d892e1dc.js → 0jzbiie0nzar2.js} +1 -1
- package/_next/static/chunks/0ri_um14-5x7u.js +1 -0
- package/_next/static/chunks/0utifqhyv2cuc.js +1 -0
- package/_next/static/chunks/0uvr7xkt_5uno.js +1 -0
- package/_next/static/chunks/0wzr1__so6xme.js +1 -0
- package/_next/static/chunks/0zjxnzbxh76mt.js +1 -0
- package/_next/static/chunks/11ln9lzzbo35q.js +1 -0
- package/_next/static/chunks/1bz0tcmhjmjgh.js +1 -0
- package/_next/static/chunks/1gizigk3w6q7j.js +31 -0
- package/_next/static/chunks/1porlo35ga4zu.js +1 -0
- package/_next/static/chunks/1ptwltjb3h6jf.js +4 -0
- package/_next/static/chunks/{c2ca71308a46ad5c.js → 1sq_733weprvs.js} +1 -1
- package/_next/static/chunks/1w1ua0-p5lk1e.js +38 -0
- package/_next/static/chunks/1wv5e5qomv-7g.css +3 -0
- package/_next/static/chunks/27hn45pv56pv7.js +393 -0
- package/_next/static/chunks/28y-j215vt42m.js +1 -0
- package/_next/static/chunks/29-ag86gvlc40.js +9 -0
- package/_next/static/chunks/2a0yjir_3mk1m.js +1 -0
- package/_next/static/chunks/2atijj_pkc4uc.js +2 -0
- package/_next/static/chunks/2baz6j1q913qw.js +1 -0
- package/_next/static/chunks/2ccpehidlaq88.js +1 -0
- package/_next/static/chunks/2lez3uww9j4t0.js +135 -0
- package/_next/static/chunks/2lvvt2f1l5sfu.js +1 -0
- package/_next/static/chunks/2nd5amcst4lhp.js +1 -0
- package/_next/static/chunks/2nxsyowmuwpjy.js +1 -0
- package/_next/static/chunks/2pwmb4pkqygy_.js +1 -0
- package/_next/static/chunks/2uao1hfsz-oy8.js +1 -0
- package/_next/static/chunks/2yghvponatk1x.js +135 -0
- package/_next/static/chunks/31i14-jemhnic.js +863 -0
- package/_next/static/chunks/{ef44382534be9f84.js → 32cbrrsp-x35l.js} +1 -1
- package/_next/static/chunks/36ra6xjie0dsv.js +9 -0
- package/_next/static/chunks/3dt63tw_9r0jt.js +38 -0
- package/_next/static/chunks/3jh1u-s3k0bkk.js +1 -0
- package/_next/static/chunks/3jupxlga7r_do.js +1 -0
- package/_next/static/chunks/{607b77f84fd065f0.js → 3m57lnggu30tr.js} +2 -2
- package/_next/static/chunks/3rhgquok36e79.js +1 -0
- package/_next/static/chunks/3sgrkzk20mxs6.js +54 -0
- package/_next/static/chunks/{149eaabf92bb073c.js → 42dfiu6iby3fq.js} +1 -1
- package/_next/static/chunks/43ps2cu5ahf8n.js +3 -0
- package/_next/static/chunks/turbopack-0pirmko-w-775.js +1 -0
- package/_next/static/hlKDicTyNGfd7dmHqo5m5/_clientMiddlewareManifest.js +1 -0
- package/_not-found/__next._full.txt +13 -11
- package/_not-found/__next._head.txt +4 -4
- package/_not-found/__next._index.txt +4 -4
- package/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/_not-found/__next._not-found.txt +4 -3
- package/_not-found/__next._tree.txt +2 -2
- package/_not-found.html +1 -1
- package/_not-found.txt +13 -11
- package/ais-preview/index.html +263 -0
- package/ais-preview/meshy/README.md +23 -0
- package/ais-preview/vessels.js +316 -0
- package/ais-preview/web/ATTRIBUTION.md +25 -0
- package/ais-preview/web/ais-30.glb +0 -0
- package/ais-preview/web/ais-31.glb +0 -0
- package/ais-preview/web/ais-35.glb +0 -0
- package/ais-preview/web/ais-36.glb +0 -0
- package/ais-preview/web/ais-37.glb +0 -0
- package/ais-preview/web/ais-40.glb +0 -0
- package/ais-preview/web/ais-50.glb +0 -0
- package/ais-preview/web/ais-60.glb +0 -0
- package/ais-preview/web/ais-70.glb +0 -0
- package/ais-preview/web/ais-80.glb +0 -0
- package/boats/ais/ais-30.glb +0 -0
- package/boats/ais/ais-31.glb +0 -0
- package/boats/ais/ais-35.glb +0 -0
- package/boats/ais/ais-36.glb +0 -0
- package/boats/ais/ais-37.glb +0 -0
- package/boats/ais/ais-40.glb +0 -0
- package/boats/ais/ais-50.glb +0 -0
- package/boats/ais/ais-60.glb +0 -0
- package/boats/ais/ais-70.glb +0 -0
- package/boats/ais/ais-80.glb +0 -0
- package/index.html +1 -1
- package/index.txt +12 -12
- package/package.json +18 -19
- package/settings/__next._full.txt +15 -13
- package/settings/__next._head.txt +4 -4
- package/settings/__next._index.txt +4 -4
- package/settings/__next._tree.txt +2 -2
- package/settings/__next.settings.__PAGE__.txt +4 -4
- package/settings/__next.settings.txt +4 -3
- package/settings.html +1 -1
- package/settings.txt +15 -13
- package/_next/static/chunks/045c83caa4d15373.js +0 -1
- package/_next/static/chunks/04cc0e5e9b2549b5.js +0 -2
- package/_next/static/chunks/05498d2aba8ad072.js +0 -1
- package/_next/static/chunks/056bb58d7d0223f4.js +0 -1
- package/_next/static/chunks/06e0cd4a5af05adb.js +0 -1
- package/_next/static/chunks/0df9a48159a5de95.js +0 -135
- package/_next/static/chunks/19d7af5c164315cb.js +0 -1
- package/_next/static/chunks/2296899bc46a0855.js +0 -1
- package/_next/static/chunks/2474c03b842c10ab.js +0 -38
- package/_next/static/chunks/290728133a3e7513.js +0 -9
- package/_next/static/chunks/33a3c72f455c2711.js +0 -1
- package/_next/static/chunks/3abe6b32c7676e49.js +0 -1
- package/_next/static/chunks/3b9428693f2cc0d6.js +0 -1
- package/_next/static/chunks/4573d1a032e56240.js +0 -1
- package/_next/static/chunks/46da3d80b0234973.js +0 -1
- package/_next/static/chunks/4974092397cafa41.js +0 -1
- package/_next/static/chunks/4a440e0aa6a0e7f7.js +0 -135
- package/_next/static/chunks/55be29098903fc19.js +0 -1
- package/_next/static/chunks/611f819ef2b8cd4e.js +0 -38
- package/_next/static/chunks/727710e55f003daf.js +0 -36
- package/_next/static/chunks/72c822cfe5b6f4f2.js +0 -4
- package/_next/static/chunks/72d89c358c0d5483.js +0 -1
- package/_next/static/chunks/7c60d9d425c20d52.js +0 -1
- package/_next/static/chunks/7d74814a0cc0f1a8.js +0 -1
- package/_next/static/chunks/8610c545018747f6.css +0 -3
- package/_next/static/chunks/8bf2a6eefe03fbc9.js +0 -1
- package/_next/static/chunks/a2dfb6fc5208ab9b.js +0 -1
- package/_next/static/chunks/a5243176ef1c1147.js +0 -3
- package/_next/static/chunks/a59b67714973a59e.js +0 -1
- package/_next/static/chunks/a6dad97d9634a72d.js.map +0 -1
- package/_next/static/chunks/b08b2ebeb951051c.js +0 -1
- package/_next/static/chunks/b9d9a7e1cf2f6019.js +0 -1
- package/_next/static/chunks/b9fde64db49c8fdf.js +0 -1
- package/_next/static/chunks/ba6e6b346e330c1c.js +0 -1
- package/_next/static/chunks/c4793aebac6a4506.js +0 -54
- package/_next/static/chunks/c5ca29b672fb8724.js +0 -1
- package/_next/static/chunks/ca5d1b461892da4b.js +0 -1
- package/_next/static/chunks/dc7a868e9a2740f1.js +0 -9
- package/_next/static/chunks/e63b192414a38d4f.js +0 -783
- package/_next/static/chunks/eae6a84b628658b8.js +0 -362
- package/_next/static/chunks/ed1a1adcf94d3203.js +0 -1
- package/_next/static/chunks/f0df051aa5b9aee8.js +0 -1
- package/_next/static/chunks/fe9ff98ffedd5a18.js +0 -1
- package/_next/static/chunks/ff5e78db2e2b69dd.js +0 -1
- package/_next/static/chunks/turbopack-eb3e32db84948efc.js +0 -4
- package/_next/static/fEaz-HJDfJbXQ22pI4nGl/_clientMiddlewareManifest.json +0 -1
- /package/_next/static/chunks/{c8017b80fde2edc8.js → 0abo2oxxw3hpi.js} +0 -0
- /package/_next/static/chunks/{a6dad97d9634a72d.js → 0cz1d0mv5g_q7.js} +0 -0
- /package/_next/static/chunks/{4701c1fd00af0aba.js → 0l9s4rhr00adq.js} +0 -0
- /package/_next/static/chunks/{ff1a16fafef87110.js → 1d4h-sglyo8ft.js} +0 -0
- /package/_next/static/chunks/{026b02dd01b65e37.js → 2rsdqsatgq9ta.js} +0 -0
- /package/_next/static/chunks/{9395de7f841f8cc6.js → 2urimbxg5bqv3.js} +0 -0
- /package/_next/static/chunks/{fba1dfce801bc8b9.js → 3iuz3f0429awx.js} +0 -0
- /package/_next/static/{fEaz-HJDfJbXQ22pI4nGl → hlKDicTyNGfd7dmHqo5m5}/_buildManifest.js +0 -0
- /package/_next/static/{fEaz-HJDfJbXQ22pI4nGl → hlKDicTyNGfd7dmHqo5m5}/_ssgManifest.js +0 -0
- /package/_next/static/media/{GeistMonoVF-s.2cee7d16.woff → GeistMonoVF-s.1lv5tp2fpjxdz.woff} +0 -0
- /package/_next/static/media/{GeistVF-s.4c3c0b96.woff → GeistVF-s.0e569l9b0bre8.woff} +0 -0
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82897,60099,e=>{"use strict";let t,r;var i=e.i(31067),n=e.i(71645),a=e.i(15080),o=e.i(71753),l=e.i(90072);let s=n.forwardRef(({envMap:e,resolution:t=256,frames:r=1/0,makeDefault:s,children:u,...c},d)=>{let f=(0,a.useThree)(({set:e})=>e),h=(0,a.useThree)(({camera:e})=>e),m=(0,a.useThree)(({size:e})=>e),p=n.useRef(null);n.useImperativeHandle(d,()=>p.current,[]);let x=n.useRef(null),v=function(e,t,r){let i=(0,a.useThree)(e=>e.size),o=(0,a.useThree)(e=>e.viewport),s="number"==typeof e?e:i.width*o.dpr,u=i.height*o.dpr,c=("number"==typeof e?void 0:e)||{},{samples:d=0,depth:f,...h}=c,m=null!=f?f:c.depthBuffer,p=n.useMemo(()=>{let e=new l.WebGLRenderTarget(s,u,{minFilter:l.LinearFilter,magFilter:l.LinearFilter,type:l.HalfFloatType,...h});return m&&(e.depthTexture=new l.DepthTexture(s,u,l.FloatType)),e.samples=d,e},[]);return n.useLayoutEffect(()=>{p.setSize(s,u),d&&(p.samples=d)},[d,p,s,u]),n.useEffect(()=>()=>p.dispose(),[]),p}(t);n.useLayoutEffect(()=>{c.manual||(p.current.aspect=m.width/m.height)},[m,c]),n.useLayoutEffect(()=>{p.current.updateProjectionMatrix()});let g=0,y=null,M="function"==typeof u;return(0,o.useFrame)(t=>{M&&(r===1/0||g<r)&&(x.current.visible=!1,t.gl.setRenderTarget(v),y=t.scene.background,e&&(t.scene.background=e),t.gl.render(t.scene,p.current),t.scene.background=y,t.gl.setRenderTarget(null),x.current.visible=!0,g++)}),n.useLayoutEffect(()=>{if(s)return f(()=>({camera:p.current})),()=>f(()=>({camera:h}))},[p,s,f]),n.createElement(n.Fragment,null,n.createElement("perspectiveCamera",(0,i.default)({ref:p},c),!M&&u),n.createElement("group",{ref:x},M&&u(v.texture)))});e.s(["PerspectiveCamera",()=>s],82897);var u=e.i(88014);let c=new l.Vector3,d=new l.Vector3,f=new l.Vector3,h=new l.Vector2;function m(e,t,r){let i=c.setFromMatrixPosition(e.matrixWorld);i.project(t);let n=r.width/2,a=r.height/2;return[i.x*n+n,-(i.y*a)+a]}let p=e=>1e-10>Math.abs(e)?0:e;function x(e,t,r=""){let i="matrix3d(";for(let r=0;16!==r;r++)i+=p(t[r]*e.elements[r])+(15!==r?",":")");return r+i}let v=(t=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>x(e,t)),g=(r=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>x(e,r(t),"translate(-50%,-50%)")),y=n.forwardRef(({children:e,eps:t=.001,style:r,className:s,prepend:x,center:y,fullscreen:M,portal:P,distanceFactor:b,sprite:w=!1,transform:E=!1,occlude:T,onOcclude:R,castShadow:j,receiveShadow:S,material:C,geometry:F,zIndexRange:W=[0x1000037,0],calculatePosition:I=m,as:L="div",wrapperClass:$,pointerEvents:z="auto",...A},k)=>{let{gl:B,camera:H,scene:O,size:U,raycaster:V,events:N,viewport:_}=(0,a.useThree)(),[D]=n.useState(()=>document.createElement(L)),G=n.useRef(null),K=n.useRef(null),q=n.useRef(0),Z=n.useRef([0,0]),Y=n.useRef(null),J=n.useRef(null),Q=(null==P?void 0:P.current)||N.connected||B.domElement.parentNode,X=n.useRef(null),ee=n.useRef(!1),et=n.useMemo(()=>{var e;return T&&"blending"!==T||Array.isArray(T)&&T.length&&(e=T[0])&&"object"==typeof e&&"current"in e},[T]);n.useLayoutEffect(()=>{let e=B.domElement;T&&"blending"===T?(e.style.zIndex=`${Math.floor(W[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[T]),n.useLayoutEffect(()=>{if(K.current){let e=G.current=u.createRoot(D);if(O.updateMatrixWorld(),E)D.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=I(K.current,H,U);D.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return Q&&(x?Q.prepend(D):Q.appendChild(D)),()=>{Q&&Q.removeChild(D),e.unmount()}}},[Q,E]),n.useLayoutEffect(()=>{$&&(D.className=$)},[$]);let er=n.useMemo(()=>E?{position:"absolute",top:0,left:0,width:U.width,height:U.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:y?"translate3d(-50%,-50%,0)":"none",...M&&{top:-U.height/2,left:-U.width/2,width:U.width,height:U.height},...r},[r,y,M,U,E]),ei=n.useMemo(()=>({position:"absolute",pointerEvents:z}),[z]);n.useLayoutEffect(()=>{var t,i;ee.current=!1,E?null==(t=G.current)||t.render(n.createElement("div",{ref:Y,style:er},n.createElement("div",{ref:J,style:ei},n.createElement("div",{ref:k,className:s,style:r,children:e})))):null==(i=G.current)||i.render(n.createElement("div",{ref:k,style:er,className:s,children:e}))});let en=n.useRef(!0);(0,o.useFrame)(e=>{if(K.current){H.updateMatrixWorld(),K.current.updateWorldMatrix(!0,!1);let e=E?Z.current:I(K.current,H,U);if(E||Math.abs(q.current-H.zoom)>t||Math.abs(Z.current[0]-e[0])>t||Math.abs(Z.current[1]-e[1])>t){var r;let t,i,n,a,o=(r=K.current,t=c.setFromMatrixPosition(r.matrixWorld),i=d.setFromMatrixPosition(H.matrixWorld),n=t.sub(i),a=H.getWorldDirection(f),n.angleTo(a)>Math.PI/2),s=!1;et&&(Array.isArray(T)?s=T.map(e=>e.current):"blending"!==T&&(s=[O]));let u=en.current;s?en.current=function(e,t,r,i){let n=c.setFromMatrixPosition(e.matrixWorld),a=n.clone();a.project(t),h.set(a.x,a.y),r.setFromCamera(h,t);let o=r.intersectObjects(i,!0);if(o.length){let e=o[0].distance;return n.distanceTo(r.ray.origin)<e}return!0}(K.current,H,V,s)&&!o:en.current=!o,u!==en.current&&(R?R(!en.current):D.style.display=en.current?"block":"none");let m=Math.floor(W[0]/2),x=T?et?[W[0],m]:[m-1,0]:W;if(D.style.zIndex=`${function(e,t,r){if(t instanceof l.PerspectiveCamera||t instanceof l.OrthographicCamera){let i=c.setFromMatrixPosition(e.matrixWorld),n=d.setFromMatrixPosition(t.matrixWorld),a=i.distanceTo(n),o=(r[1]-r[0])/(t.far-t.near),l=r[1]-o*t.far;return Math.round(o*a+l)}}(K.current,H,x)}`,E){let[e,t]=[U.width/2,U.height/2],r=H.projectionMatrix.elements[5]*t,{isOrthographicCamera:i,top:n,left:a,bottom:o,right:l}=H,s=v(H.matrixWorldInverse),u=i?`scale(${r})translate(${p(-(l+a)/2)}px,${p((n+o)/2)}px)`:`translateZ(${r}px)`,c=K.current.matrixWorld;w&&((c=H.matrixWorldInverse.clone().transpose().copyPosition(c).scale(K.current.scale)).elements[3]=c.elements[7]=c.elements[11]=0,c.elements[15]=1),D.style.width=U.width+"px",D.style.height=U.height+"px",D.style.perspective=i?"":`${r}px`,Y.current&&J.current&&(Y.current.style.transform=`${u}${s}translate(${e}px,${t}px)`,J.current.style.transform=g(c,1/((b||10)/400)))}else{let t=void 0===b?1:function(e,t){if(t instanceof l.OrthographicCamera)return t.zoom;if(!(t instanceof l.PerspectiveCamera))return 1;{let r=c.setFromMatrixPosition(e.matrixWorld),i=d.setFromMatrixPosition(t.matrixWorld);return 1/(2*Math.tan(t.fov*Math.PI/180/2)*r.distanceTo(i))}}(K.current,H)*b;D.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}Z.current=e,q.current=H.zoom}}if(!et&&X.current&&!ee.current)if(E){if(Y.current){let e=Y.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){let{isOrthographicCamera:t}=H;if(t||F)A.scale&&(Array.isArray(A.scale)?A.scale instanceof l.Vector3?X.current.scale.copy(A.scale.clone().divideScalar(1)):X.current.scale.set(1/A.scale[0],1/A.scale[1],1/A.scale[2]):X.current.scale.setScalar(1/A.scale));else{let t=(b||10)/400,r=e.clientWidth*t,i=e.clientHeight*t;X.current.scale.set(r,i,1)}ee.current=!0}}}else{let t=D.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){let e=1/_.factor,r=t.clientWidth*e,i=t.clientHeight*e;X.current.scale.set(r,i,1),ee.current=!0}X.current.lookAt(e.camera.position)}});let ea=n.useMemo(()=>({vertexShader:E?void 0:`
|
|
2
|
-
/*
|
|
3
|
-
This shader is from the THREE's SpriteMaterial.
|
|
4
|
-
We need to turn the backing plane into a Sprite
|
|
5
|
-
(make it always face the camera) if "transfrom"
|
|
6
|
-
is false.
|
|
7
|
-
*/
|
|
8
|
-
#include <common>
|
|
9
|
-
|
|
10
|
-
void main() {
|
|
11
|
-
vec2 center = vec2(0., 1.);
|
|
12
|
-
float rotation = 0.0;
|
|
13
|
-
|
|
14
|
-
// This is somewhat arbitrary, but it seems to work well
|
|
15
|
-
// Need to figure out how to derive this dynamically if it even matters
|
|
16
|
-
float size = 0.03;
|
|
17
|
-
|
|
18
|
-
vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
19
|
-
vec2 scale;
|
|
20
|
-
scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
|
|
21
|
-
scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
|
|
22
|
-
|
|
23
|
-
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
|
|
24
|
-
if ( isPerspective ) scale *= - mvPosition.z;
|
|
25
|
-
|
|
26
|
-
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
|
|
27
|
-
vec2 rotatedPosition;
|
|
28
|
-
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
|
|
29
|
-
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
|
|
30
|
-
mvPosition.xy += rotatedPosition;
|
|
31
|
-
|
|
32
|
-
gl_Position = projectionMatrix * mvPosition;
|
|
33
|
-
}
|
|
34
|
-
`,fragmentShader:`
|
|
35
|
-
void main() {
|
|
36
|
-
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
37
|
-
}
|
|
38
|
-
`}),[E]);return n.createElement("group",(0,i.default)({},A,{ref:K}),T&&!et&&n.createElement("mesh",{castShadow:j,receiveShadow:S,ref:X},F||n.createElement("planeGeometry",null),C||n.createElement("shaderMaterial",{side:l.DoubleSide,vertexShader:ea.vertexShader,fragmentShader:ea.fragmentShader})))});e.s(["Html",()=>y],60099)},8418,e=>{"use strict";var t=e.i(43476),r=e.i(71645),i=e.i(15080),n=e.i(30297),a=e.i(82897),o=e.i(60099),l=e.i(43257),s=e.i(90072),u=e.i(67561),c=e.i(66326),d=e.i(85709);let f=(e,t,r,i)=>{let n=e*Math.PI/180,a=r*Math.PI/180,o=(r-e)*Math.PI/180,l=(i-t)*Math.PI/180,s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(n)*Math.cos(a)*Math.sin(l/2)*Math.sin(l/2);return 2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s))*6371e3},h=()=>{let e=(0,r.useRef)(),[i,n]=(0,r.useState)(null),{subscribe:a,unsubscribe:o}=(0,u.useOcearoContext)(),l=(0,d.useSignalKPath)("navigation.position");return(0,r.useEffect)(()=>{l&&!i&&n({latitude:l.latitude,longitude:l.longitude})},[l,i]),(0,r.useEffect)(()=>{if(e.current){let t=new s.BufferGeometry,r=[];for(let e=0;e<=64;e++){let t=e/64*Math.PI*2;r.push(50*Math.cos(t),0,50*Math.sin(t))}t.setAttribute("position",new s.Float32BufferAttribute(r,3)),e.current.geometry=t}},[]),(0,r.useEffect)(()=>{if(!i||!l||!e.current)return;let t=f(i.latitude,i.longitude,i.latitude,l.longitude),r=f(i.latitude,i.longitude,l.latitude,i.longitude),n=l.longitude>i.longitude?t:-t,a=l.latitude>i.latitude?r:-r;e.current.position.set(n,-6.9,a)},[i,l]),(0,t.jsx)("line",{ref:e,children:(0,t.jsx)("lineBasicMaterial",{attach:"material",color:u.oYellow,linewidth:3,transparent:!0,opacity:.6})})};e.s(["default",0,({onUpdateInfoPanel:e})=>{let d=(0,r.useRef)(),{size:f}=(0,i.useThree)(),{nightMode:m}=(0,u.useOcearoContext)(),p=f.width/f.height;return(0,t.jsxs)(r.Suspense,{fallback:(0,t.jsx)(o.Html,{children:"Loading..."}),children:[(0,t.jsx)(a.PerspectiveCamera,{makeDefault:!0,fov:25,aspect:p,near:1,far:1e3,position:[32,10,-32]}),(0,t.jsx)(n.OrbitControls,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4}),(0,t.jsx)(l.Environment,{files:"./assets/ocearo_env.hdr",background:!1}),(0,t.jsx)("ambientLight",{intensity:.2}),(0,t.jsx)("directionalLight",{position:[15,30,20],intensity:1.2,castShadow:!1,color:m?"#b0d8ff":"#ffffff"}),(0,t.jsx)("spotLight",{position:[0,50,100],intensity:.8,angle:.6,penumbra:1,color:m?"#4080ff":"#ffffff"}),(0,t.jsx)("pointLight",{position:[-10,10,-10],intensity:.5}),(0,t.jsx)(c.default,{ref:d,scale:[1.3,1.3,1.3],position:[0,-6,0],onUpdateInfoPanel:e}),(0,t.jsx)(h,{}),(0,t.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],position:[0,-7,0],receiveShadow:!0,children:[(0,t.jsx)("planeGeometry",{args:[100,100]}),(0,t.jsx)("shaderMaterial",{uniforms:{uColor:{value:new s.Color(m?"#050505":"#0a0a0a")},uBlurRadius:{value:.15}},vertexShader:`
|
|
39
|
-
varying vec2 vUv;
|
|
40
|
-
void main() {
|
|
41
|
-
vUv = uv;
|
|
42
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
43
|
-
}
|
|
44
|
-
`,fragmentShader:`
|
|
45
|
-
uniform vec3 uColor;
|
|
46
|
-
uniform float uBlurRadius;
|
|
47
|
-
varying vec2 vUv;
|
|
48
|
-
|
|
49
|
-
void main() {
|
|
50
|
-
float distanceToCenter = length(vUv - vec2(0.5));
|
|
51
|
-
float alpha = smoothstep(0.5 - uBlurRadius, 0.5 + uBlurRadius, distanceToCenter);
|
|
52
|
-
gl_FragColor = vec4(uColor, 1.0 - alpha);
|
|
53
|
-
}
|
|
54
|
-
`})]})]})}],8418)},69675,e=>{e.n(e.i(8418))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,91440,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(46932),o=e.i(88653),n=e.i(67561),i=e.i(46991),l=e.i(85709),d=e.i(66799),r=e.i(83402),c=e.i(48390),u=e.i(49721),x=e.i(68757);e.i(85269);var h=e.i(22831);function g(){let{t:e}=(0,h.useTranslation)(),g=r.default.get("debugMode"),m=(0,a.useMemo)(()=>["navigation.headingTrue","navigation.headingMagnetic","environment.wind.angleApparent","steering.rudderAngle","steering.autopilot.state","steering.autopilot.mode","steering.autopilot.target.headingTrue","steering.autopilot.target.windAngleApparent"],[]),b=(0,l.useSignalKPaths)(m),f=b["navigation.headingTrue"]||b["navigation.headingMagnetic"];b["environment.wind.angleApparent"],b["steering.rudderAngle"];let[v,j]=(0,a.useState)("control"),{nightMode:y}=(0,n.useOcearoContext)(),N="text-hud-main",w=y?"text-oNight":"text-hud-secondary",C=y?"text-oNight/70":"text-hud-muted",[k,T]=(0,a.useState)(null),[A,S]=(0,a.useState)([]),[$,R]=(0,a.useState)("default"),[P,G]=(0,a.useState)(!0),[L,I]=(0,a.useState)(null),[M,D]=(0,a.useState)(!1),[F,B]=(0,a.useState)(null),[O,U]=(0,a.useState)(!1),E=a.default.useRef(b);E.current=b;let H=(0,a.useCallback)(async()=>{try{I(null);let e=await d.default.isAutopilotAvailable();if(D(e),!e){let e=E.current,t=e["steering.autopilot.state"],a=e["steering.autopilot.mode"],s=e["steering.autopilot.target.headingTrue"]||e["steering.autopilot.target.windAngleApparent"];T({state:t||(g?"standby":"off-line"),mode:a||(g?"compass":null),target:s||(g?1.57:null),engaged:"enabled"===t});return}let t=await d.default.getAutopilotDevices();S(t),t.length>0&&!t.includes($)&&R(t[0]);let a=await d.default.getAutopilotData($);T(a)}catch(e){console.error("AutopilotView: Failed to fetch autopilot data:",e),I(e.message)}finally{G(!1)}},[$,g]),Z=(0,a.useCallback)(async()=>{try{let e=await (0,c.makeOcearoCoreApiCall)("/api/controller/config");B(e),U(e?.connected||!1)}catch(e){console.warn("AutopilotView: Could not fetch controller config:",e.message),B(null)}},[]);(0,a.useEffect)(()=>{H(),Z();let e=setInterval(()=>{H()},2e3);return()=>clearInterval(e)},[H,Z]);let K=async()=>{try{I(null),await d.default.engageAutopilot($),await H()}catch(t){I(e("autopilot.failedToEngage",{message:t.message}))}},Y=async()=>{try{I(null),await d.default.disengageAutopilot($),await H()}catch(t){I(e("autopilot.failedToDisengage",{message:t.message}))}},z=async t=>{try{I(null),await d.default.setAutopilotMode(t,$),await H()}catch(t){I(e("autopilot.failedToSetMode",{message:t.message}))}},V=async t=>{try{I(null);let e=t*Math.PI/180;await d.default.adjustAutopilotTarget(e,$),await H()}catch(t){I(e("autopilot.failedToAdjustHeading",{message:t.message}))}},X=async t=>{try{I(null);let e=t*Math.PI/180;await d.default.setAutopilotTarget(e,$),await H()}catch(t){I(e("autopilot.failedToSetHeading",{message:t.message}))}},q=async t=>{try{I(null),await d.default.autopilotTack(t,$),await H()}catch(t){I(e("autopilot.failedToTack",{message:t.message}))}},J=async t=>{try{I(null),await d.default.autopilotGybe(t,$),await H()}catch(t){I(e("autopilot.failedToGybe",{message:t.message}))}},W=async t=>{try{await (0,c.makeOcearoCoreApiCall)("/api/controller/config",{method:"PUT",body:JSON.stringify(t)}),B(t)}catch(t){I(e("autopilot.failedToSaveConfig",{message:t.message}))}},Q=e=>{switch(e){case"compass":default:return x.faCompass;case"wind":return x.faWind;case"gps":return x.faSatellite;case"route":return x.faRoute;case"dodge":return x.faAnchor}},_=e=>{if(null==e)return"---°";let t=(0,i.toDegrees)(e);return`${t}\xb0`};return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-rightPaneBg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex border-b border-hud bg-hud-bg",children:[{id:"control",label:e("autopilot.control"),icon:x.faCompass},{id:"controller",label:e("autopilot.controller"),icon:x.faGamepad}].map(e=>(0,t.jsxs)("button",{onClick:()=>j(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${v===e.id?"text-oGreen border-b-2 border-oGreen bg-hud-bg":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:e.icon,className:"mr-2"}),e.label]},e.id))}),(0,t.jsx)(o.AnimatePresence,{children:L&&(0,t.jsxs)(s.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"bg-oRed/20 text-oRed p-3 rounded-lg mx-4 mt-4 border border-oRed/30",children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faExclamationTriangle,className:"mr-2"}),L]})}),A.length>1&&(0,t.jsx)("div",{className:"px-4 pt-4",children:(0,t.jsx)("select",{value:$,onChange:e=>R(e.target.value),className:"bg-hud-elevated text-hud-main rounded px-3 py-2 w-full border border-hud focus:border-oGreen/50 focus:outline-none transition-all",children:A.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-auto scrollbar-hide",children:(0,t.jsx)(o.AnimatePresence,{mode:"wait",children:P?(0,t.jsx)(s.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex items-center justify-center h-32",children:(0,t.jsx)("div",{className:"text-hud-main",children:"Loading..."})},"loading"):(0,t.jsx)(s.motion.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.4,ease:"easeOut"},className:"p-3",children:"control"===v?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-center",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`text-2xl mb-1 ${(e=>{switch(e){case"enabled":return"text-oGreen";case"standby":return"text-oYellow";case"disabled":default:return"text-hud-muted";case"off-line":return"text-oRed"}})(k?.state)}`,children:(0,t.jsx)(u.FontAwesomeIcon,{icon:(e=>{switch(e){case"enabled":return x.faCheckCircle;case"standby":return x.faPause;case"disabled":return x.faBan;case"off-line":return x.faTimesCircle;default:return x.faExclamationTriangle}})(k?.state)})}),(0,t.jsx)("div",{className:`text-xs ${w} font-bold`,children:e("autopilot.state")}),(0,t.jsx)("div",{className:`text-sm ${N} font-black capitalize`,children:k?.state||e("autopilot.unknown")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-2xl mb-1 text-oBlue",children:(0,t.jsx)(u.FontAwesomeIcon,{icon:Q(k?.mode)})}),(0,t.jsx)("div",{className:`text-xs ${w} font-bold`,children:e("autopilot.mode")}),(0,t.jsx)("div",{className:`text-sm ${N} font-black capitalize`,children:k?.mode||e("autopilot.none")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-2xl mb-1 text-oYellow",children:(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faLocationArrow})}),(0,t.jsx)("div",{className:`text-xs ${w} font-bold`,children:e("autopilot.target")}),(0,t.jsx)("div",{className:`text-sm ${N} font-black`,children:_(k?.target)})]})]}),(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t border-hud text-center",children:[(0,t.jsx)("div",{className:`text-xs ${w} font-bold uppercase`,children:e("autopilot.currentHeading")}),(0,t.jsx)("div",{className:`text-4xl font-black ${N}`,children:_(f)})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("button",{onClick:K,disabled:k?.state==="enabled"||k?.state==="off-line",className:`py-3 rounded font-black text-base uppercase transition-all ${k?.state==="enabled"?"bg-hud-bg text-hud-dim cursor-not-allowed border border-hud":"bg-oGreen hover:bg-green-600 text-hud-main shadow-lg shadow-oGreen/20"}`,children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faPlay,className:"mr-2"}),e("autopilot.engage")]}),(0,t.jsxs)("button",{onClick:Y,disabled:k?.state!=="enabled",className:`py-3 rounded font-black text-base uppercase transition-all ${k?.state!=="enabled"?"bg-hud-bg text-hud-dim cursor-not-allowed border border-hud":"bg-oRed hover:bg-red-600 text-hud-main shadow-lg shadow-oRed/20"}`,children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faStop,className:"mr-2"}),e("autopilot.disengage")]})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${w} mb-3`,children:e("autopilot.modeSelection")}),(0,t.jsx)("div",{className:"grid grid-cols-4 gap-2",children:["compass","wind","gps","route"].map(e=>(0,t.jsxs)("button",{onClick:()=>z(e),className:`py-2 rounded font-bold transition-all flex flex-col items-center border ${k?.mode===e?"bg-oBlue text-hud-main border-oBlue shadow-lg shadow-oBlue/20":"bg-hud-bg text-hud-secondary border-hud hover:bg-hud-elevated"}`,children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:Q(e),className:"text-lg mb-1"}),(0,t.jsx)("span",{className:"text-xs uppercase",children:e})]},e))})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${w} mb-3`,children:e("autopilot.targetAdjustment")}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-2",children:[(0,t.jsx)("button",{onClick:()=>V(-10),className:"py-3 bg-oRed/40 hover:bg-oRed/60 text-hud-main rounded border border-oRed/50 font-black text-sm",children:"-10°"}),(0,t.jsx)("button",{onClick:()=>V(-1),className:"py-3 bg-oRed/20 hover:bg-oRed/40 text-hud-main rounded border border-oRed/30 font-black text-sm",children:"-1°"}),(0,t.jsx)("button",{onClick:()=>V(1),className:"py-3 bg-oGreen/20 hover:bg-oGreen/40 text-hud-main rounded border border-oGreen/30 font-black text-sm",children:"+1°"}),(0,t.jsx)("button",{onClick:()=>V(10),className:"py-3 bg-oGreen/40 hover:bg-oGreen/60 text-hud-main rounded border border-oGreen/50 font-black text-sm",children:"+10°"})]}),(0,t.jsxs)("button",{onClick:()=>f&&X((0,i.toDegrees)(f)),disabled:!f,className:"w-full mt-3 py-2.5 bg-hud-bg hover:bg-hud-elevated text-hud-main rounded border border-hud font-bold text-xs uppercase",children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faCompass,className:"mr-2"}),e("autopilot.syncTargetToHeading")]})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${w} mb-3`,children:e("autopilot.maneuvers")}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${C} mb-2 text-center`,children:e("autopilot.tack")}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)("button",{onClick:()=>q("port"),className:"py-2 bg-hud-bg hover:bg-hud-elevated text-hud-main rounded border border-hud font-bold text-xs",children:e("autopilot.port")}),(0,t.jsx)("button",{onClick:()=>q("starboard"),className:"py-2 bg-hud-bg hover:bg-hud-elevated text-hud-main rounded border border-hud font-bold text-xs",children:e("autopilot.stbd")})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${C} mb-2 text-center`,children:e("autopilot.gybe")}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)("button",{onClick:()=>J("port"),className:"py-2 bg-hud-bg hover:bg-hud-elevated text-hud-main rounded border border-hud font-bold text-xs",children:e("autopilot.port")}),(0,t.jsx)("button",{onClick:()=>J("starboard"),className:"py-2 bg-hud-bg hover:bg-hud-elevated text-hud-main rounded border border-hud font-bold text-xs",children:e("autopilot.stbd")})]})]})]})]})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faGamepad,className:`text-xl ${O?"text-oGreen":"text-hud-muted"}`}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:`text-sm font-bold ${N}`,children:e("autopilot.controller")}),(0,t.jsx)("div",{className:`text-xs ${O?"text-oGreen":"text-hud-muted"} font-bold`,children:O?e("autopilot.connected"):e("autopilot.notConnected")})]})]}),(0,t.jsx)("button",{onClick:Z,className:"p-2 text-hud-secondary hover:text-hud-main",children:(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faSync,className:"text-sm"})})]}),!O&&(0,t.jsxs)("div",{className:`text-xs ${C} bg-hud-elevated border border-hud rounded p-2.5 font-bold`,children:[(0,t.jsx)(u.FontAwesomeIcon,{icon:x.faExclamationTriangle,className:"text-oYellow mr-2"}),e("autopilot.connectController")]})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${w} mb-3`,children:e("autopilot.buttonMappings")}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p,{label:e("autopilot.engageAutopilot"),button:F?.mappings?.engage||"X",onChange:e=>W({...F,mappings:{...F?.mappings,engage:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)(p,{label:e("autopilot.disengageAutopilot"),button:F?.mappings?.disengage||"Circle",onChange:e=>W({...F,mappings:{...F?.mappings,disengage:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)("div",{className:"border-t border-hud pt-2 mt-2",children:(0,t.jsx)("div",{className:`text-xs font-black uppercase ${C} mb-2`,children:e("autopilot.headingControl")})}),(0,t.jsx)(p,{label:e("autopilot.headingMinus1"),button:F?.mappings?.headingMinus1||"D-Pad Left",onChange:e=>W({...F,mappings:{...F?.mappings,headingMinus1:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)(p,{label:e("autopilot.headingPlus1"),button:F?.mappings?.headingPlus1||"D-Pad Right",onChange:e=>W({...F,mappings:{...F?.mappings,headingPlus1:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)(p,{label:e("autopilot.headingMinus10"),button:F?.mappings?.headingMinus10||"L1",onChange:e=>W({...F,mappings:{...F?.mappings,headingMinus10:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)(p,{label:e("autopilot.headingPlus10"),button:F?.mappings?.headingPlus10||"R1",onChange:e=>W({...F,mappings:{...F?.mappings,headingPlus10:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)("div",{className:"border-t border-hud pt-2 mt-2",children:(0,t.jsx)("div",{className:`text-xs font-black uppercase ${C} mb-2`,children:e("autopilot.rudderControl")})}),(0,t.jsx)(p,{label:e("autopilot.rudderLeft"),button:F?.mappings?.rudderLeft||"Left Stick Left",onChange:e=>W({...F,mappings:{...F?.mappings,rudderLeft:e}}),primaryTextClass:N,secondaryTextClass:w}),(0,t.jsx)(p,{label:e("autopilot.rudderRight"),button:F?.mappings?.rudderRight||"Left Stick Right",onChange:e=>W({...F,mappings:{...F?.mappings,rudderRight:e}}),primaryTextClass:N,secondaryTextClass:w})]})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 border border-hud bg-hud-bg",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase ${w} mb-3`,children:e("autopilot.sensitivity")}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex justify-between mb-1",children:[(0,t.jsx)("span",{className:`text-xs font-bold ${N}`,children:e("autopilot.rudderSensitivity")}),(0,t.jsxs)("span",{className:`text-xs font-bold ${w}`,children:[F?.sensitivity?.rudder||50,"%"]})]}),(0,t.jsx)("input",{type:"range",min:"10",max:"100",value:F?.sensitivity?.rudder||50,onChange:e=>W({...F,sensitivity:{...F?.sensitivity,rudder:parseInt(e.target.value)}}),className:"w-full h-1.5 bg-hud-elevated rounded-full appearance-none cursor-pointer accent-oGreen"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex justify-between mb-1",children:[(0,t.jsx)("span",{className:`text-xs font-bold ${N}`,children:e("autopilot.deadZone")}),(0,t.jsxs)("span",{className:`text-xs font-bold ${w}`,children:[F?.sensitivity?.deadZone||10,"%"]})]}),(0,t.jsx)("input",{type:"range",min:"0",max:"30",value:F?.sensitivity?.deadZone||10,onChange:e=>W({...F,sensitivity:{...F?.sensitivity,deadZone:parseInt(e.target.value)}}),className:"w-full h-1.5 bg-hud-elevated rounded-full appearance-none cursor-pointer accent-oGreen"})]})]})]})]})},v)})})]})}let p=({label:e,button:s,onChange:o,primaryTextClass:n,secondaryTextClass:i})=>{let[l,d]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"flex items-center justify-between py-2",children:[(0,t.jsx)("span",{className:`text-sm ${n}`,children:e}),l?(0,t.jsx)("select",{value:s,onChange:e=>{o(e.target.value),d(!1)},onBlur:()=>d(!1),autoFocus:!0,className:"bg-hud-elevated text-hud-main rounded px-2 py-1 text-sm border border-hud focus:border-oGreen/50 focus:outline-none transition-all",children:["X","Circle","Square","Triangle","L1","R1","L2","R2","D-Pad Up","D-Pad Down","D-Pad Left","D-Pad Right","Left Stick Up","Left Stick Down","Left Stick Left","Left Stick Right","Right Stick Up","Right Stick Down","Right Stick Left","Right Stick Right","L3","R3","Options","Share","PS"].map(e=>(0,t.jsx)("option",{value:e,children:e},e))}):(0,t.jsx)("button",{onClick:()=>d(!0),className:`px-3 py-1 bg-hud-elevated rounded text-sm ${i} hover:bg-hud-bg border border-hud transition-all`,children:s})]})};e.s(["default",()=>g])},33946,e=>{e.n(e.i(91440))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87628,e=>{"use strict";var s=e.i(43476),t=e.i(71645),a=e.i(46932);e.i(85269);var r=e.i(22831),l=e.i(83402),n=e.i(67561),d=e.i(18850);let c=({color:e})=>(0,s.jsx)("span",{className:`inline-block w-2.5 h-2.5 rounded-full ${e} animate-pulse ml-2 shrink-0`});e.s(["default",0,({onSave:e})=>{let{t:i,i18n:o}=(0,r.useTranslation)(),{theme:u,setTheme:h}=(0,n.useOcearoContext)(),p=l.default.getAll(),x=l.default.getComputedSignalKUrl(),m=l.default.getBoatsData(),[g,b]=(0,t.useState)(p),[f,j]=(0,t.useState)(p.useAuthentication||!!p.username||!!p.password),[N,v]=(0,t.useState)(p.signalKUrlSet||!1),[k,w]=(0,t.useState)(null),[y,C]=(0,t.useState)(!1),[B,U]=(0,t.useState)({visible:!1,message:""}),[S,T]=(0,t.useState)("system"),A=(0,t.useCallback)(e=>{C(JSON.stringify(e)!==JSON.stringify(p))},[p]);(0,t.useEffect)(()=>{(async()=>{let e=l.default.getAll();b(e),v(e.signalKUrlSet||!1),j(e.useAuthentication||!!e.username||!!e.password),e.selectedBoat&&w(m.find(s=>s.name===e.selectedBoat)||null)})()},[m]);let D=s=>{let t={...g,...s};b(t),A(t);let a={...t};s.theme&&s.theme!==u&&h(s.theme),s.hasOwnProperty("signalKUrlSet")?!1===s.signalKUrlSet&&(a.signalkUrl=x,a.username="",a.password="",a.useAuthentication=!1):N||s.hasOwnProperty("signalkUrl")||(a.signalkUrl=x,a.username="",a.password=""),s.hasOwnProperty("useAuthentication")&&(a.useAuthentication=s.useAuthentication,s.useAuthentication||(a.username="",a.password="")),l.default.saveConfig(a),e?.(a),C(!1),U({visible:!0,message:i("settings.savedAuto")}),setTimeout(()=>U({visible:!1,message:""}),2e3)};return(0,s.jsxs)("div",{className:"p-8 text-hud-main w-full relative",children:[(0,s.jsxs)("header",{className:"mb-10 flex justify-between items-start sm:items-center relative min-h-[4rem]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl font-black uppercase tracking-tighter mb-1",children:i("settings.title")}),(0,s.jsx)("p",{className:"text-hud-secondary text-sm font-medium uppercase tracking-widest",children:i("settings.subtitle")})]}),B.visible&&(0,s.jsx)(a.motion.span,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"absolute right-0 top-0 sm:relative text-xs font-black bg-oGreen/20 text-oGreen border border-oGreen/30 px-4 py-2 rounded-full uppercase tracking-widest whitespace-nowrap",children:B.message})]}),(0,s.jsxs)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud mb-8",children:[(0,s.jsx)("button",{onClick:()=>T("system"),className:`flex-1 py-3 px-6 text-xs font-black uppercase tracking-widest transition-all rounded-lg ${"system"===S?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main"}`,children:i("settings.tabSystem")}),(0,s.jsx)("button",{onClick:()=>T("interface"),className:`flex-1 py-3 px-6 text-xs font-black uppercase tracking-widest transition-all rounded-lg ${"interface"===S?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main"}`,children:i("settings.tabInterface")})]}),(0,s.jsx)("div",{className:"space-y-8",children:"system"===S?(0,s.jsxs)("div",{className:"space-y-8 animate-in fade-in duration-500",children:[(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.connection")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover",children:[(0,s.jsxs)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[i("settings.signalkServer"),!N&&(0,s.jsx)(c,{color:"bg-oBlue"})]}),(0,s.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:N,onChange:e=>{v(e.target.checked),D({signalKUrlSet:e.target.checked})}}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),!N&&(0,s.jsxs)("div",{className:"p-4 rounded-xl bg-hud-bg border border-hud",children:[(0,s.jsx)("span",{className:"text-xs font-bold uppercase tracking-widest text-hud-muted block mb-1",children:i("settings.detectedUrl")}),(0,s.jsx)("span",{className:"text-sm font-mono text-oBlue",children:x})]})]}),N&&(0,s.jsxs)(a.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.customEndpoint")}),(0,s.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors font-mono",placeholder:"https://your-signalk-server.local",value:g.signalkUrl||"",onChange:e=>D({signalkUrl:e.target.value})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover",children:[(0,s.jsxs)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[i("settings.authentication"),N&&!f&&(0,s.jsx)(c,{color:"bg-oBlue"})]}),(0,s.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:f,onChange:e=>{j(e.target.checked),D({useAuthentication:e.target.checked})}}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),f&&(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.username")}),(0,s.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors",value:g.username||"",onChange:e=>D({username:e.target.value})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.password")}),(0,s.jsx)("input",{type:"password",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors",value:g.password||"",onChange:e=>D({password:e.target.value})})]})]})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.vessel")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.activeProfile")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.selectedBoat||"",onChange:e=>{let s=e.target.value;w(m.find(e=>e.name===s)||null),D({selectedBoat:s})},children:[(0,s.jsx)("option",{value:"",className:"bg-hud-bg",children:i("settings.selectVessel")}),m.map(e=>(0,s.jsx)("option",{value:e.name,className:"bg-hud-bg",children:e.name},e.name))]})]}),k&&(0,s.jsxs)("div",{className:"p-4 rounded-xl bg-oBlue/10 border border-oBlue/20 space-y-1",children:[(0,s.jsx)("div",{className:"text-xs font-black uppercase tracking-widest text-oBlue mb-2",children:i("settings.specifications")}),(0,s.jsxs)("div",{className:"text-sm font-medium",children:[i("settings.model"),": ",(0,s.jsx)("span",{className:"text-hud-main",children:k.modelPath})]}),(0,s.jsxs)("div",{className:"text-sm font-medium",children:[i("settings.capabilities"),": ",(0,s.jsx)("span",{className:"text-hud-main",children:k.capabilities?.join(", ")})]})]})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.advanced")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[i("settings.debugMode"),g.debugMode&&(0,s.jsx)(c,{color:"bg-yellow-400"})]}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:i("settings.debugModeDesc")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.debugMode||!1,onChange:e=>{let s={debugMode:e.target.checked};!N&&e.target.checked&&(s.signalkUrl="https://demo.signalk.org:443"),D(s)}}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 border-oRed/10",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-oRed/80",children:i("settings.critical")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-oRed/5 mx-4"})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-oRed/5 border border-oRed/10",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-oRed/80",children:i("settings.factoryReset")}),(0,s.jsx)("p",{className:"text-xs text-oRed/40 font-medium uppercase tracking-wider",children:i("settings.factoryResetDesc")})]}),(0,s.jsx)("button",{onClick:()=>{let e=l.default.getDefaultConfig();b(e),j(!1),e.useAuthentication=!1,v(!1),e.signalKUrlSet=!1,e.showCustomUrls=!1,e.customExternalUrls={},l.default.saveConfig(e),C(!1)},className:"bg-oRed/20 text-oRed border border-oRed/30 px-6 py-2 rounded-xl text-xs font-black uppercase tracking-widest hover:bg-oRed hover:text-hud-main transition-all duration-300 shadow-lg shadow-oRed/10",children:i("common.reset")})]})]})]}):(0,s.jsxs)("div",{className:"space-y-8 animate-in fade-in duration-500",children:[(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.appearance")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.themeMode")}),(0,s.jsx)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud",children:["dark","light"].map(e=>(0,s.jsx)("button",{onClick:()=>D({theme:e}),className:`flex-1 py-3 px-4 rounded-lg text-xs font-black uppercase tracking-widest transition-all ${g.theme===e?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main"}`,children:e},e))})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.uiAccents")}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover self-end h-[60px]",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.metallic")}),(0,s.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.metallicEffect||!1,onChange:e=>D({metallicEffect:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),(0,s.jsxs)("div",{className:"p-2 rounded-xl bg-hud-bg border border-hud flex items-center space-x-4",children:[(0,s.jsx)("input",{type:"color",className:"w-12 h-10 bg-transparent cursor-pointer rounded overflow-hidden border-none",value:g.primaryColor||"#09bfff",onChange:e=>D({primaryColor:e.target.value})}),(0,s.jsx)("span",{className:"text-xs font-mono uppercase text-hud-main/60",children:g.primaryColor||"#09bfff"})]})]})]})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.language")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.languageDesc")}),(0,s.jsx)("div",{className:"grid grid-cols-3 md:grid-cols-4 gap-1 bg-hud-bg p-1 rounded-xl border border-hud",children:d.SUPPORTED_LANGUAGES.map(e=>(0,s.jsxs)("button",{onClick:()=>{o.changeLanguage(e.code),D({language:e.code})},className:`py-3 px-2 rounded-lg text-xs font-black uppercase tracking-widest transition-all flex items-center justify-center space-x-2 ${(g.language||"en")===e.code?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main"}`,children:[(0,s.jsx)("span",{children:e.flag}),(0,s.jsx)("span",{children:e.label})]},e.code))})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.navigationHud")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.compassOrientation")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:g.compassNorthUp?i("settings.northAtTop"):i("settings.northAtBottom")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.compassNorthUp||!1,onChange:e=>D({compassNorthUp:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.hide3DCompass")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:g.hide3DCompass?i("settings.hidden"):i("settings.visible")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.hide3DCompass||!1,onChange:e=>D({hide3DCompass:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.hideTrueWind")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:g.hideTrueWind?i("settings.hidden"):i("settings.visible")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.hideTrueWind||!1,onChange:e=>D({hideTrueWind:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.attitudeIndicator")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:!1!==g.showAttitudeIndicator?i("settings.visible"):i("settings.hidden")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==g.showAttitudeIndicator,onChange:e=>D({showAttitudeIndicator:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.sailTrimSliders")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:!1!==g.showSailTrimSliders?i("settings.visible"):i("settings.hidden")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==g.showSailTrimSliders,onChange:e=>D({showSailTrimSliders:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.rigging")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:!1!==g.showRigging?i("settings.visible"):i("settings.hidden")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==g.showRigging,onChange:e=>D({showRigging:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})})]}),(0,s.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,s.jsxs)("div",{className:"flex justify-between items-end",children:[(0,s.jsxs)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:[i("settings.aisLengthScaling"),(0,s.jsx)("span",{className:"block text-xs text-hud-muted font-medium mt-1 uppercase",children:i("settings.mapTargetVisibility")})]}),(0,s.jsx)("span",{className:"text-xl font-black text-oBlue bg-oBlue/10 px-3 py-1 rounded-lg",children:g.aisLengthScalingFactor||.7})]}),(0,s.jsx)("input",{type:"range",className:"w-full h-1.5 bg-hud-bg-elevated rounded-lg appearance-none cursor-pointer accent-oBlue",min:"0.1",max:"2.0",step:"0.1",value:g.aisLengthScalingFactor||.7,onChange:e=>D({aisLengthScalingFactor:parseFloat(e.target.value)})})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.unitsValues")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.distanceUnits")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.distanceUnits||"nm",onChange:e=>D({distanceUnits:e.target.value}),children:[(0,s.jsx)("option",{value:"nm",className:"bg-hud-bg",children:"Nautical Miles"}),(0,s.jsx)("option",{value:"km",className:"bg-hud-bg",children:"Kilometres"}),(0,s.jsx)("option",{value:"mi",className:"bg-hud-bg",children:"Miles"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.depthUnits")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.depthUnits||"m",onChange:e=>D({depthUnits:e.target.value}),children:[(0,s.jsx)("option",{value:"m",className:"bg-hud-bg",children:"metres"}),(0,s.jsx)("option",{value:"ft",className:"bg-hud-bg",children:"feet"}),(0,s.jsx)("option",{value:"fa",className:"bg-hud-bg",children:"fathoms"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.speedUnits")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.speedUnits||"kn",onChange:e=>D({speedUnits:e.target.value}),children:[(0,s.jsx)("option",{value:"kn",className:"bg-hud-bg",children:"knots"}),(0,s.jsx)("option",{value:"km/h",className:"bg-hud-bg",children:"km/h"}),(0,s.jsx)("option",{value:"mph",className:"bg-hud-bg",children:"mph"}),(0,s.jsx)("option",{value:"m/s",className:"bg-hud-bg",children:"m/s"})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.temperatureUnits")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.temperatureUnits||"C",onChange:e=>D({temperatureUnits:e.target.value}),children:[(0,s.jsx)("option",{value:"C",className:"bg-hud-bg",children:"Celsius"}),(0,s.jsx)("option",{value:"F",className:"bg-hud-bg",children:"Fahrenheit"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.positionFormat")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:g.positionFormat||"DD",onChange:e=>D({positionFormat:e.target.value}),children:[(0,s.jsx)("option",{value:"DD",className:"bg-hud-bg",children:"-128.12345"}),(0,s.jsx)("option",{value:"DM",className:"bg-hud-bg",children:"-128° 07.407'"}),(0,s.jsx)("option",{value:"DMS",className:"bg-hud-bg",children:"-128° 07' 24.4\""})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.preferTrueValues")}),(0,s.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:!1!==g.preferTrueValues?"true":"false",onChange:e=>D({preferTrueValues:"true"===e.target.value}),children:[(0,s.jsx)("option",{value:"true",className:"bg-hud-bg",children:i("settings.preferTrue")}),(0,s.jsx)("option",{value:"false",className:"bg-hud-bg",children:i("settings.preferMagnetic")})]})]})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.preferredPaths")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.trueWindSpeed")}),(0,s.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"speedTrue",label:i("settings.pathSpeedTrue")},{value:"speedApparent",label:i("settings.pathSpeedApparent")}].map(e=>(0,s.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"preferredWindSpeedPath",value:e.value,checked:(g.preferredWindSpeedPath||"speedTrue")===e.value,onChange:e=>D({preferredWindSpeedPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,s.jsx)("span",{className:"text-sm text-hud-main",children:e.label})]},e.value))})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.trueWindDirection")}),(0,s.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"directionTrue",label:i("settings.pathDirectionTrue")},{value:"angleApparent",label:i("settings.pathAngleApparent")},{value:"angleTrueWater",label:i("settings.pathAngleTrueWater")}].map(e=>(0,s.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"preferredWindDirectionPath",value:e.value,checked:(g.preferredWindDirectionPath||"directionTrue")===e.value,onChange:e=>D({preferredWindDirectionPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,s.jsx)("span",{className:"text-sm text-hud-main",children:e.label})]},e.value))})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:i("settings.headingCog")}),(0,s.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"courseOverGroundTrue",label:i("settings.pathCourseOverGroundTrue")},{value:"headingTrue",label:i("settings.pathHeadingTrue")},{value:"courseOverGroundMagnetic",label:i("settings.pathCourseOverGroundMagnetic")},{value:"headingMagnetic",label:i("settings.pathHeadingMagnetic")}].map(e=>(0,s.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"preferredHeadingPath",value:e.value,checked:(g.preferredHeadingPath||"courseOverGroundTrue")===e.value,onChange:e=>D({preferredHeadingPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,s.jsx)("span",{className:"text-sm text-hud-main",children:e.label})]},e.value))})]})]})]}),(0,s.jsxs)("section",{className:"tesla-card p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,s.jsx)("h2",{className:"text-lg font-black uppercase tracking-widest text-hud-main/90",children:i("settings.externalLinks")}),(0,s.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,s.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,s.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest text-hud-secondary",children:i("settings.customToolUrls")}),(0,s.jsx)("p",{className:"text-xs text-hud-muted font-medium uppercase tracking-wider",children:i("settings.customToolUrlsDesc")})]}),(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:g.showCustomUrls||!1,onChange:e=>D({showCustomUrls:e.target.checked})}),(0,s.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),g.showCustomUrls&&(0,s.jsx)(a.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"space-y-6 pt-4 border-t border-hud",children:(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[{id:"navigation",label:i("settings.urlNavigation"),placeholder:"${signalkUrl}/@signalk/freeboard-sk/"},{id:"instrument",label:i("settings.urlInstruments"),placeholder:"${signalkUrl}/@mxtommy/kip/"},{id:"dashboard",label:i("settings.urlMetrics"),placeholder:"${signalkUrl}/grafana"},{id:"webcam1",label:i("settings.urlWebcamAlpha"),placeholder:"https://example.com/stream1"},{id:"webcam2",label:i("settings.urlWebcamBeta"),placeholder:"https://example.com/stream2"},{id:"weather",label:i("settings.urlAtmospheric"),placeholder:"https://windy.com/..."}].map(e=>(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-black uppercase tracking-widest text-hud-secondary ml-1",children:e.label}),(0,s.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-sm text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors font-mono",placeholder:e.placeholder,value:g.customExternalUrls?.[e.id]||"",onChange:s=>{let t={...g.customExternalUrls};t[e.id]=s.target.value,D({customExternalUrls:t})}})]},e.id))})})]})]})})]})}])},34900,e=>{e.n(e.i(87628))}]);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88653,e=>{"use strict";e.i(47167);var t=e.i(43476),s=e.i(71645),a=e.i(31178),n=e.i(47414),l=e.i(74008),o=e.i(21476),r=e.i(72846),i=s,c=e.i(37806);function u(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class d extends i.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,s=(0,r.isHTMLElement)(e)&&e.offsetWidth||0,a=(0,r.isHTMLElement)(e)&&e.offsetHeight||0,n=this.props.sizeRef.current;n.height=t.offsetHeight||0,n.width=t.offsetWidth||0,n.top=t.offsetTop,n.left=t.offsetLeft,n.right=s-n.width-n.left,n.bottom=a-n.height-n.top}return null}componentDidUpdate(){}render(){return this.props.children}}function f({children:e,isPresent:a,anchorX:n,anchorY:l,root:o,pop:r}){let f=(0,i.useId)(),m=(0,i.useRef)(null),h=(0,i.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:p}=(0,i.useContext)(c.MotionConfigContext),g=function(...e){return s.useCallback(function(...e){return t=>{let s=!1,a=e.map(e=>{let a=u(e,t);return s||"function"!=typeof a||(s=!0),a});if(s)return()=>{for(let t=0;t<a.length;t++){let s=a[t];"function"==typeof s?s():u(e[t],null)}}}}(...e),e)}(m,e.props?.ref??e?.ref);return(0,i.useInsertionEffect)(()=>{let{width:e,height:t,top:s,left:i,right:c,bottom:u}=h.current;if(a||!1===r||!m.current||!e||!t)return;let d="left"===n?`left: ${i}`:`right: ${c}`,g="bottom"===l?`bottom: ${u}`:`top: ${s}`;m.current.dataset.motionPopId=f;let b=document.createElement("style");p&&(b.nonce=p);let x=o??document.head;return x.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${f}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${e}px !important;
|
|
5
|
-
height: ${t}px !important;
|
|
6
|
-
${d}px !important;
|
|
7
|
-
${g}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{x.contains(b)&&x.removeChild(b)}},[a]),(0,t.jsx)(d,{isPresent:a,childRef:m,sizeRef:h,pop:r,children:!1===r?e:i.cloneElement(e,{ref:g})})}let m=({children:e,initial:a,isPresent:l,onExitComplete:r,custom:i,presenceAffectsLayout:c,mode:u,anchorX:d,anchorY:m,root:p})=>{let g=(0,n.useConstant)(h),b=(0,s.useId)(),x=!0,j=(0,s.useMemo)(()=>(x=!1,{id:b,initial:a,isPresent:l,custom:i,onExitComplete:e=>{for(let t of(g.set(e,!0),g.values()))if(!t)return;r&&r()},register:e=>(g.set(e,!1),()=>g.delete(e))}),[l,g,r]);return c&&x&&(j={...j}),(0,s.useMemo)(()=>{g.forEach((e,t)=>g.set(t,!1))},[l]),s.useEffect(()=>{l||g.size||!r||r()},[l]),e=(0,t.jsx)(f,{pop:"popLayout"===u,isPresent:l,anchorX:d,anchorY:m,root:p,children:e}),(0,t.jsx)(o.PresenceContext.Provider,{value:j,children:e})};function h(){return new Map}var p=e.i(64978);let g=e=>e.key||"";function b(e){let t=[];return s.Children.forEach(e,e=>{(0,s.isValidElement)(e)&&t.push(e)}),t}let x=({children:e,custom:o,initial:r=!0,onExitComplete:i,presenceAffectsLayout:c=!0,mode:u="sync",propagate:d=!1,anchorX:f="left",anchorY:h="top",root:x})=>{let[j,k]=(0,p.usePresence)(d),y=(0,s.useMemo)(()=>b(e),[e]),v=d&&!j?[]:y.map(g),P=(0,s.useRef)(!0),w=(0,s.useRef)(y),C=(0,n.useConstant)(()=>new Map),E=(0,s.useRef)(new Set),[A,R]=(0,s.useState)(y),[$,M]=(0,s.useState)(y);(0,l.useIsomorphicLayoutEffect)(()=>{P.current=!1,w.current=y;for(let e=0;e<$.length;e++){let t=g($[e]);v.includes(t)?(C.delete(t),E.current.delete(t)):!0!==C.get(t)&&C.set(t,!1)}},[$,v.length,v.join("-")]);let K=[];if(y!==A){let e=[...y];for(let t=0;t<$.length;t++){let s=$[t],a=g(s);v.includes(a)||(e.splice(t,0,s),K.push(s))}return"wait"===u&&K.length&&(e=K),M(b(e)),R(y),null}let{forceRender:T}=(0,s.useContext)(a.LayoutGroupContext);return(0,t.jsx)(t.Fragment,{children:$.map(e=>{let s=g(e),a=(!d||!!j)&&(y===$||v.includes(s));return(0,t.jsx)(m,{isPresent:a,initial:(!P.current||!!r)&&void 0,custom:o,presenceAffectsLayout:c,mode:u,root:x,onExitComplete:a?void 0:()=>{if(E.current.has(s)||(E.current.add(s),!C.has(s)))return;C.set(s,!0);let e=!0;C.forEach(t=>{t||(e=!1)}),e&&(T?.(),M(w.current),d&&k?.(),i&&i())},anchorX:f,anchorY:h,children:e},s)})})};e.s(["AnimatePresence",()=>x],88653)},68192,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(70703),n=e.i(46932),l=e.i(88653),o=e.i(67561);e.i(85269);var r=e.i(22831),i=e.i(85709),c=e.i(83402);let u=({messageKey:e})=>{let{t:s}=(0,r.useTranslation)();return(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center text-hud-main",children:s(e)})},d=(0,a.default)(()=>e.A(56489),{loadableGenerated:{modules:[92094]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingDocuments"})}),f=(0,a.default)(()=>e.A(22155),{loadableGenerated:{modules:[34900]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingSettings"})}),m=(0,a.default)(()=>e.A(30455),{loadableGenerated:{modules:[13268]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingMediaPlayer"})}),h=(0,a.default)(()=>e.A(71074),{loadableGenerated:{modules:[65862]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingBatteryMonitor"})}),p=(0,a.default)(()=>e.A(3523),{loadableGenerated:{modules:[8161]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingEngineMonitor"})}),g=(0,a.default)(()=>e.A(88913),{loadableGenerated:{modules:[25294]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingDashboard"})}),b=(0,a.default)(()=>e.A(26371),{loadableGenerated:{modules:[70127]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingLogbook"})}),x=(0,a.default)(()=>e.A(58293),{loadableGenerated:{modules:[33946]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loadingAutopilot"})}),j=(0,a.default)(()=>e.A(47853),{loadableGenerated:{modules:[58652]},loading:()=>(0,t.jsx)(u,{messageKey:"common.loading"})}),k={latitude:46.1591,longitude:-1.1522},y={navigation:e=>`${e}/@signalk/freeboard-sk/`,instrument:e=>`${e}/@mxtommy/kip/`,dashboard:e=>e.replace(":3000",":3001")+"/grafana",webcam1:()=>"https://pv.viewsurf.com/2080/Chatelaillon-Port?i=NzU4Mjp1bmRlZmluZWQ",webcam2:()=>"https://pv.viewsurf.com/1478/Chatelaillon-Plage<?i=NTkyMDp1bmRlZmluZWQ",weather:(e,t)=>t&&`https://embed.windy.com/embed.html?type=map&location=coordinates&metricRain=mm&metricTemp=\xb0C&metricWind=kt&zoom=10&overlay=wind&product=ecmwf&level=surface&lat=${t.latitude}&lon=${t.longitude}&message=true`};e.s(["default",0,({view:e})=>{let{t:a}=(0,r.useTranslation)(),{nightMode:u}=(0,o.useOcearoContext)(),[v,P]=(0,s.useState)(k),[w,C]=(0,s.useState)(null),{signalkUrl:E}=c.default.getAll(),A=(0,i.useSignalKPath)("navigation.position");(0,s.useEffect)(()=>{A&&P(e=>e?Math.abs(e.latitude-A.latitude)>.01||Math.abs(e.longitude-A.longitude)>.01?A:e:A)},[A]);let R=(0,s.useMemo)(()=>{let t=c.default.getAll(),s=t.customExternalUrls||{};if(t.showCustomUrls&&s[e])try{if("string"==typeof s[e]&&s[e].includes("${signalkUrl}"))return s[e].replace("${signalkUrl}",E).replace("${latitude}",v?.latitude||k.latitude).replace("${longitude}",v?.longitude||k.longitude);return s[e]}catch(e){console.error("Error using custom URL:",e)}let n=y[e];if(!n)return null;try{return n(E,v)}catch(e){return console.error("Error generating URL:",e),C(a("errors.errorGeneratingUrl")),null}},[e,v,E]),$=["motor","logbook","autopilot","battery","dashboard","debug"].includes(e);return(0,t.jsx)("div",{className:"flex flex-col w-full h-full overflow-hidden bg-hud-bg backdrop-blur-sm relative z-0",children:(0,t.jsx)(l.AnimatePresence,{mode:"wait",children:(0,t.jsx)(n.motion.div,{initial:{opacity:0,x:10,scale:.99},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-10,scale:.99},transition:{duration:.4,ease:[.16,1,.3,1]},style:{flex:"1 1 0%",minHeight:0},className:`flex flex-col w-full absolute inset-0 ${$?"overflow-hidden":"overflow-auto"}`,children:(()=>{if(w)return(0,t.jsx)("div",{className:"text-oRed p-4 font-black uppercase text-xs",children:w});switch(e){case"manual":return(0,t.jsx)(d,{path:"/docs"});case"settings":return(0,t.jsx)(f,{});case"mediaplayer":return(0,t.jsx)(m,{});case"battery":return(0,t.jsx)(h,{});case"motor":return(0,t.jsx)(p,{});case"dashboard":return(0,t.jsx)(g,{});case"logbook":return(0,t.jsx)(b,{});case"autopilot":return(0,t.jsx)(x,{});case"debug":return(0,t.jsx)(j,{});default:return R&&(0,t.jsx)("iframe",{className:"flex-grow border-none",src:R,title:"External Application",onError:()=>C(a("errors.failedToLoadExternal"))})}})()},e)})})}])},42602,e=>{e.n(e.i(68192))},56489,e=>{e.v(t=>Promise.all(["static/chunks/4701c1fd00af0aba.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(92094)))},22155,e=>{e.v(t=>Promise.all(["static/chunks/ca5d1b461892da4b.js"].map(t=>e.l(t))).then(()=>t(34900)))},30455,e=>{e.v(t=>Promise.all(["static/chunks/a5243176ef1c1147.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(13268)))},71074,e=>{e.v(t=>Promise.all(["static/chunks/fba1dfce801bc8b9.js","static/chunks/ba6e6b346e330c1c.js","static/chunks/19d7af5c164315cb.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(65862)))},3523,e=>{e.v(t=>Promise.all(["static/chunks/05498d2aba8ad072.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(8161)))},88913,e=>{e.v(t=>Promise.all(["static/chunks/056bb58d7d0223f4.js","static/chunks/7d74814a0cc0f1a8.js","static/chunks/3b9428693f2cc0d6.js","static/chunks/4a440e0aa6a0e7f7.js","static/chunks/fe9ff98ffedd5a18.js","static/chunks/eae6a84b628658b8.js","static/chunks/33a3c72f455c2711.js","static/chunks/607b77f84fd065f0.js"].map(t=>e.l(t))).then(()=>t(25294)))},26371,e=>{e.v(t=>Promise.all(["static/chunks/b08b2ebeb951051c.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(70127)))},58293,e=>{e.v(t=>Promise.all(["static/chunks/c5ca29b672fb8724.js","static/chunks/33a3c72f455c2711.js"].map(t=>e.l(t))).then(()=>t(33946)))},47853,e=>{e.v(t=>Promise.all(["static/chunks/c2ca71308a46ad5c.js"].map(t=>e.l(t))).then(()=>t(58652)))}]);
|