@idmwx/idmui-report 3.7.5 → 3.7.7

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.
@@ -1,4 +1,4 @@
1
- (function(Y,ae){typeof exports=="object"&&typeof module<"u"?ae(exports,require("@idm-plugin/geo"),require("moment"),require("vue"),require("echarts"),require("@wangeditor/editor-for-vue"),require("element-plus"),require("@idmui/tropical"),require("@element-plus/icons-vue"),require("axios"),require("mapbox-gl")):typeof define=="function"&&define.amd?define(["exports","@idm-plugin/geo","moment","vue","echarts","@wangeditor/editor-for-vue","element-plus","@idmui/tropical","@element-plus/icons-vue","axios","mapbox-gl"],ae):(Y=typeof globalThis<"u"?globalThis:Y||self,ae(Y["idmui-report"]={},Y["@idm-plugin/geo"],Y.moment,Y.Vue,Y.echarts,Y["@wangeditor/editor-for-vue"],Y["element-plus"],Y["@idmui/tropical"],Y["@element-plus/icons-vue"],Y.axios,Y["mapbox-gl"]))})(this,function(Y,ae,K,e,$c,qa,ua,Hc,Oa,Fa,hl){"use strict";function Mc(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return s.default=o,Object.freeze(s)}const Pa=Mc($c),TY="",Se=(o,s)=>{const t=o.__vccOpts||o;for(const[r,a]of s)t[r]=a;return t},Ic={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:String,default:""}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${(o?K(o):K()).utc().format(s)}`}}}},va=o=>(e.pushScopeId("data-v-b7008706"),o=o(),e.popScopeId(),o),Gc={class:"section brand-section flex-space"},Rc=e.createStaticVNode('<div class="logo-box flex-center" data-v-b7008706><div class="logo" data-v-b7008706><a href="https://fmp.idmwx.com" target="_blank" data-v-b7008706><img src="https://img.idmwx.com/asset/orm/logo_300x180.png" data-v-b7008706></a><a href="https://fmp.idmwx.com" target="_blank" style="text-decoration:none;" data-v-b7008706><div class="brand" data-v-b7008706><span style="text-decoration:underline;" data-v-b7008706>Weather Routing</span><div class="company" data-v-b7008706>Ocean Right Marine Service</div></div></a></div></div>',1),zc={class:"report-box flex-space"},Uc={class:"name flex-start"},Yc={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},Zc={class:"flex-start",style:{width:"100%"}},Qc={class:"label-block flex-evenly",style:{flex:"1"}},Jc=va(()=>e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),Kc={class:"flex-end",style:{flex:"2"}},jc=va(()=>e.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[e.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),e.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1));function uc(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",Gc,[Rc,e.createElementVNode("div",zc,[e.createElementVNode("div",Uc,e.toDisplayString(t.name),1),e.createElementVNode("div",Yc,[e.createElementVNode("div",Zc,[e.createElementVNode("div",Qc,[Jc,e.createElementVNode("span",Kc,e.toDisplayString(n.computeUTCTime(t.issued,"MMM-DD, YYYY")),1)])]),jc])])])}const Qo=Se(Ic,[["render",uc],["__scopeId","data-v-b7008706"]]),Xc={name:"IdmLoading",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"Loading..."}},emits:["timeout"],watch:{loading:{handler(){this.loading&&setTimeout(()=>{this.$emit("timeout",!1)},5e3)},immediate:!0}}},qc={key:0,class:"loading"},vc=e.createElementVNode("i",{class:"iconfont"},"",-1);function ei(o,s,t,r,a,n){return t.loading?(e.openBlock(),e.createElementBlock("div",qc,[vc,e.createElementVNode("div",null,e.toDisplayString(t.text),1)])):e.createCommentVNode("",!0)}const La=Se(Xc,[["render",ei]]),FY="",ti={name:"ORMPointReport",components:{IdmLoading:La,IdmBrand:Qo},props:{report:{type:Object,default:()=>({})},showPrate:{type:Boolean,default:!1},showAcc:{type:Boolean,default:!0}},data(){return{echart:void 0,localTZ:"0",loading:!0}},computed:{computeLat(){return function(o){return ae.LngLatHelper.lat2pretty(o,2)}},computeLng(){return function(o){return ae.LngLatHelper.lng2pretty(o,2)}},computeLTime(){return function(o,s=8,t="MMM-DD/HHmm[LT]"){return`${K(o).utcOffset(s).format(t)}`}},computeTZ(){return function(o="0"){return ae.LngLatHelper.prettyTimeZoneOffset(o)}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);height:1rem;width:1rem;margin-left:3px`}}},computeForm(){return function(o){var r,a,n,E,c,p,b,g,h,N;const s={};for(let D=0;D<((a=(r=o==null?void 0:o.extend)==null?void 0:r.data)==null?void 0:a.length);D++){const x=(n=o==null?void 0:o.extend)==null?void 0:n.data[D];if(D===0)x.precip.pacc=0;else{const C=(E=o==null?void 0:o.extend)==null?void 0:E.data[D-1],k=K(x.utc).utcOffset(this.localTZ),T=K(C.utc).utcOffset(this.localTZ),F=(c=C==null?void 0:C.precip)==null?void 0:c.prate,B=k.diff(T,"h"),w=this.roundPrecision(F*B,1);if(x.precip.pacc=w,w>0){const f=s[k.format("MMM-DD")],O=Math.floor(k.get("hour")/6);f?(f.pacc=this.roundPrecision(f.pacc+w,1),f[`${O}`]?f[`${O}`]+=w:(f[`${O}`]=w,f.colspan+=1)):(s[k.format("MMM-DD")]={pacc:w,colspan:1},s[k.format("MMM-DD")][`${O}`]=w)}}}o.paccInDays=s;let t=0;for(const D of Object.keys(s))t+=(p=s[D])==null?void 0:p.colspan,s[D].level=((b=s[D])==null?void 0:b.pacc)<10?"Light":((g=s[D])==null?void 0:g.pacc)<24.9?"Moderate":((h=s[D])==null?void 0:h.pacc)<49.9?"Heavy":((N=s[D])==null?void 0:N.pacc)<99.9?"Rainstorm":"HeavyRainstorm";return o.span=t,o}}},watch:{report:{handler(){var o,s,t,r;(s=(o=this.report)==null?void 0:o.extend)!=null&&s.data&&(this.loading=!1,this.localTZ=ae.LngLatHelper.guessTimeZoneOffset((t=this.report)==null?void 0:t.lng,(r=this.report)==null?void 0:r.lat),this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{initEchart(){var n,E,c;this.echart||(this.echart=e.markRaw(Pa.init(this.$refs.echart)));const o=[],s=[],t={dateTime:0,windSpeed:1,gusts:2,waveHeight:3,windDirection:4,windDegree:5,windScale:6,current:7,precip:8,visibility:9,temp:10};let r=4;(c=(E=(n=this.report)==null?void 0:n.extend)==null?void 0:E.data)==null||c.forEach(p=>{var g,h,N,D,x,C,k,T,F,B,w,f,O;const b=K(p.utc).utcOffset(this.localTZ).format("MMM-DD/HHmm[LT]");o.push(b),r=((h=(g=p.wave)==null?void 0:g.sig)==null?void 0:h.height)>r?(D=(N=p.wave)==null?void 0:N.sig)==null?void 0:D.height:r,s.push([b,(x=p.wind)==null?void 0:x.kts,(C=p.gusts)==null?void 0:C.kts,(T=(k=p.wave)==null?void 0:k.sig)==null?void 0:T.height,(F=p.wind)==null?void 0:F.direction,(B=p.wind)==null?void 0:B.degree,(w=p.wind)==null?void 0:w.scale,(f=p.current)==null?void 0:f.kts,(O=p.precip)==null?void 0:O.acc,this.roundPrecision(p.visibility/1852,0),p.temp])});const a={animation:!1,title:{text:"Weather Conditions",subtext:"Wind/Gusts/Sig.Wave/Visibility/Precip Acc",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},legend:{show:!0,right:0},tooltip:{trigger:"axis"},grid:{bottom:35},xAxis:[{data:o}],yAxis:[{name:"Precip Acc (mm)",nameLocation:"middle",position:"left",nameGap:30,axisLine:{lineStyle:{color:"#f85c5c"}}},{name:"Visibility (nm)",nameLocation:"middle",position:"left",offset:45,nameGap:30,axisLine:{lineStyle:{color:"#de8600"}}},{name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:25,max:r,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Wind Speed (kts)",nameLocation:"middle",position:"right",offset:40,nameGap:25,axisLine:{lineStyle:{color:"#0e6500"}}}],visualMap:{type:"piecewise",orient:"horizontal",left:"center",bottom:0,show:!1,pieces:[{gte:17,color:"#f85c5c",label:"≥ BF5"},{gte:11,lt:17,color:"#de8600",label:"BF4"},{lt:11,color:"#67c23a",label:"< BF4"}],seriesIndex:3,dimension:1},series:[{type:"bar",name:"Precip Acc",yAxisIndex:0,showSymbol:!1,encode:{x:t.dateTime,y:t.precip},lineStyle:{color:"#f85c5c",type:"solid"},itemStyle:{color:"#f85c5c"},data:s,z:4},{type:"line",name:"Visibility",yAxisIndex:1,showSymbol:!1,encode:{x:t.dateTime,y:t.visibility},lineStyle:{color:"#de8600",type:"solid"},itemStyle:{color:"#de8600"},data:s,z:3},{name:"Sig. Wave Height",type:"line",showSymbol:!1,yAxisIndex:2,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:2},{type:"line",name:"Gusts",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.gusts},lineStyle:{color:"#0e6500",type:"dashed"},itemStyle:{color:"#0e6500"},data:s,z:2}]};this.echart.setOption(a)}}},Ue=o=>(e.pushScopeId("data-v-84da66b8"),o=o(),e.popScopeId(),o),oi={class:"point-report"},li={class:"section info-section"},ai={class:"flex-evenly"},ni={class:"flex-space label-block",style:{width:"100%"}},si=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Position",-1)),ci={class:"flex-space label-block",style:{width:"100%"}},ii=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Issued (+00:00)",-1)),di={class:"flex-evenly"},ri={class:"flex-space label-block",style:{width:"100%"}},mi=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Timezone",-1)),pi={class:"flex-space label-block",style:{width:"100%"}},hi={class:"flex-end",style:{width:"180px"}},_i={class:"section echart-section"},Ei={ref:"echart",class:"echart"},yi={class:"section sample-section"},Ni=Ue(()=>e.createElementVNode("th",{rowspan:"2"},"Date Time",-1)),Vi=Ue(()=>e.createElementVNode("th",{colspan:"4"},"Wind",-1)),fi=Ue(()=>e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),bi=Ue(()=>e.createElementVNode("th",{colspan:"3"},"Swell",-1)),gi=Ue(()=>e.createElementVNode("th",{colspan:"3"},"Sig",-1)),xi=Ue(()=>e.createElementVNode("th",{colspan:"2"},"Current",-1)),ki=["colspan"],Di=Ue(()=>e.createElementVNode("th",{colspan:"1"},"Visibility",-1)),Ci=Ue(()=>e.createElementVNode("th",{colspan:"1"},"Temp",-1)),Si=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Bi=Ue(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),wi=Ue(()=>e.createElementVNode("th",null,"BF",-1)),Ai=Ue(()=>e.createElementVNode("th",null,"Gusts (kts)",-1)),Ti=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Fi=Ue(()=>e.createElementVNode("th",null,"Ht (m)",-1)),Oi=Ue(()=>e.createElementVNode("th",null,"Prd (s)",-1)),Pi=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Li=Ue(()=>e.createElementVNode("th",null,"Hgt (m)",-1)),Wi=Ue(()=>e.createElementVNode("th",null,"Prd (s)",-1)),$i=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Hi=Ue(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),Mi={key:0},Ii={key:1},Gi=Ue(()=>e.createElementVNode("th",null,"Dist (nm)",-1)),Ri=Ue(()=>e.createElementVNode("th",null,"°C",-1)),zi={width:"120px"},Ui={key:0,class:"degree-box"},Yi={key:1},Zi={key:0,class:"degree-box"},Qi={key:1},Ji={key:0,class:"degree-box"},Ki={key:1},ji={key:0,class:"degree-box"},ui={key:1},Xi={key:0},qi={key:1};function vi(o,s,t,r,a,n){var p,b,g,h;const E=e.resolveComponent("IdmBrand"),c=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",oi,[e.createVNode(E,{name:"Point Weather Forecast"}),e.createVNode(c,{loading:a.loading},null,8,["loading"]),e.createElementVNode("div",li,[e.createElementVNode("div",ai,[e.createElementVNode("div",ni,[si,e.createElementVNode("span",null,e.toDisplayString(n.computeLat((p=t.report)==null?void 0:p.lat).pretty)+" / "+e.toDisplayString(n.computeLng((b=t.report)==null?void 0:b.lng).pretty),1)]),e.createElementVNode("div",ci,[ii,e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,0,"YYYY, MMM-DD/HHmm[Z]")),1)])]),e.createElementVNode("div",di,[e.createElementVNode("div",ri,[mi,e.createElementVNode("span",null,e.toDisplayString(n.computeTZ(a.localTZ)),1)]),e.createElementVNode("div",pi,[e.createElementVNode("label",hi,"("+e.toDisplayString(n.computeTZ(a.localTZ))+")",1),e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,a.localTZ,"YYYY, MMM-DD/HHmm[LT]")),1)])])]),e.createElementVNode("div",_i,[e.createElementVNode("div",Ei,null,512)]),e.createElementVNode("div",yi,[e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[Ni,Vi,fi,bi,gi,xi,e.createElementVNode("th",{colspan:t.showPrate&&t.showAcc?2:1},"Precip",8,ki),Di,Ci]),e.createElementVNode("tr",null,[Si,Bi,wi,Ai,Ti,Fi,Oi,Pi,Li,Wi,$i,Hi,t.showPrate?(e.openBlock(),e.createElementBlock("th",Mi,"Rate (mm/h)")):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("th",Ii,"Acc (mm)")):e.createCommentVNode("",!0),Gi,Ri])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((h=(g=t.report)==null?void 0:g.extend)==null?void 0:h.data,(N,D)=>{var x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de;return e.openBlock(),e.createElementBlock("tr",{key:D},[e.createElementVNode("td",zi,e.toDisplayString(n.computeLTime(N.utc,a.localTZ)),1),e.createElementVNode("td",null,[(x=N.wind)!=null&&x.kts?(e.openBlock(),e.createElementBlock("span",Ui,[e.createTextVNode(e.toDisplayString((C=N.wind)==null?void 0:C.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((k=N.wind)==null?void 0:k.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Yi,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((T=N.wind)==null?void 0:T.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString((F=N.wind)==null?void 0:F.scale),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((B=N.gusts)==null?void 0:B.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((f=(w=N.wave)==null?void 0:w.wd)==null?void 0:f.height,1)),1),e.createElementVNode("td",null,[(I=(O=N.wave)==null?void 0:O.swell)!=null&&I.height?(e.openBlock(),e.createElementBlock("span",Zi,[e.createTextVNode(e.toDisplayString((R=(G=N.wave)==null?void 0:G.swell)==null?void 0:R.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((_=(z=N.wave)==null?void 0:z.swell)==null?void 0:_.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Qi,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((H=(L=N.wave)==null?void 0:L.swell)==null?void 0:H.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((P=(W=N.wave)==null?void 0:W.swell)==null?void 0:P.period,1)),1),e.createElementVNode("td",null,[(Q=(M=N.wave)==null?void 0:M.sig)!=null&&Q.height?(e.openBlock(),e.createElementBlock("span",Ji,[e.createTextVNode(e.toDisplayString((J=(U=N.wave)==null?void 0:U.sig)==null?void 0:J.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((se=(ne=N.wave)==null?void 0:ne.sig)==null?void 0:se.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Ki,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((u=(l=N.wave)==null?void 0:l.sig)==null?void 0:u.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ee=(v=N.wave)==null?void 0:v.sig)==null?void 0:ee.period,1)),1),e.createElementVNode("td",null,[(te=N.current)!=null&&te.kts?(e.openBlock(),e.createElementBlock("span",ji,[e.createTextVNode(e.toDisplayString((oe=N.current)==null?void 0:oe.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((le=N.current)==null?void 0:le.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",ui,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ce=N.current)==null?void 0:ce.kts,1)),1),t.showPrate?(e.openBlock(),e.createElementBlock("td",Xi,e.toDisplayString(n.roundPrecision((ie=N.precip)==null?void 0:ie.prate,2)),1)):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("td",qi,e.toDisplayString(n.roundPrecision((de=N.precip)==null?void 0:de.acc,2)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(N.visibility/1852,0)||"-"),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(N.temp,1)),1)])}),128))])])])])}const en=Se(ti,[["render",vi],["__scopeId","data-v-84da66b8"]]),ed={install(o){o.component("ORMPointReport",en)}},OY="",td={name:"IdmLng",props:{lng:{type:Number,default:void 0},label:{type:String,default:"Lng"}},data(){return{pretty:void 0}},watch:{lng:{handler(){if(this.lng!==void 0){const o=ae.LngLatHelper.convertToStdLng(this.lng);this.pretty=ae.LngLatHelper.lng2pretty(o).pretty}},immediate:!0}}},od={class:"lng-box"},ld={key:0};function ad(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",od,[t.label?(e.openBlock(),e.createElementBlock("span",ld,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(a.pretty),1)])}const Wa=Se(td,[["render",ad],["__scopeId","data-v-0d3c152f"]]),PY="",nd={name:"IdmLat",props:{lat:{type:Number,default:void 0},label:{type:String,default:"Lat"}},data(){return{pretty:void 0}},watch:{lat:{handler(){this.lat!==void 0&&(this.pretty=ae.LngLatHelper.lat2pretty(this.lat).pretty)},immediate:!0}}},sd={class:"lat-box"},cd={key:0};function id(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",sd,[t.label?(e.openBlock(),e.createElementBlock("span",cd,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(a.pretty),1)])}const $a=Se(nd,[["render",id],["__scopeId","data-v-3d953d12"]]),LY="",dd={name:"IdmEditor",components:{Editor:qa.Editor,Toolbar:qa.Toolbar},props:{height:{type:String,default:"200px"},modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{editorRef:null,editor:null,mode:"simple",valueHtml:void 0,editorConfig:{placeholder:"please input something..."},toolbarConfig:{toolbarKeys:["bold","color","bgColor","fontSize","lineHeight"]}}},watch:{disabled:{handler(o){var s,t;o?(s=this.editor)==null||s.disable():(t=this.editor)==null||t.enable()}},modelValue:{handler(){var o;this.valueHtml=this.modelValue,(o=this.editor)==null||o.setHtml(this.valueHtml)}}},methods:{handleCreated(o){var s;this.editorRef=e.shallowRef(),this.editor=Object.seal(o),this.valueHtml=this.modelValue,(s=this.editor)==null||s.setHtml(this.valueHtml),this.disabled?this.editor.disable():this.editor.enable()},handleChange(o){this.$emit("update:modelValue",this.valueHtml)},handleBlur(o){this.$emit("blur",this.valueHtml)},beforeDestroy(){var o;(o=this.editor)==null||o.destroy()}}},rd={class:"editor-box"};function md(o,s,t,r,a,n){const E=e.resolveComponent("Toolbar"),c=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",rd,[e.withDirectives(e.createVNode(E,{editor:a.editor,"default-config":a.toolbarConfig,mode:a.mode,class:"toolbar"},null,8,["editor","default-config","mode"]),[[e.vShow,!t.disabled]]),e.createVNode(c,{modelValue:a.valueHtml,"onUpdate:modelValue":s[0]||(s[0]=p=>a.valueHtml=p),"default-config":a.editorConfig,mode:a.mode,class:"editor",style:e.normalizeStyle({height:t.height}),onOnCreated:n.handleCreated,onOnChange:n.handleChange,onOnBlur:n.handleBlur},null,8,["modelValue","default-config","mode","style","onOnCreated","onOnChange","onOnBlur"])])}const Jo=Se(dd,[["render",md],["__scopeId","data-v-e3eb0d7a"]]),WY="",pd={name:"OrmRouteReport",components:{Lng:Wa,Lat:$a,Editor:Jo,Brand:Qo,Loading:La,ElTooltip:ua.ElTooltip},props:{plan:{type:Object,default:()=>({})},weatherPrinciple:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:"",echart:void 0,speedIndex:0,loading:!0}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${K(o).utc().format(s)}`}},computeLTime(){return function(o,s,t){let r=0;return t&&s&&(r=ae.LngLatHelper.guessTimeZoneOffset(s,t)),`${K(o).utcOffset(r).format("MMM-DD/HHmm")}LT`}},computeTimeDiff(){return function(o,s){var t,r,a,n,E;if(s===0)return"-";{const c=K((a=(r=(t=o==null?void 0:o.speeds)==null?void 0:t[s])==null?void 0:r.speed)==null?void 0:a.eta).diff(K((E=(n=o==null?void 0:o.speeds)==null?void 0:n[0])==null?void 0:E.speed.eta),"h",!0);return Math.round(c*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeMemo(){return function(o){return(o==null?void 0:o.memo)??"-"}},computeMajorPoints(){return function(o,s){const t=[];if(s.length)return s.forEach(r=>{t.push(r),r.suspend&&(o!=null&&o.useRouteParam)&&t.push({etd:r.etd,eta:r.etd,isResume:!0,memo:`Stoppage: ${r.suspend}hrs`})}),t}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);margin-left:3px;`}}},computeDay(){return function(o,s=0){var n,E,c,p;const t=(p=(c=(E=(n=o==null?void 0:o.speeds)==null?void 0:n[s])==null?void 0:E.speed)==null?void 0:c.sample)==null?void 0:p.hours,r=t[0],a=t[t.length-1];return Math.round(K(a.eta).diff(K(r.eta),"day",!0)*10)/10}}},watch:{plan:{handler(){var o,s;(o=this.plan)!=null&&o.id&&(this.loading=!1,this.advisory=((s=this.plan)==null?void 0:s.advisory)||"Pls find the following major waypoints for your safe navigation.",this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0},initEchart(){this.echart||(this.echart=e.markRaw(Pa.init(this.$refs.echart))),this.renderEchart()},renderEchart(){var p,b,g,h,N,D,x;const o=[],s=[],t={dateTime:0,windSpeed:1,waveHeight:2,windDirection:3,windDegree:4,windScale:5,currentFactor:6,weatherFactor:7,speed:8},r={};["W","WSW","SW","SSW","S","SSE","SE","ESE","E","ENE","NE","NNE","N","NNW","NW","WNW"].forEach((C,k)=>{r[C]=Math.PI/8*k});const n=18;let E=4;(D=(N=(h=(g=(b=(p=this.plan)==null?void 0:p.speeds)==null?void 0:b[this.speedIndex])==null?void 0:g.speed)==null?void 0:h.sample)==null?void 0:N.hours)==null||D.forEach(C=>{var T,F,B,w,f,O,I,G,R,z;const k=C.meteo;if(k){const _=K(k.utc).utc().format("MMM-DD/HHmm[Z]");o.push(_),E=Math.ceil(((F=(T=k.wave)==null?void 0:T.sig)==null?void 0:F.height)>E?(w=(B=k.wave)==null?void 0:B.sig)==null?void 0:w.height:E),s.push([_,(f=k.wind)==null?void 0:f.kts,(I=(O=k.wave)==null?void 0:O.sig)==null?void 0:I.height,(G=k.wind)==null?void 0:G.direction,(R=k.wind)==null?void 0:R.degree,(z=k.wind)==null?void 0:z.scale,C.cFactor,C.wFactor,C.speed])}});const c={animation:!1,title:{text:"Weather Conditions & Speed Analysis",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},tooltip:{trigger:"axis"},legend:{show:!0,right:0},grid:{bottom:40},xAxis:[{data:o,boundaryGap:!1}],yAxis:[{name:"Wind Speed (kts)",nameLocation:"middle",position:"left",nameGap:35,minInterval:5,axisLine:{lineStyle:{color:"#000000B3"}}},{type:"value",name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:35,max:E,min:0,minInterval:1,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Current Factor (kts)",nameLocation:"middle",position:"left",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#da2e2ecc"}},splitLine:{show:!0},alignTicks:!0},{name:"SOG (kts)",nameLocation:"middle",position:"right",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#398626"}},splitLine:{show:!0}}],visualMap:{show:!1,type:"piecewise",orient:"horizontal",left:"center",bottom:0,pieces:[{gte:22,color:"#f85c5c",label:"≥ BF6"},{gte:17,lt:22,color:"#de8600",label:"BF5"},{lt:17,color:"#67c23a",label:"≤ BF4"}],seriesIndex:2,dimension:1},series:[{name:"Sig. Wave Height",type:"line",showSymbol:!0,yAxisIndex:1,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!0,yAxisIndex:0,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#000000B3",type:"dashed"},itemStyle:{color:"#000000B3"},data:s,z:2},{type:"custom",yAxisIndex:0,renderItem:(C,k)=>{const T=k.coord([k.value(t.dateTime),k.value(t.windSpeed)]);return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-n/2,y:-n/2,width:n,height:n},rotation:r[k.value(t.windDirection)],position:T,style:k.style({stroke:"#555",lineWidth:1})}},encode:{x:t.dateTime,y:t.windSpeed},data:s,z:10},{name:"Current Factor",type:"line",yAxisIndex:2,showSymbol:!0,encode:{x:t.dateTime,y:t.currentFactor},lineStyle:{color:"#da2e2ecc",type:"dotted"},itemStyle:{color:"#da2e2ecc"},data:s,z:3},{name:"SOG",type:"line",yAxisIndex:3,showSymbol:!0,encode:{x:t.dateTime,y:t.speed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:4}]};(x=this.echart)==null||x.setOption(c)}}},Ve=o=>(e.pushScopeId("data-v-d9d4f04c"),o=o(),e.popScopeId(),o),hd={class:"voyage-plan"},_d={class:"plan-report"},Ed={class:"section voyage-section flex-space"},yd={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Nd={class:"flex-start label-block",style:{width:"100%"}},Vd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Prepare for",-1)),fd={style:{"text-transform":"uppercase"},class:"text-ellipsis"},bd={class:"flex-start label-block",style:{width:"100%"}},gd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Vessel",-1)),xd={class:"flex-end text-ellipsis",style:{"text-transform":"uppercase"}},kd={class:"flex-start label-block",style:{width:"100%"}},Dd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Voyage No.",-1)),Cd={class:"flex-end"},Sd={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Bd={class:"flex-start label-block",style:{width:"100%"}},wd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"From",-1)),Ad={key:0,class:"flex-end",style:{flex:"1"}},Td={key:1,class:"flex-end",style:{flex:"1"}},Fd=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Od={class:"flex-end",style:{width:"120px"}},Pd={class:"flex-space label-block",style:{width:"100%"}},Ld=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"To",-1)),Wd={key:0,class:"flex-end",style:{flex:"1"}},$d={key:1,class:"flex-end",style:{flex:"1"}},Hd=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Md={class:"flex-end",style:{width:"120px"}},Id={class:"flex-space label-block",style:{width:"100%"}},Gd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Load Condition",-1)),Rd={class:"flex-end",style:{"text-transform":"uppercase"}},zd={class:"section chart-section"},Ud=Ve(()=>e.createElementVNode("div",{class:"header-block flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Weather chart")],-1)),Yd={class:"flex-center"},Zd=["src"],Qd={class:"legends"},Jd=e.createStaticVNode('<div class="legend" data-v-d9d4f04c><label style="background-color:var(--idm-dangerous);" data-v-d9d4f04c></label><span data-v-d9d4f04c>Dangerous</span></div><div class="legend" data-v-d9d4f04c><label style="background-color:var(--idm-severe);" data-v-d9d4f04c></label><span data-v-d9d4f04c>Severe</span></div><div class="legend" data-v-d9d4f04c><label style="background-color:var(--idm-heavy);" data-v-d9d4f04c></label><span data-v-d9d4f04c>Heavy</span></div>',3),Kd={class:"legend"},jd=Ve(()=>e.createElementVNode("b",{class:"route1"},null,-1)),ud={key:0,class:"legend"},Xd=Ve(()=>e.createElementVNode("b",{class:"route2"},null,-1)),qd={key:1,class:"legend"},vd=Ve(()=>e.createElementVNode("b",{class:"route3"},null,-1)),er={key:1,class:"empty"},tr={class:"section comparison-section"},or={key:0},lr=Ve(()=>e.createElementVNode("th",{rowspan:"2",colspan:"2"},"Route",-1)),ar=Ve(()=>e.createElementVNode("th",null,"SPD (kts)",-1)),nr=Ve(()=>e.createElementVNode("th",{rowspan:"2"},"DTG (nm)",-1)),sr=Ve(()=>e.createElementVNode("th",null,"ETA (LT)",-1)),cr=Ve(()=>e.createElementVNode("th",{rowspan:"2"},"Diff (h)",-1)),ir=Ve(()=>e.createElementVNode("th",{colspan:"2"},"Cons (mt)",-1)),dr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Dangerous",-1)),rr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Severe",-1)),mr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Heavy",-1)),pr=Ve(()=>e.createElementVNode("th",null,"CP Cons (mt)",-1)),hr=Ve(()=>e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)",-1)),_r=Ve(()=>e.createElementVNode("th",null,"*FO",-1)),Er=Ve(()=>e.createElementVNode("th",null,"*DO",-1)),yr={colspan:"3"},Nr={rowspan:"2"},Vr={rowspan:"2"},fr={rowspan:"2"},br={rowspan:"2"},gr={rowspan:"2"},xr={rowspan:"2"},kr={rowspan:"2"},Dr={rowspan:"2"},Cr={rowspan:"2"},Sr=Ve(()=>e.createElementVNode("div",{class:"tips"},[e.createTextVNode(" * Please note the climatology data was used for days that extend beyond the available forecast."),e.createElementVNode("br"),e.createTextVNode(" * Fuel consumption was calculated only based on CP terms, and does not reflect actual consumption. ")],-1)),Br={class:"section waypoint-section"},wr={class:"header-block flex-start"},Ar=Ve(()=>e.createElementVNode("i",{class:"iconfont"},"",-1)),Tr={class:"title"},Fr={key:0,class:"flex-end",style:{flex:"1"}},Or=["onClick"],Pr={class:"advisory"},Lr=["innerHTML"],Wr={class:"major-waypoint"},$r=e.createStaticVNode('<div class="major-header" data-v-d9d4f04c><div class="cell-item flex" style="flex:1.5;" data-v-d9d4f04c>Major waypoint</div><div class="cell-item flex" data-v-d9d4f04c>Time</div><div class="cell-item flex" data-v-d9d4f04c>Nav</div><div class="cell-item flex" data-v-d9d4f04c>Dist</div><div class="cell-item flex" data-v-d9d4f04c>SOG/COG</div><div class="cell-item flex" data-v-d9d4f04c>Memo</div></div>',1),Hr={class:"major-body"},Mr={class:"cell-item flex",style:{flex:"1.5"}},Ir={key:0,class:"flex-center"},Gr={key:1,class:"flex-center"},Rr=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),zr={key:0},Ur={class:"cell-item flex"},Yr={key:0,class:"cell-item flex offset"},Zr={key:1,class:"cell-item flex nbsp"},Qr={key:2,class:"cell-item flex offset"},Jr={key:3,class:"cell-item flex nbsp"},Kr={key:4,class:"cell-item flex offset"},jr={key:5,class:"cell-item flex nbsp"},ur={key:6,class:"cell-item flex offset"},Xr={key:7,class:"cell-item flex nbsp"},qr={class:"section forecast-section"},vr={class:"header-block flex-start"},em=Ve(()=>e.createElementVNode("i",{class:"iconfont"},"",-1)),tm={class:"title"},om={key:0,class:"flex-end",style:{flex:"1"}},lm=["onClick"],am={class:"echart-block"},nm={ref:"echart",class:"echart"},sm=Ve(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("UTC")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),cm={class:"flex-center"},im=Ve(()=>e.createElementVNode("span",null,"/",-1)),dm={key:0,class:"degree-box"},rm={key:1},mm={key:0,class:"degree-box"},pm={key:1},hm={key:0,class:"degree-box"},_m={key:1},Em={key:0,class:"degree-box"},ym={key:1},Nm=Ve(()=>e.createElementVNode("div",{class:"tips",style:{"text-align":"justify"}},[e.createElementVNode("div",null,"The waypoints in this sheet are approximate positions."),e.createElementVNode("div",null," The route map is for reference only and should not be used for navigation. All the material is an advisory provided so as to assist the Master in making the final route decision. ")],-1));function Vm(o,s,t,r,a,n){var N,D,x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de,_e,X,me,Ee,ye,re,be,ge,xe,ke,De,Ce,Fe,Oe,Pe,Le,We,$e,He,Me,Ne,Ke,je,ue,A,Be,Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt,dt,rt,mt,pt,_t,Et,yt,Nt,Vt,ft,bt,gt,xt,kt,Dt,Ct,St,Bt,wt,At,Tt,Ft,Ot,Pt,no,so,co,io,ro,mo,po,ho,_o,Eo,yo,No,Vo,fo,bo,go,xo;const E=e.resolveComponent("Brand"),c=e.resolveComponent("Loading"),p=e.resolveComponent("Lat"),b=e.resolveComponent("Lng"),g=e.resolveComponent("ElTooltip"),h=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",hd,[e.createElementVNode("div",_d,[e.createVNode(E,{name:"Voyage Planning",issued:(N=t.plan)==null?void 0:N.updatedAt},null,8,["issued"]),e.createVNode(c,{loading:a.loading,onTimeout:s[0]||(s[0]=S=>a.loading=!1)},null,8,["loading"]),e.createElementVNode("div",Ed,[e.createElementVNode("div",yd,[e.createElementVNode("div",Nd,[Vd,e.createElementVNode("span",fd,e.toDisplayString((C=(x=(D=t.plan)==null?void 0:D.voyage)==null?void 0:x.company)==null?void 0:C.name),1)]),e.createElementVNode("div",bd,[gd,e.createElementVNode("span",xd,e.toDisplayString((F=(T=(k=t.plan)==null?void 0:k.voyage)==null?void 0:T.vessel)==null?void 0:F.name)+" ("+e.toDisplayString((O=(f=(w=(B=t.plan)==null?void 0:B.voyage)==null?void 0:w.vessel)==null?void 0:f.vesselType)==null?void 0:O.name)+")",1)]),e.createElementVNode("div",kd,[Dd,e.createElementVNode("span",Cd,e.toDisplayString((G=(I=t.plan)==null?void 0:I.voyage)==null?void 0:G.number),1)])]),e.createElementVNode("div",Sd,[e.createElementVNode("div",Bd,[wd,(_=(z=(R=t.plan)==null?void 0:R.leg)==null?void 0:z.departure)!=null&&_.name?(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString((H=(L=t.plan)==null?void 0:L.leg)==null?void 0:H.departure.name),1)):(e.openBlock(),e.createElementBlock("div",Td,[e.createVNode(p,{lat:(M=(P=(W=t.plan)==null?void 0:W.leg)==null?void 0:P.departure)==null?void 0:M.lat,label:""},null,8,["lat"]),Fd,e.createVNode(b,{lng:(J=(U=(Q=t.plan)==null?void 0:Q.leg)==null?void 0:U.departure)==null?void 0:J.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",Od,e.toDisplayString(n.computeUTCTime(((l=(se=(ne=t.plan)==null?void 0:ne.leg)==null?void 0:se.departure)==null?void 0:l.atd)||((ee=(v=(u=t.plan)==null?void 0:u.leg)==null?void 0:v.departure)==null?void 0:ee.etd)||((ce=(le=(oe=(te=t.plan)==null?void 0:te.speeds)==null?void 0:oe[a.speedIndex])==null?void 0:le.speed)==null?void 0:ce.etd),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Pd,[Ld,(_e=(de=(ie=t.plan)==null?void 0:ie.leg)==null?void 0:de.destination)!=null&&_e.name?(e.openBlock(),e.createElementBlock("span",Wd,e.toDisplayString((Ee=(me=(X=t.plan)==null?void 0:X.leg)==null?void 0:me.destination)==null?void 0:Ee.name),1)):(e.openBlock(),e.createElementBlock("div",$d,[e.createVNode(p,{lat:(be=(re=(ye=t.plan)==null?void 0:ye.leg)==null?void 0:re.destination)==null?void 0:be.lat,label:""},null,8,["lat"]),Hd,e.createVNode(b,{lng:(ke=(xe=(ge=t.plan)==null?void 0:ge.leg)==null?void 0:xe.destination)==null?void 0:ke.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",Md,e.toDisplayString(n.computeUTCTime(((Oe=(Fe=(Ce=(De=t.plan)==null?void 0:De.speeds)==null?void 0:Ce[a.speedIndex])==null?void 0:Fe.speed)==null?void 0:Oe.ata)||(($e=(We=(Le=(Pe=t.plan)==null?void 0:Pe.speeds)==null?void 0:Le[a.speedIndex])==null?void 0:We.speed)==null?void 0:$e.eta),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Id,[Gd,e.createElementVNode("span",Rd,e.toDisplayString((Me=(He=t.plan)==null?void 0:He.voyage)==null?void 0:Me.loadCondition),1)])])]),e.createElementVNode("div",zd,[Ud,(Ne=t.plan)!=null&&Ne.chartUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Yd,[e.createElementVNode("img",{src:t.plan.chartUrl},null,8,Zd)]),e.createElementVNode("div",Qd,[Jd,e.createElementVNode("div",Kd,[jd,e.createElementVNode("span",{class:"btn",onClick:s[1]||(s[1]=S=>{a.speedIndex=0,n.renderEchart()})},e.toDisplayString((Be=(A=(ue=(je=(Ke=t.plan)==null?void 0:Ke.speeds)==null?void 0:je[0])==null?void 0:ue.speed)==null?void 0:A.lane)==null?void 0:Be.name),1)]),((Xe=(Re=t.plan)==null?void 0:Re.speeds)==null?void 0:Xe.length)>1?(e.openBlock(),e.createElementBlock("div",ud,[Xd,e.createElementVNode("span",{class:"btn",onClick:s[2]||(s[2]=S=>{a.speedIndex=1,n.renderEchart()})},e.toDisplayString((m=(tt=(et=(ve=(qe=t.plan)==null?void 0:qe.speeds)==null?void 0:ve[1])==null?void 0:et.speed)==null?void 0:tt.lane)==null?void 0:m.name),1)])):e.createCommentVNode("",!0),((we=($=t.plan)==null?void 0:$.speeds)==null?void 0:we.length)>2?(e.openBlock(),e.createElementBlock("div",qd,[vd,e.createElementVNode("span",{class:"btn",onClick:s[3]||(s[3]=S=>{a.speedIndex=2,n.renderEchart()})},e.toDisplayString((ot=(Ye=(pe=(ze=(Ge=t.plan)==null?void 0:Ge.speeds)==null?void 0:ze[2])==null?void 0:pe.speed)==null?void 0:Ye.lane)==null?void 0:ot.name),1)])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock("div",er,[e.createElementVNode("span",null,[e.createTextVNode("Weather chart in cooking "),e.createElementVNode("span",{class:"btn",onClick:s[4]||(s[4]=(...S)=>n.handleRefresh&&n.handleRefresh(...S))},"Refresh"),e.createTextVNode(" later please")])]))]),e.createElementVNode("div",tr,[(dt=(lt=t.plan)==null?void 0:lt.speeds)!=null&&dt.length?(e.openBlock(),e.createElementBlock("table",or,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[lr,ar,nr,sr,cr,ir,e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(mt=(rt=t.weatherPrinciple)==null?void 0:rt.dangerous)==null?void 0:mt.pretty},{default:e.withCtx(()=>[dr]),_:1},8,["content"])]),e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(_t=(pt=t.weatherPrinciple)==null?void 0:pt.severe)==null?void 0:_t.pretty},{default:e.withCtx(()=>[rr]),_:1},8,["content"])]),e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(yt=(Et=t.weatherPrinciple)==null?void 0:Et.heavy)==null?void 0:yt.pretty},{default:e.withCtx(()=>[mr]),_:1},8,["content"])])]),e.createElementVNode("tr",null,[pr,hr,_r,Er,e.createElementVNode("th",yr,"*days (with in the next "+e.toDisplayString(n.computeDay(t.plan,0))+" days)",1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Nt=t.plan)==null?void 0:Nt.speeds,(S,Ie)=>{var at,nt,ht,Lt,Wt,$t,Ht,Mt,It,Gt,Rt,zt,Ut,Yt,Zt,Qt,Jt,Kt,jt,ut,Xt,qt,vt,eo,to,oo,lo;return e.openBlock(),e.createElementBlock(e.Fragment,{key:Ie},[e.createElementVNode("tr",null,[e.createElementVNode("td",Nr,e.toDisplayString(Ie+1),1),e.createElementVNode("td",Vr,e.toDisplayString((nt=(at=S.speed)==null?void 0:at.lane)==null?void 0:nt.name),1),e.createElementVNode("td",null,e.toDisplayString(`${((ht=S.speed)==null?void 0:ht.label)??"CP"} ${((Lt=S.speed)==null?void 0:Lt.v0)??(($t=(Wt=S.speed)==null?void 0:Wt.cpCopy)==null?void 0:$t.speed)}`),1),e.createElementVNode("td",fr,e.toDisplayString(n.roundPrecision((Ht=S.speed)==null?void 0:Ht.distance,0)),1),e.createElementVNode("td",null,[e.createElementVNode("b",null,e.toDisplayString(n.computeLTime((Mt=S.speed)==null?void 0:Mt.eta,(Rt=(Gt=(It=t.plan)==null?void 0:It.leg)==null?void 0:Gt.destination)==null?void 0:Rt.lng,(Yt=(Ut=(zt=t.plan)==null?void 0:zt.leg)==null?void 0:Ut.destination)==null?void 0:Yt.lat)),1),e.createTextVNode(" ["+e.toDisplayString(n.computeUTCTime((Zt=S.speed)==null?void 0:Zt.eta))+"] ",1)]),e.createElementVNode("td",br,e.toDisplayString(n.computeTimeDiff(t.plan,Ie)),1),e.createElementVNode("td",gr,e.toDisplayString(n.roundPrecision((Qt=S.speed)==null?void 0:Qt.totalFoCons,3)),1),e.createElementVNode("td",xr,e.toDisplayString(n.roundPrecision((Jt=S.speed)==null?void 0:Jt.totalDgoCons,3)),1),e.createElementVNode("td",kr,e.toDisplayString(n.roundPrecision(((Kt=S.speed)==null?void 0:Kt.dangerous)/24,1)),1),e.createElementVNode("td",Dr,e.toDisplayString(n.roundPrecision(((jt=S.speed)==null?void 0:jt.severe)/24,1)),1),e.createElementVNode("td",Cr,e.toDisplayString(n.roundPrecision(((ut=S.speed)==null?void 0:ut.heavy)/24,1)),1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,e.toDisplayString((qt=(Xt=S.speed)==null?void 0:Xt.cpCopy)==null?void 0:qt.fo)+" FO / "+e.toDisplayString((eo=(vt=S.speed)==null?void 0:vt.cpCopy)==null?void 0:eo.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((to=S.speed)==null?void 0:to.avgSpeed,2))+" / "+e.toDisplayString(n.roundPrecision((oo=S.speed)==null?void 0:oo.wxFactor,2))+" / "+e.toDisplayString(n.roundPrecision((lo=S.speed)==null?void 0:lo.cFactor,2)),1)])],64)}),128))])])):e.createCommentVNode("",!0),Sr]),e.createElementVNode("div",Br,[e.createElementVNode("div",wr,[Ar,e.createElementVNode("div",Tr,"Advisory & Major Waypoint of Route "+e.toDisplayString((gt=(bt=(ft=(Vt=t.plan.speeds)==null?void 0:Vt[a.speedIndex])==null?void 0:ft.speed)==null?void 0:bt.lane)==null?void 0:gt.name),1),((kt=(xt=t.plan)==null?void 0:xt.speeds)==null?void 0:kt.length)>1?(e.openBlock(),e.createElementBlock("div",Fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Dt=t.plan)==null?void 0:Dt.speeds,(S,Ie)=>{var at,nt;return e.openBlock(),e.createElementBlock("div",{class:"route-item",key:Ie,onClick:ht=>{a.speedIndex=Ie,n.renderEchart()}},e.toDisplayString((nt=(at=S.speed)==null?void 0:at.lane)==null?void 0:nt.name),9,Or)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pr,[a.editable?(e.openBlock(),e.createBlock(h,{key:0,modelValue:a.advisory,"onUpdate:modelValue":s[5]||(s[5]=S=>a.advisory=S),class:"editor",height:"120px",onBlur:s[6]||(s[6]=S=>n.handleCommit(S))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:s[7]||(s[7]=(...S)=>n.handleEdit&&n.handleEdit(...S)),innerHTML:a.advisory},null,40,Lr))]),e.createElementVNode("div",Wr,[$r,e.createElementVNode("div",Hr,[(St=(Ct=t.plan)==null?void 0:Ct.speeds)!=null&&St.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.computeMajorPoints((Tt=(At=(wt=(Bt=t.plan)==null?void 0:Bt.speeds)==null?void 0:wt[a.speedIndex])==null?void 0:At.speed)==null?void 0:Tt.argv,(so=(no=(Pt=(Ot=(Ft=t.plan)==null?void 0:Ft.speeds)==null?void 0:Ot[a.speedIndex])==null?void 0:Pt.speed)==null?void 0:no.sample)==null?void 0:so.wps),(S,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie,class:"cell-row"},[e.createElementVNode("div",Mr,[S.isResume?(e.openBlock(),e.createElementBlock("div",Ir,"Resume")):(e.openBlock(),e.createElementBlock("div",Gr,[e.createVNode(p,{lat:S.lat,label:""},null,8,["lat"]),Rr,e.createVNode(b,{lng:S.lng,label:""},null,8,["lng"]),S.pilot?(e.openBlock(),e.createElementBlock("span",zr," [P]")):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",Ur,e.toDisplayString(n.computeUTCTime(S.eta)),1),Ie?(e.openBlock(),e.createElementBlock("div",Yr,e.toDisplayString(n.computeNav(S)),1)):(e.openBlock(),e.createElementBlock("div",Zr)),Ie?(e.openBlock(),e.createElementBlock("div",Qr,e.toDisplayString(n.roundPrecision(S.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",Jr)),Ie?(e.openBlock(),e.createElementBlock("div",Kr,e.toDisplayString(n.roundPrecision(S.avgSpd??S.speed,2))+" / "+e.toDisplayString(n.roundPrecision(S.bearing,0)),1)):(e.openBlock(),e.createElementBlock("div",jr)),Ie?(e.openBlock(),e.createElementBlock("div",ur,e.toDisplayString(n.computeMemo(S)),1)):(e.openBlock(),e.createElementBlock("div",Xr))]))),128)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",qr,[(io=(co=t.plan)==null?void 0:co.speeds)!=null&&io.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",vr,[em,e.createElementVNode("div",tm," Weather Forecast for the Next "+e.toDisplayString(n.computeDay(t.plan,a.speedIndex))+" Days of Route "+e.toDisplayString((_o=(ho=(po=(mo=(ro=t.plan)==null?void 0:ro.speeds)==null?void 0:mo[a.speedIndex])==null?void 0:po.speed)==null?void 0:ho.lane)==null?void 0:_o.name),1),((yo=(Eo=t.plan)==null?void 0:Eo.speeds)==null?void 0:yo.length)>1?(e.openBlock(),e.createElementBlock("div",om,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((No=t.plan)==null?void 0:No.speeds,(S,Ie)=>{var at,nt;return e.openBlock(),e.createElementBlock("div",{class:"route-item",key:Ie,onClick:ht=>{a.speedIndex=Ie,n.renderEchart()}},e.toDisplayString((nt=(at=S==null?void 0:S.speed)==null?void 0:at.lane)==null?void 0:nt.name),9,lm)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",am,[e.createElementVNode("div",nm,null,512)]),e.createElementVNode("table",null,[sm,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xo=(go=(bo=(fo=(Vo=t.plan)==null?void 0:Vo.speeds)==null?void 0:fo[a.speedIndex])==null?void 0:bo.speed)==null?void 0:go.sample)==null?void 0:xo.hours,(S,Ie)=>{var at,nt,ht,Lt,Wt,$t,Ht,Mt,It,Gt,Rt,zt,Ut,Yt,Zt,Qt,Jt,Kt,jt,ut,Xt,qt,vt,eo,to,oo,lo,ko,Do,Co,So,Bo,wo,Ao,To,Fo,Oo,Po,Lo,Wo,$o,Ho,Mo,Io,Go,Ro,zo,Uo,Yo;return e.openBlock(),e.createElementBlock("tr",{key:Ie,class:e.normalizeClass(S.isDangerous?"dangerous":S.isSevere?"severe":S.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime(S.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",cm,[e.createVNode(p,{lat:S.lat,label:""},null,8,["lat"]),im,e.createVNode(b,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(nt=(at=S.meteo)==null?void 0:at.wind)!=null&&nt.kts?(e.openBlock(),e.createElementBlock("span",dm,[e.createTextVNode(e.toDisplayString((Lt=(ht=S.meteo)==null?void 0:ht.wind)==null?void 0:Lt.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree(($t=(Wt=S.meteo)==null?void 0:Wt.wind)==null?void 0:$t.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",rm,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Mt=(Ht=S.meteo)==null?void 0:Ht.wind)==null?void 0:Mt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Rt=(Gt=(It=S.meteo)==null?void 0:It.wave)==null?void 0:Gt.wd)==null?void 0:Rt.height,1)),1),e.createElementVNode("td",null,[(Yt=(Ut=(zt=S.meteo)==null?void 0:zt.wave)==null?void 0:Ut.swell)!=null&&Yt.height?(e.openBlock(),e.createElementBlock("span",mm,[e.createTextVNode(e.toDisplayString((Jt=(Qt=(Zt=S.meteo)==null?void 0:Zt.wave)==null?void 0:Qt.swell)==null?void 0:Jt.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((ut=(jt=(Kt=S.meteo)==null?void 0:Kt.wave)==null?void 0:jt.swell)==null?void 0:ut.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",pm,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((vt=(qt=(Xt=S.meteo)==null?void 0:Xt.wave)==null?void 0:qt.swell)==null?void 0:vt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((oo=(to=(eo=S.meteo)==null?void 0:eo.wave)==null?void 0:to.swell)==null?void 0:oo.period,1)),1),e.createElementVNode("td",null,[(Do=(ko=(lo=S.meteo)==null?void 0:lo.wave)==null?void 0:ko.sig)!=null&&Do.height?(e.openBlock(),e.createElementBlock("span",hm,[e.createTextVNode(e.toDisplayString((Bo=(So=(Co=S.meteo)==null?void 0:Co.wave)==null?void 0:So.sig)==null?void 0:Bo.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((To=(Ao=(wo=S.meteo)==null?void 0:wo.wave)==null?void 0:Ao.sig)==null?void 0:To.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",_m,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Po=(Oo=(Fo=S.meteo)==null?void 0:Fo.wave)==null?void 0:Oo.sig)==null?void 0:Po.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(($o=(Wo=(Lo=S.meteo)==null?void 0:Lo.wave)==null?void 0:Wo.sig)==null?void 0:$o.period,1)),1),e.createElementVNode("td",null,[(Mo=(Ho=S.meteo)==null?void 0:Ho.current)!=null&&Mo.kts?(e.openBlock(),e.createElementBlock("span",Em,[e.createTextVNode(e.toDisplayString((Go=(Io=S.meteo)==null?void 0:Io.current)==null?void 0:Go.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((zo=(Ro=S.meteo)==null?void 0:Ro.current)==null?void 0:zo.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",ym,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Yo=(Uo=S.meteo)==null?void 0:Uo.current)==null?void 0:Yo.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(S.cFactor,1)),1)],2)}),128))])])],64)):e.createCommentVNode("",!0),Nm])])])}const ja=Se(pd,[["render",Vm],["__scopeId","data-v-d9d4f04c"]]),$Y="",fm={name:"RouteReport",components:{Lng:Wa,Lat:$a,Editor:Jo},props:{plan:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:""}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${K(o).utc().format(s)}`}},computeLTime(){return function(o,s){const t=K(o);return t.utcOffset(s),`${t.format("MMM-DD/HHmm")}LT`}},computeUTCOffset(){var o,s,t,r,a;return(a=(r=(t=(s=(o=this.plan)==null?void 0:o.leg)==null?void 0:s.destination)==null?void 0:t.port)==null?void 0:r.timezone)==null?void 0:a.UtcCurrentOffset},computeTimeDiff(){return function(o,s){var t,r,a;if(s===0)return"-";{const n=K((r=(t=o==null?void 0:o.speeds[s])==null?void 0:t.speed)==null?void 0:r.eta).diff(K((a=o==null?void 0:o.speeds[0])==null?void 0:a.speed.eta),"h",!0);return Math.round(n*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeMapChart(){var o;return((o=this.plan)==null?void 0:o.chartUrl)||"//oss.idmwx.com/asset/route-report_example.png"},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);margin-left:3px;`}}},computeDay(){return function(o){var a,n,E;const s=(E=(n=(a=o==null?void 0:o.speeds[0])==null?void 0:a.speed)==null?void 0:n.sample)==null?void 0:E.hours,t=s[0],r=s[s.length-1];return K(r.eta).diff(K(t.eta),"day")}}},watch:{plan:{handler(){var o,s;(o=this.plan)!=null&&o.id&&(this.advisory=((s=this.plan)==null?void 0:s.advisory)||"Pls find the following major waypoints for your safe navigation.")},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0}}},Ze=o=>(e.pushScopeId("data-v-9a939466"),o=o(),e.popScopeId(),o),bm={class:"route-report"},gm=Ze(()=>e.createElementVNode("div",{class:"brand"},[e.createElementVNode("img",{class:"bgImg",src:"https://img.idmwx.com/asset/fli_bg.jpeg"})],-1)),xm={class:"section"},km=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Voyage Basics")],-1)),Dm={class:"section-body basics"},Cm={class:"flex-space section-row"},Sm={class:"flex-start"},Bm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Company Name",-1)),wm={class:"flex-start"},Am={class:"flex-start"},Tm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Departure Port",-1)),Fm={class:"flex-start flex"},Om={key:0,class:"flex"},Pm={key:1,class:"flex-space flex"},Lm=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Wm={class:"time flex"},$m={class:"flex-space section-row"},Hm={class:"flex-start"},Mm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Vessel Name",-1)),Im={class:"flex-start"},Gm={class:"flex-start"},Rm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Arrival Port",-1)),zm={class:"flex-start flex"},Um={key:0,class:"flex"},Ym={key:1,class:"flex-space"},Zm=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Qm={class:"time flex"},Jm={class:"flex-space section-row"},Km={class:"flex-start"},jm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Report Created",-1)),um={class:"flex-start"},Xm={class:"flex-start"},qm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Voyage Condition",-1)),vm={class:"flex-start flex"},ep={class:"section",style:{"border-bottom":"2px dashed var(--fli-border-color-dark)"}},tp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Details")],-1)),op={class:"section-body detail"},lp={class:"flex-space",style:{"align-items":"stretch"}},ap={class:"chart"},np=["src"],sp={key:1,class:"empty flex-center"},cp={class:"route flex",style:{"justify-content":"space-between"}},ip=Ze(()=>e.createElementVNode("div",{class:"title"},"ROUTE REMARKS",-1)),dp={class:"suggestion"},rp=["innerHTML"],mp={class:"flex-start legends"},pp=e.createStaticVNode('<div class="legend" data-v-9a939466><label style="background-color:var(--idm-severe);" data-v-9a939466></label><span data-v-9a939466>Dangerous</span></div><div class="legend" data-v-9a939466><label style="background-color:var(--idm-heavy);" data-v-9a939466></label><span data-v-9a939466>Severe</span></div><div class="legend" data-v-9a939466><b class="route1" data-v-9a939466></b><span data-v-9a939466>Route 1</span></div>',3),hp={key:0,class:"legend"},_p=[Ze(()=>e.createElementVNode("b",{class:"route2"},null,-1)),Ze(()=>e.createElementVNode("span",null,"Route 2",-1))],Ep={key:1,class:"legend"},yp=[Ze(()=>e.createElementVNode("b",{class:"route3"},null,-1)),Ze(()=>e.createElementVNode("span",null,"Route 3",-1))],Np={class:"section"},Vp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Summary")],-1)),fp={class:"section-body comparison"},bp={class:"container"},gp={key:0},xp=Ze(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr"),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Route"),e.createElementVNode("th",null,"TTL Dist (nm)"),e.createElementVNode("th",null,"SPD (kts)"),e.createElementVNode("th",null,"CP Cons (mt)"),e.createElementVNode("th",null,"ETA (UTC)"),e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)"),e.createElementVNode("th",null,"TTL Cons (mt)")])],-1)),kp={class:"section",style:{"page-break-inside":"avoid"}},Dp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Major Waypoint")],-1)),Cp={class:"section-body sample"},Sp={class:"major-waypoints"},Bp={class:"container"},wp=e.createStaticVNode('<div class="header" data-v-9a939466><div class="cell-item flexM" data-v-9a939466>Major waypoint</div><div class="cell-item flexL" data-v-9a939466>Name</div><div class="cell-item flex" data-v-9a939466>Time</div><div class="cell-item flex" data-v-9a939466>Nav</div><div class="cell-item flex" data-v-9a939466>Dist</div><div class="cell-item flex" data-v-9a939466>SOG</div></div>',1),Ap={class:"body"},Tp={class:"cell-item flexM"},Fp={class:"flex-center"},Op=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Pp={class:"cell-item flexL"},Lp={key:0,class:"flex-center"},Wp={key:1},$p={class:"cell-item flex"},Hp={key:0,class:"cell-item flex offset"},Mp={key:1,class:"cell-item flex nbsp"},Ip={key:2,class:"cell-item flex offset"},Gp={key:3,class:"cell-item flex nbsp"},Rp={key:4,class:"cell-item flex offset"},zp={key:5,class:"cell-item flex nbsp"},Up={class:"section"},Yp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Forecast")],-1)),Zp={class:"section-body sample"},Qp={key:0},Jp=Ze(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("(UTC)")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),Kp={class:"flex-center"},jp=Ze(()=>e.createElementVNode("span",null,"/",-1)),up={key:0,class:"degree-box"},Xp={key:1},qp={key:0,class:"degree-box"},vp={key:1},eh={key:0,class:"degree-box"},th={key:1},oh={key:0,class:"degree-box"},lh={key:1},ah=Ze(()=>e.createElementVNode("div",{class:"section"},[e.createElementVNode("div",{class:"section-body footer"},[e.createElementVNode("div",null,[e.createTextVNode("Fleet Insight Limited "),e.createElementVNode("a",{href:"mailto:ops@fltins.com"},"ops@fltins.com")]),e.createElementVNode("div",{style:{"font-size":"11px","margin-top":"10px"}}," The waypoints and route map provided are intended for informational purposes only and should not be relied upon for actual navigation. Fleet Insight Limited assumes no liability for any direct/potential damage to vessels or cargo that may occur as a result of using this voyage plan for exact navigation. ")])],-1));function nh(o,s,t,r,a,n){var b,g,h,N,D,x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de,_e,X,me,Ee,ye,re,be,ge,xe,ke,De,Ce,Fe,Oe,Pe,Le,We,$e,He,Me,Ne,Ke,je,ue;const E=e.resolveComponent("Lat"),c=e.resolveComponent("Lng"),p=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",bm,[gm,e.createElementVNode("div",xm,[km,e.createElementVNode("div",Dm,[e.createElementVNode("div",Cm,[e.createElementVNode("div",Sm,[Bm,e.createElementVNode("div",wm,e.toDisplayString((h=(g=(b=t.plan)==null?void 0:b.voyage)==null?void 0:g.company)==null?void 0:h.name),1)]),e.createElementVNode("div",Am,[Tm,e.createElementVNode("div",Fm,[(x=(D=(N=t.plan)==null?void 0:N.leg)==null?void 0:D.departure)!=null&&x.name?(e.openBlock(),e.createElementBlock("div",Om,e.toDisplayString((k=(C=t.plan)==null?void 0:C.leg)==null?void 0:k.departure.name),1)):(e.openBlock(),e.createElementBlock("div",Pm,[e.createVNode(E,{lat:(B=(F=(T=t.plan)==null?void 0:T.leg)==null?void 0:F.departure)==null?void 0:B.lat,label:""},null,8,["lat"]),Lm,e.createVNode(c,{lng:(O=(f=(w=t.plan)==null?void 0:w.leg)==null?void 0:f.departure)==null?void 0:O.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",Wm,e.toDisplayString(n.computeUTCTime(((R=(G=(I=t.plan)==null?void 0:I.leg)==null?void 0:G.departure)==null?void 0:R.atd)||((L=(_=(z=t.plan)==null?void 0:z.leg)==null?void 0:_.departure)==null?void 0:L.etd),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",$m,[e.createElementVNode("div",Hm,[Mm,e.createElementVNode("div",Im,e.toDisplayString((P=(W=(H=t.plan)==null?void 0:H.voyage)==null?void 0:W.vessel)==null?void 0:P.name),1)]),e.createElementVNode("div",Gm,[Rm,e.createElementVNode("div",zm,[(U=(Q=(M=t.plan)==null?void 0:M.leg)==null?void 0:Q.destination)!=null&&U.name?(e.openBlock(),e.createElementBlock("div",Um,e.toDisplayString((ne=(J=t.plan)==null?void 0:J.leg)==null?void 0:ne.destination.name),1)):(e.openBlock(),e.createElementBlock("div",Ym,[e.createVNode(E,{lat:(u=(l=(se=t.plan)==null?void 0:se.leg)==null?void 0:l.destination)==null?void 0:u.lat,label:""},null,8,["lat"]),Zm,e.createVNode(c,{lng:(te=(ee=(v=t.plan)==null?void 0:v.leg)==null?void 0:ee.destination)==null?void 0:te.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",Qm,e.toDisplayString(n.computeUTCTime(((ce=(le=(oe=t.plan)==null?void 0:oe.speeds)==null?void 0:le[0])==null?void 0:ce.speed.ata)||((de=(ie=t.plan)==null?void 0:ie.speeds)==null?void 0:de[0].speed.eta),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",Jm,[e.createElementVNode("div",Km,[jm,e.createElementVNode("div",um,e.toDisplayString(n.computeUTCTime((_e=t.plan)==null?void 0:_e.createdAt,"MMMM-DD, HHmm[Z]")),1)]),e.createElementVNode("div",Xm,[qm,e.createElementVNode("div",vm,[e.createElementVNode("div",null,e.toDisplayString((me=(X=t.plan)==null?void 0:X.voyage)==null?void 0:me.loadCondition),1)])])])])]),e.createElementVNode("div",ep,[tp,e.createElementVNode("div",op,[e.createElementVNode("div",lp,[e.createElementVNode("div",ap,[(Ee=t.plan)!=null&&Ee.chartUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:(ye=t.plan)==null?void 0:ye.chartUrl},null,8,np)):(e.openBlock(),e.createElementBlock("div",sp,[e.createTextVNode("waiting for weather map, "),e.createElementVNode("b",{onClick:s[0]||(s[0]=(...A)=>n.handleRefresh&&n.handleRefresh(...A))},"Refresh"),e.createTextVNode("later please")]))]),e.createElementVNode("div",cp,[e.createElementVNode("div",null,[ip,e.createElementVNode("div",dp,[a.editable?(e.openBlock(),e.createBlock(p,{key:0,modelValue:a.advisory,"onUpdate:modelValue":s[1]||(s[1]=A=>a.advisory=A),class:"editor",height:"120px",onBlur:s[2]||(s[2]=A=>n.handleCommit(A))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:s[3]||(s[3]=(...A)=>n.handleEdit&&n.handleEdit(...A)),innerHTML:a.advisory},null,40,rp))])]),e.createElementVNode("div",mp,[pp,((be=(re=t.plan)==null?void 0:re.speeds)==null?void 0:be.length)>1?(e.openBlock(),e.createElementBlock("div",hp,_p)):e.createCommentVNode("",!0),((xe=(ge=t.plan)==null?void 0:ge.speeds)==null?void 0:xe.length)>2?(e.openBlock(),e.createElementBlock("div",Ep,yp)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",Np,[Vp,e.createElementVNode("div",fp,[e.createElementVNode("div",bp,[(De=(ke=t.plan)==null?void 0:ke.speeds)!=null&&De.length?(e.openBlock(),e.createElementBlock("table",gp,[xp,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ce=t.plan)==null?void 0:Ce.speeds,(A,Be)=>{var Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt;return e.openBlock(),e.createElementBlock("tr",{key:Be},[e.createElementVNode("td",null,"Route "+e.toDisplayString(Be+1),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Re=A.speed)==null?void 0:Re.distance,0)),1),e.createElementVNode("td",null,e.toDisplayString(`${((Xe=A.speed)==null?void 0:Xe.label)??"CP"} ${((qe=A.speed)==null?void 0:qe.v0)??((et=(ve=A.speed)==null?void 0:ve.cpCopy)==null?void 0:et.speed)}`),1),e.createElementVNode("td",null,e.toDisplayString((m=(tt=A.speed)==null?void 0:tt.cpCopy)==null?void 0:m.fo)+" FO / "+e.toDisplayString((we=($=A.speed)==null?void 0:$.cpCopy)==null?void 0:we.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime((Ge=A.speed)==null?void 0:Ge.eta)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ze=A.speed)==null?void 0:ze.avgSpeed,2))+" / "+e.toDisplayString(n.roundPrecision((pe=A.speed)==null?void 0:pe.wxFactor,2))+" / "+e.toDisplayString(n.roundPrecision((Ye=A.speed)==null?void 0:Ye.cFactor,2)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ot=A.speed)==null?void 0:ot.totalFoCons,3))+" FO /"+e.toDisplayString(n.roundPrecision((lt=A.speed)==null?void 0:lt.totalDgoCons,3))+" DO",1)])}),128))])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",kp,[Dp,e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,[e.createElementVNode("div",Bp,[wp,e.createElementVNode("div",Ap,[(Oe=(Fe=t.plan)==null?void 0:Fe.speeds)!=null&&Oe.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(($e=(We=(Le=(Pe=t.plan)==null?void 0:Pe.speeds[0])==null?void 0:Le.speed)==null?void 0:We.sample)==null?void 0:$e.wps,(A,Be)=>(e.openBlock(),e.createElementBlock("div",{key:Be,class:"cell-row"},[e.createElementVNode("div",Tp,[e.createElementVNode("div",Fp,[e.createVNode(E,{lat:A.lat,label:""},null,8,["lat"]),Op,e.createVNode(c,{lng:A.lng,label:""},null,8,["lng"])])]),e.createElementVNode("div",Pp,[A.name?(e.openBlock(),e.createElementBlock("span",Lp,e.toDisplayString(A.name),1)):(e.openBlock(),e.createElementBlock("span",Wp,"-"))]),e.createElementVNode("div",$p,e.toDisplayString(n.computeUTCTime(A.eta)),1),Be?(e.openBlock(),e.createElementBlock("div",Hp,e.toDisplayString(n.computeNav(A)),1)):(e.openBlock(),e.createElementBlock("div",Mp)),Be?(e.openBlock(),e.createElementBlock("div",Ip,e.toDisplayString(n.roundPrecision(A.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",Gp)),Be?(e.openBlock(),e.createElementBlock("div",Rp,e.toDisplayString(n.roundPrecision(A.avgSpd??A.speed,1)),1)):(e.openBlock(),e.createElementBlock("div",zp))]))),128)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",Up,[Yp,e.createElementVNode("div",Zp,[(Me=(He=t.plan)==null?void 0:He.speeds)!=null&&Me.length?(e.openBlock(),e.createElementBlock("table",Qp,[Jp,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=(je=(Ke=(Ne=t.plan)==null?void 0:Ne.speeds[0])==null?void 0:Ke.speed)==null?void 0:je.sample)==null?void 0:ue.hours,(A,Be)=>{var Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt,dt,rt,mt,pt,_t,Et,yt,Nt,Vt,ft,bt,gt,xt,kt,Dt,Ct,St,Bt,wt,At,Tt,Ft,Ot,Pt;return e.openBlock(),e.createElementBlock("tr",{key:Be,class:e.normalizeClass(A.isDangerous?"dangerous":A.isSevere?"severe":A.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime(A.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",Kp,[e.createVNode(E,{lat:A.lat,label:""},null,8,["lat"]),jp,e.createVNode(c,{lng:A.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(Xe=(Re=A.meteo)==null?void 0:Re.wind)!=null&&Xe.kts?(e.openBlock(),e.createElementBlock("span",up,e.toDisplayString((ve=(qe=A.meteo)==null?void 0:qe.wind)==null?void 0:ve.direction),1)):(e.openBlock(),e.createElementBlock("span",Xp,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((tt=(et=A.meteo)==null?void 0:et.wind)==null?void 0:tt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((we=($=(m=A.meteo)==null?void 0:m.wave)==null?void 0:$.wd)==null?void 0:we.height,1)),1),e.createElementVNode("td",null,[(pe=(ze=(Ge=A.meteo)==null?void 0:Ge.wave)==null?void 0:ze.swell)!=null&&pe.height?(e.openBlock(),e.createElementBlock("span",qp,e.toDisplayString((lt=(ot=(Ye=A.meteo)==null?void 0:Ye.wave)==null?void 0:ot.swell)==null?void 0:lt.direction),1)):(e.openBlock(),e.createElementBlock("span",vp,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((mt=(rt=(dt=A.meteo)==null?void 0:dt.wave)==null?void 0:rt.swell)==null?void 0:mt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Et=(_t=(pt=A.meteo)==null?void 0:pt.wave)==null?void 0:_t.swell)==null?void 0:Et.period,1)),1),e.createElementVNode("td",null,[(Vt=(Nt=(yt=A.meteo)==null?void 0:yt.wave)==null?void 0:Nt.sig)!=null&&Vt.height?(e.openBlock(),e.createElementBlock("span",eh,e.toDisplayString((gt=(bt=(ft=A.meteo)==null?void 0:ft.wave)==null?void 0:bt.sig)==null?void 0:gt.direction),1)):(e.openBlock(),e.createElementBlock("span",th,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Dt=(kt=(xt=A.meteo)==null?void 0:xt.wave)==null?void 0:kt.sig)==null?void 0:Dt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Bt=(St=(Ct=A.meteo)==null?void 0:Ct.wave)==null?void 0:St.sig)==null?void 0:Bt.period,1)),1),e.createElementVNode("td",null,[(At=(wt=A.meteo)==null?void 0:wt.current)!=null&&At.kts?(e.openBlock(),e.createElementBlock("span",oh,e.toDisplayString((Ft=(Tt=A.meteo)==null?void 0:Tt.current)==null?void 0:Ft.direction)+" ",1)):(e.openBlock(),e.createElementBlock("span",lh,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Pt=(Ot=A.meteo)==null?void 0:Ot.current)==null?void 0:Pt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(A.cFactor,1)),1)],2)}),128))])])):e.createCommentVNode("",!0)])]),ah])}const tn=Se(fm,[["render",nh],["__scopeId","data-v-9a939466"]]),sh={install(o){o.component("RouteReport",ja),o.component("FliPlanReport",tn),o.component("OrmPlanReport",ja)}},ch={install(o){o.component("IdmEditor",Jo)}},ih={install(o){o.component("IdmLat",$a)}},dh={install(o){o.component("IdmLng",Wa)}},rh={name:"PiLogo",props:{fill:{type:String,default:"#000000"}}},mh={class:"logo"},ph={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1280.000000 1280.000000"},hh=["fill","fill-opacity"],_h=[e.createElementVNode("path",{d:`M4225 11533 c-100 -6 -311 -23 -335 -27 -14 -3 -59 -10 -100 -16
1
+ (function(Y,ae){typeof exports=="object"&&typeof module<"u"?ae(exports,require("@idm-plugin/geo"),require("moment"),require("vue"),require("echarts"),require("@wangeditor/editor-for-vue"),require("element-plus"),require("@idmui/tropical"),require("@element-plus/icons-vue"),require("axios"),require("mapbox-gl")):typeof define=="function"&&define.amd?define(["exports","@idm-plugin/geo","moment","vue","echarts","@wangeditor/editor-for-vue","element-plus","@idmui/tropical","@element-plus/icons-vue","axios","mapbox-gl"],ae):(Y=typeof globalThis<"u"?globalThis:Y||self,ae(Y["idmui-report"]={},Y["@idm-plugin/geo"],Y.moment,Y.Vue,Y.echarts,Y["@wangeditor/editor-for-vue"],Y["element-plus"],Y["@idmui/tropical"],Y["@element-plus/icons-vue"],Y.axios,Y["mapbox-gl"]))})(this,function(Y,ae,K,e,$c,qa,ua,Hc,Oa,Fa,hl){"use strict";function Mc(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return s.default=o,Object.freeze(s)}const Pa=Mc($c),TY="",Se=(o,s)=>{const t=o.__vccOpts||o;for(const[r,a]of s)t[r]=a;return t},Ic={name:"IdmBrand",props:{name:{type:String,default:""},issued:{type:String,default:""}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${(o?K(o):K()).utc().format(s)}`}}}},va=o=>(e.pushScopeId("data-v-b7008706"),o=o(),e.popScopeId(),o),Gc={class:"section brand-section flex-space"},Rc=e.createStaticVNode('<div class="logo-box flex-center" data-v-b7008706><div class="logo" data-v-b7008706><a href="https://fmp.idmwx.com" target="_blank" data-v-b7008706><img src="https://img.idmwx.com/asset/orm/logo_300x180.png" data-v-b7008706></a><a href="https://fmp.idmwx.com" target="_blank" style="text-decoration:none;" data-v-b7008706><div class="brand" data-v-b7008706><span style="text-decoration:underline;" data-v-b7008706>Weather Routing</span><div class="company" data-v-b7008706>Ocean Right Marine Service</div></div></a></div></div>',1),zc={class:"report-box flex-space"},Uc={class:"name flex-start"},Yc={class:"flex-start",style:{"flex-wrap":"wrap",width:"200px"}},Zc={class:"flex-start",style:{width:"100%"}},Qc={class:"label-block flex-evenly",style:{flex:"1"}},Jc=va(()=>e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Issued",-1)),Kc={class:"flex-end",style:{flex:"2"}},jc=va(()=>e.createElementVNode("div",{class:"flex-start",style:{width:"100%"}},[e.createElementVNode("div",{class:"label-block flex-evenly",style:{flex:"1"}},[e.createElementVNode("label",{class:"flex-end",style:{flex:"1"}},"Mail to"),e.createElementVNode("a",{class:"flex-end",style:{flex:"2"},href:"mailto:op@ormwx.com"},"op@ormwx.com")])],-1));function uc(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",Gc,[Rc,e.createElementVNode("div",zc,[e.createElementVNode("div",Uc,e.toDisplayString(t.name),1),e.createElementVNode("div",Yc,[e.createElementVNode("div",Zc,[e.createElementVNode("div",Qc,[Jc,e.createElementVNode("span",Kc,e.toDisplayString(n.computeUTCTime(t.issued,"MMM-DD, YYYY")),1)])]),jc])])])}const Qo=Se(Ic,[["render",uc],["__scopeId","data-v-b7008706"]]),Xc={name:"IdmLoading",props:{loading:{type:Boolean,default:!1},text:{type:String,default:"Loading..."}},emits:["timeout"],watch:{loading:{handler(){this.loading&&setTimeout(()=>{this.$emit("timeout",!1)},5e3)},immediate:!0}}},qc={key:0,class:"loading"},vc=e.createElementVNode("i",{class:"iconfont"},"",-1);function ei(o,s,t,r,a,n){return t.loading?(e.openBlock(),e.createElementBlock("div",qc,[vc,e.createElementVNode("div",null,e.toDisplayString(t.text),1)])):e.createCommentVNode("",!0)}const La=Se(Xc,[["render",ei]]),FY="",ti={name:"ORMPointReport",components:{IdmLoading:La,IdmBrand:Qo},props:{report:{type:Object,default:()=>({})},showPrate:{type:Boolean,default:!1},showAcc:{type:Boolean,default:!0}},data(){return{echart:void 0,localTZ:"0",loading:!0}},computed:{computeLat(){return function(o){return ae.LngLatHelper.lat2pretty(o,2)}},computeLng(){return function(o){return ae.LngLatHelper.lng2pretty(o,2)}},computeLTime(){return function(o,s=8,t="MMM-DD/HHmm[LT]"){return`${K(o).utcOffset(s).format(t)}`}},computeTZ(){return function(o="0"){return ae.LngLatHelper.prettyTimeZoneOffset(o)}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);height:1rem;width:1rem;margin-left:3px`}}},computeForm(){return function(o){var r,a,n,E,c,p,b,g,h,N;const s={};for(let D=0;D<((a=(r=o==null?void 0:o.extend)==null?void 0:r.data)==null?void 0:a.length);D++){const x=(n=o==null?void 0:o.extend)==null?void 0:n.data[D];if(D===0)x.precip.pacc=0;else{const C=(E=o==null?void 0:o.extend)==null?void 0:E.data[D-1],k=K(x.utc).utcOffset(this.localTZ),T=K(C.utc).utcOffset(this.localTZ),F=(c=C==null?void 0:C.precip)==null?void 0:c.prate,B=k.diff(T,"h"),w=this.roundPrecision(F*B,1);if(x.precip.pacc=w,w>0){const f=s[k.format("MMM-DD")],O=Math.floor(k.get("hour")/6);f?(f.pacc=this.roundPrecision(f.pacc+w,1),f[`${O}`]?f[`${O}`]+=w:(f[`${O}`]=w,f.colspan+=1)):(s[k.format("MMM-DD")]={pacc:w,colspan:1},s[k.format("MMM-DD")][`${O}`]=w)}}}o.paccInDays=s;let t=0;for(const D of Object.keys(s))t+=(p=s[D])==null?void 0:p.colspan,s[D].level=((b=s[D])==null?void 0:b.pacc)<10?"Light":((g=s[D])==null?void 0:g.pacc)<24.9?"Moderate":((h=s[D])==null?void 0:h.pacc)<49.9?"Heavy":((N=s[D])==null?void 0:N.pacc)<99.9?"Rainstorm":"HeavyRainstorm";return o.span=t,o}}},watch:{report:{handler(){var o,s,t,r;(s=(o=this.report)==null?void 0:o.extend)!=null&&s.data&&(this.loading=!1,this.localTZ=ae.LngLatHelper.guessTimeZoneOffset((t=this.report)==null?void 0:t.lng,(r=this.report)==null?void 0:r.lat),this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{initEchart(){var n,E,c;this.echart||(this.echart=e.markRaw(Pa.init(this.$refs.echart)));const o=[],s=[],t={dateTime:0,windSpeed:1,gusts:2,waveHeight:3,windDirection:4,windDegree:5,windScale:6,current:7,precip:8,visibility:9,temp:10};let r=4;(c=(E=(n=this.report)==null?void 0:n.extend)==null?void 0:E.data)==null||c.forEach(p=>{var g,h,N,D,x,C,k,T,F,B,w,f,O;const b=K(p.utc).utcOffset(this.localTZ).format("MMM-DD/HHmm[LT]");o.push(b),r=((h=(g=p.wave)==null?void 0:g.sig)==null?void 0:h.height)>r?(D=(N=p.wave)==null?void 0:N.sig)==null?void 0:D.height:r,s.push([b,(x=p.wind)==null?void 0:x.kts,(C=p.gusts)==null?void 0:C.kts,(T=(k=p.wave)==null?void 0:k.sig)==null?void 0:T.height,(F=p.wind)==null?void 0:F.direction,(B=p.wind)==null?void 0:B.degree,(w=p.wind)==null?void 0:w.scale,(f=p.current)==null?void 0:f.kts,(O=p.precip)==null?void 0:O.acc,this.roundPrecision(p.visibility/1852,0),p.temp])});const a={animation:!1,title:{text:"Weather Conditions",subtext:"Wind/Gusts/Sig.Wave/Visibility/Precip Acc",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},legend:{show:!0,right:0},tooltip:{trigger:"axis"},grid:{bottom:35},xAxis:[{data:o}],yAxis:[{name:"Precip Acc (mm)",nameLocation:"middle",position:"left",nameGap:30,axisLine:{lineStyle:{color:"#f85c5c"}}},{name:"Visibility (nm)",nameLocation:"middle",position:"left",offset:45,nameGap:30,axisLine:{lineStyle:{color:"#de8600"}}},{name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:25,max:r,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Wind Speed (kts)",nameLocation:"middle",position:"right",offset:40,nameGap:25,axisLine:{lineStyle:{color:"#0e6500"}}}],visualMap:{type:"piecewise",orient:"horizontal",left:"center",bottom:0,show:!1,pieces:[{gte:17,color:"#f85c5c",label:"≥ BF5"},{gte:11,lt:17,color:"#de8600",label:"BF4"},{lt:11,color:"#67c23a",label:"< BF4"}],seriesIndex:3,dimension:1},series:[{type:"bar",name:"Precip Acc",yAxisIndex:0,showSymbol:!1,encode:{x:t.dateTime,y:t.precip},lineStyle:{color:"#f85c5c",type:"solid"},itemStyle:{color:"#f85c5c"},data:s,z:4},{type:"line",name:"Visibility",yAxisIndex:1,showSymbol:!1,encode:{x:t.dateTime,y:t.visibility},lineStyle:{color:"#de8600",type:"solid"},itemStyle:{color:"#de8600"},data:s,z:3},{name:"Sig. Wave Height",type:"line",showSymbol:!1,yAxisIndex:2,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:2},{type:"line",name:"Gusts",showSymbol:!1,yAxisIndex:3,encode:{x:t.dateTime,y:t.gusts},lineStyle:{color:"#0e6500",type:"dashed"},itemStyle:{color:"#0e6500"},data:s,z:2}]};this.echart.setOption(a)}}},Ue=o=>(e.pushScopeId("data-v-84da66b8"),o=o(),e.popScopeId(),o),oi={class:"point-report"},li={class:"section info-section"},ai={class:"flex-evenly"},ni={class:"flex-space label-block",style:{width:"100%"}},si=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Position",-1)),ci={class:"flex-space label-block",style:{width:"100%"}},ii=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Issued (+00:00)",-1)),di={class:"flex-evenly"},ri={class:"flex-space label-block",style:{width:"100%"}},mi=Ue(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"180px"}},"Timezone",-1)),pi={class:"flex-space label-block",style:{width:"100%"}},hi={class:"flex-end",style:{width:"180px"}},_i={class:"section echart-section"},Ei={ref:"echart",class:"echart"},yi={class:"section sample-section"},Ni=Ue(()=>e.createElementVNode("th",{rowspan:"2"},"Date Time",-1)),Vi=Ue(()=>e.createElementVNode("th",{colspan:"4"},"Wind",-1)),fi=Ue(()=>e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")],-1)),bi=Ue(()=>e.createElementVNode("th",{colspan:"3"},"Swell",-1)),gi=Ue(()=>e.createElementVNode("th",{colspan:"3"},"Sig",-1)),xi=Ue(()=>e.createElementVNode("th",{colspan:"2"},"Current",-1)),ki=["colspan"],Di=Ue(()=>e.createElementVNode("th",{colspan:"1"},"Visibility",-1)),Ci=Ue(()=>e.createElementVNode("th",{colspan:"1"},"Temp",-1)),Si=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Bi=Ue(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),wi=Ue(()=>e.createElementVNode("th",null,"BF",-1)),Ai=Ue(()=>e.createElementVNode("th",null,"Gusts (kts)",-1)),Ti=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Fi=Ue(()=>e.createElementVNode("th",null,"Ht (m)",-1)),Oi=Ue(()=>e.createElementVNode("th",null,"Prd (s)",-1)),Pi=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Li=Ue(()=>e.createElementVNode("th",null,"Hgt (m)",-1)),Wi=Ue(()=>e.createElementVNode("th",null,"Prd (s)",-1)),$i=Ue(()=>e.createElementVNode("th",null,"Dir",-1)),Hi=Ue(()=>e.createElementVNode("th",null,"Speed (kts)",-1)),Mi={key:0},Ii={key:1},Gi=Ue(()=>e.createElementVNode("th",null,"Dist (nm)",-1)),Ri=Ue(()=>e.createElementVNode("th",null,"°C",-1)),zi={width:"120px"},Ui={key:0,class:"degree-box"},Yi={key:1},Zi={key:0,class:"degree-box"},Qi={key:1},Ji={key:0,class:"degree-box"},Ki={key:1},ji={key:0,class:"degree-box"},ui={key:1},Xi={key:0},qi={key:1};function vi(o,s,t,r,a,n){var p,b,g,h;const E=e.resolveComponent("IdmBrand"),c=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",oi,[e.createVNode(E,{name:"Point Weather Forecast"}),e.createVNode(c,{loading:a.loading},null,8,["loading"]),e.createElementVNode("div",li,[e.createElementVNode("div",ai,[e.createElementVNode("div",ni,[si,e.createElementVNode("span",null,e.toDisplayString(n.computeLat((p=t.report)==null?void 0:p.lat).pretty)+" / "+e.toDisplayString(n.computeLng((b=t.report)==null?void 0:b.lng).pretty),1)]),e.createElementVNode("div",ci,[ii,e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,0,"YYYY, MMM-DD/HHmm[Z]")),1)])]),e.createElementVNode("div",di,[e.createElementVNode("div",ri,[mi,e.createElementVNode("span",null,e.toDisplayString(n.computeTZ(a.localTZ)),1)]),e.createElementVNode("div",pi,[e.createElementVNode("label",hi,"("+e.toDisplayString(n.computeTZ(a.localTZ))+")",1),e.createElementVNode("span",null,e.toDisplayString(n.computeLTime(t.report.updatedAt,a.localTZ,"YYYY, MMM-DD/HHmm[LT]")),1)])])]),e.createElementVNode("div",_i,[e.createElementVNode("div",Ei,null,512)]),e.createElementVNode("div",yi,[e.createElementVNode("table",null,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[Ni,Vi,fi,bi,gi,xi,e.createElementVNode("th",{colspan:t.showPrate&&t.showAcc?2:1},"Precip",8,ki),Di,Ci]),e.createElementVNode("tr",null,[Si,Bi,wi,Ai,Ti,Fi,Oi,Pi,Li,Wi,$i,Hi,t.showPrate?(e.openBlock(),e.createElementBlock("th",Mi,"Rate (mm/h)")):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("th",Ii,"Acc (mm)")):e.createCommentVNode("",!0),Gi,Ri])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((h=(g=t.report)==null?void 0:g.extend)==null?void 0:h.data,(N,D)=>{var x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de;return e.openBlock(),e.createElementBlock("tr",{key:D},[e.createElementVNode("td",zi,e.toDisplayString(n.computeLTime(N.utc,a.localTZ)),1),e.createElementVNode("td",null,[(x=N.wind)!=null&&x.kts?(e.openBlock(),e.createElementBlock("span",Ui,[e.createTextVNode(e.toDisplayString((C=N.wind)==null?void 0:C.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((k=N.wind)==null?void 0:k.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Yi,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((T=N.wind)==null?void 0:T.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString((F=N.wind)==null?void 0:F.scale),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((B=N.gusts)==null?void 0:B.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((f=(w=N.wave)==null?void 0:w.wd)==null?void 0:f.height,1)),1),e.createElementVNode("td",null,[(I=(O=N.wave)==null?void 0:O.swell)!=null&&I.height?(e.openBlock(),e.createElementBlock("span",Zi,[e.createTextVNode(e.toDisplayString((R=(G=N.wave)==null?void 0:G.swell)==null?void 0:R.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((_=(z=N.wave)==null?void 0:z.swell)==null?void 0:_.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Qi,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((H=(L=N.wave)==null?void 0:L.swell)==null?void 0:H.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((P=(W=N.wave)==null?void 0:W.swell)==null?void 0:P.period,1)),1),e.createElementVNode("td",null,[(Q=(M=N.wave)==null?void 0:M.sig)!=null&&Q.height?(e.openBlock(),e.createElementBlock("span",Ji,[e.createTextVNode(e.toDisplayString((J=(U=N.wave)==null?void 0:U.sig)==null?void 0:J.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((se=(ne=N.wave)==null?void 0:ne.sig)==null?void 0:se.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",Ki,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((u=(l=N.wave)==null?void 0:l.sig)==null?void 0:u.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ee=(v=N.wave)==null?void 0:v.sig)==null?void 0:ee.period,1)),1),e.createElementVNode("td",null,[(te=N.current)!=null&&te.kts?(e.openBlock(),e.createElementBlock("span",ji,[e.createTextVNode(e.toDisplayString((oe=N.current)==null?void 0:oe.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((le=N.current)==null?void 0:le.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",ui,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ce=N.current)==null?void 0:ce.kts,1)),1),t.showPrate?(e.openBlock(),e.createElementBlock("td",Xi,e.toDisplayString(n.roundPrecision((ie=N.precip)==null?void 0:ie.prate,2)),1)):e.createCommentVNode("",!0),t.showAcc?(e.openBlock(),e.createElementBlock("td",qi,e.toDisplayString(n.roundPrecision((de=N.precip)==null?void 0:de.acc,2)),1)):e.createCommentVNode("",!0),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(N.visibility/1852,0)||"-"),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(N.temp,1)),1)])}),128))])])])])}const en=Se(ti,[["render",vi],["__scopeId","data-v-84da66b8"]]),ed={install(o){o.component("ORMPointReport",en)}},OY="",td={name:"IdmLng",props:{lng:{type:Number,default:void 0},label:{type:String,default:"Lng"}},data(){return{pretty:void 0}},watch:{lng:{handler(){if(this.lng!==void 0){const o=ae.LngLatHelper.convertToStdLng(this.lng);this.pretty=ae.LngLatHelper.lng2pretty(o).pretty}},immediate:!0}}},od={class:"lng-box"},ld={key:0};function ad(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",od,[t.label?(e.openBlock(),e.createElementBlock("span",ld,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(a.pretty),1)])}const Wa=Se(td,[["render",ad],["__scopeId","data-v-0d3c152f"]]),PY="",nd={name:"IdmLat",props:{lat:{type:Number,default:void 0},label:{type:String,default:"Lat"}},data(){return{pretty:void 0}},watch:{lat:{handler(){this.lat!==void 0&&(this.pretty=ae.LngLatHelper.lat2pretty(this.lat).pretty)},immediate:!0}}},sd={class:"lat-box"},cd={key:0};function id(o,s,t,r,a,n){return e.openBlock(),e.createElementBlock("div",sd,[t.label?(e.openBlock(),e.createElementBlock("span",cd,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",null,e.toDisplayString(a.pretty),1)])}const $a=Se(nd,[["render",id],["__scopeId","data-v-3d953d12"]]),LY="",dd={name:"IdmEditor",components:{Editor:qa.Editor,Toolbar:qa.Toolbar},props:{height:{type:String,default:"200px"},modelValue:{type:String,default:()=>""},disabled:{type:Boolean,default:()=>!1}},data(){return{editorRef:null,editor:null,mode:"simple",valueHtml:void 0,editorConfig:{placeholder:"please input something..."},toolbarConfig:{toolbarKeys:["bold","color","bgColor","fontSize","lineHeight"]}}},watch:{disabled:{handler(o){var s,t;o?(s=this.editor)==null||s.disable():(t=this.editor)==null||t.enable()}},modelValue:{handler(){var o;this.valueHtml=this.modelValue,(o=this.editor)==null||o.setHtml(this.valueHtml)}}},methods:{handleCreated(o){var s;this.editorRef=e.shallowRef(),this.editor=Object.seal(o),this.valueHtml=this.modelValue,(s=this.editor)==null||s.setHtml(this.valueHtml),this.disabled?this.editor.disable():this.editor.enable()},handleChange(o){this.$emit("update:modelValue",this.valueHtml)},handleBlur(o){this.$emit("blur",this.valueHtml)},beforeDestroy(){var o;(o=this.editor)==null||o.destroy()}}},rd={class:"editor-box"};function md(o,s,t,r,a,n){const E=e.resolveComponent("Toolbar"),c=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",rd,[e.withDirectives(e.createVNode(E,{editor:a.editor,"default-config":a.toolbarConfig,mode:a.mode,class:"toolbar"},null,8,["editor","default-config","mode"]),[[e.vShow,!t.disabled]]),e.createVNode(c,{modelValue:a.valueHtml,"onUpdate:modelValue":s[0]||(s[0]=p=>a.valueHtml=p),"default-config":a.editorConfig,mode:a.mode,class:"editor",style:e.normalizeStyle({height:t.height}),onOnCreated:n.handleCreated,onOnChange:n.handleChange,onOnBlur:n.handleBlur},null,8,["modelValue","default-config","mode","style","onOnCreated","onOnChange","onOnBlur"])])}const Jo=Se(dd,[["render",md],["__scopeId","data-v-e3eb0d7a"]]),WY="",pd={name:"OrmRouteReport",components:{Lng:Wa,Lat:$a,Editor:Jo,Brand:Qo,Loading:La,ElTooltip:ua.ElTooltip},props:{plan:{type:Object,default:()=>({})},weatherPrinciple:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:"",echart:void 0,speedIndex:0,loading:!0}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${K(o).utc().format(s)}`}},computeLTime(){return function(o,s,t){let r=0;return t&&s&&(r=ae.LngLatHelper.guessTimeZoneOffset(s,t)),`${K(o).utcOffset(r).format("MMM-DD/HHmm")}LT`}},computeTimeDiff(){return function(o,s){var t,r,a,n,E;if(s===0)return"-";{const c=K((a=(r=(t=o==null?void 0:o.speeds)==null?void 0:t[s])==null?void 0:r.speed)==null?void 0:a.eta).diff(K((E=(n=o==null?void 0:o.speeds)==null?void 0:n[0])==null?void 0:E.speed.eta),"h",!0);return Math.round(c*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeMemo(){return function(o){return(o==null?void 0:o.memo)??"-"}},computeMajorPoints(){return function(o,s){const t=[];if(s.length)return s.forEach(r=>{t.push(r),r.suspend&&(o!=null&&o.useRouteParam)&&t.push({etd:r.etd,eta:r.etd,isResume:!0,memo:`Stoppage: ${r.suspend}hrs`})}),t}},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);margin-left:3px;`}}},computeDay(){return function(o,s=0){var n,E,c,p;const t=(p=(c=(E=(n=o==null?void 0:o.speeds)==null?void 0:n[s])==null?void 0:E.speed)==null?void 0:c.sample)==null?void 0:p.hours,r=t[0],a=t[t.length-1];return Math.round(K(a.eta).diff(K(r.eta),"day",!0)*10)/10}}},watch:{plan:{handler(){var o,s;(o=this.plan)!=null&&o.id&&(this.loading=!1,this.advisory=((s=this.plan)==null?void 0:s.advisory)||"Pls find the following major waypoints for your safe navigation.",this.$nextTick(()=>{this.initEchart()}))},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0},initEchart(){this.echart||(this.echart=e.markRaw(Pa.init(this.$refs.echart))),this.renderEchart()},renderEchart(){var p,b,g,h,N,D,x;const o=[],s=[],t={dateTime:0,windSpeed:1,waveHeight:2,windDirection:3,windDegree:4,windScale:5,currentFactor:6,weatherFactor:7,speed:8},r={};["W","WSW","SW","SSW","S","SSE","SE","ESE","E","ENE","NE","NNE","N","NNW","NW","WNW"].forEach((C,k)=>{r[C]=Math.PI/8*k});const n=18;let E=4;(D=(N=(h=(g=(b=(p=this.plan)==null?void 0:p.speeds)==null?void 0:b[this.speedIndex])==null?void 0:g.speed)==null?void 0:h.sample)==null?void 0:N.hours)==null||D.forEach(C=>{var T,F,B,w,f,O,I,G,R,z;const k=C.meteo;if(k){const _=K(k.utc).utc().format("MMM-DD/HHmm[Z]");o.push(_),E=Math.ceil(((F=(T=k.wave)==null?void 0:T.sig)==null?void 0:F.height)>E?(w=(B=k.wave)==null?void 0:B.sig)==null?void 0:w.height:E),s.push([_,(f=k.wind)==null?void 0:f.kts,(I=(O=k.wave)==null?void 0:O.sig)==null?void 0:I.height,(G=k.wind)==null?void 0:G.direction,(R=k.wind)==null?void 0:R.degree,(z=k.wind)==null?void 0:z.scale,C.cFactor,C.wFactor,C.speed])}});const c={animation:!1,title:{text:"Weather Conditions & Speed Analysis",textStyle:{color:"#000000B3",fontWeight:"500"},left:"left"},tooltip:{trigger:"axis"},legend:{show:!0,right:0},grid:{bottom:40},xAxis:[{data:o,boundaryGap:!1}],yAxis:[{name:"Wind Speed (kts)",nameLocation:"middle",position:"left",nameGap:35,minInterval:5,axisLine:{lineStyle:{color:"#000000B3"}}},{type:"value",name:"Sig. Wave Height (m)",nameLocation:"middle",position:"right",nameGap:35,max:E,min:0,minInterval:1,axisLine:{lineStyle:{color:"#015DD5"}},splitLine:{show:!1}},{name:"Current Factor (kts)",nameLocation:"middle",position:"left",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#da2e2ecc"}},splitLine:{show:!0},alignTicks:!0},{name:"SOG (kts)",nameLocation:"middle",position:"right",offset:50,nameGap:35,axisLine:{lineStyle:{color:"#398626"}},splitLine:{show:!0}}],visualMap:{show:!1,type:"piecewise",orient:"horizontal",left:"center",bottom:0,pieces:[{gte:22,color:"#f85c5c",label:"≥ BF6"},{gte:17,lt:22,color:"#de8600",label:"BF5"},{lt:17,color:"#67c23a",label:"≤ BF4"}],seriesIndex:2,dimension:1},series:[{name:"Sig. Wave Height",type:"line",showSymbol:!0,yAxisIndex:1,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,global:!1,colorStops:[{offset:0,color:"rgba(88, 160, 253, 1)"},{offset:.5,color:"rgba(88, 160, 253, 0.7)"},{offset:1,color:"rgba(88, 160, 253, 0)"}]}},lineStyle:{color:"rgba(88, 160, 253, 1)"},itemStyle:{color:"rgba(88, 160, 253, 1)"},encode:{x:t.dateTime,y:t.waveHeight},data:s,z:1},{name:"Wind Speed",type:"line",showSymbol:!0,yAxisIndex:0,encode:{x:t.dateTime,y:t.windSpeed},lineStyle:{color:"#000000B3",type:"dashed"},itemStyle:{color:"#000000B3"},data:s,z:2},{type:"custom",yAxisIndex:0,renderItem:(C,k)=>{const T=k.coord([k.value(t.dateTime),k.value(t.windSpeed)]);return{type:"path",shape:{pathData:"M31 16l-15-15v9h-26v12h26v9z",x:-n/2,y:-n/2,width:n,height:n},rotation:r[k.value(t.windDirection)],position:T,style:k.style({stroke:"#555",lineWidth:1})}},encode:{x:t.dateTime,y:t.windSpeed},data:s,z:10},{name:"Current Factor",type:"line",yAxisIndex:2,showSymbol:!0,encode:{x:t.dateTime,y:t.currentFactor},lineStyle:{color:"#da2e2ecc",type:"dotted"},itemStyle:{color:"#da2e2ecc"},data:s,z:3},{name:"SOG",type:"line",yAxisIndex:3,showSymbol:!0,encode:{x:t.dateTime,y:t.speed},lineStyle:{color:"#398626",type:"solid"},itemStyle:{color:"#398626"},data:s,z:4}]};(x=this.echart)==null||x.setOption(c)}}},Ve=o=>(e.pushScopeId("data-v-7d56124f"),o=o(),e.popScopeId(),o),hd={class:"voyage-plan"},_d={class:"plan-report"},Ed={class:"section voyage-section flex-space"},yd={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Nd={class:"flex-start label-block",style:{width:"100%"}},Vd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Prepare for",-1)),fd={style:{"text-transform":"uppercase"},class:"text-ellipsis"},bd={class:"flex-start label-block",style:{width:"100%"}},gd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Vessel",-1)),xd={class:"flex-end text-ellipsis",style:{"text-transform":"uppercase"}},kd={class:"flex-start label-block",style:{width:"100%"}},Dd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Voyage No.",-1)),Cd={class:"flex-end"},Sd={class:"flex-end",style:{width:"50%","flex-wrap":"wrap"}},Bd={class:"flex-start label-block",style:{width:"100%"}},wd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"From",-1)),Ad={key:0,class:"flex-end",style:{flex:"1"}},Td={key:1,class:"flex-end",style:{flex:"1"}},Fd=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Od={class:"flex-end",style:{width:"120px"}},Pd={class:"flex-space label-block",style:{width:"100%"}},Ld=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"To",-1)),Wd={key:0,class:"flex-end",style:{flex:"1"}},$d={key:1,class:"flex-end",style:{flex:"1"}},Hd=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Md={class:"flex-end",style:{width:"120px"}},Id={class:"flex-space label-block",style:{width:"100%"}},Gd=Ve(()=>e.createElementVNode("label",{class:"flex-end",style:{width:"140px"}},"Load Condition",-1)),Rd={class:"flex-end",style:{"text-transform":"uppercase"}},zd={class:"section chart-section"},Ud=Ve(()=>e.createElementVNode("div",{class:"header-block flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Weather chart")],-1)),Yd={class:"flex-center"},Zd=["src"],Qd={class:"legends"},Jd=e.createStaticVNode('<div class="legend" data-v-7d56124f><label style="background-color:var(--idm-dangerous);" data-v-7d56124f></label><span data-v-7d56124f>Dangerous</span></div><div class="legend" data-v-7d56124f><label style="background-color:var(--idm-severe);" data-v-7d56124f></label><span data-v-7d56124f>Severe</span></div><div class="legend" data-v-7d56124f><label style="background-color:var(--idm-heavy);" data-v-7d56124f></label><span data-v-7d56124f>Heavy</span></div>',3),Kd={class:"legend"},jd=Ve(()=>e.createElementVNode("b",{class:"route1"},null,-1)),ud={key:0,class:"legend"},Xd=Ve(()=>e.createElementVNode("b",{class:"route2"},null,-1)),qd={key:1,class:"legend"},vd=Ve(()=>e.createElementVNode("b",{class:"route3"},null,-1)),er={key:1,class:"empty"},tr={class:"section comparison-section"},or={key:0},lr=Ve(()=>e.createElementVNode("th",{rowspan:"2",colspan:"2"},"Route",-1)),ar=Ve(()=>e.createElementVNode("th",null,"SPD (kts)",-1)),nr=Ve(()=>e.createElementVNode("th",{rowspan:"2"},"DTG (nm)",-1)),sr=Ve(()=>e.createElementVNode("th",null,"ETA (LT)",-1)),cr=Ve(()=>e.createElementVNode("th",{rowspan:"2"},"Diff (h)",-1)),ir=Ve(()=>e.createElementVNode("th",{colspan:"2"},"Cons (mt)",-1)),dr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Dangerous",-1)),rr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Severe",-1)),mr=Ve(()=>e.createElementVNode("p",{style:{cursor:"pointer"}},"Heavy",-1)),pr=Ve(()=>e.createElementVNode("th",null,"CP Cons (mt)",-1)),hr=Ve(()=>e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)",-1)),_r=Ve(()=>e.createElementVNode("th",null,"*FO",-1)),Er=Ve(()=>e.createElementVNode("th",null,"*DO",-1)),yr={colspan:"3"},Nr={rowspan:"2"},Vr={rowspan:"2"},fr={rowspan:"2"},br={rowspan:"2"},gr={rowspan:"2"},xr={rowspan:"2"},kr={rowspan:"2"},Dr={rowspan:"2"},Cr={rowspan:"2"},Sr=Ve(()=>e.createElementVNode("div",{class:"tips"},[e.createTextVNode(" * Please note the climatology data was used for days that extend beyond the available forecast."),e.createElementVNode("br"),e.createTextVNode(" * Fuel consumption was calculated only based on CP terms, and does not reflect actual consumption. ")],-1)),Br={class:"section waypoint-section"},wr={class:"header-block flex-start"},Ar=Ve(()=>e.createElementVNode("i",{class:"iconfont"},"",-1)),Tr={class:"title"},Fr={key:0,class:"flex-end",style:{flex:"1"}},Or=["onClick"],Pr={class:"advisory"},Lr=["innerHTML"],Wr={class:"major-waypoint"},$r=e.createStaticVNode('<div class="major-header" data-v-7d56124f><div class="cell-item flex" style="flex:1.5;" data-v-7d56124f>Major waypoint</div><div class="cell-item flex" data-v-7d56124f>Time</div><div class="cell-item flex" data-v-7d56124f>Nav</div><div class="cell-item flex" data-v-7d56124f>Dist</div><div class="cell-item flex" data-v-7d56124f>SOG/COG</div><div class="cell-item flex" data-v-7d56124f>Memo</div></div>',1),Hr={class:"major-body"},Mr={class:"cell-item flex",style:{flex:"1.5"}},Ir={key:0,class:"flex-center"},Gr={key:1,class:"flex-center"},Rr=Ve(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),zr={key:0},Ur={class:"cell-item flex"},Yr={key:0,class:"cell-item flex offset"},Zr={key:1,class:"cell-item flex nbsp"},Qr={key:2,class:"cell-item flex offset"},Jr={key:3,class:"cell-item flex nbsp"},Kr={key:4,class:"cell-item flex offset"},jr={key:5,class:"cell-item flex nbsp"},ur={key:6,class:"cell-item flex offset"},Xr={key:7,class:"cell-item flex nbsp"},qr={class:"section forecast-section"},vr={class:"header-block flex-start"},em=Ve(()=>e.createElementVNode("i",{class:"iconfont"},"",-1)),tm={class:"title"},om={key:0,class:"flex-end",style:{flex:"1"}},lm=["onClick"],am={class:"echart-block"},nm={ref:"echart",class:"echart"},sm=Ve(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("UTC")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),cm={class:"flex-center"},im=Ve(()=>e.createElementVNode("span",null,"/",-1)),dm={key:0,class:"degree-box"},rm={key:1},mm={key:0,class:"degree-box"},pm={key:1},hm={key:0,class:"degree-box"},_m={key:1},Em={key:0,class:"degree-box"},ym={key:1},Nm=Ve(()=>e.createElementVNode("div",{class:"tips",style:{"text-align":"justify"}},[e.createElementVNode("div",null,"The waypoints in this sheet are approximate positions."),e.createElementVNode("div",null," The route map is for reference only and should not be used for navigation. All the material is an advisory provided so as to assist the Master in making the final route decision. ")],-1));function Vm(o,s,t,r,a,n){var N,D,x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de,_e,X,me,Ee,ye,re,be,ge,xe,ke,De,Ce,Fe,Oe,Pe,Le,We,$e,He,Me,Ne,Ke,je,ue,A,Be,Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt,dt,rt,mt,pt,_t,Et,yt,Nt,Vt,ft,bt,gt,xt,kt,Dt,Ct,St,Bt,wt,At,Tt,Ft,Ot,Pt,no,so,co,io,ro,mo,po,ho,_o,Eo,yo,No,Vo,fo,bo,go,xo;const E=e.resolveComponent("Brand"),c=e.resolveComponent("Loading"),p=e.resolveComponent("Lat"),b=e.resolveComponent("Lng"),g=e.resolveComponent("ElTooltip"),h=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",hd,[e.createElementVNode("div",_d,[e.createVNode(E,{name:"Voyage Planning",issued:(N=t.plan)==null?void 0:N.updatedAt},null,8,["issued"]),e.createVNode(c,{loading:a.loading,onTimeout:s[0]||(s[0]=S=>a.loading=!1)},null,8,["loading"]),e.createElementVNode("div",Ed,[e.createElementVNode("div",yd,[e.createElementVNode("div",Nd,[Vd,e.createElementVNode("span",fd,e.toDisplayString((C=(x=(D=t.plan)==null?void 0:D.voyage)==null?void 0:x.company)==null?void 0:C.name),1)]),e.createElementVNode("div",bd,[gd,e.createElementVNode("span",xd,e.toDisplayString((F=(T=(k=t.plan)==null?void 0:k.voyage)==null?void 0:T.vessel)==null?void 0:F.name)+" ("+e.toDisplayString((O=(f=(w=(B=t.plan)==null?void 0:B.voyage)==null?void 0:w.vessel)==null?void 0:f.vesselType)==null?void 0:O.name)+")",1)]),e.createElementVNode("div",kd,[Dd,e.createElementVNode("span",Cd,e.toDisplayString((G=(I=t.plan)==null?void 0:I.voyage)==null?void 0:G.number),1)])]),e.createElementVNode("div",Sd,[e.createElementVNode("div",Bd,[wd,(_=(z=(R=t.plan)==null?void 0:R.leg)==null?void 0:z.departure)!=null&&_.name?(e.openBlock(),e.createElementBlock("span",Ad,e.toDisplayString((H=(L=t.plan)==null?void 0:L.leg)==null?void 0:H.departure.name),1)):(e.openBlock(),e.createElementBlock("div",Td,[e.createVNode(p,{lat:(M=(P=(W=t.plan)==null?void 0:W.leg)==null?void 0:P.departure)==null?void 0:M.lat,label:""},null,8,["lat"]),Fd,e.createVNode(b,{lng:(J=(U=(Q=t.plan)==null?void 0:Q.leg)==null?void 0:U.departure)==null?void 0:J.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",Od,e.toDisplayString(n.computeUTCTime(((l=(se=(ne=t.plan)==null?void 0:ne.leg)==null?void 0:se.departure)==null?void 0:l.atd)||((ee=(v=(u=t.plan)==null?void 0:u.leg)==null?void 0:v.departure)==null?void 0:ee.etd)||((ce=(le=(oe=(te=t.plan)==null?void 0:te.speeds)==null?void 0:oe[a.speedIndex])==null?void 0:le.speed)==null?void 0:ce.etd),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Pd,[Ld,(_e=(de=(ie=t.plan)==null?void 0:ie.leg)==null?void 0:de.destination)!=null&&_e.name?(e.openBlock(),e.createElementBlock("span",Wd,e.toDisplayString((Ee=(me=(X=t.plan)==null?void 0:X.leg)==null?void 0:me.destination)==null?void 0:Ee.name),1)):(e.openBlock(),e.createElementBlock("div",$d,[e.createVNode(p,{lat:(be=(re=(ye=t.plan)==null?void 0:ye.leg)==null?void 0:re.destination)==null?void 0:be.lat,label:""},null,8,["lat"]),Hd,e.createVNode(b,{lng:(ke=(xe=(ge=t.plan)==null?void 0:ge.leg)==null?void 0:xe.destination)==null?void 0:ke.lng,label:""},null,8,["lng"])])),e.createElementVNode("span",Md,e.toDisplayString(n.computeUTCTime(((Oe=(Fe=(Ce=(De=t.plan)==null?void 0:De.speeds)==null?void 0:Ce[a.speedIndex])==null?void 0:Fe.speed)==null?void 0:Oe.ata)||(($e=(We=(Le=(Pe=t.plan)==null?void 0:Pe.speeds)==null?void 0:Le[a.speedIndex])==null?void 0:We.speed)==null?void 0:$e.eta),"MMM-DD/HHmm[Z]")),1)]),e.createElementVNode("div",Id,[Gd,e.createElementVNode("span",Rd,e.toDisplayString((Me=(He=t.plan)==null?void 0:He.voyage)==null?void 0:Me.loadCondition),1)])])]),e.createElementVNode("div",zd,[Ud,(Ne=t.plan)!=null&&Ne.chartUrl?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Yd,[e.createElementVNode("img",{src:t.plan.chartUrl},null,8,Zd)]),e.createElementVNode("div",Qd,[Jd,e.createElementVNode("div",Kd,[jd,e.createElementVNode("span",{class:"btn",onClick:s[1]||(s[1]=S=>{a.speedIndex=0,n.renderEchart()})},e.toDisplayString((Be=(A=(ue=(je=(Ke=t.plan)==null?void 0:Ke.speeds)==null?void 0:je[0])==null?void 0:ue.speed)==null?void 0:A.lane)==null?void 0:Be.name),1)]),((Xe=(Re=t.plan)==null?void 0:Re.speeds)==null?void 0:Xe.length)>1?(e.openBlock(),e.createElementBlock("div",ud,[Xd,e.createElementVNode("span",{class:"btn",onClick:s[2]||(s[2]=S=>{a.speedIndex=1,n.renderEchart()})},e.toDisplayString((m=(tt=(et=(ve=(qe=t.plan)==null?void 0:qe.speeds)==null?void 0:ve[1])==null?void 0:et.speed)==null?void 0:tt.lane)==null?void 0:m.name),1)])):e.createCommentVNode("",!0),((we=($=t.plan)==null?void 0:$.speeds)==null?void 0:we.length)>2?(e.openBlock(),e.createElementBlock("div",qd,[vd,e.createElementVNode("span",{class:"btn",onClick:s[3]||(s[3]=S=>{a.speedIndex=2,n.renderEchart()})},e.toDisplayString((ot=(Ye=(pe=(ze=(Ge=t.plan)==null?void 0:Ge.speeds)==null?void 0:ze[2])==null?void 0:pe.speed)==null?void 0:Ye.lane)==null?void 0:ot.name),1)])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createElementBlock("div",er,[e.createElementVNode("span",null,[e.createTextVNode("Weather chart in cooking "),e.createElementVNode("span",{class:"btn",onClick:s[4]||(s[4]=(...S)=>n.handleRefresh&&n.handleRefresh(...S))},"Refresh"),e.createTextVNode(" later please")])]))]),e.createElementVNode("div",tr,[(dt=(lt=t.plan)==null?void 0:lt.speeds)!=null&&dt.length?(e.openBlock(),e.createElementBlock("table",or,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[lr,ar,nr,sr,cr,ir,e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(mt=(rt=t.weatherPrinciple)==null?void 0:rt.dangerous)==null?void 0:mt.pretty},{default:e.withCtx(()=>[dr]),_:1},8,["content"])]),e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(_t=(pt=t.weatherPrinciple)==null?void 0:pt.severe)==null?void 0:_t.pretty},{default:e.withCtx(()=>[rr]),_:1},8,["content"])]),e.createElementVNode("th",null,[e.createVNode(g,{effect:"light",placement:"top",trigger:"hover",width:300,content:(yt=(Et=t.weatherPrinciple)==null?void 0:Et.heavy)==null?void 0:yt.pretty},{default:e.withCtx(()=>[mr]),_:1},8,["content"])])]),e.createElementVNode("tr",null,[pr,hr,_r,Er,e.createElementVNode("th",yr,"*days (with in the next "+e.toDisplayString(n.computeDay(t.plan,0))+" days)",1)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Nt=t.plan)==null?void 0:Nt.speeds,(S,Ie)=>{var at,nt,ht,Lt,Wt,$t,Ht,Mt,It,Gt,Rt,zt,Ut,Yt,Zt,Qt,Jt,Kt,jt,ut,Xt,qt,vt,eo,to,oo,lo;return e.openBlock(),e.createElementBlock(e.Fragment,{key:Ie},[e.createElementVNode("tr",null,[e.createElementVNode("td",Nr,e.toDisplayString(Ie+1),1),e.createElementVNode("td",Vr,e.toDisplayString((nt=(at=S.speed)==null?void 0:at.lane)==null?void 0:nt.name),1),e.createElementVNode("td",null,e.toDisplayString(`${((ht=S.speed)==null?void 0:ht.label)??"CP"} ${((Lt=S.speed)==null?void 0:Lt.v0)??(($t=(Wt=S.speed)==null?void 0:Wt.cpCopy)==null?void 0:$t.speed)}`),1),e.createElementVNode("td",fr,e.toDisplayString(n.roundPrecision((Ht=S.speed)==null?void 0:Ht.distance,0)),1),e.createElementVNode("td",null,[e.createElementVNode("b",null,e.toDisplayString(n.computeLTime((Mt=S.speed)==null?void 0:Mt.eta,(Rt=(Gt=(It=t.plan)==null?void 0:It.leg)==null?void 0:Gt.destination)==null?void 0:Rt.lng,(Yt=(Ut=(zt=t.plan)==null?void 0:zt.leg)==null?void 0:Ut.destination)==null?void 0:Yt.lat)),1),e.createTextVNode(" ["+e.toDisplayString(n.computeUTCTime((Zt=S.speed)==null?void 0:Zt.eta))+"] ",1)]),e.createElementVNode("td",br,e.toDisplayString(n.computeTimeDiff(t.plan,Ie)),1),e.createElementVNode("td",gr,e.toDisplayString(n.roundPrecision((Qt=S.speed)==null?void 0:Qt.totalFoCons,3)),1),e.createElementVNode("td",xr,e.toDisplayString(n.roundPrecision((Jt=S.speed)==null?void 0:Jt.totalDgoCons,3)),1),e.createElementVNode("td",kr,e.toDisplayString(n.roundPrecision(((Kt=S.speed)==null?void 0:Kt.dangerous)/24,1)),1),e.createElementVNode("td",Dr,e.toDisplayString(n.roundPrecision(((jt=S.speed)==null?void 0:jt.severe)/24,1)),1),e.createElementVNode("td",Cr,e.toDisplayString(n.roundPrecision(((ut=S.speed)==null?void 0:ut.heavy)/24,1)),1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,e.toDisplayString((qt=(Xt=S.speed)==null?void 0:Xt.cpCopy)==null?void 0:qt.fo)+" FO / "+e.toDisplayString((eo=(vt=S.speed)==null?void 0:vt.cpCopy)==null?void 0:eo.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((to=S.speed)==null?void 0:to.avgSpeed,2))+" / "+e.toDisplayString(n.roundPrecision((oo=S.speed)==null?void 0:oo.wxFactor,2))+" / "+e.toDisplayString(n.roundPrecision((lo=S.speed)==null?void 0:lo.cFactor,2)),1)])],64)}),128))])])):e.createCommentVNode("",!0),Sr]),e.createElementVNode("div",Br,[e.createElementVNode("div",wr,[Ar,e.createElementVNode("div",Tr,"Advisory & Major Waypoint of Route "+e.toDisplayString((gt=(bt=(ft=(Vt=t.plan.speeds)==null?void 0:Vt[a.speedIndex])==null?void 0:ft.speed)==null?void 0:bt.lane)==null?void 0:gt.name),1),((kt=(xt=t.plan)==null?void 0:xt.speeds)==null?void 0:kt.length)>1?(e.openBlock(),e.createElementBlock("div",Fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Dt=t.plan)==null?void 0:Dt.speeds,(S,Ie)=>{var at,nt;return e.openBlock(),e.createElementBlock("div",{class:"route-item",key:Ie,onClick:ht=>{a.speedIndex=Ie,n.renderEchart()}},e.toDisplayString((nt=(at=S.speed)==null?void 0:at.lane)==null?void 0:nt.name),9,Or)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Pr,[a.editable?(e.openBlock(),e.createBlock(h,{key:0,modelValue:a.advisory,"onUpdate:modelValue":s[5]||(s[5]=S=>a.advisory=S),class:"editor",height:"120px",onBlur:s[6]||(s[6]=S=>n.handleCommit(S))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:s[7]||(s[7]=(...S)=>n.handleEdit&&n.handleEdit(...S)),innerHTML:a.advisory},null,40,Lr))]),e.createElementVNode("div",Wr,[$r,e.createElementVNode("div",Hr,[(St=(Ct=t.plan)==null?void 0:Ct.speeds)!=null&&St.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.computeMajorPoints((Tt=(At=(wt=(Bt=t.plan)==null?void 0:Bt.speeds)==null?void 0:wt[a.speedIndex])==null?void 0:At.speed)==null?void 0:Tt.argv,(so=(no=(Pt=(Ot=(Ft=t.plan)==null?void 0:Ft.speeds)==null?void 0:Ot[a.speedIndex])==null?void 0:Pt.speed)==null?void 0:no.sample)==null?void 0:so.wps),(S,Ie)=>(e.openBlock(),e.createElementBlock("div",{key:Ie,class:"cell-row"},[e.createElementVNode("div",Mr,[S.isResume?(e.openBlock(),e.createElementBlock("div",Ir,"Resume")):(e.openBlock(),e.createElementBlock("div",Gr,[e.createVNode(p,{lat:S.lat,label:""},null,8,["lat"]),Rr,e.createVNode(b,{lng:S.lng,label:""},null,8,["lng"]),S.pilot?(e.openBlock(),e.createElementBlock("span",zr," [P]")):e.createCommentVNode("",!0)]))]),e.createElementVNode("div",Ur,e.toDisplayString(n.computeUTCTime(S.eta)),1),Ie?(e.openBlock(),e.createElementBlock("div",Yr,e.toDisplayString(n.computeNav(S)),1)):(e.openBlock(),e.createElementBlock("div",Zr)),Ie?(e.openBlock(),e.createElementBlock("div",Qr,e.toDisplayString(n.roundPrecision(S.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",Jr)),Ie?(e.openBlock(),e.createElementBlock("div",Kr,e.toDisplayString(n.roundPrecision(S.avgSpd??S.speed,2))+" / "+e.toDisplayString(n.roundPrecision(S.bearing,0)),1)):(e.openBlock(),e.createElementBlock("div",jr)),Ie?(e.openBlock(),e.createElementBlock("div",ur,e.toDisplayString(n.computeMemo(S)),1)):(e.openBlock(),e.createElementBlock("div",Xr))]))),128)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",qr,[(io=(co=t.plan)==null?void 0:co.speeds)!=null&&io.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",vr,[em,e.createElementVNode("div",tm," Weather Forecast for the Next "+e.toDisplayString(n.computeDay(t.plan,a.speedIndex))+" Days of Route "+e.toDisplayString((_o=(ho=(po=(mo=(ro=t.plan)==null?void 0:ro.speeds)==null?void 0:mo[a.speedIndex])==null?void 0:po.speed)==null?void 0:ho.lane)==null?void 0:_o.name),1),((yo=(Eo=t.plan)==null?void 0:Eo.speeds)==null?void 0:yo.length)>1?(e.openBlock(),e.createElementBlock("div",om,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((No=t.plan)==null?void 0:No.speeds,(S,Ie)=>{var at,nt;return e.openBlock(),e.createElementBlock("div",{class:"route-item",key:Ie,onClick:ht=>{a.speedIndex=Ie,n.renderEchart()}},e.toDisplayString((nt=(at=S==null?void 0:S.speed)==null?void 0:at.lane)==null?void 0:nt.name),9,lm)}),128))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",am,[e.createElementVNode("div",nm,null,512)]),e.createElementVNode("table",null,[sm,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xo=(go=(bo=(fo=(Vo=t.plan)==null?void 0:Vo.speeds)==null?void 0:fo[a.speedIndex])==null?void 0:bo.speed)==null?void 0:go.sample)==null?void 0:xo.hours,(S,Ie)=>{var at,nt,ht,Lt,Wt,$t,Ht,Mt,It,Gt,Rt,zt,Ut,Yt,Zt,Qt,Jt,Kt,jt,ut,Xt,qt,vt,eo,to,oo,lo,ko,Do,Co,So,Bo,wo,Ao,To,Fo,Oo,Po,Lo,Wo,$o,Ho,Mo,Io,Go,Ro,zo,Uo,Yo;return e.openBlock(),e.createElementBlock("tr",{key:Ie,class:e.normalizeClass(S.isDangerous?"dangerous":S.isSevere?"severe":S.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime(S.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",cm,[e.createVNode(p,{lat:S.lat,label:""},null,8,["lat"]),im,e.createVNode(b,{lng:S.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(nt=(at=S.meteo)==null?void 0:at.wind)!=null&&nt.kts?(e.openBlock(),e.createElementBlock("span",dm,[e.createTextVNode(e.toDisplayString((Lt=(ht=S.meteo)==null?void 0:ht.wind)==null?void 0:Lt.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree(($t=(Wt=S.meteo)==null?void 0:Wt.wind)==null?void 0:$t.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",rm,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Mt=(Ht=S.meteo)==null?void 0:Ht.wind)==null?void 0:Mt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Rt=(Gt=(It=S.meteo)==null?void 0:It.wave)==null?void 0:Gt.wd)==null?void 0:Rt.height,1)),1),e.createElementVNode("td",null,[(Yt=(Ut=(zt=S.meteo)==null?void 0:zt.wave)==null?void 0:Ut.swell)!=null&&Yt.height?(e.openBlock(),e.createElementBlock("span",mm,[e.createTextVNode(e.toDisplayString((Jt=(Qt=(Zt=S.meteo)==null?void 0:Zt.wave)==null?void 0:Qt.swell)==null?void 0:Jt.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((ut=(jt=(Kt=S.meteo)==null?void 0:Kt.wave)==null?void 0:jt.swell)==null?void 0:ut.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",pm,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((vt=(qt=(Xt=S.meteo)==null?void 0:Xt.wave)==null?void 0:qt.swell)==null?void 0:vt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((oo=(to=(eo=S.meteo)==null?void 0:eo.wave)==null?void 0:to.swell)==null?void 0:oo.period,1)),1),e.createElementVNode("td",null,[(Do=(ko=(lo=S.meteo)==null?void 0:lo.wave)==null?void 0:ko.sig)!=null&&Do.height?(e.openBlock(),e.createElementBlock("span",hm,[e.createTextVNode(e.toDisplayString((Bo=(So=(Co=S.meteo)==null?void 0:Co.wave)==null?void 0:So.sig)==null?void 0:Bo.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((To=(Ao=(wo=S.meteo)==null?void 0:wo.wave)==null?void 0:Ao.sig)==null?void 0:To.degree,!1))},"",4)])):(e.openBlock(),e.createElementBlock("span",_m,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Po=(Oo=(Fo=S.meteo)==null?void 0:Fo.wave)==null?void 0:Oo.sig)==null?void 0:Po.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(($o=(Wo=(Lo=S.meteo)==null?void 0:Lo.wave)==null?void 0:Wo.sig)==null?void 0:$o.period,1)),1),e.createElementVNode("td",null,[(Mo=(Ho=S.meteo)==null?void 0:Ho.current)!=null&&Mo.kts?(e.openBlock(),e.createElementBlock("span",Em,[e.createTextVNode(e.toDisplayString((Go=(Io=S.meteo)==null?void 0:Io.current)==null?void 0:Go.direction),1),e.createElementVNode("i",{class:"iconfont",style:e.normalizeStyle(n.computeDegree((zo=(Ro=S.meteo)==null?void 0:Ro.current)==null?void 0:zo.degree,!0))},"",4)])):(e.openBlock(),e.createElementBlock("span",ym,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Yo=(Uo=S.meteo)==null?void 0:Uo.current)==null?void 0:Yo.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(S.cFactor,1)),1)],2)}),128))])])],64)):e.createCommentVNode("",!0),Nm])])])}const ja=Se(pd,[["render",Vm],["__scopeId","data-v-7d56124f"]]),$Y="",fm={name:"RouteReport",components:{Lng:Wa,Lat:$a,Editor:Jo},props:{plan:{type:Object,default:()=>({})},editorDisabled:{type:Boolean,default:()=>!1}},emits:["commit","refresh"],data(){return{editable:!1,advisory:""}},computed:{computeUTCTime(){return function(o,s="MMM-DD/HHmm[Z]"){return`${K(o).utc().format(s)}`}},computeLTime(){return function(o,s){const t=K(o);return t.utcOffset(s),`${t.format("MMM-DD/HHmm")}LT`}},computeUTCOffset(){var o,s,t,r,a;return(a=(r=(t=(s=(o=this.plan)==null?void 0:o.leg)==null?void 0:s.destination)==null?void 0:t.port)==null?void 0:r.timezone)==null?void 0:a.UtcCurrentOffset},computeTimeDiff(){return function(o,s){var t,r,a;if(s===0)return"-";{const n=K((r=(t=o==null?void 0:o.speeds[s])==null?void 0:t.speed)==null?void 0:r.eta).diff(K((a=o==null?void 0:o.speeds[0])==null?void 0:a.speed.eta),"h",!0);return Math.round(n*10)/10}}},computeNav(){return function(o){return o.gcToPrevious?"GC":"RL"}},roundPrecision(){return function(o,s=4){if(typeof o=="number"){const t=Number("1".padEnd(s+1,"0"));return Math.round(o*t)/t}else return"-"}},computeMapChart(){var o;return((o=this.plan)==null?void 0:o.chartUrl)||"//oss.idmwx.com/asset/route-report_example.png"},computeDegree(){return function(o,s){o=o%360;for(let t=0;t<17;t++)if(t*22.5+o+11.25>=360){let r=(16-t)*22.5;return s||(r=r+180),`transform:rotate(${r}deg);margin-left:3px;`}}},computeDay(){return function(o){var a,n,E;const s=(E=(n=(a=o==null?void 0:o.speeds[0])==null?void 0:a.speed)==null?void 0:n.sample)==null?void 0:E.hours,t=s[0],r=s[s.length-1];return K(r.eta).diff(K(t.eta),"day")}}},watch:{plan:{handler(){var o,s;(o=this.plan)!=null&&o.id&&(this.advisory=((s=this.plan)==null?void 0:s.advisory)||"Pls find the following major waypoints for your safe navigation.")},immediate:!0}},methods:{handleCommit(o){this.editable=!1,this.$emit("commit",o)},handleRefresh(){this.$emit("refresh")},handleEdit(){this.editorDisabled?this.editable=!1:this.editable=!0}}},Ze=o=>(e.pushScopeId("data-v-9a939466"),o=o(),e.popScopeId(),o),bm={class:"route-report"},gm=Ze(()=>e.createElementVNode("div",{class:"brand"},[e.createElementVNode("img",{class:"bgImg",src:"https://img.idmwx.com/asset/fli_bg.jpeg"})],-1)),xm={class:"section"},km=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Voyage Basics")],-1)),Dm={class:"section-body basics"},Cm={class:"flex-space section-row"},Sm={class:"flex-start"},Bm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Company Name",-1)),wm={class:"flex-start"},Am={class:"flex-start"},Tm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Departure Port",-1)),Fm={class:"flex-start flex"},Om={key:0,class:"flex"},Pm={key:1,class:"flex-space flex"},Lm=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Wm={class:"time flex"},$m={class:"flex-space section-row"},Hm={class:"flex-start"},Mm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Vessel Name",-1)),Im={class:"flex-start"},Gm={class:"flex-start"},Rm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Arrival Port",-1)),zm={class:"flex-start flex"},Um={key:0,class:"flex"},Ym={key:1,class:"flex-space"},Zm=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Qm={class:"time flex"},Jm={class:"flex-space section-row"},Km={class:"flex-start"},jm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Report Created",-1)),um={class:"flex-start"},Xm={class:"flex-start"},qm=Ze(()=>e.createElementVNode("label",{class:"flex-end"},"Voyage Condition",-1)),vm={class:"flex-start flex"},ep={class:"section",style:{"border-bottom":"2px dashed var(--fli-border-color-dark)"}},tp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Details")],-1)),op={class:"section-body detail"},lp={class:"flex-space",style:{"align-items":"stretch"}},ap={class:"chart"},np=["src"],sp={key:1,class:"empty flex-center"},cp={class:"route flex",style:{"justify-content":"space-between"}},ip=Ze(()=>e.createElementVNode("div",{class:"title"},"ROUTE REMARKS",-1)),dp={class:"suggestion"},rp=["innerHTML"],mp={class:"flex-start legends"},pp=e.createStaticVNode('<div class="legend" data-v-9a939466><label style="background-color:var(--idm-severe);" data-v-9a939466></label><span data-v-9a939466>Dangerous</span></div><div class="legend" data-v-9a939466><label style="background-color:var(--idm-heavy);" data-v-9a939466></label><span data-v-9a939466>Severe</span></div><div class="legend" data-v-9a939466><b class="route1" data-v-9a939466></b><span data-v-9a939466>Route 1</span></div>',3),hp={key:0,class:"legend"},_p=[Ze(()=>e.createElementVNode("b",{class:"route2"},null,-1)),Ze(()=>e.createElementVNode("span",null,"Route 2",-1))],Ep={key:1,class:"legend"},yp=[Ze(()=>e.createElementVNode("b",{class:"route3"},null,-1)),Ze(()=>e.createElementVNode("span",null,"Route 3",-1))],Np={class:"section"},Vp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Summary")],-1)),fp={class:"section-body comparison"},bp={class:"container"},gp={key:0},xp=Ze(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr"),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Route"),e.createElementVNode("th",null,"TTL Dist (nm)"),e.createElementVNode("th",null,"SPD (kts)"),e.createElementVNode("th",null,"CP Cons (mt)"),e.createElementVNode("th",null,"ETA (UTC)"),e.createElementVNode("th",null,"Avg.Spd / Wx / Cur.Factor (kts)"),e.createElementVNode("th",null,"TTL Cons (mt)")])],-1)),kp={class:"section",style:{"page-break-inside":"avoid"}},Dp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Major Waypoint")],-1)),Cp={class:"section-body sample"},Sp={class:"major-waypoints"},Bp={class:"container"},wp=e.createStaticVNode('<div class="header" data-v-9a939466><div class="cell-item flexM" data-v-9a939466>Major waypoint</div><div class="cell-item flexL" data-v-9a939466>Name</div><div class="cell-item flex" data-v-9a939466>Time</div><div class="cell-item flex" data-v-9a939466>Nav</div><div class="cell-item flex" data-v-9a939466>Dist</div><div class="cell-item flex" data-v-9a939466>SOG</div></div>',1),Ap={class:"body"},Tp={class:"cell-item flexM"},Fp={class:"flex-center"},Op=Ze(()=>e.createElementVNode("span",{style:{"margin-right":"3px"}},",",-1)),Pp={class:"cell-item flexL"},Lp={key:0,class:"flex-center"},Wp={key:1},$p={class:"cell-item flex"},Hp={key:0,class:"cell-item flex offset"},Mp={key:1,class:"cell-item flex nbsp"},Ip={key:2,class:"cell-item flex offset"},Gp={key:3,class:"cell-item flex nbsp"},Rp={key:4,class:"cell-item flex offset"},zp={key:5,class:"cell-item flex nbsp"},Up={class:"section"},Yp=Ze(()=>e.createElementVNode("div",{class:"section-header flex-start"},[e.createElementVNode("i",{class:"iconfont"},""),e.createElementVNode("div",{class:"title"},"Route Forecast")],-1)),Zp={class:"section-body sample"},Qp={key:0},Jp=Ze(()=>e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Date Time "),e.createElementVNode("br"),e.createTextVNode("(UTC)")]),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Position "),e.createElementVNode("br"),e.createTextVNode("(lat/lon)")]),e.createElementVNode("th",{colspan:"2"},"Wind"),e.createElementVNode("th",{rowspan:"2"},[e.createTextVNode("Sea HT "),e.createElementVNode("br"),e.createTextVNode("(m)")]),e.createElementVNode("th",{colspan:"3"},"Swell"),e.createElementVNode("th",{colspan:"3"},"Sig"),e.createElementVNode("th",{colspan:"3"},"Current")]),e.createElementVNode("tr",null,[e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Ht (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Hgt (m)"),e.createElementVNode("th",null,"Prd (s)"),e.createElementVNode("th",null,"Dir"),e.createElementVNode("th",null,"Speed (kts)"),e.createElementVNode("th",null,"Factor (kts)")])],-1)),Kp={class:"flex-center"},jp=Ze(()=>e.createElementVNode("span",null,"/",-1)),up={key:0,class:"degree-box"},Xp={key:1},qp={key:0,class:"degree-box"},vp={key:1},eh={key:0,class:"degree-box"},th={key:1},oh={key:0,class:"degree-box"},lh={key:1},ah=Ze(()=>e.createElementVNode("div",{class:"section"},[e.createElementVNode("div",{class:"section-body footer"},[e.createElementVNode("div",null,[e.createTextVNode("Fleet Insight Limited "),e.createElementVNode("a",{href:"mailto:ops@fltins.com"},"ops@fltins.com")]),e.createElementVNode("div",{style:{"font-size":"11px","margin-top":"10px"}}," The waypoints and route map provided are intended for informational purposes only and should not be relied upon for actual navigation. Fleet Insight Limited assumes no liability for any direct/potential damage to vessels or cargo that may occur as a result of using this voyage plan for exact navigation. ")])],-1));function nh(o,s,t,r,a,n){var b,g,h,N,D,x,C,k,T,F,B,w,f,O,I,G,R,z,_,L,H,W,P,M,Q,U,J,ne,se,l,u,v,ee,te,oe,le,ce,ie,de,_e,X,me,Ee,ye,re,be,ge,xe,ke,De,Ce,Fe,Oe,Pe,Le,We,$e,He,Me,Ne,Ke,je,ue;const E=e.resolveComponent("Lat"),c=e.resolveComponent("Lng"),p=e.resolveComponent("Editor");return e.openBlock(),e.createElementBlock("div",bm,[gm,e.createElementVNode("div",xm,[km,e.createElementVNode("div",Dm,[e.createElementVNode("div",Cm,[e.createElementVNode("div",Sm,[Bm,e.createElementVNode("div",wm,e.toDisplayString((h=(g=(b=t.plan)==null?void 0:b.voyage)==null?void 0:g.company)==null?void 0:h.name),1)]),e.createElementVNode("div",Am,[Tm,e.createElementVNode("div",Fm,[(x=(D=(N=t.plan)==null?void 0:N.leg)==null?void 0:D.departure)!=null&&x.name?(e.openBlock(),e.createElementBlock("div",Om,e.toDisplayString((k=(C=t.plan)==null?void 0:C.leg)==null?void 0:k.departure.name),1)):(e.openBlock(),e.createElementBlock("div",Pm,[e.createVNode(E,{lat:(B=(F=(T=t.plan)==null?void 0:T.leg)==null?void 0:F.departure)==null?void 0:B.lat,label:""},null,8,["lat"]),Lm,e.createVNode(c,{lng:(O=(f=(w=t.plan)==null?void 0:w.leg)==null?void 0:f.departure)==null?void 0:O.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",Wm,e.toDisplayString(n.computeUTCTime(((R=(G=(I=t.plan)==null?void 0:I.leg)==null?void 0:G.departure)==null?void 0:R.atd)||((L=(_=(z=t.plan)==null?void 0:z.leg)==null?void 0:_.departure)==null?void 0:L.etd),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",$m,[e.createElementVNode("div",Hm,[Mm,e.createElementVNode("div",Im,e.toDisplayString((P=(W=(H=t.plan)==null?void 0:H.voyage)==null?void 0:W.vessel)==null?void 0:P.name),1)]),e.createElementVNode("div",Gm,[Rm,e.createElementVNode("div",zm,[(U=(Q=(M=t.plan)==null?void 0:M.leg)==null?void 0:Q.destination)!=null&&U.name?(e.openBlock(),e.createElementBlock("div",Um,e.toDisplayString((ne=(J=t.plan)==null?void 0:J.leg)==null?void 0:ne.destination.name),1)):(e.openBlock(),e.createElementBlock("div",Ym,[e.createVNode(E,{lat:(u=(l=(se=t.plan)==null?void 0:se.leg)==null?void 0:l.destination)==null?void 0:u.lat,label:""},null,8,["lat"]),Zm,e.createVNode(c,{lng:(te=(ee=(v=t.plan)==null?void 0:v.leg)==null?void 0:ee.destination)==null?void 0:te.lng,label:""},null,8,["lng"])])),e.createElementVNode("div",Qm,e.toDisplayString(n.computeUTCTime(((ce=(le=(oe=t.plan)==null?void 0:oe.speeds)==null?void 0:le[0])==null?void 0:ce.speed.ata)||((de=(ie=t.plan)==null?void 0:ie.speeds)==null?void 0:de[0].speed.eta),"MMMM-DD, HHmm[Z]")),1)])])]),e.createElementVNode("div",Jm,[e.createElementVNode("div",Km,[jm,e.createElementVNode("div",um,e.toDisplayString(n.computeUTCTime((_e=t.plan)==null?void 0:_e.createdAt,"MMMM-DD, HHmm[Z]")),1)]),e.createElementVNode("div",Xm,[qm,e.createElementVNode("div",vm,[e.createElementVNode("div",null,e.toDisplayString((me=(X=t.plan)==null?void 0:X.voyage)==null?void 0:me.loadCondition),1)])])])])]),e.createElementVNode("div",ep,[tp,e.createElementVNode("div",op,[e.createElementVNode("div",lp,[e.createElementVNode("div",ap,[(Ee=t.plan)!=null&&Ee.chartUrl?(e.openBlock(),e.createElementBlock("img",{key:0,src:(ye=t.plan)==null?void 0:ye.chartUrl},null,8,np)):(e.openBlock(),e.createElementBlock("div",sp,[e.createTextVNode("waiting for weather map, "),e.createElementVNode("b",{onClick:s[0]||(s[0]=(...A)=>n.handleRefresh&&n.handleRefresh(...A))},"Refresh"),e.createTextVNode("later please")]))]),e.createElementVNode("div",cp,[e.createElementVNode("div",null,[ip,e.createElementVNode("div",dp,[a.editable?(e.openBlock(),e.createBlock(p,{key:0,modelValue:a.advisory,"onUpdate:modelValue":s[1]||(s[1]=A=>a.advisory=A),class:"editor",height:"120px",onBlur:s[2]||(s[2]=A=>n.handleCommit(A))},null,8,["modelValue"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"txt",onDblclick:s[3]||(s[3]=(...A)=>n.handleEdit&&n.handleEdit(...A)),innerHTML:a.advisory},null,40,rp))])]),e.createElementVNode("div",mp,[pp,((be=(re=t.plan)==null?void 0:re.speeds)==null?void 0:be.length)>1?(e.openBlock(),e.createElementBlock("div",hp,_p)):e.createCommentVNode("",!0),((xe=(ge=t.plan)==null?void 0:ge.speeds)==null?void 0:xe.length)>2?(e.openBlock(),e.createElementBlock("div",Ep,yp)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",Np,[Vp,e.createElementVNode("div",fp,[e.createElementVNode("div",bp,[(De=(ke=t.plan)==null?void 0:ke.speeds)!=null&&De.length?(e.openBlock(),e.createElementBlock("table",gp,[xp,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ce=t.plan)==null?void 0:Ce.speeds,(A,Be)=>{var Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt;return e.openBlock(),e.createElementBlock("tr",{key:Be},[e.createElementVNode("td",null,"Route "+e.toDisplayString(Be+1),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Re=A.speed)==null?void 0:Re.distance,0)),1),e.createElementVNode("td",null,e.toDisplayString(`${((Xe=A.speed)==null?void 0:Xe.label)??"CP"} ${((qe=A.speed)==null?void 0:qe.v0)??((et=(ve=A.speed)==null?void 0:ve.cpCopy)==null?void 0:et.speed)}`),1),e.createElementVNode("td",null,e.toDisplayString((m=(tt=A.speed)==null?void 0:tt.cpCopy)==null?void 0:m.fo)+" FO / "+e.toDisplayString((we=($=A.speed)==null?void 0:$.cpCopy)==null?void 0:we.dgo)+" DO",1),e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime((Ge=A.speed)==null?void 0:Ge.eta)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ze=A.speed)==null?void 0:ze.avgSpeed,2))+" / "+e.toDisplayString(n.roundPrecision((pe=A.speed)==null?void 0:pe.wxFactor,2))+" / "+e.toDisplayString(n.roundPrecision((Ye=A.speed)==null?void 0:Ye.cFactor,2)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((ot=A.speed)==null?void 0:ot.totalFoCons,3))+" FO /"+e.toDisplayString(n.roundPrecision((lt=A.speed)==null?void 0:lt.totalDgoCons,3))+" DO",1)])}),128))])])):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",kp,[Dp,e.createElementVNode("div",Cp,[e.createElementVNode("div",Sp,[e.createElementVNode("div",Bp,[wp,e.createElementVNode("div",Ap,[(Oe=(Fe=t.plan)==null?void 0:Fe.speeds)!=null&&Oe.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(($e=(We=(Le=(Pe=t.plan)==null?void 0:Pe.speeds[0])==null?void 0:Le.speed)==null?void 0:We.sample)==null?void 0:$e.wps,(A,Be)=>(e.openBlock(),e.createElementBlock("div",{key:Be,class:"cell-row"},[e.createElementVNode("div",Tp,[e.createElementVNode("div",Fp,[e.createVNode(E,{lat:A.lat,label:""},null,8,["lat"]),Op,e.createVNode(c,{lng:A.lng,label:""},null,8,["lng"])])]),e.createElementVNode("div",Pp,[A.name?(e.openBlock(),e.createElementBlock("span",Lp,e.toDisplayString(A.name),1)):(e.openBlock(),e.createElementBlock("span",Wp,"-"))]),e.createElementVNode("div",$p,e.toDisplayString(n.computeUTCTime(A.eta)),1),Be?(e.openBlock(),e.createElementBlock("div",Hp,e.toDisplayString(n.computeNav(A)),1)):(e.openBlock(),e.createElementBlock("div",Mp)),Be?(e.openBlock(),e.createElementBlock("div",Ip,e.toDisplayString(n.roundPrecision(A.distanceFromStart,1)),1)):(e.openBlock(),e.createElementBlock("div",Gp)),Be?(e.openBlock(),e.createElementBlock("div",Rp,e.toDisplayString(n.roundPrecision(A.avgSpd??A.speed,1)),1)):(e.openBlock(),e.createElementBlock("div",zp))]))),128)):e.createCommentVNode("",!0)])])])])]),e.createElementVNode("div",Up,[Yp,e.createElementVNode("div",Zp,[(Me=(He=t.plan)==null?void 0:He.speeds)!=null&&Me.length?(e.openBlock(),e.createElementBlock("table",Qp,[Jp,e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ue=(je=(Ke=(Ne=t.plan)==null?void 0:Ne.speeds[0])==null?void 0:Ke.speed)==null?void 0:je.sample)==null?void 0:ue.hours,(A,Be)=>{var Re,Xe,qe,ve,et,tt,m,$,we,Ge,ze,pe,Ye,ot,lt,dt,rt,mt,pt,_t,Et,yt,Nt,Vt,ft,bt,gt,xt,kt,Dt,Ct,St,Bt,wt,At,Tt,Ft,Ot,Pt;return e.openBlock(),e.createElementBlock("tr",{key:Be,class:e.normalizeClass(A.isDangerous?"dangerous":A.isSevere?"severe":A.isHeavy?"heavy":"")},[e.createElementVNode("td",null,e.toDisplayString(n.computeUTCTime(A.eta)),1),e.createElementVNode("td",null,[e.createElementVNode("div",Kp,[e.createVNode(E,{lat:A.lat,label:""},null,8,["lat"]),jp,e.createVNode(c,{lng:A.lng,label:""},null,8,["lng"])])]),e.createElementVNode("td",null,[(Xe=(Re=A.meteo)==null?void 0:Re.wind)!=null&&Xe.kts?(e.openBlock(),e.createElementBlock("span",up,e.toDisplayString((ve=(qe=A.meteo)==null?void 0:qe.wind)==null?void 0:ve.direction),1)):(e.openBlock(),e.createElementBlock("span",Xp,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((tt=(et=A.meteo)==null?void 0:et.wind)==null?void 0:tt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((we=($=(m=A.meteo)==null?void 0:m.wave)==null?void 0:$.wd)==null?void 0:we.height,1)),1),e.createElementVNode("td",null,[(pe=(ze=(Ge=A.meteo)==null?void 0:Ge.wave)==null?void 0:ze.swell)!=null&&pe.height?(e.openBlock(),e.createElementBlock("span",qp,e.toDisplayString((lt=(ot=(Ye=A.meteo)==null?void 0:Ye.wave)==null?void 0:ot.swell)==null?void 0:lt.direction),1)):(e.openBlock(),e.createElementBlock("span",vp,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((mt=(rt=(dt=A.meteo)==null?void 0:dt.wave)==null?void 0:rt.swell)==null?void 0:mt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Et=(_t=(pt=A.meteo)==null?void 0:pt.wave)==null?void 0:_t.swell)==null?void 0:Et.period,1)),1),e.createElementVNode("td",null,[(Vt=(Nt=(yt=A.meteo)==null?void 0:yt.wave)==null?void 0:Nt.sig)!=null&&Vt.height?(e.openBlock(),e.createElementBlock("span",eh,e.toDisplayString((gt=(bt=(ft=A.meteo)==null?void 0:ft.wave)==null?void 0:bt.sig)==null?void 0:gt.direction),1)):(e.openBlock(),e.createElementBlock("span",th,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Dt=(kt=(xt=A.meteo)==null?void 0:xt.wave)==null?void 0:kt.sig)==null?void 0:Dt.height,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Bt=(St=(Ct=A.meteo)==null?void 0:Ct.wave)==null?void 0:St.sig)==null?void 0:Bt.period,1)),1),e.createElementVNode("td",null,[(At=(wt=A.meteo)==null?void 0:wt.current)!=null&&At.kts?(e.openBlock(),e.createElementBlock("span",oh,e.toDisplayString((Ft=(Tt=A.meteo)==null?void 0:Tt.current)==null?void 0:Ft.direction)+" ",1)):(e.openBlock(),e.createElementBlock("span",lh,"-"))]),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision((Pt=(Ot=A.meteo)==null?void 0:Ot.current)==null?void 0:Pt.kts,1)),1),e.createElementVNode("td",null,e.toDisplayString(n.roundPrecision(A.cFactor,1)),1)],2)}),128))])])):e.createCommentVNode("",!0)])]),ah])}const tn=Se(fm,[["render",nh],["__scopeId","data-v-9a939466"]]),sh={install(o){o.component("RouteReport",ja),o.component("FliPlanReport",tn),o.component("OrmPlanReport",ja)}},ch={install(o){o.component("IdmEditor",Jo)}},ih={install(o){o.component("IdmLat",$a)}},dh={install(o){o.component("IdmLng",Wa)}},rh={name:"PiLogo",props:{fill:{type:String,default:"#000000"}}},mh={class:"logo"},ph={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1280.000000 1280.000000"},hh=["fill","fill-opacity"],_h=[e.createElementVNode("path",{d:`M4225 11533 c-100 -6 -311 -23 -335 -27 -14 -3 -59 -10 -100 -16
2
2
  -408 -60 -813 -229 -1110 -465 -98 -77 -307 -287 -393 -395 -37 -47 -74 -93
3
3
  -82 -102 -7 -9 -22 -29 -32 -45 -9 -15 -20 -30 -23 -33 -16 -13 -139 -202
4
4
  -225 -345 -94 -157 -256 -467 -330 -635 -21 -47 -48 -108 -60 -136 -71 -158