1import{a as Q}from"./chunk-7XLLXXSL.js";import{a as G}from"./chunk-LNWKCOL5.js";import"./chunk-J6BXKDMX.js";import{a as K}from"./chunk-RLQFTXSY.js";import{a as M,b as S}from"./chunk-I43Q6A33.js";import"./chunk-MQZTGDUR.js";import{a as D}from"./chunk-M5WUMGD5.js";import{a as J}from"./chunk-62MNQHFU.js";import{a as T}from"./chunk-I7F563ZN.js";import"./chunk-P3BJTOUG.js";import"./chunk-HKFKHIIY.js";import"./chunk-6FOAVH3S.js";import{a as R}from"./chunk-7A3REAND.js";import"./chunk-SNLRMY3K.js";import"./chunk-DWAHLAAN.js";import"./chunk-NPG23P4N.js";import"./chunk-RVDLCEWN.js";import"./chunk-GCCEWEET.js";import"./chunk-L2CCHGQV.js";import"./chunk-SKUBTOZY.js";import"./chunk-3BWKPOPU.js";import"./chunk-4E5QPNAX.js";import"./chunk-X2GDN3V3.js";import"./chunk-3UF247RB.js";import"./chunk-CKWJV3YE.js";import{Ac as m,Kb as b,Lc as x,Ma as I,Mb as P,Nb as H,Oc as h,Pc as f,Qc as C,ad as V,bd as B,cc as _,d as E,dc as u,ec as W,fc as L,gc as O,hc as k,ic as w,jc as d,kc as l,lc as j,ma as c,pd as g,ra as F,sa as $,tc as A,ub as r,vd as q,wd as p,yc as v}from"./chunk-CGFGRJZC.js";import{c as U}from"./chunk-PVQQOPSA.js";import"./chunk-PCOOZPAX.js";function tt(i,n){if(i&1){let o=A();d(0,"div",4,0),v("click",function(){let e=F(o).$index,a=m();return $(a.onTabClick(e))}),d(2,"div"),h(3),l()()}if(i&2){let o=n.$implicit,t=n.$index,e=m();x("active",t===e.activeTab()),r(3),f(o)}}var X=(()=>{let n=class n{constructor(){this.slideshowService=c(M),this.tabs=p.required(),this.stretchTabs=p(!1),this.activeTabChange=q(),this.activeTab=this.slideshowService.slideIndex,this.destroy$=new E,this.navBarSettings={itemDistance:20,firstItemOffset:16}}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onTabClick(t){this.slideshowService.updateIndex(t),this.activeTabChange.emit(t)}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=b({type:n,selectors:[["wo-tab-navigation-bar"]],hostVars:2,hostBindings:function(e,a){e&2&&x("stretch-tabs",a.stretchTabs())},inputs:{tabs:[1,"tabs"],stretchTabs:[1,"stretchTabs"]},outputs:{activeTabChange:"activeTabChange"},decls:4,vars:1,consts:[["swipe",""],[1,"anchor"],[3,"navBarSettings"],[1,"nav-item-container",3,"active"],[1,"nav-item-container",3,"click"]],template:function(e,a){e&1&&(d(0,"div",1)(1,"wo-swipe-container",2),O(2,tt,4,3,"div",3,L),l()()),e&2&&(r(),w("navBarSettings",a.stretchTabs()?void 0:a.navBarSettings),r(),k(a.tabs()))},dependencies:[S],styles:['[_nghost-%COMP%]{display:block;background-color:#f2f7f9;overflow-x:hidden;cursor:ew-resize}.anchor[_ngcontent-%COMP%]{overflow-x:visible}html[data-device=desktop][_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container[_ngcontent-%COMP%]{cursor:pointer}html[data-device=desktop][_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container.mouse-move[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container.mouse-move[_ngcontent-%COMP%]{cursor:ew-resize}[data-device=desktop][_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container[_ngcontent-%COMP%]{cursor:pointer}[data-device=desktop][_nghost-%COMP%] .anchor[_ngcontent-%COMP%] wo-swipe-container.mouse-move[_ngcontent-%COMP%]{cursor:ew-resize}.nav-item-container[_ngcontent-%COMP%]{font-size:16px;color:#10658eba;display:flex;align-items:center;height:54px;padding:2px 4px 2px 16px;flex-shrink:0;position:relative}.nav-item-container.active[_ngcontent-%COMP%]{color:#10658e}.nav-item-container.active[_ngcontent-%COMP%]:after{position:absolute;left:0;bottom:0;content:"";width:calc(100% + 12px);border-bottom:3px solid #003959}.stretch-tabs[_nghost-%COMP%]{width:100%;cursor:default}.stretch-tabs[_nghost-%COMP%] .nav-item-container[_ngcontent-%COMP%]{flex:1 1 0;justify-content:center;padding:2px 0;text-align:center}.stretch-tabs[_nghost-%COMP%] .nav-item-container.active[_ngcontent-%COMP%]:after{width:100%}']});let i=n;return i})();var Y=(()=>{let n=class n{constructor(){this.batchSvc=c(D),this.eventName=p.required(),this.label=p()}onClick(){this.batchSvc.triggerEvent(this.eventName(),this.label())}};n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=P({type:n,selectors:[["","woBatchEvent",""]],hostBindings:function(e,a){e&1&&v("click",function(){return a.onClick()})},inputs:{eventName:[1,"eventName"],label:[1,"label"]}});let i=n;return i})();var Z=(()=>{let n=class n{constructor(){this.batchSvc=c(D),this.attribute=p.required(),this.data=p.required()}async onClick(){let t=this.data(),e=this.attribute();if(t.length!==e.length)throw new Error("Data or attribute is missing");for(let a=0;a<e.length;a++)t[a]==="useDate"?await this.batchSvc.setAttributes({[e[a]]:new Date}):await this.batchSvc.setAttributes({[e[a]]:t[a]})}};n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=P({type:n,selectors:[["","woBatchAttribute",""]],hostBindings:function(e,a){e&1&&v("click",function(){return a.onClick()})},inputs:{attribute:[1,"attribute"],data:[1,"data"]}});let i=n;return i})();var z=(()=>{let n=class n{constructor(){this.i18nConfig=c(T)}transform(t){return t.toString().replace(".",this.i18nConfig.config.decimalPoint)}};n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=H({name:"decimalPoint",type:n,pure:!0});let i=n;return i})();var et=()=>["last_click_water"],nt=()=>["useDate"];
1function it(i,n){if(i&1&&(d(0,"div",5),h(1),l()),i&2){let o=m().$implicit;r(),C(" ",o.temperature," ")}}function at(i,n){if(i&1&&(d(0,"div",6)(1,"div",11),h(2),l(),d(3,"div"),h(4),l()()),i&2){let o=m().$implicit;r(2),f(o.wave),r(2),f(o.wind)}}function ot(i,n){if(i&1&&(d(0,"div",7),h(1),l()),i&2){let o=m().$implicit;r(),C(" ",o.tidesStationName," ")}}function rt(i,n){if(i&1&&(d(0,"div",8),h(1),l()),i&2){let o=m().$implicit;r(),C(" ",o.highTide," ")}}function st(i,n){if(i&1&&(d(0,"div",9),h(1),l()),i&2){let o=m().$implicit;r(),C(" ",o.tidalCoefficient," ")}}function ct(i,n){if(i&1&&(d(0,"div",10),h(1),l()),i&2){let o=m().$implicit;r(),C(" ",o.lowTide," ")}}function dt(i,n){if(i&1&&(d(0,"div",4,0),_(2,it,2,1,"div",5),_(3,at,5,2,"div",6),_(4,ot,2,1,"div",7),_(5,rt,2,1,"div",8),_(6,st,2,1,"div",9),_(7,ct,2,1,"div",10),l()),i&2){let o=n.$implicit;r(2),u(o.temperature?2:-1),r(),u(o.wave||o.wind?3:-1),r(),u(o.tidesStationName?4:-1),r(),u(o.highTide?5:-1),r(),u(o.tidalCoefficient?6:-1),r(),u(o.lowTide?7:-1)}}var qt=(()=>{let n=class n{constructor(){this.translate=c(R),this.unitsFetcher=c(J),this.decimalPoint=c(z),this.localizedDay=c(G),this.i18n=c(T),this.slideshowService=c(M),this.textSeparator="\xA0\xA0/\xA0\xA0",this.insertionConfig=p.required(),this.placemark=g(()=>this.insertionConfig().placemark),this.water=g(()=>this.insertionConfig().water),this.title=g(()=>this.isTidesOnly()?this.translate.instant("weather_stream_title_tides"):this.water().name?this.water().name:this.translate.instant("weather_stream_title_coast")),this.uiTabs=g(()=>this.water().days.map(t=>this.localizedDay.translateDate(t.date))),this.isLake=g(()=>this.water().type==="lake"),this.isTidesOnly=g(()=>this.water().type==="only_tides"),this.days=g(()=>this.water().days.map(t=>{let e=this.makeWindText(t);return{temperature:this.makeTemperatureText(t),wave:this.makeWaveText(t,e),wind:e,tidesStationName:this.water().tidesStationName,lowTide:t.tides?this.makeTideText(t.tides.low,!0):void 0,highTide:t.tides?this.makeTideText(t.tides.high,!1):void 0,tidalCoefficient:t.tides?this.makeTidalCoefficientText(t.tidalCoefficients):void 0}})),this.updateSlideLength=I(()=>{this.slideshowService.length=this.days().length})}makeTidalCoefficientText(t){if(!t||t.length<1)return;let e=this.translate.instant("water_tidal_coefficient"),a="";for(let s=0;s<t.length;s++)a=a+` ${t[s]??""}`,s!==t.length-1&&(a=a+" /");return e=e+` ${a.replace(/^[\s/]+/,"").trim()}`,e}makeTideText(t,e){if(t.length<1)return;let a=e?this.translate.instant("water_low_tide"):this.translate.instant("water_high_tide");for(let s=0;s<t.length;s++)a=a+` ${this.i18n.formatTime(t[s])}`,s!==t.length-1&&(a=a+" /");return a}makeTemperatureText(t){if(t.temperature?.water.rounded==null)return"";let e=this.translate.instant("water_surface_temperature_web",{temperature:`${t.temperature.water.rounded}\xB0`});return t.temperature.air?.rounded!=null&&(e+=this.textSeparator+this.translate.instant("water_air_temperature_web",{temperature:`${t.temperature.air.rounded}\xB0`})),e}makeWaveText(t,e){if(!t.waveHeight)return;let a;if(t.waveHeight.description==="frozen")a=this.translate.instant("water_ice_covered");else if(t.waveHeight.description==="calm")a=this.translate.instant("water_calm_sea");else{let s,N;this.unitsFetcher.units.systemOfMeasurement===U.metric?(s=this.decimalPoint.transform(t.waveHeight.meter),N=this.translate.instant("units_meter_unit")):(s=this.decimalPoint.transform(t.waveHeight.foot),N=this.translate.instant("units_feet_unit")),a=this.translate.instant("water_wave_height_web",{height:s+" "+N})}return e&&(a+=this.textSeparator),a}makeWindText(t){if(!t.wind)return;let e=Q({translate:this.translate,omitWindValue:!0,wind:t.wind});return e[1]&&e[1].textLines.length?e[1].textLines[0].text.join(" "):e[0]&&e[0].textLines.length?e[0].textLines[0].text.join(" "):""}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=b({type:n,selectors:[["wo-water-card"]],hostVars:2,hostBindings:function(e,a){e&2&&x("lake",a.isLake())},inputs:{insertionConfig:[1,"insertionConfig"]},features:[V([z,M])],decls:8,vars:8,consts:[["swipe",""],["woBatchEvent","","woBatchAttribute","",3,"eventName","label","attribute","data"],[1,"card-content"],[3,"tabs"],[1,"day"],[1,"row","temperature"],[1,"row","wind"],[1,"row","tide-station-name"],[1,"row","tide-high"],[1,"row","tide-coefficient"],[1,"row","tide-low"],[1,"wave"]],template:function(e,a){e&1&&(d(0,"wo-card",1)(1,"div",2)(2,"h4"),h(3),l(),j(4,"wo-tab-navigation-bar",3),d(5,"wo-swipe-container"),O(6,dt,8,6,"div",4,W),l()()()),e&2&&(w("eventName","clicked_element")("label","water")("attribute",B(6,et))("data",B(7,nt)),r(3),f(a.title()),r(),w("tabs",a.uiTabs()),r(2),k(a.days()))},dependencies:[K,Y,Z,S,X],styles:[".lake[_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{background-image:url(assets/water/ic_lake_light.svg)}html[data-device=mobile] .lake[_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{background-size:330px}[data-device=mobile].lake[_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{background-size:330px}.card-content[_ngcontent-%COMP%]{background:#fff url(assets/water/ic_coast_light.svg) bottom right no-repeat}html[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%], html[data-device=mobile] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{padding:16px 16px 32px;background-size:contain}[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{padding:16px 16px 32px;background-size:contain}html[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{padding:20px 16px 62px;background-size:600px}@container (width <= 300px){html[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{background-size:400px;padding-bottom:42px}}[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{padding:20px 16px 62px;background-size:600px}@container (width <= 300px){[data-device=desktop][_nghost-%COMP%] .card-content[_ngcontent-%COMP%]{background-size:400px;padding-bottom:42px}}h4[_ngcontent-%COMP%]{font-weight:400;margin:0;color:#003959;font-weight:300}
1html[data-device=mobile][_nghost-%COMP%] h4[_ngcontent-%COMP%], html[data-device=mobile] [_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:22px}[data-device=mobile][_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:22px}html[data-device=desktop][_nghost-%COMP%] h4[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px}@container (width <= 300px){html[data-device=desktop][_nghost-%COMP%] h4[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:20px}}[data-device=desktop][_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:24px}@container (width <= 300px){[data-device=desktop][_nghost-%COMP%] h4[_ngcontent-%COMP%]{font-size:20px}}.row[_ngcontent-%COMP%]{margin:0;background:0px 50% no-repeat;font-weight:300;line-height:1.4;padding:16px 16px 16px 36px}html[data-device=desktop][_nghost-%COMP%] .row[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .row[_ngcontent-%COMP%]{font-size:16px;padding:12px 16px 12px 56px}@container (width <= 300px){html[data-device=desktop][_nghost-%COMP%] .row[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .row[_ngcontent-%COMP%]{font-size:13px}}[data-device=desktop][_nghost-%COMP%] .row[_ngcontent-%COMP%]{font-size:16px;padding:12px 16px 12px 56px}@container (width <= 300px){[data-device=desktop][_nghost-%COMP%] .row[_ngcontent-%COMP%]{font-size:13px}}.row.tide-station-name[_ngcontent-%COMP%]{color:#10658e;padding-left:0}@container (width <= 300px){html[data-device=desktop][_nghost-%COMP%] .row.tide-station-name[_ngcontent-%COMP%], html[data-device=desktop] [_nghost-%COMP%] .row.tide-station-name[_ngcontent-%COMP%]{font-size:16px}}@container (width <= 300px){[data-device=desktop][_nghost-%COMP%] .row.tide-station-name[_ngcontent-%COMP%]{font-size:16px}}.row[_ngcontent-%COMP%]:not(:last-child):not(.tide-station-name){border-bottom:1px solid #e6eff3}html[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child, html[data-device=mobile] [_nghost-%COMP%] .card-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child{margin-bottom:12px}[data-device=mobile][_nghost-%COMP%] .card-content[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:last-child{margin-bottom:12px}.temperature[_ngcontent-%COMP%]{background-image:url(assets/water/ic_watertemperature_blue.svg)}.wind[_ngcontent-%COMP%]{background-image:url(assets/water/ic_windsock_blue.svg);display:flex}.tide-high[_ngcontent-%COMP%]{background-image:url(assets/water/ic_tide_high.svg)}.tide-coefficient[_ngcontent-%COMP%]{background-image:url(assets/water/ic_tide_coefficient.svg)}.tide-low[_ngcontent-%COMP%]{background-image:url(assets/water/ic_tide_low.svg)}.wave[_ngcontent-%COMP%]{white-space:pre}wo-swipe-container[_ngcontent-%COMP%]{position:relative;overflow:hidden}.day[_ngcontent-%COMP%]{width:100%;min-width:100%}wo-tab-navigation-bar[_ngcontent-%COMP%]{margin:16px -16px}"]});let i=n;return i})();export{qt as WaterCardComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.