ocearo-ui 2.0.2 → 2.1.0

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.
Files changed (86) hide show
  1. package/404.html +1 -1
  2. package/README.fr.md +23 -3
  3. package/README.md +23 -3
  4. package/__next.__PAGE__.txt +3 -3
  5. package/__next._full.txt +3 -3
  6. package/__next._tree.txt +2 -2
  7. package/_next/static/chunks/0-jqvc-r0kh0c.js +1 -0
  8. package/_next/static/chunks/{2g-xpe7xnropn.js → 05do10p9ldt1p.js} +1 -1
  9. package/_next/static/chunks/07gn9z0d6clzs.js +1 -0
  10. package/_next/static/chunks/{2w44atvyp9o_w.js → 096zaxs1gf_3q.js} +2 -1
  11. package/_next/static/chunks/0b3cus8izqkmg.js +119 -0
  12. package/_next/static/chunks/0j11dppxb9l0b.js +1 -0
  13. package/_next/static/chunks/0jucaltuccn03.js +1 -0
  14. package/_next/static/chunks/{1gt2hhqk1821k.js → 0zvzu5fnwh4_a.js} +3 -3
  15. package/_next/static/chunks/1_g85m2d7jjpo.css +3 -0
  16. package/_next/static/chunks/1arvue9o-atui.js +739 -0
  17. package/_next/static/chunks/1bo0ke8gjc1c2.js +1 -0
  18. package/_next/static/chunks/1cp1kkarm5gxz.js +1 -0
  19. package/_next/static/chunks/1e-w_-usen7fy.js +3 -0
  20. package/_next/static/chunks/1hz_mzl8l35j8.js +1 -0
  21. package/_next/static/chunks/1k72cpd0x8veh.js +1 -0
  22. package/_next/static/chunks/1mtfh1vqpvit2.js +1 -0
  23. package/_next/static/chunks/1u6o5_s2b39xh.js +1 -0
  24. package/_next/static/chunks/{1exvcc71cgr4t.js → 2aivnrnff0avu.js} +1 -1
  25. package/_next/static/chunks/2fe99e03gnvg9.js +1 -0
  26. package/_next/static/chunks/{3nm7o0eq5abhg.js → 2fthh9f57zzm2.js} +1 -1
  27. package/_next/static/chunks/{0jfox92up1jvy.js → 2gr1d26f-ymoh.js} +1 -1
  28. package/_next/static/chunks/2r98jty3a4wel.js +564 -0
  29. package/_next/static/chunks/2v6ebsavxlgyw.js +1 -0
  30. package/_next/static/chunks/{1w1xks0hp_tlr.js → 33u782y6vhw-f.js} +9 -9
  31. package/_next/static/chunks/3qik_nv7zlj4e.js +1 -0
  32. package/_next/static/chunks/3qzb9nvvw-b-k.js +1 -0
  33. package/_next/static/chunks/41mro59si-xxc.js +1 -0
  34. package/_next/static/chunks/41odv061mfm6t.js +1 -0
  35. package/_not-found/__next._full.txt +2 -2
  36. package/_not-found/__next._not-found.__PAGE__.txt +2 -2
  37. package/_not-found/__next._tree.txt +2 -2
  38. package/_not-found.html +1 -1
  39. package/_not-found.txt +2 -2
  40. package/docs/index.json +10 -5
  41. package/docs/signalk-server.html +3751 -0
  42. package/docs/signalk-specification.html +8507 -0
  43. package/guide/anchor.jpg +0 -0
  44. package/guide/bathymetry.jpg +0 -0
  45. package/guide/dashboard.jpg +0 -0
  46. package/guide/hero.jpg +0 -0
  47. package/guide/logbook.jpg +0 -0
  48. package/guide/mob.jpg +0 -0
  49. package/guide/parking.jpg +0 -0
  50. package/guide/polars.jpg +0 -0
  51. package/guide/traffic.jpg +0 -0
  52. package/guide/weather.jpg +0 -0
  53. package/index.html +1 -1
  54. package/index.txt +3 -3
  55. package/package.json +1 -1
  56. package/settings/__next._full.txt +3 -3
  57. package/settings/__next._tree.txt +2 -2
  58. package/settings/__next.settings.__PAGE__.txt +3 -3
  59. package/settings.html +1 -1
  60. package/settings.txt +3 -3
  61. package/_next/static/chunks/0iqdztntvxh3c.js +0 -119
  62. package/_next/static/chunks/0iztd835j5p1n.js +0 -700
  63. package/_next/static/chunks/0voiofm58khqd.js +0 -1
  64. package/_next/static/chunks/0w_skktmh3e48.js +0 -1
  65. package/_next/static/chunks/0zwc9m4qgtwle.js +0 -1
  66. package/_next/static/chunks/144mjqdrx42lq.js +0 -1
  67. package/_next/static/chunks/1ed7ayfg19cjb.js +0 -1
  68. package/_next/static/chunks/1epya-yh2wvj2.js +0 -1
  69. package/_next/static/chunks/1gq4t2dyr7rq3.js +0 -1
  70. package/_next/static/chunks/1ptj3mv8b_tzs.js +0 -1
  71. package/_next/static/chunks/1y35unwvy8p98.js +0 -1
  72. package/_next/static/chunks/1zm03hw2ylxw8.js +0 -1
  73. package/_next/static/chunks/2aq8orcir5h03.js +0 -1
  74. package/_next/static/chunks/2kmptoy43h0mx.js +0 -1
  75. package/_next/static/chunks/2kwn4iymxaom3.js +0 -1
  76. package/_next/static/chunks/2rebcvig176xk.js +0 -564
  77. package/_next/static/chunks/2ryo_bbmt6t74.css +0 -3
  78. package/_next/static/chunks/3--qzv1u6c7_7.js +0 -1
  79. package/_next/static/chunks/37t6vg8fb1-z8.js +0 -1
  80. package/_next/static/chunks/3p9ziqn6r35qf.js +0 -1
  81. package/_next/static/chunks/3q8o52_juxmdp.js +0 -1
  82. package/docs/opencpn.pdf +0 -0
  83. package/docs/signalk.pdf +0 -0
  84. /package/_next/static/{_UKzzvfzAh-9NIsngWWio → EuchA2ImhjrwCnR5WjCLX}/_buildManifest.js +0 -0
  85. /package/_next/static/{_UKzzvfzAh-9NIsngWWio → EuchA2ImhjrwCnR5WjCLX}/_clientMiddlewareManifest.js +0 -0
  86. /package/_next/static/{_UKzzvfzAh-9NIsngWWio → EuchA2ImhjrwCnR5WjCLX}/_ssgManifest.js +0 -0
@@ -1 +1,2 @@
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(61949),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,"LightShadow",()=>o.LightShadow,"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,"RenderObjectRefreshType",()=>o.RenderObjectRefreshType,"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,"TextureSource",()=>o.TextureSource,"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:d,gl:p,events:m=r.f,eventSource:h,eventPrefix:C,shadows:f,linear:g,flat:b,legacy:x,orthographic:S,frameloop:A,dpr:T,performance:M,raycaster:G,camera:_,scene:R,onPointerMissed:F,onCreated:B,...y}){a.useMemo(()=>(0,r.e)(i),[]);let v=(0,r.u)(),[L,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[d,p]=(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:d,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,C=e?"number"==typeof e?e:e.resize:null,f=(0,a.useRef)(!1);(0,a.useEffect)(()=>(f.current=!0,()=>void(f.current=!1)));let[g,b,x]=(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:d}=m.current.element.getBoundingClientRect(),h={left:r,top:a,width:o,height:i,bottom:l,right:c,x:u,y:d};m.current.element instanceof HTMLElement&&n&&(h.height=m.current.element.offsetHeight,h.width=m.current.element.offsetWidth),Object.freeze(h),f.current&&(e=m.current.lastBounds,t=h,!s.every(r=>e[r]===t[r]))&&p(m.current.lastBounds=h)};return[e,C?l(e,C):e,h?l(e,h):e]},[p,n,h,C]);function S(){m.current.scrollContainers&&(m.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",x,!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 A(){m.current.element&&(m.current.resizeObserver=new u(x),m.current.resizeObserver.observe(m.current.element),t&&m.current.scrollContainers&&m.current.scrollContainers.forEach(e=>e.addEventListener("scroll",x,{capture:!0,passive:!0})),m.current.orientationHandler=()=>{x()},"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=x,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=b,(0,a.useEffect)(()=>(window.addEventListener("resize",c),()=>void window.removeEventListener("resize",c)),[c]),(0,a.useEffect)(()=>{S(),A()},[t,x,b]),(0,a.useEffect)(()=>S,[]),[e=>{e&&e!==m.current.element&&(S(),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),A())},d,g]}({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)(F),I=a.useCallback(e=>null==N.current?void 0:N.current(e),[N]),[P,k]=a.useState(!1),[O,j]=a.useState(!1);if(P)throw P;if(O)throw O;let U=a.useRef(null),[W,H]=(0,r.b)(),z=a.useRef(null),q=()=>h?(0,r.i)(h)?h.current:h:w.current;a.useInsertionEffect(()=>()=>{let e=U.current;U.current=null,null==e||e.unmount()},[]),(0,r.c)(()=>{let e=D.current;E.width>0&&E.height>0&&e&&(U.current||(U.current=(0,r.d)(e)),U.current.configure({gl:p,scene:R,events:m,shadows:f,linear:g,flat:b,legacy:x,orthographic:S,frameloop:A,dpr:T,performance:M,raycaster:G,camera:_,size:E,onPointerMissed:I,onCreated:e=>{var t;z.current=e,null==e.events.connect||e.events.connect(null!=(t=q())?t: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)}}).catch(j),"fulfilled"===U.current.ready.status?U.current.render((0,t.jsx)(v,{children:(0,t.jsx)(r.E,{set:j,children:(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)(r.B,{set:k}),children:null!=n?n:null})})})):"pending"===U.current.ready.status&&H(U.current.ready))}),a.useEffect(()=>{var e;let t=null==(e=z.current)?void 0:e.get(),r=q();t&&r&&t.events.connected!==r&&(null==t.events.connect||t.events.connect(r))}),a.useEffect(()=>{let e=D.current;return()=>{var t;e.isConnected||null==(t=U.current)||t.unmount()}},[]);let V=h?"none":"auto";return(0,t.jsxs)("div",{ref:w,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...d},...y,children:[(0,t.jsx)("div",{ref:L,style:{width:"100%",height:"100%"},children:(0,t.jsx)("canvas",{ref:D,style:{display:"block"},children:o})}),W]})}function d(e){return(0,t.jsx)(c.FiberProvider,{children:(0,t.jsx)(u,{...e})})}e.i(89499);var p=e.i(90874),m=e.i(58567),h=e.i(70703),C=e.i(67561),f=e.i(83402),g=e.i(49721),b=e.i(68757),x=e.i(18638);e.i(85269);var S=e.i(22831);let A=({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`})]}),T=()=>{let{t:e}=(0,S.useTranslation)(),{theme:r,themeMode:a,setTheme:n,states:o,toggleState:i,toggleExclusiveMode:l,cycleOceanMode:s}=(0,C.useOcearoContext)(),c={black:{icon:b.faWater,color:"text-hud-muted",label:e("toolbar.oceanBlack")},water:{icon:b.faWater,color:"text-oBlue",label:e("toolbar.oceanWater")},chart:{icon:b.faMap,color:"text-oGreen",label:e("toolbar.oceanChart")},depth:{icon:b.faLayerGroup,color:"text-oBlue",label:e("toolbar.oceanDepth")},meteo:{icon:b.faCloudSunRain,color:"text-oYellow",label:e("toolbar.oceanMeteo")}},u={auto:{icon:b.faCircleHalfStroke,label:e("toolbar.themeAuto",{theme:e(`toolbar.theme_${r}`)})},day:{icon:b.faSun,label:e("toolbar.theme_day")},dark:{icon:b.faMoon,label:e("toolbar.theme_dark")},night:{icon:b.faEye,label:e("toolbar.theme_night")}},d=u[a]||u.dark,p=o.oceanMode||"black",m=c[p];return(0,t.jsxs)("div",{className:"flex items-center space-x-1 p-1.5 rounded-2xl",children:[(0,t.jsx)(A,{onClick:()=>l("autopilot"),icon:b.faShip,isActive:o.autopilot,activeClass:"text-oBlue",label:e("toolbar.autopilot")}),(0,t.jsx)(A,{onClick:()=>l("anchorWatch"),icon:b.faAnchor,isActive:o.anchorWatch,activeClass:"text-oYellow",label:e("toolbar.anchorWatch")}),(0,t.jsx)(A,{onClick:()=>l("parkingMode"),icon:b.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)(A,{onClick:()=>{n(x.THEME_MODES[(x.THEME_MODES.indexOf(a)+1)%x.THEME_MODES.length])},icon:d.icon,isActive:"dark"!==a,activeClass:"text-hud-main",label:d.label}),(0,t.jsx)(A,{onClick:s,icon:m.icon,isActive:"black"!==p,activeClass:m.color,label:m.label}),o.autopilot&&"black"===p&&(0,t.jsx)(A,{onClick:()=>i("showPolar"),icon:b.faCompass,isActive:o.showPolar,activeClass:"text-oBlue",label:e("toolbar.polarView")}),o.autopilot&&(0,t.jsx)(A,{onClick:()=>i("showLaylines3D"),icon:b.faRulerCombined,isActive:o.showLaylines3D,activeClass:"text-oGreen",label:e("toolbar.laylines3D")}),(0,t.jsx)(A,{onClick:()=>i("ais"),icon:b.faSatellite,isActive:o.ais,activeClass:"text-oGreen",label:e("toolbar.aisRadar")})]})};var M=e.i(72466),G=e.i(85709);let _="batteries",R={FRESH_WATER:{id:"freshWater",labelKey:"tanks.freshWater",path:"tanks.freshWater.0.currentLevel",icon:b.faDroplet,color:"bg-oBlue"},FUEL:{id:"fuel",labelKey:"tanks.fuel",path:"tanks.fuel.0.currentLevel",icon:b.faGasPump,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",labelKey:"tanks.blackWater",path:"tanks.blackWater.0.currentLevel",icon:b.faToilet,color:"bg-hud-muted"}},F=({level:e,type:r})=>{let{t:a}=(0,S.useTranslation)(),n=Math.max(0,Math.min(100,e)),{labelKey:o,icon:i,color:l}=R[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-caption font-semibold tabular-nums min-w-[28px] text-right ${s?"text-oRed animate-soft-pulse":"text-hud-main"}`,children:[n,"%"]})]})},B=({batteryLevel:e,batteryNumber:r,voltage:a})=>{let{t:n}=(0,S.useTranslation)(),o=Math.max(0,Math.min(100,e)),i=(0,M.isBatteryCharging)(a),l=o<=M.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:b.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}%`}})})]})},y=()=>{let[e,r]=(0,a.useState)(_),n=(0,a.useMemo)(()=>["electrical.batteries.1.capacity.stateOfCharge","electrical.batteries.1.voltage"],[]),o=(0,a.useMemo)(()=>["tanks.freshWater.0.currentLevel","tanks.fuel.0.currentLevel","tanks.blackWater.0.currentLevel"],[]),i=(0,G.useSignalKPaths)([...n,...o]),l=(0,a.useMemo)(()=>{let e=i["electrical.batteries.1.capacity.stateOfCharge"],t=i["electrical.batteries.1.voltage"];return[{level:null==e?(0,M.estimateStateOfCharge)(t):e,number:1,voltage:t}].filter(e=>null!=e.level&&!Number.isNaN(e.level))},[i]),s=(0,a.useMemo)(()=>{let e=i["tanks.freshWater.0.currentLevel"],t=i["tanks.fuel.0.currentLevel"],r=i["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}},[i]),c=()=>{r(e=>e===_?"tanks":_)},u=e===_;return(0,t.jsx)("div",{className:"p-1.5 rounded-2xl transition-all duration-300 cursor-pointer select-none",onClick:c,role:"button",tabIndex:0,"aria-label":`Toggle between ${u?"tanks":"batteries"} display`,onKeyDown:e=>"Enter"===e.key&&c(),children:(0,t.jsx)("div",{className:"flex flex-col space-y-1",children:u?(0,t.jsx)(t.Fragment,{children:l.map(e=>(0,t.jsx)(B,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,t.jsx)(t.Fragment,{children:Object.keys(R).map(e=>(0,t.jsx)(F,{type:e,level:s[e]},e))})})})};var v=e.i(39271);let L=(0,h.default)(()=>e.A(36258),{loadableGenerated:{modules:[59465]},ssr:!1}),E=(0,h.default)(()=>e.A(11220),{loadableGenerated:{modules:[27404]},ssr:!1}),D=(0,h.default)(()=>e.A(97820),{loadableGenerated:{modules:[69675]},ssr:!1}),w=(0,h.default)(()=>e.A(29882),{loadableGenerated:{modules:[56665]}}),N=(0,h.default)(()=>e.A(93170),{loadableGenerated:{modules:[50226]}}),I=(0,h.default)(()=>e.A(93889),{loadableGenerated:{modules:[58166]}}),P=(0,h.default)(()=>e.A(64390),{loadableGenerated:{modules:[39554]}}),k=(0,h.default)(()=>e.A(48217),{loadableGenerated:{modules:[14774]}}),O=(0,h.default)(()=>e.A(30150),{loadableGenerated:{modules:[84237]}}),j=(0,h.default)(()=>e.A(34882),{loadableGenerated:{modules:[77021]}}),U=(0,h.default)(()=>e.A(59499),{loadableGenerated:{modules:[85003]}}),W=(0,h.default)(()=>e.A(43322),{loadableGenerated:{modules:[56101]}}),H=(0,h.default)(()=>e.A(32673),{loadableGenerated:{modules:[36540]}}),z=(0,h.default)(()=>e.A(66984),{loadableGenerated:{modules:[79261]}}),q=(0,h.default)(()=>e.A(32598),{loadableGenerated:{modules:[79224]}}),V=(0,h.default)(()=>e.A(73321),{loadableGenerated:{modules:[78938]}}),K=(0,h.default)(()=>e.A(82041),{loadableGenerated:{modules:[41994]}}),$=(0,h.default)(()=>e.A(71762),{loadableGenerated:{modules:[91999]}}),X=(0,h.default)(()=>e.A(93540),{loadableGenerated:{modules:[84809]}}),Q=(0,h.default)(()=>e.A(11657),{loadableGenerated:{modules:[75058]}}),Z=()=>{let{gl:e,scene:t}=(0,p.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},Y=({fps:e})=>{let t=(0,p.useThree)(e=>e.invalidate);return(0,a.useEffect)(()=>{let r=setInterval(()=>t(),1e3/e);return()=>clearInterval(r)},[e,t]),null};e.s(["default",0,({active:e=!0,fullscreen:r=!1})=>{let[n]=(0,a.useState)(m.getRenderProfile),i=n.fps<60,{states:l,theme:s}=(0,C.useOcearoContext)(),c=(0,v.useReplay)().active,[u,p]=(0,a.useState)(null),[h,g]=(0,a.useState)(!0),[b]=(0,a.useState)(()=>f.default.get("hudStyle")||"minimal"),x="classic"===b,S=r&&!x;(0,a.useEffect)(()=>{g(!1!==f.default.getAll().showAttitudeIndicator)},[]);let A="day"===s&&("chart"===l.oceanMode||"depth"===l.oceanMode||"meteo"===l.oceanMode);return(0,t.jsxs)("div",{className:"w-full h-full relative overflow-hidden","data-scene":A?"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)(T,{}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center space-x-4 min-w-0 shrink-0",children:[(0,t.jsx)(X,{compact:!r}),(0,t.jsx)(y,{})]})]}),(0,t.jsxs)("div",{className:"absolute top-14 left-2 z-30",children:[!l.anchorWatch&&(0,t.jsx)(w,{}),l.anchorWatch&&(0,t.jsx)(P,{}),!x&&(0,t.jsx)(U,{omitDepth:!0,maxItems:S?4:3}),!l.parkingMode&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(Q,{})})]}),x&&h&&(0,t.jsx)("div",{className:"absolute top-14 right-2 z-20",children:(0,t.jsx)(O,{})}),u&&(0,t.jsx)("div",{className:"absolute top-28 left-2 z-30",children:(0,t.jsx)(j,{content:u,onClose:()=>p(null)})}),S&&(0,t.jsx)("div",{className:"absolute left-3 bottom-44 sm:bottom-3 z-20",children:(0,t.jsx)(K,{})}),S&&(0,t.jsx)("div",{className:"absolute right-3 bottom-3 z-20",children:(0,t.jsx)($,{})}),!c&&(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 top-14 z-30 max-w-[calc(100%-12rem)]",children:(0,t.jsx)(V,{})}),"meteo"===l.oceanMode&&(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 top-14 z-30 max-w-[calc(100%-12rem)]",children:(0,t.jsx)(q,{})}),(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-3 z-30 max-w-[calc(100%-1rem)]",children:(0,t.jsx)(z,{})}),l.parkingMode&&(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-3 z-20 max-w-[calc(100%-9rem)]",children:(0,t.jsx)(H,{})}),!l.anchorWatch&&!l.parkingMode&&!c&&(0,t.jsx)("div",{className:`absolute left-1/2 -translate-x-1/2 z-20 max-w-[calc(100%-9rem)] ${x?"bottom-24":"bottom-3"}`,children:(0,t.jsx)(W,{})}),!S&&(0,t.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(k,{})}),!S&&(0,t.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(I,{})}),x&&!l.anchorWatch&&(0,t.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,t.jsx)(N,{})}),(0,t.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,t.jsxs)(d,{style:{width:"100%",height:"100%"},shadows:!1,frameloop:e?i?"demand":"always":"never",dpr:n.dpr,performance:{min:.5},gl:{antialias:n.antialias,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:o.NoToneMapping,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,t.jsx)(Z,{}),e&&i&&(0,t.jsx)(Y,{fps:n.fps}),l.parkingMode?(0,t.jsx)(E,{onUpdateInfoPanel:p}):l.anchorWatch?(0,t.jsx)(D,{onUpdateInfoPanel:p}):(0,t.jsx)(L,{onUpdateInfoPanel:p})]})})]})}],47141)},23595,function(e){e.n(e.i(47141))}]);
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(61949),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,"LightShadow",()=>o.LightShadow,"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,"RenderObjectRefreshType",()=>o.RenderObjectRefreshType,"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,"TextureSource",()=>o.TextureSource,"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:d,gl:m,events:p=r.f,eventSource:h,eventPrefix:f,shadows:C,linear:g,flat:x,legacy:b,orthographic:S,frameloop:A,dpr:T,performance:M,raycaster:G,camera:_,scene:R,onPointerMissed:F,onCreated:v,...y}){a.useMemo(()=>(0,r.e)(i),[]);let B=(0,r.u)(),[L,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[d,m]=(0,a.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),p=(0,a.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:d,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,f=e?"number"==typeof e?e:e.resize:null,C=(0,a.useRef)(!1);(0,a.useEffect)(()=>(C.current=!0,()=>void(C.current=!1)));let[g,x,b]=(0,a.useMemo)(()=>{let e=()=>{let e,t;if(!p.current.element)return;let{left:r,top:a,width:o,height:i,bottom:l,right:c,x:u,y:d}=p.current.element.getBoundingClientRect(),h={left:r,top:a,width:o,height:i,bottom:l,right:c,x:u,y:d};p.current.element instanceof HTMLElement&&n&&(h.height=p.current.element.offsetHeight,h.width=p.current.element.offsetWidth),Object.freeze(h),C.current&&(e=p.current.lastBounds,t=h,!s.every(r=>e[r]===t[r]))&&m(p.current.lastBounds=h)};return[e,f?l(e,f):e,h?l(e,h):e]},[m,n,h,f]);function S(){p.current.scrollContainers&&(p.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",b,!0)),p.current.scrollContainers=null),p.current.resizeObserver&&(p.current.resizeObserver.disconnect(),p.current.resizeObserver=null),p.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",p.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",p.current.orientationHandler))}function A(){p.current.element&&(p.current.resizeObserver=new u(b),p.current.resizeObserver.observe(p.current.element),t&&p.current.scrollContainers&&p.current.scrollContainers.forEach(e=>e.addEventListener("scroll",b,{capture:!0,passive:!0})),p.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",p.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",p.current.orientationHandler))}return o=b,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=x,(0,a.useEffect)(()=>(window.addEventListener("resize",c),()=>void window.removeEventListener("resize",c)),[c]),(0,a.useEffect)(()=>{S(),A()},[t,b,x]),(0,a.useEffect)(()=>S,[]),[e=>{e&&e!==p.current.element&&(S(),p.current.element=e,p.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),A())},d,g]}({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)(F),j=a.useCallback(e=>null==N.current?void 0:N.current(e),[N]),[I,P]=a.useState(!1),[k,O]=a.useState(!1);if(I)throw I;if(k)throw k;let U=a.useRef(null),[W,H]=(0,r.b)(),z=a.useRef(null),q=()=>h?(0,r.i)(h)?h.current:h:w.current;a.useInsertionEffect(()=>()=>{let e=U.current;U.current=null,null==e||e.unmount()},[]),(0,r.c)(()=>{let e=D.current;E.width>0&&E.height>0&&e&&(U.current||(U.current=(0,r.d)(e)),U.current.configure({gl:m,scene:R,events:p,shadows:C,linear:g,flat:x,legacy:b,orthographic:S,frameloop:A,dpr:T,performance:M,raycaster:G,camera:_,size:E,onPointerMissed:j,onCreated:e=>{var t;z.current=e,null==e.events.connect||e.events.connect(null!=(t=q())?t:w.current),f&&e.setEvents({compute:(e,t)=>{let r=e[f+"X"],a=e[f+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(a/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==v||v(e)}}).catch(O),"fulfilled"===U.current.ready.status?U.current.render((0,t.jsx)(B,{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})})})):"pending"===U.current.ready.status&&H(U.current.ready))}),a.useEffect(()=>{var e;let t=null==(e=z.current)?void 0:e.get(),r=q();t&&r&&t.events.connected!==r&&(null==t.events.connect||t.events.connect(r))}),a.useEffect(()=>{let e=D.current;return()=>{var t;e.isConnected||null==(t=U.current)||t.unmount()}},[]);let V=h?"none":"auto";return(0,t.jsxs)("div",{ref:w,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...d},...y,children:[(0,t.jsx)("div",{ref:L,style:{width:"100%",height:"100%"},children:(0,t.jsx)("canvas",{ref:D,style:{display:"block"},children:o})}),W]})}function d(e){return(0,t.jsx)(c.FiberProvider,{children:(0,t.jsx)(u,{...e})})}e.i(89499);var m=e.i(90874),p=e.i(58567),h=e.i(70703),f=e.i(67561),C=e.i(83402),g=e.i(49721),x=e.i(68757),b=e.i(18638);e.i(85269);var S=e.i(22831);let A=({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`})]}),T=()=>{let{t:e}=(0,S.useTranslation)(),{theme:r,themeMode:a,setTheme:n,states:o,toggleState:i,toggleExclusiveMode:l,cycleOceanMode:s}=(0,f.useOcearoContext)(),c={black:{icon:x.faWater,color:"text-hud-muted",label:e("toolbar.oceanBlack")},water:{icon:x.faWater,color:"text-oBlue",label:e("toolbar.oceanWater")},chart:{icon:x.faMap,color:"text-oGreen",label:e("toolbar.oceanChart")},depth:{icon:x.faLayerGroup,color:"text-oBlue",label:e("toolbar.oceanDepth")},meteo:{icon:x.faCloudSunRain,color:"text-oYellow",label:e("toolbar.oceanMeteo")}},u={auto:{icon:x.faCircleHalfStroke,label:e("toolbar.themeAuto",{theme:e(`toolbar.theme_${r}`)})},day:{icon:x.faSun,label:e("toolbar.theme_day")},dark:{icon:x.faMoon,label:e("toolbar.theme_dark")},night:{icon:x.faEye,label:e("toolbar.theme_night")}},d=u[a]||u.dark,m=o.oceanMode||"black",p=c[m];return(0,t.jsxs)("div",{className:"flex items-center space-x-1 p-1.5 rounded-2xl",children:[(0,t.jsx)(A,{onClick:()=>l("autopilot"),icon:x.faShip,isActive:o.autopilot,activeClass:"text-oBlue",label:e("toolbar.autopilot")}),(0,t.jsx)(A,{onClick:()=>l("anchorWatch"),icon:x.faAnchor,isActive:o.anchorWatch,activeClass:"text-oYellow",label:e("toolbar.anchorWatch")}),(0,t.jsx)(A,{onClick:()=>l("parkingMode"),icon:x.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)(A,{onClick:()=>{n(b.THEME_MODES[(b.THEME_MODES.indexOf(a)+1)%b.THEME_MODES.length])},icon:d.icon,isActive:"dark"!==a,activeClass:"text-hud-main",label:d.label}),(0,t.jsx)(A,{onClick:s,icon:p.icon,isActive:"black"!==m,activeClass:p.color,label:p.label}),o.autopilot&&"black"===m&&(0,t.jsx)(A,{onClick:()=>i("showPolar"),icon:x.faCompass,isActive:o.showPolar,activeClass:"text-oBlue",label:e("toolbar.polarView")}),o.autopilot&&(0,t.jsx)(A,{onClick:()=>i("showLaylines3D"),icon:x.faRulerCombined,isActive:o.showLaylines3D,activeClass:"text-oGreen",label:e("toolbar.laylines3D")}),(0,t.jsx)(A,{onClick:()=>i("ais"),icon:x.faSatellite,isActive:o.ais,activeClass:"text-oGreen",label:e("toolbar.aisRadar")})]})};var M=e.i(72466),G=e.i(85709);let _="batteries",R={FRESH_WATER:{id:"freshWater",labelKey:"tanks.freshWater",path:"tanks.freshWater.0.currentLevel",icon:x.faDroplet,color:"bg-oBlue"},FUEL:{id:"fuel",labelKey:"tanks.fuel",path:"tanks.fuel.0.currentLevel",icon:x.faGasPump,color:"bg-oYellow"},BLACK_WATER:{id:"blackWater",labelKey:"tanks.blackWater",path:"tanks.blackWater.0.currentLevel",icon:x.faToilet,color:"bg-hud-muted"}},F=({level:e,type:r})=>{let{t:a}=(0,S.useTranslation)(),n=Math.max(0,Math.min(100,e)),{labelKey:o,icon:i,color:l}=R[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-caption font-semibold tabular-nums min-w-[28px] text-right ${s?"text-oRed animate-soft-pulse":"text-hud-main"}`,children:[n,"%"]})]})},v=({batteryLevel:e,batteryNumber:r,voltage:a})=>{let{t:n}=(0,S.useTranslation)(),o=Math.max(0,Math.min(100,e)),i=(0,M.isBatteryCharging)(a),l=o<=M.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:x.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}%`}})})]})},y=()=>{let[e,r]=(0,a.useState)(_),n=(0,a.useMemo)(()=>["electrical.batteries.1.capacity.stateOfCharge","electrical.batteries.1.voltage"],[]),o=(0,a.useMemo)(()=>["tanks.freshWater.0.currentLevel","tanks.fuel.0.currentLevel","tanks.blackWater.0.currentLevel"],[]),i=(0,G.useSignalKPaths)([...n,...o]),l=(0,a.useMemo)(()=>{let e=i["electrical.batteries.1.capacity.stateOfCharge"],t=i["electrical.batteries.1.voltage"];return[{level:null==e?(0,M.estimateStateOfCharge)(t):e,number:1,voltage:t}].filter(e=>null!=e.level&&!Number.isNaN(e.level))},[i]),s=(0,a.useMemo)(()=>{let e=i["tanks.freshWater.0.currentLevel"],t=i["tanks.fuel.0.currentLevel"],r=i["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}},[i]),c=()=>{r(e=>e===_?"tanks":_)},u=e===_;return(0,t.jsx)("div",{className:"p-1.5 rounded-2xl transition-all duration-300 cursor-pointer select-none",onClick:c,role:"button",tabIndex:0,"aria-label":`Toggle between ${u?"tanks":"batteries"} display`,onKeyDown:e=>"Enter"===e.key&&c(),children:(0,t.jsx)("div",{className:"flex flex-col space-y-1",children:u?(0,t.jsx)(t.Fragment,{children:l.map(e=>(0,t.jsx)(v,{batteryLevel:e.level,batteryNumber:e.number,voltage:e.voltage},e.number))}):(0,t.jsx)(t.Fragment,{children:Object.keys(R).map(e=>(0,t.jsx)(F,{type:e,level:s[e]},e))})})})};var B=e.i(39271);let L=e=>{let[t,r]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let t=window.matchMedia(e),a=()=>r(t.matches);return a(),t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e]),t},E=(0,h.default)(()=>e.A(36258),{loadableGenerated:{modules:[59465]},ssr:!1}),D=(0,h.default)(()=>e.A(11220),{loadableGenerated:{modules:[27404]},ssr:!1}),w=(0,h.default)(()=>e.A(97820),{loadableGenerated:{modules:[69675]},ssr:!1}),N=(0,h.default)(()=>e.A(29882),{loadableGenerated:{modules:[56665]}}),j=(0,h.default)(()=>e.A(93170),{loadableGenerated:{modules:[50226]}}),I=(0,h.default)(()=>e.A(93889),{loadableGenerated:{modules:[58166]}}),P=(0,h.default)(()=>e.A(64390),{loadableGenerated:{modules:[39554]}}),k=(0,h.default)(()=>e.A(48217),{loadableGenerated:{modules:[14774]}}),O=(0,h.default)(()=>e.A(30150),{loadableGenerated:{modules:[84237]}}),U=(0,h.default)(()=>e.A(34882),{loadableGenerated:{modules:[77021]}}),W=(0,h.default)(()=>e.A(59499),{loadableGenerated:{modules:[85003]}}),H=(0,h.default)(()=>e.A(43322),{loadableGenerated:{modules:[56101]}}),z=(0,h.default)(()=>e.A(32673),{loadableGenerated:{modules:[36540]}}),q=(0,h.default)(()=>e.A(66984),{loadableGenerated:{modules:[79261]}}),V=(0,h.default)(()=>e.A(32598),{loadableGenerated:{modules:[79224]}}),K=(0,h.default)(()=>e.A(73321),{loadableGenerated:{modules:[78938]}}),$=(0,h.default)(()=>e.A(82041),{loadableGenerated:{modules:[41994]}}),X=(0,h.default)(()=>e.A(71762),{loadableGenerated:{modules:[91999]}}),Q=(0,h.default)(()=>e.A(93540),{loadableGenerated:{modules:[84809]}}),Z=(0,h.default)(()=>e.A(11657),{loadableGenerated:{modules:[75058]}}),Y=()=>{let{gl:e,scene:t}=(0,m.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},J=({fps:e})=>{let t=(0,m.useThree)(e=>e.invalidate);return(0,a.useEffect)(()=>{let r=setInterval(()=>t(),1e3/e);return()=>clearInterval(r)},[e,t]),null};e.s(["default",0,({active:e=!0,fullscreen:r=!1})=>{let[n]=(0,a.useState)(p.getRenderProfile),i=n.fps<60,{states:l,theme:s}=(0,f.useOcearoContext)(),c=(0,B.useReplay)().active,[u,m]=(0,a.useState)(null),[h,g]=(0,a.useState)(!0),[x]=(0,a.useState)(()=>C.default.get("hudStyle")||"minimal"),b="classic"===x,S=L("(min-width: 1024px) and (min-height: 600px)"),A=r&&!b&&S,M=L("(max-height: 500px)"),G=!A&&!b,_=!l.anchorWatch&&!l.parkingMode&&!c;(0,a.useEffect)(()=>{g(!1!==C.default.getAll().showAttitudeIndicator)},[]);let R="day"===s&&("chart"===l.oceanMode||"depth"===l.oceanMode||"meteo"===l.oceanMode);return(0,t.jsxs)("div",{className:"w-full h-full relative overflow-hidden","data-scene":R?"light":void 0,children:[(0,t.jsxs)("div",{className:"absolute top-2 left-2 right-2 z-20 flex items-center justify-between","data-hud-solid":!0,children:[(0,t.jsx)(T,{}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center space-x-4 min-w-0 shrink-0",children:[(0,t.jsx)(Q,{compact:!r}),(0,t.jsx)(y,{})]})]}),(0,t.jsxs)("div",{className:"absolute top-14 left-2 z-30","data-hud-solid":!0,children:[!l.anchorWatch&&(0,t.jsx)(N,{}),l.anchorWatch&&(0,t.jsx)(P,{}),!b&&(0,t.jsx)(W,{omitDepth:!0,maxItems:A?4:3}),!l.parkingMode&&(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(Z,{})})]}),b&&h&&(0,t.jsx)("div",{className:"absolute top-14 right-2 z-20",children:(0,t.jsx)(O,{})}),u&&!G&&(0,t.jsx)("div",{"data-hud-solid":!0,className:`hud-stack absolute z-30 w-96 max-h-[calc(100%-5rem)] flex flex-col ${b?"top-28 left-2":"top-14 right-3"}`,children:(0,t.jsx)(U,{content:u,onClose:()=>m(null)})}),A&&(0,t.jsx)("div",{className:"absolute left-3 bottom-3 z-20","data-hud-solid":!0,children:(0,t.jsx)($,{})}),A&&(0,t.jsx)("div",{className:"absolute right-3 bottom-3 z-20","data-hud-solid":!0,children:(0,t.jsx)(X,{})}),!c&&(0,t.jsx)("div",{"data-hud-solid":!0,className:"absolute right-2 top-14 z-30 max-w-[calc(100%-10rem)] sm:right-auto sm:left-1/2 sm:-translate-x-1/2 sm:max-w-[calc(100%-12rem)]",children:(0,t.jsx)(K,{})}),"meteo"===l.oceanMode&&(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 top-14 z-30 max-w-[calc(100%-12rem)]",children:(0,t.jsx)(V,{})}),G?(0,t.jsxs)("div",{"data-hud-solid":!0,className:`hud-stack absolute bottom-2 z-30 flex flex-col gap-2 min-h-0 max-h-[calc(100%-4.5rem)] pointer-events-none [&>*]:pointer-events-auto
2
+ ${M?"right-2 w-[min(24rem,58%)]":"inset-x-2 sm:left-auto sm:w-[26rem]"}`,children:[u&&(0,t.jsx)("div",{className:"min-h-0 flex flex-col",children:(0,t.jsx)(U,{content:u,onClose:()=>m(null)})}),!(M&&u)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"empty:hidden shrink-0 flex justify-center",children:(0,t.jsx)(q,{})}),l.parkingMode&&(0,t.jsx)("div",{className:"empty:hidden shrink-0 tesla-card !p-3 !rounded-2xl",children:(0,t.jsx)(z,{})}),_&&(0,t.jsx)("div",{className:"empty:hidden shrink-0 [&>*]:max-w-none",children:(0,t.jsx)(H,{})}),(0,t.jsxs)("div",{className:"shrink-0 flex gap-2",children:[(0,t.jsx)("div",{className:"empty:hidden flex-1 min-w-0",children:(0,t.jsx)($,{compact:!0})}),(0,t.jsx)("div",{className:"empty:hidden flex-1 min-w-0",children:(0,t.jsx)(X,{compact:!0})})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-3 z-30 max-w-[calc(100%-1rem)]",children:(0,t.jsx)(q,{})}),l.parkingMode&&(0,t.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 bottom-3 z-20 max-w-[calc(100%-9rem)]",children:(0,t.jsx)(z,{})}),_&&(0,t.jsx)("div",{"data-hud-solid":!0,className:`hud-stack absolute left-1/2 -translate-x-1/2 z-20 max-w-[calc(100%-9rem)] ${b?"bottom-24":"bottom-3"}`,children:(0,t.jsx)(H,{})})]}),b&&(0,t.jsx)("div",{className:"absolute left-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(k,{})}),b&&(0,t.jsx)("div",{className:"absolute right-2 bottom-2 z-20 flex flex-col items-center",children:(0,t.jsx)(I,{})}),b&&!l.anchorWatch&&(0,t.jsx)("div",{className:"absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10",children:(0,t.jsx)(j,{})}),(0,t.jsx)("div",{className:"absolute left-1/2 transform -translate-x-1/2 w-full h-full",children:(0,t.jsxs)(d,{style:{width:"100%",height:"100%"},shadows:!1,frameloop:e?i?"demand":"always":"never",dpr:n.dpr,performance:{min:.5},gl:{antialias:n.antialias,powerPreference:"low-power",physicallyCorrectLights:!1,toneMapping:o.NoToneMapping,toneMappingExposure:1,shadowMap:{enabled:!1},precision:"lowp"},children:[(0,t.jsx)(Y,{}),e&&i&&(0,t.jsx)(J,{fps:n.fps}),l.parkingMode?(0,t.jsx)(D,{onUpdateInfoPanel:m}):l.anchorWatch?(0,t.jsx)(w,{onUpdateInfoPanel:m}):(0,t.jsx)(E,{onUpdateInfoPanel:m,selection:u})]})})]})}],47141)},23595,function(e){e.n(e.i(47141))}]);
@@ -0,0 +1,119 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,84226,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(57384);e.i(67561);var n=e.i(46991),i=e.i(85709),o=e.i(83402),l=e.i(90072),s=e.i(16196),u=e.i(83646);let d=({position:e=[0,0,0],rotation:a=[0,0,0],speed:r,color:n,fontSize:i=.5,textPosition:o=[0,.8,0],arrowSize:d=1})=>{let{scene:c}=(0,u.default)(),h=n||c.wind;return(0,t.jsxs)("group",{position:e,rotation:a,children:[(0,t.jsx)(s.Text,{characters:".0123456789",color:h,fontSize:i*d,position:o,font:"fonts/Roboto-Bold.ttf",anchorX:"center",anchorY:"middle",children:r.toFixed(1)}),(0,t.jsxs)("mesh",{children:[(0,t.jsx)("shapeGeometry",{args:[new l.Shape([new l.Vector2(0,0),new l.Vector2(.5*d*Math.cos(5*Math.PI/6),.5*d*Math.sin(5*Math.PI/6)),new l.Vector2(0,-.577*d),new l.Vector2(0,-.577*d),new l.Vector2(-.5*d*Math.cos(5*Math.PI/6),.5*d*Math.sin(5*Math.PI/6)),new l.Vector2(0,0)])]}),(0,t.jsx)("meshStandardMaterial",{color:h,side:l.DoubleSide})]})]})};d.propTypes={position:r.default.oneOfType([r.default.instanceOf(l.Vector3),r.default.arrayOf(r.default.number)]).isRequired,rotation:r.default.arrayOf(r.default.number).isRequired,speed:r.default.number.isRequired,color:r.default.oneOfType([r.default.string,r.default.number]).isRequired,fontSize:r.default.number,textPosition:r.default.arrayOf(r.default.number),arrowSize:r.default.number};let c=({outerRadius:e})=>{let r=o.default.get("preferredWindSpeedPath")||"speedTrue",s=o.default.get("preferredWindDirectionPath")||"directionTrue",c=o.default.get("preferredHeadingPath")||"courseOverGroundTrue",h=(0,a.useMemo)(()=>["environment.wind.angleTrueGround","environment.wind.speedOverGround","environment.wind.directionTrue","environment.wind.speedTrue","environment.wind.angleApparent","environment.wind.speedApparent","environment.wind.angleTrueWater","navigation.headingTrue","navigation.headingMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic"],[]),m=(0,i.useSignalKPaths)(h),f=(0,a.useMemo)(()=>{if("directionTrue"===s){let e=m[`environment.wind.${s}`]??m["environment.wind.directionTrue"];if(null!=e)return Math.PI/2-(e-(m[`navigation.${c}`]??m["navigation.headingTrue"]??m["navigation.courseOverGroundTrue"]??0));let t=m["environment.wind.angleTrueGround"]??m["environment.wind.angleTrueWater"];if(null!=t)return Math.PI/2-t}else{let e=m[`environment.wind.${s}`]??m["environment.wind.angleTrueGround"]??m["environment.wind.angleTrueWater"];if(null!=e)return Math.PI/2-e;let t=m["environment.wind.directionTrue"];if(null!=t)return Math.PI/2-(t-(m[`navigation.${c}`]??m["navigation.headingTrue"]??m["navigation.courseOverGroundTrue"]??0))}return Math.PI/2},[m,s,c]),p=(0,a.useMemo)(()=>{let e=m[`environment.wind.${r}`]??m["environment.wind.speedOverGround"]??m["environment.wind.speedTrue"];return(0,n.convertSpeedUnit)(e)||0},[m,r]),g=(0,a.useMemo)(()=>Math.PI/2-(m["environment.wind.angleApparent"]||0),[m]),v=(0,a.useMemo)(()=>(0,n.convertSpeedUnit)(m["environment.wind.speedApparent"])||0,[m]),y=(0,a.useMemo)(()=>new l.Vector3((e+.7)*Math.cos(f),0,-(e+.7)*Math.sin(f)),[e,f]),w=(0,a.useMemo)(()=>new l.Vector3((e+.7)*Math.cos(g),0,-(e+.7)*Math.sin(g)),[e,g]),M=(0,u.default)();return(0,t.jsxs)("group",{children:[p>0&&!0!==o.default.get("hideTrueWind")&&(0,t.jsx)(d,{position:y,rotation:[-Math.PI/2,0,-(Math.PI/2-f)],speed:p,color:M.ok,fontSize:1}),v>0&&(0,t.jsx)(d,{position:w,rotation:[-Math.PI/2,0,-(Math.PI/2-g)],speed:v,color:M.accent,fontSize:1})]})};c.propTypes={outerRadius:r.default.number.isRequired},e.s(["default",0,c])},88608,e=>{"use strict";let t=0,a=new Set;e.s(["getForecastHour",0,()=>t,"setForecastHour",0,e=>{t=Math.max(0,e),a.forEach(e=>e(t))},"subscribeForecast",0,e=>(a.add(e),()=>a.delete(e))])},3666,3950,e=>{"use strict";let t="ocearo-offline-v2",a=["ocearo-offline-v1"],r=!1,n=async(e,{kind:n="tile"}={})=>{if(!("u">typeof caches))return fetch(e,{referrerPolicy:"strict-origin-when-cross-origin"});r||(r=!0,a.forEach(e=>caches.delete(e).catch(()=>{})));let i=await caches.open(t);if("tile"===n){let t=await i.match(e);if(t)return t}try{let t=await fetch(e,{mode:"cors",referrerPolicy:"strict-origin-when-cross-origin"});return t.ok&&await i.put(e,t.clone()),t}catch(a){let t=await i.match(e);if(t)return t;throw a}},i=async e=>{let t=await n(e,{kind:"tile"});if(!t.ok)throw Error(`${t.status} ${e}`);return createImageBitmap(await t.blob())},o=(e,t,a,r)=>{let n=2**r,i=(e,t)=>({x:Math.floor((t+180)/360*n),y:Math.floor((1-Math.log(Math.tan(e*Math.PI/180)+1/Math.cos(e*Math.PI/180))/Math.PI)/2*n)}),o=a/111320,l=a/(111320*Math.cos(e*Math.PI/180)),s=i(e+o,t-l),u=i(e-o,t+l),d=[];for(let e=s.x;e<=u.x;e++)for(let t=s.y;t<=u.y;t++)d.push({z:r,x:e,y:t});return d},l=async({lat:e,lon:t,radiusM:a,layers:r,urls:i=[],onProgress:l})=>{let s=[];for(let{template:n,zooms:i}of r)for(let r of i)for(let i of o(e,t,a,r))s.push(n.replace("{z}",i.z).replace("{x}",i.x).replace("{y}",i.y));s.push(...i);let u=0,d=0,c=[...s],h=async()=>{for(;c.length;){let e=c.shift();try{!(await n(e,{kind:e.includes("forecast")?"forecast":"tile"})).ok&&d++}catch{d++}u++,l?.(u,s.length,d)}};return await Promise.all(Array.from({length:4},h)),{done:u,failed:d,total:s.length}},s=async()=>{if(navigator.storage?.estimate){let{usage:e}=await navigator.storage.estimate();return e}return null},u=async(e,a)=>{if(!("u">typeof caches))return!1;let r=await caches.open(t);return await r.put(e,a),!0},d=async e=>{if(!("u">typeof caches))return null;let a=await caches.open(t);return await a.match(e)||null};e.s(["cachedFetch",0,n,"cachedImage",0,i,"clearOfflineCache",0,()=>"u">typeof caches?caches.delete(t):Promise.resolve(!1),"offlineCacheSize",0,s,"prefetchArea",0,l,"readCached",0,d,"storeCached",0,u],3950);let c={key:null,at:0,field:null},h=(e,t,a,r)=>({lat:e+(r/8*2-1)*4e4/6371e3*180/Math.PI,lon:t+(a/8*2-1)*4e4/(6371e3*Math.cos(e*Math.PI/180))*180/Math.PI}),m=(e,t)=>{let a=[],r=[];for(let n=0;n<9;n++)for(let i=0;i<9;i++){let o=h(e,t,i,n);a.push(o.lat.toFixed(4)),r.push(o.lon.toFixed(4))}return`https://api.open-meteo.com/v1/forecast?latitude=${a.join(",")}&longitude=${r.join(",")}&hourly=wind_speed_10m,wind_direction_10m&wind_speed_unit=ms&forecast_hours=48&timezone=GMT`},f=async(e,t)=>{let a=`${e.toFixed(1)},${t.toFixed(1)}`;if(c.field&&c.key===a&&Date.now()-c.at<18e5)return c.field;let r=m(e,t),i=await n(r,{kind:"forecast"});if(!i.ok)throw Error(`Open-Meteo ${i.status}`);let o=await i.json(),l=Array.isArray(o)?o:[o],s=l[0]?.hourly?.time||[],u=s.length,d=[],h=[];for(let e=0;e<u;e++){let t=new Float32Array(81),a=new Float32Array(81);l.forEach((r,n)=>{let i=r.hourly.wind_speed_10m[e]??0,o=(r.hourly.wind_direction_10m[e]??0)*Math.PI/180;t[n]=-i*Math.sin(o),a[n]=-i*Math.cos(o)}),d.push(t),h.push(a)}let f={origin:{lat:e,lon:t},start:Date.parse(`${s[0]}Z`),hours:u,u:d,v:h,source:"open-meteo"};return c={key:a,at:Date.now(),field:f},f},p=[[0,[98,113,183]],[1,[57,97,159]],[3,[74,148,169]],[5,[77,141,123]],[7,[83,165,83]],[9,[53,159,53]],[11,[167,157,81]],[13,[159,127,58]],[15,[161,108,92]],[17,[129,58,78]],[19,[175,80,136]],[21,[117,74,147]],[24,[109,97,163]],[27,[68,105,141]],[29,[92,144,152]],[36,[125,68,165]]];e.s(["HALF_EXTENT_M",0,4e4,"WINDY_SCALE",0,p,"fetchWindField",0,f,"sampleWind",0,(e,t,a,r=0)=>{let n=Math.min(9-1.001,Math.max(0,(t/4e4+1)/2*8)),i=Math.min(9-1.001,Math.max(0,(a/4e4+1)/2*8)),o=Math.floor(n),l=Math.floor(i),s=n-o,u=i-l,d=Math.min(e.hours-1,Math.max(0,Math.floor(r))),c=Math.min(e.hours-1,d+1),h=Math.min(1,Math.max(0,r-d)),m=(e,t)=>{let a=e[t],r=9*l+o;return(a[r]*(1-s)+a[r+1]*s)*(1-u)+(a[r+9]*(1-s)+a[r+9+1]*s)*u};return{u:m(e.u,d)*(1-h)+m(e.u,c)*h,v:m(e.v,d)*(1-h)+m(e.v,c)*h}},"uniformField",0,(e,t,a,r)=>{let n=new Float32Array(81).fill(-a*Math.sin(r)),i=new Float32Array(81).fill(-a*Math.cos(r));return{origin:{lat:e,lon:t},start:Date.now(),hours:1,u:[n],v:[i],source:"boat"}},"windColor",0,e=>{if(e<=p[0][0])return p[0][1];for(let t=1;t<p.length;t++)if(e<=p[t][0]){let[a,r]=p[t-1],[n,i]=p[t],o=(e-a)/(n-a);return r.map((e,t)=>e+(i[t]-e)*o)}return p[p.length-1][1]},"windFieldUrl",0,m],3666)},71415,e=>{"use strict";var t=e.i(43476),a=e.i(71645),r=e.i(90072),n=e.i(60099),i=e.i(43216),o=e.i(83646),l=e.i(83402),s=e.i(85709),u=e.i(78461),d=e.i(3950),c=e.i(48390);e.i(85269);var h=e.i(22831);let m="https://elevation-tiles-prod.s3.amazonaws.com/terrarium/{z}/{x}/{y}.png",f=10,p=.1,g=["navigation.position","design.draft","environment.tide.heightNow","environment.tide.heightHigh","environment.tide.heightLow","environment.depth.belowSurface","environment.depth.belowKeel"],v=(e,t,a)=>{let r=2**a,n=e*Math.PI/180,i=(1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*r;return{x:(t+180)/360*r,y:i}},y=(e,t,a)=>{let r=2**a;return{lat:180*Math.atan(Math.sinh(Math.PI*(1-2*t/r)))/Math.PI,lon:e/r*360-180}},w=new Map,M=async(e,t,a=m,r=f)=>{let n=v(e,t,r),i=Math.floor(n.x)-1,o=Math.floor(n.y)-1,l=`${a}|${r}/${i},${o}`;if(w.has(l))return w.get(l);let s=document.createElement("canvas");s.width=768,s.height=768;let u=s.getContext("2d",{willReadFrequently:!0});if(!(await Promise.all(Array.from({length:9},async(e,t)=>{let n=i+t%3,l=o+Math.floor(t/3),s=a.replace("{z}",r).replace("{x}",n).replace("{y}",l);try{let e=await (0,d.cachedImage)(s);return u.drawImage(e,t%3*256,256*Math.floor(t/3)),!0}catch{return!1}}))).some(Boolean))return null;let c=u.getImageData(0,0,768,768).data,h=new Float32Array(589824);for(let e=0;e<589824;e++)h[e]=c[4*e+3]<255?NaN:256*c[4*e]+c[4*e+1]+c[4*e+2]/256-32768;let p={heights:h,size:768,nw:y(i,o,r),se:y(i+3,o+3,r),z:r};return w.set(l,p),p},b=async(e,t)=>{let a=(0,c.bathymetryTileTemplate)(),[r,n]=await Promise.all([M(e,t),a?M(e,t,a,13).catch(()=>null):null]);if(!r&&!n)throw Error("No bathymetry");return{global:r,shom:n}},x=(e,t,a)=>{let{heights:r,size:n,nw:i,se:o,z:l}=e,s=(a-i.lon)/(o.lon-i.lon)*(n-1),u=v(i.lat,i.lon,l),d=v(o.lat,o.lon,l),c=(v(t,a,l).y-u.y)/(d.y-u.y)*(n-1);if(s<0||c<0||s>n-1||c>n-1)return NaN;let h=Math.min(n-2,Math.floor(s)),m=Math.min(n-2,Math.floor(c)),f=s-h,p=c-m,g=(e,t)=>r[t*n+e];return(g(h,m)*(1-f)+g(h+1,m)*f)*(1-p)+(g(h,m+1)*(1-f)+g(h+1,m+1)*f)*p},F=`
2
+ attribute float aDepth;
3
+ attribute float aDrying;
4
+ attribute vec2 aGround;
5
+ varying float vDepth;
6
+ varying float vDrying;
7
+ varying vec2 vGround;
8
+ varying vec3 vWorld;
9
+ void main() {
10
+ vDepth = aDepth;
11
+ vDrying = aDrying;
12
+ vGround = aGround;
13
+ vec4 w = modelMatrix * vec4(position, 1.0);
14
+ vWorld = w.xyz;
15
+ gl_Position = projectionMatrix * viewMatrix * w;
16
+ }
17
+ `,P=`
18
+ uniform float uDanger;
19
+ uniform vec3 uShallow;
20
+ uniform vec3 uMid;
21
+ uniform vec3 uDeep;
22
+ uniform vec3 uLand;
23
+ uniform vec3 uDrying;
24
+ uniform vec3 uLine;
25
+ uniform vec3 uDangerColor;
26
+ uniform vec3 uFade;
27
+ uniform float uFadeNear;
28
+ uniform float uFadeFar;
29
+ varying float vDepth;
30
+ varying float vDrying;
31
+ varying vec2 vGround;
32
+ varying vec3 vWorld;
33
+
34
+ float contour(float d, float level, float width) {
35
+ float w = fwidth(d);
36
+ return 1.0 - smoothstep(0.0, w * width, abs(d - level));
37
+ }
38
+ float gridLines(vec2 p, float spacing, float width) {
39
+ vec2 g = abs(fract(p / spacing - 0.5) - 0.5) * spacing;
40
+ vec2 w = fwidth(p) * width;
41
+ vec2 l = 1.0 - smoothstep(vec2(0.0), w, g);
42
+ return max(l.x, l.y);
43
+ }
44
+
45
+ void main() {
46
+ vec3 c;
47
+ if (vDepth <= 0.0) {
48
+ c = vDrying > 0.5 ? uDrying : uLand;
49
+ } else if (vDepth < 6.0) {
50
+ c = mix(uShallow, uMid, vDepth / 6.0);
51
+ } else {
52
+ // Darker with depth, as light fades under water: the relief reads at a glance
53
+ c = mix(uMid, uDeep, clamp((vDepth - 6.0) / 18.0, 0.0, 1.0));
54
+ }
55
+ // Relief: hill shading from the north-west, as on a shaded survey
56
+ vec3 n = normalize(cross(dFdx(vWorld), dFdy(vWorld)));
57
+ if (n.y < 0.0) n = -n;
58
+ c *= 0.5 + 0.65 * clamp(dot(n, normalize(vec3(-0.6, 0.7, -0.5))), 0.0, 1.0);
59
+ // Too shallow for us: orange hatching (not a fill, which reads as land)
60
+ if (vDepth > 0.0 && vDepth < uDanger) {
61
+ float hatch = step(0.55, fract((vGround.x + vGround.y) / 14.0));
62
+ c = mix(c, uDangerColor, 0.25 + 0.45 * hatch);
63
+ }
64
+ // The survey grid, fading out with distance before it shimmers
65
+ float dist = length(vWorld.xz);
66
+ float gridFade = 1.0 - smoothstep(900.0, 1700.0, dist);
67
+ float minor = gridLines(vGround, 50.0, 1.5) * 0.55;
68
+ float major = gridLines(vGround, 250.0, 2.4) * 0.85;
69
+ c = mix(c, uLine, max(minor, major) * gridFade * (vDepth > 0.0 ? 1.0 : 0.4));
70
+ // Isobaths, the drying line bold
71
+ float lines = max(max(contour(vDepth, 2.0, 1.5), contour(vDepth, 5.0, 1.5)), max(contour(vDepth, 10.0, 1.5), contour(vDepth, 20.0, 1.5)));
72
+ lines = max(lines, max(contour(vDepth, 30.0, 1.2), contour(vDepth, 50.0, 1.2)) * 0.7);
73
+ lines = max(lines, contour(vDepth, 0.0, 2.5));
74
+ lines = max(lines, contour(vDepth, uDanger, 2.0) * 0.9);
75
+ c = mix(c, uLine * 0.75, clamp(lines, 0.0, 1.0) * 0.85);
76
+ c = mix(c, uFade, smoothstep(uFadeNear, uFadeFar, dist));
77
+ gl_FragColor = vec4(c, 1.0);
78
+ #include <colorspace_fragment>
79
+ }
80
+ `,k={light:{water:"#8fd3ff",waterOpacity:.18,shallow:"#b5e0f2",mid:"#5fa8d8",deep:"#1c4f86",land:"#e2d6b8",drying:"#c7d3a6",line:"#0f3557",danger:"#e8873a",fade:"#e8eef3",text:"#0f2f4f",halo:"#ffffff"},dark:{water:"#7cc8f2",waterOpacity:.12,shallow:"#3a8fbc",mid:"#1d5f8c",deep:"#0b2238",land:"#4a4434",drying:"#34472e",line:"#8fdcff",danger:"#f0a060",fade:"#16191e",text:"#e6f4ff",halo:"#101216"},night:{water:"#c0503c",waterOpacity:.1,shallow:"#7a2a1e",mid:"#4f1a12",deep:"#24100c",land:"#3a1a10",drying:"#3a2410",line:"#ff8a72",danger:"#ffad80",fade:"#120807",text:"#ffb3a3",halo:"#0f0706"}},D=[96,40],S=`
81
+ attribute vec3 aCenter;
82
+ attribute vec2 aCell;
83
+ uniform vec2 uAtlas;
84
+ uniform float uSize;
85
+ varying vec2 vUv;
86
+ varying float vFade;
87
+ void main() {
88
+ vec4 mv = modelViewMatrix * vec4(aCenter, 1.0);
89
+ float d = -mv.z;
90
+ // Constant size on screen (like the HUD text), none right under the camera
91
+ float size = d * uSize;
92
+ mv.xy += position.xy * vec2(size * 2.4, size);
93
+ vUv = (aCell + vec2(position.x + 0.5, 0.5 - position.y)) / uAtlas;
94
+ vFade = (1.0 - smoothstep(1100.0, 1700.0, length(aCenter.xz))) * smoothstep(25.0, 60.0, d);
95
+ gl_Position = projectionMatrix * mv;
96
+ }
97
+ `,N=`
98
+ uniform sampler2D uMap;
99
+ varying vec2 vUv;
100
+ varying float vFade;
101
+ void main() {
102
+ vec4 t = texture2D(uMap, vUv);
103
+ if (t.a * vFade < 0.05) discard;
104
+ gl_FragColor = vec4(t.rgb, t.a * vFade);
105
+ #include <colorspace_fragment>
106
+ }
107
+ `,T=({items:e,palette:n})=>{let{geometry:i,material:o}=(0,a.useMemo)(()=>{if(!e.length)return{};let[t,a]=D,i=Math.ceil(e.length/16),o=document.createElement("canvas");o.width=16*t,o.height=a*i;let l=o.getContext("2d");l.textAlign="center",l.textBaseline="middle";let s=new r.PlaneGeometry(1,1),u=new r.InstancedBufferGeometry;u.index=s.index,u.setAttribute("position",s.attributes.position);let d=new Float32Array(3*e.length),c=new Float32Array(2*e.length);e.forEach((e,r)=>{let i=r%16*t,o=Math.floor(r/16)*a;l.font=`${e.danger?700:600} 28px Inter, Roboto, Arial, sans-serif`,l.lineWidth=7,l.strokeStyle=n.halo,l.strokeText(e.text,i+t/2,o+a/2+1),l.fillStyle=e.danger?n.danger:n.text,l.fillText(e.text,i+t/2,o+a/2+1),d.set(e.position,3*r),c.set([r%16,Math.floor(r/16)],2*r)}),u.setAttribute("aCenter",new r.InstancedBufferAttribute(d,3)),u.setAttribute("aCell",new r.InstancedBufferAttribute(c,2)),u.instanceCount=e.length;let h=new r.CanvasTexture(o);h.colorSpace=r.SRGBColorSpace,h.flipY=!1,h.anisotropy=4;let m=new r.ShaderMaterial({uniforms:{uMap:{value:h},uAtlas:{value:new r.Vector2(16,i)},uSize:{value:.03}},vertexShader:S,fragmentShader:N,transparent:!0,depthWrite:!1});return s.dispose(),{geometry:u,material:m}},[e,n]);return((0,a.useEffect)(()=>()=>{i?.dispose(),o?.uniforms.uMap.value.dispose(),o?.dispose()},[i,o]),i)?(0,t.jsx)("mesh",{geometry:i,material:o,frustumCulled:!1,renderOrder:3}):null},C=e=>e<10?e.toFixed(1):String(Math.round(e));e.s(["BATHY_ZOOM",0,10,"TERRARIUM",0,m,"default",0,({y:e=-.1})=>{let d,c=(0,s.useSignalKPaths)(g),{t:m}=(0,h.useTranslation)(),{id:y}=(0,o.default)(),w=c["navigation.position"],{heading:M}=(0,u.default)(),[D,S]=(0,a.useState)(null),N=l.default.get("aisLengthScalingFactor")||.7,I=Number.isFinite(c["design.draft"]?.maximum)?c["design.draft"].maximum:Number(l.default.get("boatDraft"))||2,_=c["environment.depth.belowSurface"],A=c["environment.depth.belowKeel"],O=Number.isFinite(_)?_:Number.isFinite(A)?A+I:null,j=k[y]||k.light,$=w?.latitude,G=w?.longitude,E=Number.isFinite($)?(d=v($,G,f),`${Math.floor(d.x)},${Math.floor(d.y)}`):null;(0,a.useEffect)(()=>{if(!E)return;let e=!1;return b($,G).then(t=>{e||S(t)}).catch(()=>{}),()=>{e=!0}},[E]);let R=Number.isFinite($)?Math.round(5e3*$):null,z=Number.isFinite(G)?Math.round(5e3*G):null,L=(0,a.useMemo)(()=>D&&null!==R?{survey:D.shom?x(D.shom,$,G):NaN,global:D.global?x(D.global,$,G):NaN}:{},[D,R,z]),W=(({tideNow:e,tideHigh:t,tideLow:a,measured:r,surveyHere:n,globalHere:i})=>{let o=(e,t=p)=>Math.round(e/t)*t;if(Number.isFinite(e)){let r=Number.isFinite(t)&&Number.isFinite(a)?e-(t+a)/2:0;return{cd:o(e),msl:o(r),source:"tide"}}if(Number.isFinite(r)&&(Number.isFinite(n)||Number.isFinite(i))){let e=Number.isFinite(n)?r+n:0,t=Number.isFinite(i)?r+i:0;return{cd:o(e,.5),msl:o(t,.5),source:"sounder"}}return{cd:0,msl:0,source:"datum"}})({tideNow:c["environment.tide.heightNow"],tideHigh:c["environment.tide.heightHigh"],tideLow:c["environment.tide.heightLow"],measured:O,surveyHere:L.survey,globalHere:L.global}),B=W.cd,H=W.msl,U=(0,a.useMemo)(()=>D?(e,t)=>{let a=D.shom?x(D.shom,e,t):NaN;if(Number.isFinite(a))return{h:a-B,drying:a<6.5};let r=D.global?x(D.global,e,t):NaN;return Number.isFinite(r)?{h:r-H,drying:r<3}:null}:null,[D,B,H]),V=(0,a.useMemo)(()=>{let e,t;if(!U||!Number.isFinite($))return null;let a=D.shom?240:160,n=D.shom?9:5,i=new r.PlaneGeometry(6e3*N,6e3*N,a,a),o=i.attributes.position,l=new Float32Array(o.count),s=new Float32Array(o.count),u=new Float32Array(2*o.count),d=111320*Math.cos($*Math.PI/180),c=(e=Math.round(10*$)/10,t=Math.round(10*G)/10,{east:(G-t)*111320*Math.cos(e*Math.PI/180),north:($-e)*111320});for(let e=0;e<o.count;e++){let t=o.getX(e)/N,a=o.getY(e)/N,r=U($+a/111320,G+t/d),i=r?r.h:0;l[e]=-i,s[e]=+!!r?.drying,u[2*e]=c.east+t,u[2*e+1]=c.north+a,o.setZ(e,i<0?i*n*N:(.15+3*Math.min(i,4))*N)}i.setAttribute("aDepth",new r.BufferAttribute(l,1)),i.setAttribute("aDrying",new r.BufferAttribute(s,1)),i.setAttribute("aGround",new r.BufferAttribute(u,2)),i.computeVertexNormals();let h=[],m=250*Math.ceil((c.east-1500)/250),f=250*Math.ceil((c.north-1500)/250);for(let e=m;e<=c.east+1500;e+=250)for(let t=f;t<=c.north+1500;t+=250){let a=e-c.east+125,r=t-c.north+125;if(Math.hypot(a,r)>1500)continue;let i=U($+r/111320,G+a/d);if(!i||i.h>=-.1)continue;let o=-i.h;h.push({text:C(o),danger:o<I+1,position:[a*N,i.h*n*N+2,-r*N]})}let p=U($,G);return{geometry:i,items:h,exaggeration:n,bottom:p&&p.h<0?p.h*n*N:null,depthHere:p?-p.h:null}},[U,N,I,$&&Math.round(500*$),G&&Math.round(500*G)]);(0,a.useEffect)(()=>()=>V?.geometry.dispose(),[V]);let K=(0,a.useMemo)(()=>new r.ShaderMaterial({uniforms:{uDanger:{value:3},uShallow:{value:new r.Color},uMid:{value:new r.Color},uDeep:{value:new r.Color},uLand:{value:new r.Color},uDrying:{value:new r.Color},uLine:{value:new r.Color},uDangerColor:{value:new r.Color},uFade:{value:new r.Color},uFadeNear:{value:1500},uFadeFar:{value:2100}},vertexShader:F,fragmentShader:P}),[]);(0,a.useEffect)(()=>{let e=K.uniforms;e.uDanger.value=I+1,e.uShallow.value.set(j.shallow),e.uMid.value.set(j.mid),e.uDeep.value.set(j.deep),e.uLand.value.set(j.land),e.uDrying.value.set(j.drying),e.uLine.value.set(j.line),e.uDangerColor.value.set(j.danger),e.uFade.value.set(j.fade)},[K,I,j]),(0,a.useEffect)(()=>()=>K.dispose(),[K]);let q=(0,a.useMemo)(()=>new r.ShaderMaterial({uniforms:{uColor:{value:new r.Color},uOpacity:{value:.16}},vertexShader:`
108
+ varying float vDist;
109
+ void main() {
110
+ vDist = length(position.xy);
111
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
112
+ }`,fragmentShader:`
113
+ uniform vec3 uColor;
114
+ uniform float uOpacity;
115
+ varying float vDist;
116
+ void main() {
117
+ gl_FragColor = vec4(uColor, uOpacity * (1.0 - smoothstep(1500.0, 2100.0, vDist)));
118
+ #include <colorspace_fragment>
119
+ }`,transparent:!0,depthWrite:!1,side:r.DoubleSide}),[]);if((0,a.useEffect)(()=>{let e=q.uniforms;e.uColor.value.set(j.water),e.uOpacity.value=j.waterOpacity},[q,j]),(0,a.useEffect)(()=>()=>q.dispose(),[q]),!V||!Number.isFinite($))return null;let X=V.depthHere,Y=Number.isFinite(O)&&Number.isFinite(X)&&"tide"===W.source?O-X:null,Z=(Number.isFinite(O)?-O*V.exaggeration*N:null)??V.bottom,J=null!==Y&&Math.abs(Y)>=.3,Q=Number.isFinite(O)?O:X,ee=-I*N;return(0,t.jsxs)("group",{rotation:[0,M,0],position:[0,e,0],children:[(0,t.jsx)("mesh",{rotation:[-Math.PI/2,0,0],geometry:V.geometry,material:K,renderOrder:-2}),(0,t.jsx)("mesh",{rotation:[-Math.PI/2,0,0],material:q,renderOrder:1,children:(0,t.jsx)("circleGeometry",{args:[3e3*N,96]})}),(0,t.jsx)(T,{items:V.items,palette:j}),null!==Z&&Z<ee&&(0,t.jsxs)("group",{children:[(0,t.jsx)(i.Line,{points:[[0,ee,0],[0,Z,0]],color:j.line,lineWidth:2,dashed:!0,dashSize:1.2,gapSize:.8}),(0,t.jsxs)("mesh",{position:[0,Z,0],rotation:[-Math.PI/2,0,0],children:[(0,t.jsx)("ringGeometry",{args:[1.2,1.8,32]}),(0,t.jsx)("meshBasicMaterial",{color:j.line,transparent:!0,opacity:.8,side:r.DoubleSide})]}),J&&null!==V.bottom&&(0,t.jsxs)("mesh",{position:[0,V.bottom,0],rotation:[-Math.PI/2,0,0],children:[(0,t.jsx)("ringGeometry",{args:[1,1.4,32]}),(0,t.jsx)("meshBasicMaterial",{color:j.danger,transparent:!0,opacity:.8,side:r.DoubleSide})]}),Number.isFinite(Q)&&(0,t.jsx)(n.Html,{position:[0,Z/2,0],zIndexRange:[5,0],style:{pointerEvents:"none"},children:(0,t.jsxs)("div",{className:"ml-3 -translate-y-1/2 whitespace-nowrap px-1.5 py-px rounded-md text-caption font-semibold tabular-nums text-hud-main bg-hud-bg/70 backdrop-blur-sm",children:[C(Q)," m",J&&(0,t.jsxs)("span",{className:"ml-1.5 font-normal text-hud-muted",children:[m("bathymetry.chartDepth",{depth:C(X)})," ","(",Y>0?"+":"−",Math.abs(Y).toFixed(1),")"]}),"sounder"===W.source&&(0,t.jsx)("span",{className:"ml-1.5 font-normal text-hud-muted",children:m("bathymetry.levelFromSounder")})]})})]})]})}])},20705,e=>{"use strict";let t=["north","east","south","west"],a=["port","starboard","preferred_channel_port","preferred_channel_starboard"],r=e=>{let r=Number(e);return r>=9&&r<=12?{kind:"cardinal",beacon:!0,category:t[r-9]}:r>=13&&r<=16?{kind:"lateral",beacon:!0,category:a[r-13]}:17===r?{kind:"isolated_danger",beacon:!0}:18===r?{kind:"safe_water",beacon:!0}:19===r?{kind:"special_purpose",beacon:!0}:r>=20&&r<=23?{kind:"cardinal",beacon:!1,category:t[r-20]}:r>=24&&r<=27?{kind:"lateral",beacon:!1,category:a[r-24]}:28===r?{kind:"isolated_danger",beacon:!1}:29===r?{kind:"safe_water",beacon:!1}:30===r?{kind:"special_purpose",beacon:!1}:4===r?{kind:"special_purpose",beacon:!1,colours:["blue","yellow"],pattern:"vertical",topmark:{shape:"cross",colours:["yellow"]}}:{kind:"station",beacon:!0}},n=e=>{let t=r(e.atonType);return{id:`ais:${e.id}`,lat:e.latitude,lon:e.longitude,name:e.name||"",kind:t.kind,beacon:t.beacon,category:t.category||"",shape:"",colours:t.colours||[],pattern:t.pattern||"",system:"",height:null,topmark:t.topmark||null,light:null,ais:!0,virtual:e.virtual,offPosition:e.offPosition}},i=(e,t)=>Math.hypot((t.lat-e.lat)*111320,(t.lon-e.lon)*111320*Math.cos(e.lat*Math.PI/180));e.s(["atonKind",0,r,"mergeAtons",0,(e,t)=>{if(!t.length)return e;let a=e.map(e=>({...e})),r=[];for(let e of t){if(!Number.isFinite(e.latitude)||!Number.isFinite(e.longitude))continue;let t=n(e),o=!t.virtual&&a.find(e=>!e.ais&&("station"===t.kind||e.kind===t.kind)&&60>=i(e,t));o?(o.ais=!0,o.offPosition=t.offPosition,o.name||(o.name=t.name)):r.push(t)}return[...a,...r]}])},97776,e=>{"use strict";var t=e.i(3950);let a=["https://overpass-api.de/api/interpreter","https://maps.mail.ru/osm/tools/overpass/api/interpreter"],r=["cardinal","lateral","isolated_danger","safe_water","special_purpose"],n=`^(buoy|beacon)_(${r.join("|")})$`,i=e=>Math.round(10*e)/10,o=(e,t,a)=>{let r=a/111320,n=a/(111320*Math.max(.1,Math.cos(e*Math.PI/180))),o=[];for(let a=Math.floor((e-r)/.1);a<=Math.floor((e+r)/.1);a++)for(let e=Math.floor((t-n)/.1);e<=Math.floor((t+n)/.1);e++)o.push({s:i(.1*a),w:i(.1*e),key:`${a}:${e}`});return o},l=({s:e,w:t})=>`${a[0]}?data=${encodeURIComponent(`[out:json];node["seamark:type"~"${n}"](${e},${t},${i(e+.1)},${i(t+.1)});out body;`)}`,s=e=>e?String(e).split(";").map(e=>e.trim().toLowerCase()).filter(Boolean):[],u=e=>{let t=parseFloat(e);return Number.isFinite(t)?t:null},d=e=>{let t=e.tags||{},a=t["seamark:type"]||"",[r,...n]=a.split("_"),i=n.join("_"),o=e=>t[`seamark:${a}:${e}`],l=t["seamark:light:character"]?{character:t["seamark:light:character"],group:t["seamark:light:group"]||"",period:u(t["seamark:light:period"]),colour:s(t["seamark:light:colour"])[0]||"white"}:null;return{id:e.id,lat:e.lat,lon:e.lon,name:t["seamark:name"]||t.name||"",kind:i,beacon:"beacon"===r,category:(o("category")||"").toLowerCase(),shape:(o("shape")||"").toLowerCase(),colours:s(o("colour")),pattern:(o("colour_pattern")||"").toLowerCase(),system:(o("system")||"").toLowerCase(),height:u(o("height")),topmark:t["seamark:topmark:shape"]?{shape:t["seamark:topmark:shape"].toLowerCase(),colours:s(t["seamark:topmark:colour"])}:null,light:l}},c=0,h=e=>e.filter(e=>"node"===e.type&&Number.isFinite(e.lat)&&Number.isFinite(e.lon)).map(d).filter(e=>r.includes(e.kind)),m=async(e,r=25)=>{let o=Math.min(...e.map(e=>e.s)),s=Math.min(...e.map(e=>e.w)),u=i(Math.max(...e.map(e=>e.s))+.1),d=i(Math.max(...e.map(e=>e.w))+.1),c=`[out:json][timeout:${r}];node["seamark:type"~"${n}"](${o},${s},${u},${d});out body;`;for(let r of a)try{let a=await fetch(`${r}?data=${encodeURIComponent(c)}`,{referrerPolicy:"strict-origin-when-cross-origin"});if(!a.ok)continue;let n=await a.json();if(n.remark&&/error|timeout|runtime/i.test(n.remark))continue;let i=n.elements||[],o={};return await Promise.all(e.map(e=>{o[e.key]=i.filter(t=>t.lat>=e.s&&t.lat<e.s+.1&&t.lon>=e.w&&t.lon<e.w+.1);let a=JSON.stringify({elements:o[e.key]});return(0,t.storeCached)(l(e),new Response(a,{headers:{"Content-Type":"application/json"}}))})),o}catch{}throw Error("Overpass unreachable")},f=async e=>{let a={},r=[];for(let n of e){let e=await (0,t.readCached)(l(n)).catch(()=>null);e?a[n.key]=h((await e.json()).elements||[]):r.push(n)}if(r.length&&Date.now()>=c)try{let e=await m(r);Object.entries(e).forEach(([e,t])=>{a[e]=h(t)})}catch{c=Date.now()+12e4}return a},p=async(e,t,a)=>{let r=o(e,t,a);return r.length?Object.keys(await m(r,90)).length:0};e.s(["cellsAround",0,o,"loadCells",0,f,"prefetchSeamarks",0,p])},83524,e=>{"use strict";var t=e.i(71645),a=e.i(62588),r=e.i(85709),n=e.i(61969),i=e.i(90669),o=e.i(539),l=e.i(83402),s=e.i(77291);let u=Math.PI/180,d=3*u,c=60*u,h=5*u,m=90*u,f=["navigation.speedOverGround","navigation.courseOverGroundTrue"];e.s(["default",0,()=>{let{targets:e}=(0,a.useAIS)({passive:!0}),u=(0,n.default)(),p=(0,r.useSignalKPaths)(f),g=(0,t.useMemo)(()=>(0,i.getCollisionThresholds)(),[]),v=(0,s.default)(),y=l.default.get("aisLengthScalingFactor")||.7;return(0,t.useMemo)(()=>{let t=p["navigation.speedOverGround"],a=p["navigation.courseOverGroundTrue"]??u.heading,r=v.giveWayTo||v.primary;if(r&&Number.isFinite(t)&&t>.3&&Number.isFinite(a)){let{target:n,role:l}=r,s={targetName:n.name,rule:l.rule,reason:l.reason},u="stand-on"===l.ownRole&&Number.isFinite(n.tcpaSeconds)&&n.tcpaSeconds<180&&Number.isFinite(n.cpaMeters)&&n.cpaMeters<.3*g.cpaMeters;if("stand-on"===l.ownRole&&!u)return{kind:"standOn",change:0,heading:a,...s};let d=Math.sign(Math.sin(Math.atan2(n.sceneX,-n.sceneZ)-a))||1,c=(({targets:e,sog:t,cog:a,scale:r,thresholds:n,preferSide:o=0})=>{let l=e.filter(e=>null!==e.distanceMeters&&null!==e.sceneX&&Number.isFinite(e.sog)&&Number.isFinite(e.cog??e.cogMagnetic)),s=(e,a=n.cpaMeters)=>l.every(o=>{let l=(0,i.closestApproach)({rx:o.sceneX/r,ry:-o.sceneZ/r,ownSog:t,ownCog:e,targetSog:o.sog,targetCog:o.cog??o.cogMagnetic});return!l||l.tcpa<=0||l.tcpa>n.tcpaSeconds||l.cpa>=a}),u=o<0?[-1,1]:[1,-1],d=(e,t)=>{for(let r=h;r<=m+1e-9;r+=h)if(s(a+e*r,t))return e*r;return null};if(0!==o)return d(u[0])??d(u[0],n.cpaMeters/2)??d(u[1]);for(let e=h;e<=m+1e-9;e+=h){if(s(a+e))return e;if(s(a-e))return-e}return null})({targets:e,sog:t,cog:a,scale:y,thresholds:g,preferSide:"both"===l.ownRole||"power"===v.ownCategory||u?1:d});return null!==c?{kind:"avoid",change:c,heading:(0,o.wrapPi)(a+c),lastMoment:u,...s}:{kind:"avoid",change:null,heading:a,lastMoment:u,noSolution:!0,...s}}let n=u.vmc;if(n&&Number.isFinite(n.current)&&Number.isFinite(u.heading)){let e=(0,o.wrapPi)(n.best.heading-u.heading),t=(n.best.vmc-n.current)*1.943844;if(t>=.15&&Math.abs(e)>=d&&Math.abs(e)<=c)return{kind:"vmg",change:e,heading:n.best.heading,gainKn:t}}return null},[e,u,p,y,g,v])}])},71029,e=>{"use strict";var t=e.i(71645),a=e.i(85709),r=e.i(66799),n=e.i(46991);let i="notifications.mob",o=e=>e*Math.PI/180;e.s(["distanceAndBearing",0,(e,t)=>{if(!Number.isFinite(e?.latitude)||!Number.isFinite(e?.longitude)||!Number.isFinite(t?.latitude)||!Number.isFinite(t?.longitude))return null;let a=o(e.latitude),r=o(t.latitude),i=o(t.longitude-e.longitude),l=Math.sin((r-a)/2)**2+Math.cos(a)*Math.cos(r)*Math.sin(i/2)**2;return{distance:2*n.EARTH_RADIUS_METERS*Math.asin(Math.min(1,Math.sqrt(l))),bearing:(180*Math.atan2(Math.sin(i)*Math.cos(r),Math.cos(a)*Math.sin(r)-Math.sin(a)*Math.cos(r)*Math.cos(i))/Math.PI+360)%360}},"useActiveMobs",0,()=>{let e=(0,a.useSignalKPrefix)(i);return(0,t.useMemo)(()=>Object.entries(e).filter(([e,t])=>(e===i||e.startsWith(`${i}.`))&&t?.state&&"normal"!==t.state).map(([e,t])=>({...t,path:e})).sort((e,t)=>String(e.createdAt??"").localeCompare(String(t.createdAt??""))),[e])},"useMobSupport",0,()=>{let e=(()=>{let[e,a]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e=!1,t=null,n=async()=>{let i=await r.default.getFeatures();e||(i?a(i):t=setTimeout(n,3e4))};return n(),()=>{e=!0,clearTimeout(t)}},[]),e})();return(0,t.useMemo)(()=>({raise:!!e?.apis.includes("notifications"),navigate:!!e?.apis.includes("course")}),[e])}],71029)},32189,(e,t,a)=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},65156,(e,t,a)=>{"use strict";var r=e.r(32189);function n(){}function i(){}i.resetWarningCache=n,t.exports=function(){function e(e,t,a,n,i,o){if(o!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return a.PropTypes=a,a}},57384,(e,t,a)=>{e.i(47167),t.exports=e.r(65156)()}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58700,e=>{"use strict";var t=e.i(43476),n=e.i(71645);e.i(85269);var a=e.i(22831),i=e.i(49721),r=e.i(68757),l=e.i(85709),o=e.i(46991),s=e.i(83402),u=e.i(83646),d=e.i(62588),g=e.i(77291),c=e.i(24752);let m=(e,t)=>{if(!Number.isFinite(e))return"--";let n=Math.abs(e),a=Math.floor(n),i=((n-a)*60).toFixed(3);return`${a}\xb0${i}'${t?e>=0?"N":"S":e>=0?"E":"W"}`},p=({card:e,onClose:n})=>{let{t:l}=(0,a.useTranslation)(),{scene:o}=(0,u.default)(),s={giveWay:o.vesselDanger,yields:o.vesselYields,close:o.vesselClose},d=e.primary.filter(e=>null!=e.value&&""!==e.value),g=(e.details||[]).filter(e=>null!=e.value&&""!==e.value);return(0,t.jsxs)("div",{className:"tesla-card !p-0 !rounded-2xl overflow-hidden select-none flex flex-col min-h-0 max-h-full",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 px-4 pt-3 pb-2 shrink-0",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"text-label font-semibold text-hud-main truncate",children:e.title}),e.subtitle&&(0,t.jsx)("div",{className:"text-caption text-hud-muted truncate",children:e.subtitle}),e.status&&(0,t.jsx)("span",{className:"inline-block mt-1.5 px-2 py-0.5 rounded-full text-caption font-semibold text-white",style:{background:s[e.status.tone]||o.vessel},children:e.status.text})]}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),n?.()},"aria-label":l("common.close"),className:"shrink-0 -mr-1 w-10 h-10 flex items-center justify-center rounded-full bg-hud-elevated text-hud-secondary hover:text-hud-main",children:(0,t.jsx)(i.FontAwesomeIcon,{icon:r.faTimes})})]}),(0,t.jsxs)("div",{className:"overflow-y-auto min-h-0 px-4 pb-3",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-2",children:d.map(e=>(0,t.jsxs)("div",{className:"rounded-xl bg-hud-elevated px-2 py-1.5 min-w-0",children:[(0,t.jsxs)("div",{className:"text-[0.65rem] font-semibold uppercase text-hud-muted truncate",children:[e.label,e.unit&&(0,t.jsxs)("span",{className:"normal-case font-normal",children:[" · ",e.unit]})]}),(0,t.jsx)("div",{className:"text-value font-semibold text-hud-main leading-tight truncate",children:e.value})]},e.label))}),g.length>0&&(0,t.jsx)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-1 mt-3",children:g.map(e=>(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2 min-w-0",children:[(0,t.jsx)("dt",{className:"text-caption text-hud-muted whitespace-nowrap",children:e.label}),(0,t.jsx)("dd",{className:"text-caption font-semibold text-hud-main truncate text-right",children:e.value})]},e.label))})]})]})},v=({onClose:e})=>{let{t:i}=(0,a.useTranslation)(),r=s.default.getAll(),u=`environment.wind.${r.preferredWindSpeedPath||"speedTrue"}`,d=`environment.wind.${r.preferredWindDirectionPath||"angleTrueWater"}`,g=(0,n.useMemo)(()=>["navigation.speedOverGround","navigation.speedThroughWater","navigation.headingTrue","navigation.headingMagnetic","navigation.courseOverGroundTrue","performance.velocityMadeGood","performance.polarSpeedRatio",u,d,"environment.wind.speedApparent","environment.wind.angleApparent","navigation.position","name"],[u,d]),c=(0,l.useSignalKPaths)(g),v=e=>{let t=(0,o.toDegrees)(e);return null===t?null:String(t).padStart(3,"0")},h=(e,t)=>{let n=(0,o.toKnots)(e);if(null===n)return null;let a=Number.isFinite(t)?Math.round(180*Math.abs(t)/Math.PI):null;return null===a?`${n} kn`:`${n} kn \xb7 ${a}\xb0${t<0?i("hud.portShort"):i("hud.starboardShort")}`},b=c["performance.polarSpeedRatio"],f="string"==typeof c.name?c.name:c.name?.value,x=c["navigation.position"],w=s.default.getSelectedBoat?.()||s.default.get("selectedBoat"),M="string"==typeof w?w:w?.name;return(0,t.jsx)(p,{onClose:e,card:{title:f||i("infoPanel.ownBoat"),subtitle:f?`${i("infoPanel.ownBoat")} \xb7 ${M||""}`.replace(/ · $/,""):M,primary:[{label:"SOG",value:(0,o.toKnots)(c["navigation.speedOverGround"]),unit:"kn"},{label:"STW",value:(0,o.toKnots)(c["navigation.speedThroughWater"]),unit:"kn"},{label:i("infoPanel.heading"),value:v(c["navigation.headingTrue"]??c["navigation.headingMagnetic"]),unit:"°"},{label:"COG",value:v(c["navigation.courseOverGroundTrue"]),unit:"°"}],details:[{label:"VMG",value:(0,o.toKnots)(c["performance.velocityMadeGood"])&&`${(0,o.toKnots)(c["performance.velocityMadeGood"])} kn`},{label:i("hud.polar"),value:Number.isFinite(b)&&b>0?`${Math.round(100*b)} %`:null},{label:i("hud.tws"),value:h(c[u],c[d])},{label:i("hud.aws"),value:h(c["environment.wind.speedApparent"],c["environment.wind.angleApparent"])},{label:i("infoPanel.latitude"),value:x&&m(x.latitude,!0)},{label:i("infoPanel.longitude"),value:x&&m(x.longitude,!1)}]}})},h=e=>String(e).replace(/^urn:mrn:(imo:mmsi|signalk:uuid):/,""),b=({mmsi:e,onClose:n})=>{let{t:i}=(0,a.useTranslation)(),{aisData:r}=(0,d.useAIS)({passive:!0}),{statuses:l,encounters:s}=(0,g.default)(),u=r[e];if(!u)return null;let m=u.name&&"unknown"!==u.name?u.name:h(e),v=s.find(t=>t.target.mmsi===e),b=l[e],f=null;if(v){let{role:e}=v;f={tone:"stand-on"===e.ownRole?"yields":"giveWay",text:`${i(`colregs.${e.reason}`,{name:m})} \xb7 ${i("colregs.rule",{rule:e.rule})}`}}else b&&(f={tone:b,text:i(`infoPanel.status.${b}`)});let x=u.distanceMeters,w=Number.isFinite(x)?x<1852?{value:Math.round(x),unit:"m"}:{value:(x/1852).toFixed(1),unit:"NM"}:null,M=u.tcpaSeconds,y=u.cog??u.cogMagnetic,N=u.heading??u.headingMagnetic,T=e=>{let t=(0,o.toDegrees)(e);return null===t?null:`${String(t).padStart(3,"0")}\xb0`};return(0,t.jsx)(p,{onClose:n,card:{title:m,subtitle:[i(`infoPanel.category.${(0,c.targetCategory)(u)}`),Number.isFinite(u.length)?`${Math.round(u.length)} m`:null].filter(Boolean).join(" · "),status:f,primary:[{label:i("infoPanel.range"),value:w?.value,unit:w?.unit},{label:"CPA",value:Number.isFinite(u.cpaMeters)?(u.cpaMeters/1852).toFixed(2):null,unit:"NM"},{label:"TCPA",value:Number.isFinite(M)&&M>0?Math.round(M/60):null,unit:"min"},{label:"SOG",value:(0,o.toKnots)(u.sog),unit:"kn"}],details:[{label:"COG",value:T(y)},{label:i("infoPanel.heading"),value:T(N)},{label:"MMSI",value:h(e)},{label:i("infoPanel.callsign"),value:u.callsign},{label:i("infoPanel.beam"),value:Number.isFinite(u.beam)?`${u.beam} m`:null},{label:i("infoPanel.state"),value:u.navState&&i(`infoPanel.navState.${String(u.navState).replace(/[^a-z]+(.)/gi,(e,t)=>t.toUpperCase())}`,{defaultValue:u.navState})}]}})};e.s(["default",0,({content:e,onClose:n})=>e?.kind==="own"?(0,t.jsx)(v,{onClose:n}):e?.kind==="ais"?(0,t.jsx)(b,{mmsi:e.mmsi,onClose:n}):null,"formatCoordinate",0,m])},77021,function(e){e.n(e.i(58700))},77291,24752,e=>{"use strict";var t=e.i(71645),n=e.i(62588),a=e.i(85709),i=e.i(61969),r=e.i(539);let l=Math.PI/180,o={power:1,sail:2,fishing:3,restricted:4},s=e=>{let t=String(e.navState||"").toLowerCase();if(/not under command|restricted|constrained/.test(t))return"restricted";if(/fishing/.test(t))return"fishing";if(/sailing/.test(t))return"sail";if(/motoring|engine/.test(t))return"power";let n=Number(e.shipType);return 36===n?"sail":30===n?"fishing":33===n?"restricted":"power"},u=(e,t,n)=>(0,r.wrapPi)(Math.atan2(t.x-e.x,t.y-e.y)-n),d=(e,t,n)=>{let a={x:0,y:0},i=u(a,t,e.course),s=u(t,a,t.course),d=Math.sign(s)||1,g=e=>Math.abs(e)>112.5*l;if(g(i)&&t.speed>e.speed)return{ownRole:"stand-on",rule:"13",reason:"overtakenByTarget",targetTurn:0};if(g(s)&&e.speed>t.speed)return{ownRole:"give-way",rule:"13",reason:"overtaking",targetTurn:0};let c=o[e.category]??1,m=o[t.category]??1;if(c!==m)return c<m?{ownRole:"give-way",rule:"18",reason:`giveWayTo_${t.category}`,targetTurn:0}:{ownRole:"stand-on",rule:"18",reason:`standOnFrom_${t.category}`,targetTurn:d};if("sail"===e.category&&Number.isFinite(n)){let a=(0,r.wrapPi)(n-e.course)>=0?"starboard":"port";return a!==((0,r.wrapPi)(n-t.course)>=0?"starboard":"port")?"port"===a?{ownRole:"give-way",rule:"12a-i",reason:"portTack",targetTurn:0}:{ownRole:"stand-on",rule:"12a-i",reason:"targetPortTack",targetTurn:d}:t.x*Math.sin(n)+t.y*Math.cos(n)>0?{ownRole:"stand-on",rule:"12a-ii",reason:"targetWindward",targetTurn:d}:{ownRole:"give-way",rule:"12a-ii",reason:"ownWindward",targetTurn:0}}return Math.abs((0,r.wrapPi)(t.course-e.course-Math.PI))<10*l&&Math.abs(i)<6*l?{ownRole:"both",rule:"14",reason:"headOn",targetTurn:1}:i>0?{ownRole:"give-way",rule:"15",reason:"crossingStarboard",targetTurn:0}:{ownRole:"stand-on",rule:"15",reason:"crossingPort",targetTurn:d}};e.s(["rightOfWay",0,d,"targetCategory",0,s],24752);var g=e.i(83402),c=e.i(67561);let m=[],p=["navigation.speedOverGround","navigation.courseOverGroundTrue"];e.s(["default",0,({always:e=!1}={})=>{let r,l,{targets:o}=(0,n.useAIS)({passive:!0}),{states:u}=(0,c.useOcearoContext)(),v=e||u.ais?o:m,{twd:h,heading:b}=(0,i.default)(),f=(0,a.useSignalKPaths)(p),x=(r=(0,a.useSignalKPrefix)("propulsion."),l=g.default.get("ownVesselCategory"),(0,t.useMemo)(()=>"sail"===l||"power"===l?l:Object.entries(r).some(([e,t])=>e.endsWith(".revolutions")&&Number(t)>.5||e.endsWith(".state")&&"started"===t)?"power":"sail",[r,l])),w=g.default.get("aisLengthScalingFactor")||.7;return(0,t.useMemo)(()=>{let e=f["navigation.courseOverGroundTrue"]??b,t=f["navigation.speedOverGround"]??0,n=[];if(Number.isFinite(e))for(let a of v){if("danger"!==a.risk)continue;let i=a.cog??a.cogMagnetic??a.heading;if(!Number.isFinite(i)||null===a.sceneX)continue;let r=d({course:e,speed:t,category:x},{x:a.sceneX/w,y:-a.sceneZ/w,course:i,speed:a.sog??0,category:s(a)},h);n.push({target:{...a},role:r})}n.sort((e,t)=>(e.target.tcpaSeconds??1/0)-(t.target.tcpaSeconds??1/0));let a={};for(let e of v)"close"===e.risk?a[e.mmsi]="close":"danger"===e.risk&&(a[e.mmsi]="giveWay");for(let e of n)a[e.target.mmsi]="stand-on"===e.role.ownRole?"yields":"giveWay";let i=n.filter(e=>"stand-on"!==e.role.ownRole);return{ownCategory:x,encounters:n,statuses:a,giveWay:i.length>0,giveWayTo:i[0]||null,primary:n[0]||null}},[v,h,b,f,x,w])}],77291)},61969,e=>{"use strict";var t=e.i(71645),n=e.i(85709),a=e.i(539);let i=180/Math.PI,r=["navigation.speedThroughWater","navigation.speedOverGround","navigation.headingTrue","navigation.courseOverGroundTrue","environment.wind.speedTrue","environment.wind.angleTrueWater","environment.wind.directionTrue","performance.polarSpeed","performance.polarSpeedRatio","navigation.courseGreatCircle.nextPoint.bearingTrue"];e.s(["default",0,()=>{let e=(0,n.useSignalKPaths)(r);return(0,t.useMemo)(()=>{let t=e["navigation.speedThroughWater"]??e["navigation.speedOverGround"]??null,n=e["navigation.headingTrue"]??e["navigation.courseOverGroundTrue"]??null,r=e["environment.wind.speedTrue"]??null,l=e["environment.wind.angleTrueWater"]??null,o=e["environment.wind.directionTrue"]??null;null===o&&Number.isFinite(l)&&Number.isFinite(n)&&(o=(0,a.wrapPi)(n+l));let s=e["performance.polarSpeed"]??(Number.isFinite(r)&&Number.isFinite(l)?(0,a.polarSpeedSi)(r,l):null),u=e["performance.polarSpeedRatio"]??null;null===u&&Number.isFinite(t)&&Number.isFinite(s)&&s>.2&&(u=t/s);let d=Number.isFinite(t)&&Number.isFinite(s)?(t-s)*1.943844:null,g=null,c=null,m=!Number.isFinite(l)||Math.abs(l)<Math.PI/2;if(Number.isFinite(r)){let e=m?(0,a.optimalUpwind)(1.943844*r):(0,a.optimalDownwind)(1.943844*r);e&&(g=e.twa/i,Number.isFinite(o)&&Number.isFinite(l)&&(c=(0,a.wrapPi)(o-Math.sign(l||1)*g)))}let p=e["navigation.courseGreatCircle.nextPoint.bearingTrue"],v=null;if(Number.isFinite(p)&&Number.isFinite(o)&&Number.isFinite(r)){let e=(0,a.bestVmcHeading)({twd:o,tws:r,bearing:p}),t=Number.isFinite(n)?(0,a.vmcForHeading)({twd:o,tws:r,bearing:p,heading:n}):null;v=e?{bearing:p,best:e,current:t}:null}return{ratio:u,polarSpeed:s,boatSpeed:t,deltaKn:d,heading:n,twd:o,tws:r,twa:l,targetTwa:g,targetHeading:c,upwind:m,vmc:v}},[e])}])},83646,e=>{"use strict";var t=e.i(67561);e.s(["default",0,()=>(0,t.useOcearoContext)().tokens])},74452,(e,t,n)=>{t.exports={vpp:{angles:[52,60,75,90,110,120,135,150],speeds:[6,8,10,12,14,16,20],52:[4.98,5.86,6.31,6.45,6.51,6.52,6.41],60:[5.25,6.11,6.56,6.73,6.79,6.82,6.79],75:[5.45,6.33,6.77,7.01,7.13,7.2,7.24],90:[5.66,6.55,7,7.25,7.38,7.53,7.7],110:[5.49,6.49,7.04,7.4,7.69,7.97,8.38],120:[5.32,6.36,6.97,7.39,7.77,8.1,8.6],135:[4.81,5.92,6.68,7.15,7.55,7.95,8.85],150:[4.09,5.17,6.04,6.61,6.99,7.31,7.93],beat_angle:[43.6,42,41.2,41.2,41.7,42.1,44.2],beat_vmg:[3.26,3.91,4.24,4.34,4.36,4.34,4.16],run_angle:[144.8,147.8,148.5,149.6,171.8,175.4,177.2],run_vmg:[3.54,4.48,5.23,5.73,6.17,6.67,7.36]}}},539,e=>{"use strict";var t=e.i(74452);let n=180/Math.PI,a=t.default.vpp,i=(e,t,n)=>e+(t-e)*n,r=(e,t)=>{if(t<=e[0])return[0,0];let n=e.length-1;if(t>=e[n])return[n-1,1];let a=0;for(;t>e[a+1];)a++;return[a,(t-e[a])/(e[a+1]-e[a])]},l=a.speeds.map((e,t)=>(e=>{let t=a.beat_angle[e],i=a.run_angle[e],r=a.beat_vmg[e]/Math.cos(t/n),l=a.run_vmg[e]/Math.abs(Math.cos(i/n)),o=[[0,0],[.7*t,.55*r],[t,r]];for(let n of a.angles)n>t&&n<i&&o.push([n,a[String(n)][e]]);return o.push([i,l]),i<180&&o.push([180,a.run_vmg[e]]),o})(t)),o=(e,t)=>{let[n,a]=r(e.map(e=>e[0]),t);return i(e[n][1],e[n+1][1],a)},s=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0)return null;let n=Math.min(180,Math.abs((t+540)%360-180)),s=a.speeds;if(e<s[0])return o(l[0],n)*(e/s[0]);let[u,d]=r(s,e);return i(o(l[u],n),o(l[u+1],n),d)},u=(e,t)=>{let[n,l]=r(a.speeds,t);return i(e[n],e[n+1],l)},d=(e,t)=>{let a=s(1.943844*e,t*n);return null===a?null:a/1.943844},g=e=>{let t=(e+Math.PI)%(2*Math.PI);return t<0&&(t+=2*Math.PI),t-Math.PI};e.s(["bestVmcHeading",0,({twd:e,tws:t,bearing:a})=>{if(![e,t,a].every(Number.isFinite)||t<=0)return null;let i=null;for(let r=-100;r<=100;r++){let l=a+r/n,o=d(t,g(e-l));if(null===o)continue;let s=o*Math.cos(l-a);(!i||s>i.vmc)&&(i={heading:g(l),speed:o,vmc:s})}return i},"optimalDownwind",0,e=>{if(!Number.isFinite(e)||e<=0)return null;let t=u(a.run_angle,e),i=s(e,t);return{twa:t,speed:i,vmg:-i*Math.cos(t/n)}},"optimalUpwind",0,e=>{if(!Number.isFinite(e)||e<=0)return null;let t=u(a.beat_angle,e),i=s(e,t);return{twa:t,speed:i,vmg:i*Math.cos(t/n)}},"polarSpeed",0,s,"polarSpeedSi",0,d,"vmcForHeading",0,({twd:e,tws:t,bearing:n,heading:a})=>{if(![e,t,n,a].every(Number.isFinite))return null;let i=d(t,g(e-a));return null===i?null:i*Math.cos(a-n)},"wrapPi",0,g])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87628,e=>{"use strict";var t=e.i(43476),s=e.i(71645);e.i(85269);var a=e.i(22831),r=e.i(49721),l=e.i(68757),n=e.i(85709),d=e.i(3950),i=e.i(71415),c=e.i(3666),o=e.i(97776),u=e.i(83402),h=e.i(48390);let p=[5,10,20],m=({shom:e,t:s})=>{let a=new Map((e.jobs||[]).map(e=>[e.id,e])),r=(e.available||[]).filter(e=>"coastal"===e.kind||e.installed);for(let t of e.regions||[])r.some(e=>e.id===t.id)||r.push({id:t.id,name:t.name,resolutionM:t.resolutionM,installed:!0});return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{className:"text-caption font-semibold text-hud-secondary",children:s("offline.shomTitle")}),0===r.length&&(0,t.jsx)("div",{className:"text-caption text-hud-muted",children:s("offline.shomNone")}),r.map(e=>{let r=a.get(e.id),l=e.installed?s("offline.shom_done"):r?"downloading"===r.state&&r.total?s("offline.shomDownloading",{pct:Math.round(r.received/r.total*100)}):s(`offline.shom_${r.state}`,{error:r.error}):s("offline.shomAvailable");return(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3 text-caption",children:[(0,t.jsxs)("span",{className:"text-hud-main truncate",children:[e.name,Number.isFinite(e.resolutionM)&&(0,t.jsxs)("span",{className:"text-hud-muted tabular-nums",children:[" · ",e.resolutionM," m"]})]}),(0,t.jsx)("span",{className:`shrink-0 tabular-nums ${e.installed?"text-oGreen":r?.state==="error"?"text-oRed":"text-hud-muted"}`,children:l})]},e.id)}),null===e.sevenZip&&(0,t.jsx)("div",{className:"text-caption text-oYellow",children:s("offline.shomNo7z")}),(0,t.jsx)("div",{className:"text-caption text-hud-muted",children:s("offline.shomCredit")})]})},x=()=>{let{t:e}=(0,a.useTranslation)(),x=(0,n.useSignalKPath)("navigation.position"),[b,g]=(0,s.useState)(10),[f,j]=(0,s.useState)(null),[N,v]=(0,s.useState)(null),[y,k]=(0,s.useState)(null),w=(0,s.useCallback)(()=>{(0,d.offlineCacheSize)().then(v).catch(()=>{})},[]);(0,s.useEffect)(()=>{w()},[w]);let B=(0,s.useCallback)(()=>{(0,h.isOcearoCoreEnabled)()&&(0,h.getBathymetryStatus)().then(k).catch(()=>k(null))},[]);(0,s.useEffect)(()=>{B()},[B]);let C=y?.jobs?.some(e=>!["done","error"].includes(e.state));(0,s.useEffect)(()=>{if(!C)return;let e=setInterval(B,2e3);return()=>clearInterval(e)},[C,B]);let S=async()=>{if(!Number.isFinite(x?.latitude))return;let{latitude:e,longitude:t}=x,s=1852*b;j({done:0,total:0,failed:0}),y&&(0,h.downloadBathymetry)(e,t,b).then(B).catch(()=>{}),!1!==u.default.get("showSeamarks3D")&&!1!==u.default.get("seamarksOverpass")&&(0,o.prefetchSeamarks)(e,t,s).catch(()=>{});let a=await (0,d.prefetchArea)({lat:e,lon:t,radiusM:s,layers:[{template:i.TERRARIUM,zooms:[i.BATHY_ZOOM-1,i.BATHY_ZOOM]}],urls:[(0,c.windFieldUrl)(Number(e.toFixed(1)),Number(t.toFixed(1)))],onProgress:(e,t,s)=>j({done:e,total:t,failed:s})});j({...a,finished:!0}),w()},U=async()=>{await (0,d.clearOfflineCache)(),j(null),w()},T=f&&!f.finished;return(0,t.jsxs)("section",{className:"tesla-card space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:e("offline.title")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsx)("p",{className:"text-caption text-hud-secondary max-w-prose",children:e("offline.explain")}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("div",{className:"flex rounded-xl bg-hud-bg p-1",children:p.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>g(e),className:`px-3 py-1.5 rounded-lg text-caption font-semibold ${b===e?"bg-oBlue text-white":"text-hud-secondary"}`,children:[e," NM"]},e))}),(0,t.jsxs)("button",{type:"button",onClick:S,disabled:T||!Number.isFinite(x?.latitude),className:"bg-oBlue hover:bg-oBlue/80 text-white px-4 py-2 rounded-xl text-caption font-semibold uppercase flex items-center gap-2 disabled:opacity-50",children:[(0,t.jsx)(r.FontAwesomeIcon,{icon:l.faCloudArrowDown}),e("offline.download")]}),(0,t.jsxs)("button",{type:"button",onClick:U,disabled:T,className:"text-hud-secondary hover:text-hud-main px-3 py-2 rounded-xl text-caption font-semibold uppercase flex items-center gap-2 disabled:opacity-50",children:[(0,t.jsx)(r.FontAwesomeIcon,{icon:l.faTrash}),e("offline.clear")]}),Number.isFinite(N)&&(0,t.jsx)("span",{className:"text-caption text-hud-muted tabular-nums",children:e("offline.used",{mb:(N/1e6).toFixed(0)})})]}),y&&(0,t.jsx)(m,{shom:y,t:e}),f&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"h-1.5 rounded-full bg-hud-bg overflow-hidden",children:(0,t.jsx)("div",{className:"h-full bg-oBlue transition-all",style:{width:`${f.total?f.done/f.total*100:0}%`}})}),(0,t.jsx)("div",{className:"text-caption text-hud-muted tabular-nums",children:f.finished?e("offline.finished",{count:f.done-f.failed,failed:f.failed}):e("offline.progress",{done:f.done,total:f.total})})]})]})};var b=e.i(46932),g=e.i(18638),f=e.i(58567),j=e.i(67561),N=e.i(18850);let v=({color:e})=>(0,t.jsx)("span",{className:`inline-block w-2.5 h-2.5 rounded-full ${e} animate-pulse ml-2 shrink-0`});e.s(["default",0,({onSave:e})=>{let{t:r,i18n:l}=(0,a.useTranslation)(),{themeMode:n,setTheme:d}=(0,j.useOcearoContext)(),i=u.default.getAll(),c=u.default.getComputedSignalKUrl(),o=u.default.getBoatsData(),[h,p]=(0,s.useState)(i),[m,y]=(0,s.useState)(i.useAuthentication||!!i.username||!!i.password),[k,w]=(0,s.useState)(i.signalKUrlSet||!1),[B,C]=(0,s.useState)(null),[S,U]=(0,s.useState)({visible:!1,message:""}),[T,A]=(0,s.useState)("system");(0,s.useEffect)(()=>{(async()=>{let e=u.default.getAll();p(e),w(e.signalKUrlSet||!1),y(e.useAuthentication||!!e.username||!!e.password),e.selectedBoat&&C(o.find(t=>t.name===e.selectedBoat)||null)})()},[o]);let D=t=>{let s={...h,...t};p(s);let a={...s};t.theme&&t.theme!==n&&d(t.theme),t.hasOwnProperty("signalKUrlSet")?!1===t.signalKUrlSet&&(a.signalkUrl=c,a.username="",a.password="",a.useAuthentication=!1):k||t.hasOwnProperty("signalkUrl")||(a.signalkUrl=c,a.username="",a.password=""),t.hasOwnProperty("useAuthentication")&&(a.useAuthentication=t.useAuthentication,t.useAuthentication||(a.username="",a.password="")),u.default.saveConfig(a),e?.(a),U({visible:!0,message:r("settings.savedAuto")}),setTimeout(()=>U({visible:!1,message:""}),2e3)};return(0,t.jsxs)("div",{className:"p-8 text-hud-main w-full relative",children:[(0,t.jsxs)("header",{className:"mb-10 flex justify-between items-start sm:items-center relative min-h-[4rem]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-value font-semibold uppercase tracking-tight mb-1",children:r("settings.title")}),(0,t.jsx)("p",{className:"text-hud-secondary text-label font-medium uppercase tracking-widest",children:r("settings.subtitle")})]}),S.visible&&(0,t.jsx)(b.motion.span,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"absolute right-0 top-0 sm:relative text-caption font-semibold bg-oGreen/20 text-oGreen border border-oGreen/30 px-4 py-2 rounded-full uppercase tracking-widest whitespace-nowrap",children:S.message})]}),(0,t.jsxs)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud mb-8",children:[(0,t.jsx)("button",{onClick:()=>A("system"),className:`flex-1 py-3 px-6 text-caption font-semibold uppercase tracking-widest transition-all rounded-lg ${"system"===T?"bg-oBlue/15 text-oBlue border border-oBlue/40 shadow-lg shadow-oBlue/10":"text-hud-secondary hover:text-hud-main"}`,children:r("settings.tabSystem")}),(0,t.jsx)("button",{onClick:()=>A("interface"),className:`flex-1 py-3 px-6 text-caption font-semibold uppercase tracking-widest transition-all rounded-lg ${"interface"===T?"bg-oBlue/15 text-oBlue border border-oBlue/40 shadow-lg shadow-oBlue/10":"text-hud-secondary hover:text-hud-main"}`,children:r("settings.tabInterface")})]}),(0,t.jsx)("div",{className:"space-y-8",children:"system"===T?(0,t.jsxs)("div",{className:"space-y-8 animate-in fade-in duration-500",children:[(0,t.jsx)(x,{}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.connection")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover",children:[(0,t.jsxs)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[r("settings.signalkServer"),!k&&(0,t.jsx)(v,{color:"bg-oBlue"})]}),(0,t.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:k,onChange:e=>{w(e.target.checked),D({signalKUrlSet:e.target.checked})}}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),!k&&(0,t.jsxs)("div",{className:"p-4 rounded-xl bg-hud-bg border border-hud",children:[(0,t.jsx)("span",{className:"text-caption font-bold uppercase tracking-widest text-hud-muted block mb-1",children:r("settings.detectedUrl")}),(0,t.jsx)("span",{className:"text-label font-mono text-oBlue",children:c})]})]}),k&&(0,t.jsxs)(b.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.customEndpoint")}),(0,t.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors font-mono",placeholder:"https://your-signalk-server.local",value:h.signalkUrl||"",onChange:e=>D({signalkUrl:e.target.value})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover",children:[(0,t.jsxs)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[r("settings.authentication"),k&&!m&&(0,t.jsx)(v,{color:"bg-oBlue"})]}),(0,t.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:m,onChange:e=>{y(e.target.checked),D({useAuthentication:e.target.checked})}}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),m&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.username")}),(0,t.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors",value:h.username||"",onChange:e=>D({username:e.target.value})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.password")}),(0,t.jsx)("input",{type:"password",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors",value:h.password||"",onChange:e=>D({password:e.target.value})})]})]})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.vessel")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.activeProfile")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.selectedBoat||"",onChange:e=>{let t=e.target.value;C(o.find(e=>e.name===t)||null),D({selectedBoat:t,boatChosen:!0})},children:[(0,t.jsx)("option",{value:"",className:"bg-hud-bg",children:r("settings.selectVessel")}),o.map(e=>(0,t.jsx)("option",{value:e.name,className:"bg-hud-bg",children:e.name},e.name))]})]}),B&&(0,t.jsxs)("div",{className:"p-4 rounded-xl bg-oBlue/10 border border-oBlue/20 space-y-1",children:[(0,t.jsx)("div",{className:"text-caption font-semibold uppercase tracking-widest text-oBlue mb-2",children:r("settings.specifications")}),(0,t.jsxs)("div",{className:"text-label font-medium",children:[r("settings.model"),": ",(0,t.jsx)("span",{className:"text-hud-main",children:B.modelPath})]}),(0,t.jsxs)("div",{className:"text-label font-medium",children:[r("settings.capabilities"),": ",(0,t.jsx)("span",{className:"text-hud-main",children:B.capabilities?.join(", ")})]})]})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.advanced")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary flex items-center",children:[r("settings.debugMode"),h.debugMode&&(0,t.jsx)(v,{color:"bg-oYellow"})]}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:r("settings.debugModeDesc")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.debugMode||!1,onChange:e=>{let t={debugMode:e.target.checked};!k&&e.target.checked&&(t.signalkUrl="https://demo.signalk.org:443"),D(t)}}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})})]}),(0,t.jsxs)("section",{className:"tesla-card border-oRed/10",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-oRed/80",children:r("settings.critical")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-oRed/5 mx-4"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-oRed/5 border border-oRed/10",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-oRed/80",children:r("settings.factoryReset")}),(0,t.jsx)("p",{className:"text-caption text-oRed/40 font-medium uppercase tracking-wider",children:r("settings.factoryResetDesc")})]}),(0,t.jsx)("button",{onClick:()=>{let e=u.default.getDefaultConfig();p(e),y(!1),e.useAuthentication=!1,w(!1),e.signalKUrlSet=!1,e.showCustomUrls=!1,e.customExternalUrls={},e.theme&&d(e.theme),e.language&&l.changeLanguage(e.language),u.default.saveConfig(e)},className:"bg-oRed/20 text-oRed border border-oRed/30 px-6 py-2 rounded-xl text-caption font-semibold uppercase tracking-widest hover:bg-oRed hover:text-hud-main transition-all duration-300 shadow-lg shadow-oRed/10",children:r("common.reset")})]})]})]}):(0,t.jsxs)("div",{className:"space-y-8 animate-in fade-in duration-500",children:[(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.appearance")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.themeMode")}),(0,t.jsx)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud",children:g.THEME_MODES.map(e=>(0,t.jsx)("button",{onClick:()=>D({theme:e}),className:`flex-1 py-3 px-4 rounded-lg text-caption font-semibold uppercase tracking-widest transition-all ${n===e?"bg-oBlue/15 text-oBlue border border-oBlue/40 shadow-lg shadow-oBlue/10":"text-hud-secondary hover:text-hud-main"}`,children:"auto"===e?r("settings.themeAuto"):r(`toolbar.theme_${e}`).replace(/ \(.*\)$/,"")},e))})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.renderQuality")}),(0,t.jsx)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud",children:f.RENDER_QUALITIES.map(e=>(0,t.jsx)("button",{onClick:()=>D({renderQuality:e}),className:`flex-1 py-3 px-4 rounded-lg text-caption font-semibold uppercase tracking-widest transition-all ${(h.renderQuality||"auto")===e?"bg-oBlue/15 text-oBlue border border-oBlue/40":"text-hud-secondary hover:text-hud-main"}`,children:r(`settings.renderQuality_${e}`)},e))}),(0,t.jsx)("p",{className:"text-caption text-hud-muted ml-1",children:r("settings.renderQualityHint")})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.hudStyle")}),(0,t.jsx)("div",{className:"flex bg-hud-bg p-1 rounded-xl border border-hud",children:["minimal","classic"].map(e=>(0,t.jsx)("button",{onClick:()=>D({hudStyle:e}),className:`flex-1 py-3 px-4 rounded-lg text-caption font-semibold uppercase tracking-widest transition-all ${(h.hudStyle||"minimal")===e?"bg-oBlue/15 text-oBlue border border-oBlue/40":"text-hud-secondary hover:text-hud-main"}`,children:r(`settings.hudStyle_${e}`)},e))})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.uiAccents")}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 rounded-xl bg-hud-bg tesla-hover self-end h-[60px]",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.metallic")}),(0,t.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.metallicEffect||!1,onChange:e=>D({metallicEffect:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})]}),(0,t.jsxs)("div",{className:"p-2 rounded-xl bg-hud-bg border border-hud flex items-center space-x-4",children:[(0,t.jsx)("input",{type:"color",className:"w-12 h-10 bg-transparent cursor-pointer rounded overflow-hidden border-none",value:h.primaryColor||"#09bfff",onChange:e=>D({primaryColor:e.target.value})}),(0,t.jsx)("span",{className:"text-caption font-mono uppercase text-hud-main/60",children:h.primaryColor||"#09bfff"})]})]})]})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.language")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.languageDesc")}),(0,t.jsx)("div",{className:"grid grid-cols-3 md:grid-cols-4 gap-1 bg-hud-bg p-1 rounded-xl border border-hud",children:N.SUPPORTED_LANGUAGES.map(e=>(0,t.jsxs)("button",{onClick:()=>{l.changeLanguage(e.code),D({language:e.code})},className:`py-3 px-2 rounded-lg text-caption font-semibold uppercase tracking-widest transition-all flex items-center justify-center space-x-2 ${(h.language||"en")===e.code?"bg-oBlue/15 text-oBlue border border-oBlue/40 shadow-lg shadow-oBlue/10":"text-hud-secondary hover:text-hud-main"}`,children:[(0,t.jsx)("span",{children:e.flag}),(0,t.jsx)("span",{children:e.label})]},e.code))})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.navigationHud")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.compassOrientation")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:h.compassNorthUp?r("settings.northAtTop"):r("settings.northAtBottom")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.compassNorthUp||!1,onChange:e=>D({compassNorthUp:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.hide3DCompass")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:h.hide3DCompass?r("settings.hidden"):r("settings.visible")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.hide3DCompass||!1,onChange:e=>D({hide3DCompass:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.hideTrueWind")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:h.hideTrueWind?r("settings.hidden"):r("settings.visible")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.hideTrueWind||!1,onChange:e=>D({hideTrueWind:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.attitudeIndicator")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:!1!==h.showAttitudeIndicator?r("settings.visible"):r("settings.hidden")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==h.showAttitudeIndicator,onChange:e=>D({showAttitudeIndicator:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.sailTrimSliders")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:!1!==h.showSailTrimSliders?r("settings.visible"):r("settings.hidden")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==h.showSailTrimSliders,onChange:e=>D({showSailTrimSliders:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.rigging")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:!1!==h.showRigging?r("settings.visible"):r("settings.hidden")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==h.showRigging,onChange:e=>D({showRigging:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.seamarks3D")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:!1!==h.showSeamarks3D?r("settings.visible"):r("settings.hidden")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium",children:r("settings.seamarks3DHint")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==h.showSeamarks3D,onChange:e=>D({showSeamarks3D:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:`flex items-center justify-between cursor-pointer ${!1===h.showSeamarks3D?"opacity-50":""}`,children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.seamarksOverpass")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:!1!==h.seamarksOverpass?r("settings.enabled"):r("settings.disabled")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium",children:r("settings.seamarksOverpassHint")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:!1!==h.seamarksOverpass,onChange:e=>D({seamarksOverpass:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})})]}),(0,t.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-end",children:[(0,t.jsxs)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:[r("settings.aisLengthScaling"),(0,t.jsx)("span",{className:"block text-caption text-hud-muted font-medium mt-1 uppercase",children:r("settings.mapTargetVisibility")})]}),(0,t.jsx)("span",{className:"text-value font-semibold text-oBlue bg-oBlue/10 px-3 py-1 rounded-lg",children:h.aisLengthScalingFactor||.7})]}),(0,t.jsx)("input",{type:"range",className:"w-full h-1.5 bg-hud-bg-elevated rounded-lg appearance-none cursor-pointer accent-oBlue",min:"0.1",max:"2.0",step:"0.1",value:h.aisLengthScalingFactor||.7,onChange:e=>D({aisLengthScalingFactor:parseFloat(e.target.value)})})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.unitsValues")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.distanceUnits")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.distanceUnits||"nm",onChange:e=>D({distanceUnits:e.target.value}),children:[(0,t.jsx)("option",{value:"nm",className:"bg-hud-bg",children:"Nautical Miles"}),(0,t.jsx)("option",{value:"km",className:"bg-hud-bg",children:"Kilometres"}),(0,t.jsx)("option",{value:"mi",className:"bg-hud-bg",children:"Miles"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.depthUnits")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.depthUnits||"m",onChange:e=>D({depthUnits:e.target.value}),children:[(0,t.jsx)("option",{value:"m",className:"bg-hud-bg",children:"metres"}),(0,t.jsx)("option",{value:"ft",className:"bg-hud-bg",children:"feet"}),(0,t.jsx)("option",{value:"fa",className:"bg-hud-bg",children:"fathoms"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.speedUnits")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.speedUnits||"kn",onChange:e=>D({speedUnits:e.target.value}),children:[(0,t.jsx)("option",{value:"kn",className:"bg-hud-bg",children:"knots"}),(0,t.jsx)("option",{value:"km/h",className:"bg-hud-bg",children:"km/h"}),(0,t.jsx)("option",{value:"mph",className:"bg-hud-bg",children:"mph"}),(0,t.jsx)("option",{value:"m/s",className:"bg-hud-bg",children:"m/s"})]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.temperatureUnits")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.temperatureUnits||"C",onChange:e=>D({temperatureUnits:e.target.value}),children:[(0,t.jsx)("option",{value:"C",className:"bg-hud-bg",children:"Celsius"}),(0,t.jsx)("option",{value:"F",className:"bg-hud-bg",children:"Fahrenheit"})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.positionFormat")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:h.positionFormat||"DD",onChange:e=>D({positionFormat:e.target.value}),children:[(0,t.jsx)("option",{value:"DD",className:"bg-hud-bg",children:"-128.12345"}),(0,t.jsx)("option",{value:"DM",className:"bg-hud-bg",children:"-128° 07.407'"}),(0,t.jsx)("option",{value:"DMS",className:"bg-hud-bg",children:"-128° 07' 24.4\""})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.preferTrueValues")}),(0,t.jsxs)("select",{className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors appearance-none cursor-pointer",value:!1!==h.preferTrueValues?"true":"false",onChange:e=>D({preferTrueValues:"true"===e.target.value}),children:[(0,t.jsx)("option",{value:"true",className:"bg-hud-bg",children:r("settings.preferTrue")}),(0,t.jsx)("option",{value:"false",className:"bg-hud-bg",children:r("settings.preferMagnetic")})]})]})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.preferredPaths")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.trueWindSpeed")}),(0,t.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"speedTrue",label:r("settings.pathSpeedTrue")},{value:"speedApparent",label:r("settings.pathSpeedApparent")}].map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"radio",name:"preferredWindSpeedPath",value:e.value,checked:(h.preferredWindSpeedPath||"speedTrue")===e.value,onChange:e=>D({preferredWindSpeedPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,t.jsx)("span",{className:"text-label text-hud-main",children:e.label})]},e.value))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.trueWindDirection")}),(0,t.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"directionTrue",label:r("settings.pathDirectionTrue")},{value:"angleApparent",label:r("settings.pathAngleApparent")},{value:"angleTrueWater",label:r("settings.pathAngleTrueWater")}].map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"radio",name:"preferredWindDirectionPath",value:e.value,checked:(h.preferredWindDirectionPath||"directionTrue")===e.value,onChange:e=>D({preferredWindDirectionPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,t.jsx)("span",{className:"text-label text-hud-main",children:e.label})]},e.value))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:r("settings.headingCog")}),(0,t.jsx)("div",{className:"space-y-2 p-4 rounded-xl bg-hud-bg border border-hud",children:[{value:"courseOverGroundTrue",label:r("settings.pathCourseOverGroundTrue")},{value:"headingTrue",label:r("settings.pathHeadingTrue")},{value:"courseOverGroundMagnetic",label:r("settings.pathCourseOverGroundMagnetic")},{value:"headingMagnetic",label:r("settings.pathHeadingMagnetic")}].map(e=>(0,t.jsxs)("label",{className:"flex items-center space-x-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"radio",name:"preferredHeadingPath",value:e.value,checked:(h.preferredHeadingPath||"courseOverGroundTrue")===e.value,onChange:e=>D({preferredHeadingPath:e.target.value}),className:"w-4 h-4 accent-oBlue"}),(0,t.jsx)("span",{className:"text-label text-hud-main",children:e.label})]},e.value))})]})]})]}),(0,t.jsxs)("section",{className:"tesla-card space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("h2",{className:"text-label font-semibold uppercase tracking-widest text-hud-main/90",children:r("settings.externalLinks")}),(0,t.jsx)("div",{className:"h-[1px] flex-grow bg-hud-border mx-4"})]}),(0,t.jsx)("div",{className:"p-4 rounded-xl bg-hud-bg tesla-hover border border-hud",children:(0,t.jsxs)("label",{className:"flex items-center justify-between cursor-pointer",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-label font-bold uppercase tracking-widest text-hud-secondary",children:r("settings.customToolUrls")}),(0,t.jsx)("p",{className:"text-caption text-hud-muted font-medium uppercase tracking-wider",children:r("settings.customToolUrlsDesc")})]}),(0,t.jsx)("input",{type:"checkbox",className:"sr-only peer",checked:h.showCustomUrls||!1,onChange:e=>D({showCustomUrls:e.target.checked})}),(0,t.jsx)("div",{className:"relative w-11 h-6 bg-hud-bg-elevated peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-hud-main after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-hud-main after:border-hud-main after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-oBlue"})]})}),h.showCustomUrls&&(0,t.jsx)(b.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"space-y-6 pt-4 border-t border-hud",children:(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{id:"navigation",label:r("settings.urlNavigation"),placeholder:"${signalkUrl}/@signalk/freeboard-sk/"},{id:"instrument",label:r("settings.urlInstruments"),placeholder:"${signalkUrl}/@mxtommy/kip/"},{id:"dashboard",label:r("settings.urlMetrics"),placeholder:"${signalkUrl}/grafana"},{id:"webcam1",label:r("settings.urlWebcamAlpha"),placeholder:"https://example.com/stream1"},{id:"webcam2",label:r("settings.urlWebcamBeta"),placeholder:"https://example.com/stream2"},{id:"weather",label:r("settings.urlAtmospheric"),placeholder:"https://windy.com/..."}].map(e=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-caption font-semibold uppercase tracking-widest text-hud-secondary ml-1",children:e.label}),(0,t.jsx)("input",{type:"text",className:"w-full bg-hud-bg border border-hud rounded-xl p-4 text-label text-hud-main focus:outline-none focus:border-oBlue/50 transition-colors font-mono",placeholder:e.placeholder,value:h.customExternalUrls?.[e.id]||"",onChange:t=>{let s={...h.customExternalUrls};s[e.id]=t.target.value,D({customExternalUrls:s})}})]},e.id))})})]})]})})]})}],87628)},34900,function(e){e.n(e.i(87628))}]);