ocearo-ui 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +1 -1
- package/__next.__PAGE__.txt +2 -2
- package/__next._full.txt +3 -3
- package/__next._head.txt +1 -1
- package/__next._index.txt +2 -2
- package/__next._tree.txt +2 -2
- package/_next/static/chunks/{0s7ev9xt6xz5c.js → 009rlietvsaq2.js} +1 -1
- package/_next/static/chunks/08gn5_gd6amkq.js +1 -0
- package/_next/static/chunks/{1g21fvp1vxlol.js → 0jzbiie0nzar2.js} +1 -1
- package/_next/static/chunks/0utifqhyv2cuc.js +1 -0
- package/_next/static/chunks/0wzr1__so6xme.js +1 -0
- package/_next/static/chunks/{00b24tu3xognr.js → 11ln9lzzbo35q.js} +1 -1
- package/_next/static/chunks/1wv5e5qomv-7g.css +3 -0
- package/_next/static/chunks/{1phpmupk6twat.js → 29-ag86gvlc40.js} +2 -2
- package/_next/static/chunks/2a0yjir_3mk1m.js +1 -0
- package/_next/static/chunks/{1v9sx2zvvfu7m.js → 2baz6j1q913qw.js} +1 -1
- package/_next/static/chunks/{0vwsugj7n9_96.js → 2lez3uww9j4t0.js} +4 -4
- package/_next/static/chunks/{1i35u7m1a-aq5.js → 2nxsyowmuwpjy.js} +1 -1
- package/_next/static/chunks/2pwmb4pkqygy_.js +1 -0
- package/_next/static/chunks/{20srrp2o3xsog.js → 2yghvponatk1x.js} +4 -4
- package/_next/static/chunks/{36gcdml-8hccp.js → 31i14-jemhnic.js} +4 -4
- package/_next/static/chunks/3rhgquok36e79.js +1 -0
- package/_not-found/__next._full.txt +2 -2
- package/_not-found/__next._head.txt +1 -1
- package/_not-found/__next._index.txt +2 -2
- package/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/_not-found/__next._not-found.txt +1 -1
- package/_not-found/__next._tree.txt +2 -2
- package/_not-found.html +1 -1
- package/_not-found.txt +2 -2
- package/index.html +1 -1
- package/index.txt +3 -3
- package/package.json +1 -1
- package/settings/__next._full.txt +2 -2
- package/settings/__next._head.txt +1 -1
- package/settings/__next._index.txt +2 -2
- package/settings/__next._tree.txt +2 -2
- package/settings/__next.settings.__PAGE__.txt +1 -1
- package/settings/__next.settings.txt +1 -1
- package/settings.html +1 -1
- package/settings.txt +2 -2
- package/_next/static/chunks/04lomm-6r6u_y.js +0 -1
- package/_next/static/chunks/0wo1zlwo1g8cn.js +0 -1
- package/_next/static/chunks/1g27qus1wjpzi.js +0 -1
- package/_next/static/chunks/1o473gsiw2s6h.js +0 -1
- package/_next/static/chunks/29vh6vtwjqpju.js +0 -1
- package/_next/static/chunks/2jrvtsuq91xny.js +0 -1
- package/_next/static/chunks/3v7kbzxs8nq6c.css +0 -3
- /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_buildManifest.js +0 -0
- /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_clientMiddlewareManifest.js +0 -0
- /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76103,e=>{"use strict";var t=e.i(43476),o=e.i(71645),s=e.i(67561),a=e.i(85709),l=e.i(49721),n=e.i(68757),i=e.i(83402),r=e.i(46991),d=e.i(48390),c=e.i(46932),u=e.i(88653);e.i(85269);var x=e.i(22831);e.s(["default",0,()=>{let e,m,b,h,g,p,f,v,k,y,{t:N}=(0,x.useTranslation)(),{nightMode:j,states:w,toggleState:C}=(0,s.useOcearoContext)(),S=w?.racing??!1,[A,F]=(0,o.useState)("logbook"),T=(0,o.useMemo)(()=>["navigation.position","navigation.courseOverGroundTrue","navigation.headingTrue","navigation.speedOverGround","environment.wind.speedTrue","environment.wind.angleTrueWater","environment.wind.speedApparent","environment.wind.angleApparent","environment.outside.pressure","environment.outside.temperature","environment.depth.belowKeel","environment.depth.belowTransducer","navigation.log","propulsion.main.runTime"],[]),B=(0,a.useSignalKPaths)(T),[G,O]=(0,o.useState)([]),[R,$]=(0,o.useState)(!1),[I,E]=(0,o.useState)(null),[L,D]=(0,o.useState)("UTC"),[P,Y]=(0,o.useState)(null),[M,K]=(0,o.useState)(!1),[W,z]=(0,o.useState)({text:"",author:"manual"}),[J,U]=(0,o.useState)(!1),[V,Z]=(0,o.useState)(null),[_,H]=(0,o.useState)(null),[q,Q]=(0,o.useState)(!1);i.default.getAll();let X=(0,d.isOcearoCoreEnabled)(),ee=(0,o.useCallback)(async()=>{$(!0),E(null);try{let e=(await (0,d.fetchLogbookEntries)()).map(e=>({...e,date:new Date(e.datetime||e.date),point:e.point?{...e.point,toString:()=>"number"==typeof e.point.latitude&&"number"==typeof e.point.longitude?`${e.point.latitude.toFixed(6)}, ${e.point.longitude.toFixed(6)}`:"Invalid coordinates"}:null}));O(e)}catch(e){"NetworkError"!==e.name&&"TimeoutError"!==e.name&&console.warn("Error fetching logbook entries:",e),E((0,d.handleOcearoCoreError)(e,"Logbook fetch")),i.default.get("debugMode")?O(et()):O([])}finally{$(!1)}},[]),et=()=>[{datetime:new Date().toISOString(),date:new Date,course:45,speed:{sog:6.5},wind:{speed:12,direction:180},observations:{seaState:2,cloudCoverage:3,visibility:7},barometer:1013.2,point:{latitude:46.1591,longitude:-1.1522,toString:()=>"46.159100, -1.152200"},position:{source:"GPS",latitude:46.1591,longitude:-1.1522},log:125.5,engine:{hours:245.2},author:"Captain",text:"Departing La Rochelle, good conditions"},{datetime:new Date(Date.now()-36e5).toISOString(),date:new Date(Date.now()-36e5),heading:42,speed:{sog:7.2},wind:{speed:15,direction:200},observations:{seaState:3,cloudCoverage:2,visibility:8},barometer:1012.8,point:{latitude:46.2591,longitude:-1.2522,toString:()=>"46.259100, -1.252200"},position:{source:"GPS",latitude:46.2591,longitude:-1.2522},log:132.1,engine:{hours:245.8},author:"auto",text:"Wind picking up, adjusting course"}],eo=(0,o.useCallback)(()=>{Y(null),z({text:"",author:"manual"}),K(!0)},[]),es=(0,o.useCallback)(async()=>{try{let e;if(P)e={...P,author:W.author||P.author||"manual",text:W.text||P.text||"Manual entry"},delete e.date,delete e.point;else{let t=B["navigation.position"]||{},o=B["navigation.headingTrue"],s=B["environment.wind.speedTrue"],a=B["environment.wind.speedApparent"],l=null==s,n=l?B["environment.wind.angleApparent"]:B["environment.wind.angleTrueWater"],i={},d=(0,r.msToKnots)(l?a:s);if(null!==d&&(i.speed=d),null!=o&&null!=n){let e=(0,r.toDegrees)(o+n);null!==e&&(i.direction=e)}l&&Object.keys(i).length&&(i.apparent=!0);let c=B["environment.depth.belowKeel"]??B["environment.depth.belowTransducer"],u=B["navigation.log"],x=B["propulsion.main.runTime"];e={datetime:new Date().toISOString(),position:{latitude:t.latitude||46.1591,longitude:t.longitude||-1.1522,source:"GPS"},course:(0,r.toDegrees)(B["navigation.courseOverGroundTrue"]??o),speed:{sog:(0,r.msToKnots)(B["navigation.speedOverGround"])},wind:i,barometer:(0,r.convertPressure)(B["environment.outside.pressure"]),log:Number.isFinite(u)?parseFloat((u/1852).toFixed(1)):null,depth:Number.isFinite(c)?parseFloat(c.toFixed(1)):null,engine:{hours:Number.isFinite(x)?parseFloat((x/3600).toFixed(1)):null},author:W.author||"manual",text:W.text||"Manual entry"}}await (0,d.addLogbookEntry)(e),K(!1),Y(null),ee()}catch(e){console.warn("Error saving entry:",e),E((0,d.handleOcearoCoreError)(e,"Save logbook entry"))}},[B,ee,W,P]),ea=(0,o.useCallback)(async()=>{if(!X)return void E(N("logbook.ocearoCoreNotEnabled"));try{Q(!0),E(null);let e={position:B["navigation.position"],course:B["navigation.courseOverGroundTrue"]||B["navigation.headingTrue"],speed:B["navigation.speedOverGround"],wind:{speed:B["environment.wind.speedTrue"],direction:B["environment.wind.angleTrueWater"]},weather:{pressure:B["environment.outside.pressure"],temperature:B["environment.outside.temperature"]},engine:{hours:B["propulsion.main.runTime"]},log:B["navigation.log"]},t=await (0,d.generateOcearoCoreLogbookEntry)(e);await ee(),t&&t.analysis&&(Z(t.analysis),H("auto-entry"),F("analysis"))}catch(e){E((0,d.handleOcearoCoreError)(e,"OcearoCore entry generation"))}finally{Q(!1)}},[X,B,ee]),el=(0,o.useCallback)(async e=>{if(!X)return void E(N("logbook.ocearoCoreNotEnabled"));try{U(!0),Z(null),H(e),E(null),F("analysis");let t=await (0,d.requestAnalysis)(e);Z(t),console.log("OcearoCore Analysis:",t)}catch(e){E((0,d.handleOcearoCoreError)(e,"OcearoCore analysis"))}finally{U(!1)}},[X]),en=(0,o.useCallback)(async()=>{if(!X)return void E(N("logbook.ocearoCoreNotEnabled"));try{U(!0),Z(null),H("logbook"),E(null),F("analysis");let e=await (0,d.analyzeLogbookWithOcearoCore)();Z(e),console.log("Logbook Analysis:",e)}catch(e){E((0,d.handleOcearoCoreError)(e,"Logbook analysis"))}finally{U(!1)}},[X]),ei=(0,o.useCallback)(e=>{Y(e),z({text:e.text||"",author:e.author||"manual"}),K(!0)},[]),er=(e,t="")=>Number.isFinite(e)?`${e}${t}`:"",ed=e=>Number.isFinite(e.course)?`${e.course}\xb0`:Number.isFinite(e.heading)?`HDT ${e.heading}\xb0`:"";(0,o.useEffect)(()=>{ee()},[ee]);let ec={safety:{color:"text-oRed",border:"border-oRed/40",bg:"bg-oRed/10"},alert:{color:"text-oRed",border:"border-oRed/40",bg:"bg-oRed/10"},weather:{color:"text-oYellow",border:"border-oYellow/40",bg:"bg-oYellow/10"},startup_analysis:{color:"text-oGreen",border:"border-oGreen/40",bg:"bg-oGreen/10"},briefing:{color:"text-oGreen",border:"border-oGreen/40",bg:"bg-oGreen/10"},racing:{color:"text-oYellow",border:"border-oYellow/40",bg:"bg-oYellow/10"},maintenance:{color:"text-oYellow",border:"border-oYellow/40",bg:"bg-oYellow/10"},hourly_entry:{color:"text-oBlue",border:"border-oBlue/40",bg:"bg-oBlue/10"},navigation:{color:"text-oBlue",border:"border-oBlue/40",bg:"bg-oBlue/10"},default:{color:"text-hud-secondary",border:"border-hud",bg:"bg-hud-elevated"}};return(0,t.jsxs)("div",{className:"flex flex-col h-full bg-rightPaneBg overflow-hidden",children:[X&&(0,t.jsxs)("div",{className:`flex items-center justify-between px-4 py-2 border-b transition-all duration-500 ${S?"bg-oYellow/10 border-oYellow/30":"bg-hud-bg border-hud"}`,children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faTrophy,className:`text-xs transition-colors duration-300 ${S?"text-oYellow animate-soft-pulse":"text-hud-muted"}`}),(0,t.jsx)("span",{className:"text-xs font-black uppercase tracking-widest text-hud-main",children:S?N("logbook.racingModeActive"):N("logbook.racingMode")}),S&&(0,t.jsxs)("span",{className:"text-xs font-black uppercase tracking-widest text-oYellow opacity-70",children:["— ",N("logbook.racingModeAISInfo")]})]}),(0,t.jsx)("button",{onClick:()=>C("racing"),className:`relative inline-flex h-5 w-10 items-center rounded-full transition-colors duration-300 focus:outline-none ${S?"bg-oYellow":"bg-hud-elevated border border-hud"}`,"aria-label":N("logbook.racingMode"),children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-hud-main shadow transition-transform duration-300 ${S?"translate-x-5":"translate-x-1"}`})})]}),(0,t.jsx)("div",{className:"flex border-b border-hud bg-hud-bg",children:[{id:"timeline",label:N("logbook.missionTimeline"),icon:n.faTimeline},{id:"logbook",label:N("logbook.tacticalLog"),icon:n.faBook},{id:"analysis",label:N("logbook.fleetIntelligence"),icon:n.faChartLine}].map(e=>(0,t.jsxs)("button",{onClick:()=>F(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${A===e.id?"text-oGreen border-b-2 border-oGreen bg-hud-bg":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:e.icon,className:"mr-2"}),e.label]},e.id))}),(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:(0,t.jsx)(u.AnimatePresence,{mode:"wait",children:(0,t.jsxs)(c.motion.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.4,ease:"easeOut"},className:"h-full overflow-auto scrollbar-hide",children:["logbook"===A&&(0,t.jsxs)("div",{className:"p-4 flex flex-col h-full overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faBook,className:"mr-2 text-oBlue text-xs"}),N("logbook.logbookEntries")]}),(0,t.jsxs)("div",{className:"flex space-x-3",children:[X&&(0,t.jsxs)("button",{className:"bg-oGreen/10 text-oGreen hover:bg-oGreen/20 px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft border border-oGreen/20 disabled:opacity-50",onClick:ea,disabled:q||R,children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,className:`mr-2 ${q?"animate-spin":""}`}),q?N("logbook.aiEntryGenerating"):N("logbook.aiEntry")]}),(0,t.jsxs)("button",{className:"bg-oBlue hover:bg-oBlue/80 text-hud-main px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft",onClick:eo,disabled:R,children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faPlus,className:"mr-2"}),N("logbook.add")]})]})]}),I&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:I}),(0,t.jsx)("div",{className:"tesla-card flex-1 overflow-auto bg-hud-bg",children:(0,t.jsxs)("table",{className:"w-full text-xs font-black uppercase tracking-tight",children:[(0,t.jsx)("thead",{className:"sticky top-0 bg-hud-bg backdrop-blur-md z-10",children:(0,t.jsxs)("tr",{className:"text-hud-secondary border-b border-hud",children:[(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.time")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.courseCol")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.sog")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.weatherCol")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.baro")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.depth")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.position")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.log")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.eng")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.by")}),(0,t.jsx)("th",{className:"p-3 text-left",children:N("logbook.noteCol")})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-hud",children:G.map((e,o)=>(0,t.jsxs)("tr",{onClick:()=>ei(e),className:"tesla-hover cursor-pointer text-hud-main",children:[(0,t.jsx)("td",{className:"p-3 whitespace-nowrap opacity-60",children:e.date.toLocaleString("en-GB",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",timeZone:L})}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:ed(e)}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:er(e.speed?.sog,"kt")}),(0,t.jsx)("td",{className:"p-3 text-hud-secondary font-bold lowercase normal-case",children:(e=>{let t=[];if(e.wind){let o=[];Number.isFinite(e.wind.speed)&&o.push(`${e.wind.speed}kt`),Number.isFinite(e.wind.direction)&&o.push(`${e.wind.direction}\xb0`),o.length&&t.push(`${e.wind.apparent?"AWind":"Wind"} ${o.join(" ")}`)}return e.observations&&(Number.isFinite(e.observations.seaState)&&t.push(`Sea state ${e.observations.seaState}`),Number.isFinite(e.observations.cloudCoverage)&&t.push(`Clouds ${e.observations.cloudCoverage}/8`),Number.isFinite(e.observations.visibility)&&t.push(`Visibility ${e.observations.visibility+1}`)),t.join(", ")})(e)}),(0,t.jsx)("td",{className:"p-3 gliding-value opacity-60",children:er(e.barometer)}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:er(e.depth,"m")}),(0,t.jsx)("td",{className:"p-3 text-xs text-hud-muted font-mono tracking-tighter",children:e.point?e.point.toString():"n/a"}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:er(e.log,"NM")}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:er(e.engine?.hours,"h")}),(0,t.jsx)("td",{className:"p-3 text-oBlue opacity-80",children:e.author||"auto"}),(0,t.jsx)("td",{className:"p-3 normal-case font-bold text-hud-secondary truncate max-w-xs",children:e.text})]},e.datetime||o))})]})})]}),"timeline"===A&&(()=>{let e=[...G].reverse(),o=[];for(let t of e){let e=t.date.toLocaleDateString("fr-FR",{weekday:"long",day:"numeric",month:"long",year:"numeric",timeZone:L}),s=o[o.length-1];s&&s.day===e?s.items.push(t):o.push({day:e,items:[t]})}return o.reverse(),(0,t.jsxs)("div",{className:"p-4 space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faTimeline,className:"mr-2 text-oGreen text-xs"}),N("logbook.cruiseTimeline")]}),(0,t.jsxs)("div",{className:"flex space-x-3",children:[X&&(0,t.jsxs)("button",{className:"bg-oGreen/10 text-oGreen hover:bg-oGreen/20 px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft border border-oGreen/20 disabled:opacity-50",onClick:ea,disabled:q||R,children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,className:`mr-2 ${q?"animate-spin":""}`}),q?N("logbook.aiEntryGenerating"):N("logbook.aiAuto")]}),(0,t.jsxs)("button",{className:"bg-oBlue hover:bg-oBlue/80 text-hud-main px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft",onClick:eo,disabled:R,children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faPlus,className:"mr-2"}),N("logbook.add")]})]})]}),I&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:I}),(0,t.jsx)("div",{className:"space-y-6",children:o.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center mb-3",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oBlue mr-3"}),(0,t.jsx)("span",{className:"text-xs font-black text-hud-main uppercase tracking-widest",children:e.day}),(0,t.jsx)("div",{className:"flex-1 h-px bg-hud-border ml-4 opacity-40"}),(0,t.jsx)("span",{className:"text-xs font-black text-hud-muted ml-3",children:e.items.length})]}),(0,t.jsx)("div",{className:"space-y-2 ml-1 pl-4 border-l border-hud",children:e.items.map((e,o)=>{let s=e.entryType||e.analysis?.type||"default",a=ec[s]||ec.default,l=(e=>{let t=[],o=ed(e);if(o&&t.push({label:N("logbook.courseCol"),value:o}),Number.isFinite(e.speed?.sog)&&t.push({label:N("logbook.speed"),value:`${e.speed.sog}kt`}),Number.isFinite(e.wind?.speed)){let o=Number.isFinite(e.wind.direction)?` ${e.wind.direction}\xb0`:"";t.push({label:N("logbook.weatherCol"),value:`${e.wind.speed}kt${o}`})}return Number.isFinite(e.barometer)&&t.push({label:N("logbook.baro"),value:`${e.barometer}`}),Number.isFinite(e.depth)&&t.push({label:N("logbook.depth"),value:`${e.depth}m`}),Number.isFinite(e.log)&&t.push({label:N("logbook.log"),value:`${e.log}NM`}),Number.isFinite(e.engine?.hours)&&t.push({label:N("logbook.eng"),value:`${e.engine.hours}h`}),e.point&&"number"==typeof e.point.latitude&&t.push({label:N("logbook.coord"),value:e.point.toString(),mono:!0}),t})(e);return(0,t.jsxs)("div",{onClick:()=>ei(e),className:"tesla-card tesla-hover cursor-pointer group",children:[(0,t.jsxs)("div",{className:"px-4 py-2 flex justify-between items-center border-b border-hud",children:[(0,t.jsxs)("div",{className:"flex items-center min-w-0 gap-3",children:[(0,t.jsx)("span",{className:"text-sm font-black text-hud-main tracking-tight",children:e.date.toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit",timeZone:L})}),(0,t.jsx)("span",{className:`px-2 py-0.5 rounded-sm text-xs font-black uppercase tracking-widest border ${a.color} ${a.border} ${a.bg}`,children:N(`logbook.types.${s}`,{defaultValue:s.replace(/_/g," ")})})]}),(0,t.jsx)("div",{className:"text-xs font-black text-hud-muted uppercase tracking-tighter truncate ml-3",children:e.author||"system"})]}),(0,t.jsxs)("div",{className:"p-4",children:[e.text&&(0,t.jsx)("div",{className:"text-xs font-bold text-hud-secondary normal-case leading-relaxed mb-3",children:e.text}),l.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-x-6 gap-y-2 text-xs font-black uppercase tracking-tight text-hud-secondary",children:l.map(e=>(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-hud-dim",children:e.label}),(0,t.jsx)("span",{className:`text-hud-main ${e.mono?"font-mono text-xs":"gliding-value"}`,children:e.value})]},e.label))})]})]},e.datetime||o)})})]},e.day))})]})})(),"analysis"===A&&(0,t.jsxs)("div",{className:"p-4 space-y-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center mb-2",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faChartLine,className:"mr-2 text-oBlue text-xs"}),N("logbook.fleetIntelligence")]}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-black uppercase tracking-tighter",children:N("logbook.aiPoweredAnalysis")})]}),X&&(0,t.jsxs)("div",{className:"tesla-card p-4 mb-6 bg-hud-bg",children:[(0,t.jsx)("h4",{className:"text-xs font-black text-hud-secondary mb-4 uppercase tracking-widest",children:N("logbook.selectOperation")}),(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[{id:"logbook",label:"LOGBOOK",icon:n.faBook,color:"bg-oBlue",action:en},{id:"weather",label:"WEATHER",icon:n.faCloudSun,color:"bg-oBlue",action:()=>el("weather")},{id:"sail",label:"SAIL",icon:n.faCompass,color:"bg-oGreen",action:()=>el("sail")},{id:"alerts",label:"ALERTS",icon:n.faRobot,color:"bg-oRed",action:()=>el("alerts")},{id:"status",label:"STATUS",icon:n.faTachometerAlt,color:"bg-hud-muted",action:()=>el("status")},{id:"racing",label:N("logbook.racingAdvice"),icon:n.faTrophy,color:S?"bg-oYellow":"bg-oYellow/40",action:()=>el("racing")}].map(e=>(0,t.jsxs)("button",{className:"tesla-card tesla-hover p-4 flex flex-col items-center justify-center space-y-3 shadow-soft group border border-hud",onClick:e.action,disabled:J,children:[(0,t.jsx)("div",{className:`${e.color} w-10 h-10 rounded-full flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform duration-500`,children:(0,t.jsx)(l.FontAwesomeIcon,{icon:e.icon,className:"text-hud-main text-sm"})}),(0,t.jsx)("span",{className:"text-xs font-black text-hud-main tracking-widest",children:e.label})]},e.id))})]}),I&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:I}),J&&(0,t.jsxs)("div",{className:"tesla-card p-10 text-center bg-hud-bg",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,className:"text-4xl text-oGreen mb-6 animate-soft-pulse"}),(0,t.jsx)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest mb-4",children:N("logbook.neuralProcessing")}),(0,t.jsx)("div",{className:"w-48 mx-auto bg-hud-elevated h-1 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:"bg-oGreen h-full animate-progress-indefinite rounded-full",style:{width:"40%"}})}),(0,t.jsxs)("p",{className:"text-hud-muted text-xs font-black uppercase mt-4 tracking-tighter italic",children:[N("logbook.processNode")," ",_]})]}),V&&!J&&(e=V.analysis&&"object"==typeof V.analysis?V.analysis:null,m="string"==typeof V.analysis?V.analysis:null,b=void 0!==V.settings&&!V.analysis,h=m||e?.text||e?.summary||V.aiAnalysis||("string"==typeof V.summary?V.summary:null)||b&&(V.settings?.analysis?.speech||V.course?.analysis?.speech)||null,g=V.speechText||("string"==typeof V.speech?V.speech:null)||e?.speech||(b?V.settings?.analysis?.speech||V.course?.analysis?.speech:null),f=Array.isArray(p=V.recommendations||e?.recommendations||(b&&V.settings?.adjustments?.length>0?V.settings.adjustments.map(e=>e.action||e.message||JSON.stringify(e)):null))?p:null,k=Array.isArray(v=V.insights||e?.expertAdvice)?v:null,y=V.data||V.weatherData||V.assessment||(b?{course:V.course,settings:V.settings}:null),(0,t.jsxs)("div",{className:"tesla-card p-6 shadow-xl animate-fade-in",children:[(0,t.jsxs)("div",{className:"flex items-center mb-6 border-b border-hud pb-4",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faChartLine,className:"text-oGreen mr-3 text-sm"}),(0,t.jsxs)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest",children:[N("logbook.operationReport")," ",_]})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[h&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 border-l-2 border-oBlue/30 shadow-subtle",children:[(0,t.jsx)("h5",{className:"text-xs font-black text-oBlue mb-3 uppercase tracking-widest",children:N("logbook.executiveSummary")}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-bold leading-relaxed italic normal-case",children:h})]}),(k||f)&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[k&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 shadow-subtle",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oBlue mb-3 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,className:"mr-2 text-xs"}),N("logbook.strategicInsights")]}),(0,t.jsx)("ul",{className:"space-y-2",children:k.map((e,o)=>{let s="string"==typeof e?e:e&&"object"==typeof e?e.text||e.message||e.insight||JSON.stringify(e):String(e);return(0,t.jsxs)("li",{className:"text-xs font-bold text-hud-secondary normal-case flex items-start",children:[(0,t.jsx)("span",{className:"text-oBlue mr-2 opacity-50",children:"›"}),s]},o)})})]}),f&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 shadow-subtle",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oGreen mb-3 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faChartLine,className:"mr-2 text-xs"}),N("logbook.operationalAdvice")]}),(0,t.jsx)("ul",{className:"space-y-2",children:f.map((e,o)=>{let s;return s="string"==typeof e?e:e&&"object"==typeof e?"string"==typeof e.message?e.message:e.message&&"object"==typeof e.message?e.message.message||e.text||e.action||JSON.stringify(e.message):e.text||e.action||JSON.stringify(e):String(e),(0,t.jsxs)("li",{className:"text-xs font-bold text-hud-secondary normal-case flex items-start",children:[(0,t.jsx)("span",{className:"text-oGreen mr-2 opacity-50",children:"✓"}),s]},o)})})]})]}),g&&(0,t.jsxs)("div",{className:"bg-oBlue/5 p-4 rounded-sm border border-oBlue/10 shadow-soft",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oBlue mb-2 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,className:"mr-2 animate-soft-pulse"}),N("logbook.voiceTelemetry")]}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-bold leading-relaxed italic normal-case",children:g})]}),y&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 border border-hud",children:[(0,t.jsx)("h5",{className:"text-xs font-black text-hud-secondary mb-3 uppercase tracking-widest",children:N("logbook.rawTelemetryData")}),(0,t.jsx)("pre",{className:"text-oGreen/70 text-xs font-mono overflow-auto max-h-40 font-bold scrollbar-thin",children:JSON.stringify(y,null,2)})]}),V.timestamp&&(0,t.jsxs)("div",{className:"text-hud-dim text-xs font-black text-right uppercase tracking-tighter",children:[N("logbook.generated")," ",new Date(V.timestamp).toLocaleString()," ","// OCEAROCORE V2.4"]})]})]})),!V&&!J&&(0,t.jsx)("div",{className:"tesla-card p-12 text-center bg-hud-bg shadow-inner border border-hud",children:(0,t.jsxs)("div",{className:"text-hud-muted",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faRobot,size:"3x",className:"mb-6 opacity-20"}),(0,t.jsx)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest mb-3",children:N("logbook.diagnosticReady")}),(0,t.jsx)("p",{className:"text-xs font-black uppercase tracking-tight max-w-xs mx-auto leading-relaxed",children:N("logbook.diagnosticReadyDesc")})]})})]})]},A)})}),M&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50",onClick:()=>K(!1),children:(0,t.jsxs)("div",{className:"bg-hud-bg backdrop-blur-xl rounded-3xl p-6 sm:p-8 max-w-md w-full mx-4 shadow-2xl border border-hud max-h-[90vh] overflow-y-auto",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,t.jsxs)("h3",{className:"text-xl font-black text-hud-main flex items-center tracking-tight",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faBook,className:"mr-3 text-oBlue"}),P?N("logbook.editEntry"):N("logbook.manualEntry")]}),(0,t.jsx)("button",{onClick:()=>K(!1),className:"w-10 h-10 rounded-full flex items-center justify-center text-hud-secondary hover:text-hud-main hover:bg-hud-elevated transition-all duration-300",children:(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faTimes,size:"lg"})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-black uppercase tracking-widest text-hud-secondary mb-2 flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faUser,className:"mr-2 text-oBlue"}),N("logbook.author")]}),(0,t.jsx)("input",{type:"text",value:W.author,onChange:e=>z({...W,author:e.target.value}),className:"w-full bg-hud-elevated text-hud-main px-4 py-3 rounded-xl border border-hud focus:border-oBlue focus:outline-none transition-all duration-300 font-bold",placeholder:N("logbook.authorPlaceholder")})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-black uppercase tracking-widest text-hud-secondary mb-2 flex items-center",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faStickyNote,className:"mr-2 text-oYellow"}),N("logbook.note")]}),(0,t.jsx)("textarea",{value:W.text,onChange:e=>z({...W,text:e.target.value}),className:"w-full bg-hud-elevated text-hud-main px-4 py-3 rounded-xl border border-hud focus:border-oBlue focus:outline-none transition-all duration-300 font-bold min-h-[120px]",placeholder:N("logbook.notePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-4 pt-6 border-t border-hud",children:[(0,t.jsx)("button",{onClick:()=>K(!1),className:"px-6 py-3 bg-hud-elevated hover:bg-hud-bg text-hud-main font-bold rounded-xl transition-all duration-300",children:N("logbook.cancel")}),(0,t.jsxs)("button",{onClick:es,className:"px-8 py-3 bg-oBlue hover:bg-oBlue/80 text-hud-main font-bold rounded-xl transition-all duration-300 flex items-center shadow-lg shadow-oBlue/20",children:[(0,t.jsx)(l.FontAwesomeIcon,{icon:n.faPlus,className:"mr-2"}),N("logbook.saveEntry")]})]})]})]})})]})}])},70127,e=>{e.n(e.i(76103))}]);
|