@idmui/basic 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -8
- package/dist/index.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<g transform="rotate(${l}, 512, 512)">
|
|
67
67
|
<path d="M128 896l384-768 384 768-384-128-384 128z" fill="${a}" p-id="9615"></path>
|
|
68
68
|
</g>
|
|
69
|
-
</svg>`;return btoa(unescape(encodeURIComponent(t)))},async convertSvgUrlToBase64(l){try{const t=await(await fetch(l)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}catch(a){return console.warn("SVG conversion error:",a),l}}}},W3={class:"idm-spot-forecast-report"},P3={class:"row"},O3={class:"col",style:{width:"54%"}},R3={key:0,style:{"margin-left":"8px"}},G3={key:1,style:{"margin-left":"8px"}},$3={key:0,class:"col",style:{width:"42%"}},j3={style:{"margin-left":"8px"}},Y3={key:1,class:"col",style:{width:"42%"}},Z3={style:{"margin-left":"8px"}},U3={class:"row"},q3={class:"col",style:{width:"54%"}},X3={style:{"margin-left":"8px"}},J3={class:"col",style:{width:"42%"}},Q3={style:{"margin-left":"8px"}},K3={class:"content-box"},e6={key:0,class:"meteogram-echart-section"},t6={key:2,id:"weatherIconsEchart"},a6={key:3,id:"weatherConditionEchart"},l6={key:4,id:"windIconsEchart"},i6={key:5,id:"windEchart"},o6={key:6,class:"page-break"},s6={key:7,id:"waveChart"},r6={class:"table-section"},n6={key:0,class:"card"},c6={class:"date"},d6={class:"",style:{"font-size":"16px","font-weight":"500"}},h6={rowspan:"2",colspan:"1",class:"border",style:{width:"90px"}},m6={rowspan:"1",colspan:"1",class:"border"},p6={rowspan:"1",colspan:"1",class:"border"},g6={rowspan:"1",colspan:"1",class:"border"},y6={rowspan:"1",colspan:"4",class:"border"},f6={rowspan:"1",colspan:"3",class:"border"},b6={rowspan:"1",colspan:"3",class:"border"},x6={rowspan:"1",colspan:"3",class:"border"},u6={rowspan:"1",colspan:"2",class:"border"},w6={rowspan:"1",colspan:"1",class:"border"},z6={rowspan:"1",colspan:"1",class:"border"},k6={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},F6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},D6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},N6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},M6={rowspan:"1",colspan:"1",class:"border",style:{width:"30px"}},_6={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},v6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},S6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},L6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},E6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},H6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},V6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},B6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},C6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},A6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},T6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},I6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},W6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},P6={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}},O6={rowspan:"1",colspan:"1",class:"border",style:{width:"90px"}},R6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},G6={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},$6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},j6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Y6=["src"],Z6={key:1},U6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},q6={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},X6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},J6=["src"],Q6={key:1},K6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},e0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},t0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},a0=["src"],l0={key:1},i0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},o0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},s0=["src"],r0={key:1},n0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},c0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},d0=["src"],h0={key:1},m0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},p0={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},g0={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}};function y0(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",W3,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",P3,[e.createElementVNode("div",O3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",R3,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",G3,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),(b=t.reportData)!=null&&b.datetime?(e.openBlock(),e.createElementBlock("div",$3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报时段":"Forecast Period")+":",3),e.createElementVNode("span",j3,e.toDisplayString(i.computeTzTime((f=(x=t.reportData)==null?void 0:x.dateRange)==null?void 0:f[0],c.positionGmt))+" ~ "+e.toDisplayString(i.computeTzTime((v=(H=t.reportData)==null?void 0:H.dateRange)==null?void 0:v[1],c.positionGmt)),1)])):(e.openBlock(),e.createElementBlock("div",Y3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报天数":"Forecast Days")+":",3),e.createElementVNode("span",Z3,e.toDisplayString((S=t.reportData)==null?void 0:S.forecastDays)+" "+e.toDisplayString(t.locale==="zhHans"?"天":"Days"),1)]))]),e.createElementVNode("div",U3,[e.createElementVNode("div",q3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",X3,"UTC "+e.toDisplayString((V=t.reportData)==null?void 0:V.positionOffset),1)]),e.createElementVNode("div",J3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报模式":"Forecast Model")+":",3),e.createElementVNode("span",Q3,e.toDisplayString((k=t.reportData)==null?void 0:k.forecastModel),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",K3,[(F=t.reportData)!=null&&F.showWeatherChart||(M=t.reportData)!=null&&M.showWindChart||(C=t.reportData)!=null&&C.showWaveChart?(e.openBlock(),e.createElementBlock("div",e6,[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):t.reportData?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)),!t.loading&&((T=t.reportData)!=null&&T.showWeatherChart)?(e.openBlock(),e.createElementBlock("div",t6)):e.createCommentVNode("",!0),!t.loading&&((I=t.reportData)!=null&&I.showWeatherChart)?(e.openBlock(),e.createElementBlock("div",a6)):e.createCommentVNode("",!0),!t.loading&&((u=t.reportData)!=null&&u.showWindChart)?(e.openBlock(),e.createElementBlock("div",l6)):e.createCommentVNode("",!0),!t.loading&&((L=t.reportData)!=null&&L.showWindChart)?(e.openBlock(),e.createElementBlock("div",i6)):e.createCommentVNode("",!0),(P=t.reportData)!=null&&P.showWeatherChart&&((O=t.reportData)!=null&&O.showWindChart)?(e.openBlock(),e.createElementBlock("div",o6)):e.createCommentVNode("",!0),!t.loading&&((_=t.reportData)!=null&&_.showWaveChart)?(e.openBlock(),e.createElementBlock("div",s6)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",r6,[t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",n6,[e.createElementVNode("div",c6,[e.createElementVNode("div",d6,e.toDisplayString(t.locale==="zhHans"?"小时预报":"Hourly Forecast"),1),e.createElementVNode("div",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"]),style:{"font-size":"13px","font-weight":"300"}}," * "+e.toDisplayString(t.locale==="zhHans"?"涌浪、显浪高度>=1.5米时标记为黄色, 风速蒲福等级>=4时标记为黄色。":"Swell or Sig.wave height alert in yellow for value>=1.5m, wind speed alert in yellow for beaufort scale >= 4."),3)]),e.createElementVNode("table",{class:e.normalizeClass(["conditions-table",(z=t.reportData)!=null&&z.showSummary?"":"table-header-fixed"])},[e.createElementVNode("thead",{class:e.normalizeClass(t.theme==="dark"?"dark":"light")},[e.createElementVNode("tr",{class:e.normalizeClass(["day",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("th",h6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"时间":"DateTime"),1),a[0]||(a[0]=e.createElementVNode("br",null,null,-1)),a[1]||(a[1]=e.createTextVNode("(LT)",-1))]),e.createElementVNode("th",m6,e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),e.createElementVNode("th",p6,e.toDisplayString(t.locale==="zhHans"?`${t.reportData.interval}小时降水`:`Precip.${t.reportData.interval}h`),1),e.createElementVNode("th",g6,e.toDisplayString(t.locale==="zhHans"?"能见度":"Visibility"),1),e.createElementVNode("th",y6,e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),1),e.createElementVNode("th",f6,e.toDisplayString(t.locale==="zhHans"?"风浪":"Wind wave"),1),e.createElementVNode("th",b6,e.toDisplayString(t.locale==="zhHans"?"涌浪":"Swell wave"),1),e.createElementVNode("th",x6,e.toDisplayString(t.locale==="zhHans"?"显浪":"Sig.wave"),1),e.createElementVNode("th",u6,e.toDisplayString(t.locale==="zhHans"?"洋流":"Current"),1),e.createElementVNode("th",w6,e.toDisplayString(t.locale==="zhHans"?"海面":"Sea Level"),1),e.createElementVNode("th",z6,e.toDisplayString(t.locale==="zhHans"?"海表":"Sea Surface"),1)],2),e.createElementVNode("tr",{class:e.normalizeClass(["hour",t.theme==="dark"?"dark":"light"])},[a[28]||(a[28]=e.createElementVNode("th",{rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},"°C",-1)),e.createElementVNode("th",k6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"累计":"Acc"),1),a[2]||(a[2]=e.createElementVNode("br",null,null,-1)),a[3]||(a[3]=e.createTextVNode("(mm)",-1))]),e.createElementVNode("th",F6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"距离":"Dist"),1),a[4]||(a[4]=e.createElementVNode("br",null,null,-1)),a[5]||(a[5]=e.createTextVNode("(nm)",-1))]),e.createElementVNode("th",D6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",N6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),a[7]||(a[7]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",M6,e.toDisplayString(t.locale==="zhHans"?"等级":"BF"),1),e.createElementVNode("th",_6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"阵风":"Gusts"),1),a[8]||(a[8]=e.createElementVNode("br",null,null,-1)),a[9]||(a[9]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",v6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",S6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[10]||(a[10]=e.createElementVNode("br",null,null,-1)),a[11]||(a[11]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",L6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[12]||(a[12]=e.createElementVNode("br",null,null,-1)),a[13]||(a[13]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",E6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",H6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[14]||(a[14]=e.createElementVNode("br",null,null,-1)),a[15]||(a[15]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",V6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[16]||(a[16]=e.createElementVNode("br",null,null,-1)),a[17]||(a[17]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",B6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",C6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[18]||(a[18]=e.createElementVNode("br",null,null,-1)),a[19]||(a[19]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",A6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[20]||(a[20]=e.createElementVNode("br",null,null,-1)),a[21]||(a[21]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",T6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",I6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[22]||(a[22]=e.createElementVNode("br",null,null,-1)),a[23]||(a[23]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",W6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[24]||(a[24]=e.createElementVNode("br",null,null,-1)),a[25]||(a[25]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",P6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),a[26]||(a[26]=e.createElementVNode("br",null,null,-1)),a[27]||(a[27]=e.createTextVNode("(°C)",-1))])],2)],2),e.createElementVNode("tbody",{class:e.normalizeClass((D=t.reportData)!=null&&D.showSummary?"":"scroll")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.hourlyTableData,s=>(e.openBlock(),e.createElementBlock("tr",{key:Math.random()+s.localDate,class:e.normalizeClass(["text border-bottom",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("td",O6,[e.createElementVNode("div",null,e.toDisplayString(s.localDate),1)]),e.createElementVNode("td",R6,[e.createElementVNode("div",null,e.toDisplayString(s.temp),1)]),e.createElementVNode("td",G6,e.toDisplayString(s.precipSum),1),e.createElementVNode("td",$6,e.toDisplayString(s.visibility),1),e.createElementVNode("td",j6,[e.createTextVNode(e.toDisplayString(s.windDir)+" ",1),!isNaN(s.windBearing)&&s.windDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWindArrowBase64(s.windBearing,this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Y6)):(e.openBlock(),e.createElementBlock("span",Z6,"-"))]),e.createElementVNode("td",U6,e.toDisplayString(s.windSpeed),1),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.windBF>=4?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"30px"}},e.toDisplayString(s.windBF),3),e.createElementVNode("td",q6,e.toDisplayString(s.windGusts),1),e.createElementVNode("td",X6,[e.createTextVNode(e.toDisplayString(s.windWaveDir)+" ",1),!isNaN(s.windWaveBearing)&&s.windWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.windWaveBearing,(this.theme==="dark","#7cc7b3"))}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,J6)):(e.openBlock(),e.createElementBlock("span",Q6,"-"))]),e.createElementVNode("td",K6,e.toDisplayString(s.windWaveHeight),1),e.createElementVNode("td",e0,e.toDisplayString(s.windWavePeriod),1),e.createElementVNode("td",t0,[e.createTextVNode(e.toDisplayString(s.swellDir)+" ",1),!isNaN(s.swellBearing)&&s.swellDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.swellBearing,this.theme==="dark"?"rgb(17, 245, 211)":"rgba(0, 230, 194, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,a0)):(e.openBlock(),e.createElementBlock("span",l0,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.swellHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.swellHeight),3),e.createElementVNode("td",i0,e.toDisplayString(s.swellPeriod),1),e.createElementVNode("td",o0,[e.createTextVNode(e.toDisplayString(s.sigWaveDir)+" ",1),!isNaN(s.sigWaveBearing)&&s.sigWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.sigWaveBearing,this.theme==="dark"?"rgba(89, 199, 211, 1)":"rgba(1, 189, 211, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,s0)):(e.openBlock(),e.createElementBlock("span",r0,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.sigWaveHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.sigWaveHeight),3),e.createElementVNode("td",n0,e.toDisplayString(s.sigWavePeriod),1),e.createElementVNode("td",c0,[e.createTextVNode(e.toDisplayString(s.currentDir)+" ",1),!isNaN(s.currentBearing)&&s.currentDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.currentBearing,this.theme==="dark"?"rgba(220, 115, 255, 1)":"rgba(178, 51, 220, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,d0)):(e.openBlock(),e.createElementBlock("span",h0,"-"))]),e.createElementVNode("td",m0,e.toDisplayString(s.currentSpd),1),e.createElementVNode("td",p0,e.toDisplayString(s.seaLevel),1),e.createElementVNode("td",g0,e.toDisplayString(s.seaSurfaceTemp),1)],2))),128))],2)],2)]))])])])}const M2=K1(I3,[["render",y0],["__scopeId","data-v-74d509e8"]]),s4="",f0={name:"IdmHistorical",components:{IdmLoading:d2},props:{reportData:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},theme:{type:String,default:"light"},locale:{type:String,default:"en"}},data(){return{positionGmt:void 0,meteogramData:void 0,hourlyTableData:[]}},computed:{computeHourLT(){return l=>{if(l){const a=w.tz(l,this.positionGmt);return`${a==null?void 0:a.format("HH")}`}return"-"}},computeUTCTime(){return(l,a="MMM-DD/HHmm[Z], YYYY")=>{if(l){const t=w(l).utc();return`${t==null?void 0:t.format(a)}`}return"-"}},computeMMMDDHHmmLT(){return(l,a)=>{if(l){const t=w.tz(l,a);return`${t==null?void 0:t.format("MMM-DD/HHmm")}`}return"-"}},computeTzTime(){return(l,a)=>{if(l){const t=w.tz(l,a);return`${t==null?void 0:t.format("yyyy-MM-DD")}`}return"-"}},computeLat(){return(l,a=4)=>X.LngLatHelper.lat2pretty(l,a).pretty},computeLng(){return(l,a=4)=>X.LngLatHelper.lng2pretty(l,a).pretty},roundPrecision(){return(l,a=4)=>isNaN(l)||l===null||l===void 0||isNaN(a)?"-":X.LngLatHelper.roundPrecision(l,a)}},watch:{"reportData.version":{handler(){var l,a,t,d;(l=this.reportData)!=null&&l.version&&(this.positionGmt=(d=(t=(a=this.reportData)==null?void 0:a.weather)==null?void 0:t[0])==null?void 0:d.timezone,this.handleRender())},immediate:!0}},methods:{handleRender(){this.$nextTick(()=>{this.disposeEcharts(),this.handleMeteogramData(this.reportData),this.initHourlyTableData(this.reportData)})},handleMeteogramData(l){var m,b;const a=l.forecastDays||7,t=l.interval||3,d=a>7?6:a>3?3:t,c=((m=this.reportData)==null?void 0:m.datetime)||((b=this.reportData)==null?void 0:b.etime);this.meteogramData={xDates:[],dates:[],hours:[],temperatures:[],weatherIcons:[],weatherNames:[],visibility:[],windspeed:[],windGusts:[],windDir:[],windDirIcons:[],windSpeedReferMax:[],precip:[],sigWaveHeight:[],windWaveHeight:[],swellHeight:[],waveHeightRefer:[],currentSpd:[],sst:[],markarea:[],gridOffset:{l:4,r:4},singleAxisOffset:{}};let i={start:void 0,end:void 0};const h=this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)",p="data:image/svg+xml;base64,"+window.btoa(`<svg t="1740383449285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10797" width="200" height="200"><path d="M133.8 579l-44.4-44.4c-18.8-18.8-18.8-49.2 0-67.8L478 78c18.8-18.8 49.2-18.8 67.8 0l388.6 388.6c18.8 18.8 18.8 49.2 0 67.8L890 578.8c-19 19-50 18.6-68.6-0.8L592 337.2V912c0 26.6-21.4 48-48 48h-64c-26.6 0-48-21.4-48-48V337.2L202.4 578.2c-18.6 19.6-49.6 20-68.6 0.8z" fill="${h}" p-id="10798"></path></svg>`),y=new Image(64,64);y.src=p,y.onload=async()=>{var f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D,s,R,r,Z,Y,G,J,Q,K,e1,t1,a1,l1,i1,U,N,A,h1,m1,p1,r1,n1,o,u1,v1,S1,L1,E1,H1,V1,B1,C1,A1,T1,I1,W1,P1,O1,R1,G1,$1,j1,o1,k1,W,e2,w1,F1,a2;const x=(H=(f=w.tz(c,this.positionGmt))==null?void 0:f.set({hour:0,minute:0,second:0,millisecond:0}))==null?void 0:H.format();for(let s1=0;s1<a*24;s1++)if(s1%t===0){const N1=w(x).clone().add(s1,"h").format();(v=this.meteogramData)==null||v.dates.push(N1);const B=((S=r2.Meteo2Assist.pickHourly(l,N1))==null?void 0:S[0])||{};(k=this.meteogramData)==null||k.temperatures.push(this.roundPrecision((V=B==null?void 0:B.weather)==null?void 0:V.temp,0)),(M=this.meteogramData)==null||M.visibility.push(this.roundPrecision((F=B==null?void 0:B.weather)==null?void 0:F.visibility,1)),(I=this.meteogramData)==null||I.windspeed.push(this.roundPrecision((T=(C=B.weather)==null?void 0:C.wind)==null?void 0:T.kts,1)),(P=this.meteogramData)==null||P.windGusts.push(this.roundPrecision((L=(u=B==null?void 0:B.weather)==null?void 0:u.wind)==null?void 0:L.gusts,1)),(O=this.meteogramData)==null||O.windSpeedReferMax.push(16),(D=this.meteogramData)==null||D.sigWaveHeight.push(this.roundPrecision((z=(_=B==null?void 0:B.wave)==null?void 0:_.sig)==null?void 0:z.height)),(r=this.meteogramData)==null||r.windWaveHeight.push(this.roundPrecision((R=(s=B==null?void 0:B.wave)==null?void 0:s.wd)==null?void 0:R.height)),(G=this.meteogramData)==null||G.swellHeight.push(this.roundPrecision((Y=(Z=B==null?void 0:B.wave)==null?void 0:Z.swell)==null?void 0:Y.height)),(J=this.meteogramData)==null||J.waveHeightRefer.push(1.5);const i2=t===1?"sum1Hours":"sum3Hours";if((e1=this.meteogramData)==null||e1.precip.push(this.roundPrecision((K=(Q=B==null?void 0:B.weather)==null?void 0:Q.precip)==null?void 0:K[i2],1)),(a1=this.meteogramData)==null||a1.currentSpd.push(this.roundPrecision((t1=B==null?void 0:B.current)==null?void 0:t1.kts,1)),(l1=this.meteogramData)==null||l1.sst.push(this.roundPrecision(B==null?void 0:B.sst,0)),t<24&&s1%12===0&&s1%24!==0||t>=24&&s1%24===0?(U=this.meteogramData)==null||U.xDates.push((i1=w.tz(N1,this.positionGmt))==null?void 0:i1.format("MMM-DD")):(N=this.meteogramData)==null||N.xDates.push(""),s1%d===0?(A=this.meteogramData)==null||A.hours.push(this.computeHourLT(N1)):(h1=this.meteogramData)==null||h1.hours.push(""),s1%12===0?((m1=B.weather)!=null&&m1.url?(r1=this.meteogramData)==null||r1.weatherIcons.push({symbol:"image://"+((p1=B.weather)==null?void 0:p1.url),symbolSize:30}):this.meteogramData.weatherIcons.push({symbol:"image://",symbolSize:0}),(o=this.meteogramData)==null||o.weatherNames.push((n1=B.weather)==null?void 0:n1.name)):((u1=this.meteogramData)==null||u1.weatherIcons.push({symbol:"image://",symbolSize:0}),(v1=this.meteogramData)==null||v1.weatherNames.push("")),s1%d===0?(E1=this.meteogramData)==null||E1.windDir.push((L1=(S1=B.weather)==null?void 0:S1.wind)==null?void 0:L1.bearing):(H1=this.meteogramData)==null||H1.windDir.push(void 0),s1%d===0){const M1=document.createElement("canvas"),t2=M1.getContext("2d");M1.width=y.width,M1.height=y.height;const o2=((B1=(V1=B.weather)==null?void 0:V1.wind)==null?void 0:B1.bearing)*(Math.PI/180);t2.translate(M1.width/2,M1.height/2),t2.rotate(o2),t2.translate(-y.width/2,-y.height/2),t2.drawImage(y,0,0,64,64);const s2=M1.toDataURL();this.meteogramData.windDirIcons.push({symbol:"image://"+s2,symbolSize:16})}else this.meteogramData.windDirIcons.push({symbol:"image://",symbolSize:0});(C1=B==null?void 0:B.weather)!=null&&C1.isDay?i.end===void 0&&i.start>=0&&(i.end=s1):i.start===void 0&&(i.start=s1),(i.start>=0&&i.end>=0||i.start>=0&&s1===a*24-1)&&((R1=this.meteogramData)==null||R1.markarea.push([{x:((A1=this.meteogramData)==null?void 0:A1.gridOffset.l)+i.start/(a*24)*(100-((T1=this.meteogramData)==null?void 0:T1.gridOffset.l)-((I1=this.meteogramData)==null?void 0:I1.gridOffset.r))+"%"},{x:((W1=this.meteogramData)==null?void 0:W1.gridOffset.l)+(i.end+1)/(a*24)*(100-((P1=this.meteogramData)==null?void 0:P1.gridOffset.l)-((O1=this.meteogramData)==null?void 0:O1.gridOffset.r))+"%"}]),i={start:void 0,end:void 0})}this.meteogramData.singleAxisOffset.l=((G1=this.meteogramData)==null?void 0:G1.gridOffset.l)+.5/((j1=($1=this.meteogramData)==null?void 0:$1.dates)==null?void 0:j1.length)*(100-((o1=this.meteogramData)==null?void 0:o1.gridOffset.l)-((k1=this.meteogramData)==null?void 0:k1.gridOffset.r))+"%",this.meteogramData.singleAxisOffset.r=((W=this.meteogramData)==null?void 0:W.gridOffset.r)+.5/((w1=(e2=this.meteogramData)==null?void 0:e2.dates)==null?void 0:w1.length)*(100-((F1=this.meteogramData)==null?void 0:F1.gridOffset.l)-((a2=this.meteogramData)==null?void 0:a2.gridOffset.r))+"%",this.$nextTick(()=>{this.initMeteogramEchart(l)})}},initMeteogramEchart(l){var V,k,F,M,C,T,I,u,L,P,O,_,z,D,s,R,r,Z,Y,G,J,Q,K,e1,t1,a1,l1,i1,U,N,A,h1,m1,p1,r1,n1,o,u1,v1,S1,L1,E1,H1,V1,B1,C1,A1,T1,I1,W1,P1,O1,R1,G1,$1,j1,o1,k1,W,e2,w1,F1,a2,s1,N1,B,i2,M1,t2,n2,o2,s2,h2,m2,p2,g2,g,z1,Y1,Z1,U1,q1,X1,J1,$,y2,f2,b2,x2,u2,w2,z2,k2,F2,c1,Q1,g1,E2,H2,V2,B2,C2,A2,T2,I2,W2,P2,O2,R2,G2,$2,j2,Y2,Z2,U2,q2,X2,J2,Q2,K2,e3,t3,a3,l3,i3,o3,s3,r3,n3,c3,d3,h3,m3,p3,g3,y3,f3,b3,x3,u3,w3,z3,k3,F3,D3;const a=l.interval||3;let t=Math.max(...this.meteogramData.temperatures.filter(n=>typeof n=="number"&&!isNaN(n))),d=Math.min(...this.meteogramData.temperatures.filter(n=>typeof n=="number"&&!isNaN(n))),c=Math.floor(d/5)*5,i=Math.ceil(t/5)*5,h=Math.ceil((i-c)/5);c=Math.floor((c-2*h)/5)*5,i=Math.ceil((i+1)/5)*5,h=Math.ceil((i-c)/5);let p="";a===1?(p=this.locale==="zhHans"?"1小时降水 ( mm ) ":"Precip.1h ( mm ) ",this.locale,this.locale,this.locale,this.locale):(p=this.locale==="zhHans"?"3小时降水 ( mm ) ":"Precip.3h ( mm ) ",this.locale,this.locale,this.locale,this.locale);let y,m={title:{text:this.locale==="zhHans"?"温度":"Temperature",top:"10px",left:0,textStyle:{fontWeight:"500",fontSize:16,color:this.theme==="dark"?"rgba(255, 255, 255, 1)":"rgba(28,31,35,1)"}},grid:{show:!0,bottom:"20%",top:"40px",left:`${this.meteogramData.gridOffset.l}%`,right:`${this.meteogramData.gridOffset.r}%`,borderColor:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.4)",borderWidth:1,z:1,zlevel:1},tooltip:{trigger:"axis",show:!0,position:"right",formatter:n=>{var y1,f1,b1,x1;const _1=(y1=n==null?void 0:n.find(E=>E.seriesType==="line"))==null?void 0:y1.dataIndex;return n.find(E=>E.seriesType==="scatter")?!1:`<div style="font-size: 13px;"><strong>${w.tz((f1=this.meteogramData)==null?void 0:f1.dates[_1],this.positionGmt).format("MMM-DD/HHmm[LT]")}</strong></div>
|
|
69
|
+
</svg>`;return btoa(unescape(encodeURIComponent(t)))},async convertSvgUrlToBase64(l){try{const t=await(await fetch(l)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}catch(a){return console.warn("SVG conversion error:",a),l}}}},W3={class:"idm-spot-forecast-report"},P3={class:"row"},O3={class:"col",style:{width:"54%"}},R3={key:0,style:{"margin-left":"8px"}},G3={key:1,style:{"margin-left":"8px"}},$3={key:0,class:"col",style:{width:"42%"}},j3={style:{"margin-left":"8px"}},Y3={key:1,class:"col",style:{width:"42%"}},Z3={style:{"margin-left":"8px"}},U3={class:"row"},q3={class:"col",style:{width:"54%"}},X3={style:{"margin-left":"8px"}},J3={class:"col",style:{width:"42%"}},Q3={style:{"margin-left":"8px"}},K3={class:"content-box"},e6={key:0,class:"meteogram-echart-section"},t6={key:2,id:"weatherIconsEchart"},a6={key:3,id:"weatherConditionEchart"},l6={key:4,id:"windIconsEchart"},i6={key:5,id:"windEchart"},o6={key:6},s6={key:7,id:"waveChart"},r6={class:"table-section"},n6={key:0,class:"card"},c6={class:"date"},d6={class:"",style:{"font-size":"16px","font-weight":"500"}},h6={rowspan:"2",colspan:"1",class:"border",style:{width:"90px"}},m6={rowspan:"1",colspan:"1",class:"border"},p6={rowspan:"1",colspan:"1",class:"border"},g6={rowspan:"1",colspan:"1",class:"border"},y6={rowspan:"1",colspan:"4",class:"border"},f6={rowspan:"1",colspan:"3",class:"border"},b6={rowspan:"1",colspan:"3",class:"border"},x6={rowspan:"1",colspan:"3",class:"border"},u6={rowspan:"1",colspan:"2",class:"border"},w6={rowspan:"1",colspan:"1",class:"border"},z6={rowspan:"1",colspan:"1",class:"border"},k6={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},F6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},D6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},N6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},M6={rowspan:"1",colspan:"1",class:"border",style:{width:"30px"}},_6={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},v6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},S6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},L6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},E6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},H6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},V6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},B6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},C6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},A6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},T6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},I6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},W6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},P6={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}},O6={rowspan:"1",colspan:"1",class:"border",style:{width:"90px"}},R6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},G6={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},$6={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},j6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Y6=["src"],Z6={key:1},U6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},q6={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},X6={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},J6=["src"],Q6={key:1},K6={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},e0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},t0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},a0=["src"],l0={key:1},i0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},o0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},s0=["src"],r0={key:1},n0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},c0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},d0=["src"],h0={key:1},m0={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},p0={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},g0={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}};function y0(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",W3,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",P3,[e.createElementVNode("div",O3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",R3,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",G3,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),(b=t.reportData)!=null&&b.datetime?(e.openBlock(),e.createElementBlock("div",$3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报时段":"Forecast Period")+":",3),e.createElementVNode("span",j3,e.toDisplayString(i.computeTzTime((f=(x=t.reportData)==null?void 0:x.dateRange)==null?void 0:f[0],c.positionGmt))+" ~ "+e.toDisplayString(i.computeTzTime((v=(H=t.reportData)==null?void 0:H.dateRange)==null?void 0:v[1],c.positionGmt)),1)])):(e.openBlock(),e.createElementBlock("div",Y3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报天数":"Forecast Days")+":",3),e.createElementVNode("span",Z3,e.toDisplayString((S=t.reportData)==null?void 0:S.forecastDays)+" "+e.toDisplayString(t.locale==="zhHans"?"天":"Days"),1)]))]),e.createElementVNode("div",U3,[e.createElementVNode("div",q3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",X3,"UTC "+e.toDisplayString((V=t.reportData)==null?void 0:V.positionOffset),1)]),e.createElementVNode("div",J3,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报模式":"Forecast Model")+":",3),e.createElementVNode("span",Q3,e.toDisplayString((k=t.reportData)==null?void 0:k.forecastModel),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",K3,[(F=t.reportData)!=null&&F.showWeatherChart||(M=t.reportData)!=null&&M.showWindChart||(C=t.reportData)!=null&&C.showWaveChart?(e.openBlock(),e.createElementBlock("div",e6,[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):t.reportData?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)),!t.loading&&((T=t.reportData)!=null&&T.showWeatherChart)?(e.openBlock(),e.createElementBlock("div",t6)):e.createCommentVNode("",!0),!t.loading&&((I=t.reportData)!=null&&I.showWeatherChart)?(e.openBlock(),e.createElementBlock("div",a6)):e.createCommentVNode("",!0),!t.loading&&((u=t.reportData)!=null&&u.showWindChart)?(e.openBlock(),e.createElementBlock("div",l6)):e.createCommentVNode("",!0),!t.loading&&((L=t.reportData)!=null&&L.showWindChart)?(e.openBlock(),e.createElementBlock("div",i6)):e.createCommentVNode("",!0),(P=t.reportData)!=null&&P.showWeatherChart&&((O=t.reportData)!=null&&O.showWindChart)?(e.openBlock(),e.createElementBlock("div",o6)):e.createCommentVNode("",!0),!t.loading&&((_=t.reportData)!=null&&_.showWaveChart)?(e.openBlock(),e.createElementBlock("div",s6)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",r6,[t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",n6,[e.createElementVNode("div",c6,[e.createElementVNode("div",d6,e.toDisplayString(t.locale==="zhHans"?"小时预报":"Hourly Forecast"),1),e.createElementVNode("div",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"]),style:{"font-size":"13px","font-weight":"300"}}," * "+e.toDisplayString(t.locale==="zhHans"?"涌浪、显浪高度>=1.5米时标记为黄色, 风速蒲福等级>=4时标记为黄色。":"Swell or Sig.wave height alert in yellow for value>=1.5m, wind speed alert in yellow for beaufort scale >= 4."),3)]),e.createElementVNode("table",{class:e.normalizeClass(["conditions-table",(z=t.reportData)!=null&&z.showSummary?"":"table-header-fixed"])},[e.createElementVNode("thead",{class:e.normalizeClass(t.theme==="dark"?"dark":"light")},[e.createElementVNode("tr",{class:e.normalizeClass(["day",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("th",h6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"时间":"DateTime"),1),a[0]||(a[0]=e.createElementVNode("br",null,null,-1)),a[1]||(a[1]=e.createTextVNode("(LT)",-1))]),e.createElementVNode("th",m6,e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),e.createElementVNode("th",p6,e.toDisplayString(t.locale==="zhHans"?`${t.reportData.interval}小时降水`:`Precip.${t.reportData.interval}h`),1),e.createElementVNode("th",g6,e.toDisplayString(t.locale==="zhHans"?"能见度":"Visibility"),1),e.createElementVNode("th",y6,e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),1),e.createElementVNode("th",f6,e.toDisplayString(t.locale==="zhHans"?"风浪":"Wind wave"),1),e.createElementVNode("th",b6,e.toDisplayString(t.locale==="zhHans"?"涌浪":"Swell wave"),1),e.createElementVNode("th",x6,e.toDisplayString(t.locale==="zhHans"?"显浪":"Sig.wave"),1),e.createElementVNode("th",u6,e.toDisplayString(t.locale==="zhHans"?"洋流":"Current"),1),e.createElementVNode("th",w6,e.toDisplayString(t.locale==="zhHans"?"海面":"Sea Level"),1),e.createElementVNode("th",z6,e.toDisplayString(t.locale==="zhHans"?"海表":"Sea Surface"),1)],2),e.createElementVNode("tr",{class:e.normalizeClass(["hour",t.theme==="dark"?"dark":"light"])},[a[28]||(a[28]=e.createElementVNode("th",{rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},"°C",-1)),e.createElementVNode("th",k6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"累计":"Acc"),1),a[2]||(a[2]=e.createElementVNode("br",null,null,-1)),a[3]||(a[3]=e.createTextVNode("(mm)",-1))]),e.createElementVNode("th",F6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"距离":"Dist"),1),a[4]||(a[4]=e.createElementVNode("br",null,null,-1)),a[5]||(a[5]=e.createTextVNode("(nm)",-1))]),e.createElementVNode("th",D6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",N6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),a[7]||(a[7]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",M6,e.toDisplayString(t.locale==="zhHans"?"等级":"BF"),1),e.createElementVNode("th",_6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"阵风":"Gusts"),1),a[8]||(a[8]=e.createElementVNode("br",null,null,-1)),a[9]||(a[9]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",v6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",S6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[10]||(a[10]=e.createElementVNode("br",null,null,-1)),a[11]||(a[11]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",L6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[12]||(a[12]=e.createElementVNode("br",null,null,-1)),a[13]||(a[13]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",E6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",H6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[14]||(a[14]=e.createElementVNode("br",null,null,-1)),a[15]||(a[15]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",V6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[16]||(a[16]=e.createElementVNode("br",null,null,-1)),a[17]||(a[17]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",B6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",C6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[18]||(a[18]=e.createElementVNode("br",null,null,-1)),a[19]||(a[19]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",A6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[20]||(a[20]=e.createElementVNode("br",null,null,-1)),a[21]||(a[21]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",T6,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",I6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[22]||(a[22]=e.createElementVNode("br",null,null,-1)),a[23]||(a[23]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",W6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[24]||(a[24]=e.createElementVNode("br",null,null,-1)),a[25]||(a[25]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",P6,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),a[26]||(a[26]=e.createElementVNode("br",null,null,-1)),a[27]||(a[27]=e.createTextVNode("(°C)",-1))])],2)],2),e.createElementVNode("tbody",{class:e.normalizeClass((D=t.reportData)!=null&&D.showSummary?"":"scroll")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.hourlyTableData,s=>(e.openBlock(),e.createElementBlock("tr",{key:Math.random()+s.localDate,class:e.normalizeClass(["text border-bottom",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("td",O6,[e.createElementVNode("div",null,e.toDisplayString(s.localDate),1)]),e.createElementVNode("td",R6,[e.createElementVNode("div",null,e.toDisplayString(s.temp),1)]),e.createElementVNode("td",G6,e.toDisplayString(s.precipSum),1),e.createElementVNode("td",$6,e.toDisplayString(s.visibility),1),e.createElementVNode("td",j6,[e.createTextVNode(e.toDisplayString(s.windDir)+" ",1),!isNaN(s.windBearing)&&s.windDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWindArrowBase64(s.windBearing,this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Y6)):(e.openBlock(),e.createElementBlock("span",Z6,"-"))]),e.createElementVNode("td",U6,e.toDisplayString(s.windSpeed),1),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.windBF>=4?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"30px"}},e.toDisplayString(s.windBF),3),e.createElementVNode("td",q6,e.toDisplayString(s.windGusts),1),e.createElementVNode("td",X6,[e.createTextVNode(e.toDisplayString(s.windWaveDir)+" ",1),!isNaN(s.windWaveBearing)&&s.windWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.windWaveBearing,(this.theme==="dark","#7cc7b3"))}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,J6)):(e.openBlock(),e.createElementBlock("span",Q6,"-"))]),e.createElementVNode("td",K6,e.toDisplayString(s.windWaveHeight),1),e.createElementVNode("td",e0,e.toDisplayString(s.windWavePeriod),1),e.createElementVNode("td",t0,[e.createTextVNode(e.toDisplayString(s.swellDir)+" ",1),!isNaN(s.swellBearing)&&s.swellDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.swellBearing,this.theme==="dark"?"rgb(17, 245, 211)":"rgba(0, 230, 194, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,a0)):(e.openBlock(),e.createElementBlock("span",l0,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.swellHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.swellHeight),3),e.createElementVNode("td",i0,e.toDisplayString(s.swellPeriod),1),e.createElementVNode("td",o0,[e.createTextVNode(e.toDisplayString(s.sigWaveDir)+" ",1),!isNaN(s.sigWaveBearing)&&s.sigWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.sigWaveBearing,this.theme==="dark"?"rgba(89, 199, 211, 1)":"rgba(1, 189, 211, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,s0)):(e.openBlock(),e.createElementBlock("span",r0,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.sigWaveHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.sigWaveHeight),3),e.createElementVNode("td",n0,e.toDisplayString(s.sigWavePeriod),1),e.createElementVNode("td",c0,[e.createTextVNode(e.toDisplayString(s.currentDir)+" ",1),!isNaN(s.currentBearing)&&s.currentDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.currentBearing,this.theme==="dark"?"rgba(220, 115, 255, 1)":"rgba(178, 51, 220, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,d0)):(e.openBlock(),e.createElementBlock("span",h0,"-"))]),e.createElementVNode("td",m0,e.toDisplayString(s.currentSpd),1),e.createElementVNode("td",p0,e.toDisplayString(s.seaLevel),1),e.createElementVNode("td",g0,e.toDisplayString(s.seaSurfaceTemp),1)],2))),128))],2)],2)]))])])])}const M2=K1(I3,[["render",y0],["__scopeId","data-v-ab9fbff0"]]),s4="",f0={name:"IdmHistorical",components:{IdmLoading:d2},props:{reportData:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},theme:{type:String,default:"light"},locale:{type:String,default:"en"}},data(){return{positionGmt:void 0,meteogramData:void 0,hourlyTableData:[]}},computed:{computeHourLT(){return l=>{if(l){const a=w.tz(l,this.positionGmt);return`${a==null?void 0:a.format("HH")}`}return"-"}},computeUTCTime(){return(l,a="MMM-DD/HHmm[Z], YYYY")=>{if(l){const t=w(l).utc();return`${t==null?void 0:t.format(a)}`}return"-"}},computeMMMDDHHmmLT(){return(l,a)=>{if(l){const t=w.tz(l,a);return`${t==null?void 0:t.format("MMM-DD/HHmm")}`}return"-"}},computeTzTime(){return(l,a)=>{if(l){const t=w.tz(l,a);return`${t==null?void 0:t.format("yyyy-MM-DD")}`}return"-"}},computeLat(){return(l,a=4)=>X.LngLatHelper.lat2pretty(l,a).pretty},computeLng(){return(l,a=4)=>X.LngLatHelper.lng2pretty(l,a).pretty},roundPrecision(){return(l,a=4)=>isNaN(l)||l===null||l===void 0||isNaN(a)?"-":X.LngLatHelper.roundPrecision(l,a)}},watch:{"reportData.version":{handler(){var l,a,t,d;(l=this.reportData)!=null&&l.version&&(this.positionGmt=(d=(t=(a=this.reportData)==null?void 0:a.weather)==null?void 0:t[0])==null?void 0:d.timezone,this.handleRender())},immediate:!0}},methods:{handleRender(){this.$nextTick(()=>{this.disposeEcharts(),this.handleMeteogramData(this.reportData),this.initHourlyTableData(this.reportData)})},handleMeteogramData(l){var m,b;const a=l.forecastDays||7,t=l.interval||3,d=a>7?6:a>3?3:t,c=((m=this.reportData)==null?void 0:m.datetime)||((b=this.reportData)==null?void 0:b.etime);this.meteogramData={xDates:[],dates:[],hours:[],temperatures:[],weatherIcons:[],weatherNames:[],visibility:[],windspeed:[],windGusts:[],windDir:[],windDirIcons:[],windSpeedReferMax:[],precip:[],sigWaveHeight:[],windWaveHeight:[],swellHeight:[],waveHeightRefer:[],currentSpd:[],sst:[],markarea:[],gridOffset:{l:4,r:4},singleAxisOffset:{}};let i={start:void 0,end:void 0};const h=this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)",p="data:image/svg+xml;base64,"+window.btoa(`<svg t="1740383449285" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10797" width="200" height="200"><path d="M133.8 579l-44.4-44.4c-18.8-18.8-18.8-49.2 0-67.8L478 78c18.8-18.8 49.2-18.8 67.8 0l388.6 388.6c18.8 18.8 18.8 49.2 0 67.8L890 578.8c-19 19-50 18.6-68.6-0.8L592 337.2V912c0 26.6-21.4 48-48 48h-64c-26.6 0-48-21.4-48-48V337.2L202.4 578.2c-18.6 19.6-49.6 20-68.6 0.8z" fill="${h}" p-id="10798"></path></svg>`),y=new Image(64,64);y.src=p,y.onload=async()=>{var f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D,s,R,r,Z,Y,G,J,Q,K,e1,t1,a1,l1,i1,U,N,A,h1,m1,p1,r1,n1,o,u1,v1,S1,L1,E1,H1,V1,B1,C1,A1,T1,I1,W1,P1,O1,R1,G1,$1,j1,o1,k1,W,e2,w1,F1,a2;const x=(H=(f=w.tz(c,this.positionGmt))==null?void 0:f.set({hour:0,minute:0,second:0,millisecond:0}))==null?void 0:H.format();for(let s1=0;s1<a*24;s1++)if(s1%t===0){const N1=w(x).clone().add(s1,"h").format();(v=this.meteogramData)==null||v.dates.push(N1);const B=((S=r2.Meteo2Assist.pickHourly(l,N1))==null?void 0:S[0])||{};(k=this.meteogramData)==null||k.temperatures.push(this.roundPrecision((V=B==null?void 0:B.weather)==null?void 0:V.temp,0)),(M=this.meteogramData)==null||M.visibility.push(this.roundPrecision((F=B==null?void 0:B.weather)==null?void 0:F.visibility,1)),(I=this.meteogramData)==null||I.windspeed.push(this.roundPrecision((T=(C=B.weather)==null?void 0:C.wind)==null?void 0:T.kts,1)),(P=this.meteogramData)==null||P.windGusts.push(this.roundPrecision((L=(u=B==null?void 0:B.weather)==null?void 0:u.wind)==null?void 0:L.gusts,1)),(O=this.meteogramData)==null||O.windSpeedReferMax.push(16),(D=this.meteogramData)==null||D.sigWaveHeight.push(this.roundPrecision((z=(_=B==null?void 0:B.wave)==null?void 0:_.sig)==null?void 0:z.height)),(r=this.meteogramData)==null||r.windWaveHeight.push(this.roundPrecision((R=(s=B==null?void 0:B.wave)==null?void 0:s.wd)==null?void 0:R.height)),(G=this.meteogramData)==null||G.swellHeight.push(this.roundPrecision((Y=(Z=B==null?void 0:B.wave)==null?void 0:Z.swell)==null?void 0:Y.height)),(J=this.meteogramData)==null||J.waveHeightRefer.push(1.5);const i2=t===1?"sum1Hours":"sum3Hours";if((e1=this.meteogramData)==null||e1.precip.push(this.roundPrecision((K=(Q=B==null?void 0:B.weather)==null?void 0:Q.precip)==null?void 0:K[i2],1)),(a1=this.meteogramData)==null||a1.currentSpd.push(this.roundPrecision((t1=B==null?void 0:B.current)==null?void 0:t1.kts,1)),(l1=this.meteogramData)==null||l1.sst.push(this.roundPrecision(B==null?void 0:B.sst,0)),t<24&&s1%12===0&&s1%24!==0||t>=24&&s1%24===0?(U=this.meteogramData)==null||U.xDates.push((i1=w.tz(N1,this.positionGmt))==null?void 0:i1.format("MMM-DD")):(N=this.meteogramData)==null||N.xDates.push(""),s1%d===0?(A=this.meteogramData)==null||A.hours.push(this.computeHourLT(N1)):(h1=this.meteogramData)==null||h1.hours.push(""),s1%12===0?((m1=B.weather)!=null&&m1.url?(r1=this.meteogramData)==null||r1.weatherIcons.push({symbol:"image://"+((p1=B.weather)==null?void 0:p1.url),symbolSize:30}):this.meteogramData.weatherIcons.push({symbol:"image://",symbolSize:0}),(o=this.meteogramData)==null||o.weatherNames.push((n1=B.weather)==null?void 0:n1.name)):((u1=this.meteogramData)==null||u1.weatherIcons.push({symbol:"image://",symbolSize:0}),(v1=this.meteogramData)==null||v1.weatherNames.push("")),s1%d===0?(E1=this.meteogramData)==null||E1.windDir.push((L1=(S1=B.weather)==null?void 0:S1.wind)==null?void 0:L1.bearing):(H1=this.meteogramData)==null||H1.windDir.push(void 0),s1%d===0){const M1=document.createElement("canvas"),t2=M1.getContext("2d");M1.width=y.width,M1.height=y.height;const o2=((B1=(V1=B.weather)==null?void 0:V1.wind)==null?void 0:B1.bearing)*(Math.PI/180);t2.translate(M1.width/2,M1.height/2),t2.rotate(o2),t2.translate(-y.width/2,-y.height/2),t2.drawImage(y,0,0,64,64);const s2=M1.toDataURL();this.meteogramData.windDirIcons.push({symbol:"image://"+s2,symbolSize:16})}else this.meteogramData.windDirIcons.push({symbol:"image://",symbolSize:0});(C1=B==null?void 0:B.weather)!=null&&C1.isDay?i.end===void 0&&i.start>=0&&(i.end=s1):i.start===void 0&&(i.start=s1),(i.start>=0&&i.end>=0||i.start>=0&&s1===a*24-1)&&((R1=this.meteogramData)==null||R1.markarea.push([{x:((A1=this.meteogramData)==null?void 0:A1.gridOffset.l)+i.start/(a*24)*(100-((T1=this.meteogramData)==null?void 0:T1.gridOffset.l)-((I1=this.meteogramData)==null?void 0:I1.gridOffset.r))+"%"},{x:((W1=this.meteogramData)==null?void 0:W1.gridOffset.l)+(i.end+1)/(a*24)*(100-((P1=this.meteogramData)==null?void 0:P1.gridOffset.l)-((O1=this.meteogramData)==null?void 0:O1.gridOffset.r))+"%"}]),i={start:void 0,end:void 0})}this.meteogramData.singleAxisOffset.l=((G1=this.meteogramData)==null?void 0:G1.gridOffset.l)+.5/((j1=($1=this.meteogramData)==null?void 0:$1.dates)==null?void 0:j1.length)*(100-((o1=this.meteogramData)==null?void 0:o1.gridOffset.l)-((k1=this.meteogramData)==null?void 0:k1.gridOffset.r))+"%",this.meteogramData.singleAxisOffset.r=((W=this.meteogramData)==null?void 0:W.gridOffset.r)+.5/((w1=(e2=this.meteogramData)==null?void 0:e2.dates)==null?void 0:w1.length)*(100-((F1=this.meteogramData)==null?void 0:F1.gridOffset.l)-((a2=this.meteogramData)==null?void 0:a2.gridOffset.r))+"%",this.$nextTick(()=>{this.initMeteogramEchart(l)})}},initMeteogramEchart(l){var V,k,F,M,C,T,I,u,L,P,O,_,z,D,s,R,r,Z,Y,G,J,Q,K,e1,t1,a1,l1,i1,U,N,A,h1,m1,p1,r1,n1,o,u1,v1,S1,L1,E1,H1,V1,B1,C1,A1,T1,I1,W1,P1,O1,R1,G1,$1,j1,o1,k1,W,e2,w1,F1,a2,s1,N1,B,i2,M1,t2,n2,o2,s2,h2,m2,p2,g2,g,z1,Y1,Z1,U1,q1,X1,J1,$,y2,f2,b2,x2,u2,w2,z2,k2,F2,c1,Q1,g1,E2,H2,V2,B2,C2,A2,T2,I2,W2,P2,O2,R2,G2,$2,j2,Y2,Z2,U2,q2,X2,J2,Q2,K2,e3,t3,a3,l3,i3,o3,s3,r3,n3,c3,d3,h3,m3,p3,g3,y3,f3,b3,x3,u3,w3,z3,k3,F3,D3;const a=l.interval||3;let t=Math.max(...this.meteogramData.temperatures.filter(n=>typeof n=="number"&&!isNaN(n))),d=Math.min(...this.meteogramData.temperatures.filter(n=>typeof n=="number"&&!isNaN(n))),c=Math.floor(d/5)*5,i=Math.ceil(t/5)*5,h=Math.ceil((i-c)/5);c=Math.floor((c-2*h)/5)*5,i=Math.ceil((i+1)/5)*5,h=Math.ceil((i-c)/5);let p="";a===1?(p=this.locale==="zhHans"?"1小时降水 ( mm ) ":"Precip.1h ( mm ) ",this.locale,this.locale,this.locale,this.locale):(p=this.locale==="zhHans"?"3小时降水 ( mm ) ":"Precip.3h ( mm ) ",this.locale,this.locale,this.locale,this.locale);let y,m={title:{text:this.locale==="zhHans"?"温度":"Temperature",top:"10px",left:0,textStyle:{fontWeight:"500",fontSize:16,color:this.theme==="dark"?"rgba(255, 255, 255, 1)":"rgba(28,31,35,1)"}},grid:{show:!0,bottom:"20%",top:"40px",left:`${this.meteogramData.gridOffset.l}%`,right:`${this.meteogramData.gridOffset.r}%`,borderColor:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(0, 0, 0, 0.4)",borderWidth:1,z:1,zlevel:1},tooltip:{trigger:"axis",show:!0,position:"right",formatter:n=>{var y1,f1,b1,x1;const _1=(y1=n==null?void 0:n.find(E=>E.seriesType==="line"))==null?void 0:y1.dataIndex;return n.find(E=>E.seriesType==="scatter")?!1:`<div style="font-size: 13px;"><strong>${w.tz((f1=this.meteogramData)==null?void 0:f1.dates[_1],this.positionGmt).format("MMM-DD/HHmm[LT]")}</strong></div>
|
|
70
70
|
<div style="font-size: 13px;display: ${isNaN((b1=n==null?void 0:n.find(E=>E.seriesName==="Temperature"||E.seriesName==="温度"))==null?void 0:b1.value)?"none":"block"}">
|
|
71
71
|
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: ${this.theme==="dark"?"rgba(255, 161, 0, 1)":"rgba(242, 153, 56, 1)"};}"></span>
|
|
72
72
|
<span>${this.locale==="zhHans"?"温度: ":"Temperature: "}</span>
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<g transform="rotate(${l}, 512, 512)">
|
|
139
139
|
<path d="M128 896l384-768 384 768-384-128-384 128z" fill="${a}" p-id="9615"></path>
|
|
140
140
|
</g>
|
|
141
|
-
</svg>`;return btoa(unescape(encodeURIComponent(t)))},async convertSvgUrlToBase64(l){try{const t=await(await fetch(l)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}catch(a){return console.warn("SVG conversion error:",a),l}}}},b0={class:"idm-spot-historical-report"},x0={class:"row"},u0={class:"col",style:{width:"54%"}},w0={key:0,style:{"margin-left":"8px"}},z0={key:1,style:{"margin-left":"8px"}},k0={class:"col",style:{width:"42%"}},F0={style:{"margin-left":"8px"}},D0={class:"row"},N0={class:"col",style:{width:"54%"}},M0={style:{"margin-left":"8px"}},_0={class:"content-box"},v0={key:0,class:"meteogram-echart-section"},S0={key:2,id:"tempEchart"},L0={key:3,id:"precipEchart"},E0={key:4,id:"windIconsEchart"},H0={key:5,id:"windEchart"},V0={key:6,id:"waveEchart"},B0={key:7,id:"currentEchart"},C0={key:8,id:"sstEchart"},A0={class:"hourly-table-section"},T0={key:0,class:"card"},I0={class:"date"},W0={class:"",style:{"font-size":"16px","font-weight":"500"}},P0={rowspan:"2",colspan:"1",class:"border",style:{width:"90px"}},O0={rowspan:"1",colspan:"1",class:"border"},R0={rowspan:"1",colspan:"1",class:"border"},G0={rowspan:"1",colspan:"1",class:"border"},$0={rowspan:"1",colspan:"4",class:"border"},j0={rowspan:"1",colspan:"3",class:"border"},Y0={rowspan:"1",colspan:"3",class:"border"},Z0={rowspan:"1",colspan:"3",class:"border"},U0={rowspan:"1",colspan:"2",class:"border"},q0={rowspan:"1",colspan:"1",class:"border"},X0={rowspan:"1",colspan:"1",class:"border"},J0={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},Q0={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},K0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},ee={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},te={rowspan:"1",colspan:"1",class:"border",style:{width:"30px"}},ae={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},le={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},ie={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},oe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},se={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},re={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ne={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ce={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},de={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},he={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},me={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},pe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ge={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},ye={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}},fe={rowspan:"1",colspan:"1",class:"border",style:{width:"90px"}},be={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},xe={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},ue={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},we={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},ze=["src"],ke={key:1},Fe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},De={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},Ne={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Me=["src"],_e={key:1},ve={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Se={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Le={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Ee=["src"],He={key:1},Ve={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Be={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Ce=["src"],Ae={key:1},Te={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Ie={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},We=["src"],Pe={key:1},Oe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Re={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},Ge={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}};function $e(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",b0,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",x0,[e.createElementVNode("div",u0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",w0,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",z0,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),e.createElementVNode("div",k0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"历史时段":"History Period")+":",3),e.createElementVNode("span",F0,e.toDisplayString(i.computeTzTime((x=(b=t.reportData)==null?void 0:b.dateRange)==null?void 0:x[0],c.positionGmt))+" ~ "+e.toDisplayString(i.computeTzTime((H=(f=t.reportData)==null?void 0:f.dateRange)==null?void 0:H[1],c.positionGmt)),1)])]),e.createElementVNode("div",D0,[e.createElementVNode("div",N0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",M0,"UTC "+e.toDisplayString((v=t.reportData)==null?void 0:v.positionOffset),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",_0,[(S=t.reportData)!=null&&S.showTempChart||(V=t.reportData)!=null&&V.showPrecipChart||(k=t.reportData)!=null&&k.showWindChart||(F=t.reportData)!=null&&F.showWaveChart||(M=t.reportData)!=null&&M.showCurrentChart||(C=t.reportData)!=null&&C.showSstChart?(e.openBlock(),e.createElementBlock("div",v0,[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):t.reportData?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)),!t.loading&&((T=t.reportData)!=null&&T.showTempChart)?(e.openBlock(),e.createElementBlock("div",S0)):e.createCommentVNode("",!0),!t.loading&&((I=t.reportData)!=null&&I.showPrecipChart)?(e.openBlock(),e.createElementBlock("div",L0)):e.createCommentVNode("",!0),!t.loading&&((u=t.reportData)!=null&&u.showWindChart)?(e.openBlock(),e.createElementBlock("div",E0)):e.createCommentVNode("",!0),!t.loading&&((L=t.reportData)!=null&&L.showWindChart)?(e.openBlock(),e.createElementBlock("div",H0)):e.createCommentVNode("",!0),!t.loading&&((P=t.reportData)!=null&&P.showWaveChart)?(e.openBlock(),e.createElementBlock("div",V0)):e.createCommentVNode("",!0),!t.loading&&((O=t.reportData)!=null&&O.showCurrentChart)?(e.openBlock(),e.createElementBlock("div",B0)):e.createCommentVNode("",!0),!t.loading&&((_=t.reportData)!=null&&_.showSstChart)?(e.openBlock(),e.createElementBlock("div",C0)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",A0,[t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",T0,[e.createElementVNode("div",I0,[e.createElementVNode("div",W0,e.toDisplayString(t.locale==="zhHans"?"小时预报":"Hourly Forecast"),1),e.createElementVNode("div",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"]),style:{"font-size":"14px","font-weight":"300"}}," * "+e.toDisplayString(t.locale==="zhHans"?"涌浪、显浪高度>=1.5米时标记为黄色, 风速蒲福等级>=4时标记为黄色。":"Swell or Sig.wave height alert in yellow for value>=1.5m, wind speed alert in yellow for beaufort scale >= 4."),3)]),e.createElementVNode("table",{class:e.normalizeClass(["conditions-table",(z=t.reportData)!=null&&z.showSummary?"":"table-header-fixed"])},[e.createElementVNode("thead",{class:e.normalizeClass(t.theme==="dark"?"dark":"light")},[e.createElementVNode("tr",{class:e.normalizeClass(["day tr-title",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("th",P0,e.toDisplayString(t.locale==="zhHans"?"时间(LT)":"DateTime (LT)"),1),e.createElementVNode("th",O0,e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),e.createElementVNode("th",R0,e.toDisplayString(t.locale==="zhHans"?"3小时降水":"Precip.3h"),1),e.createElementVNode("th",G0,e.toDisplayString(t.locale==="zhHans"?"能见度":"Visibility"),1),e.createElementVNode("th",$0,e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),1),e.createElementVNode("th",j0,e.toDisplayString(t.locale==="zhHans"?"风浪":"Wind wave"),1),e.createElementVNode("th",Y0,e.toDisplayString(t.locale==="zhHans"?"涌浪":"Swell wave"),1),e.createElementVNode("th",Z0,e.toDisplayString(t.locale==="zhHans"?"显浪":"Sig.wave"),1),e.createElementVNode("th",U0,e.toDisplayString(t.locale==="zhHans"?"洋流":"Current"),1),e.createElementVNode("th",q0,e.toDisplayString(t.locale==="zhHans"?"海面":"Sea Level"),1),e.createElementVNode("th",X0,e.toDisplayString(t.locale==="zhHans"?"海表":"Sea Surface"),1)],2),e.createElementVNode("tr",{class:e.normalizeClass(["hour tr-title",t.theme==="dark"?"dark":"light"])},[a[26]||(a[26]=e.createElementVNode("th",{rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},"°C",-1)),e.createElementVNode("th",J0,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"累计":"Acc"),1),a[0]||(a[0]=e.createElementVNode("br",null,null,-1)),a[1]||(a[1]=e.createTextVNode("(mm)",-1))]),e.createElementVNode("th",Q0,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"距离":"Dist"),1),a[2]||(a[2]=e.createElementVNode("br",null,null,-1)),a[3]||(a[3]=e.createTextVNode("(nm)",-1))]),e.createElementVNode("th",K0,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",ee,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[4]||(a[4]=e.createElementVNode("br",null,null,-1)),a[5]||(a[5]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",te,e.toDisplayString(t.locale==="zhHans"?"等级":"BF"),1),e.createElementVNode("th",ae,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"阵风":"Gusts"),1),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),a[7]||(a[7]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",le,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",ie,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[8]||(a[8]=e.createElementVNode("br",null,null,-1)),a[9]||(a[9]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",oe,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[10]||(a[10]=e.createElementVNode("br",null,null,-1)),a[11]||(a[11]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",se,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",re,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[12]||(a[12]=e.createElementVNode("br",null,null,-1)),a[13]||(a[13]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",ne,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[14]||(a[14]=e.createElementVNode("br",null,null,-1)),a[15]||(a[15]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",ce,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",de,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[16]||(a[16]=e.createElementVNode("br",null,null,-1)),a[17]||(a[17]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",he,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[18]||(a[18]=e.createElementVNode("br",null,null,-1)),a[19]||(a[19]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",me,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",pe,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[20]||(a[20]=e.createElementVNode("br",null,null,-1)),a[21]||(a[21]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",ge,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[22]||(a[22]=e.createElementVNode("br",null,null,-1)),a[23]||(a[23]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",ye,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),a[24]||(a[24]=e.createElementVNode("br",null,null,-1)),a[25]||(a[25]=e.createTextVNode("(°C)",-1))])],2)],2),e.createElementVNode("tbody",{class:e.normalizeClass((D=t.reportData)!=null&&D.showSummary?"":"scroll")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.hourlyTableData,s=>(e.openBlock(),e.createElementBlock("tr",{key:Math.random()+s.localDate,class:e.normalizeClass(["text border-bottom",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("td",fe,[e.createElementVNode("div",null,e.toDisplayString(s.localDate),1)]),e.createElementVNode("td",be,[e.createElementVNode("div",null,e.toDisplayString(s.temp),1)]),e.createElementVNode("td",xe,e.toDisplayString(s.precipSum),1),e.createElementVNode("td",ue,e.toDisplayString(s.visibility),1),e.createElementVNode("td",we,[e.createTextVNode(e.toDisplayString(s.windDir)+" ",1),!isNaN(s.windBearing)&&s.windDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWindArrowBase64(s.windBearing,this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,ze)):(e.openBlock(),e.createElementBlock("span",ke,"-"))]),e.createElementVNode("td",Fe,e.toDisplayString(s.windSpeed),1),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.windBF>=4?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"30px"}},e.toDisplayString(s.windBF),3),e.createElementVNode("td",De,e.toDisplayString(s.windGusts),1),e.createElementVNode("td",Ne,[e.createTextVNode(e.toDisplayString(s.windWaveDir)+" ",1),!isNaN(s.windWaveBearing)&&s.windWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.windWaveBearing,(this.theme==="dark","#7cc7b3"))}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Me)):(e.openBlock(),e.createElementBlock("span",_e,"-"))]),e.createElementVNode("td",ve,e.toDisplayString(s.windWaveHeight),1),e.createElementVNode("td",Se,e.toDisplayString(s.windWavePeriod),1),e.createElementVNode("td",Le,[e.createTextVNode(e.toDisplayString(s.swellDir)+" ",1),!isNaN(s.swellBearing)&&s.swellDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.swellBearing,this.theme==="dark"?"rgb(17, 245, 211)":"rgba(0, 230, 194, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Ee)):(e.openBlock(),e.createElementBlock("span",He,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.swellHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.swellHeight),3),e.createElementVNode("td",Ve,e.toDisplayString(s.swellPeriod),1),e.createElementVNode("td",Be,[e.createTextVNode(e.toDisplayString(s.sigWaveDir)+" ",1),!isNaN(s.sigWaveBearing)&&s.sigWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.sigWaveBearing,this.theme==="dark"?"rgba(89, 199, 211, 1)":"rgba(1, 189, 211, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Ce)):(e.openBlock(),e.createElementBlock("span",Ae,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.sigWaveHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.sigWaveHeight),3),e.createElementVNode("td",Te,e.toDisplayString(s.sigWavePeriod),1),e.createElementVNode("td",Ie,[e.createTextVNode(e.toDisplayString(s.currentDir)+" ",1),!isNaN(s.currentBearing)&&s.currentDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.currentBearing,this.theme==="dark"?"rgba(220, 115, 255, 1)":"rgba(178, 51, 220, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,We)):(e.openBlock(),e.createElementBlock("span",Pe,"-"))]),e.createElementVNode("td",Oe,e.toDisplayString(s.currentSpd),1),e.createElementVNode("td",Re,e.toDisplayString(s.seaLevel),1),e.createElementVNode("td",Ge,e.toDisplayString(s.seaSurfaceTemp),1)],2))),128))],2)],2)]))])])])}const _2=K1(f0,[["render",$e],["__scopeId","data-v-46b3fc93"]]),r4="",je={name:"IdmSeasonal",components:{IdmLoading:d2},props:{reportData:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},theme:{type:String,default:"light"},locale:{type:String,default:"en"}},data(){return{positionGmt:void 0,meteogramData:void 0,hourlyTableData:[]}},computed:{computeUTCTime(){return(l,a="MMM-DD/HHmm[Z], YYYY")=>{if(l){const t=w(l).utc();return`${t==null?void 0:t.format(a)}`}return"-"}},computeLat(){return(l,a=4)=>X.LngLatHelper.lat2pretty(l,a).pretty},computeLng(){return(l,a=4)=>X.LngLatHelper.lng2pretty(l,a).pretty},roundPrecision(){return(l,a=4)=>isNaN(l)||l===null||l===void 0||isNaN(a)?"-":X.LngLatHelper.roundPrecision(l,a)}},watch:{"reportData.version":{handler(){var l,a,t,d,c;(l=this.reportData)!=null&&l.version&&(this.positionGmt=(c=(d=(t=(a=this.reportData)==null?void 0:a.seasonal)==null?void 0:t.weather)==null?void 0:d[0])==null?void 0:c.timezone,this.handleRender())},immediate:!0}},methods:{handleRender(){this.$nextTick(()=>{this.disposeEcharts(),this.initSeasonalEchart()})},initSeasonalEchart(){var F,M,C,T,I,u,L,P,O,_,z,D,s,R;let l=Math.max(...[...this.reportData.highTemp,...this.reportData.lastYearHighTemp].filter(r=>typeof r=="number"&&!isNaN(r))),a=Math.min(...[...this.reportData.lowTemp,...this.reportData.lastYearLowTemp].filter(r=>typeof r=="number"&&!isNaN(r))),t=Math.ceil((l+1)/5)*5,d=Math.floor((a-1)/5)*5,c=Math.ceil((t-d)/5),i=[{name:this.locale==="zhHans"?"最高温度":"High",type:"line",data:(F=this.reportData)==null?void 0:F.highTemp,show:!0,symbol:"none",smooth:!1,itemStyle:{color:this.theme==="dark"?"rgba(255, 161, 0, 1)":"rgba(242, 153, 56, 1)"},label:{show:!1}},{name:this.locale==="zhHans"?"去年最高温度":"High, last year",type:"line",symbol:"none",data:(M=this.reportData)==null?void 0:M.lastYearHighTemp,show:(C=this.reportData)==null?void 0:C.compareToLastYear,itemStyle:{color:"#f7c587"},lineStyle:{color:"#f7c587"},label:{show:!1}},{name:this.locale==="zhHans"?"最低温度":"Low",type:"line",data:(T=this.reportData)==null?void 0:T.lowTemp,show:!0,symbol:"none",smooth:!1,itemStyle:{color:"#2164bf"},label:{show:!1}},{name:this.locale==="zhHans"?"去年最低温度":"Low, last year",type:"line",symbol:"none",data:(I=this.reportData)==null?void 0:I.lastYearLowTemp,show:(u=this.reportData)==null?void 0:u.compareToLastYear,itemStyle:{color:"#7baef7"},lineStyle:{color:"#7baef7"},label:{show:!1}}];const h={title:{text:this.locale==="zhHans"?"温度":"Temperature",top:"10px",left:0,textStyle:{fontWeight:"500",fontSize:16,color:this.theme==="dark"?"rgba(255, 255, 255, 1)":"rgba(28,31,35,1)"}},grid:{show:!0,bottom:"15%",top:"45px",left:"4%",right:"4%",borderColor:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(28,31,35,0.4)",borderWidth:1,z:1,zlevel:1},tooltip:{trigger:"axis",show:!0,position:"right",formatter:r=>{var Y,G,J,Q,K,e1,t1,a1,l1,i1,U;const Z=(Y=r==null?void 0:r[0])==null?void 0:Y.dataIndex;if(r.find(N=>N.seriesType==="scatter"))return!1;{let N=`<div style="font-size: 13px;"><strong>${(G=this.reportData)==null?void 0:G.dates[Z]}</strong></div>
|
|
141
|
+
</svg>`;return btoa(unescape(encodeURIComponent(t)))},async convertSvgUrlToBase64(l){try{const t=await(await fetch(l)).text();return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(t)))}`}catch(a){return console.warn("SVG conversion error:",a),l}}}},b0={class:"idm-spot-historical-report"},x0={class:"row"},u0={class:"col",style:{width:"54%"}},w0={key:0,style:{"margin-left":"8px"}},z0={key:1,style:{"margin-left":"8px"}},k0={class:"col",style:{width:"42%"}},F0={style:{"margin-left":"8px"}},D0={class:"row"},N0={class:"col",style:{width:"54%"}},M0={style:{"margin-left":"8px"}},_0={class:"content-box"},v0={key:0,class:"meteogram-echart-section"},S0={key:2,id:"tempEchart"},L0={key:3,id:"precipEchart"},E0={key:4,id:"windIconsEchart"},H0={key:5,id:"windEchart"},V0={key:6,id:"waveEchart"},B0={key:7,id:"currentEchart"},C0={key:8,id:"sstEchart"},A0={class:"hourly-table-section"},T0={key:0,class:"card"},I0={class:"date"},W0={class:"",style:{"font-size":"16px","font-weight":"500"}},P0={rowspan:"2",colspan:"1",class:"border",style:{width:"90px"}},O0={rowspan:"1",colspan:"1",class:"border"},R0={rowspan:"1",colspan:"1",class:"border"},G0={rowspan:"1",colspan:"1",class:"border"},$0={rowspan:"1",colspan:"4",class:"border"},j0={rowspan:"1",colspan:"3",class:"border"},Y0={rowspan:"1",colspan:"3",class:"border"},Z0={rowspan:"1",colspan:"3",class:"border"},U0={rowspan:"1",colspan:"2",class:"border"},q0={rowspan:"1",colspan:"1",class:"border"},X0={rowspan:"1",colspan:"1",class:"border"},J0={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},Q0={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},K0={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},ee={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},te={rowspan:"1",colspan:"1",class:"border",style:{width:"30px"}},ae={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},le={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},ie={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},oe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},se={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},re={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ne={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ce={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},de={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},he={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},me={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},pe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},ge={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},ye={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}},fe={rowspan:"1",colspan:"1",class:"border",style:{width:"90px"}},be={rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},xe={rowspan:"1",colspan:"1",class:"border",style:{width:"80px"}},ue={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},we={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},ze=["src"],ke={key:1},Fe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},De={rowspan:"1",colspan:"1",class:"border",style:{width:"60px"}},Ne={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Me=["src"],_e={key:1},ve={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Se={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Le={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Ee=["src"],He={key:1},Ve={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Be={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},Ce=["src"],Ae={key:1},Te={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Ie={rowspan:"1",colspan:"1",class:"border",style:{width:"50px","font-size":"11px","text-align":"right","padding-right":"3px"}},We=["src"],Pe={key:1},Oe={rowspan:"1",colspan:"1",class:"border",style:{width:"45px"}},Re={rowspan:"1",colspan:"1",class:"border",style:{width:"70px"}},Ge={rowspan:"1",colspan:"1",class:"border",style:{width:"85px"}};function $e(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O,_,z,D;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",b0,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",x0,[e.createElementVNode("div",u0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",w0,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",z0,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),e.createElementVNode("div",k0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"历史时段":"History Period")+":",3),e.createElementVNode("span",F0,e.toDisplayString(i.computeTzTime((x=(b=t.reportData)==null?void 0:b.dateRange)==null?void 0:x[0],c.positionGmt))+" ~ "+e.toDisplayString(i.computeTzTime((H=(f=t.reportData)==null?void 0:f.dateRange)==null?void 0:H[1],c.positionGmt)),1)])]),e.createElementVNode("div",D0,[e.createElementVNode("div",N0,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",M0,"UTC "+e.toDisplayString((v=t.reportData)==null?void 0:v.positionOffset),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",_0,[(S=t.reportData)!=null&&S.showTempChart||(V=t.reportData)!=null&&V.showPrecipChart||(k=t.reportData)!=null&&k.showWindChart||(F=t.reportData)!=null&&F.showWaveChart||(M=t.reportData)!=null&&M.showCurrentChart||(C=t.reportData)!=null&&C.showSstChart?(e.openBlock(),e.createElementBlock("div",v0,[t.loading?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):t.reportData?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)),!t.loading&&((T=t.reportData)!=null&&T.showTempChart)?(e.openBlock(),e.createElementBlock("div",S0)):e.createCommentVNode("",!0),!t.loading&&((I=t.reportData)!=null&&I.showPrecipChart)?(e.openBlock(),e.createElementBlock("div",L0)):e.createCommentVNode("",!0),!t.loading&&((u=t.reportData)!=null&&u.showWindChart)?(e.openBlock(),e.createElementBlock("div",E0)):e.createCommentVNode("",!0),!t.loading&&((L=t.reportData)!=null&&L.showWindChart)?(e.openBlock(),e.createElementBlock("div",H0)):e.createCommentVNode("",!0),!t.loading&&((P=t.reportData)!=null&&P.showWaveChart)?(e.openBlock(),e.createElementBlock("div",V0)):e.createCommentVNode("",!0),!t.loading&&((O=t.reportData)!=null&&O.showCurrentChart)?(e.openBlock(),e.createElementBlock("div",B0)):e.createCommentVNode("",!0),!t.loading&&((_=t.reportData)!=null&&_.showSstChart)?(e.openBlock(),e.createElementBlock("div",C0)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",A0,[t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",T0,[e.createElementVNode("div",I0,[e.createElementVNode("div",W0,e.toDisplayString(t.locale==="zhHans"?"小时预报":"Hourly Forecast"),1),e.createElementVNode("div",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"]),style:{"font-size":"14px","font-weight":"300"}}," * "+e.toDisplayString(t.locale==="zhHans"?"涌浪、显浪高度>=1.5米时标记为黄色, 风速蒲福等级>=4时标记为黄色。":"Swell or Sig.wave height alert in yellow for value>=1.5m, wind speed alert in yellow for beaufort scale >= 4."),3)]),e.createElementVNode("table",{class:e.normalizeClass(["conditions-table",(z=t.reportData)!=null&&z.showSummary?"":"table-header-fixed"])},[e.createElementVNode("thead",{class:e.normalizeClass(t.theme==="dark"?"dark":"light")},[e.createElementVNode("tr",{class:e.normalizeClass(["day tr-title",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("th",P0,e.toDisplayString(t.locale==="zhHans"?"时间(LT)":"DateTime (LT)"),1),e.createElementVNode("th",O0,e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),e.createElementVNode("th",R0,e.toDisplayString(t.locale==="zhHans"?"3小时降水":"Precip.3h"),1),e.createElementVNode("th",G0,e.toDisplayString(t.locale==="zhHans"?"能见度":"Visibility"),1),e.createElementVNode("th",$0,e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),1),e.createElementVNode("th",j0,e.toDisplayString(t.locale==="zhHans"?"风浪":"Wind wave"),1),e.createElementVNode("th",Y0,e.toDisplayString(t.locale==="zhHans"?"涌浪":"Swell wave"),1),e.createElementVNode("th",Z0,e.toDisplayString(t.locale==="zhHans"?"显浪":"Sig.wave"),1),e.createElementVNode("th",U0,e.toDisplayString(t.locale==="zhHans"?"洋流":"Current"),1),e.createElementVNode("th",q0,e.toDisplayString(t.locale==="zhHans"?"海面":"Sea Level"),1),e.createElementVNode("th",X0,e.toDisplayString(t.locale==="zhHans"?"海表":"Sea Surface"),1)],2),e.createElementVNode("tr",{class:e.normalizeClass(["hour tr-title",t.theme==="dark"?"dark":"light"])},[a[26]||(a[26]=e.createElementVNode("th",{rowspan:"1",colspan:"1",class:"border",style:{width:"50px"}},"°C",-1)),e.createElementVNode("th",J0,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"累计":"Acc"),1),a[0]||(a[0]=e.createElementVNode("br",null,null,-1)),a[1]||(a[1]=e.createTextVNode("(mm)",-1))]),e.createElementVNode("th",Q0,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"距离":"Dist"),1),a[2]||(a[2]=e.createElementVNode("br",null,null,-1)),a[3]||(a[3]=e.createTextVNode("(nm)",-1))]),e.createElementVNode("th",K0,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",ee,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[4]||(a[4]=e.createElementVNode("br",null,null,-1)),a[5]||(a[5]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",te,e.toDisplayString(t.locale==="zhHans"?"等级":"BF"),1),e.createElementVNode("th",ae,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"阵风":"Gusts"),1),a[6]||(a[6]=e.createElementVNode("br",null,null,-1)),a[7]||(a[7]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",le,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",ie,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[8]||(a[8]=e.createElementVNode("br",null,null,-1)),a[9]||(a[9]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",oe,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[10]||(a[10]=e.createElementVNode("br",null,null,-1)),a[11]||(a[11]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",se,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",re,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[12]||(a[12]=e.createElementVNode("br",null,null,-1)),a[13]||(a[13]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",ne,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[14]||(a[14]=e.createElementVNode("br",null,null,-1)),a[15]||(a[15]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",ce,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",de,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[16]||(a[16]=e.createElementVNode("br",null,null,-1)),a[17]||(a[17]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",he,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"周期":"Prd"),1),a[18]||(a[18]=e.createElementVNode("br",null,null,-1)),a[19]||(a[19]=e.createTextVNode("(s)",-1))]),e.createElementVNode("th",me,e.toDisplayString(t.locale==="zhHans"?"方向":"Dir"),1),e.createElementVNode("th",pe,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"速度":"Spd"),1),a[20]||(a[20]=e.createElementVNode("br",null,null,-1)),a[21]||(a[21]=e.createTextVNode("(kts)",-1))]),e.createElementVNode("th",ge,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"高度":"Hgt"),1),a[22]||(a[22]=e.createElementVNode("br",null,null,-1)),a[23]||(a[23]=e.createTextVNode("(m)",-1))]),e.createElementVNode("th",ye,[e.createTextVNode(e.toDisplayString(t.locale==="zhHans"?"温度":"Temp"),1),a[24]||(a[24]=e.createElementVNode("br",null,null,-1)),a[25]||(a[25]=e.createTextVNode("(°C)",-1))])],2)],2),e.createElementVNode("tbody",{class:e.normalizeClass((D=t.reportData)!=null&&D.showSummary?"":"scroll")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.hourlyTableData,s=>(e.openBlock(),e.createElementBlock("tr",{key:Math.random()+s.localDate,class:e.normalizeClass(["text border-bottom",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("td",fe,[e.createElementVNode("div",null,e.toDisplayString(s.localDate),1)]),e.createElementVNode("td",be,[e.createElementVNode("div",null,e.toDisplayString(s.temp),1)]),e.createElementVNode("td",xe,e.toDisplayString(s.precipSum),1),e.createElementVNode("td",ue,e.toDisplayString(s.visibility),1),e.createElementVNode("td",we,[e.createTextVNode(e.toDisplayString(s.windDir)+" ",1),!isNaN(s.windBearing)&&s.windDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWindArrowBase64(s.windBearing,this.theme==="dark"?"rgba(159, 255, 126, 1)":"rgba(54, 212, 0, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,ze)):(e.openBlock(),e.createElementBlock("span",ke,"-"))]),e.createElementVNode("td",Fe,e.toDisplayString(s.windSpeed),1),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.windBF>=4?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"30px"}},e.toDisplayString(s.windBF),3),e.createElementVNode("td",De,e.toDisplayString(s.windGusts),1),e.createElementVNode("td",Ne,[e.createTextVNode(e.toDisplayString(s.windWaveDir)+" ",1),!isNaN(s.windWaveBearing)&&s.windWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.windWaveBearing,(this.theme==="dark","#7cc7b3"))}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Me)):(e.openBlock(),e.createElementBlock("span",_e,"-"))]),e.createElementVNode("td",ve,e.toDisplayString(s.windWaveHeight),1),e.createElementVNode("td",Se,e.toDisplayString(s.windWavePeriod),1),e.createElementVNode("td",Le,[e.createTextVNode(e.toDisplayString(s.swellDir)+" ",1),!isNaN(s.swellBearing)&&s.swellDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.swellBearing,this.theme==="dark"?"rgb(17, 245, 211)":"rgba(0, 230, 194, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Ee)):(e.openBlock(),e.createElementBlock("span",He,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.swellHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.swellHeight),3),e.createElementVNode("td",Ve,e.toDisplayString(s.swellPeriod),1),e.createElementVNode("td",Be,[e.createTextVNode(e.toDisplayString(s.sigWaveDir)+" ",1),!isNaN(s.sigWaveBearing)&&s.sigWaveDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.sigWaveBearing,this.theme==="dark"?"rgba(89, 199, 211, 1)":"rgba(1, 189, 211, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,Ce)):(e.openBlock(),e.createElementBlock("span",Ae,"-"))]),e.createElementVNode("td",{rowspan:"1",colspan:"1",class:e.normalizeClass(["border",s.sigWaveHeight>1.5?"bg-yellow":"",t.theme==="dark"?"dark":"light"]),style:{width:"45px"}},e.toDisplayString(s.sigWaveHeight),3),e.createElementVNode("td",Te,e.toDisplayString(s.sigWavePeriod),1),e.createElementVNode("td",Ie,[e.createTextVNode(e.toDisplayString(s.currentDir)+" ",1),!isNaN(s.currentBearing)&&s.currentDir?(e.openBlock(),e.createElementBlock("img",{key:0,class:"iconfont icon",src:`data:image/svg+xml;base64,${i.getRotatedWaveArrowBase64(s.currentBearing,this.theme==="dark"?"rgba(220, 115, 255, 1)":"rgba(178, 51, 220, 1)")}`,style:{width:"11px",height:"11px",display:"inline-block"}},null,8,We)):(e.openBlock(),e.createElementBlock("span",Pe,"-"))]),e.createElementVNode("td",Oe,e.toDisplayString(s.currentSpd),1),e.createElementVNode("td",Re,e.toDisplayString(s.seaLevel),1),e.createElementVNode("td",Ge,e.toDisplayString(s.seaSurfaceTemp),1)],2))),128))],2)],2)]))])])])}const _2=K1(f0,[["render",$e],["__scopeId","data-v-7cc214b8"]]),r4="",je={name:"IdmSeasonal",components:{IdmLoading:d2},props:{reportData:{type:Object,default:()=>({})},loading:{type:Boolean,default:!1},theme:{type:String,default:"light"},locale:{type:String,default:"en"}},data(){return{positionGmt:void 0,meteogramData:void 0,hourlyTableData:[]}},computed:{computeUTCTime(){return(l,a="MMM-DD/HHmm[Z], YYYY")=>{if(l){const t=w(l).utc();return`${t==null?void 0:t.format(a)}`}return"-"}},computeLat(){return(l,a=4)=>X.LngLatHelper.lat2pretty(l,a).pretty},computeLng(){return(l,a=4)=>X.LngLatHelper.lng2pretty(l,a).pretty},roundPrecision(){return(l,a=4)=>isNaN(l)||l===null||l===void 0||isNaN(a)?"-":X.LngLatHelper.roundPrecision(l,a)}},watch:{"reportData.version":{handler(){var l,a,t,d,c;(l=this.reportData)!=null&&l.version&&(this.positionGmt=(c=(d=(t=(a=this.reportData)==null?void 0:a.seasonal)==null?void 0:t.weather)==null?void 0:d[0])==null?void 0:c.timezone,this.handleRender())},immediate:!0}},methods:{handleRender(){this.$nextTick(()=>{this.disposeEcharts(),this.initSeasonalEchart()})},initSeasonalEchart(){var F,M,C,T,I,u,L,P,O,_,z,D,s,R;let l=Math.max(...[...this.reportData.highTemp,...this.reportData.lastYearHighTemp].filter(r=>typeof r=="number"&&!isNaN(r))),a=Math.min(...[...this.reportData.lowTemp,...this.reportData.lastYearLowTemp].filter(r=>typeof r=="number"&&!isNaN(r))),t=Math.ceil((l+1)/5)*5,d=Math.floor((a-1)/5)*5,c=Math.ceil((t-d)/5),i=[{name:this.locale==="zhHans"?"最高温度":"High",type:"line",data:(F=this.reportData)==null?void 0:F.highTemp,show:!0,symbol:"none",smooth:!1,itemStyle:{color:this.theme==="dark"?"rgba(255, 161, 0, 1)":"rgba(242, 153, 56, 1)"},label:{show:!1}},{name:this.locale==="zhHans"?"去年最高温度":"High, last year",type:"line",symbol:"none",data:(M=this.reportData)==null?void 0:M.lastYearHighTemp,show:(C=this.reportData)==null?void 0:C.compareToLastYear,itemStyle:{color:"#f7c587"},lineStyle:{color:"#f7c587"},label:{show:!1}},{name:this.locale==="zhHans"?"最低温度":"Low",type:"line",data:(T=this.reportData)==null?void 0:T.lowTemp,show:!0,symbol:"none",smooth:!1,itemStyle:{color:"#2164bf"},label:{show:!1}},{name:this.locale==="zhHans"?"去年最低温度":"Low, last year",type:"line",symbol:"none",data:(I=this.reportData)==null?void 0:I.lastYearLowTemp,show:(u=this.reportData)==null?void 0:u.compareToLastYear,itemStyle:{color:"#7baef7"},lineStyle:{color:"#7baef7"},label:{show:!1}}];const h={title:{text:this.locale==="zhHans"?"温度":"Temperature",top:"10px",left:0,textStyle:{fontWeight:"500",fontSize:16,color:this.theme==="dark"?"rgba(255, 255, 255, 1)":"rgba(28,31,35,1)"}},grid:{show:!0,bottom:"15%",top:"45px",left:"4%",right:"4%",borderColor:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(28,31,35,0.4)",borderWidth:1,z:1,zlevel:1},tooltip:{trigger:"axis",show:!0,position:"right",formatter:r=>{var Y,G,J,Q,K,e1,t1,a1,l1,i1,U;const Z=(Y=r==null?void 0:r[0])==null?void 0:Y.dataIndex;if(r.find(N=>N.seriesType==="scatter"))return!1;{let N=`<div style="font-size: 13px;"><strong>${(G=this.reportData)==null?void 0:G.dates[Z]}</strong></div>
|
|
142
142
|
<div style="font-size: 13px;display: ${isNaN((J=r==null?void 0:r.find(A=>A.seriesName==="High"||A.seriesName==="最高温度"))==null?void 0:J.value)?"none":"block"}">
|
|
143
143
|
<span style="display:inline-block; height: 10px;width: 10px;border-radius: 50%;background-color: ${this.theme==="dark"?"rgba(255, 161, 0, 1)":"rgba(242, 153, 56, 1)"};"></span>
|
|
144
144
|
<span>${this.locale==="zhHans"?"最高温度":"High"} : </span>
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
<span>${this.locale==="zhHans"?"去年降水量":"Precip, last year"} : </span>
|
|
186
186
|
<strong>${(i1=r==null?void 0:r.find(N=>N.seriesName==="Precip, last year"||N.seriesName==="去年降水量"))==null?void 0:i1.value}</strong>
|
|
187
187
|
<span style="padding-left: 3px;">mm</span>
|
|
188
|
-
</div>`),U}}},legend:{show:!0,top:"10px",right:"4%",itemWidth:40,textStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"}},xAxis:{show:!0,left:0,right:0,top:"50%",height:"50%",type:"category",boundaryGap:!0,data:(R=this.reportData)==null?void 0:R.xDates,axisLabel:{show:!0,fontSize:12,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)"},axisLine:{show:!0},axisTick:{show:!0,inside:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(0,0,0,0.4)"}},z:1,zlevel:1},yAxis:[{type:"value",name:this.locale==="zhHans"?"风速 ( kts ) ":"Wind speed ( kts ) ",show:!0,min:m,max:b,interval:x,splitNumber:5,nameRotate:90,nameLocation:"middle",nameGap:25,nameTextStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},axisLabel:{show:!0,fontSize:10,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},splitLine:{show:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.1)":"rgba(0,0,0,0.1)"}},z:0,zlevel:0},{type:"value",name:this.locale==="zhHans"?"降水量 ( mm ) ":"Precipitation ( mm ) ",show:!0,min:v,max:S,interval:V,splitNumber:5,nameRotate:90,nameLocation:"middle",nameGap:30,nameTextStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},axisLabel:{show:!0,fontSize:10,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},splitLine:{show:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.1)":"rgba(0,0,0,0.1)"}},z:1,zlevel:0}],series:i.filter(r=>r.show)};this.$nextTick(()=>{let r;document.getElementById("wind-precip-echart")&&(r=j.init(document.getElementById("wind-precip-echart")),r.setOption(k))})},disposeEcharts(){document.getElementById("temperature-echart")&&j.dispose(document.getElementById("temperature-echart")),document.getElementById("wind-precip-echart")&&j.dispose(document.getElementById("wind-precip-echart"))}}},Ye={class:"idm-spot-seasonal-report"},Ze={class:"row"},Ue={class:"col",style:{width:"54%"}},qe={key:0,style:{"margin-left":"8px"}},Xe={key:1,style:{"margin-left":"8px"}},Je={class:"col",style:{width:"42%"}},Qe={style:{"margin-left":"8px"}},Ke={class:"row"},et={class:"col",style:{width:"54%"}},tt={style:{"margin-left":"8px"}},at={class:"content-box"},lt={class:"summary-section"},it={class:"title",style:{"margin-left":"5px"}},ot={class:"info-block"},st={class:"text"},rt={class:"text"},nt={class:"text"},ct={class:"text"},dt={class:"text"},ht={class:"text"},mt={class:"text"},pt={class:"text"},gt={class:"text"},yt={class:"text"},ft={class:"text"},bt={class:"seasonal-weather-section",style:{}},xt={key:0,id:"temperature-echart"},ut={key:1,id:"wind-precip-echart"};function wt(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",Ye,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",Ze,[e.createElementVNode("div",Ue,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",Xe,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),e.createElementVNode("div",Je,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报月份":"Forecast Month")+":",3),e.createElementVNode("span",Qe,e.toDisplayString((b=t.reportData)==null?void 0:b.forecastMonth),1)])]),e.createElementVNode("div",Ke,[e.createElementVNode("div",et,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",tt,"UTC "+e.toDisplayString((x=t.reportData)==null?void 0:x.positionOffset),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",at,[e.createElementVNode("div",lt,[e.createElementVNode("div",it,e.toDisplayString(t.locale==="zhHans"?"总结":"Summary"),1),e.createElementVNode("div",ot,[e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"温度":"Temperature"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",st,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均最高温度:":"Avg High Temp:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.minHighTemp)+" to "+e.toDisplayString(t.reportData.maxHighTemp)+" °C",1)]),e.createElementVNode("div",rt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均最低温度:":"Avg Low Temp:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.minLowTemp)+" to "+e.toDisplayString(t.reportData.maxLowTemp)+" °C",1)]),e.createElementVNode("div",nt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最热日期:":"Hottest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.hottestDay),1)]),e.createElementVNode("div",ct,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最冷日期:":"Coldest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.coldestDay),1)])],2),e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"降水":"Precipitation"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",dt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"小雨:":"Light (<10mm):"),3),e.createTextVNode(" "+e.toDisplayString((v=(H=(f=t.reportData)==null?void 0:f.precip)==null?void 0:H.filter(L=>L<10))==null?void 0:v.length)+" days",1)]),e.createElementVNode("div",ht,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"中雨:":"Moderate (<=24.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((k=(V=(S=t.reportData)==null?void 0:S.precip)==null?void 0:V.filter(L=>L>=10&&L<=24.9))==null?void 0:k.length)+" days",1)]),e.createElementVNode("div",mt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"大雨:":"Heavy (<=49.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((C=(M=(F=t.reportData)==null?void 0:F.precip)==null?void 0:M.filter(L=>L>24.9&&L<=49.9))==null?void 0:C.length)+" days",1)]),e.createElementVNode("div",pt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暴雨:":"Rainstorm (>49.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((u=(I=(T=t.reportData)==null?void 0:T.precip)==null?void 0:I.filter(L=>L>49.9))==null?void 0:u.length)+" days",1)])],2),e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",gt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均风速:":"Mean Wind:"),3),e.createTextVNode(" "+e.toDisplayString(i.roundPrecision(t.reportData.meanWind,1))+" kts",1)]),e.createElementVNode("div",yt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最强风日:":"Windiest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.windiestDay)+" ( "+e.toDisplayString(t.reportData.maxWindSpeed)+"kts )",1)]),e.createElementVNode("div",ft,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"主要风向:":"Dominant Wind Dir:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.dominantWind),1)])],2)])]),e.createElementVNode("div",bt,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",xt)),t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",ut))])])])}const v2=K1(je,[["render",wt],["__scopeId","data-v-c8cabdd2"]]),zt={install(l){l.component("IdmForecast",M2),l.component("IdmHistorical",_2),l.component("IdmSeasonal",v2)}},n4="",c4="",kt={props:{tropicals:{type:Object,default:()=>({})},ts:{type:String,default:()=>""},container:{type:String,default:()=>""},zoom:{type:Number,default:()=>1}},components:{},data(){return{map:void 0,source:"tropicals-source",bboxSource:"tropicals-bbox-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",bboxLayer:"tropicals-bbox-layer",interpolateData:void 0}},mounted(){this.initMap()},methods:{async initMap(){c2.accessToken="pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw";const l=new c2.Map({container:this.container,style:{version:8,name:"light",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!0},"Land & water, built":{name:"Land & water, built",collapsed:!0},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},e9bb8e77353431519f7918998e9079d9:{name:"Group",collapsed:!1},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},center:[104.01743114258029,17.078999978347557],zoom:1.9133216316430233,bearing:0,pitch:0,lights:[],fog:{range:[.5,10]},sources:{composite:{url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1,neatchenheng.d44z21eg,neatchenheng.82kqbc1q,neatchenheng.a4ifbysm,neatchenheng.27issko0,neatchenheng.9uwc9x7l,neatchenheng.7y3kpvvv,neatchenheng.dlkkohie",type:"vector"}},sprite:"mapbox://sprites/neatchenheng/cmd894dwn036m01rf7anc0k0d/bph0p8ithotzwly53az7lwdmv",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},layers:[{id:"land",type:"background",layout:{},paint:{"background-color":"#e9ebed"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"}},{layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,type:"fill",source:"composite",id:"landcover",paint:{"fill-color":["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","crop","hsla(68, 55%, 70%, 0.6)","grass","hsla(98, 50%, 74%, 0.6)","snow","hsl(205, 45%, 95%)","hsl(98, 48%, 67%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1},"source-layer":"landcover"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"national_park"],type:"fill",source:"composite",id:"national-park",paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]},"source-layer":"landuse_overlay"},{minzoom:9,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"national_park"],type:"line",source:"composite",id:"national-park_tint-band",paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]},"source-layer":"landuse_overlay"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],type:"fill",source:"composite",id:"landuse",paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1},"source-layer":"landuse"},{minzoom:15,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"pitch"],type:"line",source:"composite",id:"pitch-outline",paint:{"line-color":"hsl(0, 0%, 69%)"},"source-layer":"landuse"},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"],visibility:"none"},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",minzoom:10,layout:{visibility:"none"},paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(198, 100%, 37%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"water",type:"fill",source:"composite","source-layer":"water",layout:{},paint:{"fill-color":"hsl(215, 92%, 81%)"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,type:"fill",source:"composite",id:"water-depth",paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]},"source-layer":"depth"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],type:"fill",source:"composite",id:"wetland",paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]},"source-layer":"landuse_overlay"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],type:"fill",source:"composite",id:"wetland-pattern",paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"},"source-layer":"landuse_overlay"},{minzoom:13,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],type:"fill",source:"composite",id:"land-structure-polygon",paint:{"fill-color":"hsl(0, 0%, 69%)"},"source-layer":"structure"},{minzoom:13,layout:{"line-cap":"square",visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],type:"line",source:"composite",id:"land-structure-line",paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"},"source-layer":"structure"},{id:"empty-layer-0",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-1",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":"rgb(200, 200, 200)"},layout:{visibility:"none"}},{id:"empty-layer-2",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-3",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-4",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"water-outline2",minzoom:0,maxzoom:22,type:"line",paint:{"line-color":"rgb(150, 150, 150)"},layout:{visibility:"none"},source:"composite","source-layer":"water"},{id:"water-outline",type:"line",paint:{"line-color":"hsl(0, 0%, 70%)","line-width":["interpolate",["linear"],["zoom"],0,1.5,4,1]},source:"composite","source-layer":"water"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary-bg",paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(173, 169, 170)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]},"source-layer":"admin"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary",paint:{"line-color":"rgb(143, 143, 143)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]},"source-layer":"admin"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary-disputed",paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]},"source-layer":"admin"},{minzoom:13,layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"waterway-label",paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:4,layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport"},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"natural-line-label",paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"},"source-layer":"natural_label"},{minzoom:4,layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],type:"symbol",source:"composite",id:"natural-point-label",paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"},"source-layer":"natural_label"},{minzoom:1,layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"water-line-label",paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:1,layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],type:"symbol",source:"composite",id:"water-point-label",paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:10,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-subdivision-label",paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5},"source-layer":"place_label"},{minzoom:2,layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-minor-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1},"source-layer":"place_label"},{minzoom:2,layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-major-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1},"source-layer":"place_label"},{minzoom:3,layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"state-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5},"source-layer":"place_label"},{minzoom:1,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],12.100000000000001,4,9.9,5,8.8],9,["step",["get","symbolrank"],24.200000000000003,4,20.900000000000002,5,18.700000000000003]]},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"country-label",paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(0, 0.00%, 13.70%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25},"source-layer":"place_label"},{minzoom:.75,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:3,filter:["==",["get","class"],"continent"],type:"symbol",source:"composite",id:"continent-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]},"source-layer":"natural_label"},{id:"world-12nm-v4-20231025",minzoom:3,type:"line",paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]},source:"composite","source-layer":"eez_12nm_new1-6jzkww",layout:{"line-join":"round",visibility:"none"}},{id:"china-taiwan",type:"line",paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2]},layout:{"line-join":"round",visibility:"none"},source:"composite","source-layer":"eez-d4udtm"},{id:"ne-10m-outline",type:"line",paint:{"line-color":"hsl(172, 0%, 33%)"},source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",layout:{visibility:"none"}},{id:"ne-10m-label",type:"symbol",paint:{"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-halo-blur":1},layout:{"text-field":["to-string",["get","name"]],"text-size":12,visibility:"none"},source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv"},{id:"china-route-line",type:"line",paint:{"line-color":"rgba(119, 239, 157, 1)","line-width":2},source:"composite","source-layer":"china_route-bdtx5d",layout:{visibility:"none"}},{id:"china-route-fill",type:"fill",paint:{"fill-color":"rgba(119, 239, 157, 1)","fill-opacity":.2},source:"composite","source-layer":"china_route-bdtx5d",filter:["match",["get","featureType"],["route"],!0,!1],layout:{visibility:"none"}},{id:"china-route-label",type:"symbol",paint:{"text-color":"rgba(0, 0, 0, 1)"},source:"composite","source-layer":"china_route-bdtx5d",layout:{"text-field":["to-string",["get","RouteName"]],"text-size":10,"text-offset":[0,1.6],visibility:"none"}},{id:"ice-area-fill",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(199, 239, 236, 0.7)"},source:"composite","source-layer":"ICE_AREA-6oqazd",layout:{visibility:"none"}},{id:"ice-area-line",minzoom:0,maxzoom:22,type:"line",paint:{"line-color":"rgba(199, 239, 236, 1)"},layout:{visibility:"none"},source:"composite","source-layer":"ICE_AREA-6oqazd"},{id:"tide-stations",minzoom:0,maxzoom:22,type:"symbol",paint:{"text-color":"rgb(0, 0, 0)","text-opacity":["step",["zoom"],0,4,1]},layout:{visibility:"none","text-field":["to-string",["get","Location_EN"]],"text-size":10,"icon-image":"tide","icon-size":1,"icon-offset":[0,-13],"text-offset":[0,1.6],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"]},source:"composite","source-layer":"tide_station_cn-8xvt91"},{id:"loadlines-label",minzoom:0,maxzoom:22,type:"symbol",paint:{"text-color":"rgb(0, 0, 0)"},layout:{"text-field":["to-string",["get","name"]],"text-size":10,"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],visibility:"none","text-offset":[0,1]},source:"composite","source-layer":"loadlines-b6mgr8"},{id:"loadlines-fill",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":["match",["get","val"],["LLGreen"],"rgba(164, 214, 217, 0.6)",["LLBlue"],"rgba(53, 121, 194, 0.6)",["LLRed"],"rgba(217, 150, 151, 0.6)",["LLSUMMER"],"rgba(111, 110, 212, 0.6)","rgba(255, 255, 255, 0.6)"],"fill-outline-color":"rgba(255, 255, 255, 0.3)"},layout:{visibility:"none"},source:"composite","source-layer":"loadlines-b6mgr8"}],created:"2025-07-18T03:20:31.079Z",modified:"2025-07-31T03:57:21.238Z",id:"cmd894dwn036m01rf7anc0k0d",owner:"neatchenheng",visibility:"private",protected:!1,draft:!1},zoom:this.zoom,center:this.tropicals.center||[120,30],preserveDrawingBuffer:!0,projection:"mercator",attributionControl:!1,dragPan:!1});l.on("load",()=>{this.map=l,this.map.scrollZoom.disable(),this.handleSetCenterAndBbox(),this.handleRenderTropcals(),this.handleDrawHurricaneMarker()})},handleSetCenterAndBbox(){var d,c,i;const l=[];(i=(c=(d=this.tropicals)==null?void 0:d.data)==null?void 0:c.features)==null||i.forEach(h=>{var p,y,m,b;((p=h==null?void 0:h.properties)==null?void 0:p.type)==="forecast"&&!h.properties.disabled&&(((y=h==null?void 0:h.geometry)==null?void 0:y.type)==="LineString"?l.push(...(m=h==null?void 0:h.geometry)==null?void 0:m.coordinates):l.push((b=h==null?void 0:h.geometry)==null?void 0:b.coordinates))});const a=X.LaneHelper.calculateCenter([l]);this.map.setCenter(a);let t=X.LaneHelper.calculateBBox([l]);this.map.fitScreenCoordinates(this.map.project([t[0]-10,t[1]-10]),this.map.project([t[2]+10,t[3]+10]),this.map.getBearing()),this.map.addSource(this.bboxSource,{type:"geojson",data:{type:"Feature",geometry:{type:"LineString",coordinates:[[t[0]-5,t[1]-5],[t[2]+5,t[1]-5],[t[2]+5,t[3]+5],[t[0]-5,t[3]+5],[t[0]-5,t[1]-5]]}}}),this.map.addLayer({id:this.bboxLayer,type:"line",source:this.bboxSource,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(0,0,0,0.6)","line-width":1,"line-opacity":1,"line-dasharray":[2,2]}})},handleRenderTropcals(){var l,a,t,d,c;if(this.tropicals){const i=new Date().valueOf();let h=0,p=0;(l=this.map)!=null&&l.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData((a=this.tropicals)!=null&&a.active?this.tropicals.data:this.empty),p=new Date().valueOf()-(i+h),console.log("[tropicals] update elapsed: ",p,", total: ",h+=p)):(this.map.addSource(this.source,{type:"geojson",data:(d=this.tropicals)!=null&&d.active?(c=this.tropicals)==null?void 0:c.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":1,"line-dasharray":[1,2]}}))}},handleDrawHurricaneMarker(){var d,c,i,h,p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O;const l=X.TropicalHelper.interpolate(this.tropicals,1),a=JSON.parse(JSON.stringify(l)),t=[];if(a.forEach(_=>{var z,D,s;(z=_.properties)!=null&&z.name&&!t.includes((D=_.properties)==null?void 0:D.name)&&t.push((s=_.properties)==null?void 0:s.name)}),t.forEach(_=>{var s;const D=(s=a.filter(R=>{var r;return((r=R.properties)==null?void 0:r.name)===_})[0])==null?void 0:s.properties.model;a.map((R,r)=>{var Z,Y;return((Z=R.properties)==null?void 0:Z.name)===_&&(R.properties.disabled=((Y=R.properties)==null?void 0:Y.model)!==D),R})}),this.interpolateData=JSON.parse(JSON.stringify(a)),(d=this.interpolateMarkers)==null||d.forEach(_=>_==null?void 0:_.remove()),this.interpolateMarkers=[],(c=this.interpolateData)!=null&&c.length&&this.tropicals.active){const _=this.interpolateData.filter(z=>z.properties.date===this.ts&&!z.properties.disabled);this.interpolateData.forEach(z=>{});for(const z of _)if(!z.properties.disabled){let D="#f44336";((h=(i=z.properties)==null?void 0:i.wind)==null?void 0:h.kts)<32||!((y=(p=z.properties)==null?void 0:p.wind)!=null&&y.kts)?D="#03f869":((b=(m=z.properties)==null?void 0:m.wind)==null?void 0:b.kts)>=32&&((f=(x=z.properties)==null?void 0:x.wind)==null?void 0:f.kts)<47?D="#f2f202":((v=(H=z.properties)==null?void 0:H.wind)==null?void 0:v.kts)>=47&&((V=(S=z.properties)==null?void 0:S.wind)==null?void 0:V.kts)<63?D="#ff9100":((F=(k=z.properties)==null?void 0:k.wind)==null?void 0:F.kts)>=63&&((C=(M=z.properties)==null?void 0:M.wind)==null?void 0:C.kts)<79?D="#f44336":((I=(T=z.properties)==null?void 0:T.wind)==null?void 0:I.kts)>=79&&((L=(u=z.properties)==null?void 0:u.wind)==null?void 0:L.kts)<94?D="#c604a4":((O=(P=z.properties)==null?void 0:P.wind)==null?void 0:O.kts)>=94?D="#6b05bb":D="#f44336";const s=`<svg t="1719918955501"
|
|
188
|
+
</div>`),U}}},legend:{show:!0,top:"10px",right:"4%",itemWidth:40,textStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"}},xAxis:{show:!0,left:0,right:0,top:"50%",height:"50%",type:"category",boundaryGap:!0,data:(R=this.reportData)==null?void 0:R.xDates,axisLabel:{show:!0,fontSize:12,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0, 0, 0, 0.7)"},axisLine:{show:!0},axisTick:{show:!0,inside:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.4)":"rgba(0,0,0,0.4)"}},z:1,zlevel:1},yAxis:[{type:"value",name:this.locale==="zhHans"?"风速 ( kts ) ":"Wind speed ( kts ) ",show:!0,min:m,max:b,interval:x,splitNumber:5,nameRotate:90,nameLocation:"middle",nameGap:25,nameTextStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},axisLabel:{show:!0,fontSize:10,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},splitLine:{show:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.1)":"rgba(0,0,0,0.1)"}},z:0,zlevel:0},{type:"value",name:this.locale==="zhHans"?"降水量 ( mm ) ":"Precipitation ( mm ) ",show:!0,min:v,max:S,interval:V,splitNumber:5,nameRotate:90,nameLocation:"middle",nameGap:30,nameTextStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},axisLabel:{show:!0,fontSize:10,color:this.theme==="dark"?"rgba(255, 255, 255, 0.7)":"rgba(0,0,0,0.7)"},splitLine:{show:!0,lineStyle:{color:this.theme==="dark"?"rgba(255, 255, 255, 0.1)":"rgba(0,0,0,0.1)"}},z:1,zlevel:0}],series:i.filter(r=>r.show)};this.$nextTick(()=>{let r;document.getElementById("wind-precip-echart")&&(r=j.init(document.getElementById("wind-precip-echart")),r.setOption(k))})},disposeEcharts(){document.getElementById("temperature-echart")&&j.dispose(document.getElementById("temperature-echart")),document.getElementById("wind-precip-echart")&&j.dispose(document.getElementById("wind-precip-echart"))}}},Ye={class:"idm-spot-seasonal-report"},Ze={class:"row"},Ue={class:"col",style:{width:"54%"}},qe={key:0,style:{"margin-left":"8px"}},Xe={key:1,style:{"margin-left":"8px"}},Je={class:"col",style:{width:"42%"}},Qe={style:{"margin-left":"8px"}},Ke={class:"row"},et={class:"col",style:{width:"54%"}},tt={style:{"margin-left":"8px"}},at={class:"content-box"},lt={class:"summary-section"},it={class:"title",style:{"margin-left":"5px"}},ot={class:"spot-info-block"},st={class:"text"},rt={class:"text"},nt={class:"text"},ct={class:"text"},dt={class:"text"},ht={class:"text"},mt={class:"text"},pt={class:"text"},gt={class:"text"},yt={class:"text"},ft={class:"text"},bt={class:"seasonal-weather-section",style:{}},xt={key:0,id:"temperature-echart"},ut={key:1,id:"wind-precip-echart"};function wt(l,a,t,d,c,i){var p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u;const h=e.resolveComponent("IdmLoading");return e.openBlock(),e.createElementBlock("div",Ye,[(p=t.reportData)!=null&&p.showSummary?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["summary-info-box",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",Ze,[e.createElementVNode("div",Ue,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"位置":"Position")+":",3),(y=t.reportData)!=null&&y.portName?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString((m=t.reportData)==null?void 0:m.portName)+" "+e.toDisplayString(`[${i.computeLat(t.reportData.lat)}, ${i.computeLng(t.reportData.lng)}]`),1)):(e.openBlock(),e.createElementBlock("span",Xe,e.toDisplayString(`${i.computeLat(t.reportData.lat)} , ${i.computeLng(t.reportData.lng)}`),1))]),e.createElementVNode("div",Je,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"预报月份":"Forecast Month")+":",3),e.createElementVNode("span",Qe,e.toDisplayString((b=t.reportData)==null?void 0:b.forecastMonth),1)])]),e.createElementVNode("div",Ke,[e.createElementVNode("div",et,[e.createElementVNode("span",{class:e.normalizeClass(["label label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"时区":"Timezone")+":",3),e.createElementVNode("span",tt,"UTC "+e.toDisplayString((x=t.reportData)==null?void 0:x.positionOffset),1)])])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",at,[e.createElementVNode("div",lt,[e.createElementVNode("div",it,e.toDisplayString(t.locale==="zhHans"?"总结":"Summary"),1),e.createElementVNode("div",ot,[e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"温度":"Temperature"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",st,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均最高温度:":"Avg High Temp:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.minHighTemp)+" to "+e.toDisplayString(t.reportData.maxHighTemp)+" °C",1)]),e.createElementVNode("div",rt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均最低温度:":"Avg Low Temp:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.minLowTemp)+" to "+e.toDisplayString(t.reportData.maxLowTemp)+" °C",1)]),e.createElementVNode("div",nt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最热日期:":"Hottest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.hottestDay),1)]),e.createElementVNode("div",ct,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最冷日期:":"Coldest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.coldestDay),1)])],2),e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"降水":"Precipitation"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",dt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"小雨:":"Light (<10mm):"),3),e.createTextVNode(" "+e.toDisplayString((v=(H=(f=t.reportData)==null?void 0:f.precip)==null?void 0:H.filter(L=>L<10))==null?void 0:v.length)+" days",1)]),e.createElementVNode("div",ht,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"中雨:":"Moderate (<=24.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((k=(V=(S=t.reportData)==null?void 0:S.precip)==null?void 0:V.filter(L=>L>=10&&L<=24.9))==null?void 0:k.length)+" days",1)]),e.createElementVNode("div",mt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"大雨:":"Heavy (<=49.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((C=(M=(F=t.reportData)==null?void 0:F.precip)==null?void 0:M.filter(L=>L>24.9&&L<=49.9))==null?void 0:C.length)+" days",1)]),e.createElementVNode("div",pt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暴雨:":"Rainstorm (>49.9mm):"),3),e.createTextVNode(" "+e.toDisplayString((u=(I=(T=t.reportData)==null?void 0:T.precip)==null?void 0:I.filter(L=>L>49.9))==null?void 0:u.length)+" days",1)])],2),e.createElementVNode("div",{class:e.normalizeClass(["block",t.theme==="dark"?"dark":"light"])},[e.createElementVNode("div",{class:e.normalizeClass(["label primary-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"风":"Wind"),3),e.createElementVNode("div",{class:e.normalizeClass(["divider",t.theme==="dark"?"dark":"light"])},null,2),e.createElementVNode("div",gt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"平均风速:":"Mean Wind:"),3),e.createTextVNode(" "+e.toDisplayString(i.roundPrecision(t.reportData.meanWind,1))+" kts",1)]),e.createElementVNode("div",yt,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"最强风日:":"Windiest Day:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.windiestDay)+" ( "+e.toDisplayString(t.reportData.maxWindSpeed)+"kts )",1)]),e.createElementVNode("div",ft,[e.createElementVNode("span",{class:e.normalizeClass(["label-color",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"主要风向:":"Dominant Wind Dir:"),3),e.createTextVNode(" "+e.toDisplayString(t.reportData.dominantWind),1)])],2)])]),e.createElementVNode("div",bt,[t.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",xt)),t.loading?t.loading?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},[e.createVNode(h,{loading:t.loading},null,8,["loading"])],2)):(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["loading-box",t.theme==="dark"?"dark":"light"])},e.toDisplayString(t.locale==="zhHans"?"暂无数据":"No Data"),3)):(e.openBlock(),e.createElementBlock("div",ut))])])])}const v2=K1(je,[["render",wt],["__scopeId","data-v-2fda2548"]]),zt={install(l){l.component("IdmForecast",M2),l.component("IdmHistorical",_2),l.component("IdmSeasonal",v2)}},n4="",c4="",kt={props:{tropicals:{type:Object,default:()=>({})},ts:{type:String,default:()=>""},container:{type:String,default:()=>""},zoom:{type:Number,default:()=>1}},components:{},data(){return{map:void 0,source:"tropicals-source",bboxSource:"tropicals-bbox-source",historyLayer:"tropicals-history-layer",forecastLayer:"tropicals-forecast-layer",bboxLayer:"tropicals-bbox-layer",interpolateData:void 0}},mounted(){this.initMap()},methods:{async initMap(){c2.accessToken="pk.eyJ1IjoibmVhdGNoZW5oZW5nIiwiYSI6ImNsdXM3cnBmODBsemgycW1vaXc1bjV6bXMifQ.w6fqHGRbhNhLvm0LnX4ZVw";const l=new c2.Map({container:this.container,style:{version:8,name:"light",metadata:{"mapbox:print":{width:8.5,height:11,units:"in",format:"png",resolution:300},"mapbox:type":"default","mapbox:trackposition":!0,"mapbox:autocomposite":!0,"mapbox:sdk-support":{android:"11.0.0",ios:"11.0.0",js:"3.0.0"},"mapbox:origin":"outdoors-v12","mapbox:groups":{"Terrain, terrain-labels":{name:"Terrain, terrain-labels",collapsed:!0},"Administrative boundaries, admin":{name:"Administrative boundaries, admin",collapsed:!0},"Land & water, built":{name:"Land & water, built",collapsed:!0},"Terrain, surface":{name:"Terrain, surface",collapsed:!0},"Land & water, land":{name:"Land & water, land",collapsed:!1},"Natural features, natural-labels":{name:"Natural features, natural-labels",collapsed:!0},e9bb8e77353431519f7918998e9079d9:{name:"Group",collapsed:!1},"Walking, cycling, etc., barriers-bridges":{name:"Walking, cycling, etc., barriers-bridges",collapsed:!0},"Place labels, place-labels":{name:"Place labels, place-labels",collapsed:!1},"Transit, ferries":{name:"Transit, ferries",collapsed:!0},"Transit, elevated":{name:"Transit, elevated",collapsed:!0},"Walking, cycling, etc., tunnels":{name:"Walking, cycling, etc., tunnels",collapsed:!0},"Terrain, land":{name:"Terrain, land",collapsed:!0},"Road network, tunnels-case":{name:"Road network, tunnels-case",collapsed:!0},"Walking, cycling, etc., walking-cycling-labels":{name:"Walking, cycling, etc., walking-cycling-labels",collapsed:!0},"Walking, cycling, etc., surface":{name:"Walking, cycling, etc., surface",collapsed:!0},"Road network, surface-icons":{name:"Road network, surface-icons",collapsed:!0},"Land & water, water":{name:"Land & water, water",collapsed:!1}}},center:[104.01743114258029,17.078999978347557],zoom:1.9133216316430233,bearing:0,pitch:0,lights:[],fog:{range:[.5,10]},sources:{composite:{url:"mapbox://mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2,mapbox.mapbox-bathymetry-v2,mapbox.country-boundaries-v1,neatchenheng.d44z21eg,neatchenheng.82kqbc1q,neatchenheng.a4ifbysm,neatchenheng.27issko0,neatchenheng.9uwc9x7l,neatchenheng.7y3kpvvv,neatchenheng.dlkkohie",type:"vector"}},sprite:"mapbox://sprites/neatchenheng/cmd894dwn036m01rf7anc0k0d/bph0p8ithotzwly53az7lwdmv",glyphs:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",projection:{name:"equirectangular"},layers:[{id:"land",type:"background",layout:{},paint:{"background-color":"#e9ebed"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"}},{layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},maxzoom:12,type:"fill",source:"composite",id:"landcover",paint:{"fill-color":["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","crop","hsla(68, 55%, 70%, 0.6)","grass","hsla(98, 50%, 74%, 0.6)","snow","hsl(205, 45%, 95%)","hsl(98, 48%, 67%)"],"fill-opacity":["interpolate",["exponential",1.5],["zoom"],8,.8,12,0],"fill-antialias":!1},"source-layer":"landcover"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"national_park"],type:"fill",source:"composite",id:"national-park",paint:{"fill-color":"hsl(98, 38%, 68%)","fill-opacity":["interpolate",["linear"],["zoom"],5,0,6,.6,12,.2]},"source-layer":"landuse_overlay"},{minzoom:9,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"national_park"],type:"line",source:"composite",id:"national-park_tint-band",paint:{"line-color":"hsl(98, 38%, 68%)","line-width":["interpolate",["exponential",1.5],["zoom"],9,1,14,8],"line-blur":["interpolate",["exponential",1.5],["zoom"],9,1,14,8]},"source-layer":"landuse_overlay"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["all",[">=",["to-number",["get","sizerank"]],0],["match",["get","class"],["agriculture","wood","grass","scrub","glacier","pitch","sand"],["step",["zoom"],!1,11,!0],"residential",["step",["zoom"],!0,10,!1],["park","airport"],["step",["zoom"],!1,8,["case",["==",["get","sizerank"],1],!0,!1],10,!0],["facility","industrial"],["step",["zoom"],!1,12,!0],"rock",["step",["zoom"],!1,11,!0],"cemetery",["step",["zoom"],!1,11,!0],"school",["step",["zoom"],!1,11,!0],"hospital",["step",["zoom"],!1,11,!0],"commercial_area",["step",["zoom"],!1,11,!0],!1],["<=",["-",["to-number",["get","sizerank"]],["interpolate",["exponential",1.5],["zoom"],12,0,18,14]],14]],type:"fill",source:"composite",id:"landuse",paint:{"fill-color":["interpolate",["linear"],["zoom"],15,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsl(60, 0%, 85%)","school","hsl(40, 45%, 78%)","commercial_area","hsl(55, 45%, 85%)","residential","hsl(60, 7%, 87%)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"],16,["match",["get","class"],"wood","hsla(103, 50%, 60%, 0.8)","scrub","hsla(98, 47%, 68%, 0.6)","agriculture","hsla(98, 50%, 74%, 0.6)","park",["match",["get","type"],["garden","playground","zoo"],"hsl(98, 38%, 68%)","hsl(98, 55%, 70%)"],"grass","hsla(98, 50%, 74%, 0.6)","airport","hsl(230, 40%, 82%)","cemetery","hsl(98, 45%, 75%)","glacier","hsl(205, 45%, 95%)","hospital","hsl(20, 45%, 82%)","pitch","hsl(88, 65%, 75%)","sand","hsl(69, 60%, 72%)","rock","hsla(60, 0%, 85%, 0.5)","school","hsl(40, 45%, 78%)","commercial_area","hsla(55, 45%, 85%, 0.5)",["facility","industrial"],"hsl(230, 20%, 85%)","hsl(60, 12%, 72%)"]],"fill-opacity":["interpolate",["linear"],["zoom"],8,["match",["get","class"],"residential",.8,.2],10,["match",["get","class"],"residential",0,1]],"fill-antialias":!1},"source-layer":"landuse"},{minzoom:15,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, land"},filter:["==",["get","class"],"pitch"],type:"line",source:"composite",id:"pitch-outline",paint:{"line-color":"hsl(0, 0%, 69%)"},"source-layer":"landuse"},{id:"waterway-shadow",type:"line",source:"composite","source-layer":"waterway",minzoom:10,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"],visibility:"none"},paint:{"line-color":"hsl(224, 79%, 69%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"line-translate-anchor":"viewport","line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"water-shadow",type:"fill",source:"composite","source-layer":"water",minzoom:10,layout:{visibility:"none"},paint:{"fill-color":"hsl(224, 79%, 69%)","fill-translate":["interpolate",["exponential",1.2],["zoom"],7,["literal",[0,0]],16,["literal",[-1,-1]]],"fill-translate-anchor":"viewport"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"waterway",type:"line",source:"composite","source-layer":"waterway",minzoom:8,layout:{"line-cap":["step",["zoom"],"butt",11,"round"],"line-join":["step",["zoom"],"miter",11,"round"]},paint:{"line-color":"hsl(198, 100%, 37%)","line-width":["interpolate",["exponential",1.3],["zoom"],9,["match",["get","class"],["canal","river"],.1,0],20,["match",["get","class"],["canal","river"],8,3]],"line-opacity":["interpolate",["linear"],["zoom"],8,0,8.5,1]},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{id:"water",type:"fill",source:"composite","source-layer":"water",layout:{},paint:{"fill-color":"hsl(215, 92%, 81%)"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"}},{layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},maxzoom:8,type:"fill",source:"composite",id:"water-depth",paint:{"fill-antialias":!1,"fill-color":["interpolate",["linear"],["zoom"],6,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0.35)",200,"hsla(205, 75%, 63%, 0.35)",7e3,"hsla(205, 75%, 56%, 0.35)"],8,["interpolate",["linear"],["get","min_depth"],0,"hsla(205, 75%, 70%, 0)",200,"hsla(205, 75%, 63%, 0)",7e3,"hsla(205, 75%, 53%, 0)"]]},"source-layer":"depth"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],type:"fill",source:"composite",id:"wetland",paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,.25,10.5,.15]},"source-layer":"landuse_overlay"},{minzoom:5,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, water"},filter:["match",["get","class"],["wetland","wetland_noveg"],!0,!1],type:"fill",source:"composite",id:"wetland-pattern",paint:{"fill-color":"hsl(194, 38%, 74%)","fill-opacity":["interpolate",["linear"],["zoom"],10,0,10.5,1],"fill-pattern":"wetland","fill-translate-anchor":"viewport"},"source-layer":"landuse_overlay"},{minzoom:13,layout:{visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"Polygon"]],type:"fill",source:"composite",id:"land-structure-polygon",paint:{"fill-color":"hsl(0, 0%, 69%)"},"source-layer":"structure"},{minzoom:13,layout:{"line-cap":"square",visibility:"none"},metadata:{"mapbox:featureComponent":"land-and-water","mapbox:group":"Land & water, built"},filter:["all",["==",["get","class"],"land"],["==",["geometry-type"],"LineString"]],type:"line",source:"composite",id:"land-structure-line",paint:{"line-width":["interpolate",["exponential",1.99],["zoom"],14,.75,20,40],"line-color":"hsl(60, 20%, 85%)"},"source-layer":"structure"},{id:"empty-layer-0",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-1",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"country-boundaries",type:"fill",source:"composite","source-layer":"country_boundaries",paint:{"fill-color":"rgb(200, 200, 200)"},layout:{visibility:"none"}},{id:"empty-layer-2",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-3",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"empty-layer-4",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(0, 0, 0, 0)"},layout:{},source:"composite","source-layer":"country_boundaries"},{id:"water-outline2",minzoom:0,maxzoom:22,type:"line",paint:{"line-color":"rgb(150, 150, 150)"},layout:{visibility:"none"},source:"composite","source-layer":"water"},{id:"water-outline",type:"line",paint:{"line-color":"hsl(0, 0%, 70%)","line-width":["interpolate",["linear"],["zoom"],0,1.5,4,1]},source:"composite","source-layer":"water"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary-bg",paint:{"line-width":["interpolate",["linear"],["zoom"],3,4,12,8],"line-color":"rgb(173, 169, 170)","line-opacity":["interpolate",["linear"],["zoom"],3,0,4,.5],"line-blur":["interpolate",["linear"],["zoom"],3,0,12,2]},"source-layer":"admin"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","admin_level"],0],["==",["get","disputed"],"false"],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary",paint:{"line-color":"rgb(143, 143, 143)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[2,0]],7,["literal",[2,2,6,2]]]},"source-layer":"admin"},{minzoom:1,layout:{},metadata:{"mapbox:featureComponent":"admin-boundaries","mapbox:group":"Administrative boundaries, admin"},filter:["all",["==",["get","disputed"],"true"],["==",["get","admin_level"],0],["==",["get","maritime"],"false"],["match",["get","worldview"],["all","CN"],!0,!1]],type:"line",source:"composite",id:"admin-0-boundary-disputed",paint:{"line-color":"rgb(95, 93, 94)","line-width":["interpolate",["linear"],["zoom"],3,.5,12,2],"line-dasharray":["step",["zoom"],["literal",[3,2,5]],7,["literal",[2,1.5]]]},"source-layer":"admin"},{minzoom:13,layout:{"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-max-angle":30,"symbol-spacing":["interpolate",["linear",1],["zoom"],15,250,17,400],"text-size":["interpolate",["linear"],["zoom"],13,12,18,18],"symbol-placement":"line","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["canal","river","stream","disputed_canal","disputed_river","disputed_stream"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"waterway-label",paint:{"text-color":"hsl(205, 43%, 90%)","text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:4,layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"text-max-angle":30,"text-field":["coalesce",["get","name_en"],["get","name"]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport"},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["glacier","landform","disputed_glacier","disputed_landform"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"natural-line-label",paint:{"text-halo-width":.5,"text-halo-color":"hsl(60, 17%, 84%)","text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"},"source-layer":"natural_label"},{minzoom:4,layout:{"text-size":["step",["zoom"],["step",["get","sizerank"],18,5,12],17,["step",["get","sizerank"],18,13,12]],"icon-image":["case",["has","maki_beta"],["coalesce",["image",["get","maki_beta"]],["image",["get","maki"]]],["image",["get","maki"]]],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-offset":["step",["zoom"],["step",["get","sizerank"],["literal",[0,0]],5,["literal",[0,.8]]],17,["step",["get","sizerank"],["literal",[0,0]],13,["literal",[0,.8]]]],"text-anchor":["step",["zoom"],["step",["get","sizerank"],"center",5,"top"],17,["step",["get","sizerank"],"center",13,"top"]],"text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["dock","glacier","landform","water_feature","wetland","disputed_dock","disputed_glacier","disputed_landform","disputed_water_feature","disputed_wetland"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],4],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],type:"symbol",source:"composite",id:"natural-point-label",paint:{"icon-opacity":["step",["zoom"],["step",["get","sizerank"],0,5,1],17,["step",["get","sizerank"],0,13,1]],"text-halo-color":"hsl(60, 20%, 98%)","text-halo-width":.5,"text-halo-blur":.5,"text-color":"hsl(340, 10%, 38%)"},"source-layer":"natural_label"},{minzoom:1,layout:{"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-max-angle":30,"text-letter-spacing":["match",["get","class"],"ocean",.25,["sea","bay"],.15,0],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"symbol-placement":"line-center","text-pitch-alignment":"viewport","text-field":["coalesce",["get","name_en"],["get","name"]]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"LineString"]],type:"symbol",source:"composite",id:"water-line-label",paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:1,layout:{"text-line-height":1.3,"text-size":["interpolate",["linear"],["zoom"],0,["*",["-",16,["sqrt",["get","sizerank"]]],1],22,["*",["-",22,["sqrt",["get","sizerank"]]],1]],"text-font":["DIN Pro Italic","Arial Unicode MS Regular"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":["match",["get","class"],"ocean",.25,["bay","sea"],.15,.01],"text-max-width":["match",["get","class"],"ocean",4,"sea",5,["bay","water"],7,10]},metadata:{"mapbox:featureComponent":"natural-features","mapbox:group":"Natural features, natural-labels"},filter:["all",["match",["get","class"],["bay","ocean","reservoir","sea","water","disputed_bay","disputed_ocean","disputed_reservoir","disputed_sea","disputed_water"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],1],60,["<",["distance-from-center"],1.5],70,["<",["distance-from-center"],2]],["==",["geometry-type"],"Point"]],type:"symbol",source:"composite",id:"water-point-label",paint:{"text-color":["match",["get","class"],["bay","ocean","sea"],"hsl(205, 71%, 90%)","hsl(205, 43%, 90%)"],"text-halo-color":"hsla(60, 17%, 84%, 0.5)"},"source-layer":"natural_label"},{minzoom:10,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-transform":"uppercase","text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-letter-spacing":["match",["get","type"],"suburb",.15,.05],"text-max-width":7,"text-padding":3,"text-size":["interpolate",["cubic-bezier",.5,0,1,1],["zoom"],11,["match",["get","type"],"suburb",11,10.5],15,["match",["get","type"],"suburb",15,14]],visibility:"none"},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:15,filter:["all",["match",["get","class"],["settlement_subdivision","disputed_settlement_subdivision"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["<=",["get","filterrank"],3],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-subdivision-label",paint:{"text-halo-color":"hsla(60, 25%, 100%, 0.75)","text-halo-width":1,"text-color":"hsl(230, 29%, 36%)","text-halo-blur":.5},"source-layer":"place_label"},{minzoom:2,layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],11,9,10],6,["step",["get","symbolrank"],14,9,12,12,10],8,["step",["get","symbolrank"],16,9,14,12,12,15,10],13,["step",["get","symbolrank"],22,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],"text-justify":"auto",visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:13,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],[">",["get","symbolrank"],6],4,[">=",["get","symbolrank"],7],6,[">=",["get","symbolrank"],8],7,[">=",["get","symbolrank"],10],10,[">=",["get","symbolrank"],11],11,[">=",["get","symbolrank"],13],12,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-minor-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1},"source-layer":"place_label"},{minzoom:2,layout:{"text-line-height":1.1,"text-size":["interpolate",["cubic-bezier",.2,0,.9,1],["zoom"],3,["step",["get","symbolrank"],13,6,11],6,["step",["get","symbolrank"],18,6,16,7,14],8,["step",["get","symbolrank"],20,9,16,10,14],15,["step",["get","symbolrank"],24,9,20,12,16,15,14]],"text-radial-offset":["step",["zoom"],["match",["get","capital"],2,.6,.55],8,0],"symbol-sort-key":["get","symbolrank"],"icon-image":["step",["zoom"],["case",["==",["get","capital"],2],"border-dot-13",["step",["get","symbolrank"],"dot-11",9,"dot-10",11,"dot-9"]],8,""],"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],8,"center"],visibility:"none","text-anchor":["step",["zoom"],["get","text_anchor"],8,"center"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-max-width":7},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:15,filter:["all",["<=",["get","filterrank"],3],["match",["get","class"],["settlement","disputed_settlement"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["zoom"],!1,2,["<=",["get","symbolrank"],6],4,["<",["get","symbolrank"],7],6,["<",["get","symbolrank"],8],7,["<",["get","symbolrank"],10],10,["<",["get","symbolrank"],11],11,["<",["get","symbolrank"],13],12,["<",["get","symbolrank"],15],13,[">=",["get","symbolrank"],11],14,[">=",["get","symbolrank"],15]],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"settlement-major-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-halo-blur":1},"source-layer":"place_label"},{minzoom:3,layout:{"text-size":["interpolate",["cubic-bezier",.85,.7,.65,1],["zoom"],4,["step",["get","symbolrank"],9,6,8,7,7],9,["step",["get","symbolrank"],21,6,16,7,14]],"text-transform":"uppercase","text-font":["DIN Pro Bold","Arial Unicode MS Bold"],"text-field":["coalesce",["get","name_en"],["get","name"]],"text-letter-spacing":.15,"text-max-width":6},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:9,filter:["all",["match",["get","class"],["state","disputed_state"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"state-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":"hsl(60, 25%, 100%)","text-halo-width":1,"text-opacity":.5},"source-layer":"place_label"},{minzoom:1,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-radial-offset":["step",["zoom"],.6,8,0],"text-justify":["step",["zoom"],["match",["get","text_anchor"],["left","bottom-left","top-left"],"left",["right","bottom-right","top-right"],"right","center"],7,"auto"],"text-size":["interpolate",["cubic-bezier",.2,0,.7,1],["zoom"],1,["step",["get","symbolrank"],12.100000000000001,4,9.9,5,8.8],9,["step",["get","symbolrank"],24.200000000000003,4,20.900000000000002,5,18.700000000000003]]},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:10,filter:["all",["match",["get","class"],["country","disputed_country"],["match",["get","worldview"],["all","CN"],!0,!1],!1],["step",["pitch"],!0,50,["<",["distance-from-center"],3],60,["<",["distance-from-center"],4],70,["<",["distance-from-center"],5]]],type:"symbol",source:"composite",id:"country-label",paint:{"icon-opacity":["step",["zoom"],["case",["has","text_anchor"],1,0],7,0],"text-color":"hsl(0, 0.00%, 13.70%)","text-halo-color":["interpolate",["linear"],["zoom"],2,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.25},"source-layer":"place_label"},{minzoom:.75,layout:{"text-field":["coalesce",["get","name_en"],["get","name"]],"text-line-height":1.1,"text-max-width":6,"text-font":["DIN Pro Medium","Arial Unicode MS Regular"],"text-size":["interpolate",["exponential",.5],["zoom"],0,10,2.5,15],"text-transform":"uppercase","text-letter-spacing":.05},metadata:{"mapbox:featureComponent":"place-labels","mapbox:group":"Place labels, place-labels"},maxzoom:3,filter:["==",["get","class"],"continent"],type:"symbol",source:"composite",id:"continent-label",paint:{"text-color":"hsl(230, 29%, 0%)","text-halo-color":["interpolate",["linear"],["zoom"],0,"hsla(60, 25%, 100%, 0.75)",3,"hsl(60, 25%, 100%)"],"text-halo-width":1.5,"text-opacity":["interpolate",["linear"],["zoom"],0,.8,1.5,.5,2.5,0]},"source-layer":"natural_label"},{id:"world-12nm-v4-20231025",minzoom:3,type:"line",paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2],"line-translate":[0,0]},source:"composite","source-layer":"eez_12nm_new1-6jzkww",layout:{"line-join":"round",visibility:"none"}},{id:"china-taiwan",type:"line",paint:{"line-color":"hsl(2, 88%, 55%)","line-opacity":.62,"line-width":["interpolate",["linear"],["zoom"],0,2,22,2]},layout:{"line-join":"round",visibility:"none"},source:"composite","source-layer":"eez-d4udtm"},{id:"ne-10m-outline",type:"line",paint:{"line-color":"hsl(172, 0%, 33%)"},source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv",layout:{visibility:"none"}},{id:"ne-10m-label",type:"symbol",paint:{"text-halo-color":"hsl(0, 0%, 100%)","text-halo-width":1,"text-halo-blur":1},layout:{"text-field":["to-string",["get","name"]],"text-size":12,visibility:"none"},source:"composite","source-layer":"ne_10m_geography_marine_polys-3968bv"},{id:"china-route-line",type:"line",paint:{"line-color":"rgba(119, 239, 157, 1)","line-width":2},source:"composite","source-layer":"china_route-bdtx5d",layout:{visibility:"none"}},{id:"china-route-fill",type:"fill",paint:{"fill-color":"rgba(119, 239, 157, 1)","fill-opacity":.2},source:"composite","source-layer":"china_route-bdtx5d",filter:["match",["get","featureType"],["route"],!0,!1],layout:{visibility:"none"}},{id:"china-route-label",type:"symbol",paint:{"text-color":"rgba(0, 0, 0, 1)"},source:"composite","source-layer":"china_route-bdtx5d",layout:{"text-field":["to-string",["get","RouteName"]],"text-size":10,"text-offset":[0,1.6],visibility:"none"}},{id:"ice-area-fill",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":"rgba(199, 239, 236, 0.7)"},source:"composite","source-layer":"ICE_AREA-6oqazd",layout:{visibility:"none"}},{id:"ice-area-line",minzoom:0,maxzoom:22,type:"line",paint:{"line-color":"rgba(199, 239, 236, 1)"},layout:{visibility:"none"},source:"composite","source-layer":"ICE_AREA-6oqazd"},{id:"tide-stations",minzoom:0,maxzoom:22,type:"symbol",paint:{"text-color":"rgb(0, 0, 0)","text-opacity":["step",["zoom"],0,4,1]},layout:{visibility:"none","text-field":["to-string",["get","Location_EN"]],"text-size":10,"icon-image":"tide","icon-size":1,"icon-offset":[0,-13],"text-offset":[0,1.6],"text-font":["DIN Pro Regular","Arial Unicode MS Regular"]},source:"composite","source-layer":"tide_station_cn-8xvt91"},{id:"loadlines-label",minzoom:0,maxzoom:22,type:"symbol",paint:{"text-color":"rgb(0, 0, 0)"},layout:{"text-field":["to-string",["get","name"]],"text-size":10,"text-font":["DIN Pro Regular","Arial Unicode MS Regular"],visibility:"none","text-offset":[0,1]},source:"composite","source-layer":"loadlines-b6mgr8"},{id:"loadlines-fill",minzoom:0,maxzoom:22,type:"fill",paint:{"fill-color":["match",["get","val"],["LLGreen"],"rgba(164, 214, 217, 0.6)",["LLBlue"],"rgba(53, 121, 194, 0.6)",["LLRed"],"rgba(217, 150, 151, 0.6)",["LLSUMMER"],"rgba(111, 110, 212, 0.6)","rgba(255, 255, 255, 0.6)"],"fill-outline-color":"rgba(255, 255, 255, 0.3)"},layout:{visibility:"none"},source:"composite","source-layer":"loadlines-b6mgr8"}],created:"2025-07-18T03:20:31.079Z",modified:"2025-07-31T03:57:21.238Z",id:"cmd894dwn036m01rf7anc0k0d",owner:"neatchenheng",visibility:"private",protected:!1,draft:!1},zoom:this.zoom,center:this.tropicals.center||[120,30],preserveDrawingBuffer:!0,projection:"mercator",attributionControl:!1,dragPan:!1});l.on("load",()=>{this.map=l,this.map.scrollZoom.disable(),this.handleSetCenterAndBbox(),this.handleRenderTropcals(),this.handleDrawHurricaneMarker()})},handleSetCenterAndBbox(){var d,c,i;const l=[];(i=(c=(d=this.tropicals)==null?void 0:d.data)==null?void 0:c.features)==null||i.forEach(h=>{var p,y,m,b;((p=h==null?void 0:h.properties)==null?void 0:p.type)==="forecast"&&!h.properties.disabled&&(((y=h==null?void 0:h.geometry)==null?void 0:y.type)==="LineString"?l.push(...(m=h==null?void 0:h.geometry)==null?void 0:m.coordinates):l.push((b=h==null?void 0:h.geometry)==null?void 0:b.coordinates))});const a=X.LaneHelper.calculateCenter([l]);this.map.setCenter(a);let t=X.LaneHelper.calculateBBox([l]);this.map.fitScreenCoordinates(this.map.project([t[0]-10,t[1]-10]),this.map.project([t[2]+10,t[3]+10]),this.map.getBearing()),this.map.addSource(this.bboxSource,{type:"geojson",data:{type:"Feature",geometry:{type:"LineString",coordinates:[[t[0]-5,t[1]-5],[t[2]+5,t[1]-5],[t[2]+5,t[3]+5],[t[0]-5,t[3]+5],[t[0]-5,t[1]-5]]}}}),this.map.addLayer({id:this.bboxLayer,type:"line",source:this.bboxSource,layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(0,0,0,0.6)","line-width":1,"line-opacity":1,"line-dasharray":[2,2]}})},handleRenderTropcals(){var l,a,t,d,c;if(this.tropicals){const i=new Date().valueOf();let h=0,p=0;(l=this.map)!=null&&l.getSource(this.source)?((t=this.map)==null||t.getSource(this.source).setData((a=this.tropicals)!=null&&a.active?this.tropicals.data:this.empty),p=new Date().valueOf()-(i+h),console.log("[tropicals] update elapsed: ",p,", total: ",h+=p)):(this.map.addSource(this.source,{type:"geojson",data:(d=this.tropicals)!=null&&d.active?(c=this.tropicals)==null?void 0:c.data:this.empty}),this.map.addLayer({id:this.historyLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","history"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":4,"line-opacity":.5}}),this.map.addLayer({id:this.forecastLayer,type:"line",source:this.source,filter:["all",["==","$type","LineString"],["==","type","forecast"],["!=","disabled",!0]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["match",["get","model"],"cma","#e2ea03","jma","#01d2b7","ecmwf","#f582f2","ukm","#f5bb47","noaa-at","#9758fb","noaa-ep","#9758fb","#fff"],"line-width":3,"line-opacity":1,"line-dasharray":[1,2]}}))}},handleDrawHurricaneMarker(){var d,c,i,h,p,y,m,b,x,f,H,v,S,V,k,F,M,C,T,I,u,L,P,O;const l=X.TropicalHelper.interpolate(this.tropicals,1),a=JSON.parse(JSON.stringify(l)),t=[];if(a.forEach(_=>{var z,D,s;(z=_.properties)!=null&&z.name&&!t.includes((D=_.properties)==null?void 0:D.name)&&t.push((s=_.properties)==null?void 0:s.name)}),t.forEach(_=>{var s;const D=(s=a.filter(R=>{var r;return((r=R.properties)==null?void 0:r.name)===_})[0])==null?void 0:s.properties.model;a.map((R,r)=>{var Z,Y;return((Z=R.properties)==null?void 0:Z.name)===_&&(R.properties.disabled=((Y=R.properties)==null?void 0:Y.model)!==D),R})}),this.interpolateData=JSON.parse(JSON.stringify(a)),(d=this.interpolateMarkers)==null||d.forEach(_=>_==null?void 0:_.remove()),this.interpolateMarkers=[],(c=this.interpolateData)!=null&&c.length&&this.tropicals.active){const _=this.interpolateData.filter(z=>z.properties.date===this.ts&&!z.properties.disabled);this.interpolateData.forEach(z=>{});for(const z of _)if(!z.properties.disabled){let D="#f44336";((h=(i=z.properties)==null?void 0:i.wind)==null?void 0:h.kts)<32||!((y=(p=z.properties)==null?void 0:p.wind)!=null&&y.kts)?D="#03f869":((b=(m=z.properties)==null?void 0:m.wind)==null?void 0:b.kts)>=32&&((f=(x=z.properties)==null?void 0:x.wind)==null?void 0:f.kts)<47?D="#f2f202":((v=(H=z.properties)==null?void 0:H.wind)==null?void 0:v.kts)>=47&&((V=(S=z.properties)==null?void 0:S.wind)==null?void 0:V.kts)<63?D="#ff9100":((F=(k=z.properties)==null?void 0:k.wind)==null?void 0:F.kts)>=63&&((C=(M=z.properties)==null?void 0:M.wind)==null?void 0:C.kts)<79?D="#f44336":((I=(T=z.properties)==null?void 0:T.wind)==null?void 0:I.kts)>=79&&((L=(u=z.properties)==null?void 0:u.wind)==null?void 0:L.kts)<94?D="#c604a4":((O=(P=z.properties)==null?void 0:P.wind)==null?void 0:O.kts)>=94?D="#6b05bb":D="#f44336";const s=`<svg t="1719918955501"
|
|
189
189
|
class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="18382"
|
|
190
190
|
xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
|
|
191
191
|
<path
|