1import{a as bn,b as Sn}from"./chunk-ZKRFQ35Y.js";import{a as yo}from"./chunk-BFAAHA6R.js";import{a as Cr}from"./chunk-AHS5TRUG.js";import{a as vn}from"./chunk-2W7ATVFV.js";import{a as An}from"./chunk-MSH5G4LV.js";import{a as Bn,b as St,c as In}from"./chunk-U3G7E5XM.js";import{a as bt}from"./chunk-IKYITADH.js";import{a as xr}from"./chunk-MKFCFEQI.js";import{a as Ai,b as gn,c as Xa,e as ir,f as sr,g as gr}from"./chunk-4PHFSCKW.js";import{a as Le}from"./chunk-RWNUTB4V.js";import{a as dr,b as mr}from"./chunk-C6BJX7XG.js";import{b as hr}from"./chunk-LCK4D7US.js";import{a as vt}from"./chunk-ZT76AGCQ.js";import{a as er}from"./chunk-PAYEVFGE.js";import{a as fr}from"./chunk-AJARWL2U.js";import{a as cr}from"./chunk-YHIVOCQV.js";import{l as yn}from"./chunk-3ZDWZSU6.js";import"./chunk-G25AABD3.js";import{a as Ln,b as _r,e as yr}from"./chunk-3HN3D4LP.js";import{a as Ba}from"./chunk-6GXRBR4W.js";import{b as Sa}from"./chunk-3F2YT3OM.js";import"./chunk-D5DGY3ZV.js";import"./chunk-4JLQPLEL.js";import{b as qa,c as Wa}from"./chunk-4LOABJ3M.js";import"./chunk-42BVCYY7.js";import"./chunk-N6Y7ULJL.js";import"./chunk-WXAFXR2U.js";import"./chunk-7Y3FQDOT.js";import"./chunk-ROINKBRY.js";import{a as nr}from"./chunk-DXZQFSLL.js";import{c as Za,d as Co,f as Gi,g as go,h as _o,i as ho}from"./chunk-ZWWJ34WA.js";import{a as gi}from"./chunk-4PGML77R.js";import{a as bo}from"./chunk-KMRW5IRE.js";import{a as or,b as At,c as kn}from"./chunk-FEBNBK4O.js";import{a as rr,b as Pn,c as wn}from"./chunk-GIA6ZYVL.js";import"./chunk-HZM4QNTT.js";import{b as pr}from"./chunk-IB6VOO33.js";import{a as Tn}from"./chunk-KB2MZCRM.js";import{a as Pt}from"./chunk-GYMRA332.js";import"./chunk-KNGCLLWR.js";import{a as ur}from"./chunk-BGJKOUOB.js";import{b as ja}from"./chunk-TW34AOYT.js";import{a as xn}from"./chunk-PXJMM6V5.js";import{a as wt,c as lr}from"./chunk-O5H2RQ65.js";import{a as xo}from"./chunk-FXD4LZY5.js";import{a as _i}from"./chunk-OMR2G26Q.js";import"./chunk-QO2HABBS.js";import{a as ar}from"./chunk-UU4Q27SS.js";import{a as En}from"./chunk-IPHGRA5H.js";import"./chunk-YUUBOKKA.js";import"./chunk-XL2L3XRG.js";import"./chunk-YKEB33KP.js";import"./chunk-CJ43KWIF.js";import{a as _n}from"./chunk-YOQYLGCC.js";import{c as Va,d as Ua,k as Ga}from"./chunk-7ZUEGBNZ.js";import"./chunk-5NKD3MMU.js";import{a as fn}from"./chunk-5ZMJ6PEI.js";import"./chunk-SFN3BXRS.js";import"./chunk-JI55HRMK.js";import{a as ht}from"./chunk-KBTMEW65.js";import{a as qe}from"./chunk-N5N3Z32F.js";import"./chunk-YRU2G7WE.js";import{a as q}from"./chunk-OU43MD5Y.js";import{a as $a}from"./chunk-XO2SJL2E.js";import{b as un}from"./chunk-LG4VJBG2.js";import{a as We}from"./chunk-TS3YSP7T.js";import{d as Ge,f as Ci,j as Pe,k as Ha,m as Me}from"./chunk-GEEGHIUZ.js";import{a as Ya}from"./chunk-KEPO3XRV.js";import"./chunk-M4O52BM5.js";import{b as vo}from"./chunk-5UQCYCU2.js";import"./chunk-WZQYQEGJ.js";import{a as se,c as hn}from"./chunk-KQ3LQE5K.js";import{a as yt,b as fo,c as Ja}from"./chunk-264LSN5Q.js";import"./chunk-PQZMHWGX.js";import"./chunk-SYYLUMD7.js";import"./chunk-LCDR6QDH.js";import{a as Qa}from"./chunk-J75ED3OD.js";import{a as _t}from"./chunk-TZXHAXRN.js";import"./chunk-5LKLH3FK.js";import{b as Re}from"./chunk-EJKZT23F.js";import{b as xt}from"./chunk-SZOU52YA.js";import{b as Aa,c as La}from"./chunk-TB3QLZZI.js";import{A as Na,F as za,J as kt,R as fi,V as Ri,a as ui,b as pn,c as uo,d as sn,n as cn,o as ti,p as dn,q as Da,r as Fa,u as Ma,v as Ra,w as Oa,x as mn,y as gt}from"./chunk-IUY3OZ6A.js";import{c as ge,f as Mi}from"./chunk-YZCE2BV3.js";import{a as Ea}from"./chunk-YHXJPP4M.js";import{a as ta,l as Fi}from"./chunk-SFNVDBCY.js";import{a as Li,i as Pa,k as wa,l as X,n as ke,o as Tt}from"./chunk-CA64H5V4.js";import{h as ye,j as Di,m as ka}from"./chunk-HHESMVTY.js";import{b as $o,c as It}from"./chunk-MNOFPKL2.js";import"./chunk-XHMAF33L.js";import{a as tr}from"./chunk-LQI72SK3.js";import{a as pa,da as ba,ja as ft}from"./chunk-LVSFGXMT.js";import"./chunk-XOXVRGVP.js";import{a as an}from"./chunk-HIQTJYBX.js";import"./chunk-FNA33Y3U.js";import{b as Qe,c as Xe,e as Je}from"./chunk-AE6H733Y.js";import"./chunk-HRG2OGX6.js";import"./chunk-7TEJT4TK.js";import{a as va}from"./chunk-37UWHEOS.js";import{a as Ze}from"./chunk-SRROJM3I.js";import"./chunk-SDUYDO5E.js";import{$ as ga,Ha as wi,Ia as ut,K as ua,M as tn,N as fa,P as Ca,X as nn,a as yi,aa as mt,b as Jt,e as pt,fa as _a,i as sa,l as ca,m as da,ma as ha,p as en,pa as xa,s as ct,t as ma,ta as on,w as dt,za as ya}from"./chunk-IC4DFN2H.js";import"./chunk-OKSDLFSL.js";import{a as st,g as oa,k as aa,m as ra,n as la,o as Zt}from"./chunk-3T7T732G.js";import{a as T}from"./chunk-WAHZTOZN.js";import{B as Yo,C as Qo,D as jt,E as Xo,F as Jo,G as Zo,M as le,T as Te}from"./chunk-3XXQJOJ5.js";import{a as Ka}from"./chunk-5EYXUWGZ.js";import{a as Cn}from"./chunk-ORN6TE6F.js";import{$ as A,$b as d,$c as Oo,$d as Ho,Ab as s,Ac as t,Ad as Ve,Ah as U,Bb as y,Bc as n,Bd as ot,Bf as Go,Bh as na,C as O,Ca as Lo,Cb as oe,Cc as we,Ch as pe,Db as Q,Dc as he,Dd as di,Dg as Qt,Ea as Si,Eb as Ei,Ec as it,Ed as No,Eh as ei,Fg as Xt,G as ko,Gd as Ue,Gg as ea,Hb as Bi,Hd as zo,Hg as ia,I as ne,Ib as z,Id as Vo,J as Hi,Jb as Ht,Jd as He,Jh as Ia,Ka as Do,Kb as k,Kd as qt,L as pi,La as zt,Lc as Ro,Lg as mo,Mb as u,Md as $e,O as Po,Od as Uo,Of as Ne,Oh as ii,P as j,Pd as Ii,Pf as ki,Ph as Ct,Q as wo,Qb as Ji,Qh as be,Rb as Zi,Rh as rn,Sa as
1so,Sb as et,Sh as Ta,Ua as r,Ud as mi,Uh as ln,Va as Vt,Vc as tt,Vd as Ee,Vh as ve,Wb as ci,Wd as Be,Xf as Kt,Yb as me,Yc as nt,Yf as rt,Zc as F,Zf as qo,_b as Fo,_e as Wt,a as ji,ac as x,ae as co,b as Yi,bc as g,cc as ae,dc as Mo,dd as xe,eb as L,ec as $t,ef as xi,fa as Ce,fb as Ut,g as ni,ga as po,h as Rt,hg as Wo,ib as Qi,ig as Ko,jf as V,jh as lt,ka as Ye,kb as Y,l as Oe,lc as de,lg as jo,m as lo,ma as oi,mc as ai,na as si,nc as Ke,og as ri,p as hi,pb as G,pg as M,qb as $i,qg as ue,ra as Ao,rb as f,rg as Ae,s as K,sa as Nt,sb as Xi,sg as I,t as bi,tb as C,tc as D,tg as ee,uc as E,ud as De,ug as re,va as h,vb as Z,vc as ce,vf as Ti,vg as Yt,w as To,wb as H,wc as Bt,wd as Gt,x as b,xb as $,xf as Ie,xg as B,y as Ot,ya as P,yb as _,yf as at,yg as R,z as W,za as w,zb as c,zd as Fe,zg as Pi}from"./chunk-E3VWIT5L.js";var je=(function(e){return e[e.Internal=0]="Internal",e[e.External=1]="External",e[e.Hybrid=2]="Hybrid",e})(je||{});var jr=["deleteInput"],Yr=e=>({orgName:e});function Qr(e,l){e&1&&(c(0,"mat-error"),y(1,"span",5),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(2),g(" ",n(4,3,n(3,1,"ERRORS.DELETE_KEY_NOT_MATCH"))," "))}var vr=(()=>{let l=class l extends _n{constructor(){super(...arguments),this.localizationService=h(B),this.currentUserService=h(ye),this.store=h(V),this.deleteInputControl=new di(null,[We()]),this.deleteKey$=new Oe("DELETE"),this.deleteKeyValidator=i=>i.value!=null&&i.value.toUpperCase()!==this.deleteKey$.value?{deleteKeyNotMatch:!0}:null}ngOnInit(){this.organizationNameLocalizations$=this.store.select(Ne).pipe(T(ee),b(re),b(i=>i.organizationNameLocalizations)),this.localizationService.getTranslation$("DELETE").subscribe(i=>this.deleteKey$.next(i)),this.deleteInputControl.addValidators(this.deleteKeyValidator)}onCancelled(){return K(!0)}onConfirmed(){return this.deleteInputControl.markAllAsTouched(),this.deleteInputControl.valid?this.currentUserService.deleteCurrentShopper():(this.deleteInputRef?.nativeElement.focus(),hi)}};l.\u0275fac=(()=>{let i;return function(p){return(i||(i=zt(l)))(p||l)}})(),l.\u0275cmp=L({type:l,selectors:[["app-delete-account-dialog"]],viewQuery:function(a,p){if(a&1&&Ji(jr,5),a&2){let m;Zi(m=et())&&(p.deleteInputRef=m.first)}},features:[D([{provide:M,useValue:["delete-account-dialog.component"]},B]),Qi],decls:25,vars:31,consts:[["deleteInput",""],[1,"form-control-wrapper"],["id","deleteInput-label","for","deleteInput"],["appearance","outline"],["id","deleteInput","aria-labelledby","deleteInput-label","type","text","matInput","",3,"formControl"],["matPrefix","","aria-hidden","true",1,"ng-fa-icon","fas","fa-exclamation-circle"]],template:function(a,p){if(a&1&&(c(0,"p"),d(1),t(2,"async"),t(3,"localizeFromArray"),t(4,"async"),t(5,"localize"),t(6,"async"),s(),c(7,"p"),d(8),t(9,"localize"),t(10,"async"),s(),c(11,"p"),d(12),t(13,"localize"),t(14,"async"),s(),c(15,"div",1)(16,"label",2)(17,"strong"),d(18),t(19,"localize"),t(20,"async"),s()(),c(21,"mat-form-field",3),y(22,"input",4,0),f(24,Qr,5,5,"mat-error"),s()()),a&2){let m;r(),x(n(6,15,we(5,12,"DELETE_WARNING.1",ce(29,Yr,(m=n(4,10,n(3,8,n(2,6,p.organizationNameLocalizations$))))==null?null:m.organizationName)))),r(7),x(n(10,19,n(9,17,"DELETE_WARNING.2"))),r(4),x(n(14,23,n(13,21,"DELETE_WARNING.3"))),r(6),x(n(20,27,n(19,25,"LABEL.DELETE"))),r(4),_("formControl",p.deleteInputControl),r(2),C(p.deleteInputControl.errors!=null&&p.deleteInputControl.errors.deleteKeyNotMatch||p.deleteInputControl.errors!=null&&p.deleteInputControl.errors.required?24:-1)}},dependencies:[xe,ve,De,Fe,Vo,Pe,Me,Ge,F,R,ei],styles:[".mat-mdc-form-field[_ngcontent-%COMP%]{width:200px!important}"],changeDetection:0});let e=l;return e})();var zi=(function(e){return e[e.Confirmed=0]="Confirmed",e[e.Shipped=1]="Shipped",e[e.Cancelled=2]="Cancelled",e})(zi||{});var Xr=()=>["/"],Jr=()=>["fas","plus-circle"],Zr=()=>["/account/update-profile"],el=()=>["/account/all-bookings"],il=()=>["/account/change-email"],br=()=>["/account/my-purchases"],tl=()=>["/account/notification-dashboard"],nl=()=>["/account/my-applications"],ol=()=>["/account/change-password"],al=()=>["/account/linked"],rl=()=>["/faq"],ll=()=>["/account/group-hold-search"],pl=()=>["/account/group-holds"],sl=()=>["/gift-cards/purchase"],cl=()=>["/gift-cards"];function dl(e,l){e&1&&(c(0,"button",12),y(1,"div",20),c(2,"div",11)(3,"div",8),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2&&(_("routerLink",E(6,br)),r(4),x(n(6,4,n(5,2,"BUTTONS.PURCHASES"))))}function ml(e,l){e&1&&(c(0,"button",13),y(1,"div",21),c(2,"div",11)(3,"div",8),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2&&(_("routerLink",E(6,tl)),r(4),x(n(6,4,n(5,2,"BUTTONS.NOTIFICATIONS"))))}function ul(e,l){if(e&1&&(c(0,"span",23),d(1),s()),e&2){let o=u();r(),x(o.length)}}function fl(e,l){if(e&1&&f(0,ul,2,1,"span",23),e&2){let o=l;C((o==null?null:o.length)>0?0:-1)}}function Cl(e,l){if(e&1&&(c(0,"button",14),y(1,"div",22),c(2,"div",11)(3,"div",8),d(4),t(5,"localize"),t(6,"async"),f(7,fl,1,1),t(8,"async"),s()()()),e&2){let o,i=u();_("routerLink",E(9,nl)),r(4),g(" ",n(6,5,n(5,3,"BUTTONS.APPLICATIONS"))," "),r(3),C((o=n(8,7,i.unclaimedApplications$))?7:-1,o)}}function gl(e,l){e&1&&(c(0,"li")(1,"a",24)(2,"span"),d(3),t(4,"localize"),t(5,"async"),s()()()),e&2&&(r(),_("routerLink",E(6,ol)),r(2),x(n(5,4,n(4,2,"LINKS.ACCOUNT.PASSWORD"))))}function _l(e,l){e&1&&(c(0,"li")(1,"a",25)(2,"span"),d(3),t(4,"localize"),t(5,"async"),s()()()),e&2&&(r(),_("routerLink",E(6,br)),r(2),x(n(5,4,n(4,2,"BUTTONS.PURCHASES"))))}function hl(e,l){e&1&&(c(0,"li")(1,"a",26)(2,"span"),d(3),t(4,"localize"),t(5,"async"),s()()()),e&2&&(r(),_("routerLink",E(6,al)),r(2),x(n(5,4,n(4,2,"LINKS.ACCOUNT.LINKED"))))}function xl(e,l){if(e&1){let o=z();c(0,"li")(1,"button",27),k("click",function(){P(o);let a=u();
1return w(a.processAccountDeletion())}),d(2),t(3,"localize"),t(4,"async"),s()()}e&2&&(r(2),g(" ",n(4,3,n(3,1,"LINKS.ACCOUNT.DELETE"))," "))}function yl(e,l){e&1&&(c(0,"div",16)(1,"h2",28),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"ul")(6,"li")(7,"a",29)(8,"span"),d(9),t(10,"localize"),t(11,"async"),s()()()()()),e&2&&(r(2),x(n(4,5,n(3,3,"LINKS.FAQ.TITLE"))),r(5),_("routerLink",E(11,rl)),r(2),x(n(11,9,n(10,7,"LINKS.FAQ.VIEW"))))}function vl(e,l){e&1&&(c(0,"div",16)(1,"h2",30),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"ul",31)(6,"li")(7,"a",29)(8,"span"),d(9),t(10,"localize"),t(11,"async"),s()()(),c(12,"li")(13,"a",29)(14,"span"),d(15),t(16,"localize"),t(17,"async"),s()()()()()),e&2&&(r(2),x(n(4,7,n(3,5,"LINKS.GROUP.TITLE"))),r(5),_("routerLink",E(17,ll)),r(2),x(n(11,11,n(10,9,"LINKS.GROUP.SEARCH"))),r(4),_("routerLink",E(18,pl)),r(2),x(n(17,15,n(16,13,"LINKS.GROUP.VIEW"))))}function bl(e,l){e&1&&(c(0,"div",19)(1,"h2",32),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"ul",33)(6,"li")(7,"a",34)(8,"span"),d(9),t(10,"localize"),t(11,"async"),s()()(),c(12,"li")(13,"a",29)(14,"span"),d(15),t(16,"localize"),t(17,"async"),s()()()()()),e&2&&(r(2),x(n(4,7,n(3,5,"LINKS.PURCHASES.TITLE"))),r(5),_("routerLink",E(17,sl)),r(2),x(n(11,11,n(10,9,"LINKS.PURCHASES.PURCHASE"))),r(4),_("routerLink",E(18,cl)),r(2),x(n(17,15,n(16,13,"LINKS.PURCHASES.REGISTER"))))}var Lt=(()=>{let l=class l{constructor(){this.configurationService=h(Qa),this.currentUserService=h(ye),this.groupHoldService=h(ti),this.shopperService=h(Ai),this.localizationService=h(B),this.waitlistService=h(Xa),this.dialogHelper=h(Re),this.store=h(V),this.destroyRef=h(Si)}ngOnInit(){this.enableExternalLogins$=this.store.select(Kt).pipe(T(I)),this.enableInternalLogin$=this.store.select(rt).pipe(T(I)),this.enableAccountDeletion$=this.store.select(qo).pipe(T(I)),this.allowGiftCards$=this.store.select(Ko).pipe(ne(I)),this.showMyPurchases$=this.store.select(Ne).pipe(ne(ee),b(re),b(a=>a.showMyPurchasesOnWeb));let i=this.store.select(Ne).pipe(ne(ee),b(re),j(a=>a.waitlistSettings.enableWaitlist?this.shopperService.getCartsWithWaitlistApplications():K([])),xi(this.destroyRef),Ce(1));this.showWaitlistApplications$=i.pipe(b(a=>a.length>0)),this.unclaimedApplications$=i.pipe(b(a=>a.filter(p=>p.waitlistApplications.some(m=>m.currentVersion?.status===Le.Unclaimed)))),this.showNotifications$=this.store.select(jo).pipe(ne(I)),this.allowChangePassword$=this.currentUserService.getUserInfo().pipe(b(a=>a?.accountType),ne(a=>a!==null),b(a=>a===je.Internal||a===je.Hybrid)).pipe(W(a=>this.enableInternalLogin$.pipe(T(I),b(p=>a&&p)))),this.enableAccountDeletion$.pipe(T(I),ne(a=>a===!0),Ye(()=>O({bookings:this.shopperService.getAllBookings(),balanceOutstanding:this.shopperService.getHasBalanceOutstanding(),productPurchases:this.shopperService.getProductPurchases(),groupHolds:this.groupHoldService.getCurrentGroupHolds(),waitlists:this.waitlistService.getWaitlists(),carts:i.pipe(T(I))}))).subscribe(({bookings:a,balanceOutstanding:p,productPurchases:m,groupHolds:v,waitlists:S,carts:N})=>{this.hasActiveBookings=a.some(te=>te.bookingStatus!==se.Cancelled&&te.bookingStatus!==se.Completed&&te.bookingStatus!==se.NoShow&&te.bookingStatus!==se.Expired),this.hasBalanceOutstanding=p,this.hasActiveShipments=!m.every(te=>te.shipmentStatus!==zi.Confirmed),this.hasActiveGroupHolds=!Object.values(v).every(te=>te.endDate.isBefore(ea.now()));let ie=te=>{let ze=S.find(li=>li.waitlistId===te);return ze?this.localizationService.getLocalizationForCurrentCultureFromList(ze.localizedValues)?.displayName:""},_e=N.flatMap(te=>te.waitlistApplications).filter(te=>te.currentVersion?.status===Le.Submitted||te.currentVersion?.status===Le.Unclaimed);if(_e.length>0){this.hasActiveApplications=!0;let[te]=_e;this.waitlistName=ie(te.waitlistId)??""}}),this.allowGroupHolds$=this.store.select(Wo).pipe(T(I))}processAccountDeletion(){this.enableAccountDeletion$.pipe(T(I),ne(i=>i===!0),b(()=>this.continueAccountDeletion())).subscribe()}continueAccountDeletion(){if(this.hasActiveApplications){let a=O({titleLocalization:this.localizationService.getTranslation("DIALOG.WARNING.APPLICATIONS.TITLE"),messageLocalization:this.localizationService.getTranslation("DIALOG.WARNING.APPLICATIONS.MESSAGE",{waitlistName:this.waitlistName}),closeButtonText:this.localizationService.getTranslation("DIALOG.WARNING.CLOSE")});this.openUnableToDeleteAccountDialog(a);return}if(this.hasActiveBookings){let a=O({titleLocalization:this.localizationService.getTranslation("DIALOG.WARNING.BOOKINGS.TITLE"),messageLocalization:this.localizationService.getTranslation("DIALOG.WARNING.BOOKINGS.MESSAGE"),closeButtonText:this.localizationService.getTranslation("DIALOG.WARNING.CLOSE")});this.openUnableToDeleteAccountDialog(a);return}if(this.hasActiveShipments){let a=O({titleLocalization:this.localizationService.getTranslation("DIALOG.WARNING.SHIPMENTS.TITLE"),messageLocalization:this.localizationService.getTranslation("DIALOG.WARNING.SHIPMENTS.MESSAGE"),closeButtonText:this.localizationService.getTranslation("DIALOG.WARNING.CLOSE")});this.openUnableToDeleteAccountDialog(a);return}if(this.hasActiveGroupHolds){let a=O({titleLocalization:this.localizationService.getTranslation("DIALOG.WARNING.GROUPHOLDS.TITLE"),messageLocalization:this.localizationService.getTranslation("DIALOG.WARNING.GROUPHOLDS.MESSAGE"),closeButtonText:this.localizationService.getTranslation("DIALOG.WARNING.CLOSE")});this.openUnableToDeleteAccountDialog(a);return}if(this.hasBalanceOutstanding){let a=O({titleLocalization:this.localizationService.getTranslation("DIALOG.WARNING.BALANCE.TITLE"),messageLocalization:this.localizationService.getTranslation("DIALOG.WARNING.BALANCE.MESSAGE"),closeButtonText:this.localizationService.getTranslation("DIALOG.WARNING.CLOSE")});this.openUnableToDeleteAccountDialog(a);return}let i=O({titleLocalization:this.localizationService.getTranslation("DIALOG.DELETE.TITLE"),closeButtonText:this.localizationService.getTranslation("DIALOG.DELETE.CANCEL"),confirmButtonText:this.localizationService.getTranslation("DIALOG.DELETE.CONFIRM")});this.openDeleteAccountDialog(i)}openUnableToDeleteAccountDialog(i){i.pipe(b(({titleLocalization:a,messageLocalization:p,closeButtonText:m})=>{let v={width:"600px",disableClose:!0};this.dialogHelper.openConfirmationDialog(a,[p],!1,m,void 0,Li.Warning,v)})).subscribe()}openDeleteAccountDialog(i){i.pipe(j(({titleLocalization:a,closeButtonText:p,confirmButtonText:m})=>
1{let v={isConfirmationDialog:!0,dialogTitle:a,confirmButtonText:m,closeButtonText:p,dialogType:Li.Warning},S={width:"600px"};return this.dialogHelper.openAbstractDialogWithComponent(vr,{},S,v).componentInstance.confirmed.pipe(T(),si(()=>{window.location.href="/api/auth/logout?deleteShopper=true"}))})).subscribe()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-account"]],features:[D([{provide:M,useValue:["account.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:64,vars:78,consts:[[1,"container-sm"],["id","pageTitle",1,"h1"],["mat-flat-button","","color","primary","id","newReservation",1,"button","full-width_xs",3,"routerLink"],["aria-hidden","true",1,"icon",3,"icon"],[1,"card-column-layout"],["data-layout.gt-xs","column","data-layout","row","data-layoutGap","16px","data-layoutAlign","start center","data-layoutAlign.gt-xs","center center","id","updateProfile",1,"btn-account",3,"routerLink"],["aria-hidden","true",1,"icon","fas","fa-user-circle"],["data-layout","column",1,"btn-account-text"],[1,"btn-account-title"],["id","myReservationsButton","data-layout.gt-xs","column","data-layout","row","data-layoutGap","16px","data-layoutAlign","start center","data-layoutAlign.gt-xs","center center",1,"btn-account",3,"routerLink"],["aria-hidden","true",1,"icon","far","fa-calendar-check"],[1,"btn-account-text"],["id","myPurchases","data-layout.gt-xs","column","data-layout","row","data-layoutGap","16px","data-layoutAlign","start center","data-layoutAlign.gt-xs","center center",1,"btn-account",3,"routerLink"],["id","notification-dashboard","data-layout.gt-xs","column","data-layout","row","data-layoutGap","16px","data-layoutAlign","start center","data-layoutAlign.gt-xs","center center",1,"btn-account",3,"routerLink"],["id","applications-dashboard","data-layout.gt-xs","column","data-layout","row","data-layoutGap","16px","data-layoutAlign","start center","data-layoutAlign.gt-xs","center center",1,"btn-account",3,"routerLink"],[1,"account-action-lists","mt-6"],[1,"account-link-section"],["id","accountTitle"],["mat-button","","color","accent","id","changeEmail",1,"button",3,"routerLink"],["id","giftCardPurchase",1,"account-link-section"],["aria-hidden","true",1,"icon","fas","fa-receipt"],["aria-hidden","true",1,"icon","fas","fa-bell"],["aria-hidden","true",1,"icon","fas","fa-file-alt"],[1,"notification-circle"],["mat-button","","color","accent","id","changePassword",1,"button",3,"routerLink"],["mat-button","","color","accent","id","myPurchasesLink",1,"button",3,"routerLink"],["mat-button","","color","accent","id","linkedAccounts",1,"button",3,"routerLink"],["mat-button","","color","accent","id","deleteAccounts",1,"button",3,"click"],["id","faqsTitle"],["mat-button","","color","accent",1,"button",3,"routerLink"],["id","groupsTitle"],["aria-labelledby","groupsTitle"],["id","purchasesTitle"],["aria-labelledby","purchasesTitle"],["id","giftCardPurchaseLink","mat-button","","color","accent",1,"button",3,"routerLink"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div")(6,"button",2),y(7,"fa-icon",3),c(8,"span"),d(9),t(10,"localize"),t(11,"async"),s()()(),c(12,"div",4)(13,"button",5),y(14,"div",6),c(15,"div",7)(16,"div",8),d(17),t(18,"localize"),t(19,"async"),s()()(),c(20,"button",9),y(21,"div",10),c(22,"div",11)(23,"div",8),d(24),t(25,"localize"),t(26,"async"),s()()(),f(27,dl,7,7,"button",12),t(28,"async"),t(29,"async"),t(30,"async"),f(31,ml,7,7,"button",13),t(32,"async"),f(33,Cl,9,10,"button",14),t(34,"async"),s(),c(35,"div",15)(36,"div",16)(37,"h2",17),d(38),t(39,"localize"),t(40,"async"),s(),c(41,"ul"),f(42,gl,6,7,"li"),t(43,"async"),c(44,"li")(45,"a",18)(46,"span"),d(47),t(48,"localize"),t(49,"async"),s()()(),f(50,_l,6,7,"li"),t(51,"async"),t(52,"async"),f(53,hl,6,7,"li"),t(54,"async"),f(55,xl,5,5,"li"),t(56,"async"),s()(),f(57,yl,12,12,"div",16),t(58,"async"),t(59,"async"),f(60,vl,18,19,"div",16),t(61,"async"),f(62,bl,18,19,"div",19),t(63,"async"),s()()),a&2&&(r(2),x(n(4,23,n(3,21,"PAGETITLE"))),r(4),_("routerLink",E(73,Xr)),r(),_("icon",E(74,Jr)),r(2),x(n(11,27,n(10,25,"CREATE_RESERVATION"))),r(4),_("routerLink",E(75,Zr)),r(4),x(n(19,31,n(18,29,"BUTTONS.PROFILE"))),r(3),_("routerLink",E(76,el)),r(4),x(n(26,35,n(25,33,"BUTTONS.RESERVATIONS"))),r(3),C(n(28,37,p.showMyPurchases$)===!0&&n(29,39,p.showNotifications$)===!1&&n(30,41,p.showWaitlistApplications$)===!1?27:-1),r(4),C(n(32,43,p.showNotifications$)?31:-1),r(2),C(n(34,45,p.showWaitlistApplications$)?33:-1),r(5),x(n(40,49,n(39,47,"LINKS.ACCOUNT.TIT
1LE"))),r(4),C(n(43,51,p.allowChangePassword$)?42:-1),r(3),_("routerLink",E(77,il)),r(2),x(n(49,55,n(48,53,"LINKS.ACCOUNT.EMAIL"))),r(3),C(n(51,57,p.showMyPurchases$)&&n(52,59,p.showNotifications$)?50:-1),r(3),C(n(54,61,p.enableExternalLogins$)?53:-1),r(2),C(n(56,63,p.enableAccountDeletion$)?55:-1),r(2),C(n(58,65,p.allowGroupHolds$)===!1||n(59,67,p.allowGiftCards$)===!1?57:-1),r(3),C(n(61,69,p.allowGroupHolds$)?60:-1),r(2),C(n(63,71,p.allowGiftCards$)?62:-1))},dependencies:[le,at,pe,F,R],styles:["h1[_ngcontent-%COMP%]{margin-bottom:30px}h2[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px;font-size:20px}@media(min-width:600px){h2[_ngcontent-%COMP%]{margin-bottom:15px}}#newReservation[_ngcontent-%COMP%]{margin-bottom:30px}.btn-account[_ngcontent-%COMP%]{padding:10px 10px 10px 20px;transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);border-width:0px;cursor:pointer;width:100%;height:auto;box-shadow:0 2px 4px #0000001a}.btn-account[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{border-width:0;border-style:solid;border-radius:50%;min-width:52px;width:52px;height:52px;font-size:32px;line-height:52px;flex-shrink:0;display:inline-flex;justify-content:center;align-items:center}.btn-account[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}@media(min-width:600px){.btn-account[_ngcontent-%COMP%]{padding:15px;height:210px}.btn-account[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{border-width:0;border-style:solid;border-radius:50%;min-width:88px;width:88px;height:88px;font-size:48px;line-height:88px;flex-shrink:0;display:inline-flex;justify-content:center;align-items:center}.btn-account[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}}.btn-account-title[_ngcontent-%COMP%]{text-align:left;font-weight:700;line-height:1.25}@media(min-width:600px){.btn-account-title[_ngcontent-%COMP%]{text-align:center}}.btn-account-text[_ngcontent-%COMP%]{text-align:left;font-size:17px}.notification-circle[_ngcontent-%COMP%]{margin:0}.account-action-lists[_ngcontent-%COMP%]{background:#fefefe;margin-top:30px;padding:25px 32px;display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:15px;box-shadow:0 2px 4px #0000001a}.account-action-lists[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-weight:400}@media(min-width:600px){.account-action-lists[_ngcontent-%COMP%]{margin:40px 0 0;padding:25px 32px}}.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%]{width:auto}.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style-type:none;padding:0}.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:8px}@media(min-width:600px){.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-bottom:3px}}.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{text-decoration:none}.account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .account-action-lists[_ngcontent-%COMP%] .account-link-section[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus span[_ngcontent-%COMP%]{text-decoration:underline}.card-column-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:15px}"]});let e=l;return e})();var Pr=ni(ri());var Dn=ni(ri());function Sl(e,l){if(e&1&&(oe(0,"div",1),Ei(1,"span",2),oe(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),Q(),d(7),t(8,"localize"),t(9,"async"),Q()()),e&2){let o=u();r(4),x(n(6,4,n(5,2,"LABEL.TYPE"))),r(3),g(" ",o.boatType?n(9,8,n(8,6,"BOAT_TYPES."+o.boatType.name)):"-"," ")}}function El(e,l){if(e&1&&(oe(0,"div",1),Ei(1,"span",3),oe(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),Q(),d(7),Q()()),e&2){let o=u();r(4),x(n(6,4,n(5,2,"LABEL.REGISTRATION"))),r(3),g(" ",o.bookingBoat!=null&&o.bookingBoat.registrationNumber?o.bookingBoat==null?null:o.bookingBoat.registrationNumber:"-"," ")}}function Bl(e,l){if(e&1&&(oe(0,"div",1),Ei(1,"span",4),oe(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),Q(),d(7),Q()()),e&2){let o=u();r(4),x(n(6,4,n(5,2,"LABEL.LENGTH"))),r(3),g(" ",o.bookingBoat!=null&&o.bookingBoat.length?(o.bookingBoat==null?null:o.bookingBoat.length)+'"':"-"," ")}}function Il(e,l){if(e&1&&(oe(0,"div",1),Ei(1,"span",4),oe(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),Q(),d(7),Q()()),e&2){let o=u();r(4),x(n(6,4,n(5,2,"LABEL.DRAFT"))),r(3),g(" ",o.bookingBoat!=null&&o.bookingBoat.draft?(o.bookingBoat==null?null:o.bookingBoat.draft)+'"':"-"," ")}}function Tl(e,l){if(e&1&&(oe(0,"div",1),Ei(1,"span",4),oe(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),Q(),d(7),Q()()),e&2){let o=u();r(4),x(n(6,4,n(5,2,"LABEL.BEAM"))),r(3),g(" ",o.bookingBoat!=null&&o.bookingBoat.width?(o.bookingBoat==null?null:o.bookingBoat.width)+'"':"-"," ")}}var Fn=(()=>{let l=class l{constructor(){this.bookingCategoryHelper=h(gt),this.store=h(V),this.arrivalComment=!1,this.bookingBoat=null,this.boatType=null}ngOnInit(){this.store.dispatch(new pt),this.store.dispatch(an()),this.bookingBoats!=null&&this.bookingBoats.length>0&&(this.bookingBoat=(0,Dn.minBy)(this.bookingBoats,i=>i.order)||null,this.bookingBoat!=null&&this.store.select(fn).pipe(A(ee),b(re)).subscribe(i=>{i!=null&&this.bookingBoat!=null&&Array.isArray(i)&&(this.boatType=(0,Dn.find)(i,a=>a.boatTypeId===this.bookingBoat?.type)||null)}))}
1doesSelectedBookingCategoryCollectBoatDraft(){return this.getSelectedBookingCategory().pipe(b(i=>{if(i!=null){let a=this.bookingCategoryHelper.doesBookingCategoryCollectBoatDraft(i);return a===ge.Optional||a===ge.Required}return!1}))}doesSelectedBookingCategoryCollectBoatWidth(){return this.getSelectedBookingCategory().pipe(b(i=>{if(i!=null){let a=this.bookingCategoryHelper.doesBookingCategoryCollectBoatWidth(i);return a===ge.Optional||a===ge.Required}return!1}))}doesSelectedBookingCategoryCollectBoatType(){return this.getSelectedBookingCategory().pipe(b(i=>{if(i!=null){let a=this.bookingCategoryHelper.doesBookingCategoryCollectBoatType(i);return a===ge.Optional||a===ge.Required}return!1}))}getSelectedBookingCategory(){return O({bookingCategories:this.store.select(yi).pipe(A(ee),b(re)),searchCriteria:this.store.pipe(Ca(),A(I))}).pipe(b(({bookingCategories:i,searchCriteria:a})=>i.find(p=>p.bookingCategoryId===a.bookingCategoryId)||null))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-booking-boat-details"]],inputs:{bookingBoats:"bookingBoats",arrivalComment:"arrivalComment"},features:[D([{provide:M,useValue:["booking-boat-details.component"]},B])],decls:9,vars:11,consts:[["data-layoutAlign.gt-md","row","data-layout","row wrap","data-layoutAlign.gt-md","space-evenly center",1,"compact-booking-sub-section"],[1,"booking-detail"],[1,"fa","fa-regular","fa-ship","color-accent-300"],[1,"fa","fa-regular","fa-flag","color-accent-300"],[1,"fa","fa-regular","fa-ruler-horizontal","color-accent-300"]],template:function(a,p){a&1&&(oe(0,"div",0),f(1,Sl,10,10,"div",1),t(2,"async"),f(3,El,8,6,"div",1),f(4,Bl,8,6,"div",1),f(5,Il,8,6,"div",1),t(6,"async"),f(7,Tl,8,6,"div",1),t(8,"async"),Q()),a&2&&(r(),C(n(2,5,p.doesSelectedBookingCategoryCollectBoatType())?1:-1),r(2),C(p.bookingBoat!=null&&p.bookingBoat.registrationNumber?3:-1),r(),C(p.bookingBoat!=null&&p.bookingBoat.length?4:-1),r(),C(n(6,7,p.doesSelectedBookingCategoryCollectBoatDraft())?5:-1),r(2),C(n(8,9,p.doesSelectedBookingCategoryCollectBoatWidth())?7:-1))},dependencies:[F,R],encapsulation:2});let e=l;return e})();var kl=e=>({expanded:e});function Pl(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(3);r(),x(o.formErrors.arrivalComment)}}function wl(e,l){if(e&1&&(c(0,"mat-form-field",9),y(1,"textarea",11),t(2,"localize"),t(3,"async"),f(4,Pl,2,1,"mat-error"),s()),e&2){let o=u(2);r(),G("aria-label",n(3,4,n(2,2,"ARIA.ARIVAL_COMMENT"))),r(3),C(o.formErrors.arrivalComment?4:-1)}}function Al(e,l){if(e&1&&(c(0,"div",10)(1,"span"),d(2),s()()),e&2){let o=u(2);r(2),x(o.arrivalComment)}}function Ll(e,l){if(e&1&&(c(0,"div",6)(1,"div",7)(2,"label",8),d(3),t(4,"localize"),t(5,"async"),s(),f(6,wl,5,6,"mat-form-field",9),s(),f(7,Al,3,1,"div",10),s()),e&2){let o=u();me("has-error",o.formErrors.arrivalComment),_("@expandOnClick",void 0),r(3),g(" ",n(5,8,n(4,6,"ARIA.ARIVAL_COMMENT"))," "),r(3),C(o.canEdit?6:-1),r(),C(o.canEdit?-1:7)}}var Sr=(()=>{let l=class l{constructor(){this.bookingCategoryHelper=h(gt),this.bookingService=h(ui),this.fb=h(mi),this.localizationService=h(B),this.store=h(V),this.canEdit=!0,this.expanded=!0,this.arrivalComment="",this.componentActive=!0,this.formErrors={arrivalComment:""},this.validationMessages={arrivalComment:{}},this.buildForm()}ngOnInit(){this.bookingService.getBooking(this.bookingUid).pipe(A(),b(i=>{i!=null&&(this.arrivalComment=i.currentVersion.arrivalComment,this.arrivalComment!=null&&this.arrivalComment!==""&&q(this.arrivalCommentFormGroup,"arrivalComment").setValue(this.arrivalComment))}))}ngOnChanges(i){for(let a in i)a==="canEdit"&&this.arrivalCommentFormGroup!=null&&(i[a].currentValue?q(this.arrivalCommentFormGroup,"arrivalComment").enable():q(this.arrivalCommentFormGroup,"arrivalComment").disable())}ngOnDestroy(){this.componentActive=!1}buildForm(){this.arrivalCommentFormGroup=this.fb.group({arrivalComment:[{value:null,disabled:!this.canEdit}]})}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-arrival-comment"]],inputs:{bookingUid:"bookingUid",canEdit:"canEdit"},features:[D([{provide:M,useValue:["arrival-comment.component"]},B]),Do],decls:11,vars:10,consts:[["data-flex","auto","data-layout","column","data-layoutGap","15px",1,"full-width"],["data-flex","auto","data-layout","row"],["data-flex","100","data-layout","row wrap",1,"arr
1ival-comment-border",3,"formGroup"],["role","presentation","data-flex","100","data-layout","row","data-layoutAlign","start center",3,"click","ngClass"],["aria-hidden","true"],["data-flex","100",1,"form-group","expanded-area",3,"has-error"],["data-flex","100",1,"form-group","expanded-area"],[1,"form-control-wrapper"],["for","arrivalComment"],["appearance","outline"],["data-flex","100"],["id","arrivalComment","matInput","","rows","5","placeholder","","formControlName","arrivalComment"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"div",1)(2,"form",2)(3,"div",3),k("click",function(){return p.expanded=!p.expanded}),c(4,"h4"),d(5),t(6,"localize"),t(7,"async"),s(),c(8,"mat-icon",4),d(9,"keyboard_arrow_down"),s()(),f(10,Ll,8,10,"div",5),s()()()),a&2&&(r(2),_("formGroup",p.arrivalCommentFormGroup),r(),_("ngClass",ce(8,kl,p.expanded)),r(2),x(n(7,6,n(6,4,"ARRIVAL_COMMENT.TITLE"))),r(5),C(p.expanded?10:-1))},dependencies:[Ee,Ue,De,Fe,Ve,Be,He,$e,tt,Cn,Pe,Me,Ge,F,R],styles:["h4[_ngcontent-%COMP%]{margin:0;font-weight:700}.arrival-comment-border[_ngcontent-%COMP%]{border:1px solid #D9D9D9;padding:12px}.expanded[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{-moz-transform:rotate(-180deg);-o-transform:rotate(-180deg);-ms-transform:rotate(-180deg);-webkit-transform:rotate(-180deg);transform:rotate(-180deg)}.collapsable-title[_ngcontent-%COMP%]{font-size:16px}.expanded-area[_ngcontent-%COMP%]{overflow:hidden}.expanded-area[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px 6px}"],data:{animation:[Za("expandOnClick",[go("void",Gi({height:0})),go("*",Gi({height:"*"})),ho("void => *",[Co("0.4s ease-in-out",_o([Gi({height:0}),Gi({height:"*"})]))]),ho("* => void",[Co("0.4s ease-in-out",_o([Gi({height:"*"}),Gi({height:0})]))])])]}});let e=l;return e})();var Wi=ni(ri());var Dl=()=>["fas","user"];function Fl(e,l){e&1&&(c(0,"th",3),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"AGE"))," "))}function Ml(e,l){if(e&1&&(c(0,"th",3),d(1),s()),e&2){let o=u(2);r(),g(" ",o.getMemberCapacityCategoryDisplayName()," ")}}function Rl(e,l){e&1&&(c(0,"th",3),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"DATES"))," "))}function Ol(e,l){e&1&&(c(0,"th",3),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"NOTES"))," "))}function Nl(e,l){e&1&&(c(0,"th",3),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"CONTACT"))," "))}function zl(e,l){if(e&1&&(c(0,"td"),d(1),s()),e&2){let o=u().$implicit;r(),ae(" ",o.firstName," ",o.lastName," ")}}function Vl(e,l){if(e&1&&(c(0,"td"),d(1),s()),e&2){let o=u().$implicit;r(),g(" ",o.age," ")}}function Ul(e,l){if(e&1&&(c(0,"td"),d(1),s()),e&2){let o=u().$implicit,i=u(2);r(),g(" ",i.getSubCapacityCategoryNameForMember(o)," ")}}function Hl(e,l){if(e&1&&(c(0,"td"),d(1),t(2,"async"),s()),e&2){let o=u().$implicit,i=u(2);r(),g(" ",n(2,1,i.getFormattedMemberDatesForMember(o))," ")}}function $l(e,l){if(e&1&&(c(0,"td"),d(1),s()),e&2){let o=u().$implicit;r(),g(" ",o.notes," ")}}function Gl(e,l){if(e&1&&(c(0,"td"),d(1),s()),e&2){let o=u().$implicit;r(),ae(" ",o.contact==null?null:o.contact.contactName," (",o.contact==null?null:o.contact.phoneNumber,") ")}}function ql(e,l){if(e&1&&(c(0,"tr"),f(1,zl,2,2,"td"),f(2,Vl,2,1,"td"),f(3,Ul,2,1,"td"),f(4,Hl,3,3,"td"),f(5,$l,2,1,"td"),f(6,Gl,2,2,"td"),s()),e&2){let o=u(2);r(),C(o.collectsName?1:-1),r(),C(o.collectsAge?2:-1),r(),C(o.collectsCategory?3:-1),r(),C(o.collectsDates?4:-1),r(),C(o.collectsNotes?5:-1),r(),C(o.collectsContact?6:-1)}}function Wl(e,l){if(e&1&&(c(0,"h3",7),d(1),s()),e&2){let o=u().$implicit;r(),ae(" ",o.firstName," ",o.lastName," ")}}function Kl(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),d(5),s()),e&2){let o=u().$implicit;r(2),g(" ",n(4,4,n(3,2,"AGE")),": "),r(3),g(" ",o.age," ")}}function jl(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),s(),d(3),s()),e&2){let o=u().$implicit,i=u(2);r(2),g(" ",i.getMemberCapacityCategoryDisplayName(),": "),r(),g(" ",i.getSubCapacityCategoryNameForMember(o)," ")}}function Yl(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),d(5),t(6,"async"),s()),e&2){let o=u().$implicit,i=u(2);r(2),g(" ",n(4,4,n(3,2,"DATES")),": "),r(3),g(" ",n(6,6,i.getFormattedMemberDatesForMember(o))," ")}}function Ql(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),d(5),s()),e&2){let o=u().$implicit;r(2),g(" ",n(4,4,n(3,2,"NOTES")),": "),r(3),g(" ",o.notes," ")}}function Xl(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),d(5),s()),e&2){let o=u().$implicit;r(2),g(" ",n(4,5,n(3,3,"CONTACT")),": "),r(3),ae(" ",o.contact==null?null:o.contact.contactName,"
1(",o.contact==null?null:o.contact.phoneNumber,") ")}}function Jl(e,l){if(e&1&&(c(0,"div",5),y(1,"fa-icon",6),c(2,"div"),f(3,Wl,2,2,"h3",7),f(4,Kl,6,6,"p"),f(5,jl,4,2,"p"),f(6,Yl,7,8,"p"),f(7,Ql,6,6,"p"),f(8,Xl,6,7,"p"),s()()),e&2){let o=u(2);r(),_("icon",E(7,Dl)),r(2),C(o.collectsName?3:-1),r(),C(o.collectsAge?4:-1),r(),C(o.collectsCategory?5:-1),r(),C(o.collectsDates?6:-1),r(),C(o.collectsNotes?7:-1),r(),C(o.collectsContact?8:-1)}}function Zl(e,l){if(e&1&&(c(0,"div",0)(1,"table",1),t(2,"localize"),t(3,"async"),c(4,"thead",2)(5,"tr")(6,"th",3),d(7),t(8,"localize"),t(9,"async"),s(),f(10,Fl,4,5,"th",3),f(11,Ml,2,1,"th",3),f(12,Rl,4,5,"th",3),f(13,Ol,4,5,"th",3),f(14,Nl,4,5,"th",3),s()(),c(15,"tbody"),H(16,ql,7,6,"tr",null,$i().trackByIndexFn,!0),s()(),c(18,"div",4),H(19,Jl,9,8,"div",5,$i().trackByIndexFn,!0),s()()),e&2){let o=u();r(),G("aria-label",n(3,10,n(2,8,"ARIA.MEMBERS_TABLE"))),r(6),ae(" ",n(9,14,n(8,12,"PARTYOF")),"",o.memberDetails==null?null:o.memberDetails.length," "),r(3),C(o.collectsAge?10:-1),r(),C(o.collectsCategory?11:-1),r(),C(o.collectsDates?12:-1),r(),C(o.collectsNotes?13:-1),r(),C(o.collectsContact?14:-1),r(2),$(o.memberDetails),r(3),$(o.memberDetails)}}var Mn=(()=>{let l=class l{constructor(){this.trackByIndexFn=h(Ze),this.store=h(V),this.localizationService=h(B),this.collectsName=!1,this.collectsAge=!1,this.collectsNotes=!1,this.collectsDates=!1,this.collectsCategory=!1,this.collectsContact=!1,this.memberCapacityCategory=null,this.componentActive=!0}ngOnInit(){if(this.collectsName=this.memberCollectionRequirements.name!==ge.NotRequired,this.collectsAge=this.memberCollectionRequirements.age!==ge.NotRequired,this.collectsNotes=this.memberCollectionRequirements.note!==ge.NotRequired,this.collectsDates=this.memberCollectionRequirements.dates!==ge.NotRequired,this.collectsContact=this.memberCollectionRequirements.contact!==ge.NotRequired,(0,Wi.some)(this.memberDetails,i=>i.capacityCategoryId&&i.subCapacityCategoryId)){this.collectsCategory=!0;let i=Ae((0,Wi.head)(this.memberDetails)).capacityCategoryId;this.store.select(dn).pipe(A(ee),b(re),b(a=>{this.memberCapacityCategory=Ae((0,Wi.find)(a,p=>p.capacityCategoryId===i))})).subscribe()}}getMemberCapacityCategoryDisplayName(){return this.memberCapacityCategory?Ae(this.localizationService.getLocalizationForCurrentCultureFromList(this.memberCapacityCategory.localizedValues)).displayName:""}getSubCapacityCategoryNameForMember(i){if(this.memberCapacityCategory){let a=Ae((0,Wi.find)(this.memberCapacityCategory.subCapacityCategories,p=>p.subCapacityCategoryId===i.subCapacityCategoryId)).localizedValues;return Ae(this.localizationService.getLocalizationForCurrentCultureFromList(a)).name}return""}getFormattedMemberDatesForMember(i){return this.localizationService.getTranslation("NIGHTSTRING").pipe(ne(()=>i.startDate!=null&&i.endDate!=null),W(a=>{let p;return i.startDate!==null&&i.endDate!==null&&(p=Pi.DAYS.between(i.startDate,i.endDate)),Ot([mo(Ae(i.startDate),"MMM d",!1,this.store),mo(Ae(i.endDate),"MMM d, yyyy",!1,this.store),K(a),K(p)])}),b(([a,p,m,v])=>`${a} - ${p} (${v} ${m})`))}ngOnDestroy(){this.componentActive=!1}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-member-details"]],inputs:{memberDetails:"memberDetails",memberCollectionRequirements:"memberCollectionRequirements"},features:[D([{provide:M,useValue:["member-details.component"]},B])],decls:1,vars:1,consts:[[1,"card"],["data-hide.lt-sm","true"],[1,"member-details-header"],["scope","col"],["data-hide.gt-sm","true",1,"inner"],["lass","member-row","data-layout","row","data-layoutGap","15px"],["size","lg","aria-hidden","true",3,"icon"],[1,"member-name"]],template:function(a,p){a&1&&f(0,Zl,21,16,"div",0),a&2&&C(p.memberDetails?0:-1)},dependencies:[pe,F,R],styles:[".member-details-header[_ngcontent-%COMP%]{background:#ebebeb;font-weight:700}.member-row[_ngcontent-%COMP%]{margin-bottom:15px}.member-row[_ngcontent-%COMP%] .ng-fa-icon[_ngcontent-%COMP%]{color:#89a6b9;margin-top:5px}.member-row[_ngcontent-%COMP%]:last-child{margin-bottom:0}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:30px}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding-right:30px}"]});let e=l;return e})();function ep(e,l){if(e&1&&(oe(0,"div",0)(1,"table",1),t(2,"localize"),t(3,"async"),oe(4,"thead",2)(5,"tr")(6,"th",3),d(7),t(8,"localize"),t(9,"async"),Q()()(),oe(10,"tbody")(11,"tr")(12,"td"),d(13),Q()()()(),oe(14,"div",4)(15,"div",5)(16,"div")(17,"p")(18,"strong"),d(19),t(20,"localize"),t(21,"async"),Q(),d(22),Q()()()()()),e&2){let o=u();r(),G("aria-label",n(3,9,n(2,7,"ARIA.CONTACT"))),r(6),g(" ",n(9,13,n(8,11,"CONTACT"))," "),r(6),ae(" ",o.contactName,"
1(",o.contactPhoneNumber,") "),r(6),g(" ",n(21,17,n(20,15,"CONTACT")),": "),r(3),ae(" ",o.contactName," (",o.contactPhoneNumber,") ")}}var Er=(()=>{let l=class l{constructor(){this.trackByIndexFn=h(Ze),this.store=h(V),this.localizationService=h(B),this.showPartyContact=!1,this.componentActive=!0}ngOnInit(){this.showPartyContact=this.contactName!==""||this.contactPhoneNumber!==""}ngOnDestroy(){this.componentActive=!1}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-party-emergency-contact"]],inputs:{contactName:"contactName",contactPhoneNumber:"contactPhoneNumber"},features:[D([{provide:M,useValue:["party-emergency-contact.component"]},B])],decls:1,vars:1,consts:[[1,"card"],["data-hide.gt-sm","false","data-hide","true"],[1,"details-header"],["scope","col"],["data-hide.gt-sm","",1,"inner"],["data-layout","row"]],template:function(a,p){a&1&&f(0,ep,23,19,"div",0),a&2&&C(p.showPartyContact?0:-1)},dependencies:[F,R],styles:[".details-header[_ngcontent-%COMP%]{background:#ebebeb;font-weight:700}table[_ngcontent-%COMP%]{width:100%}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:10px;text-align:center}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:30px}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child, table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding-right:30px}"]});let e=l;return e})();var Br=ni(ri());var ip=(e,l)=>({startDate:e,endDate:l});function tp(e,l){if(e&1&&(oe(0,"p",5),d(1),t(2,"dateFormatPipe"),t(3,"async"),t(4,"dateFormatPipe"),t(5,"async"),t(6,"localize"),t(7,"async"),Q()),e&2){let o=u(),i=o.$implicit,a=o.$index;Ht("id",ai("additionalVehicle-",a,"-dates")),r(),g(" ",n(7,18,we(6,15,"VALID",Bt(20,ip,n(3,7,he(2,3,i.saleSummary.productStartDate,(i.saleSummary.productStartDate==null?null:i.saleSummary.productStartDate.year())!==(i.saleSummary.productEndDate==null?null:i.saleSummary.productEndDate.year())?"short-day-month-year":"short-day-month",!1)),n(5,13,he(4,9,i.saleSummary.productEndDate,"short-day-month-year",!1)))))," ")}}function np(e,l){if(e&1&&(oe(0,"li",3)(1,"p")(2,"strong"),d(3),t(4,"localizeFromArray"),t(5,"async"),Q()(),oe(6,"p"),Ei(7,"span",4),oe(8,"span",5),d(9),Q()(),f(10,tp,8,23,"p",5),oe(11,"p",5)(12,"span",6),d(13),t(14,"localize"),t(15,"async"),Q(),d(16),t(17,"localeCurrency"),t(18,"async"),Q()()),e&2){let o,i=l.$implicit,a=l.$index,p=u(4);r(3),x((o=n(5,11,n(4,9,i.saleSummary.localizedValues)))==null?null:o.name),r(5),Ht("id",ai("additionalVehicle-",a,"-licensePlate")),r(),x(i.saleSummary.saleVehicle==null?null:i.saleSummary.saleVehicle.licensePlate),r(),C(i.saleSummary.dateRequirements!=null&&i.saleSummary.dateRequirements!==p.DATE_REQUIREMENTS.NotRequired?10:-1),r(),Ht("id",ai("additionalVehicle-",a,"-total")),r(2),x(n(15,15,n(14,13,"ARIA.TOTAL_OF"))),r(3),g(" ",n(18,19,n(17,17,i.total))," ")}}function op(e,l){if(e&1&&(oe(0,"li",3)(1,"p")(2,"strong"),d(3),t(4,"localizeFromArray"),t(5,"async"),Q()(),oe(6,"p",7)(7,"span",6),d(8),t(9,"localize"),t(10,"async"),Q(),d(11),t(12,"localeCurrency"),t(13,"async"),Q()()),e&2){let o,i=l.$implicit;r(3),x((o=n(5,5,n(4,3,i.saleSummary.localizedValues)))==null?null:o.name),r(5),x(n(10,9,n(9,7,"ARIA.TOTAL_OF"))),r(3),g(" ",n(13,13,n(12,11,i.total))," ")}}function ap(e,l){if(e&1&&(oe(0,"span",8),d(1),Q()),e&2){let o=u().$implicit;r(),g("x ",o.quantity)}}function rp(e,l){if(e&1&&(oe(0,"li",3)(1,"p")(2,"strong"),d(3),t(4,"localizeFromDictionary"),t(5,"async"),Q(),f(6,ap,2,1,"span",8),Q(),oe(7,"p",7)(8,"span",6),d(9),t(10,"localize"),t(11,"async"),Q(),d(12),t(13,"localeCurrency"),t(14,"async"),Q()()),e&2){let o=l.$implicit;r(3),x(n(5,6,n(4,4,o.displayName))),r(3),C(o.quantity>1?6:-1),r(3),x(n(11,10,n(10,8,"ARIA.TOTAL_OF"))),r(3),g(" ",n(14,14,n(13,12,o.total))," ")}}function lp(e,l){if(e&1&&(oe(0,"div",0)(1,"h2",1),d(2),t(3,"localize"),t(4,"async"),Q(),oe(5,"ul",2),H(6,np,19,21,"li",3,Z),H(8,op,14,15,"li",3,Z),H(10,rp,15,16,"li",3,Z),Q()()),e&2){let o=u(),i=u(),a=u();
1r(2),g(" ",n(4,3,n(3,1,"TITLE"))," "),r(4),$(o),r(2),$(i),r(2),$(a.feeBasedLineItemDetails)}}function pp(e,l){if(e&1&&f(0,lp,12,5,"div",0),e&2){let o=l,i=u(),a=u();C(i!=null&&i.length>0||a.feeBasedLineItemDetails!=null&&a.feeBasedLineItemDetails.length>0||o!=null&&o.length>0?0:-1)}}function sp(e,l){if(e&1&&(f(0,pp,1,1),t(1,"async")),e&2){let o,i=u();C((o=n(1,1,i.additionalVehicles$))?0:-1,o)}}var Ir=(()=>{let l=class l{constructor(){this.localizationService=h(B),this.saleService=h(ja),this.store=h(V),this.DATE_REQUIREMENTS=xn}ngOnInit(){this.store.dispatch(ba());let i=this.getSurchargeDetails(this.bookingSurcharges),a=this.getSaleSummaries(this.bookingSurcharges);this.productBasedLineItemDetails$=O({saleSummaries:a,surchargeDetails:i}).pipe(b(({saleSummaries:m,surchargeDetails:v})=>this.getProductBasedSurcharges(m,v)));let p=this.getFilteredTransactions(this.bookingTransactions,this.bookingStatus);this.feeBasedLineItemDetails=this.getFeeBasedSurcharges(p,this.bookingUid),this.additionalVehicles$=O({surcharges:i,saleSummaries:a}).pipe(b(({surcharges:m,saleSummaries:v})=>this.getAdditionalVehicles(this.bookingSurcharges,v,m)))}getFilteredTransactions(i,a){if(a===cn.Cancelled){let p=i.reduce((m,v)=>m.transactionDate.isAfter(v.transactionDate)?m:v);return i.filter(m=>m!==p)}return i}getProductBasedSurcharges(i,a){return this.bookingSurcharges.map(p=>({saleSummary:i.find(m=>m.saleUid===p.saleUid),surcharge:a.find(m=>m.surchargeId===p.surchargeId)})).map(({saleSummary:p,surcharge:m})=>p!=null&&m!=null&&m.surchargeType!==sn.Fee&&m.surchargeType!==sn.VehiclePermit?{saleSummary:p,total:p.lineItems.reduce((v,S)=>v+S.lineItemTotal,0)}:null).filter(I)}getFeeBasedSurcharges(i,a){return i.reduce((p,m)=>p.transactionDate.isAfter(m.transactionDate)?p:m).lineItems.filter(p=>(p.saleUid===null||p.saleUid===void 0)&&p.lineItemType===er.Surcharge&&p.lineItemTotal>0&&p.quantity&&p.bookingUid===a).map(p=>({displayName:p.lineItemDisplayName,quantity:p.quantity,total:p.lineItemTotal}))}getAdditionalVehicles(i,a,p){return i.filter(m=>p.find(v=>v.surchargeId===m.surchargeId)?.surchargeType===sn.VehiclePermit).map(m=>{let v=a.find(S=>S.saleUid===m.saleUid);return v!=null?{saleSummary:v,total:v.lineItems?.reduce((S,N)=>S+N.lineItemTotal,0)}:null}).filter(I).sort((m,v)=>this.sortByDateRange(m,v))}sortByDateRange(i,a){let p=this.getRangeDurationInDays(i),m=this.getRangeDurationInDays(a);if(p===m){let v=i.saleSummary.productStartDate,S=a.saleSummary.productStartDate;if(v==null&&S==null)return 0;if(v==null)return 1;if(S==null)return-1;{let N=v.compareTo(S);if(N!==0)return N}}return m-p}getRangeDurationInDays(i){let a=i.saleSummary.productStartDate,p=i.saleSummary.productEndDate;return a==null||p==null?-1:a.until(p,Pi.DAYS)}getSurchargeDetails(i){let a=(0,Br.uniq)(i.filter(p=>p!=null).map(p=>p.surchargeId));return this.store.select(ir(a)).pipe(A(I),Ce({refCount:!0,bufferSize:1}))}getSaleSummaries(i){let a=i.map(p=>p.saleUid).filter(I);return this.saleService.getSaleSummaries(a).pipe(A(I),Ce({refCount:!0,bufferSize:1}))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-add-on-details"]],inputs:{bookingSurcharges:"bookingSurcharges",bookingTransactions:"bookingTransactions",bookingStatus:"bookingStatus",bookingUid:"bookingUid"},features:[D([{provide:M,useValue:["add-on-details.component"]},B])],decls:2,vars:3,consts:[[1,"card","p-5"],["id","add-on-details-title",1,"add-on-details-title"],["aria-labelledby","add-on-details-title",1,"add-on-details"],["data-layout","row","data-layoutAlign","space-between",1,"mt-2","mt-2"],["aria-hidden","true",1,"fa-regular","fa-car","color-accent-300","mr-1"],[3,"id"],["role","note",1,"cdk-visually-hidden"],["aria-hidden","true",1,"text-right"],[1,"ml-1"]],template:function(a,p){if(a&1&&(f(0,sp,2,3),t(1,"async")),a&2){let m;C((m=n(1,1,p.productBasedLineItemDetails$))?0:-1,m)}},dependencies:[F,R,rn,ii,Ct,ei],styles:[".add-on-details-title[_ngcontent-%COMP%]{margin-top:0}.add-on-details[_ngcontent-%COMP%]{padding:0;margin:0}.add-on-details[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}"]});let e=l;return e})();var So=ni(ri());var cp=()=>["fas","chevron-down"],Tr=()=>({hour:"2-digit",minute:"2-digit",year:"numeric",day:"numeric",month:"long"}),kr=e=>({taxName:e});function dp(e,l){if(e&1&&(c(0,"h3"),d(1),t(2,"dateFormatPipe"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,5,he(2,1,o.transactionDate,"default",!0))," ")}}function mp(e,l){e&1&&Bi(0)}function up(e,l){if(e&1&&(c(0,"mat-expansion-panel",2)(1,"mat-expansion-panel-header",4)(2,"mat-panel-title")(3,"span"),d(4),t(5,"dateFormatPipe"),t(6,"async"),s(),y(7,"fa-icon",5),s()(),Y(8,mp,1,0,"ng-container",6),s()),e&2){let o=u(),i=o.$implicit,a=o.$index,p=ci(4);_("expanded",a===0),r(4),g(" ",n(6,8,he(5,4,i.transactionDate,"default",!0))," "),r(3),_("icon",E(10,cp)),r(),_("ngTemplateOutlet",p)}}function fp(e,l){if(e&1&&(c(0,"div")(1,"span"),d(2),s(),c(3,"span"),d(4),t(5,"localeCurrency"),t(6,"async"),s(),c(7,"span"),d(8),s()()),e&2){let o=l.$implicit,i=u(3);r(2),x(o.quantity),r(2),g("x ",n(6,5,n(5,3,o.unitPrice))),r(4),g(" ",i.localizationService.getLocalizationForCurrentCultureFromDictionary(o.lineItemDisplayName))}}function Cp(e,l){if(e&1&&(c(0,"div",23),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.taxItemTotal))," ")}}function gp(e,l){if(e&1&&(c(0,"div",14)(1,"div",11),d(2),t(3,"localizeFromDictionary"),t(4,"async"),s(),f(5,Cp,4,5,"div",23),s()),e&2){let o=l.$implicit,i=u(3);r(2),g(" ",n(4,4,n(3,2,o.taxItemDisplayName))," "),r(3),C(i.currencyCode!=null?5:-1)}}function _p(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(2).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.totalCharges))," ")}}function hp(e,l){if(e&1&&(c(0,"div",23),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.taxItemTotal))," ")}}function xp(e,l){if(e&1&&(c(0,"div",17)(1,"div",11),d(2),t(3,"localizeFromDictionary"),t(4,"async"),t(5,"localize"),t(6,"async"),s(),f(7,hp,4,5,"div",23),s()),e&2){let o=l.$implicit,i=u(3);r(2),g(" ",n(6,9,we(5,6,"LABEL.INCLUSIVE_TAX_LABEL",ce(11,kr,n(4,4,n(3,2,o.taxItemDisplayName)))))," "),r(5),C(i.currencyCode!=null?7:-1)}}function yp(e,l){if(e&1&&(c(0,"div",25),d(1),t(2,"giftCardNumberFormat"),s()),e&2){let o=u().$implicit;r(),g(" ",n(2,1,o.giftCardNumber)," ")}}function vp(e,l){if(e&1&&(c(0,"div",25),d(1),s()),e&2){let o=u().$implicit,i=u(3);r(),g(" ",i.localizationService.getLocalizationForCurrentCultureFromDictionary(o.paymentMethod)," ")}}function bp(e,l){if(e&1&&(c(0,"div",12),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.paymentAmount))," ")}}function Sp(e,l){if(e&1&&(c(0,"div")(1,"h3"),d(2),s(),c(3,"div",24),f(4,yp,3,3,"div",25),f(5,vp,2,1,"div",25),f(6,bp,4,5,"div",12),s()()),e&2){let o=l.$implicit,i=u(3);r(2),x(o.cardholderName),r(2),C(o.giftCardNumber!=null?4:-1),r(),C(o.giftCardNumber==null?5:-1),r(),C(i.currencyCode!=null?6:-1)}}function Ep(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",16),d(6),t(7,"localeCurrency"),t(8,"async"),s()()),e&2){let o=u(2).$implicit,i=u();r(2),ae(" ",n(4,5,n(3,3,"LABEL.TOTAL_PAYMENT"))," (",i.currencyCode,") "),r(4),g(" ",n(8,9,n(7,7,o==null?null:o.totalPaid))," ")}}function Bp(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(3).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.totalPaid))," ")}}function Ip(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),f(5,Bp,4,5,"div",16),s()),e&2){let o=u(3);r(2),ae(" ",n(4,5,n(3,3,"LABEL.TOTAL_REFUND"))," (",o.currencyCode,") "),r(3),C(o.currencyCode!=null?5:-1)}}function Tp(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(3).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.balanceOutstanding))," ")}}function kp(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),f(5,Tp,4,5,"div",16),s()),e&2){let o=u(3);r(2),ae(" ",n(4,5,n(3,3,"LABEL.BALANCE_OUTSTANDING"))," (",o.currencyCode,") "),r(3),C(o.currencyCode!=null?5:-1)}}function Pp(e,l){if(e&1&&(c(0,"div",3)(1,"div",7)(2,"h4"),d(3),t(4,"localize"),t(5,"async"),s(),c(6,"div",8)(7,"div",9),d(8),t(9,"localize"),t(10,"async"),s(),c(11,"div",10)(12,"div",11),H(13,fp,9,7,"div",null,Z),s(),c(15,"div",12),d(16),t(17,"localeCurrency"),t(18,"async"),s()()(),y(19,"div",13),c(20,"div"),H(21,gp,6,6,"div",14,Z),c(23,"div",15)(24,"div",11),d(25),t(26,"localize"),t(27,"async"),s(),f(28,_p,4,5,"div",16),s(),H(29,xp,8,13,"div",17,Z),s()(),c(31,"div",18)(32,"div",19)(33,"div",20)(34,"mat-icon",21),d(35,"access_time"),s(),c(36,"span"),d(37),t(38,"dateFormatPipe"),t(39,"async"),s()(),H(40,Sp,7,4,"div",null,Z),y(42,"div",13),f(43,Ep,9,11,"div",22),f(44,Ip,6,7,"div",22),f(45,kp,6,7,"div",22),s()()()),e&2){let o=u().$implicit,i=u();r(3),g(" ",n(5,13,n(4,11,"LABEL.PAYMENT_DETAILS"))," "),r(5),ae(" ",n(10,17,n(9,15,"LABEL.RATE"))," ",o.rateCategoryName," "),r(5),$(o==null?null:o.lineItems),r(3),g(" ",n(18,21,n(17,19,i.getPreTaxSubtotal(o.lineItems)))," "),r(5),$(o==null?null:o.exclusiveTaxItems),r(4),ae(" ",n(27,25,n(26,23,"LABEL.TOTAL"))," (",i.currencyCode,") "),r(3),C(i.currencyCode!=null?28:-1),r(),$(o==null?null:o.inclusiveTaxItems),r(8),x(n(39,31,he(38,27,o.transactionDate,E(33,Tr),!0))),r(3),$(o==null?null:o.payments),r(3),C(o.totalPaid>=0?43:-1),r(),C(o.totalPaid<0?44:-1),r(),C(o.balanceOutstanding>0?45:-1)}}function wp(e,l){if(e&1&&(c(0,"div")(1,"span"),d(2),s(),c(3,"span"),d(4),t(5,"localeCurrency"),t(6,"async"),s(),c(7,"span"),d(8),s()()),e&2){let o=l.$implicit,i=u(3);r(2),x(o.quantity),r(2),g("x ",n(6,5,n(5,3,o.unitPrice))),r(4),g(" ",i.localizationService.getLocalizationForCurrentCultureFromDictionary(o.lineItemDisplayName))}}function Ap(e,l){if(e&1&&(c(0,"div",23),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.taxItemTotal))," ")}}function Lp(e,l){if(e&1&&(c(0,"div",14)(1,"div",11),d(2),t(3,"localizeFromDictionary"),t(4,"async"),s(),f(5,Ap,4,5,"div",23),s()),e&2){let o=l.$implicit,i=u(3);r(2),g(" ",n(4,4,n(3,2,o.taxItemDisplayName))," "),r(3),C(i.currencyCode!=null?5:-1)}}function Dp(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(2).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.totalCharges))," ")}}function Fp(e,l){if(e&1&&(c(0,"div",23),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.taxItemTotal))," ")}}function Mp(e,l){if(e&1&&(c(0,"div",17)(1,"div",11),d(2),t(3,"localizeFromDictionary"),t(4,"async"),t(5,"localize"),t(6,"async"),s(),f(7,Fp,4,5,"div",23),s()),e&2){let o=l.$implicit,i=u(3);r(2),g(" ",n(6,9,we(5,6,"LABEL.INCLUSIVE_TAX_LABEL",ce(11,kr,n(4,4,n(3,2,o.taxItemDisplayName)))))," "),r(5),C(i.currencyCode!=null?7:-1)}}function Rp(e,l){if(e&1&&(c(0,"div",25),d(1),t(2,"giftCardNumberFormat"),s()),e&2){let o=u().$implicit;r(),g(" ",n(2,1,o.giftCardNumber)," ")}}function Op(e,l){if(e&1&&(c(0,"div",25),d(1),s()),e&2){let o=u().$implicit,i=u(3);r(),g(" ",i.localizationService.getLocalizationForCurrentCultureFromDictionary(o.paymentMethod)," ")}}function Np(e,l){if(e&1&&(c(0,"div",12),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u().$implicit;r(),g(" ",n(3,3,n(2,1,o.paymentAmount))," ")}}function zp(e,l){if(e&1&&(c(0,"div")(1,"h3"),d(2),s(),c(3,"div",24),f(4,Rp,3,3,"div",25),f(5,Op,2,1,"div",25),f(6,Np,4,5,"div",12),s()()),e&2){let o=l.$implicit,i=u(3);r(2),x(o.cardholderName),r(2),C(o.giftCardNumber!=null?4:-1),r(),C(o.giftCardNumber==null?5:-1),r(),C(i.currencyCode!=null?6:-1)}}function Vp(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",16),d(6),t(7,"localeCurrency"),t(8,"async"),s()()),e&2){let o=u(2).$implicit,i=u();r(2),ae(" ",n(4,5,n(3,3,"LABEL.TOTAL_PAYMENT"))," (",i.currencyCode,") "),r(4),g(" ",n(8,9,n(7,7,o==null?null:o.totalPaid))," ")}}function Up(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(3).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.totalPaid))," ")}}function Hp(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),f(5,Up,4,5,"div",16),s()),e&2){let o=u(3);r(2),ae(" ",n(4,5,n(3,3,"LABEL.TOTAL_REFUND"))," (",o.currencyCode,") "),r(3),C(o.currencyCode!=null?5:-1)}}function $p(e,l){if(e&1&&(c(0,"div",16),d(1),t(2,"localeCurrency"),t(3,"async"),s()),e&2){let o=u(3).$implicit;r(),g(" ",n(3,3,n(2,1,o==null?null:o.balanceOutstanding))," ")}}function Gp(e,l){if(e&1&&(c(0,"div",22)(1,"div",11),d(2),t(3,"localize"),t(4,"async"),s(),f(5,$p,4,5,"div",16),s()),e&2){let o=u(3);r(2),ae(" ",n(4,5,n(3,3,"LABEL.BALANCE_OUTSTANDING"))," (",o.currencyCode,") "),r(3),C(o.currencyCode!=null?5:-1)}}function qp(e,l){if(e&1&&(c(0,"div",3)(1,"div",7)(2,"h4"),d(3),t(4,"localize"),t(5,"async"),s(),c(6,"div",8)(7,"div",9),d(8),t(9,"localize"),t(10,"async"),s(),c(11,"div",10)(12,"div",11),H(13,wp,9,7,"div",null,Z),s(),c(15,"div",12),d(16),t(17,"localeCurrency"),t(18,"async"),s()()(),y(19,"div",13),c(20,"div"),H(21,Lp,6,6,"div",14,Z),c(23,"div",15)(24,"div",11),d(25),t(26,"localize"),t(27,"async"),s(),f(28,Dp,4,5,"div",16),s(),H(29,Mp,8,13,"div",17,Z),s()(),c(31,"div",18)(32,"div",19)(33,"div",20)(34,"mat-icon",21),d(35,"access_time"),s(),c(36,"span"),d(37),t(38,"dateFormatPipe"),t(39,"async"),s()(),H(40,zp,7,4,"div",null,Z),y(42,"div",13),f(43,Vp,9,11,"div",22),f(44,Hp,6,7,"div",22),f(45,Gp,6,7,"div",22),s()()()),e&2){let o=u().$implicit,i=u();r(3),g(" ",n(5,13,n(4,11,"LABEL.PAYMENT_DETAILS"))," "),r(5),ae(" ",n(10,17,n(9,15,"LABEL.RATE"))," ",o.rateCategoryName," "),r(5),$(o==null?null:o.lineItems),r(3),g(" ",n(18,21,n(17,19,i.getPreTaxSubtotal(o.lineItems)))," "),r(5),$(o==null?null:o.exclusiveTaxItems),r(4),ae(" ",n(27,25,n(26,23,"LABEL.TOTAL"))," (",i.currencyCode,") "),r(3),C(i.currencyCode!=null?28:-1),r(),$(o==null?null:o.inclusiveTaxItems),r(8),x(n(39,31,he(38,27,o.transactionDate,E(33,Tr),!0))),r(3),$(o==null?null:o.payments),r(3),C(o.totalPaid>=0?43:-1),r(),C(o.totalPaid<0?44:-1),r(),C(o.balanceOutstanding>0?45:-1)}}function Wp(e,l){if(e&1&&(f(0,dp,4,7,"h3"),f(1,up,9,11,"mat-expansion-panel",2)(2,Pp,46,34,"div",3),Y(3,qp,46,34,"ng-template",null,0,it)),e&2){let o=u();C(o.showCollapsible===!1?0:-1),r(),C(o.showCollapsible?1:2)}}var Rn=(()=>{let l=class l{constructor(){this.trackByIndexFn=h(Ze),this.bookingService=h(ui),this.localizationService=h(B),this.store=h(V),this.componentActive=!0,this.state="active",this.showCollapsible=!1,this.store.select(ki).pipe(oi(()=>this.componentActive)).subscribe(i=>{i!=null&&(this.currentCultureName=i.cultureName)})}ngOnInit(){this.store.select(Ne).pipe(A(ee),b(re),W(i=>(this.currencyCode=i.primaryCurrency.currencyCode,!this.transactionSummary&&this.bookingUid!=null?this.fetchTransactionDetailSummary():(this.transactionSummary.length>1&&(this.showCollapsible=!0),K(this.transactionSummary)))),W(()=>(this.store.dispatch(new nn),this.store.select(mn).pipe(A(ee),b(re))))).subscribe(i=>{if(i!=null&&this.transactionSummary!=null&&this.transactionSummary.length>0)for(let a of this.transactionSummary)a.rateCategoryName=this.getRateCategoryName(i,a.rateCategoryId)})}ngOnDestroy(){this.componentActive=!1}getPreTaxSubtotal(i){let a=0;for(let p of i)a=a+p.quantity*p.unitPrice;return a}fetchTransactionDetailSummary(){return this.bookingService.getBookingTransactionSummary(this.bookingUid).pipe(A(),W(i=>i!=null?(this.transactionSummary=i,K(this.transactionSummary)):K(null)))}getRateCategoryName(i,a){if(i?.length>0&&a!=null){let p=(0,So.find)(i,m=>m.rateCategoryId===a);if(p){let m=(0,So.find)(p.localizedValues,v=>v.cultureName===this.currentCultureName);return m?m.name:""}return""}return""}};l.\u0275fac=function(a){return new(a||l)}
1,l.\u0275cmp=L({type:l,selectors:[["app-transaction-details"]],inputs:{bookingUid:"bookingUid",transactionSummary:"transactionSummary"},features:[D([{provide:M,useValue:["transaction-details.component"]},B])],decls:7,vars:5,consts:[["transactionDetails",""],[1,"full-width"],["hideToggle","",1,"invisible-expansion-panel","link-style",3,"expanded"],["data-layout.gt-sm","row","data-layoutGap.gt-sm","20px"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"expansion-panel-toggle",3,"icon"],[4,"ngTemplateOutlet"],["data-flex.gt-sm","50",1,"margin-bottom-10-lt-sm","cart-summary","card"],[1,"line-item"],[1,"bold"],["data-layout","row","data-layoutGap","5px"],["data-flex","100"],["data-flex","100px",1,"text-right"],[1,"cart-divider"],["data-layout","row","data-layoutGap","5px",1,"line-item"],["data-layout","row","data-layoutGap","5px",1,"bold"],["data-flex","100px",1,"cart-total","text-right"],["data-layout","row","data-layoutAlign","end","data-layoutGap","5px",1,"line-item"],["data-flex.gt-sm","50",1,"cart-summary","card"],["data-layout","column","data-layoutGap","10px"],["data-layout","row","data-layoutAlign","end","data-layoutGap","5px"],["aria-hidden","true"],["data-layout","row","data-layoutAlign","end","data-layoutGap","5px",1,"bold"],["data-flex","100px",1,"total","text-right"],["data-layout","row"],["data-flex","100",1,"line-item"]],template:function(a,p){a&1&&(c(0,"div",1)(1,"h2"),d(2),t(3,"localize"),t(4,"async"),s(),H(5,Wp,5,2,null,null,Z),s()),a&2&&(r(2),x(n(4,3,n(3,1,"LABEL.TRANSACTION_DETAILS"))),r(3),$(p.transactionSummary))},dependencies:[Qe,Xe,Je,pe,nt,Cn,F,Ia,R,rn,ii,Ct],styles:[".summary-header[_ngcontent-%COMP%]{font-size:18px;font-weight:700}.cart-summary[_ngcontent-%COMP%]{padding:30px}.line-item[_ngcontent-%COMP%]{font-size:14px}.cart-tax-message[_ngcontent-%COMP%]{font-size:14px;text-align:right}.cart-total[_ngcontent-%COMP%]{font-size:20px}"]});let e=l;return e})();var Kp=()=>["far","envelope"],jp=e=>[e];function Yp(e,l){e&1&&(c(0,"mat-error"),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"ERRORS.email.emailFormat"))," "))}function Qp(e,l){e&1&&(c(0,"mat-error"),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"ERRORS.email.required"))," "))}function Xp(e,l){if(e&1&&(y(0,"app-alert-box",10),t(1,"localize"),t(2,"async")),e&2){let o=u(2);_("title",de(n(2,6,n(1,4,"ERROR.TITLE"))))("messages",o.errorMessages)("addBottomMargin","20px")}}function Jp(e,l){if(e&1){let o=z();c(0,"form",3)(1,"mat-dialog-content")(2,"p"),d(3),t(4,"localize"),t(5,"async"),s(),c(6,"div",4)(7,"div",5)(8,"label",6),d(9),t(10,"localize"),t(11,"async"),s(),c(12,"mat-form-field",7),y(13,"fa-icon",8)(14,"input",9),f(15,Yp,4,5,"mat-error"),f(16,Qp,4,5,"mat-error"),s()()(),f(17,Xp,3,8,"app-alert-box",10),s(),c(18,"mat-dialog-actions",11)(19,"button",12),k("click",function(){P(o);let a=u();return w(a.closeDialog())}),d(20),t(21,"localize"),t(22,"async"),s(),c(23,"button",13),k("click",function(){P(o);let a=u();return w(a.submitForm())}),d(24),t(25,"localize"),t(26,"async"),s()()()}if(e&2){let o=u();_("formGroup",o.forwardConfirmationFormModel),r(3),g(" ",n(5,11,n(4,9,"DESC"))," "),r(6),g(" ",n(11,15,n(10,13,"INPUT.EMAIL.PLACEHOLDER"))," "),r(4),_("icon",E(25,Kp)),r(2),C(o.forwardConfirmationFormModel.controls.email.errors!=null&&o.forwardConfirmationFormModel.controls.email.errors.emailFormat?15:-1),r(),C(o.forwardConfirmationFormModel.controls.email.errors!=null&&o.forwardConfirmationFormModel.controls.email.errors.required?16:-1),r(),C(o.errorMessages.length>0?17:-1),r(3),g(" ",n(22,19,n(21,17,"BUTTON.CANCEL"))," "),r(4),g(" ",n(26,23,n(25,21,"BUTTON.FORWARD"))," ")}}function Zp(e,l){if(e&1){let o=z();c(0,"div")(1,"mat-dialog-content"),y(2,"app-alert-box",14),t(3,"localize"),t(4,"async"),t(5,"localize"),t(6,"async"),s(),c(7,"mat-dialog-actions",15)(8,"button",16),k("click",function(){P(o);let a=u();return w(a.closeDialog())})("keyup.enter",function(){P(o);let a=u();return w(a.closeDialog())}),d(9),t(10,"localize"),t(11,"async"),s()()()}e&2&&(r(2),_("title",de(n(4,8,n(3,6,"SUCCESS.TITLE"))))("messages",ce(18,jp,n(6,12,n(5,10,"SUCCESS.MESSAGE"))))("alertType","success")("addB
1ottomMargin","20px"),r(7),g(" ",n(11,16,n(10,14,"BUTTON.CLOSE"))," "))}var On=(()=>{let l=class l{constructor(){this.data=h(Qo),this.dialogRef=h(Yo),this.fb=h(mi),this.emailService=h(vt),this.localizationService=h(B),this.serviceErrorHelper=h(Te),this.store=h(V),this.forwardConfirmationFormModel=new ot({email:new di(null,[We(),Pt()])}),this.errorMessages=[],this.emailSent=!1,this.componentActive=!0}ngOnDestroy(){this.componentActive=!1}submitForm(){if(this.emailSent=!1,this.forwardConfirmationFormModel.markAllAsTouched(),this.forwardConfirmationFormModel.invalid)return;let i=q(this.forwardConfirmationFormModel,"email").value;this.emailService.sendConfirmationEmail(this.data.cartUid,this.data.transactionUid,this.data.bookingUid,i).pipe(A()).subscribe(()=>{this.emailSent=!0},a=>{let p=this.serviceErrorHelper.parseErrorMessageResult(a);p.messageKey&&this.localizationService.getTranslation(p.messageKey).subscribe(m=>this.errorMessages.push(m))})}closeDialog(){this.dialogRef.close()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-forward-confirmation-dialog"]],features:[D([{provide:M,useValue:["forward-confirmation-dialog.component"]},B])],decls:9,vars:7,consts:[[1,"dialog-body"],[1,"dialog-header"],["mat-dialog-title",""],[1,"form-wrapper",3,"formGroup"],[1,"field-wrapper"],[1,"form-control-wrapper"],["id","email-label","for","email","aria-owns","email"],["appearance","outline",1,"email-field"],["matPrefix","","aria-hidden","true",3,"icon"],["id","email","type","email","matInput","","required","","formControlName","email"],["data-flex","auto",3,"title","messages","addBottomMargin"],[1,"actions"],["mat-stroked-button","","color","accent","data-flex.gt-xs","50",1,"button",3,"click"],["mat-flat-button","","color","accent","data-flex.gt-xs","50",1,"button",3,"click"],["data-flex","auto",3,"title","messages","alertType","addBottomMargin"],["data-layoutAlign","end"],["mat-flat-button","","color","accent",1,"button",3,"click","keyup.enter"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"div",1)(2,"h2",2),d(3),t(4,"localize"),t(5,"async"),s()(),c(6,"div"),f(7,Jp,27,26,"form",3),f(8,Zp,12,20,"div"),s()()),a&2&&(r(3),x(n(5,5,n(4,3,"TITLE"))),r(4),C(p.emailSent?-1:7),r(),C(p.emailSent?8:-1))},dependencies:[Xo,Ee,Ue,De,Fe,Ve,Ii,Be,He,$e,Jo,Pe,pe,Ci,Me,Ge,qe,Zo,le,F,R],styles:[".dialog-body[_ngcontent-%COMP%]{max-width:600px}.actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:10px}.actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0}"]});let e=l;return e})();var es=()=>["fas","redo-alt"],is=()=>["far","times"],Eo=e=>[e],ts=()=>["fas","exchange-alt"],ns=()=>["fas","file-alt"],os=()=>["fas","envelope"],as=()=>["fas","arrow-right"],rs=()=>["fas","receipt"];function ls(e,l){if(e&1&&(c(0,"li")(1,"button",5),y(2,"span",6),d(3),t(4,"localize"),t(5,"async"),s()()),e&2){let o=u(2);r(),_("routerLink",ce(7,Eo,o.selfCheckInRoute))("queryParams",o.updateCheckInQueryParams),r(2),g(" ",n(5,5,n(4,3,"BUTTON.UPDATE_CHECK_IN_INFORMATION"))," ")}}function ps(e,l){if(e&1&&(c(0,"li")(1,"button",7),y(2,"span",8),c(3,"span"),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2){let o=u(2);r(),_("routerLink",ce(7,Eo,o.selfCheckInInstructionsRoute))("queryParams",o.checkInQueryParams),r(3),x(n(6,5,n(5,3,"BUTTON.SELF_CHECK_IN_INSTRUCTIONS")))}}function ss(e,l){if(e&1&&(c(0,"li")(1,"app-sticky-button-on-mobile")(2,"button",9),y(3,"span",8),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2){let o=u(2);r(2),_("routerLink",ce(7,Eo,o.selfCheckInRoute))("queryParams",o.checkInQueryParams),r(2),g(" ",n(6,5,n(5,3,"BUTTON.SELF_CHECK_IN"))," ")}}function cs(e,l){if(e&1){let o=z();c(0,"li")(1,"button",10),k("click",function(){P(o);let a=u(2);return w(a.onSelfCheckOutClicked(a.compactBooking))}),c(2,"div",11),y(3,"span",12),c(4,"span"),d(5),t(6,"localize"),t(7,"async"),s()()()()}e&2&&(r(5),x(n(7,3,n(6,1,"BUTTON.SELF_CHECK_OUT"))))}function ds(e,l){if(e&1){let o=z();c(0,"button",13),k("click",function(){P(o);let a=u(2);return w(a.onChangeBookingClicked(a.compactBooking))}),y(1,"fa-icon",1),d(2),t(3,"localize"),t(4,"async"),s()}e&2&&(r(),_("icon",E(6,ts)),r(),g(" ",n(4,4,n(3,2,"CHANGE"))," "))}function ms(e,l){if(e&1){let o=z();f(0,ls,6,9,"li"),f(1,ps,7,9,"li"),f(2,ss,7,9,"li"),f(3,cs,8,5,"li"),c(4,"li"),f(5,ds,5,7,"button",2),s(),c(6,"li",3)(7,"button",4),k("click",function(){P(o);let a=u();return w(a.onCancelBookingClicked(a.compactBooking))}),y(8,"fa-icon",1),d(9),t(10,"localize"),t(11,"async"),s()()}if(e&2){let o=u();C(o.compactBooking.bookingStatus===o.extendedBookingStatuses.SelfCheckedIn&&o.compactBooking.canBeSelfCheckedIn?0:-1),r(),C(o.compactBooking.bookingStatus===o.extendedBookingStatuses.SelfCheckedIn&&!o.compactBooking.canBeSelfCheckedIn?1:-1),r(),C(o.compactBooking.canBeSelfCheckedIn&&o.compactBooking.bookingStatus!==o.extendedBookingStatuses.SelfCheckedIn?2:-1),r(),C(o.compactBooking!=null&&o.compactBooking.canBeSelfCheckedOut&&o.compactBooking.bookingStatus===o.extendedBookingStatuses.Departing?3:-1),r(2),C(o.allowsChanges?5:-1),r(3),_("icon",E(11,is)),r(),g(" ",n(11,9,n(10,7,"CANCEL"))," ")}}function us(e,l){if(e&1){let o=z();c(0,"li")(1,"button",14),k("click",function(){P(o);let a=u();return w(a.viewConfirmation())}),y(2,"fa-icon",1),d(3),t(4,"localize"),t(5,"async"),s()(),c(6,"li")(7,"button",15),t(8,"localize"),t(9,"async"),k("click",function(){P(o);let a=u();return w(a.sendConfirmation())}),y(10,"fa-icon",1),d(11),t(12,"localize"),t(13,"async"),s()(),c(14,"li")(15,"button",16),k("click",function(){P(o);let a=u();return w(a.forwardConfirmation())}),y(16,"fa-icon",1),d(17),t(18,"localize"),t(19,"async"),s()(),c(20,"li")(21,"button",17),k("click",function(){P(o);let a=u();return w(a.viewPaymentReceipt())}),y(22,"fa-icon",1),d(23),t(24,"localize"),t(25,"async"),s()()}e&2&&(r(2),_("icon",E(29,ns)),r(),g(" ",n(5,11,n(4,9,"VIEW"))," "),r(4),G("aria-label",n(9,15,n(8,13,"ACCESSIBLE_EMAIL"))),r(3),_("icon",E(30,os)),r(),g(" ",n(13,19,n(12,17,"EMAIL"))," "),r(5),_("icon",E(31,as)),r(),g(" ",n(19,23,n(18,21,"FORWARD"))," "),r(5),_("icon",E(32,rs)),r(),g(" ",n(25,27,n(24,25,"RECEIPT"))," "))}var Nn=(()=>{let l=class l{constructor(){this.dialog=h(jt),this.localizationService=h(B),this.dialogHelper=h(Re),this.router=h(Ie),this.bookingService=h(ui),this.cartService=h(Fi),this.emailService=h(vt),this.categoryLabelFormatHelper=h(xt),this.serviceErrorHelper=h(Te),this.accountHelper=h(Sn),this.store=h(V),this.selfCheckOutHelper=h(Ja),this.bookingHelper=h(Ri),this.allowsChanges=!0,this.completedBooking=!1,this.errorMessages=[],this.orgHasCallCenter=!1,this.extendedBookingStatuses=se,this.selfCheckInRoute=`/checkin/${fo.PartyInfo}`,this.selfCheckInInstructionsRoute=`/checkin/${fo.Success}`}ngOnInit(){this.store.dispatch(ut()),this.checkInQueryParams={[yt.CartUid]:this.booking.cartUid,[yt.BookingUid]:this.booking.bookingUid},this.updateCheckInQueryParams={[yt.CartUid]:this.booking.cartUid,[yt.BookingUid]:this.booking.bookingUid,[yt.IsUpdate]:"true"},this.store.select(fi(gi.CallCentre)).pipe(T(I)).subscribe(i=>{this.orgHasCallCenter=i.length>0})}onSelfCheckOutClicked(i){this.selfCheckOutHelper.selfCheckOutWorkflow(this.booking.cartUid,i)}onChangeBookingClicked(i){this.store.dispatch(new ft.resourceLocations.LoadResourceLocations),O({resourceLocation:this.store.select(mt(i.resourceLocationId)).pipe(A(I)),callCentreTransactionLocation:this.store.select(fi(gi.CallCentre)).pipe(A(I),b(a=>a[0])),bookingChangeCancelMessageKeys:this.accountHelper.getBookingChangeMessageKey(i).pipe(A())}).pipe(W(({resourceLocation:a,callCentreTransactionLocation:p,bookingChangeCancelMessageKeys:m})=>m!=null?this.accountHelper.getChangeValidationMessage(m,i.bookingStatus,p?.phoneNumber,{name:this.localizationService.getLocalizationForCurrentCultureFromList(
1a.localizedValues)?.fullName??"",phoneNumber:a.phoneNumber},i.outsideChangeWindow.nextActionableDate):(this.store.dispatch(wi({workingBookingUid:this.booking.bookingUid})),this.cartService.getCartByUid(this.booking.cartUid,null).pipe(A()).subscribe(()=>{this.router.navigate(["/change-booking"])}),K(null))),A(I)).subscribe(({title:a,message:p})=>this.dialogHelper.openGenericDialog(a,[p]))}onCancelBookingClicked(i){this.store.dispatch(new ft.resourceLocations.LoadResourceLocations),O({resourceLocation:this.store.select(mt(i.resourceLocationId)).pipe(A(I)),callCentreTransactionLocation:this.store.select(fi(gi.CallCentre)).pipe(A(I),b(a=>a[0])),bookingChangeCancelMessageKey:this.accountHelper.getBookingCancelMessageKey(i).pipe(A())}).pipe(W(({resourceLocation:a,callCentreTransactionLocation:p,bookingChangeCancelMessageKey:m})=>m!=null?O({bookingChangeCancelMessageKey:K(m),dialogContent:this.accountHelper.getCancelValidationMessage(m,i.bookingStatus,p?.phoneNumber,{name:this.localizationService.getLocalizationForCurrentCultureFromList(a.localizedValues)?.fullName??"",phoneNumber:a.phoneNumber},i.outsideCancelWindow.nextActionableDate)}):(this.bookingService.getBooking(i.bookingUid).pipe(A(I),W(v=>(this.store.dispatch(wi({workingBookingUid:v.bookingUid})),this.cartService.getCancelBookingCart(v.cartUid,v.bookingUid)))).subscribe({next:()=>{this.router.navigate(["/cancel-booking/acknowledgement"])},error:v=>{this.errorMessages=[];let S=this.serviceErrorHelper.parseErrorMessageResult(v);S.messageKey&&this.localizationService.getTranslation(S.messageKey).subscribe(N=>{this.errorMessages.push(N)})}}),K(null))),A(I)).subscribe(({dialogContent:a,bookingChangeCancelMessageKey:p})=>{if(a!=null)if(p===bn.LinkedResource){let m=this.dialogHelper.openConfirmationDialog(a.title,[a.message]);m?.componentInstance.confirmed.asObservable().pipe(W(()=>this.accountHelper.handleConfirmCancelLinkedBookingMessage(i)),ne(v=>v)).subscribe(()=>{m.close()})}else this.dialogHelper.openGenericDialog(a.title,[a.message])})}viewConfirmation(){if(this.booking==null)return;let i=this.booking.newVersion??this.booking.currentVersion;this.router.navigate(["/confirmation-letter",this.booking.cartUid,i.cartTransactionUid,this.booking.bookingUid])}viewPaymentReceipt(){if(this.booking==null)return;let i=this.booking.newVersion??this.booking.currentVersion;this.router.navigate(["/transaction-receipt",this.booking.cartUid,i.cartTransactionUid,this.booking.bookingUid,!0])}sendConfirmation(){if(this.booking==null)return;let i=this.booking.newVersion??this.booking.currentVersion;this.emailService.sendConfirmationEmail(this.booking.cartUid,i.cartTransactionUid,this.booking.bookingUid).pipe(A()).subscribe(()=>{this.router.navigate(["/confirmation-letter",this.booking.cartUid,i.cartTransactionUid,this.booking.bookingUid,"resend-success"])})}forwardConfirmation(){if(this.booking==null)return null;let i=this.booking.newVersion??this.booking.currentVersion;return this.dialog.open(On,{data:{bookingUid:this.booking.bookingUid,cartUid:this.booking.cartUid,transactionUid:i.cartTransactionUid}})}createAnotherBooking(){this.bookingService.getResourceBlockersForBooking(this.booking.bookingUid).pipe(W(i=>{let a=[...i.resourceBlockers,...i.resourceNonSpecificBlockers,...i.resourceZoneBlockers,...i.resourceZoneEntryBlockers];if(a.length===0)throw new Error("No blockers exist on booking");let p=a[0].newVersion??a[0].currentVersion;if(p==null)throw new Error("ResourceBlockerVersion was null");return this.store.dispatch(new _a(p.resourceLocationId)),this.store.dispatch(new on),O({capacityCategories:this.store.select(dn).pipe(T(ee),b(re)),bookingCategory:this.store.select(Jt(this.booking.bookingCategoryId)).pipe(T(I)),mapWithResource:this.store.select(ha(p.resourceId,p.resourceLocationId)).pipe(T(I))})}),ne(I)).subscribe(({mapWithResource:i,capacityCategories:a,bookingCategory:p})=>{let m=new ua;if(m.mapId=i.mapId,m.resourceLocationId=i.resourceLocationId,m.transactionLocationId=i.transactionLocationId,this.booking.currentVersion!=null){if(m.startDate=this.booking.currentVersion.startDate,m.endDate=this.booking.currentVersion.endDate,m.nights=this.booking.currentVersion.startDate.until(this.booking.currentVersion.endDate,Pi.DAYS),m.equipmentCapacity=this.bookingHelper.getBookingCapacityCountTotalByCapacityCategoryType(p,this.booking.currentVersion.bookingCapacityCategoryCounts,uo.Equipment,a),m.bookingCategoryId=this.booking.bookingCategoryId,this.booking.currentVersion.bookingBoats.length>0){let S=this.booking.currentVersion.bookingBoats[0];m.boatLength=S.length??null,m.boatDraft=S.draft??null,m.boatWidth=S.width??null,m.boatTypeId=S.type??null}m.peopleCapacityCategoryCounts=this.bookingHelper.getBookingCapacityCountByCapacityCategoryType(p,this.booking.currentVersion.bookingCapacityCategoryCounts,uo.People,a)}this.store.dispatch(new dt(ct.SetActiveSearchCriteria,m)),this.store.dispatch(new dt(ct.SetLastUsedSearchCriteria,null));let v=tn.buildSearchCriteriaQueryParams(m);this.router.navigate(["/create-booking"],{queryParams:v})})}getIsBookingExpired(i){return i===se.Completed||i===se.NoShow||i===se.Cancelled||i===se.Late||i===se.Expired}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-booking-details-menu"]],inputs:{booking:"booking",compactBooking:"compactBooking",allowsChanges:"allowsChanges",completedBooking:"completedBooking"},features:[D([{provide:M,useValue:["booking-details-menu.component"]},B])],decls:11,vars:14,consts:[["mat-stroked-button","","color","accent","id","bookAgain",1,"button","full-width",3,"click"],["aria-hidden","true","alt","",1,"fa",3,"icon"],["mat-flat-button","","color","accent","id","changeBooking",1,"button","full-width"],[1,"separate-below"],["mat-flat-button","","color","accent","id","cancelBooking",1,"button","full-width",3,"click"],["id","updateCheckIn","mat-flat-button","","color","primary",1,"button","full-width","self-check-in-btn",3,"routerLink","queryParams"],["aria-hidden","true",1,"fas","fa-user-pen","mr-1"],["
1id","selfCheckInInstructions","mat-flat-button","","color","accent",1,"button","full-width",3,"routerLink","queryParams"],["aria-hidden","true",1,"fas","fa-badge-check","mr-1"],["id","startSelfCheckIn","mat-flat-button","","color","primary",1,"button","full-width","self-check-in-btn",3,"routerLink","queryParams"],["id","selfCheckOut","mat-flat-button","","color","primary",1,"button","full-width",3,"click"],[1,"button-contents"],[1,"fas","fa-arrow-right","mr-1"],["mat-flat-button","","color","accent","id","changeBooking",1,"button","full-width",3,"click"],["mat-stroked-button","","color","accent","id","viewConfirmationLetter",1,"button","full-width",3,"click"],["mat-stroked-button","","color","accent","id","sendConfirmation",1,"button","full-width",3,"click"],["mat-stroked-button","","color","accent","id","forwardConfirmation",1,"button","full-width",3,"click"],["mat-stroked-button","","color","accent","id","viewPaymentReceipt",1,"button","full-width",3,"click"]],template:function(a,p){a&1&&(c(0,"ul"),t(1,"localize"),t(2,"async"),f(3,ms,12,12),f(4,us,26,33),c(5,"li")(6,"button",0),k("click",function(){return p.createAnotherBooking()}),y(7,"fa-icon",1),d(8),t(9,"localize"),t(10,"async"),s()()()),a&2&&(G("aria-label",n(2,7,n(1,5,"NAVIGATION.ARIA"))),r(3),C(p.compactBooking&&!p.completedBooking?3:-1),r(),C(p.compactBooking&&!p.getIsBookingExpired(p.compactBooking.bookingStatus)?4:-1),r(3),_("icon",E(13,es)),r(),g(" ",n(10,11,n(9,9,"BOOKAGAIN"))," "))},dependencies:[le,at,nr,pe,F,R],styles:["ul[_ngcontent-%COMP%]{padding:0}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;margin-bottom:10px}ul[_ngcontent-%COMP%] li.separate-below[_ngcontent-%COMP%]{padding-bottom:20px;border-bottom:2px solid #ECECEC;margin-bottom:20px}"]});let e=l;return e})();function fs(e,l){if(e&1&&y(0,"app-compact-booking",8),e&2){let o=u(3);_("enabledViewButton",!1)("booking",o)("showMoreOptions",!1)}}function Cs(e,l){if(e&1&&y(0,"app-booking-boat-details",9),e&2){let o=u(4),i=u();_("bookingBoats",o.currentVersion.bookingBoats)("arrivalComment",i.collectsArrivalComment&&o.currentVersion.arrivalComment!=null&&o.currentVersion.arrivalComment!=="")}}function gs(e,l){if(e&1&&y(0,"app-arrival-comment",10),e&2){let o=u(4);_("bookingUid",o.bookingUid)("canEdit",!1)}}function _s(e,l){if(e&1&&y(0,"app-member-details",11),e&2){let o=u(4),i=u();_("memberDetails",o.currentVersion.bookingMembers)("memberCollectionRequirements",i.memberCollectionRequirements)}}function hs(e,l){if(e&1&&y(0,"app-party-emergency-contact",12),e&2){let o=u(4);_("contactName",o.currentVersion.occupant.contact.contactName)("contactPhoneNumber",o.currentVersion.occupant.contact.phoneNumber)}}function xs(e,l){if(e&1&&y(0,"app-add-on-details",13),e&2){let o=u(2),i=u(2);_("bookingSurcharges",i.currentVersion.bookingSurcharges)("bookingTransactions",o)("bookingStatus",i.currentVersion.bookingStatus)("bookingUid",i.bookingUid)}}function ys(e,l){if(e&1&&y(0,"app-site-details",14),e&2){let o=u(3);_("showSiteName",!0)("showFee",!1)("showAddToBooking",!1)("showSingleSiteCalendar",!1)("showBookingFields",!1)("showResourceMessages",!0)("resourceId",o.firstResourceId)("resourceLocationId",o.resourceLocationId)("bookingCategoryId",o.bookingCategoryId)}}function vs(e,l){if(e&1&&y(0,"app-itinerary-summary",15),e&2){let o=u(3),i=u();_("bookingUid",i.bookingUid)("bookingCategoryId",o.bookingCategoryId)}}function bs(e,l){if(e&1&&(c(0,"div",7)(1,"div"),f(2,fs,1,3,"app-compact-booking",8),f(3,Cs,1,2,"app-booking-boat-details",9),f(4,gs,1,2,"app-arrival-comment",10),s(),f(5,_s,1,2,"app-member-details",11),f(6,hs,1,2,"app-party-emergency-contact",12),f(7,xs,1,4,"app-add-on-details",13),f(8,ys,1,9,"app-site-details",14),f(9,vs,1,2,"app-itinerary-summary",15),y(10,"app-transaction-details",16),s()),e&2){let o=u(),i=u(),a=u(),p=u();r(2),C(i?2:-1),r(),C(p.showBoatDetails&&a.currentVersion.bookingBoats.length>0?3:-1),r(),C(p.collectsArrivalComment&&a.currentVersion.arrivalComment!=null&&a.currentVersion.arrivalComment!==""?4:-1),r(),C(p.collectsMemberDetails?5:-1),r(),C(p.showPartyContact&&a.currentVersion.occupant.contact.contactName!=null&&a.currentVersion.occupant.contact.phoneNumber?6:-1),r(),C(a.currentVersion.bookingSurcharges.length>0?7:-1),r(),C(i.resourceBlockerUids.length===1?8:-1),r(),C(p.getIsBookingItinerary(i)?9:-1),r(),_("bookingUid",a.bookingUid)("transactionSummary",o)}}function Ss(e,l){if(e&1&&(c(0,"div",2),Y(1,bs,11,10,"div",6),t(2,"async"),s()),e&2){let o=u(3);r(),_("ldSpinner",n(2,2,o.bookingDetailsLoadingStatus$)>0)("ldSpinnerAriaLabelledby","pageTitle")}}function Es(e,l){if(e&1&&y(0,"app-pre-register-prompt",5),e&2){let o=u(),i=u();_("cartUid",i.cartUid)("bookingUid",o.bookingUid)}}function Bs(e,l){if(e&1&&(c(0,"div",1),f(1,Ss,3,4,"div",2),t(2,"async"),c(3,"div",3),y(4,"app-booking-details-menu",4),t(5,"async"),f(6,Es,1,2,"app-pre-register-prompt",5),s()()),e&2){let o,i=l,a=u(),p=u();r(),C((o=n(2,6,p.bookingTransactions$))?1:-1,o),r(3),_("booking",a)("compactBooking",i)("allowsChanges",p.allowsChanges)("completedBooking",n(5,8,p.completedBooking$)??!1),r(2),C(!(i!=null&&i.canBeSelfCheckedIn)&&(i!=null&&i.canBePreregistered)?6:-1)}}function Is(e,l){if(e&1&&(c(0,"div"),f(1,Bs,7,10,"div",1),t(2,"async"),s()),e&2){let o,i=u();r(),C((o=n(2,1,i.compactBooking$))?1:-1,o)}}var zn=(()=>{let l=class l{constructor(){this.route=h(Ti),this.bookingService=h(ui),this.bookingCategoryHelper=h(gt),this.collectsArrivalComment=!1,this.showBoatDetails=!1,this.showPartyContact=!1,this.memberCollectionRequirements={},this.collectsMemberDetails=!1,this.allowsChanges=!0,this.destroyRef=h(Si),this.bookingUid=this.route.
1snapshot.params.bookingUid}ngOnInit(){this.booking$=this.bookingService.getBooking(this.bookingUid).pipe(xi(this.destroyRef),Ce(1)),this.compactBooking$=this.bookingService.getCompactBookingDetails(this.bookingUid,null).pipe(T()),this.bookingTransactions$=this.bookingService.getBookingTransactionSummary(this.bookingUid).pipe(T(I),xi(this.destroyRef),Ce(1)),this.completedBooking$=this.compactBooking$.pipe(b(({bookingStatus:a})=>a===se.Cancelled||a===se.Completed||a===se.NoShow||a===se.Expired));let i=X(()=>this.compactBooking$.pipe(A(I),W(({bookingCategoryId:a})=>O({collectsArrivalComment:this.bookingCategoryHelper.doesBookingCategoryIdCollectArrivalComment(a),collectsBoatDetails:this.bookingCategoryHelper.doesBookingCategoryIdCollectBoatDetails(a),collectsMemberNames:this.bookingCategoryHelper.doesBookingCategoryIdCollectMemberNames(a),collectsMemberAges:this.bookingCategoryHelper.doesBookingCategoryIdCollectMemberAges(a),collectsMemberNotes:this.bookingCategoryHelper.doesBookingCategoryIdCollectMemberNotes(a),collectsMemberDates:this.bookingCategoryHelper.doesBookingCategoryIdCollectMemberDates(a),collectsMemberContact:this.bookingCategoryHelper.doesBookingCategoryIdCollectMemberContact(a),collectsPartyContact:this.bookingCategoryHelper.doesBookingCategoryIdCollectPartyContact(a),allowsChanges:this.bookingCategoryHelper.doesBookingCategoryIdAllowChanges(a)}))));this.bookingDetailsLoadingStatus$=i.pipe(ke()),i.subscribe(a=>{if(a.loadState===U.Loaded){let{collectsArrivalComment:p,collectsBoatDetails:m,collectsMemberNames:v,collectsMemberAges:S,collectsMemberNotes:N,collectsMemberDates:ie,collectsMemberContact:_e,collectsPartyContact:te,allowsChanges:ze}=a.value;p!=null&&(this.collectsArrivalComment=p),m!=null&&(this.showBoatDetails=m),te!=null&&(this.showPartyContact=te!==ge.NotRequired),ze!=null&&(this.allowsChanges=ze),this.memberCollectionRequirements.name=v,this.memberCollectionRequirements.age=S,this.memberCollectionRequirements.note=N,this.memberCollectionRequirements.dates=ie,this.memberCollectionRequirements.contact=_e,this.collectsMemberDetails=(0,Pr.some)(this.memberCollectionRequirements,li=>li!==ge.NotRequired)}})}getIsBookingItinerary(i){return[...i.resourceBlockerUids,...i.resourceNonSpecificBlockerUids,...i.resourceZoneBlockerUids,...i.resourceZoneEntryBlockerUids].length>1}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-booking-details"]],features:[D([{provide:M,useValue:["booking-details.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:6,vars:8,consts:[["id","pageTitle",1,"h1"],["data-layout.gt-sm","row","data-layout","column","data-layoutGap","30px"],["data-flex.gt-md","auto"],["data-flex.gt-sm","325px","data-layoutGap.gt-sm","8px",1,"booking-buttons-wrapper"],[3,"booking","compactBooking","allowsChanges","completedBooking"],[3,"cartUid","bookingUid"],["data-layout","column","data-layoutGap","30px",4,"ldSpinner","ldSpinnerAriaLabelledby"],["data-layout","column","data-layoutGap","30px"],[3,"enabledViewButton","booking","showMoreOptions"],[3,"bookingBoats","arrivalComment"],[3,"bookingUid","canEdit"],[3,"memberDetails","memberCollectionRequirements"],[3,"contactName","contactPhoneNumber"],[3,"bookingSurcharges","bookingTransactions","bookingStatus","bookingUid"],[1,"card","inner-padding-30",3,"showSiteName","showFee","showAddToBooking","showSingleSiteCalendar","showBookingFields","showResourceMessages","resourceId","resourceLocationId","bookingCategoryId"],[3,"bookingUid","bookingCategoryId"],[3,"bookingUid","transactionSummary"]],template:function(a,p){if(a&1&&(c(0,"h1",0),d(1),t(2,"localize"),t(3,"async"),s(),f(4,Is,3,3,"div"),t(5,"async")),a&2){let m;r(),x(n(3,4,n(2,2,"PAGETITLE"))),r(3),C((m=n(5,6,p.booking$))?4:-1,m)}},dependencies:[be,hn,Fn,Sr,Mn,Er,Ir,yn,vn,Rn,Nn,Ya,F,R],styles:[".title[_ngcontent-%COMP%]{margin-top:0;margin-bottom:8px;font-size:20px}.title-divider[_ngcontent-%COMP%]{margin-bottom:14px;border-bottom-style:solid;border-bottom-width:3px}.booking-buttons-wrapper[_ngcontent-%COMP%]{width:100%;max-width:450px;margin:40px auto 0}@media(max-width:959px){.booking-buttons-wrapper[_ngcontent-%COMP%]{margin-top:0}}"]});let e=l;return e})();var wr=ni(ri());var Vn=()=>["fas","check"],Un=()=>["fas","circle"],Bo=()=>["far","lock-alt"],Ts=e=>[e];function ks(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(2);r(),g(" ",o.formErrors.currentPassword," ")}}function Ps(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(2);r(),g(" ",o.formErrors.newPassword," ")}}function ws(e,l){if(e&1&&(c(0,"mat-error"),d(1),t(2,"async"),s()),e&2){let o=u(2);r(),g(" ",n(2,1,o.passwordValidationHelper.getFailureStringForPropertyType(o.passwordValidationResult.failures[0]))," ")}}function As(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(2);r(),g(" ",o.formErrors.confirmPassword," ")}}function Ls(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(2);r(),g(" ",o.formErrors.newPasswordFormGroup," ")}}function Ds(e,l){e&1&&y(0,"div")}function Fs(e,l){if(e&1){let o=z();c(0,"button",24),k("click",function(){P(o);let a=u(2);
1return w(a.submitForm())}),Y(1,Ds,1,0,"div",25),c(2,"div",26)(3,"span"),d(4),t(5,"localize"),t(6,"async"),s()()()}if(e&2){let o=u(2);me("loading",o.submitLoading),r(),_("ldSpinner",o.submitLoading)("ldSpinnerDiameter",20)("ldSpinnerAriaLabelledby","updatePassword"),r(3),x(n(6,8,n(5,6,"BUTTON.UPDATE")))}}function Ms(e,l){if(e&1){let o=z();c(0,"div",3)(1,"div",6)(2,"h3",7),d(3),t(4,"localize"),t(5,"async"),s(),c(6,"ul",8)(7,"li",9),y(8,"fa-icon",10),c(9,"span"),d(10),t(11,"localize"),t(12,"async"),s()(),c(13,"li",9),y(14,"fa-icon",10),c(15,"span"),d(16),t(17,"localize"),t(18,"async"),s()(),c(19,"li",9),y(20,"fa-icon",10),c(21,"span"),d(22),t(23,"localize"),t(24,"async"),s()(),c(25,"li",9),y(26,"fa-icon",10),c(27,"span"),d(28),t(29,"localize"),t(30,"async"),s()()()(),c(31,"div",11)(32,"div",12)(33,"div",13)(34,"label",14),d(35),t(36,"localize"),t(37,"async"),s(),c(38,"mat-form-field",15),y(39,"fa-icon",16),c(40,"input",17),k("blur",function(){P(o);let a=u();return w(a.onFormValueChanged())}),s(),f(41,ks,2,1,"mat-error"),s()(),c(42,"div",18)(43,"div",13)(44,"label",19),d(45),t(46,"localize"),t(47,"async"),s(),c(48,"mat-form-field",15),y(49,"fa-icon",16),c(50,"input",20),k("blur",function(){P(o);let a=u();return w(a.onFormValueChanged())})("keyup",function(){P(o);let a=u();return w(a.validatePassword())}),s(),f(51,Ps,2,1,"mat-error"),f(52,ws,3,3,"mat-error"),s()(),c(53,"div",13)(54,"label",21),d(55),t(56,"localize"),t(57,"async"),s(),c(58,"mat-form-field",15),y(59,"fa-icon",16),c(60,"input",22),k("blur",function(){P(o);let a=u();return w(a.onFormValueChanged())}),s(),f(61,As,2,1,"mat-error"),f(62,Ls,2,1,"mat-error"),s()()()(),f(63,Fs,7,10,"button",23),s()()}if(e&2){let o=u();r(3),x(n(5,31,n(4,29,"PASSWORD.TITLE"))),r(5),me("valid",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minLength)),_("icon",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minLength)?E(61,Vn):E(62,Un)),r(2),x(n(12,35,n(11,33,"PASSWORD.REQ1"))),r(4),me("valid",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minUpperCase)),_("icon",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minUpperCase)?E(63,Vn):E(64,Un)),r(2),x(n(18,39,n(17,37,"PASSWORD.REQ2"))),r(4),me("valid",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minLowerCase)),_("icon",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minLowerCase)?E(65,Vn):E(66,Un)),r(2),x(n(24,43,n(23,41,"PASSWORD.REQ3"))),r(4),me("valid",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minNumbers)),_("icon",o.isPasswordPropertyPassing(o.PasswordValidationPropertyTypes.minNumbers)?E(67,Vn):E(68,Un)),r(2),x(n(30,47,n(29,45,"PASSWORD.REQ4"))),r(7),g(" ",n(37,51,n(36,49,"FORM.PLACEHOLDER.CURRENT_PASSWORD"))," "),r(4),_("icon",E(69,Bo)),r(2),C(o.formErrors.currentPassword?41:-1),r(4),g(" ",n(47,55,n(46,53,"FORM.PLACEHOLDER.NEW_PASSWORD"))," "),r(4),_("icon",E(70,Bo)),r(2),C(o.formErrors.newPassword?51:-1),r(),C((o.passwordValidationResult==null||o.passwordValidationResult.failures==null?null:o.passwordValidationResult.failures.length)>0?52:-1),r(3),g(" ",n(57,59,n(56,57,"FORM.PLACEHOLDER.CONFIRM_PASSWORD"))," "),r(4),_("icon",E(71,Bo)),r(2),C(o.formErrors.confirmPassword?61:-1),r(),C(o.formErrors.newPasswordFormGroup?62:-1),r(),C(o.updateSuccessful?-1:63)}}function Rs(e,l){if(e&1&&(y(0,"app-alert-box",4),t(1,"localize"),t(2,"async")),e&2){let o=u();_("title",de(n(2,6,n(1,4,"ERROR.TITLE"))))("messages",o.errorMessages)("addBottomMargin","20px")}}function Os(e,l){e&1&&(y(0,"app-alert-box",5),t(1,"localize"),t(2,"async"),t(3,"localize"),t(4,"async")),e&2&&_("title",de(n(2,6,n(1,4,"SUCCESS.TITLE"))))("messages",ce(12,Ts,n(4,10,n(3,8,"SUCCESS.MESSAGE"))))("alertType","success")}var Hn=(()=>{let l=class l{constructor(){this.fb=h(mi),this.titleHelper=h(Yt),this.currentUserService=h(ye),this.formValidationService=h(En),this.localizationService=h(B),this.passwordValidationHelper=h(St),this.serviceErrorHelper=h(Te),this.store=h(V),this.PasswordValidationPropertyTypes=Bn,this.errorMessages=[],this.updateSuccessful=!1,this.submitLoading=!1,this.formErrors={newPasswordFormGroup:"",newPassword:"",confirmPassword:"",currentPassword:""},this.componentActive=!0,this.isPasswordPropertyPassing=function(i){return this.passwordValidationResult==null?!1:(0,wr.find)(this.passwordValidationResult.failures,a=>a===i)==null},this.buildForm()}ngOnDestroy(){this.componentActive=!1}
1submitForm(){this.submitLoading=!0,this.updateSuccessful=!1,this.errorMessages=[],this.changePasswordFormModel.markAllAsTouched(),this.onFormValueChanged(),O({enableInternalLogin:this.store.select(rt).pipe(T(I)),errorMessage:this.localizationService.getTranslation("ERROR.CANNOT_UPDATE")}).subscribe(({enableInternalLogin:i,errorMessage:a})=>{if(!i){this.submitLoading=!1,this.errorMessages.push(a);return}if(this.passwordValidationResult?.failures?.length>0||this.formErrors.confirmPassword!==""||this.formErrors.currentPassword!==""||this.formErrors.newPassword!==""||this.formErrors.newPasswordFormGroup!==""){this.submitLoading=!1;return}if(q(this.changePasswordFormModel,"currentPassword").value===q(this.changePasswordFormModel,"newPasswordFormGroup.newPassword").value){this.submitLoading=!1,this.localizationService.getTranslation("ERROR.SAME_AS_CURRENT").subscribe(m=>{this.errorMessages.push(m)});return}let p;this.currentUserService.getFullShopper().pipe(A(),W(m=>m!=null?this.currentUserService.updatePassword(m.currentVersion.email,q(this.changePasswordFormModel,"currentPassword").value,q(this.changePasswordFormModel,"newPasswordFormGroup.newPassword").value):K(null)),j(m=>(m!=null&&(p=m,this.updateSuccessful=!0,this.submitLoading=!1,this.store.dispatch(lt({eventName:"passwordChanged"})),this.currentUserService.logout()),K(null))),j(()=>this.currentUserService.login(p.currentVersion.email,q(this.changePasswordFormModel,"newPasswordFormGroup.newPassword").value)),W(()=>this.currentUserService.getFullShopper())).subscribe(()=>this.submitLoading=!1,m=>{this.submitLoading=!1;let v=this.serviceErrorHelper.parseErrorMessageResult(m);v.messageKey&&this.localizationService.getTranslation(v.messageKey).subscribe(S=>{this.errorMessages.push(S)})})})}validatePassword(){this.passwordValidationResult=this.passwordValidationHelper.validatePassword(q(this.changePasswordFormModel,"newPasswordFormGroup.newPassword").value)}onFormValueChanged(){if(!this.changePasswordFormModel)return;let i=this.changePasswordFormModel;this.formValidationService.processFormErrors(this.localizationService,i,this.formErrors)}buildForm(){this.changePasswordFormModel=this.fb.group({currentPassword:[null,[We()]],newPasswordFormGroup:this.fb.group({newPassword:[null,[We(),_i()]],confirmPassword:[null,[We()]]},{validator:bt(!0)})}),this.changePasswordFormModel.valueChanges.pipe(wo(800)).subscribe(()=>this.onFormValueChanged()),this.onFormValueChanged()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-change-password"]],features:[D([{provide:M,useValue:["change-password.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:9,vars:9,consts:[[1,"container-xs"],["id","pageTitle",1,"h1"],[3,"formGroup"],["data-layout","column-reverse","data-layout.gt-xs","row-reverse","data-layoutGap","30px"],[3,"title","messages","addBottomMargin"],[3,"title","messages","alertType"],["id","password-rules","data-flex","50"],[1,"password-requirements-title"],["data-layout","column","data-layoutGap","10px",1,"password-requirements-list"],["data-layout","row","data-layoutAlign","start center","data-layoutGap","4px"],["size","md","data-flex","24px","aria-hidden","true",3,"icon"],["data-flex","50",1,"form-wrapper"],["id","password-form-group",1,"field-wrapper","mb-4"],[1,"form-control-wrapper"],["id","currentPassword-label","for","currentPassword","aria-owns","currentPassword"],["appearance","outline","appShowPasswordToggle",""],["matPrefix","","aria-hidden","true",3,"icon"],["id","currentPassword","aria-labelledby","currentPassword-label","type","password","matInput","","required","","formControlName","currentPassword",3,"blur"],["formGroupName","newPasswordFormGroup"],["id","new-password-label","for","newPassword","aria-owns","newPassword"],["id","newPassword","aria-labelledby","new-password-label","type","password","matInput","","required","","formControlName","newPassword","aria-labelledby","password-rules",3,"blur","keyup"],["id","confirmPassword-label","for","confirmPassword","aria-owns","confirmPassword"],["id","confirmPassword","aria-labelledby","confirmPassword-label","type","password","matInput","","required","","formControlName","confirmPassword",3,"blur"],["mat-flat-button","","color","primary","type","submit","id","updatePassword","aria-label","Submit",1,"button","full-width_xs",3,"loading"],["mat-flat-button","","color","primary","type","submit","id","updatePassword","aria-label","Submit",1,"button","full-width_xs",3,"click"],[4,"ldSpinner","ldSpinnerDiameter","ldSpinnerAriaLabelledby"],[1,"button-contents"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"form",2),f(6,Ms,64,72,"div",3),f(7,Rs,3,8,"app-alert-box",4),f(8,Os,5,14,"app-alert-box",5),s()()),a&2&&(r(2),x(n(4,7,n(3,5,"PAGETITLE"))),r(3),_("formGroup",p.changePasswordFormModel),r(),C(p.updateSuccessful?-1:6),r(),C(p.errorMessages.length>0?7:-1),r(),C(p.updateSuccessful?8:-1))},dependencies:[Ee,Ue,De,Fe,Ve,Ii,Be,He,$e,qt,pe,Pe,In,Ci,Me,Ge,le,be,qe,F,R],styles:[".password-requirements-title[_ngcontent-%COMP%]{font-size:18px}.password-requirements-list[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;list-style:none}.password-requirements-list[_ngcontent-%COMP%] .ng-fa-icon[_ngcontent-%COMP%]{font-size:6px;text-align:center}.password-requirements-list[_ngcontent-%COMP%] .ng-fa-icon.valid[_ngcontent-%COMP%]{font-size:16px}#updatePassword[_ngcontent-%COMP%]{height:auto}"]});let e=l;return e})();var Ar=()=>["far","envelope"],Lr=()=>["fas","info-circle"],Et=()=>["fas","exclamation-circle"],Dr=e=>[e];function Ns(e,l){e&1&&(c(0,"div",2),y(1,"fa-icon",19),c(2,"p",20)(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2&&(r(),_("icon",E(6,Lr)),r(3),x(n(6,4,n(5,2,"INFO.EXTERNAL"))))}function zs(e,l){e&1&&(c(0,"div",2),y(1,"fa-icon",19),c(2,"p",20)(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2&&(r(),_("icon",E(6,Lr)),r(3),x(n(6,4,n(5,2,"INFO.INTERNAL"))))}function Vs(e,l){if(e&1&&(c(0,"div",7)(1,"label",21),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",22)(6,"strong"),d(7),s()()()),e&2){let o=l;r(2),g(" ",n(4,4,n(3,2,"LABELS.CURRENT_EMAIL"))," "),r(5),x(o==null||o.currentVersion==null?null:o.currentVersion.email)}}function Us(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",23),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.EMAIL.EMAIL"))," "))}function Hs(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",23),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.EMAIL.REQUIRED"))," "))}function $s(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",23),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.EMAIL.MATCHES_ORIGINAL"))," "))}function Gs(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",23),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.CONFIRM_EMAIL.EMAIL"))," "))}function qs(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",23),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.CONFIRM_EMAIL.REQUIRED"))," "))}function Ws(e,l){e&1&&(c(0,"mat-error"),y(1,"fa-icon",24),d(2),t(3,"localize"),t(4,"async"),s()),e&2&&(r(),_("icon",E(6,Et)),r(),g(" ",n(4,4,n(3,2,"ERRORS.CONFIRM_EMAIL.MUST_BE_EQUAL"))," "))}function Ks(e,l){if(e&1&&(y(0,"app-alert-box",25),t(1,"localize"),t(2,"async")),e&2){let o=u();
1_("alertType","error")("addBottomMargin","20px")("title",n(2,6,n(1,4,"ERRORS.UPDATE_FAILED.TITLE")))("messages",ce(8,Dr,o))}}function js(e,l){e&1&&f(0,Ks,3,10,"app-alert-box",25),e&2&&C(l.length>0?0:-1)}function Ys(e,l){e&1&&(c(0,"div"),y(1,"app-alert-box",26),t(2,"localize"),t(3,"async"),t(4,"localize"),t(5,"async"),s()),e&2&&(r(),_("title",de(n(3,8,n(2,6,"SUCCESS.TITLE"))))("messages",ce(14,Dr,n(5,12,n(4,10,"SUCCESS.MESSAGE"))))("alertType","info")("addBottomMargin","20px")("addTopMargin","20px"))}function Qs(e,l){e&1&&y(0,"div")}var $n=(()=>{let l=class l{constructor(){this.currentUserService=h(ye),this.localizationService=h(B),this.store=h(V),this.errorMessage$=new lo,this.submitting$=new lo,this.changeEmailForm=new ot({email:new di("",[We(),Pt()]),confirmEmail:new di("",[We(),Pt()])},bt(!1)),this.LOADSTATE=U,this.subscriptions=new Rt}ngOnInit(){this.shopper$=this.currentUserService.getFullShopper(),this.subscriptions.add(this.shopper$.pipe(b(i=>i?.currentVersion?.email),ne(i=>i!=null)).subscribe(i=>{this.changeEmailForm.controls.email.addValidators([this.confirmNewEmail(i??"")])})),this.isExternal$=O({accountType:this.currentUserService.getUserInfo().pipe(b(i=>i?.accountType),ne(I)),enableExternalLogins:this.store.select(Kt).pipe(T(I))}).pipe(b(({accountType:i,enableExternalLogins:a})=>i!==je.Internal&&a))}ngOnDestroy(){this.subscriptions.unsubscribe()}submitForm(){this.changeEmailForm.valid?this.changeEmail():this.changeEmailForm.markAllAsTouched()}resetForm(){this.changeEmailForm.reset()}changeEmail(){this.submitting$.next(U.Idle);let i=X(()=>this.sendChangeEmailConfirmation().pipe(A(),si(()=>this.store.dispatch(lt({eventName:"sendEmailChangeConfirmation"})))));Ot({submitLoadEvent:i,isExternal:this.isExternal$}).subscribe(({submitLoadEvent:a,isExternal:p})=>{if(this.submitting$.next(a.loadState),a.loadState===U.Failed){let m=`ERRORS.UPDATE_FAILED.INTERNAL.${a.error.messageKey}`;p&&(m=`ERRORS.UPDATE_FAILED.EXTERNAL.${a.error.messageKey}`),this.localizationService.getTranslation(m).subscribe(v=>{this.errorMessage$.next(v)})}})}sendChangeEmailConfirmation(){let i=q(this.changeEmailForm,"email").value;return this.currentUserService.sendConfirmEmailChangeEmail(i)}confirmNewEmail(i){return a=>a.value!=null&&a.value===i?{matchesOriginalEmail:!0}:null}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-change-email"]],features:[D([{provide:M,useValue:["change-email.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:49,vars:52,consts:[[1,"container-xs"],["id","pageTitle",1,"h1"],[1,"information-box","mb-4"],["aria-describedby","info-title",1,"form-wrapper",3,"formGroup"],[1,"card--gt-xs"],[1,"inner"],[1,"field-wrapper"],[1,"read-only-field","form-control-wrapper"],[1,"form-control-wrapper"],["id","newEmail-label","for","newEmail","aria-owns","newEmail"],["appearance","outline",1,"full-width"],["matPrefix","","aria-hidden","true",3,"icon"],["id","newEmail","aria-labelledby","newEmail-label","type","email","matInput","","required","","formControlName","email"],["id","confirmEmail-label","for","confirmEmail","aria-owns","confirmEmail"],["id","confirmEmail","aria-labelledby","confirmEmail-label","type","email","matInput","","required","","formControlName","confirmEmail"],["data-layoutAlign","end",1,"mt-5","mr-2"],["id","updateEmailAddress","type","submit","mat-flat-button","","color","primary","debounceEvent","click",1,"button",3,"afterDebounce"],[4,"ldSpinner","ldSpinnerDiameter","ldSpinnerAriaLabelledby"],[1,"button-contents"],["aria-hidden","true","alt","",1,"color-accent-500",3,"icon"],["id","info-title"],["for","name-readonly"],["id","name-readonly",1,"value-wrapper"],["aria-hidden","true",3,"icon"],["aria-hidden","true",1,"mt-1",3,"icon"],[3,"alertType","addBottomMargin","title","messages"],[3,"title","messages","alertType","addBottomMargin","addTopMargin"]],template:function(a,p){if(a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),f(5,Ns,7,7,"div",2),t(6,"async"),Xi(7,zs,7,7,"div",2),c(8,"form",3)(9,"div",4)(10,"div",5)(11,"div",6),f(12,Vs,8,6,"div",7),t(13,"async"),c(14,"div",8)(15,"label",9),d(16),t(17,"localize"),t(18,"async"),s(),c(19,"mat-form-field",10),y(20,"fa-icon",11)(21,"input",12),f(22,Us,5,7,"mat-error"),f(23,Hs,5,7,"mat-error"),f(24,$s,5,7,"mat-error"),s()(),c(25,"div",8)(26,"label",13),d(27),t(28,"localize"),t(29,"async"),s(),c(30,"mat-form-field",10),y(31,"fa-icon",11)(32,"input",14),f(33,Gs,5,7,"mat-error"),f(34,qs,5,7,"mat-error"),s(),f(35,Ws,5,7,"mat-error"),s()(),f(36,js,1,1),t(37,"async"),f(38,Ys,6,16,"div"),t(39,"async"),c(40,"div",15)(41,"button",16),t(42,"async"),k("afterDebounce",function(){return p.submitForm(
1)}),Y(43,Qs,1,0,"div",17),t(44,"async"),c(45,"div",18),d(46),t(47,"localize"),t(48,"async"),s()()()()()()()),a&2){let m,v;r(2),x(n(4,24,n(3,22,"PAGETITLE"))),r(3),C(n(6,26,p.isExternal$)?5:7),r(3),_("formGroup",p.changeEmailForm),r(4),C((m=n(13,28,p.shopper$))?12:-1,m),r(4),g(" ",n(18,32,n(17,30,"LABELS.NEW_EMAIL"))," "),r(4),_("icon",E(50,Ar)),r(2),C(p.changeEmailForm.hasError("emailFormat","email")?22:-1),r(),C(p.changeEmailForm.hasError("required","email")?23:-1),r(),C(p.changeEmailForm.hasError("matchesOriginalEmail","email")?24:-1),r(3),g(" ",n(29,36,n(28,34,"LABELS.CONFIRM_EMAIL"))," "),r(4),_("icon",E(51,Ar)),r(2),C(p.changeEmailForm.hasError("emailFormat","confirmEmail")?33:-1),r(),C(p.changeEmailForm.hasError("required","confirmEmail")?34:-1),r(),C(p.changeEmailForm.hasError("equal")?35:-1),r(),C((v=n(37,38,p.errorMessage$))?36:-1,v),r(2),C(n(39,40,p.submitting$)===p.LOADSTATE.Loaded?38:-1),r(3),me("loading",n(42,42,p.submitting$)===p.LOADSTATE.Loading),r(2),_("ldSpinner",n(44,44,p.submitting$)===p.LOADSTATE.Loading)("ldSpinnerDiameter",20)("ldSpinnerAriaLabelledby","updateEmailAddress"),r(3),g(" ",n(48,48,n(47,46,"BUTTON.UPDATE"))," ")}},dependencies:[pe,Ee,Ue,De,Fe,Ve,Ii,Be,He,$e,Ha,Pe,Ge,Ci,Me,qe,le,ln,be,F,R],styles:["fieldset[_ngcontent-%COMP%] legend[_ngcontent-%COMP%]{margin-bottom:10px}"],changeDetection:0});let e=l;return e})();var Se=ni(ri());var Xs="boatInfoFormGroup.boatLength",Js="boatInfoFormGroup.boatWidth",Zs="boatInfoFormGroup.boatDraft",ec="boatInfoFormGroup.boatType",Fr=(()=>{let l=class l{get passNumber(){return this._passNumber}set passNumber(i){this._passNumber=i,q(this.updateProfileFormModel,"passNumber").setValue(i)}get passExpiryDate(){return this._passExpiryDate}set passExpiryDate(i){this._passExpiryDate=i,q(this.updateProfileFormModel,"passExpiryDate").setValue(i)}constructor(){this.injector=h(Lo),this.datePickerHeaderComponent=Ga,this.updateSuccessful=!1,this.countries=[],this.equipmentOptions=[],this.rateCategories=[],this.showBoatCollectionFormGroup=!1,this.showPassNumber=!1,this.showPassExpiry=!1,this.collectBoatType=!1,this.collectBoatDraft=!1,this.collectBoatWidth=!1,this.collectBoatLength=!1,this.collectBoatRegistration=!1,this.collectBoatName=!1,this.filteredRateCategories=[],this.componentActive=!0,this.errorMessages=[],this.formErrors={licensePlate:"",jurisdiction:"",boatLength:"",boatDraft:"",boatWidth:"",boatName:"",boatRegistration:""},this.PASS_NUMBER_CONFLICT_ERROR_KEY="FailedToSaveDefaultPassNumber";let i=this.injector;this.trackByIndexFn=i.get(Ze),this.currentUserService=i.get(ye),this.fb=i.get(mi),this.formValidationService=i.get(En),this.localizationService=i.get(B),this.passNumberValidator=i.get(kn),this.serviceErrorHelper=i.get(Te),this.store=i.get(V),this.personalInformationFormHelper=i.get(Pn),this.dialogHelper=i.get(Re),this.breakpointObserver=i.get(Ho),this.store.select(ki).pipe(oi(()=>this.componentActive)).subscribe(a=>{a!=null&&this.onFormValueChanged()}),this.buildForm()}ngOnInit(){this.store.dispatch(new pt),this.store.dispatch(va()),this.store.dispatch(an()),this.shopper$=this.currentUserService.getFullShopper().pipe(A(I)),this.shopper$.subscribe(a=>{this.prePopulateFromShopper(a)}),this.isLtSm$=this.breakpointObserver.observe([co.XSmall,co.Small]).pipe(b(a=>a.matches));let i=X(()=>Tt({shopper:this.shopper$,rateCategories:this.getRateCategoriesObs(),bookingCategoriesValue:this.getBookingCategoriesValueObs()}));this.initLoadingStatus$=i.pipe(ke()),i.subscribe(a=>{if(a.loadState===U.Loaded){let{shopper:p,rateCategories:m,bookingCategoriesValue:v}=a.value;this.initializeRateCategories(m,p),this.updatePassFlags(p.currentVersion.defaultRateCategoryId),v!=null&&this.handleBookingCategoryValues(v.value)}}),this.organizationNameLocalizations$=this.store.select(Ne).pipe(A(ee),b(re),b(a=>a.organizationNameLocalizations)),this.personalInformationValues$=this.shopper$.pipe(j(a=>this.personalInformationFormHelper.getPersonalInformationValues(a))),this.personalInformationRequirements={nameRequirement:Mi.Required,emailRequirement:Mi.NotCollected,preferredCultureNameRequirement:Mi.Required,primaryPhoneNumbersRequirement:Mi.Required,secondaryPhoneNumbersRequirement:Mi.Optional,allowMarketingRequirement:Mi.Optional,allowEmergencySmsRequirement:Mi.Optional}}ngOnDestroy(){this.componentActive=!1}getBookingCategoriesValueObs(){return this.store.select(yi).pipe(A(i=>i!=null))}getRateCategoriesObs(){return O({countries:this.store.select(ar).pipe(T(ee),b(re)),boatTypes:this.store.select(fn).pipe(T(ee),b(re))}).pipe(W(({countries:i,boatTypes:a})=>(i!=null&&(this.countries=i),this.countries=(0,Se.sortBy)(this.countries,p=>
1Ae(this.localizationService.getLocalizationForCurrentCultureFromList(p.localizedValues)).name.toLowerCase()),a!=null&&(this.boatTypes=a),this.store.dispatch(new en),this.store.select(ca).pipe(A(p=>p?.value!=null&&p.error===""),b(p=>p!=null?p.value:null)))),W(i=>{if(i!=null&&Array.isArray(i)){for(let a of i)if(a.subEquipmentCategories){for(let p of a.subEquipmentCategories){let m=Yi(ji({},p),{equipmentId:a.equipmentCategoryId});this.equipmentOptions.push(m)}this.equipmentOptions.length===1?this.updateProfileFormModel.get("defaultSubEquipmentCategoryId")?.setValue(this.equipmentOptions[0].subEquipmentCategoryId):this.equipmentOptions.sort((p,m)=>p.order-m.order)}}return this.store.dispatch(new nn),this.store.select(mn).pipe(A(a=>a?.value!=null&&a.error===""),b(a=>a!=null?a.value:null))}))}validateAndSubmit(i){this.resetSelectedDefaultRateCategory(i),this.updateProfileFormModel.invalid?(this.updateProfileFormModel.markAllAsTouched(),this.onFormValueChanged()):this.submit(i)}submit(i){if(this.updateSuccessful=!1,this.errorMessages=[],!this.submitStatus$){let a=this.getShopperVersionFromForm(i),p=this.getRateCategoryById(a.defaultRateCategoryId),m=S=>{let N=this.serviceErrorHelper.parseErrorMessageResult(S);N.messageKey&&this.localizationService.getTranslation(N.messageKey).subscribe(ie=>{this.errorMessages.push(ie)}),this.submitStatus$=null},v;p?.requiresPass||p?.passValidationSettings?.requiresPassExpiryDate?v=X(()=>this.validatePassNumber(a,p)):v=X(()=>this.updateProfile(a)),this.submitStatus$=v.pipe(ke()),v.subscribe({next:S=>{if(S.loadState<=U.Loaded&&(this.submitStatus$=null),S.loadState===U.Failed){if(S.error&&S.error.messageKey===this.PASS_NUMBER_CONFLICT_ERROR_KEY){this.displayPassNumberError();return}this.dialogHelper.openGenericErrorDialog()}},error:m})}}displayPassNumberError(){this.localizationService.getTranslation(this.PASS_NUMBER_CONFLICT_ERROR_KEY).subscribe(i=>{this.errorMessages.push(i)})}onRateCategoryChanged(i,a){i!=null&&Number(a)===i.currentVersion.defaultRateCategoryId?(this.passNumber=i.currentVersion.defaultPassNumber,this.passExpiryDate=i.currentVersion.defaultPassExpiryDate):(this.passNumber="",this.passExpiryDate=null),a&&this.updatePassFlags(Number(a))}getLocalizationForCurrentCultureFromList(i){return this.localizationService.getLocalizationForCurrentCultureFromList(i)}updateRateCategories(){let i=()=>{let p=this.updateProfileFormModel.controls.personalInformation?.controls.address,m=(0,Se.find)(this.countries,S=>S.countryId===p.controls.country.value?.countryId),v=null;if(m?.regions&&m.regions.length>0){let S=m.regions;v=(0,Se.find)(S,N=>N.regionId===p.controls.region?.value?.regionId)??null}this.filteredRateCategories=this.getFilteredRateCategories(m,v),this.filteredRateCategories=(0,Se.sortBy)(this.filteredRateCategories,S=>S.order),this.filteredRateCategories.length===1&&this.updateProfileFormModel.get("defaultRateCategoryId")?.setValue(this.filteredRateCategories[0].rateCategoryId)};this.initLoadingStatus$||i(),this.initLoadingStatus$.subscribe(a=>{a>U.Nonblocking&&i()})}prePopulateFromShopper(i){i.currentVersion.defaultSubEquipmentCategoryId!=null&&this.updateProfileFormModel.controls.defaultSubEquipmentCategoryId.setValue(i.currentVersion.defaultSubEquipmentCategoryId),i.currentVersion.defaultRateCategoryId!=null&&this.updateProfileFormModel.controls.defaultRateCategoryId.setValue(i.currentVersion.defaultRateCategoryId),this.passNumber=i.currentVersion.defaultPassNumber,this.passExpiryDate=i.currentVersion.defaultPassExpiryDate??null;let a=i.currentVersion.vehicles.length>0?i.currentVersion.vehicles[0]:null;if(a){let m=this.updateProfileFormModel.get("vehicleInfoFormGroup");m.controls.licensePlate.setValue(a.licensePlate),m.controls.jurisdiction.setValue(a.jurisdictionRegion)}if(i.currentVersion.boats.length>0?i.currentVersion.boats[0]:null){let m=(0,Se.minBy)(i.currentVersion.boats,"order");if(m){let v=this.updateProfileFormModel.get("boatInfoFormGroup");v.controls.boatType.setValue(m.boatType.toString()),v.controls.boatLength.setValue(m.length.toString()),v.controls.boatDraft.setValue(m.draft.toString()),v.controls.boatWidth.setValue(m.width.toString()),v.controls.boatName.setValue(m.boatName),v.controls.boatRegistration.setValue(m.registrationNumber)}}q(this.updateProfileFormModel,"defaultRateCategoryId").valueChanges.pipe(Po(this.shopper$)).subscribe(([m,v])=>{this.onRateCategoryChanged(v,m)})}onFormValueChanged(i){if(!this.updateProfileFormModel)return;let a=this.updateProfileFormModel;i?.hasOwnProperty("passNumber")&&(this._passNumber=i.passNumber),i?.hasOwnProperty("passExpiryDate")&&(this._passExpiryDate=i.passExpiryDate),this.formValidationService.process
1FormErrors(this.localizationService,a,this.formErrors)}addPersonalInfoForm(i){this.updateProfileFormModel.addControl("personalInformation",i)}validatePassNumber(i,a){return this.passNumberValidator.validate(i.defaultPassNumber,i.defaultPassExpiryDate??null,a.passValidationSettings).pipe(j(p=>p.isValid?this.updateProfile(i):p.validationFailures.some(m=>m.resultCode===or.ExpiredPass)?this.localizationService.getTranslation("ERROR.EXPIREDPASS").pipe(b(m=>(this.errorMessages.push(m),null))):this.localizationService.getTranslation("ERROR.INVALIDPASS").pipe(b(m=>(this.errorMessages.push(m),null)))))}initializeRateCategories(i,a){if(i!=null&&Array.isArray(i)){this.rateCategories=i;let p=a.currentVersion.addresses[0];this.setAvailableRateCategoriesForShopper(p),this.filteredRateCategories.length===1&&this.updateProfileFormModel.get("defaultRateCategoryId")?.setValue(this.filteredRateCategories[0].rateCategoryId)}}setAvailableRateCategoriesForShopper(i){let a=[],p=null,m=null;if(i==null){this.filteredRateCategories=this.getFilteredRateCategories(null,null),this.filteredRateCategories=(0,Se.sortBy)(this.filteredRateCategories,v=>v.order);return}if(i.country!=null){let v=i.country.toUpperCase();p=(0,Se.find)(this.countries,S=>S.alphaTwoCode.toUpperCase()===v.toUpperCase()||S.alphaThreeCode.toUpperCase()===v.toUpperCase()||this.localizationService.getLocalizationForCurrentCultureFromList(S.localizedValues)?.name.toUpperCase()===v.toUpperCase())??null}p?.regions&&p.regions.length>0&&(a=p.regions),i.region!=null&&(m=(0,Se.find)(a,v=>v.alphaTwoCode===i.region)??null),this.filteredRateCategories=this.getFilteredRateCategories(p,m),this.filteredRateCategories=(0,Se.sortBy)(this.filteredRateCategories,v=>v.order)}getFilteredRateCategories(i,a){return(0,Se.filter)(this.rateCategories,p=>p.visibility!==Na.Restricted&&(p.allowedCountryIds.length===0&&p.allowedRegionIds.length===0||(0,Se.includes)(p.allowedCountryIds,i?.countryId)||(0,Se.includes)(p.allowedRegionIds,a?.regionId)))}handleBookingCategoryValues(i){if(i!=null)for(let a of i){let p=(0,Se.find)(a.registrationActionRequirements,m=>m.registrationAction===Oa.Reserve);if(p?.boatCollectionRequirements!=null&&p.boatCollectionRequirements.collectBoats){this.showBoatCollectionFormGroup=!0,this.collectBoatName=p.boatCollectionRequirements.nameCollectionRequirement!==ge.NotRequired,this.collectBoatRegistration=p.boatCollectionRequirements.registrationCollectionRequirement!==ge.NotRequired,this.collectBoatLength=p.boatCollectionRequirements.lengthCollectionRequirement!==ge.NotRequired,this.collectBoatWidth=p.boatCollectionRequirements.widthCollectionRequirement!==ge.NotRequired,this.collectBoatDraft=p.boatCollectionRequirements.draftCollectionRequirement!==ge.NotRequired,this.collectBoatType=p.boatCollectionRequirements.typeCollectionRequirement!==ge.NotRequired;break}}}updateProfile(i){return this.currentUserService.updateShopper(i).pipe(W(()=>this.currentUserService.getUserInfo()),ne(I),b(a=>{a.firstName=i.firstName,a.lastName=i.lastName,this.currentUserService.setUserInfo(a),this.updateSuccessful=!0}))}getRateCategoryById(i){return(0,Se.find)(this.rateCategories,a=>a.rateCategoryId===i)}resetSelectedDefaultRateCategory(i){let a=q(this.updateProfileFormModel,"defaultRateCategoryId").value;if(a==null)return;let p=this.updateProfileFormModel.controls.personalInformation,m=p!=null?this.personalInformationFormHelper.updateShopperVersionPersonalInformation(p,i.currentVersion).addresses[0]:i.currentVersion.addresses[0];this.setAvailableRateCategoriesForShopper(m),this.filteredRateCategories.some(S=>S.rateCategoryId===a)||(this.updateProfileFormModel.get("defaultRateCategoryId")?.setValue(null),this.passNumber="",this.passExpiryDate=null,this.showPassNumber=!1,this.showPassExpiry=!1)}updatePassFlags(i){let a=this.getRateCategoryById(i);this.showPassNumber=a?a.requiresPass:!1,this.showPassExpiry=a?.passValidationSettings?a.passValidationSettings.requiresPassExpiryDate:!1}getShopperVersionFromForm(i){let a=this.updateProfileFormModel.controls.personalInformation,p=this.personalInformationFormHelper.updateShopperVersionPersonalInformation(a,i.currentVersion),m=p.vehicles.length>0?p.vehicles[0]:null,v=q(this.updateProfileFormModel,"vehicleInfoFormGroup.licensePlate").value,S=q(this.updateProfileFormModel,"vehicleInfoFormGroup.jurisdiction").value;m?(m.licensePlate=v,m.jurisdictionRegion=S):v&&S&&v.length>0&&S.length>0?(m={licensePlate:v,jurisdictionRegion:S,colour:"",description:"",length:0,make:"",region:"",year:""},p.vehicles.push(m)):(!v||v.length===0)&&(!S||S.length===0)&&(p.vehicles=p.vehicles.slice(1));let N=(0,Se.minBy)(p.boats,"order"),ie=q(this.updateProfileFormModel,ec).value,_e=q(this.updateProfileFormModel,Xs).value,te=q(this.updateProfileFormModel,Zs).value,ze=q(this.updateProfileFormModel,Js).value,li=q(this.updateProfileFormModel,"boatInfoFormGroup.boatName").value,Ki=q(this.updateProfileFormModel,"boatInfoFormGroup.boatRegistration").value;if(N)N.boatType=ie,N.length=_e,N.draft=te,N.width=ze,N.boatName=li||"",N.registrationNumber=Ki||"";else if(ie||_e||te||ze||li&&li.length>0||Ki&&Ki.length>0)N={boatName:li||"",boatType:ie,description:"",draft:te,length:_e,order:0,registrationNumber:Ki||"",width:ze},p.boats.push(N);else if(!ie&&!_e&&!te&&!ze&&(!li||li.length===0)&&(!Ki||Ki.length===0)){p.boats=p.boats.filter(Mt=>Mt.order!==1);for(let Mt of p.boats)Mt.order=Mt.order-1}return p.defaultSubEquipmentCategoryId=q(this.updateProfileFormModel,"defaultSubEquipmentCategoryId").value,p.defaultRateCategoryId=q(this.updateProfileFormModel,"defaultRateCategoryId").value,p.defaultPassNumber=q(this.updateProfileFormModel,"passNumber").value,p.defaultPassExpiryDate=q(this.updateProfileFormModel,"passExpiryDate").value,p}buildForm(){this.updateProfileFormModel=this.fb.group({vehicleInfoFormGroup:this.fb.group({licensePlate:[null,[xo(2),Tn(10),_i(),wt()]],jurisdiction:[null,[xo(2),Tn(50),_i(),wt()]]}),boatInfoFormGroup:this.fb.group({boatType:[null],boatLength:[null,[Gt.min(1)]],boatDraft:[null,[Gt.min(1)]],boatWidth:[null,[Gt.min(1)]],boatName:[null,[_i(),wt()]],boatRegistration:[null,[Tn(10),_i(),wt()]]}),defaultSubEquipmentCategoryId:[null],defaultRateCategoryId:[null],passNumber:[null],passExpiryDate:[null]}),this.updateProfileFormModel.valueChanges.pipe(si(()=>this.updateSuccessful=!1)).subscribe(i=>this.onFormValueChanged(i)),this.updateSuccessful=!1,this.onFormValueChanged()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["ng-component"]],decls:0,vars:0,template:function(a,p){},encapsulation:2});let e=l;return e})();var ic=()=>["far","car"],tc=()=>["far","ship"],nc=()=>["far","campground"],oc=()=>["fas","list-ul"],ac=()=>["far","calendar-alt"],rc=e=>[e];function lc(e,l){if(e&1){let o=z();c(0,"app-personal-information-form",24),k("formReady",function(a){P(o);let p=u(4);return w(p.addPersonalInfoForm(a))}),s()}if(e&2){let o=u(),i=u(3);_("personalInformationValues",o)("requirements",i.personalInformationRequirements)}}function pc(e,l){if(e&1&&(c(0,"div",6)(1,"h2"),d(2),t(3,"localize"),t(4,"async"),s(),f(5,lc,1,2,"app-personal-information-form",23),s()),e&2){let o=u(3);r(2),x(n(4,4,n(3,2,"PROFILE.SECTION"))),r(3),C(o.personalInformationRequirements!=null?5:-1)}}function sc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(3);r(),g(" ",o.formErrors.licensePlate," ")}}function cc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(3);r(),g(" ",o.formErrors.jurisdiction," ")}}function dc(e,l){if(e&1&&(c(0,"mat-option",29),d(1),t(2,"localize"),t(3,"async"),s()),e&2){let o=l.$implicit;_("value",de(o.boatTypeId)),r(),g(" ",n(3,5,n(2,3,"BOAT_TYPES."+o.name)))}}function mc(e,l){if(e&1&&(c(0,"div",11)(1,"label",26),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"mat-select",27),y(7,"mat-option",28),H(8,dc,4,7,"mat-option",29,$i().trackByIndexFn,!0),s()()()),e&2){let o=u(4);r(2),g(" ",n(4,3,n(3,1,"PLACEHOLDERS.BOAT_TYPE"))," "),r(6),$(o.boatTypes)}}function uc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(5);r(),g(" ",o.formErrors.boatLength," ")}}function fc(e,l){if(e&1){let o=z();c(0,"div",11)(1,"label",30),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"input",31),k("blur",function(){P(o);let a=u(4);return w(a.onFormValueChanged())}),s(),f(7,uc,2,1,"mat-error"),s()()}if(e&2){let o=u(4);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.LENGTH"))," "),r(5),C(o.formErrors.boatLength?7:-1)}}function Cc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(5);r(),g(" ",o.formErrors.boatWidth," ")}}function gc(e,l){if(e&1){let o=z();c(0,"div",11)(1,"label",32),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"input",33),k("blur",function(){P(o);let a=u(4);return w(a.onFormValueChanged())}),s(),f(7,Cc,2,1,"mat-error"),s()()}if(e&2){let o=u(4);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.BEAM"))," "),r(5),C(o.formErrors.boatWidth?7:-1)}}function _c(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(5);r(),g(" ",o.formErrors.boatDraft," ")}}function hc(e,l){if(e&1){let o=z();c(0,"div",11)(1,"label",34),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"input",35),k("blur",function(){P(o);let a=u(4);return w(a.onFormValueChanged())}),s(),f(7,_c,2,1,"mat-error"),s()()}if(e&2){let o=u(4);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.DRAFT"))," "),r(5),C(o.formErrors.boatDraft?7:-1)}}function xc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(5);r(),g(" ",o.formErrors.boatName)}}function yc(e,l){if(e&1){let o=z();c(0,"div",11)(1,"label",36),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"input",37),k("blur",function(){P(o);let a=u(4);return w(a.onFormValueChanged())}),s(),f(7,xc,2,1,"mat-error"),s()()}if(e&2){let o=u(4);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.BOATNAME"))," "),r(5),C(o.formErrors.boatName?7:-1)}}function vc(e,l){if(e&1&&(c(0,"mat-error"),d(1),s()),e&2){let o=u(5);r(),g(" ",o.formErrors.boatRegistration," ")}}function bc(e,l){if(e&1){let o=z();c(0,"div",11)(1,"label",38),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13)(6,"input",39),k("blur",function(){P(o);let a=u(4);return w(a.onFormValueChanged())}),s(),f(7,vc,2,1,"mat-error"),s()()}if(e&2){let o=u(4);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.REGISTRATIONNUM"))," "),r(5),C(o.formErrors.boatRegistration?7:-1)}}function Sc(e,l){if(e&1&&(c(0,"div")(1,"div",6)(2,"div",7),y(3,"fa-icon",8),c(4,"h2",9),d(5),t(6,"localize"),t(7,"async"),s()(),c(8,"div",25),f(9,mc,10,5,"div",11),f(10,fc,8,6,"div",11),f(11,gc,8,6,"div",11),f(12,hc,8,6,"div",11),f(13,yc,8,6,"div",11),f(14,bc,8,6,"div",11),s()()()),e&2){let o=u(3);r(3),_("icon",E(12,tc)),r(2),g(" ",n(7,10,n(6,8,"ADDITIONAL_INFO.BOAT.SECTION"))," "),r(4),C(o.collectBoatType?9:-1),r(),C(o.collectBoatLength?10:-1),r(),C(o.collectBoatWidth?11:-1),r(),C(o.collectBoatDraft?12:-1),r(),C(o.collectBoatName?13:-1),r(),C(o.collectBoatRegistration?14:-1)}}function Ec(e,l){if(e&1&&(c(0,"mat-option",29),d(1),t(2,"localizeFromArray"),t(3,"async"),s()),e&2){let o,i=l.$implicit;_("value",i.subEquipmentCategoryId),r(),g("",(o=n(3,4,n(2,2,i.localizedValues)))==null?null:o.name," ")}}function Bc(e,l){if(e&1&&(c(0,"div",11)(1,"label",42),t(2,"localize"),t(3,"async"),d(4),t(5,"localize"),t(6,"async"),s(),c(7,"mat-form-field",13),y(8,"fa-icon",43),c(9,"mat-select",44),H(10,Ec,4,6,"mat-option",29,$i().trackByIndexFn,!0),s()()()),e&2){let o=u(4);r(),G("aria-label",n(3,5,n(2,3,"ARIA_LABELS.EQUIPMENT"))),r(3),g(" ",n(6,9,n(5,7,"PLACEHOLDERS.EQUIPMENT"))," "),r(4),_("icon",E(11,nc)),r(2),$(o.equipmentOptions)}}function Ic(e,l){if(e&1&&(c(0,"mat-option",29),d(1),s()),e&2){let o,i=l.$implicit,a=u(6);_("value",i.rateCategoryId),r(),g(" ",(o=a.getLocalizationForCurrentCultureFromList(i.localizedValues))==null?null:o.name," ")}}function Tc(e,l){if(e&1&&(c(0,"div",11)(1,"label",45),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13),y(6,"fa-icon",43),c(
17,"mat-select",46),H(8,Ic,2,2,"mat-option",29,$i().trackByIndexFn,!0),s()()()),e&2){let o=u(5);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.RATE"))," "),r(4),_("icon",E(6,oc)),r(2),$(o.filteredRateCategories)}}function kc(e,l){if(e&1){let o=z();c(0,"div",49)(1,"label",50),t(2,"localize"),t(3,"async"),d(4),t(5,"localize"),t(6,"async"),s(),c(7,"mat-form-field",51),k("click",function(){P(o);let a=ci(11);return w(a.open())})("keydown.enter",function(){P(o);let a=ci(11);return w(a.open())}),y(8,"fa-icon",52)(9,"input",53)(10,"mat-datepicker",54,0),t(12,"async"),s()()}if(e&2){let o=ci(11),i=u(6);r(),G("aria-label",n(3,8,n(2,6,"ARIA.RANGESTART"))),r(3),g(" ",n(6,12,n(5,10,"PLACEHOLDERS.PASSEXPIRYDATE"))," "),r(4),_("icon",E(16,ac)),r(),_("matDatepicker",o),r(),_("calendarHeaderComponent",i.datePickerHeaderComponent)("touchUi",n(12,14,i.isLtSm$))}}function Pc(e,l){if(e&1&&(c(0,"div",11)(1,"label",47),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"mat-form-field",13),y(6,"input",48),s(),f(7,kc,13,17,"div",49),s()),e&2){let o=u(5);r(2),g(" ",n(4,4,n(3,2,"PLACEHOLDERS.PASSNUMBER"))," "),r(5),C(o.showPassExpiry?7:-1)}}function wc(e,l){if(e&1&&(c(0,"div",41),f(1,Tc,10,7,"div",11),f(2,Pc,8,6,"div",11),s()),e&2){let o=u(4);r(),C(o.filteredRateCategories.length>1?1:-1),r(),C(o.showPassNumber?2:-1)}}function Ac(e,l){if(e&1&&(c(0,"mat-tab",5),t(1,"localize"),t(2,"async"),c(3,"div",40)(4,"div",41),f(5,Bc,12,12,"div",11),f(6,wc,3,2,"div",41),s()()()),e&2){let o=u(3);_("label",de(n(2,6,n(1,4,"SEARCH_PREFERENCES.SECTION")))),r(5),C(o.equipmentOptions.length>1?5:-1),r(),C(o.filteredRateCategories.length>0?6:-1)}}function Lc(e,l){if(e&1&&(y(0,"app-alert-box",17),t(1,"localize"),t(2,"async")),e&2){let o=u(3);_("title",de(n(2,6,n(1,4,"ERROR.TITLE"))))("messages",o.errorMessages)("addBottomMargin","20px")}}function Dc(e,l){e&1&&(y(0,"app-alert-box",18),t(1,"localize"),t(2,"async"),t(3,"localize"),t(4,"async")),e&2&&_("title",de(n(2,6,n(1,4,"SUCCESS.TITLE"))))("messages",ce(12,rc,n(4,10,n(3,8,"SUCCESS.MESSAGE"))))("alertType","success")}function Fc(e,l){e&1&&y(0,"div")}function Mc(e,l){if(e&1){let o=z();c(0,"form",4),k("ngSubmit",function(){P(o);let a=u(),p=u();return w(p.validateAndSubmit(a))}),c(1,"mat-tab-group")(2,"mat-tab",5),t(3,"localize"),t(4,"async"),c(5,"div"),f(6,pc,6,6,"div",6),t(7,"async"),s()(),c(8,"mat-tab",5),t(9,"localize"),t(10,"async"),c(11,"div",6)(12,"div",7),y(13,"fa-icon",8),c(14,"h2",9),d(15),t(16,"localize"),t(17,"async"),s()(),c(18,"div",10)(19,"div",11)(20,"label",12),d(21),t(22,"localize"),t(23,"async"),s(),c(24,"mat-form-field",13)(25,"input",14),k("blur",function(){P(o);let a=u(2);return w(a.onFormValueChanged())}),s(),f(26,sc,2,1,"mat-error"),s()(),c(27,"div",11)(28,"label",15),d(29),t(30,"localize"),t(31,"async"),s(),c(32,"mat-form-field",13)(33,"input",16),k("blur",function(){P(o);let a=u(2);return w(a.onFormValueChanged())}),s(),f(34,cc,2,1,"mat-error"),s()()()(),f(35,Sc,15,13,"div"),s(),f(36,Ac,7,8,"mat-tab",5),s(),f(37,Lc,3,8,"app-alert-box",17),f(38,Dc,5,14,"app-alert-box",18),c(39,"div",19)(40,"button",20),t(41,"async"),Y(42,Fc,1,0,"div",21),t(43,"async"),c(44,"div",22)(45,"span"),d(46),t(47,"localize"),t(48,"async"),s()()()(),y(49,"app-policies-link"),s()}if(e&2){let o,i=u(2);_("formGroup",i.updateProfileFormModel),r(2),_("label",de(n(4,24,n(3,22,"PROFILE.SECTION")))),r(4),C((o=n(7,26,i.personalInformationValues$))?6:-1,o),r(2),_("label",de(n(10,30,n(9,28,"ADDITIONAL_INFO.SECTION")))),r(5),_("icon",E(52,ic)),r(2),g(" ",n(17,34,n(16,32,"ADDITIONAL_INFO.VEHICLE.SECTION"))," "),r(6),g(" ",n(23,38,n(22,36,"PLACEHOLDERS.LICENSEPLATE"))," "),r(5),C(i.formErrors.licensePlate?26:-1),r(3),g(" ",n(31,42,n(30,40,"PLACEHOLDERS.JURISDICTION"))," "),r(5),C(i.formErrors.jurisdiction?34:-1),r(),C(i.showBoatCollectionFormGroup?35:-1),r(),C(i.equipmentOptions.length>1||i.filteredRateCategories.length>0||i.filteredRateCategories.length===1&&i.filteredRateCategories[0].requiresPass===!0?36:-1),r(),C(i.errorMessages.length>0?37:-1),r(),C(i.updateSuccessful?38:-1),r(2),me("loading",n(41,44,i.submitStatus$)),r(2),_("ldSpinner",n(43,46,i.submitStatus$))("ldSpinnerDiameter",20)("ldSpinnerAriaLabelledby","updateAccount"),r(4),x(n(48,50,n(47,48,"BUTTON.UPDATE")))}}function Rc(e,l){if(e&1&&(c(0,"div",1)(1,"h1",2),d(2),t(3,"localize"),t(4,"async"),s(),Y(5,Mc,50,53,"form",3),t(6,"async"),s()),e&2){let o=u();r(2),x(n(4,5,n(3,3,"PAGETITLE"))),r(3),_("ldSpinner",n(6,7,o.initLoadingStatus$)>0)("ldSpinnerAriaLabelledby","pageTitle")}}var Gn=(()=>{let l=class l extends Fr{displayPassNumberError(){this.localizationService.getTranslation(this.PASS_NUMBER_CONFLICT_ERROR_KEY).subscribe(i=>{this.errorMessages.push(i)})}};l.\u0275fac=(()=>{let i;return function(p){return(i||(i=zt(l)))(p||l)}})(),l.\u0275cmp=L({type:l,selectors:[["app-update-profile"]],features:[D([{provide:M,useValue:["update-profile.component"]},{provide:ue,useValue:"PAGETITLE"},B]),Qi],decls:2,vars:3,consts:[["expiryDatePicker",""],[1,"container-sm"],["id","pageTitle",1,"h1"],["data-layout","column","data-layoutGap","20px","class","update-account-tabs","appFocusInvalidInput","",3,"formGroup","ngSubmit",4,"ldSpinner","ldSpinnerAriaLabelledby"],["data-layout","column","data-layoutGap","20px","appFocusInvalidInput","",1,"update-account-tabs",3,"ngSubmit","formGroup"],[3,"label"],[1,"form-wrapper"],["data-layout","row","data-layoutAlign","start center","data-layoutGap","15px",1,"mb-2","mt-4"],["size","2x","aria-hidden","true","alt","",1,"fa","color-accent-500",3,"icon"],[1,"m-0"],["formGroupName","vehicleInfoFormGroup","data-layout","row wrap",1,"field-wrapper"],[1,"form-control-wrapper"],["id","license-plate-field-label","for","license-plate-field","aria-owns","license-plate-field"],["appearance","outline"],["id","license-plate-field","aria-labelledby","license-plate-field-label","type","text","matInput","","formControlName","licensePlate",3,"blur"],["id","jurisdiction-field-label","for","jurisdiction-field","aria-owns","jurisdiction-field"],["id","jurisdiction-field","for","jurisdiction-field-label","type","text","matInput","","formControlName","jurisdiction",3,"blur"],["data-flex","auto",3,"title","messages","addBottomMargin"],["data-flex","auto",3,"title","messages","alertType"],["data-layout.gt-xs","row","data-layoutAlign.gt-xs","end"],["mat-flat-button","","color","primary","id","updateAccount","type","submit",1,"button","full-width"],[4,"ldSpinner","ldSpinnerDiameter","ldSpinnerAriaLabelledby"],[1,"button-contents"],[3,"personalInformationValues","requirements"],[3,"formReady","personalInformationValues","requirements"],["formGroupName","boatInfoFormGroup","data-layout","row wrap",1,"field-wrapper"],["id","boat-type-field-label","for","boat-type-field","aria-owns","boat-type-field"],["id","boat-type-field","aria-labelledby","boat-type-field-label","formControlName","boatType"],["hidden","","selected","","value",""],[3,"value"],["id","boat-length-field-label","for","boat-length-field","aria-owns","boat-length-field"],["id","boat-length-field","aria-labelledby","boat-length-field-label","matInput","","type","number","min","1","formControlName","boatLength",3,"blur"],["id","boat-beam-field-label","for","boat-beam-field","aria-owns","boat-beam-field"],["id","boat-beam-field","aria-labelledby","boat-beam-field-label","matInput","","type","number","min","1","formControlName","boatWidth",3,"blur"],["id","boat-draft-field-label","for","boat-beam-field","aria-owns","boat-draft-field"],["id","boat-draft-field","aria-labelledby","boat-draft-field-label","matInput","","type","number","min","1","formControlName","boatDraft",3,"blur"],["id","boat-name-field-label","for","boat-name-field","aria-owns","boat-name-field"],["id","boat-name-field","aria-labelledby","boat-name-field-label","type","text","matInput","","formControlName","boatName",3,"blur"],["id","boat-registration-field-label","for","boat-registration-field","aria-owns","boat-registration-field"],["id","boat-registration-field","aria-labelledby","boat-registration-field-label","type","text","matInput","","formControlName","boatRegistration",3,"blur"],[1,"form-wrapper","mt-4"],[1,"field-wrapper"],["id","equipment-field-label","for","equipment-field","aria-owns","equipment-field"],["matPrefix","","aria-hidden","true",3,"icon"],["id","equipment-field","aria-labelledby","equipment-field-label","formControlName","defaultSubEquipmentCategoryId"],["id","rate-category-field-label","for","rate-category-field","aria-owns","rate-category-field"],["aria-labelledby","rate-category-field-label","id","rate-category-field","formControlName","defaultRateCategoryId"],["id","pass-number-field-label","for","pass-number-field","aria-owns","pass-number-field"],["id","pass-number-field","aria-labelledby","pass-number-field-label","formControlName","passNumber","type","text","matInput",""],[1,"form-control-wrapper","mt-3"],["for","expiry-date-field","id","expiry-date-field-label"],["appearance","outline",3,"click","keydown.enter"],["matPrefix","","aria-hidden","true",1,"fa",3,"icon"],["id","expiry-date-field","aria-labelledby","expiry-date-field-label","matInput","","readonly","","formControlName","passExpiryDate",3,"matDatepicker"],["color","accent",3,"calendarHeaderComponent","touchUi"]],template:function(a,p){if(a&1&&(f(0,Rc,7,9,"div",1),t(1,"async")),a&2){let m;C((m=n(1,1,p.shopper$))?0:-1,m)}},dependencies:[be,Ee,Ue,De,zo,Fe,Ve,Uo,$a,Be,He,$e,qt,Wa,qa,wn,pe,Va,Pe,Me,Ge,un,Wt,Ci,Ua,qe,le,An,F,R,ei],styles:["h3[_ngcontent-%COMP%]{font-weight:700}
1.boat-accent[_ngcontent-%COMP%]{padding:0 15px 15px;margin-top:15px;margin-bottom:15px}.form-wrapper[_ngcontent-%COMP%]{overflow:hidden}@media(min-width:600px){.spacer-gt-xs[_ngcontent-%COMP%]{margin-right:50%}}.information-box[_ngcontent-%COMP%]{margin-left:15px;margin-right:15px;align-self:end;margin-bottom:5px;flex:1 250px}.phone-field[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}"]});let e=l;return e})();var vi=ni(ri());function Oc(e,l){e&1&&(c(0,"span",14),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),x(n(3,3,n(2,1,"BUTTON.SEARCH"))))}function Nc(e,l){if(e&1&&(y(0,"app-alert-box",13),t(1,"localize"),t(2,"async")),e&2){let o=u(2);_("title",de(n(2,6,n(1,4,"ERROR.TITLE"))))("messages",o.errorMessages)("alertType","error")}}function zc(e,l){if(e&1){let o=z();c(0,"form",3)(1,"p"),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",4)(6,"h2"),d(7),t(8,"localize"),t(9,"async"),s(),c(10,"p"),d(11),t(12,"localize"),t(13,"async"),s(),c(14,"div",5)(15,"div",6)(16,"label",7),d(17),t(18,"localize"),t(19,"async"),s(),c(20,"mat-form-field",8),y(21,"input",9),s()()()(),c(22,"div",10)(23,"button",11),k("click",function(){P(o);let a=u();return w(a.submitSearch())})("keyup.enter",function(){P(o);let a=u();return w(a.submitSearch())}),Y(24,Oc,4,5,"span",12),t(25,"async"),s()(),f(26,Nc,3,8,"app-alert-box",13),s()}if(e&2){let o=u();_("formGroup",o.groupHoldForm),r(2),x(n(4,11,n(3,9,"TEXT.PAGE"))),r(5),x(n(9,15,n(8,13,"TITLE.SEARCH"))),r(4),x(n(13,19,n(12,17,"TEXT.SEARCH"))),r(6),g(" ",n(19,23,n(18,21,"FORM.SEARCH"))," "),r(7),_("ldSpinner",n(25,25,o.submitActionStatus$)>0)("ldSpinnerDiameter",20)("ldSpinnerAriaLabelledby","pageTitle submitSearch"),r(2),C(o.errorMessages.length>0?26:-1)}}var qn=(()=>{let l=class l{constructor(){this.bookingHelper=h(Ri),this.cartService=h(Fi),this.formBuilder=h(mi),this.groupHoldSearchService=h(ti),this.localizationService=h(B),this.router=h(Ie),this.serviceErrorHelper=h(Te),this.store=h(V),this.errorMessages=[],this.selectedBookingCategoryId=null,this.bookingCategories=[],this.buildForm()}ngOnInit(){this.store.dispatch(new pt),this.store.dispatch(new ma),this.store.dispatch(ut());let i=X(()=>Tt(O([this.store.select(yi).pipe(A(ee)),this.store.select(fa).pipe(A(ee))]).pipe(b(a=>{let p=a[0].value,m=a[1].value;return p?.filter(v=>(0,vi.some)(m,S=>Object.values(S.childBookingCategoryIds).includes(v.bookingCategoryId)))})),this.store.select(fi(gi.Web)).pipe(T(I),b(a=>(0,vi.last)(a)))));this.bookingDetailsLoadStatus$=i.pipe(ke()),i.subscribe(a=>{if(a.loadState===U.Loaded){let[p,m]=a.value;p&&(this.bookingCategories=p),m!=null&&(this.phoneNumber=m.phoneNumber)}})}submitSearch(){let i=q(this.groupHoldForm,"groupHoldCodeInput").value;this.errorMessages=[];let a=X(()=>Tt(this.groupHoldSearchService.getGroupHoldByCode(i).pipe(A()),this.store.select(Di).pipe(ka(this.store),A(I)),this.store.select(yi).pipe(A(ee),b(re)),this.store.select(Ra).pipe(A())).pipe(j(([p,m,v,S])=>{let N=this.setSearchCriteria(p);if(S==null)return this.createNewWorkingBooking(m,p.groupHoldUid,p.validBookingCategories,N,v).pipe(b(ie=>({cart:ie,searchCriteria:N})));{S.newVersion!=null&&(S.newVersion.groupHoldUid=p.groupHoldUid);let ie=(0,vi.head)(p.validBookingCategories);return ie!=null&&(S.bookingCategoryId=ie,S.bookingModel=v.find(_e=>_e.bookingCategoryId===S.bookingCategoryId)?.bookingModel??null),K({cart:m,searchCriteria:N})}}),j(({cart:p,searchCriteria:m})=>this.cartService.commitCart(p,!1).pipe(b(()=>m)))));this.submitActionStatus$=a.pipe(ke()),a.subscribe(p=>{if(p.loadState===U.Loaded){let m=p.value,v=tn.buildSearchCriteriaQueryParams(m);this.router.navigate(["/create-booking"],{queryParams:v})}else if(p.loadState===U.Failed){let m=this.serviceErrorHelper.parseErrorMessageResult(p.error);m.messageKey!=null&&this.localizationService.getTranslation(m.messageKey).subscribe(v=>this.errorMessages.push(v))}})}createNewWorkingBooking(i,a,p,m,v){return this.bookingHelper.initializeNewWorkingBooking(i,m).pipe(W(S=>this.store.select(Ma).pipe(A(I),b(N=>{let ie=S.bookings.find(_e=>_e.bookingUid===N);if(ie!=null){ie.newVersion!=null&&(ie.newVersion.groupHoldUid=a);let _e=(0,vi.head)(p)??null;_e!=null&&(ie.bookingCategoryId=_e,ie.bookingCategoryId&&(ie.bookingModel=v.find(te=>te.bookingCategoryId===ie.bookingCategoryId)?.bookingModel??null))}return S}))))}buildForm(){this.groupHoldForm=this.formBuilder.group({groupHoldCodeInput:new No})}setSearchCriteria(i){if(this.bookingCategories){for(let N of this.bookingCategories)if(N.allowedResourceCategoryIds.filter(ie=>i.resourceCategoryIds.includes(ie)).length>0){this.selectedBookingCategoryId=N.bookingCategoryId;break}}if((0,vi.some)(i.validBookingCategories)&&(this.selectedBookingCategoryId=(0,vi.head)(i.validBookingCategories)??null),this.selectedBookingCategoryId==null)throw new Error("Unable to find booking category of group hold; check configuration of content");let a=i.startDate,m=this.bookingCategories.find(N=>N.bookingCategoryId===this.selectedBookingCategoryId)?.bookingModel===pn.DayUse?a.plusDays(1):i.endDate,v=q(this.groupHoldForm,"groupHoldCodeInput").value?q(this.groupHoldForm,"groupHoldCodeInput").value.trim():null,S={searchTabGroupId:null,bookingCategoryId:this.selectedBookingCategoryId,equipmentId:null,isReserving:!0,startDate:a,endDate:m,nights:Math.abs(Pi.DAYS.between(m,a)),equipmentCapacity:null,subEquipmentId:null,transactionLocationId:i.transactionLocationIds[0],resourceLocationId:i.resourceLocationIds[0],mapId:i.mapId,filterData:null,boatTypeId:null,boatLength:null,boatDraft:null,boatWidth:null,searchTime:ia.now(),accessPointResourceId:null,overrideBookingCategoryOptions:i?.validBookingCategories?.length>0?i.validBookingCategories:null,groupHoldUid:i.groupHoldUid,groupHoldCode:v,flexibleSearch:{isActive:!1},peopleCapacityCategoryCounts:null};return this.store.dispatch(new dt(ct.SetActiveSearchCriteria,S)),this.store.dispatch(new dt(ct.SetLastUsedSearchCriteria,S)),S}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-group-hold-search"]],features:[D([{provide:M,useValue:["group-hold-search.component"]},{provide:ue,useValue:"TITLE.PAGE"},B])],decls:7,vars:9,consts:[["data-flex","auto","data-layout","column",1,"search-width"],["id","pageTitle",1,"h1"],["data-layout","column","data-layoutGap","10px",3,"formGroup",4,"ldSpinner","ldSpinnerAriaLabelledby"],["data-layout","column","data-layoutGap","10px",3,"formGroup"],[1,"form-group-container-gt-xs"],[1,"field-wrapper","mt-3"],[1,"form-control-wrapper"],["id","groupHoldCodeInput-label","for","groupHoldCodeInput","aria-owns","groupHoldCodeInput"],["appearance","outline"],["id","groupHoldCodeInput","aria-labelledby","groupHoldCodeInput-label","formControlName","groupHoldCodeInput","type","text","matInput",""],["data-layoutAlign","end"],["mat-flat-button","","color","primary","type","submit",1,"button",3,"click","keyup.enter"],["id","submitSearch",4,"ldSpinner","ldSpinnerDiameter","ldSpinnerAriaLabelledby"],["data-flex","auto",3,"title","messages","alertType"],["id","submitSearch"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),Y(5,zc,27,27,"form",2),t(6,"async"),s()),a&2&&(r(2),x(n(4,5,n(3,3,"TITLE.PAGE"))),r(3),_("ldSpinner",n(6,7,p.bookingDetailsLoadStatus$)>0)("ldSpinnerAriaLabelledby","pageTitle"))},dependencies:[be,Ee,Ue,De,Fe,Ve,Be,He,$e,Pe,Me,le,qe,F,R],styles:[".form-group-container-gt-xs[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;font-size:18px;font-weight:700}.form-group-container-gt-xs[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.search-width[_ngcontent-%COMP%]{width:100%;max-width:768px;margin:auto}"]});let e=l;return e})();var Uc=(e,l)=>l.resourceLocationId;function Hc(e,l){e&1&&(c(0,"span",9),d(1,", "),s())}function $c(e,l){if(e&1&&(d(0),t(1,"localizeFromArray"),t(2,"async"),f(3,Hc,2,0,"span",9)),e&2){let o,i=l.$implicit,a=l.$index,p=u();g(" ",(o=n(2,4,n(1,2,i.localizedValues)))==null?null:o.shortName," "),r(3),C(a<p.length-1?3:-1)}}function Gc(e,l){e&1&&(c(0,"h2",7),H(1,$c,4,6,null,null,Uc),s()),e&2&&(r(),$(l))}function qc(e,l){if(e&1&&(c(0,"p",10)(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),d(5),t(6,"dateFormatPipe"),t(7,"async"),s()),e&2){let o=u();r(2),g("",n(4,4,n(3,2,"LABELS.CREATED")),":"),r(3),g(" ",n(7,10,he(6,6,o.groupHold.createDate,"short-week-day-month-year",!0))," ")}}function Wc(e,l){e&1&&Bi(0)}function Kc(e,l){e&1&&Bi(0)}function jc(e,l){if(e&1&&(c(0,"div",22),y(1,"span",27),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),s()()),e&2){let o=u(2);r(4),x(n(6,4,n(5,2,"LABELS.LEADER"))),r(3),g(" ",o.leaderName," ")}}function Yc(e,l){if(e&1&&(c(0,"div",22),y(1,"span",28),c(2,"p")(3,"strong"),d(4),t(5,"async"),s(),d(6),s()()),e&2){let o=u(2);r(4),x(n(5,2,o.resourceUnit$)),r(2),g(" ",o.groupHold.resourceIds.length," ")}}function Qc(e,l){e&1&&y(0,"span",25)}function Xc(e,l){e&1&&y(0,"span",26)}
1function Jc(e,l){if(e&1&&(c(0,"div",21),f(1,jc,8,6,"div",22),c(2,"div",22),y(3,"span",23),c(4,"p")(5,"strong"),d(6),t(7,"localize"),t(8,"async"),s(),d(9),s()(),f(10,Yc,7,4,"div",22),c(11,"div",22),y(12,"span",24),c(13,"p")(14,"strong"),d(15),t(16,"localize"),t(17,"async"),s(),d(18),t(19,"dateFormatPipe"),t(20,"async"),s()(),c(21,"div",22),f(22,Qc,1,0,"span",25),f(23,Xc,1,0,"span",26),c(24,"p")(25,"strong"),d(26),t(27,"localize"),t(28,"async"),s(),d(29),t(30,"localize"),t(31,"async"),t(32,"localize"),t(33,"async"),s()()()),e&2){let o=u();r(),C(o.showLeader?1:-1),r(5),x(n(8,12,n(7,10,"LABELS.CODE"))),r(3),g(" ",o.groupHold.code," "),r(),C(o.showCount?10:-1),r(5),x(n(17,16,n(16,14,"LABELS.EXPIRY"))),r(3),g(" ",n(20,20,n(19,18,o.groupHold.expiryDate))," "),r(4),C(o.groupHold.partialBookPermitted?-1:22),r(),C(o.groupHold.partialBookPermitted?23:-1),r(3),x(n(28,24,n(27,22,"LABELS.PARTIAL"))),r(3),g(" ",o.groupHold.partialBookPermitted?n(31,28,n(30,26,"STATUS.YES")):n(33,32,n(32,30,"STATUS.NO"))," ")}}function Zc(e,l){if(e&1){let o=z();c(0,"div",20)(1,"button",29),k("click",function(){P(o);let a=u();return w(a.onViewBookingClicked())}),y(2,"span",30),d(3),t(4,"localize"),t(5,"async"),s()()}e&2&&(r(3),g(" ",n(5,3,n(4,1,"BUTTON.DETAILS"))," "))}var Vi=(()=>{let l=class l{constructor(){this.categoryLabelFormatHelper=h(xt),this.currentUserService=h(ye),this.store=h(V),this.showCreateDate=!1,this.showCount=!1,this.showLeader=!1,this.enableStatusHeader=!0,this.viewBookingClicked=new Vt}ngOnInit(){this.showLeader&&this.currentUserService.getUserInfo().subscribe(a=>{a!=null&&(this.leaderName=`${a.firstName} ${a.lastName}`)}),this.store.dispatch(new ya),this.resourceLocations$=this.store.select(ga).pipe(T(ee),b(re),b(a=>a.filter(p=>this.groupHold.resourceLocationIds.includes(p.resourceLocationId)))),this.groupHold.expiryDate?.isAfter(Xt.now(Qt.UTC))&&(this.currentHold=!0);let i=this.groupHold.resourceIds.length>1;this.resourceUnit$=this.categoryLabelFormatHelper.getResourceLabel(this.groupHold.allowedBookingCategoryIds[0],i).pipe(T())}onViewBookingClicked(){this.viewBookingClicked.emit(this.groupHold.groupHoldUid)}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-compact-group-hold"]],inputs:{groupHold:"groupHold",enabledViewButton:"enabledViewButton",showCreateDate:"showCreateDate",showCount:"showCount",showLeader:"showLeader",enableStatusHeader:"enableStatusHeader"},outputs:{viewBookingClicked:"viewBookingClicked"},features:[D([{provide:M,useValue:["compact-group-hold.component"]},B])],decls:45,vars:42,consts:[["bookingDetails",""],[1,"compact-booking"],["data-layout.gt-xs","row","data-layout","column",1,"compact-booking_box","card","compact-booking_box--with-status"],["data-layout.gt-sm","row","data-layout","column","data-flex","auto"],["data-flex.gt-md","315px","data-flex","auto",1,"compact-booking_box_status-location-date"],[1,"location-date-wrapper"],["data-layout","row wrap","data-layoutAlign","space-between top",1,"location-status","mb-3"],[1,"compact-park-name"],[1,"reserved-dates"],[1,"separator"],[1,"site-info-created"],[1,"status"],[1,"status-label"],["aria-hidden","true",1,"fas",3,"ngClass"],["data-flex","auto",1,"compact-booking_box_booking-details"],[1,"hide-lt-sm"],[4,"ngTemplateOutlet"],["hideToggle","",1,"hide-gt-sm","invisible-expansion-panel","link-style"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"fas","fa-chevron-down","expansion-panel-toggle"],["data-layout","column","data-layoutAlign.gt-sm","center center",1,"compact-booking_box_booking-buttons"],["data-layoutAlign.gt-md","row","data-layout","row wrap","data-layoutAlign.gt-md","space-evenly center",1,"booking-detail-list"],[1,"booking-detail"],["aria-hidden","true",1,"far","fa-tag","color-accent-300"],["aria-hidden","true",1,"far","fa-calendar-alt","color-accent-300"],["aria-hidden","true",1,"fas","fa-adjust","color-accent-300"],["aria-hidden","true",1,"fas","fa-circle","color-accent-300"],["aria-hidden","true",1,"fas","fa-star","color-accent-300"],["aria-hidden","true",1,"far","fa-map-marker-alt","color-accent-300"],["mat-flat-button","","color","primary",1,"button","full-width",3,"click"],["aria-hidden","true",1,"fas","fa-info-circle","ng-fa-icon"]],template:function(a,p){if(a&1&&(c(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6)(6,"div"),f(7,Gc,3,0,"h2",7),t(8,"async"),c(9,"h3",8)(10,"span"),d(11),t(12,"dateFormatPipe"),t(13,"async"),c(14,"span",9),d(15,"\u2013"),s(),d(16),t(17,"dateFormatPipe"),t(18,"async"),s()(),f(19,qc,8,12,"p",10),s(),c(20,"div",11)(21,"div",12),y(22,"span",13),c(23,"p"),d(24),t(25,"localize"),t(26,"async"),t(27,"localize"),t(28,"async"),s()()()()()(),c(29,"div",14)(30,"div",15),Y(31,Wc,1,0,"ng-container",16),s(),c(32,"mat-expansion-panel",17)(33,"mat-expansion-panel-header",18)(34,"mat-panel-title")(35,"span"),d(36),t(37,"localize"),t(38,"async"),s(),y(39,"span",19),s(),d(40,"` "),s(),Y(41,Kc,1,0,"ng-container",16),s(),Y(42,Jc,34,34,"ng-template",null,0,it),s()(),f(44,Zc,6,5,"div",20),s()()),a&2){let m,v=ci(43);r(),me("compact-booking_box--with-buttons",p.enabledViewButton),r(6),C((m=n(8,16,p.resourceLocations$))?7:-1,m),r(4),g(" ",n(13,22,he(12,18,p.groupHold.startDate,"weekday-month-day",!1))," "),r(5),g(" ",n(18,28,he(17,24,p.groupHold.endDate,"short-week-day-month-year",!1))," "),r(3),C(p.showCreateDate?19:-1),r(),me("status-success",p.currentHold)("status-fail",!p.currentHold),r(2),_("ngClass",p.currentHold?"fa-check":"fa-times"),r(2),x(p.currentHold?n(26,32,n(25,30,"LABELS.ACTIVE")):n(28,36,n(27,34,"LABELS.EXPIRED"))),r(7),_("ngTemplateOutlet",v),r(5),x(n(38,40,n(37,38,"BUTTON.RESERVATION_DETAILS"))),r(5),_("ngTemplateOutlet",v),r(3),C(p.enabledViewButton?44:-1)}},dependencies:[xe,tt,nt,ve,le,Qe,Xe,Je,F,R,ii,ei],styles:['.site-info-box[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:16px}.site-info-box[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.site-info-box[_ngcontent-%COMP%] .reserved-dates[_ngcontent-%COMP%]{font-size:18px;font-weight:700;line-height:1}.site-info-box[_ngcontent-%COMP%] .reserved-dates[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child:after{content:"-";margin:0 2px}.status-header[_ngcontent-%COMP%]{padding:15px 0 0 30px}.site-info-created[_ngcontent-%COMP%]{margin-top:3px}'],changeDetection:0});let e=l;return e})();function id(e,l){if(e&1){let o=z();
1c(0,"div",1)(1,"app-compact-group-hold",3),k("viewBookingClicked",function(a){P(o);let p=u(3);return w(p.onViewBookingClicked(a))}),s()()}if(e&2){let o=l.$implicit;r(),_("groupHold",o)("enabledViewButton",!0)("showCount",!0)}}function td(e,l){e&1&&(c(0,"div",2)(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s()()),e&2&&(r(2),x(n(4,3,n(3,1,"NOHOLDS"))))}function nd(e,l){if(e&1&&(c(0,"div")(1,"div")(2,"h2"),d(3),t(4,"localize"),t(5,"async"),s()(),c(6,"div"),H(7,id,2,3,"div",1,Z),f(9,td,5,5,"div",2),s()()),e&2){let o=l;r(3),x(n(5,4,n(4,2,"HEADER.TITLE"))),r(4),$(o),r(2),C(o.length<1?9:-1)}}function od(e,l){if(e&1&&(c(0,"div"),f(1,nd,10,6,"div"),t(2,"async"),s()),e&2){let o,i=u();r(),C((o=n(2,1,i.groupHolds$))?1:-1,o)}}var Wn=(()=>{let l=class l{constructor(){this.router=h(Ie),this.groupHoldSearchService=h(ti),this.LoadState=U}ngOnInit(){this.groupHolds$=this.groupHoldSearchService.getCurrentGroupHolds().pipe(b(i=>Object.values(i))),this.loadingStatus$=X(()=>this.groupHolds$).pipe(ke())}onViewBookingClicked(i){this.router.navigate(["/account/group-hold-details",i])}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-group-holds-current"]],features:[D([{provide:M,useValue:["group-holds-current.component"]},B])],decls:4,vars:8,consts:[[4,"ldSpinner","ldSpinnerAriaLabel"],[1,"mb-2"],[1,"information-box"],[3,"viewBookingClicked","groupHold","enabledViewButton","showCount"]],template:function(a,p){a&1&&(Y(0,od,3,3,"div",0),t(1,"async"),t(2,"localize"),t(3,"async")),a&2&&_("ldSpinner",n(1,2,p.loadingStatus$)===p.LoadState.Loading)("ldSpinnerAriaLabel",n(3,6,n(2,4,"ARIA.PAGE_LOADING"))??"")},dependencies:[xe,ve,be,Vi,F,R],styles:[".expansion-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.alert[_ngcontent-%COMP%]{margin-top:20px}"]});let e=l;return e})();var ad=()=>["fas","filter"],rd=()=>["far","calendar-day"];function ld(e,l){if(e&1&&(c(0,"mat-option",17),d(1),s()),e&2){let o=l.$implicit;_("value",o),r(),g(" ",o," ")}}function pd(e,l){if(e&1){let o=z();c(0,"div",11)(1,"div",12)(2,"label",13),d(3),t(4,"localize"),t(5,"async"),s(),c(6,"mat-form-field",14),y(7,"fa-icon",15),c(8,"mat-select",16),t(9,"localize"),t(10,"async"),k("selectionChange",function(a){P(o);let p=u(3);return w(p.onSelectionChange(a))}),H(11,ld,2,2,"mat-option",17,Z),s()()()()}if(e&2){let o=l;r(3),g(" ",n(5,6,n(4,4,"YEAR.SEARCH"))," "),r(4),_("icon",E(12,rd)),r(),_("value",o[0]),G("aria-label",n(10,10,n(9,8,"ARIA_LABELS.YEAR"))),r(3),$(o)}}function sd(e,l){if(e&1&&(c(0,"div",4)(1,"div",7),y(2,"fa-icon",8),c(3,"div"),d(4),t(5,"localize"),t(6,"async"),s()(),y(7,"div",9),c(8,"div",10),f(9,pd,13,13,"div",11),t(10,"async"),s()()),e&2){let o,i=u(2);r(2),_("icon",E(9,ad)),r(2),x(n(6,5,n(5,3,"YEAR.TITLE"))),r(5),C((o=n(10,7,i.groupHoldYears$))?9:-1,o)}}function cd(e,l){if(e&1){let o=z();c(0,"app-compact-group-hold",18),k("viewBookingClicked",function(a){P(o);let p=u(2);return w(p.onViewBookingClicked(a))}),s()}if(e&2){let o=l.$implicit;_("groupHold",o)("enabledViewButton",!0)("showCount",!0)}}function dd(e,l){e&1&&(c(0,"div",6)(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s()()),e&2&&(r(2),x(n(4,3,n(3,1,"NOHOLDS"))))}function md(e,l){if(e&1&&(c(0,"mat-expansion-panel",1)(1,"mat-expansion-panel-header",2,0)(3,"mat-panel-title")(4,"h3"),d(5),t(6,"localize"),t(7,"async"),s(),y(8,"span",3),s()(),c(9,"div"),f(10,sd,11,10,"div",4),c(11,"div"),H(12,cd,1,3,"app-compact-group-hold",5,Z),f(14,dd,5,5,"div",6),s()()()),e&2){let o=l;r(5),x(n(7,5,n(6,3,"HEADER.TITLE"))),r(5),C(o.length>0?10:-1),r(2),$(o),r(2),C(o.length<1?14:-1)}}var Kn=(()=>{let l=class l{constructor(){this.router=h(Ie),this.groupHoldSearchService=h(ti),this.selectedYear$=new Oe(null),this.destroyRef=h(Si)}ngOnInit(){this.groupHoldYears$=this.groupHoldSearchService.getGroupHoldYears().pipe(xi(this.destroyRef),Ce(1)),this.groupHoldYears$.subscribe(i=>{this.selectedYear$.next(i.length>0?i[0]:null)}),this.groupHolds$=this.selectedYear$.pipe(ne(I),j(i=>this.groupHoldSearchService.getGroupHoldByYear(i)),ne(I),b(i=>Object.values(i)))}onSelectionChange(i){this.selectedYear$.next(i)}onViewBookingClicked(i){this.router.navigate(["/account/group-hold-detail
1s",i])}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-group-holds-past"]],features:[D([{provide:M,useValue:["group-holds-past.component"]},B])],decls:2,vars:3,consts:[["faq",""],["hideToggle","",1,"invisible-expansion-panel","link-style"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"fas","fa-chevron-down","expansion-panel-toggle"],["data-layout.gt-sm","row",1,"ghp-yearbox"],[3,"groupHold","enabledViewButton","showCount"],[1,"information-box"],["data-layout","row","data-layoutAlign","start center","data-layoutGap","10px",1,"inner-padding-10"],["aria-hidden","true",1,"fa",3,"icon"],[1,"ghp-skewbox"],["data-flex.gt-sm","300px","data-layout","row","data-layoutAlign","space-between center","data-layoutGap","15px",1,"ghp-search"],["data-layout","row","data-layoutAlign","center center"],[1,"form-control-wrapper"],["for","selectedYear"],["appearance","outline"],["matPrefix","","size","lg","aria-hidden","true",3,"icon"],["id","selectedYear",3,"selectionChange","value"],[3,"value"],[3,"viewBookingClicked","groupHold","enabledViewButton","showCount"]],template:function(a,p){if(a&1&&(f(0,md,15,7,"mat-expansion-panel",1),t(1,"async")),a&2){let m;C((m=n(1,1,p.groupHolds$))?0:-1,m)}},dependencies:[xe,ve,pe,Vi,Qe,Xe,Je,un,Wt,Pe,F,R],styles:["h2[_ngcontent-%COMP%]{margin:0}.alert[_ngcontent-%COMP%]{margin-bottom:0}.ghp-yearbox[_ngcontent-%COMP%]{font-weight:700;border-width:1px;border-style:solid;border-radius:initial}.ghp-yearbox[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{border-width:0;border-style:solid;border-radius:50%;min-width:40px;width:40px;height:40px;font-size:20px;line-height:40px;flex-shrink:0;display:inline-flex;justify-content:center;align-items:center}.ghp-yearbox[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.ghp-skewbox[_ngcontent-%COMP%]{width:40px;position:relative;left:10px;-moz-transform:skew(-15deg,0deg);-o-transform:skew(-15deg,0deg);-ms-transform:skew(-15deg,0deg);-webkit-transform:skew(-15deg,0deg);transform:skew(-15deg)}.ghp-search[_ngcontent-%COMP%]{padding:5px 5px 5px 20px}@media(max-width:959px){.ghp-skewbox[_ngcontent-%COMP%]{display:none}.ghp-search[_ngcontent-%COMP%]{padding-left:5px}}"]});let e=l;return e})();var jn=(()=>{let l=class l{constructor(){}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-group-holds"]],features:[D([{provide:M,useValue:["group-holds.component"]},B])],decls:12,vars:10,consts:[["id","pageTitle",1,"h1"],[1,"mb-2"]],template:function(a,p){a&1&&(c(0,"h1",0),d(1),t(2,"localize"),t(3,"async"),s(),c(4,"p"),d(5),t(6,"localize"),t(7,"async"),s(),c(8,"div")(9,"div",1),y(10,"app-group-holds-current"),s(),y(11,"app-group-holds-past"),s()),a&2&&(r(),x(n(3,4,n(2,2,"HEADER.TITLE"))),r(4),x(n(7,8,n(6,6,"HEADER.TEXT"))))},dependencies:[Wn,Kn,F,R],encapsulation:2});let e=l;return e})();function ud(e,l){if(e&1&&(c(0,"p")(1,"strong"),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"span"),d(6),s()()),e&2){let o=u();r(2),x(n(4,4,n(3,2,"LABEL.PARTIAL"))),r(4),x(o.partial)}}function fd(e,l){if(e&1&&(c(0,"div")(1,"h3"),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",4)(6,"div",5)(7,"p")(8,"strong"),d(9),t(10,"localize"),t(11,"async"),s(),c(12,"span"),d(13),s()(),c(14,"p")(15,"strong"),d(16),t(17,"localize"),t(18,"async"),s(),c(19,"span"),d(20),s()(),f(21,ud,7,6,"p"),c(22,"p")(23,"strong"),d(24),t(25,"localize"),t(26,"async"),s(),c(27,"span"),d(28),s()()()()()),e&2){let o=l,i=u(2);r(2),x(n(4,10,n(3,8,"LABEL.TITLE"))),r(7),x(n(11,14,n(10,12,"LABEL.TOTAL"))),r(4),x(o.total),r(3),x(n(18,18,n(17,16,"LABEL.AVAILABLE"))),r(4),x(o.available),r(),C(i.partialBookPermitted?-1:21),r(3),x(n(26,22,n(25,20,"LABEL.RESERVED"))),r(4),x(o.blocked)}}function Cd(e,l){if(e&1&&(f(0,fd,29,24,"div"),t(1,"async")),e&2){let o,i=u(2);C((o=n(1,1,i.availabilityTotals$))?0:-1,o)}}function gd(e,l){if(e&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div")(6,"div",2),y(7,"app-compact-group-hold",3),s(),f(8,Cd,2,3),t(9,"async"),s()()),e&2){let o=u();r(2),x(n(4,7,n(3,5,"TITLE.PAGE"))),r(5),_("groupHold",l)("showCreateDate",!0)("showLeader",!0),r(),C(n(9,9,o.grouHoldIsExpired$)===!1?8:-1)}}var Yn=(()=>{let l=class l{constructor(){this.occupancyService=h(sr),this.groupHoldSearchService=h(ti),this.route=h(Ti),this.destroyRef=h(Si),this.groupHoldUid=this.route.
1snapshot.params.groupHoldUid}ngOnInit(){this.groupHoldDetails$=this.groupHoldSearchService.getGroupHoldByUid(this.groupHoldUid).pipe(T(I),xi(this.destroyRef),Ce(1)),this.grouHoldIsExpired$=this.groupHoldDetails$.pipe(b(({expiryDate:i})=>i?.isBefore(Xt.now(Qt.UTC)))),this.availabilityTotals$=this.groupHoldDetails$.pipe(j(i=>O(i.allowedBookingCategoryIds.map(a=>this.getResourceGetOccupancyForBookingCategory(a,i))).pipe(b(a=>a.flat()),b(a=>i.resourceIds.map(p=>a.find(m=>m.resourceId===p)).filter(I)))),b(i=>({total:i.length,available:i.filter(p=>p.occupancy===Ln.Available).length,partial:i.filter(p=>p.occupancy===Ln.PartiallyAvailable).length,blocked:i.filter(p=>p.occupancy===Ln.Unavailable).length})))}getResourceGetOccupancyForBookingCategory(i,a){return O(a.resourceLocationIds.map(p=>this.occupancyService.getOccupancySearchResult({resourceLocationId:p,startDate:a.startDate,endDate:a.endDate.minusDays(1),bookingCategoryId:i,equipmentId:null,subEquipmentId:null,boatLength:null,boatDraft:null,boatWidth:null,peopleCapacityCategoryCounts:null,equipmentCapacity:null,filterData:null,cartUid:null,cartTransactionUid:null,bookingUid:null,groupHoldUid:a.groupHoldUid}).pipe(b(m=>m.resourceOccupancy.filter(({resourceId:v})=>a.resourceIds.includes(v)))))).pipe(b(p=>p.flat()),b(p=>p.filter(m=>!m.restrictions.some(v=>v===cr.BookingCategory))))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-group-hold-details"]],features:[D([{provide:M,useValue:["group-hold-details.component"]},B])],decls:2,vars:3,consts:[["data-flex","auto","data-layout","column",1,"full-width"],["id","pageTitle",1,"h1"],[1,"mb-3"],[3,"groupHold","showCreateDate","showLeader"],[1,"card"],[1,"group-hold-details","inner"]],template:function(a,p){if(a&1&&(f(0,gd,10,11,"div",0),t(1,"async")),a&2){let m;C((m=n(1,1,p.groupHoldDetails$))?0:-1,m)}},dependencies:[ve,xe,Vi,R,F],styles:[".group-hold-details[_ngcontent-%COMP%]{flex-direction:row;display:flex;align-items:stretch;justify-content:space-evenly;text-align:center}.group-hold-details[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}"]});let e=l;return e})();var Qn=ni(ri());var _d=["currentBookingElement"],hd=["upcomingBookingElement"],xd=["pastBookingElement"],yd=()=>["fas","chevron-down"],Rr=(e,l)=>l.bookingUid;function vd(e,l){if(e&1){let o=z();c(0,"li",null,0)(2,"app-compact-booking",12),t(3,"async"),k("viewBookingClicked",function(a){P(o);let p=u(3);return w(p.onViewBookingClicked(a))})("changeBookingClicked",function(a){P(o);let p=u(3);return w(p.onChangeBookingClicked(a))})("cancelBookingClicked",function(a){P(o);let p=u(3);return w(p.onCancelBookingClicked(a))}),s()()}if(e&2){let o,i=l.$implicit,a=l.$index,p=u(3);r(2),_("enabledViewButton",!0)("booking",i)("cartUid",(o=n(3,4,p.currentBookingCartUids$))==null?null:o[i.bookingUid])("uniqueId","-currentBooking-"+(a+1))}}function bd(e,l){if(e&1){let o=z();c(0,"button",13),t(1,"localize"),t(2,"async"),k("click",function(){P(o);let a=u(3);return w(a.showCurrentBookings())}),d(3),t(4,"localize"),t(5,"async"),s()}e&2&&(G("aria-label",n(2,4,n(1,2,"ARIA_LABELS.SHOW_MORE_CURRENT_BOOKINGS"))),r(3),g(" ",n(5,8,n(4,6,"SHOWMORE"))," "))}function Sd(e,l){if(e&1&&(c(0,"h2",9),d(1),t(2,"localize"),t(3,"async"),s(),c(4,"ul",10),t(5,"localize"),t(6,"async"),H(7,vd,4,6,"li",null,Rr),s(),f(9,bd,6,10,"button",11)),e&2){let o=u(2);r(),x(n(3,5,n(2,3,"CURRENT_RESERVATIONS_TITLE"))),r(3),G("aria-label",n(6,9,n(5,7,"ARIA_LABELS.CURRENT_RESERVATIONS_LIST"))),r(3),$(o.displayCurrentBookings),r(2),C(o.displayCurrentBookings.length<o.allCurrentBookings.length?9:-1)}}function Ed(e,l){if(e&1){let o=z();c(0,"li",null,1)(2,"app-compact-booking",12),t(3,"async"),k("viewBookingClicked",function(a){P(o);let p=u(4);return w(p.onViewBookingClicked(a))})("changeBookingClicked",function(a){P(o);let p=u(4);return w(p.onChangeBookingClicked(a))})("cancelBookingClicked",function(a){P(o);let p=u(4);return w(p.onCancelBookingClicked(a))}),s()()}if(e&2){let o,i=l.$implicit,a=l.$index,p=u(4);r(2),_("enabledViewButton",!0)("booking",i)("cartUid",(o=n(3,4,p.upcomingBookingCartUids$))==null?null:o[i.bookingUid])("uniqueId","-upcomingBooking-"+(a+1))}}function Bd(e,l){if(e&1&&(c(0,"ul",10),t(1,"localize"),t(2,"async"),H(3,Ed,4,6,"li",null,Rr),s()),e&2){let o=u(3);G("aria-label",n(2,3,n(1,1,"ARIA_LABELS.UPCOMING_RESERVATIONS_LIST"))),r(3),$(o.displayUpcomingBookings)}}function Id(e,l){if(e&1){let o=z();c(0,"button",15),t(1,"localize"),t(2,"async"),k("click",function(){P(o);let a=u(3);return w(a.showUpcomingBookings())}),d(3),t(4,"localize"),t(5,"async"),s()}e&2&&(G("aria-label",n(2,4,n(1,2,"ARIA_LABELS.SHOW_MORE_UPCOMING_BOOKINGS"))),r(3),g(" ",n(5,8,n(4,6,"SHOWMORE"))," "))}function Td(e,l){if(e&1&&(f(0,Bd,5,5,"ul",10),f(1,Id,6,10,"button",14)),e&2){let o=u(2);C(o.displayUpcomingBookings.length>0?0:-1),r(),C(o.displayUpcomingBookings.length<o.allUpcomingBookings.length?1:-1)}}function kd(e,l){e&1&&(c(0,"div",7)(1,"div",16)(2,"p"),d(3),t(4,"localize"),t(5,"async"),s()()()),e&2&&(r(3),x(n(5,3,n(4,1,"NO_BOOKINGS.UPCOMING"))))}function Pd(e,l){if(e&1){let o=z();
1c(0,"li",null,3)(2,"app-compact-booking",20),k("viewBookingClicked",function(a){P(o);let p=u(3);return w(p.onViewBookingClicked(a))}),s()()}if(e&2){let o=l.$implicit,i=l.$index;r(2),_("booking",o)("uniqueId","-pastBooking-"+(i+1))("enabledViewButton",!0)("showMoreOptions",!1)}}function wd(e,l){if(e&1){let o=z();c(0,"button",21),t(1,"localize"),t(2,"async"),k("click",function(){P(o);let a=u(3);return w(a.showPastOrCancelledBookings())}),d(3),t(4,"localize"),t(5,"async"),s()}e&2&&(G("aria-label",n(2,4,n(1,2,"ARIA_LABELS.SHOW_MORE_PAST_OR_CANCELLED_BOOKINGS"))),r(3),g(" ",n(5,8,n(4,6,"SHOWMORE"))," "))}function Ad(e,l){if(e&1&&(c(0,"mat-expansion-panel",8)(1,"mat-expansion-panel-header",17,2)(3,"mat-panel-title")(4,"h3"),d(5),t(6,"localize"),t(7,"async"),s(),y(8,"fa-icon",18),s()(),c(9,"ul",10),t(10,"localize"),t(11,"async"),H(12,Pd,3,4,"li",null,Z),s(),f(14,wd,6,10,"button",19),s()),e&2){let o=u(2);r(5),x(n(7,6,n(6,4,"VIEW_PAST_AND_CANCELLED_RESERVATIONS"))),r(3),_("icon",E(12,yd)),r(),G("aria-label",n(11,10,n(10,8,"ARIA_LABELS.RESERVATION_LIST"))),r(3),$(o.displayPastOrCancelledBookings),r(2),C(o.displayPastOrCancelledBookings.length<o.allPastOrCancelledBookings.length?14:-1)}}function Ld(e,l){e&1&&(c(0,"div",7)(1,"div",16)(2,"p"),d(3),t(4,"localize"),t(5,"async"),s()()()),e&2&&(r(3),x(n(5,3,n(4,1,"NO_BOOKINGS.PAST"))))}function Dd(e,l){if(e&1&&(c(0,"div"),f(1,Sd,10,11),c(2,"h2",6),d(3),t(4,"localize"),t(5,"async"),s(),f(6,Td,2,2)(7,kd,6,5,"div",7),c(8,"h2"),d(9),t(10,"localize"),t(11,"async"),s(),f(12,Ad,15,13,"mat-expansion-panel",8)(13,Ld,6,5,"div",7),s()),e&2){let o=u();r(),C(o.displayCurrentBookings.length>0?1:-1),r(2),x(n(5,7,n(4,5,"UPCOMING_RESERVATIONS_TITLE"))),r(3),C(o.displayUpcomingBookings.length>0?6:7),r(3),x(n(11,11,n(10,9,"PAST_CANCELLED_RESERVATIONS_TITLE"))),r(3),C(o.displayPastOrCancelledBookings.length>0?12:13)}}var Xn=(()=>{let l=class l{constructor(){this.trackByIndexFn=h(Ze),this.titleHelper=h(Yt),this.shopperService=h(Ai),this.serviceErrorHelper=h(Te),this.localizationService=h(B),this.bookingService=h(ui),this.cartService=h(Fi),this.router=h(Ie),this.dialog=h(jt),this.dialogHelper=h(Re),this.bookingHelper=h(Ri),this.accountHelper=h(Sn),this.store=h(V),this.transactionLocationService=h(Ea),this.allUpcomingBookings=[],this.allPastOrCancelledBookings=[],this.allCurrentBookings=[],this.displayUpcomingBookings=[],this.displayPastOrCancelledBookings=[],this.displayCurrentBookings=[],this.orgHasCallCenter=!1,this.errorMessages=[],this.componentActive=!0,this.currentCultureName=null,this.incrementSize=10,this.displayUpcomingBookingsEndIndex=0,this.displayPastOrCancelledBookingsEndIndex=0,this.displayCurrentBookingsEndIndex=0,this.nextFocusIndex=0,this.store.select(ki).pipe(oi(()=>this.componentActive)).subscribe(i=>{i!=null&&(this.currentCultureName=i.cultureName)})}ngOnInit(){this.store.dispatch(ut());let i=X(()=>this.shopperService.getAllBookings().pipe(b(a=>a.filter(p=>p.bookingStatus!==se.Unclaimed))));this.getBookingsLoadState$=i.pipe(ke()),i.subscribe(a=>{if(a.loadState===U.Loaded){let p=a.value;this.currentCultureName!=null&&p!=null&&(this.allCurrentBookings=(0,Qn.filter)(p,m=>this.isCurrentBooking(m)),this.allUpcomingBookings=(0,Qn.filter)(p,m=>!this.isPastOrCancelledBooking(m)&&!this.isCurrentBooking(m)&&!this.isWithdrawnOrExpiredWaitlistApplication(m)),this.allPastOrCancelledBookings=(0,Qn.filter)(p,m=>this.isPastOrCancelledBooking(m)&&!this.isWithdrawnOrExpiredWaitlistApplication(m)),this.sortCurrentBookings(),this.sortUpcomingBookings(),this.sortPastOrCancelledBookings(),this.showCurrentBookings(),this.showUpcomingBookings(),this.showPastOrCancelledBookings())}else if(a.loadState===U.Failed){this.errorMessages=[];let p=this.serviceErrorHelper.parseErrorMessageResult(a.error);p.messageKey&&this.localizationService.getTranslation(p.messageKey).subscribe(m=>{this.errorMessages.push(m)})}}),this.store.select(fi(gi.CallCentre)).pipe(T(I)).subscribe(a=>{this.orgHasCallCenter=a.length>0})}ngOnDestroy(){this.componentActive=!1}ngAfterViewInit(){this.currentBookingElement.changes.subscribe(i=>this.setFocusToBookingElement(i)),this.upcomingBookingElement.changes.subscribe(i=>this.setFocusToBookingElement(i)),this.pastBookingElement.changes.subscribe(i=>this.setFocusToBookingElement(i))}setFocusToBookingElement(i){if(this.nextFocusIndex<=0||this.nextFocusIndex>
1i.length)return;let p=i.get(this.nextFocusIndex-1)?.nativeElement?.querySelector(".change-booking-button")??null;p!=null&&(p.focus(),this.nextFocusIndex=0)}onViewBookingClicked(i){this.router.navigate(["/account/booking-details",i])}showUpcomingBookings(){this.nextFocusIndex=this.displayUpcomingBookingsEndIndex+1,this.displayUpcomingBookingsEndIndex+=this.incrementSize,this.displayUpcomingBookingsEndIndex>this.allUpcomingBookings.length&&(this.displayUpcomingBookingsEndIndex=this.allUpcomingBookings.length),this.displayUpcomingBookings=this.allUpcomingBookings.slice(0,this.displayUpcomingBookingsEndIndex),this.upcomingBookingCartUids$=this.getBookingCartUids(this.displayUpcomingBookings)}showPastOrCancelledBookings(){this.nextFocusIndex=this.displayPastOrCancelledBookingsEndIndex+1,this.displayPastOrCancelledBookingsEndIndex+=this.incrementSize,this.displayPastOrCancelledBookingsEndIndex>this.allPastOrCancelledBookings.length&&(this.displayPastOrCancelledBookingsEndIndex=this.allPastOrCancelledBookings.length),this.displayPastOrCancelledBookings=this.allPastOrCancelledBookings.slice(0,this.displayPastOrCancelledBookingsEndIndex)}showCurrentBookings(){this.nextFocusIndex=this.displayCurrentBookingsEndIndex+1,this.displayCurrentBookingsEndIndex+=this.incrementSize,this.displayCurrentBookingsEndIndex>this.allCurrentBookings.length&&(this.displayCurrentBookingsEndIndex=this.allCurrentBookings.length),this.displayCurrentBookings=this.allCurrentBookings.slice(0,this.displayCurrentBookingsEndIndex),this.currentBookingCartUids$=this.getBookingCartUids(this.displayCurrentBookings)}sortUpcomingBookings(){this.allUpcomingBookings.sort((i,a)=>i.startDate.toEpochDay()-a.startDate.toEpochDay())}sortCurrentBookings(){this.allCurrentBookings.sort((i,a)=>i.startDate.toEpochDay()-a.startDate.toEpochDay())}sortPastOrCancelledBookings(){this.allPastOrCancelledBookings.sort((i,a)=>a.startDate.toEpochDay()-i.startDate.toEpochDay())}onChangeBookingClicked(i){X(()=>this.accountHelper.getBookingChangeMessageKey(i.compactBooking)).subscribe(p=>{if(i.loadStatus$.next(p.loadState),p.loadState!==U.Loaded)return;let m=p.value;m!=null?(this.store.dispatch(new ft.resourceLocations.LoadResourceLocations),X(()=>O({resourceLocation:this.store.select(mt(i.compactBooking.resourceLocationId)).pipe(A(I)),callCentreTransactionLocation:this.store.select(fi(gi.CallCentre)).pipe(A(I),b(S=>S[0]))}).pipe(W(({resourceLocation:S,callCentreTransactionLocation:N})=>this.accountHelper.getChangeValidationMessage(m,i.compactBooking.bookingStatus,N?.phoneNumber,{name:this.localizationService.getLocalizationForCurrentCultureFromList(S.localizedValues)?.fullName??"",phoneNumber:S.phoneNumber},i.compactBooking.outsideChangeWindow.nextActionableDate)))).subscribe(S=>{if(i.loadStatus$.next(S.loadState),S.loadState!==U.Loaded)return;let N=S.value;N!=null&&this.dialogHelper.openGenericDialog(N.title,[N.message])})):X(()=>this.bookingService.getBooking(i.compactBooking.bookingUid).pipe(W(S=>(this.store.dispatch(wi({workingBookingUid:S.bookingUid})),this.store.dispatch(new ra(S.cartUid,null)),this.store.select(Di).pipe(po(1),T()))))).subscribe(S=>{i.loadStatus$.next(S.loadState),S.loadState===U.Loaded&&this.router.navigate(["/change-booking"])})})}onCancelBookingClicked(i){X(()=>this.accountHelper.getBookingCancelMessageKey(i.compactBooking)).subscribe(p=>{if(i.loadStatus$.next(p.loadState),p.loadState!==U.Loaded)return;let m=p.value;m!=null?(this.store.dispatch(new ft.resourceLocations.LoadResourceLocations),X(()=>O({resourceLocation:this.store.select(mt(i.compactBooking.resourceLocationId)).pipe(A(I)),callCentreTransactionLocation:this.store.select(fi(gi.CallCentre)).pipe(A(I),b(S=>S[0]))}).pipe(W(({resourceLocation:S,callCentreTransactionLocation:N})=>this.accountHelper.getCancelValidationMessage(m,i.compactBooking.bookingStatus,N?.phoneNumber,{name:this.localizationService.getLocalizationForCurrentCultureFromList(S.localizedValues)?.fullName??"",phoneNumber:S.phoneNumber},i.compactBooking.outsideCancelWindow.nextActionableDate)))).subscribe(S=>{i.loadStatus$.next(S.loadState),S.loadState===U.Loaded&&this.showCancelBookingMessageDialog(S.value,m,i.compactBooking)})):X(()=>this.getCancelBookingCart(i.compactBooking.bookingUid)).subscribe(S=>
1{i.loadStatus$.next(S.loadState),S.loadState===U.Loaded&&this.router.navigate(["/cancel-booking/acknowledgement"])})})}showCancelBookingMessageDialog(i,a,p){if(i!=null)if(a===bn.LinkedResource){let m=this.dialogHelper.openConfirmationDialog(i.title,[i.message]);m?.componentInstance.confirmed.asObservable().pipe(W(()=>this.accountHelper.handleConfirmCancelLinkedBookingMessage(p)),ne(v=>v)).subscribe(()=>{m.close()})}else this.dialogHelper.openGenericDialog(i.title,[i.message])}getCancelBookingCart(i){return this.bookingService.getBooking(i).pipe(A(),j(a=>a==null?K(null):(this.store.dispatch(wi({workingBookingUid:a.bookingUid})),this.store.dispatch(new Zt(a.cartUid,a.bookingUid)),this.store.select(Di).pipe(po(1),T()))),pi(a=>{this.errorMessages=[];let p=this.serviceErrorHelper.parseErrorMessageResult(a);return p.messageKey&&this.localizationService.getTranslation(p.messageKey).subscribe(m=>{this.errorMessages.push(m)}),bi(()=>a)}))}onViewPastOrCancelledBookingClicked(i){this.router.navigate(["/account/booking-details",i])}isWithdrawnOrExpiredWaitlistApplication(i){return i.waitlistApplicationStatuses?.some(a=>a===Le.Withdrawn||a===Le.Expired)??!1}isPastOrCancelledBooking(i){return i.bookingStatus===se.Cancelled||i.bookingStatus===se.NoShow||i.bookingStatus===se.Completed||i.bookingStatus===se.Expired}isCurrentBooking(i){return i.bookingStatus===se.Arrived||i.bookingStatus===se.Departing||i.bookingStatus===se.SelfCheckedIn}getBookingCartUids(i){let a=i.filter(p=>p.canBeSelfCheckedIn||p.bookingStatus===se.SelfCheckedIn||p.canBeSelfCheckedOut&&p.bookingStatus===se.Departing).map(p=>this.bookingService.getBooking(p.bookingUid));return O(a).pipe(b(p=>p.reduce((m,v)=>(m[v.bookingUid]=v.cartUid,m),{})),Ce(1))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-all-bookings"]],viewQuery:function(a,p){if(a&1&&(Ji(_d,5),Ji(hd,5),Ji(xd,5)),a&2){let m;Zi(m=et())&&(p.currentBookingElement=m),Zi(m=et())&&(p.upcomingBookingElement=m),Zi(m=et())&&(p.pastBookingElement=m)}},features:[D([{provide:M,useValue:["all-bookings.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:6,vars:9,consts:[["currentBookingElement",""],["upcomingBookingElement",""],["faq",""],["pastBookingElement",""],["id","pageTitle",1,"h1"],[4,"ldSpinner","ldSpinnerAriaLabelledby"],["id","upcoming-reservations-title"],[1,"information-box"],["hideToggle","",1,"invisible-expansion-panel","link-style"],["id","current-reservations-title"],[1,"bookings-list"],["id","showMoreCurrentBookings","mat-flat-button","","color","primary"],[3,"viewBookingClicked","changeBookingClicked","cancelBookingClicked","enabledViewButton","booking","cartUid","uniqueId"],["id","showMoreCurrentBookings","mat-flat-button","","color","primary",3,"click"],["id","showMoreUpcomingBookings","mat-flat-button","","color","primary"],["id","showMoreUpcomingBookings","mat-flat-button","","color","primary",3,"click"],[1,"content"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"expansion-panel-toggle",3,"icon"],["id","showMorePastOrCancelledBookings","mat-flat-button","","color","accent"],[3,"viewBookingClicked","booking","uniqueId","enabledViewButton","showMoreOptions"],["id","showMorePastOrCancelledBookings","mat-flat-button","","color","accent",3,"click"]],template:function(a,p){a&1&&(c(0,"h1",4),d(1),t(2,"localize"),t(3,"async"),s(),Y(4,Dd,14,13,"div",5),t(5,"async")),a&2&&(r(),x(n(3,5,n(2,3,"PAGETITLE"))),r(3),_("ldSpinner",n(5,7,p.getBookingsLoadState$))("ldSpinnerAriaLabelledby","pageTitle"))},dependencies:[be,hn,le,Qe,Xe,Je,pe,F,R],styles:["h3[_ngcontent-%COMP%]{margin:0}.bookings-list[_ngcontent-%COMP%]{padding:0}.bookings-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;margin-bottom:30px}"]});let e=l;return e})();var Dt=ni(ri());var Jn=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e[e.Failed=2]="Failed",e})(Jn||{});var Or=(()=>{let l=class l extends _n{constructor(){super()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-document-status-dialog"]],features:[D([{provide:M,useValue:["document-status-dialog.component"]},B]),Qi],decls:22,vars:20,consts:[["aria-labelledby","popupTitle","aria-describedby","popupContent",1,"display-flex-column","gap-2"],[1,"display-flex-row","gap-2","justify-start","align-center"],["aria-hidden","true",1,"fa-solid","fa-download","margin-right-5"],["id","popupTitle"],[1,"spinner-container"],["color","accent","diameter","100"],["id","popupContent",1,"display-flex-column","gap-1"],[1,"justify-center","align-center"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"div",1),y(2,"span",2),c(3,"b",3),d(4),t(5,"localize"),t(6,"async"),s()(),c(7,"div",4),y(8,"mat-spinner",5),t(9,"localize"),t(10,"async"),s(),c(11,"div",6)(12,"div",7)(13,"b"),d(14),t(15,"localize"),t(16,"async"),s()(),c(17,"div",7)(18,"b"),d(19),t(20,"localize"),t(21,"async"),s()()()()),a&2&&(r(4),x(n(6,6,n(5,4,"POPUP_TITLE"))),r(4),G("aria-label",n(10,10,n(9,8,"ARIA.LOADING"))),r(6),x(n(16,14,n(15,12,"PROGRESS_MESSAGES.MESSAGE1"))),r(5),x(n(21,18,n(20,16,"PROGRESS_MESSAGES.MESSAGE2"))))},dependencies:[xe,ve,na,F,R],styles:["#popupTitle[_ngcontent-%COMP%]{margin-top:0;display:inline-block}.spinner-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:150px;width:100%;margin:20px 0}"]});let e=l;return e})();var Fd=()=>["fas","arrow-down-to-line"];function Md(e,l){e&1&&y(0,"div")}var Zn=(()=>{let l=class l{constructor(){this.localizationService=h(B),this.digitalDocumentService=h(gr),this.dialogHelper=h(Re),this.loadingState=!1,this.isDownloadInProgress=!1}onClickDownload(){this.loadingState=!0,setTimeout(()=>{this.loadingState=!1},5e3),this.processDownload()}processDownload(){this.isDownloadInProgress?this.openNotificationDialog():(this.isDownloadInProgress=!0,this.fetchDocumentFirstTime().subscribe(i=>{this.handleDownloadInfo(i),this.isDownloadInProgress&&(this.openNotificationDialog(),this.pollForDocument())}
1))}fetchDocumentFirstTime(){return this.digitalDocumentService.GetSaleDigitalDocumentsBySaleUid(this.cartUid,this.saleUid).pipe(pi(()=>K(null)))}pollForDocument(){this.pollingSubscription=ko(5e3).pipe(j(()=>this.digitalDocumentService.GetSaleDigitalDocumentsBySaleUid(this.cartUid,this.saleUid)),To(3e5),pi(()=>K(null))).subscribe(i=>{this.handleDownloadInfo(i)})}handleDownloadInfo(i){!i||i.status===Jn.Failed?this.handleDocumentError():i.status===Jn.Completed&&i.downloadUrl!=null&&i.fileName!=null&&(this.download(i.downloadUrl,i.fileName),this.stopPolling(),this.isDownloadInProgress=!1)}handleDocumentError(){this.stopPolling(),this.isDownloadInProgress=!1,this.openErrorDialog()}stopPolling(){this.pollingSubscription&&(this.pollingSubscription?.unsubscribe(),this.pollingSubscription=void 0),this.notificationDialogReference&&(this.notificationDialogReference?.close(),this.notificationDialogReference=void 0)}download(i,a){let p=document.createElement("a");p.href=i,p.id="downloadAnchor",p.download=a,document.body.appendChild(p),p.click(),document.body.removeChild(p)}openNotificationDialog(){this.localizationService.getTranslation("DIALOG.CLOSE").subscribe(i=>{let a={closeButtonText:i,dialogType:Li.Info};this.notificationDialogReference=this.dialogHelper.openAbstractDialogWithComponent(Or,{},null,a)})}openErrorDialog(){O({titleLocalization:this.localizationService.getTranslation("DOCUMENT-ERROR-DIALOG.TITLE"),messageLocalization:this.localizationService.getTranslation("DOCUMENT-ERROR-DIALOG.MESSAGE"),closeButtonText:this.localizationService.getTranslation("DIALOG.CLOSE")}).subscribe(({titleLocalization:i,messageLocalization:a,closeButtonText:p})=>{let m={width:"500px",disableClose:!0};this.dialogHelper.openConfirmationDialog(i,[a],!1,p,void 0,Li.Warning,m)})}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-document-download"]],inputs:{cartUid:"cartUid",saleUid:"saleUid",uniqueId:"uniqueId",saleItemIndex:"saleItemIndex"},features:[D([{provide:M,useValue:["document-download.component"]},B])],decls:8,vars:15,consts:[["mat-stroked-button","","color","accent","aria-haspopup","true",1,"button",3,"click","id","disabled"],[4,"ldSpinner","ldSpinnerDiameter"],[1,"button-contents"],["aria-hidden","true",3,"icon"]],template:function(a,p){a&1&&(c(0,"button",0),k("click",function(){return p.onClickDownload()}),Y(1,Md,1,0,"div",1),c(2,"div",2),y(3,"fa-icon",3),c(4,"span"),d(5),t(6,"localize"),t(7,"async"),s()()()),a&2&&(me("loading",p.loadingState),_("id",Ke("download-button-",p.uniqueId,"-",p.saleItemIndex))("disabled",p.loadingState),r(),_("ldSpinner",p.loadingState)("ldSpinnerDiameter",20),r(2),_("icon",E(14,Fd)),r(2),x(n(7,12,n(6,10,"BUTTONS.DOWNLOAD"))))},dependencies:[le,be,pe,F,R],encapsulation:2});let e=l;return e})();var Nr=(e,l)=>({startDate:e,endDate:l}),Rd=()=>["fas","chevron-down"];function Od(e,l){if(e&1&&(c(0,"strong"),d(1),t(2,"localize"),t(3,"async"),t(4,"dateFormatPipe"),t(5,"async"),s()),e&2){let o=u(3).$implicit;r(),ae(" ",n(3,4,n(2,2,"PRODUCT.VALID_DAY"))," ",n(5,10,he(4,6,o.productStartDate,"
1short-day-month-year",!1))," ")}}function Nd(e,l){if(e&1&&(d(0),t(1,"dateFormatPipe"),t(2,"async"),t(3,"dateFormatPipe"),t(4,"async"),t(5,"localize"),t(6,"async")),e&2){let o=u(3).$implicit;g(" ",n(6,16,we(5,13,"PRODUCT.VALID",Bt(18,Nr,n(2,5,he(1,1,o.productStartDate,o.productStartDate.year()!==o.productEndDate.year()?"short-month-year":"short-month",!1)),n(4,11,he(3,7,o.productEndDate,"short-month-year",!1)))))," ")}}function zd(e,l){if(e&1&&f(0,Od,6,12,"strong")(1,Nd,7,21),e&2){let o=u(2).$implicit;C(o.productStartDate!=null&&o.productStartDate.equals(o.productEndDate)?0:1)}}function Vd(e,l){if(e&1&&(d(0),t(1,"dateFormatPipe"),t(2,"async"),t(3,"dateFormatPipe"),t(4,"async"),t(5,"localize"),t(6,"async")),e&2){let o=u(2).$implicit;g(" ",n(6,16,we(5,13,"PRODUCT.VALID",Bt(18,Nr,n(2,5,he(1,1,o.productStartDate,o.productStartDate.year()!==o.productEndDate.year()?"short-day-month-year":"short-day-month",!1)),n(4,11,he(3,7,o.productEndDate,"short-day-month-year",!1)))))," ")}}function Ud(e,l){if(e&1&&(c(0,"p",8),f(1,zd,2,1)(2,Vd,7,21),s()),e&2){let o=u(),i=o.$implicit,a=o.$index,p=u();_("id",Ke("product-dates-",p.uniqueId,"-",a)),r(),C(i.productPassExpiryType!==p.ProductPassExpiryType.SameAsBooking?1:2)}}function Hd(e,l){if(e&1&&(c(0,"span"),d(1),s()),e&2){let o=u(2).$implicit;r(),g(": ",o.saleBoat.vesselIdentification)}}function $d(e,l){if(e&1&&(c(0,"span"),d(1),t(2,"async"),t(3,"localeCurrency"),t(4,"async"),t(5,"localize"),t(6,"async"),s()),e&2){let o=u(3).$implicit,i=u();r(),ae(" (",n(4,6,n(3,4,n(2,2,i.boatFeePerLength$)[o.productId])),"/",n(6,10,n(5,8,"UNITS.FOOT")),")")}}function Gd(e,l){if(e&1&&(c(0,"span",21)(1,"span"),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"span"),d(6),t(7,"metricConversion"),t(8,"async"),t(9,"localize"),t(10,"async"),s(),f(11,$d,7,12,"span"),t(12,"async"),s()),e&2){let o,i=u(2).$implicit,a=u();r(2),ae("",i.saleBoat.length," ",n(4,7,n(3,5,"UNITS.FEET"))),r(4),ae(" (",n(8,12,we(7,9,i.saleBoat.length,"feet-to-meters"))," ",n(10,16,n(9,14,"UNITS.METERS")),")"),r(5),C(((o=n(12,18,a.boatFeePerLength$))==null?null:o[i.productId])!=null?11:-1)}}function qd(e,l){if(e&1&&(c(0,"p"),y(1,"span",20),c(2,"span",21)(3,"span"),d(4),t(5,"uppercase"),t(6,"localize"),t(7,"async"),s(),f(8,Hd,2,1,"span"),s(),y(9,"br"),f(10,Gd,13,20,"span",21),s()),e&2){let o=u().$implicit,i=u();r(4),g(" ",n(7,7,n(6,5,n(5,3,"VESSEL_TYPES."+i.getSaleBoatTypeKey(o.saleBoat.boatType))))),r(4),C(o.saleBoat!=null&&o.saleBoat.vesselIdentification?8:-1),r(2),C(o.saleBoat.length!=null?10:-1)}}function Wd(e,l){if(e&1&&(c(0,"span",8),d(1),s()),e&2){let o=u(3),i=o.$implicit,a=o.$index,p=u();_("id",Ke("product-make-",p.uniqueId,"-",a)),r(),x(i.saleVehicle.make)}}function Kd(e,l){if(e&1&&(c(0,"span",8),d(1),s()),e&2){let o=u(3),i=o.$implicit,a=o.$index,p=u();_("id",Ke("product-model-",p.uniqueId,"-",a)),r(),g(" ",i.saleVehicle.model)}}function jd(e,l){if(e&1&&(c(0,"span",8),d(1),s()),e&2){let o=u(3),i=o.$implicit,a=o.$index,p=u();_("id",Ke("product-colour-",p.uniqueId,"-",a)),r(),g(", ",i.saleVehicle.colour)}}function Yd(e,l){if(e&1&&(c(0,"p",21),y(1,"span",22),c(2,"span",8),d(3),s(),c(4,"span",8),d(5),s(),y(6,"br"),f(7,Wd,2,4,"span",8),f(8,Kd,2,4,"span",8),f(9,jd,2,4,"span",8),s()),e&2){let o=u(2),i=o.$implicit,a=o.$index,p=u();r(2),_("id",Ke("product-licensePlate-",p.uniqueId,"-",a)),r(),x(i.saleVehicle.licensePlate),r(),_("id",Ke("product-jurisdiction-",p.uniqueId,"-",a)),r(),g(" (",i.saleVehicle.jurisdictionRegion,")"),r(2),C(i.saleVehicle.make?7:-1),r(),C(i.saleVehicle.model?8:-1),r(),C(i.saleVehicle.colour?9:-1)}}function Qd(e,l){if(e&1&&f(0,Yd,10,11,"p",21),e&2){let o=u().$implicit;C(o.saleVehicle!=null?0:-1)}}function Xd(e,l){if(e&1&&(c(0,"div",23),d(1),t(2,"localize"),t(3,"async"),s()),e&2){let o=u(2).$implicit,i=u();_("id",ai("product-serial-number-",i.uniqueId,"-0")),r(),ae(" ",n(3,6,n(2,4,"PRODUCT.SERIAL_NUMBER"))," ",o.serialNumbers[0]," ")}}function Jd(e,l){if(e&1&&(c(0,"div",8),d(1),s()),e&2){let o=l.$implicit,i=l.$index,a=u(5);_("id",Ke("product-serial-number-",a.uniqueId,"-",i)),r(),g(" ",o," ")}}function Zd(e,l){if(e&1&&(c(0,"div"),d(1),t(2,"localize"),t(3,"async"),s(),c(4,"div",24),H(5,Jd,2,4,"div",8,Z),s()),e&2){let o=u(3).$implicit;r(),x(n(3,3,n(2,1,"PRODUCT.SERIAL_NUMBERS"))),r(4),$(o.serialNumbers)}}function em(e,l){if(e&1&&(c(0,"div",8),d(1),s()),e&2){let o=l.$implicit,i=l.$index,a=u(5);_("id",Ke("product-serial-number-",a.uniqueId,"-",i)),r(),g(" ",o," ")}}function im(e,l){if(e&1&&(c(0,"div"),d(1),t(2,"localize"),t(3,"async"),t(4,"localize"),t(5,"async"),s(),c(6,"mat-expansion-panel",25)(7,"mat-expansion-panel-header",26)(8,"mat-panel-title")(9,"span"),d(10),t(11,"localize"),t(12,"async"),s(),y(13,"fa-icon",27),s()(),c(14,"div",24),H(15,em,2,4,"div",8,Z),s()()),e&2){let o=u(3).$implicit;r(),$t(" ",n(3,8,n(2,6,"PRODUCT.SERIAL_NUMBERS"))," ",o.serialNumbers[
10]," ",n(5,12,n(4,10,"PRODUCT.TO"))," ",o.serialNumbers[o.serialNumbers.length-1]," "),r(9),x(n(12,16,n(11,14,"PRODUCT.VIEW_ALL_SERIAL_NUMBERS"))),r(3),_("icon",E(18,Rd)),r(2),$(o.serialNumbers)}}function tm(e,l){if(e&1&&f(0,Zd,7,5)(1,im,17,19),e&2){let o=u(2).$implicit;C(o.serialNumbers.length<=10?0:1)}}function nm(e,l){if(e&1&&f(0,Xd,4,8,"div",23)(1,tm,2,1),e&2){let o=u().$implicit;C(o.serialNumbers.length===1?0:1)}}function om(e,l){if(e&1&&(c(0,"div",8),y(1,"app-document-download",28),s()),e&2){let o=u(),i=o.$implicit,a=o.$index,p=u();_("id",Ke("product-isDownloadable-",p.uniqueId,"-",a)),r(),_("cartUid",p.purchaseDetails.cartUid)("saleUid",i.saleUid)("uniqueId",p.uniqueId)("saleItemIndex",a)}}function am(e,l){if(e&1&&(c(0,"div")(1,"div",15)(2,"div",16)(3,"div",17),d(4),s(),c(5,"div",18)(6,"div"),d(7),t(8,"localizeFromArray"),t(9,"async"),t(10,"localizeFromArray"),t(11,"async"),s(),c(12,"div",19),f(13,Ud,3,4,"p",8),f(14,qd,11,9,"p"),f(15,Qd,1,1),f(16,nm,2,1),f(17,om,2,7,"div",8),s()()(),c(18,"div"),d(19),s()()()),e&2){let o,i=l.$implicit,a=u();r(4),g(" ",i.referenceNumberPostfix," "),r(3),g(" ",((o=n(9,10,n(8,8,i.localizedValues)))==null?null:o.name)+((i.variantLocalizations==null?null:i.variantLocalizations.length)>0?" - "+((o=n(11,14,n(10,12,i.variantLocalizations)))==null?null:o.shortName):"")," "),r(6),C(i.productStartDate&&i.productEndDate&&i.dateRequirements!==a.DateRequirements.NotRequired?13:-1),r(),C(i.saleBoat!=null?14:-1),r(),C(i.saleVehicle!=null?15:-1),r(),C(i.serialNumbers.length>0?16:-1),r(),C(i.isDownloadable?17:-1),r(2),g(" x ",i.quantity," ")}}function rm(e,l){if(e&1&&(c(0,"div",29),d(1),t(2,"localize"),t(3,"async"),s()),e&2){let o=u();me("shipment-status-success",!o.isOrderCancelled)("shipment-status-fail",o.isOrderCancelled),r(),g(" ",n(3,7,n(2,5,o.orderStatusLabel))," ")}}function lm(e,l){e&1&&(c(0,"div")(1,"app-external-link",30),t(2,"localize"),t(3,"async"),c(4,"span"),d(5),t(6,"localize"),t(7,"async"),s()()()),e&2&&(r(),_("linkUrl",de(l))("label",de(n(3,7,n(2,5,"BUTTONS.TRACK_SHIPMENT")))),r(4),x(n(7,11,n(6,9,"BUTTONS.TRACK_SHIPMENT"))))}var eo=(()=>{let l=class l{constructor(){this.localizationService=h(B),this.router=h(Ie),this.store=h(V),this.productHelper=h(mr),this.productService=h(ur),this.componentActive=!0,this.showStatus=!1,this.isOrderCancelled=!1,this.orderStatusLabel=null,this.DateRequirements=xn,this.ProductPassExpiryType=dr,this.store.select(Ne).pipe(oi(()=>this.componentActive),ne(ee),b(re)).subscribe(i=>{this.currencyCode=i.primaryCurrency.currencyCode})}ngOnInit(){if(this.showStatus=this.purchaseDetails.shipmentStatus===zi.Shipped||this.purchaseDetails.shipmentStatus===zi.Cancelled,this.isOrderCancelled=this.purchaseDetails.shipmentStatus===zi.Cancelled,this.purchaseDetails.shipmentStatus!==null&&(this.orderStatusLabel=`SHIPMENTSTATUS.${zi[this.purchaseDetails.shipmentStatus]}`),this.orderTrackingLinkUrl$=this.getTrackingUrl(),this.purchaseDetails.salesSummary.some(i=>i.saleBoat)){let i=this.purchaseDetails.salesSummary.filter(a=>a.saleBoat).map(a=>a.productId);this.boatFeePerLength$=this.productService.getProductInstance(i).pipe(b(a=>i.reduce((m,v)=>{let S=a.find(_e=>_e.productInstance?.productId===v);if(S?.productInstance==null||S.resultType!==Cr.Success)throw new Error;let N=S.productInstance,ie=N.priceDetails.find(_e=>_e.feeType===fr.BoatLength);return ie==null?m:Yi(ji({},m),{[N.productId]:ie.price})},{})))}else this.boatFeePerLength$=K(null)}ngOnDestroy(){this.componentActive=!1}getTotalCharges(){let i=(0,Dt.flatMap)(this.purchaseDetails.salesSummary,m=>m.lineItems),a=(0,Dt.sumBy)(i,m=>m.lineItemTotal),p=(0,Dt.sumBy)(this.purchaseDetails.shipmentLineItems,m=>m.lineItemTotal);return a+p}getTrackingUrl(){return this.store.select(ki).pipe(oi(()=>this.componentActive),ne(I),b(i=>{let a=this.purchaseDetails.orderTrackingUrls.find(p=>p.cultureName===i.cultureName);return a?a.url:null}))}viewPaymentReceipt(){this.router.navigate(["/transaction-receipt-purchase",this.purchaseDetails.cartUid,this.purchaseDetails.cartTransactionUid,!0])}getSaleBoatTypeKey(i){return this.productHelper.getAllowedBoatTypes(i)?.[0]??"OTHER"}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-product-purchase-details"]],inputs:{purchaseDetails:"purchaseDetails",uniqueId:"uniqueId"},features:[D([{provide:M,useValue:["product-purchase-details.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:43,vars:50,consts:[[1,"card"],[1,"p-5","p-3_xs"],[1,"reference-number"],[1,"bold"],[1,"display-flex-row_gt-sm","justify-space-between_gt-sm"],["id","purchase",1,"flex-60","flex-80_sm","justify-start","margin-bottom-20-xs"],[1,"display-flex-row","justify-space-between","mb-2"],[1,"bold",3,"id"],[3,"id"],[1,"cdk-visually-hidden"],["open","",3,"id"],[1,"mb-2"],[1,"display-flex-column","gap-2"],["mat-flat-button","","color","primary","id","view-receipt","aria-labelledby","view-receipt",1,"button",3,"click","keyup.enter"],[1,"status",3,"shipment-status-success","shipment-status-fail"],[1,"display-flex-row","justify-space-between"],[1,"display-flex-row","gap-2","flex-80_xs"],[1,"cart-order-number","reference-number-container","bg-accent-500"],[1,"purchase-item-column"],[1,"small"],["aria-hidden","true",1,"fa-regular","fa-ship","color-accent-300","mr-1"],["role","note"],["aria-hidden","true",1,"fa-regular","fa-car","color-accent-300","mr-1"],[1,"margin-bottom-10",3,"id"],[1,"margin-bottom-10"],["hideToggle","",1,"invisible-expansion-panel","link-style"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"expansion-panel-toggle",3,"icon"],[3,"cartUid","saleUid","uniqueId","saleItemIndex"],[1,"status"],[3,"linkUrl","label"]],template:function(a,p){if(a&1&&(c(0,"div",0)(1,"div",1)(2,"div",2)(3,"span"),d(4),t(5,"localize"),t(6,"async"),s(),c(7,"span",3),d(8),s()(),c(9,"div",4)(10,"div",5),t(11,"localize"),t(12,"async"),c(13,"div",6)(14,"div",7),d(15),t(16,"dateFormatPipe"),t(17,"async"),s(),c(18,"div",8)(19,"div",9),d(20),t(21,"localize"),t(22,"async"),s(),c(23,"div",3),d(24),t(25,"localeCurrency"),t(26,"async"),s()()(),c(27,"details",10)(28,"summary",11),d(29),t(30,"localize"),t(31,"async"),s(),c(32,"div",12),H(33,am,20,16,"div",null,Z),s()()(),c(35,"div",12)(36,"button",13),k("click",function(){return p.viewPaymentReceipt()})("keyup.enter",function(){return p.viewPaymentReceipt()}),d(37),t(38,"localize"),t(39,"async"),s(),f(40,rm,4,9,"div",14),f(41,lm,8,13,"div"),t(42,"async"),s()()()()),a&2){let m;r(4),g("",n(6,21,n(5,19,"PRODUCT.REFERENCE_NUMBER"))," "),r(4),x(p.purchaseDetails.cartReferenceNumber),r(2),G("aria-label",n(12,25,n(11,23,"ARIA.ITEMS_PURCHASED_ON"))),r(4),_("id",ai("purchase-date-",p.uniqueId)),r(),g(" ",n(17,30,we(16,27,p.purchaseDetails.createdDate,"short-day-month-year"))," "),r(3),_("id",ai("purchase-total-",p.uniqueId)),r(2),g(" ",n(22,34,n(21,32,"PRODUCT.TOTAL"))," "),r(4),g(" ",n(26,38,n(25,36,p.getTotalCharges()))," "),r(3),G("aria-labelledby",Ke("purchase purchase-date-",p.uniqueId," purchase-total-",p.uniqueId)),_("id",ai("purchase-summary-",p.uniqueId)),r(2),x(n(31,42,n(30,40,"ARIA.PURCHASED_ITEMS"))),r(4),$(p.purchaseDetails.salesSummary),r(4),g(" ",n(39,46,n(38,44,"BUTTONS.RECEIPT_TITLE"))," "),r(3),C(p.showStatus?40:-1),r(),C((m=n(42,48,p.orderTrackingLinkUrl$))?41:-1,m)}},dependencies:[Qe,Xe,Je,pe,Zn,le,Ba,F,Oo,R,ii,Ta,Ct,ei],styles:[".shipment-status-success[_ngcontent-%COMP%]{color:#006f32}.shipment-status-fail[_ngcontent-%COMP%]{color:#c7031c}.reference-number[_ngcontent-%COMP%]{font-size:17px}p[_ngcontent-%COMP%]{margin-bottom:5px}"]});let e=l;return e})();function pm(e,l){if(e&1&&(c(0,"li",3),y(1,"app-product-purchase-details",5),s()),e&2){let o=l.$implicit,i=l.$index;r(),_("purchaseDetails",o)("uniqueId",i)}}function sm(e,l){e&1&&(c(0,"div",4),y(1,"span",6),c(2,"div",7)(3,"p"),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2&&(r(4),x(n(6,3,n(5,1,"NO_PURCHASES.DESC"))))}function cm(e,l){if(e&1&&(c(0,"div")(1,"ul",2),t(2,"localize"),t(3,"async"),H(4,pm,2,2,"li",3,Z),s(),f(6,sm,7,5,"div",4),s()),e&2){let o=u();r(),G("aria-label",n(3,4,n(2,2,"ARIA.PRODUCT_PURCHASES"))),r(3),$(o.productPurchases),r(2),C(o.productPurchases.length===0?6:-1)}}var io=(()=>{let l=class l{constructor(){this.trackByIndexFn=h(Ze),this.shopperService=h(A
1i),this.serviceErrorHelper=h(Te),this.localizationService=h(B),this.store=h(V),this.productPurchases=[],this.errorMessages=[],this.componentActive=!0}ngOnInit(){let i=this.shopperService.getProductPurchases(),a=X(()=>i);this.purchasesLoadStatus$=a.pipe(ke()),i.pipe(oi(()=>this.componentActive)).subscribe(p=>{this.productPurchases=p},p=>{this.errorMessages=[];let m=this.serviceErrorHelper.parseErrorMessageResult(p);m.messageKey&&this.localizationService.getTranslation(m.messageKey).subscribe(v=>{this.errorMessages.push(v)})})}ngOnDestroy(){this.componentActive=!1}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-product-purchases"]],features:[D([{provide:M,useValue:["product-purchases.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:6,vars:9,consts:[["id","pageTitle",1,"h1"],[4,"ldSpinner","ldSpinnerAriaLabelledby"],[1,"no-bullet"],[1,"mb-3"],[1,"information-box","align-center"],[3,"purchaseDetails","uniqueId"],["aria-hidden","true",1,"fas","fa-info-circle"],[1,"content"]],template:function(a,p){a&1&&(c(0,"h1",0),d(1),t(2,"localize"),t(3,"async"),s(),Y(4,cm,7,6,"div",1),t(5,"async")),a&2&&(r(),x(n(3,5,n(2,3,"PAGETITLE"))),r(3),_("ldSpinner",n(5,7,p.purchasesLoadStatus$)>0)("ldSpinnerAriaLabelledby","pageTitle"))},dependencies:[be,eo,F,R],encapsulation:2});let e=l;return e})();var dm=e=>[e];function mm(e,l){e&1&&y(0,"app-loading-shimmer",2)}function um(e,l){e&1&&(y(0,"app-alert-box",3),t(1,"localize"),t(2,"async"),t(3,"localize"),t(4,"async")),e&2&&_("title",de(n(2,5,n(1,3,"ERROR.TITLE"))))("messages",ce(11,dm,n(4,9,n(3,7,l))))}function fm(e,l){e&1&&(c(0,"div")(1,"a",4),d(2),t(3,"localize"),t(4,"async"),s()()),e&2&&(r(2),x(n(4,3,n(3,1,"PASSWORD.ADD_PASSWORD"))))}function Cm(e,l){if(e&1){let o=z();c(0,"div")(1,"button",5),k("afterDebounce",function(){P(o);let a=u(3);return w(a.removePassword())}),d(2),t(3,"localize"),t(4,"async"),s()()}e&2&&(r(2),g(" ",n(4,3,n(3,1,"PASSWORD.REMOVE_PASSWORD"))," "))}function gm(e,l){if(e&1&&(c(0,"h2"),d(1),t(2,"localize"),t(3,"async"),s(),c(4,"p"),d(5),s(),f(6,fm,5,5,"div"),t(7,"async"),f(8,Cm,5,5,"div"),t(9,"async")),e&2){let o=l,i=u(2);r(),x(n(3,6,n(2,4,"EMAIL"))),r(4),x(o.email),r(),C(o.accountType===i.accountType.External&&n(7,8,i.enableInternalLogin$)?6:-1),r(2),C(o.accountType===i.accountType.Hybrid&&n(9,10,i.enableInternalLogin$)?8:-1)}}function _m(e,l){e&1&&(c(0,"h2"),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),x(n(3,3,n(2,1,"CURRENT"))))}function hm(e,l){if(e&1&&y(0,"img",7),e&2){let o=u().$implicit;_("src",o.image,so),G("alt",o.name)}}function xm(e,l){if(e&1){let o=z();c(0,"button",10),k("afterDebounce",function(){P(o);let a=u().$implicit,p=u(3);return w(p.unlinkProvider(a))}),d(1),t(2,"localize"),t(3,"async"),s()}e&2&&(r(),g(" ",n(3,3,n(2,1,"LINK.UNLINK"))," "))}function ym(e,l){if(e&1&&(c(0,"div")(1,"h3",6),f(2,hm,1,2,"img",7),d(3),t(4,"localize"),t(5,"async"),s(),f(6,xm,4,5,"button",8),t(7,"async"),c(8,"p",9),d(9),t(10,"localize"),t(11,"async"),t(12,"dateFormatPipe"),t(13,"async"),t(14,"dateFormatPipe"),t(15,"async"),s()()),e&2){let o=l.$implicit,i=u(3);r(2),C(o.image?2:-1),r(),g(" ",n(5,8,n(4,6,o.displayName))," "),r(3),C(n(7,10,i.canUnlinkProviders$)?6:-1),r(3),Mo("",n(11,14,n(10,12,"DATE"))," ",n(13,19,we(12,16,o.dateAddedUtc,"short-day-month-year"))," ",n(15,24,we(14,21,o.dateAddedUtc,"time-of-day")))}}function vm(e,l){if(e&1&&(f(0,_m,4,5,"h2"),H(1,ym,16,26,"div",null,Z)),e&2){let o=l;C(o.length>0?0:-1),r(),$(o)}}function bm(e,l){e&1&&(c(0,"h2"),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),x(n(3,3,n(2,1,"AVAILABLE"))))}function Sm(e,l){if(e&1&&y(0,"img",7),e&2){let o=u().$implicit;_("src",o.image,so),G("alt",o.name)}}function Em(e,l){if(e&1){let o=z();c(0,"div")(1,"button",11),k("afterDebounce",function(){let a=P(o).$implicit,p=u(3);return w(p.linkProvider(a))}),f(2,Sm,1,2,"img",7),d(3),t(4,"localize"),t(5,"async"),t(6,"localize"),t(7,"async"),s()()}if(e&2){let o=l.$implicit;r(2),C(o.image?2:-1),r(),ae(" ",n(5,5,n(4,3,"LINK.ADDLINK"))," ",n(7,9,n(6,7,o.displayName))," ")}}function Bm(e,l){if(e&1&&(f(0,bm,4,5,"h2"),H(1,Em,8,11,"div",null,Z)),e&2){let o=l;C(o.length>0?0:-1),r(),$(o)}}function Im(e,l){if(e&1&&(f(0,um,5,13,"app-alert-box",3),t(1,"async"),f(2,gm,10,12),t(3,"async"),f(4,vm,3,1),t(5,"async"),f(6,Bm,3,1),t(7,"async")),e&2){let o,i,a,p,m=u();C((o=n(1,4,m.errorMessages$))?0:-1,o),r(2),C((i=n(3,6,m.userInfo$))?2:-1,i),r(2),C((a=n(5,8,m.linkedProviders$))?4:-1,a),r(2),C((p=n(7,10,m.availableProviders$))?6:-1,p)}}
1var Tm={apple:"/assets/images/shared/apple.png",facebook:"/assets/images/shared/facebook.png",gccf:"/assets/images/shared/mapleleaf.png",google:"/assets/images/shared/google.png",keycloak:"/assets/images/shared/keycloak.png",microsoft:"/assets/images/shared/microsoft.png",myyukon:"/assets/images/shared/yukon.png"},to=(()=>{let l=class l{constructor(){this.activatedRoute=h(Ti),this.currentUserService=h(ye),this.dialogHelper=h(Re),this.localizationService=h(B),this.serviceErrorHelper=h(Te),this.store=h(V),this.availableProviders$=new Oe(null),this.linkedProviders$=new Oe(null),this.loading$=new Oe(U.Loading),this.userInfo$=new Oe(null),this.canUnlinkProviders$=new Oe(null),this.errorMessages$=new Oe(null),this.loadState=U,this.accountType=je}ngOnInit(){let i=this.currentUserService.getAccountProviders().pipe(T()),a=this.currentUserService.getUserInfo().pipe(T());X(()=>O({providers:i,userInfo:a})).subscribe({next:m=>{this.loading$.next(m.loadState),m.loadState===U.Loaded?this.setAccountProviders(m.value.providers,m.value.userInfo):m.loadState===U.Failed&&this.handleError(m.error)}}),this.loading$.subscribe(m=>{let v=this.activatedRoute.snapshot.queryParams.error;v!=null?(this.handleError({messageKey:v}),this.loading$.next(U.Failed)):m!==U.Failed&&this.errorMessages$.next(null)}),this.enableInternalLogin$=this.store.select(rt).pipe(T(I))}linkProvider(i){let a=this.localizationService.currentLocale?.cultureName??"";document.location.href=`${document.location.origin}/api/auth/external-link?provider=${i.name}&uiLocales=${a}`}unlinkProvider(i){X(()=>this.confirmUnlink().pipe(W(p=>p?this.currentUserService.unlinkProvider(i):hi),j(()=>O({providers:this.currentUserService.getAccountProviders().pipe(T()),userInfo:this.currentUserService.getUserInfo().pipe(T())})))).subscribe({next:p=>{this.loading$.next(p.loadState),p.loadState===U.Loaded?this.setAccountProviders(p.value.providers,p.value.userInfo):p.loadState===U.Failed&&this.handleError(p.error)}})}removePassword(){this.errorMessages$.next(null),this.confirmRemovePassword().pipe(W(i=>i?this.currentUserService.removePassword():hi),j(()=>this.currentUserService.getUserInfo().pipe(T()))).subscribe({next:i=>this.userInfo$.next(i),error:i=>this.handleError(i)})}handleError(i){let a=this.serviceErrorHelper.parseErrorMessageResult(i);this.errorMessages$.next(a?.messageKey??"ERROR.LINK_FETCH_FAIL")}confirmUnlink(){return O({title:this.localizationService.getTranslation("LINK.UNLINK_DIALOG_TITLE"),message:this.localizationService.getTranslation("LINK.UNLINK_DIALOG_MESSAGE")}).pipe(W(({title:i,message:a})=>{let p=this.dialogHelper.openConfirmationDialog(i,[a]);return Hi(p.componentInstance.cancelled.pipe(b(()=>!1),A()),p.componentInstance.confirmed.pipe(b(()=>!0),A()))}))}confirmRemovePassword(){return O({title:this.localizationService.getTranslation("PASSWORD.DIALOG_TITLE"),message:this.localizationService.getTranslation("PASSWORD.DIALOG_MESSAGE")}).pipe(W(({title:i,message:a})=>{let p=this.dialogHelper.openConfirmationDialog(i,[a]);return Hi(p.componentInstance.cancelled.pipe(b(()=>!1),A()),p.componentInstance.confirmed.pipe(b(()=>!0),A()))}))}setAccountProviders(i,a){let p=i.map(m=>Yi(ji({},m),{image:Tm[m.name.toLowerCase()]??null}));this.availableProviders$.next(p.filter(m=>!m.linked)),this.linkedProviders$.next(p.filter(m=>m.linked)),this.userInfo$.next(a),this.canUnlinkProviders$.next(p.filter(m=>m.linked)?.length>1||a?.accountType!==je.External)}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-linked-accounts"]],features:[D([{provide:M,useValue:["linked-accounts.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:9,vars:11,consts:[[1,"container-sm"],["id","pageTitle"],["height","30px","width","100%"],["alertType","error","addTopMargin","10px",3,"title","messages"],["routerLink","/account/password",2,"margin-top","7%"],["mat-stroked-button","","color","accent","debounceEvent","click",1,"button",3,"afterDebounce"],["data-layoutAlign","start center"],[1,"mr-2","provider-image",3,"src"],["mat-button","","color","accent","debounceEvent","click",1,"button"],[1,"mt-1"],["mat-button","","color","accent","debounceEvent","click",1,"button",3,"afterDebounce"],["mat-stroked-button","","color","accent","debounceEvent","click","data-layoutAlign","center",1,"button",3,"afterDebounce"]],template:function(a,p){a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),f(5,mm,1,0,"app-loading-shimmer",2),t(6,"async"),f(7,Im,8,12),t(8,"async"),s()),a&2&&(r(2),x(n(4,5,n(3,3,"PAGETITLE"))),r(3),C(n(6,7,p.loading$)===p.loadState.Loading?5:-1),r(2),C(n(8,9,p.loading$)!==p.loadState.Loading?7:-1))},dependencies:[ht,qe,at,le,ln,F,R,ii],styles:["h2[_ngcontent-%COMP%]{margin-top:35px}h3[_ngcontent-%COMP%]:first-child{margin-top:0}.provider-image[_ngcontent-%COMP%]{background-color:#fff;margin-bottom:2px}"],changeDetection:0});let e=l;return e})();var no=(()=>{let l=class l{constructor(){this.currentUserService=h(ye),this.router=h(Ie)}canActivate(){return this.currentUserService.getUserInfo().pipe(b(i=>i==null||i.accountType===je.External?this.router.createUrlTree(["/account"]):!0))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275prov=Ao({token:l,factory:l.\u0275fac});let e=l;return e})();var oo=()=>["fas","check"],ao=()=>["fas","circle"],zr=()=>["far","lock-alt"],Vr=e=>[e];function km(e,l){e&1&&d(0),e&2&&g(" ",l.email," ")}function Pm(e,l){e&1&&(c(0,"mat-error",15),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),x(n(3,3,n(2,1,"ERROR.required"))))}function wm(e,l){if(e&1&&(c(0,"mat-error",15),d(1),t(2,"async"),s()),e&2){let o=u();r(),g(" ",n(2,1,o.passwordErrorMessage())," ")}}function Am(e,l){e&1&&(c(0,"mat-error",15),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"ERROR.required"))," "))}function Lm(e,l){e&1&&(c(0,"mat-error",15),d(1),t(2,"localize"),t(3,"async"),s()),e&2&&(r(),g(" ",n(3,3,n(2,1,"ERROR.equal"))," "))}function Dm(e,l){e&1&&(y(0,"app-alert-box",20),t(1,"localize"),t(2,"async"),t(3,"localize"),t(4,"async")),e&2&&_("title",de(n(2,6,n(1,4,"ERROR.TITLE"))))("messages",ce(12,Vr,n(4,10,n(3,8,l))))("addBottomMargin","20p
1x")}function Fm(e,l){if(e&1&&(c(0,"div"),f(1,Dm,5,14,"app-alert-box",20),t(2,"async"),s()),e&2){let o,i=u();r(),C((o=n(2,1,i.errorMessage$))?1:-1,o)}}function Mm(e,l){e&1&&(c(0,"div"),y(1,"app-alert-box",21),t(2,"localize"),t(3,"async"),t(4,"localize"),t(5,"async"),s()),e&2&&(r(),_("title",de(n(3,8,n(2,6,"SUCCESS.TITLE"))))("messages",ce(14,Vr,n(5,12,n(4,10,"SUCCESS.MESSAGE"))))("alertType","success")("addBottomMargin","20px")("addTopMargin","20px"))}var ro=(()=>{let l=class l{constructor(){this.currentUserService=h(ye),this.passwordValidationHelper=h(St),this.serviceErrorHelper=h(Te),this.store=h(V),this.ref=h(Ro),this.subscriptions=new Rt,this.errorMessage=new Oe(null),this.loading=new Oe(U.Loading),this.userInfo=new Oe(null),this.loadState=U,this.PasswordValidationPropertyTypes=Bn,this.passwordValidationResult$=null,this.addPasswordFormModel=new ot({newPassword:new di("",{nonNullable:!0,validators:[We(),_i(),this.validatePassword()]}),confirmPassword:new di("",{nonNullable:!0,validators:[We(),_i()]})},bt(!0)),this.errorMessage$=this.errorMessage.asObservable(),this.loading$=this.loading.asObservable(),this.userInfo$=this.userInfo.asObservable()}ngOnInit(){this.subscriptions.add(this.addPasswordFormModel.statusChanges.subscribe(()=>this.ref.markForCheck())),this.getUserInfo()}ngOnDestroy(){this.subscriptions.unsubscribe()}submitForm(){this.addPasswordFormModel.valid?this.addPassword():this.addPasswordFormModel.markAllAsTouched()}isPasswordPropertyPassing(i){let a=this.addPasswordFormModel.get("newPassword")?.errors?.passwordValidation;return a==null?!0:!a.includes(i)}passwordErrorMessage(){let i=this.addPasswordFormModel.get("newPassword")?.errors?.passwordValidation[0];return this.passwordValidationHelper.getFailureStringForPropertyType(i)}validatePassword(){return i=>{let a=i.value,p=this.passwordValidationHelper.validatePassword(a);return p.passed?null:{passwordValidation:p.failures}}}addPassword(){let i=this.addPasswordFormModel.get("newPassword")?.value,a=this.addPasswordFormModel.get("confirmPassword")?.value;if(i!=null&&a!=null){let p=X(()=>this.currentUserService.addPassword(i,a).pipe(A(),si(()=>this.store.dispatch(lt({eventName:"addPassword"})))));this.errorMessage.next(null),p.subscribe({next:m=>{this.loading.next(m.loadState),m.loadState===U.Failed&&this.handleError(m.error)}})}}getUserInfo(){let i=X(()=>this.currentUserService.getUserInfo());this.errorMessage.next(null),i.subscribe({next:a=>{a.loadState===U.Loaded?this.userInfo.next(a.value):a.loadState===U.Failed&&this.handleError(a.error)}})}handleError(i){let a=this.serviceErrorHelper.parseErrorMessageResult(i);this.errorMessage.next(a?.messageKey??"ERROR")}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-add-password"]],features:[D([{provide:M,useValue:["add-password.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:75,vars:88,consts:[[1,"container-sm"],["id","pageTitle",1,"h1"],["data-layout","column-reverse","data-layout.gt-xs","row-reverse","data-layoutGap","30px"],["data-flex","auto","id","password-rules"],[1,"password-requirements-title"],["data-layout","column","data-layoutGap","10px",1,"password-requirements-list"],["data-layout","row","data-layoutAlign","start center","data-layoutGap","4px"],["size","md","data-flex","24px","aria-hidden","true",3,"icon"],["id","password-form-group","data-flex","300px",1,"form-wrapper",3,"formGroup"],[1,"field-wrapper","mb-4"],[1,"form-control-wrapper"],["id","newPassword-label","for","newPassword","aria-owns","newPassword"],["appearance","outline","appShowPasswordToggle",""],["matPrefix","","aria-hidden","true",3,"icon"],["id","newPassword","aria-labelledby","newPassword-label","type","password","matInput","","required","","formControlName","newPassword","aria-labelledby","password-rules"],["aria-live","assertive","aria-atomic","true"],["id","confirmPassword-label","for","confirmPassword","aria-owns","confirmPassword"],["id","confirmPassword","aria-labelledby","confirmPassword-label","type","password","matInput","","required","","formControlName","confirmPassword"],["id","updatePasswordButton","mat-flat-button","","color","primary","type","submit",1,"button","full-width",3,"click"],[1,"button-contents"],["id","error",3,"title","messages","addBottomMargin"],["id","success",3,"title","messages","alertType","addBottomMargin","addTopMargin"]],template:function(a,p){if(a&1&&(c(0,"div",0)(1,"h1",1),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"p"),d(6),t(7,"localize"),t(8,"async"),y(9,"br"),f(10,km,1,1
1),t(11,"async"),s(),c(12,"div",2)(13,"div",3)(14,"h3",4),d(15),t(16,"localize"),t(17,"async"),s(),c(18,"ul",5)(19,"li",6),y(20,"fa-icon",7),c(21,"span"),d(22),t(23,"localize"),t(24,"async"),s()(),c(25,"li",6),y(26,"fa-icon",7),c(27,"span"),d(28),t(29,"localize"),t(30,"async"),s()(),c(31,"li",6),y(32,"fa-icon",7),c(33,"span"),d(34),t(35,"localize"),t(36,"async"),s()(),c(37,"li",6),y(38,"fa-icon",7),c(39,"span"),d(40),t(41,"localize"),t(42,"async"),s()()()(),c(43,"form",8)(44,"div",9)(45,"div",10)(46,"label",11),d(47),t(48,"localize"),t(49,"async"),s(),c(50,"mat-form-field",12),y(51,"fa-icon",13)(52,"input",14),f(53,Pm,4,5,"mat-error",15),f(54,wm,3,3,"mat-error",15),s()(),c(55,"div",10)(56,"label",16),d(57),t(58,"localize"),t(59,"async"),s(),c(60,"mat-form-field",12),y(61,"fa-icon",13)(62,"input",17),f(63,Am,4,5,"mat-error",15),f(64,Lm,4,5,"mat-error",15),s()()(),c(65,"button",18),k("click",function(){return p.submitForm()}),c(66,"div",19)(67,"span"),d(68),t(69,"localize"),t(70,"async"),s()()()()(),f(71,Fm,3,3,"div"),t(72,"async"),f(73,Mm,6,16,"div"),t(74,"async"),s()),a&2){let m,v,S;r(2),x(n(4,34,n(3,32,"PAGETITLE"))),r(4),g(" ",n(8,38,n(7,36,"ADD_PASSWORD_FOR"))),r(4),C((m=n(11,40,p.userInfo$))?10:-1,m),r(5),x(n(17,44,n(16,42,"PASSWORD.TITLE"))),r(5),me("valid",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minLength)),_("icon",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minLength)?E(78,oo):E(79,ao)),r(2),x(n(24,48,n(23,46,"PASSWORD.REQ1"))),r(4),me("valid",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minUpperCase)),_("icon",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minUpperCase)?E(80,oo):E(81,ao)),r(2),x(n(30,52,n(29,50,"PASSWORD.REQ2"))),r(4),me("valid",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minLowerCase)),_("icon",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minLowerCase)?E(82,oo):E(83,ao)),r(2),x(n(36,56,n(35,54,"PASSWORD.REQ3"))),r(4),me("valid",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minNumbers)),_("icon",p.isPasswordPropertyPassing(p.PasswordValidationPropertyTypes.minNumbers)?E(84,oo):E(85,ao)),r(2),x(n(42,60,n(41,58,"PASSWORD.REQ4"))),r(3),_("formGroup",p.addPasswordFormModel),r(4),g(" ",n(49,64,n(48,62,"FORM.PLACEHOLDER.NEW_PASSWORD"))," "),r(4),_("icon",E(86,zr)),r(2),C(!((v=p.addPasswordFormModel.get("newPassword"))==null||v.errors==null)&&v.errors.required?53:-1),r(),C(((S=p.addPasswordFormModel.get("newPassword"))==null||S.errors==null||S.errors.passwordValidation==null?null:S.errors.passwordValidation.length)>0?54:-1),r(3),g(" ",n(59,68,n(58,66,"FORM.PLACEHOLDER.CONFIRM_PASSWORD"))," "),r(4),_("icon",E(87,zr)),r(2),C(p.addPasswordFormModel.hasError("confirmPassword","confirmPassword")?63:-1),r(),C(p.addPasswordFormModel.hasError("newPassword","newPassword")?64:-1),r(4),x(n(70,72,n(69,70,"BUTTON.UPDATE"))),r(3),C(n(72,74,p.loading$)===p.loadState.Failed?71:-1),r(2),C(n(74,76,p.loading$)===p.loadState.Loaded?73:-1)}},dependencies:[pe,Ee,Ue,De,Fe,Ve,Ii,Be,He,$e,Pe,In,Ci,Me,Ge,le,qe,F,R],styles:[".form-width[_ngcontent-%COMP%]{width:100%;max-width:760px;margin:auto}.password-requirements-title[_ngcontent-%COMP%]{font-size:18px;font-weight:700}@media screen and (min-width:600px){#password-rules[_ngcontent-%COMP%]{margin-left:10px}}@media screen and (max-width:599px){#password-form-group[_ngcontent-%COMP%]{margin-bottom:10px}#password-form-group[_ngcontent-%COMP%] #updatePassword[_ngcontent-%COMP%]{height:auto}}.password-requirements-list[_ngcontent-%COMP%]{padding-left:0;margin-bottom:0;list-style:none}.password-requirements-list[_ngcontent-%COMP%] .ng-fa-icon[_ngcontent-%COMP%]{font-size:6px;text-align:center}.password-requirements-list[_ngcontent-%COMP%] .ng-fa-icon.valid[_ngcontent-%COMP%]{font-size:16px}"],changeDetection:0});let e=l;return e})();var Ur=e=>{let l=h(ye),o=h(Ie);return l.getUserInfo().pipe(b(i=>i!=null&&i.accountType===je.External?!0:o.createUrlTree(["/account"])))};var fe=(function(e){return e[e.SUBMITTED=0]="SUBMITTED",e[e.REJECTED=1]="REJECTED",e[e.OFFER_PENDING=2]="OFFER_PENDING",e[e.CLAIMED=3]="CLAIMED",e[e.WITHDRAWN=4]="WITHDRAWN",e[e.EXPIRED=5]="EXPIRED",e[e.UNSUCCESSFUL=6]="UNSUCCESSFUL",e})(fe||{}),Ui={[fe.SUBMITTED]:{type:fe.SUBMITTED,iconClass:"fas fa-check",statusClass:"status-success",label:"STATUS.SUBMITTED"},[fe.REJECTED]:{type:fe.REJECTED,iconClass:"fas fa-times",statusClass:"status-fail",label:"STATUS.REJECTED"},[fe.OFFER_PENDING]:{type:fe.OFFER_PENDING,iconClass:"fas fa-stars",statusClass:"status-success",label:"STATUS.OFFER_PENDING"},[fe.CLAIMED]:{type:fe.CLAIMED,iconClass:"fas fa-badge-check",statusClass:"status-success",label:"STATUS.CLAIMED"},[fe.WITHDRAWN]:{type:fe.WITHDRAWN,iconClass:"fas fa-times-circle",statusClass:"status-expired",label:"STATUS.WITHDRAWN"},[fe.EXPIRED]:{type:fe.EXPIRED,iconClass:"fas fa-times",statusClass:"status-expired",label:"STATUS.EXPIRED"},[fe.UNSUCCESSFUL]:{type:fe.UNSUCCESSFUL,iconClass:"fas fa-times",statusClass:"status-expired",label:"STATUS.UNSUCCESSFUL"}};var Ft=ni(ri());var Rm=()=>["fas","chevron-down"],Om=()=>["far","ticket-alt"],Nm=()=>["far","map-marker-alt"],zm=()=>["far","user"],Hr=()=>
1["far","campground"],Vm=()=>["far","user-friends"],Um=e=>({count:e}),Io=()=>["far","ruler-horizontal"];function Hm(e,l){if(e&1&&(c(0,"h3",17)(1,"span",18),d(2),t(3,"dateFormatPipe"),t(4,"async"),s(),c(5,"span",19),d(6,"-"),s(),c(7,"span",20),d(8),t(9,"dateFormatPipe"),t(10,"async"),s()()),e&2){let o=u(3);r(2),g(" ",n(4,6,he(3,2,o.booking.currentVersion==null?null:o.booking.currentVersion.startDate,"weekday-month-day",!1))," "),r(6),g(" ",n(10,12,he(9,8,o.booking.currentVersion==null?null:o.booking.currentVersion.endDate,"short-week-day-month-year",!1))," ")}}function $m(e,l){if(e&1&&(c(0,"h3",18),d(1),t(2,"dateFormatPipe"),t(3,"async"),s()),e&2){let o=u(3);r(),g(" ",n(3,5,he(2,1,o.booking.currentVersion==null?null:o.booking.currentVersion.startDate,"short-week-day-month-year",!1))," ")}}function Gm(e,l){if(e&1&&(f(0,Hm,11,14,"h3",17),t(1,"async"),Xi(2,$m,4,7,"h3",18)),e&2){let o=u(2);C(n(1,1,o.isDayUse$)===!1?0:2)}}function qm(e,l){if(e&1&&f(0,Gm,3,3),e&2){let o=u();C((o.booking.currentVersion==null?null:o.booking.currentVersion.startDate)!=null?0:-1)}}function Wm(e,l){if(e&1&&(c(0,"div")(1,"div",21),y(2,"span",22),c(3,"p"),d(4),t(5,"localize"),t(6,"async"),s()()()),e&2){let o=u();Fo(ai("status ",o.displayStatus.statusClass)),r(2),_("ngClass",o.displayStatus.iconClass),r(2),x(n(6,7,n(5,5,o.displayStatus.label)))}}function Km(e,l){e&1&&Bi(0)}function jm(e,l){e&1&&Bi(0)}function Ym(e,l){e&1&&y(0,"fa-icon",25),e&2&&_("icon",E(1,Om))}function Qm(e,l){e&1&&y(0,"fa-icon",25),e&2&&_("icon",E(1,Nm))}function Xm(e,l){if(e&1&&(c(0,"div",24),f(1,Ym,1,2,"fa-icon",25),t(2,"async"),f(3,Qm,1,2,"fa-icon",25),t(4,"async"),c(5,"p")(6,"strong"),d(7),t(8,"async"),s(),d(9),t(10,"localizeFromArray"),t(11,"async"),s()()),e&2){let o,i=l,a=u(2);r(),C(n(2,4,a.isActivityBooking$)?1:-1),r(2),C(n(4,6,a.isActivityBooking$)===!1?3:-1),r(4),x(n(8,8,a.unitName$)),r(2),g(" ",(o=n(11,12,n(10,10,i==null?null:i.localizedValues)))==null?null:o.name," ")}}function Jm(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),s()()),e&2){let o=u(2);r(),_("icon",E(8,zm)),r(3),x(n(6,6,n(5,4,"LABELS.OCCUPANT"))),r(3),ae(" ",o.waitlistApplication.occupant.firstName," ",o.waitlistApplication.occupant.lastName," ")}}function Zm(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),t(8,"localizeFromArray"),t(9,"async"),s()()),e&2){let o;r(),_("icon",E(11,Hr)),r(3),x(n(6,5,n(5,3,"LABELS.EQUIPMENT"))),r(3),g(" ",(o=n(9,9,n(8,7,l.localizedValues)))==null?null:o.name," ")}}function e0(e,l){if(e&1&&(d(0),t(1,"localize"),t(2,"async"),c(3,"button",26),t(4,"async"),t(5,"localizeFromArray"),t(6,"async"),t(7,"localize"),t(8,"async"),y(9,"span",27),s()),e&2){let o,i=u(),a=u(),p=u(2);g(" ",n(2,7,we(1,4,a===1?"LABELS.GUEST":"LABELS.GUESTS",ce(19,Um,a)))," "),r(3),_("matTooltip",p.getPartySizeTooltip(i))("matTooltipClass","multiline-tooltip"),G("aria-label",((o=n(6,13,n(5,11,(o=n(4,9,p.peopleCapacityCategory$))==null?null:o.localizedValues)))==null?null:o.displayName)+" "+n(8,17,n(7,15,"GLOBAL_ARIA.MORE_INFO")))}}function i0(e,l){if(e&1&&d(0),e&2){let o=u(2);g(" ",o," ")}}function t0(e,l){e&1&&f(0,e0,10,21)(1,i0,1,1),e&2&&C(l.length>0?0:1)}function n0(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"async"),t(6,"localizeFromArray"),t(7,"async"),s(),f(8,t0,2,1),t(9,"async"),s()()),e&2){let o,i,a=u(2);r(),_("icon",E(11,Vm)),r(3),g(" ",(o=n(7,7,n(6,5,(o=n(5,3,a.peopleCapacityCategory$))==null?null:o.localizedValues)))==null?null:o.displayName," "),r(4),C((i=n(9,9,a.partySizeBreakdown$))?8:-1,i)}}function o0(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"async"),t(6,"localizeFromArray"),t(7,"async"),s(),d(8),s()()),e&2){let o,i=u(2);r(),_("icon",E(9,Hr)),r(3),x((o=n(7,7,n(6,5,(o=n(5,3,i.equipmentCapacityCategory$))==null?null:o.localizedValues)))==null?null:o.displayName),r(4),g(" ",l," ")}}function a0(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),s()()),e&2){let o=u(2);r(),_("icon",E(7,Io)),r(3),x(n(6,5,n(5,3,"LABELS.LENGTH"))),r(3),g(" ",o.waitlistApplication.boatLength," ")}}function r0(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),s()()),e&2){let o=u(2);r(),_("icon",E(7,Io)),r(3),x(n(6,5,n(5,3,"LABELS.DRAFT"))),r(3),g(" ",o.waitlistApplication.boatDraft," ")}}function l0(e,l){if(e&1&&(c(0,"div",24),y(1,"fa-icon",25),c(2,"p")(3,"strong"),d(4),t(5,"localize"),t(6,"async"),s(),d(7),s()()),e&2){let o=u(2);r(),_("icon",E(7,Io)),r(3),x(n(6,5,n(5,3,"LABELS.BEAM"))),r(3),g(" ",o.waitlistApplication.boatWidth," ")}}function p0(e,l){if(e&1&&(c(0,"div",23),f(1,Xm,12,14,"div",24),t(2,"async"),f(3,Jm,8,9,"div",24),f(4,Zm,10,12,"div",24),t(5,"async"),f(6,n0,10,12,"div",24),t(7,"async"),f(8,o0,9,10,"div",24),t(9,"async"),f(10,a0,8,8,"div",24),f(11,r0,8,8,"div",24),f(12,l0,8,8,"div",24),s()),e&2){let o,i,a,p,m=u();G("data-layoutAlign.gt-md","space-evenly center"),r(),C((o=n(2,9,m.resource$))?1:-1,o),r(2),C(m.waitlistApplication.occupant?3:-1),r(),C((i=n(5,11,m.subEquipmentCategory$))?4:-1,i),r(2),C((a=n(7,13,m.partySize$))?6:-1,a),r(2),C((p=n(9,15,m.equipmentC
1ount$))?8:-1,p),r(2),C(m.waitlistApplication.boatLength!=null?10:-1),r(),C(m.waitlistApplication.boatDraft!=null?11:-1),r(),C(m.waitlistApplication.boatWidth?12:-1)}}function s0(e,l){if(e&1){let o=z();c(0,"li")(1,"button",28),k("click",function(){P(o);let a=u();return w(a.viewApplicationConfirmationLetter(a.waitlistApplication.cartUid,a.waitlistApplication.waitlistApplicationUid))}),y(2,"span",29),c(3,"span"),d(4),t(5,"localize"),t(6,"async"),s()()(),c(7,"li")(8,"button",28),k("click",function(){P(o);let a=u();return w(a.viewPaymentReceipt(a.waitlistApplication.cartUid,a.waitlistApplication.currentVersion==null?null:a.waitlistApplication.currentVersion.cartTransactionUid))}),y(9,"span",30),c(10,"span"),d(11),t(12,"localize"),t(13,"async"),s()()()}e&2&&(r(4),x(n(6,4,n(5,2,"BUTTON.VIEW_CONFIRMATION"))),r(7),x(n(13,8,n(12,6,"BUTTON.VIEW_RECEIPT"))))}function c0(e,l){if(e&1){let o=z();c(0,"li")(1,"button",31),k("click",function(){P(o);let a=u();return w(a.claimBooking())}),y(2,"span",32),c(3,"span"),d(4),t(5,"localize"),t(6,"async"),s()()(),c(7,"li")(8,"button",33),k("click",function(){P(o);let a=u();return w(a.declineOffer())}),y(9,"span",34),c(10,"span"),d(11),t(12,"localize"),t(13,"async"),s()()()}e&2&&(r(4),x(n(6,4,n(5,2,"BUTTON.CLAIM_BOOKING"))),r(7),x(n(13,8,n(12,6,"BUTTON.DECLINE_OFFER"))))}function d0(e,l){if(e&1){let o=z();c(0,"li")(1,"button",33),k("click",function(){P(o);let a=u(2);return w(a.viewReservationDetails(a.booking.bookingUid))}),y(2,"span",35),c(3,"span"),d(4),t(5,"localize"),t(6,"async"),s()()()}e&2&&(r(4),x(n(6,3,n(5,1,"BUTTON.VIEW_RESERVATION"))))}function m0(e,l){if(e&1&&f(0,d0,7,5,"li"),e&2){let o=u();C(o.booking!=null?0:-1)}}var $r=(()=>{let l=class l{constructor(){this.router=h(Ie),this.dialogHelper=h(Re),this.localizationService=h(B),this.store=h(V),this.actions$=h($o),this.bookingHelper=h(Ri),this.cartService=h(Fi),this.waitlistApplicationHelper=h(yo),this.progressHelper=h(vo),this.globalProgressHelper=h(Pa),this.loadingSpinnerService=h(ta),this.categoryLabelFormatHelper=h(xt),this.cartHelper=h(wa),this.bookingValidationService=h(At),this.permitHolderValidationHelper=h(bo),this.applicationRejected=new Vt,this.STATUS_TYPE=fe}ngOnInit(){this.waitlistApplication=this.getWaitlistApplicationFromCart(this.cart),this.booking=this.cart.bookings.find(a=>a.bookingUid===this.waitlistApplication?.currentVersion?.bookingUid)??null,this.store.dispatch(pa()),this.waitlist$=this.store.select(Sa(this.waitlistApplication.waitlistId)).pipe(T(I));let i=this.waitlist$.pipe(j(a=>this.store.select(Jt(a.bookingCategoryId))),T(I),Ce({refCount:!0,bufferSize:1}));if(this.isDayUse$=i.pipe(b(a=>a?.bookingModel===pn.DayUse)),this.displayStatus=this.getDisplayStatus(this.waitlistApplication.currentVersion?.status??null),this.unitName$=i.pipe(j(a=>this.categoryLabelFormatHelper.getResourceLabel(a.bookingCategoryId))),this.isActivityBooking$=this.bookingHelper.isBookingActivity(this.booking),this.booking!=null){let a=(0,Ft.find)(this.cartHelper.getBlockersForBookingOnCart(this.cart,this.booking?.bookingUid));if(a?.currentVersion?.resourceId!=null&&a?.currentVersion?.resourceLocationId!=null){let{resourceId:p,resourceLocationId:m}=a.currentVersion;this.store.dispatch(new sa(m)),this.resource$=this.store.select(xa(m,p)).pipe(T(I))}}this.waitlistApplication.equipmentCategoryId!=null&&(this.store.dispatch(new en),this.subEquipmentCategory$=this.store.select(da(this.waitlistApplication.equipmentCategoryId)).pipe(T(I),b(a=>a?.subEquipmentCategories.find(p=>p.subEquipmentCategoryId===this.waitlistApplication?.subEquipmentCategoryId)??null),ne(I))),this.store.dispatch(new on),this.equipmentCapacityCategory$=O({bookingCategory:i,capacityCategories:this.store.select(Fa).pipe(T(I))}).pipe(b(({bookingCategory:a,capacityCategories:p})=>p.find(m=>m.capacityCategoryId===a.capacityCategoryId)??p.find(m=>m.capacityCategoryId===a.additionalCapacityCategoryId)??null),Ce({refCount:!0,bufferSize:1})),this.peopleCapacityCategory$=O({bookingCategory:i.pipe(T(I)),capacityCategories:this.store.select(Da).pipe(T(I))}).pipe(b(({bookingCategory:a,capacityCategories:p})=>p.find(m=>m.capacityCategoryId===a.capacityCategoryId)??p.find(m=>m.capacityCategoryId===a.additionalCapacityCategoryId)??null),T(),Ce({refCount:!0,bufferSize:1})),this.partySize$=this.peopleCapacityCategory$.pipe(T(I),b(a=>this.waitlistApplication.bookingCapacityCategoryCounts!=null?kt.retrieveCapacityCounts(this.waitlistApplication.bookingCapacityCategoryCounts,a):null),b(a=>a?.reduce((p,m)=>p+(m.count??0),0)??null),Ce(1)),this.partySizeBreakdown$=this.peopleCapacityCategory$.pipe(T(I),b(a=>({peopleCapacityCategory:a,peopleCapacityCounts:this.waitlistApplication.bookingCapacityCategoryCounts!=null?kt.retrieveCapacityCounts(this.waitlistApplication.bookingCapacityCategoryCounts,a):null})),b(({peopleCapacityCategory:a,peopleCapacityCounts:p})=>p==null?[]:kt.getPartySizeBreakdown(a,p)),Ce(1)),this.equipmentC
1ount$=this.equipmentCapacityCategory$.pipe(T(I),b(a=>this.waitlistApplication.bookingCapacityCategoryCounts!=null?kt.retrieveCapacityCounts(this.waitlistApplication.bookingCapacityCategoryCounts,a):null),b(a=>a?.reduce((p,m)=>p+(m.count??0),0)??null),Ce(1))}viewApplicationConfirmationLetter(i,a){this.router.navigate(["/account/application-confirmation-letter"],{queryParams:{[_t.CART_UID]:i,[_t.WAITLIST_APPLICATION_UID]:a}})}viewPaymentReceipt(i,a){this.router.navigate(["/transaction-receipt-purchase",i,a,!0])}claimBooking(){let i=this.booking;i?.currentVersion!=null&&this.initializeNewTransaction().pipe(Ye(a=>{let p=Ae(a.bookings.find(v=>v.bookingUid===i.bookingUid)),m=this.getWaitlistApplicationFromCart(a);return m.newVersion=this.waitlistApplicationHelper.createNewWaitlistApplicationVersion(Ae(m.currentVersion),a.newTransaction.cartTransactionUid),m.newVersion.status=Le.Claimed,this.bookingHelper.createNewWorkingBookingVersion(p,a.newTransaction.cartTransactionUid).pipe(j(()=>this.permitHolderIsValid(a,p)),Ye(()=>{let v=Ae(p.newVersion);return v.bookingStatus=cn.Confirmed,v.deferredPayment=!1,this.store.dispatch(wi({workingBookingUid:p.bookingUid})),this.cartService.commitCart(a,!1)}))}),Ye(()=>this.progressHelper.defineWorkflow())).subscribe(()=>{this.globalProgressHelper.setActiveProgressHelper(this.progressHelper),this.router.navigateByUrl("/ch
1ange-booking/reservationmessages")})}declineOffer(){this.store.select(Ne).pipe(T(ee),b(re),b(i=>i.waitlistSettings),b(i=>this.localizationService.getLocalizationForCurrentCultureFromList(i.localizedValues)),Ye(i=>{let a=i?.displayLabel??"";return O({dialogTitle:this.localizationService.getTranslation("WITHDRAW_OFFER_DIALOG.TITLE").pipe(T()),dialogBody:this.localizationService.getTranslation("WITHDRAW_OFFER_DIALOG.BODY",{waitlistFeatureLabel:a}).pipe(T()),dialogConfirmText:this.localizationService.getTranslation("WITHDRAW_OFFER_DIALOG.CONFIRM").pipe(T()),dialogCancelText:this.localizationService.getTranslation("WITHDRAW_OFFER_DIALOG.CANCEL").pipe(T())})}),b(({dialogTitle:i,dialogBody:a,dialogConfirmText:p,dialogCancelText:m})=>this.dialogHelper.openConfirmationDialog(i,[a],!0,p,m)),Ye(i=>Hi(i.componentInstance.confirmed.pipe(b(()=>!0)),i.componentInstance.cancelled.pipe(b(()=>!1)))),T(),Ye(i=>i?(this.loadingSpinnerService.setLoadState(U.Loading),this.declineWaitlistApplicationDraw()):hi)).subscribe(i=>{this.store.dispatch(new aa),this.loadingSpinnerService.setLoadState(U.Loaded),i?this.applicationRejected.emit():O({title:this.localizationService.getTranslation("GENERIC_ERROR.TITLE"),message:this.localizationService.getTranslation("GENERIC_ERROR.MESSAGE")}).subscribe(({title:a,message:p})=>this.dialogHelper.openGenericDialog(a,[p]))})}viewReservationDetails(i){this.router.navigate(["/account/booking-details",i])}getPartySizeTooltip(i){return this.categoryLabelFormatHelper.getPartySizeTooltip(i)}declineWaitlistApplicationDraw(){let i=this.booking;return i!=null?(this.store.dispatch(new Zt(this.cart.cartUid,i.bookingUid)),Hi(this.actions$.pipe(It(st.FetchCancelBookingCartSuccess),T(),b(()=>!0)),this.actions$.pipe(It(st.FetchCancelBookingCartFail),T(),b(()=>!1))).pipe(Ye(a=>a?this.store.select(Di).pipe(T(I)):bi(()=>new Error("Failed to fetch cancel booking cart"))),b(a=>(0,Ft.cloneDeep)(a)),Ye(a=>{let p=this.getWaitlistApplicationFromCart(a);p.newVersion=this.waitlistApplicationHelper.createNewWaitlistApplicationVersion(Ae(p.currentVersion),a.newTransaction.cartTransactionUid),p.newVersion.status=Le.Withdrawn;let m=a.bookings.find(v=>v.bookingUid===i.bookingUid);return m?.newVersion!=null&&(m.newVersion.deferredPayment=!1),this.cartService.commitCartOnServer(a,!0,!1)}),b(()=>!0),pi(()=>K(!1)))):hi}
1initializeNewTransaction(){return this.store.dispatch(new la(st.FetchCartByUidSuccess,this.cart)),this.store.dispatch(new oa),Hi(this.actions$.pipe(It(st.InitializeNewCartTransactionSuccess),T(),b(()=>!0)),this.actions$.pipe(It(st.InitializeNewCartTransactionFail),T(),b(()=>!1))).pipe(Ye(i=>i?this.store.select(Di).pipe(T(I)):bi(()=>new Error("Failed to initialize new cart transaction"))),b(i=>(0,Ft.cloneDeep)(i)))}getDisplayStatus(i){switch(i){case Le.Submitted:return Ui[fe.SUBMITTED];case Le.Rejected:return Ui[fe.REJECTED];case Le.Unclaimed:return Ui[fe.OFFER_PENDING];case Le.Claimed:return Ui[fe.CLAIMED];case Le.Withdrawn:return Ui[fe.WITHDRAWN];case Le.Expired:return Ui[fe.EXPIRED];case Le.Unsuccessful:return Ui[fe.UNSUCCESSFUL];default:return null}}getWaitlistApplicationFromCart(i){return Ae(i.waitlistApplications.find(a=>a.currentVersion!=null),"Cart must contain a waitlist application")}permitHolderIsValid(i,a){let p=i.newTransaction.cartTransactionUid;return O({uniqueBookingCustomerRuleResult:this.bookingValidationService.doesUniqueBookingCustomerRulePassOnTransaction(a.bookingUid,p),singleResourceConsecutiveMaxStayRuleResult:this.bookingValidationService.doesSingleResourceConsecutiveMaxStayRulePassOnTransaction(a.bookingUid,p),maxOccupancyPerPeriodRuleResult:this.bookingValidationService.doesMaxOccupancyPerPeriodRulePass(a.bookingUid,p),evaluateBookingCategoryConsecutiveMaxStayRuleResult:a.newVersion?.resourceLocationId!=null?this.bookingValidationService.doesBookingCategoryConsecutiveMaxStayRulePass(a.bookingUid,p):K({rulePassed:!0,maxStay:null}),evaluateVacancyRulesResult:this.permitHolderValidationHelper.evaluateVacancyRules(a,p),bookingCategories:this.store.select(yi).pipe(T(ee),b(re))}).pipe(j(({uniqueBookingCustomerRuleResult:m,singleResourceConsecutiveMaxStayRuleResult:v,maxOccupancyPerPeriodRuleResult:S,evaluateBookingCategoryConsecutiveMaxStayRuleResult:N,evaluateVacancyRulesResult:ie,bookingCategories:_e})=>{let te=_e.find(ze=>ze.bookingCategoryId===a.bookingCategoryId);if(m)if(v)if(S)if(N.rulePassed){if(!ie.rulePassed)return O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.MINUMUM_VACANCY_FAIL",{minimumVacancy:ie.minimumVacancy,maxBookingLength:te?.maxBookingLengthDays})})}else{let ze=te?Ae(this.localizationService.getLocalizationForCurrentCultureFromList(te.localizedValues)).name:"";return O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.BOOKING_CATEGORY_CONSECUTIVE_MAX_STAY_FAIL",{bookingCategoryName:ze,maxBookingLength:N.maxStay})})}else return O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.OCCUPANCY_PERPERIOD_FAIL")});else return O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.SINGLE_RESOURCE_MAXSTAY_OCCUPANT_FAIL")});else return O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.UNIQUE_OCCUPANT_FAIL")});return K(null)}),j(m=>m!=null?(this.dialogHelper.openGenericDialog(m.title,[m.message]),hi):K(!0)))}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-compact-application-summary"]],inputs:{cart:"cart"},outputs:{applicationRejected:"applicationRejected"},features:[D([{provide:M,useValue:["compact-application-summary.component"]},B,yo,At,bo,{provide:vo,useClass:hr}])],decls:38,vars:34,consts:[["bookingDetails",""],[1,"compact-booking"],[1,"reservation-number"],["data-layout.gt-xs","row","data-layout","column",1,"compact-booking_box","card","compact-booking_box--with-buttons"],["data-flex","auto","data-layout.gt-sm","row","data-layout","column",1,"compact-booking_box-content"],["data-flex.gt-md","275px","data-flex","auto",1,"compact-booking_box_status-location-date"],[1,"location-date-wrapper"],[1,"location-status","mb-3"],["id","park-location-html",1,"compact-park-name"],[3,"class"],["data-flex","auto",1,"compact-booking_box_booking-details"],["data-flex","auto",1,"hide-lt-sm"],[4,"ngTemplateOutlet"],["hideToggle","",1,"invisible-expansion-panel","link-style","hide-gt-sm"],["collapsedHeight","auto","expandedHeight","auto"],["aria-hidden","true",1,"expansion-panel-toggle",3,"icon"],[1,"compact-booking_box_booking-buttons"],[1,"reserved-dates"],["id","reserved-date-start-date"],[1,"separator"],["id","reserved-date-end-date"],[1,"status-label"],["aria-hidden","true",3,"ngClass"],["data-flex","auto","data-layout","row wrap",1,"booking-detail-list"],[1,"booking-detail"],["size","lg","aria-hidden","true",3,"icon"],["mat-flat-button","","type","button","appTooltipTouchTrigger","",1,"info-toggle",3,"matTooltip","matTooltipClass"],["aria-hidden","true",1,"fa-regular","fa-info-circle","color-accent-500"],["mat-stroked-button","","color","accent",1,"button","full-width",3,"click"],[1,"fas","fa-print","ng-fa-icon"],[1,"fas","fa-receipt","ng-fa-icon"],["mat-flat-button","","color","primary",1,"button","full-width",3,"click"],[1,"fas","fa-badge-check","ng-fa-icon"],["mat-flat-button","","color","accent",1,"button","full-width",3,"click"],[1,"fas","fa-times","ng-fa-icon"],[1,"fas","fa-info-circle","ng-fa-icon"]],template:function(a,p){if(a&1&&(c(0,"div",1)(1,"p",2),d(2),t(3,"localize"),t(4,"async"),s(),c(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"h2",8),d(11),t(12,"async"),t(13,"localizeFromArray"),t(14,"async"),s(),f(15,qm,1,1),s(),f(16,Wm,7,9,"div",9),s()(),c(17,"div",10)(18,"div",11),Y(19,Km,1,0,"ng-container",12),s(),c(20,"mat-expansion-panel",13)(21,"mat-expansion-panel-header",14)(22,"mat-panel-title")(23,"span"),d(24),t(25,"localize"),t(26,"async"),s(),y(27,"fa-icon",15),s()(),Y(28,jm,1,0,"ng-container",12),s(),Y(29,p0,13,17,"ng-template",null,0,it),s()(),c(31,"div",16)(32,"ul"),t(33,"localize"),t(34,"async"),f(35,s0,14,10),f(36,c0,14,10),f(37,m0,1,1),s()()()()),a&2){let m,v=ci(30);r(2),$t(" ",n(4,17,n(3,15,"REF_NUMBER"))," ",p.cart.referenceNumberPrefix,"-",p.cart.referenceNumberSuffix," ",p.booking==null?null:p.booking.referenceNumberPostfix," "),r(9),g(" ",(m=n(14,23,n(13,21,(m=n(12,19,p.waitlist$))==null?null:m.localizedValues)))==null?null:m.dis
1playName," "),r(4),C(p.booking!=null?15:-1),r(),C(p.displayStatus!=null?16:-1),r(3),_("ngTemplateOutlet",v),r(5),x(n(26,27,n(25,25,"BUTTON.MORE"))),r(3),_("icon",E(33,Rm)),r(),_("ngTemplateOutlet",v),r(4),G("aria-label",n(34,31,n(33,29,"NAVIGATION_ARIA"))),r(3),C((p.displayStatus==null?null:p.displayStatus.type)===p.STATUS_TYPE.SUBMITTED?35:-1),r(),C((p.displayStatus==null?null:p.displayStatus.type)===p.STATUS_TYPE.OFFER_PENDING?36:-1),r(),C((p.displayStatus==null?null:p.displayStatus.type)===p.STATUS_TYPE.CLAIMED?37:-1)}},dependencies:[xe,tt,nt,ve,pe,le,Qe,Xe,Je,Aa,La,F,R,ii,ei],encapsulation:2,changeDetection:0});let e=l;return e})();function u0(e,l){if(e&1){let o=z();c(0,"li")(1,"app-compact-application-summary",3),k("applicationRejected",function(){P(o);let a=u(4);return w(a.applicationRejected())}),s()()}if(e&2){let o=l.$implicit;r(),_("cart",o)}}function f0(e,l){if(e&1&&(c(0,"ul",2),H(1,u0,2,1,"li",null,Z),s()),e&2){let o=u();r(),$(o)}}function C0(e,l){e&1&&f(0,f0,3,0,"ul",2),e&2&&C(l.length>0?0:-1)}function g0(e,l){if(e&1&&(c(0,"div"),f(1,C0,1,1),t(2,"async"),s()),e&2){let o,i=u();r(),C((o=n(2,1,i.waistlistAppicationCarts$))?1:-1,o)}}var Gr=(()=>{let l=class l{constructor(){this.shopperService=h(Ai),this.store=h(V)}ngOnInit(){this.initializeObservables()}applicationRejected(){this.initializeObservables()}initializeObservables(){this.waistlistAppicationCarts$=this.store.select(Ne).pipe(ne(ee),b(re),j(a=>a.waitlistSettings.enableWaitlist?this.shopperService.getCartsWithWaitlistApplications():K([])),b(a=>this.sortWaitlistApplicationFromCart(a)),Ce({bufferSize:1,refCount:!0}));let i=X(()=>this.waistlistAppicationCarts$);this.getApplicationsLoadState$=i.pipe(ke())}sortWaitlistApplicationFromCart(i){return[...i].sort((a,p)=>{let m=this.getWaitlistApplicationFromCart(a),v=this.getWaitlistApplicationFromCart(p);return v==null?0:m?.createDate.isBefore(v.createDate)?1:-1})}getWaitlistApplicationFromCart(i){return i.waitlistApplications.find(a=>a.currentVersion!=null)??null}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-my-applications-dashboard"]],features:[D([{provide:M,useValue:["my-applications-dashboard.component"]},B])],decls:6,vars:9,consts:[["id","pageTitle",1,"h1"],[4,"ldSpinner","ldSpinnerAriaLabelledby"],["aria-labelledby","pageTitle",1,"applications-list"],[3,"applicationRejected","cart"]],template:function(a,p){a&1&&(c(0,"h1",0),d(1),t(2,"localize"),t(3,"async"),s(),Y(4,g0,3,3,"div",1),t(5,"async")),a&2&&(r(),x(n(3,5,n(2,3,"PAGETITLE"))),r(3),_("ldSpinner",n(5,7,p.getApplicationsLoadState$))("ldSpinnerAriaLabelledby","pageTitle"))},dependencies:[xe,ve,be,$r,F,R],styles:[".applications-list[_ngcontent-%COMP%]{padding:0}.applications-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;margin-bottom:30px}"],changeDetection:0});let e=l;return e})();var _0=()=>["fas","envelope"];function h0(e,l){if(e&1&&(y(0,"app-html-viewer",4),t(1,"async")),e&2){let o=u();_("htmlString",n(1,1,o.confirmationHtml$))}}function x0(e,l){e&1&&y(0,"app-loading-shimmer",5),e&2&&_("width","100%")("height","100%")}var qr=(()=>{let l=class l{constructor(){this.emailService=h(vt),this.localizationService=h(B),this.dialogHelper=h(Re),this.currentUserService=h(ye);let i=h(Ti);this.cartUid=i.snapshot.queryParams[_t.CART_UID],this.waitlistApplicationUid=i.snapshot.queryParams[_t.WAITLIST_APPLICATION_UID]}ngOnInit(){this.confirmationHtml$=this.emailService.getWaitlistApplicationConfirmationEmail(this.cartUid,this.waitlistApplicationUid).pipe(T(),pi(a=>(O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.LETTER_UNAVAILABLE")}).subscribe(({title:p,message:m})=>{this.dialogHelper.openGenericDialog(p,[m])}),bi(()=>a))));let i=X(()=>this.confirmationHtml$);this.loadingStatus$=i.pipe(ke())}sendConfirmation(){this.currentUserService.getFullShopper().pipe(T(I),j(i=>this.emailService.sendWaitlistApplicationConfirmationEmail(this.cartUid,this.waitlistApplicationUid).pipe(pi(a=>(O({title:this.localizationService.getTranslation("ERROR.TITLE"),message:this.localizationService.getTranslation("ERROR.RESEND_LETTER_FAILED")}).subscribe(({title:p,message:m})=>{this.dialogHelper.openGenericDialog(p,[m])}),bi(()=>a))),si(()=>{this.localizationService.getTranslation("RESEND_DIALOG.TITLE",{email:i.currentVersion.email}).subscribe(a=>{this.dialogHelper.openGenericDialog(a,[],Li.Info)})})))).subscribe()}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=L({type:l,selectors:[["app-application-confirmation-letter"]],features:[D([{provide:M,useValue:["application-confirmation-letter.component"]},{provide:ue,useValue:"PAGETITLE"},B])],decls:22,vars:25,consts:[["firstButton",""],["id","pageTitle",1,"h1"],[1,"display-flex-row_gt-xs","gap-6"],[1,"email-wrapper"],[3,"htmlString"],["shimmerType","sidebar",3,"width","height"],[1,"side-bar"],["mat-flat-button","","color","accent","id","sendConfirmation",1,"button","full-width","resend-button",3,"click"],["aria-hidden","true",1,"fa",3,"icon"]],template:function(a,p){if(a&1){let m=z();c(0,"h1",1),d(1),t(2,"localize"),t(3,"async"),s(),c(4,"div",2)(5,"div",3),f(6,h0,2,3,"app-html-viewer",4),t(7,"async"),Xi(8,x0,1,2,"app-loading-shimmer",5),s(),c(9,"div",6)(10,"ul"),t(11,"localize"),t(12,"async"),c(13,"li")(14,"button",7,0),t(16,"localize"),t(17,"async"),k("click",function(){return P(m),w(p.sendConfirmation())}),y(18,"fa-icon",8),d(19),t(20,"localize"),t(21,"async"),s()()()()()}a&2&&(r(),x(n(3,8,n(2,6,"PAGETITLE"))),r(5),C(n(7,10,p.loadingStatus$)<=0?6:8),r(4),G("aria-label",n(12,14,n(11,12,"NAVIGATION.ARIA"))),r(4),G("aria-label",n(17,18,n(16,16,"ACCESSIBLE_EMAIL"))),r(4),_("icon",E(24,_0)),r(),g(" ",n(21,22,n(20,20,"EMAIL"))," "))},dependencies:[xe,ht,ve,pe,tr,le,F,R],styles:["ul[_ngcontent-%COMP%]{padding:0}ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:block;margin-bottom:10px}.email-wrapper[_ngcontent-%COMP%]{width:75%;max-width:850px}@media(max-width:599px){.email-wrapper[_ngcontent-%COMP%]{width:100%}}.side-bar[_ngcontent-%COMP%]{width:25%}@media(max-width:599px){.side-bar[_ngcontent-%COMP%]{width:100%}}.resend-button[_ngcontent-%COMP%]{white-space:normal;word-wrap:break-word}"],changeDetection:0});let e=l;return e})();var y0=[{path:"",component:Lt,pathMatch:"full"},{path:"booking-details/:bookingUid",component:zn},{path:"change-email",component:$n},{path:"change-password",component:Hn,canActivate:[no]},{path:"group-holds",component:jn}
1,{path:"group-hold-details/:groupHoldUid",component:Yn},{path:"group-hold-search",component:qn},{path:"update-profile",component:Gn},{path:"delete-account-confirmation",component:gn},{path:"all-bookings",component:Xn},{path:"my-purchases",component:io},{path:"my-applications",component:Gr},{path:"application-confirmation-letter",component:qr},{path:"notification-dashboard",component:_r},{path:"linked",component:to},{path:"password",component:ro,canActivate:[Ur]},{path:"**",component:Ka}],Wr=Go.forChild(y0);var Kr=(()=>{let l=class l{};l.\u0275fac=function(a){return new(a||l)},l.\u0275mod=Ut({type:l}),l.\u0275inj=Nt({imports:[xe,ve,Ee,Be,Vi,Wn,Kn,jn]});let e=l;return e})();var v3=(()=>{let l=class l{};l.\u0275fac=function(a){return new(a||l)},l.\u0275mod=Ut({type:l}),l.\u0275inj=Nt({providers:[St,za,ti,xr,kn,no,rr,Pn,At],imports:[xe,ve,Wr,Ee,Be,Kr,yr,gn,vn,yn,lr,pr,wn,An,ht,Yn,Lt,zn,Nn,Fn,Lt,Hn,$n,Gn,qn,Rn,On,Mn,Xn,eo,io,Zn,to,ro]});let e=l;return e})();export{v3 as AccountModule};
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.