ocearo-ui 0.1.21 → 0.1.22
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 +31 -1
- package/README.md +31 -1
- package/__next.__PAGE__.txt +2 -2
- package/__next._full.txt +3 -3
- package/__next._head.txt +1 -1
- package/__next._index.txt +2 -2
- package/__next._tree.txt +2 -2
- package/_next/static/chunks/0-z15txb4-uhu.js +409 -0
- package/_next/static/chunks/{29-ag86gvlc40.js → 0kinaai2rvd43.js} +1 -1
- package/_next/static/chunks/0qj7yy4f6sk8y.js +455 -0
- package/_next/static/chunks/0yf1ifg_o1bq6.js +1 -0
- package/_next/static/chunks/0zbzk2ob0li1n.js +1 -0
- package/_next/static/chunks/17ma1x64d-211.js +1 -0
- package/_next/static/chunks/19xb2y6sgfnza.js +1 -0
- package/_next/static/chunks/1q572rz5m8mb-.js +1 -0
- package/_next/static/chunks/{2baz6j1q913qw.js → 1rkf8qtk5-48h.js} +1 -1
- package/_next/static/chunks/26e1o1as-77nq.js +172 -0
- package/_next/static/chunks/2fy4q1c5l3tpj.js +1 -0
- package/_next/static/chunks/2lw7kypuhij1_.css +3 -0
- package/_next/static/chunks/{1porlo35ga4zu.js → 2q_83f24jeg0e.js} +1 -1
- package/_next/static/chunks/2udirievybq_j.js +1 -0
- package/_next/static/chunks/3myql5zu0rstt.js +425 -0
- package/_not-found/__next._full.txt +2 -2
- package/_not-found/__next._head.txt +1 -1
- package/_not-found/__next._index.txt +2 -2
- package/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/_not-found/__next._not-found.txt +1 -1
- package/_not-found/__next._tree.txt +2 -2
- package/_not-found.html +1 -1
- package/_not-found.txt +2 -2
- package/index.html +1 -1
- package/index.txt +3 -3
- package/package.json +1 -1
- package/settings/__next._full.txt +3 -3
- package/settings/__next._head.txt +1 -1
- package/settings/__next._index.txt +2 -2
- package/settings/__next._tree.txt +2 -2
- package/settings/__next.settings.__PAGE__.txt +2 -2
- package/settings/__next.settings.txt +1 -1
- package/settings.html +1 -1
- package/settings.txt +3 -3
- package/_next/static/chunks/08gn5_gd6amkq.js +0 -1
- package/_next/static/chunks/0utifqhyv2cuc.js +0 -1
- package/_next/static/chunks/0wzr1__so6xme.js +0 -1
- package/_next/static/chunks/11ln9lzzbo35q.js +0 -1
- package/_next/static/chunks/1w1ua0-p5lk1e.js +0 -38
- package/_next/static/chunks/1wv5e5qomv-7g.css +0 -3
- package/_next/static/chunks/2lez3uww9j4t0.js +0 -135
- package/_next/static/chunks/2uao1hfsz-oy8.js +0 -1
- package/_next/static/chunks/2yghvponatk1x.js +0 -135
- package/_next/static/chunks/31i14-jemhnic.js +0 -863
- package/_next/static/chunks/3dt63tw_9r0jt.js +0 -38
- package/_next/static/chunks/3sgrkzk20mxs6.js +0 -54
- /package/_next/static/{hlKDicTyNGfd7dmHqo5m5 → sct9rcMTcCyBLHTxQQ75-}/_buildManifest.js +0 -0
- /package/_next/static/{hlKDicTyNGfd7dmHqo5m5 → sct9rcMTcCyBLHTxQQ75-}/_clientMiddlewareManifest.js +0 -0
- /package/_next/static/{hlKDicTyNGfd7dmHqo5m5 → sct9rcMTcCyBLHTxQQ75-}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47141,e=>{"use strict";var t=e.i(43476),r=e.i(1950),a=e.i(71645),n=e.i(8560),o=e.i(90072);e.s(["ACESFilmicToneMapping",()=>o.ACESFilmicToneMapping,"AddEquation",()=>o.AddEquation,"AddOperation",()=>o.AddOperation,"AdditiveAnimationBlendMode",()=>o.AdditiveAnimationBlendMode,"AdditiveBlending",()=>o.AdditiveBlending,"AgXToneMapping",()=>o.AgXToneMapping,"AlphaFormat",()=>o.AlphaFormat,"AlwaysCompare",()=>o.AlwaysCompare,"AlwaysDepth",()=>o.AlwaysDepth,"AlwaysStencilFunc",()=>o.AlwaysStencilFunc,"AmbientLight",()=>o.AmbientLight,"AnimationAction",()=>o.AnimationAction,"AnimationClip",()=>o.AnimationClip,"AnimationLoader",()=>o.AnimationLoader,"AnimationMixer",()=>o.AnimationMixer,"AnimationObjectGroup",()=>o.AnimationObjectGroup,"AnimationUtils",()=>o.AnimationUtils,"ArcCurve",()=>o.ArcCurve,"ArrayCamera",()=>o.ArrayCamera,"ArrowHelper",()=>o.ArrowHelper,"AttachedBindMode",()=>o.AttachedBindMode,"Audio",()=>o.Audio,"AudioAnalyser",()=>o.AudioAnalyser,"AudioContext",()=>o.AudioContext,"AudioListener",()=>o.AudioListener,"AudioLoader",()=>o.AudioLoader,"AxesHelper",()=>o.AxesHelper,"BackSide",()=>o.BackSide,"BasicDepthPacking",()=>o.BasicDepthPacking,"BasicShadowMap",()=>o.BasicShadowMap,"BatchedMesh",()=>o.BatchedMesh,"BezierInterpolant",()=>o.BezierInterpolant,"Bone",()=>o.Bone,"BooleanKeyframeTrack",()=>o.BooleanKeyframeTrack,"Box2",()=>o.Box2,"Box3",()=>o.Box3,"Box3Helper",()=>o.Box3Helper,"BoxGeometry",()=>o.BoxGeometry,"BoxHelper",()=>o.BoxHelper,"BufferAttribute",()=>o.BufferAttribute,"BufferGeometry",()=>o.BufferGeometry,"BufferGeometryLoader",()=>o.BufferGeometryLoader,"ByteType",()=>o.ByteType,"Cache",()=>o.Cache,"Camera",()=>o.Camera,"CameraHelper",()=>o.CameraHelper,"CanvasTexture",()=>o.CanvasTexture,"CapsuleGeometry",()=>o.CapsuleGeometry,"CatmullRomCurve3",()=>o.CatmullRomCurve3,"CineonToneMapping",()=>o.CineonToneMapping,"CircleGeometry",()=>o.CircleGeometry,"ClampToEdgeWrapping",()=>o.ClampToEdgeWrapping,"Clock",()=>o.Clock,"Color",()=>o.Color,"ColorKeyframeTrack",()=>o.ColorKeyframeTrack,"ColorManagement",()=>o.ColorManagement,"Compatibility",()=>o.Compatibility,"CompressedArrayTexture",()=>o.CompressedArrayTexture,"CompressedCubeTexture",()=>o.CompressedCubeTexture,"CompressedTexture",()=>o.CompressedTexture,"CompressedTextureLoader",()=>o.CompressedTextureLoader,"ConeGeometry",()=>o.ConeGeometry,"ConstantAlphaFactor",()=>o.ConstantAlphaFactor,"ConstantColorFactor",()=>o.ConstantColorFactor,"Controls",()=>o.Controls,"CubeCamera",()=>o.CubeCamera,"CubeDepthTexture",()=>o.CubeDepthTexture,"CubeReflectionMapping",()=>o.CubeReflectionMapping,"CubeRefractionMapping",()=>o.CubeRefractionMapping,"CubeTexture",()=>o.CubeTexture,"CubeTextureLoader",()=>o.CubeTextureLoader,"CubeUVReflectionMapping",()=>o.CubeUVReflectionMapping,"CubicBezierCurve",()=>o.CubicBezierCurve,"CubicBezierCurve3",()=>o.CubicBezierCurve3,"CubicInterpolant",()=>o.CubicInterpolant,"CullFaceBack",()=>o.CullFaceBack,"CullFaceFront",()=>o.CullFaceFront,"CullFaceFrontBack",()=>o.CullFaceFrontBack,"CullFaceNone",()=>o.CullFaceNone,"Curve",()=>o.Curve,"CurvePath",()=>o.CurvePath,"CustomBlending",()=>o.CustomBlending,"CustomToneMapping",()=>o.CustomToneMapping,"CylinderGeometry",()=>o.CylinderGeometry,"Cylindrical",()=>o.Cylindrical,"Data3DTexture",()=>o.Data3DTexture,"DataArrayTexture",()=>o.DataArrayTexture,"DataTexture",()=>o.DataTexture,"DataTextureLoader",()=>o.DataTextureLoader,"DataUtils",()=>o.DataUtils,"DecrementStencilOp",()=>o.DecrementStencilOp,"DecrementWrapStencilOp",()=>o.DecrementWrapStencilOp,"DefaultLoadingManager",()=>o.DefaultLoadingManager,"DepthFormat",()=>o.DepthFormat,"DepthStencilFormat",()=>o.DepthStencilFormat,"DepthTexture",()=>o.DepthTexture,"DetachedBindMode",()=>o.DetachedBindMode,"DirectionalLight",()=>o.DirectionalLight,"DirectionalLightHelper",()=>o.DirectionalLightHelper,"DiscreteInterpolant",()=>o.DiscreteInterpolant,"DodecahedronGeometry",()=>o.DodecahedronGeometry,"DoubleSide",()=>o.DoubleSide,"DstAlphaFactor",()=>o.DstAlphaFactor,"DstColorFactor",()=>o.DstColorFactor,"DynamicCopyUsage",()=>o.DynamicCopyUsage,"DynamicDrawUsage",()=>o.DynamicDrawUsage,"DynamicReadUsage",()=>o.DynamicReadUsage,"EdgesGeometry",()=>o.EdgesGeometry,"EllipseCurve",()=>o.EllipseCurve,"EqualCompare",()=>o.EqualCompare,"EqualDepth",()=>o.EqualDepth,"EqualStencilFunc",()=>o.EqualStencilFunc,"EquirectangularReflectionMapping",()=>o.EquirectangularReflectionMapping,"EquirectangularRefractionMapping",()=>o.EquirectangularRefractionMapping,"Euler",()=>o.Euler,"EventDispatcher",()=>o.EventDispatcher,"ExternalTexture",()=>o.ExternalTexture,"ExtrudeGeometry",()=>o.ExtrudeGeometry,"FileLoader",()=>o.FileLoader,"Float16BufferAttribute",()=>o.Float16BufferAttribute,"Float32BufferAttribute",()=>o.Float32BufferAttribute,"FloatType",()=>o.FloatType,"Fog",()=>o.Fog,"FogExp2",()=>o.FogExp2,"FramebufferTexture",()=>o.FramebufferTexture,"FrontSide",()=>o.FrontSide,"Frustum",()=>o.Frustum,"FrustumArray",()=>o.FrustumArray,"GLBufferAttribute",()=>o.GLBufferAttribute,"GLSL1",()=>o.GLSL1,"GLSL3",()=>o.GLSL3,"GreaterCompare",()=>o.GreaterCompare,"GreaterDepth",()=>o.GreaterDepth,"GreaterEqualCompare",()=>o.GreaterEqualCompare,"GreaterEqualDepth",()=>o.GreaterEqualDepth,"GreaterEqualStencilFunc",()=>o.GreaterEqualStencilFunc,"GreaterStencilFunc",()=>o.GreaterStencilFunc,"GridHelper",()=>o.GridHelper,"Group",()=>o.Group,"HTMLTexture",()=>o.HTMLTexture,"HalfFloatType",()=>o.HalfFloatType,"HemisphereLight",()=>o.HemisphereLight,"HemisphereLightHelper",()=>o.HemisphereLightHelper,"IcosahedronGeometry",()=>o.IcosahedronGeometry,"ImageBitmapLoader",()=>o.ImageBitmapLoader,"ImageLoader",()=>o.ImageLoader,"ImageUtils",()=>o.ImageUtils,"IncrementStencilOp",()=>o.IncrementStencilOp,"IncrementWrapStencilOp",()=>o.IncrementWrapStencilOp,"InstancedBufferAttribute",()=>o.InstancedBufferAttribute,"InstancedBufferGeometry",()=>o.InstancedBufferGeometry,"InstancedInterleavedBuffer",()=>o.InstancedInterleavedBuffer,"InstancedMesh",()=>o.InstancedMesh,"Int16BufferAttribute",()=>o.Int16BufferAttribute,"Int32BufferAttribute",()=>o.Int32BufferAttribute,"Int8BufferAttribute",()=>o.Int8BufferAttribute,"IntType",()=>o.IntType,"InterleavedBuffer",()=>o.InterleavedBuffer,"InterleavedBufferAttribute",()=>o.InterleavedBufferAttribute,"Interpolant",()=>o.Interpolant,"InterpolateBezier",()=>o.InterpolateBezier,"InterpolateDiscrete",()=>o.InterpolateDiscrete,"InterpolateLinear",()=>o.InterpolateLinear,"InterpolateSmooth",()=>o.InterpolateSmooth,"InterpolationSamplingMode",()=>o.InterpolationSamplingMode,"InterpolationSamplingType",()=>o.InterpolationSamplingType,"InvertStencilOp",()=>o.InvertStencilOp,"KeepStencilOp",()=>o.KeepStencilOp,"KeyframeTrack",()=>o.KeyframeTrack,"LOD",()=>o.LOD,"LatheGeometry",()=>o.LatheGeometry,"Layers",()=>o.Layers,"LessCompare",()=>o.LessCompare,"LessDepth",()=>o.LessDepth,"LessEqualCompare",()=>o.LessEqualCompare,"LessEqualDepth",()=>o.LessEqualDepth,"LessEqualStencilFunc",()=>o.LessEqualStencilFunc,"LessStencilFunc",()=>o.LessStencilFunc,"Light",()=>o.Light,"LightProbe",()=>o.LightProbe,"Line",()=>o.Line,"Line3",()=>o.Line3,"LineBasicMaterial",()=>o.LineBasicMaterial,"LineCurve",()=>o.LineCurve,"LineCurve3",()=>o.LineCurve3,"LineDashedMaterial",()=>o.LineDashedMaterial,"LineLoop",()=>o.LineLoop,"LineSegments",()=>o.LineSegments,"LinearFilter",()=>o.LinearFilter,"LinearInterpolant",()=>o.LinearInterpolant,"LinearMipMapLinearFilter",()=>o.LinearMipMapLinearFilter,"LinearMipMapNearestFilter",()=>o.LinearMipMapNearestFilter,"LinearMipmapLinearFilter",()=>o.LinearMipmapLinearFilter,"LinearMipmapNearestFilter",()=>o.LinearMipmapNearestFilter,"LinearSRGBColorSpace",()=>o.LinearSRGBColorSpace,"LinearToneMapping",()=>o.LinearToneMapping,"LinearTransfer",()=>o.LinearTransfer,"Loader",()=>o.Loader,"LoaderUtils",()=>o.LoaderUtils,"LoadingManager",()=>o.LoadingManager,"LoopOnce",()=>o.LoopOnce,"LoopPingPong",()=>o.LoopPingPong,"LoopRepeat",()=>o.LoopRepeat,"MOUSE",()=>o.MOUSE,"Material",()=>o.Material,"MaterialBlending",()=>o.MaterialBlending,"MaterialLoader",()=>o.MaterialLoader,"MathUtils",()=>o.MathUtils,"Matrix2",()=>o.Matrix2,"Matrix3",()=>o.Matrix3,"Matrix4",()=>o.Matrix4,"MaxEquation",()=>o.MaxEquation,"Mesh",()=>o.Mesh,"MeshBasicMaterial",()=>o.MeshBasicMaterial,"MeshDepthMaterial",()=>o.MeshDepthMaterial,"MeshDistanceMaterial",()=>o.MeshDistanceMaterial,"MeshLambertMaterial",()=>o.MeshLambertMaterial,"MeshMatcapMaterial",()=>o.MeshMatcapMaterial,"MeshNormalMaterial",()=>o.MeshNormalMaterial,"MeshPhongMaterial",()=>o.MeshPhongMaterial,"MeshPhysicalMaterial",()=>o.MeshPhysicalMaterial,"MeshStandardMaterial",()=>o.MeshStandardMaterial,"MeshToonMaterial",()=>o.MeshToonMaterial,"MinEquation",()=>o.MinEquation,"MirroredRepeatWrapping",()=>o.MirroredRepeatWrapping,"MixOperation",()=>o.MixOperation,"MultiplyBlending",()=>o.MultiplyBlending,"MultiplyOperation",()=>o.MultiplyOperation,"NearestFilter",()=>o.NearestFilter,"NearestMipMapLinearFilter",()=>o.NearestMipMapLinearFilter,"NearestMipMapNearestFilter",()=>o.NearestMipMapNearestFilter,"NearestMipmapLinearFilter",()=>o.NearestMipmapLinearFilter,"NearestMipmapNearestFilter",()=>o.NearestMipmapNearestFilter,"NeutralToneMapping",()=>o.NeutralToneMapping,"NeverCompare",()=>o.NeverCompare,"NeverDepth",()=>o.NeverDepth,"NeverStencilFunc",()=>o.NeverStencilFunc,"NoBlending",()=>o.NoBlending,"NoColorSpace",()=>o.NoColorSpace,"NoNormalPacking",()=>o.NoNormalPacking,"NoToneMapping",()=>o.NoToneMapping,"NormalAnimationBlendMode",()=>o.NormalAnimationBlendMode,"NormalBlending",()=>o.NormalBlending,"NormalGAPacking",()=>o.NormalGAPacking,"NormalRGPacking",()=>o.NormalRGPacking,"NotEqualCompare",()=>o.NotEqualCompare,"NotEqualDepth",()=>o.NotEqualDepth,"NotEqualStencilFunc",()=>o.NotEqualStencilFunc,"NumberKeyframeTrack",()=>o.NumberKeyframeTrack,"Object3D",()=>o.Object3D,"ObjectLoader",()=>o.ObjectLoader,"ObjectSpaceNormalMap",()=>o.ObjectSpaceNormalMap,"OctahedronGeometry",()=>o.OctahedronGeometry,"OneFactor",()=>o.OneFactor,"OneMinusConstantAlphaFactor",()=>o.OneMinusConstantAlphaFactor,"OneMinusConstantColorFactor",()=>o.OneMinusConstantColorFactor,"OneMinusDstAlphaFactor",()=>o.OneMinusDstAlphaFactor,"OneMinusDstColorFactor",()=>o.OneMinusDstColorFactor,"OneMinusSrcAlphaFactor",()=>o.OneMinusSrcAlphaFactor,"OneMinusSrcColorFactor",()=>o.OneMinusSrcColorFactor,"OrthographicCamera",()=>o.OrthographicCamera,"PCFShadowMap",()=>o.PCFShadowMap,"PCFSoftShadowMap",()=>o.PCFSoftShadowMap,"PMREMGenerator",()=>n.PMREMGenerator,"Path",()=>o.Path,"PerspectiveCamera",()=>o.PerspectiveCamera,"Plane",()=>o.Plane,"PlaneGeometry",()=>o.PlaneGeometry,"PlaneHelper",()=>o.PlaneHelper,"PointLight",()=>o.PointLight,"PointLightHelper",()=>o.PointLightHelper,"Points",()=>o.Points,"PointsMaterial",()=>o.PointsMaterial,"PolarGridHelper",()=>o.PolarGridHelper,"PolyhedronGeometry",()=>o.PolyhedronGeometry,"PositionalAudio",()=>o.PositionalAudio,"PropertyBinding",()=>o.PropertyBinding,"PropertyMixer",()=>o.PropertyMixer,"QuadraticBezierCurve",()=>o.QuadraticBezierCurve,"QuadraticBezierCurve3",()=>o.QuadraticBezierCurve3,"Quaternion",()=>o.Quaternion,"QuaternionKeyframeTrack",()=>o.QuaternionKeyframeTrack,"QuaternionLinearInterpolant",()=>o.QuaternionLinearInterpolant,"R11_EAC_Format",()=>o.R11_EAC_Format,"RED_GREEN_RGTC2_Format",()=>o.RED_GREEN_RGTC2_Format,"RED_RGTC1_Format",()=>o.RED_RGTC1_Format,"REVISION",()=>o.REVISION,"RG11_EAC_Format",()=>o.RG11_EAC_Format,"RGBADepthPacking",()=>o.RGBADepthPacking,"RGBAFormat",()=>o.RGBAFormat,"RGBAIntegerFormat",()=>o.RGBAIntegerFormat,"RGBA_ASTC_10x10_Format",()=>o.RGBA_ASTC_10x10_Format,"RGBA_ASTC_10x5_Format",()=>o.RGBA_ASTC_10x5_Format,"RGBA_ASTC_10x6_Format",()=>o.RGBA_ASTC_10x6_Format,"RGBA_ASTC_10x8_Format",()=>o.RGBA_ASTC_10x8_Format,"RGBA_ASTC_12x10_Format",()=>o.RGBA_ASTC_12x10_Format,"RGBA_ASTC_12x12_Format",()=>o.RGBA_ASTC_12x12_Format,"RGBA_ASTC_4x4_Format",()=>o.RGBA_ASTC_4x4_Format,"RGBA_ASTC_5x4_Format",()=>o.RGBA_ASTC_5x4_Format,"RGBA_ASTC_5x5_Format",()=>o.RGBA_ASTC_5x5_Format,"RGBA_ASTC_6x5_Format",()=>o.RGBA_ASTC_6x5_Format,"RGBA_ASTC_6x6_Format",()=>o.RGBA_ASTC_6x6_Format,"RGBA_ASTC_8x5_Format",()=>o.RGBA_ASTC_8x5_Format,"RGBA_ASTC_8x6_Format",()=>o.RGBA_ASTC_8x6_Format,"RGBA_ASTC_8x8_Format",()=>o.RGBA_ASTC_8x8_Format,"RGBA_BPTC_Format",()=>o.RGBA_BPTC_Format,"RGBA_ETC2_EAC_Format",()=>o.RGBA_ETC2_EAC_Format,"RGBA_PVRTC_2BPPV1_Format",()=>o.RGBA_PVRTC_2BPPV1_Format,"RGBA_PVRTC_4BPPV1_Format",()=>o.RGBA_PVRTC_4BPPV1_Format,"RGBA_S3TC_DXT1_Format",()=>o.RGBA_S3TC_DXT1_Format,"RGBA_S3TC_DXT3_Format",()=>o.RGBA_S3TC_DXT3_Format,"RGBA_S3TC_DXT5_Format",()=>o.RGBA_S3TC_DXT5_Format,"RGBDepthPacking",()=>o.RGBDepthPacking,"RGBFormat",()=>o.RGBFormat,"RGBIntegerFormat",()=>o.RGBIntegerFormat,"RGB_BPTC_SIGNED_Format",()=>o.RGB_BPTC_SIGNED_Format,"RGB_BPTC_UNSIGNED_Format",()=>o.RGB_BPTC_UNSIGNED_Format,"RGB_ETC1_Format",()=>o.RGB_ETC1_Format,"RGB_ETC2_Format",()=>o.RGB_ETC2_Format,"RGB_PVRTC_2BPPV1_Format",()=>o.RGB_PVRTC_2BPPV1_Format,"RGB_PVRTC_4BPPV1_Format",()=>o.RGB_PVRTC_4BPPV1_Format,"RGB_S3TC_DXT1_Format",()=>o.RGB_S3TC_DXT1_Format,"RGDepthPacking",()=>o.RGDepthPacking,"RGFormat",()=>o.RGFormat,"RGIntegerFormat",()=>o.RGIntegerFormat,"RawShaderMaterial",()=>o.RawShaderMaterial,"Ray",()=>o.Ray,"Raycaster",()=>o.Raycaster,"RectAreaLight",()=>o.RectAreaLight,"RedFormat",()=>o.RedFormat,"RedIntegerFormat",()=>o.RedIntegerFormat,"ReinhardToneMapping",()=>o.ReinhardToneMapping,"RenderTarget",()=>o.RenderTarget,"RenderTarget3D",()=>o.RenderTarget3D,"RepeatWrapping",()=>o.RepeatWrapping,"ReplaceStencilOp",()=>o.ReplaceStencilOp,"ReverseSubtractEquation",()=>o.ReverseSubtractEquation,"RingGeometry",()=>o.RingGeometry,"SIGNED_R11_EAC_Format",()=>o.SIGNED_R11_EAC_Format,"SIGNED_RED_GREEN_RGTC2_Format",()=>o.SIGNED_RED_GREEN_RGTC2_Format,"SIGNED_RED_RGTC1_Format",()=>o.SIGNED_RED_RGTC1_Format,"SIGNED_RG11_EAC_Format",()=>o.SIGNED_RG11_EAC_Format,"SRGBColorSpace",()=>o.SRGBColorSpace,"SRGBTransfer",()=>o.SRGBTransfer,"Scene",()=>o.Scene,"ShaderChunk",()=>n.ShaderChunk,"ShaderLib",()=>n.ShaderLib,"ShaderMaterial",()=>o.ShaderMaterial,"ShadowMaterial",()=>o.ShadowMaterial,"Shape",()=>o.Shape,"ShapeGeometry",()=>o.ShapeGeometry,"ShapePath",()=>o.ShapePath,"ShapeUtils",()=>o.ShapeUtils,"ShortType",()=>o.ShortType,"Skeleton",()=>o.Skeleton,"SkeletonHelper",()=>o.SkeletonHelper,"SkinnedMesh",()=>o.SkinnedMesh,"Source",()=>o.Source,"Sphere",()=>o.Sphere,"SphereGeometry",()=>o.SphereGeometry,"Spherical",()=>o.Spherical,"SphericalHarmonics3",()=>o.SphericalHarmonics3,"SplineCurve",()=>o.SplineCurve,"SpotLight",()=>o.SpotLight,"SpotLightHelper",()=>o.SpotLightHelper,"Sprite",()=>o.Sprite,"SpriteMaterial",()=>o.SpriteMaterial,"SrcAlphaFactor",()=>o.SrcAlphaFactor,"SrcAlphaSaturateFactor",()=>o.SrcAlphaSaturateFactor,"SrcColorFactor",()=>o.SrcColorFactor,"StaticCopyUsage",()=>o.StaticCopyUsage,"StaticDrawUsage",()=>o.StaticDrawUsage,"StaticReadUsage",()=>o.StaticReadUsage,"StereoCamera",()=>o.StereoCamera,"StreamCopyUsage",()=>o.StreamCopyUsage,"StreamDrawUsage",()=>o.StreamDrawUsage,"StreamReadUsage",()=>o.StreamReadUsage,"StringKeyframeTrack",()=>o.StringKeyframeTrack,"SubtractEquation",()=>o.SubtractEquation,"SubtractiveBlending",()=>o.SubtractiveBlending,"TOUCH",()=>o.TOUCH,"TangentSpaceNormalMap",()=>o.TangentSpaceNormalMap,"TetrahedronGeometry",()=>o.TetrahedronGeometry,"Texture",()=>o.Texture,"TextureLoader",()=>o.TextureLoader,"TextureUtils",()=>o.TextureUtils,"Timer",()=>o.Timer,"TimestampQuery",()=>o.TimestampQuery,"TorusGeometry",()=>o.TorusGeometry,"TorusKnotGeometry",()=>o.TorusKnotGeometry,"Triangle",()=>o.Triangle,"TriangleFanDrawMode",()=>o.TriangleFanDrawMode,"TriangleStripDrawMode",()=>o.TriangleStripDrawMode,"TrianglesDrawMode",()=>o.TrianglesDrawMode,"TubeGeometry",()=>o.TubeGeometry,"UVMapping",()=>o.UVMapping,"Uint16BufferAttribute",()=>o.Uint16BufferAttribute,"Uint32BufferAttribute",()=>o.Uint32BufferAttribute,"Uint8BufferAttribute",()=>o.Uint8BufferAttribute,"Uint8ClampedBufferAttribute",()=>o.Uint8ClampedBufferAttribute,"Uniform",()=>o.Uniform,"UniformsGroup",()=>o.UniformsGroup,"UniformsLib",()=>n.UniformsLib,"UniformsUtils",()=>o.UniformsUtils,"UnsignedByteType",()=>o.UnsignedByteType,"UnsignedInt101111Type",()=>o.UnsignedInt101111Type,"UnsignedInt248Type",()=>o.UnsignedInt248Type,"UnsignedInt5999Type",()=>o.UnsignedInt5999Type,"UnsignedIntType",()=>o.UnsignedIntType,"UnsignedShort4444Type",()=>o.UnsignedShort4444Type,"UnsignedShort5551Type",()=>o.UnsignedShort5551Type,"UnsignedShortType",()=>o.UnsignedShortType,"VSMShadowMap",()=>o.VSMShadowMap,"Vector2",()=>o.Vector2,"Vector3",()=>o.Vector3,"Vector4",()=>o.Vector4,"VectorKeyframeTrack",()=>o.VectorKeyframeTrack,"VideoFrameTexture",()=>o.VideoFrameTexture,"VideoTexture",()=>o.VideoTexture,"WebGL3DRenderTarget",()=>o.WebGL3DRenderTarget,"WebGLArrayRenderTarget",()=>o.WebGLArrayRenderTarget,"WebGLCoordinateSystem",()=>o.WebGLCoordinateSystem,"WebGLCubeRenderTarget",()=>n.WebGLCubeRenderTarget,"WebGLRenderTarget",()=>o.WebGLRenderTarget,"WebGLRenderer",()=>n.WebGLRenderer,"WebGLUtils",()=>n.WebGLUtils,"WebGPUCoordinateSystem",()=>o.WebGPUCoordinateSystem,"WebXRController",()=>o.WebXRController,"WireframeGeometry",()=>o.WireframeGeometry,"WrapAroundEnding",()=>o.WrapAroundEnding,"ZeroCurvatureEnding",()=>o.ZeroCurvatureEnding,"ZeroFactor",()=>o.ZeroFactor,"ZeroSlopeEnding",()=>o.ZeroSlopeEnding,"ZeroStencilOp",()=>o.ZeroStencilOp,"createCanvasElement",()=>o.createCanvasElement,"error",()=>o.error,"getConsoleFunction",()=>o.getConsoleFunction,"log",()=>o.log,"setConsoleFunction",()=>o.setConsoleFunction,"warn",()=>o.warn,"warnOnce",()=>o.warnOnce],32009);var i=e.i(32009);function l(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}let s=["x","y","top","bottom","left","right","width","height"];var c=e.i(46791);function u({ref:e,children:n,fallback:o,resize:c,style:p,gl:d,events:m=r.f,eventSource:h,eventPrefix:C,shadows:g,linear:f,flat:S,legacy:A,orthographic:T,frameloop:x,dpr:b,performance:M,raycaster:_,camera:G,scene:F,onPointerMissed:R,onCreated:B,...y}){a.useMemo(()=>(0,r.e)(i),[]);let L=(0,r.u)(),[v,E]=function({debounce:e,scroll:t,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){var o,i,c;let u=r||("u"<typeof window?class{}:window.ResizeObserver);if(!u)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[p,d]=(0,a.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),m=(0,a.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:p,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,C=e?"number"==typeof e?e:e.resize:null,g=(0,a.useRef)(!1);(0,a.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));let[f,S,A]=(0,a.useMemo)(()=>{let e=()=>{let e,t;if(!m.current.element)return;let{left:r,top:a,width:o,height:i,bottom:l,right:c,x:u,y:p}=m.current.element.getBoundingClientRect(),h={left:r,top:a,width:o,height:i,bottom:l,right:c,x:u,y:p};m.current.element instanceof HTMLElement&&n&&(h.height=m.current.element.offsetHeight,h.width=m.current.element.offsetWidth),Object.freeze(h),g.current&&(e=m.current.lastBounds,t=h,!s.every(r=>e[r]===t[r]))&&d(m.current.lastBounds=h)};return[e,C?l(e,C):e,h?l(e,h):e]},[d,n,h,C]);function T(){m.current.scrollContainers&&(m.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",A,!0)),m.current.scrollContainers=null),m.current.resizeObserver&&(m.current.resizeObserver.disconnect(),m.current.resizeObserver=null),m.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",m.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",m.current.orientationHandler))}function x(){m.current.element&&(m.current.resizeObserver=new u(A),m.current.resizeObserver.observe(m.current.element),t&&m.current.scrollContainers&&m.current.scrollContainers.forEach(e=>e.addEventListener("scroll",A,{capture:!0,passive:!0})),m.current.orientationHandler=()=>{A()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",m.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",m.current.orientationHandler))}return o=A,i=!!t,(0,a.useEffect)(()=>{if(i)return window.addEventListener("scroll",o,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",o,!0)},[o,i]),c=S,(0,a.useEffect)(()=>(window.addEventListener("resize",c),()=>void window.removeEventListener("resize",c)),[c]),(0,a.useEffect)(()=>{T(),x()},[t,A,S]),(0,a.useEffect)(()=>T,[]),[e=>{e&&e!==m.current.element&&(T(),m.current.element=e,m.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:a,overflowX:n,overflowY:o}=window.getComputedStyle(t);return[a,n,o].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),x())},p,f]}({scroll:!0,debounce:{scroll:50,resize:0},...c}),D=a.useRef(null),w=a.useRef(null);a.useImperativeHandle(e,()=>D.current);let N=(0,r.a)(R),[I,P]=a.useState(!1),[k,O]=a.useState(!1);if(I)throw I;if(k)throw k;let U=a.useRef(null);(0,r.b)(()=>{let e=D.current;E.width>0&&E.height>0&&e&&(U.current||(U.current=(0,r.c)(e)),async function(){await U.current.configure({gl:d,scene:F,events:m,shadows:g,linear:f,flat:S,legacy:A,orthographic:T,frameloop:x,dpr:b,performance:M,raycaster:_,camera:G,size:E,onPointerMissed:(...e)=>null==N.current?void 0:N.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(h?(0,r.i)(h)?h.current:h:w.current),C&&e.setEvents({compute:(e,t)=>{let r=e[C+"X"],a=e[C+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(a/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==B||B(e)}}),U.current.render((0,t.jsx)(L,{children:(0,t.jsx)(r.E,{set:O,children:(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)(r.B,{set:P}),children:null!=n?n:null})})}))}())}),a.useEffect(()=>{let e=D.current;if(e)return()=>(0,r.d)(e)},[]);let j=h?"none":"auto";return(0,t.jsx)("div",{ref:w,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:j,...p},...y,children:(0,t.jsx)("div",{ref:v,style:{width:"100%",height:"100%"},children:(0,t.jsx)("canvas",{ref:D,style:{display:"block"},children:o})})})}function p(e){return(0,t.jsx)(c.FiberProvider,{children:(0,t.jsx)(u,{...e})})}e.i(89499);var d=e.i(28600),m=e.i(70703),h=e.i(67561),C=e.i(83402),g=e.i(49721),f=e.i(68757);e.i(85269);var S=e.i(22831);let A=()=>{let{t:e}=(0,S.useTranslation)(),{nightMode:r,setNightMode:n,states:o,toggleState:i,toggleExclusiveMode:l,cycleOceanMode:s}=(0,h.useOcearoContext)();(0,a.useRef)(o.autopilot);let c={black:{icon:f.faWater,color:"text-hud-muted",label:e("toolbar.oceanBlack")},water:{icon:f.faWater,color:"text-oBlue",label:e("toolbar.oceanWater")},chart:{icon:f.faMap,color:"text-oGreen",label:e("toolbar.oceanChart")},meteo:{icon:f.faCloudSunRain,color:"text-oYellow",label:e("toolbar.oceanMeteo")}},u=o.oceanMode||"black",p=c[u],d=({onClick:e,icon:r,isActive:a,activeClass:n,label:o})=>(0,t.jsxs)("button",{onClick:e,className:`p-2 rounded-xl tesla-hover transition-all duration-300 group relative ${a?"bg-hud-elevated shadow-soft":""}`,title:o,children:[(0,t.jsx)(g.FontAwesomeIcon,{icon:r,className:`text-xl transition-all duration-300 ${a?n+" scale-110":"text-hud-muted group-hover:text-hud-main"}`}),a&&(0,t.jsx)("span",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 w-1 h-1 rounded-full ${n.replace("text-","bg-")} animate-soft-pulse`})]});return(0,t.jsxs)("div",{className:"flex items-center space-x-1 p-1.5 rounded-2xl",children:[(0,t.jsx)(d,{onClick:()=>l("autopilot"),icon:f.faShip,isActive:o.autopilot,activeClass:"text-oBlue",label:e("toolbar.autopilot")}),(0,t.jsx)(d,{onClick:()=>l("anchorWatch"),icon:f.faAnchor,isActive:o.anchorWatch,activeClass:"text-oYellow",label:e("toolbar.anchorWatch")}),(0,t.jsx)(d,{onClick:()=>l("parkingMode"),icon:f.faParking,isActive:o.parkingMode,activeClass:"text-oGreen",label:e("toolbar.parkingMode")}),(0,t.jsx)("div",{className:"h-6 w-[1px] bg-hud-border mx-0.5"}),(0,t.jsx)(d,{onClick:()=>n(!r),icon:f.faMoon,isActive:r,activeClass:"text-oNight",label:e("toolbar.nightMode")}),(0,t.jsx)(d,{onClick:s,icon:p.icon,isActive:"black"!==u,activeClass:p.color,label:p.label}),o.autopilot&&"black"===u&&(0,t.jsx)(d,{onClick:()=>i("showPolar"),icon:f.faCompass,isActive:o.showPolar,activeClass:"text-oBlue",label:e("toolbar.polarView")}),o.autopilot&&(0,t.jsx)(d,{onClick:()=>i("showLaylines3D"),icon:f.faRulerCombined,isActive:o.showLaylines3D,activeClass:"text-oGreen",label:e("toolbar.laylines3D")}),o.autopilot&&(0,t.jsx)(d,{onClick:()=>i("ais"),icon:f.faSatellite,isActive:o.ais,activeClass:"text-oGreen",label:e("toolbar.aisRadar")})]})};var T=e.i(72466),x=e.i(85709);let b="batteries",M={FRESH_WATER:{id:"freshWater",labelKey:"tanks.freshWater",path:"tanks.freshWater.0.currentLevel",icon:f.faDroplet,color:"bg-oBlue"},FUEL:{id:"fuel",labelKey:"tanks.fuel",path:"tanks.fuel.0.currentLevel",icon:f.faGasPump,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",labelKey:"tanks.blackWater",path:"tanks.blackWater.0.currentLevel",icon:f.faToilet,color:"bg-hud-muted"}},_=({level:e,type:r})=>{let{t:a}=(0,S.useTranslation)(),n=Math.max(0,Math.min(100,e)),{labelKey:o,icon:i,color:l}=M[r],s=n<=20,c=l.replace("bg-","text-");return(0,t.jsxs)("div",{className:"flex items-center space-x-2",title:a(o),children:[(0,t.jsx)(g.FontAwesomeIcon,{icon:i,className:`text-xs ${c} opacity-60`}),(0,t.jsx)("div",{className:"relative w-14 h-[8px] rounded-full bg-hud-elevated/60 overflow-hidden",children:(0,t.jsx)("div",{className:`absolute left-0 top-0 h-full rounded-full ${s?"bg-oRed":l} transition-all duration-1000 ease-out`,style:{width:`${n}%`}})}),(0,t.jsxs)("span",{className:`text-[10px] font-black tabular-nums min-w-[28px] text-right ${s?"text-oRed animate-soft-pulse":"text-hud-main"}`,children:[n,"%"]})]})},G=({batteryLevel:e,batteryNumber:r,voltage:a})=>{let{t:n}=(0,S.useTranslation)(),o=Math.max(0,Math.min(100,e)),i=(0,T.isBatteryCharging)(a),l=o<=T.BATTERY_CONFIG.DANGER_THRESHOLD;return(0,t.jsxs)("div",{className:"flex items-center space-x-2",title:`${o}% — ${a?.toFixed(1)}V${i?" "+n("common.charging"):""}`,children:[(0,t.jsx)(g.FontAwesomeIcon,{icon:f.faBolt,className:`text-xs ${i?"text-oYellow animate-pulse":"text-oGreen opacity-60"}`}),(0,t.jsx)("div",{className:"relative w-14 h-[8px] rounded-full bg-hud-elevated/60 overflow-hidden",children:(0,t.jsx)("div",{className:`absolute left-0 top-0 h-full rounded-full ${l?"bg-oRed":i?"bg-oGreen":"bg-oBlue"} transition-all duration-1000 ease-out ${i?"shadow-[0_0_6px_var(--color-oGreen)]":""}`,style:{width:`${o}%`}})})]})},F=()=>{let{nightMode:e,getTankData:r}=(0,h.useOcearoContext)(),[n,o]=(0,a.useState)(b),i=(0,a.useMemo)(()=>["electrical.batteries.1.capacity.stateOfCharge","electrical.batteries.1.voltage"],[]),l=(0,a.useMemo)(()=>["tanks.freshWater.0.currentLevel","tanks.fuel.0.currentLevel","tanks.blackWater.0.currentLevel"],[]),s=(0,x.useSignalKPaths)([...i,...l]),c=(0,a.useMemo)(()=>{let e=s["electrical.batteries.1.capacity.stateOfCharge"],t=s["electrical.batteries.1.voltage"];return[{level:null==e?(0,T.estimateStateOfCharge)(t):e,number:1,voltage:t}].filter(e=>null!=e.level&&!Number.isNaN(e.level))},[s]),u=(0,a.useMemo)(()=>{let e=s["tanks.freshWater.0.currentLevel"],t=s["tanks.fuel.0.currentLevel"],r=s["tanks.blackWater.0.currentLevel"];return{FRESH_WATER:null!=e?100*e:0,FUEL:null!=t?100*t:0,BLACK_WATER:null!=r?100*r:0}},[s]),p=()=>{o(e=>e===b?"tanks":b)},d=n===b;return(0,t.jsx)("div",{className:"p-1.5 rounded-2xl transition-all duration-300 cursor-pointer select-none",onClick:p,role:"button",tabIndex:0,"aria-label":`Toggle between ${d?"tanks":"batteries"} display`,onKeyDown:e=>"Enter"===e.key&&p(),children:(0,t.jsx)("div",{className:"flex flex-col space-y-1",children:d?(0,t.jsx)(t.Fragment,{children:c.map(e=>(0,t.jsx)(G,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,t.jsx)(t.Fragment,{children:Object.keys(M).map(e=>(0,t.jsx)(_,{type:e,level:u[e]},e))})})})},R=(0,m.default)(()=>e.A(36258),{loadableGenerated:{modules:[59465]},ssr:!1}),B=(0,m.default)(()=>e.A(11220),{loadableGenerated:{modules:[27404]},ssr:!1}),y=(0,m.default)(()=>e.A(97820),{loadableGenerated:{modules:[69675]},ssr:!1}),L=(0,m.default)(()=>e.A(29882),{loadableGenerated:{modules:[56665]}}),v=(0,m.default)(()=>e.A(93170),{loadableGenerated:{modules:[50226]}}),E=(0,m.default)(()=>e.A(93889),{loadableGenerated:{modules:[58166]}}),D=(0,m.default)(()=>e.A(64390),{loadableGenerated:{modules:[39554]}}),w=(0,m.default)(()=>e.A(48217),{loadableGenerated:{modules:[14774]}}),N=(0,m.default)(()=>e.A(30150),{loadableGenerated:{modules:[84237]}}),I=(0,m.default)(()=>e.A(34882),{loadableGenerated:{modules:[77021]}}),P=()=>{let{gl:e,scene:t}=(0,d.useThree)();return(0,a.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};e.s(["default",0,({active:e=!0})=>{let{states:r,nightMode:n}=(0,h.useOcearoContext)(),[i,l]=(0,a.useState)(null),[s,c]=(0,a.useState)(!0),[u,d]=(0,a.useState)(()=>new Date);(0,a.useEffect)(()=>{let e=setInterval(()=>d(new Date),3e4);return()=>clearInterval(e)},[]),(0,a.useEffect)(()=>{c(!1!==C.default.getAll().showAttitudeIndicator)},[]);let m=!n&&("chart"===r.oceanMode||"meteo"===r.oceanMode);return(0,t.jsxs)("div",{className:"w-full h-full relative","data-scene":m?"light":void 0,children:[(0,t.jsxs)("div",{className:"absolute top-2 left-2 right-2 z-20 flex items-center justify-between",children:[(0,t.jsx)(A,{}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsx)("span",{className:`text-lg font-black uppercase tracking-[0.2em] ${n?"text-oNight":"text-hud-muted"}`,children:u.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),(0,t.jsx)(F,{})]})]}),(0,t.jsxs)("div",{className:"absolute top-14 left-2 z-10",children:[!r.anchorWatch&&(0,t.jsx)(L,{}),r.anchorWatch&&(0,t.jsx)(D,{})]}),s&&(0,t.jsx)("div",{className:"absolute top-14 right-2 z-20",children:(0,t.jsx)(N,{})}),i&&(0,t.jsx)("div",{className:"absolute top-28 left-2 z-30",children:(0,t.jsx)(I,{content:i,onClose:()=>l(null)})}),(0,t.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(w,{})}),(0,t.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(E,{})}),!r.anchorWatch&&(0,t.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,t.jsx)(v,{})}),(0,t.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,t.jsxs)(p,{style:{width:"100%",height:"100%"},shadows:!1,frameloop:e?"always":"never",dpr:Math.min(window.devicePixelRatio,1.5),performance:{min:.5},gl:{antialias:!0,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:o.NoToneMapping,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,t.jsx)(P,{}),r.parkingMode?(0,t.jsx)(B,{onUpdateInfoPanel:l}):r.anchorWatch?(0,t.jsx)(y,{onUpdateInfoPanel:l}):(0,t.jsx)(R,{onUpdateInfoPanel:l})]})})]})}],47141)},23595,e=>{e.n(e.i(47141))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54784,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(46932),l=e.i(88653),n=e.i(49721),i=e.i(68757);e.i(85269);var r=e.i(22831),o=e.i(85709),c=e.i(67561);let d=({title:e,icon:a,iconColorClass:s="text-oBlue",hasData:l=!0,noDataMessage:i="No data available",children:r,className:o=""})=>{let{nightMode:d}=(0,c.useOcearoContext)(),u=d?"text-oNight":"text-hud-main",x=d?"text-oNight":s,h=()=>"function"==typeof a?a():(0,t.jsx)(n.FontAwesomeIcon,{icon:a,className:`${x} text-sm opacity-80`});return l?(0,t.jsxs)("div",{className:`tesla-card p-4 h-full flex flex-col tesla-hover overflow-hidden ${o}`,children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 mb-3 shrink-0",children:[h(),(0,t.jsx)("span",{className:`${u} text-xs font-black uppercase tracking-widest`,children:e})]}),(0,t.jsx)("div",{className:"flex-1 flex flex-col justify-center min-h-0 overflow-hidden",children:r})]}):(0,t.jsxs)("div",{className:`tesla-card p-4 h-full flex flex-col tesla-hover overflow-hidden ${o}`,children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 mb-3 shrink-0",children:[h(),(0,t.jsx)("span",{className:`${u} text-xs font-black uppercase tracking-widest`,children:e})]}),(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center min-h-0",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-4xl font-black text-hud-dim mb-2 gliding-value",children:"N/A"}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-tighter ${d?"text-oNight":"text-hud-muted"}`,children:i})]})})]})};var u=e.i(83402);let x="environment.sun.sunrise",h=e=>e||"07:25",m="environment.sun.sunset",g=e=>e||"18:06",p=e=>Math.PI/180*e,f=e=>180/Math.PI*e,v=e=>{let t=e%360;return t<0?t+360:t},b=e=>{let t=e%24;return t<0?t+24:t},w=(e,t,a,s)=>{let l;if(null==e||null==t)return null;let n=(l=Date.UTC(a.getUTCFullYear(),0,1),Math.floor((Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate())-l)/864e5)+1),i=t/15,r=n+((s?6:18)-i)/24,o=.9856*r-3.289,c=v(o+1.916*Math.sin(p(o))+.02*Math.sin(2*p(o))+282.634),d=v(f(Math.atan(.91764*Math.tan(p(c))))),u=90*Math.floor(d/90);d=(d+(90*Math.floor(c/90)-u))/15;let x=.39782*Math.sin(p(c)),h=Math.cos(Math.asin(x)),m=(Math.cos(p(90.833))-x*Math.sin(p(e)))/(h*Math.cos(p(e)));if(m>1||m<-1)return null;let g=s?360-f(Math.acos(m)):f(Math.acos(m)),w=b((g/=15)+d-.06571*r-6.622-i);return b(w+Math.round(t/15))},j=e=>{if(null==e)return null;let t=b(e),a=Math.floor(t),s=Math.round((t-a)*60),l=a;return 60===s&&(s=0,l=(l+1)%24),`${l.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`};function N(){let{t:e}=(0,r.useTranslation)(),s=u.default.get("debugMode"),l=(0,o.useSignalKPaths)([x,m,"navigation.position.latitude","navigation.position.longitude"]),c=l[x],p=l[m],f=l["navigation.position.latitude"],v=l["navigation.position.longitude"],b=(0,a.useMemo)(()=>{let e=null!==c?h(c):null,t=null!==p?g(p):null,a=((e,t,a)=>{if(null==e||null==t)return null;let s=180/Math.PI*e,l=180/Math.PI*t,n=w(s,l,a,!0),i=w(s,l,a,!1),r=null!==n?j(n):null,o=null!==i?j(i):null;return null===r&&null===o?null:{sunrise:r,sunset:o}})(f,v,new Date),l=s?h(null):null,n=s?g(null):null,i=e??(a?a.sunrise:null)??l,r=t??(a?a.sunset:null)??n;return null===i&&null===r?{hasData:!1}:{hasData:!0,sunrise:i,sunset:r}},[c,p,f,v,s]),{hasData:N,sunrise:y,sunset:k}=b;return(0,t.jsx)(d,{title:e("widgets.solarCycle"),icon:i.faSun,hasData:b.hasData,noDataMessage:e("widgets.signalLossCelestial"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center py-4",children:[(0,t.jsx)("div",{className:"relative mb-8 group",children:(0,t.jsxs)("div",{className:"w-full h-16 relative overflow-hidden rounded-sm bg-gradient-to-r from-oYellow/20 via-oYellow/10 to-oYellow/5 shadow-inner border border-hud transition-all duration-700 group-hover:scale-[1.02]",children:[(0,t.jsx)("div",{className:"absolute bottom-4 w-full h-px bg-hud-muted opacity-20 shadow-[0_-4px_10px_var(--hud-text-main)]"}),(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:(0,t.jsx)("div",{className:"w-10 h-10 bg-oYellow rounded-full shadow-[0_0_25px_var(--color-oYellow)] flex items-center justify-center border border-hud animate-soft-pulse",children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faSun,className:"text-oYellow text-sm"})})}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-oYellow/5 pointer-events-none"})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"text-center tesla-card bg-hud-bg p-4 tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mb-3 font-black tracking-widest",children:e("widgets.solarIngress")}),(0,t.jsx)("div",{className:"text-3xl font-black text-oYellow leading-none gliding-value tracking-tighter",children:null!==y?y:e("common.na")}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mt-3 font-black tracking-widest opacity-60",children:e("widgets.localMeridian")})]}),(0,t.jsxs)("div",{className:"text-center tesla-card bg-hud-bg p-4 tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mb-3 font-black tracking-widest",children:e("widgets.solarEgress")}),(0,t.jsx)("div",{className:"text-3xl font-black text-oYellow leading-none gliding-value tracking-tighter",children:null!==k?k:e("common.na")}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mt-3 font-black tracking-widest opacity-60",children:e("widgets.localMeridian")})]})]})]})})}function y(){let{t:e}=(0,r.useTranslation)(),s=u.default.get("debugMode"),l=(0,o.useSignalKPath)("environment.outside.uvIndex"),n=(0,a.useMemo)(()=>null!==l||s?{hasData:!0,uvIndex:null!==l?(l||0).toFixed(1):s?4:null}:{hasData:!1},[l,s]),{hasData:c,uvIndex:x}=n,h=t=>{let a=parseFloat(t);return a<=2?{level:e("widgets.uvLow"),color:"text-oGreen",bg:"bg-oGreen/10 border-oGreen/20"}:a<=5?{level:e("widgets.uvModerate"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:a<=7?{level:e("widgets.uvHigh"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:a<=10?{level:e("widgets.uvVeryHigh"),color:"text-oRed",bg:"bg-oRed/10 border-oRed/20"}:{level:e("widgets.uvExtreme"),color:"text-oRed",bg:"bg-oRed/10 border-oRed/20"}},m=c?h(x):null;return(0,t.jsx)(d,{title:e("widgets.solarRadiation"),icon:i.faSun,hasData:n.hasData,noDataMessage:e("widgets.signalLossUV"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center py-4 space-y-8",children:[(0,t.jsxs)("div",{className:"text-center group",children:[(0,t.jsx)("div",{className:`text-6xl font-black mb-4 leading-none gliding-value tracking-tighter ${null!==x?h(x).color:"text-hud-muted"} ${parseFloat(x)>=6?"animate-soft-pulse":""}`,children:null!==x?x:e("common.na")}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.3em] mt-4 ${null!==x?h(x).color:"text-hud-muted"}`,children:null!==x?h(x).level:e("widgets.offline")})]}),(0,t.jsx)("div",{className:"text-center",children:(0,t.jsx)("div",{className:`inline-block px-4 py-1.5 rounded-sm uppercase text-xs font-black tracking-[0.2em] shadow-soft ${m?.bg||"bg-hud-bg border-hud"} border border-hud`,children:(0,t.jsxs)("span",{className:m?.color||"text-hud-muted",children:[m?.level||e("widgets.uvUnknown")," ",e("widgets.riskThreshold")]})})}),(0,t.jsxs)("div",{className:"w-full px-2",children:[(0,t.jsxs)("div",{className:"flex h-1 rounded-full overflow-hidden shadow-inner bg-hud-elevated",children:[(0,t.jsx)("div",{className:"flex-1 bg-oGreen/40"}),(0,t.jsx)("div",{className:"flex-1 bg-oYellow/40"}),(0,t.jsx)("div",{className:"flex-1 bg-oYellow/40"}),(0,t.jsx)("div",{className:"flex-1 bg-oRed/40"}),(0,t.jsx)("div",{className:"flex-1 bg-oRed/40"})]}),null!==x&&m&&(0,t.jsx)("div",{className:"relative h-1 w-full",style:{top:"-4px"},children:(0,t.jsx)("div",{className:`absolute w-2 h-2 rounded-full border border-hud-main shadow-soft transition-all duration-1000 ${m.color.replace("text-","bg-")} shadow-[0_0_8px_currentColor]`,style:{left:`${Math.min(100,parseFloat(x)/11*100)}%`,transform:"translateX(-50%)"}})}),(0,t.jsxs)("div",{className:"flex justify-between text-xs font-black text-hud-muted mt-4 uppercase tracking-widest px-0.5",children:[(0,t.jsx)("span",{children:"0"}),(0,t.jsx)("span",{children:"2"}),(0,t.jsx)("span",{children:"5"}),(0,t.jsx)("span",{children:"7"}),(0,t.jsx)("span",{children:"11+"})]})]})]})})}let k="environment.inside.relativeHumidity",M=e=>(100*(e||0)).toFixed(0),S="environment.inside.dewPoint",$=e=>((e||0)-273.15).toFixed(1);function D(){let e,s,{t:l}=(0,r.useTranslation)(),c=u.default.get("debugMode"),x=(0,o.useSignalKPath)(k),h=(0,o.useSignalKPath)(S),m=(0,a.useMemo)(()=>{if(!(null!==x||null!==h||c))return{hasData:!1};let e=null!==x?M(x):c?"65":null;return{hasData:!0,humidity:e,humidityPercentage:e,dewPointCelsius:null!==h?$(h):c?"18.5":null}},[x,h,c]),{humidity:g,humidityPercentage:p,dewPointCelsius:f}=m;return(0,t.jsx)(d,{title:l("widgets.humidityAnalysis"),icon:i.faTint,hasData:m.hasData,noDataMessage:l("widgets.signalLossHygrometer"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center py-4 space-y-8",children:[(0,t.jsxs)("div",{className:"text-center group",children:[(0,t.jsxs)("div",{className:`text-6xl font-black mb-4 leading-none gliding-value tracking-tighter text-hud-main ${parseInt(g)>70||30>parseInt(g)?"animate-soft-pulse":""}`,children:[null!==g?g:l("common.na"),(0,t.jsx)("span",{className:"text-xl text-hud-muted ml-2 uppercase font-black tracking-widest",children:"%"})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.3em] mt-4 ${null!==g?(e=parseInt(g))<30||e>70?"text-oYellow":e<40||e>60?"text-oBlue":"text-oGreen":"text-hud-muted"}`,children:l(null!==g?(s=parseInt(g))<30?"widgets.tooDry":s>70?"widgets.tooHumid":s<40||s>60?"widgets.moderate":"widgets.optimal":"widgets.offline")})]}),(0,t.jsxs)("div",{className:"px-2",children:[(0,t.jsx)("div",{className:"w-full bg-hud-elevated rounded-full h-1 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${30>parseInt(g)||parseInt(g)>70?"bg-oYellow":"bg-oBlue shadow-[0_0_8px_var(--color-oBlue)]"}`,style:{width:`${null!==p?p:0}%`}})}),(0,t.jsxs)("div",{className:"flex justify-between text-xs font-black text-hud-muted mt-4 uppercase tracking-widest px-0.5",children:[(0,t.jsx)("span",{children:l("widgets.arid")}),(0,t.jsx)("span",{children:l("widgets.balanced")}),(0,t.jsx)("span",{children:l("widgets.saturated")})]})]}),(0,t.jsx)("div",{className:"tesla-card p-4 bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faThermometerHalf,className:"text-oBlue text-xs opacity-50"}),(0,t.jsx)("span",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest",children:l("widgets.dewPoint")})]}),(0,t.jsx)("div",{className:"text-hud-main font-black text-lg gliding-value",children:null!==f?`${f}\xb0`:l("common.na")})]})})]})})}var C=e.i(46991);function P(){let{t:e}=(0,r.useTranslation)(),s=u.default.get("debugMode"),l=(0,o.useSignalKPath)("environment.outside.pressure"),n=(0,a.useMemo)(()=>{let e;return null!==l||s?{hasData:!0,pressureMbar:null!==l?(e=l,(0,C.convertPressure)(e||0)):s?1013:null}:{hasData:!1}},[l,s]),{hasData:c,pressureMbar:x}=n;return(0,t.jsx)(d,{title:e("widgets.pressureTelemetry"),icon:i.faGaugeHigh,hasData:n.hasData,noDataMessage:e("widgets.signalLossPressure"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center min-h-0",children:[(0,t.jsxs)("div",{className:"relative flex-1 flex items-center justify-center min-h-0 w-full",children:[(0,t.jsxs)("svg",{className:"w-full h-full max-w-[12rem] max-h-[12rem] transform -rotate-90 filter drop-shadow-[0_0_15px_var(--color-oBlue)]",viewBox:"0 0 100 100",children:[(0,t.jsx)("circle",{cx:"50",cy:"50",r:"44",fill:"none",stroke:"var(--hud-border)",strokeWidth:"4",opacity:"0.2"}),(0,t.jsx)("circle",{cx:"50",cy:"50",r:"44",fill:"none",stroke:"var(--color-oBlue)",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:`${2*Math.PI*44}`,strokeDashoffset:`${null!==x?2*Math.PI*44*(1-(Math.min(Math.max(x,950),1050)-950)/100):2*Math.PI*44}`,className:"transition-all duration-1000"})]}),(0,t.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:"text-4xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:null!==x?x:e("common.na")}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase font-black mt-1 tracking-[0.2em] opacity-60",children:"mbar"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between w-full shrink-0",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.2em] ${null!==x?x<1e3?"text-oRed":x>1025?"text-oBlue":"text-oGreen":"text-hud-muted"} ${null!==x&&(x<1e3||x>1025)?"animate-soft-pulse":""}`,children:e(null!==x?x<1e3?"widgets.pressureLow":x>1025?"widgets.pressureHigh":"widgets.pressureNormal":"widgets.offline")}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase font-black tracking-widest opacity-40",children:"950 — 1050"})]})]})})}let F="environment.inside.co2",T=e=>Math.round(e||0),A="environment.inside.pm25",W=e=>Math.round(e||0),G="environment.inside.voc",R=e=>Math.round((e||0)/1e3),I="environment.inside.relativeHumidity",L=e=>Math.round(100*(e||0));function B(){var e;let{t:s}=(0,r.useTranslation)(),l=u.default.get("debugMode"),n=(0,o.useSignalKPath)(F),c=(0,o.useSignalKPath)(A),x=(0,o.useSignalKPath)(G),h=(0,o.useSignalKPath)(I),m=(0,a.useMemo)(()=>null!==n||null!==c||null!==x||l?{hasData:!0,co2:null!==n?T(n):l?420:null,pm25:null!==c?W(c):l?12:null,voc:null!==x?R(x):l?350:null,humidity:null!==h?L(h):null}:{hasData:!1},[n,c,x,h,l]),{hasData:g,co2:p,pm25:f,voc:v,humidity:b}=m,w=null===p&&null!==v,j=w?v>=300?{level:s("widgets.aqGood"),color:"text-oGreen",bg:"bg-oGreen/10 border-oGreen/20"}:v>=150?{level:s("widgets.aqModerate"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:v>=50?{level:s("widgets.aqPoor"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:v>=20?{level:s("widgets.aqUnhealthy"),color:"text-oRed",bg:"bg-oRed/10 border-oRed/20"}:{level:s("widgets.aqHazardous"),color:"text-oRed",bg:"bg-oRed/20 border-oRed/30"}:(e=p??400)<=800?{level:s("widgets.aqGood"),color:"text-oGreen",bg:"bg-oGreen/10 border-oGreen/20"}:e<=1e3?{level:s("widgets.aqModerate"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:e<=1500?{level:s("widgets.aqPoor"),color:"text-oYellow",bg:"bg-oYellow/10 border-oYellow/20"}:e<=2e3?{level:s("widgets.aqUnhealthy"),color:"text-oRed",bg:"bg-oRed/10 border-oRed/20"}:{level:s("widgets.aqHazardous"),color:"text-oRed",bg:"bg-oRed/20 border-oRed/30"},N=w?v:p,y=s(w?"widgets.vocGasResistance":"widgets.co2Concentration"),k=w?null!==v&&v<20:p>1500,M=w?null!==v?Math.min(v/500,1):0:null!==p?Math.min(p/2e3,1):0,S=w?v>=300?"bg-oGreen":v>=50?"bg-oYellow":"bg-oRed":p<=800?"bg-oGreen":p<=1e3?"bg-oYellow":"bg-oRed";return(0,t.jsx)(d,{title:s("widgets.airQualityMonitoring"),icon:i.faWind,hasData:m.hasData,noDataMessage:s("widgets.signalLossAir"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center",children:[(0,t.jsxs)("div",{className:`text-6xl font-black mb-3 leading-none gliding-value tracking-tighter ${j.color} ${k?"animate-soft-pulse":""}`,children:[null!==N?N:s("common.na"),null!==N&&w&&(0,t.jsx)("span",{className:"text-2xl ml-1 align-baseline",children:"kΩ"})]}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-[0.3em] opacity-60",children:y}),(0,t.jsx)("div",{className:"w-full bg-hud-elevated rounded-full h-1 mt-4 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${S}`,style:{width:`${100*M}%`}})}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)("div",{className:`inline-block px-4 py-1.5 rounded-sm uppercase text-xs font-black tracking-[0.2em] shadow-soft ${j.bg} border border-hud`,children:(0,t.jsxs)("span",{className:j.color,children:[j.level," ",s("widgets.atmosphere")]})})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 shrink-0",children:[(0,t.jsx)("div",{className:"tesla-card p-3 text-center tesla-hover bg-hud-bg",children:null!==f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`text-2xl font-black mb-1 gliding-value ${f>25?"text-oRed":"text-hud-main"}`,children:f}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase font-black tracking-widest opacity-60",children:s("widgets.pm25Particulate")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"text-2xl font-black mb-1 gliding-value text-hud-main",children:null!==b?`${b}%`:s("common.na")}),(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase font-black tracking-widest opacity-60",children:s("environmental.humidity")})]})}),(0,t.jsxs)("div",{className:"tesla-card p-3 bg-hud-bg tesla-hover flex flex-col justify-center space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)("span",{className:"text-hud-muted",children:s("widgets.nominal")}),(0,t.jsx)("span",{className:"text-oGreen",children:w?"> 300":"< 800"})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)("span",{className:"text-hud-muted",children:s("widgets.critical")}),(0,t.jsx)("span",{className:"text-oRed",children:w?"< 50":"> 1500"})]})]})]})]})})}var O=e.i(1725),K=e.i(237),Y=e.i(85183),E=e.i(93230),U=e.i(72526),H=e.i(34239),z=e.i(31195),_=e.i(7670),q=e.i(97865),V=e.i(494),X=e.i(94395),Z=e.i(44171),Q=e.i(46710),J=e.i(31725),ee=e.i(27241),et=e.i(61764),ea=e.i(75337),es=e.i(89763),el=e.i(43404),en=e.i(51883),ei=e.i(29601),er=e.i(18457),eo=e.i(22075);class ec{constructor(e){var t=e.x,a=e.y;this.xAxisScale=t,this.yAxisScale=a}map(e,t){var a,s,l=t.position;return{x:null!=(a=this.xAxisScale.map(e.x,{position:l}))?a:0,y:null!=(s=this.yAxisScale.map(e.y,{position:l}))?s:0}}mapWithFallback(e,t){var a,s,l,n,i=t.position,r=t.fallback;return l="rangeMin"===r?this.yAxisScale.rangeMin():"rangeMax"===r?this.yAxisScale.rangeMax():0,n="rangeMin"===r?this.xAxisScale.rangeMin():"rangeMax"===r?this.xAxisScale.rangeMax():0,{x:null!=(a=this.xAxisScale.map(e.x,{position:i}))?a:n,y:null!=(s=this.yAxisScale.map(e.y,{position:i}))?s:l}}isInRange(e){var t=e.x,a=e.y,s=null==t||this.xAxisScale.isInRange(t),l=null==a||this.yAxisScale.isInRange(a);return s&&l}}function ed(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,s)}return a}function eu(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ed(Object(a),!0).forEach(function(t){var s,l,n;s=e,l=t,n=a[t],(l=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var s=a.call(e,t||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(l))in s?Object.defineProperty(s,l,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[l]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ed(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function ex(){return(ex=Object.assign.bind()).apply(null,arguments)}function eh(e){var t=(0,ee.useAppDispatch)();return(0,a.useEffect)(()=>(t((0,J.addLine)(e)),()=>{t((0,J.removeLine)(e))})),null}function em(e){var t=e.xAxisId,s=e.yAxisId,l=e.shape,n=e.className,i=e.ifOverflow,r=(0,ea.useIsPanorama)(),o=(0,es.useClipPathId)(),c=(0,ee.useAppSelector)(e=>(0,et.selectXAxisSettings)(e,t)),d=(0,ee.useAppSelector)(e=>(0,et.selectYAxisSettings)(e,s)),u=(0,ee.useAppSelector)(e=>(0,et.selectAxisScale)(e,"xAxis",t,r)),x=(0,ee.useAppSelector)(e=>(0,et.selectAxisScale)(e,"yAxis",s,r)),h=(0,Q.useViewBox)();if(!o||!h||null==c||null==d||null==u||null==x)return null;var m=((e,t,a,s,l,n,i)=>{var r,o,c=i.x,d=i.y,u=i.segment,x=i.ifOverflow,h=(0,X.isNumOrStr)(c);if((0,X.isNumOrStr)(d)){var m=a.x,g=a.width,p=t.map(d,{position:s});if(!(0,eo.isWellBehavedNumber)(p)||"discard"===x&&!t.isInRange(p))return null;var f=[{x:m+g,y:p},{x:m,y:p}];return"left"===n?f.reverse():f}if(h){var v=a.y,b=a.height,w=e.map(c,{position:s});if(!(0,eo.isWellBehavedNumber)(w)||"discard"===x&&!e.isInRange(w))return null;var j=[{x:w,y:v+b},{x:w,y:v}];return"top"===l?j.reverse():j}return null!=u&&2===u.length?(o=[(r=new ec({x:e,y:t})).mapWithFallback(u[0],{position:s,fallback:"rangeMin"}),r.mapWithFallback(u[1],{position:s,fallback:"rangeMax"})],"discard"===x&&o.some(e=>!r.isInRange(e))?null:o):null})(u,x,h,e.position,c.orientation,d.orientation,e);if(!m)return null;var g=m[0],p=m[1];if(null==g||null==p)return null;var f=g.x,v=g.y,b=p.x,w=p.y,j=eu(eu({clipPath:"hidden"===i?"url(#".concat(o,")"):void 0},(0,el.svgPropertiesAndEvents)(e)),{},{x1:f,y1:v,x2:b,y2:w}),N=(0,Z.rectWithCoords)({x1:f,y1:v,x2:b,y2:w});return a.createElement(ei.ZIndexLayer,{zIndex:e.zIndex},a.createElement(q.Layer,{className:(0,_.clsx)("recharts-reference-line",n)},((e,t)=>{var s;if(a.isValidElement(e))s=a.cloneElement(e,t);else if("function"==typeof e)s=e(t);else{if(!(0,eo.isWellBehavedNumber)(t.x1)||!(0,eo.isWellBehavedNumber)(t.y1)||!(0,eo.isWellBehavedNumber)(t.x2)||!(0,eo.isWellBehavedNumber)(t.y2))return null;s=a.createElement("line",ex({},t,{className:"recharts-reference-line-line"}))}return s})(l,j),a.createElement(V.CartesianLabelContextProvider,ex({},N,{lowerWidth:N.width,upperWidth:N.width}),a.createElement(V.CartesianLabelFromLabelProp,{label:e.label}),e.children)))}var eg={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:er.DefaultZIndexes.line};function ep(e){var t=(0,en.resolveDefaultProps)(e,eg);return a.createElement(a.Fragment,null,a.createElement(eh,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),a.createElement(em,t))}ep.displayName="ReferenceLine";var ef=e.i(11426);let ev=(e,t,a,s,l)=>{let n,i,r,o=a.getTime(),c=(n=s.getTime(),i=l.getTime(),r=[],n<i?r.push({time:n-67068e3,height:t,type:"low"},{time:n-44712e3,height:e,type:"high"},{time:n-22356e3,height:t,type:"low"},{time:n,height:e,type:"high"},{time:i,height:t,type:"low"},{time:i+22356e3,height:e,type:"high"},{time:i+44712e3,height:t,type:"low"},{time:i+67068e3,height:e,type:"high"}):r.push({time:i-67068e3,height:e,type:"high"},{time:i-44712e3,height:t,type:"low"},{time:i-22356e3,height:e,type:"high"},{time:i,height:t,type:"low"},{time:n,height:e,type:"high"},{time:n+22356e3,height:t,type:"low"},{time:n+44712e3,height:e,type:"high"},{time:n+67068e3,height:t,type:"low"}),r);for(let a=0;a<c.length-1;a++)if(o>=c[a].time&&o<=c[a+1].time){let s=c[a].height,l=c[a+1].height,n=c[a+1].time-c[a].time;if(n<=0)return(e+t)/2;return parseFloat((s+(l-s)*((1-Math.cos((o-c[a].time)/n*Math.PI))/2)).toFixed(2))}return(e+t)/2},eb=e=>{if(!e)return null;if(e.includes("T")||e.includes("-")){let t=new Date(e);if(!isNaN(t.getTime()))return t.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!1})}return e},ew=e=>{if(!e)return null;if(e.includes("T")||e.includes("-")){let t=new Date(e);return isNaN(t.getTime())?null:t}let t=e.split(":").map(Number);if(t.length<2)return null;let a=new Date;return a.setHours(t[0],t[1],0,0),a};function ej(){let{t:e}=(0,r.useTranslation)(),{nightMode:s}=(0,c.useOcearoContext)(),l=u.default.get("debugMode"),n=(0,a.useMemo)(()=>["environment.tide.heightNow","environment.tide.heightHigh","environment.tide.heightLow","environment.tide.timeLow","environment.tide.timeHigh","environment.tide.coeffNow"],[]),i=(0,o.useSignalKPaths)(n),{tideData:x}=(0,ef.useTide)(),h=i["environment.tide.heightNow"]??x?.level??null,m=i["environment.tide.heightHigh"]??x?.high??null,g=i["environment.tide.heightLow"]??x?.low??null,p=i["environment.tide.timeLow"]??x?.timeLow??null,f=i["environment.tide.timeHigh"]??x?.timeHigh??null,v=i["environment.tide.coeffNow"]??x?.coefficient??null,b=null!==h||null!==m||null!==g||l,w=(0,a.useMemo)(()=>ew(f),[f]),j=(0,a.useMemo)(()=>ew(p),[p]),N=(0,a.useMemo)(()=>!!w&&!!j&&w.getTime()<j.getTime(),[w,j]),y=(0,a.useMemo)(()=>{let e,t,a=m||4.2,s=g||.8,l=w||((e=new Date).setHours(14,0,0,0),e),n=j||((t=new Date).setHours(8,0,0,0),t),i=[],r=new Date,o=new Date(r);o.setHours(0,0,0,0);for(let e=0;e<=48;e++){let t=new Date(o.getTime()+30*e*6e4),c=ev(a,s,t,l,n);i.push({time:t.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!1}),height:c,isNow:9e5>Math.abs(t.getTime()-r.getTime())})}return i},[m,g,w,j]);return(0,t.jsx)(d,{title:e("widgets.tidalTelemetry"),icon:()=>(0,t.jsx)("svg",{className:"w-5 h-5 opacity-50",viewBox:"0 0 24 24",fill:"none",children:(0,t.jsx)("path",{d:"M3 11h18M3 6h18M3 16h18M3 21h18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),hasData:b,noDataMessage:e("widgets.signalLossTidal"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3 shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-baseline space-x-3",children:[(0,t.jsxs)("span",{className:"text-4xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:[(h||2.1).toFixed(1),(0,t.jsx)("span",{className:"text-lg text-hud-muted ml-1",children:"m"})]}),(0,t.jsx)("span",{className:`text-xs font-black uppercase tracking-[0.2em] ${N?"text-oGreen":"text-oBlue"}`,children:e(N?"widgets.rising":"widgets.ebb")})]}),v&&(0,t.jsxs)("span",{className:"text-hud-muted text-xs font-black",children:["C",Math.round(v)]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0 mb-3 overflow-hidden",children:(0,t.jsx)(z.ResponsiveContainer,{width:"100%",height:"100%",minWidth:0,minHeight:0,children:(0,t.jsxs)(O.AreaChart,{data:y,margin:{top:5,right:5,left:-25,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"colorTide",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:N?s?"#ef4444":c.oGreen:s?"#ef4444":c.oBlue,stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:N?s?"#ef4444":c.oGreen:s?"#ef4444":c.oBlue,stopOpacity:0})]})}),(0,t.jsx)(U.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(Y.XAxis,{dataKey:"time",tick:{fill:"var(--hud-text-muted)",fontSize:10,fontWeight:900},axisLine:!1,tickLine:!1,interval:6}),(0,t.jsx)(E.YAxis,{tick:{fill:"var(--hud-text-muted)",fontSize:10,fontWeight:900},axisLine:!1,tickLine:!1,domain:["dataMin - 0.5","dataMax + 0.5"],tickFormatter:e=>Number(e).toFixed(1)}),(0,t.jsx)(H.Tooltip,{contentStyle:{backgroundColor:"var(--hud-bg)",border:"1px solid var(--hud-border)",borderRadius:"4px",fontSize:"11px",fontWeight:900,textTransform:"uppercase"},itemStyle:{color:N?s?"#ef4444":c.oGreen:s?"#ef4444":c.oBlue}}),(0,t.jsx)(K.Area,{type:"monotone",dataKey:"height",stroke:N?s?"#ef4444":c.oGreen:s?"#ef4444":c.oBlue,strokeWidth:2,fillOpacity:1,fill:"url(#colorTide)",isAnimationActive:!0,animationDuration:2e3}),h&&(0,t.jsx)(ep,{y:h,stroke:"var(--hud-border)",strokeDasharray:"4 4"})]})})}),(0,t.jsxs)("div",{className:"flex items-center justify-between shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:e("widgets.high")}),(0,t.jsx)("span",{className:"text-hud-main font-black text-sm gliding-value",children:eb(f)||"--:--"}),(0,t.jsxs)("span",{className:"text-oGreen text-xs font-black",children:[(m||0).toFixed(1),"m"]})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:e("widgets.low")}),(0,t.jsx)("span",{className:"text-hud-main font-black text-sm gliding-value",children:eb(p)||"--:--"}),(0,t.jsxs)("span",{className:"text-oBlue text-xs font-black",children:[(g||0).toFixed(1),"m"]})]})]})]})})}let eN=e=>null!=e?(0,C.convertTemperatureUnit)(e):null,ey=a.default.memo(()=>{var e;let s,{t:l}=(0,r.useTranslation)(),n=u.default.get("debugMode"),c=(0,a.useRef)({airTemp:null,seaTemp:null}),x=(0,o.useSignalKPath)("environment.outside.temperature"),h=(0,o.useSignalKPath)("environment.inside.lazarette.temperature"),m=x??h,g=(0,o.useSignalKPath)("environment.water.temperature"),{hasData:p,airTemp:f,seaTemp:v}=(0,a.useMemo)(()=>{if(!(null!==m||null!==g||n))return{hasData:!1};let e=null!==m?eN(m):n?21:null,t=null!==g?eN(g):n?17:null;return null!==e&&(c.current.airTemp=e),null!==t&&(c.current.seaTemp=t),{hasData:!0,airTemp:null!==e?e:c.current.airTemp,seaTemp:null!==t?t:c.current.seaTemp}},[m,g,n]);return(0,t.jsx)(d,{title:l("widgets.temperatureMonitoring"),icon:i.faThermometerHalf,hasData:p,noDataMessage:l("widgets.signalLossThermal"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-6 w-full",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-[0.2em] mb-3 opacity-60",children:l("widgets.atmosphereLabel")}),(0,t.jsx)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:null!==f?`${f}\xb0`:l("common.na")})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-[0.2em] mb-3 opacity-60",children:l("widgets.hydrosphere")}),(0,t.jsx)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:null!==v?`${v}\xb0`:l("common.na")})]})]})}),(0,t.jsx)("div",{className:"space-y-4 shrink-0",children:[{label:l("widgets.airSystem"),value:f},{label:l("widgets.seaSystem"),value:v}].map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest text-hud-muted",children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"text-hud-main opacity-80",children:null!==e.value?`${e.value}${(0,C.getTemperatureUnitLabel)()}`:l("widgets.offline")})]}),(0,t.jsx)("div",{className:"h-1 bg-hud-elevated rounded-full overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${null!==e.value&&e.value<10?"bg-oBlue":null!==e.value&&e.value>25?"bg-oRed":"bg-oGreen"}`,style:{width:`${null!==e.value?Math.min(100,Math.max(0,(e.value+10)*2)):0}%`}})})]},a))}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-4 shrink-0",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.2em] ${null!==f&&null!==v?(e=(f+v)/2)<10?"text-oBlue":e>25?"text-oRed":"text-oGreen":"text-hud-muted"}`,children:null!==f&&null!==v?(s=(f+v)/2)<15?l("widgets.cold"):s>25?l("widgets.warm"):l("widgets.moderate"):l("widgets.systemStandby")}),(0,t.jsxs)("div",{className:"text-xs text-hud-secondary uppercase font-black tracking-widest",children:[l("widgets.delta")," ",(0,t.jsx)("span",{className:"text-hud-main gliding-value",children:null!==f&&null!==v?`${Math.abs(f-v).toFixed(1)}\xb0`:l("common.na")})]})]})]})})});ey.displayName="TemperatureWidget";let ek=[{deg:0,label:"N"},{deg:45,label:"NE"},{deg:90,label:"E"},{deg:135,label:"SE"},{deg:180,label:"S"},{deg:225,label:"SW"},{deg:270,label:"W"},{deg:315,label:"NW"}],eM=(e,t)=>{let a=(e-90)*Math.PI/180;return[100+t*Math.cos(a),100+t*Math.sin(a)]},eS=e=>(e%360+360)%360,e$=({angle:e,color:a,inward:s=!1})=>{if(!Number.isFinite(e))return null;let l=eS(e),n=s?"100,24 95,13 105,13":"100,12 95,23 105,23";return(0,t.jsx)("polygon",{transform:`rotate(${l} 100 100)`,points:n,fill:a,opacity:.9})};function eD(){let{t:e}=(0,r.useTranslation)(),{nightMode:s}=(0,c.useOcearoContext)(),l=(0,o.useSignalKPath)("navigation.headingTrue"),u=(0,o.useSignalKPath)("navigation.headingMagnetic"),x=(0,o.useSignalKPath)("navigation.courseOverGroundTrue"),h=(0,o.useSignalKPath)("navigation.speedOverGround"),m=(0,o.useSignalKPath)("environment.wind.angleApparent"),g=(0,o.useSignalKPath)("environment.wind.speedApparent"),p=(0,a.useMemo)(()=>{let e=(0,C.toDegrees)(l),t=(0,C.toDegrees)(u),a=(0,C.toDegrees)(x),s=e??t??a,n=(0,C.radToDeg)(m),i=null===n?null:(n%360+540)%360-180;return{heading:s,source:null!==e?"true":null!==t?"mag":"cog",cog:(0,C.toDegrees)(x),sog:(0,C.convertSpeedUnit)(h),windAngle:null!==i&&null!==s?eS(s+i):null,windAngleRelative:i,windSpeed:(0,C.convertSpeedUnit)(g)}},[l,u,x,h,m,g]),f=null!==p.heading,v=f||null!==p.cog||null!==p.sog||null!==p.windSpeed||null!==p.windAngleRelative,b=(0,a.useRef)(0);if(f){let e=((-p.heading-b.current)%360+540)%360-180;b.current+=e}let w=b.current,j=s?"#ef4444":"#e8e8e8",N=s?"#ef4444":"#cc000c",y=(0,a.useMemo)(()=>{let e=[];for(let t=0;t<360;t+=5){let a=t%15==0,[s,l]=eM(t,a?74:82),[n,i]=eM(t,88);e.push({deg:t,x1:s,y1:l,x2:n,y2:i,major:a})}return e},[]);return(0,t.jsxs)(d,{title:e("widgets.compassHeading"),icon:i.faCompass,hasData:v,noDataMessage:e("widgets.signalLossHeading"),children:[(0,t.jsx)("div",{className:"absolute top-4 right-4 z-10 flex items-center space-x-3",children:"true"!==p.source&&f&&(0,t.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-sm uppercase font-black tracking-widest text-hud-main bg-hud-elevated border border-hud",children:"mag"===p.source?"MAG":"COG"})}),(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center min-h-0",children:(0,t.jsxs)("svg",{viewBox:"0 0 200 200",className:"h-full w-full max-h-full",style:{maxWidth:"100%"},role:"img","aria-label":e("widgets.compassHeading"),children:[(0,t.jsx)("circle",{cx:100,cy:100,r:92,fill:"none",stroke:"currentColor",className:"text-hud-muted",strokeOpacity:"0.25",strokeWidth:"1.5"}),(0,t.jsxs)("g",{transform:`rotate(${w} 100 100)`,style:{transition:"transform 300ms linear"},children:[y.map(e=>(0,t.jsx)("line",{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:0===e.deg?N:j,strokeWidth:e.major?1.8:.8,strokeOpacity:e.major?.8:.35},e.deg)),ek.map(({deg:e,label:a})=>{let[s,l]=eM(e,62),n=e%90==0;return(0,t.jsx)("text",{x:s,y:l,textAnchor:"middle",dominantBaseline:"central",fontSize:n?14:9,fontWeight:"900",letterSpacing:"0.5",fill:0===e?N:j,fillOpacity:n?.95:.5,transform:`rotate(${-w} ${s} ${l})`,children:a},a)}),(0,t.jsx)(e$,{angle:p.cog,color:s?"#ef4444":"#09bfff"}),(0,t.jsx)(e$,{angle:p.windAngle,color:s?"#ef4444":"#ffbe00",inward:!0})]}),(0,t.jsx)("polygon",{points:"100,10 93,-2 107,-2",fill:s?"#ef4444":"#ffffff",opacity:"0.9"}),(0,t.jsx)("line",{x1:100,y1:10,x2:100,y2:70,stroke:s?"#ef4444":"#ffffff",strokeWidth:"1",strokeOpacity:"0.3"}),(0,t.jsx)("text",{x:100,y:96,textAnchor:"middle",dominantBaseline:"central",fontSize:"38",fontWeight:"900",letterSpacing:"-1",fill:"currentColor",className:"text-hud-main",children:f?`${Math.round(p.heading).toString().padStart(3,"0")}\xb0`:"---"}),(0,t.jsx)("text",{x:100,y:122,textAnchor:"middle",dominantBaseline:"central",fontSize:"9",fontWeight:"900",letterSpacing:"2",fill:"currentColor",className:"text-hud-secondary",fillOpacity:"0.6",children:"true"===p.source?"HDG TRUE":"mag"===p.source?"HDG MAG":"COG TRUE"})]})}),(0,t.jsxs)("div",{className:"flex justify-between items-center mt-2 shrink-0 text-xs font-black uppercase tracking-widest",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsxs)("span",{className:"text-hud-main gliding-value",children:[null!==p.cog?`${Math.round(p.cog)}\xb0`:"---",(0,t.jsx)("span",{className:"text-hud-secondary ml-1",children:"COG"})]}),(0,t.jsxs)("span",{className:"text-hud-main gliding-value",children:[null!==p.sog?p.sog.toFixed(1):"--",(0,t.jsx)("span",{className:"text-hud-secondary ml-1",children:(0,C.getSpeedUnitLabel)()})]}),(0,t.jsxs)("span",{className:"text-hud-main gliding-value",children:[null!==(0,C.finite)(p.windAngleRelative)?`${Math.round(p.windAngleRelative)}\xb0`:"--",(0,t.jsx)("span",{className:"text-hud-secondary ml-1",children:"AWA"})]}),(0,t.jsxs)("span",{className:"text-hud-main gliding-value",children:[null!==p.windSpeed?p.windSpeed.toFixed(1):"--",(0,t.jsx)("span",{className:"text-hud-secondary ml-1",children:"AWS"})]})]}),(0,t.jsx)("div",{className:`flex items-center space-x-1 ${s?"text-oNight":"text-oBlue"}`,children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faCompass,className:"text-xs opacity-50"})})]})]})}var eC=e.i(35637);function eP(){let{t:e}=(0,r.useTranslation)(),{nightMode:s}=(0,c.useOcearoContext)(),l=(0,a.useRef)(null),x=u.default.get("debugMode"),h=(0,o.useSignalKPath)("navigation.attitude"),m=(0,o.useSignalKPath)("navigation.headingTrue"),g=(0,a.useMemo)(()=>{if(null===h&&null===m&&!x)return{hasData:!1};let e=h||{roll:0,pitch:0,yaw:0},t=m||0;return{hasData:!0,roll:void 0!==e.roll&&(0,C.toDegrees)(e.roll)||0,pitch:void 0!==e.pitch&&(0,C.toDegrees)(e.pitch)||0,yaw:void 0!==e.yaw&&(0,C.toDegrees)(e.yaw)||0,heading:null!==t&&(0,C.toDegrees)(t)||0}},[h,m,x]);return(0,a.useEffect)(()=>{var e,t,a;let n=l.current;if(!n)return;let i=n.getContext("2d"),r=n.width,o=n.height,d=(()=>{if("u">typeof document){let e=getComputedStyle(document.documentElement);return{leftPaneBg:e.getPropertyValue("--color-leftPaneBg").trim()||"#0e0e0e",rightPaneBg:e.getPropertyValue("--color-rightPaneBg").trim()||"#1e1e1e"}}return{leftPaneBg:"#0e0e0e",rightPaneBg:"#1e1e1e"}})();e=g.roll,t=g.pitch,a=g.yaw,(0,eC.drawAttitudeInstrument)(i,{w:r,h:o,roll:e,pitch:t,yaw:a,nightMode:s,showBezel:!0,colors:{oBlue:c.oBlue,oRed:c.oRed,oYellow:c.oYellow,oGreen:c.oGreen,oNight:c.oNight,rightPaneBg:d.rightPaneBg}})},[g,s]),(0,t.jsxs)(d,{title:e("widgets.attitudeInertial"),icon:i.faCompass,hasData:g.hasData,noDataMessage:e("widgets.signalLossIMU"),children:[(0,t.jsxs)("div",{className:"absolute top-4 right-4 z-10 flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faCompass,className:`${s?"text-oNight":"text-oYellow"} text-xs opacity-50`}),(0,t.jsxs)("span",{className:`${s?"text-oNight":"text-hud-main"} text-xs font-black uppercase tracking-widest gliding-value`,children:[Math.round(g.heading),"°"]})]}),(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center min-h-0 scale-95 group transition-transform duration-700",children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:l,width:220,height:220,className:`${s?"brightness-75 contrast-125":""} transition-all duration-700 group-hover:scale-105`}),(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:[(0,t.jsx)("div",{className:`w-8 h-px ${s?"bg-oNight":"bg-oYellow/40"}`}),(0,t.jsx)("div",{className:`w-px h-8 ${s?"bg-oNight":"bg-oYellow/40"}`})]})]})}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-4 mt-4 text-center",children:[{label:"ROLL",value:g.roll,color:"text-oRed",icon:i.faPlane,rotate:90},{label:"PITCH",value:g.pitch,color:"text-oBlue",icon:i.faPlane,rotate:0},{label:"HDG",value:g.heading,color:"text-oYellow",icon:i.faCompass,rotate:0}].map((e,a)=>(0,t.jsxs)("div",{className:"tesla-card p-2 tesla-hover bg-hud-bg border border-hud",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-2 mb-1 opacity-60",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:e.icon,className:`${s?"text-oNight":e.color} text-xs`,style:{transform:`rotate(${e.rotate}deg)`}}),(0,t.jsx)("span",{className:`${s?"text-oNight/60":"text-hud-muted"} uppercase text-xs font-black tracking-widest`,children:e.label})]}),(0,t.jsxs)("div",{className:`${s?"text-oNight":"text-hud-main"} font-black text-lg gliding-value tracking-tighter`,children:[Math.round(e.value),"°"]})]},a))})]})}function eF(){var e;let{t:s}=(0,r.useTranslation)(),l=u.default.get("debugMode"),c=(0,o.useSignalKPath)("environment.depth.belowKeel"),x=(0,o.useSignalKPath)("environment.depth.belowSurface"),h=(0,o.useSignalKPath)("environment.depth.belowTransducer"),m=(0,a.useMemo)(()=>{let e=c??h??(l?5.2:null),t=x??(null!==h?h+1.5:l?6.8:null);return null!==e||null!==t||l?{hasData:!0,belowKeel:null!==e?(0,C.convertDepthUnit)(e):null,belowSurface:null!==t?(0,C.convertDepthUnit)(t):null,depthUnitLabel:(0,C.getDepthUnitLabel)()}:{hasData:!1}},[c,x,h,l]),g=e=>e<2?"text-oRed":e<5?"text-oYellow":"text-oBlue";return(0,t.jsx)(d,{title:s("widgets.depth"),icon:i.faWater,hasData:m.hasData,noDataMessage:s("widgets.noDepthData"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsxs)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:[null!==m.belowKeel?m.belowKeel:s("common.na"),null!==m.belowKeel&&(0,t.jsx)("span",{className:"text-xl text-hud-secondary ml-2 uppercase font-black tracking-widest",children:m.depthUnitLabel})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.3em] mt-3 ${null!==m.belowKeel?g(m.belowKeel):"text-hud-muted"} ${null!==m.belowKeel&&m.belowKeel<5?"animate-soft-pulse":""}`,children:s(null!==m.belowKeel?(e=m.belowKeel)<2?"widgets.shallow":e<5?"widgets.caution":e<10?"widgets.safe":"widgets.deep":"widgets.offline")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[(0,t.jsxs)("div",{className:"tesla-card p-3 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mb-1 opacity-60",children:s("widgets.belowKeel")}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value ${null!==m.belowKeel?g(m.belowKeel):"text-hud-muted"}`,children:null!==m.belowKeel?`${m.belowKeel} ${m.depthUnitLabel}`:s("common.na")})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mb-1 opacity-60",children:s("widgets.surface")}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value ${null!==m.belowSurface?g(m.belowSurface):"text-hud-muted"}`,children:null!==m.belowSurface?`${m.belowSurface} ${m.depthUnitLabel}`:s("common.na")})]})]}),(0,t.jsx)("div",{className:"mb-6 px-2",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faAnchor,className:"text-hud-muted text-xs opacity-50"}),(0,t.jsx)("div",{className:"flex-1 bg-hud-elevated rounded-full h-1 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${null!==m.belowKeel?g(m.belowKeel).replace("text-","bg-"):"bg-hud-bg"}`,style:{width:`${null!==m.belowKeel?Math.min(100,m.belowKeel/50*100):0}%`}})}),(0,t.jsxs)("div",{className:"text-hud-muted text-xs font-black tracking-tighter",children:["50",m.depthUnitLabel]})]})}),(0,t.jsxs)("div",{className:"tesla-card p-3 bg-hud-bg space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)("span",{className:"text-hud-secondary",children:s("widgets.hullClearance")}),(0,t.jsx)("span",{className:`gliding-value font-mono ${null!==m.belowKeel&&m.belowKeel<2?"text-oRed":"text-hud-main"}`,children:null!==m.belowKeel?`${Math.max(0,m.belowKeel-(0,C.convertDepthUnit)(1.5)).toFixed(1)} ${m.depthUnitLabel}`:s("common.na")})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)("span",{className:"text-hud-secondary",children:s("widgets.transducerOffset")}),(0,t.jsx)("span",{className:"text-hud-dim font-mono opacity-60",children:"1.5m"})]})]})]})})}var eT=e.i(62588);let eA=[1,2,5,10,20],eW=a.default.memo(()=>{let{t:e}=(0,r.useTranslation)(),{aisData:s,vesselIds:l}=(0,eT.useAIS)(),[c,x]=(0,a.useState)(5),h=u.default.get("debugMode"),m=(0,a.useCallback)(e=>{e.preventDefault(),x(t=>{let a=eA.indexOf(t);return -1===a?t:e.deltaY<0&&a>0?eA[a-1]:e.deltaY>0&&a<eA.length-1?eA[a+1]:t})},[]),g=(0,o.useSignalKPath)("navigation.position"),p=(0,o.useSignalKPath)("navigation.headingTrue"),f=(0,o.useSignalKPath)("navigation.headingMagnetic"),v=(0,o.useSignalKPath)("navigation.courseOverGroundTrue"),b=(0,o.useSignalKPath)("navigation.speedOverGround"),w=p??f??0,j=(0,a.useMemo)(()=>s&&0!==Object.keys(s).length&&g?l.filter(e=>e.distanceMeters&&e.distanceMeters<=1852*c).map(e=>{let t=e.distanceMeters/1852,a=180*Math.atan2(e.sceneX,-e.sceneZ)/Math.PI,s=function({rangeMeters:e,bearingRad:t,ownSog:a,ownCog:s,targetSog:l,targetCog:n}){if(![e,t,a,s,l,n].every(Number.isFinite))return null;let i=e*Math.sin(t),r=e*Math.cos(t),o=l*Math.sin(n)-a*Math.sin(s),c=l*Math.cos(n)-a*Math.cos(s),d=o*o+c*c;if(d<1e-9)return e/1852;let u=Math.max(0,-(i*o+r*c)/d);return Math.hypot(i+o*u,r+c*u)/1852}({rangeMeters:e.distanceMeters,bearingRad:(a+360)%360*Math.PI/180,ownSog:b,ownCog:v??w,targetSog:e.sog,targetCog:e.cog??e.cogMagnetic});return{id:e.mmsi,name:e.name||`MMSI ${e.mmsi}`,distance:Math.round(10*t)/10,bearing:Math.round((a+180+360)%360),type:e.shipType||"unknown",cpa:null===s?null:Math.round(10*s)/10}}).sort((e,t)=>e.distance-t.distance).slice(0,10):[],[s,l,c,g,w,v,b]),N=e=>null===e.cpa?e.distance<.5?"text-oYellow":"text-hud-secondary":e.cpa<.5?"text-oRed":e.cpa<1?"text-oYellow":"text-oGreen",y=h||j.length>0;return(0,t.jsxs)(d,{title:e("widgets.aisTacticalRadar"),icon:i.faTowerBroadcast,hasData:y,noDataMessage:e("widgets.signalLossAIS"),children:[(0,t.jsx)("div",{className:"absolute top-4 right-4 z-10",children:(0,t.jsxs)("select",{value:c,onChange:e=>x(Number(e.target.value)),className:"bg-hud-elevated text-hud-secondary text-xs font-black uppercase tracking-widest rounded-sm px-3 py-1 border border-hud shadow-soft focus:outline-none focus:ring-1 focus:ring-oBlue/50 hover:bg-hud-bg hover:text-hud-main transition-all duration-500",children:[(0,t.jsx)("option",{value:1,children:"1 NM"}),(0,t.jsx)("option",{value:2,children:"2 NM"}),(0,t.jsx)("option",{value:5,children:"5 NM"}),(0,t.jsx)("option",{value:10,children:"10 NM"}),(0,t.jsx)("option",{value:20,children:"20 NM"})]})}),(0,t.jsxs)("div",{className:"flex-1 relative min-h-0 bg-hud-bg rounded-sm overflow-hidden border border-hud shadow-inner group mt-2",onWheel:m,children:[(0,t.jsxs)("svg",{className:"w-full h-full p-2 transition-transform duration-700 group-hover:scale-[1.02]",viewBox:"0 0 200 200",children:[[1,2,3,4].map(e=>(0,t.jsx)("circle",{cx:"100",cy:"100",r:20*e,fill:"none",stroke:"var(--color-oBlue)",strokeOpacity:"0.1",strokeWidth:"0.5"},e)),(0,t.jsx)("line",{x1:"100",y1:"20",x2:"100",y2:"180",stroke:"var(--color-oBlue)",strokeOpacity:"0.05",strokeWidth:"0.5"}),(0,t.jsx)("line",{x1:"20",y1:"100",x2:"180",y2:"100",stroke:"var(--color-oBlue)",strokeOpacity:"0.05",strokeWidth:"0.5"}),(0,t.jsxs)("g",{children:[(0,t.jsx)("line",{x1:"100",y1:"100",x2:"100",y2:"20",stroke:"var(--color-oGreen)",strokeWidth:"1",strokeOpacity:"0.4"}),(0,t.jsx)("animateTransform",{attributeName:"transform",type:"rotate",from:"0 100 100",to:"360 100 100",dur:"3s",repeatCount:"indefinite"})]}),j.map(e=>{let a=e.distance/c*80,s=100+a*Math.cos((e.bearing-90)*Math.PI/180),l=100+a*Math.sin((e.bearing-90)*Math.PI/180),n=null!==e.cpa&&e.cpa<.5;return(0,t.jsxs)("g",{className:n?"animate-soft-pulse":"",children:[(0,t.jsx)("circle",{cx:s,cy:l,r:n?"3":"2",fill:n?"var(--color-oRed)":null!==e.cpa&&e.cpa<1?"var(--color-oYellow)":"var(--color-oGreen)",className:"transition-all duration-1000"}),(0,t.jsx)("text",{x:s+5,y:l-5,fill:"currentColor",fontSize:"5",className:"font-black pointer-events-none uppercase tracking-tighter opacity-60 text-hud-main",children:e.name.substring(0,8)})]},e.id)}),(0,t.jsx)("polygon",{points:"100,95 105,105 100,102 95,105",fill:"var(--color-oBlue)",stroke:"currentColor",strokeWidth:"0.5",opacity:"0.8",className:"text-hud-main"})]}),(0,t.jsxs)("div",{className:"absolute top-2 left-2 text-xs text-hud-muted font-black pointer-events-none uppercase tracking-widest space-y-1",children:[(0,t.jsxs)("div",{className:"bg-hud-bg/40 px-1.5 py-0.5 rounded-sm",children:[e("widgets.range")," ",c," NM"]}),(0,t.jsxs)("div",{className:"bg-hud-bg/40 px-1.5 py-0.5 rounded-sm",children:[e("widgets.targets")," ",j.length]})]})]}),j.length>0&&(0,t.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted font-black uppercase tracking-[0.2em] px-1",children:e("widgets.tacticalAnalysis")}),j.slice(0,2).map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs tesla-card bg-hud-bg px-3 py-2 border border-hud tesla-hover",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 min-w-0",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:(e=>{switch(e){case"cargo":case"fishing":return i.faShip;default:return i.faLocationDot}})(e.type),className:`${N(e)} text-xs opacity-80 ${null!==e.cpa&&e.cpa<.5?"animate-soft-pulse":""}`}),(0,t.jsx)("span",{className:"text-hud-main truncate font-black uppercase tracking-tight",children:e.name})]}),(0,t.jsxs)("div",{className:"flex space-x-4 text-hud-secondary font-black tracking-tighter",children:[(0,t.jsxs)("span",{className:"gliding-value",children:[e.distance.toFixed(1)," NM"]}),(0,t.jsxs)("span",{className:`${N(e)} gliding-value`,children:["CPA: ",null===e.cpa?"--":e.cpa.toFixed(1)]})]})]},e.id))]})]})});function eG(){var e;let{t:s}=(0,r.useTranslation)(),l=u.default.get("debugMode"),c=(0,o.useSignalKPaths)(["electrical.batteries.1.voltage","electrical.batteries.0.voltage","electrical.batteries.1.current","electrical.batteries.0.current"]),x=(0,a.useMemo)(()=>{let e=c["electrical.batteries.1.voltage"],t=c["electrical.batteries.0.voltage"],a=c["electrical.batteries.1.current"],s=c["electrical.batteries.0.current"],n={voltage:null,current:null,percentage:null};if(!(null!==e||null!==t||l))return{hasData:!1,house:n,starter:n};let i=e||(l?12.6:null),r=t||(l?12.4:null),o=a||(l?-2.3:null),d=s||(l?.1:null);return{hasData:!0,house:{voltage:i?Math.round(10*i)/10:null,current:o?Math.round(10*o)/10:null,percentage:i?Math.min(100,Math.max(0,(i-11.8)/1*100)):null},starter:{voltage:r?Math.round(10*r)/10:null,current:d?Math.round(10*d)/10:null,percentage:r?Math.min(100,Math.max(0,(r-11.8)/1*100)):null}}},[c,l]),h=e=>e>75?i.faBatteryFull:e>25?i.faBatteryHalf:i.faBatteryQuarter,m=e=>e<20?"text-oRed":e<50?"text-oYellow":"text-oGreen";return(0,t.jsx)(d,{title:s("widgets.energyStorage"),icon:i.faBolt,hasData:x.hasData,noDataMessage:s("widgets.signalLossPowerGrid"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center py-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-8",children:[(0,t.jsxs)("div",{className:"text-center tesla-card p-3 tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mb-2 font-black tracking-widest",children:s("widgets.serviceBank")}),(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-3 mb-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:h(x.house.percentage||0),className:`text-sm ${null!==x.house.percentage?m(x.house.percentage):"text-hud-muted"} ${x.house.percentage<20?"animate-soft-pulse":""}`}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black leading-none gliding-value tracking-tighter",children:null!==x.house.voltage?`${x.house.voltage}V`:s("common.na")})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-widest ${null!==x.house.percentage?m(x.house.percentage):"text-hud-muted"}`,children:null!==x.house.percentage?`${Math.round(x.house.percentage)}%`:s("widgets.offline")}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mt-2",children:null!==x.house.current?`${x.house.current>0?"+":""}${x.house.current}A`:"—"})]}),(0,t.jsxs)("div",{className:"text-center tesla-card p-3 tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs uppercase mb-2 font-black tracking-widest",children:s("widgets.ignitionBank")}),(0,t.jsxs)("div",{className:"flex items-center justify-center space-x-3 mb-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:h(x.starter.percentage||0),className:`text-sm ${null!==x.starter.percentage?m(x.starter.percentage):"text-hud-muted"} ${x.starter.percentage<20?"animate-soft-pulse":""}`}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black leading-none gliding-value tracking-tighter",children:null!==x.starter.voltage?`${x.starter.voltage}V`:s("common.na")})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-widest ${null!==x.starter.percentage?m(x.starter.percentage):"text-hud-muted"}`,children:null!==x.starter.percentage?`${Math.round(x.starter.percentage)}%`:s("widgets.offline")}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mt-2",children:null!==x.starter.current?`${x.starter.current>0?"+":""}${x.starter.current}A`:"—"})]})]}),(0,t.jsx)("div",{className:"space-y-6 mb-8 px-2",children:[{label:s("widgets.serviceCap"),percentage:x.house.percentage},{label:s("widgets.ignitionCap"),percentage:x.starter.percentage}].map((e,a)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest text-hud-muted",children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"text-hud-main opacity-80",children:null!==e.percentage?`${Math.round(e.percentage)}%`:s("widgets.offline")})]}),(0,t.jsx)("div",{className:"h-1 bg-hud-elevated rounded-full overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${null!==e.percentage&&e.percentage<20?"bg-oRed shadow-[0_0_8px_var(--color-oRed)]":null!==e.percentage&&e.percentage<50?"bg-oYellow":"bg-oGreen"}`,style:{width:`${null!==e.percentage?e.percentage:0}%`}})})]},a))}),(0,t.jsxs)("div",{className:"tesla-card p-3 bg-hud-bg tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.2em] text-center mb-3 ${null!==x.house.percentage&&null!==x.starter.percentage?m(Math.min(x.house.percentage,x.starter.percentage)):"text-hud-muted"} ${null!==x.house.percentage&&null!==x.starter.percentage&&20>Math.min(x.house.percentage,x.starter.percentage)?"animate-soft-pulse":""}`,children:null!==x.house.percentage&&null!==x.starter.percentage?`${(e=Math.min(x.house.percentage,x.starter.percentage))<20?s("widgets.batteryCritical"):e<50?s("widgets.batteryLow"):e<80?s("widgets.batteryGood"):s("widgets.batteryExcellent")} ${s("widgets.health")}`:s("widgets.analyzingCells")}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest text-hud-secondary",children:[(0,t.jsxs)("span",{children:[s("widgets.gridLoad")," ",(0,t.jsx)("span",{className:"text-hud-main ml-1 gliding-value",children:null!==x.house.current&&null!==x.starter.current?`${Math.abs(x.house.current+x.starter.current).toFixed(1)}A`:"—"})]}),(0,t.jsx)("span",{className:"text-hud-dim",children:s("widgets.operatingRange")})]})]})]})})}function eR(){let{t:e}=(0,r.useTranslation)(),s=(0,o.useSignalKPaths)(["tanks.fuel.0.currentLevel","tanks.fuel.0.capacity","tanks.fuel.0.name","tanks.fuel.0.type","tanks.fuel.0.temperature","tanks.freshWater.0.currentLevel","tanks.freshWater.0.capacity","tanks.freshWater.0.name","tanks.freshWater.0.type","tanks.freshWater.0.temperature","tanks.wasteWater.0.currentLevel","tanks.wasteWater.0.capacity","tanks.wasteWater.0.name","tanks.wasteWater.0.type","tanks.wasteWater.0.temperature","tanks.oil.0.currentLevel","tanks.oil.0.capacity","tanks.oil.0.name","tanks.oil.0.type","tanks.oil.0.temperature"]),l=(0,a.useMemo)(()=>{let t=(e,t,a,l,n)=>({level:s[`tanks.${e}.0.currentLevel`]??null,capacity:s[`tanks.${e}.0.capacity`]??null,tankName:s[`tanks.${e}.0.name`],tankType:s[`tanks.${e}.0.type`],temperature:s[`tanks.${e}.0.temperature`],icon:a,color:l,bgColor:n,displayName:t}),a={fuel:t("fuel",e("widgets.tankFuel"),i.faGasPump,"text-oYellow","bg-oYellow"),freshWater:t("freshWater",e("widgets.tankFreshWater"),i.faTint,"text-oBlue","bg-oBlue"),wasteWater:t("wasteWater",e("widgets.tankWasteWater"),i.faToilet,"text-hud-secondary","bg-hud-elevated"),oil:t("oil",e("widgets.tankEngineOil"),i.faOilCan,"text-oYellow","bg-oYellow")};return{hasData:Object.values(a).some(e=>null!==e.level),...a}},[s,e]);return(0,t.jsx)(d,{title:e("widgets.storageSystems"),icon:i.faGasPump,hasData:l.hasData,noDataMessage:e("widgets.signalLossLevelSensors"),children:(0,t.jsx)("div",{className:"flex-1 flex flex-col justify-center min-h-0 space-y-4",children:Object.entries(l).filter(([e])=>"hasData"!==e).map(([e,a])=>{if(null===a.level||null===a.capacity)return null;let s=Math.round(100*a.level),l=Math.round(a.level*a.capacity),i="wasteWater"===e,r=i?a.level>.8:a.level<.1;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-6 h-6 bg-hud-elevated rounded-full",children:(0,t.jsx)(n.FontAwesomeIcon,{icon:a.icon,className:`${a.color} text-xs opacity-80`})}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black uppercase tracking-widest",children:a.displayName})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,t.jsxs)("span",{className:"text-hud-secondary text-xs font-black opacity-60",children:[l,"/",a.capacity,"L"]}),(0,t.jsxs)("span",{className:`text-sm font-black ${((e,t=!1)=>t?e>.8?"text-oRed":e>.6?"text-oYellow":"text-oGreen":e<.1?"text-oRed":e<.25?"text-oYellow":"text-oGreen")(a.level,i)} ${r?"animate-soft-pulse":""}`,children:[s,"%"]})]})]}),(0,t.jsx)("div",{className:"bg-hud-elevated rounded-full h-1.5 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${i?a.level>.8?"bg-oRed":a.level>.6?"bg-oYellow":"bg-oGreen":a.level<.1?"bg-oRed":a.level<.25?"bg-oYellow":"bg-oGreen"}`,style:{width:`${s}%`}})})]},e)})})})}function eI(){var e,s,l;let{t:c}=(0,r.useTranslation)(),x=u.default.get("debugMode"),h=(0,o.useSignalKPath)("environment.outside.visibility"),m=(0,a.useMemo)(()=>{if(!(null!==h||x))return{hasData:!1};let e=h||(x?8e3:null);return{hasData:!0,distance:null!==e?Math.round(e/100)/10:null,distanceNM:null!==e?Math.round(e/1852*10)/10:null}},[h,x]),g=e=>e<1?"text-oRed":e<2||e<5?"text-oYellow":e<10?"text-oBlue":"text-oGreen";return(0,t.jsx)(d,{title:c("widgets.atmosphericVisibility"),icon:i.faEye,hasData:m.hasData,noDataMessage:c("widgets.signalLossOptical"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center",children:[(0,t.jsx)("div",{className:`text-5xl mb-4 ${g(m.distance)}`,children:(0,t.jsx)(n.FontAwesomeIcon,{icon:(e=m.distance)<2?i.faSmog:e<10?i.faCloud:i.faSun,className:m.distance<10?"animate-soft-pulse":""})}),(0,t.jsxs)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:[m.distance,(0,t.jsx)("span",{className:"text-xl text-hud-secondary ml-2 uppercase font-black tracking-widest",children:"km"})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.3em] mt-3 ${g(m.distance)}`,children:c((s=m.distance)<1?"widgets.denseFog":s<2?"widgets.thickFog":s<5?"widgets.moderateFog":s<10?"widgets.lightHaze":s<20?"widgets.visGood":"widgets.visExcellent")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4 shrink-0",children:[(0,t.jsxs)("div",{className:"tesla-card p-3 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mb-1 opacity-60",children:c("widgets.metricRange")}),(0,t.jsxs)("div",{className:`text-xl font-black gliding-value ${g(m.distance)}`,children:[m.distance," km"]})]}),(0,t.jsxs)("div",{className:"tesla-card p-3 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest mb-1 opacity-60",children:c("widgets.nauticalRange")}),(0,t.jsxs)("div",{className:`text-xl font-black gliding-value ${g(m.distance)}`,children:[m.distanceNM," NM"]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black tracking-tighter",children:"0"}),(0,t.jsx)("div",{className:"flex-1 bg-hud-elevated rounded-full h-1 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${m.distance<1?"bg-oRed":m.distance<5?"bg-oYellow":m.distance<10?"bg-oBlue":"bg-oGreen"}`,style:{width:`${Math.min(100,m.distance/20*100)}%`}})}),(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black tracking-tighter",children:"20k+"})]}),(0,t.jsx)("div",{className:"text-center text-hud-main font-black text-xs uppercase tracking-widest opacity-60",children:c((l=m.distance)<.05?"widgets.extremelyDenseFog":l<.2?"widgets.veryDenseFog":l<.5?"widgets.denseFog":l<1?"widgets.thickFog":l<2?"widgets.moderateFog":l<4?"widgets.lightFog":l<10?"widgets.mistOrHaze":l<20?"widgets.slightHaze":l<40?"widgets.clear":"widgets.veryClear")})]})]})})}eW.displayName="AISRadarWidget";var eL=e.i(83934);function eB(){var e;let{t:s}=(0,r.useTranslation)(),l=u.default.get("debugMode"),{forecasts:o,isLoading:c,weatherApiAvailable:x,fetchWeatherForecast:h,getCurrentWeather:m}=(0,eL.useWeather)(),g=(0,a.useMemo)(()=>{let e=m();o.length>0&&o[0];let t=(0,C.convertTemperatureUnit)(e.temperature),a=null!==(0,C.finite)(e.humidity)?Math.round(100*e.humidity):null,s=null!==(0,C.convertPressure)(e.pressure)?Math.round(e.pressure/100):null,n=(0,C.convertSpeedUnit)(e.windSpeed),i=(0,C.toDegrees)(e.windDirection),r=e.description,c=e.source,d=null!==t||null!==a||null!==s||null!==n;if(!d&&!l)return{hasData:!1,dataSource:null};let u=t,x=a,h=s,g=n,p=i;!d&&l&&(u=15,x=65,h=1013,g=5.2,p=120,c="debug");let f="sunny";if(r){let e=r.toLowerCase();e.includes("rain")||e.includes("shower")?f="rainy":e.includes("snow")?f="snow":e.includes("cloud")||e.includes("overcast")?f="cloudy":e.includes("partly")||e.includes("few clouds")?f="partly-cloudy":(e.includes("clear")||e.includes("sun"))&&(f="sunny")}else h&&(f=h<1e3?x&&x>80?"rainy":"cloudy":h>1020?"sunny":"partly-cloudy");return{hasData:!0,dataSource:c,description:r,temperature:u,humidity:x,pressure:h,windSpeed:g,windDirection:p,condition:f,forecast:o}},[m,o,l]),p=e=>{switch(e){case"sunny":return i.faSun;case"partly-cloudy":default:return i.faCloudSun;case"cloudy":return i.faCloud;case"rainy":return i.faCloudRain;case"heavy-rain":return i.faCloudShowersHeavy;case"snow":return i.faSnowflake}},f=e=>{switch(e){case"sunny":return"text-oYellow";case"partly-cloudy":case"rainy":case"heavy-rain":default:return"text-oBlue";case"cloudy":return"text-hud-muted";case"snow":return"text-hud-main"}},v=e=>null===(0,C.finite)(e)?"":["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][(Math.round(e/22.5)%16+16)%16];return g.hasData&&((e=g.pressure)>1020?s("widgets.pressureRising"):e<1e3?s("widgets.pressureFalling"):s("widgets.pressureStable")),(0,t.jsxs)(d,{title:s("widgets.meteorologicalData"),icon:p(g.condition),hasData:g.hasData,noDataMessage:c?s("widgets.acquiringSatellite"):s("widgets.signalLossWeather"),children:[(0,t.jsxs)("div",{className:"absolute top-4 right-4 z-10 flex items-center space-x-3",children:[g.dataSource&&(0,t.jsx)("span",{className:`text-xs px-2 py-0.5 rounded-sm uppercase font-black tracking-widest text-hud-main shadow-soft ${"sensors"===g.dataSource?"bg-oGreen/40 border border-oGreen/30":"forecast"===g.dataSource?"bg-oBlue/40 border border-oBlue/30":"bg-hud-elevated border border-hud"}`,children:(()=>{switch(g.dataSource){case"sensors":return s("widgets.dataSourceLive");case"forecast":return s("widgets.dataSourceForecast");case"debug":return s("widgets.dataSourceDemo");default:return""}})()}),!1!==x&&(0,t.jsx)("button",{onClick:h,disabled:c,className:"w-7 h-7 rounded-full bg-hud-elevated flex items-center justify-center text-hud-secondary hover:text-hud-main transition-all duration-500 tesla-hover",title:s("widgets.updateForecast"),children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faSync,className:`text-xs ${c?"animate-spin":""}`})})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsx)("div",{className:"flex-1 flex flex-col justify-center",children:(0,t.jsxs)("div",{className:"text-center mb-6 group",children:[(0,t.jsx)("div",{className:`text-5xl mb-4 transition-transform duration-700 group-hover:scale-110 ${f(g.condition)}`,children:(0,t.jsx)(n.FontAwesomeIcon,{icon:p(g.condition),className:"sunny"!==g.condition?"animate-soft-pulse":""})}),(0,t.jsx)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:null!==g.temperature?`${g.temperature}${(0,C.getTemperatureUnitLabel)()}`:s("common.na")}),(0,t.jsx)("div",{className:"text-xs font-black text-hud-secondary uppercase tracking-[0.3em] mt-3 opacity-60",children:g.description||(e=>{switch(e){case"sunny":return s("widgets.clearSkies");case"partly-cloudy":return s("widgets.partlyCloudy");case"cloudy":return s("widgets.overcast");case"rainy":return s("widgets.lightRain");case"heavy-rain":return s("widgets.heavyRain");case"snow":return s("widgets.snow");default:return s("widgets.variable")}})(g.condition)})]})}),g.forecast&&g.forecast.length>1&&(0,t.jsx)("div",{className:"space-y-2 shrink-0",children:g.forecast.slice(1,4).map((e,a)=>{let s=new Date(e.date?e.date:Date.now()+(a+1)*864e5),l=isNaN(s.getTime())?e.time||`+${a+1}d`:s.toLocaleDateString("en-GB",{weekday:"short"}),r=e.description?e.description.toLowerCase().includes("rain")?"rainy":e.description.toLowerCase().includes("cloud")?"cloudy":e.description.toLowerCase().includes("snow")?"snow":"sunny":"partly-cloudy",o=null!==(0,C.finite)(e.wind?.speed)?Math.round(10*e.wind.speed)/10:null,c=v(e.wind?.direction)||null;return(0,t.jsxs)("div",{className:"flex items-center justify-between py-1.5 border-b border-hud/30 last:border-0",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest w-8",children:l}),(0,t.jsx)(n.FontAwesomeIcon,{icon:p(r),className:`text-sm w-5 ${f(r)}`}),(0,t.jsx)("span",{className:"text-hud-main text-sm font-black gliding-value w-8",children:null!==e.temperature?`${Math.round(e.temperature)}\xb0`:"--"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faWind,className:"text-oBlue text-xs opacity-50"}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black gliding-value",children:null!==o?`${o} ${(0,C.getSpeedUnitLabel)()}`:"--"}),c&&(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black tracking-widest opacity-60",children:c})]})]},a)})}),(0,t.jsxs)("div",{className:"flex items-center justify-between shrink-0 mt-2",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faWind,className:"text-oBlue text-sm opacity-50"}),(0,t.jsx)("span",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest",children:s("widgets.now")})]}),(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("span",{className:"text-hud-main text-sm font-black gliding-value tracking-tight",children:null!==g.windSpeed?`${g.windSpeed} ${(0,C.getSpeedUnitLabel)()}`:s("common.na")}),(0,t.jsx)("span",{className:"text-hud-muted text-xs uppercase font-black tracking-widest ml-2 opacity-60",children:null!==g.windDirection?v(g.windDirection):""})]})]})]})]})}let eO=a.default.memo(()=>{var e;let{t:s}=(0,r.useTranslation)(),l=u.default.get("debugMode"),c=(0,o.useSignalKPath)("navigation.speedOverGround"),x=(0,o.useSignalKPath)("navigation.speedThroughWater"),h=(0,o.useSignalKPath)("navigation.headingTrue"),m=(0,o.useSignalKPath)("navigation.courseOverGroundTrue"),g=(0,o.useSignalKPath)("environment.wind.speedApparent"),p=(0,a.useMemo)(()=>{if(!(null!==c||null!==x||l))return{hasData:!1};let e=c||(l?5.2:null),t=x||(l?4.8:null),a=h||(l?.52:null),s=m||(l?.61:null),n=g||(l?12.5:null);return{hasData:!0,sog:(0,C.convertSpeedUnit)(e),stw:(0,C.convertSpeedUnit)(t),heading:(0,C.toDegrees)(a),cog:(0,C.toDegrees)(s),windSpeed:(0,C.convertSpeedUnit)(n),drift:null!==(0,C.finite)(e)&&null!==(0,C.finite)(t)?(0,C.convertSpeedUnit)(e-t):null,speedUnitLabel:(0,C.getSpeedUnitLabel)()}},[c,x,h,m,g,l]),f=e=>e<2?"text-hud-secondary":e<5?"text-oBlue":e<8?"text-oGreen":"text-oYellow";return(0,t.jsx)(d,{title:s("widgets.speed"),icon:i.faTachometerAlt,hasData:p.hasData,noDataMessage:s("widgets.noSpeedData"),children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center",children:[(0,t.jsxs)("div",{className:"text-center mb-6",children:[(0,t.jsxs)("div",{className:"text-5xl font-black text-hud-main leading-none gliding-value tracking-tighter",children:[null!==p.sog?p.sog:s("common.na"),null!==p.sog&&(0,t.jsx)("span",{className:"text-xl text-hud-secondary ml-2 uppercase font-black tracking-widest",children:p.speedUnitLabel})]}),(0,t.jsx)("div",{className:`text-xs font-black uppercase tracking-[0.3em] mt-3 ${null!==p.sog?f(p.sog):"text-hud-muted"}`,children:s(null!==p.sog?(e=p.sog)<1?"widgets.stationary":e<3?"widgets.slow":e<6?"widgets.moderate":e<10?"widgets.fast":"widgets.veryFast":"widgets.offline")})]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-3",children:[(0,t.jsxs)("div",{className:"tesla-card p-2 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest opacity-60",children:"SOG"}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value ${null!==p.sog?f(p.sog):"text-hud-muted"}`,children:null!==p.sog?p.sog:"--"})]}),(0,t.jsxs)("div",{className:"tesla-card p-2 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest opacity-60",children:"STW"}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value ${null!==p.stw?f(p.stw):"text-hud-muted"}`,children:null!==p.stw?p.stw:"--"})]}),(0,t.jsxs)("div",{className:"tesla-card p-2 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest opacity-60",children:"HDG"}),(0,t.jsx)("div",{className:"text-hud-main text-xl font-black gliding-value",children:null!==p.heading?`${p.heading}\xb0`:"--"})]}),(0,t.jsxs)("div",{className:"tesla-card p-2 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black tracking-widest opacity-60",children:"COG"}),(0,t.jsx)("div",{className:"text-hud-main text-xl font-black gliding-value",children:null!==p.cog?`${p.cog}\xb0`:"--"})]})]})]}),(0,t.jsx)("div",{className:"mb-4 shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black tracking-tighter",children:"0"}),(0,t.jsx)("div",{className:"flex-1 bg-hud-elevated rounded-full h-1 overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${p.sog<2?"bg-hud-bg":p.sog<5?"bg-oBlue":p.sog<8?"bg-oGreen":"bg-oYellow"}`,style:{width:`${null!==p.sog?Math.min(100,p.sog/15*100):0}%`}})}),(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black tracking-tighter",children:"15+"})]})}),(0,t.jsx)("div",{className:"tesla-card p-3 bg-hud-bg tesla-hover shrink-0",children:(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black uppercase tracking-widest",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("span",{className:"text-hud-secondary",children:s("widgets.driftEffect")}),(0,t.jsx)("span",{className:`gliding-value ${null!==p.drift&&p.drift>0?"text-oGreen":null!==p.drift&&p.drift<0?"text-oRed":"text-hud-muted"}`,children:null!==p.drift?`${p.drift>0?"+":""}${p.drift} ${p.speedUnitLabel}`:s("common.na")})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faWind,className:"text-oBlue text-xs opacity-50"}),(0,t.jsx)("span",{className:"text-hud-main gliding-value",children:null!==p.windSpeed?`${p.windSpeed} ${p.speedUnitLabel}`:s("common.na")})]})]})})]})})});eO.displayName="SpeedWidget";var eK=e.i(95430);let eY=a.default.memo(()=>{let{t:e}=(0,r.useTranslation)(),{now:s,corrected:l}=(0,eK.useVesselClock)(),[u,x]=(0,a.useState)(()=>s());(0,a.useEffect)(()=>{x(s());let e=setInterval(()=>x(s()),1e3);return()=>clearInterval(e)},[s]);let{nightMode:h}=(0,c.useOcearoContext)(),m=(0,o.useSignalKPath)("navigation.position.latitude",.7854),g=(0,o.useSignalKPath)("navigation.position.longitude",.1396),p=(180*m/Math.PI).toFixed(4),f=(180*g/Math.PI).toFixed(4),v=new Date(u.getTime()),b=Math.round(12*g/Math.PI),w=new Date(v.getTime()+60*b*6e4),j=(e,t=!0)=>{let a={hour:"2-digit",minute:"2-digit",...t&&{second:"2-digit"},hour12:!1};return e.toLocaleTimeString("en-GB",a)},N=u.getHours(),y=N>=6&&N<18,k=new Date(u);k.setHours(6,30,0,0);let M=new Date(u);return M.setHours(18,45,0,0),(0,t.jsxs)(d,{title:e("widgets.temporalNode"),icon:i.faClock,hasData:!0,children:[l&&(0,t.jsx)("div",{className:"absolute top-4 right-4 z-10",children:(0,t.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-sm uppercase font-black tracking-widest text-hud-main bg-oBlue/40 border border-oBlue/30 flex items-center space-x-1.5",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faSatellite,className:"text-xs opacity-70"}),(0,t.jsx)("span",{children:"GPS"})]})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)("div",{className:"flex-1 flex flex-col justify-center",children:[(0,t.jsxs)("div",{className:"text-center group mb-6",children:[(0,t.jsx)("div",{className:"text-6xl font-black text-hud-main leading-none font-mono tracking-tighter gliding-value",children:j(u)}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs font-black uppercase tracking-[0.3em] mt-4 opacity-60",children:u.toLocaleDateString("en-GB",{weekday:"long",year:"numeric",month:"long",day:"numeric"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"tesla-card p-4 tesla-hover bg-hud-bg",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 mb-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faGlobe,className:"text-oBlue text-xs opacity-50"}),(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:e("widgets.localSync")})]}),(0,t.jsx)("div",{className:"text-hud-main font-mono font-black text-xl gliding-value",children:j(w,!1)})]}),(0,t.jsxs)("div",{className:"tesla-card p-4 tesla-hover bg-hud-bg",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3 mb-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faGlobe,className:"text-hud-muted text-xs opacity-50"}),(0,t.jsx)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:e("widgets.utcClock")})]}),(0,t.jsx)("div",{className:"text-hud-main font-mono font-black text-xl gliding-value",children:j(v,!1)})]})]})]}),(0,t.jsxs)("div",{className:"shrink-0 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:y?i.faSun:i.faMoon,className:y?"text-oYellow text-lg":h?"text-oNight text-lg":"text-oBlue text-lg"}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black uppercase tracking-widest",children:e(y?"widgets.diurnalPhase":"widgets.nocturnalPhase")})]}),(0,t.jsxs)("span",{className:"text-hud-muted text-xs font-black font-mono opacity-60",children:[y?"☀":"☾"," ",j(y?M:k,!1)]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between text-xs font-black uppercase opacity-60",children:[(0,t.jsxs)("span",{className:"text-hud-muted",children:[(0,t.jsx)("span",{className:"tracking-widest",children:"LAT"})," ",(0,t.jsxs)("span",{className:"text-hud-main font-mono",children:[p,"°"]})]}),(0,t.jsxs)("span",{className:"text-hud-muted",children:[(0,t.jsx)("span",{className:"tracking-widest",children:"LON"})," ",(0,t.jsxs)("span",{className:"text-hud-main font-mono",children:[f,"°"]})]})]})]})]})]})});eY.displayName="TimeWidget";var eE=e.i(66799);let eU=(0,a.createContext)(),eH=({children:e})=>{(0,o.useSignalKPath)("navigation.position");let[s,l]=(0,a.useState)({}),[n,i]=(0,a.useState)({}),[r,c]=(0,a.useState)({}),[d,u]=(0,a.useState)(!1),[x,h]=(0,a.useState)(null),[m,g]=(0,a.useState)(null),[p,f]=(0,a.useState)(null),[v,b]=(0,a.useState)(!1),[w,j]=(0,a.useState)(null),N=(0,a.useRef)(null),y=(0,a.useRef)(null),k=(0,a.useCallback)(async()=>{u(!0),h(null);try{let[e,t,a]=await Promise.all([eE.default.getRoutes().catch(e=>("NetworkError"!==e.name&&console.error("NavigationContext: Failed to fetch routes:",e),{})),eE.default.getWaypoints().catch(e=>("NetworkError"!==e.name&&console.error("NavigationContext: Failed to fetch waypoints:",e),{})),eE.default.getCharts().catch(e=>("NetworkError"!==e.name&&console.error("NavigationContext: Failed to fetch charts:",e),{}))]);l(e||{}),i(t||{}),c(a||{})}catch(e){"NetworkError"!==e.name&&(console.error("NavigationContext: Failed to fetch resources:",e),h(e.message))}finally{u(!1)}},[]),M=(0,a.useCallback)(async()=>{try{let e=await eE.default.getRoutes();return l(e||{}),e}catch(e){throw console.error("NavigationContext: Failed to fetch routes:",e),e}},[]),S=(0,a.useCallback)(async()=>{try{let e=await eE.default.getWaypoints();return i(e||{}),e}catch(e){throw console.error("NavigationContext: Failed to fetch waypoints:",e),e}},[]),$=(0,a.useCallback)(async()=>{try{let[e,t]=await Promise.all([eE.default.getCourse().catch(()=>null),eE.default.getCourseCalculations().catch(()=>null)]);g(e),f(t)}catch(e){console.error("NavigationContext: Failed to fetch course:",e),j(e.message)}},[]),D=(0,a.useCallback)(async e=>{b(!0),j(null);try{await eE.default.setDestinationWaypoint(e),await $()}catch(e){throw console.error("NavigationContext: Failed to set waypoint destination:",e),j(e.message),e}finally{b(!1)}},[$]),C=(0,a.useCallback)(async(e,t)=>{b(!0),j(null);try{await eE.default.setDestinationPosition(e,t),await $()}catch(e){throw console.error("NavigationContext: Failed to set position destination:",e),j(e.message),e}finally{b(!1)}},[$]),P=(0,a.useCallback)(async(e,t=0,a=!1)=>{b(!0),j(null);try{await eE.default.activateRoute(e,t,a),await $()}catch(e){throw console.error("NavigationContext: Failed to activate route:",e),j(e.message),e}finally{b(!1)}},[$]),F=(0,a.useCallback)(async()=>{b(!0),j(null);try{await eE.default.clearCourse(),g(null),f(null)}catch(e){throw console.error("NavigationContext: Failed to clear course:",e),j(e.message),e}finally{b(!1)}},[]),T=(0,a.useCallback)(async()=>{try{await eE.default.nextWaypoint(),await $()}catch(e){throw console.error("NavigationContext: Failed to go to next waypoint:",e),e}},[$]),A=(0,a.useCallback)(async()=>{try{await eE.default.previousWaypoint(),await $()}catch(e){throw console.error("NavigationContext: Failed to go to previous waypoint:",e),e}},[$]),W=(0,a.useCallback)(async(e,t,a,s="")=>{try{let l=eE.default.generateUUID(),n=eE.default.createWaypointFeature(t,e,a,s);return await eE.default.saveWaypoint(l,n),await S(),l}catch(e){throw console.error("NavigationContext: Failed to create waypoint:",e),e}},[S]),G=(0,a.useCallback)(async e=>{try{await eE.default.deleteWaypoint(e),await S()}catch(e){throw console.error("NavigationContext: Failed to delete waypoint:",e),e}},[S]),R=(0,a.useCallback)(async(e,t,a="")=>{try{let s=eE.default.generateUUID(),l=e.map(e=>[e.longitude,e.latitude]),n=eE.default.createRouteFeature(l,t,a);return await eE.default.saveRoute(s,n),await M(),s}catch(e){throw console.error("NavigationContext: Failed to create route:",e),e}},[M]),I=(0,a.useCallback)(async e=>{try{await eE.default.deleteRoute(e),await M()}catch(e){throw console.error("NavigationContext: Failed to delete route:",e),e}},[M]),L=(0,a.useCallback)(e=>{let t=s[e];return t?eE.default.parseRouteCoordinates(t):[]},[s]),B=(0,a.useCallback)(e=>{let t=n[e];return t?eE.default.parseWaypointPosition(t):null},[n]),O=(0,a.useCallback)(()=>Object.entries(s).map(([e,t])=>({id:e,name:t.name||"Unnamed Route",description:t.description||"",pointCount:t.feature?.geometry?.coordinates?.length||0})),[s]),K=(0,a.useCallback)(()=>Object.entries(n).map(([e,t])=>{let a=eE.default.parseWaypointPosition(t);return{id:e,name:t.name||"Unnamed Waypoint",description:t.description||"",latitude:a?.latitude,longitude:a?.longitude}}),[n]),Y=(0,a.useCallback)(()=>m?.nextPoint?.position!=null||m?.activeRoute?.href!=null,[m]),E=(0,a.useCallback)(()=>m?{position:m.nextPoint?.position,waypointHref:m.nextPoint?.href,routeHref:m.activeRoute?.href,pointIndex:m.activeRoute?.pointIndex,isRoute:!!m.activeRoute?.href,arrivalCircle:m.arrivalCircle}:null,[m]);return(0,a.useEffect)(()=>(k(),$(),N.current=setInterval(()=>{$()},5e3),y.current=setInterval(()=>{k()},3e5),()=>{N.current&&clearInterval(N.current),y.current&&clearInterval(y.current)}),[k,$]),(0,t.jsx)(eU.Provider,{value:{routes:s,waypoints:n,charts:r,isLoadingResources:d,resourcesError:x,activeCourse:m,courseCalculations:p,isLoadingCourse:v,courseError:w,fetchResources:k,fetchRoutes:M,fetchWaypoints:S,fetchCourse:$,navigateToWaypoint:D,navigateToPosition:C,activateRoute:P,clearCourse:F,goToNextWaypoint:T,goToPreviousWaypoint:A,createWaypoint:W,deleteWaypoint:G,createRoute:R,deleteRoute:I,getRouteCoordinates:L,getWaypointPosition:B,getRoutesList:O,getWaypointsList:K,hasActiveDestination:Y,getDestinationInfo:E},children:e})};function ez(){var e,s;let{t:l}=(0,r.useTranslation)(),{activeCourse:c,courseCalculations:x,waypoints:h,routes:m,isLoadingCourse:g,navigateToWaypoint:p,activateRoute:f,clearCourse:v,goToNextWaypoint:b,goToPreviousWaypoint:w,getWaypointsList:j,getRoutesList:N,hasActiveDestination:y}=(()=>{let e=(0,a.useContext)(eU);if(!e)throw Error("useNavigation must be used within a NavigationContextProvider");return e})(),k=u.default.get("debugMode"),M=(0,o.useSignalKPath)("navigation.courseGreatCircle.nextPoint.distance"),S=(0,o.useSignalKPath)("navigation.courseGreatCircle.nextPoint.bearingTrue"),$=(0,o.useSignalKPath)("navigation.courseGreatCircle.crossTrackError"),D=(0,o.useSignalKPath)("navigation.courseGreatCircle.velocityMadeGood"),P=(0,o.useSignalKPath)("steering.autopilot.state"),F=(0,o.useSignalKPath)("steering.autopilot.mode"),T=(0,o.useSignalKPath)("steering.autopilot.target.headingTrue"),[A,W]=(0,a.useState)(!1),[G,R]=(0,a.useState)(!1),I=a.default.useMemo(()=>x?{hasData:!0,distance:x.distance,bearingTrue:x.bearingTrue,bearingMagnetic:x.bearingMagnetic,crossTrackError:x.crossTrackError,velocityMadeGood:x.velocityMadeGood,timeToGo:x.timeToGo,estimatedTimeOfArrival:x.estimatedTimeOfArrival,calcMethod:x.calcMethod}:null!==M||null!==S||k?{hasData:!0,distance:M||(k?5e3:null),bearingTrue:S||(k?.52:null),crossTrackError:$||(k?50:null),velocityMadeGood:D||(k?5.5:null),timeToGo:null,estimatedTimeOfArrival:null}:{hasData:!1},[x,M,S,$,D,k]),L=async e=>{try{await p(e),W(!1)}catch(e){console.error("Failed to navigate to waypoint:",e)}},B=async e=>{try{await f(e),R(!1)}catch(e){console.error("Failed to activate route:",e)}},O=j(),K=N(),Y=y();return(0,t.jsxs)(d,{title:l("widgets.course"),icon:i.faRoute,iconColorClass:"text-oGreen",hasData:I.hasData||Y||O.length>0||K.length>0,noDataMessage:l("widgets.noCourseData"),children:[(0,t.jsxs)("div",{className:"absolute top-4 right-4 z-10 flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{W(!A),R(!1)},className:`w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 shadow-soft ${A?"bg-oGreen text-hud-main":"bg-hud-elevated text-hud-secondary tesla-hover"}`,title:l("widgets.waypoints"),children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faLocationDot,className:"text-xs"})}),(0,t.jsx)("button",{onClick:()=>{R(!G),W(!1)},className:`w-8 h-8 rounded-full flex items-center justify-center transition-all duration-500 shadow-soft ${G?"bg-oGreen text-hud-main":"bg-hud-elevated text-hud-secondary tesla-hover"}`,title:l("widgets.routes"),children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faList,className:"text-xs"})})]}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col min-h-0",children:[A&&(0,t.jsxs)("div",{className:"mb-4 max-h-40 overflow-y-auto tesla-card bg-hud-bg p-2 space-y-1",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted mb-2 uppercase font-black tracking-[0.2em] px-2 pt-1",children:l("widgets.storedWaypoints")}),0===O.length?(0,t.jsx)("div",{className:"text-xs text-hud-secondary italic px-2 py-4 text-center font-black uppercase",children:l("widgets.noActiveNodes")}):O.map(e=>(0,t.jsxs)("button",{onClick:()=>L(e.id),className:"w-full text-left p-2 tesla-hover rounded-sm text-xs text-hud-main flex items-center group font-black uppercase tracking-tight",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faLocationDot,className:"text-oYellow mr-3 text-xs opacity-50 group-hover:opacity-100"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))]}),G&&(0,t.jsxs)("div",{className:"mb-4 max-h-40 overflow-y-auto tesla-card bg-hud-bg p-2 space-y-1",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted mb-2 uppercase font-black tracking-[0.2em] px-2 pt-1",children:l("widgets.missionRoutes")}),0===K.length?(0,t.jsx)("div",{className:"text-xs text-hud-secondary italic px-2 py-4 text-center font-black uppercase",children:l("widgets.noRoutesLoaded")}):K.map(e=>(0,t.jsxs)("button",{onClick:()=>B(e.id),className:"w-full text-left p-2 tesla-hover rounded-sm text-xs text-hud-main flex items-center justify-between group font-black uppercase tracking-tight",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faRoute,className:"text-oGreen mr-3 text-xs opacity-50 group-hover:opacity-100"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]}),(0,t.jsxs)("span",{className:"text-xs text-hud-muted font-black",children:[e.pointCount," pts"]})]},e.id))]}),Y&&(0,t.jsxs)("div",{className:"tesla-card bg-oYellow/5 p-4 mb-6 shadow-subtle border-l-2 border-oYellow/30 animate-soft-pulse",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faCrosshairs,className:"text-oYellow text-sm"}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black uppercase tracking-widest truncate",children:(()=>{if(!c)return l("widgets.noDestination");if(c.activeRoute?.href){let e=m[c.activeRoute.href.split("/").pop()],t=c.activeRoute.pointIndex||0;return e?.name?`${e.name} (${t+1})`:l("widgets.activeRoute")}if(c.nextPoint?.href){let e=h[c.nextPoint.href.split("/").pop()];return e?.name||l("widgets.waypoint")}if(c.nextPoint?.position){let e=c.nextPoint.position;return`${e.latitude?.toFixed(4)}\xb0, ${e.longitude?.toFixed(4)}\xb0`}return l("widgets.noDestination")})()})]}),(0,t.jsx)("button",{onClick:v,className:"text-hud-secondary hover:text-oRed transition-colors p-1",title:l("widgets.abortNavigation"),children:(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faTimes,className:"text-sm"})})]}),c?.activeRoute?.href&&(0,t.jsxs)("div",{className:"flex justify-center space-x-3 mt-4",children:[(0,t.jsxs)("button",{onClick:w,className:"bg-hud-elevated hover:bg-hud-bg text-hud-main px-4 py-1.5 rounded text-xs font-black uppercase tracking-widest transition-all shadow-soft",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faArrowLeft,className:"mr-2"}),l("widgets.previous")]}),(0,t.jsxs)("button",{onClick:b,className:"bg-oBlue hover:bg-oBlue/80 text-hud-main px-4 py-1.5 rounded text-xs font-black uppercase tracking-widest transition-all shadow-lg shadow-oBlue/20",children:[l("widgets.proceed"),(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faArrowRight,className:"ml-2"})]})]})]}),P&&(0,t.jsxs)("div",{className:`tesla-card px-3 py-2 mb-3 bg-hud-bg flex items-center justify-between ${"enabled"===P?"border-l-2 border-oGreen/30":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faRobot,className:`text-xs ${"enabled"===P?"text-oGreen":"text-hud-muted"}`}),(0,t.jsx)("span",{className:`text-xs font-black uppercase capitalize gliding-value ${"enabled"===P?"text-oGreen":"text-hud-secondary"}`,children:P})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-4 text-xs font-black uppercase",children:[(0,t.jsx)("span",{className:"text-hud-main capitalize gliding-value",children:F||"—"}),(0,t.jsx)("span",{className:"text-oYellow gliding-value",children:null!==T?`${Math.round((0,C.toDegrees)(T))}\xb0`:"—"})]})]}),I.hasData&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faRuler,className:"text-oGreen text-xs mb-2 opacity-50"}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:null==(e=I.distance)?l("common.na"):e<1e3?`${Math.round(e)} m`:`${(0,C.convertDistanceUnit)(e)} ${(0,C.getDistanceUnitLabel)()}`}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:l("widgets.distance")})]}),(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faCompass,className:"text-oBlue text-xs mb-2 opacity-50"}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:null!==I.bearingTrue?`${Math.round((0,C.toDegrees)(I.bearingTrue))}\xb0`:l("common.na")}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:l("widgets.bearing")})]}),(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faArrowRight,className:`${I.crossTrackError>50||I.crossTrackError<-50?"text-oRed animate-soft-pulse":"text-oGreen opacity-50"} text-xs mb-2`}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:null!==I.crossTrackError?`${Math.abs(Math.round(I.crossTrackError))}m`:l("common.na")}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:"XTE"})]}),(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faPlay,className:"text-oGreen text-xs mb-2 opacity-50"}),(0,t.jsxs)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:[null!==I.velocityMadeGood?`${(0,C.convertSpeedUnit)(I.velocityMadeGood)}`:l("common.na"),(0,t.jsx)("span",{className:"text-xs text-hud-secondary ml-1",children:(0,C.getSpeedUnitLabel)()})]}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:"VMG"})]}),null!==I.timeToGo&&(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faClock,className:"text-oGreen text-xs mb-2 opacity-50"}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:(e=>{if(null==e)return l("common.na");let t=Math.floor(e/3600),a=Math.floor(e%3600/60);return t>0?`${t}h ${a}m`:`${a}m`})(I.timeToGo)}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:"TTG"})]}),I.estimatedTimeOfArrival&&(0,t.jsxs)("div",{className:"tesla-card p-4 text-center tesla-hover bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:i.faClock,className:"text-oYellow text-xs mb-2 opacity-50"}),(0,t.jsx)("div",{className:"text-hud-main text-2xl font-black gliding-value tracking-tighter",children:(s=I.estimatedTimeOfArrival)?new Date(s).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):l("common.na")}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs uppercase font-black mt-2 tracking-[0.2em]",children:"ETA"})]})]})]})]})}let e_=a.default.memo(({children:e,widgetName:a,className:l="",fullscreenWidget:r,toggleFullscreen:o})=>(0,t.jsxs)(s.motion.div,{layout:!0,variants:{hidden:{opacity:0,y:20},show:{opacity:1,y:0}},transition:{duration:.5,ease:[.4,0,.2,1]},className:`relative group ${l}`,children:[e,(0,t.jsx)("button",{onClick:()=>o(a),className:"absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-all duration-500 bg-hud-bg backdrop-blur-md hover:bg-hud-elevated rounded-full w-8 h-8 flex items-center justify-center text-hud-muted hover:text-hud-main z-10 shadow-soft",title:r===a?"Exit fullscreen":"Fullscreen",children:(0,t.jsx)(n.FontAwesomeIcon,{icon:r===a?i.faCompress:i.faExpand,className:"text-xs"})})]}));e_.displayName="WidgetWrapper";let eq={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}};e.s(["default",0,function(){let{t:e}=(0,r.useTranslation)(),[o,c]=(0,a.useState)("environment"),[d,u]=(0,a.useState)(null),x=a.default.useCallback(e=>{u(t=>t===e?null:e)},[]),h=a.default.useMemo(()=>(0,t.jsxs)(s.motion.div,{variants:eq,initial:"hidden",animate:"show",className:`${d?"flex h-full":"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 h-full auto-rows-fr"}`,children:[(0,t.jsx)(e_,{widgetName:"temperature",fullscreenWidget:d,toggleFullscreen:x,className:d&&"temperature"!==d?"hidden":"temperature"===d?"w-full h-full":"",children:(0,t.jsx)(ey,{})}),(0,t.jsx)(e_,{widgetName:"weather",fullscreenWidget:d,toggleFullscreen:x,className:d&&"weather"!==d?"hidden":"weather"===d?"w-full h-full":"",children:(0,t.jsx)(eB,{})}),(0,t.jsx)(e_,{widgetName:"tide",fullscreenWidget:d,toggleFullscreen:x,className:d&&"tide"!==d?"hidden":"tide"===d?"w-full h-full":"",children:(0,t.jsx)(ej,{})}),(0,t.jsx)(e_,{widgetName:"visibility",fullscreenWidget:d,toggleFullscreen:x,className:d&&"visibility"!==d?"hidden":"visibility"===d?"w-full h-full":"",children:(0,t.jsx)(eI,{})}),(0,t.jsx)(e_,{widgetName:"airquality",fullscreenWidget:d,toggleFullscreen:x,className:d&&"airquality"!==d?"hidden":"airquality"===d?"w-full h-full":"",children:(0,t.jsx)(B,{})}),(0,t.jsx)(e_,{widgetName:"pressure",fullscreenWidget:d,toggleFullscreen:x,className:d&&"pressure"!==d?"hidden":"pressure"===d?"w-full h-full":"",children:(0,t.jsx)(P,{})})]}),[d,x]),m=a.default.useMemo(()=>(0,t.jsxs)(s.motion.div,{variants:eq,initial:"hidden",animate:"show",className:`${d?"flex h-full":"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 h-full auto-rows-fr"}`,children:[(0,t.jsx)(e_,{widgetName:"compass",fullscreenWidget:d,toggleFullscreen:x,className:d&&"compass"!==d?"hidden":"compass"===d?"w-full h-full":"",children:(0,t.jsx)(eD,{})}),(0,t.jsx)(e_,{widgetName:"attitude",fullscreenWidget:d,toggleFullscreen:x,className:d&&"attitude"!==d?"hidden":"attitude"===d?"w-full h-full":"",children:(0,t.jsx)(eP,{})}),(0,t.jsx)(e_,{widgetName:"speed",fullscreenWidget:d,toggleFullscreen:x,className:d&&"speed"!==d?"hidden":"speed"===d?"w-full h-full":"",children:(0,t.jsx)(eO,{})}),(0,t.jsx)(e_,{widgetName:"depth",fullscreenWidget:d,toggleFullscreen:x,className:d&&"depth"!==d?"hidden":"depth"===d?"w-full h-full":"",children:(0,t.jsx)(eF,{})}),(0,t.jsx)(e_,{widgetName:"aisradar",fullscreenWidget:d,toggleFullscreen:x,className:d&&"aisradar"!==d?"hidden":"aisradar"===d?"w-full h-full":"",children:(0,t.jsx)(eT.AISProvider,{children:(0,t.jsx)(eW,{})})}),(0,t.jsx)(e_,{widgetName:"course",fullscreenWidget:d,toggleFullscreen:x,className:d&&"course"!==d?"hidden":"course"===d?"w-full h-full":"",children:(0,t.jsx)(eH,{children:(0,t.jsx)(ez,{})})})]}),[d,x]),g=a.default.useMemo(()=>(0,t.jsxs)(s.motion.div,{variants:eq,initial:"hidden",animate:"show",className:`${d?"flex h-full":"grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-4 h-full auto-rows-fr"}`,children:[(0,t.jsx)(e_,{widgetName:"battery",fullscreenWidget:d,toggleFullscreen:x,className:d&&"battery"!==d?"hidden":"battery"===d?"w-full h-full":"",children:(0,t.jsx)(eG,{})}),(0,t.jsx)(e_,{widgetName:"tanks",fullscreenWidget:d,toggleFullscreen:x,className:d&&"tanks"!==d?"hidden":"tanks"===d?"w-full h-full":"",children:(0,t.jsx)(eR,{})}),(0,t.jsx)(e_,{widgetName:"humidity",fullscreenWidget:d,toggleFullscreen:x,className:d&&"humidity"!==d?"hidden":"humidity"===d?"w-full h-full":"",children:(0,t.jsx)(D,{})}),(0,t.jsx)(e_,{widgetName:"uvindex",fullscreenWidget:d,toggleFullscreen:x,className:d&&"uvindex"!==d?"hidden":"uvindex"===d?"w-full h-full":"",children:(0,t.jsx)(y,{})}),(0,t.jsx)(e_,{widgetName:"sunrise",fullscreenWidget:d,toggleFullscreen:x,className:d&&"sunrise"!==d?"hidden":"sunrise"===d?"w-full h-full":"",children:(0,t.jsx)(N,{})}),(0,t.jsx)(e_,{widgetName:"time",fullscreenWidget:d,toggleFullscreen:x,className:d&&"time"!==d?"hidden":"time"===d?"w-full h-full":"",children:(0,t.jsx)(eY,{})})]}),[d,x]),p=a.default.useMemo(()=>{switch(o){case"environment":default:return h;case"navigation":return m;case"system":return g}},[o,h,m,g]);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:"environment",label:e("dashboard.environment"),icon:i.faLeaf},{id:"navigation",label:e("dashboard.navigation"),icon:i.faCompass},{id:"system",label:e("dashboard.systems"),icon:i.faCog}].map(e=>(0,t.jsxs)("button",{onClick:()=>c(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${o===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)(n.FontAwesomeIcon,{icon:e.icon,className:"mr-2"}),e.label]},e.id))}),(0,t.jsx)("div",{className:"flex-1 p-4 min-h-0 overflow-auto scrollbar-hide",children:(0,t.jsx)(l.AnimatePresence,{mode:"wait",children:(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:"h-full",children:p},o)})})]})}],54784)},25294,e=>{e.n(e.i(54784))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79866,(e,t,n)=>{t.exports={boats:[{name:"Default",modelPath:"default",capabilities:["navigation","rudder","sail","color"]},{name:"Optimist",modelPath:"optimist",capabilities:["navigation","ais"]},{name:"Sailboat",modelPath:"sailboat",capabilities:["navigation","ais"]},{name:"Ship",modelPath:"ship",capabilities:["navigation","ais"]},{name:"Windsurf",modelPath:"windsurf",capabilities:["navigation","ais"]}]}},83402,e=>{"use strict";var t=e.i(79866);let n=new class{constructor(){this.defaultConfig={signalkUrl:"http://localhost:3000",username:"",password:"",useAuthentication:!1,signalKUrlSet:!1,debugMode:!1,selectedBoat:"Default",primaryColor:null,metallicEffect:!1,aisLengthScalingFactor:.7,compassNorthUp:!1,hide3DCompass:!1,hideTrueWind:!1,showCustomUrls:!1,customExternalUrls:{},currentView:"default",theme:"dark",language:"en",distanceUnits:"nm",depthUnits:"m",speedUnits:"kn",temperatureUnits:"C",positionFormat:"DD",preferTrueValues:!0,preferredWindSpeedPath:"speedTrue",preferredWindDirectionPath:"directionTrue",preferredHeadingPath:"courseOverGroundTrue",debugWindOverride:!1,debugWindSpeed:10,debugWindDirection:0,debugShowAxes:!1,showSailTrimSliders:!0,showRigging:!0},this.configKey="ocearoConfig",this.inMemoryConfig={...this.defaultConfig},this.config=this.loadConfig()}isLocalStorageAvailable(){try{return"u">typeof localStorage}catch{return!1}}loadConfig(){if(this.isLocalStorageAvailable()){let e=localStorage.getItem(this.configKey);if(!e)return this.saveConfig(this.defaultConfig),{...this.defaultConfig};try{return JSON.parse(e)}catch(e){return console.error("Failed to parse stored configuration:",e),{...this.defaultConfig}}}return{...this.inMemoryConfig}}saveConfig(e){this.config={...this.config,...e},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.config}}get(e){return this.config[e]}set(e,t){this.config[e]=t,this.saveConfig(this.config)}resetConfig(){this.config={...this.defaultConfig},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.defaultConfig}}getAll(){return{...this.config}}getDefaultConfig(){return{...this.defaultConfig}}getSelectedBoat(){let e=this.config.selectedBoat;return e?this.getBoatsData().find(t=>t.name===e):[]}getBoatsData(){return t.default.boats}getComputedSignalKUrl(){return this.config.debugMode?"https://demo.signalk.org:443":`${window.location.protocol}//${window.location.hostname}${window.location.port?":"+window.location.port:""}`}getCurrentView(){return this.config.currentView||this.defaultConfig.currentView}setCurrentView(e){this.set("currentView",e)}};e.s(["default",0,n])},55838,(e,t,n)=>{"use strict";var i=e.r(71645),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useState,s=i.useEffect,l=i.useLayoutEffect,a=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=o({inst:{value:n,getSnapshot:t}}),r=i[0].inst,c=i[1];return l(function(){r.value=n,r.getSnapshot=t,u(r)&&c({inst:r})},[e,n,t]),s(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),a(n),n};n.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let i=e.r(32061);function r({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new i.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function i(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return i}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return a}});let i=e.r(43476),r=e.r(74080),o=e.r(63599),s=e.r(9885),l=e.r(43369);function a({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let i=t.reactLoadableManifest;for(let t of e){if(!i[t])continue;let e=i[t].files;n.push(...e)}}if(0===n.length)return null;let u=(0,l.getAssetTokenQuery)();return(0,i.jsx)(i.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${u}`;return e.endsWith(".css")?(0,i.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return u}});let i=e.r(43476),r=e.r(71645),o=e.r(67585),s=e.r(52157);function l(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},u=function(e){let t={...a,...e},n=(0,r.lazy)(()=>t.loader().then(l)),u=t.loading;function c(e){let l=u?(0,i.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,a=!t.ssr||!!t.loading,c=a?r.Suspense:r.Fragment,d=t.ssr?(0,i.jsxs)(i.Fragment,{children:["u"<typeof window?(0,i.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(c,{...a?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let i=e.r(55682)._(e.r(69093));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,i.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},83934,e=>{"use strict";var t=e.i(43476),n=e.i(71645),i=e.i(66799);e.i(67561);var r=e.i(85709),o=e.i(46991);let s=(0,n.createContext)();e.s(["WeatherContextProvider",0,({children:e})=>{let l=(0,r.useSignalKPath)("navigation.position"),a=(0,n.useMemo)(()=>["environment.outside.temperature","environment.outside.relativeHumidity","environment.outside.pressure","environment.wind.speedTrue","environment.wind.directionTrue","environment.wind.gust"],[]),u=(0,r.useSignalKPaths)(a),[c,d]=(0,n.useState)([]),[f,h]=(0,n.useState)(!1),[g,m]=(0,n.useState)(null),[p,v]=(0,n.useState)(null),[w,y]=(0,n.useState)(null),b=(0,n.useRef)(null),C=(0,n.useRef)(null),S=(0,n.useRef)(l);S.current=l;let j=(0,n.useCallback)(async()=>{let e=S.current;if(e?.latitude&&e?.longitude){h(!0),m(null);try{let t=i.default.isWeatherApiAvailable();if(null===t&&(t=await i.default.checkWeatherApiAvailability()),v(t),!t)return void m("Weather API not available on SignalK server");let n=await i.default.getWeatherForecast(e.latitude,e.longitude),r=i.default.parseWeatherForecast(n);d(r),y(new Date)}catch(e){e.message&&e.message.includes("400")?(console.warn("WeatherContext: Weather forecast not supported by this server"),v(!1)):console.warn("WeatherContext: Failed to fetch forecast:",e.message),m(e.message)}finally{h(!1)}}},[]),P=(0,n.useCallback)(e=>{if(!c||0===c.length)return null;let t=Math.min(Math.floor(e),c.length-1);return c[t]||null},[c]),x=(0,n.useCallback)(()=>{let e=c.length>0?c[0]:null,t=u["environment.outside.temperature"]??(e?.temperature!=null?e.temperature+273.15:null),n=u["environment.outside.relativeHumidity"]??e?.humidity??null,i=u["environment.outside.pressure"]??e?.pressure??null,r=(0,o.finite)(u["environment.wind.speedTrue"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.speed)),s=(0,o.finite)(u["environment.wind.directionTrue"])??(0,o.finite)((0,o.degToRad)(e?.wind?.direction)),l=Object.values(u).some(e=>null!==(0,o.finite)(e)),a=e?.clouds;return{source:null!==t||null!==n||null!==i||null!==r?l?"sensors":"forecast":null,temperature:t,humidity:n,pressure:i,windSpeed:r,windDirection:s,cloudCover:null!=a?a>1?a/100:a:null,rain:e?.rain??null,description:e?.description||null}},[u,c]),T=(0,n.useCallback)(()=>{let e=c.length>0?c[0]:null,t=(0,o.finite)(u["environment.wind.speedTrue"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.speed)),n=(0,o.finite)(u["environment.wind.directionTrue"])??(0,o.finite)((0,o.degToRad)(e?.wind?.direction)),i=(0,o.finite)(u["environment.wind.gust"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.gust)),r=null!==(0,o.finite)(u["environment.wind.speedTrue"])||null!==(0,o.finite)(u["environment.wind.directionTrue"]);return{source:null!==t||null!==n?r?"sensors":"forecast":null,speed:t,direction:n,gust:i}},[u,c]);(0,n.useEffect)(()=>(b.current=setTimeout(()=>{j()},5e3),C.current=setInterval(()=>{j()},18e5),()=>{b.current&&clearTimeout(b.current),C.current&&clearInterval(C.current)}),[j]);let k=(0,n.useMemo)(()=>({forecasts:c,isLoading:f,error:g,weatherApiAvailable:p,lastFetchTime:w,fetchWeatherForecast:j,getForecastForTime:P,getCurrentWeather:x,getWindData:T}),[c,f,g,p,w,j,P,x,T]);return(0,t.jsx)(s.Provider,{value:k,children:e})},"useWeather",0,()=>{let e=(0,n.useContext)(s);if(!e)throw Error("useWeather must be used within a WeatherContextProvider");return e}])},45344,e=>{e.v(t=>Promise.all(["static/chunks/29-ag86gvlc40.js","static/chunks/2nd5amcst4lhp.js"].map(t=>e.l(t))).then(()=>t(42602)))},10520,e=>{e.v(t=>Promise.all(["static/chunks/0zjxnzbxh76mt.js","static/chunks/2nxsyowmuwpjy.js"].map(t=>e.l(t))).then(()=>t(61891)))},49063,e=>{e.v(t=>Promise.all(["static/chunks/36ra6xjie0dsv.js","static/chunks/2nxsyowmuwpjy.js","static/chunks/2nd5amcst4lhp.js"].map(t=>e.l(t))).then(()=>t(85626)))},13181,e=>{e.v(t=>Promise.all(["static/chunks/11ln9lzzbo35q.js","static/chunks/27hn45pv56pv7.js","static/chunks/2nxsyowmuwpjy.js"].map(t=>e.l(t))).then(()=>t(23595)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79866,(e,t,n)=>{t.exports={boats:[{name:"Default",modelPath:"default",capabilities:["navigation","rudder","sail","color"]},{name:"Optimist",modelPath:"optimist",capabilities:["navigation","ais"]},{name:"Sailboat",modelPath:"sailboat",capabilities:["navigation","ais"]},{name:"Ship",modelPath:"ship",capabilities:["navigation","ais"]},{name:"Windsurf",modelPath:"windsurf",capabilities:["navigation","ais"]}]}},83402,e=>{"use strict";var t=e.i(79866);let n=new class{constructor(){this.defaultConfig={signalkUrl:"http://localhost:3000",username:"",password:"",useAuthentication:!1,signalKUrlSet:!1,debugMode:!1,selectedBoat:"Default",primaryColor:null,metallicEffect:!1,aisLengthScalingFactor:.7,compassNorthUp:!1,hide3DCompass:!1,hideTrueWind:!1,showCustomUrls:!1,customExternalUrls:{},currentView:"default",theme:"dark",language:"en",distanceUnits:"nm",depthUnits:"m",speedUnits:"kn",temperatureUnits:"C",positionFormat:"DD",preferTrueValues:!0,preferredWindSpeedPath:"speedTrue",preferredWindDirectionPath:"directionTrue",preferredHeadingPath:"courseOverGroundTrue",debugWindOverride:!1,debugWindSpeed:10,debugWindDirection:0,debugShowAxes:!1,showSailTrimSliders:!0,showRigging:!0},this.configKey="ocearoConfig",this.inMemoryConfig={...this.defaultConfig},this.config=this.loadConfig()}isLocalStorageAvailable(){try{return"u">typeof localStorage}catch{return!1}}loadConfig(){if(this.isLocalStorageAvailable()){let e=localStorage.getItem(this.configKey);if(!e)return this.saveConfig(this.defaultConfig),{...this.defaultConfig};try{return JSON.parse(e)}catch(e){return console.error("Failed to parse stored configuration:",e),{...this.defaultConfig}}}return{...this.inMemoryConfig}}saveConfig(e){this.config={...this.config,...e},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.config}}get(e){return this.config[e]}set(e,t){this.config[e]=t,this.saveConfig(this.config)}resetConfig(){this.config={...this.defaultConfig},this.isLocalStorageAvailable()?localStorage.setItem(this.configKey,JSON.stringify(this.config)):this.inMemoryConfig={...this.defaultConfig}}getAll(){return{...this.config}}getDefaultConfig(){return{...this.defaultConfig}}getSelectedBoat(){let e=this.config.selectedBoat;return e?this.getBoatsData().find(t=>t.name===e):[]}getBoatsData(){return t.default.boats}getComputedSignalKUrl(){return this.config.debugMode?"https://demo.signalk.org:443":`${window.location.protocol}//${window.location.hostname}${window.location.port?":"+window.location.port:""}`}getCurrentView(){return this.config.currentView||this.defaultConfig.currentView}setCurrentView(e){this.set("currentView",e)}};e.s(["default",0,n])},55838,(e,t,n)=>{"use strict";var i=e.r(71645),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useState,s=i.useEffect,a=i.useLayoutEffect,l=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=o({inst:{value:n,getSnapshot:t}}),r=i[0].inst,c=i[1];return a(function(){r.value=n,r.getSnapshot=t,u(r)&&c({inst:r})},[e,n,t]),s(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},67585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let i=e.r(32061);function r({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new i.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},9885,(e,t,n)=>{"use strict";function i(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return i}})},52157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return l}});let i=e.r(43476),r=e.r(74080),o=e.r(63599),s=e.r(9885),a=e.r(43369);function l({moduleIds:e}){if("u">typeof window)return null;let t=o.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let i=t.reactLoadableManifest;for(let t of e){if(!i[t])continue;let e=i[t].files;n.push(...e)}}if(0===n.length)return null;let u=(0,a.getAssetTokenQuery)();return(0,i.jsx)(i.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${u}`;return e.endsWith(".css")?(0,i.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},69093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return u}});let i=e.r(43476),r=e.r(71645),o=e.r(67585),s=e.r(52157);function a(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(a(()=>null)),loading:null,ssr:!0},u=function(e){let t={...l,...e},n=(0,r.lazy)(()=>t.loader().then(a)),u=t.loading;function c(e){let a=u?(0,i.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,c=l?r.Suspense:r.Fragment,d=t.ssr?(0,i.jsxs)(i.Fragment,{children:["u"<typeof window?(0,i.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(c,{...l?{fallback:a}:{},children:d})}return c.displayName="LoadableComponent",c}},70703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let i=e.r(55682)._(e.r(69093));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,i.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},83934,e=>{"use strict";var t=e.i(43476),n=e.i(71645),i=e.i(66799);e.i(67561);var r=e.i(85709),o=e.i(46991);let s=(0,n.createContext)();e.s(["WeatherContextProvider",0,({children:e})=>{let a=(0,r.useSignalKPath)("navigation.position"),l=(0,n.useMemo)(()=>["environment.outside.temperature","environment.outside.relativeHumidity","environment.outside.pressure","environment.wind.speedTrue","environment.wind.directionTrue","environment.wind.gust"],[]),u=(0,r.useSignalKPaths)(l),[c,d]=(0,n.useState)([]),[f,h]=(0,n.useState)(!1),[g,m]=(0,n.useState)(null),[p,v]=(0,n.useState)(null),[y,w]=(0,n.useState)(null),b=(0,n.useRef)(null),C=(0,n.useRef)(null),S=(0,n.useRef)(a);S.current=a;let j=(0,n.useCallback)(async()=>{let e=S.current;if(e?.latitude&&e?.longitude){h(!0),m(null);try{let t=i.default.isWeatherApiAvailable();if(null===t&&(t=await i.default.checkWeatherApiAvailability()),v(t),!t)return void m("Weather API not available on SignalK server");let n=await i.default.getWeatherForecast(e.latitude,e.longitude),r=i.default.parseWeatherForecast(n);d(r),w(new Date)}catch(e){e.message&&e.message.includes("400")?(console.warn("WeatherContext: Weather forecast not supported by this server"),v(!1)):console.warn("WeatherContext: Failed to fetch forecast:",e.message),m(e.message)}finally{h(!1)}}},[]),P=(0,n.useCallback)(e=>{if(!c||0===c.length)return null;let t=Math.min(Math.floor(e),c.length-1);return c[t]||null},[c]),x=(0,n.useCallback)(()=>{let e=c.length>0?c[0]:null,t=u["environment.outside.temperature"]??(e?.temperature!=null?e.temperature+273.15:null),n=u["environment.outside.relativeHumidity"]??e?.humidity??null,i=u["environment.outside.pressure"]??e?.pressure??null,r=(0,o.finite)(u["environment.wind.speedTrue"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.speed)),s=(0,o.finite)(u["environment.wind.directionTrue"])??(0,o.finite)((0,o.degToRad)(e?.wind?.direction)),a=Object.values(u).some(e=>null!==(0,o.finite)(e)),l=e?.clouds;return{source:null!==t||null!==n||null!==i||null!==r?a?"sensors":"forecast":null,temperature:t,humidity:n,pressure:i,windSpeed:r,windDirection:s,cloudCover:null!=l?l>1?l/100:l:null,rain:e?.rain??null,description:e?.description||null}},[u,c]),k=(0,n.useCallback)(()=>{let e=c.length>0?c[0]:null,t=(0,o.finite)(u["environment.wind.speedTrue"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.speed)),n=(0,o.finite)(u["environment.wind.directionTrue"])??(0,o.finite)((0,o.degToRad)(e?.wind?.direction)),i=(0,o.finite)(u["environment.wind.gust"])??(0,o.finite)((0,o.knotsToMs)(e?.wind?.gust)),r=null!==(0,o.finite)(u["environment.wind.speedTrue"])||null!==(0,o.finite)(u["environment.wind.directionTrue"]);return{source:null!==t||null!==n?r?"sensors":"forecast":null,speed:t,direction:n,gust:i}},[u,c]);(0,n.useEffect)(()=>(b.current=setTimeout(()=>{j()},5e3),C.current=setInterval(()=>{j()},18e5),()=>{b.current&&clearTimeout(b.current),C.current&&clearInterval(C.current)}),[j]);let T=(0,n.useMemo)(()=>({forecasts:c,isLoading:f,error:g,weatherApiAvailable:p,lastFetchTime:y,fetchWeatherForecast:j,getForecastForTime:P,getCurrentWeather:x,getWindData:k}),[c,f,g,p,y,j,P,x,k]);return(0,t.jsx)(s.Provider,{value:T,children:e})},"useWeather",0,()=>{let e=(0,n.useContext)(s);if(!e)throw Error("useWeather must be used within a WeatherContextProvider");return e}])},45344,e=>{e.v(t=>Promise.all(["static/chunks/0kinaai2rvd43.js","static/chunks/2nd5amcst4lhp.js"].map(t=>e.l(t))).then(()=>t(42602)))},10520,e=>{e.v(t=>Promise.all(["static/chunks/0zjxnzbxh76mt.js","static/chunks/2nxsyowmuwpjy.js"].map(t=>e.l(t))).then(()=>t(61891)))},49063,e=>{e.v(t=>Promise.all(["static/chunks/36ra6xjie0dsv.js","static/chunks/2nxsyowmuwpjy.js","static/chunks/2nd5amcst4lhp.js"].map(t=>e.l(t))).then(()=>t(85626)))},13181,e=>{e.v(t=>Promise.all(["static/chunks/2fy4q1c5l3tpj.js","static/chunks/19xb2y6sgfnza.js","static/chunks/2nxsyowmuwpjy.js","static/chunks/27hn45pv56pv7.js"].map(t=>e.l(t))).then(()=>t(23595)))}]);
|