PageSourceSearch

https://app.navan.com/app/user2/chunk-5M2RMCEH.js

js navan.com collected 2026-10-09 22:19:29 UTC 650,868 bytes, 6 lines download raw bytes

1import{a as Al,b as Ol,c as ua,d as ga,e as Ml,f as Nl,g as Rl,h as bl,i as yl,j as fa,k as $i,l as Il,m as xl}from"./chunk-AYPPLT5H.js";import"./chunk-HHAPHPNX.js";import"./chunk-JNR6HDOY.js";import"./chunk-MNVCYIUX.js";import{B as Ea}from"./chunk-GQDDNJOJ.js";import"./chunk-6BJ5LY7X.js";import"./chunk-FO6UW2VC.js";import"./chunk-B6ORLTNX.js";import"./chunk-AX4SIYLO.js";import{b as hl}from"./chunk-FFLOATFW.js";import"./chunk-CDTEOHTW.js";import"./chunk-ALC3ECTC.js";import"./chunk-3GD2M23P.js";import"./chunk-KFVWP22H.js";import"./chunk-TUQK7V6H.js";import"./chunk-AC4XIAIJ.js";import"./chunk-N5ODF7FI.js";import"./chunk-LHNUOERR.js";import"./chunk-DFZPXSZE.js";import"./chunk-EI2I7RRB.js";import"./chunk-TKT2EPHT.js";import"./chunk-NF5GJHM6.js";import"./chunk-S7CEITTC.js";import"./chunk-Y6F55EQY.js";import"./chunk-Z3WRWWXR.js";import"./chunk-ARA67ZR4.js";import"./chunk-7VTH5PK2.js";import"./chunk-TBD3ME57.js";import"./chunk-UFKN57BU.js";import"./chunk-E276LU7A.js";import"./chunk-WWQB7AKK.js";import"./chunk-SHSYBYUK.js";import"./chunk-KS5MNKO6.js";import"./chunk-VKBGHIM4.js";import"./chunk-NJZ3C2JF.js";import"./chunk-EIJBWYPP.js";import"./chunk-ZRHS57GR.js";import{Ba as pa,Ca as gl,Fa as fl,Ha as vl,Ja as Tl,Ma as Sl,Oa as Tt,P as _a,Pa as ma,Q as sl,Qa as Pl,Ra as Cl,W as ll,ja as _l,la as cl,ma as dl,na as ka,oa as ca,pa as Da,qa as pl,ra as ml,ta as da,ua as ve,va as El,ya as Kn,za as ul}from"./chunk-MTO2OXVC.js";
1import"./chunk-J7ONZKQE.js";import"./chunk-G43EJQRQ.js";import"./chunk-N3P7UXEU.js";import"./chunk-3WVLO5E7.js";import"./chunk-NLKFSJYV.js";import{i as al}from"./chunk-QNZINZLI.js";import"./chunk-QPSOS4K4.js";import"./chunk-PBCURBT6.js";import"./chunk-A4JZBTDX.js";import"./chunk-DHQCF66V.js";import"./chunk-PGNI3NEF.js";import"./chunk-VKKA3QBI.js";import"./chunk-TLXPHDJZ.js";import"./chunk-OH4CVPKO.js";import"./chunk-2FU57O6I.js";import"./chunk-7A7DUP6P.js";import{d as rl}from"./chunk-TQNGT3PH.js";import{Ch as tc,Ea as ra,Fh as nc,Hf as qs,Jb as js,Rd as Ws,Rf as Js,Sg as tl,Ve as sa,Xa as Hs,Ya as Xs,_h as nl,a as Us,af as Qs,ag as la,b as X,bg as Zs,ca as Yn,f as tn,fa as Vs,g as ws,ga as ks,h as jn,he as Va,i as Ae,j as na,ja as Ds,mc as Ys,na as Wn,ng as el,nj as ol,oa as nn,pa as ri,qa as oa,ra as $s,sa as Gs,se as Ks,ta as aa,ti as il,ua as Bs,w as ia,wa as eo,xa as to,za as zs}from"./chunk-2HTSMB3W.js";import"./chunk-UICSX6FJ.js";import{D as Di}from"./chunk-RQW3QHDQ.js";import{Ae as ta,Be as Ls,Fb as zn,Hd as Zo,Id as ea,Nb as ki,Qd as Is,Re as vt,Td as Xn,Vd as xs,ac as Rs,cc as bs,ee as Fs,hc as ys,nb as Ss,pb as Li,z as en,zb as Ps}from"./chunk-G2FWHV6E.js";import{Ba as Cs,Ca as Tn,Da as Jo,Ga as hs,Ia as Sn,Ja as As,K as qo,Ka as Os,L as fs,La as ye,Ma as sn,Na as Ui,O as vs,Oa as Pe,Pa as On,Qa as Ua,Ra as Rt,Ta as wi,Ua as Zi,Za as wa,_a as Pn,bb as Fe,ca as xi,cb as Ms,db as Hn,ha as Fi,lb as Vi,mb as Ns,q as us,wa as z,xa as H,ya as x,za as nt}from"./chunk-GJ5GG56Q.js";import{$ as Ts,K as La,c as Nt,h as gs}from"./chunk-XDCHYCW7.js";import{Oa as Ji,Va as Pt,g as D,h as vn}from"./chunk-6GURXS2R.js";import{$ as je,$a as gi,$h as Hr,A as Xe,Af as br,Al as Ci,Ao as $o,Ba as ut,Bl as Ee,Bn as gt,Bq as ms,C as mi,Ci as vi,Cl as qr,Cp as ls,Cq as Es,Da as ui,Dk as Mo,Dp as Xo,El as hi,F as $t,Fk as No,Fn as es,Fq as Wo,Ga as Eo,Gl as ie,Gn as bi,Gp as _s,H as vr,I as Ut,Im as Ki,Ip as cs,Jg as To,Jh as kr,Jn as Ce,K as wt,Kg as xr,Ki as Ti,Kp as jo,L as Ge,Lq as Ko,Mg as Fr,O as Qe,Oh as Dr,Pi as wn,Pp as Bn,Pq as qi,Qh as Po,Qi as Vn,Qn as Mt,Qq as Qo,Rh as $r,Ri as Yr,Si as En,So as Gn,Th as Gr,Tj as Dn,Tm as ko,To as Go,U as Vt,Ug as Lr,Uh as Co,Uj as un,Un as ts,Vd as Or,Vi as kn,We as Ln,Wo as fn,X as Tr,Ze as Nr,Zh as Br,Zo as yi,_ as qe,_h as zr,aa as he,ae as Mr,bp as Qi,cb as N,cl as ne,co as ns,dl as Z,dp as Bo,eb as fi,ei as ho,el as K,fl as Ro,fo as Do,gl as bo,gm as Ai,gp as Ii,hb as Kt,hf as Un,hh as So,hl as Si,hm as $n,hp as os,hq as ds,ib as pn,il as Kr,im as Oi,jb as hr,jh as Ur,jl as yo,jm as Mi,jp as re,jq as kt,kl as gn,kp as zo,kq as ps,ll as Qr,lm as Ni,lp as as,ml as Io,mm as Ri,mo as ft,mp as Fa,mq as Yo,na as Pr,nl as Qt,oa as Fn,oc as Ar,oh as wr,oj as Oo,ol as xo,pa as mo,ph as mn,pi as Xr,pl as Pi,pp as rs,qa as Cr,qh as Vr,rl as Fo,sl as Lo,sm as Jr,sp as Zt,te as uo,tl as Uo,tm as Zr,tp as ot,u as Ve,ue as go,uk as Wr,ul as wo,um as We,uo as is,up as at,v as Wt,ve as fo,vg as yr,vi as jr,vl as Vo,vp as Ze,w as Et,wg as Ir,wl as qt,wp as et,x as ct,xl as Jt,xp as ss,y as fr,ye as vo,z as Me,zf as Rr,zi as Ao,zp as Ho}from"./chunk-UEN6IVPB.js";import{g as Er,l as ur,r as gr,w as Ei,y as Je,z as Sr}from"./chunk-CZCAAW4I.js";import"./chunk-CMMT6CVA.js";import"./chunk-NNITMYCS.js";import{a as Ke,aa as pr,ca as mr,k as xa,w as dr}from"./chunk-Z2UNVFSJ.js";import{$a as b,$d as $e,A as tr,Aa as or,Ad as Se,Ba as In,Bd as me,Ca as ii,Cc as co,Cd as tt,D as nr,Da as ue,F as Q,Fa as De,H as Ue,Ha as Be,Hc as r,Hd as P,Ic as s,Id as A,Jc as m,Jd as Ot,Je as Ht,Kc as w,La as be,Lc as U,Ld as St,Le as _e,Mc as zt,Md as di,Me as L,Nc as O,Nd as k,Ne as Xt,Oa as ht,Oe as jt,P as so,Pa as pt,Pe as lr,Qc as de,Rb as ze,Rc as pe,Sa as _o,Sc as g,Se as _r,T as ee,Te as pi,Ua as xe,Uc as q,Ue as we,Va as M,Vb as rr,Vc as J,Wc as Ft,Xc as S,Y as Ye,Yb as o,Ye as po,Zb as T,Zc as c,a as ba,ad as oi,af as cr,bd as ai,ca as yn,cf as Yt,ea as ce,ed as st,ef as mt,f as Za,fd as lt,gd as _t,ge as Ia,ha as ya,ib as At,ie as xn,j as dt,ja as xt,jb as f,jc as sr,kb as v,kd as V,m as rt,md as C,nd as G,oa as He,oc as p,od as B,pa as ir,pd as dn,qb as ar,rb as Lt,rc as Bt,tb as Y,tc as a,ua as lo,uc as Dt,v as ro,vc as te,x as er,xb as ci,y as Te,yb as it,yd as fe,zd as y}from"./chunk-P3446FGB.js";import"./chunk-6OMJRT4S.js";import"./chunk-QGZ2U4ZH.js";import"./chunk-SHILZYH4.js";import"./chunk-CTHIOSXJ.js";import{a as le,b as Re,h as ao,k as Ra,o as E}from"./chunk-AWWDKNVO.js";E();E();E();be();var Fl=(()=>{class t{constructor(e,n){this.groupTravelApiService=e,this.travelEventStore=n}canActivate(e){let n=e.params.eventUuid;return this.groupTravelApiService.getTravelEvent(n).pipe(ce(1),Q(i=>(this.travelEventStore.setActiveEvent(i),!0)),Ye(()=>(window.location.href=`${us.baseUrl}
1/group-travel/list`,Te(!1))))}static{this.\u0275fac=function(n){return new(n||t)(xe(Ae),xe(tn))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();E();E();E();var Ll=(()=>{class t{constructor(){this.ProgressStatus=On}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-co2"]],inputs:{carbonFootprint:"carbonFootprint"},standalone:!0,features:[y],decls:15,vars:5,consts:()=>{let e;e=$localize`:␟af00fb579a8335197aad462a18c9521ad18368ee␟8219796333818313234:Carbon footprint`;let n;n=$localize`:␟8d8ac98239da7ad995ca7c55e2ba8b6415fbd166␟25667084366339418: ${"\uFFFD0\uFFFD"}:INTERPOLATION: tons`;let i;i=$localize`:␟79347388740c50b7ac97e144c2494bb62912f312␟6489441800790477240:total`;let l;return l=$localize`:␟2fdb2d663837777e1a5748ed162abcbff35038f5␟5369208203669577925: Based on transportation modes and round trip miles between departure location and final destination for all participants. `,[e,n,i,l,[1,"ta-co2",3,"taLoading"],[1,"ta-co2__header"],[1,"ta-co2__title"],[1,"ta-co2__content-wrap"],[1,"ta-co2__description"],[1,"ta-co2__value"],[1,"ta-co2__amount"],[1,"ta-co2__amount-label"],[1,"ta-co2__content"]]},template:function(n,i){n&1&&(r(0,"div",4)(1,"div",5)(2,"div",6),g(3,0),s()(),r(4,"div",7)(5,"div",8)(6,"div",9)(7,"span",10),g(8,1),P(9,"number"),s(),C(10,"\xA0 "),r(11,"span",11),g(12,2),s()(),r(13,"div",12),g(14,3),s()()()()),n&2&&(a("taLoading",(i.carbonFootprint==null?null:i.carbonFootprint.status)===i.ProgressStatus.IN_PROGRESS),o(9),q(Ot(9,2,i.carbonFootprint==null?null:i.carbonFootprint.amount,"1.1-1")),J(8))},dependencies:[Mt,cr],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.ta-co2__content-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap}.ta-co2__description[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-around;flex-wrap:nowrap}.ta-co2_value[_ngcontent-%COMP%]{text-align:center}.ta-co2__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;font-weight:var(--text-weight-bold)}.ta-co2__title[_ngcontent-%COMP%]{margin:var(--ta-size-padding-08) 0;font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);line-height:var(--ta-size-padding-24)}.ta-co2__amount[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-bold);text-align:start}.ta-co2__amount-label[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start}.ta-co2__content[_ngcontent-%COMP%]{margin-top:var(--ta-size-padding-08);color:var(--ta-color-text-subtle)}.ta-co2__action[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{width:100%;padding:0}.ta-co2[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{z-index:0}"],changeDetection:0})}}return t})();E();E();function ic(t,_){t&1&&zt(0)}function oc(t,_){if(t&1&&(w(0),p(1,ic,1,0,"ng-container",15),U()),t&2){c(2);let e=V(6);o(),a("ngTemplateOutlet",e)}}function ac(t,_){t&1&&zt(0)}function rc(t,_){if(t&1&&(w(0),p(1,ac,1,0,"ng-container",15),U()),t&2){let e=c(2);o(),a("ngTemplateOutlet",e.totalEstimateWarning)}}function sc(t,_){if(t&1&&(r(0,"div",12)(1,"div",13),C(2),s(),r(3,"div",14),p(4,oc,2,1,"ng-container",11),C(5),P(6,"currency"),p(7,rc,2,1,"ng-container",11),s()()),t&2){let e=c();o(2),G(e.headerText),o(2),a("ngIf",e.hasRoomBlockMismatch&&e.showTotalCost),o(),B(" ",St(6,4,e.totalCostAmount,e.totalEstimate==null?null:e.totalEstimate.currency,"symbol-narrow","1.0-0")," "),o(2),a("ngIf",!e.showTotalCost&&e.showBasedOnWarning)}}function lc(t,_){t&1&&zt(0)}function _c(t,_){if(t&1&&(w(0),p(1,lc,1,0,"ng-container",15),U()),t&2){let e=c(3);o(),a("ngTemplateOutlet",e.totalEstimateWarning)}}function cc(t,_){if(t&1&&(r(0,"div",19)(1,"span"),g(2,4),s(),r(3,"span"),C(4),P(5,"currency"),s(),p(6,_c,2,1,"ng-container",11),s()),t&2){let e=c(2);o(4),G(St(5,2,e.totalEstimate.amount,e.totalEstimate==null?null:e.totalEstimate.currency,"symbol-narrow","1.0-0")),o(2),a("ngIf",e.showBasedOnWarning)}}function dc(t,_){if(t&1&&(r(0,"div",20)(1,"span"),g(2,5),s(),r(3,"span",21),C(4),P(5,"currency"),s()()),t&2){let e=c(2);o(4),B(" ",St(5,1,e.totalEstimate.amountForGuests,e.totalEstimate.currency,"symbol-narrow","1.0-0")," ")}}function pc(t,_){if(t&1&&(r(0,"div",16),p(1,cc,7,7,"div",17)(2,dc,6,6,"div",18),s()),t&2){let e=c();o(),a("ngIf",e.totalEstimate&&e.showTotalCost),o(),a("ngIf",e.totalEstimate&&e.isExtraGuestAllowed)}}function mc(t,_){if(t&1&&m(0,"ta-icon-v2",22),t&2){let e=c(2);a("taPopover",e.estimateBasedOn)}}function Ec(t,_){t&1&&p(0,mc,1,1,"ng-template",null,2,k)}function uc(t,_){if(t&1&&(r(0,"div",23),g(1,6),s()),t&2){let e=c(2);o(),q(e.totalEstimate.numberOfEstimatedParticipants)(e.totalEstimate.numberOfParticipants),J(1)}}function gc(t,_){t&1&&p(0,uc,2,2,"ng-template",null,3,k)}function fc(t,_){if(t&1&&m(0,"ta-icon-v2",24),t&2){c();let e=V(8);a("taPopover",e)}}function vc(t,_){t&1&&(r(0,"div",25),g(1,7),s())}var Ul=(()=>{class t{constructor(){this.showTotalCost=!1,this.isLoading=!1,this.hasRoomBlockMismatch=!1,this.InlineBannerType=rs,this.ProgressStatus=On,this.splitService=M(Ce),this.travelEventQuery=M(ve),this.iconRegistry=M(ne),this.iconRegistry.registerIcons(Ln)}ngOnInit(){let e=this.travelEventQuery.shouldShowTeamOffsiteUI();this.shouldDisplayEstimate=e||!this.splitService.isOn("ENT_GROUP_TRAVEL_HIDE_COST_ESTIMATE")}get showBasedOnWarning(){return this.totalEstimate?.numberOfParticipants>this.totalEstimate?.numberOfEstimatedParticipants}get headerText(){return this.showTotalCost?$localize`Total`:$localize`Estimated total`}get totalCostAmount(){return this.showTotalCost?this.totalCost||0:this.totalEstimate?.amount||0}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-cost"]],inputs:{showTotalCost:"showTotalCost",totalCost:"totalCost",isExtraGuestAllowed:"isExtraGuestAllowed",totalEstimate:"totalEstimate",isLoading:"isLoading",hasRoomBlockMismatch:"hasRoomBlockMismatch"},standalone:!0,features:[y],decls:9,vars:5,consts:()=>{let e;e=$localize`:␟4b9a2626519d5ee277661cf1d653b0f1a46bffab␟6568569858513660379:Estimated cost: `;let n;n=$localize`:␟27cffb04b36f399836390e796d990b34231693e0␟5664273069276224007:Extra guest cost: `;let i;i=$localize`:␟f97c230765d6c47bb35b487a83332c84e24952d9␟4837962615946707096: This estimate is based on ${"\uFFFD0\uFFFD"}:INTERPOLATION: out of ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: participants with completed details. `;let l;return l=$localize`:␟a04a617bf0bc24e5a508793e88ab00677ecdb618␟3396206936363697673: Some participants are no longer attending the event, but still have active bookings that are included in this amount. `,[["roomBlockMismatchWarning",""],["roomBlockMismatchTooltip",""],["totalEstimateWarning",""],["estimateBasedOn",""],e,n,i,l,[1,"cost-estimation",3,"taLoading"],["class","cost-estimation__title",4,"ngIf"],["class","cost-estimation__total",4,"ngIf"],[4,"ngIf"],[1,"cost-estimation__title"],[1,"cost-estimation__title-text"],[1,"cost-estimation__title-value"],[4,"ngTemplateOutlet"],[1,"cost-estimation__total"],["class","cost-estimation__container cost-estimation__total--secondary",4,"ngIf"],["class","cost-estimation__extra-guest",4,"ngIf"],[1,"cost-estimation__container","cost-estimation__total--secondary"],[1,"cost-estimation__extra-guest"],[1,"cost-estimation__extra-guest-amount"],["icon","warning","popoverTrigger","hover","theme","outline",1,"cost-estimation__warning",3,"taPopover"],[1,"cost-estimation__popover"],["icon","warning","popoverTrigger","hover","theme","outline",1,"room-block-mismatch__warning",3,"taPopover"],[1,"room-block-mismatch__popover"]]},template:function(n,i){n&1&&(r(0,"div",8),p(1,sc,8,9,"div",9)(2,pc,3,2,"div",10),s(),p(3,Ec,2,0,null,11)(4,gc,2,0,null,11)(5,fc,1,1,"ng-template",null,0,k)(7,vc,2,0,"ng-template",null,1,k)),n&2&&(a("taLoading",i.isLoading||(i.totalEstimate==null?null:i.totalEstimate.estimateStatus)===i.ProgressStatus.IN_PROGRESS),o(),a("ngIf",i.shouldDisplayEstimate||i.showTotalCost),o(),a("ngIf",i.shouldDisplayEstimate),o(),a("ngIf",i.shouldDisplayEstimate),o(),a("ngIf",i.shouldDisplayEstimate))},dependencies:[Mt,L,pi,K,Z,re,Yt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{display:block}.cost-estimation__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-bold);text-align:end}.cost-estimation__title-text[_ngcontent-%COMP%]{margin:var(--ta-size-padding-08) 0}
1.cost-estimation__title-value[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-bold);text-align:end;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.cost-estimation__description[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:end;margin-bottom:var(--ta-size-padding-24)}.cost-estimation__total[_ngcontent-%COMP%]{position:relative;min-height:var(--ta-size-padding-24);color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-bold);text-align:end}.cost-estimation__total--secondary[_ngcontent-%COMP%]{margin-top:var(--ta-size-padding-08);color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:end}.cost-estimation__extra-guest[_ngcontent-%COMP%]{color:var(--ta-color-text-highlight);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:end;margin-top:var(--ta-size-padding-08)}.cost-estimation__extra-guest-amount[_ngcontent-%COMP%]{color:var(--ta-color-text-highlight);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:end}.cost-estimation__error[_ngcontent-%COMP%]{margin-top:var(--dim-step5)}.cost-estimation__warning[_ngcontent-%COMP%]{color:var(--ta-color-icon-alert)}.cost-estimation__popover[_ngcontent-%COMP%]{padding:var(--ta-size-padding-16) var(--ta-size-padding-24);max-width:260px}.cost-estimation__container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.room-block-mismatch__warning[_ngcontent-%COMP%]{margin-inline-end:var(--ta-size-padding-08);color:var(--ta-color-icon-alert)}.room-block-mismatch__popover[_ngcontent-%COMP%]{width:335px;padding:var(--ta-size-padding-08) var(--ta-size-padding-12);font-size:var(--text-size-medium);line-height:var(--dim-step6)}"],changeDetection:0})}}return t})();E();E();function Sc(t,_){if(t&1){let e=O();r(0,"ta-team-event-card",1),P(1,"async"),P(2,"async"),r(3,"ta-button-v2",2),P(4,"async"),P(5,"async"),P(6,"async"),S("clickEvent",function(){f(e);let i=c();return v(i.onCancelEvent())}),s()()}if(t&2){let e=c();a("title",A(1,5,e.title$))("subtitle",A(2,7,e.subTitle$)),o(3),a("text",A(4,9,e.actionText$))("disabled",A(5,11,e.travelEventQuery.selectLoading()))("taLoading",A(6,13,e.travelEventQuery.selectLoading()))}}var Vl=(()=>{class t{constructor(e,n,i,l,d,u){this.travelEventQuery=e,this.groupTravelApiService=n,this.groupTravelModalsService=i,this.groupTravelAnalyticsService=l,this.router=d,this.toastrService=u,this.title$=this.travelEventQuery.isActiveEventDraft$.pipe(Q(h=>h?$localize`Delete draft`:$localize`Cancel event`)),this.actionText$=this.travelEventQuery.isActiveEventDraft$.pipe(Q(h=>h?$localize`Delete draft`:$localize`Cancel event`)),this.subTitle$=this.travelEventQuery.isActiveEventDraft$.pipe(Q(h=>h?$localize`Event drafts can't be recovered after they're deleted.`:$localize`You can add a note for your participants at the next step.`))}onCancelEvent(){let e;this.travelEventQuery.activeEvent$.pipe(ce(1),ue(n=>(e=n,this.groupTravelModalsService.cancelEvent(e,(i,l)=>this.cancelEvent(i,l),this.travelEventQuery.selectLoading()).afterClosed$)),lo("result"),ee(n=>!!n)).subscribe(()=>{let n=this.groupTravelAnalyticsService.getCancelEventTrackedData(e);this.showTeamEventRemovedSuccessfullyToast(e.summary.name,e.status),Re(le({},n),{clickedItem:n.eventStatus===ye.DRAFT?"confirmDeleteDraft":"confirmCancelEvent"}),this.router.navigate(["/"])},()=>{let n=this.groupTravelAnalyticsService.getCancelEventTrackedData(e);this.toastrService.error($localize`An error occurred while deleting the event.`)})}cancelEvent(e,n){let{cancelNote:i="",modalRef:l}=e,d=i.trim().length?{cancellationNote:i}:null;this.groupTravelApiService.deleteTeamEvent(n,this.travelEventQuery.getEventStatus(n),d).subscribe(u=>l.close(u),()=>l.close())}showTeamEventRemovedSuccessfullyToast(e,n){let i=n===ye.DRAFT?$localize`${e}:event name: draft is deleted`:$localize`${e}:event name: is canceled`,l=n===ye.DRAFT?"":$localize`The invitees have been notified by email.`;this.toastrService.show(i,"success",!0,{subtitle:l})}static{this.\u0275fac=function(n){return new(n||t)(T(ve),T(Ae),T(Wn),T(Yn),T(Je),T(gt))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-delete"]],standalone:!0,features:[y],decls:2,vars:3,consts:[["data-testid","deleteTeamEventCard",3,"title","subtitle",4,"ngIf"],["data-testid","deleteTeamEventCard",3,"title","subtitle"],["data-testid","deleteTeamEvent","action","","type","warning","size","large","kind","outline",3,"clickEvent","text","disabled","taLoading"]],template:function(n,i){n&1&&(p(0,Sc,7,15,"ta-team-event-card",0),P(1,"async")),n&2&&a("ngIf",A(1,1,i.travelEventQuery.canDeleteActiveEvent$))},dependencies:[L,Kn,ie,Ee,Mt,we]})}}return t})();E();E();be();function Pc(t,_){if(t&1&&m(0,"ta-select-option-v2",4),t&2){let e=_.$implicit;a("label",e.label)("value",e.value)}}var va=[Pn.INVITE_ACCEPTED,Pn.INVITE_DECLINED,Pn.INVITE_FINALIZED],
1kl=(()=>{class t{constructor(e){this.cdRef=e,this.notifyOrganiserOptions=[{label:$localize`Don't send additional notifications`,value:"send_nothing"},{label:$localize`Only changes and cancellations`,value:"changes_cancelations"},{label:$localize`All booking activity`,value:"all"}],this.selectedValue=new $t(null),this.destroy$=new dt,this.onTouch=()=>{},this.onChange=()=>{}}ngOnInit(){this.trackValueChanges()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){this.setSelectedValue(e),this.cdRef.detectChanges()}setDisabledState(e){e?this.selectedValue.disable():this.selectedValue.enable(),this.cdRef.detectChanges()}setSelectedValue(e){!e||!e.length||[...e].sort().join(",")===va.sort().join(",")?this.selectedValue.setValue(this.notifyOrganiserOptions[0].value):e.find(n=>n===Pn.BOOKING_CREATED)?this.selectedValue.setValue(this.notifyOrganiserOptions[2].value):this.selectedValue.setValue(this.notifyOrganiserOptions[1].value)}mapValueToNotificationOption(e){switch(e){case"changes_cancelations":return[...va,Pn.BOOKING_CHANGED,Pn.BOOKING_CANCELED];case"all":return[...va,Pn.BOOKING_CHANGED,Pn.BOOKING_CANCELED,Pn.BOOKING_CREATED];default:return va}}trackValueChanges(){this.selectedValue.valueChanges.pipe(De(this.destroy$),xt(),In(1)).subscribe(e=>{let n=this.mapValueToNotificationOption(e);this.onChange(n),N(X.SELECT_BOOKING_CONTROL_OPTION,{whenToNotifyRule:e}),N(z.EVENT_SETTINGS_CHANGED,{[x.VIEW]:H.EVENT_SETTINGS_BOOKING,[x.CONTEXT]:nt.PAGE,[x.NAVAN_EVENT_SETTING]:Tn.SETTINGS_WHEN_TO_NOTIFY_RULES})})}static{this.\u0275fac=function(n){return new(n||t)(T($e))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-organiser-notifications"]],standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0}]),y],decls:4,vars:3,consts:()=>{let e;return e=$localize`:␟5cbda943736e8813b75c5d1e26109221fa9786f9␟6261647822468647942:Organizer notifications`,[[1,"organiser-notifications"],["label",e,"size","large",3,"showMargins"],[3,"formControl"],[3,"label","value",4,"ngFor","ngForOf"],[3,"label","value"]]},template:function(n,i){n&1&&(r(0,"div",0)(1,"ta-form-wrap-v2",1)(2,"ta-select-v2",2),p(3,Pc,1,2,"ta-select-option-v2",3),s()()()),n&2&&(o(),a("showMargins",!1),o(),a("formControl",i.selectedValue),o(),a("ngForOf",i.notifyOrganiserOptions))},dependencies:[Qt,gn,Ri,Ni,Oi,je,Me,he,wt,_e,Mi],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.organiser-notifications__subtext[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;margin-bottom:var(--dim-step5)}"],changeDetection:0})}}return t})();E();E();be();var hc=["customFieldsElem"],Ac=t=>({"checkout-fields__field--hidden":t});function Oc(t,_){t&1&&m(0,"ta-icon-v2",16)}function Mc(t,_){if(t&1&&(r(0,"div",13)(1,"h3",14),g(2,1),s(),p(3,Oc,1,0,"ta-icon-v2",15),s()),t&2){let e=c(3);o(3),a("ngIf",e.showWarningIcon)}}function Nc(t,_){t&1&&(r(0,"h3",14),g(1,2),s())}function Rc(t,_){t&1&&(r(0,"p"),g(1,3),s())}function bc(t,_){if(t&1&&(r(0,"div",9),p(1,Mc,4,1,"div",10),P(2,"async"),p(3,Nc,2,0,"h3",11),P(4,"async"),p(5,Rc,2,0,"p",12),P(6,"async"),s()),t&2){let e=c(2);o(),a("ngIf",!A(2,3,e.isPolicyFieldsOn$)),o(2),a("ngIf",A(4,5,e.isPolicyFieldsOn$)),o(2),a("ngIf",A(6,7,e.isPolicyFieldsOn$))}}function yc(t,_){if(t&1&&(w(0),r(1,"ta-form-wrap-v2",19),m(2,"input",20),s(),U()),t&2){let e=c().$implicit,n=c(2);o(),a("label",n.getCustomFieldLabel(e.label))("showPopover",!0)("required",e.required),o(),a("formControlName",e.name)("required",e.required)}}function Ic(t,_){if(t&1&&(w(0),r(1,"ta-form-wrap",21),m(2,"ta-custom-field-search-v2",22),P(3,"async"),P(4,"async"),P(5,"async"),s(),U()),t&2){let e,n,i=c().$implicit,l=c(2);o(),a("label",l.getCustomFieldLabel(i.label))("showPopover",!0)("required",i.required),o(),a("isAdmin",(e=A(3,11,l.sessionQuery.selectUserInfo$))==null?null:e.admin)("required",i.required)("disabled",l.form.disabled)("clearable",A(4,13,l.isPolicyFieldsOn$))("field",i)("autoAssignDefaults",!1)("customFieldValue",(n=A(5,15,l.customFieldValues$))==null?null:n[i.name])("label",l.getCustomFieldLabel(i.label))}}
1function xc(t,_){if(t&1&&(w(0),r(1,"div",17,0)(3,"div"),p(4,yc,3,5,"ng-container",18)(5,Ic,6,17,"ng-container",18),s()(),U()),t&2){let e=_.$implicit,n=c(2);o(),a("id",e.name)("ngClass",me(5,Ac,n.isTripNameField(e)))("ngSwitch",e.type),o(3),a("ngSwitchCase","TEXT"),o(),a("ngSwitchCase","SELECT")}}function Fc(t,_){if(t&1&&(r(0,"form",5),p(1,bc,7,9,"div",6),r(2,"div",7),p(3,xc,6,7,"ng-container",8),s()()),t&2){let e=c();a("formGroup",e.form),o(),a("ngIf",!e.isTeamOffsite),o(2),a("ngForOf",e.visibleCustomFields)}}var Lc=50,Ta=(()=>{class t{constructor(e,n,i,l,d,u){this.fb=e,this.elRef=n,this.customFieldService=i,this.sessionQuery=l,this.iconRegistry=d,this.splitService=u,this.customFields=[],this.isTeamOffsite=!1,this.visibleCustomFields=[],this.tripPurposeLabel=$localize`Trip purpose`,this.projectsLabel=$localize`Projects`,this.maxDropdownItems=Lc,this.customFieldValues$=this.customFieldService.customFieldValues$,this.isCustomFieldValuesValid=!1,this.isPolicyFieldsOn$=this.splitService.isOn$("EXPENSE_TRAVEL_POLICY_FIELDS"),this.destroySubject=new dt,this.onChange=h=>{},this.onTouched=()=>{},this.iconRegistry.registerIcons(Ln)}ngOnInit(){let e={};this.customFields.forEach(n=>{e[n.name]=new $t("",n.required?ct.required:null)}),this.moveTripNameToEnd(),this.form=this.fb.group(e),this.customFieldService.visibleCustomFields$.subscribe(n=>{this.visibleCustomFields=n}),this.customFieldService.customFieldValues$.subscribe(n=>{let i=Object.entries(n).reduce((l,[d,u])=>{let h=this.customFields.find(I=>I.name===d);return l[d]=h.type==="SELECT"?u.value:this.form.get(d)?.value,l},{});this.form.patchValue(i),this.isCustomFieldValuesValid=Object.values(n).every(l=>l.value!=="")}),this.subscribeToChanges()}ngOnDestroy(){this.customFieldService.cleanupCustomFieldsService(),this.destroySubject.next(null),this.destroySubject.complete()}get showWarningIcon(){return!this.form.valid||!this.isCustomFieldValuesValid||this.form.dirty}getCustomFieldLabel(e){return e==="Trip purpose"?this.tripPurposeLabel:e==="Projects"?this.projectsLabel:e}toggleCustomResponse(e,n){if(e!=="")return;let i=this.form.get(n.name),l=Array.from(this.customFieldsElem).find(d=>d.nativeElement.id===n.name);n.showCustom=!n.showCustom,i.setValue(""),l&&setTimeout(()=>{l.nativeElement.querySelector("input")?.focus()},10)}writeValue(e=[]){let n={};this.customFields=this.enrichCustomFieldsWithCustomValues(this.customFields,e),this.customFields.forEach(i=>{let l=e?.find(({name:d})=>d===i.name)?.value||"";n[i.name]=l}),this.form.patchValue(n)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){e?this.form.disable():this.form.enable()}validate(e){return this.form.valid?null:{customFieldsInvalid:!0}}isTripNameField(e){return e.name==="tripName"}subscribeToChanges(){this.form.valueChanges.pipe(ft(this.elRef),xt(this.distinctUntilChangedValue)).subscribe(e=>{let n=this.customFields.map(i=>({name:i.name,label:this.getCustomFieldLabel(i.label),value:e[i.name],sabreName:e.sabreName,approver:e.approver,optionLabel:e.optionLabel}));this.onChange(n),this.onTouched()})}enrichCustomFieldsWithCustomValues(e,n){return e.map(i=>{let l=(n||[]).find(({name:d})=>d===i.name);return i.showCustom=l&&l.value!==""&&!i.options.find(({value:d})=>l.value===d),i})}distinctUntilChangedValue(e,n){return Object.keys(e).every(i=>e[i]===n[i])}moveTripNameToEnd(){let e=this.customFields.find(n=>this.isTripNameField(n));e&&(this.customFields=[...this.customFields.filter(n=>!this.isTripNameField(n)),e])}static{this.\u0275fac=function(n){return new(n||t)(T(qe),T(it),T(la),T(vt),T(ne),T(Ce))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-custom-fields"]],viewQuery:function(n,i){if(n&1&&st(hc,5),n&2){let l;lt(l=_t())&&(i.customFieldsElem=l)}},inputs:{customFields:"customFields",formControl:"formControl",isTeamOffsite:"isTeamOffsite"},standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0},{provide:Et,useExisting:t,multi:!0}]),y],decls:1,vars:1,consts:()=>{let e;e=$localize`:␟61bfd2a8805e30790e11c8ab3a0c2a95b985445b␟1477824553612612348:Required fields`;let n;
1n=$localize`:␟c74564efb5590d661c00502a5757cd4c92699fad␟9149498548977462220:Custom fields`;let i;i=$localize`:␟36fa907086b41605ffa8b6e57ca891b908a0a272␟3322891958228017729:Add additional information here that's relevant to your event`;let l;return l=$localize`:␟10f8e50033b63cc7423776f69c15ee4e7d3d09bc␟5163362445793732171:custom field input`,[["customFieldsElem",""],e,n,i,[3,"formGroup",4,"ngIf"],[3,"formGroup"],["class","checkout-fields__title",4,"ngIf"],[1,"checkout-fields"],[4,"ngFor","ngForOf"],[1,"checkout-fields__title"],["class","checkout-fields__title-old",4,"ngIf"],["class","checkout-fields__title-text",4,"ngIf"],[4,"ngIf"],[1,"checkout-fields__title-old"],[1,"checkout-fields__title-text"],["icon","warning","class","checkout-fields__title-icon",4,"ngIf"],["icon","warning",1,"checkout-fields__title-icon"],["data-testid","tripCheckoutCustomField",1,"checkout-fields__field",3,"id","ngClass","ngSwitch"],[4,"ngSwitchCase"],["size","large",3,"label","showPopover","required"],["taInputV2","","type","text","aria-label",l,3,"formControlName","required"],[3,"label","showPopover","required"],[3,"isAdmin","required","disabled","clearable","field","autoAssignDefaults","customFieldValue","label"]]},template:function(n,i){n&1&&p(0,Fc,4,3,"form",4),n&2&&a("ngIf",i.visibleCustomFields==null?null:i.visibleCustomFields.length)},dependencies:[L,je,Ut,Wt,Me,Xe,Vt,he,Ge,Qe,_e,Ht,Xt,jt,Qt,gn,Pi,xo,kt,K,Z,Zs,we],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.checkout-fields__title[_ngcontent-%COMP%]{gap:var(--dim-step1);margin-top:var(--dim-step1);margin-bottom:var(--dim-step6)}.checkout-fields__title-old[_ngcontent-%COMP%]{display:flex;align-items:center}.checkout-fields__title-text[_ngcontent-%COMP%]{font-family:inherit;font-weight:var(--text-weight-medium);font-size:18px;line-height:26px;color:var(--color-text-default);margin:0}.checkout-fields__title-icon[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--color-icon-alert)}.checkout-fields__title[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-top:var(--dim-step1);color:var(--color-text-subtle)}.checkout-fields[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.checkout-fields[_ngcontent-%COMP%]   .checkout-fields__field[_ngcontent-%COMP%]{margin-right:var(--dim-step6);width:calc(50% - var(--dim-step3))}.checkout-fields[_ngcontent-%COMP%]   .checkout-fields__field[_ngcontent-%COMP%]:nth-child(2n){margin-right:0}.checkout-fields[_ngcontent-%COMP%]   .checkout-fields__field.checkout-fields__field--hidden[_ngcontent-%COMP%]{visibility:hidden;overflow:hidden;height:0;width:0;margin:0}.custom-option__close[_ngcontent-%COMP%]:hover{cursor:pointer}"]})}}return t})();E();E();var Uc=()=>({placeAt:"top"}),wc=t=>({placement:t}),Vc=(t,_)=>({width:t,background:_}),kc=()=>["bottomRightAlign"],Dc=t=>({placeAt:t}),$c=t=>({withArrow:!1,customClasses:"events-menu",width:"container",placement:t}),Gc=()=>({clickedItem:"goToManagerDashboard",source:"eventsPage"});function Bc(t,_){if(t&1){let e=O();r(0,"ta-icon-v2",38),S("click",function(i){f(e);let l=c();return v(l.onCopyInviteLink(i))}),s()}}function zc(t,_){if(t&1&&m(0,"ta-tag-v2",42),t&2){let e=c(2);a("label",e.proposalStatusText)("type",e.proposalStatusColor)}}function Hc(t,_){if(t&1&&(r(0,"div",39),m(1,"ta-tag-v2",40),p(2,zc,1,2,"ta-tag-v2",41),s()),t&2){let e=c();o(),a("label",e.eventTagData.text)("type",e.eventTagData.color),o(),a("ngIf",e.isDraft&&e.proposalStatus)}}function Xc(t,_){if(t&1&&m(0,"ta-user-avatar",43),t&2){let e=c();a("size",28)("user",e.travelEventListItem.eventOrganiser)}}function jc(t,_){t&1&&(r(0,"span",45),g(1,5),s())}function Yc(t,_){t&1&&(r(0,"span"),g(1,6),s())}function Wc(t,_){if(t&1&&(r(0,"span"),g(1,7),s()),t&2){let e=c(4);o(),q(e.daysInTheFuture),J(1)}}function Kc(t,_){if(t&1&&(r(0,"span",47),p(1,Yc,2,0,"span",48)(2,Wc,2,1,"ng-template",null,2,k),s()),t&2){let e=V(3),n=c(3);o(),a("ngIf",n.daysInTheFuture===1)("ngIfElse",e)}}function Qc(t,_){if(t&1&&p(0,Kc,4,2,"span",46),t&2){let e=c(2);a("ngIf",e.daysInTheFuture>0)}}function qc(t,_){if(t&1&&(w(0),p(1,jc,2,0,"span",44)(2,Qc,1,1,"ng-template",null,1,k),U()),t&2){let e=V(3),n=c();o(),a("ngIf",n.travelEventListItem.isPastEvent)("ngIfElse",e)}}
1function Jc(t,_){if(t&1&&(w(0),r(1,"div",49),C(2),P(3,"currency"),s(),r(4,"div",50),g(5,8),s(),U()),t&2){let e=c();o(2),B(" ",St(3,1,e.totalEstimatedAmount,e.totalEstimatedCurrency,"symbol-narrow","1.0-0")," ")}}function Zc(t,_){if(t&1){let e=O();r(0,"li")(1,"ta-button-v2",52),S("clickEvent",function(){f(e);let i=c(2);return v(i.onManageCollaborators())}),s()()}}function ed(t,_){if(t&1){let e=O();r(0,"li")(1,"ta-button-v2",53),S("clickEvent",function(){f(e);let i=c(2);return v(i.duplicateEvent.emit(i.travelEventListItem.id))}),s()()}}function td(t,_){if(t&1){let e=O();r(0,"li")(1,"ta-button-v2",54),S("clickEvent",function(){f(e);let i=c(2);return v(i.changeOrganiser.emit(i.travelEventListItem.id))}),s()()}}function nd(t,_){if(t&1){let e=O();r(0,"li")(1,"ta-button-v2",55),S("clickEvent",function(){f(e);let i=c(2);return v(i.onOpenManagerDashboard())}),s()()}t&2&&(o(),a("taTrack",Se(1,Gc)))}function id(t,_){if(t&1){let e=O();r(0,"li")(1,"ta-button-v2",56),S("clickEvent",function(){f(e);let i=c(2);return v(i.onCancelEvent())}),s()()}if(t&2){let e=c(2);o(),a("text",e.cancelLabel)}}function od(t,_){if(t&1&&(r(0,"ul",51),p(1,Zc,2,0,"li",28)(2,ed,2,0,"li",28)(3,td,2,0,"li",28)(4,nd,2,2,"li",28)(5,id,2,1,"li",28),s()),t&2){let e=c();o(),a("ngIf",e.canManageCollaborators),o(),a("ngIf",e.isDuplicateEventEnabled),o(),a("ngIf",e.isSessionUserAdmin&&e.isChangeOrganiserEnabled&&!(e.isCanceled||e.isCompleted)),o(),a("ngIf",e.isEventOrganisedByUser&&!e.isDraft),o(),a("ngIf",e.canCancelEvent)}}function ad(t,_){if(t&1){let e=O();r(0,"div",57)(1,"ta-event-item-approval",58),S("declineProposal",function(){f(e);let i=c();return v(i.declineProposal.emit(i.travelEventListItem.id))})("approveProposal",function(){f(e);let i=c();return v(i.approveProposal.emit(i.travelEventListItem.id))}),s()()}if(t&2){let e=c();o(),a("requesterNote",e.proposalNote)}}var Dl=(()=>{class t{constructor(){this.splitSvc=M(Ce),this.sessionQuery=M(vt),this.iconRegistry=M(ne),this.toastrService=M(gt),this.isSessionUserAdmin=!1,this.openEvent=new Y,this.cancelEvent=new Y,this.changeOrganiser=new Y,this.approveProposal=new Y,this.declineProposal=new Y,this.openManagerDashboard=new Y,this.duplicateEvent=new Y,this.manageCollaborators=new Y,this.isChangeOrganiserEnabled=this.splitSvc.isOn("GME_TE_ADMIN_PATCH_FOR_COMPANY"),this.isInviteViaLinkEnabled=this.splitSvc.isOn("ENT_GROUP_TRAVEL_INVITE_VIA_LINK"),this.isDuplicateEventEnabled=this.splitSvc.isOn("GME_EVENT_DUPLICATION"),this.isGmeMultiCollaboratorsEnabled=this.splitSvc.isOn("GME_MULTI_COLLABORATORS"),this.iconRegistry.registerIcons(br,Fr,vi,Ti,Ur,xr,Lr)}ngOnInit(){this.sessionQuery.selectUserInfo$.subscribe(e=>{let n=this.travelEventListItem?.isTeamOffsite;this.shouldDisplayEstimate=n||!this.splitSvc.isOn("ENT_GROUP_TRAVEL_HIDE_COST_ESTIMATE")})}get eventTagData(){return this.eventStatusTagData[this.travelEventListItem.status]}get totalEstimatedAmount(){return this.travelEventListItem.costInsight.totalEstimatedCostAmount}get totalEstimatedCurrency(){return this.travelEventListItem.costInsight.estimatedCostCurrency}get totalCostAmount(){return this.travelEventListItem.costInsight.totalActualCostAmount}get totalCostCurrency(){return this.travelEventListItem.costInsight.actualCostCurrency}get daysInTheFuture(){return We.isInFuture(new Date(this.travelEventListItem.eventSchedule.startDateTime))?We.differenceInDays(new Date(this.travelEventListItem.eventSchedule.startDateTime),new Date):0}get numberOfParticipantsWhoBookedTrip(){return this.travelEventListItem.invitationInsight.finalized}get totalNumberOfParticipants(){return this.travelEventListItem.invitationInsight.total}get cancelLabel(){return this.travelEventListItem.isTeamOffsite?$localize`Delete event`:this.isDraft?$localize`Delete draft`:$localize`Cancel event`}get isDraft(){return this.travelEventListItem.status===ye.DRAFT}get isActive(){return this.travelEventListItem.status===ye.ACTIVE}get showInviteLinkIcon(){return this.isInviteViaLinkEnabled&&this.isActive}get isCanceled(){return this.travelEventListItem.status===ye.CANCELED}get isCompleted(){return this.travelEventListItem.status===ye.COMPLETED}get showTimeIndication(){return![ye.CANCELED,ye.COMPLETED].includes(this.travelEventListItem.status)}get isEventOrganisedByUser(){return this.sessionUserUuid===this.travelEventListItem.eventOrganiser.uuid}get isAdminOrOrganizer(){return this.isSessionUserAdmin||this.isEventOrganisedByUser}get canManageCollaborators(){return this.isGmeMultiCollaboratorsEnabled}get canCancelEvent(){return this.isAdminOrOrganizer&&!this.isCanceled&&!this.isCompleted}get isPendingApproval(){return this.travelEventListItem.eventProposal.isPendingApproval}get proposalStatus(){return this.travelEventListItem.eventProposal.status}get proposalNote(){return this.travelEventListItem.eventProposal.note}get proposalStatusText(){return this.eventProposalStatusTagData[this.proposalStatus]?.text}get proposalStatusColor(){return this.eventProposalStatusTagData[this.proposalStatus]?.color}onCancelEvent(){this.closePopovers(),this.cancelEvent.emit(this.travelEventListItem.id)}onOpenManagerDashboard(){this.closePopovers(),this.openManagerDashboard.emit(this.travelEventListItem.id),N(z.EVENT_MANAGER_DASHBOARD_CLICKED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS})}onManageCollaborators(){this.manageCollaborators.emit(this.travelEventListItem.id)}onCopyInviteLink(e){e.stopPropagation();let n=`${window.location.origin}/u/travel/events/${this.travelEventListItem.id}/invitation`;navigator.clipboard.writeText(n),this.toastrService.show($localize`Link copied`,"success",!0,{subtitle:$localize`Event link copied to clipboard`})}onOpenEvent(){this.trackOpenEvent(),this.openEvent.emit({id:this.travelEventListItem.id,boompopEventId:this.travelEventListItem.boompopEventId,isTeamOffsite:this.travelEventListItem.isTeamOffsite})}
1closePopovers(){(this.popOvers||[]).forEach(e=>e?.close())}trackOpenEvent(){N(z.EVENT_CARD_CLICKED,{[x.VIEW]:H.EVENTS_LIST,[x.NAVAN_EVENT_STATUS]:Ns(this.travelEventListItem.status)})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-travel-event-item"]],viewQuery:function(n,i){if(n&1&&st(re,5),n&2){let l;lt(l=_t())&&(i.popOvers=l)}},inputs:{travelEventListItem:"travelEventListItem",isSessionUserAdmin:"isSessionUserAdmin",sessionUserUuid:"sessionUserUuid",eventStatusTagData:"eventStatusTagData",eventProposalStatusTagData:"eventProposalStatusTagData"},outputs:{openEvent:"openEvent",cancelEvent:"cancelEvent",changeOrganiser:"changeOrganiser",approveProposal:"approveProposal",declineProposal:"declineProposal",openManagerDashboard:"openManagerDashboard",duplicateEvent:"duplicateEvent",manageCollaborators:"manageCollaborators"},standalone:!0,features:[y],decls:51,vars:57,consts:()=>{let e;e=$localize`:␟ccc9245146418d0da251b38d5267669625dafc2c␟3366943446671446945:Event picture`;let n;n=$localize`:␟2f61039725cdd465d72d65e8bb771a6261021c0e␟6565791317520947983:Arrow`;let i;i=$localize`:␟27655551a9c4d2e14dbd272f3a51e8076400edf8␟8469113748560542530:booked`;let l;l=$localize`:␟8b87e350d6fe4cdc7a569553706e0ce84c596be1␟6220924848272618417:actual`;let d;d=$localize`:␟e399128559ca1e15639d1272b5626389f53f2174␟8255898960708724882: In the past`;let u;u=$localize`:␟90fafd39fda345dff65b56a3f55c7424d31ca1d1␟289295335549969225: In 1 day`;let h;h=$localize`:␟1e8058c5b7b41c81a39d3dd8bf937645f1e770e5␟618235822076734680: In ${"\uFFFD0\uFFFD"}:INTERPOLATION: days`;let I;I=$localize`:␟24c262c8fa0e6e0426aebc4990e9b8db30c3a5d8␟3330163681390258112:estimated`;let F;F=$localize`:␟0aa672698917cc5aba94f1319009b590e2380731␟5915934668269388410:Manage collaborators`;let $;$=$localize`:␟25f5ad79a84d923546b019c5e01f62c064449b94␟2003306206010822184:Duplicate event`;let ge;ge=$localize`:␟3384e3b0133be2e3cfccab6ee7553d33674c9a06␟491375769213431401:Change Organizer`;let W;return W=$localize`:␟9642eceb415d126dfe49729bd7ea38e7699d2c92␟4999415897086413521:Manager dashboard`,[["menu",""],["futureEvent",""],["days",""],i,l,d,u,h,I,[1,"event-item"],[1,"event-item__details"],[1,"wide-event-column"],[1,"event-item__name"],["data-testid","eventItemName",3,"click","routerLink"],["alt",e,3,"src"],["qaId","eventItemTitle","data-testid","eventItemTitle",3,"title"],[1,"event-item__name--link",3,"click"],["icon","link","size","medium","class","event-item__name__link-icon","data-testid","eventInviteLinkIcon",3,"click",4,"ngIf"],["class","event-item__tags","data-testid","eventStatusLabel",4,"ngIf"],[1,"event-item__name--avatar"],[3,"size","user",4,"ngIf"],[1,"event-item__name--text"],[1,"medium-event-column"],[1,"event-item__date-time"],["alt",n,1,"event-item__icon",3,"src"],[1,"event-item__date"],["popoverTrigger","hover",3,"popoverConfig","taPopover"],["popoverTrigger","hover",3,"taPopover"],[4,"ngIf"],[1,"event-item__progress"],[1,"event-item__progress--inner",3,"ngStyle"],[1,"event-item__cost"],[1,"event-item__cost-actual-cost"],[1,"event-item__cost-actual-cost-description"],[1,"small-event-column"],["aria-haspopup","true","theme","uncontained",3,"taPopover","popoverConfig"],["icon","more-dots-vertical","data-testid","threeDotMenu"],["class","event-item__approval",4,"ngIf"],["icon","link","size","medium","data-testid","eventInviteLinkIcon",1,"event-item__name__link-icon",3,"click"],["data-testid","eventStatusLabel",1,"event-item__tags"],["size","small","theme","soft",1,"event-item__name--tag",3,"label","type"],["class","event-item__name__tag","size","small","theme","soft",3,"label","type",4,"ngIf"],["size","small","theme","soft",1,"event-item__name__tag",3,"label","type"],[3,"size","user"],["class","event-item__date--past",4,"ngIf","ngIfElse"],[1,"event-item__date--past"],["class","event-item__date--future",4,"ngIf"],[1,"event-item__date--future"],[4,"ngIf","ngIfElse"],[1,"event-item__cost-estimated-cost"],[1,"event-item__cost-estimated-cost-description"],[1,"event-item__menu"],["kind","ghost","type","neutral","icon","meeting","flex","true","text",F,3,"clickEvent"],["kind","ghost","type","neutral","icon","multiple","flex","true","text",$,3,"clickEvent"],["kind","ghost","type","neutral","icon","switch-user","flex","true","text",ge,3,"clickEvent"],["kind","ghost","type","neutral","icon","chart-donut","flex","true","text",W,1,"dark",3,"clickEvent","taTrack"],["kind","ghost","type","warning","icon","cancel","flex","true",3,"clickEvent","text"],[1,"event-item__approval"],[3,"declineProposal","approveProposal","requesterNote"]]}
1,template:function(n,i){if(n&1){let l=O();r(0,"div",9)(1,"div",10)(2,"div",11)(3,"div",12)(4,"a",13),S("click",function(){return f(l),v(i.onOpenEvent())}),m(5,"img",14),s(),r(6,"div")(7,"h4",15)(8,"a",16),S("click",function(){return f(l),v(i.onOpenEvent())}),C(9),s(),p(10,Bc,1,0,"ta-icon-v2",17),s(),p(11,Hc,3,3,"div",18),r(12,"div",19),p(13,Xc,1,2,"ta-user-avatar",20),r(14,"span",21),C(15),s()()()()(),r(16,"div",22),C(17),s(),r(18,"div",23),m(19,"img",24),P(20,"cdnImage"),r(21,"div",25)(22,"span",26),P(23,"date"),C(24),P(25,"date"),s()(),r(26,"div",25)(27,"span",27),P(28,"date"),C(29),P(30,"date"),s()(),p(31,qc,4,2,"ng-container",28),s(),r(32,"div"),C(33),r(34,"span"),g(35,3),s(),r(36,"div",29),m(37,"div",30),s()(),r(38,"div",31)(39,"div",32),C(40),P(41,"currency"),s(),r(42,"div",33),g(43,4),s(),p(44,Jc,6,6,"ng-container",28),s(),r(45,"div",34)(46,"ta-button",35),m(47,"ta-icon",36),s(),p(48,od,6,5,"ng-template",null,0,k),s()(),p(50,ad,2,1,"div",37),s()}if(n&2){let l=V(49);o(4),ai("routerLink","/group-travel/",i.travelEventListItem.id,""),o(),te("past",i.travelEventListItem.isPastEvent),a("src",i.travelEventListItem.pictureUrl||"assets/images/svg/hotel/skeletons/hotel-skeleton-4.svg",ze),o(2),a("title",i.travelEventListItem.name),o(2),G(i.travelEventListItem.name),o(),a("ngIf",i.showInviteLinkIcon),o(),a("ngIf",i.eventTagData),o(2),a("ngIf",i.travelEventListItem.eventOrganiser),o(2),G(i.travelEventListItem.eventOrganiser.fullName),o(2),G(i.travelEventListItem.locationName),o(2),a("src",A(20,27,"icons/gray/return-flight-arrow.svg"),ze),o(3),a("popoverConfig",me(47,wc,Se(46,Uc)))("taPopover","Starts at: "+Ot(23,29,i.travelEventListItem.eventSchedule.startDateTime,"shortTime")),o(2),B(" ",Ot(25,32,i.travelEventListItem.eventSchedule.startDateTime,"mediumDate")," "),o(3),a("taPopover","Ends at: "+Ot(28,35,i.travelEventListItem.eventSchedule.endDateTime,"shortTime")),o(2),B(" ",Ot(30,38,i.travelEventListItem.eventSchedule.endDateTime,"mediumDate")," "),o(2),a("ngIf",i.showTimeIndication),o(2),dn(" ",i.numberOfParticipantsWhoBookedTrip,"/",i.totalNumberOfParticipants," "),o(4),a("ngStyle",tt(49,Vc,150/i.totalNumberOfParticipants*i.numberOfParticipantsWhoBookedTrip+"px",i.totalNumberOfParticipants===i.numberOfParticipantsWhoBookedTrip?"#20DF80":"")),o(3),B(" ",St(41,41,i.totalCostAmount,i.totalCostCurrency,"symbol-narrow","1.0-0")," "),o(4),a("ngIf",i.shouldDisplayEstimate&&(i.isDraft||i.isActive)),o(2),a("taPopover",l)("popoverConfig",me(55,$c,me(53,Dc,Se(52,kc)))),o(4),a("ngIf",i.isPendingApproval&&i.isSessionUserAdmin)}},dependencies:[Sr,Bn,L,Jt,qt,Bo,re,_r,un,Dn,K,Z,ie,Ee,bl,Yt,Gn,fn],styles:['@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.wide-event-column[_ngcontent-%COMP%]{min-width:400px;margin-top:0!important}.wide-event-column__head[_ngcontent-%COMP%]{box-sizing:border-box;padding-left:140px}
1.medium-event-column[_ngcontent-%COMP%]{min-width:200px}.small-event-column[_ngcontent-%COMP%]{max-width:50px}.event-picture[_ngcontent-%COMP%]{height:120px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:120px;margin-left:var(--dim-step5)}.event-picture[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-name-organizer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;margin:0 var(--dim-step19) 0 var(--dim-step5)}.event-name[_ngcontent-%COMP%]{height:28px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:160px;margin-bottom:var(--dim-step5)}.event-name[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-organizer[_ngcontent-%COMP%]{height:20px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:80px}.event-organizer[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-location[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:120px;margin:0 var(--dim-step5) var(--dim-step10) var(--dim-step10)}.event-location[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-dates-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-left:var(--dim-step20);height:70px}.event-dates-container[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:85px}.event-dates-container[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.participant[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:144px;margin:0 0 var(--dim-step13) var(--dim-step10)}.participant[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.estimates-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;flex-wrap:nowrap;height:55px;margin-left:var(--dim-step13)}
1.estimates-container[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]{height:28px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:80px}.estimates-container[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.estimates-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:56px}.estimates-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-item[_ngcontent-%COMP%]{margin-top:var(--dim-step4);background:var(--ta-color-surface-default);border-radius:var(--dim-step3);box-shadow:0 1px 4px #0003}.event-item__details[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;background:var(--ta-color-surface-default);border-radius:var(--dim-step3);padding:var(--dim-step5) 0;box-shadow:0 1px 4px #0003}.event-item__details[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:159.3333333333px;margin:0 var(--dim-step1);margin-left:var(--dim-step5)}.event-item__details[_ngcontent-%COMP%] > div.total-cost[_ngcontent-%COMP%]{text-align:right;margin-right:0}.event-item__name[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.event-item__name--link[_ngcontent-%COMP%]{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:265px;color:var(--ta-color-text-default)}.event-item__name--link[_ngcontent-%COMP%]:hover{text-decoration:none;color:var(--ta-color-text-primary)}.event-item__name--link-disabled[_ngcontent-%COMP%]{color:var(--ta-color-text-disabled);pointer-events:none;cursor:default}.event-item__name--avatar[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.event-item__name--avatar[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-left:var(--dim-step3)}.event-item__name--text[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.event-item__name[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step2);text-align:left;margin:0 0 var(--dim-step3)}.event-item__name__link-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-primary);cursor:pointer}.event-item__name__link-icon[_ngcontent-%COMP%]:hover{opacity:.7}.event-item__name[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:120px;height:120px;object-fit:cover;border-radius:var(--dim-step1);margin-right:var(--dim-step5);background:var(--ta-color-surface-background)}.event-item__name[_ngcontent-%COMP%]   img.past[_ngcontent-%COMP%]{filter:grayscale(100%)}.event-item__tags[_ngcontent-%COMP%]{margin-bottom:var(--dim-step3)}.event-item__tag[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.event-item__date-time[_ngcontent-%COMP%]{position:relative;min-width:100px}.event-item__icon[_ngcontent-%COMP%]{position:absolute;left:-15px;top:10px}.event-item__date[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2)}.event-item__date--past[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-warning)}.event-item__date--future[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-success)}.event-item__progress[_ngcontent-%COMP%]{margin-top:var(--dim-step2);width:150px;height:10px;border-radius:var(--dim-step2);background:var(--ta-color-surface-background);overflow:hidden}.event-item__progress--inner[_ngcontent-%COMP%]{height:10px;width:0;background:var(--ta-color-surface-contrast)}.event-item__cost[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;flex-wrap:nowrap}.event-item__cost-actual-cost[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.event-item__cost-actual-cost-description[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start}.event-item__cost-estimated-cost[_ngcontent-%COMP%], .event-item__cost-estimated-cost-description[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-subtle)}.event-item__cost-estimated-cost[_ngcontent-%COMP%]{margin-top:var(--dim-step4)}.event-item__menu[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;border-radius:var(--dim-step3);overflow:hidden}.event-item__menu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{margin:var(--dim-step2) 0}.event-item__menu[_ngcontent-%COMP%]     .dark button{color:var(--ta-color-text-default)}.event-item__menu[_ngcontent-%COMP%]     button{justify-content:left;border-radius:0}']})}}return t})();E();var $l=ao(Wr()),Gl=ao(tc()),Bl=ao(nc());be();var zl=()=>({clickedItem:"createEventButton",source:"eventsPage"}
1),Hl=()=>[];function rd(t,_){if(t&1&&m(0,"a",14),t&2){let e=c();a("href",e.meetingRequestUrl,ze)("target",e.meetingRequestTarget)("text",e.meetingRequestLinkText)}}function sd(t,_){t&1&&m(0,"div",28)}function ld(t,_){t&1&&(r(0,"div",16),m(1,"div",17),r(2,"div",18),m(3,"div",19)(4,"div",20),s(),m(5,"div",21),r(6,"div",22),p(7,sd,1,0,"div",23),s(),m(8,"div",24),r(9,"div",25),m(10,"div",26)(11,"div",27),s()()),t&2&&(o(7),a("ngForOf",Se(1,Hl).constructor(3)))}function _d(t,_){t&1&&(w(0),p(1,ld,12,2,"div",15),U()),t&2&&(o(),a("ngForOf",Se(1,Hl).constructor(3)))}function cd(t,_){if(t&1){let e=O();r(0,"ta-travel-event-item",32),S("openEvent",function(i){f(e);let l=c(3);return v(l.onOpenEvent(i))})("cancelEvent",function(i){f(e);let l=c(3);return v(l.onCancelEvent(i))})("changeOrganiser",function(i){f(e);let l=c(3);return v(l.onChangeOrganiser(i))})("approveProposal",function(i){f(e);let l=c(3);return v(l.onApproveProposal(i))})("declineProposal",function(i){f(e);let l=c(3);return v(l.onDeclineProposal(i))})("openManagerDashboard",function(i){f(e);let l=c(3);
1return v(l.onOpenManagerDashboard(i))})("duplicateEvent",function(i){f(e);let l=c(3);return v(l.onDuplicateEvent(i))})("manageCollaborators",function(i){f(e);let l=c(3);return v(l.onManageCollaborators(i))}),s()}if(t&2){let e=_.$implicit,n=c(3);a("travelEventListItem",e)("isSessionUserAdmin",n.isUserAdmin)("sessionUserUuid",n.organizerId)("eventStatusTagData",n.groupTravelUtilService.getEventStatusTagData())("eventProposalStatusTagData",n.groupTravelUtilService.getEventProposalStatusTagData())}}function dd(t,_){if(t&1){let e=O();r(0,"ta-pagination",33),S("pageChange",function(i){f(e);let l=c(3);return v(l.loadEvents(i-1,l.filterParams))}),s()}if(t&2){let e=c(3);a("activePage",e.pagination.number+1)("totalPages",e.pagination.totalPages)}}function pd(t,_){if(t&1&&(w(0),p(1,cd,1,5,"ta-travel-event-item",29),r(2,"div",30),p(3,dd,1,2,"ta-pagination",31),s(),U()),t&2){let e=c(2);o(),a("ngForOf",e.travelEventListItems),o(2),a("ngIf",!e.loading&&(e.travelEventListItems==null?null:e.travelEventListItems.length)&&(e.pagination==null?null:e.pagination.totalPages)>1)}}function md(t,_){t&1&&(r(0,"div",35),de(1,4),m(2,"span"),pe(),s())}function Ed(t,_){if(t&1){let e=O();r(0,"div",36)(1,"div",37),g(2,5),s(),r(3,"ta-button-v2",38),S("clickEvent",function(){f(e);let i=c(3);return v(i.createEvent())}),s()()}if(t&2){let e=c(3);o(2),q(e.emptyText),J(2),o(),a("text",e.createText)("taTrack",Se(3,zl))}}function ud(t,_){if(t&1&&p(0,md,3,0,"div",34)(1,Ed,4,4,"ng-template",null,2,k),t&2){let e=V(2),n=c(2);a("ngIf",n.filtersPresent&&!n.loading)("ngIfElse",e)}}function gd(t,_){if(t&1&&p(0,pd,4,2,"ng-container",13)(1,ud,3,2,"ng-template",null,1,k),t&2){let e=V(2),n=c();a("ngIf",n.travelEventListItems==null?null:n.travelEventListItems.length)("ngIfElse",e)}}var Xl=(()=>{class t{constructor(e,n,i,l,d,u,h,I,F,$,ge,W,oe,Ie,ae,It){this.router=e,this.sessionQuery=n,this.growthService=i,this.amplitudeService=l,this.groupTravelUtilService=d,this.groupTravelApiService=u,this.travelEventQuery=h,this.travelEventStore=I,this.groupTravelModalsService=F,this.toastrService=$,this.groupTravelAnalyticsService=ge,this.headerService=W,this.iconRegistry=oe,this.splitService=Ie,this.createEventNavigationService=ae,this.window=It,this.filterParams={},this.filtersPresent=!1,this.isAffiliate=!1,this.loading=!0,this.filtersApplied=!1,this.title=$localize`Events`,this.subtitle=$localize`View and manage your events`,this.createText=$localize`Create event`,this.emptyText=$localize`Once you create an event, you'll be able to manage the details here.`,this.mainColumnText=$localize`Event name & organizer`,this.isTeamOffsite=!1,this.isUserAdmin=!1,this.isMultipleCollaboratorsEnabled=!1,this.eventFilterStatuses=Object.keys(ye),this.eventFilterDefaultStatuses=this.eventFilterStatuses.filter(Le=>Le!==ye.CANCELED),this.eventFilterLabels={[ye.DRAFT]:$localize`Draft`,[ye.ACTIVE]:$localize`In progress`,[ye.CANCELED]:$localize`Canceled`,[ye.COMPLETED]:$localize`Completed`},this.teamEventRoomBlocksEnabled=!1,this.showMeetingRequestLink=this.splitService.isOn(oa),this.showNavanMeetingRequestForm=this.splitService.isOn("ENT_NAVAN_MEETING_REQUEST_FORM"),this.meetingRequestLinkText=$localize`Connect with our full-service events team`,this.REED_AND_MACKAY_URL="https://web.cvent.com/p/88addf9c-2e09-4e28-93bf-b2886bc53e4a/requests_events/4c3761de-b7a4-4e81-9a5f-3e15136907c6/?goToSMMFormId=4c3761de-b7a4-4e81-9a5f-3e15136907c6",this.MEETING_REQUEST_FORM_URL=`${ri}/meeting-request`,this.newEvents=new rt(null),this.newEvents$=this.newEvents.asObservable(),this.iconRegistry.registerIcons(yr)}get totalNumberOfEvents(){return this.pagination?.totalElements?`(${this.pagination.totalElements})`:""}get meetingRequestUrl(){return this.showNavanMeetingRequestForm?this.MEETING_REQUEST_FORM_URL:this.REED_AND_MACKAY_URL}get meetingRequestTarget(){return this.showNavanMeetingRequestForm?"_self":"_blank"}ngOnInit(){this.amplitudeService.addCustomData("pageName",Us.EVENT_LIST),this.amplitudeService.addCustomData("eventType",X.GROUP_TRAVEL_EVENT),N(gi.OPEN_EVENTS_PAGE),N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENTS_LIST}),this.sessionQuery.selectUserInfo$.pipe(ce(1)).subscribe(e=>{this.isTeamOffsite=this.growthService.isGrowthSelfSell(e),this.teamEventRoomBlocksEnabled=this.growthService.isSelfSellUser(e),this.isAffiliate=e?.isAffiliate,this.isUserAdmin=e.admin,this.isMultipleCollaboratorsEnabled=this.splitService.isOn("GME_MULTI_COLLABORATORS"),this.organizerId=e.uuid,this.defaultFilterPreferences=this.groupTravelUtilService.getAdminFilterPreferences(),this.subscribeToLoadEvents(e),this.initTeamOffsiteTexts()}),this.subscribeToNewEventsUpdate()}ngOnDestroy(){this.amplitudeService.removeCustomData("pageName"),this.amplitudeService.removeCustomData("eventType"),this.headerService.updateEventsTabUrl(this.teamEventRoomBlocksEnabled&&!!this.travelEventListItems?.length)}loadEvents(e,n={}){this.newEvents.next({page:e,filters:n})}createEvent(){N(X.CLICK_CREATE_EVENT),N(z.EVENT_CREATE_CLICKED,{[x.VIEW]:H.EVENT_CREATE}),this.createEventNavigationService.navigateToCreateEvent(this.window,()=>{this.router.navigate(["search"],{queryParams:{suggestionType:"flight",skip:"true",team:"true"}})})}onOpenEvent(e){e.isTeamOffsite?this.router.navigate([`/group-travel/${e.id}`]):this.shouldOpenEventInNewUI(e.boompopEventId)?this.window.open(`${ri}/${e.id}/overview`,"_self"):this.router.navigate([`/group-travel/${e.id}`])}shouldOpenEventInNewUI(e){return e||this.splitService.isOn("ENT_BOOMPOP_EXPERIENCE")||this.splitService.isOn("ENT_EVENTS_NEW_REACT_EXPERIENCE")}setFiltersPresent(e){this.filtersPresent=!!(e.eventName||e.range.from||e.range.to||this.hasCustomStatuses(e.statuses))}hasCustomStatuses(e=[]){return!!e.length&&!(0,$l.default)([...e].sort(),[...this.eventFilterDefaultStatuses].sort())}filtersChanged(e){this.setFiltersPresent(e);let{range:n,eventName:i,statuses:l}=e,d=e.displayedEvents==="all"&&(this.isUserAdmin||this.isMultipleCollaboratorsEnabled);this.filterParams=(0,Bl.default)({q:i,startDateTo:n.to?.toISOString(),startDateFrom:n.from?.toISOString(),statuses:l.length?l:this.eventFilterDefaultStatuses,organizers:d?[]:[this.organizerId]},Gl.default),this.filtersApplied=this.hasCustomStatuses(l)||Object.entries(this.filterParams).some(([u,h])=>u!=="statuses"&&!!h?.length),this.groupTravelUtilService.setAdminFilterPreferences({isAllEvents:e.displayedEvents==="all"}),this.loadEvents(0,this.filterParams)}onApproveProposal(e){this.groupTravelModalsService.approveProposal(e,this.travelEventQuery.proposalId(e)).afterClosed$.pipe(ee(n=>!!(n.type==="close"&&n.result.id))).subscribe(n=>this.travelEventStore.updateTravelEventProposalFromList(e,n.result))}onDeclineProposal(e){this.groupTravelModalsService.declineProposal(e,this.travelEventQuery.proposalId(e)).afterClosed$.pipe(ee(n=>!!(n.type==="close"&&n.result?.id))).subscribe(n=>this.travelEventStore.updateTravelEventProposalFromList(e,n.result))}onCancelEvent(e){let n=this.travelEventQuery.getEntity(e);this.groupTravelModalsService.cancelEvent(n,(i,l)=>this.cancelEvent(i,l),this.travelEventQuery.selectLoading()).afterClosed$.pipe(Q(i=>i.result),ee(i=>!!i)).subscribe(()=>{let i=this.groupTravelAnalyticsService.getCancelEventTrackedData(n);this.showTeamEventRemovedSuccessfullyToast(n.summary.name,n.status),Re(le({},i),{clickedItem:i.eventStatus===ye.DRAFT?"confirmDeleteDraft":"confirmCancelEvent"}),N(z.EVENT_CANCELED,{[x.VIEW]:H.EVENTS_LIST})},()=>{let i=this.groupTravelAnalyticsService.getCancelEventTrackedData(n);})}onChangeOrganiser(e){let n=this.travelEventQuery.getEntity(e);this.groupTravelModalsService.changeOrganizer(n,i=>this.changeOrganizer(i,n),this.travelEventQuery.selectLoading())}onOpenManagerDashboard(e){this.window.location.href=`/app/admin2/manager/dashboard?eventUuid=${e}`}onDuplicateEvent(e){this.window.open(`${ri}/${e}/overview?action=duplicate`,"_self")}onManageCollaborators(e){this.window.open(`${ri}/${e}/overview?action=manageCollaborators`,"_self")}initTeamOffsiteTexts(){this.isTeamOffsite&&(this.title=$localize`Group travel`,this.subtitle=$localize`View and manage your group travel`,this.createText=$localize`Create group event`,this.emptyText=$localize`Once you create a group event, you’ll be able to manage the details here.`,this.mainColumnText=$localize`Offsite name & organizer`)}subscribeToLoadEvents(e){this.newEvents$.pipe(ee(n=>!!n),ue(n=>{let{page:i,filters:l={}}=n;return l.types=this.getVisibleEventTypes(e),this.loading=!0,this.groupTravelApiService.getEvents(i,l).pipe(He(()=>{this.loading=!1,this.filtersApplied=!1}),ee(d=>!!d.travelEvents.content))})).subscribe(n=>{this.pagination={totalElements:n.travelEvents.totalElements,totalPages:n.travelEvents.totalPages,size:n.travelEvents.size,number:n.travelEvents.number},this.teamEventRoomBlocksEnabled&&!this.pagination?.totalElements&&!this.filtersApplied&&(this.headerService.updateEventsTabUrl(this.teamEventRoomBlocksEnabled&&!!this.travelEventListItems?.length),this.router.navigateByUrl("group-travel/create"))})}getVisibleEventTypes(e){return this.shouldShowBothEventTypesForUser(e)?[sn.TEAM_OFFSITE,sn.GROUP_TRAVEL]:this.isTeamOffsite?[sn.TEAM_OFFSITE]:[sn.GROUP_TRAVEL]}
1shouldShowBothEventTypesForUser(e){let n=!!e?.isAffiliate,i=this.growthService.isAdminClaimedWithoutAffiliate(e),l=this.isSelfSellAdminSetupCompletedWithoutGrowthState(e);return n||i||l}isSelfSellAdminSetupCompletedWithoutGrowthState(e){let n=this.growthService.isSelfSellUser(e),i=!!e?.growthSelfSellAdminSetupCompleted,l=!e?.growthSelfSellState;return n&&i&&l}subscribeToNewEventsUpdate(){this.travelEventQuery.getTravelEventListItems$.subscribe(e=>{this.travelEventListItems=e})}cancelEvent(e,n){let{cancelNote:i="",modalRef:l}=e,d=i.trim().length?{cancellationNote:i}:null;this.travelEventStore.setLoading(!0),this.groupTravelApiService.deleteTeamEvent(n,this.travelEventQuery.getEventStatus(n),d).pipe(He(()=>{this.travelEventStore.setLoading(!1)})).subscribe(u=>{l.close(u),this.isAffiliate&&this.headerService.resetTravelEventsLoaded(),this.loadEvents(this.pagination?.number||0,this.filterParams)},()=>{this.toastrService.error($localize`An error occurred while deleting the event.`),l.close()})}changeOrganizer(e,n){let{organiserUuid:i,modalRef:l}=e;i?(this.travelEventStore.setLoading(!0),this.groupTravelApiService.updateTravelEventOrganizer(n.id,i).pipe(He(()=>{this.travelEventStore.setLoading(!1),l.close()})).subscribe(()=>{let d=$localize`The event organizer has been updated.`;this.toastrService.show(d,"success",!0)},()=>this.toastrService.error($localize`An error occurred while changing the organiser.`))):l.close()}showTeamEventRemovedSuccessfullyToast(e,n){let i=n===ye.DRAFT?$localize`${e}:event name: draft is deleted`:$localize`${e}:event name: is canceled`,l=n===ye.DRAFT?"":$localize`The invitees have been notified by email.`;this.toastrService.show(i,"success",!0,{subtitle:l})}static{this.\u0275fac=function(n){return new(n||t)(T(Je),T(vt),T(en),T($o),T(nn),T(Ae),T(ve),T(tn),T(Wn),T(gt),T(Yn),T(al),T(ne),T(Ce),T(aa),T(Di))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-events-list"]],standalone:!0,features:[y],decls:13,vars:15,consts:()=>{let e;e=$localize`:␟1caf5530bb11bf5ed57422ca5a77145f04bf888c␟1370387345772297968: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#5\uFFFD"}:START_TAG_SPAN:${"\uFFFD1\uFFFD"}:INTERPOLATION_1:${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPAN:`;let n;n=$localize`:␟b81fa3087230970af1d81428afd89e396674edcb␟2090034316192956829:${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:No results${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN: matched your search. Change your filters, then try again. `;let i;return i=$localize`:␟e84eeb0556546daaa1649c71f15e8c838de1c744␟537285184516004773: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["loadedEvents",""],["noResults",""],["noFilters",""],e,n,i,[1,"event-list"],[1,"event-list__header"],[1,"event-list__header--title-rebrand"],[1,"event-list__header__controls"],["buttonV2","","color","primary","variant","ghost","rel","noopener noreferrer",3,"href","target","text",4,"ngIf"],["flex","true","icon","plus","size","medium","data-testid","createEventButton",3,"clickEvent","text","taTrack"],["data-testid","eventsSearchFilter",3,"filtersChanged","isTeamOffsite","isUserAdmin","showDisplayedEventsFilter","defaultPreferences","statuses","defaultStatuses","labels"],[4,"ngIf","ngIfElse"],["buttonV2","","color","primary","variant","ghost","rel","noopener noreferrer",3,"href","target","text"],["class","event-list__skeleton-redesign",4,"ngFor","ngForOf"],[1,"event-list__skeleton-redesign"],[1,"event-list__skeleton-redesign--item","event-picture"],[1,"event-name-organizer-container"],[1,"event-list__skeleton-redesign--item","event-name"],[1,"event-list__skeleton-redesign--item","event-organizer"],[1,"event-list__skeleton-redesign--item","event-location"],[1,"event-dates-container"],["class","event-list__skeleton-redesign--item date",4,"ngFor","ngForOf"],[1,"event-list__skeleton-redesign--item","participant"],[1,"estimates-container"],[1,"event-list__skeleton-redesign--item","amount"],[1,"event-list__skeleton-redesign--item","text"],[1,"event-list__skeleton-redesign--item","date"],[3,"travelEventListItem","isSessionUserAdmin","sessionUserUuid","eventStatusTagData","eventProposalStatusTagData","openEvent","cancelEvent","changeOrganiser","a
1pproveProposal","declineProposal","openManagerDashboard","duplicateEvent","manageCollaborators",4,"ngFor","ngForOf"],[1,"event-list__pagination"],[3,"activePage","totalPages","pageChange",4,"ngIf"],[3,"openEvent","cancelEvent","changeOrganiser","approveProposal","declineProposal","openManagerDashboard","duplicateEvent","manageCollaborators","travelEventListItem","isSessionUserAdmin","sessionUserUuid","eventStatusTagData","eventProposalStatusTagData"],[3,"pageChange","activePage","totalPages"],["class","event-list__change-filters",4,"ngIf","ngIfElse"],[1,"event-list__change-filters"],[1,"event-list__no-results"],[1,"event-list__no-results--text"],["kind","ghost",3,"clickEvent","text","taTrack"]]},template:function(n,i){if(n&1){let l=O();r(0,"div",6)(1,"div",7)(2,"div")(3,"h1",8),de(4,3),m(5,"span"),pe(),s()(),r(6,"div",9),p(7,rd,1,3,"a",10),r(8,"ta-button-v2",11),S("clickEvent",function(){return f(l),v(i.createEvent())}),s()()(),r(9,"ta-event-filters",12),S("filtersChanged",function(u){return f(l),v(i.filtersChanged(u))}),s(),p(10,_d,2,2,"ng-container",13)(11,gd,3,2,"ng-template",null,0,k),s()}if(n&2){let l=V(12);o(5),q(i.title)(i.totalNumberOfEvents),J(4),o(2),a("ngIf",i.showMeetingRequestLink),o(),a("text",i.createText)("taTrack",Se(14,zl)),o(),a("isTeamOffsite",i.isTeamOffsite)("isUserAdmin",i.isUserAdmin)("showDisplayedEventsFilter",i.isMultipleCollaboratorsEnabled)("defaultPreferences",i.defaultFilterPreferences)("statuses",i.eventFilterStatuses)("defaultStatuses",i.eventFilterDefaultStatuses)("labels",i.eventFilterLabels),o(),a("ngIf",i.loading)("ngIfElse",l)}},dependencies:[ie,Ee,qr,Bn,Rl,L,_e,Dl,Xo],styles:['@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.wide-event-column[_ngcontent-%COMP%]{min-width:400px;margin-top:0!important}.wide-event-column__head[_ngcontent-%COMP%]{box-sizing:border-box;padding-left:140px}
1.medium-event-column[_ngcontent-%COMP%]{min-width:200px}.small-event-column[_ngcontent-%COMP%]{max-width:50px}.event-picture[_ngcontent-%COMP%]{height:120px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:120px;margin-left:var(--dim-step5)}.event-picture[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-name-organizer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;margin:0 var(--dim-step19) 0 var(--dim-step5)}.event-name[_ngcontent-%COMP%]{height:28px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:160px;margin-bottom:var(--dim-step5)}.event-name[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-organizer[_ngcontent-%COMP%]{height:20px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:80px}.event-organizer[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-location[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:120px;margin:0 var(--dim-step5) var(--dim-step10) var(--dim-step10)}.event-location[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-dates-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-left:var(--dim-step20);height:70px}.event-dates-container[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:85px}.event-dates-container[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.participant[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:144px;margin:0 0 var(--dim-step13) var(--dim-step10)}.participant[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.estimates-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;flex-wrap:nowrap;height:55px;margin-left:var(--dim-step13)}
1.estimates-container[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]{height:28px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:80px}.estimates-container[_ngcontent-%COMP%]   .amount[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.estimates-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]{height:16px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;width:56px}.estimates-container[_ngcontent-%COMP%]   .text[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-list[_ngcontent-%COMP%]{width:1128px;margin:auto;padding-top:var(--dim-step7)}.event-list__top[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0;height:335px;background:var(--ta-color-surface-contrast);z-index:-1;overflow:hidden}.event-list__header[_ngcontent-%COMP%]{color:var(--ta-color-text-inverse);display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step4)}.event-list__header__controls[_ngcontent-%COMP%]{display:flex;gap:var(--dim-step4)}.event-list__header__controls[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:unset}.event-list__header--title[_ngcontent-%COMP%]{line-height:normal;margin-bottom:var(--dim-step2)}.event-list__header--title[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:var(--text-weight-regular)}.event-list__header--title-rebrand[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xxxh);font-weight:var(--text-weight-medium);text-align:start;font-family:nvn-heading,Sanomat;line-height:44px;margin:var(--dim-step3) 0}.event-list__header--title-rebrand[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:var(--text-weight-regular)}.event-list__items--header[_ngcontent-%COMP%]{margin-top:var(--dim-step8);color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;background:var(--ta-color-surface-default);border-radius:var(--dim-step3);padding:var(--dim-step5) 0;box-shadow:0 1px 4px #0003}.event-list__items--header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:159.3333333333px;margin:0 var(--dim-step1);margin-left:var(--dim-step5)}.event-list__items--header[_ngcontent-%COMP%] > div.total-cost[_ngcontent-%COMP%]{text-align:right;margin-right:0}.event-list__items--header[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin-top:0}.event-list__pagination[_ngcontent-%COMP%]{margin:var(--dim-step13) 0 var(--dim-step20)}.event-list__no-results[_ngcontent-%COMP%]{margin-top:var(--dim-step20);gap:var(--dim-step4);display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap}.event-list__no-results--text[_ngcontent-%COMP%]{margin-top:var(--dim-step11)}.event-list__change-filters[_ngcontent-%COMP%]{margin-top:var(--dim-step20);padding-top:var(--dim-step10);text-align:center;color:var(--ta-color-text-subtle)}.event-list__change-filters[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:var(--text-weight-bold)}.event-list__skeleton[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;background:var(--ta-color-surface-default);border-radius:var(--dim-step3);padding:var(--dim-step5) 0;box-shadow:0 1px 4px #0003;margin-top:var(--dim-step5)}.event-list__skeleton[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{width:159.3333333333px;margin:0 var(--dim-step1);margin-left:var(--dim-step5)}.event-list__skeleton[_ngcontent-%COMP%] > div.total-cost[_ngcontent-%COMP%]{text-align:right;margin-right:0}.event-list__skeleton--item[_ngcontent-%COMP%]{margin-top:0!important;height:20px;overflow:hidden;background-color:var(--ta-color-surface-neutral);position:relative;border:1px solid var(--ta-color-border-default);border-radius:var(--dim-step1);width:100%}.event-list__skeleton--item[_ngcontent-%COMP%]:after{position:absolute;content:"";left:0;top:0;width:100%;height:100%;animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:transparent;background-image:linear-gradient(100deg,#fff0,#fff6 40%,#fffc,#fff6 60%,#fff0);background-repeat:no-repeat;background-size:900px 300px}.event-list__skeleton-redesign[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;background:var(--ta-color-surface-default);border-radius:var(--dim-step3);box-shadow:0 1px 4px #0003;margin-top:var(--dim-step5);height:160px}.event-list__skeleton-redesign--item[_ngcontent-%COMP%]{border-radius:var(--dim-step1)}.event-list[_ngcontent-%COMP%]   .participants[_ngcontent-%COMP%]{margin-left:calc(var(--dim-step3) * -1)}']}
1)}}return t})();E();E();E();be();E();var vd=()=>({placeAt:"bottomRightAlign",offsetY:8}),Td=t=>({placement:t});function Sd(t,_){if(t&1){let e=O();w(0),r(1,"ta-button-v2",5),S("clickEvent",function(){f(e);let i=c();return v(i.add())}),s(),U()}if(t&2){let e=c();o(),a("disabled",e.isAddParticipantsDisabled)}}function Pd(t,_){if(t&1){let e=O();w(0),r(1,"div",6)(2,"div",7),S("taPopoverOnOpen",function(){f(e);let i=c();return v(i.openDropdown())})("taPopoverOnClose",function(){f(e);let i=c();return v(i.isOpened=!1)}),r(3,"span"),g(4,1),s(),m(5,"ta-icon-v2",8),s()(),U()}if(t&2){let e=c(),n=V(3);o(2),te("add-participants-dropdown__dropdown--active",e.isOpened)("add-participants-dropdown__dropdown--disabled",e.isAddParticipantsDisabled),a("taPopover",e.isAddParticipantsDisabled?null:n)("popoverConfig",me(8,Td,Se(7,vd))),o(3),a("icon",e.isOpened?"dropdown-triangle-top":"dropdown-triangle")}}function Cd(t,_){if(t&1){let e=O();r(0,"div",9)(1,"div",10),S("click",function(){f(e);let i=c();return v(i.add())}),g(2,2),s(),r(3,"div",11),S("click",function(){f(e);let i=c();return v(i.upload())}),g(4,3),s()()}}var Pa=(()=>{class t{constructor(){this.iconRegistry=M(ne),this.isAddParticipantsDisabled=!1,this.isParticipantsUploadEnabled=!1,this.openAddParticipantsModal=new Y,this.openUploadParticipantsModal=new Y,this.isOpened=!1,this.iconRegistry.registerIcons(Br,zr)}add(){N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_MANUAL_ADD}),this.openAddParticipantsModal.emit(),this.closeDropdown()}upload(){N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_BULK_UPLOAD}),this.openUploadParticipantsModal.emit(),this.closeDropdown()}openDropdown(){this.isOpened=!0,N(z.PARTICIPANTS_ADD_CLICKED,{[x.VIEW]:H.PARTICIPANTS_MAIN,[x.UI_ELEMENT]:Cs.BUTTON})}closeDropdown(){this.dropdownRef?.close()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-add-participants-button"]],viewQuery:function(n,i){if(n&1&&st(re,5),n&2){let l;lt(l=_t())&&(i.dropdownRef=l.first)}},inputs:{isAddParticipantsDisabled:"isAddParticipantsDisabled",isParticipantsUploadEnabled:"isParticipantsUploadEnabled"},outputs:{openAddParticipantsModal:"openAddParticipantsModal",openUploadParticipantsModal:"openUploadParticipantsModal"},standalone:!0,features:[y],decls:4,vars:2,consts:()=>{let e;e=$localize`:␟fecad782fba70ee685ec710441f773e63aabff3b␟3254704890202068579:Add participants`;let n;n=$localize`:␟fecad782fba70ee685ec710441f773e63aabff3b␟3254704890202068579:Add participants`;let i;i=$localize`:␟e1c18716f1806d639f9d52d4eab39038e14b0684␟3128303442542442034: Add participants manually `;let l;return l=$localize`:␟40e7fd8760f6abdb07a674c87d33d4b794fffc69␟1687137371355488722: Bulk upload participants `,[["dropdown",""],n,i,l,[4,"ngIf"],["size","regular","text",e,"data-testid","Add participants button",1,"team-event__add-participant-button",3,"clickEvent","disabled"],["data-testid","Add participants dropdown",1,"add-participants-dropdown"],[1,"add-participants-dropdown__dropdown",3,"taPopoverOnOpen","taPopoverOnClose","taPopover","popoverConfig"],[3,"icon"],[1,"add-participants-dropdown__popover"],["role","button","data-testid","Add participants button",1,"add-participants-dropdown__popover-item","add-participants-dropdown__popover-item--add",3,"click"],["role","button","data-testid","Upload participants button",1,"add-participants-dropdown__popover-item","add-participants-dropdown__popover-item--upload",3,"click"]]},template:function(n,i){n&1&&p(0,Sd,2,1,"ng-container",4)(1,Pd,6,10,"ng-container",4)(2,Cd,5,0,"ng-template",null,0,k),n&2&&(a("ngIf",!i.isParticipantsUploadEnabled),o(),a("ngIf",i.isParticipantsUploadEnabled))},dependencies:[mt,L,ie,Ee,K,Z,zo,re],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.add-participants-dropdown__dropdown[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;background-color:var(--ta-color-action-primary);color:var(--ta-color-text-inverse);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;width:100%;height:44px;border-radius:8px;
1cursor:pointer;padding:0 var(--dim-step1) 0 var(--dim-step2)}.add-participants-dropdown__dropdown.hover[_ngcontent-%COMP%]{background-color:var(--ta-color-action-primary-hovered)}.add-participants-dropdown__dropdown--active[_ngcontent-%COMP%]{background-color:var(--ta-color-action-primary-pressed)}.add-participants-dropdown__dropdown--disabled[_ngcontent-%COMP%]{background-color:var(--ta-color-action-disabled);color:var(--ta-color-text-disabled);cursor:not-allowed;pointer-events:none}.add-participants-dropdown__popover[_ngcontent-%COMP%]{padding:var(--dim-step3) 0}.add-participants-dropdown__popover-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;padding:var(--dim-step2) var(--dim-step5);cursor:pointer;line-height:2}.add-participants-dropdown__popover-item[_ngcontent-%COMP%]:hover{background-color:var(--color-surface-background)}"],changeDetection:0})}}return t})();function hd(t,_){t&1&&zt(0)}function Ad(t,_){if(t&1&&(w(0),p(1,hd,1,0,"ng-container",13),U()),t&2){c();let e=V(7);o(),a("ngTemplateOutlet",e)}}function Od(t,_){t&1&&(r(0,"p"),g(1,2),s())}function Md(t,_){t&1&&(r(0,"p"),g(1,3),s())}function Nd(t,_){if(t&1&&(r(0,"div",14),p(1,Od,2,0,"p",15)(2,Md,2,0,"p",15),s()),t&2){let e=c();o(),a("ngIf",!e.teamEventRoomBlocksEnabled),o(),a("ngIf",e.teamEventRoomBlocksEnabled)}}function Rd(t,_){if(t&1){let e=O();r(0,"div",16)(1,"div",17)(2,"ta-button-v2",18),S("clickEvent",function(){f(e);let i=c();return v(i.downloadManifest())}),s(),r(3,"ta-add-participants-button",19),S("openAddParticipantsModal",function(){f(e);let i=c();return v(i.onOpenAddParticipantsModal.emit())})("openUploadParticipantsModal",function(){f(e);let i=c();return v(i.onOpenUploadParticipantsModal.emit())}),s()()()}if(t&2){let e=c();o(2),a("taLoading",e.downloadingManifest),o(),a("isAddParticipantsButtonLoading",e.isAddParticipantsButtonLoading)("isAddParticipantsDisabled",e.isAddParticipantsDisabled)("isParticipantsUploadEnabled",e.isParticipantsUploadEnabled)}}function bd(t,_){t&1&&m(0,"ta-icon-v2",22),t&2&&a("inline",!0)}function yd(t,_){t&1&&(r(0,"h2"),g(1,4),s())}function Id(t,_){if(t&1&&(de(0,5,1),m(1,"span",24),pe()),t&2){let e=c(3);o(),q(e.totalEventParticipantLength),J(0)}}function xd(t,_){if(t&1&&(r(0,"h2"),de(1,5),p(2,Id,2,1,"span",23),pe(),s()),t&2){let e=c(2);o(2),a("ngIf",e.totalEventParticipantLength>0)}}function Fd(t,_){if(t&1&&(r(0,"p"),g(1,6),s()),t&2){let e=c(2);o(),q(e.totalEventParticipantLength)(e.totalEventParticipantLength),J(1)}}function Ld(t,_){if(t&1&&(r(0,"div",20),p(1,bd,1,1,"ta-icon-v2",21)(2,yd,2,0,"h2",15)(3,xd,3,1,"h2",15)(4,Fd,2,2,"p",15),s()),t&2){let e=c();o(),a("ngIf",!e.teamEventRoomBlocksEnabled),o(),a("ngIf",!e.teamEventRoomBlocksEnabled),o(),a("ngIf",e.teamEventRoomBlocksEnabled),o(),a("ngIf",e.totalEventParticipantLength&&!e.teamEventRoomBlocksEnabled)}}function Ud(t,_){if(t&1&&(r(0,"div",25),C(1),g(2,7),C(3," "),s()),t&2){let e=c();o(),B(" ",e.totalEventParticipantLength," "),o(),q(e.totalEventParticipantLength),J(2)}}var jl=(()=>{class t{constructor(){this.travelEventInvitationsQuery=M(Tt),this.iconRegistry=M(ne),this.totalEventParticipantLength=0,this.downloadingManifest=!1,this.isAddParticipantsButtonLoading=!1,this.isAddParticipantsDisabled=!1,this.isTeamOffsite=!1,this.teamEventRoomBlocksEnabled=!1,this.isParticipantsUploadEnabled=!1,this.onDownloadManifest=new Y,this.onOpenAddParticipantsModal=new Y,this.onOpenUploadParticipantsModal=new Y,this.inIframe=Ke(),this.isButtonsDisabled$=Ue([this.travelEventInvitationsQuery.totalInvitations$,this.travelEventInvitationsQuery.isParticipantsFilterApplied$,this.travelEventInvitationsQuery.isLoading$]).pipe(Q(([e,n,i])=>!(e===0&&!n&&!i))),this.iconRegistry.registerIcons(Or,Nr)}downloadManifest(){this.onDownloadManifest.emit()}openAddParticipantsModal(){this.onOpenAddParticipantsModal.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-users-header"]],inputs:{totalEventParticipantLength:"totalEventParticipantLength",downloadingManifest:"downloadingManifest",isAddParticipantsButtonLoading:"isAddParticipantsButtonLoading",isAddParticipantsDisabled:"isAddParticipantsDisabled",isTeamOffsite:"isTeamOffsite",teamEventRoomBlocksEnabled:"teamEventRoomBlocksEnabled",isParticipantsUploadEnabled:"isParticipantsUploadEnabled"},outputs:{onDownloadManifest:"onDownloadManifest",onOpenAddParticipantsMo
1dal:"onOpenAddParticipantsModal",onOpenUploadParticipantsModal:"onOpenUploadParticipantsModal"},standalone:!0,features:[y],decls:10,vars:6,consts:()=>{let e;e=$localize`:␟ea8f22add448fe8c066366e2f13c95d7704a6353␟3317751790772160019: You can invite participants in or outside your company. `;let n;n=$localize`:␟cc48ae0b2dd1e6f156d5c7568ac37febe60d1051␟6839589620166817926: Manage participants, assign allowed booking types, and track costs. `;let i;i=$localize`:␟ef0b3f7c7f65880e2846293144ff1ab1fcca4370␟8163568749990630529:Download travel manifest`;let l;l=$localize`:␟b476343ead43bb45e01b88963308033190a97e3d␟468212771638206845:Participant details`;let d;d=$localize`:␟367cc01aea46e73104bd9a8212ca11adcd13c30a␟6456346196796205916: Participants ${"\uFFFD*2:1\uFFFD\uFFFD#1:1\uFFFD"}:START_TAG_SPAN:(${"\uFFFD0:1\uFFFD"}:INTERPOLATION:)${"\uFFFD/#1:1\uFFFD\uFFFD/*2:1\uFFFD"}:CLOSE_TAG_SPAN:`;let u;u=$localize`:␟512320e07852f27177a720a278cc565b4944cfa8␟3408944433608952995:{VAR_PLURAL, plural, =1 {participant} other {participants}}`,u=Ft(u,{VAR_PLURAL:"\uFFFD1\uFFFD"});let h;h=$localize`:␟41e52ba8d2d022615c75731fb1e2c5949c92194a␟5227462306014568194: (${"\uFFFD0\uFFFD"}:INTERPOLATION: ${u}:ICU:) `;let I;return I=$localize`:␟512320e07852f27177a720a278cc565b4944cfa8␟3408944433608952995:{VAR_PLURAL, plural, =1 {participant} other {participants}}`,I=Ft(I,{VAR_PLURAL:"\uFFFD0\uFFFD"}
1),[["titleTemplate",""],["iframeContent",""],e,n,l,d,h,I,[1,"users-section__header"],[1,"event-details__card__title-wrapper"],[4,"ngIf","ngIfElse"],["class","event-details__card__title-wrapper__subtitle",4,"ngIf"],["class","event-details__card-button",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"event-details__card__title-wrapper__subtitle"],[4,"ngIf"],[1,"event-details__card-button"],[1,"team-event__user-filter"],["icon","download-filled","kind","ghost","text",i,1,"team-event__user-filter--button",3,"clickEvent","taLoading"],[3,"openAddParticipantsModal","openUploadParticipantsModal","isAddParticipantsButtonLoading","isAddParticipantsDisabled","isParticipantsUploadEnabled"],[1,"event-details__card__title-wrapper__title"],["icon","users",3,"inline",4,"ngIf"],["icon","users",3,"inline"],["class","event-details__card__title-wrapper__length",4,"ngIf"],[1,"event-details__card__title-wrapper__length"],[1,"event-details__card__title-wrapper__title--iframe"]]},template:function(n,i){if(n&1&&(r(0,"div",8)(1,"div",9),p(2,Ad,2,1,"ng-container",10)(3,Nd,3,2,"div",11),s(),p(4,Rd,4,4,"div",12),P(5,"async"),s(),p(6,Ld,5,4,"ng-template",null,0,k)(8,Ud,4,2,"ng-template",null,1,k)),n&2){let l=V(9);o(2),a("ngIf",!i.inIframe)("ngIfElse",l),o(),a("ngIf",i.isTeamOffsite),o(),a("ngIf",i.totalEventParticipantLength>0||A(5,4,i.isButtonsDisabled$))}},dependencies:[L,pi,K,Z,ie,Ee,Mt,Pa,we],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.users-section__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step6)}.team-event__user-filter[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.team-event__user-filter--button[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.event-details__header[_ngcontent-%COMP%]{background:var(--ta-color-surface-default);padding:var(--dim-step5)}.event-details__content[_ngcontent-%COMP%]{padding:0 var(--dim-step3)}.event-details__card[_ngcontent-%COMP%]{display:block;background-color:var(--ta-color-surface-default);box-shadow:0 1px 4px #0003;border-radius:10px;box-sizing:border-box;margin-bottom:var(--dim-step6)}.event-details__card__title-wrapper__title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.event-details__card__title-wrapper__title[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-xb);text-align:start;display:flex;align-items:center;align-content:center;margin:0;line-height:36px}.event-details__card__title-wrapper__title[_ngcontent-%COMP%]   ta-icon-v2[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.event-details__card__title-wrapper__title[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;margin:0 0 0 var(--dim-step2);line-height:28px}.event-details__card__title-wrapper__title--iframe[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-medium);text-align:start;line-height:28px}.event-details__card__title-wrapper__length[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;padding-inline-start:var(--dim-step2)}.event-details__card__title-wrapper__subtitle[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;line-height:24px;margin:var(--dim-step1) 0 0 0}.event-details__card-button[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.event-details__card-button[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:var(--ta-color-icon-default);margin-top:calc(var(--dim-step7) * -1);padding:var(--dim-step3)}.event-details__card.hotel-card[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;overflow:hidden}"],changeDetection:0})}}return t})();E();E();E();E();function wd(t,_){if(t&1){let e=O();w(0),r(1,"ta-modal",4),m(2,"ta-modal-header",5),r(3,"p",6),C(4),s(),r(5,"ta-modal-footer",7)(6,"ta-button-v2",8),S("clickEvent",function(){f(e);let i=c();return v(i.cancel())}),s(),r(7,"ta-button-v2",9),S("clickEvent",function(){f(e);let i=c();return v(i.remove())}),s()()(),U()}if(t&2){let e=c();o(2),a("showClose",!0)("extraPaddingTop",!0)("extraPaddingRight",!0)("extraPaddingLeft",!0)("bottomPadding",!1)("header",e.title),o(2),G(e.bodyText),o(),a("alignRight",!0)("extraPaddingTop",!0)("extraPaddingRight",!0)("extraPaddingBottom",!0)("extraPaddingLeft",!0)("noTextPadding",!0)}}function Vd(t,_){if(t&1){let e=O();r(0,"ta-modal")(1,"div",10),m(2,"img",11),r(3,"div",12),de(4,1),m(5,"br"),pe(),s(),r(6,"div",13),g(7,2),s()(),r(8,"ta-modal-footer",14)(9,"ta-button-v2",15),S("clickEvent",function(){f(e);let i=c();return v(i.cancel())}),s(),r(10,"ta-button-v2",16),S("clickEvent",function(){f(e);let i=c();return v(i.remove())}),s()()()}if(t&2){let e=c();o(2),a("src","https://d1e29aaimv15ba.cloudfront.net/expenses-web/assets/svg/atlas-warning.svg",ze),o(3),q(e.participantFullName),J(4),o(3),a("alignRight",!1),o(),a("flex",!0),o(),a("flex",!0)("type","primary")}}var Yl=(()=>{class t{get title(){return $localize`Remove ${this.participantFullName}?`}get bodyText(){return this.inviteSent?$localize`Are you sure you want to remove them from the event? We'll notify them that their invitation has been canceled.`:$localize`Are you sure you want to remove them from the event?`}constructor(e){this.modalRef=e,this.participantFullName=e.data.participantFullName,this.useNewDesign=e.data.useNewDesign??!1,this.inviteSent=e.data.inviteSent??!1}remove(){N(z.PARTICIPANTS_REMOVED,{[x.VIEW]:H.PARTICIPANTS_CONFIRM_DELETE}),this.modalRef.close(!0)}cancel(){this.modalRef.close(!1)}static{this.\u0275fac=function(n){return new(n||t)(T(ot))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-delete-user-modal"]],standalone:!0,features:[y],decls:3,vars:2,consts:()=>{let e;e=$localize`:␟d7b35c384aecd25a516200d6921836374613dfe7␟2159130950882492111:Cancel`;let n;n=$localize`:␟019d4bd6a5690f0cfa0ecf346a4e6bf7f0d8debb␟4814285799071780083:Remove`;let i;i=$localize`:␟9edd1229b215779eaf892e1783228cb4ce370850␟7498652814981584028:delete-user-modal_warning`;let l;l=$localize`:␟d7b35c384aecd25a516200d6921836374613dfe7␟2159130950882492111:Cancel`;let d;
1d=$localize`:␟826b25211922a1b46436589233cb6f1a163d89b7␟7022070615528435141:Delete`;let u;u=$localize`:␟6e572f1c1bfe83805a5de1ba4e356012eaf5769e␟7982551538873200274: Are you sure you want to remove ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:LINE_BREAK: from the event? `;let h;return h=$localize`:␟22780e2dfd617349554f74cafe22c0dd112149a7␟6112471466811773394:This action cannot be undone`,[["legacyLayout",""],u,h,[4,"ngIf","ngIfElse"],[1,"delete-user-modal--new"],[3,"showClose","extraPaddingTop","extraPaddingRight","extraPaddingLeft","bottomPadding","header"],[1,"delete-user-modal__body-text"],[3,"alignRight","extraPaddingTop","extraPaddingRight","extraPaddingBottom","extraPaddingLeft","noTextPadding"],["size","regular","kind","outline","text",e,"taModalSecondaryAction","",3,"clickEvent"],["size","regular","type","warning","text",n,"taModalPrimaryAction","",3,"clickEvent"],[1,"delete-user-modal__body"],["alt",i,3,"src"],[1,"delete-user-modal__heading-medium"],[1,"delete-user-modal__description"],[3,"alignRight"],["size","large","kind","outline","text",l,"taModalSecondaryAction","",3,"clickEvent","flex"],["size","large","text",d,"taModalPrimaryAction","",3,"clickEvent","flex","type"]]},template:function(n,i){if(n&1&&p(0,wd,8,13,"ng-container",3)(1,Vd,11,6,"ng-template",null,0,k),n&2){let l=V(2);a("ngIf",i.useNewDesign)("ngIfElse",l)}},dependencies:[Ze,at,Zt,ie,Ee,pn,Kt,L],styles:[".delete-user-modal__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding-top:16px}.delete-user-modal__body[_ngcontent-%COMP%]   .delete-user-modal__heading-medium[_ngcontent-%COMP%]{font-family:Larsseit,Roboto,emoji,sans-serif;font-size:26px;font-weight:700;line-height:36px;padding:10px 0;text-align:center;display:flex;flex-wrap:wrap;align-items:baseline;width:100%;white-space:nowrap}.delete-user-modal__body[_ngcontent-%COMP%]   .delete-user-modal__description[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);padding-bottom:16px}ta-modal[_ngcontent-%COMP%]:not(.delete-user-modal--new)   ta-modal-footer[_ngcontent-%COMP%]{justify-content:center;display:flex}ta-modal[_ngcontent-%COMP%]:not(.delete-user-modal--new)   ta-button-v2[_ngcontent-%COMP%]{width:250px;padding:10px}.delete-user-modal--new[_ngcontent-%COMP%]{width:600px}.delete-user-modal--new[_ngcontent-%COMP%]     .ta-modal-header__close__button{--color: var(--ta-color-icon-subtle)}.delete-user-modal--new[_ngcontent-%COMP%]   .delete-user-modal__body-text[_ngcontent-%COMP%]{margin:0;padding:0 var(--dim-step4);line-height:var(--dim-step6)}"]})}}return t})();E();var Wl=(()=>{class t{constructor(e,n){this.modalRef=e,this.route=n}ngOnInit(){this.tripUuid=this.modalRef?.data?.tripUuid}onCancel(){N(X.REMOVE_PARTICIPANT_MODAL_DISCARDED),this.modalRef.close()}onRemove(){N(X.REMOVE_PARTICIPANT,{groupTravelRoomBlocksEnabled:!0}),this.modalRef.close(!0)}goToRoomblock(){this.route.navigate([`/trips/${this.tripUuid}/itinerary`])}static{this.\u0275fac=function(n){return new(n||t)(T(ot),T(Je))}}static{this.\u0275cmp=b({type:t,selectors:[["ng-component"]],standalone:!0,features:[y],decls:10,vars:2,consts:()=>{let e;e=$localize`:␟610cba550b931259fe58b60ffbb965de6f4dd507␟1836680709576567779:Delete participant?`;let n;n=$localize`:␟b1a2659c3aa59bebff25b155be0085c4c18d9f98␟7085751283541784534: This participant is part of the event’s room block. Deleting them won’t remove their room from the room block. ${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:View room block${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_BUTTON:`;let i;i=$localize`:␟826b25211922a1b46436589233cb6f1a163d89b7␟7022070615528435141:Delete`;let l;return l=$localize`:␟76354684c8cd9b9d68f117e83770855aca50cc3b␟4428127191260559300:Keep`,[n,i,l,[1,"remove-participant-confirmation-modal"],["header",e,3,"showClose","bottomPadding"],[1,"remove-participant-confirmation-modal__title"],["taButton","","theme","link",1,"remove-participant-confirmation-modal__view-room-block",3,"click"],[1,"remove-participant-confirmation-modal__action-container"],["taButton","","taModalSecondaryAction","","theme","secondary",3,"click"],["taButton","","taModalPrimaryAction","",3,"click"]]},template:function(n,i){n&1&&(r(0,"ta-modal",3),m(1,"ta-modal-header",4),r(2,"p",5),de(3,0),r(4,"button",6),S("click",function(){return i.goToRoomblock()}),s(),pe(),s(),r(5,"ta-modal-footer",7)(6,"button",8),S("click",function(){return i.onRemove()}),g(7,1),s(),r(8,"button",9),S("click",function(){return i.onCancel()}),g(9,2),s()()()),n&2&&(o(),a("showClose",!0)("bottomPadding",!1))},dependencies:[Ze,at,un,Zt,pn,Kt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.remove-participant-confirmation-modal[_ngcontent-%COMP%]{width:523px}.remove-participant-confirmation-modal__title[_ngcontent-%COMP%]{margin:0}.remove-participant-confirmation-modal__action-container[_ngcontent-%COMP%]{width:100%}.remove-participant-confirmation-modal__action-container[_ngcontent-%COMP%]     button{width:100%;margin:0 10px}.remove-participant-confirmation-modal__view-room-block[_ngcontent-%COMP%]{display:inline;text-decoration:underline}"]})}}return t})();be();E();function kd(t,_){t&1&&(w(0),r(1,"div",13),g(2,1),s(),U())}function Dd(t,_){if(t&1&&(r(0,"div")(1,"span",18),C(2),s(),r(3,"span",19),C(4," \xB7 "),r(5,"span"),C(6),s()()()),t&2){let e=c(2);o(2),G(e.popoverBookingTypeHeader),o(4),G(e.titleTranslation)}}function $d(t,_){if(t&1&&(r(0,"div",20)(1,"div",21)(2,"span"),g(3,2),s()(),r(4,"div",21)(5,"div",22),g(6,3),s(),r(7,"div",23),C(8),P(9,"currency"),s()()()),t&2){let e=c(2);o(8),B(" ",St(9,1,e.costInsights.actualCost.amount,e.costInsights.actualCost.currency,"symbol-narrow","1.0-0")," ")}}function Gd(t,_){if(t&1&&(r(0,"div",26)(1,"div",27),g(2,4),s(),r(3,"div",23),C(4),P(5,"currency"),s()()),t&2){let e=c(3);o(4),B(" ",St(5,1,e.costInsights.actualCost.amount,e.costInsights.actualCost.currency,"symbol-narrow","1.0-0")," ")}}function Bd(t,_){if(t&1&&(r(0,"div",28)(1,"div",27),g(2,5),s(),r(3,"div",23),C(4),P(5,"currency"),s()()),t&2){let e=c(3);a("taLoading",e.costInsights.estimateStatus===e.ProgressStatus.IN_PROGRESS),o(4),B(" ",St(5,2,e.costInsights.estimatedCost.amount,e.costInsights.estimatedCost.currency,"symbol-narrow","1.0-0"),". ")}}function zd(t,_){if(t&1&&(r(0,"div",29),C(1),s()),t&2){let e=c(3);o(),B(" ",e.costInsights.estimateErrorMessage," ")}}
1function Hd(t,_){if(t&1&&(w(0),r(1,"div"),p(2,Gd,6,6,"div",24)(3,Bd,6,7,"div",25),s(),p(4,zd,2,1,"ng-template",null,0,k),U()),t&2){let e=V(5),n=c(2);o(2),a("ngIf",n.isBooked),o(),a("ngIf",n.costInsights.estimateStatus!==n.ProgressStatus.FAILED&&n.costInsights.estimatedCost.amount!=0)("ngIfElse",e)}}function Xd(t,_){if(t&1&&(r(0,"span"),g(1,6),s()),t&2){let e=c(3);o(),q(e.popoverBookingType),J(1)}}function jd(t,_){if(t&1&&(r(0,"span"),g(1,7),s()),t&2){let e=c(3);o(),q(e.popoverBookingType),J(1)}}function Yd(t,_){if(t&1&&(r(0,"div",30),p(1,Xd,2,1,"span",11)(2,jd,2,1,"span",11),s()),t&2){let e=c(2);o(),a("ngIf",e.type===e.BookingType.FLIGHT||e.type===e.BookingType.RAIL),o(),a("ngIf",e.type===e.BookingType.HOTEL||e.type===e.BookingType.CAR)}}function Wd(t,_){t&1&&(r(0,"div",29),g(1,8),s())}function Kd(t,_){if(t&1){let e=O();r(0,"div",31),de(1,9),m(2,"span"),r(3,"a",32),S("click",function(i){f(e);let l=c(2);return v(l.onCustomPolicyClick(i))}),s(),pe(),s()}if(t&2){let e=c(2);o(3),q(e.popoverBookingType),J(1)}}function Qd(t,_){if(t&1&&(w(0),p(1,Dd,7,2,"div",11)(2,$d,10,6,"div",14)(3,Hd,6,3,"ng-container",11)(4,Yd,3,2,"div",15)(5,Wd,2,0,"div",16)(6,Kd,4,1,"div",17),U()),t&2){let e=c();o(),a("ngIf",!e.isRoomBlockBooked),o(),a("ngIf",e.isRoomBlockBooked),o(),a("ngIf",e.costInsights&&!e.isRoomBlockBooked),o(),a("ngIf",!e.isAllowed&&!e.isRoomBlockBooked),o(),a("ngIf",e.showNoDepartureMessage),o(),a("ngIf",e.customPolicyNoMaxPriceMessage)}}var Kl=(()=>{class t{constructor(){this.isAllowed=!1,this.isBooked=!1,this.isRoomBlockBooked=!1,this.isOffsite=!1,this.teamEventNonRoomBlockBookingEnabled=!1,this.modalService=M(et),this.travelEventQuery=M(ve),this.travelEventStore=M(tn),this.travelEventRequestService=M(ga),this.travelEventSettingsUtilService=M(da),this.changeDetectorRef=M($e),this.ProgressStatus=On,this.BookingType=D,this.showCustomPolicyModal=!1}onCustomPolicyClick(e){e.stopPropagation(),this.openCustomPolicyModal()}openCustomPolicyModal(){this.travelEventQuery.activeEvent$.pipe(ee(e=>e?.settings?.travelConditions?.companyPolicyLevelId===Rt),ce(1)).subscribe(e=>{let n=this.travelEventSettingsUtilService.getCustomPolicyData(e);this.customPolicyData=n,this.showCustomPolicyModal=!0,this.changeDetectorRef.detectChanges()})}closeCustomPolicyModal(){this.showCustomPolicyModal=!1,this.changeDetectorRef.detectChanges()}saveCustomPolicy(e){this.showCustomPolicyModal=!1,this.travelEventQuery.activeEvent$.pipe(ee(n=>n?.settings?.travelConditions?.companyPolicyLevelId===Rt),ce(1)).subscribe(n=>{let i=this.travelEventRequestService.updateCustomPolicyData(n,e);this.travelEventStore.updateActiveEvent(i),this.changeDetectorRef.detectChanges()})}cancelCustomPolicyModal(){this.showCustomPolicyModal=!1,this.changeDetectorRef.detectChanges()}get popoverBookingTypeHeader(){switch(this.type){case D.FLIGHT:return $localize`Flights`;case D.HOTEL:return $localize`Hotels`;case D.RAIL:return $localize`Trains`;case D.CAR:return $localize`Cars`;default:return""}}get popoverBookingType(){switch(this.type){case D.FLIGHT:return $localize`flight`;case D.HOTEL:return $localize`hotel`;case D.RAIL:return $localize`train`;case D.CAR:return $localize`car`;default:return""}}get titleTranslation(){return this.isBooked||this.isRoomBlockBooked?$localize`Booked`:this.isAllowed?$localize`Allowed`:$localize`Not allowed`}get showNoDepartureMessage(){return this.isAllowed&&[D.FLIGHT,D.RAIL].includes(this.type)&&!this.departureLocation}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-booking-popover"]],inputs:{type:"type",isAllowed:"isAllowed",isBooked:"isBooked",isRoomBlockBooked:"isRoomBlockBooked",costInsights:"costInsights",departureLocation:"departureLocation",participantMissingRoomBlock:"participantMissingRoomBlock",customPolicyNoMaxPriceMessage:"customPolicyNoMaxPriceMessage",isOffsite:"isOffsite",teamEventNonRoomBlockBookingEnabled:"teamEventNonRoomBlockBookingEnabled"},standalone:!0,features:[y],decls:4,vars:4,consts:()=>{let e;e=$localize`:␟ebc40eb7ad08c28aca9f715bff517859b9a85f56␟5024350669707385852: A hotel room can't be added for this participant since the event room block was finalized before they were added. `;let n;n=$localize`:␟95aae04efd5833d1bfe5a5d308e39f3aec1a8bc4␟3769589823601780692:Participant's hotel room is booked in the event's room block.`;let i;i=$localize`:␟281084e9c5d02561ac3b4945fd32fe25022e32c8␟1220987838588037011: Actual cost: `;let l;l=$localize`:␟f84aa4b1decd9a50be49df18e78fb12318c564e1␟1211837269837033780:Actual cost`;let d;d=$localize`:␟713c420dae76d9cb3f89202eda71568e066237a4␟2510741784888393227:Estimated cost`;let u;u=$localize`:␟b1110cac38da86d5c2cd518baf42fdf2263eadb4␟5771193305435610413: Click to allow this participant to book ${"\uFFFD0\uFFFD"}
1:INTERPOLATION: tickets. `;let h;h=$localize`:␟3c3d3442ecaf81d583b225a23c43689d601e4071␟7984051160524094722: Click to allow this participant to book a ${"\uFFFD0\uFFFD"}:INTERPOLATION:. `;let I;I=$localize`:␟7366c125e20f8340d3080c1dfdb9a9eaa2dbbd36␟5378677779817703389: Add 'Departing from' to see estimated cost. `;let F;return F=$localize`:␟78e689ced7f262d0b6521cde38b34cffc22f45df␟6312766922981453721:${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:No maximum booking price set for ${"\uFFFD0\uFFFD"}:INTERPOLATION:. To edit this, go to the event’s ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:${"\uFFFD#3\uFFFD"}:START_LINK:custom policy.${"\uFFFD/#3\uFFFD"}:CLOSE_LINK:`,[["error",""],e,n,i,l,d,u,h,I,F,[1,"booking-popover"],[4,"ngIf"],[3,"closeModal","savePolicy","cancelModal","isVisible","initialData"],[1,"booking-popover__description"],["class","booking-popover__room-block",4,"ngIf"],["class","booking-popover__not-allowed",4,"ngIf"],["class","booking-popover__error",4,"ngIf"],["class","booking-popover__no-max-price",4,"ngIf"],[1,"booking-popover__title"],[1,"booking-popover__title--grey"],[1,"booking-popover__room-block"],[1,"booking-popover__room-block__row"],[1,"booking-popover__label","booking-popover__label--bold"],[1,"booking-popover__amount"],["class","booking-popover__row",4,"ngIf"],["class","booking-popover__row",3,"taLoading",4,"ngIf","ngIfElse"],[1,"booking-popover__row"],[1,"booking-popover__label"],[1,"booking-popover__row",3,"taLoading"],[1,"booking-popover__error"],[1,"booking-popover__not-allowed"],[1,"booking-popover__no-max-price"],["href","javascript:void(0)",1,"custom-policy-link",3,"click"]]},template:function(n,i){n&1&&(r(0,"div",10),p(1,kd,3,0,"ng-container",11)(2,Qd,7,6,"ng-container",11),s(),r(3,"ta-custom-policy-modal",12),S("closeModal",function(){return i.closeCustomPolicyModal()})("savePolicy",function(d){return i.saveCustomPolicy(d)})("cancelModal",function(){return i.cancelCustomPolicyModal()}),s()),n&2&&(o(),a("ngIf",i.participantMissingRoomBlock&&(i.isOffsite||!i.teamEventNonRoomBlockBookingEnabled)),o(),a("ngIf",!i.participantMissingRoomBlock||!i.isOffsite&&i.teamEventNonRoomBlockBookingEnabled),o(),a("isVisible",i.showCustomPolicyModal)("initialData",i.customPolicyData))},dependencies:[L,Mt,Yt,ua],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.booking-popover[_ngcontent-%COMP%]{padding:var(--dim-step4) var(--dim-step5);width:auto}.booking-popover__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-bold);text-align:start}.booking-popover__title--grey[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}.booking-popover__description[_ngcontent-%COMP%]{max-width:430px}.booking-popover__row[_ngcontent-%COMP%]{margin-top:var(--dim-step2);display:flex}.booking-popover__row[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid var(--ta-color-border-default);padding-top:var(--dim-step2)}.booking-popover__amount[_ngcontent-%COMP%]{float:right}.booking-popover__label[_ngcontent-%COMP%]{display:inline-block;margin-right:var(--dim-step2)}.booking-popover__label--bold[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.booking-popover__error[_ngcontent-%COMP%]{color:var(--ta-color-text-alert);margin-top:var(--dim-step2)}.booking-popover__no-max-price[_ngcontent-%COMP%]{margin-top:var(--dim-step2)}.booking-popover__no-max-price[_ngcontent-%COMP%]   .custom-policy-link[_ngcontent-%COMP%]{color:var(--ta-color-action-primary)}.booking-popover__no-max-price[_ngcontent-%COMP%]   .custom-policy-link[_ngcontent-%COMP%]:hover{text-decoration:none;cursor:pointer}.booking-popover__not-allowed[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);margin-top:var(--dim-step2)}.booking-popover__room-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex-wrap:nowrap;gap:var(--dim-step4)}.booking-popover__room-block__row[_ngcontent-%COMP%]{color:var(--ta-color-text-default)}"],changeDetection:0})}}return t})();E();function qd(t,_){if(t&1&&(r(0,"div",6)(1,"span"),C(2),P(3,"currency"),s()()),t&2){c();let e=V(3),n=c();
1a("popoverConfig",n.popoverMinWidth)("taPopover",!n.hasRoomBlocks&&e),o(2),B(" ",St(3,3,n.costInsights.actualCost.amount,n.costInsights.actualCost.currency,"symbol-narrow","1.0-0")," ")}}function Jd(t,_){t&1&&(r(0,"div",15),g(1,2),s())}function Zd(t,_){if(t&1&&(r(0,"span",11),m(1,"ta-icon-v2",12),p(2,Jd,2,0,"div",13),r(3,"span",14),C(4),P(5,"currency"),s()()),t&2){let e,n=_.$implicit,i=c().$implicit,l=c(3);o(),a("icon",(e=l.typeIconMap()[i.vertical])==null||e.filled==null?null:e.filled.name),o(),a("ngIf",n.bookingStatus===l.BookingStatus.CANCELED),o(2),B(" ",St(5,3,n.bookingNetCost.amount,n.bookingNetCost.currency,"symbol-narrow","1.0-0")," ")}}function ep(t,_){if(t&1&&(r(0,"div",9),p(1,Zd,6,8,"span",10),s()),t&2){let e=_.$implicit;o(),a("ngForOf",e.bookings)}}function tp(t,_){if(t&1&&(r(0,"div",7),p(1,ep,2,1,"div",8),s()),t&2){let e=c(2);o(),a("ngForOf",e.verticalsWithBooking)}}function np(t,_){t&1&&(r(0,"span"),C(1,"-"),s())}function ip(t,_){if(t&1&&(w(0),p(1,qd,4,8,"div",5)(2,tp,2,1,"ng-template",null,0,k)(4,np,2,0,"ng-template",null,1,k),U()),t&2){let e=V(5),n=c();o(),a("ngIf",n.isAnyBooking)("ngIfElse",e)}}var Ql=(()=>{class t{constructor(){this.typeIconMap=ci(null),this.iconRegistry=M(ne),this.popoverMinWidth={minWidth:100},this.BookingStatus=vn,xn(()=>{this.typeIconMap()&&this.iconRegistry.registerIcons(...Object.values(this.typeIconMap()).flatMap(e=>Object.values(e)))})}get isAnyBooking(){return this.hasRoomBlocks?!0:this.costInsights.allowedVerticalsCostInsights.some(e=>e.bookings.length)||this.costInsights.actualCost.amount>0}get verticalsWithBooking(){return this.costInsights.allowedVerticalsCostInsights.filter(e=>e.bookings.length)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-item-actual-cost"]],inputs:{costInsights:"costInsights",typeIconMap:[1,"typeIconMap"],hasRoomBlocks:"hasRoomBlocks"},standalone:!0,features:[y],decls:2,vars:1,consts:()=>{let e;return e=$localize`:␟2311b0f6e9a4265136850bd149b19773ea4130fe␟4008412049465017803: Cancellation fee `,[["actualCostItems",""],["noBookings",""],e,[1,"estimated-cost"],[4,"ngIf"],["popoverTrigger","hover",3,"popoverConfig","taPopover",4,"ngIf","ngIfElse"],["popoverTrigger","hover",3,"popoverConfig","taPopover"],[1,"item-costs"],["class","item-costs__type",4,"ngFor","ngForOf"],[1,"item-costs__type"],["class","item-costs__booking",4,"ngFor","ngForOf"],[1,"item-costs__booking"],[1,"item-costs__type-icon",3,"icon"],["class","item-costs__type-text-canceled",4,"ngIf"],[1,"item-costs__type-text-cost"],[1,"item-costs__type-text-canceled"]]},template:function(n,i){n&1&&(r(0,"div",3),p(1,ip,6,2,"ng-container",4),s()),n&2&&(o(),a("ngIf",i.costInsights))},dependencies:[L,re,_e,K,Z,Yt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   .warning[_ngcontent-%COMP%]{color:var(--ta-color-icon-alert)}.estimated-cost[_ngcontent-%COMP%]{position:relative;height:21px;text-align:right;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.item-costs[_ngcontent-%COMP%]{padding:var(--dim-step4) var(--dim-step5);max-width:250px;min-width:150px}.item-costs__type[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2);padding-bottom:var(--dim-step2);border-bottom:1px solid var(--ta-color-border-default)}.item-costs__type[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.item-costs__type-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.item-costs__type-text[_ngcontent-%COMP%]   .with-warning[_ngcontent-%COMP%]{color:var(--ta-color-text-alert)}.item-costs__type-text-canceled[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-subtle)}.item-costs__type-text-canceled[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.item-costs__booking[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap}"],changeDetection:0})}}return t})();E();function op(t,_){t&1&&(r(0,"div",8),g(1,3),s())}function ap(t,_){if(t&1&&(w(0),m(1,"ta-icon-v2",7),p(2,op,2,0,"ng-template",null,1,k),U()),t&2){let e=V(3);o(),a("taPopover",e)}}function rp(t,_){t&1&&m(0,"ta-icon-v2",11)}function sp(t,_){if(t&1&&(w(0),r(1,"span",17),C(2),s(),U()),t&2){let e=c().$implicit,n=c(4);o(2),B(" ",n.getErrorMessage(e)," ")}}function lp(t,_){if(t&1&&(r(0,"span",19),C(1),P(2,"currency"),s()),t&2){let e=c(2).$implicit;o(),B(" ",St(2,1,e.estimatedCost.amount,e.estimatedCost.currency,"symbol-narrow","1.0-0")," ")}}function _p(t,_){if(t&1&&(w(0),p(1,lp,3,6,"span",18),U()),t&2){let e=c().$implicit;o(),a("ngIf",e.estimatedCost)}}function cp(t,_){if(t&1&&(r(0,"div",14),m(1,"ta-icon-v2",15),r(2,"div",16),p(3,sp,3,1,"ng-container",5)(4,_p,2,1,"ng-container",5),s()()),t&2){let e,n=_.$implicit,i=c(4);o(),a("icon",(e=i.typeIconMap()[n.vertical])==null||e.filled==null?null:e.filled.name),o(2),a("ngIf",n.estimateStatus===i.ProgressStatus.FAILED),o(),a("ngIf",n.estimateStatus!==i.ProgressStatus.FAILED)}}function dp(t,_){if(t&1&&(r(0,"div",12),p(1,cp,5,3,"div",13),s()),t&2){let e=c(3);o(),a("ngForOf",e.costInsights.allowedVerticalsCostInsights)}}function pp(t,_){if(t&1&&(r(0,"div",9)(1,"span"),C(2),P(3,"currency"),s(),p(4,rp,1,0,"ta-icon-v2",10),s(),p(5,dp,2,1,"ng-template",null,2,k)),t&2){let e=V(6),n=c(2);a("popoverConfig",n.popoverMinWidth)("taPopover",e)("taLoading",n.costInsights.estimateStatus===n.ProgressStatus.IN_PROGRESS),o(2),B(" ",St(3,5,n.costInsights.estimatedCost==null?null:n.costInsights.estimatedCost.amount,n.costInsights.estimatedCost==null?null:n.costInsights.estimatedCost.currency,"symbol-narrow","1.0-0")," "),o(2),a("ngIf",n.someEstimateHasError)}}function mp(t,_){if(t&1&&(w(0),p(1,ap,4,1,"ng-container",6)(2,pp,7,10,"ng-template",null,0,k),U()),t&2){let e=V(3),n=c();o(),a("ngIf",n.unregisteredError)("ngIfElse",e)}}var Ep=["eet.cost.estimate.flight.airport.notfound","eet.cost.estimate.rail.station.notfound","eet.cost.estimate.rail.station.route.notfound","flight.data.restriction.sameairports","train.search.restriction.samestations"],ql=(()=>{class t{constructor(){this.allowedVerticals={},this.typeIconMap=ci({}),this.iconRegistry=M(ne),this.popoverMinWidth={minWidth:100},this.TripInvitationStatusType=hs,this.ProgressStatus=On,this.iconRegistry.registerIcons(Ln),xn(()=>{this.iconRegistry.registerIcons(...Object.values(this.typeIconMap()).flatMap(e=>Object.values(e)))})}get unregisteredError(){return this.costInsights.estimateErrorCode===Ua.UNREGISTERED_USER}get someEstimateHasError(){return this.costInsights.allowedVerticalsCostInsights.some(e=>e.estimateStatus===On.FAILED)}getErrorMessage(e){return e.estimateErrorCode===Ua.NO_DEPARTURE_LOCATION?$localize`Add ‘Departing from’ location to have the cost estimated`:Ep.includes(e.estimateErrorMessage)?$localize`Unavailable`:e.estimateErrorMessage?e.estimateErrorMessage:$localize`Unknown error`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-item-cost"]],inputs:{costInsights:"costInsights",allowedVerticals:"allowedVerticals",typeIconMap:[1,"typeIconMap"],invitationStatus:"invitationStatus"},standalone:!0,features:[y],decls:2,vars:1,consts:()=>{let e;return e=$localize`:␟af246a409142d6c70029ca61f8d527687cb30246␟7958909670914116617: A cost estimate cannot be calculated for participants that have not completed their Navan profile. Participants can set up their profile directly from the event invitation. `,[["costDetails",""],["unregistered",""],["costEstimateItems",""],e,[1,"estimated-cost"],[4,"ngIf"],[4,"ngIf","ngIfElse"],["icon","warning","popoverTrigger","hover","theme","outline",1,"estimated-cost__with-warning",3,"taPopover"],[1,"estimated-cost__unregistered"],["popoverTrigger","hover",3,"popoverConfig","taPopover","taLoading"],["class","estimated-cost__with-warning","icon","warning","theme","outline",4,"ngIf"],["icon","warning","theme","outline",1,"estimated-cost__with-warning"],[1,"item-costs"],["class","item-costs__type",4,"ngFor","ngForOf"],[1,"item-costs__type"],[1,"item-costs__type-icon",3,"icon"],[1,"item-costs__type-text"],[1,"with-warning"],["class","item-costs__type-text-cost",4,"ngIf"],[1,"item-costs__type-text-cost"]]},template:function(n,i){n&1&&(r(0,"div",4),p(1,mp,4,2,"ng-container",5),s()),n&2&&(o(),a("ngIf",i.costInsights&&i.invitationStatus!==i.TripInvitationStatusType.DECLINED))},dependencies:[L,K,Z,re,Mt,_e,Yt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   .warning[_ngcontent-%COMP%]{color:var(--ta-color-icon-alert)}.estimated-cost[_ngcontent-%COMP%]{position:relative;height:21px;text-align:right;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.estimated-cost__with-warning[_ngcontent-%COMP%]{display:inline-block;vertical-align:bottom;color:var(--ta-color-icon-alert)}.estimated-cost__unregistered[_ngcontent-%COMP%]{padding:var(--dim-step4) var(--dim-step5);max-width:340px}.item-costs[_ngcontent-%COMP%]{padding:var(--dim-step4) var(--dim-step5);max-width:250px;min-width:150px}.item-costs__type[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step2);padding-bottom:var(--dim-step2);border-bottom:1px solid var(--ta-color-border-default)}.item-costs__type[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.item-costs__type-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.item-costs__type-text[_ngcontent-%COMP%]   .with-warning[_ngcontent-%COMP%]{color:var(--ta-color-text-alert)}.item-costs__type-text-cost[_ngcontent-%COMP%]{float:right}.item-costs__type-text-canceled[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-subtle)}"],changeDetection:0})}}return t})();var gp=()=>({placeAt:"top"}),fp=t=>({placement:t,width:400}),vp=(t,_)=>({description:t,placeId:_});function Tp(t,_){if(t&1&&(r(0,"div",37),m(1,"div",38),s()),t&2){let e=c();o(),te("users-table__indicator__dot--added",e.participantAddedInRoomBlock)("users-table__indicator__dot--missing",e.participantMissingRoomBlock)}}function Sp(t,_){t&1&&(r(0,"span",41),C(1,"(+1)"),s())}function Pp(t,_){if(t&1&&(r(0,"div",39),C(1),p(2,Sp,2,0,"span",40),s()),t&2){let e=c();o(),B(" ",e.participantFullName," "),o(),a("ngIf",e.isExtraGuestAllowed)}}function Cp(t,_){if(t&1){let e=O();r(0,"div",42),S("click",function(){f(e);let i=c();return v(i.onEditParticipantSettings())}),C(1),s()}if(t&2){let e=c(),n=V(13);a("taPopover",n)("popoverConfig",me(4,fp,Se(3,gp))),o(),B(" ",e.customSettingsDisplayText," ")}}function hp(t,_){if(t&1&&(w(0),g(1,10),U()),t&2){let e=c().$implicit;o(),q(e.hrFieldsCount)(e.hrFieldsCount),J(1)}}function Ap(t,_){if(t&1&&C(0),t&2){let e=c().$implicit;G(e.value)}}function Op(t,_){if(t&1&&(r(0,"span",51),C(1),s()),t&2){let e=c().$implicit;o(),G(e.secondaryValue)}}function Mp(t,_){if(t&1&&(r(0,"div",46)(1,"div",47),C(2),s(),r(3,"div",48)(4,"span",49),p(5,hp,2,2,"ng-container",27)(6,Ap,1,1,"ng-template",null,4,k),s(),p(8,Op,2,1,"span",50),s()()),t&2){let e=_.$implicit,n=V(7);
1o(2),G(e.title),o(),te("custom-settings-tooltip__value--with-secondary",e.secondaryValue),o(2),a("ngIf",e.hrFieldsCount)("ngIfElse",n),o(3),a("ngIf",e.secondaryValue)}}function Np(t,_){if(t&1&&(r(0,"div",43)(1,"div",44),g(2,9),s(),p(3,Mp,9,6,"div",45),s()),t&2){let e=c();o(3),a("ngForOf",e.customSettingsTooltipItems)}}function Rp(t,_){if(t&1&&(w(0),C(1),U()),t&2){let e=c();o(),B("",e.departureLocation.formattedAddress," ")}}function bp(t,_){if(t&1){let e=O();r(0,"ta-icon-v2",55),S("mousedown",function(){f(e);let i=c(2);return v(i.onRemoveLocation())}),s()}t&2&&a("clickable",!0)}function yp(t,_){if(t&1){let e=O();r(0,"ta-form-wrap",52)(1,"ta-location-search",53),S("selectLocation",function(i){f(e);let l=c();return v(l.updateParticipantLocation(i))})("mouseenter",function(){f(e);let i=c();return v(i.enterLocation())})("mouseleave",function(){f(e);let i=c();return v(i.leaveLocation())}),s(),p(2,bp,1,1,"ta-icon-v2",54),s()}if(t&2){let e=c();o(),a("value",e.departureLocation?tt(4,vp,e.departureLocation.formattedAddress,e.departureLocation.placeId):null)("autofocus",e.autoFocusLocation)("includeLocation",!0),o(),a("ngIf",e.departureLocation)}}function Ip(t,_){t&1&&m(0,"ta-icon-v2",63)}function xp(t,_){t&1&&m(0,"ta-icon-v2",64)}function Fp(t,_){if(t&1&&m(0,"ta-booking-popover",65),t&2){let e=c().$implicit,n=c().ngIf,i=c();a("type",e)("isAllowed",i.allowedVerticals[e])("isBooked",i.bookedVerticals[e])("customPolicyNoMaxPriceMessage",i.isCustomPolicyWithNoMaxPrice(n,e))("participantMissingRoomBlock",e==="HOTEL"&&i.hasRoomBlocks&&i.isHotelStateDisabledForRoomBlock)("costInsights",i.verticalCostInsightsByVertical(e))("departureLocation",i.departureLocation)("isRoomBlockBooked",i.getBookedStatus(e)&&e==="HOTEL"&&i.hasRoomBlocks&&!i.isHotelStateDisabledForRoomBlock)("isOffsite",i.isOffsite)("teamEventNonRoomBlockBookingEnabled",i.teamEventNonRoomBlockBookingEnabled)}}function Lp(t,_){if(t&1){let e=O();w(0),r(1,"div",59),p(2,Ip,1,0,"ta-icon-v2",60)(3,xp,1,0,"ta-icon-v2",61),r(4,"ta-icon-v2",62),S("click",function(){let i=f(e).$implicit,l=c(2);return v(l.updateParticipantBookingTypes(i))}),s()(),p(5,Fp,1,10,"ng-template",null,5,k),U()}if(t&2){let e,n=_.$implicit,i=V(6),l=c().ngIf,d=c();o(),te("users-table__booking-type-container--disabled",d.teamEventRoomBlocksEnabled&&d.isIconBorderDisabled(n))("custom-policy-no-max-price",d.isCustomPolicyWithNoMaxPrice(l,n)),o(),a("ngIf",d.getBookedStatus(n)),o(),a("ngIf",d.isCustomPolicyWithNoMaxPrice(l,n)),o(),te("booking-types__item--active",d.allowedVerticals[n])("booking-types__item--booked",d.bookedVerticals[n])("booking-types__item--room-block-booked",d.getBookedStatus(n)&&!d.teamEventNonRoomBlockBookingEnabled)("booking-types__item--room-block-icon-style",d.teamEventRoomBlocksEnabled)("booking-types__item--room-block-disabled",n==="HOTEL"&&d.hasRo
1omBlocks&&d.isHotelStateDisabledForRoomBlock&&(d.isOffsite||!d.teamEventNonRoomBlockBookingEnabled))("declined-disabled",n==="HOTEL"&&d.hasRoomBlocks&&d.isHotelStateDisabledForRoomBlock&&(d.isOffsite||!d.teamEventNonRoomBlockBookingEnabled)||d.invitationStatus===d.TravelEventInvitationStatus.DECLINED&&!d.bookedVerticals[n])("declined-disabled__room-block-disable-add",n==="HOTEL"&&d.hasRoomBlocks&&d.isHotelStateDisabledForRoomBlock&&!d.isEditModeDisabled&&(d.isOffsite||!d.teamEventNonRoomBlockBookingEnabled)),a("icon",d.allowedVerticals[n]||d.getBookedStatus(n)?(e=d.typeIconMap()[n])==null||e.filled==null?null:e.filled.name:(e=d.typeIconMap()[n])==null||e.regular==null?null:e.regular.name)("taPopover",i)}}function Up(t,_){if(t&1&&(r(0,"div",56)(1,"div",57),p(2,Lp,7,22,"ng-container",58),s(),m(3,"div",28),s()),t&2){let e=c();Dt("cursor",e.invitationStatus===e.TravelEventInvitationStatus.DECLINED?"default":"pointer"),o(2),a("ngForOf",e.allBookingTypes),o(),te("joyride-step-active",(e.tourGuideStepRef==null?null:e.tourGuideStepRef.currentStepName)==="set-allowed-booking-types0"),a("joyrideStep","set-allowed-booking-types"+e.index)("stepContent",e.tourGuideStepRef==null?null:e.tourGuideStepRef.customContent)("counterTemplate",e.tourGuideStepRef==null?null:e.tourGuideStepRef.counter)}}function wp(t,_){t&1&&m(0,"ta-tag-v2",75)}function Vp(t,_){t&1&&m(0,"ta-tag-v2",76)}function kp(t,_){t&1&&m(0,"ta-tag-v2",77)}function Dp(t,_){t&1&&m(0,"ta-tag-v2",78)}function $p(t,_){t&1&&m(0,"ta-tag-v2",79)}function Gp(t,_){if(t&1&&m(0,"ta-tag-v2",80),t&2){let e=c(2);a("label",e.stringUtils.capitalize(e.invitationStatus))}}function Bp(t,_){if(t&1){let e=O();r(0,"ta-icon-v2",81),S("click",function(){f(e);let i=c(2);return v(i.resendInvitation.emit(i.invitationId))}),s()}if(t&2){c();let e=V(10);a("clickable",!0)("taPopover",e)}}function zp(t,_){t&1&&(r(0,"div",82),g(1,11),s())}function Hp(t,_){if(t&1&&m(0,"ta-icon-v2",83),t&2){c();let e=V(13);a("taPopover",e)}}function Xp(t,_){if(t&1&&(r(0,"div",86),C(1),s()),t&2){let e=c(3);o(),B(" ",e.infoTooltipText(e.invitationStatus)," ")}}function jp(t,_){if(t&1&&(r(0,"div")(1,"div",87),g(2,12),s(),r(3,"div",88),C(4),s()()),t&2){let e=c(3);o(4),B('"',e.inviteeAction==null?null:e.inviteeAction.note,'"')}}function Yp(t,_){if(t&1&&(r(0,"div",82),p(1,Xp,2,1,"div",84)(2,jp,5,1,"div",85),s()),t&2){let e=c(2);o(),a("ngIf",e.infoTooltipText(e.invitationStatus)),o(),a("ngIf",e.inviteeAction==null?null:e.inviteeAction.note)}}function Wp(t,_){if(t&1&&(w(0)(1,66),p(2,wp,1,0,"ta-tag-v2",67)(3,Vp,1,0,"ta-tag-v2",68)(4,kp,1,0,"ta-tag-v2",69)(5,Dp,1,0,"ta-tag-v2",70)(6,$p,1,0,"ta-tag-v2",71)(7,Gp,1,1,"ta-tag-v2",72),U(),p(8,Bp,1,2,"ta-icon-v2",73)(9,zp,2,0,"ng-template",null,6,k)(11,Hp,1,1,"ta-icon-v2",74)(12,Yp,3,2,"ng-template",null,7,k),U()),t&2){let e=c();o(),a("ngSwitch",e.invitationStatus),o(),a("ngSwitchCase",e.TravelEventInvitationStatus.PARTIALLY_BOOKED),o(),a("ngSwitchCase",e.TravelEventInvitationStatus.DECLINED),o(),a("ngSwitchCase",e.TravelEventInvitationStatus.BOOKED_ALL),o(),a("ngSwitchCase",e.TravelEventInvitationStatus.INVITED),o(),a("ngSwitchCase",e.TravelEventInvitationStatus.REVOKED),o(2),a("ngIf",e.invitationStatus===e.TravelEventInvitationStatus.PARTIALLY_BOOKED||e.invitationStatus===e.TravelEventInvitationStatus.INVITED||e.invitationStatus===e.TravelEventInvitationStatus.ACCEPTED),o(3),a("ngIf",e.infoTooltipText(e.invitationStatus)||(e.inviteeAction==null?null:e.inviteeAction.note))}}function Kp(t,_){t&1&&m(0,"ta-tag-v2",89)}function Qp(t,_){if(t&1&&(r(0,"div",90),m(1,"ta-event-item-cost",91)(2,"div",28),s()),t&2){let e=c();o(),a("costInsights",e.costInsights)("allowedVerticals",e.allowedVerticals)("typeIconMap",e.typeIconMap())("invitationStatus",e.invitationStatus),o(),te("joyride-step-active",(e.tourGuideStepRef==null?null:e.tourGuideStepRef.currentStepName)==="track-travel-costs0"),a("joyrideStep","track-travel-costs"+e.index)("stepContent",e.tourGuideStepRef==null?null:e.tourGuideStepRef.customContent)("counterTemplate",e.tourGuideStepRef==null?null:e.tourGuideStepRef.counter)}}function qp(t,_){if(t&1&&(r(0,"div",92),m(1,"ta-event-item-actual-cost",93),s()),t&2){let e=c();o(),a("costInsights",e.costInsights)("typeIconMap",e.typeIconMap())("hasRoomBlocks",e.hasRoomBlocks)}}function Jp(t,_){t&1&&(r(0,"div",82),g(1,13),s())}function Zp(t,_){if(t&1){let e=O();r(0,"div",94)(1,"ta-icon-v2",95),S("click",function(){f(e);let i=c();return v(i.onEditParticipantSettings())}),s(),p(2,Jp,2,0,"ng-template",null,8,k),s()}if(t&2){let e=V(3);o(),a("taPopover",e)}}function em(t,_){t&1&&(r(0,"div",82),g(1,14),s())}var Jl=(()=>{class t{constructor(e,n,i,l,d){this.travelEventQuery=e,this.destroyRef=n,this.travelEventSettingsUtilService=i,this.travelEventInvitationsQuery=l,this.customSettingsUtilService=d,this.isEditModeDisabled=!1,this.isExtraGuestAllowed=!1,this.allowedVerticals={},this.bookedVerticals={},this.typeIconMap=ci(null),this.isEventSent=!1,this.isLoading=!1,this.isRevoking=!1,this.hasRoomBlocks=!1,this.teamEventRoomBlocksEnabled=!1,this.teamEventNonRoomBlockBookingEnabled=!1,this.isOffsite=!1,this.participantMissingRoomBlock=!1,this.participantAddedInRoomBlock=!1,this.isHotelStateDisabledForRoomBlock=!1,this.editParticipantSettingsEnabled=!1,this.updateLocation=new Y,this.updateAllowedVertical=new Y,this.resendInvitation=new Y,this.removeParticipant=new Y,this.editParticipantSettings=new Y,this.modalService=M(et),this.splitService=M(Ce),this.tourGuideRefService=M(Fi),this.iconRegistry=M(ne),this.policyInfoSubject=ne
1w rt({isPolicyCustom:!1,noMaximumPriceSet:{[D.FLIGHT]:!1,[D.HOTEL]:!1,[D.RAIL]:!1,[D.CAR]:!1}}),this.policyInfo$=this.policyInfoSubject.asObservable(),this.stringUtils=ns,this.customSettingsDisplayText=null,this.customSettingsTooltipItems=[],this.activeLocationField=!1,this.editingParticipant={},this.autoFocusLocation=!1,this.TravelEventInvitationStatus=Sn,this.allBookingTypes=wa,this.BookingType=D,this.bookingTypeTranslations={[D.FLIGHT]:$localize`a flight`,[D.HOTEL]:$localize`a hotel`,[D.RAIL]:$localize`a train`,[D.CAR]:$localize`a car`},this.iconRegistry.registerIcons(Ti,Ao,Gr,mn,Ln,Un,Co,fo,En,go,Vn,vo,kn,uo,wn),xn(()=>{this.typeIconMap()&&this.iconRegistry.registerIcons(...Object.values(this.typeIconMap()).flatMap(u=>Object.values(u)))}),this.tourGuideStepRef=this.tourGuideRefService.tourGuideStepRef}ngOnInit(){let e=this.travelEventQuery.shouldShowTeamOffsiteUI();this.shouldDisplayEstimate=e||!this.splitService.isOn("ENT_GROUP_TRAVEL_HIDE_COST_ESTIMATE"),this.policyInfo$=this.travelEventQuery.activeEvent$.pipe(Q(n=>this.createPolicyInfo(n)),ut(this.destroyRef)),Ue([this.travelEventInvitationsQuery.invitationSettings$,this.travelEventInvitationsQuery.selectEntity(this.invitationId),this.customSettingsUtilService.policyLevels$.pipe(ii([])),this.customSettingsUtilService.paymentMethods$.pipe(ii([]))]).pipe(ut(this.destroyRef)).subscribe(([n,i,l,d])=>{let u=n?.[this.invitationId];this.customSettingsDisplayText=this.customSettingsUtilService.getCustomSettingsDisplayText(u),this.customSettingsTooltipItems=this.customSettingsUtilService.getCustomSettingsTooltipItems(u,i?.travelConditions,l,d,{startDatetime:i?.inviteStartDatetime,endDatetime:i?.inviteEndDatetime})})}createPolicyInfo(e){let n=e?.settings?.travelConditions?.companyPolicyLevelId===Rt,i={isPolicyCustom:n,noMaximumPriceSet:{[D.FLIGHT]:!1,[D.HOTEL]:!1,[D.RAIL]:!1,[D.CAR]:!1}};if(n){let l=this.travelEventSettingsUtilService.getCustomPolicyData(e);this.customPolicyData=l,l&&(i.noMaximumPriceSet={[D.FLIGHT]:this.hasNoMaximumPrice(l.flights),[D.HOTEL]:this.hasNoMaximumPrice(l.hotels),[D.RAIL]:this.hasNoMaximumPrice(l.trains),[D.CAR]:this.hasNoMaximumPrice(l.rentalCars)})}return i}hasNoMaximumPrice(e){return!e?.amount||e.amount<=0}get showTotalCost(){return this.isEventSent||this.teamEventRoomBlocksEnabled}isIconBorderDisabled(e){return this.getBookedStatus(e)?!0:e==="HOTEL"&&this.hasRoomBlocks&&(this.isOffsite||!this.teamEventNonRoomBlockBookingEnabled)?!this.isOffsite||this.isHotelStateDisabledForRoomBlock:this.invitationStatus===Sn.DECLINED&&!this.bookedVerticals[e]}verticalCostInsightsByVertical(e){let n=this.costInsights.allowedVerticalsCostInsights.find(i=>i.vertical===e);return this.getBookedStatus(e)&&!n&&e===D.HOTEL?{vertical:e,actualCost:this.costInsights?.actualCost}:n}infoTooltipText(e){if(e===Sn.DECLINED)return $localize`The participant can't join the event.`;if(e===Sn.BOOKED_ALL){let n=wa.filter(i=>this.allowedVerticals[i]).filter(i=>!this.bookedVerticals[i]).map(i=>this.bookingTypeTranslations[i]).join(", ");return n?this.inviteeAction?.reason===As.MADE_OUTSIDE_BOOKING?$localize`The participant has already booked ${n} outside of the event.`:$localize`The participant doesn't need ${n}.`:""}return""}enterRow(){!this.isEditModeDisabled&&this.invitationStatus!==Sn.DECLINED&&!this.isLoading&&(this.activeLocationField=!0)}leaveRow(e){if(!["ta-typeahead","popover-content"].some(l=>(e?.relatedTarget?.className||"")?.includes(l))){this.activeLocationField=!1;let l=window.document.activeElement;l&&l instanceof HTMLElement&&l.blur()}}enterLocation(){this.autoFocusLocation=!0}leaveLocation(){this.autoFocusLocation=!1}onRemoveLocation(){this.updateLocation.emit({invitationId:this.invitationId,location:null,invitationEmail:this.participantEmail})}updateParticipantLocation(e){e.placeId&&(this.activeLocationField=null,this.updateLocation.emit({invitationId:this.invitationId,location:e,invitationEmail:this.participantEmail}))}updateParticipantBookingTypes(e){N(z.PARTICIPANTS_SETTING_CHANGED,{[x.VIEW]:H.PARTICIPANTS_MAIN,[x.PARTICIPANT_SETTING]:e,[x.PARTICIPANT_SETTING_ALLOWED]:!this.allowedVerticals[e]}),!this.bookedVerticals[e]&&this.updateAllowedVertical.emit({invitationId:this.invitationId,vertical:e,isAllowed:!this.allowedVerticals[e],invitationEmail
1:this.participantEmail})}onRemoveParticipant(){if(!this.isOffsite)this.removeParticipantModalNonOffsite();else{if(!this.hasRoomBlocks||this.isHotelStateDisabledForRoomBlock&&!this.getBookedStatus(D.ROOM_BLOCK)){this.removeParticipant.emit(this.buildRemoveParticipantEvent());return}this.removeParticipantModalOffsite()}}removeParticipantModalNonOffsite(){N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_CONFIRM_DELETE});let e={participantFullName:this.participantFullName};this.splitService.isOn("ENT_DISABLE_PROVIDERS_FOR_EVENT_ACCOMMODATION")&&(e.useNewDesign=!0,e.inviteSent=this.invitationStatus!==Sn.DRAFT),this.modalService.open(Yl,{data:e}).afterClosed$.subscribe(i=>{i?.result&&this.removeParticipant.emit(this.buildRemoveParticipantEvent())})}removeParticipantModalOffsite(){this.modalService.open(Wl,{data:{tripUuid:this.tripUuid}}).afterClosed$.subscribe(({type:n,result:i})=>{n==="close"&&i&&this.removeParticipant.emit(this.buildRemoveParticipantEvent())})}buildRemoveParticipantEvent(){let e=!this.participantMissingRoomBlock&&this.hasRoomBlocks,n=!!(this.bookedVerticals[D.FLIGHT]||this.bookedVerticals[D.CAR]||this.bookedVerticals[D.RAIL]),i=e||n||!!this.bookedVerticals[D.HOTEL];return{invitationId:this.invitationId,participantFullName:this.participantFullName,participantFirstName:this.participantFirstName||this.participantFullName.split(" ")[0],hasRoomBlock:e,hasOtherBookings:n,hasAnyBookings:i,tripUuid:this.tripUuid,isOffsite:this.isOffsite}}getBookedStatus(e){return this.teamEventRoomBlocksEnabled?this.hasRoomBlocks&&e===D.HOTEL&&(this.isOffsite||!this.teamEventNonRoomBlockBookingEnabled)?!this.isHotelStateDisabledForRoomBlock:!!this.bookedVerticals[e]:!1}isCustomPolicyWithNoMaxPrice(e,n){return e.isPolicyCustom&&e.noMaximumPriceSet[n]&&this.allowedVerticals[n]}onEditParticipantSettings(){this.editParticipantSettings.emit({invitationId:this.invitationId,participantFullName:this.participantFullName,participantEmail:this.participantEmail})}static{this.\u0275fac=function(n){return new(n||t)(T(ve),T(Lt),T(da),T(Tt),T(Bs))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-user"]],inputs:{index:"index",invitationId:"invitationId",isEditModeDisabled:"isEditModeDisabled",participantPictureUrl:"participantPictureUrl",participantFullName:"participantFullName",participantFirstName:"participantFirstName",participantEmail:"participantEmail",isExtraGuestAllowed:"isExtraGuestAllowed",invitationStatus:"invitationStatus",inviteeAction:"inviteeAction",departureLocation:"departureLocation",allowedVerticals:"allowedVerticals",bookedVerticals:"bookedVerticals",typeIconMap:[1,"typeIconMap"],costInsights:"costInsights",isEventSent:"isEventSent",isLoading:"isLoading",isRevoking:"isRevoking",hasRoomBlocks:"hasRoomBlocks",teamEventRoomBlocksEnabled:"teamEventRoomBlocksEnabled",teamEventNonRoomBlockBookingEnabled:"teamEventNonRoomBlockBookingEnabled",tripUuid:"tripUuid",isOffsite:"isOffsite",participantMissingRoomBlock:"participantMissingRoomBlock",participantAddedInRoomBlock:"participantAddedInRoomBlock",isHotelStateDisabledForRoomBlock:"isHotelStateDisabledForRoomBlock",editParticipantSettingsEnabled:"editParticipantSettingsEnabled"},outputs:{updateLocation:"updateLocation",updateAllowedVertical:"updateAllowedVertical",resendInvitation:"resendInvitation",removeParticipant:"removeParticipant",editParticipantSettings:"editParticipantSettings"},standalone:!0,features:[y],decls:34,vars:38,consts:()=>{let e;e=$localize`:␟3aa930b0416ab050908db3a7e0780cb3c9bce15e␟5018186868771085313: This participant has custom event settings: `;let n;n=$localize`:␟220cf2567e0fe2dcd32ff7e1bf4f70aa05f07370␟2673033375306082923:{VAR_PLURAL, plural, =1 {1 custom field} other {{INTERPOLATION} custom fields}}`,n=Ft(n,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize`:␟237d657505f0499fdd3802766dddc33f9a37c09f␟5459997852212621015: ${n}:ICU: `;let l;l=$localize`:␟ed31c09fd77c36238c13d83635f3fe5294c733d2␟471816275243265264:Location`;let d;d=$localize`:␟415eee96bed86472d63c3e9d7fbe6f6075520aa0␟231646570149602773:Partially booked`;let u;u=$localize`:␟2310400448b90e879fb988300d6839eb9316edf8␟6468800528949839515:Declined`;let h;h=$localize`:␟73e2d4c2e4ce0f5f80972618693031ee7e6938f2␟702805796649798080:Booked`;let I;I=$localize`:␟369513b75ae189153b47ebc794d4bfe6065e95d6␟3767158334728498556:Not booked`;let F;F=$localize`:␟369513b75ae189153b47ebc794d4bfe6065e95d6␟3767158334728498556:Not booked`;let $;$=$localize`:␟1282cbdd9ce0c2927472d763734a1e5d7516b89d␟1017498453036121839:Send reminder`;let ge;ge=$localize`:␟4ba250869daa372b54d24fafc0ea934769ee4076␟4775550080689015987:Reason`;let W;W=$localize`:␟bdf990491d1ebb3e0ed3ed8f4e37932a95452b8f␟7345415823179651585:Not invited`;let oe;oe=$localize`:␟087e1366cf8e25ca3fd61ad2f953c147776fc0e5␟2193849029473915624:Edit participant settings`;let Ie;return Ie=$localize`:␟d0bc4c241e2dbd8b3e3025da3af3b19423877f0a␟6691279270070521768:
1Remove participant`,[["customSettingsTooltip",""],["addDeparture",""],["notInvitedTpl",""],["removeParticipantPopup",""],["plainValue",""],["selectedBookingTypesPopover",""],["sendReminder",""],["statusInfo",""],["editParticipantSettingsPopup",""],e,i,$,ge,oe,Ie,[1,"users-table",3,"taDisabled"],["data-testid","eventUsers",3,"taDisabled"],[1,"users-table__row",3,"mouseenter","mouseleave"],["class","users-table__indicator",4,"ngIf"],[1,"users-table__name"],["size","36",3,"url","initials","userName"],[1,"users-table__details"],["class","users-table__details-name",4,"ngIf"],[1,"users-table__details-email"],["class","users-table__details-custom-settings users-table__details-custom-settings--clickable","popoverTrigger","hover",3,"taPopover","popoverConfig","click",4,"ngIf"],[1,"users-table__departure"],[1,"tour-guide-item-overlap"],[4,"ngIf","ngIfElse"],[1,"tour-guide",3,"joyrideStep","stepContent","counterTemplate"],["class","users-table__bookings",3,"cursor",4,"ngIf"],[1,"users-table__status"],["class","users-table__estimated-cost estimated-cost",4,"ngIf"],["class","users-table__total-cost",4,"ngIf"],[1,"users-table__actions"],["class","users-table__edit-participant-settings",4,"ngIf"],[1,"users-table__remove"],["icon","trash","theme","outline","popoverTrigger","hover",3,"click","clickable","taPopover"],[1,"users-table__indicator"],[1,"users-table__indicator__dot"],[1,"users-table__details-name"],["class","users-table__details-plus1",4,"ngIf"],[1,"users-table__details-plus1"],["popoverTrigger","hover",1,"users-table__details-custom-settings","users-table__details-custom-settings--clickable",3,"click","taPopover","popoverConfig"],[1,"custom-settings-tooltip"],[1,"custom-settings-tooltip__header"],["class","custom-settings-tooltip__item",4,"ngFor","ngForOf"],[1,"custom-settings-tooltip__item"],[1,"custom-settings-tooltip__title"],[1,"custom-settings-tooltip__value"],[1,"custom-settings-tooltip__value-primary"],["class","custom-settings-tooltip__value-secondary",4,"ngIf"],[1,"custom-settings-tooltip__value-secondary"],["label",l],["type","location","taAirportAwareLocationSearch","",3,"selectLocation","mouseenter","mouseleave","value","autofocus","includeLocation"],["class","users-table__remove-location","icon","cancel",3,"clickable","mousedown",4,"ngIf"],["icon","cancel",1,"users-table__remove-location",3,"mousedown","clickable"],[1,"users-table__bookings"],[1,"booking-types","tour-guide-item-overlap"],[4,"ngFor","ngForOf"],[1,"users-table__booking-type-container"],["class","users-table__booking-completed-icon","icon","check-circle","theme","solid",4,"ngIf"],["icon","warning","class","no-max-price-warning-icon",4,"ngIf"],["data-testid","bookingTypeItem","popoverTrigger","hover",1,"booking-types__item",3,"click","icon","taPopover"],["icon","check-circle","theme","solid",1,"users-table__booking-completed-icon"],["icon","warning",1,"no-max-price-warning-icon"],[3,"type","isAllowed","isBooked","customPolicyNoMaxPriceMessage","participantMissingRoomBlock","costInsights","departureLocation","isRoomBlockBooked","isOffsite","teamEventNonRoomBlockBookingEnabled"],[3,"ngSwitch"],["theme","soft","type","yellow","label",d,4,"ngSwitchCase"],["theme","soft","type","red","label",u,4,"ngSwitchCase"],["theme","soft","type","green","label",h,4,"ngSwitchCase"],["theme","soft","type","orange","label",I,4,"ngSwitchCase"],["theme","soft","type","orange","label",F,4,"ngSwitchCase"],["theme","soft","type","gray",3,"label",4,"ngSwitchDefault"],["class","send-invite-icon","icon","email","theme","outline","popoverTrigger","hover",3,"clickable","taPopover","click",4,"ngIf"],["class","info-icon","icon","info-small","theme","outline","popoverTrigger","hover",3,"taPopover",4,"ngIf"],["theme","soft","type","yellow","label",d],["theme","soft","type","red","label",u],["theme","soft","type","green","label",h],["theme","soft","type","orange","label",I],["theme","soft","type","orange","label",F],["theme","soft","type","gray",3,"label"],["icon","email","theme","outline","popoverTrigger","hover",1,"send-invite-icon",3,"click","clickable","taPopover"],[1,"status-info"],["icon","info-small","theme","outline","popoverTrigger","hover",1,"info-icon",3,"taPopover"],["class","status-info__title",4,"ngIf"],[4,"ngIf"],[1,"status-info__title"],[1,"status-info__bold"],[1,"status-info__grey"],["theme","soft","type","gray","label",W],[1,"users-table__estimated-cost","estimated-cost"],[1,"tour-guide-item-overlap",3,"costInsights","allowedVerticals","typeIconMap","invitationStatus"],[1,"users-table__total-cost"],[3,"costInsights","typeIconMap","hasRoomBlocks"],[1,"users-table__edit-participant-settings"],["icon","edit","theme","outline","popoverTrigger","hover",3,"click","taPopover"]]}
1,template:function(n,i){if(n&1){let l=O();r(0,"div",15)(1,"div",16)(2,"div",17),S("mouseenter",function(){return f(l),v(i.enterRow())})("mouseleave",function(u){return f(l),v(i.leaveRow(u))}),p(3,Tp,2,4,"div",18),r(4,"div",19),m(5,"ta-avatar-v2",20),r(6,"div",21),p(7,Pp,3,2,"div",22),r(8,"div",23),C(9),P(10,"hideChildEmail"),s(),p(11,Cp,2,6,"div",24)(12,Np,4,1,"ng-template",null,0,k),s()(),r(14,"div",25)(15,"div",26),p(16,Rp,2,1,"ng-container",27)(17,yp,3,7,"ng-template",null,1,k),s(),m(19,"div",28),s(),p(20,Up,4,8,"div",29),P(21,"async"),r(22,"div",30),p(23,Wp,14,8,"ng-container",27)(24,Kp,1,0,"ng-template",null,2,k),s(),p(26,Qp,3,9,"div",31)(27,qp,2,3,"div",32),r(28,"div",33),p(29,Zp,4,1,"div",34),r(30,"div",35)(31,"ta-icon-v2",36),S("click",function(){return f(l),v(i.onRemoveParticipant())}),s(),p(32,em,2,0,"ng-template",null,3,k),s()()()()()}if(n&2){let l=V(18),d=V(25),u=V(33);te("users-table--invited",i.showTotalCost),a("taDisabled",i.isLoading),o(),a("taDisabled",i.isLoading||i.isEditModeDisabled||i.isRevoking),o(),te("users-table__row--room-block",i.teamEventRoomBlocksEnabled)("not-invited",!i.showTotalCost)("edit-participant-enabled",i.editParticipantSettingsEnabled),o(),a("ngIf",i.teamEventRoomBlocksEnabled&&i.hasRoomBlocks),o(2),a("url",i.participantPictureUrl)("initials",i.participantFullName)("userName",i.participantFullName),o(2),a("ngIf",i.participantFullName),o(2),B(" ",A(10,34,i.participantEmail)," "),o(2),a("ngIf",i.customSettingsDisplayText&&i.editParticipantSettingsEnabled),o(3),te("declined-disabled",i.invitationStatus===i.TravelEventInvitationStatus.DECLINED),o(2),a("ngIf",i.departureLocation&&!i.activeLocationField)("ngIfElse",l),o(3),te("joyride-step-active",(i.tourGuideStepRef==null?null:i.tourGuideStepRef.currentStepName)==="set-departing-locations0"),a("joyrideStep","set-departing-locations"+i.index)("stepContent",i.tourGuideStepRef==null?null:i.tourGuideStepRef.customContent)("counterTemplate",i.tourGuideStepRef==null?null:i.tourGuideStepRef.counter),o(),a("ngIf",A(21,36,i.policyInfo$)),o(3),a("ngIf",i.isEventSent)("ngIfElse",d),o(3),a("ngIf",i.shouldDisplayEstimate),o(),a("ngIf",i.showTotalCost),o(2),a("ngIf",i.editParticipantSettingsEnabled),o(2),a("clickable",!0)("taPopover",u)}},dependencies:[Fn,L,Vo,wo,kt,fs,el,K,Z,No,Mo,_e,re,Kl,Xt,jt,Jt,qt,lr,ql,Ql,Go,we],styles:['@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.users-table__name[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:6px}.users-table__name__item[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);border-radius:var(--dim-step1);cursor:pointer}.users-table__name__item--disabled[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--disabled[_ngcontent-%COMP%]{cursor:not-allowed!important}.users-table__name__item--active[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--active[_ngcontent-%COMP%]{color:var(--ta-color-text-default)}.users-table__name__item--booked[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--booked[_ngcontent-%COMP%]{background:var(--ta-color-surface-success-soft);color:var(--ta-color-text-success);cursor:default!important}.users-table__name__item--booked[_ngcontent-%COMP%]:hover, .users-table[_ngcontent-%COMP%]   .booking-types__item--booked[_ngcontent-%COMP%]:hover{background:var(--ta-color-palette-green-20)}.users-table__name__item--room-block-disabled[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--room-block-disabled[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled)}.users-table__name__item--room-block-booked[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--room-block-booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled);cursor:default}.users-table__name__item--room-block-booked[_ngcontent-%COMP%]:hover, .users-table[_ngcontent-%COMP%]   .booking-types__item--room-block-booked[_ngcontent-%COMP%]:hover{color:var(--ta-color-icon-disabled);background:unset}.users-table__name__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked,.booking-types__item--room-block-booked,.booking-types__item--room-block-icon-style), .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked,.booking-types__item--room-block-booked,.booking-types__item--room-block-icon-style){color:var(--ta-color-icon-primary)}.users-table__name__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked,.booking-types__item--room-block-booked,.booking-types__item--room-block-icon-style):active, .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked,.booking-types__item--room-block-booked,.booking-types__item--room-block-icon-style):active{color:var(--ta-color-icon-primary-pressed)}.users-table__name__item--container[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--container[_ngcontent-%COMP%]{border-radius:var(--border-default, 8px);border:1px solid var(--ta-color-border-default);display:flex;align-items:center;justify-content:center;padding:6px}.users-table__name[_ngcontent-%COMP%]   .ta-icon[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types[_ngcontent-%COMP%]   .ta-icon[_ngcontent-%COMP%]{--icon-dimension: 18px}.users-table__booking-type-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:7px;position:relative;border:1px solid var(--ta-color-border-default);background:var(--ta-color-action-transparent);border-radius:6px}.users-table__booking-type-container.custom-policy-no-max-price[_ngcontent-%COMP%]{border:1px solid var(--ta-color-border-warning)}.users-table__booking-type-container[_ngcontent-%COMP%]   .no-max-price-warning-icon[_ngcontent-%COMP%]{position:absolute;top:-8px;right:-8px;background-color:#fff;border-radius:50%;color:var(--ta-color-icon-warning);--icon-dimension: 16px;z-index:2}.users-table__booking-type-container--disabled[_ngcontent-%COMP%]{border:1px solid var(--ta-color-border-disabled);cursor:not-allowed!important;opacity:.4}.users-table__booking-completed-icon[_ngcontent-%COMP%]{position:absolute;right:-10px;top:-14px;color:var(--ta-color-icon-success)}.users-table__details[_ngcontent-%COMP%]{padding-left:var(--dim-step2)}
1.users-table__details-name[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.users-table__details-email[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.users-table__details-plus1[_ngcontent-%COMP%]{color:var(--ta-color-text-highlight);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.users-table__details-custom-settings[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xs);font-weight:var(--text-weight-bold);text-align:start;color:var(--ta-color-action-primary);line-height:var(--dim-step4);padding-top:2px}.users-table__details-custom-settings--clickable[_ngcontent-%COMP%]{cursor:pointer}.users-table__details-custom-settings--clickable[_ngcontent-%COMP%]:hover{text-decoration:underline}.users-table__actions[_ngcontent-%COMP%]{z-index:1;display:flex;align-items:center;gap:var(--dim-step2);margin-left:var(--dim-step4)}.users-table__remove[_ngcontent-%COMP%]{visibility:hidden;color:var(--ta-color-text-warning);cursor:pointer}.users-table__edit-participant-settings[_ngcontent-%COMP%]{visibility:hidden;color:var(--ta-color-icon-primary);cursor:pointer}.users-table__estimated-cost[_ngcontent-%COMP%]{position:relative;height:21px;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;flex-wrap:nowrap}.users-table__total-cost[_ngcontent-%COMP%]{text-align:right;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.users-table__departure[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%]{padding:0 var(--dim-step2);color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-subtle)}.users-table__departure--info[_ngcontent-%COMP%], .users-table__bookings--info[_ngcontent-%COMP%]{position:absolute;top:var(--dim-step5)}.users-table__header[_ngcontent-%COMP%]{display:grid;grid-template-columns:24% 23% 16% 14% 10% 9% 4%;align-items:center;padding:var(--dim-step5) 0;color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;position:relative;border-bottom:1px solid var(--ta-color-divider-default);margin:0 -40px 0 -32px;padding:var(--dim-step5) var(--dim-step10) var(--dim-step5) var(--dim-step8)}.users-table__header.not-invited[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 14% 15% 4%}.users-table__header.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 16% 13% 9% 9% 6%}.users-table__header.not-invited.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 13% 14% 6%}.users-table__remove-location[_ngcontent-%COMP%]{z-index:1;color:var(--ta-color-text-subtle)}.users-table__departure[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%], .users-table__estimated-cost[_ngcontent-%COMP%]{position:relative}.users-table__departure[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%], .users-table__estimated-cost[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%]{position:absolute;z-index:0}.users-table__departure[_ngcontent-%COMP%]   .tour-guide-item-overlap[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%]   .tour-guide-item-overlap[_ngcontent-%COMP%], .users-table__estimated-cost[_ngcontent-%COMP%]   .tour-guide-item-overlap[_ngcontent-%COMP%]{position:relative;z-index:1}.users-table__departure[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%], .users-table__estimated-cost[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%]{background-color:#3b5560b3}.users-table__departure[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%]:before, .users-table__bookings[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%]:before, .users-table__estimated-cost[_ngcontent-%COMP%]   .joyride-step-active[_ngcontent-%COMP%]:before{content:"";background:#fff;width:100%;height:100%;border-radius:16px;position:absolute}.users-table__departure[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%]{height:80px;top:-12px;left:-8px;right:-6px}.users-table__bookings[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%]{height:65px;top:-12px;left:-6px;right:8px}.users-table__estimated-cost[_ngcontent-%COMP%]   .tour-guide[_ngcontent-%COMP%]{height:50px;top:-12px;left:12px;right:-8px}.users-table__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:24% 23% 16% 14% 10% 9% 4%;align-items:center;padding:var(--dim-step5) 0;border-bottom:1px solid var(--ta-color-divider-default);margin:0 -40px 0 -32px;padding:var(--dim-step5) var(--dim-step10) var(--dim-step5) var(--dim-step8);word-break:break-word;min-height:58px}.users-table__row.not-invited[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 14% 15% 4%}.users-table__row.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 16% 13% 9% 9% 6%}.users-table__row.not-invited.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 13% 14% 6%}.users-table__row[_ngcontent-%COMP%]:hover{background:var(--ta-color-surface-neutral)}.users-table__row[_ngcontent-%COMP%]:hover     ta-spinner{background:var(--ta-color-surface-neutral)}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__bookings[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .users-table__departure[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-icon-primary);cursor:pointer}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__bookings--booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .users-table__departure--booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .booking-types__item--booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-success)}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__bookings--room-block-booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .users-table__departure--room-block-booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .booking-types__item--room-block-booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.users-table__departure[_ngcontent-%COMP%]{color:var(--ta-color-text-default)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.users-table__departure[_ngcontent-%COMP%]     .ta-tag{color:var(--ta-color-text-default);background:var(--ta-color-surface-default)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.booking-types__item[_ngcontent-%COMP%]{color:var(--color-grey-0)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled__room-block-disable-add.booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled)}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__remove[_ngcontent-%COMP%]{visibility:visible}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__remove.disabled[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);pointer-events:none;cursor:initial}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__edit-participant-settings[_ngcontent-%COMP%]{visibility:visible}.users-table__row[_ngcontent-%COMP%]   .declined-disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;cursor:default}.users-table__row[_ngcontent-%COMP%]   .declined-disabled.users-table__departure[_ngcontent-%COMP%]     .ta-tag{color:var(--ta-color-text-subtle);background:var(--ta-color-surface-default)}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)!important;cursor:default!important;pointer-events:auto}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block[_ngcontent-%COMP%]:active{background:unset}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block-disable-add[_ngcontent-%COMP%]{pointer-events:auto}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block-disable-add[_ngcontent-%COMP%]:hover{color:var(--ta-color-icon-disabled)}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block-disable-add[_ngcontent-%COMP%]:active{pointer-events:none}.users-table__row--room-block[_ngcontent-%COMP%]{grid-template-columns:24% 20% 20% 13% 10% 10% 4%;border-bottom:1px solid var(--ta-color-border-disabled)}.users-table__row--room-block.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 20% 20% 13% 9% 9% 6%}.users-table__row--room-block[_ngcontent-%COMP%]:hover{background:var(--ta-color-surface-background)}.users-table__row--room-block[_ngcontent-%COMP%]:hover   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-icon-default)}.users-table__row--room-block[_ngcontent-%COMP%]:hover   .booking-types__item--room-block-booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled)}.users-table__row--room-block[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-icon-default)}.users-table__row--room-block[_ngcontent-%COMP%]   .declined-disabled__room-block-disable-add[_ngcontent-%COMP%], .users-table__row--room-block[_ngcontent-%COMP%]   .booking-types__item--room-block-booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-disabled)}.users-table__row--missing-room-block[_ngcontent-%COMP%]{background-color:var(--ta-color-surface-alert)}.users-table__row--added-in-room-block[_ngcontent-%COMP%]{background-color:var(--ta-color-surface-info)}.users-table__status[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.users-table--invited[_ngcontent-%COMP%]   .users-table__status[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.users-table.read-only[_ngcontent-%COMP%]   .users-table__departure[_ngcontent-%COMP%], .users-table.read-only[_ngcontent-%COMP%]   .users-table__bookings[_ngcontent-%COMP%]{pointer-events:none}.users-table__indicator[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;position:absolute;
1left:-16px}.users-table__indicator__dot[_ngcontent-%COMP%]{display:inline-block;width:8px;height:8px;border-radius:50%;cursor:pointer;transition:transform .2s}.users-table__indicator__dot--added[_ngcontent-%COMP%]{background-color:var(--ta-color-icon-info)}.users-table__indicator__dot--missing[_ngcontent-%COMP%]{background-color:var(--ta-color-action-alert)}.tag-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step1)}.per-diem[_ngcontent-%COMP%]{margin-top:var(--dim-step6);display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.per-diem__per-person[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.per-diem__amount[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.cost-estimation[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-top:var(--dim-step6)}.cost-estimation__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.cost-estimation__description[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.cost-estimation__total[_ngcontent-%COMP%]{position:relative;color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start}.send-invite-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-primary)}.info-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);cursor:pointer;pointer-events:auto;z-index:3}.info-icon[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.team-event__user-filter[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.team-event__user-filter--button[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}  .users-table__departure .ta-form-wrap{margin-bottom:0!important}  .users-table__allowed-bookings{padding:var(--dim-step4) var(--dim-step5);max-width:300px}  .users-table--invited .users-table__status ta-tag-v2 .ta-tag__label{max-width:104px}.custom-settings-tooltip[_ngcontent-%COMP%]{padding:var(--dim-step3) var(--dim-step4);width:400px}.custom-settings-tooltip__header[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;margin-bottom:var(--dim-step5)}.custom-settings-tooltip__item[_ngcontent-%COMP%]{margin-bottom:var(--dim-step3)}.custom-settings-tooltip__item[_ngcontent-%COMP%]:last-child{margin-bottom:0}.custom-settings-tooltip__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.custom-settings-tooltip__value[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start}.custom-settings-tooltip__value--with-secondary[_ngcontent-%COMP%]{display:flex;gap:var(--dim-step4)}.custom-settings-tooltip__value--with-secondary[_ngcontent-%COMP%]   .custom-settings-tooltip__value-primary[_ngcontent-%COMP%]{max-width:70%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.custom-settings-tooltip__value--with-secondary[_ngcontent-%COMP%]   .custom-settings-tooltip__value-secondary[_ngcontent-%COMP%]{white-space:nowrap;flex-shrink:0}.status-info[_ngcontent-%COMP%]{max-width:340px;padding:var(--dim-step4) var(--dim-step5)}.status-info__title[_ngcontent-%COMP%]{margin-bottom:var(--dim-step3)}.status-info__bold[_ngcontent-%COMP%]{margin:var(--dim-step1) 0;color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.status-info__grey[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);word-break:break-word}']})}}return t})();E();E();E();E();E();E();var Zl={BOOKED_ALL:{label:"Booked",icon:null,order:1},PARTIALLY_BOOKED:{label:"Partially booked",icon:null,order:2},INVITED:{label:"Not booked",icon:null,order:3},DECLINED:{label:"Declined",icon:null,order:4}},e_={FLIGHT:{label:"Flight",icon:En,order:1},HOTEL:{label:"Hotel",icon:Vn,order:2},RAIL:{label:"Train",icon:wn,order:3},CAR:{label:"Car",icon:kn,order:4}},Hi={participantSearch:"",statuses:[],allowedBookings:[]},$a=(t,_,e)=>Object.entries(_).map(([n,i])=>({key:n,label:$localize`${i.label}`,count:t[n]||0,checked:e.statuses.includes(n)||e.allowedBookings.includes(n),icon:i.icon})).sort((n,i)=>(_[n.key].order||0)-(_[i.key].order||0)),no=(t,_,e)=>{switch(_){case D.FLIGHT:return t?.settings?.travelConditions?.transportation?.flightConditions?.numberOfBookingsAllowed||
10;case D.HOTEL:return e?0:t?.settings?.travelConditions?.accommodation?.hotelConditions?.numberOfBookingsAllowed||0;case D.CAR:return t?.settings?.travelConditions?.transportation?.carConditions?.numberOfBookingsAllowed||0;case D.RAIL:return t?.settings?.travelConditions?.transportation?.trainConditions?.numberOfBookingsAllowed||0;default:return 0}};E();var tm=()=>({vertical:4}),nm=(t,_)=>({placeAt:t,offset:_}),im=t=>({customClasses:"users-filter__popover",placement:t});function om(t,_){if(t&1&&m(0,"ta-icon",7),t&2){let e=c();a("icon",e.icon)}}function am(t,_){if(t&1&&m(0,"ta-icon",8),t&2){let e=c();te("users-filter__icon--active-v2",e.isActive)("users-filter__icon--opened-v2",e.isOpened)("users-filter__icon--checked",e.disableActiveReset&&e.isActive)}}function rm(t,_){if(t&1){let e=O();r(0,"ta-icon",9),S("click",function(i){f(e);let l=c();return v(l.resetClick(i))})("keydown",function(i){f(e);let l=c();return v(l.handleKeyDown(i))}),s()}if(t&2){let e=c();te("users-filter__icon--active-v2",e.isActive)}}function sm(t,_){if(t&1&&(r(0,"div",22),m(1,"ta-icon-v2",23),s()),t&2){let e=c().$implicit;o(),a("icon",e.icon.name)}}function lm(t,_){if(t&1&&(r(0,"div",24),C(1),s()),t&2){let e=c().$implicit;o(),B("(",e.count,")")}}function _m(t,_){if(t&1){let e=O();r(0,"div",16)(1,"ta-checkbox",17),S("change",function(i){let l=f(e).$implicit,d=c(2);return v(d.check(i,l))}),s(),r(2,"div",18),p(3,sm,2,1,"div",19),r(4,"div",20),C(5),s(),p(6,lm,2,1,"div",21),s()()}if(t&2){let e=_.$implicit,n=c(2);o(),a("checked",e.checked),o(2),a("ngIf",n.showIcon),o(2),G(e.label),o(),a("ngIf",n.showCount)}}function cm(t,_){if(t&1){let e=O();r(0,"div",10)(1,"div",11)(2,"div",12),C(3),s(),r(4,"div",13),S("click",function(i){f(e);let l=c();return v(l.resetClick(i))})("keydown",function(i){f(e);let l=c();return v(l.handleKeyDown(i))}),C(5,"Reset"),s()(),r(6,"div",14),p(7,_m,7,4,"div",15),s()()}if(t&2){let e=c();o(3),G(e.headerLabel),o(),te("users-filter-dropdown__header__reset__active",e.isActive),o(3),a("ngForOf",e.options)}}var t_=(()=>{class t{constructor(e){this.popoverService=e,this.popoverPlaceAt="bottomLeftAlign",this.truncateWidth=200,this.disableActiveReset=!1,this.activeFilters=[],this.theme="default",this.isViewOnly=!1,this.maxWidth=!1,this.pulsing=!1,this.isDisabled=!1,this.showCount=!1,this.showIcon=!1,this.options=[],this.onSelectFilters=new Y,this.isActive=!1,this.isOpened=!1,this.selectedValues=[]}handleKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.resetClick(e))}ngOnInit(){this.selectedValues=this.options.filter(e=>e.checked),this.label=this.headerLabel,this.selectedValues&&(this.updateLabel(),this.selectedValues.forEach(e=>{this.check(!0,e)}))}ngOnDestroy(){this.mouseOver&&this.mouseOver.unsubscribe(),this.close()}updateLabel(){this.selectedValues&&this.selectedValues.length>0?this.selectedValues.length===1?this.label=this.selectedValues[0].label:this.label=`${this.selectedValues[0].label} +${this.selectedValues.length-1}`:this.label=this.headerLabel}onOpen(e){this.popoverRef=e,this.isOpened=!0}onClosed(){this.isOpened=!1,this.mouseOver&&this.mouseOver.unsubscribe(),this.popoverRef=null}close(){this.popoverRef&&(this.popoverService.close(this.popoverRef),this.popoverRef=null)}check(e,n){n.checked=e,this.isActive=this.options.some(i=>i.checked),this.selectedValues=this.options.filter(i=>i.checked),this.selectedValues&&this.updateLabel(),clearTimeout(this.emitTimeout),this.emitTimeout=setTimeout(()=>{this.onSelectFilters.emit(this.selectedValues)},700)}resetClick(e){e&&e.stopPropagation(),this.label=this.headerLabel,this.selectedValues=[],this.options?.forEach(n=>{n.checked=!1}),this.onSelectFilters.emit([]),this.renderStatus()}renderStatus(){this.isActive=!1}static{this.\u0275fac=function(n){return new(n||t)(T(Kr))}}static{this.\u0275cmp=b({type:t,selectors:[["navan-users-filter"]],hostBindings:function(n,i){n&1&&S("scroll",function(d){return i.handleKeyDown(d)},!1,rr)},inputs:{popoverPlaceAt:"popoverPlaceAt",icon:"icon",truncateWidth:"truncateWidth",disableActiveReset:"disableActiveReset",activeFilters:"activeFilters",theme:"theme",isViewOnl
1y:"isViewOnly",maxWidth:"maxWidth",pulsing:"pulsing",isDisabled:"isDisabled",headerLabel:"headerLabel",showCount:"showCount",showIcon:"showIcon",options:"options"},outputs:{onSelectFilters:"onSelectFilters"},standalone:!0,features:[y],decls:9,vars:19,consts:[["dropdown",""],[1,"users-filter",3,"taPopoverOnOpen","taPopoverOnClose","taPopover","popoverConfig"],[1,"users-filter__label",3,"title"],["class","users-filter__pre-icon",3,"icon",4,"ngIf"],["data-testid","activeFilter",1,"users-filter__label__text"],["icon","chevron-bottom-small","theme","outline","class","users-filter__icon",3,"users-filter__icon--active-v2","users-filter__icon--opened-v2","users-filter__icon--checked",4,"ngIf"],["icon","filter-cross","theme","outline","class","users-filter__icon__cross",3,"users-filter__icon--active-v2","click","keydown",4,"ngIf"],[1,"users-filter__pre-icon",3,"icon"],["icon","chevron-bottom-small","theme","outline",1,"users-filter__icon"],["icon","filter-cross","theme","outline",1,"users-filter__icon__cross",3,"click","keydown"],[1,"users-filter-dropdown"],[1,"users-filter-dropdown__header"],[1,"users-filter-dropdown__header__label"],[1,"users-filter-dropdown__header__reset",3,"click","keydown"],[1,"users-filter-dropdown__items"],["class","users-filter-dropdown__item",4,"ngFor","ngForOf"],[1,"users-filter-dropdown__item"],[3,"change","checked"],[1,"users-filter-dropdown__item__content"],["class","users-filter-dropdown__item__icon",4,"ngIf"],[1,"users-filter-dropdown__item__label"],["class","users-filter-dropdown__item__count",4,"ngIf"],[1,"users-filter-dropdown__item__icon"],["theme","outline",3,"icon"],[1,"users-filter-dropdown__item__count"]],template:function(n,i){if(n&1){let l=O();r(0,"div",1),S("taPopoverOnOpen",function(u){return f(l),v(i.onOpen(u))})("taPopoverOnClose",function(){return f(l),v(i.onClosed())}),r(1,"div",2),p(2,om,1,1,"ta-icon",3),r(3,"span",4),C(4),s()(),p(5,am,1,6,"ta-icon",5)(6,rm,1,2,"ta-icon",6),s(),p(7,cm,8,4,"ng-template",null,0,k)}if(n&2){let l=V(8);te("users-filter__active",i.isActive)("users-filter__disabled",i.isDisabled),a("taPopover",l)("popoverConfig",me(17,im,tt(14,nm,i.popoverPlaceAt,Se(13,tm)))),o(),a("title",i.label),o(),a("ngIf",i.icon),o(),Dt("max-width",i.truncateWidth,"px"),o(),B(" ",i.label," "),o(),a("ngIf",!i.isActive||i.isViewOnly||i.disableActiveReset),o(),a("ngIf",i.isActive&&!i.isViewOnl
1y&&!i.disableActiveReset)}},dependencies:[re,Dn,L,_e,ds,K,Z],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.users-filter[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;height:var(--dim-step5);border:1px solid var(--ta-color-border-default);border-radius:var(--dim-step3);padding:var(--dim-step3) var(--dim-step4) var(--dim-step3) var(--dim-step3);background:var(--ta-color-surface-default);font-weight:var(--text-weight-regular);margin-right:var(--dim-step3);cursor:pointer}.users-filter__popover[_ngcontent-%COMP%]{margin-top:4px}.users-filter__pre-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step1)}.users-filter__icon[_ngcontent-%COMP%], .users-filter__icon__cross[_ngcontent-%COMP%]{margin-left:var(--dim-step1);width:16px}.users-filter__icon[_ngcontent-%COMP%]{color:var(--ta-color-icon-default)}.users-filter__icon--active[_ngcontent-%COMP%], .users-filter__icon--opened[_ngcontent-%COMP%]{color:var(--ta-color-icon-primary)}.users-filter__icon--checked[_ngcontent-%COMP%]{color:inherit}.users-filter__icon__cross[_ngcontent-%COMP%]{color:var(--ta-color-icon-primary)}.users-filter__active[_ngcontent-%COMP%]{background:var(--ta-color-surface-primary);border-color:var(--ta-color-border-primary);color:var(--ta-color-text-primary)}.users-filter__disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.users-filter__label[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.users-filter__label__text[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.users-filter-dropdown[_ngcontent-%COMP%]{position:relative;-webkit-user-select:none;user-select:none;background:#fff;border-radius:8px;box-shadow:0 2px 8px #0000001a;min-width:320px;max-width:360px;max-height:600px;padding:var(--dim-step5);overflow-y:auto}.users-filter-dropdown__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step4);padding-bottom:var(--dim-step4);border-bottom:1px solid var(--ta-color-divider-default)}.users-filter-dropdown__header__label[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.users-filter-dropdown__header__reset[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);color:var(--ta-color-text-subtle)}.users-filter-dropdown__header__reset__active[_ngcontent-%COMP%]{cursor:pointer;color:var(--ta-color-text-primary)}.users-filter-dropdown__items[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--dim-step2)}.users-filter-dropdown__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step2);padding:8px 0}.users-filter-dropdown__item__content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step2)}.users-filter-dropdown__item__icon[_ngcontent-%COMP%]{display:flex}.users-filter-dropdown__item__count[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}"]})}}return t})();var dm=()=>({}),pm=t=>[t];function io(t,_,e){let n={[x.VIEW]:H.PARTICIPANTS_MAIN,[x.NAVAN_EVENT_FILTER_CATEGORY]:_};e&&(n[x.NAVAN_EVENT_FILTER_VALUE]=e),N(t,n)}function mm(t,_){let e=!t&&_;(e||t&&!_)&&io(e?z.PARTICIPANTS_FILTER_APPLIED:z.PARTICIPANTS_FILTER_REMOVED,Jo.SEARCH)}var Xi=function(t){return t.STATUSES="statuses",t.ALLOWED_BOOKINGS="allowedBookings",t}(Xi||{}),n_=(()=>{class t{constructor(){this.travelEventInvitationsQuery=M(Tt),this.isUserAdmin=!1,this.statusOptions=[],this.allowedBookingOptions=[],this.isEventDraft=!1,this.filtersChanged=new Y,this.filtersNames=Xi,this.previousValues={status:[],allowedBooking:[]},this.previousSearchValue="",this.searchPlaceholder=$localize`Search`,this.activeFilters=structuredClone(Hi)}onSearchFilterChange(e){let n=e?.name??"";mm(this.previousSearchValue,n),this.activeFilters.participantSearch=n,this.previousSearchValue=n,this.filtersChanged.emit(this.activeFilters)}onDropdownFilterChange(e,n){let i=this.previousValues[e]||[];this.logFilterEvent(e,n,i);let d=n.filter(u=>u.checked).map(u=>u.key);e===Xi.STATUSES?this.activeFilters.statuses=d:e===Xi.ALLOWED_BOOKINGS&&(this.activeFilters.allowedBookings=d),this.previousValues[e]=[...n],this.filtersChanged.emit(this.activeFilters)}logFilterEvent(e,n,i){let l="";e===Xi.STATUSES?l=Jo.PARTICIPANT_STATUS:e===Xi.ALLOWED_BOOKINGS&&(l=Jo.ALLOWED_BOOKINGS),n.length===0&&i.length>
10?i.forEach(d=>{d.checked&&io(z.PARTICIPANTS_FILTER_REMOVED,l,d.key)}):(n.forEach((d,u)=>{let h=i[u];h?d.checked!==h.checked&&io(d.checked?z.PARTICIPANTS_FILTER_APPLIED:z.PARTICIPANTS_FILTER_REMOVED,l,d.key):d.checked&&io(z.PARTICIPANTS_FILTER_APPLIED,l,d.key)}),i.forEach(d=>{!n.some(u=>u.key===d.key)&&d.checked&&io(z.PARTICIPANTS_FILTER_REMOVED,l,d.key)}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-users-filters"]],inputs:{isUserAdmin:"isUserAdmin",statusOptions:"statusOptions",allowedBookingOptions:"allowedBookingOptions",isEventDraft:"isEventDraft"},outputs:{filtersChanged:"filtersChanged"},standalone:!0,features:[fe([{provide:Wo,useClass:Qo}]),y],decls:8,vars:13,consts:[[1,"users-filters"],[1,"users-filters__filter"],[3,"inputData"],[1,"users-filters__wrapper"],["hasInputAutocomplete","off","id","name",1,"event-users-filters__fixed",3,"valueChanged","placeholder"],["headerLabel","Status",3,"onSelectFilters","options","showCount","isDisabled","activeFilters"],["headerLabel","Allowed bookings",3,"onSelectFilters","options","showCount","showIcon","activeFilters"]],template:function(n,i){n&1&&(r(0,"div")(1,"div",0)(2,"div",1)(3,"ta-filter",2)(4,"div",3)(5,"ta-filter-name",4),S("valueChanged",function(d){return i.onSearchFilterChange(d.filterSet)}),s(),r(6,"navan-users-filter",5),S("onSelectFilters",function(d){return i.onDropdownFilterChange(i.filtersNames.STATUSES,d)}),s(),r(7,"navan-users-filter",6),S("onSelectFilters",function(d){return i.onDropdownFilterChange(i.filtersNames.ALLOWED_BOOKINGS,d)}),s()()()()()()),n&2&&(o(3),a("inputData",me(11,pm,Se(10,dm))),o(2),a("placeholder",i.searchPlaceholder),o(),a("options",i.statusOptions)("showCount",!0)("isDisabled",i.isEventDraft)("activeFilters",i.activeFilters.statuses),o(),a("options",i.allowedBookingOptions)("showCount",!0)("showIcon",!0)("activeFilters",i.activeFilters.allowedBookings))},dependencies:[qi,Ko,t_],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.users-filters[_ngcontent-%COMP%]{--input-background-color: var(--ta-color-surface-default);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;padding-top:var(--dim-step4);padding-bottom:var(--dim-step5);position:relative}.users-filters__filter[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;flex:1}.users-filters__wrapper[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.event-users-filters[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin-bottom:var(--dim-step6)}.event-users-filters__fixed[_ngcontent-%COMP%]{width:300px}"]})}}return t})();E();E();E();be();E();var i_=[{id:"set-departing-locations0",name:"participants departure",title:$localize`Set departing locations`,description:$localize`Add the departing location for each participant (city or exact address) to view estimated booking costs.`,stepPosition:"right",nextButtonText:$localize`Next`},{id:"set-allowed-booking-types0",name:"participants allowed bookings",title:$localize`Set allowed booking types`,description:$localize`Click on a booking type to allow or remove it for any participant and see updated booking cost estimates. `,nextButtonText:$localize`Next`,stepPosition:"right"},{id:"track-travel-costs0",name:"participants cost estimations",title:$localize`Track travel costs`,description:$localize`Track cost estimates and actual costs as bookings come in to stay within budget.`,nextButtonText:$localize`Done`,stepPosition:"top"}];var o_=(()=>{class t{static{this.TOUR_GUIDE_COMPONENT="group-travel-participants"}static{this.TOUR_GUIDE_COMPONENT_SHOWN="shown"}constructor(e,n,i){this.usersDataService=e,this.tourGuideService=n,this.destroyRef=i,this.tourGuideEnded$=new rt(!1)}startTourGuide(){this.tourGuideEnded$.value||(so(500).pipe(ut(this.destroyRef),ue(()=>this.usersDataService.getComponentState(t.TOUR_GUIDE_COMPONENT)),Q(e=>e!==t.TOUR_GUIDE_COMPONENT_SHOWN),ee(Boolean),ue(()=>(this.tourGuideService.startTourGuideSteps(i_,fi,"group travel participants"),this.tourGuideEnded$)),ee(Boolean),Be(()=>{N(gi.TOUR_GUIDE_CLOSED,{context:"group travel participants"}),this.tourGuideBroadcast?.close()}),ue(()=>this.usersDataService.updateComponent(t.TOUR_GUIDE_COMPONENT,t.TOUR_GUIDE_COMPONENT_SHOWN))).subscribe(),this.tourGuideBroadcast=new BroadcastChannel("tour-guide-channel"),this.tourGuideBroadcast.onmessage=({data:e})=>{e.type==="end-tour-guide"&&e.currentStepId==="track-travel-costs0"&&this.tourGuideEnded$.next(!0)})}terminateTourGuide(){this.tourGuideBroadcast?.close(),this.tourGuideService.terminateTourGuide()}static{this.\u0275fac=function(n){return new(n||t)(xe(zn),xe(ko),xe(Lt))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();E();E();be();E();E();be();E();be();E();var Ga=()=>({placeAt:"top"}),Ba=t=>({kind:"inverse",placement:t});function um(t,_){if(t&1){let e=O();w(0),r(1,"ta-user-tag-simple",11),S("remove",function(){f(e);let i=c();return v(i.removeUser.emit())}),s(),U()}if(t&2){let e=_.ngIf,n=c(),i=V(6),l=V(8),d=V(10);o(),a("uuid",e.id)("fullName",n.fullName)("givenName",n.firstName)("familyName",n.lastName)("picture",e.pictureUrl)("showAvatar",!0)("label",n.label)("hasErrorState",n.hasErrorState)("taPopoverV2",(n.errorLabel===n.UserErrorLabel.DUPLICATE?l:null)||(n.errorLabel===n.UserErrorLabel.DISABLED?i:null)||(n.errorLabel===n.UserErrorLabel.INVALID_EMAIL?d:null))("popoverConfig",me(11,Ba,Se(10,Ga)))}}function gm(t,_){if(t&1){let e=O();w(0),r(1,"ta-user-tag-simple",12),S("remove",function(){f(e);let i=c(2);return v(i.removeUser.emit())}),s(),U()}if(t&2){let e=c(2),n=V(4),i=V(10);o(),a("fullName",e.invitableUser==null?null:e.invitableUser.email)("hasErrorState",e.hasErrorState)("label",e.label)("taPopoverV2",e.errorLabel===e.UserErrorLabel.INVALID_EMAIL?i:n)("popoverConfig",me(6,Ba,Se(5,Ga)))}}function fm(t,_){if(t&1){let e=O();r(0,"ta-user-tag-simple",13),S("remove",function(){f(e);let i=c(2);return v(i.removeUser.emit())}),s()}if(t&2){let e=c(2),n=V(10);a("fullName",e.invitableUser==null?null:e.invitableUser.email)("label",e.label)("hasErrorState",e.hasErrorState)("taPopoverV2",e.errorLabel===e.UserErrorLabel.INVALID_EMAIL?n:null)("popoverConfig",me(6,Ba,Se(5,Ga)))}}function vm(t,_){if(t&1&&p(0,gm,2,8,"ng-container",10)(1,fm,1,8,"ng-template",null,5,k),t&2){let e=V(2),n=c();a("ngIf",!n.isGuestAllowed)("ngIfElse",e)}}function Tm(t,_){t&1&&(r(0,"div",14),g(1,6),s())}function Sm(t,_){t&1&&(r(0,"div",14),g(1,7),s())}function Pm(t,_){t&1&&(r(0,"div",14),g(1,8),s())}function Cm(t,_){if(t&1&&(r(0,"div",14),g(1,9),s()),t&2){let e=c();o(),q(e.email),J(1)}}var Nn=function(t){return t.DUPLICATE="duplicate",t.DISABLED="disabled",t.INVALID_EMAIL="invalid email",t.NOT_FOUND="not found",t}(Nn||{}),a_=(()=>{class t{constructor(){this.isGuestAllowed=!1,this.hasErrorState=!1,this.removeUser=new Y,this.UserErrorLabel=Nn}get fullName(){return this.firstName&&this.lastName?`${this.firstName} ${this.lastName}`:this.invitableUser.user.email}get firstName(){return this.invitableUser?.user?.firstName.trim()||""}get lastName(){return this.invitableUser?.user?.lastName.trim()||""}get email(){return this.invitableUser?.user?.email||this.invitableUser?.email}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-add-participants-pill"]],inputs:{invitableUser:"invitableUser",isGuestAllowed:"isGuestAllowed",label:"label",hasErrorState:"hasErrorState",errorLabel:"errorLabel"},outputs:{removeUser:"removeUser"},standalone:!0,features:[y],decls:11,vars:2,consts:()=>{let e;e=$localize`:␟0fa888f1a39c0376ddf62ace8343ea3f09106e29␟1519240690936326572: This user isn’t enabled in N
1avan and cannot be added to the invite. `;let n;n=$localize`:␟8b32a598350e0b3df390e468c8d68fe1efe97739␟5591500528374171422: This user is no longer enabled in Navan and cannot be added to the invite. `;let i;i=$localize`:␟687746a4cf9e5a791b995a9bd758f6158f06f071␟2187404105491572114: This user has been added more than once. Only one invite will be sent. `;let l;return l=$localize`:␟52e49238bcb997a11d652f99663af6746a9bb2e6␟5384694754993641075: This user has invalid email: ${"\uFFFD0\uFFFD"}:INTERPOLATION:, and cannot be added to the invite. `,[["noUserData",""],["userNotFoundPopover",""],["userDisabledPopover",""],["userDuplicatedPopover",""],["userInvalidEmailPopover",""],["noUserDataTeamOffsite",""],e,n,i,l,[4,"ngIf","ngIfElse"],["popoverTrigger","hover",3,"remove","uuid","fullName","givenName","familyName","picture","showAvatar","label","hasErrorState","taPopoverV2","popoverConfig"],["popoverTrigger","hover",3,"remove","fullName","hasErrorState","label","taPopoverV2","popoverConfig"],["popoverTrigger","hover",3,"remove","fullName","label","hasErrorState","taPopoverV2","popoverConfig"],[1,"user-group-team-events__popover-error"]]},template:function(n,i){if(n&1&&p(0,um,2,13,"ng-container",10)(1,vm,3,2,"ng-template",null,0,k)(3,Tm,2,0,"ng-template",null,1,k)(5,Sm,2,0,"ng-template",null,2,k)(7,Pm,2,0,"ng-template",null,3,k)(9,Cm,2,1,"ng-template",null,4,k),n&2){let l=V(2);a("ngIf",i.invitableUser==null?null:i.invitableUser.user)("ngIfElse",l)}},dependencies:[mt,L,Io,yo,ks],styles:["[_nghost-%COMP%]{margin:0 var(--dim-step3) var(--dim-step3) 0}.user-group-team-events__popover-error[_ngcontent-%COMP%]{padding:var(--dim-step3);font-size:var(--text-size-small)}"]})}}return t})();E();E();E();var za=(()=>{class t{constructor(e){this.modalRef=e,this.formBuilder=M(qe),this.isLoading=!1;let n=this.modalRef.data||{};this.profileForm=this.formBuilder.group({givenName:[n.givenName||"",ct.required],familyName:[n.familyName||"",ct.required]})}onCancel(){this.modalRef.close()}onSave(){if(this.profileForm.valid){let e={givenName:this.profileForm.value.givenName,familyName:this.profileForm.value.familyName};this.modalRef.close(e)}else Object.keys(this.profileForm.controls).forEach(e=>{this.profileForm.get(e)?.markAsTouched()})}static{this.\u0275fac=function(n){return new(n||t)(T(ot))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-complete-profile-modal"]],standalone:!0,features:[y],decls:13,vars:4,consts:()=>{let e;e=$localize`:␟c5c16d236ddf969e29660ca1b3c45484d1247a8e␟1554770637662558312:Complete guest profile`;let n;n=$localize`:␟c83b838d845690bcb897f775f53b5316535306dc␟6028371114637047813:First Name`;let i;i=$localize`:␟62cc0db90ab6692a71bde9ed4785b401464aa0eb␟2440208129541814901:'First name is required'`;let l;l=$localize`:␟166b2cc65003221ff5f3ec05d5baca41e6821396␟4407559560004943843:Last Name`;let d;d=$localize`:␟cc31d2d09748e6e09c37aebdac47837b05ecbc24␟5952328014989292766:'Last name is required'`;let u;u=$localize`:␟cda31dbd724cf5f4fa7a4274d9120651490c8a8c␟8890553633144307762:Back`;let h;return h=$localize`:␟52c9a103b812f258bcddc3d90a6e3f46871d25fe␟3768927257183755959:Save`,[[1,"ta-complete-profile-modal"],["header",e],[1,"ta-complete-profile-modal__content"],[1,"ta-complete-profile-modal__form",3,"formGroup"],["label",n,"error",i,1,"ta-complete-profile-modal__form-item"],["taInput","","formControlName","givenName","type","text","autocomplete","given-name",3,"required"],["label",l,"error",d,1,"ta-complete-profile-modal__form-item"],["taInput","","formControlName","familyName","type","text","autocomplete","family-name",3,"required"],["taModalSecondaryAction",""],["text",u,"kind","outline",3,"clickEvent"],["taModalPrimaryAction",""],["text",h,"kind","default",3,"clickEvent","loading"]]},template:function(n,i){n&1&&(r(0,"ta-modal",0),m(1,"ta-modal-header",1),r(2,"div",2)(3,"form",3)(4,"ta-form-wrap",4),m(5,"input",5),s(),r(6,"ta-form-wrap",6),m(7,"input",7),s()()(),r(8,"ta-modal-footer")(9,"div",8)(10,"ta-button-v2",9),S("clickEvent",function(){return i.onCancel()}),s()(),r(11,"div",10)(12,"ta-button-v2",11),S("clickEvent",function(){return i.onSave()}),s()()()()),n&2&&(o(3),a("formGroup",i.profileForm),o(2),a("required",!0),o(2),a("required",!0),o(5),a("loading",i.isLoading))},dependencies:[Ze,at,Zt,he,Ut,Wt,Me,Xe,Vt,Ge,Qe,kt,Yo,ie,Ee,pn,Kt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.ta-complete-profile-modal__content[_ngcontent-%COMP%]{padding:var(--dim-step4) 0 0 0}.ta-complete-profile-modal__form[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:var(--dim-step6);min-width:500px}.ta-complete-profile-modal__form-item[_ngcontent-%COMP%]{flex:1}"]})}}return t})();be();E();function hm(t,_){t&1&&(r(0,"span"),g(1,0),s())}var s_=(()=>{class t{constructor(e,n){this.jwtService=e,this.groupTravelUserUtilService=n,this.isGuestAllowed=!1,this.allSelectable=!1}get name(){return this.invitableUser.user?.firstName?.trim()&&this.invitableUser.user?.lastName?.trim()?`${this.invitableUser.user.firstName} ${this.invitableUser.user.lastName}`:this.invitableUser.email}
1get isGuest(){return this.isGuestAllowed&&this.groupTravelUserUtilService.isUserGuest(this.invitableUser.type,this.invitableUser.status,!0)}isSelectable(e){return this.jwtService.hasRole(Eo.COMPANY_DELEGATE)||this.allSelectable||this.jwtService.jwt.uuid===e.user.id}get isNewEmployee(){return this.groupTravelUserUtilService.isUserNewEmployee(this.invitableUser.type,this.invitableUser.status)}static{this.\u0275fac=function(n){return new(n||t)(T(bi),T(jn))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-participant-option"]],inputs:{invitableUser:"invitableUser",isGuestAllowed:"isGuestAllowed",allSelectable:"allSelectable"},standalone:!0,features:[y],decls:8,vars:10,consts:()=>{let e;return e=$localize`:␟cb847605dfaa1253dcc9b2c0a714d19a61e27cfb␟8908867903791986811: (guest)`,[e,[1,"team-event-participant-option"],["size","30",3,"url","initials","userName"],[1,"team-event-participant-option__name"],[4,"ngIf"],[1,"team-event-participant-option__email"]]},template:function(n,i){n&1&&(r(0,"div",1),m(1,"ta-avatar-v2",2),r(2,"div",3),C(3),P(4,"hideChildEmail"),s(),p(5,hm,2,0,"span",4),r(6,"span",5),C(7),s()()),n&2&&(te("disabled",!i.isSelectable(i.invitableUser)),o(),a("url",i.invitableUser.user==null?null:i.invitableUser.user.pictureUrl)("initials",i.name)("userName",i.name),o(2),G(A(4,8,i.name)),o(2),a("ngIf",i.isGuest),o(2),G(i.invitableUser.email))},dependencies:[Vo,wo,L,Go],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.team-event-participant-option[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;padding:var(--dim-step2) var(--dim-step2);cursor:pointer}.team-event-participant-option.disabled[_ngcontent-%COMP%]{opacity:.4}.team-event-participant-option.selected[_ngcontent-%COMP%], .team-event-participant-option[_ngcontent-%COMP%]:hover{background-color:var(--ta-color-surface-neutral)}.team-event-participant-option__name[_ngcontent-%COMP%]{margin-left:var(--dim-step2)}.team-event-participant-option__email[_ngcontent-%COMP%]{flex-grow:1;text-align:right;margin-left:var(--dim-step3);color:var(--ta-color-text-subtle)}"]})}}return t})();function Om(t,_){if(t&1){let e=O();r(0,"div",9)(1,"ta-team-event-participant-option",10),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.onSelectUser(i))}),s()()}if(t&2){let e=_.$implicit,n=_.index,i=c(3);te("selected",n===i.activeUserIndex),o(),a("allSelectable",i.allSelectable)("invitableUser",e)("isGuestAllowed",i.isGuestAllowed)}}function Mm(t,_){if(t&1&&(r(0,"div",7),p(1,Om,2,5,"div",8),s()),t&2){let e=c(2);o(),a("ngForOf",e.autocompleteUsersData)}}function Nm(t,_){t&1&&(r(0,"div",11),g(1,2),s())}function Rm(t,_){if(t&1&&(r(0,"div",12),C(1),s()),t&2){let e=c(2);o(),B(" ",e.error," ")}}function bm(t,_){if(t&1&&p(0,Mm,2,1,"div",4)(1,Nm,2,0,"div",5)(2,Rm,2,1,"div",6),t&2){let e=c();a("ngIf",!e.error&&!!(e.autocompleteUsersData!=null&&e.autocompleteUsersData.length)),o(),a("ngIf",!e.error&&e.query.length>0&&e.autocompleteUsersData.length===0),o(),a("ngIf",e.error)}}var Ha=(()=>{class t extends Vs{constructor(e,n,i,l,d){super(e,n,i,l),this.groupTravelApiService=d,this.isGuestAllowed=!1,this.disallowGuestsWithEmptyNames=!1,this.searchBulkEmails=new Y,this.selectSingleUser=new Y,this.inputPopoverConfig={withArrow:!1,width:"container",minWidth:400,customClasses:"user-search-team-events-popover",placement:{placeAt:"bottom"}},this.minCharsToSearch=2,this.modalService=M(et)}ngOnInit(){this.kbdConfig={activeIndex:0,itemSelector:".user-search-team-events-popover__list .user-search-team-events-popover__item",popoverRef:this.popoverRef},this.updateControlOnInputChange()}updateControlOnInputChange(){this.userCtrl.valueChanges.pipe(yn(300),ee(e=>e?.trim().length>=this.minCharsToSearch),Be(e=>this.processUserControlValueChange(e))).subscribe()}searchInvitableUsers(){return this.groupTravelApiService.searchInvitableUsers(this.travelEventId,this.query)}kbdSelectItem(e){let n=this.autocompleteUsersData[e.index];this.onSelectUser(n)}onSelectUser(e){this.openPopover(!1),this.showUser?this.fullName=`${e.user.firstName} ${e.user.lastName}`:(this.fullName="",this.mainInput.nativeElement.value="",this.query="");let n=e.user?.firstName&&e.user?.firstName.trim().length>0,i=e.user?.lastName&&e.user?.lastName.trim().length>0;this.disallowGuestsWithEmptyNames&&(!n||!i)?this.openCompleteProfileModal(e):this.selectSingleUser.emit(e)}openCompleteProfileModal(e){this.modalService.open(za,{data:{givenName:"",familyName:""},disableClose:!0,closeCurrent:!1}).afterClosed$.subscribe(({type:i,result:l})=>
1{if(i==="close"&&l){let d=l;e=Re(le({},e),{user:Re(le({},e.user),{firstName:d.givenName,lastName:d.familyName,email:e.email,enabled:!0})}),this.selectSingleUser.emit(e)}})}processUserControlValueChange(e){if(this.disallowGuestsWithEmptyNames)this.getAutocompleteResults(e);else{let n=this.usersDataService.parseEmailInput(e);n.length>1?this.searchingBulkEmails(n):this.getAutocompleteResults(e)}}searchingBulkEmails(e){this.query="",this.error="",this.autocompleteUsersData=null,this.userCtrl.reset(""),this.searchBulkEmails.emit(e)}getAutocompleteResults(e){this.getInvitableUsersSearchSuggestions(e).pipe(Ye(n=>(this.error=n.message||n,Te([]))),Q(n=>n.filter(i=>i.status!==Fe.INVALID_FORMAT&&!this.excludedEmails.has(i.email)))).subscribe(n=>{this.autocompleteUsersData=n,this.openPopover(this.query.length>0)})}getInvitableUsersSearchSuggestions(e){return this.query=e.trim().toLowerCase(),this.error=null,this.query.length>0?this.searchInvitableUsers():Te([])}static{this.\u0275fac=function(n){return new(n||t)(T(it),T(bi),T(zn),T(vt),T(Ae))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-user-search-team-events-v2"]],inputs:{isGuestAllowed:"isGuestAllowed",travelEventId:"travelEventId",excludedEmails:"excludedEmails",disallowGuestsWithEmptyNames:"disallowGuestsWithEmptyNames"},outputs:{searchBulkEmails:"searchBulkEmails",selectSingleUser:"selectSingleUser"},standalone:!0,features:[fe([{provide:cs,useExisting:t}]),sr,y],decls:4,vars:8,consts:()=>{let e;return e=$localize`:␟e2dbf0426cbb0b573faf49dffeb7d5bdf16eda5d␟4807349555079727801: No results found `,[["mainInput",""],["userList",""],e,["type","text",1,"user-search-team-events__input",3,"keydown","kbdSelect","focus","blur","formControl","value","placeholder","taPopover","popoverTrigger","popoverContainer","popoverConfig","taKbdListNav"],["class","user-search-team-events-popover__list","data-testid","participant dropdown",4,"ngIf"],["class","user-search-team-events-popover__empty","data-testid","emptyParticipantDropdown",4,"ngIf"],["class","user-search-team-events-popover__error",4,"ngIf"],["data-testid","participant dropdown",1,"user-search-team-events-popover__list"],["class","user-search-team-events-popover__item",3,"selected",4,"ngFor","ngForOf"],[1,"user-search-team-events-popover__item"],[3,"click","allSelectable","invitableUser","isGuestAllowed"],["data-testid","emptyParticipantDropdown",1,"user-search-team-events-popover__empty"],[1,"user-search-team-events-popover__error"]]},template:function(n,i){if(n&1){let l=O();r(0,"input",3,0),S("keydown",function(u){return f(l),v(i.onKey(u))})("kbdSelect",function(u){return f(l),v(i.kbdSelectItem(u))})("focus",function(){return f(l),v(i.onFocus())})("blur",function(){return f(l),v(i.onBlur())}),s(),p(2,bm,3,3,"ng-template",null,1,k)}if(n&2){let l=V(3);a("formControl",i.userCtrl)("value",i.fullName)("placeholder",i.placeholder)("taPopover",l)("popoverTrigger",null)("popoverContainer",i.containerSelector)("popoverConfig",i.inputPopoverConfig)("taKbdListNav",i.kbdConfig)}},dependencies:[je,Wt,Me,he,wt,re,mo,L,_e,s_],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]{margin:0 var(--dim-step3) var(--dim-step3) 0}.user-search-team-events__input[_ngcontent-%COMP%]{width:100%;height:30px;font-size:var(--text-size-medium);outline:none;border:none;background-color:transparent}  .user-search-team-events-popover{max-height:320px}  .user-search-team-events-popover .popover-content{max-height:320px;overflow:auto}  .user-search-team-events-popover__list,   .user-search-team-events-popover__empty,   .user-search-team-events-popover__error{font-size:var(--text-size-medium);padding:var(--dim-step3)}  .user-search-team-events-popover__error{color:var(--error-color)}"]})}}return t})();var ym=(t,_)=>({invitableUser:t,i:_});function Im(t,_){if(t&1){let e=O();r(0,"span",23),S("click",function(){f(e);let i=c();
1return v(i.removeAllInvalidEmails())}),C(1," \xA0|\xA0 "),m(2,"ta-icon-v2",24),r(3,"span",25),g(4,5),s()()}}function xm(t,_){t&1&&(r(0,"div",26),m(1,"ta-loading",27),s()),t&2&&(o(),a("textPosition","RIGHT")("size","loading-size-small")("text",""))}function Fm(t,_){if(t&1&&m(0,"ta-icon-v2",29),t&2){let e=c(2),n=V(20);a("taPopoverV2",n)("popoverConfig",e.popoverConfig)}}function Lm(t,_){if(t&1&&(r(0,"span"),g(1,6),s(),p(2,Fm,1,2,"ta-icon-v2",28)),t&2){let e=c();o(),q(e.users.length+e.totalEventParticipants-e.removeFromParticipantsCount)(e.maxParticipants),J(1),o(),a("ngIf",!e.isTeamOffsite)}}function Um(t,_){if(t&1&&(r(0,"div")(1,"span",30),C(2),s()()),t&2){let e=c();o(2),G(e.filterTitle)}}function wm(t,_){t&1&&zt(0)}function Vm(t,_){if(t&1&&(w(0),p(1,wm,1,0,"ng-container",31),U()),t&2){let e=_.$implicit,n=_.index;c();let i=V(14);o(),a("ngTemplateOutlet",i)("ngTemplateOutletContext",tt(2,ym,e,n))}}function km(t,_){if(t&1){let e=O();r(0,"ta-add-participants-pill",32),S("removeUser",function(){let i=f(e),l=i.invitableUser,d=i.i,u=c();return v(u.onRemoveUser(l,d))}),s()}if(t&2){let e=_.invitableUser,n=c();a("invitableUser",e)("isGuestAllowed",n.isGuestAllowed)("label",n.getPillLabel(e))("hasErrorState",n.isPillInErrorState(e))("errorLabel",n.getErrorLabel(e))}}function Dm(t,_){if(t&1){let e=O();r(0,"ta-user-search-team-events-v2",33),S("selectSingleUser",function(i){f(e);let l=c();return v((i==null?null:i.type)!=="select"&&l.onAddUser(i))})("keyPress",function(i){f(e);let l=c();return v(l.keyPress(i))})("changeFocus",function(i){f(e);let l=c();return v(l.setFocus(i))})("searchBulkEmails",function(i){f(e);let l=c();return v(l.searchBulkEmails(i))}),s()}if(t&2){let e=c();a("travelEventId",e.travelEventId)("isGuestAllowed",e.isGuestAllowed)("placeholder",(e.users==null?null:e.users.length)===0?e.placeholder:"")("allSelectable",!0)("excludedEmails",e.uniqueEmails)("disallowGuestsWithEmptyNames",e.disallowGuestsWithEmptyNames)}}function $m(t,_){if(t&1&&(r(0,"div",34)(1,"span"),g(2,7),s()()),t&2){let e=c();o(2),q(e.maxNumberOfParticipantsMsg),J(2)}}function Gm(t,_){if(t&1&&(r(0,"span"),g(1,8),s()),t&2){let e=_.ngIf;o(),q(e),J(1)}}function Bm(t,_){if(t&1&&(r(0,"div",34),p(1,Gm,2,1,"span",18),P(2,"async"),s()),t&2){let e,n=c();o(),a("ngIf",(e=A(2,1,n.sessionQuery.selectUserInfo$))==null?null:e.companyName)}}function zm(t,_){t&1&&(r(0,"div")(1,"div",35)(2,"span"),g(3,9),s()()())}function Hm(t,_){if(t&1){let e=O();r(0,"div",37),de(1,10),r(2,"a",38),S("click",function(){f(e);let i=c(2);return v(i.routeToGuestInvite())}),s(),pe(),s()}if(t&2){let e=c(2);o(2),q(e.maxParticipants),J(1)}}function Xm(t,_){if(t&1&&(r(0,"div",37),g(1,11),s()),t&2){let e=c(2);o(),q(e.maxParticipants),J(1)}}function jm(t,_){if(t&1&&p(0,Hm,3,1,"div",36)(1,Xm,2,1,"ng-template",null,3,k),t&2){let e=V(2),n=c();a("ngIf",n.hasGuestInvitePermissions)("ngIfElse",e)}}var Cn=function(t){return t.Required="required",t.ExceedMaxParticipants="exceedMaxParticipants",t.NotMatchedUsers="notMatchedUsers",t.DisabledUsers="disabledUsers",t.InvalidEmails="invalidEmail
1s",t}(Cn||{}),l_=(()=>{class t{get maxNumberOfParticipantsMsg(){let e=this.formControl.getError("exceedMaxParticipants"),n=$localize`The maximum number of participants is ${this.maxParticipants}.`,i=e===1?$localize`Please remove 1 participant to continue.`:$localize`Please remove ${e} participants to continue.`;return`${n} ${i}`}get users(){return this._users}set users(e){this.updateChanges(e||[])}onHostClick(){this.users.length+this.totalEventParticipants<this.maxParticipants&&(this.userSearch.mainInput.nativeElement.focus(),this.hasFocus=!0)}constructor(e,n,i,l,d){this.injector=e,this.sessionQuery=n,this.groupTravelUserUtilService=i,this.router=l,this.iconRegistryService=d,this.isTeamOffsite=!1,this.isGuestAllowed=!1,this.disabled=!1,this.required=!1,this.submitted=!1,this.filterTitle="",this.showTitle=!0,this.canCreate=!1,this.maxParticipants=0,this.hasGuestInvitePermissions=!1,this.errorCopies={},this.totalEventParticipants=0,this.isCounterProcessing=!1,this.isUploadFlowEnabled=!1,this.disallowGuestsWithEmptyNames=!1,this.addUser=new Y,this.removeUser=new Y,this.usersChange=new Y,this.fetchUsers=new Y,this.enableUploadFlow=new Y,this.isExceedMaxParticipantsError=!1,this.isNotMatchedUsersError=!1,this.isDisabledUserError=!1,this.isInvalidEmailError=!1,this.isControlInvalid=!1,this.popoverConfig={placement:{placeAt:"top"}},this.hasFocus=!0,this.removeFromParticipantsCount=0,this.uniqueEmails=new Set([]),this.disabledParticipantLabel=$localize`disabled`,this.guestLabel=$localize`guest`,this.duplicateParticipantsLabel=this.groupTravelUserUtilService.getInvitableUserLabel(Fe.DUPLICATE),this.invalidLabel=this.groupTravelUserUtilService.getInvitableUserLabel(Fe.INVALID_FORMAT),this._users=[],this.destroy$=new dt,this.onChange=u=>{},this.onTouched=()=>{},this.iconRegistryService.registerIcons(Ar,mn)}ngOnChanges(e){let{submitted:n,bulkFetchedUsers:i}=e;n&&this.formControl&&(this.formControl.updateValueAndValidity(),this.checkControlErrors(),this.removeFromParticipantsCount=0),i&&this.isCounterProcessing&&(this.isCounterProcessing=!1,this.processBulkFetchResponse(this.bulkFetchedUsers),this.formControl.updateValueAndValidity())}ngOnInit(){this.setUpFormControl(),this.uploadedParticipants$?.subscribe(e=>{this.searchBulkEmails(e.map(n=>n.email))})}ngAfterViewInit(){this.userSearch?.mainInput?.nativeElement.focus()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setFocus(e){this.hasFocus=e}keyPress(e){if(this.users.length>0&&e.key==="Backspace"&&e.target.value===""){let n=this.users.length-1,i=this.users[n];this.onRemoveUser(i,n)}}searchBulkEmails(e){let n=[...new Set(e)];if(n.every(l=>this.users.find(d=>d.email===l)))return;let i=this.getEmailsOfNotInvitedUsers([...n]);this.users=this.users.concat(i),this.uniqueEmails=new Set([...this.uniqueEmails,...e]),this.fetchUsersInBulk(i.map(l=>l.email)),N(z.PARTICIPANTS_ADD_BULK,{[x.VIEW]:this.isUploadFlowEnabled?H.PARTICIPANTS_BULK_UPLOAD:H.PARTICIPANTS_MANUAL_ADD})}onAddUser(e){this.uniqueEmails.has(e.email)||(this.uniqueEmails.add(e.email),this.users=this.users.concat(e),this.addUser.next(e),this.usersChange.next(this.users),this.userSearch.mainInput.nativeElement.focus(),this.updateErrorMessages(structuredClone(e)),N(X.USER_SELECTED),N(z.PARTICIPANTS_SUGGESTION_SELECTED,{[x.VIEW]:this.isUploadFlowEnabled?H.PARTICIPANTS_BULK_UPLOAD:H.PARTICIPANTS_MANUAL_ADD}))}onRemoveUser(e,n){let{email:i,user:l,type:d,status:u}=e;this.hasFocus=!0,this.uniqueEmails.has(i)&&(this.removeFromParticipantsCount>0&&(this.errorCopies[i]===this.duplicateParticipantsLabel||this.errorCopies[i]===this.invalidLabel||u===Fe.NOT_REGISTERED&&!this.isGuestAllowed||l&&!l.enabled&&(this.groupTravelUserUtilService.isUserEmployee(d,u)||!d))&&this.removeFromParticipantsCount--,this.uniqueEmails.delete(i),this.users=[...this.users.slice(0,n),...this.users.slice(n+1)],this.removeUser.next(e),this.usersChange.next(this.users))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}validate(e){let n=this.createRequiredValidator(this.required)(e);if(n)return n;let i=this.createMaxParticipantsValidator(this.maxParticipants,this.totalEventParticipants,this.removeFromParticipantsCount)(e);if(i)return i;let l=this.createDisabledUsersValidator()(e);if(l)return l;let d=this.createInvalidUsersValidator()(e);if(d)return d;if(!this.isGuestAllowed){let u=this.createNotMatchedUsersValidator()(e);if(u)return u}return null}writeValue(e){this.users=e}hasErrorState(e){let n=this.errorCopies[e.email];if(n){if([this.duplicateParticipantsLabel,""].includes(n))return!1;if(this.isExternalUser(e))return!1}else return!1;return!0}isExternalUser(e){return e.user?.enabled&&this.isGuestAllowed&&e.status===Fe.NOT_REGISTERED}getLabel(e){return this.errorCopies[e.email]?this.errorCopies[e.email]:this.groupTravelUserUtilService.isUserGuest(e?.type,e?.status,this.isGuestAllowed)?this.guestLabel:""}routeToGuestInvite(){N(X.CLICK_GUEST_INVITE_REDIRECT),this.router.navigateByUrl("/app/admin2/guest-travel/l
1ist?showNewInvite=true")}sortByInvalidEmails(){this.users.sort(e=>e.status===Fe.NOT_REGISTERED?-1:1),this.users.sort(e=>e.status===Fe.INVALID_FORMAT?-1:1)}removeAllInvalidEmails(){let e=this.isGuestAllowed?[Fe.INVALID_FORMAT]:[Fe.INVALID_FORMAT,Fe.NOT_REGISTERED],n=0;this.users=this.users.filter(i=>{let l=!e.includes(i.status);return l||n++,l}),this.removeFromParticipantsCount-=n,this.users.length===0&&this.enableUploadFlow.emit(!0)}getErrorLabel(e){return e.user?this.getErrorLabelForViewableUser(e.user):this.isGuestAllowed?this.errorCopies[e.email]===this.invalidLabel?Nn.INVALID_EMAIL:Nn.NOT_FOUND:this.errorCopies[e.email]===this.invalidLabel?Nn.INVALID_EMAIL:null}getErrorLabelForViewableUser(e){return this.errorCopies[e.email]===this.duplicateParticipantsLabel?Nn.DUPLICATE:this.errorCopies[e.email]===this.disabledParticipantLabel?Nn.DISABLED:this.errorCopies[e.email]===this.invalidLabel?Nn.INVALID_EMAIL:null}getPillLabel(e){return e.user||this.isGuestAllowed?this.getLabel(e):this.errorCopies[e.email]}isPillInErrorState(e){return e.user||this.isGuestAllowed?this.hasErrorState(e):!!this.errorCopies[e.email]}fetchUsersInBulk(e){this.isCounterProcessing=!0,this.fetchUsers.emit([...new Set(e)])}updateChanges(e=[]){this._users=e,this.uniqueEmails=this.getExcludedUserEmail(this.users),this.onChange(e)}getEmailsOfNotInvitedUsers(e){return e.filter(n=>!this.users.find(i=>i.email===n)).map(n=>({email:n}))}getExcludedUserEmail(e=[]){let n=[];for(let i of e)i.email&&n.push(i.email);return new Set([...this.uniqueEmails,...n])}processBulkFetchResponse(e){for(let n of e){let i=this.users.findIndex(l=>l.email===n.email);i!==-1&&(this.users[i]=structuredClone(n),this.updateErrorMessages(this.users[i]))}}setUpFormControl(){let e=this.injector.get(fr);switch(e.constructor){case vr:let{control:n}=e;this.formControl=n;break;case Qe:this.formControl=this.injector.get(Ge).getControl(e);break;default:this.formControl=this.formControl||e.form;break}this.formControl.valueChanges.pipe(De(this.destroy$),Be(n=>{n?.length===0&&this.formControl.dirty&&this.formControl.markAsPristine()})).subscribe(()=>this.checkControlErrors())}checkControlErrors(){this.isExceedMaxParticipantsError=!!this.formControl.getError(Cn.ExceedMaxParticipants),this.isNotMatchedUsersError=!!this.formControl.getError(Cn.NotMatchedUsers),this.isDisabledUserError=!!(this.submitted&&this.formControl.getError(Cn.DisabledUsers)),this.isInvalidEmailError=!!this.formControl.getError(Cn.InvalidEmails),this.isControlInvalid=this.isExceedMaxParticipantsError||this.isNotMatchedUsersError||this.isDisabledUserError||this.isInvalidEmailError}createRequiredValidator(e){return n=>{let i=n.value,l=e&&n.dirty&&!i.length;return l?{[Cn.Required]:l}:null}}createMaxParticipantsValidator(e,n,i){return l=>{let d=l.value,u=n+(d.length-i)-e;return u>0?{[Cn.ExceedMaxParticipants]:u}:null}}createNotMatchedUsersValidator(){return e=>{let n=e.value,i=0;for(let l of n)l.user||i++;return i>0?{[Cn.NotMatchedUsers]:i}:null}}createInvalidUsersValidator(){return e=>{let n=e.value,i=0;for(let l of n)l.status===Fe.INVALID_FORMAT&&i++;return i>0?{[Cn.InvalidEmails]:i}:null}}createDisabledUsersValidator(){return e=>{let n=e.value,i=0;for(let l of n)l.user&&(l.user.enabled||i++);return i>0?{[Cn.DisabledUsers]:i}:null}}updateErrorMessages(e){let{user:n,email:i,status:l,type:d}=e;if(l===Fe.INVALID_FORMAT){this.errorCopies[i]=this.invalidLabel,this.removeFromParticipantsCount++;return}if(this.isGuestAllowed)[Fe.NOT_REGISTERED,Fe.REGISTERED].includes(l)&&(this.errorCopies[i]="");else{if(this.groupTravelUserUtilService.isUserGuest(d,l)||l===Fe.NOT_REGISTERED){e.user=null,e.status=Fe.NOT_REGISTERED,this.errorCopies[i]=this.groupTravelUserUtilService.getInvitableUserLabel(Fe.NOT_REGISTERED),this.removeFromParticipantsCount++;return}l===Fe.REGISTERED&&(this.errorCopies[i]="")}if(n&&!n.enabled){this.errorCopies[i]=this.disabledParticipantLabel,this.removeFromParticipantsCount++;return}if(l===Fe.DUPLICATE){this.errorCopies[i]=this.groupTravelUserUtilService.getInvitableUserLabel(l),this.removeFromParticipantsCount++;return}}sortUsersByInvalidFormat(e){return e.sort((n,i)=>n.status===Fe.INVALID_FORMAT&&i.status!==Fe.INVALID_FORMAT?-1:n.status!==Fe.INVALID_FORMAT&&i.status===Fe.INVALID_FORMAT?1:0)}static{this.\u0275fac=function(n){return new(n||t)(T(ar),T(vt),T(jn),T(Je),T(ne))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-add-participants-input"]],viewQuery:function(n,i){if
1(n&1&&st(Ha,5),n&2){let l;lt(l=_t())&&(i.userSearch=l.first)}},hostBindings:function(n,i){n&1&&S("click",function(){return i.onHostClick()})},inputs:{isTeamOffsite:"isTeamOffsite",isGuestAllowed:"isGuestAllowed",disabled:"disabled",required:"required",submitted:"submitted",travelEventId:"travelEventId",filterTitle:"filterTitle",showTitle:"showTitle",canCreate:"canCreate",maxParticipants:"maxParticipants",placeholder:"placeholder",hasGuestInvitePermissions:"hasGuestInvitePermissions",errorCopies:"errorCopies",bulkFetchedUsers:"bulkFetchedUsers",totalEventParticipants:"totalEventParticipants",isCounterProcessing:"isCounterProcessing",isUploadFlowEnabled:"isUploadFlowEnabled",uploadedParticipants$:"uploadedParticipants$",disallowGuestsWithEmptyNames:"disallowGuestsWithEmptyNames"},outputs:{addUser:"addUser",removeUser:"removeUser",usersChange:"usersChange",fetchUsers:"fetchUsers",enableUploadFlow:"enableUploadFlow"},standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0},{provide:Et,useExisting:t,multi:!0}]),At,y],decls:21,vars:22,consts:()=>{let e;e=$localize`:␟303cf04ca5c12a60d676b6a00ceaf852799c1af4␟3481736869685494304:Participants`;let n;n=$localize`:␟cb259ea728e95c82beb98cfd1265192dd57640cf␟8791496649260691909:Remove all invalid emails`;let i;i=$localize`:add event participants|explains how many participatnts added out of
2          max number␟52d2a9eca65bba48041825997345ae020176c51f␟922093593774853825: ${"\uFFFD0\uFFFD"}:INTERPOLATION: / ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: added `;let l;l=$localize`:␟63726aedc215ab732e1565efd2e39a99127aea49␟7411743211118355904:${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let d;d=$localize`:␟f475005ce54773e060a1d38e0abe0881d5d5e6b0␟2608787115272117162: Some participants have not been enabled in ${"\uFFFD0\uFFFD"}:INTERPOLATION:. Please remove the participants to continue. `;let u;u=$localize`:␟442d4e3cebeede8194ced7e1b6aa8639dc0371f0␟200408830206965722: Participants must be on your company's user list and enabled in Navan. `;let h;h=$localize`:␟01b58737d9d9141f86cffd6424d1104be8e613ab␟9100919262992804161: For more than ${"\uFFFD0\uFFFD"}:INTERPOLATION: participants, create a ${"\uFFFD#2\uFFFD"}:START_LINK:guest invite${"\uFFFD/#2\uFFFD"}:CLOSE_LINK: instead. `;let I;return I=$localize`:␟35d1fc4b64488cc53f13ffc94ac511cc87ec009b␟2282885457055402423: For more than ${"\uFFFD0\uFFFD"}:INTERPOLATION: participants, create a guest invite instead. Ask your admin for access. `,[["usersCount",""],["addParticipantsBill",""],["maxPeopleInfo",""],["noPermissions",""],e,n,i,l,d,u,h,I,[1,"user-group-team-events__label"],[1,"user-group-team-events__label-name"],["data-testid","add-participants-input__remove-all-btn","class","user-group-team-events__remove-invalid-wrapper",3,"click",4,"ngIf"],[1,"user-group-team-events__label-max-participants"],["class","user-group-team-events__label-spinner-container",4,"ngIf","ngIfElse"],["tabindex","-1",1,"user-group-team-events__input",3,"blur","taDisabled"],[4,"ngIf"],[1,"user-group-team-events__input-wrap"],[4,"ngFor","ngForOf"],["containerSelector",".user-group-team-events__input","data-testid","participant input field",3,"travelEventId","isGuestAllowed","placeholder","allSelectable","excludedEmails","disallowGuestsWithEmptyNames","selectSingleUser","keyPress","changeFocus","searchBulkEmails",4,"ngIf"],["class","user-group-team-events__input-error",4,"ngIf"],["data-testid","add-participants-input__remove-all-btn",1,"user-group-team-events__remove-invalid-wrapper",3,"click"],["icon","trash-filled","size","small",1,"user-group-team-events__icon-trash"],[1,"user-group-team-events__remove-all-invalid"],[1,"user-group-team-events__label-spinner-container"],[3,"textPosition","size","text"],["icon","info-small","theme","outline","popoverTrigger","hover",3,"taPopoverV2","popoverConfig",4,"ngIf"],["icon","info-small","theme","outline","popoverTrigger","hover",3,"taPopoverV2","popoverConfig"],[1,"user-group-team-events__input-title"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"removeUser","invitableUser","isGuestAllowed","label","hasErrorState","errorLabel"],["containerSelector",".user-group-team-events__input","data-testid","participant input field",3,"selectSingleUser","keyPress","changeFocus","searchBulkEmails","travelEventId","isGuestAllowed","placeholder","allSelectable","excludedEmails","disallowGuestsWithEmptyNames"],[1,"user-group-team-events__input-error"],[1,"user-group-team-events__input-default-text"],["class","user-group-team-events__popover",4,"ngIf","ngIfElse"],[1,"user-group-team-events__popover"],[3,"click"]]}
2,template:function(n,i){if(n&1){let l=O();r(0,"div",12)(1,"div")(2,"span",13),g(3,4),s(),p(4,Im,5,0,"span",14),s(),r(5,"div",15),p(6,xm,2,3,"div",16)(7,Lm,3,3,"ng-template",null,0,k),s()(),r(9,"div",17),S("blur",function(){return f(l),v(i.setFocus(!1))}),p(10,Um,3,1,"div",18),r(11,"div",19),p(12,Vm,2,5,"ng-container",20)(13,km,1,5,"ng-template",null,1,k)(15,Dm,1,6,"ta-user-search-team-events-v2",21),s(),p(16,$m,3,1,"div",22)(17,Bm,3,3,"div",22)(18,zm,4,0,"div",18),s(),p(19,jm,3,2,"ng-template",null,2,k)}if(n&2){let l=V(8);o(4),a("ngIf",i.isInvalidEmailError||i.isNotMatchedUsersError),o(2),a("ngIf",i.isCounterProcessing)("ngIfElse",l),o(3),Dt("position","initial"),te("user-group-team-events__input--focus",i.hasFocus&&!i.isControlInvalid)("user-group-team-events__input--invalid",i.isControlInvalid)("user-group-team-events__input--required",i.required),a("taDisabled",i.disabled),o(),a("ngIf",i.showTitle),o(),te("user-group-team-events__input-wrap--create",i.canCreate)("user-group-team-events__input-wrap--no-title",!i.showTitle),o(),a("ngForOf",i.sortUsersByInvalidFormat(i.users)),o(3),a("ngIf",i.users.length+i.totalEventParticipants-i.removeFromParticipantsCount<i.maxParticipants),o(),a("ngIf",i.isExceedMaxParticipantsError&&i.formControl.getError("exceedMaxParticipants")),o(),a("ngIf",i.isNotMatchedUsersError||i.isDisabledUserError||i.isInvalidEmailError),o(),a("ngIf",!i.isControlInvalid&&!i.isGuestAllowed)}},dependencies:[L,K,Z,hi,Ci,Io,yo,Fn,_e,pi,a_,Ha,we],styles:['@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{position:relative}.user-group-team-events__remove-all-invalid[_ngcontent-%COMP%]{color:var(--ta-color-text-danger, #D6293A);font-size:var(--text-size-small);font-weight:var(--text-weight-medium);text-align:start}.user-group-team-events__icon-trash[_ngcontent-%COMP%]{color:var(--ta-color-text-danger, #D6293A);margin-right:var(--dim-step2);--icon-dimension: 16px;position:relative;top:2px}.user-group-team-events__remove-invalid-wrapper[_ngcontent-%COMP%]{cursor:pointer}.user-group-team-events__label[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:12px}
2.user-group-team-events__label-name[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);color:var(--ta-color-text-default)}.user-group-team-events__label-max-participants[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;color:var(--ta-color-text-subtle)}.user-group-team-events__label-spinner-container[_ngcontent-%COMP%]{margin-right:var(--dim-step3)}.user-group-team-events__input[_ngcontent-%COMP%]{padding:var(--dim-step3) var(--dim-step4);margin-bottom:var(--dim-step5);min-height:240px;max-height:260px;outline:none;border:1px solid var(--ta-color-border-default);border-radius:10px;transition:border-color .4s;overflow-y:auto}.user-group-team-events__input[_ngcontent-%COMP%]:hover:not(.user-group-team-events__input--invalid):not(.user-group-team-events__input--focus){border-color:var(--ta-color-border-default)}.user-group-team-events__input--invalid[_ngcontent-%COMP%]{border-color:var(--ta-color-border-warning)}.user-group-team-events__input--focus[_ngcontent-%COMP%]{border-color:var(--ta-color-border-primary)}.user-group-team-events__input-title[_ngcontent-%COMP%]{font-size:var(--text-size-xs);color:var(--ta-color-text-subtle);padding-bottom:var(--dim-step1);position:relative}.user-group-team-events__input--required[_ngcontent-%COMP%]   .user-group-team-events__title[_ngcontent-%COMP%]:after{content:"";position:absolute;right:-7px;top:7px;width:4px;height:4px;background-color:var(--ta-color-action-warning);border-radius:50%}.user-group-team-events__input-more[_ngcontent-%COMP%]{cursor:pointer;color:var(--ta-color-text-primary);margin-right:var(--dim-step2)}.user-group-team-events__input-wrap[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}.user-group-team-events__input-wrap--create[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.user-group-team-events__input-wrap--no-title[_ngcontent-%COMP%]{margin-top:10px}.user-group-team-events__input-create[_ngcontent-%COMP%]{margin-left:var(--dim-step2)}.user-group-team-events__input[_ngcontent-%COMP%]   ta-user-tag-simple[_ngcontent-%COMP%]{margin-right:var(--dim-step2);padding:4px 0}.user-group-team-events__input-error[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 8px);color:var(--ta-color-text-warning);font-size:var(--text-size-xs)}.user-group-team-events__input-default-text[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 8px);color:var(--ta-color-text-subtle);font-size:var(--text-size-xs)}.user-group-team-events__popover[_ngcontent-%COMP%]{padding:var(--dim-step4);max-width:410px}']})}}return t})();E();be();function Ym(t,_){if(t&1){let e=O();r(0,"ta-file-upload",7),S("fileEvent",function(i){f(e);let l=c();return v(l.fileChanged(i))}),s()}if(t&2){let e=c();a("multiple",!1)("csvOnly",!0)("uploadError",e.uploadError)("isRefactorFilesModal",!0)}}function Wm(t,_){t&1&&m(0,"ta-spinner")}var Km=new _o("Global window object",{factory:()=>window}),__=(()=>{class t{constructor(e,n){this.groupTravelCsvService=e,this.window=n,this.participantsParsed=new Y,this.processing=!1}downloadSample(){this.window.open("./assets/csv-samples/participant_list_sample.csv","_blank","noopener,noreferrer"),N(z.PARTICIPANTS_BULK_TEMPLATE_DOWNLOADED,{[x.VIEW]:H.PARTICIPANTS_BULK_UPLOAD})}fileChanged(e){if(N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_BULK_ADD}),this.uploadError=null,e.length===0){this.uploadError=$localize`No file selected`;return}this.processing=!0,this.groupTravelCsvService.getParticipants(e[0]).pipe(He(()=>this.processing=!1),Ye(n=>this.handleParsingError(n))).subscribe(n=>{this.handleParsingSuccess(n)})}handleParsingSuccess(e){this.trackParsingSuccess(e),this.participantsParsed.emit(e.participants)}trackParsingSuccess(e){N(X.PARTICIPANTS_FILE_UPLOAD_COMPLETED,{success:e.participants?.length,errors:e.errors?.length});try{Nt("Enterprise","UploadParticipants","",new Error((e.errors||[]).map(n=>JSON.stringify(n)).join(", ")))}catch(n){Nt("Enterprise","UploadParticipants","",n)}}handleParsingError(e){return this.uploadError=$localize`Error parsing CSV file`,Nt("Enterprise","UploadParticipants","",e),N(X.PARTICIPANTS_FILE_UPLOAD_FAILED,{error:e.message}),[]}static{this.\u0275fac=function(n){return new(n||t)(T(Gs),T(Km))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-upload-participants-input"]],outputs:{participantsParsed:"participantsParsed"},standalone:!0,features:[y],decls:8,vars:2,consts:()=>{let e;e=$localize`:␟a3586468dfd4ef18e1755649f3f007ab2f0a04c7␟8189518563191407570:Download participant template`;let n;n=$localize`:␟1d2479607fad61e392190cf36059fd0ef00a039d␟6835123930022603344:Drag and drop your file or`;let i;i=$localize`:␟cf33702960fd864236c3f46c16dda039b3ad7d3e␟8988675705607044733:Select a .csv file`;let l;return l=$localize`:␟2795d5e4d1eddeb43fa2ba6401725fcb02b0b850␟537298257225550688:Select a file`,[l,[1,"upload-participants__label"],[1,"upload-participants__label-name"],["kind","ghost","text",e,"data-testid","upload-participants-input__download-sample",1,"upload-participants__example",3,"clickEvent"],[1,"upload-participants__upload"],["dndText",n,"dndSubText","","data-testid","upload-participants-input","buttonText",i,"acceptFileExts",".csv","data-testid","upload-participants-input__file-upload",3,"multiple","csvOnly","uploadError","isRefactorFilesModal","fileEvent",4,"ngIf"],[4,"ngIf"],["dndText",n,"dndSubText","","data-testid","upload-participants-input","buttonText",i,"acceptFileExts",".csv","data-testid","upload-participants-input__file-upload",3,"fileEvent","multiple","csvOnly","uploadError","isRefactorFilesModal"]]},template:function(n,i){n&1&&(r(0,"div",1)(1,"div")(2,"span",2),g(3,0),s()(),r(4,"ta-button-v2",3),S("clickEvent",function(){return i.downloadSample()}),s()(),r(5,"div",4),p(6,Ym,1,4,"ta-file-upload",5)(7,Wm,1,0,"ta-spinner",6),s()),n&2&&(o(6),a("ngIf",!i.processing),o(),a("ngIf",i.processing))},dependencies:[mt,L,jo,Ii,ie,Ee],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{position:relative}.upload-participants__label[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:12px}
2.upload-participants__label-name[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);color:var(--ta-color-text-default)}.upload-participants__label-download[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;color:var(--ta-color-text-subtle)}.upload-participants__label-spinner-container[_ngcontent-%COMP%]{margin-right:var(--dim-step3)}.upload-participants__upload[_ngcontent-%COMP%]{min-height:205px}"]})}}return t})();E();var yt=function(t){return t.goToOverviewPage="goToOverviewPage",t.openParticipantSettings="openParticipantSettings",t.teamEventLoaded="teamEventLoaded",t.participantSettingsSaved="participantSettingsSaved",t.participantsUpdated="participantsUpdated",t.eventSettingsUpdated="eventSettingsUpdated",t.goToPolicyAndPaymentPage="goToPolicyAndPaymentPage",t.canBookAccommodationsUpdated="canBookAccommodationsUpdated",t.iframeReady="iframeReady",t.openViewAllGuestsModal="openViewAllGuestsModal",t.changeTab="changeTab",t}(yt||{}),hn=(()=>{class t{constructor(){this.DEFAULT_SOURCE="Navan",this.messageListeners=new Map}sendToParent(e,n,i=this.DEFAULT_SOURCE){let l=le({type:e,source:i},n&&{data:n});window.parent.postMessage(l,window.location.origin)}goToOverviewPage(){this.sendToParent(yt.goToOverviewPage)}goToPolicyAndPayment(){this.sendToParent(yt.goToPolicyAndPaymentPage)}teamEventLoaded(){this.sendToParent(yt.teamEventLoaded)}eventSettingsUpdated(){this.sendToParent(yt.eventSettingsUpdated)}participantsUpdated(){this.sendToParent(yt.participantsUpdated)}openParticipantSettings(e,n,i){let l={invitation:e,participantFullName:n,participantEmail:i};this.sendToParent(yt.openParticipantSettings,l)}openViewAllGuestsModal(e){this.sendToParent(yt.openViewAllGuestsModal,e)}sendReadySignal(){this.sendToParent(yt.iframeReady,null,this.DEFAULT_SOURCE)}receiveFromParent(e,n,i=window.location.origin){let l=d=>{let u=d.origin===i,h=d.data&&d.data.type&&d.data.source===this.DEFAULT_SOURCE;!u||!h||d.data.type===e&&n(d.data.data)};this.messageListeners.set(e,l),window.addEventListener("message",l)}cleanupListener(e){let n=this.messageListeners.get(e);n&&(window.removeEventListener("message",n),this.messageListeners.delete(e))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Jm=()=>({placeAt:"top"}),Zm=t=>({placement:t});function eE(t,_){if(t&1&&(w(0),r(1,"strong"),C(2),s(),U()),t&2){let e=_.ngIf;o(2),B(" ",e,"")}}function tE(t,_){if(t&1){let e=O();w(0),r(1,"ta-upload-participants-input",19),S("participantsParsed",function(i){f(e);let l=c();return v(l.uploadParticipants(i))}),s(),U()}}function nE(t,_){if(t&1){let e=O();w(0),r(1,"ta-add-participants-input",20),S("fetchUsers",function(i){f(e);let l=c();return v(l.onFetchUsers(i))})("enableUploadFlow",function(i){f(e);let l=c();return v(l.updateIsUploadStepInProgress(i))}),s(),U()}if(t&2){let e=c();o(),a("placeholder",e.placeholder)("travelEventId",e.travelEventId)("isTeamOffsite",e.isTeamOffsite)("isGuestAllowed",e.isGuestAllowed)("disabled",e.disabledInput)("required",!0)("submitted",e.submitted)("maxParticipants",e.maxParticipants)("canCreate",!1)("errorCopies",e.errorCopies)("hasGuestInvitePermissions",e.organiserHasGuestInvitePermissions)("bulkFetchedUsers",e.bulkFetchedUsers)("totalEventParticipants",e.totalEventParticipants)("isCounterProcessing",e.isCounterProcessing)("isUploadFlowEnabled",e.isUploadFlowEnabled)("uploadedParticipants$",e.uploadedParticipants$)("disallowGuestsWithEmptyNames",e.disallowGuestsWithEmptyNames)}}function iE(t,_){if(t&1){let e=O();r(0,"div",21)(1,"h3",22)(2,"span",23),g(3,1),s(),m(4,"ta-icon-v2",24),s(),r(5,"ta-team-event-booking-verticals-options",25),S("selectionChanges",function(i){f(e);let l=c();return v(l.selectedVerticals=i)}),s()()}if(t&2){let e=c(),n=V(20);o(4),a("taPopover",n)("clickable",!0)("inline",!0)("popoverConfig",me(6,Zm,Se(5,Jm))),o(),a("hasRoomBlocks",e.hasRoomBlocks)}}function oE(t,_){t&1&&(r(0,"div")(1,"div",26)(2,"ta-tag-v2",27),g(3,2),s(),r(4,"div",28),g(5,3),s()()())}function aE(t,_){t&1&&(r(0,"div")(1,"div",26)(2,"ta-tag-v2",29),g(3,4),s(),r(4,"div",28),g(5,5),s()()())}function rE(t,_){if(t&1&&(r(0,"div")(1,"div",30),m(2,"ta-loading",31),P(3,"async"),s()()),t&2){let e=c();o(2),a("textPosition","RIGHT")("size","loading-size-small")("text",A(3,3,e.spinnerText$))}}function sE(t,_){if(t&1){let e=O();r(0,"ta-button-v2",32),P(1,"async"),P(2,"async"),S("clickEvent",function(){f(e);let i=c();return v(i.onAddParticipants())}),s()}if(t&2){let e=c();a("text",A(1,2,e.addParticipantsText$))("disabled",A(2,4,e.disabledButton$)||e.form.invali
2d)}}function lE(t,_){if(t&1&&(r(0,"div",33),m(1,"ta-icon",34),r(2,"span",35),C(3),s()()),t&2){let e=c();o(3),G(e.errorMessage)}}function _E(t,_){t&1&&(r(0,"div",36),g(1,6),s())}var c_=(()=>{class t{get usersControl(){return this.form.get("users")}get isGuestAllowed(){return this.splitService.isOn("GME_GUEST_IN_GROUP_EVENT")&&this.organiserHasGuestInvitePermissions||this.isTeamOffsite}get header(){return this.isUploadFlowEnabled?$localize`Bulk upload participants`:$localize`Add participants`}get subtitle(){return this.isUploadFlowEnabled?$localize`Download the participant template, add each participant’s details, and upload the completed file.`:this.isGuestAllowed?$localize`You can add participants from your company or external guests.`:$localize`You can add anyone at your company that’s using Navan.`}constructor(e,n,i,l,d,u,h,I,F,$,ge,W,oe){this.destroyRef=e,this.modalRef=n,this.jwtService=i,this.modalService=l,this.groupTravelApiService=d,this.travelEventQuery=u,this.travelEventStore=h,this.groupTravelUserUtilService=I,this.taToastrService=F,this.travelEventInvitationsQuery=$,this.splitService=ge,this.cdRef=W,this.iconRegistry=oe,this.internalAppsCommunicatorService=M(hn),this.organiserHasGuestInvitePermissions=!1,this.isTeamOffsite=!1,this.hasRoomBlocks=!1,this.teamEventRoomBlocksEnabled=!1,this.totalEventParticipants=0,this.submitted=!1,this.disabledInput=!1,this.form=new mi({users:new $t([])}),this.isCounterProcessing=!1,this.isUploadFlowEnabled=!1,this.isUploadStepInProgress=!1,this.uploadedParticipants=[],this.uploadedParticipants$=new dt,this.errorCopies={},this.selectedVerticals=null,this._addParticipantsModalText$=new rt(""),this.addParticipantsModalText$=this._addParticipantsModalText$.asObservable(),this.maxParticipants=500,this.disallowGuestsWithEmptyNames=!1,this.noUsersSelected$=this.usersControl.valueChanges.pipe(Q(Ie=>!Ie?.length)),this.noUsersSelected=ui(this.noUsersSelected$,{initialValue:!0}),this.addParticipantsText$=this.travelEventQuery.isActiveEventActive$.pipe(Q(Ie=>Ie?$localize`Add and invite participants`:$localize`Add participants`)),this.noticeTags$=Ue([this.travelEventQuery.isActiveEventActive$,this.travelEventQuery.isLoading$]).pipe(Q(([Ie,ae])=>ae?"LOADING":Ie?"IN_PROGRESS":"DRAFT")),this.disabledButton$=Ue([this.noUsersSelected$,this.travelEventQuery.isLoading$]).pipe(ut(this.destroyRef),Q(([Ie,ae])=>Ie||ae)),this.iconRegistry.registerIcons(mn,Po),this.onNoUsersSelectedEffect()}ngOnInit(){this.travelEventId=this.modalRef.data.travelEventId,this.isTeamOffsite=this.modalRef.data.isTeamOffsite,this.hasRoomBlocks=this.modalRef.data.hasRoomBlocks,this.teamEventRoomBlocksEnabled=this.modalRef.data.teamEventRoomBlocksEnabled,this.maxParticipants=this.travelEventQuery.isActiveEventOffsite?300:this.getMaxParticipants(),this.bodyElRef=this.modalRef.data.bodyElRef,this.totalEventParticipants=this.modalRef.data.totalEventParticipants,this.spinnerText$=this.addParticipantsModalText$,this.organiserHasGuestInvitePermissions=this.isOrganiserHasGuestInvitePermissions(),this.isUploadFlowEnabled=this.modalRef.data.isUpload,this.isUploadStepInProgress=this.isUploadFlowEnabled,this.selectedVerticals=this.isRoomBlockSearchEnabled()?this.modalRef.data.selectedVerticals:null,this.disallowGuestsWithEmptyNames=this.modalRef.data.disallowGuestsWithEmptyNames,this.placeholder=this.disallowGuestsWithEmptyNames?$localize`Type a name or email.`:$localize`Type a name or email, or paste a list of emails to add users in bulk.`}onNoUsersSelectedEffect(){xn(()=>{this.noUsersSelected()&&(this.errorMessage="")})}getMaxParticipants(){return this.splitService.isOn("ENT_INCREASE_PARTICIPANTS")?6e3:500}updateIsUploadStepInProgress(e){this.isUploadStepInProgress=e}onAddParticipants(){if(this.errorMessage="",this.submitted=!0,this.usersControl.updateValueAndValidity(),this.form.invalid)return;this.isCounterProcessing=!0;let e=this.getInvitableUsers();this.updateParticipantsAddingModal(!0,$localize`Adding participants, it might take a minute or two`),this.disabledInput=!0,this.groupTravelApiService.insertBulkInviteeInfo(this.travelEventId,e,this.selectedVerticals).pipe(He(()=>{this.updateParticipantsAddingModal(!1,""),this.disabledInput=!1,this.submitted=!1,this.isCounterProcessing=!1})).subscribe(n=>{n.length?(this.processSuccessfullyAddedParticipants(e,n),this.deduplicateEventParticipants(),this.errorMessage=$localize`These participants cannot be added this time. Please try again later.`,this.totalEventParticipants+=e.length-n.length,N(z.PARTICIPANTS_ADDED,{[x.VIEW]:this.isUploadFlowEnabled?H.PARTICIPANTS_BULK_ADD:H.PARTICIPANTS_MANUAL_ADD,[x.NAVAN_EVENT_PAX_ADDED]:this.totalEventParticipants}),N(X.ADD_PARTICIPANTS,{hasRoomBlocks:this.hasRoomBlocks,success:!1})):(this.errorCopies={},this.closeModal({isSuccess:!0,participants:e.length}),this.internalAppsCommunicatorService.participantsUpdated(),N(z.PARTICIPANTS_ADDED,{[x.VIEW]:this.isUploadFlowEnabled?H.PARTICIPANTS_BULK_ADD:H.PARTICIPANTS_MANUAL_ADD,[x.NAVAN_EVENT_PAX_ADDED]:e.length}),N(X.ADD_PARTICIPANTS,{hasRoomBlocks:this.hasRoomBlocks,success:!0}))},n=>{Nt("PLGR","GroupTravelRoomBlocks","addParticipants",n),this.handleBulkAddError(n)})}onClose(){this.form.dirty?this.modalService.open(ea,{data:{header:$localize`Discard changes?`,description:$localize`You have unsaved participants. Are you sure you want to discard your changes?`,primaryButton:{text:$localize`Back to edit`},secondaryButton:{text:$localize`Discard changes`}},closeOnOutsideClick:!1,closeCurrent:!1}).afterClosed$.pipe(Q(({type:e,result:n})=>e==="close"&&n)).subscribe(e=>{e?.action!==Zo.PRIMARY&&this.modalRef.close()}):this.modalRef.close()}onFetchUsers(e){this.disabledInput=!0,this.updateParticipantsAddingModal(!0,$localize`Adding participants...`),this.groupTravelApiService.fetchBulkUserData(this.travelEventId,e).pipe(He(()=>{this.disabledInput=!1,this.updateParticipantsAddingModal(!1,"")})).subscribe(n=>{this.bulkFetchedUsers=n.map(i=>this.enrichWithUploadData(i)),this.errorCopies=le(le({},this.errorCopies),this.getErrorCopies(this.getNormalizedFetchUserErrors(n)))},()=>{this.bulkFetchedUsers=[]})}enrichWithUploadData(e){if(!e.user){let n=this.uploadedParticipants.find(i=>i.email===e.email);n&&(e.user={email:n.email,firstName:n.firstName,lastName:n.lastName,enabled:!0})}return e}uploadParticipants(e){this.isUploadStepInProgress=!1,this.uploadedParticipants=e,this.cdRef.detectChanges(),this.uploadedParticipants$.next(e)}closeModal(e={isSuccess:!1}){this.modalRef.close(e)}getErrorCopies(e={}){let n={};for(let[i,l]of Object.entries(e))n[i]=this.groupTravelUserUtilService.getInvitableUserLabel(l);return n}handleBulkAddError(e){e.status===404?this.errorMessage=$localize`This event does not exist anymore, please create a new event.`:this.errorMessage=$localize`We encountered an error, please try again.`,Nt("PLGR","GroupTravelRoomBlocks","addParticipants",e)}isOrganiserHasGuestInvitePermissions(){let e=this.jwtService.jwt.roles||[],n=this.jwtService.jwt.permissions||[];return e.includes(Eo.ADMIN)||n.includes(ts.INVITE_TRIP)}updateParticipantsAddingModal(e,n){this.travelEventStore.setLoading(e),this._addParticipantsMo
2dalText$.next(n)}getNormalizedFetchUserErrors(e){let n={};return e.forEach(i=>{i.user?n[i.email]=i.status:n[i.email]=Fe.NOT_REGISTERED}),n}getInvitableUsers(){let e=this.usersControl.value.filter(n=>n.status!==Fe.DUPLICATE);return this.isGuestAllowed?e:e.filter(n=>!!n.user)}processSuccessfullyAddedParticipants(e,n){let i=e.length-n.length;i===0?this.taToastrService.success($localize`No new participants have been added.`):(this.taToastrService.success($localize`Successfully added ${i} participants.`),this.usersControl.patchValue(this.usersControl.value.filter(l=>n.includes(l.email))),this.groupTravelApiService.getTravelEventInvitations(this.travelEventId,{page:this.travelEventInvitationsQuery.currentPage}).subscribe(()=>{}))}deduplicateEventParticipants(){let e=this.usersControl.value.filter(n=>n.status!==Fe.DUPLICATE);this.usersControl.setValue(e)}isRoomBlockSearchEnabled(){return this.teamEventRoomBlocksEnabled&&this.hasRoomBlocks&&!this.isTeamOffsite}static{this.\u0275fac=function(n){return new(n||t)(T(Lt),T(ot),T(bi),T(et),T(Ae),T(ve),T(tn),T(jn),T(gt),T(Tt),T(Ce),T($e),T(ne))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-add-users-modal"]],standalone:!0,features:[fe([{provide:Si,useExisting:t}]),y],decls:21,vars:18,consts:()=>{let e;e=$localize`:␟c3bcb609adf9d2472c1c1a399e27790d09bbf6df␟5093503871431721271:Allowed bookings`;let n;n=$localize`:␟287fd156f43dc35c66e15b4db6ce4fc8343e85a8␟3307214558906712688:In progress`;let i;i=$localize`:␟8cd7177e0973e9b92e963349dcec91a792e5e4ec␟3343068111672436220: Participants will get an invite to book their travel once added. `;let l;l=$localize`:␟86022280b7836d1aff7fdc0182415b041ae3625c␟4808589666930368915:Draft`;let d;d=$localize`:␟fbea62ac8449fba2c163006e8c8d5164ec6d0049␟430114036678054315: Participants won’t be notified of the event until you send invites. `;let u;return u=$localize`:␟20ef572ad74ee6e6695abc396192d8bcbf93bdf4␟4638487289476434285: The booking types participants can make for this event. These can be edited at the participant level until bookings are made. `,[["allowedBookings",""],e,n,i,l,d,u,[3,"formGroup"],[1,"add-users-moodal__header",3,"onClose","header","customCloseModal"],[1,"add-users-modal__body"],[1,"add-users-modal__offsite-subtitle"],[4,"ngIf"],["class","add-users-modal__verticals","data-testid","participantsAllowedVerticals",4,"ngIf"],[1,"add-users-modal__footer"],[1,"add-users-modal__footer__inner"],[3,"ngSwitch"],[4,"ngSwitchCase"],["size","regular","class","team-event__add-participant-button","data-testid","Add participants modal button",3,"text","disabled","clickEvent",4,"ngIf"],["class","add-users-modal__error-container",4,"ngIf"],[3,"participantsParsed"],["formControlName","users",3,"fetchUsers","enableUploadFlow","placeholder","travelEventId","isTeamOffsite","isGuestAllowed","disabled","required","submitted","maxParticipants","canCreate","errorCopies","hasGuestInvitePermissions","bulkFetchedUsers","totalEventParticipants","isCounterProcessing","isUploadFlowEnabled","uploadedParticipants$","disallowGuestsWithEmptyNames"],["data-testid","participantsAllowedVerticals",1,"add-users-modal__verticals"],[1,"add-users-modal__allowed-bookings"],[1,"add-users-modal__allowed-bookings-text"],["icon","info-small","theme","outline","popoverTrigger","hover",1,"add-users-modal__allowed-bookings-icon",3,"taPopover","clickable","inline","popoverConfig"],[3,"selectionChanges","hasRoomBlocks"],[1,"add-users-modal__footer__notice"],["theme","soft","type","green"],[1,"add-users-modal__footer__notice-text"],["theme","soft","type","yellow"],[1,"add-users-modal__spinner-container"],[3,"textPosition","size","text"],["size","regular","data-testid","Add participants modal button",1,"team-event__add-participant-button",3,"clickEvent","text","disabled"],[1,"add-users-modal__error-container"],["icon","error","theme","outline",1,"add-users-modal__error-icon"],[1,"add-users-modal__error-text"],[1,"add-users-modal__popover"]]},template:function(n,i){if(n&1){let l=O();r(0,"ta-modal",7)(1,"ta-modal-header",8),S("onClose",function(){return f(l),v(i.onClose())}),s(),r(2,"div",9)(3,"p",10),C(4),p(5,eE,3,1,"ng-container",11),P(6,"async"),s(),p(7,tE,2,0,"ng-container",11)(8,nE,2,17,"ng-container",11),s(),p(9,iE,6,8,"div",12),r(10,"div",13)(11,"div",14),w(12,15),P(13,"async"),p(14,oE,6,0,"div",16)(15,aE,6,0,"div",16)(16,rE,4,5,"div",16),U(),p(17,sE,3,6,"ta-button-v2",17),s(),p(18,lE,4,1,"div",18),s()(),p(19,_E,2,0,"ng-template",null,0,k)}n&2&&(a("formGroup",i.form),o(),a("header",i.header)("customCloseModal",!0),o(3),B(" ",i.subtitle," "),o(),a("ngIf",A(6,14,i.travelEventQuery.invoiceMessage$)),o(2),a("ngIf",i.isUploadStepInProgress),o(),a("ngIf",!i.isUploadStepInProgress),o(),a("ngIf",i.isTeamOffsite),o(3),a("ngSwitch",A(13,16,i.noticeTags$)),o(2),a("ngSwitchCase","IN_PROGRESS"),o(),a("ngSwitchCase","DRAFT"),o(),a("ngSwitchCase","LOADING"),o(),a("ngIf",!i.isUploadStepInProgress),o(),a("ngIf",i.errorMessage))},dependencies:[Ze,je,Me,Xe,Vt,he,Ge,Qe,at,L,__,l_,K,Z,re,vl,Xt,jt,Jt,qt,hi,Ci,ie,Ee,Dn,we],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]     .ta-modal-body--side-padding{padding-top:0}.add-users-modal__body[_ngcontent-%COMP%]{width:800px}
2.add-users-modal__offsite-subtitle[_ngcontent-%COMP%]{margin:0 0 var(--dim-step6) 0}.add-users-modal__footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between;flex-direction:column;align-self:stretch;width:100%;margin-top:54px}.add-users-modal__footer__inner[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;align-self:stretch;width:100%}.add-users-modal__footer__notice[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step2)}.add-users-modal__footer__notice-text[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.add-users-modal__error-container[_ngcontent-%COMP%], .add-users-modal__spinner-container[_ngcontent-%COMP%]{display:flex;flex-flow:row;align-items:center}.add-users-modal__error-icon[_ngcontent-%COMP%]{padding-right:var(--dim-step3)}.add-users-modal__error-icon[_ngcontent-%COMP%], .add-users-modal__error-text[_ngcontent-%COMP%]{color:var(--ta-color-text-warning)}.add-users-modal__verticals[_ngcontent-%COMP%]{margin-top:var(--dim-step10)}.add-users-modal__verticals[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-bold);text-align:start;line-height:24px;margin:0 0 var(--dim-step4) 0}.add-users-modal__verticals[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);margin:var(--dim-step4) 0;font-size:var(--text-size-xs)}.add-users-modal__allowed-bookings[_ngcontent-%COMP%]{display:flex}.add-users-modal__allowed-bookings-text[_ngcontent-%COMP%]{color:var(--text-default, #131316);font-size:var(--text-size-big);font-weight:var(--text-weight-medium);text-align:start;line-height:26px}.add-users-modal__allowed-bookings-icon[_ngcontent-%COMP%]{margin-left:var(--dim-step2);position:relative;top:2px;height:26px}.add-users-modal__popover[_ngcontent-%COMP%]{max-width:450px;padding:var(--dim-step2) var(--dim-step3)}"]})}}return t})();E();E();function cE(t,_){if(t&1&&(r(0,"p",3),C(1),s()),t&2){let e=c();o(),G(e.secondaryText)}}var d_=(()=>{class t{constructor(e){this.modalRef=e;let n=this.modalRef.data;this.participantFullName=n.participantFullName,this.participantFirstName=n.participantFirstName,this.hasRoomBlock=n.hasRoomBlock,this.hasOtherBookings=n.hasOtherBookings,this.hasAnyBookings=n.hasAnyBookings,this.tripUuid=n.tripUuid}get title(){return $localize`${this.participantFullName} removed from event`}get bodyText(){return this.hasRoomBlock?$localize`${this.participantFullName} still has a room booked through the group hotel reservation, you can cancel it from their trip itinerary.`:$localize`${this.participantFullName} has active bookings. We've emailed them to request they cancel their bookings.`}get secondaryText(){return this.hasRoomBlock&&this.hasOtherBookings?$localize`We've also emailed them to request they cancel their other bookings.`:""}get buttonText(){return this.hasRoomBlock?$localize`Go to ${this.participantFirstName}'s trip itinerary`:$localize`Got it`}onAction(){let e=`/app/user2/trips/${this.tripUuid}/itinerary`;this.hasRoomBlock&&(Ke()&&window.top?window.top.location.href=e:window.location.href=e),this.modalRef.close()}static{this.\u0275fac=function(n){return new(n||t)(T(ot))}}static{this.\u0275cmp=b({type:t,selectors:[["ng-component"]],standalone:!0,features:[y],decls:9,vars:15,consts:[[1,"participant-removed-modal"],[3,"showClose","extraPaddingTop","extraPaddingRight","extraPaddingLeft","bottomPadding","header"],[1,"participant-removed-modal__content"],[1,"participant-removed-modal__body"],["class","participant-removed-modal__body",4,"ngIf"],[3,"alignRight","extraPaddingTop","extraPaddingRight","extraPaddingBottom","extraPaddingLeft","noTextPadding"],["taButton","","taModalPrimaryAction","",3,"click"]],template:function(n,i){n&1&&(r(0,"ta-modal",0),m(1,"ta-modal-header",1),r(2,"div",2)(3,"p",3),C(4),s(),p(5,cE,2,1,"p",4),s(),r(6,"ta-modal-footer",5)(7,"button",6),S("click",function(){return i.onAction()}),C(8),s()()()),n&2&&(o(),a("showClose",!0)("extraPaddingTop",!0)("extraPaddingRight",!0)("extraPaddingLeft",!0)("bottomPadding",!1)("header",i.title),o(3),G(i.bodyText),o(),a("ngIf",i.secondaryText),o(),a("alignRight",!1)("extraPaddingTop",!0)("extraPaddingRight",!0)("extraPaddingBottom",!0)("extraPaddingLeft",!0)("noTextPadding",!0),o(2),B(" ",i.buttonText," "))},dependencies:[Ze,at,Zt,un,Kt,L],styles:[".participant-removed-modal[_ngcontent-%COMP%]{width:600px}.participant-removed-modal[_ngcontent-%COMP%]     .ta-modal-header__close__button{--color: var(--ta-color-icon-subtle)}.participant-removed-modal__body[_ngcontent-%COMP%]{margin:0;padding:0 var(--dim-step4);line-height:var(--dim-step6)}.participant-removed-modal__body[_ngcontent-%COMP%] + .participant-removed-modal__body[_ngcontent-%COMP%]{margin-top:var(--dim-step4)}.participant-removed-modal[_ngcontent-%COMP%]   button[taButton][_ngcontent-%COMP%]  .ta-button__content{justify-content:center}"]})}}return t})();E();E();be();E();var Aa=function(t){return t.PENDING="PENDING",t.PROCESSING="PROCESSING",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t}(Aa||{});E();be();function dE(t,_){if(t&1){let e=O();w(0),r(1,"div",7)(2,"div")(3,"span",8),g(4,0),s()(),r(5,"ta-button-v2",9),S("clickEvent",function(){f(e);let i=c();return v(i.downloadSample())}),s()(),r(6,"div",10),w(7),r(8,"ta-file-upload",11),S("fileEvent",function(i){f(e);let l=c();return v(l.fileChanged(i))}),s(),U(),s(),U()}if(t&2){let e=c();o(8),a("multiple",!1)("uploadError",e.uploadError)("isRefactorFilesModal",!0)}}function pE(t,_){if(t&1){let e=O();w(0),r(1,"div",12)(2,"div",13)(3,"i",14),C(4,"check_circle"),s()(),r(5,"h4"),g(6,1),s(),r(7,"p"),g(8,2),s(),r(9,"ta-button-v2",15),S("clickEvent",function(){f(e);let i=c();
2return v(i.uploadStatus$.next(i.UploadStatus.IDLE))}),s()(),U()}}function mE(t,_){if(t&1){let e=O();w(0),r(1,"div",16)(2,"div",13)(3,"i",17),C(4,"error"),s()(),r(5,"h4"),g(6,3),s(),r(7,"p"),C(8),s(),r(9,"ta-button-v2",18),S("clickEvent",function(){f(e);let i=c();return v(i.uploadStatus$.next(i.UploadStatus.IDLE))}),s()(),U()}if(t&2){let e=c();o(8),G(e.uploadError)}}var EE=new _o("Global window object",{factory:()=>window}),ja=function(t){return t.IDLE="idle",t.UPLOADING="uploading",t.SUCCESS="success",t.ERROR="error",t}(ja||{}),p_=(()=>{class t{constructor(e){this.window=e,this.uploadStarted=new Y,this.uploadFinished=new Y,this.fileSelected=new Y,this.uploadStatus$=new rt(ja.IDLE),this.UploadStatus=ja,this.selectedFile=null}ngOnInit(){}downloadSample(){this.window.open("./assets/csv-samples/participant_list_sample.csv","_blank","noopener,noreferrer"),N(z.PARTICIPANTS_BULK_TEMPLATE_DOWNLOADED,{[x.VIEW]:H.PARTICIPANTS_BULK_UPLOAD})}fileChanged(e){if(N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_BULK_ADD}),this.uploadError=null,e.length===0){this.uploadError=$localize`No file selected`;return}let n=e[0];this.selectedFile=n,this.fileSelected.emit(n)}static{this.\u0275fac=function(n){return new(n||t)(T(EE))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-async-upload-participants"]],inputs:{travelEventId:"travelEventId"},outputs:{uploadStarted:"uploadStarted",uploadFinished:"uploadFinished",fileSelected:"fileSelected"},standalone:!0,features:[y],decls:6,vars:6,consts:()=>{let e;e=$localize`:␟a3586468dfd4ef18e1755649f3f007ab2f0a04c7␟8189518563191407570:Download participant template`;let n;n=$localize`:␟1d2479607fad61e392190cf36059fd0ef00a039d␟6835123930022603344:Drag and drop your file or`;let i;i=$localize`:␟cf33702960fd864236c3f46c16dda039b3ad7d3e␟8988675705607044733:Select a .csv file`;let l;l=$localize`:␟2795d5e4d1eddeb43fa2ba6401725fcb02b0b850␟537298257225550688:Select a file`;let d;d=$localize`:␟407322116eec5870fd9b02a8c51973f72d372443␟4164769349143041335:Upload another file`;let u;u=$localize`:␟9af3c552128a808ed01de25fc89fd93ef7f1200a␟3550254800553754723:File uploaded successfully`;let h;h=$localize`:␟e031b75bde34f6fd97e2f873d1eb3ef72d80da5c␟8944088274148305821:Your participants are being processed. This may take a few minutes. You'll be notified when the processing is complete.`;let I;I=$localize`:␟bc22a9b838eed800a62c38fcb16425d8e255c7d1␟6650633628037596693:Try again`;let F;return F=$localize`:␟1ff4456cfb5e5bbf6e773f2e53c03ac79fd648fd␟8151924435547335490:Upload failed`,[l,u,h,F,[1,"async-upload-participants"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"async-upload-participants__label"],[1,"async-upload-participants__label-name"],["kind","ghost","text",e,1,"async-upload-participants__example",3,"clickEvent"],[1,"async-upload-participants__file-container"],["dndText",n,"dndSubText","","buttonText",i,"acceptFileExts",".csv",3,"fileEvent","multiple","uploadError","isRefactorFilesModal"],[1,"async-upload-participants__success"],[1,"async-upload-participants__icon-container"],[1,"material-icons","async-upload-participants__success-icon"],["text",d,3,"clickEvent"],[1,"async-upload-participants__error"],[1,"material-icons","async-upload-participants__error-icon"],["text",I,3,"clickEvent"]]},template:function(n,i){n&1&&(r(0,"div",4),w(1,5),P(2,"async"),p(3,dE,9,3,"ng-container",6)(4,pE,10,0,"ng-container",6)(5,mE,10,1,"ng-container",6),U(),s()),n&2&&(o(),a("ngSwitch",A(2,4,i.uploadStatus$)),o(2),a("ngSwitchCase",i.UploadStatus.IDLE),o(),a("ngSwitchCase",i.UploadStatus.SUCCESS),o(),a("ngSwitchCase",i.UploadStatus.ERROR))},dependencies:[mt,Xt,jt,we,jo,ie,Ee],styles:[".async-upload-participants[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.async-upload-participants__label[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--dim-step2)}
2.async-upload-participants__label-name[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.async-upload-participants__file-container[_ngcontent-%COMP%]{padding:0;margin-bottom:var(--dim-step4);position:relative;min-height:var(--dim-step13)}.async-upload-participants__file-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;color:var(--ta-color-text-subtle);border-radius:var(--dim-step1);padding:var(--dim-step2) var(--dim-step4);width:100%;box-sizing:border-box}.async-upload-participants__filename[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);color:var(--ta-color-text-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.async-upload-participants__remove-file[_ngcontent-%COMP%]{background:none;border:none;color:var(--ta-color-text-subtle);cursor:pointer;padding:var(--dim-step1);margin-left:var(--dim-step2);display:flex;align-items:center;justify-content:center;flex-shrink:0}.async-upload-participants__remove-file[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.async-upload-participants__processing[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--dim-step8) 0;text-align:center}.async-upload-participants__processing[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-top:var(--dim-step4);color:var(--ta-color-text-subtle)}.async-upload-participants__success[_ngcontent-%COMP%], .async-upload-participants__error[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--dim-step8) 0;text-align:center}.async-upload-participants__success[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%], .async-upload-participants__error[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin:var(--dim-step4) 0 var(--dim-step2) 0;font-size:var(--text-size-medium);font-weight:var(--text-weight-bold)}.async-upload-participants__success[_ngcontent-%COMP%]   p[_ngcontent-%COMP%], .async-upload-participants__error[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 var(--dim-step6) 0;color:var(--ta-color-text-subtle);max-width:400px}.async-upload-participants__icon-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:var(--dim-step12);height:var(--dim-step12);border-radius:50%}.async-upload-participants__success-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-success);font-size:var(--dim-step12)}.async-upload-participants__error-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-danger);font-size:var(--dim-step12)}"]})}}return t})();var uE=()=>({placeAt:"top"}),gE=t=>({placement:t});function fE(t,_){if(t&1){let e=O();r(0,"ta-modal-header",23),S("onClose",function(){f(e);let i=c();return v(i.onClose())}),s()}if(t&2){let e=c();a("header",e.header)("padding",!1)("customCloseModal",!0)}}function vE(t,_){if(t&1&&(w(0),r(1,"strong"),C(2),s(),U()),t&2){let e=_.ngIf;o(2),B(" ",e,"")}}function TE(t,_){if(t&1&&(r(0,"div",24)(1,"p",25),C(2),p(3,vE,3,1,"ng-container",20),P(4,"async"),s()()),t&2){let e=c();o(2),dn(" ",e.subtitle," ",e.additionalDetails," "),o(),a("ngIf",A(4,3,e.travelEventQuery.invoiceMessage$))}}function SE(t,_){if(t&1){let e=O();w(0),r(1,"ta-async-upload-participants",26),S("uploadStarted",function(i){f(e);let l=c();return v(l.handleAsyncUploadStarted(i))})("uploadFinished",function(i){f(e);let l=c();return v(l.handleAsyncUploadFinished(i))})("fileSelected",function(i){f(e);let l=c();return v(l.handleFileSelected(i))}),s(),U()}if(t&2){let e=c();o(),a("travelEventId",e.travelEventId)}}function PE(t,_){t&1&&(r(0,"div",34),m(1,"ta-icon-v2",35),r(2,"span"),g(3,1),s()())}function CE(t,_){t&1&&(r(0,"div",36),m(1,"ta-icon-v2",37),r(2,"span"),g(3,2),s()())}function hE(t,_){if(t&1){let e=O();w(0),r(1,"div",27)(2,"div",28)(3,"span",29),C(4),s(),r(5,"button",30),S("click",function(){f(e);let i=c();return v(i.removeSelectedFile())}),m(6,"ta-icon-v2",31),s()(),p(7,PE,4,0,"div",32)(8,CE,4,0,"div",33),s(),U()}if(t&2){let e=c();o(4),G(e.selectedFileName),o(3),a("ngIf",e.fileValid),o(),a("ngIf",!e.fileValid)}}function AE(t,_){if(t&1&&(w(0),r(1,"div",38)(2,"div",39),m(3,"ta-spinner"),s(),r(4,"h3",40),g(5,3),s(),r(6,"p",41),C(7),s()(),U()),t&2){let e=c();o(7),B(" ",e.progressStatusText," ")}}function OE(t,_){if(t&1){let e=O();w(0),r(1,"div",42)(2,"div",43)(3,"div",44)(4,"span",45),g(5,4),s(),r(6,"span",46),C(
27),s()(),r(8,"div",44)(9,"span",45),g(10,5),s(),r(11,"span",46),C(12),s()(),r(13,"div",47)(14,"span",45),g(15,6),s(),r(16,"span",48),C(17),s()()(),r(18,"div",49)(19,"div",50)(20,"ta-button-v2",51),S("clickEvent",function(){f(e);let i=c();return v(i.downloadLogs())}),s()(),r(21,"div",52)(22,"ta-button-v2",53),S("clickEvent",function(){f(e);let i=c();return v(i.onClose())}),s()()()(),U()}if(t&2){let e=c();o(7),G((e.uploadProgress==null?null:e.uploadProgress.total)||0),o(5),G((e.uploadProgress==null?null:e.uploadProgress.created)||0),o(5),G((e.uploadProgress==null?null:e.uploadProgress.failed)||0)}}function ME(t,_){if(t&1){let e=O();w(0),r(1,"div",42)(2,"div",43)(3,"div",44)(4,"span",45),g(5,7),s(),r(6,"span",46),C(7),s()(),r(8,"div",44)(9,"span",45),g(10,8),s(),r(11,"span",46),C(12),s()(),r(13,"div",47)(14,"span",45),g(15,9),s(),r(16,"span",48),C(17),s()()(),r(18,"div",49)(19,"div",50)(20,"ta-button-v2",54),S("clickEvent",function(){f(e);let i=c();return v(i.downloadLogs())}),s()(),r(21,"div",52)(22,"ta-button-v2",55),S("clickEvent",function(){f(e);let i=c();return v(i.onClose())}),s()()()(),U()}if(t&2){let e=c();o(7),G((e.uploadProgress==null?null:e.uploadProgress.total)||0),o(5),G((e.uploadProgress==null?null:e.uploadProgress.created)||0),o(5),G((e.uploadProgress==null?null:e.uploadProgress.failed)||0)}}function NE(t,_){if(t&1&&(r(0,"div",56)(1,"h3",57),de(2,10),m(3,"ta-icon-v2",58),pe(),s()()),t&2){c();let e=V(12);o(3),a("taPopover",e)("clickable",!0)("inline",!0)("popoverConfig",me(5,gE,Se(4,uE)))}}function RE(t,_){t&1&&(r(0,"div")(1,"div",63)(2,"ta-tag-v2",64),g(3,11),s(),r(4,"div",65),g(5,12),s()()())}function bE(t,_){t&1&&(r(0,"div")(1,"div",63)(2,"ta-tag-v2",66),g(3,13),s(),r(4,"div",65),g(5,14),s()()())}function yE(t,_){if(t&1&&(r(0,"div")(1,"div",39),m(2,"ta-loading",67),P(3,"async"),s()()),t&2){let e=c(2);o(2),a("textPosition","RIGHT")("size","loading-size-small")("text",A(3,3,e.spinnerText$))}}function IE(t,_){if(t&1){let e=O();r(0,"div",68)(1,"ta-button-v2",69),P(2,"async"),S("clickEvent",function(){f(e);let i=c(2);return v(i.uploadAndSendInvitations())}),s()()}if(t&2){let e=c(2);o(),a("text",A(2,2,e.noticeTags$)==="DRAFT"?"Upload participants":"Upload and send invitations")("disabled",e.isUploading)}}function xE(t,_){if(t&1&&(r(0,"div",59),w(1,60),P(2,"async"),p(3,RE,6,0,"div",61)(4,bE,6,0,"div",61)(5,yE,4,5,"div",61),U(),p(6,IE,3,4,"div",62),s()),t&2){let e=c();o(),a("ngSwitch",A(2,5,e.noticeTags$)),o(2),a("ngSwitchCase","IN_PROGRESS"),o(),a("ngSwitchCase","DRAFT"),o(),a("ngSwitchCase","LOADING"),o(),a("ngIf",e.fileUploaded&&e.fileValid&&e.modalState===e.UploadModalState.INITIAL)}}function FE(t,_){t&1&&(r(0,"div",70),g(1,15),s())}var Gt=function(t){return t.INITIAL="initial",t.FILE_SELECTED="file_selected",t.UPLOADING="uploading",t.PROCESSING="processing",t.COMPLETED="completed",t.FAILED="failed",t}(Gt||{}),m_=(()=>{class t{constructor(e){this.internalAppsCommunicatorService=e,this.isTeamOffsite=!1,this.hasRoomBlocks=!1,this.fileUploaded=!1,this.fileValid=!1,this.isUploading=!1,this.selectedFileName="",this.selectedFile=null,this.currentOperationUuid=null,this.modalState=Gt.INITIAL,this.UploadModalState=Gt,this.uploadProgress=null,this.progress=0,this.pollingSubscription=null,this.pollingAttempts=0,this.MAX_POLLING_ATTEMPTS=150,this.form=new mi({}),this.destroy$=new dt,this._spinnerText$=new rt(""),this.spinnerText$=this._spinnerText$.asObservable(),this.modalRef=M(ot),this.groupTravelApiService=M(Ae),this.travelEventQuery=M(ve),this.taToastrService=M(gt),this.cdRef=M($e),this.iconRegistry=M(ne),this.splitService=M(Ce),this.travelEventInvitationsQuery=M(Tt),this.iconRegistry.registerIcons(Ao,Hr,Po,mn)}ngOnInit(){this.travelEventId=this.modalRef.data.travelEventId,this.isTeamOffsite=this.modalRef.data.isTeamOffsite,this.hasRoomBlocks=this.modalRef.data.hasRoomBlocks,this.travelEventId&&this.groupTravelApiService.getTravelEventInvitations(this.travelEventId).pipe(De(this.destroy$)).subscribe();let e=this.modalRef.data.operationUuid;e&&(this.currentOperationUuid=e,this.modalState=Gt.PROCESSING,this.startPollingOperation()),this.spinnerText$=this.travelEventQuery.isActiveEventActive$.pipe(De(this.destroy$),Q(n=>n?"Processing...":"Preparing upload...")),this.noticeTags$=this.travelEventQuery.isActiveEventActive$.pipe(De(this.destroy$),Q(n=>n?"IN_PROGRESS":"DRAFT"))}ngOnDestroy(){this.stopPolling(),this.destroy$.next(),this.destroy$.complete()}get header(){return $localize`Bulk upload participants`}get subtitle(){return $localize`You can add anyone from inside or outside of your company by providing an email address.`}get additionalDetails(){return $localize`Existing participants will be ignored.`}get progressStatusText(){return this.modalState===Gt.UPLOADING||this.modalState===Gt.PROCESSING?$localize`Uploading file: ${this.selectedFileName} – ${this.progress}% complete`:""}handleFileSelected(e){if(!e){this.selectedFile=null,this.selectedFileName="",this.fileUploaded=!1,this.fileValid=!1;return}this.selectedFile=e,this.selectedFileName=e.name;let n=e.name.toLowerCase().endsWith(".csv"),i=e.size<=10*1024*1024;this.fileValid=n&&i,this.fileUploaded=!0}uploadAndSendInvitations(){!this.selectedFile||!this.fileValid||this.isUploading||(this.isUploading=!0,this.modalState=Gt.UPLOADING,N(X.PARTICIPANTS_FILE_UPLOAD_AND_INVITE,{isAsync:!0}),this.groupTravelApiService.bulkCreateInvitationsAsync(this.travelEventId,this.selectedFile).subscribe({next:e=>{if(!e?.operationUuid){this.handleOperationFailed();return}N(X.PARTICIPANTS_FILE_UPLOAD_COMPLETED,{operationUuid:e.operationUuid,isAsync:!0}),this.currentOperationUuid=e.operationUuid,this.modalState=Gt.PROCESSING,setTimeout(()=>{this.startPollingOperation()},500)},error:e=>{this.isUploading=!1,this.modalState=Gt.FAILED,this.taToastrService.error($localize`Error uploading and sending invitations`),N(X.PARTICIPANTS_FILE_UPLOAD_FAILED,{error:e.message,isAsync:!0,withInv
2ites:!0})}}))}startPollingOperation(){this.stopPolling(),!(!this.currentOperationUuid||!this.travelEventId)&&(this.pollingAttempts=0,this.progress=0,this.cdRef.detectChanges(),this.destroy$=new dt,this.pollOperationStatus())}pollOperationStatus(){if(!this.currentOperationUuid){this.handleOperationFailed();return}if(this.pollingAttempts++,this.pollingAttempts>this.MAX_POLLING_ATTEMPTS){this.handleOperationFailed();return}let e=this.groupTravelApiService.getOperationStatus(this.travelEventId,this.currentOperationUuid).pipe(De(this.destroy$),Ye(n=>(Nt("Enterprise","UploadParticipants","",n),tr(()=>n))),He(()=>{e&&!e.closed&&e.unsubscribe()})).subscribe({next:n=>{if(!n?.operation){this.scheduleNextPoll();return}this.uploadProgress=n.operation,n.operation?.total>0&&(this.progress=n?.operation?.progress??0,this.cdRef.detectChanges()),n.operation?.status===Aa.COMPLETED?(this.progress=100,this.handleOperationCompleted(n.operation)):n.operation?.status===Aa.FAILED?this.handleOperationFailed(n.operation):this.scheduleNextPoll()},error:()=>{this.handleOperationFailed()}});this.pollingSubscription=e}scheduleNextPoll(){if(this.destroy$.closed)return;setTimeout(()=>{this.destroy$.closed||this.pollOperationStatus()},3e3)}stopPolling(){this.pollingSubscription&&(this.pollingSubscription.unsubscribe(),this.pollingSubscription=null),this.destroy$&&!this.destroy$.closed&&(this.destroy$.next(),this.destroy$.complete())}handleOperationCompleted(e){if(this.uploadProgress=e,this.modalState=Gt.COMPLETED,this.cdRef.detectChanges(),this.taToastrService.success($localize`Upload completed. ${e.created} participants have been added successfully.`),N(X.PARTICIPANTS_FILE_UPLOAD_COMPLETED,{operationUuid:e.uuid,total:e.total,created:e.created,failed:e.failed,isAsync:!0}),this.internalAppsCommunicatorService.participantsUpdated(),e.travelEventUuid||this.travelEventId){let n=e.travelEventUuid||this.travelEventId;this.groupTravelApiService.getTravelEventInvitations(n).pipe(De(this.destroy$)).subscribe()}}handleOperationFailed(e=null){this.stopPolling(),e&&(this.uploadProgress=e),this.modalState=Gt.FAILED,this.cdRef.detectChanges();let n="",i=0;this.travelEventInvitationsQuery?.totalInvitations$&&this.travelEventInvitationsQuery.totalInvitations$.pipe(ce(1)).subscribe(h=>{i=h||0});let l=e?.total||0,d=i+l,u=d>6e3;this.splitService.isOn("ENT_INCREASE_PARTICIPANTS")&&e&&u?n=$localize`This upload would exceed the ${6e3.toLocaleString()} participant limit. Please reduce the number of participants and try again.`:e?n=$localize`Upload failed. ${e.failed} of ${e.total} participants could not be added.`:n=$localize`The upload process could not be completed.`,this.taToastrService.error(n),N(X.PARTICIPANTS_FILE_UPLOAD_FAILED,{operationUuid:e?.uuid,total:e?.total||0,created:e?.created||0,failed:e?.failed||0,isAsync:!0,isOverParticipantLimit:u,currentParticipants:i,totalParticipants:d})}handleAsyncUploadStarted(e){e&&(this.currentOperationUuid=e),this.modalState=Gt.UPLOADING,this.startPollingOperation(),N(X.PARTICIPANTS_FILE_UPLOAD_STARTED,{operationUuid:e,isAsync:!0}),this.cdRef.detectChanges()}handleAsyncUploadFinished(e){if(e.status==="error"){Nt("Enterprise","UploadParticipants","",new Error(e.error||"Unknown error during upload")),this.taToastrService.error(e.error||$localize`An error occurred during the upload process.`);return}e.operationUuid&&(this.currentOperationUuid=e.operationUuid),this.modalState=Gt.PROCESSING,this.startPollingOperation()}onClose(){this.closeModal({isSuccess:!1})}closeModal(e={isSuccess:!1}){this.modalRef.close(e)}downloadLogs(){if(!this.uploadProgress?.uuid){this.taToastrService.error($localize`Unable to download logs. Operation ID not found.`);return}N(X.PARTICIPANTS_FILE_UPLOAD_COMPLETED,{operationUuid:this.uploadProgress.uuid,action:"download_logs"}),this.groupTravelApiService.downloadOperationDetails(this.travelEventId,this.uploadProgress.uuid).subscribe({next:e=>{let n=new Blob([e],{type:"text/csv"}),i=new Date,l=String(i.getDate()).padStart(2,"0"),d=String(i.getMonth()+1).padStart(2,"0"),u=i.getFullYear(),h=`${l}-${d}-${u}`;
2Do.downloadFile(n,`operation-details-${h}.csv`)},error:e=>{Nt("Enterprise","UploadParticipants","downloadLogs",e),this.taToastrService.error($localize`Error downloading operation logs. Please try again.`)}})}removeSelectedFile(){this.handleFileSelected(null)}static{this.\u0275fac=function(n){return new(n||t)(T(hn))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-async-upload-modal"]],standalone:!0,features:[fe([{provide:Si,useExisting:t}]),y],decls:13,vars:13,consts:()=>{let e;e=$localize`:␟33fb5478c1b7b7875fa205b501398878434e0e9a␟5719912962272225542:Added successfully`;let n;n=$localize`:␟23b13975ca265d37f173b2929ba6195ddbc08932␟6877045911862894764:Only .csv files are accepted, up to 10 MB`;let i;i=$localize`:␟76970688412f98f71eaa54db15d21accbd089795␟1964467966502507439: Bulk upload in progress... `;let l;l=$localize`:␟bdf43b20b7101e83458a69a1e5e2008557feca1f␟8601511221316154701:Download logs`;let d;d=$localize`:␟8dd413cee2228118c536f503709329a4d1a395e2␟397098723873502323:Done`;let u;u=$localize`:␟6e7d2ea2da2eacb284371033abe4b59e9ee142eb␟2551139327038126171:Total number of rows in the file`;let h;h=$localize`:␟d549f39f49e4ae754df6f4a0f8ebea02dc7d28c8␟1830576028486536289:Successful participants created`;let I;I=$localize`:␟63802ee8b9643fc61a5733a2082a0448b69c7732␟71255670869447763:Upload errors (download logs to see details)`;let F;F=$localize`:␟bdf43b20b7101e83458a69a1e5e2008557feca1f␟8601511221316154701:Download logs`;let $;$=$localize`:␟8dd413cee2228118c536f503709329a4d1a395e2␟397098723873502323:Done`;let ge;ge=$localize`:␟6e7d2ea2da2eacb284371033abe4b59e9ee142eb␟2551139327038126171:Total number of rows in the file`;let W;W=$localize`:␟d549f39f49e4ae754df6f4a0f8ebea02dc7d28c8␟1830576028486536289:Successful participants created`;let oe;oe=$localize`:␟63802ee8b9643fc61a5733a2082a0448b69c7732␟71255670869447763:Upload errors (download logs to see details)`;let Ie;Ie=$localize`:␟36c025d9793ad3f6f46e82995b13feba085d011c␟4135565848457337824: Allowed bookings ${"\uFFFD#3\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_TA_ICON_V2:`;let ae;ae=$localize`:␟287fd156f43dc35c66e15b4db6ce4fc8343e85a8␟3307214558906712688:In progress`;let It;It=$localize`:␟ba474493ed2b162245f1d1fae9f25fb857e43a14␟5588119964710071230: Participants will get an invite to book their travel once added. `;let Le;Le=$localize`:␟86022280b7836d1aff7fdc0182415b041ae3625c␟4808589666930368915:Draft`;let _n;_n=$localize`:␟4f10bb5c12b24760b8e9227314feedddd7b3ddd4␟7083552743154918820: Participants won't be notified of the event until you send invites. `;let cn;return cn=$localize`:␟20ef572ad74ee6e6695abc396192d8bcbf93bdf4␟4638487289476434285: The booking types participants can make for this event. These can be edited at the participant level until bookings are made. `,[["allowedBookings",""],e,n,i,u,h,I,ge,W,oe,Ie,ae,It,Le,_n,cn,[1,"async-upload-modal",3,"formGroup","sidePadding","disablePaddingTop","disablePaddingBottom"],["class","async-upload-modal__header",3,"header","padding","customCloseModal","onClose",4,"ngIf"],[1,"async-upload-modal__body"],["class","async-upload-modal__subtitle",4,"ngIf"],[4,"ngIf"],["class","async-upload-modal__verticals",4,"ngIf"],["class","async-upload-modal__footer",4,"ngIf"],[1,"async-upload-modal__header",3,"onClose","header","padding","customCloseModal"],[1,"async-upload-modal__subtitle"],[1,"async-upload-modal__text"],[3,"uploadStarted","uploadFinished","fileSelected","travelEventId"],[1,"async-upload-modal__file-status"],[1,"async-upload-modal__selected-file"],[1,"async-upload-modal__filename"],[1,"async-upload-modal__remove-file",3,"click"],["icon","close","theme","outline"],["class","async-upload-modal__status-msg success",4,"ngIf"],["class","async-upload-modal__status-msg error",4,"ngIf"],[1,"async-upload-modal__status-msg","success"],["icon","check-circle","theme","outline","type","green"],[1,"async-upload-modal__status-msg","error"],["icon","error","theme","outline","type","red"],[1,"async-upload-modal__processing"],[1,"async-upload-modal__spinner-container"],[1,"async-upload-modal__processing-title"],[1,"async-upload-modal__processing-status"],[1,"async-upload-modal__summary-container"],[1,"async-upload-modal__summary-table"],[1,"async-upload-modal__summary-row"],[1,"async-upload-modal__summary-label"],[1,"async-upload-modal__summary-value"],[1,"async-upload-modal__summary-row","error"],[1,"async-upload-modal__summary-value","error"],[1,"async-upload-modal__summary-actions"],[1,"async-upload-modal__left-actions"],["text",l,"kind","ghost","icon","download",3,"clickEvent"],[1,"async-upload-modal__right-actions"],["text",d,3,"clickEvent"],["text",F,"kind","ghost","icon","download",3,"clickEvent"],["text",$,3,"clickEvent"],[1,"async-upload-modal__verticals"],[1,"async-upload-modal__allowed-bookings"],["icon","info-small","theme","outline","popoverTrigger","hover",3,"taPopover","clickable","inline","popoverConfig"],[1,"async-upload-modal__footer"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","async-upload-modal__actions",4,"ngIf"],[1,"async-upload-modal__notice"],["theme","soft","type","green"],[1,"async-upload-modal__notice-text"],["theme","soft","type","yellow"],[3,"textPosition","size","text"],[1,"async-upload-modal__actions"],[3,"clickEvent","text","disabled"],[1,"async-upload-modal__popover"]]},template:function(n,i){n&1&&(r(0,"ta-modal",16),p(1,fE,1,3,"ta-modal-header",17),r(2,"div",18),p(3,TE,5,5,"div",19)(4,SE,2,1,"ng-container",20)(5,hE,9,3,"ng-container",20)(6,AE,8,1,"ng-container",20)(7,OE,23,3,"ng-container",20)(8,ME,23,3,"ng-container",20),s(),p(9,NE,4,7,"div",21)(10,xE,7,7,"div",22),s(),p(11,FE,2,0,"ng-template",null,0,k)),n&2&&(a("formGroup",i.form)("sidePadding",!1)("disablePaddingTop",!0)("disablePaddingBottom",!0),o(),a("ngIf",i.modalState!==i.UploadModalState.PROCESSING&&i.modalState!==i.UploadModalState.UPLOADING),o(2),a("ngIf",i.modalState===i.UploadModalState.INITIAL),o(),a("ngIf",i.modalState===i.UploadModalState.INITIAL),o(),a("ngIf",i.modalState===i.UploadModalState.FILE_SELECTED),o(),a("ngIf",i.modalState===i.UploadModalState.UPLOADING||i.modalState===i.UploadModalState.PROCESSING),o(),a("ngIf",i.modalState===i.UploadModalState.COMPLETED),o(),a("ngIf",i.modalState===i.UploadModalState.FAILED),o(),a("ngIf",i.isTeamOffsite),o(),a("ngIf",i.modalState===i.UploadModalState.INITIAL||i.modalState===i.UploadModalState.FILE_SELECTED))},dependencies:[mt,L,Xt,jt,we,he,Xe,Ge,p_,xl,ss,ie,Ee,Jt,qt,K,Z,hi,Ci,re,Ze,at,Ii],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.async-upload-modal[_ngcontent-%COMP%]{width:850px}.async-upload-modal__header[_ngcontent-%COMP%]{padding:var(--space-large)}.async-upload-modal__body[_ngcontent-%COMP%]{padding:0 var(--space-large)}.async-upload-modal__subtitle[_ngcontent-%COMP%]{margin-bottom:var(--space-large)}.async-upload-modal__text[_ngcontent-%COMP%]{color:var(--ta-color-text-default);margin:0}.async-upload-modal__verticals[_ngcontent-%COMP%]{padding:0 var(--space-xlarge) var(--space-large)}.async-upload-modal__allowed-bookings[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0;font-size:var(--ta-size-font-body-small);font-weight:var(--text-weight-bold)}.async-upload-modal__footer[_ngcontent-%COMP%]{padding:0 var(--space-large) var(--space-large);display:flex;flex-direction:column}.async-upload-modal__notice[_ngcontent-%COMP%]{display:flex;align-items:center}.async-upload-modal__notice-text[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);margin-left:var(--space-small);font-size:var(--ta-size-font-body-small)}.async-upload-modal__spinner-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:var(--space-massive);width:100%;margin-top:var(--space-xxlarge);margin-bottom:var(--space-xxlarge)}.async-upload-modal__file-status[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:var(--space-medium) 0 var(--space-large)}.async-upload-modal__selected-file[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;background-color:var(--ta-color-surface-background);border-radius:var(--radius-tiny);padding:var(--space-small) var(--space-compact);margin-bottom:var(--space-medium);width:fit-content}.async-upload-modal__filename[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);color:var(--ta-color-text-subtle);margin-right:var(--space-small);word-break:break-all}.async-upload-modal__remove-file[_ngcontent-%COMP%]{background:none;border:none;color:var(--ta-color-text-subtle);cursor:pointer;padding:var(--space-xsmall);display:flex;align-items:center;justify-content:center}.async-upload-modal__remove-file[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.async-upload-modal__status-msg[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:var(--ta-size-font-body-small);margin-bottom:var(--space-small)}.async-upload-modal__status-msg.success[_ngcontent-%COMP%]{color:var(--ta-color-text-success)}.async-upload-modal__status-msg.error[_ngcontent-%COMP%]{color:var(--ta-color-text-danger)}.async-upload-modal__status-msg[_ngcontent-%COMP%]   ta-icon-v2[_ngcontent-%COMP%]{margin-right:var(--space-small)}.async-upload-modal__processing[_ngcontent-%COMP%]{padding:var(--space-large) 0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.async-upload-modal__processing-title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-heading-small);font-weight:var(--text-weight-medium);margin:0 0 var(--space-large);color:var(--ta-color-text-default)}.async-upload-modal__processing-status[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-medium);color:var(--ta-color-text-subtle);margin:0;font-weight:var(--text-weight-regular)}.async-upload-modal__progress-container[_ngcontent-%COMP%]{width:100%;max-width:400px;display:flex;align-items:center;margin-top:var(--space-small)}
2.async-upload-modal__progress-bar[_ngcontent-%COMP%]{flex:1;height:var(--space-small);background-color:var(--ta-color-surface-neutral);border-radius:var(--radius-tiny);overflow:hidden;margin-right:var(--space-compact)}.async-upload-modal__progress-fill[_ngcontent-%COMP%]{height:100%;background-color:var(--ta-color-action-primary);border-radius:var(--radius-tiny);transition:width var(--animation-duration-medium) var(--animation-timing-function-move)}.async-upload-modal__progress-label[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-xsmall);font-weight:var(--text-weight-bold);color:var(--ta-color-text-default);width:40px;text-align:right}.async-upload-modal__completed[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--space-xlarge) 0;text-align:center;min-height:200px}.async-upload-modal__completed-title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-large);font-weight:var(--text-weight-bold);margin:var(--space-medium) 0 var(--space-small);color:var(--ta-color-text-success)}.async-upload-modal__completed-message[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-small);color:var(--ta-color-text-subtle);margin:0;max-width:400px}.async-upload-modal__failed[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--space-xlarge) 0;text-align:center;min-height:200px}.async-upload-modal__failed-title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-large);font-weight:var(--text-weight-bold);margin:var(--space-medium) 0 var(--space-small);color:var(--ta-color-text-danger)}.async-upload-modal__failed-message[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-small);color:var(--ta-color-text-subtle);margin:0 0 var(--space-large);max-width:400px}.async-upload-modal__retry-button[_ngcontent-%COMP%]{margin-top:var(--space-small)}.async-upload-modal__popover[_ngcontent-%COMP%]{max-width:280px}.async-upload-modal__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:var(--space-large)}.async-upload-modal__summary[_ngcontent-%COMP%]{width:100%;max-width:500px;margin:var(--space-large) 0;border-radius:var(--radius-small);overflow:hidden;border:1px solid var(--ta-color-border-secondary)}.async-upload-modal__summary-container[_ngcontent-%COMP%]{width:100%;padding:0}.async-upload-modal__summary-title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-heading-small);font-weight:var(--text-weight-xb);padding:var(--space-medium) var(--space-xlarge);margin:0;border-bottom:1px solid var(--ta-color-border-secondary)}.async-upload-modal__summary-table[_ngcontent-%COMP%]{width:100%}.async-upload-modal__summary-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:var(--space-medium) 0;border-bottom:1px solid var(--ta-color-divider-default)}.async-upload-modal__summary-row.error[_ngcontent-%COMP%]{color:var(--ta-color-text-danger)}.async-upload-modal__summary-label[_ngcontent-%COMP%]{font-weight:var(--text-weight-regular);color:inherit}.async-upload-modal__summary-value[_ngcontent-%COMP%]{font-weight:var(--text-weight-bold);color:inherit}.async-upload-modal__summary-value.error[_ngcontent-%COMP%]{color:var(--ta-color-text-danger)}.async-upload-modal__summary-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:var(--space-large);border-top:1px solid var(--ta-color-border-secondary)}.async-upload-modal__left-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--space-compact)}.async-upload-modal__left-actions[_ngcontent-%COMP%]   ta-button-v2[_ngcontent-%COMP%]{display:flex;align-items:center}.async-upload-modal__right-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.async-upload-modal__new-upload[_ngcontent-%COMP%]{margin-left:var(--space-small)}"]})}}return t})();var Ya=()=>[],LE=t=>({"event-users__skeleton--total-cost":t});function UE(t,_){if(t&1){let e=O();r(0,"ta-event-users-header",25),P(1,"async"),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),P(6,"async"),S("onDownloadManifest",function(){f(e);let i=c();return v(i.downloadManifest())}
2)("onOpenAddParticipantsModal",function(){f(e);let i=c();return v(i.openAddParticipantsModal())})("onOpenUploadParticipantsModal",function(){f(e);let i=c();return v(i.openUploadParticipantsModal())}),s()}if(t&2){let e=c();a("totalEventParticipantLength",A(1,7,e.travelEventInvitationsQuery.totalInvitations$))("isAddParticipantsButtonLoading",A(2,9,e.travelEventInvitationsQuery.isLoading$))("isAddParticipantsDisabled",A(3,11,e.travelEventQuery.isActiveEventDisabled$)||A(4,13,e.travelEventInvitationsQuery.totalInvitations$)>=e.maxAllowedParticipantsNumber)("isTeamOffsite",A(5,15,e.travelEventQuery.isActiveEventOffsite$))("downloadingManifest",e.downloadingManifest)("teamEventRoomBlocksEnabled",e.teamEventRoomBlocksEnabled)("isParticipantsUploadEnabled",A(6,17,e.isParticipantsUploadEnabled$))}}function wE(t,_){if(t&1){let e=O();r(0,"div",26)(1,"navan-information-banner",27),S("close",function(){f(e);let i=c();return v(i.closeRoomBlockOnlyBanner.emit())}),r(2,"div",28),g(3,4),s()()()}if(t&2){let e=c();o(),a("type",e.infoBannerType.INFO)("showClose",!0)("showIcon",!1),o(2),q(e.roomBlockAddedParticipants.toLocaleString())(e.roomBlockAddedParticipants),J(3)}}function VE(t,_){if(t&1){let e=O();r(0,"ta-event-users-filters",29),S("filtersChanged",function(i){f(e);let l=c();return v(l.filtersChanged(i))}),s()}if(t&2){let e=c();a("isUserAdmin",!0)("statusOptions",e.statusOptions)("allowedBookingOptions",e.allowedBookingOptions)("isEventDraft",e.travelEventQuery.getActive().status===e.TravelEventStatus.DRAFT)}}function kE(t,_){t&1&&(r(0,"div",41),g(1,9),s())}function DE(t,_){t&1&&(r(0,"div",41),g(1,10),s())}function $E(t,_){if(t&1&&p(0,kE,2,0,"div",40)(1,DE,2,0,"div",40),t&2){let e=c(2);a("ngIf",!e.teamEventRoomBlocksEnabled),o(),a("ngIf",e.teamEventRoomBlocksEnabled)}}function GE(t,_){t&1&&(r(0,"div",42),g(1,11),s())}function BE(t,_){if(t&1&&(r(0,"div",43),C(1),s()),t&2){let e=c(2);o(),B(" ",e.totalCostHeaderLabel," ")}}function zE(t,_){if(t&1&&(r(0,"div",30)(1,"div",31),g(2,5),s(),r(3,"div",32),g(4,6),s(),r(5,"div",33)(6,"span"),g(7,7),s(),m(8,"ta-icon-v2",34),s(),p(9,$E,2,2,"ng-template",null,1,k),r(11,"div",35),g(12,8),s(),p(13,GE,2,0,"div",36)(14,BE,2,1,"div",37),r(15,"div",38),C(16,"\xA0"),s(),r(17,"div",39),C(18,"\xA0"),s()()),t&2){let e=V(10),n=c();te("not-invited",!n.showTotalCost)("users-table__header--room-block",n.teamEventRoomBlocksEnabled)("edit-participant-enabled",n.editParticipantSettingsEnabled),o(8),a("taPopover",e)("clickable",!0)("inline",!0),o(5),a("ngIf",n.shouldDisplayEstimate),o(),a("ngIf",n.showTotalCost)}}function HE(t,_){t&1&&(m(0,"img",49),P(1,"cdnImage")),t&2&&a("src",A(1,1,"navan/illustrations/people-group.svg"),ze)}function XE(t,_){t&1&&(r(0,"div",50),g(1,12),s())}function jE(t,_){t&1&&(r(0,"span"),de(1,13),m(2,"br"),pe(),s())}function YE(t,_){t&1&&(r(0,"span"),g(1,14),s())}function WE(t,_){if(t&1&&(r(0,"div",51),p(1,jE,3,0,"span",22)(2,YE,2,0,"ng-template",null,2,k),s()),t&2){let e=V(3),n=c(2);o(),a("ngIf",n.isSelfSellGroupTravelOnboardingEnabled)("ngIfElse",e)}}function KE(t,_){if(t&1){let e=O();r(0,"div",44),p(1,HE,2,3,"img",45)(2,XE,2,0,"div",46)(3,WE,4,2,"div",47),r(4,"ta-add-participants-button",48),P(5,"async"),P(6,"async"),S("openAddParticipantsModal",function(){f(e);let i=c();return i.closeEducationTooltip(),v(i.openAddParticipantsModal())})("openUploadParticipantsModal",function(){f(e);let i=c();return v(i.openUploadParticipantsModal())}),s()()}if(t&2){let e=c();te("event-users_empty--room-block",e.teamEventRoomBlocksEnabled&&e.showParticipantsHeader),o(),a("ngIf",e.teamEventRoomBlocksEnabled),o(),a("ngIf",!e.teamEventRoomBlocksEnabled),o(),a("ngIf",e.teamEventRoomBlocksEnabled),o(),a("isAddParticipantsDisabled",A(5,7,e.travelEventQuery.isActiveEventDisabled$))("isParticipantsUploadEnabled",A(6,9,e.isParticipantsUploadEnabled$))}}function QE(t,_){if(t&1&&m(0,"div",55),t&2){let e=_.index;ai("ngClass","skeleton-row skeleton-row--item-",e,"")}}function qE(t,_){if(t&1&&m(0,"div",55),t&2){let e=_.index;ai("ngClass","allowed-bookings-divider-",e,"")}}function JE(t,_){if(t&1&&(r(0,"div",53),p(1,QE,1,2,"div",54)(2,qE,1,2,"div",54),s()),t&2){let e=c(2);a("ngClass",me(3,LE,e.showTotalCost)),o(),a("ngForOf",Se(5,Ya).c
2onstructor(9)),o(),a("ngForOf",Se(6,Ya).constructor(3))}}function ZE(t,_){t&1&&(w(0),p(1,JE,3,7,"div",52),U()),t&2&&(o(),a("ngForOf",Se(1,Ya).constructor(5)))}function eu(t,_){t&1&&(w(0),r(1,"div",56),g(2,15),s(),U())}function tu(t,_){if(t&1){let e=O();w(0),r(1,"ta-event-user",58),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),S("updateLocation",function(i){f(e);let l=c(3);return v(l.onUpdateLocation(i))})("updateAllowedVertical",function(i){f(e);let l=c(3);return v(l.onUpdateAllowedVertical(i))})("resendInvitation",function(i){f(e);let l=c(3);return v(l.onResendInvite(i))})("removeParticipant",function(i){f(e);let l=c(3);return v(l.onRemoveParticipant(i))})("editParticipantSettings",function(i){f(e);let l=c(3);return v(l.onEditParticipantSettings(i))}),s(),U()}if(t&2){let e=_.$implicit,n=_.index,i=c(3);o(),a("index",n)("invitationId",e.id)("isEditModeDisabled",i.isEditModeDisabled)("participantPictureUrl",e.participant.participantPictureUrl)("participantFullName",e.participant.participantFullName)("participantFirstName",e.participant.participantFirstName)("participantEmail",e.participant.participantEmail)("isExtraGuestAllowed",e.isExtraGuestAllowed)("departureLocation",e.departureLocation)("invitationStatus",e.invitationStatus)("inviteeAction",e.inviteeAction)("allowedVerticals",e.allowedVerticals)("bookedVerticals",e.bookedVerticals)("costInsights",A(2,27,i.travelEventInvitationsQuery.costInsights$)[e.id])("isLoading",A(3,29,i.travelEventInvitationsQuery.isInvitationLoading$(e.id)))("isRevoking",A(4,31,i.travelEventInvitationsQuery.isInvitationRevoking$(e.id)))("isEventSent",i.isEventSent)("typeIconMap",i.tripsService.getTripTypeIconMap())("isOffsite",A(5,33,i.travelEventQuery.isActiveEventOffsite$))("hasRoomBlocks",i.hasRoomBlocks)("teamEventRoomBlocksEnabled",i.teamEventRoomBlocksEnabled)("teamEventNonRoomBlockBookingEnabled",i.teamEventNonRoomBlockBookingEnabled)("tripUuid",e.tripUuid)("isHotelStateDisabledForRoomBlock",e.participantMissingRoomBlock)("participantMissingRoomBlock",!!i.roomBlockMissingParticipants&&e.participantMissingRoomBlock)("participantAddedInRoomBlock",!!i.roomBlockAddedParticipants&&e.participantAddedInRoomBlock)("editParticipantSettingsEnabled",i.editParticipantSettingsEnabled)}}function nu(t,_){if(t&1&&(p(0,tu,6,35,"ng-container",57),P(1,"async")),t&2){let e=c(2);a("ngForOf",A(1,2,e.travelEventInvitationsQuery.invitationViews$))("ngForTrackBy",e.trackItemId)}}function iu(t,_){if(t&1&&(p(0,eu,3,0,"ng-container",22),P(1,"async"),p(2,nu,2,4,"ng-template",null,3,k)),t&2){let e=V(3),n=c();a("ngIf",A(1,2,n.travelEventInvitationsQuery.totalInvitations$)===0&&n.isFiltered)("ngIfElse",e)}}function ou(t,_){if(t&1){let e=O();r(0,"div",59)(1,"ta-pagination",60),P(2,"async"),P(3,"async"),S("pageChange",function(i){f(e);let l=c();return v(l.onPageChanged(i-1))}),s()()}if(t&2){let e=c();o(),a("activePage",A(2,2,e.travelEventInvitationsQuery.currentPage$)+1)("totalPages",A(3,4,e.travelEventInvitationsQuery.totalPages$))}}function au(t,_){t&1&&zt(0)}var E_=(()=>{class t{get editParticipantSettingsEnabled(){return this.splitService.isOn("ENT_EDIT_PARTICIPANT_SETTINGS")&&this.isInIframe}constructor(e){this.internalAppsCommunicatorService=e,this.isEventSent=!1,this.isEditModeDisabled=!1,this.hasRoomBlocks=!1,this.roomBlockAddedParticipants=0,this.roomBlockMissingParticipants=0,this.teamEventRoomBlocksEnabled=!1,this.teamEventNonRoomBlockBookingEnabled=!1,this.isSelfSellGroupTravelOnboardingEnabled=!1,this.activeTab=!1,this.closeRoomBlockOnlyBanner=new Y,this.downloadingManifest=!1,this.maxAllowedParticipantsNumber=500,this.infoBannerType=bs,this.isFiltered=!1,this.filtersValues=structuredClone(Hi),this.activeFilters=structuredClone(Hi),this.showParticipantsHeader=!0,this.tripsService=M(Is),this.router=M(Je),this.route=M(Ei),this.travelEventInvitationsQuery=M(Tt),this.travelEventInvitationsStore=M(ws),this.taToastrService=M(gt),this.groupTravelApiService=M(Ae),this.travelEventSummaryUtilService=M(ra),this.modalService=M(et),this.travelEventQuery=M(ve),this.invitationsService=M(na),this.sessionQuery=M(vt),this.userComponentService=M(ki),this.splitService=M(Ce),this.tooltipEducationService=M(Xn),this.tourGuideService=M(o_),this.iconRegistry=M(ne),this.isInIframe=Ke(),this.handleEventMessages=n=>{n.origin===window.location.origin&&n.data.type===yt.participantSettingsSaved&&this.onPageChanged(this.travelEventInvitationsQuery.currentPage)},this.shouldShowTeamOffsiteUI=this.travelEventQuery.shouldShowTeamOffsiteUI(),this.TravelEventStatus=ye,this.iconRegistry.registerIcons(wr,mn)}filtersChanged(e){this.activeFilters=e,this.groupTravelApiService.getTravelEventMonitoringInvitations(this.teamEventId,0,e).subscribe(()=>{}),this.isFiltered=JSON.stringify(this.activeFilters)!==JSON.stringify(Hi),this.travelEventInvitationsStore.updateParticipantsFilterApplied(this.isFiltered)}ngOnInit(){this.onPageChanged(0),this.travelEventInvitationsQuery.invitationsStatistics$.subscribe(e=>{this.statusOptions=$a(e.invitationStatusCounts,Zl,this.activeFilters),this.allowedBookingOptions=$a(e.allowedBookingTypeCounts,e_,this.activeFilters)}),this.sessionQuery.selectUserInfo$.subscribe(e=>{this.userInfo=e,this.shouldDisplayEstimate=this.shouldShowTeamOffsiteUI||!this.splitService.isOn("ENT_GROUP_TRAVEL_HIDE_COST_ESTIMATE"),this.isParticipantsUploadEnabled$=this.shouldDisplayParticipantsUpload()}),this.splitService.isOn("ENT_INCREASE_PARTICIPANTS")&&(this.maxAllowedParticipantsNumber=6e3),this.trackParticipantsBanners(),window.addEventListener("message",this.handleEventMessages)}shouldDisplayParticipantsUpload(){return this.travelEventQuery.isActiveEventOffsite$.pipe(Q(e=>this.shouldShowTeamOffsiteUI||!e))}ngOnChanges(e){e.activeTab&&e.activeTab.currentValue&&this.participantsTourGuide()}trackParticipantsBanners(){this.roomBlockAddedParticipants&&N(X.GROUP_TRAVEL_ROOM_BLOCKS_PARTICIPANT_ADDED_BANNER_SHOWN),this.roomBlockMissingParticipants&&N(X.GROUP_TRAVEL_ROOM_BLOCKS_PARTICIPANT_MISSING_BANNER_SHOWN)}
2participantsTourGuide(){let e=this.route.snapshot.queryParams?.tourGuide;this.isSelfSellGroupTravelOnboardingEnabled&&e==="groupTravel"&&(this.showParticipantsHeader=!1,this.travelEventInvitationsQuery.totalInvitations$.pipe(Be(n=>{this.showParticipantsHeader=n>0}),ee(n=>n>0),ce(1)).subscribe(()=>{this.tourGuideService.startTourGuide()}))}downloadManifest(){this.downloadingManifest=!0,this.teamEventName,this.travelEventInvitationsQuery.totalInvitations,this.groupTravelApiService.downloadManifest(this.teamEventId).pipe(He(()=>{this.downloadingManifest=!1})).subscribe(e=>{let{status:n,body:i}=e;if(n===200){let d=`${$localize`Travel-manifest`}-${this.teamEventId}.csv`;Do.downloadFile(new Blob([i]),d),this.taToastrService.success($localize`Successfully downloaded travel manifest.`)}n===202&&this.taToastrService.success($localize`It's taking a bit longer to complete. You will receive an email when it's ready.`)},()=>{this.taToastrService.error($localize`An error occurred while downloading the travel manifest.`)})}openUploadParticipantsModal(){this.openAddParticipantsModal({isUpload:!0})}closeEducationTooltip(){this.tooltipEducationService.emitComponentKey(Pt.TEAM_EVENT_ROOM_BLOCKS_ADD_PARTICIPANTS_POPOVER)}openAddParticipantsModal(e={isUpload:!1}){Ue([this.travelEventQuery.activeEvent$,this.travelEventQuery.isActiveEventOffsite$,this.travelEventInvitationsQuery.totalParticipants$]).pipe(ce(1),ue(([n,i,l])=>{N(X.OPEN_ADD_PARTICIPANTS,{isTestTravelEvent:this.travelEventSummaryUtilService.isTestTravelEvent(n.summary),isRemoteTravelEvent:this.travelEventSummaryUtilService.isRemoteTravelEvent(n.summary)});let d=this.splitService.isOn("ENT_INCREASE_PARTICIPANTS")&&e.isUpload&&!i,u={data:{travelEventId:n.id,isTeamOffsite:i,teamEventRoomBlocksEnabled:this.teamEventRoomBlocksEnabled,totalEventParticipants:l,hasRoomBlocks:this.hasRoomBlocks,bodyElRef:this.bodyElRef,isUpload:e.isUpload,selectedVerticals:this.teamEventNonRoomBlockBookingEnabled?null:{flight:no(n,D.FLIGHT,this.hasRoomBlocks),hotel:no(n,D.HOTEL,this.hasRoomBlocks),car:no(n,D.CAR,this.hasRoomBlocks),trains:no(n,D.RAIL,this.hasRoomBlocks)},disallowGuestsWithEmptyNames:n.sourceType===Os.BOOMPOP},hasBackdrop:!0,closeOnOutsideClick:!1,disableClose:!0};return d?this.modalService.open(m_,u).afterClosed$.pipe(ee(h=>h.result?.isSuccess)):this.modalService.open(c_,u).afterClosed$.pipe(ee(h=>h.result?.isSuccess))})).subscribe(n=>{let{result:i}=n,l=$localize`${i.participants} participants added.`,d=$localize`1 participant added.`;i.participants>1?this.taToastrService.success(l):i.participants===1?this.taToastrService.success(d):this.taToastrService.success($localize`No new participants have been added.`),this.isFiltered?this.filtersChanged(this.activeFilters):this.onPageChanged(this.travelEventInvitationsQuery.currentPage)})}onUpdateLocation({invitationId:e,location:n,invitationEmail:i}){Re(le({},this.eventTrackingDetails),{clickedItem:"updateItemLocation"}),N(X.PARTICIPANT_MANUAL_LOCATION_SELECTION),this.groupTravelApiService.updateInvitation(this.teamEventId,Re(le({},this.travelEventInvitationsQuery.getEntity(e)),{departureLocation:n?Re(le(le({},this.travelEventInvitationsQuery.getEntity(e).departureLocation),n),{companyOfficeId:n.companyOfficeUuid,type:n.companyOfficeUuid?Ui.OFFICE:Ui.PLACE}):null})).subscribe(()=>{this.taToastrService.success($localize`Location was updated`),this.reloadInvitations(i)})}onUpdateAllowedVertical({invitationId:e,vertical:n,isAllowed:i,invitationEmail:l}){Re(le({},this.eventTrackingDetails),{clickedItem:"updateAllowedBookingTypes",clickedBookingType:n,allowedBookingsDetails:Object.keys(this.travelEventInvitationsQuery.getAllowedVerticals)}),N(X.CLICK_PARTICIPANTS_ALLOWED_VERTICALS,{vertical:n,isSelected:i}),this.groupTravelApiService.updateInvitation(this.teamEventId,le({},this.generateAllowedVerticalsPayloadByVertical(this.travelEventInvitationsQuery.getEntity(e),n,i))).subscribe(()=>{this.taToastrService.success($localize`Allowed bookings updated`),this.reloadInvitations(l)})}onResendInvite(e){Re(le({},this.eventTrackingDetails),{clickedItem:"resendEventInvite"}),N(z.PARTICIPANTS_SEND_REMINDER_CLICKED,{[x.VIEW]:H.PARTICIPANTS_MAIN}),this.groupTravelApiService.resendEventInvitationEmail(this.teamEventId,e).subscribe(()=>{this.taToastrService.success($localize`Successfully resent invitation email.`)},()=>{this.taToastrService.error($localize`An error occurred while resending invitation email.`)})}onRemoveParticipant(e){Re(le({},this.eventTrackingDetails),{clickedItem:"removeEventItem"}),this.groupTravelApiService.deleteEventParticipant(this.teamEventId,e.invitationId,!0).subscribe({next:()=>{this.shouldShowParticipantRemovedModal(e)?this.openParticipantRemovedModal(e):this.taToastrService.success($localize`Your participant has been deleted!`),this.onPageChanged(this.travelEventInvitationsQuery.currentPage),this.internalAppsCommunicatorService.participantsUpdated()},error:()=>{this.taToastrService.error($localize`An error occurred while deleting participant.`)}})}openParticipantRemovedModal(e){let n={participantFullName:e.participantFullName,participantFirstName:e.participantFirstName,hasRoomBlock:e.hasRoomBlock,hasOtherBookings:e.hasOtherBookings,hasAnyBookings:e.hasAnyBookings,tripUuid:e.tripUuid};this.modalService.open(d_,{data:n})}trackItemId(e,n){return n.id}onPageChanged(e){this.groupTravelApiService.getTravelEventMonitoringInvitations(this.teamEventId,{page:e},this.activeFilters).subscribe(()=>{})}get totalCostHeaderLabel(){return this.teamEventRoomBlocksEnabled?$localize`Actual travel spend`:this.userInfo.companyHideTripFee?$localize`Travel spend`:$localize`Total paid`}get eventTrackingDetails(){return{source:"editTeamEventItems",eventStatus:this.travelEventQuery.getActive().status||"CONFIGURE",eventItemsAmount:this.travelEventInvitationsQuery.totalInvitations}}generateAllowedVerticalsPayloadByVertical(e,n,i){let l=structuredClone(e),d=i?1:0;switch(n){case D.FLIGHT:l.travelConditions.transportation.flightConditions.numberOfBookingsAllowed=d;break;case D.HOTEL:l.travelConditions.accommodation.hotelConditions.numberOfBookingsAllowed=d;break;case D.RAIL:l.travelConditions.transportation.trainConditions.numberOfBookingsAllowed=d;break;case D.CAR:l.travelConditions.transportation.carConditions.numberOfBookingsAllowed=d;break;default:break}return l}onEditParticipantSettings(e){if(!this.editParticipantSettingsEnabled)return;let n=this.travelEventInvitationsQuery.getEntity(e.invitationId);n&&this.internalAppsCommunicatorService.openParticipantSettings(n,e.participantFullName,e.participantEmail)}reloadInvitations(e){this.sessionQuery.selectUserInfo$.subscribe(n=>{n.email===e&&this.invitationsService.reloadUserInvitations()})}getBannerKey(e){let n=this.userComponentService.getUuidWithoutSpecialChars(this.teamEventId);return`${e}${n}`}get showTotalCost(){return this.isEventSent||this.teamEventRoomBlocksEnabled}ngOnDestroy(){window.removeEventListener("message",this.handleEventMessages)}shouldShowParticipantRemovedModal(e){return this.splitService.isOn("ENT_DISABLE_PROVIDERS_FOR_EVENT_ACCOMMODATION")&&!e.isOffsite&&this.hasRoomBlocks&&(e.hasRoomBlock||e.hasAnyBookings)}static{this.\u0275fac=function(n){return new(n||t)(T(hn))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-users-monitoring"]],inputs:{teamEventId:"teamEventId",teamEventName:"teamEventName",isEventSent:"isEventSent",isEditModeDisabled:"isEditModeDisabled",hasRoomBlocks:"hasRoomBlocks",bodyElRef:"bodyElRef",roomBlockAddedParticipants:"roomBlockAddedParticipants",roomBlockMissingParticipants:"roomBlockMissingParticipants",teamEventRoomBlocksEnabled:"teamEventRoomBlocksEnabled",teamEventNonRoomBlockBookingEnabled:"teamEventNonRoomBlockBookingEnabled",tripUuid:"tripUuid",isSelfSellGroupTravelOnboardingEnabled:"isSelfSellGroupTravelOnboardingEnabled",activeTab:"activeTab"},outputs:{closeRoomBlockOnlyBanner:"closeRoomBlockOnlyBanner"},standalone:!0,features:[At,y],decls:21,vars:31,consts:()=>{let e;e=$localize`:␟36781608ae3be4af30f2c9a1cfff919d11d34667␟7468195194594584006:{VAR_PLURAL, plural, =1 {person added as room block
3      participant during checkout has been automatically added as a participant
4      in this event.} other {people added as room block participants during
5      checkout have been automatically added as participants in this event.}}`,e=Ft(e,{VAR_PLURAL:"\uFFFD1\uFFFD"});let n;n=$localize`:␟889b6078b223598206337b7331a3ec00376d0d45␟47261
577608249148749: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${e}:ICU: `;let i;i=$localize`:␟0d9c6e3131447c381a0d4f769def7e6eadc82701␟1122787259445706401:Participant`;let l;l=$localize`:␟79fcb13bb0eec6df2b84693192763da964dee091␟1967370539977066972:Departing from`;let d;d=$localize`:␟c3bcb609adf9d2472c1c1a399e27790d09bbf6df␟5093503871431721271:Allowed bookings`;let u;u=$localize`:␟81b97b8ea996ad1e4f9fca8415021850214884b1␟5611592591303869712:Status`;let h;h=$localize`:␟ca3fc62ad7b88e5c90eb6fa49bcd6757ac34d3f8␟6149133409751806114: Use the icons below to select the type of bookings needed for each participant. `;let I;I=$localize`:␟aba636e41848471cac017f93d9d4313cc0e6935f␟3766475961363468293: The booking types participants can make for this event (can be edited until bookings are made). `;let F;F=$localize`:␟5d1a6263abea1e2599b7ce015bafcbe29d155477␟5222094120663757753: Estimated travel spend `;let $;$=$localize`:␟d0109f962abf5e68aaae26b8c5f4ec88c5da1323␟7873479648612272206:Participants icon`;let ge;ge=$localize`:␟0eb6be941f24f19ae81dad1179f64cded31a3596␟606750965980508592: No participants have been added `;let W;W=$localize`:␟5f6c8e711953eabf08180fdb2feb54ac1e3e726b␟2095074550191134378: Have your guest list in mind? Add participants now - don’t worry,${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:LINE_BREAK:they won’t be notified until you send invites. `;let oe;oe=$localize`:␟0da7fa518f6adf8f7cb4ecc0e2d73aa9b8c42520␟124873334746046151:Have your guest list in mind?`;let Ie;return Ie=$localize`:␟8a33a8158e6933c4bc21ec1b4f8a06078bf3a3d0␟5067474534816155129:No exact matches found`,[["loadedParticipants",""],["allowedBookings",""],["GuestListEmptyState",""],["haveInvitations",""],n,i,l,d,u,h,I,F,ge,W,oe,Ie,[3,"totalEventParticipantLength","isAddParticipantsButtonLoading","isAddParticipantsDisabled","isTeamOffsite","downloadingManifest","teamEventRoomBlocksEnabled","isParticipantsUploadEnabled","onDownloadManifest","onOpenAddParticipantsModal","onOpenUploadParticipantsModal",4,"ngIf"],["class","users-table__banner",4,"ngIf"],["data-testid","eventsSearchFilter",3,"isUserAdmin","statusOptions","allowedBookingOptions","isEventDraft","filtersChanged",4,"ngIf"],[1,"users-table"],["class","users-table__header",3,"not-invited","users-table__header--room-block","edit-participant-enabled",4,"ngIf"],["class","event-users_empty",3,"event-users_empty--room-block",4,"ngIf"],[4,"ngIf","ngIfElse"],["class","users-pagination",4,"ngIf"],[4,"ngIf"],[3,"onDownloadManifest","onOpenAddParticipantsModal","onOpenUploadParticipantsModal","totalEventParticipantLength","isAddParticipantsButtonLoading","isAddParticipantsDisabled","isTeamOffsite","downloadingManifest","teamEventRoomBlocksEnabled","isParticipantsUploadEnabled"],[1,"users-table__banner"],["icon","info","iconTheme","outline",3,"close","type","showClose","showIcon"],[1,"users-table__banner--info"],["data-testid","eventsSearchFilter",3,"filtersChanged","isUserAdmin","statusOptions","allowedBookingOptions","isEventDraft"],[1,"users-table__header"],[1,"users-table__name"],[1,"users-table__departure"],[1,"users-table__bookings"],["icon","info-small","theme","outline","popoverTrigger","hover",1,"users-table__bookings--info",3,"taPopover","clickable","inline"],[1,"users-table__status"],["class","users-table__estimated-cost",4,"ngIf"],["class","users-table__total-cost",4,"ngIf"],[1,"users-table__remove"],[1,"users-table__edit-participant-settings"],["class","users-table__allowed-bookings",4,"ngIf"],[1,"users-table__allowed-bookings"],[1,"users-table__estimated-cost"],[1,"users-table__total-cost"],[1,"event-users_empty"],["class","event-users_empty--icon","alt",$,3,"src",4,"ngIf"],["class","event-users_empty--text",4,"ngIf"],["class","event-users_empty--text-updated",4,"ngIf"],[1,"event-users_empty--add",3,"openAddParticipantsModal","openUploadParticipantsModal","isAddParticipantsDisabled","isParticipantsUploadEnabled"],["alt",$,1,"event-users_empty--icon",3,"src"],[1,"event-users_empty--text"],[1,"event-users_empty--text-updated"],["class","event-users__skeleton",3,"ngClass",4,"ngFor","ngForOf"],[1,"event-users__skeleton",3,"ngClass"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"n
5o-matches-found"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"updateLocation","updateAllowedVertical","resendInvitation","removeParticipant","editParticipantSettings","index","invitationId","isEditModeDisabled","participantPictureUrl","participantFullName","participantFirstName","participantEmail","isExtraGuestAllowed","departureLocation","invitationStatus","inviteeAction","allowedVerticals","bookedVerticals","costInsights","isLoading","isRevoking","isEventSent","typeIconMap","isOffsite","hasRoomBlocks","teamEventRoomBlocksEnabled","teamEventNonRoomBlockBookingEnabled","tripUuid","isHotelStateDisabledForRoomBlock","participantMissingRoomBlock","participantAddedInRoomBlock","editParticipantSettingsEnabled"],[1,"users-pagination"],[3,"pageChange","activePage","totalPages"]]},template:function(n,i){if(n&1&&(p(0,UE,7,19,"ta-event-users-header",16)(1,wE,4,5,"div",17)(2,VE,1,4,"ta-event-users-filters",18),P(3,"async"),P(4,"async"),r(5,"div",19),p(6,zE,19,11,"div",20),P(7,"async"),P(8,"async"),P(9,"async"),p(10,KE,7,11,"div",21),P(11,"async"),P(12,"async"),p(13,ZE,2,2,"ng-container",22),P(14,"async"),p(15,iu,4,4,"ng-template",null,0,k)(17,ou,4,6,"div",23),P(18,"async"),s(),p(19,au,1,0,"ng-container",24),P(20,"async")),n&2){let l=V(16);a("ngIf",i.showParticipantsHeader),o(),a("ngIf",i.roomBlockAddedParticipants),o(),a("ngIf",!(A(3,11,i.travelEventInvitationsQuery.totalInvitations$)===0&&!i.isFiltered&&i.shouldShowTeamOffsiteUI&&!A(4,13,i.travelEventInvitationsQuery.isLoading$))),o(3),te("users-table--invited",i.showTotalCost),o(),a("ngIf",(A(7,15,i.travelEventInvitationsQuery.totalInvitations$)!==0||A(8,17,i.travelEventInvitationsQuery.totalInvitations$)===0&&i.isFiltered)&&!A(9,19,i.travelEventInvitationsQuery.isLoading$)),o(4),a("ngIf",A(11,21,i.travelEventInvitationsQuery.totalInvitations$)===0&&!i.isFiltered&&!A(12,23,i.travelEventInvitationsQuery.isLoading$)),o(3),a("ngIf",A(14,25,i.travelEventInvitationsQuery.isLoading$))("ngIfElse",l),o(4),a("ngIf",A(18,27,i.travelEventInvitationsQuery.totalPages$)>1),o(2),a("ngIf",A(20,29,i.travelEventInvitationsQuery.batchCostInsights$))}},dependencies:[L,jl,Qs,n_,K,Z,re,Pa,_e,Ht,Jl,Xo,we,fn],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.users-table__banner[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2)}.users-table__banner--info[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;font-family:var(--text-font);line-height:20px}.users-table__banner[_ngcontent-%COMP%]     navan-information-banner .information-banner--info{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;border-radius:var(--dim-step2);border:1px solid var(--color-component-outline-blue);background:var(--ta-color-surface-info)}.users-table__name[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.users-table__name__item[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);border-radius:var(--dim-step1);cursor:pointer;padding:var(--dim-step1)}.users-table__name__item--active[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--active[_ngcontent-%COMP%]{color:var(--ta-color-text-default)}.users-table__name__item--unbooked[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--unbooked[_ngcontent-%COMP%]{color:var(--ta-color-text-disabled)}.users-table__name__item--booked[_ngcontent-%COMP%], .users-table[_ngcontent-%COMP%]   .booking-types__item--booked[_ngcontent-%COMP%]{background:var(--ta-color-surface-success-soft);color:var(--ta-color-text-success);cursor:default!important}.users-table__name__item--booked[_ngcontent-%COMP%]:hover, .users-table[_ngcontent-%COMP%]   .booking-types__item--booked[_ngcontent-%COMP%]:hover{background:var(--ta-color-palette-green-20)}.users-table__name__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked), .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked){color:var(--ta-color-icon-primary)}.users-table__name__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked):active, .users-table[_ngcontent-%COMP%]   .booking-types__item[_ngcontent-%COMP%]:hover:not(.booking-types__item--booked):active{color:var(--ta-color-icon-primary-pressed)}.users-table__details[_ngcontent-%COMP%]{padding-left:var(--dim-step2)}
5.users-table__details-name[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.users-table__details-email[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.users-table__details-plus1[_ngcontent-%COMP%]{color:var(--ta-color-text-highlight);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.users-table__remove[_ngcontent-%COMP%]{visibility:hidden;z-index:1;margin-left:var(--dim-step4);color:var(--ta-color-text-warning)}.users-table__estimated-cost[_ngcontent-%COMP%]{position:relative;height:21px;text-align:right;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;flex-wrap:nowrap}.users-table__total-cost[_ngcontent-%COMP%]{text-align:right;display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.users-table__departure[_ngcontent-%COMP%], .users-table__bookings[_ngcontent-%COMP%]{padding:0 var(--dim-step2);color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;color:var(--ta-color-text-subtle)}.users-table__departure--info[_ngcontent-%COMP%], .users-table__bookings--info[_ngcontent-%COMP%]{position:absolute;top:var(--dim-step5)}.users-table__header[_ngcontent-%COMP%]{display:grid;grid-template-columns:24% 23% 16% 14% 10% 9% 4%;align-items:center;padding:var(--dim-step5) 0;color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;position:relative;border-bottom:1px solid var(--ta-color-divider-default);margin:0 -40px 0 -32px;padding:var(--dim-step5) var(--dim-step10) var(--dim-step5) var(--dim-step8)}.users-table__header.not-invited[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 14% 15% 4%}.users-table__header.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 16% 13% 9% 9% 3% 3%}.users-table__header.not-invited.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 13% 14% 3% 3%}.users-table__header--room-block[_ngcontent-%COMP%]{grid-template-columns:24% 20% 20% 13% 9% 9% 3% 3%;border-top:1px solid var(--ta-color-border-disabled);border-bottom:1px solid var(--ta-color-border-disabled)}.users-table__remove-location[_ngcontent-%COMP%]{z-index:1;color:var(--ta-color-text-subtle)}.users-table__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:24% 23% 16% 14% 10% 9% 4%;align-items:center;padding:var(--dim-step5) 0;border-bottom:1px solid var(--ta-color-divider-default);margin:0 -40px;padding:var(--dim-step5) 40px;word-break:break-word;min-height:58px}.users-table__row.not-invited[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 14% 15% 4%}.users-table__row.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 16% 13% 9% 9% 3% 3%}.users-table__row.not-invited.edit-participant-enabled[_ngcontent-%COMP%]{grid-template-columns:24% 23% 20% 13% 14% 3% 3%}.users-table__row[_ngcontent-%COMP%]:hover{background:var(--ta-color-surface-neutral)}.users-table__row[_ngcontent-%COMP%]:hover     ta-spinner{background:var(--ta-color-surface-neutral)}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__bookings[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .users-table__departure[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .booking-types__item[_ngcontent-%COMP%]{color:var(--ta-color-icon-primary);cursor:pointer}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__bookings--booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .users-table__departure--booked[_ngcontent-%COMP%], .users-table__row[_ngcontent-%COMP%]:hover   .booking-types__item--booked[_ngcontent-%COMP%]{color:var(--ta-color-icon-success)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.users-table__departure[_ngcontent-%COMP%]{color:var(--ta-color-text-default)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.users-table__departure[_ngcontent-%COMP%]     .ta-tag{color:var(--ta-color-text-default);background:var(--ta-color-surface-default)}.users-table__row[_ngcontent-%COMP%]:hover   .declined-disabled.booking-types__item[_ngcontent-%COMP%]{color:var(--color-grey-0)}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__remove[_ngcontent-%COMP%]{visibility:visible}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__remove.disabled[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);pointer-events:none;cursor:initial}.users-table__row[_ngcontent-%COMP%]:hover   .users-table__edit-participant-settings[_ngcontent-%COMP%]{visibility:visible}.users-table__row[_ngcontent-%COMP%]   .declined-disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.5;cursor:default}.users-table__row[_ngcontent-%COMP%]   .declined-disabled.users-table__departure[_ngcontent-%COMP%]     .ta-tag{color:var(--ta-color-text-subtle);background:var(--ta-color-surface-default)}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)!important;cursor:default!important;pointer-events:auto}.users-table__row[_ngcontent-%COMP%]   .declined-disabled__room-block[_ngcontent-%COMP%]:active{background:unset}.users-table--invited[_ngcontent-%COMP%]   .users-table__status[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.users-table.read-only[_ngcontent-%COMP%]   .users-table__departure[_ngcontent-%COMP%], .users-table.read-only[_ngcontent-%COMP%]   .users-table__bookings[_ngcontent-%COMP%]{pointer-events:none}.tag-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step1)}
5.per-diem[_ngcontent-%COMP%]{margin-top:var(--dim-step6);display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.per-diem__per-person[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.per-diem__amount[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.cost-estimation[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-top:var(--dim-step6)}.cost-estimation__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.cost-estimation__description[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.cost-estimation__total[_ngcontent-%COMP%]{position:relative;color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start}.send-invite-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-primary)}.info-icon[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);cursor:pointer;pointer-events:auto;z-index:3}.info-icon[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}  .users-table__departure .ta-form-wrap{margin-bottom:0!important}  .users-table__allowed-bookings{padding:var(--dim-step4) var(--dim-step5);max-width:300px}.status-info[_ngcontent-%COMP%]{max-width:340px;padding:var(--dim-step4) var(--dim-step5)}.status-info__title[_ngcontent-%COMP%]{margin-bottom:var(--dim-step3)}.status-info__bold[_ngcontent-%COMP%]{margin:var(--dim-step1) 0;color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.status-info__grey[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);word-break:break-word}.event-users__skeleton[_ngcontent-%COMP%]{height:100px;overflow:hidden;margin:0 -40px 0 -32px;position:relative;background-color:var(--ta-color-surface-default);border-bottom:1px solid var(--ta-color-border-default)}.skeleton-row[_ngcontent-%COMP%]{position:absolute;background-color:var(--ta-color-surface-default);animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:_ngcontent-%COMP%_placeHolderShimmer;animation-timing-function:linear;background:var(--ta-color-surface-neutral);background-image:linear-gradient(to right,#f6f7f8,#edeef1 20%,#f6f7f8 40% 100%);background-repeat:no-repeat}.skeleton-row--item-0[_ngcontent-%COMP%]{width:36px;height:36px;border-radius:50%;left:40px;top:30px}.skeleton-row--item-1[_ngcontent-%COMP%]{width:120px;height:16px;left:87px;top:33px}.skeleton-row--item-2[_ngcontent-%COMP%]{width:169px;height:8px;left:87px;top:56px}.skeleton-row--item-3[_ngcontent-%COMP%]{width:160px;height:16px;left:300px;top:40px}.skeleton-row--item-4[_ngcontent-%COMP%]{width:124px;height:24px;top:35px;left:545px}.skeleton-row--item-5[_ngcontent-%COMP%]{left:641px}.skeleton-row--item-6[_ngcontent-%COMP%]{width:100px;height:25px;right:285px;top:35px}.skeleton-row--item-7[_ngcontent-%COMP%]{width:70px;height:25px;right:100px;top:35px}.skeleton-row--item-8[_ngcontent-%COMP%]{display:none;width:70px;height:25px;top:35px}.event-users__skeleton--total-cost[_ngcontent-%COMP%]   .skeleton-row--item-6[_ngcontent-%COMP%]{right:325px}.event-users__skeleton--total-cost[_ngcontent-%COMP%]   .skeleton-row--item-7[_ngcontent-%COMP%]{right:203px}.event-users__skeleton--total-cost[_ngcontent-%COMP%]   .skeleton-row--item-8[_ngcontent-%COMP%]{display:block;right:70px}.allowed-bookings-divider-0[_ngcontent-%COMP%], .allowed-bookings-divider-1[_ngcontent-%COMP%], .allowed-bookings-divider-2[_ngcontent-%COMP%]{position:absolute;width:4px;height:24px;top:35px;background-color:var(--ta-color-surface-default)}.allowed-bookings-divider-0[_ngcontent-%COMP%]{right:550px}.allowed-bookings-divider-1[_ngcontent-%COMP%]{right:487px}.allowed-bookings-divider-2[_ngcontent-%COMP%]{right:518px}.users-pagination[_ngcontent-%COMP%]{padding:var(--dim-step8)}.event-users_empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;height:400px;margin:0 -40px;border-bottom:1px solid var(--ta-color-divider-default)}.event-users_empty--text[_ngcontent-%COMP%]{color:var(--color-grey-1);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start}.event-users_empty--text-updated[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-big);font-weight:var(--text-weight-regular);text-align:start;padding-top:var(--dim-step4);text-align:center}.event-users_empty--icon[_ngcontent-%COMP%]{width:56px;height:auto}.event-users_empty--add[_ngcontent-%COMP%]{margin-top:var(--dim-step4)}.event-users_empty--room-block[_ngcontent-%COMP%]{border-top:1px solid var(--ta-color-border-disabled);border-bottom:1px solid var(--ta-color-border-disabled)}.no-matches-found[_ngcontent-%COMP%]{border-bottom:1px solid var(--ta-color-divider-default);margin:0 -40px 0 -32px;padding:116px 0;color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;font-family:var(--text-font);display:flex;flex-direction:column;justify-content:center;align-items:center}"]})}}return t})();E();E();E();var u_=(()=>{class t{constructor(e,n){this.iconRegistrySrv=e,this.modalService=n,this.iconRegistrySrv.registerIcons(Vr,fo,go,uo,vo,Mr)}get header(){return $localize`Preview invites`}onCloseModalClick(){this.modalService&&this.modalService.close()}static{this.\u0275fac=function(n){return new(n||t)(T(ne),T(et))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-preview-invites-modal"]],standalone:!0,features:[y],decls:96,vars:4,consts:()=>{let e;e=$localize`:␟2c903f92c3912cfbd7809844d6630596c87c9079␟4654046866857037877:Navan logo`;let n;
5n=$localize`:␟ed5e891d1d7bda7a6cb0e7cfedf86950de8d14cd␟1100763742473920907:Preview invites`;let i;i=$localize`:␟7b11924339e313273cfc60ece3d3d71465cf361b␟2166299016947875331:You’re invited!`;let l;l=$localize`:␟14da3cff5dc8f0725816539308934a5a94befbbe␟4522524607038570404:Hi there,`;let d;d=$localize`:␟63f3f12269650787a62c183d09be28b81efeac25␟1640887497650857210:[Organizer name] has invited you to book travel for an event called ${"\uFFFD#18\uFFFD"}:START_TAG_SPAN:[Event name].${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPAN:`;let u;u=$localize`:␟f42aac9e26d440ff31d692202e96af589f2bb33a␟3152748882184123697:View the details below and start booking your trip. If you can’t attend, please let the organizer know by declining this invitation.`;let h;h=$localize`:␟c9d9213ccc29251610c168127508f5901c55aa37␟7126088575212242890:Event image will display here`;let I;I=$localize`:␟5859c64c8efdb42bc097621f55348ea8ac42ddca␟5844179461754011142:Event name`;let F;F=$localize`:␟976113759726a7cb1a403d791eb80c72784940db␟8767009126832246705:Event location`;let $;$=$localize`:␟d5e0dbc9fd4651759df915cdc6ba26fe3f17475f␟5203279511751768967:From`;let ge;ge=$localize`:␟8c280474dbc29171e5cf79a7409c5b4d5f570add␟1543174588349333271:${"\uFFFD#37\uFFFD"}:START_TAG_SPAN:[Event start date]${"\uFFFD/#37\uFFFD"}:CLOSE_TAG_SPAN: at [start time]`;let W;W=$localize`:␟f0bfb92c87d07802f6049605f7982dbee13d8694␟928186931058297788:Schedule transportation to arrive by [custom time]`;let oe;oe=$localize`:␟63c9c3aa536dbd11120ae8feab62186c47838028␟1640609344969975994:To`;let Ie;Ie=$localize`:␟3945abb74dbd42986d79f81be2a9435ff227c069␟3516500989232685141:${"\uFFFD#45\uFFFD"}:START_TAG_SPAN:[Event end date]${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPAN: at [end time]`;let ae;ae=$localize`:␟b3d0978864e1246488e843b24a3f67f274c032d7␟4273337565935250073:Schedule transportation to depart after [custom time]`;let It;It=$localize`:␟a02ea1d4e7424ca989929da5e598f379940fdbf2␟7410432243549869948:Duration`;let Le;Le=$localize`:␟ace85bd4cf789cbf9387561f6dbdc17a11b30e71␟7795402667845014388:${"\uFFFD#53\uFFFD"}:START_TAG_SPAN:[Number] nights${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_SPAN:`;let _n;_n=$localize`:␟7db145a9e9e2288bc3930549da1bc8360d2cf91b␟7587144464403338178:Travel allowed between`;let cn;cn=$localize`:␟a17bf2e9235fbfcd29aa551f3068fc46b6686d35␟1998475110102032590:${"\uFFFD#59\uFFFD"}:START_TAG_SPAN:[Custom date] - [Custom date]${"\uFFFD/#59\uFFFD"}:CLOSE_TAG_SPAN:`;let ke;ke=$localize`:␟a8bd8c8a3b0b40a5abda8fe795df2d085e69cb59␟302945217371193003:Allowed bookings ${"\uFFFD#63\uFFFD"}:START_TAG_SPAN:(custom to each participant based on your selection)${"\uFFFD/#63\uFFFD"}:CLOSE_TAG_SPAN:`;let Rn;Rn=$localize`:␟5d22f438d297893d2d9cbff6a61aab669539af5c␟4135380896720323045:Booked on your behalf ${"\uFFFD#76\uFFFD"}:START_TAG_SPAN:(if you booked room block for the participant)${"\uFFFD/#76\uFFFD"}:CLOSE_TAG_SPAN:`;let bn;bn=$localize`:␟aaf2c5b2520258c764eb819d03d81342b471f71f␟1816914899196295531:${"\uFFFD#79\uFFFD"}:START_TAG_SPAN:[Hotel name]${"\uFFFD/#79\uFFFD"}:CLOSE_TAG_SPAN:`;let qn;qn=$localize`:␟68dbcaded0b8396eb032ebbc73830a124a7b95b1␟6447031000599572529:${"\uFFFD#82\uFFFD"}:START_TAG_SPAN:Address, City, State, Zip, Country${"\uFFFD/#82\uFFFD"}:CLOSE_TAG_SPAN:`;let Jn;Jn=$localize`:␟70792dc58b66c897add1e85d7ca546d4d00610fa␟9203801203319304509:View itinerary`;let Zn;Zn=$localize`:␟1633fb2312d293d0066ae8a0832e28356ea8235b␟5922089942637518810:A note from Jennifer${"\uFFFD#89\uFFFD"}:START_TAG_SPAN:(shown only if you have aded a note in Settings)${"\uFFFD/#89\uFFFD"}:CLOSE_TAG_SPAN:`;let ei;ei=$localize`:␟00216febae5feab7cfb5c16ced7dbd659397af78␟3667286862836132255:This is where your custom note will be displayed.`;let ti;ti=$localize`:␟5ddfcb49af0845bea4f17fa2660c0dec1602537d␟5919828429551818296:Start booking`;let ni;return ni=$localize`:␟590c0e3e376160db33a4038ca521431f7a83517c␟3611557686554210994:Decline event`,[n,i,l,d,u,h,I,F,$,ge,W,oe,Ie,ae,It,Le,_n,cn,ke,Rn,bn,qn,Jn,Zn,ei,ti,ni,[3,"sidePadding"],[1,"preview-invites-modal__header"],[1,"preview-invites-modal__header-title"],[1,"preview-invites-modal__header-icon-wrapper"],["icon","cross-filled","size","regular",3,"click"],[1,"preview-invites-modal__body"],[1,"preview-invites-modal__logo-wrapper"],["alt",e,"height","50",1,"preview-invites-modal__logo",3,"src"],[1,"preview-invites-modal__row"],[1,"preview-invites-modal__body-title"],[1,"preview-invites-modal__text","preview-invites-modal__text--double-spacing"],[1,"preview-invites-modal__text--medium"],[1,"preview-invites-modal__text"],[1,"preview-invites-modal__event-image"],[1,"preview-invites-modal__event-image-icon"],["icon","img","size","small"],[1,"preview-invites-modal__event-image-text"],[1,"preview-invites-modal__event-name-title"],[1,"preview-invites-modal__text--link"],[1,"preview-invites-modal__text","preview-invites-modal__text--spacing"],[1,"preview-invites-modal__text--secondary"],[1,"preview-invites-modal__allowed-bookings"],[1,"allowed-booking-icon-wrapper"],["icon","booking-type-flight-filled","size","small"],["icon","booking-type-hotel-filled","size","small"],["icon","booking-type-train-filled","size","small"],["icon","booking-type-car-filled","size","small"],[1,"preview-invites-modal__note"],[1,"preview-invites-modal__note-text"],[1,"preview-invites-modal__note-disclaimer"],[1,"preview-invites-modal__start-booking-cta"],[1,"preview-invites-modal__decline-event-cta"]]},template:function(n,i){n&1&&(r(0,"ta-modal",27)(1,"div",28)(2,"div",29),g(3,0),s(),r(4,"div",30)(5,"ta-icon-v2",31),S("click",function(){return i.onCloseModalClick()}),s()()(),r(6,"div",32)(7,"div",33),m(8,"img",34),P(9,"cdnImage"),s(),r(10,"div",35)(11,"div",36),g(12,1),s()(),r(13,"div",35)(14,"div",37),g(15,2),s(),r(16,"div",37),de(17,3),m(18,"span",38),pe(),s(),r(19,"div",39),g(20,4),s()(),r(21,"div",35)(22,"div",40)(23,"div",41),m(24,"ta-icon-v2",42),s(),r(25,"div",43),g(26,5),s()()(),r(27,"div",35)(28,"div",44),g(29,6),s(),r(30,"div",45),g(31,7),s()(),r(32,"div",35)(33,"div",46),g(34,8),s(),r(35,"div",46),de(36,9),m(37,"span",38),pe(),s(),r(38,"div",47),g(39,10),s()(),r(40,"div",35)(41,"div",46),g(42,11),s(),r(43,"div",46),de(44,12),m(45,"span",38),pe(),s(),r(46,"div",47),g(47,13),s()(),r(48,"div",35)(49,"div",46),g(50,14),s(),r(51,"div",39),de(52,15),m(53,"span",38),pe(),s()(),r(54,"div",35)(55,"div",46),g(56,16),s(),r(57,"div",39),de(58,17),m(59,"span",38),pe(),s()(),r(60,"div",35)(61,"div",46),de(62,18),m(63,"span",47),pe(),s(),r(64,"div",48)(65,"div",49),m(66,"ta-icon-v2",50),s(),r(67,"div",49),m(68,"ta-icon-v2",51),s(),r(69,"div",49),m(70,"ta-icon-v2",52),s(),r(71,"div",49),m(72,"ta-icon-v2",53),s()()(),r(73,"div",35)(74,"div",46),de(75,19),m(76,"span",47),pe(),s(),r(77,"div",46),de(78,20),m(79,"span",38),pe(),s(),r(80,"div",46),de(81,21),m(82,"span",47),pe(),s(),r(83,"div",45),g(84,22),s()(),r(85,"div",35)(86,"div",54)(87,"div",55),de(88,23),m(89,"span",56),pe(),s(),r(90,"div",39),g(91,24),s()()(),r(92,"div",57),g(93,25),s(),r(94,"div",58),g(95,26),s()()()),n&2&&(a("sidePadding",!1),o(8),oi("src",A(9,2,"logos/navan/navan-default.svg"),ze))},dependencies:[Ze,K,Z,fn],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.preview-invites-modal   [_nghost-%COMP%]     .ta-modal-body{position:sticky;overflow:hidden;z-index:0}.preview-invites-modal[_ngcontent-%COMP%]   .preview-invites-modal__event-image-text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:var(--ta-color-text-secondary, #68687d);line-height:20px;font-family:var(--main-font)}.preview-invites-modal__text[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-regular);line-height:24px;color:var(--color-text-default, #131316);font-family:var(--main-font)}.preview-invites-modal__text--secondary[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-small);font-weight:var(--text-weight-regular);line-height:20px;color:var(--ta-color-text-secondary, #68687d);font-family:var(--main-font)}
5.preview-invites-modal__text--medium[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.preview-invites-modal__text--spacing[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2)}.preview-invites-modal__text--double-spacing[_ngcontent-%COMP%]{margin-bottom:var(--dim-step4)}.preview-invites-modal__text--link[_ngcontent-%COMP%]{font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);color:var(--color-text-primary, #7610c6);line-height:24px;text-decoration:underline;margin-bottom:var(--dim-step6)}.preview-invites-modal__header[_ngcontent-%COMP%]{border-bottom:1px solid var(--ta-color-divider-default, #c7c6d6);padding:var(--dim-step10) var(--dim-step10) var(--dim-step6) var(--dim-step10);display:flex;justify-content:space-between}.preview-invites-modal__header-title[_ngcontent-%COMP%]{font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);font-family:var(--main-font);line-height:36px;color:var(--color-text-default)}.preview-invites-modal__header-icon-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;color:var(--ta-color-text-secondary, #68687d)}.preview-invites-modal__row[_ngcontent-%COMP%], .preview-invites-modal__row--spacing[_ngcontent-%COMP%]{margin-bottom:var(--dim-step6)}.preview-invites-modal__logo-wrapper[_ngcontent-%COMP%]{margin-bottom:var(--dim-step10)}.preview-invites-modal__body[_ngcontent-%COMP%]{width:600px;padding:var(--dim-step10) var(--dim-step8) var(--dim-step10) var(--dim-step10);box-sizing:border-box;overflow-y:scroll;max-height:700px}.preview-invites-modal__body[_ngcontent-%COMP%]   .allowed-booking-icon-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;width:36px;height:36px;border-radius:var(--radius-medium);border:1px solid var(--ta-color-border-pressed, #a6a6bb);background-color:#fff;margin-right:var(--dim-step2)}.preview-invites-modal__body[_ngcontent-%COMP%]   .allowed-booking-icon-wrapper[_ngcontent-%COMP%]:last-child{margin-right:0}.preview-invites-modal__body-title[_ngcontent-%COMP%]{font-family:nvn-heading,Sanomat,sans-serif;font-size:var(--text-size-xxh);color:var(--ta-color-text-default);font-weight:var(--text-weight-medium);line-height:var(--line-height-large);margin:0}.preview-invites-modal__invite-text[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-regular);line-height:24px;color:var(--color-text-default, #131316);font-family:var(--main-font)}.preview-invites-modal__logo[_ngcontent-%COMP%]{width:104px;height:24px}.preview-invites-modal__event-image[_ngcontent-%COMP%]{width:100%;height:135px;border-radius:var(--radius-small);background-color:var(--light-action-secondary-hovered, #ebeaf0);display:flex;justify-content:center;align-items:center;flex-direction:column}.preview-invites-modal__event-name-title[_ngcontent-%COMP%]{font-size:var(--text-size-xl);font-weight:var(--text-weight-xb);color:var(--color-text-default, #131316);line-height:36px;font-family:var(--main-font);margin-bottom:var(--dim-step2)}.preview-invites-modal__note[_ngcontent-%COMP%]{margin-bottom:var(--dim-step6);border-radius:var(--radius-small, 8px);border:1px solid var(--ta-color-border-default-pressed, #a6a6bb);height:96px;padding:var(--dim-step4);display:flex;flex-direction:column;justify-content:center;box-sizing:border-box}.preview-invites-modal__note-text[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-medium);line-height:24px;color:var(--ta-color-text-default, #131316);font-family:var(--main-font);border-bottom:1px solid var(--ta-color-border-disabled, #c7c6d6);padding-bottom:var(--dim-step2);margin-bottom:var(--dim-step2)}.preview-invites-modal__note-disclaimer[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-small);font-weight:var(--text-weight-regular);line-height:20px;color:var(--ta-color-text-secondary, #68687D);margin-left:var(--dim-step2)}.preview-invites-modal__start-booking-cta[_ngcontent-%COMP%]{height:44px;display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;border-radius:var(--radius-medium);background-color:#ebeaf0;color:var(--color-border-secondary, #c7c6d6);font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-medium);line-height:24px;margin-bottom:var(--dim-step2)}.preview-invites-modal__decline-event-cta[_ngcontent-%COMP%]{height:44px;display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;box-sizing:border-box;width:100%;border-radius:var(--radius-medium);border:1px solid var(--light-action-secondary-hovered, #ebeaf0);color:var(--color-border-secondary, #c7c6d6);font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-medium);line-height:24px}.preview-invites-modal__allowed-bookings[_ngcontent-%COMP%]{display:flex;margin-bottom:var(--dim-step6)}"]})}}return t})();var ru=()=>({placeAt:"right"}),su=t=>({width:300,placement:t}),lu=(t,_)=>({clickedItem:"goToManagerDashboard",source:"teamEvent",eventStatus:t,eventItemsAmount:_});function _u(t,_){if(t&1&&m(0,"ta-tag-v2",14),t&2){let e=_.ngIf;a("label",e.text)("type",e.color)("popoverConfig",me(5,su,Se(4,ru)))("taPopover",e.popoverText)}}function cu(t,_){if(t&1&&(r(0,"div",4),m(1,"ta-icon-v2",15),r(2,"p")(3,"span",16),C(4),P(5,"date"),s(),r(6,"span",17),C(7),s(),m(8,"ta-icon-v2",18),r(9,"span",16),C(10),P(11,"date"),s(),r(12,"span",17),C(13),s()()()),t&2){let e=_.ngIf,n=c(2);o(4),G(Ot(5,4,e.from,"dowMDY")),o(3),B("\xA0",n.getTimeString(e.from),""),o(3),G(Ot(11,7,e.to,"dowMDY")),o(3),B("\xA0",n.getTimeString(e.to),"")}}function du(t,_){if(t&1){let e=O();r(0,"ta-button-v2",19),S("clickEvent",function(){f(e);let i=c(2);return v(i.onPreviewInvitesClick())}),s()}}function pu(t,_){if(t&1){let e=O();r(0,"ta-button-v2",20),S("clickEvent",function(){f(e);let i=c(2);return v(i.onSendInvitesClick())}),s()}if(t&2){let e=c(2);te("joyride-step-active",e.isJoyrideStepActive("group-travel-send-invites")),a("kind",e.getSendInvitesButtonKind())("type",e.getSendInvitesButtonType())("disabled",e.disableSendInvites)("stepContent",e.tourGuideStepRef==null?null:e.tourGuideStepRef.customContent)("counterTemplate",e.tourGuideStepRef==null?null:e.tourGuideStepRef.counter)}}function mu(t,_){if(t&1){let e=O();r(0,"div",10)(1,"ta-button-v2",21),S("clickEvent",function(){f(e);let i=c(2);return v(i.goToManagerDashboard())}),s()()}if(t&2){let e=c().ngIf,n=c();o(),a("taTrack",tt(1,lu,e.status,n.travelEventInvitationsQuery.totalInvitations))}}function Eu(t,_){if(t&1&&(r(0,"div",1),m(1,"img",2),r(2,"div",3)(3,"div",4)(4,"h1",5),C(5),s(),p(6,_u,1,7,"ta-tag-v2",6),s(),r(7,"div",4),m(8,"ta-icon-v2",7),r(9,"p",8),C(10),s()(),p(11,cu,14,10,"div",9),P(12,"async"),s(),r(13,"div",10),p(14,du,1,0,"ta-button-v2",11)(15,pu,1,7,"ta-button-v2",12),s(),p(16,mu,2,4,"div",13),P(17,"async"),P(18,"async"),s()),t&2){let e=_.ngIf,n=c();te("team-events-header--cta",n.showSendInvites),o(),a("src",n.groupTravelUtilService.getLargeEventPicture(e.summary.pictureUrl),ze),o(4),B(" ",e.summary.name," "),o(),a("ngIf",n.groupTravelUtilService.getEventStatusTagData()[e.status]),o(4),G(e.summary.location.formattedAddress),o(),a("ngIf",A(12,10,n.travelEventQuery.activeEventDateRange$)),o(3),a("ngIf",n.isSelfSellGroupTravelOnboardingEnabled),o(),a("ngIf",n.showSendInvites),o(),a("ngIf",!A(17,12,n.travelEventQuery.isActiveEventOffsite$)&&!A(18,14,n.travelEventQuery.isActiveEventDraft$))}}var g_=(()=>{class t{constructor(){this.travelEventQuery=M(ve),this.travelEventInvitationsQuery=M(Tt),this.groupTravelUtilService=M(nn),this.datePipe=M(po),this.modalService=M(et),this.tooltipEducationService=M(Xn),this.tourGuideRefService=M(Fi),this.iconRegistry=M(ne),this.teamEventRoomBlocksEnabled=!1,this.isSelfSellGroupTravelOnboardingEnabled=!1,this.sendInvitesClick=new Y,this.iconRegistry.registerIcons(So,ho,Oo,vi)}ngOnInit(){this.tourGuideStepRef=this.tourGuideRefService.tourGuideStepRef}getTimeString(e){return $localize`at`+" "+this.datePipe.transform(e,"shortTime")?.toLowerCase()}goToManagerDashboard(){this.travelEventQuery.activeEvent$.subscribe(e=>window.location.href=`/app/admin2/manager/dashboard?eventUuid=${e.id}`),N(X.MANAGER_DASHBOARD_CLICKED),N(z.EVENT_MANAGER_DASHBOARD_CLICKED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS})}onSendInvitesClick(){N(z.EVENT_INVITES_SENT,{[x.VIEW]:Vi(this.activeTab)}),this.tooltipEducationService.emitComponentKey(Pt.TEAM_EVENT_ROOM_BLOCKS_SEND_INVITES_POPOVER),this.modalService.open(pa,{data:{hasRoomBlocks:this.hasRoomBlocks,isOffsite:this.isOffsite}}).afterClosed$.subscribe(({type:n,result:i})=>{n==="close"&&i&&this.sendInvitesClick.emit()})}onPreviewInvitesClick(){N(X.GROUP_TRAVEL_PREVIEW_INVITES_CLICK,{},!0),this.modalService.open(u_,{panelClass:"preview-invites-modal"})}getSendInvitesButtonKind(){return!this.disableSendInvites&&this.isSelfSellGroupTravelOnboardingEnabled?"default":"outline"}getSendInvitesButtonType(){return!this.disableSendInvites&&this.isSelfSellGroupTravelOnboardingEnabled?"primary":"neutral"}isJoyrideStepActive(e){return this.isSelfSellGroupTravelOnboardingEnabled&&e===this.tourGuideStepRef?.currentStepName}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-header"]],inputs:{showSendInvites:"showSendInvites",disableSendInvites:"disableSendInvites",hasRoomBlocks:"hasRoomBlocks",teamEventRoomBlocksEnabled:"teamEventRoomBlocksEnabled",isSelfSellGroupTravelOnboardingEnabled:"isSelfSellGroupTravelOnboardingEnabled",activeTab:"activeTab",isOffsite:"isOffsite"},outputs:{sendInvitesClick:"sendInvitesClick"},standalone:!0,features:[y],decls:2,vars:3,consts:()=>{let e;e=$localize`:␟05544b1c8f96b6832dc2a8344a8d004c800bb049␟1207641046713737233:Event location image`;let n;
5n=$localize`:␟ed5e891d1d7bda7a6cb0e7cfedf86950de8d14cd␟1100763742473920907:Preview invites`;let i;i=$localize`:␟a58b19aa543b675ed7d1208af5ca3e03e44f7685␟4976965009176595392:Send invites`;let l;return l=$localize`:␟9642eceb415d126dfe49729bd7ea38e7699d2c92␟4999415897086413521:Manager dashboard`,[["class","team-events-header",3,"team-events-header--cta",4,"ngIf"],[1,"team-events-header"],["alt",e,1,"team-events-header--picture",3,"src"],[1,"team-events-header__content"],[1,"team-events-header__row"],["data-testid","eventNameTitle",1,"event-name-rebrand"],["popoverTrigger","hover","theme","soft",3,"label","type","popoverConfig","taPopover",4,"ngIf"],["icon","location-pin"],[1,"team-events-header__row--address"],["class","team-events-header__row",4,"ngIf"],[1,"team-events-header__cta"],["kind","outline","type","default","size","large","text",n,"data-testid","group-travel-preview-invites",3,"clickEvent",4,"ngIf"],["class","team-events-header__cta-send-invites","size","large","text",i,"data-testid","sendInvites","joyrideStep","group-travel-send-invites",3,"kind","type","disabled","stepContent","counterTemplate","joyride-step-active","clickEvent",4,"ngIf"],["class","team-events-header__cta",4,"ngIf"],["popoverTrigger","hover","theme","soft",3,"label","type","popoverConfig","taPopover"],["icon","date"],[1,"team-events-header__row--date"],[1,"team-events-header__row--time"],["icon","arrow-right-small",1,"display-title__label"],["kind","outline","type","default","size","large","text",n,"data-testid","group-travel-preview-invites",3,"clickEvent"],["size","large","text",i,"data-testid","sendInvites","joyrideStep","group-travel-send-invites",1,"team-events-header__cta-send-invites",3,"clickEvent","kind","type","disabled","stepContent","counterTemplate"],["icon","chart-donut","kind","outline","size","large","text",l,"data-testid","goToManagerDashboardButton",3,"clickEvent","taTrack"]]},template:function(n,i){n&1&&(p(0,Eu,19,16,"div",0),P(1,"async")),n&2&&a("ngIf",A(1,1,i.travelEventQuery.activeEvent$))},dependencies:[L,Jt,qt,re,K,Z,ie,Ee,No,Mo,Bn,we,Gn],styles:['@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.team-events-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step6);margin:var(--dim-step10) 0 var(--dim-step6)}.team-events-header--cta[_ngcontent-%COMP%]{align-items:start}.team-events-header--picture[_ngcontent-%COMP%]{height:136px;width:136px;border-radius:var(--dim-step2);object-fit:cover}.team-events-header__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:normal;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step3)}.team-events-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-weight:var(--text-weight-xb);font-size:var(--text-size-xxh);line-height:44px;margin:0 var(--dim-step2) 0 0}.team-events-header__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap}.team-events-header__row[_ngcontent-%COMP%] > ta-icon-v2[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.team-events-header__row[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin:0}.team-events-header__row--time[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}.team-events-header__row--address[_ngcontent-%COMP%], .team-events-header__row--date[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.team-events-header__cta[_ngcontent-%COMP%]{margin-left:auto;white-space:nowrap;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.team-events-header__cta[_ngcontent-%COMP%]   ta-button-v2[_ngcontent-%COMP%]{margin-left:var(--dim-step4)}.team-events-header[_ngcontent-%COMP%]   .event-name-rebrand[_ngcontent-%COMP%]{font-family:nvn-heading,Sanomat}.team-events-header__cta-send-invites.joyride-step-active[_ngcontent-%COMP%]{background-color:#3b5560b3}.team-events-header__cta-send-invites.joyride-step-active[_ngcontent-%COMP%]:before{content:"";background:#d9d9d9;border-radius:16px}']})}}return t})();E();E();E();E();function uu(t,_){if(t&1&&m(0,"ta-select-option",22),t&2){let e=_.$implicit;a("label",e.name)("value",e.uuid)}}function gu(t,_){if(t&1&&(r(0,"ta-form-wrap",19)(1,"ta-select",20),p(2,uu,1,2,"ta-select-option",21),s()()),t&2){let e=c();o(),a("showLabel",!0),o(),a("ngForOf",e.eventData.eventTypesList)}}function fu(t,_){if(t&1){let e=O();r(0,"ta-button-v2",23),S("clickEvent",function(){f(e);let i=c();return v(i.onCancelEvent())}),s()}if(t&2){let e=c();a("text",e.cancelLabel)("loading",e.loading)}}var f_=(()=>{class t{constructor(e,n,i,l,d,u,h,I,F,$,ge){this.modalRef=e,this.fb=n,this.travelEventQuery=i,this.groupTravelApiService=l,this.groupTravelModalsService=d,this.groupTravelAnalyticsService=u,this.router=h,this.toastrService=I,this.splitSvc=F,this.groupTravelUtilService=$,this.iconRegistry=ge,this.formValid=!1,this.loading=!1,this.range=new Qi,this.minmaxRange={from:We.nowDate()},this.hideDeleteButton=Ke(),this.eventData={id:"",status:"",eventName:"",eventType:"",location:{placeId:""},dateRange:{from:null,to:null},eventTypesList:[]},this.startDatePlaceholder=$localize`Start date`,this.endDatePlaceholder=$localize`End date`,this.dateConfig1={calendarConfig:{twoMonths:!0,attachTo:".edit-event-modal__calender-anchor-sm",minRange:0},showArrows:!1},this.dateConfig2={calendarConfig:{twoMonths:!0,attachTo:".edit-event-modal__calender-anchor-sm",minRange:0},showArrows:!1},this.isEventTypesEnabled=this.splitSvc.isOn("EVENTS_EVENT_TYPE_ENABLED"),this.iconRegistry.registerIcons(Un)}ngOnInit(){this.modalRef?.data&&(this.eventData=le({},this.modalRef.data),this.initialFormData=le({},this.modalRef.data),this.initForm(),this.isEditModeDisabled=this.checkIfEditModeDisabled(this.eventData.status),!this.modalRef.data.eventType&&this.formGroup.get("eventType")?.value==="None"&&this.formGroup.get("eventType")?.setValue(null))}initForm(){this.formGroup=this.fb.group({eventName:[this.eventData.eventName,[ct.required]],eventType:[this.eventData.eventType],location:[{companyOfficeUuid:this.eventData.location.companyOfficeUuid,description:this.eventData.location.displayName,location:this.eventData.location,placeId:this.eventData.location.placeId},[ct.required]],dateRange:[this.eventData.dateRange,[ct.required]]}),this.eventData.dateRange.from&&this.eventData.dateRange.to&&(this.range=new Qi(new Date(this.eventData.dateRange.from),new Date(this.eventData.dateRange.to))),this.formGroup.valueChanges.subscribe(()=>{this.formValid=!this.formGroup.pristine})}get cancelLabel(){return this.eventData?.status===ye.DRAFT?$localize`Delete draft`:$localize`Cancel event`}changeRange(e){let{range:n}=e;if(!n.from||!n.to)return;let i=this.getValidDateRange(n),l=this.formGroup.value.dateRange;(!We.isEqual(i.from,l.from)||!We.isEqual(i.to,l.to))&&(this.formGroup.patchValue({dateRange:i}),this.formGroup.markAsDirty(),this.formValid=!this.formGroup.pristine)}selectLocation(e){this.formGroup.patchValue({eventLocation:e}),this.eventData.location=e}isFormPristine(){return this.formGroup.pristine}onCancel(){this.modalRef.close()}onSave(){this.loading=!0,this.saveEventDetails$().subscribe(e=>{this.modalRef.close(e),this.loading=!1},()=>{this.loading=!1})}saveEventDetails$(){return this.travelEventQuery.activeEvent$.pipe(ce(1),Q(e=>{let n=this.formGroup.value,i=structuredClone(e);return i.eventType=n.eventType?this.eventData.eventTypesList.find(l=>l.uuid===n.eventType):null,i.customEventType=_l(i.eventType?.name),i.summary.name=n.eventName,i.summary.location.placeId=n.location.placeId,i.summary.location.formattedAddress=n.location.description,i.summary.location.displayName=n.location.description,i.summary.location.companyOfficeId=n.location.companyOfficeUuid,i.summary.location.type=n.location.companyOfficeUuid?Ui.OFFICE:Ui.PLACE,i.summary.startDateTime=this.groupTravelUtilService.dateToBackendFormat(n.dateRange.from),i.summary.endDateTime=this.groupTravelUtilService.dateToBackendFormat(n.dateRange.to),i}))}onCancelEvent(){this.modalRef.close();let e;this.travelEventQuery.activeEvent$.pipe(ce(1),ue(n=>(e=n,N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:n.status==="ACTIVE"?H.EVENT_CONFIRM_CANCEL:H.EVENT_CONFIRM_DELETE,[x.CONTEXT]:nt.POP_UP}),this.groupTravelModalsService.cancelEvent(e,(i,l)=>this.cancelEvent(i,l),this.travelEventQuery.selectLoading()).afterClosed$)),lo("result"),ee(n=>!!n)).subscribe(()=>{let n=this.groupTravelAnalyticsService.getCancelEventTrackedData(e);this.showTeamEventRemovedSuccessfullyToast(e.summary.name,e.status),Re(le({},n),{clickedItem:n.eventStatus===ye.DRAFT?"confirmDeleteDraft":"confirmCancelEvent"}),N(z.EVENT_CANCELED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS}),this.router.navigate(["/"])},()=>{let n=this.groupTravelAnalyticsService.getCancelEventTrackedData(e);this.toastrService.error($localize`An error occurred while deleting the event.`)})}cancelEvent(e,n){let{cancelNote:i="",modalRef:l}=e,d=i.trim().length?{cancellationNote:i}:null;this.groupTravelApiService.deleteTeamEvent(n,this.travelEventQuery.getEventStatus(n),d).subscribe(u=>l.close(u),()=>l.close())}
5showTeamEventRemovedSuccessfullyToast(e,n){let i=n===ye.DRAFT?$localize`${e}:event name: draft is deleted`:$localize`${e}:event name: is canceled`,l=n===ye.DRAFT?"":$localize`The invitees have been notified by email.`;this.toastrService.show(i,"success",!0,{subtitle:l})}getValidDateRange(e){return We.isAfter(new Date(e.from),new Date(e.to))?this.getSwappedDateRangeWithPreservedTime(e):new Qi(e.from,e.to)}getSwappedDateRangeWithPreservedTime(e){let n=e.to.getHours(),i=e.to.getMinutes(),l=e.from.getHours(),d=e.from.getMinutes(),u={from:new Date(e.from),to:new Date(e.to)};return u.to.setHours(l),u.to.setMinutes(d),u.from.setHours(n),u.from.setMinutes(i),new Qi(u.to,u.from)}checkIfEditModeDisabled(e){return e===ye.CANCELED||e===ye.COMPLETED}static{this.\u0275fac=function(n){return new(n||t)(T(ot),T(qe),T(ve),T(Ae),T(Wn),T(Yn),T(Je),T(gt),T(Ce),T(nn),T(ne))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-edit-event-modal"]],inputs:{event:"event",isEditModeDisabled:"isEditModeDisabled"},standalone:!0,features:[fe([{provide:Si,useExisting:t},{provide:Ve,useExisting:t,multi:!0},{provide:Et,useExisting:t,multi:!0}]),y],decls:19,vars:22,consts:()=>{let e;e=$localize`:␟dff02a10481c8eb626d085c5e55d11eb44c79a77␟2706142123061420693:Event details`;let n;n=$localize`:␟5859c64c8efdb42bc097621f55348ea8ac42ddca␟5844179461754011142:Event name`;let i;i=$localize`:␟e4d4deeed694108158cccb3889f9c119d8a1f6a8␟6121577287984845389:Event type`;let l;l=$localize`:␟ed31c09fd77c36238c13d83635f3fe5294c733d2␟471816275243265264:Location`;let d;d=$localize`:␟d7b35c384aecd25a516200d6921836374613dfe7␟2159130950882492111:Cancel`;let u;return u=$localize`:␟8dd413cee2228118c536f503709329a4d1a395e2␟397098723873502323:Done`,[[1,"edit-event-modal",3,"formGroup"],["header",e,3,"showClose","bottomPadding"],[1,"edit-event-modal__body"],["label",n,"iconName","trip"],["taInput","","formControlName","eventName","maxlength","100",3,"required"],["label",i,"iconName","team-event",4,"ngIf"],["label",l],["formControlName","location","type","location",3,"selectLocation","required"],[1,"edit-event-modal__date-form-two"],[1,"edit-event-modal__date-form",3,"changeRange","range","minmaxRange","required","placeholder","config","showTime"],[1,"edit-event-modal__date-form-divider"],["type","to",1,"edit-event-modal__date-form",3,"changeRange","range","minmaxRange","required","placeholder","config","showTime"],[1,"edit-event-modal__calender-anchor-sm"],[1,"edit-event-modal__footer"],[1,"edit-event-modal__delete"],["taModalAdditionalAction","","type","warning","icon","trash","kind","ghost",3,"text","loading","clickEvent",4,"ngIf"],[1,"edit-event-modal__actions"],["kind","outline","text",d,3,"clickEvent","loading"],["text",u,3,"clickEvent","disabled","loading"],["label",i,"iconName","team-event"],["formControlName","eventType",3,"showLabel"],[3,"label","value",4,"ngFor","ngForOf"],[3,"label","value"],["taModalAdditionalAction","","type","warning","icon","trash","kind","ghost",3,"clickEvent","text","loading"]]},template:function(n,i){n&1&&(r(0,"ta-modal",0),m(1,"ta-modal-header",1),r(2,"div",2)(3,"ta-form-wrap",3),m(4,"input",4),s(),p(5,gu,3,2,"ta-form-wrap",5),r(6,"ta-form-wrap",6)(7,"ta-location-search-v2",7),S("selectLocation",function(d){return i.selectLocation(d)}),s()(),r(8,"ta-date-trigger-group",8)(9,"ta-date-time-trigger-v2",9),S("changeRange",function(d){return i.changeRange(d)}),s(),m(10,"div",10),r(11,"ta-date-time-trigger-v2",11),S("changeRange",function(d){return i.changeRange(d)}),s()(),m(12,"div",12),s(),r(13,"div",13)(14,"div",14),p(15,fu,1,2,"ta-button-v2",15),s(),r(16,"div",16)(17,"ta-button-v2",17),S("clickEvent",function(){return i.onCancel()}),s(),r(18,"ta-button-v2",18),S("clickEvent",function(){return i.onSave()}),s()()()()),n&2&&(a("formGroup",i.formGroup),o(),a("showClose",!0)("bottomPadding",!1),o(3),a("required",!0),o(),a("ngIf",i.isEventTypesEnabled),o(2),a("required",!0),o(2),a("range",i.range)("minmaxRange",i.minmaxRange)("required",!0)("placeholder",i.startDatePlaceholder)("config",i.dateConfig1)("showTime",!0),o(2),a("range",i.range)("minmaxRange",i.minmaxRange)("required",!0)("placeholder",i.endDatePlaceholder)("config",i.dateConfig2)("showTime",!0),o(4),a("ngIf",!i.hideDeleteButton),o(2),a("loading",i.loading),o(),a("disabled",i.isFormPristine())("loading",i.loading))},dependencies:[Ze,je,Wt,Me,Xe,Vt,Tr,he,Ge,Qe,at,kt,Yo,L,Es,_e,ms,vs,Ho,nl,ie,Ee,hr],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.edit-event-modal[_ngcontent-%COMP%]{width:600px;min-height:400px}.edit-event-modal__body[_ngcontent-%COMP%]{padding-top:var(--dim-step6)}.edit-event-modal__date-form-two[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin-bottom:var(--dim-step4)}.edit-event-modal__date-form[_ngcontent-%COMP%]{flex:1}.edit-event-modal__date-form-divider[_ngcontent-%COMP%]{width:var(--dim-step2)}.edit-event-modal__calender-anchor-sm[_ngcontent-%COMP%]{position:absolute;top:0;right:-90px}.edit-event-modal__footer[_ngcontent-%COMP%]{margin-top:var(--dim-step8);display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.edit-event-modal__actions[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step4)}"]}
5)}}return t})();be();var vu=t=>["team-events-header--picture",t],Tu=t=>({"disabled-link":t}),Su=(t,_)=>({clickedItem:"goToManagerDashboard",source:"teamEvent",eventStatus:t,eventItemsAmount:_});function Pu(t,_){if(t&1&&m(0,"ta-tag-v2",14),t&2){let e=_.ngIf;a("label",e.text)("type",e.color)}}function Cu(t,_){if(t&1&&(r(0,"div",15),m(1,"ta-icon-v2",16),r(2,"p",9),C(3),s()()),t&2){let e=c(2);o(3),G(e.eventDetails.eventType.name)}}function hu(t,_){if(t&1&&(r(0,"div",5),m(1,"ta-icon-v2",17),r(2,"p")(3,"span",18),C(4),P(5,"date"),s(),r(6,"span",19),C(7),s(),m(8,"ta-icon-v2",20),r(9,"span",18),C(10),P(11,"date"),s(),r(12,"span",19),C(13),s()()()),t&2){let e=_.ngIf,n=c(2);o(4),G(Ot(5,4,e.from,"dowMDY")),o(3),B("\xA0",n.getTimeString(e.from.toString()),""),o(3),G(Ot(11,7,e.to,"dowMDY")),o(3),B("\xA0",n.getTimeString(e.to.toString()),"")}}function Au(t,_){if(t&1){let e=O();r(0,"div",21)(1,"ta-button-v2",22),S("clickEvent",function(){f(e);let i=c(2);return v(i.onSendInvitesClick())}),s()()}if(t&2){let e=c(2);o(),a("disabled",e.disableSendInvites)}}function Ou(t,_){if(t&1){let e=O();r(0,"div",21)(1,"ta-button-v2",23),S("clickEvent",function(){f(e);let i=c(2);return v(i.goToManagerDashboard())}),s()()}if(t&2){let e=c().ngIf,n=c();o(),a("taTrack",tt(1,Su,e.status,n.travelEventInvitationsQuery.totalInvitations))}}function Mu(t,_){if(t&1){let e=O();r(0,"div",2),m(1,"img",3),r(2,"div",4)(3,"div",5)(4,"h1",6),C(5),s(),p(6,Pu,1,2,"ta-tag-v2",7),s(),r(7,"div",5),m(8,"ta-icon-v2",8),r(9,"p",9),C(10),s(),p(11,Cu,4,1,"div",10),s(),p(12,hu,14,10,"div",11),r(13,"div",5)(14,"a",12),S("click",function(){f(e);let i=c();return v(i.onEditEventClick())}),g(15,0),s()()(),p(16,Au,2,1,"div",13)(17,Ou,2,4,"div",13),P(18,"async"),P(19,"async"),s()}if(t&2){let e=_.ngIf,n=c();te("team-events-header--cta",n.showSendInvites),o(),a("ngClass",me(16,vu,n.isEventsSettingsDeclutter?"team-events-header--picture-large":""))("src",n.groupTravelUtilService.getLargeEventPicture(e.summary.pictureUrl),ze),o(4),B(" ",n.eventDetails.eventName," "),o(),a("ngIf",n.groupTravelUtilService.getEventStatusTagData()[e.status]),o(4),G(n.eventDetails.location.description),o(),a("ngIf",n.isEventTypesEnabled&&n.isEventTypeNotNone()),o(),a("ngIf",n.eventDetails.range),o(2),a("ngClass",me(18,Tu,n.isEditModeDisabled)),o(2),a("ngIf",n.showSendInvites),o(),a("ngIf",!A(18,12,n.travelEventQuery.isActiveEventOffsite$)&&!A(19,14,n.travelEventQuery.isActiveEventDraft$))}}var v_=(()=>{class t{constructor(){this.NONE_EVENT_TYPE="None",this.travelEventQuery=M(ve),this.travelEventInvitationsQuery=M(Tt),this.groupTravelUtilService=M(nn),this.datePipe=M(po),this.modalService=M(et),this.splitSvc=M(Ce),this.destroyRef=M(Lt),this.groupTravelApiService=M(Ae),this.iconRegistry=M(ne),this.teamEventRoomBlocksEnabled=!1,this.sendInvitesClick=new Y,this.eventUpdated=new Y,this.isEventsSettingsDeclutter=this.splitSvc.isOn("EVENTS_SETTINGS_DECLUTTER_ENABLED"),this.isEventTypesEnabled=this.splitSvc.isOn("EVENTS_EVENT_TYPE_ENABLED"),this.iconRegistry.registerIcons(So,Rr,ho,Oo,vi)}ngOnInit(){this.loadEventTypes()}getTimeString(e){return $localize`at`+" "+this.datePipe.transform(e,"shortTime")?.toLowerCase()}loadEventTypes(){this.groupTravelApiService.fetchEventTypeList().pipe(ut(this.destroyRef)).subscribe(e=>{this.eventTypesList=e.eventTypes.sort((n,i)=>n.displayOrder-i.displayOrder)})}goToManagerDashboard(){N(z.EVENT_MANAGER_DASHBOARD_CLICKED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS}),this.travelEventQuery.activeEvent$.subscribe(e=>window.location.href=`/app/admin2/manager/dashboard?eventUuid=${e.id}`),N(X.MANAGER_DASHBOARD_CLICKED)}
5onSendInvitesClick(){N(z.EVENT_INVITES_SENT,{[x.VIEW]:Vi(this.activeTab)}),this.modalService.open(pa,{data:{hasRoomBlocks:this.hasRoomBlocks,isOffsite:this.isOffsite}}).afterClosed$.subscribe(({type:n,result:i})=>{n==="close"&&i&&this.sendInvitesClick.emit()})}addEventTypeIfNotExists(e,n,i){if(!this.eventTypesList.some(d=>d.uuid===e)){let d={uuid:e,name:n,displayOrder:i},u=this.eventTypesList.findIndex(h=>h.displayOrder>i);u===-1?this.eventTypesList.push(d):this.eventTypesList.splice(u,0,d)}}onEditEventClick(){Ue([this.travelEventQuery.activeEvent$]).pipe(ce(1)).subscribe(([e])=>{N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS,[x.CONTEXT]:nt.POP_UP});let n=this.eventDetails.eventType?.uuid;n&&this.addEventTypeIfNotExists(n,this.eventDetails.eventType?.name,this.eventDetails.eventType?.displayOrder),this.modalService.open(f_,{data:{id:e.id,status:e.status,eventName:this.eventDetails.eventName,eventType:this.eventDetails.eventType?.uuid??null,location:Re(le({},e.summary.location),{placeId:this.eventDetails.location.placeId,displayName:this.eventDetails.location.description}),dateRange:this.eventDetails.range,eventTypesList:this.eventTypesList}}).afterClosed$.subscribe(({type:l,result:d})=>{l==="close"&&d&&this.handleEventUpdate(d)})})}handleEventUpdate(e){this.eventUpdated.emit(e)}isEventTypeNotNone(){return this.eventDetails.eventType?.name&&this.eventDetails.eventType.name!==this.NONE_EVENT_TYPE}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-header-form"]],inputs:{eventDetails:"eventDetails",showSendInvites:"showSendInvites",disableSendInvites:"disableSendInvites",hasRoomBlocks:"hasRoomBlocks",teamEventRoomBlocksEnabled:"teamEventRoomBlocksEnabled",isEditModeDisabled:"isEditModeDisabled",activeTab:"activeTab",isOffsite:"isOffsite"},outputs:{sendInvitesClick:"sendInvitesClick",eventUpdated:"eventUpdated"},standalone:!0,features:[y],decls:2,vars:3,consts:()=>{let e;e=$localize`:␟976113759726a7cb1a403d791eb80c72784940db␟8767009126832246705:Event location`;let n;n=$localize`:␟0ae6c65614fb806887b99ea9b107de3d347b9c73␟6752893981932715759: Edit `;let i;i=$localize`:␟a58b19aa543b675ed7d1208af5ca3e03e44f7685␟4976965009176595392:Send invites`;let l;return l=$localize`:␟9642eceb415d126dfe49729bd7ea38e7699d2c92␟4999415897086413521:Manager dashboard`,[n,["class","team-events-header",3,"team-events-header--cta",4,"ngIf"],[1,"team-events-header"],["alt",e,3,"ngClass","src"],[1,"team-events-header__content"],[1,"team-events-header__row"],["data-testid","eventNameTitle",1,"event-name-rebrand"],["theme","soft","size","regular",3,"label","type",4,"ngIf"],["icon","location-pin"],[1,"team-events-header__row--address"],["class","team-events-header__row event-type-row",4,"ngIf"],["class","team-events-header__row",4,"ngIf"],["data-testid","editEventHeader",1,"team-events-header__edit-button",3,"click","ngClass"],["class","team-events-header__cta",4,"ngIf"],["theme","soft","size","regular",3,"label","type"],[1,"team-events-header__row","event-type-row"],["icon","team-event"],["icon","date"],[1,"team-events-header__row--date"],[1,"team-events-header__row--time"],["icon","arrow-right-small",1,"display-title__label"],[1,"team-events-header__cta"],["kind","outline","type","neutral","size","large","text",i,"data-testid","sendInvites",3,"clickEvent","disabled"],["icon","chart-donut","kind","outline","size","large","text",l,"data-testid","goToManagerDashboardButton",3,"clickEvent","taTrack"]]},template:function(n,i){n&1&&(p(0,Mu,20,20,"div",1),P(1,"async")),n&2&&a("ngIf",A(1,1,i.travelEventQuery.activeEvent$))},dependencies:[L,Ht,Jt,qt,K,Z,ie,Ee,Bn,we,Gn],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-type-row[_ngcontent-%COMP%]{align-items:center;margin-left:1rem}.team-events-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step6);margin:var(--dim-step10) 0 var(--dim-step6)}.team-events-header--cta[_ngcontent-%COMP%]{align-items:start}.team-events-header--picture[_ngcontent-%COMP%]{height:136px;width:136px;border-radius:var(--dim-step2);object-fit:cover}
5.team-events-header--picture-large[_ngcontent-%COMP%]{height:168px;width:168px}.team-events-header__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:normal;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step3)}.team-events-header__edit-button[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;padding-top:var(--dim-step1);color:var(--ta-color-text-primary);text-decoration:none}.team-events-header__edit-button[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.team-events-header__edit-button.disabled-link[_ngcontent-%COMP%]{pointer-events:none;color:var(--ta-color-text-disabled)}.team-events-header[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-weight:var(--text-weight-xb);font-size:var(--text-size-xxh);line-height:44px;margin:0 var(--dim-step2) 0 0}.team-events-header__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap}.team-events-header__row[_ngcontent-%COMP%] > ta-icon-v2[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.team-events-header__row[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin:0}.team-events-header__row--time[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}.team-events-header__row--address[_ngcontent-%COMP%], .team-events-header__row--date[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.team-events-header__cta[_ngcontent-%COMP%]{margin-left:auto;white-space:nowrap;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.team-events-header__cta[_ngcontent-%COMP%]   ta-button-v2[_ngcontent-%COMP%]{margin-left:var(--dim-step2)}.team-events-header[_ngcontent-%COMP%]   .event-name-rebrand[_ngcontent-%COMP%]{font-family:nvn-heading,Sanomat}"]})}}return t})();E();E();E();function Nu(t,_){if(t&1&&(r(0,"div",1),m(1,"ta-icon-v2",2),s()),t&2){let e=c();a("popoverConfig",e.popoverConfig)("taPopover",e.soldOutString)}}var T_=(()=>{class t{constructor(){this.isSoldOut=!1,this.soldOutString=$localize`Sold out on these dates`,this.iconRegistry=M(ne),this.popoverConfig={placement:{placeAt:"top"}},this.iconRegistry.registerIcons(Yr)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-recommended-hotel-soldout"]],inputs:{isSoldOut:"isSoldOut"},standalone:!0,features:[y],decls:1,vars:1,consts:[["class","badge","popoverTrigger","hover",3,"popoverConfig","taPopover",4,"ngIf"],["popoverTrigger","hover",1,"badge",3,"popoverConfig","taPopover"],["icon","booking-type-hotel-slash","theme","outline"]],template:function(n,i){n&1&&p(0,Nu,2,2,"div",0),n&2&&a("ngIf",i.isSoldOut)},dependencies:[L,re,K,Z],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.badge[_ngcontent-%COMP%]{background:var(--ta-color-surface-warning-strong);color:var(--ta-color-text-inverse);width:var(--dim-step8);height:var(--dim-step8);border-radius:50%;display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;flex:0 0 var(--dim-step8);z-index:1}"]})}}return t})();E();function Ru(t,_){if(t&1&&(r(0,"div",1),m(1,"ta-icon",2),s()),t&2){let e=c();a("popoverConfig",e.popoverConfig)("taPopover",e.policyViolationString)}}var S_=(()=>{class t{constructor(e){this.hotelHelper=e,this.popoverConfig={placement:{placeAt:"top"}}}ngOnInit(){this.roomInfo&&this.setPolicyViolationString()}setPolicyViolationString(){this.policyViolationString=this.hotelHelper.getPolicyViolationString(this.roomInfo)}static{this.\u0275fac=function(n){return new(n||t)(T(sa))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-recommended-hotel-oop"]],inputs:{roomInfo:"roomInfo"},standalone:!0,features:[fe([Gn,Li,Yt]),y],decls:1,vars:1,consts:[["class","badge","popoverTrigger","hover",3,"popoverConfig","taPopover",4,"ngIf"],["popoverTrigger","hover",1,"badge",3,"popoverConfig","taPopover"],["icon","policy-slash","theme","outline"]],template:function(n,i){n&1&&p(0,Ru,2,2,"div",0),n&2&&a("ngIf",i.roomInfo==null?null:i.roomInfo.priceInfo.outOfPolicy)},dependencies:[L,re,Dn],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.badge[_ngcontent-%COMP%]{color:var(--ta-color-icon-alert);width:var(--dim-step5);height:var(--dim-step5);display:inline-block;vertical-align:top;margin-right:var(--dim-step1)}"]})}}return t})();E();be();var bu=t=>[t];function yu(t,_){if(t&1){let e=O();r(0,"ta-filter",5),S("changed",function(i){f(e);let l=c();return v(l.filtersChanged(i))})("track",function(i){f(e);let l=c();return v(l.onTrack(i))})("mouseup",function(i){f(e);let l=c();return v(l.doNotClosePopover(i))}),r(1,"div",6),S("taPopoverOnOpen",function(i){f(e);let l=c();return v(l.onOpen(i))}),r(2,"ta-filter-name",7),S("filter",function(i){f(e);let l=c();return v(l.onSearchChange(i))})("keyup",function(i){f(e);let l=c();return v(l.onSearchChange(i.target.value))}),s()()()}if(t&2){let e=c(),n=V(2);a("labels",e.labels)("inputData",e.options),o(),a("popoverConfig",e.popoverConfig)("taPopover",e.isDisabled?"":n),o(),a("key",e.nameKey)}}function Iu(t,_){if(t&1){let e=O();r(0,"div",14),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.selectLocationPrediction(i))}),r(1,"div",15),C(2),s()()}if(t&2){let e=_.$implicit;o(2),G(e.description)}}function xu(t,_){if(t&1&&(r(0,"div")(1,"div",12),g(2,1),s(),p(3,Iu,3,1,"div",13),P(4,"async"),s()),t&2){let e=c(2);o(3),a("ngForOf",A(4,1,e.locationPredictions$))}}function Fu(t,_){t&1&&(r(0,"div",12),g(1,2),s())}function Lu(t,_){if(t&1){let e=O();r(0,"div",18),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.selectHotel(i))}),m(1,"div",19),r(2,"div",20),C(3),s()()}if(t&2){let e=_.$implicit;o(),Dt("background-image","url("+e.hotelLogoUrl300||e.hotelLogoUrl150||e.hotelLogoUrl||"https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg)"),o(2),G(e.name)}
5}function Uu(t,_){if(t&1&&(r(0,"div"),p(1,Fu,2,0,"div",16),P(2,"async"),p(3,Lu,4,3,"div",17),P(4,"async"),s()),t&2){let e,n=c(2);o(),a("ngIf",(e=A(2,3,n.locationPredictions$))==null?null:e.length),o(2),a("ngForOf",A(4,5,n.hotelOptions$))("ngForTrackBy",n.trackByFn)}}function wu(t,_){t&1&&(r(0,"div",21),g(1,3),s())}function Vu(t,_){if(t&1&&(r(0,"div",8)(1,"div",9),p(2,xu,5,3,"div",10),P(3,"async"),p(4,Uu,5,7,"div",10),P(5,"async"),p(6,wu,2,0,"div",11),P(7,"async"),P(8,"async"),s()()),t&2){let e,n,i,l=c();o(2),a("ngIf",(e=A(3,3,l.locationPredictions$))==null?null:e.length),o(2),a("ngIf",(n=A(5,5,l.hotelOptions$))==null?null:n.length),o(2),a("ngIf",!((i=A(7,7,l.hotelOptions$))!=null&&i.length)&&!((i=A(8,9,l.locationPredictions$))!=null&&i.length))}}var P_=(()=>{class t{constructor(e,n,i){this.popoverService=e,this.locationService=n,this.cdRef=i,this.options=[],this.isDisabled=!1,this.hotelSelected=new Y,this.resetInited=new Y,this.locationSelected=new Y,this.placeSelected=new Y,this.currentSearchTerm="",this.currentLocationId="",this.destroy$=new dt,this.searchTerms=new dt,this.hotelOptions=new rt([]),this.hotelOptions$=this.hotelOptions.asObservable(),this.locationPredictions=new rt([]),this.locationPredictions$=this.locationPredictions.asObservable(),this.locationPredictionsMap=new Map,this.popoverConfig={customClasses:"menu-dropdown__popover",placement:{placeAt:"bottomLeftAlign"}},this.nameKey=({name:l},d)=>{let u=this.findAllWords(d,l);return l&&u?l:null},this.searchTerms.pipe(De(this.destroy$),yn(300),xt(),ee(l=>l&&l.length>2)).subscribe(l=>{this.currentSearchTerm=l,this.searchLocations(l)})}ngOnInit(){}ngOnChanges(e){e.options&&!e.options.firstChange&&(this.resetSearchState(),this.setFilteredOptions(this.options),this.cdRef.detectChanges())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.locationPredictionsMap.clear()}resetSearchState(){this.currentSearchTerm="",this.locationPredictions.next([]),this.filterComponent&&this.filterComponent.resetFilters()}filtersChanged(e){this.setFilteredOptions(e?.result)}onTrack(e){e.action==="CHANGE"&&e.category==="name"&&(e.value.name,void 0)}trackByFn(e,n){return n}selectHotel(e){this.hotelSelected.emit(e),this.popoverService.close(this.popoverRef),this.filterComponent?.resetFilters()}selectLocationPrediction(e){this.currentLocationId=e.placeId,e.description,this.locationSelected.emit(e),this.placeSelected.emit({placeId:e.placeId,description:e.description});let n={uuid:e.placeId,name:e.description,hotelLogoUrl:"https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg",googlePlaceId:e.placeId,hotelId:e.placeId,dailyRate:0,address:e.description,distFromLocationMilesDriving:0,reviewsCount:0,reviewsScore:0,hotelStarsRating:3,reviewScoreBucketCaption:"Good",soldOut:!1};this.hotelSelected.emit(n),this.popoverService.close(this.popoverRef),this.resetSearchState()}onSearchChange(e){this.searchTerms.next(e)}getLocationDescription(e){return this.locationPredictionsMap.get(e)?.description||""}searchLocations(e){this.locationService.searchLocationPredictions(e,!0,!1).pipe(De(this.destroy$)).subscribe(n=>{n.forEach(i=>{this.locationPredictionsMap.set(i.placeId,i)}),this.locationPredictions.next(n),this.setFilteredOptions(this.options?.filter(i=>this.findAllWords(e,i.name))||[])},n=>{console.error("Error fetching location predictions:",n)})}findAllWords(e,n){return e=e.toLocaleLowerCase(),n=n.toLocaleLowerCase(),e.split(" ").every(i=>{let l=n.includes(i);return l&&(n=n.replace(i,"")),l})}onOpen(e){this.popoverRef=e,this.setFilteredOptions()}setFilteredOptions(e){let i=[...e||this.options||[]].filter(l=>!this.excludedOptions?.includes(l)).splice(0,20);this.hotelOptions.next(i),this.cdRef.detectChanges()}doNotClosePopover(e){e.stopPropagation()}static{this.\u0275fac=function(n){return new(n||t)(T(os),T(qo),T($e))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-hotel-search"]],viewQuery:function(n,i){if(n&1&&(st(qi,5),st(_s,5)),n&2){let l;lt(l=_t())&&(i.filterComponent=l.first),lt(l=_t())&&(i.typeaheadComponent=l.first)}},inputs:{options:"options",excludedOptions:"excludedOptions",searchId:"searchId",isDisabled:"isDisabled"},outputs:{hotelSelected:"hotelSelected",resetInited:"resetInited",locationSelected:"locationSelected",placeSelected:"placeSelected"},standalone:!0,features:[fe([qo,es]),At,y],decls:3,vars:4,consts:()=>{let e;e=$localize`:␟4b00fbe1906d859e23fd3afc1acfc73db4d37e95␟5216341110265722602:Search hotel or location`;let n;n=$localize`:␟4e1f8d2ddd40fad49d4abc5279a1d5daa2fbd504␟1397512334982372726:Places`;let i;i=$localize`:␟da82cfffa16bb89176be6cea9ae9b513d8a33993␟1597470736145319726:Hotels`;let l;return l=$localize`:␟9f0ed3a69fd11e2ac04f8baab5fc37658131a125␟6904609268204845526: Sorry, we couldn't find any results `,[["dropdown",""],n,i,l,[3,"labels","inputData","changed","track","mouseup",4,"ngFor","ngForOf","ngForTrackBy"],[3,"changed","track","mouseup","labels","inputData"],[1,"search",3,"taPopoverOnOpen","popoverConfig","taPopover"],["hasInputAutocomplete","off","id","name","placeholder",e,"data-testid","recommendedHotelField",3,"filter","keyup","key"],[1,"hotel-results"],[1,"hotel-results__container"],[4,"ngIf"],["class","hotel-results__item hotel-results__no-results",4,"ngIf"],[1,"hotel-results__section-title"],["class","hotel-results__item location","data-testid","locationOption",3,"click",4,"ngFor","ngForOf"],["data-testid","locationOption",1,"hotel-results__item","location",3,"click"],[1,"location__description"],["class","hotel-results__section-title",4,"ngIf"],["class","hotel-results__item hotel","data-testid","hotelOption",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","hotelOption",1,"hotel-results__item","hotel",3,"click"],[1,"hotel__image-photo"],[1,"hotel__details-name"],[1,"hotel-results__item","hotel-results__no-results"]]},template:function(n,i){n&1&&p(0,yu,3,5,"ta-filter",4)(1,Vu,9,11,"ng-template",null,0,k),n&2&&a("ngForOf",me(2,bu,i.searchId))("ngForTrackBy",i.trackByFn)},dependencies:[_e,qi,re,Ko,L,we,ur],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.search[_ngcontent-%COMP%]{height:var(--dim-step12)}.hotel-results[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;width:525px;box-sizing:border-box;overflow:hidden;border-radius:var(--dim-step3)}.hotel-results__container[_ngcontent-%COMP%]{max-height:400px;overflow:auto}.hotel-results__item[_ngcontent-%COMP%]{padding:var(--dim-step2) var(--dim-step4);border-radius:var(--dim-step2);cursor:pointer}.hotel-results__item[_ngcontent-%COMP%]:first-child{padding-top:var(--dim-step4)}.hotel-results__item[_ngcontent-%COMP%]:last-child{padding-bottom:var(--dim-step4)}.hotel-results__item[_ngcontent-%COMP%]:hover{background:var(--ta-color-surface-neutral)}.hotel-results__item.location[_ngcontent-%COMP%]{display:flex;padding:10px 16px;align-items:center;border-bottom:1px solid #eaeaea;cursor:pointer}.hotel-results__item.location[_ngcontent-%COMP%]:hover{background-color:#f9f9f9}.hotel-results__no-results[_ngcontent-%COMP%]{cursor:default;text-align:center}.hotel-results__no-results[_ngcontent-%COMP%]:hover{background:var(--ta-color-surface-default)}.hotel-results[_ngcontent-%COMP%]   .hotel[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.hotel-results[_ngcontent-%COMP%]   .hotel__image-photo[_ngcontent-%COMP%]{width:42px;height:42px;background-position:center;background-size:cover;border-radius:var(--dim-step2);margin-right:var(--dim-step4)}  .hotel-results__popover.leave{animation:fade-out .2s ease-in;animation-fill-mode:forwards}  .hotel-results__popover.enter{animation:fade-out .2s ease-in;animation-direction:reverse}  .hotel-results__popover .popover-content{border-radius:var(--dim-step4)}.hotel-results__section-title[_ngcontent-%COMP%]{font-size:14px;font-weight:var(--text-weight-medium);color:#666;padding:8px 16px;background-color:#f5f5f5}.location__description[_ngcontent-%COMP%]{font-size:14px;color:#333}"]})}}return t})();E();var ku=(t,_)=>[t,!1,!1,_,"symbol-narrow"],Du=(t,_)=>[t,!0,!1,_,"symbol-narrow"],$u=t=>({"recommended-hotels__search--no-padding":t}),Gu=()=>({placeAt:"top"}),Bu=t=>({placement:t});function zu(t,_){t&1&&(w(0),r(1,"div",12),m(2,"ta-spinner"),s(),U())}function Hu(t,_){if(t&1&&(r(0,"div",31),de(1,1),m(2,"span")(3,"ta-hotel-rate-highlight-v2",32),pe(),s()),t&2){let e=c().$implicit;o(3),a("hotel",e),q(e.hotelStarsRating),J(1)}}function Xu(t,_){t&1&&(r(0,"div",33)(1,"span"),g(2,2),s()())}function ju(t,_){if(t&1&&(r(0,"div",34)(1,"a",35),g(2,3),s()()),t&2){let e=c().$implicit;o(),ai("href","https://www.google.com/maps/place/?q=place_id:",e.googlePlaceId,"",ze)}}function Yu(t,_){if(t&1&&(r(0,"div",36),C(1),r(2,"span"),g(3,4),s()()),t&2){let e=c().$implicit;o(),dn(" ",e.reviewsScore," ",e.reviewScoreBucketCaption," "),o(2),q(e.reviewsCount),J(3)}}function Wu(t,_){if(t&1&&(r(0,"div",37),g(1,5),s()),t&2){let e=c().$implicit,n=c(3);o(),q(n.roundDistance(e.distFromLocationMilesDriving)),J(1)}}
5function Ku(t,_){if(t&1&&(r(0,"div",38),m(1,"ta-recommended-hotel-oop",39),r(2,"span",40),C(3),P(4,"userCurrency"),P(5,"userCurrency"),s(),C(6,"\xA0"),r(7,"span"),g(8,6),s()()),t&2){let e=c().$implicit,n=c(3);o(),a("roomInfo",e.basicRoomInfo),o(2),G(e.computedShowAgencyConversions?di(4,2,tt(14,ku,e.computedPrice,e.startingPrice.agencyCurrency)):di(5,8,tt(17,Du,e.computedPrice,n.activeCurrency==null?null:n.activeCurrency.shortName)))}}function Qu(t,_){t&1&&(r(0,"div",38),g(1,7),s())}function qu(t,_){if(t&1){let e=O();r(0,"div",14)(1,"div",15)(2,"div",16)(3,"div",17)(4,"div",18),m(5,"ta-recommended-hotel-soldout",19),s(),r(6,"img",20),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.navigateToHotelPage(i))}),s()(),r(7,"div",21),p(8,Hu,4,2,"div",22),r(9,"div",23),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.navigateToHotelPage(i))}),C(10),s(),p(11,Xu,3,0,"div",24)(12,ju,3,2,"div",25)(13,Yu,4,3,"div",26)(14,Wu,2,1,"div",27)(15,Ku,9,20,"div",28)(16,Qu,2,0,"div",28),s()(),r(17,"div",29)(18,"ta-icon-v2",30),S("click",function(){let i=f(e).$implicit,l=c(3);return v(l.updateRecommendedHotels(i))}),s()()()()}if(t&2){let e=_.$implicit,n=c(3);o(5),a("isSoldOut",e.soldOut),o(),Dt("cursor","pointer"),a("src",e.hotelLogoUrl,ze)("taFallback","https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg"),o(2),a("ngIf",!n.isCustomPlace(e)),o(),Dt("cursor","pointer"),a("taPopover",e.name.length>35?e.name:null),o(),B(" ",e.name," "),o(),a("ngIf",n.isCustomPlace(e)),o(),a("ngIf",n.isCustomPlace(e)),o(),a("ngIf",!n.isCustomPlace(e)),o(),a("ngIf",!n.isCustomPlace(e)),o(),a("ngIf",!e.soldOut&&!n.isCustomPlace(e)),o(),a("ngIf",e.soldOut&&!n.isCustomPlace(e)),o(),te("selected",n.isSelected(e.uuid)),o(),a("clickable",!0)("icon",n.isSelected(e.uuid)?"filter-cross":"plus-small")("taDisabled",n.disabled||!n.isSelected(e.uuid)&&n.recommendedHotels.length===n.maxRecommendedHotels),Bt("title",n.isSelected(e.uuid)?n.removeRecommendationTitle:n.addHotelRecommendationTitle)}}function Ju(t,_){if(t&1&&(w(0),p(1,qu,19,22,"div",13),U()),t&2){let e=c(2);o(),a("ngForOf",e.recommendationsOptions)}}function Zu(t,_){if(t&1&&p(0,Ju,2,1,"ng-container",11),t&2){let e=c();a("ngIf",e.recommendationsOptions.length)}}function eg(t,_){if(t&1){let e=O();w(0),r(1,"div",41)(2,"ta-event-hotel-search",42),S("hotelSelected",function(i){f(e);let l=c();return v(l.addCustomHotel(i))})("placeSelected",function(i){f(e);let l=c();return v(l.searchWithPlaceId(i))}),s()(),r(3,"div",43),g(4,8),s(),U()}if(t&2){let e=c();o(),a("ngClass",me(10,$u,e.recommendationsOptions.length===0))("taPopover",e.recommendedHotels.length===e.maxRecommendedHotels?"To add a new hotel, remove one from your list":null)("popoverConfig",me(13,Bu,Se(12,Gu))),o(),a("excludedOptions",e.recommendedHotels)("isDisabled",e.recommendedHotels.length===e.maxRecommendedHotels)("options",e.hotelSearchRes.options)("searchId",e.hotelSearchRes.searchId)("taDisabled",e.recommendedHotels.length===e.maxRecommendedHotels),o(2),q(e.recommendedHotels.length)(e.maxRecommendedHotels),J(4)}}var C_=(()=>{class t{constructor(){this.wasCreatedNow=!1,this.isLoadingHotels=!1,this.isLoadingCustomHotel=!1,this.maxRecommendedHotels=6,this.recommendationsOptions=[],this.defaultRecommendations=[],this.recommendedHotels=[],this.eventRecommendedHotels=[],this.removeRecommendationTitle=$localize`Remove recommendation`,this.addHotelRecommendationTitle=$localize`Add hotel recommendation`,this.destroyRef=M(Lt),this.hotelApiService=M(_a),this.currenciesService=M(Ss),this.userCacheService=M(gs),this.searchFacade=M(Ea),this.hotelSocketsService=M(hl),this.travelEventQuery=M(ve),this.cdRef=M($e),this.tooltipEducationService=M(Xn),this.iconRegistry=M(ne),this.onChange=e=>{},this.onTouched=()=>{},this.iconRegistry.registerIcons(kr,Ir)}ngOnChanges(e){let{hotelSearchConfig:n}=e;if(!!(n&&!n.firstChange&&this.hotelSearchConfig)){let l=this.hotelSearchConfig.teamEventConfig.location.placeId;this.currentPlaceId!==l&&(this.recommendationsOptions=[],this.runSearch())}}ngOnInit(){if(this.disabled||this.travelEventQuery.isActiveEventInPast){this.eventRecommendedHotels=this.travelEventQuery.activeEventRecommendedHotels();return}this.onChange(this.travelEventQuery.activeEventRecommendedHotels()),this.prepareSockets(),this.runSearch(),this.setActiveCurrency()}setRecommendedHotels(){if(le({clickedItem:"setRecommendedHotels"},this.eventTrackingDetails),this.disabled)return;let e=this.recommendedHotels.map(n=>
5{let i=this.isCustomPlace(n);return{googlePlaceId:n.googlePlaceId,name:n.name,hotelId:n.uuid,searchId:i?null:this.hotelSearchRes?.searchId,hotelLogoUrl:i?"https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg":void 0}});this.onChange(e),this.onTouched()}updateRecommendedHotels(e){let n=this.isSelected(e.uuid);le({clickedItem:n?"removeRecommendedHotels":"addRecommendedHotels"},this.eventTrackingDetails),n?this.removeRecommendedHotel(e):this.addRecommendedHotel(e)}navigateToHotelPage(e){this.isCustomPlace(e)?(window.open("/app/user2/home?searchType=hotel","_blank"),le({clickedItem:"openCustomPlacePage",value:e.name},this.eventTrackingDetails),void 0):this.goToHotelPage(e.uuid)}addCustomHotel(e){if(e&&e.uuid===e.googlePlaceId){this.addPlaceAsMockHotel({placeId:e.googlePlaceId,description:e.name});return}le({clickedItem:"addCustomRecommendedHotels"},this.eventTrackingDetails),N(X.ADD_RECOMMENDED_HOTEL),N(z.EVENT_SETTINGS_CHANGED,{[x.VIEW]:H.EVENT_SETTINGS_BOOKING,[x.CONTEXT]:nt.PAGE,[x.NAVAN_EVENT_SETTING]:Tn.SETTINGS_RECOMMENDED_HOTELS});let n=this.isDefaultRecommendation(e.uuid);!n&&e.dailyRate===0&&this.searchHotel(e.uuid),!this.isSelected(e.uuid)&&!n&&this.recommendationsOptions.indexOf(e)<0&&(this.recommendationsOptions.push(e),this.addRecommendedHotel(e)),this.sendWsRequest([e.uuid])}isSelected(e){return this.recommendedHotels.findIndex(n=>n.uuid===e)>-1}isCustomPlace(e){return e&&e.uuid===e.googlePlaceId&&e.hotelId===e.googlePlaceId}writeValue(e=[]){e.length===0&&(this.recommendedHotels=[],this.recommendationsOptions=[]),e.length&&(this.recommendedHotels=this.filterNonExistingHotels(this.recommendedHotels,e),this.recommendationsOptions=this.filterNonExistingHotels(this.recommendationsOptions,e),e.forEach(n=>{if(n.hotelId===n.googlePlaceId){let l=n.name||n.googlePlaceId;this.addPlaceAsMockHotel({placeId:n.googlePlaceId,description:l})}else this.searchHotel(n.hotelId)})),this.cdRef.detectChanges()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}roundDistance(e){return Math.round(e*10)/10}goToHotelPage(e){window.open(`search/hotels/${this.hotelSearchRes.searchId}/hotels/${e}`,"_blank")}getPrice(e,n=1){return e.finalDayPrice*n}showAgencyConversions(e){return this.activeCurrency?.shortName===e.startingPrice.agencyCurrency&&!!e.startingPrice.agencyCurrencyConversion}searchWithPlaceId(e){this.addPlaceAsMockHotel({placeId:e.placeId,description:e.description})}addPlaceAsMockHotel(e){let n=e.description||e.placeId;le({clickedItem:"addPlaceAsMockHotel",value:n},this.eventTrackingDetails);let i=this.recommendationsOptions.find(d=>d.googlePlaceId===e.placeId);if(i){i.name!==n&&(i.name=n,i.address=n),this.isSelected(i.uuid)||this.addRecommendedHotel(i);return}let l;this.defaultRecommendations?.length?(l=JSON.parse(JSON.stringify(this.defaultRecommendations[0])),l.uuid=e.placeId,l.name=n,l.hotelLogoUrl="https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg",l.googlePlaceId=e.placeId,l.hotelId=e.placeId,l.address=n,l.dailyRate=0,l.reviewsCount=0,l.reviewsScore=0):l={uuid:e.placeId,name:n,hotelLogoUrl:"https://d3nmuj3tzwfe4p.cloudfront.net/s/140/default_hotel.jpg",googlePlaceId:e.placeId,hotelId:e.placeId,address:n,dailyRate:0,reviewsCount:0,reviewsScore:0,hotelStarsRating:0,reviewScoreBucketCaption:"",soldOut:!1},this.isSelected(l.uuid)||(this.recommendationsOptions.push(l),this.addRecommendedHotel(l))}isDefaultRecommendation(e){return this.defaultRecommendations?.findIndex(n=>n.uuid===e)>-1}addRecommendedHotel(e){this.tooltipEducationService.emitComponentKey(Pt.TEAM_EVENT_ROOM_BLOCKS_RECOMMENDED_HOTELS_POPOVER),this.recommendedHotels.length<this.maxRecommendedHotels&&(this.recommendedHotels.push(e),this.setRecommendedHotels())}removeRecommendedHotel(e){let n=this.recommendedHotels.findIndex(l=>l.uuid===e.uuid),i=this.recommendationsOptions.findIndex(l=>l.uuid===e.uuid);this.recommendedHotels.splice(n,1),this.isDefaultRecommendation(e.uuid)||(this.recommendationsOptions.splice(i,1),N(X.REMOVE_RECOMMENDED_HOTEL)),this.setRecommendedHotels()}runSearch(){this.isLoadingHotels=!0,this.currentPlaceId=this.hotelSearchConfig.teamEventConfig.location.placeId,this.hotelApiService.runSearch(this.hotelSearchConfig,!0).pipe(ee(e=>!!e?.options?.length),Be(e=>{e.options.forEach(n=>this.adaptHotel(n))}),He(()=>{this.isLoadingHotels=!1,this.cdRef.detectChanges()}),ut(this.destroyRef)).subscribe(e=>{this.hotelSearchRes=e;let n=i=>i.corporateDiscount&&i.distFromLocationMilesDriving<=3;this.defaultRecommendations=e.options?.filter(n).slice(0,6)||[],this.recommendedHotels=[...this.recommendedHotels,...e.options?.filter(i=>this.eventRecommendedHotels.find(l=>l.hotelId===i.uuid))],this.recommendationsOptions=[...this.defaultRecommendations||[],...this.recommendedHotels],this.sendWsRequest(this.recommendationsOptions.map(i=>i.uuid))})}get eventTrackingDetails(){return{source:"editTeamEvent",eventStatus:this.eventStatus||"CONFIGURE",recommendedHotels:this.recommendedHotels.length,existingDefaultRecommendedHotels:this.defaultRecommendations}}searchHotel(e){this.isHotelDataLoaded(e)||(this.isLoadingCustomHotel=!0,le({clickedItem:"searchCustomHotel"},this.eventTrackingDetails),this.hotelApiService.runSearch(Re(le({},this.hotelSearchConfig),{hotelUuid:e})).pipe(ee(n=>!!n),Q(n=>n?.options.find(i=>i.uuid===e)),ee(n=>!!n),He(()=>{this.isLoadingCustomHotel=!1,this.cdRef.detectChanges()})).subscribe(n=>{this.adaptHotel(n),this.recommendationsOptions.indexOf(n)<0&&this.recommendationsOptions.push(n),this.recommendedHotels.indexOf(n)<0&&this.recommendedHotels.push(n),this.sendWsRequest([n.uuid])}))}isHotelDataLoaded(e){let n=this.recommendationsOptions.find(l=>l.uuid===e),i=this.recommendedHotels.find(l=>l.uuid===e);return!!(n&&i)}setActiveCurrency(){this.activeCurrency=this.currenciesService.getCurrencyByCode(this.userCacheService.get("searchCurrency")||this.userInfo&&this.userInfo.currency)}prepareSockets(){this.hotelSocketsService.connect(),this.hotelSocketsService.stream$.pipe(ut(this.destroyRef)).subscribe(e=>{let{messageType:n,messageObject:i}=e;if(n===Va.ROOM_RATE){let l=this.recommendationsOptions.find(u=>u.uuid===i.uuid),d=i.startingPrice;l&&d&&(l.startingPrice=d,this.adaptHotel(l))}})}adaptHotel(e){this.searchFacade.calculateHotelAdditionalInfo(e,this.userInfo),e.computedShowAgencyConversions=this.showAgencyConversions(e),e.computedPrice=e.computedShowAgencyConversions?this.getPrice(e,e.startingPrice.agencyCurrencyConversion):this.getPrice(e)}sendWsRequest(e=[]){this.hotelSearchRes?.searchId&&this.hotelSocketsService.send({args:e,command:Va.FETCH_ROOMS,searchId:this.hotelSearchRes.searchId})}filterNonExistingHotels(e,n){return e.filter(({uuid:i})=>n.find(({hotelId:l})=>l===i))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-recommended-hotels"]],inputs:{userInfo:"userInfo",eventStatus:"eventStatus",wasCreatedNow:"wasCreatedNow",hotelSearchConfig:"hotelSearchConfig"},standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0},{provide:Wo,useClass:Qo}]),At,y],decls:5,vars:3,consts:()=>{let e;e=$localize`:␟8c20b79835215d1351b70cfde3a1214199b59663␟453514758267661609:hotel logo`;let n;n=$localize`:␟8a007d84d36be42e5afced2366ad24597adde980␟8458352929941113799:${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:${"\uFFFD0\uFFFD"}:INTERPOLATION:-star${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:${"\uFFFD#3\uFFFD"}:START_TAG_TA_HOTEL_RATE_HIGHLIGHT_V2:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_TA_HOTEL_RATE_HIGHLIGHT_V2:`;let i;i=$localize`:␟cb05774f491b4a21587d3e9d9e03faf5b4e1b188␟1105605461173085085:Custom location`;let l;l=$localize`:␟3c9646914dd3c8ab92ec484f8a32bf30ded5c1f0␟8223979667314302906:View on Google Maps`;let d;d=$localize`:␟01765de3c5975c47fc776b7014eaed9367a4c4ab␟771578085812590358:(${"\uFFFD0\uFFFD"}:INTERPOLATION: reviews)`;let u;u=$localize`:␟1e9cc3b66543df7426aab1794b5e92ddac3bb84f␟7568871329498828962: ${"\uFFFD0\uFFFD"}:INTERPOLATION: miles from location `;let h;h=$localize`:␟9e795ae0bbb3a65c36c25741be7822131fd21f96␟5247456389739298860:nightly rate per room`;let I;I=$localize`:␟320dd721d7b6ccf1c6b231906c22ccec52368214␟6609467208894734386:SOLD OUT`;let F;
5return F=$localize`:␟c1ff3013b0b4ddd809f8db0918f22d960e02d50e␟676208285515454015: ${"\uFFFD0\uFFFD"}:INTERPOLATION:/${"\uFFFD1\uFFFD"}:INTERPOLATION_1: recommendations added `,[["recommendedHotelsTpl",""],n,i,l,d,u,h,I,F,[1,"recommended-hotels"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"recommended-hotels__spinner"],["class","recommended-hotels__item",4,"ngFor","ngForOf"],[1,"recommended-hotels__item"],[1,"hotel-wrap"],[1,"hotel"],[1,"hotel__image"],[1,"hotel__badges"],[1,"badge",3,"isSoldOut"],["alt",e,1,"hotel__image-photo",3,"click","src","taFallback"],[1,"hotel__details"],["class","hotel__details-stars",4,"ngIf"],["popoverTrigger","hover",1,"hotel__details-name",3,"click","taPopover"],["class","hotel__details-location-badge",4,"ngIf"],["class","hotel__details-google-link",4,"ngIf"],["class","hotel__details-reviews",4,"ngIf"],["class","hotel__details-distance",4,"ngIf"],["class","hotel__details-rate",4,"ngIf"],[1,"hotel-add"],[1,"hotel-add__button",3,"click","clickable","icon","taDisabled"],[1,"hotel__details-stars"],[3,"hotel"],[1,"hotel__details-location-badge"],[1,"hotel__details-google-link"],["target","_blank",3,"href"],[1,"hotel__details-reviews"],[1,"hotel__details-distance"],[1,"hotel__details-rate"],[1,"badge",3,"roomInfo"],[1,"hotel__details-rate-amount"],["popoverTrigger","hover",1,"recommended-hotels__search",3,"ngClass","taPopover","popoverConfig"],[3,"hotelSelected","placeSelected","excludedOptions","isDisabled","options","searchId","taDisabled"],[1,"recommended-hotels__length"]]},template:function(n,i){if(n&1&&(r(0,"div",9),p(1,zu,3,0,"ng-container",10)(2,Zu,1,1,"ng-template",null,0,k),s(),p(4,eg,5,15,"ng-container",11)),n&2){let l=V(3);o(),a("ngIf",i.isLoadingHotels||i.isLoadingCustomHotel)("ngIfElse",l),o(3),a("ngIf",i.hotelSearchRes&&!i.isLoadingHotels&&!i.isLoadingCustomHotel)}},dependencies:[L,Ii,_e,T_,Pr,ll,re,S_,K,Z,Fn,Ht,P_,Li],styles:[`@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_nghost-%COMP%]{width:100%}.recommended-hotels[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}.recommended-hotels__item[_ngcontent-%COMP%]{flex:0 0 calc(50% - var(--dim-step2))}.recommended-hotels__item[_ngcontent-%COMP%]   .hotel-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;border:1px solid var(--ta-color-border-default);border-radius:12px;padding:var(--dim-step4);position:relative;margin-top:0}.recommended-hotels__item[_ngcontent-%COMP%]:nth-child(n+2)   .hotel-wrap[_ngcontent-%COMP%]{margin-top:var(--dim-step4)}.recommended-hotels__empty[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;padding:var(--dim-step12) 0 0}.recommended-hotels__empty-text[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;margin-top:var(--dim-step5)}.recommended-hotels__search[_ngcontent-%COMP%]{width:510px;padding-top:var(--dim-step4)}.recommended-hotels__search--no-padding[_ngcontent-%COMP%]{padding-top:0}.recommended-hotels__length[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;padding-top:var(--dim-step4)}.recommended-hotels__spinner[_ngcontent-%COMP%]{width:100%;height:96px;position:relative}.recommended-hotels[_ngcontent-%COMP%]   .hotel[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.recommended-hotels[_ngcontent-%COMP%]   .hotel__image[_ngcontent-%COMP%]{max-width:164px;min-width:164px;max-height:130px;min-height:130px;display:flex;position:relative}.recommended-hotels[_ngcontent-%COMP%]   .hotel__image-photo[_ngcontent-%COMP%]{width:100%;border-radius:var(--dim-step3);object-fit:fill;cursor:pointer}.recommended-hotels[_ngcontent-%COMP%]   .hotel__image-photo[_ngcontent-%COMP%]:hover{filter:brightness(95%)}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details[_ngcontent-%COMP%]{margin-left:var(--dim-step3)}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-stars[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-stars[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-right:var(--dim-step1);vertical-align:top}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details[_ngcontent-%COMP%]   ta-hotel-rate-highlight[_ngcontent-%COMP%]{cursor:default}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-name[_ng
5content-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start;margin:var(--dim-step1) 0;cursor:pointer;width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-name[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-primary)}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-reviews[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-reviews[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-xs);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-distance[_ngcontent-%COMP%]{margin:var(--dim-step1) 0;color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-rate[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-rate-amount[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-location-badge[_ngcontent-%COMP%]{display:inline-block;padding:var(--dim-step1) var(--dim-step2);margin:var(--dim-step2) 0;background-color:var(--ta-color-surface-alternative);color:var(--ta-color-text-subtle);border-radius:var(--dim-step1);font-size:var(--text-size-small)}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-google-link[_ngcontent-%COMP%]{margin:var(--dim-step1) 0 var(--dim-step3) 0;color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-google-link[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--ta-color-text-link);text-decoration:none;display:inline-flex;align-items:center}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-google-link[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:underline}.recommended-hotels[_ngcontent-%COMP%]   .hotel__details-google-link[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:before{content:"";display:inline-block;width:16px;height:16px;margin-right:4px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat}.recommended-hotels[_ngcontent-%COMP%]   .hotel__badges[_ngcontent-%COMP%]{position:absolute;top:var(--dim-step1);left:var(--dim-step1);display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap}.recommended-hotels[_ngcontent-%COMP%]   .hotel__badges[_ngcontent-%COMP%]   .badge[_ngcontent-%COMP%]{margin-right:var(--dim-step1)}.recommended-hotels[_ngcontent-%COMP%]   .hotel-add[_ngcontent-%COMP%]{margin:var(--dim-step2);position:absolute;top:0;right:0}.recommended-hotels[_ngcontent-%COMP%]   .hotel-add__button[_ngcontent-%COMP%]     svg{transform:scale(1.3)}.recommended-hotels[_ngcontent-%COMP%]   .hotel-add__button[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-primary)}`],changeDetection:0})}}return t})();E();E();be();E();be();var h_=(()=>{class t{constructor(e,n){this.growthService=e,this.growthCompanyOnboardedModalService=n,this.disabled=!1}openCreateCompanyAccount(){er(fi(Fs.COMPANY_UPSELL_CLICKED,{product:"group_travel",context:"group_travel_sidebar"},!0)).pipe(He(()=>{this.growthService.isUserCanAdminClaimByCompanySize(this.userInfo)?this.growthCompanyOnboardedModalService.openSetCompanyAccountModalForBigCompany(this.userInfo,"group_travel_sidebar"):window.location.href="/app/admin2/group-travel-upsell"})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)(T(en),T(Ls))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-create-account"]],inputs:{disabled:"disabled",userInfo:"userInfo"},standalone:!0,features:[y],decls:8,vars:1,consts:()=>{let e;e=$localize`:␟bfb3d48e1092884e84961a4feff287f64ca3b820␟3380116040546351317:Create a company account`;let n;n=$localize`:␟74dfc8a17484429ba7d2af1695c928b420180039␟4790719344852287089:Get more from Navan with a company account`;let i;return i=$localize`:␟eaafbd1358e6517abd1942d606534c14af8d75e2␟207260672797236085
55: Advanced dashboards, recurring reports, expense features, Navan Rewards, and more are waiting on the other side. `,[n,i,[1,"create-account"],[1,"create-account__top"],["icon","rewards","customSize","40",1,"create-account__top__icon"],["kind","outline","text",e,3,"clickEvent","disabled"]]},template:function(n,i){n&1&&(r(0,"section",2)(1,"div",3),m(2,"ta-illustration",4),s(),r(3,"h2"),g(4,0),s(),r(5,"p"),g(6,1),s(),r(7,"ta-button-v2",5),S("clickEvent",function(){return i.openCreateCompanyAccount()}),s()()),n&2&&(o(7),a("disabled",i.disabled))},dependencies:[Zr,Jr,ie,Ee],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.create-account[_ngcontent-%COMP%]{box-sizing:border-box;width:328px;padding:var(--ta-size-padding-24);background-color:var(--ta-color-surface-default);border-radius:var(--dim-step3);box-shadow:0 1px var(--dim-step1) 0 #18191b26;margin-bottom:var(--dim-step4)}.create-account__top[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step4)}.create-account__top__icon[_ngcontent-%COMP%]{color:var(--ta-color-icon-subtle)}.create-account[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0 0 var(--dim-step4) 0;font-weight:var(--text-weight-xb);font-size:var(--text-size-big);line-height:26px}.create-account[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0 0 var(--dim-step5) 0;line-height:24px}"]})}}return t})();E();be();E();be();E();function tg(t,_){if(t&1&&m(0,"ta-select-option-v2",6),t&2){let e=_.$implicit;a("label",e.label)("value",e.value)}}function ng(t,_){if(t&1&&m(0,"ta-user-group-team-events",7),t&2){let e=c();a("formControl",e.selectedApprover)("disabled",!1)("userEditable",!1)("canCreate",!1)}}var Oa=(()=>{class t{constructor(e){this.cdRef=e,this.approverTypeOptions=[{label:$localize`Event organizer`,value:wi.ORGANIZER},{label:$localize`Employee's approver (Organizer for guests)`,value:wi.PARTICIPANTS_APPROVER},{label:$localize`Select specific approver...`,value:wi.SELECTED_USER}],this.EventApproverType=wi,this.selectedType=new $t(null),this.selectedApprover=new $t(null),this.destroy$=new dt,this.onTouch=()=>{},this.onChange=()=>{}}ngOnInit(){this.trackValueChanges()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){e&&(this.selectedType.setValue(e.approverType?e.approverType:wi.ORGANIZER),this.selectedApprover.setValue(e.approver?[e.approver]:[])),this.cdRef.detectChanges()}setDisabledState(e){e?(this.selectedType.disable(),this.selectedApprover.disable()):(this.selectedType.enable(),this.selectedApprover.enable()),this.cdRef.detectChanges()}trackValueChanges(){this.selectedType.valueChanges.pipe(De(this.destroy$),xt()).subscribe(e=>{this.onChange({approverType:e,approver:(this.selectedApprover.value||[])[0]})}),this.selectedApprover.valueChanges.pipe(De(this.destroy$),xt()).subscribe(e=>{this.onChange({approverType:this.selectedType.value,approver:(e||[])[0]})})}static{this.\u0275fac=function(n){return new(n||t)(T($e))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-approver-type"]],standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0}]),y],decls:6,vars:4,consts:()=>{let e;e=$localize`:␟af3489586d43e48f4d17a662c684d2fec80d56cf␟7797073317318941564:Booking approver`;let n;n=$localize`:␟4272330999299ad289529f675630ad4435398dde␟6323544012272291966:Select approver`;let i;return i=$localize`:␟38e00810ba5a8d6959ea5cef6376df68b2273df8␟6443908098776271092:Selected approver`,[[1,"event-approver"],["label",e,"size","large",3,"showMargins"],[3,"formControl"],[3,"label","value",4,"ngFor","ngForOf"],[1,"event-approver__user"],["placeholder",n,"filterTitle",i,"maxUsers","1",3,"formControl","disabled","userEditable","canCreate",4,"ngIf"],[3,"label","value"],["placeholder",n,"filterTitle",i,"maxUsers","1",3,"formControl","disabled","userEditable","canCreate"]]},template:function(n,i){n&1&&(r(0,"div",0)(1,"ta-form-wrap-v2",1)(2,"ta-select-v2",2),p(3,tg,1,2,"ta-select-option-v2",3),s()(),r(4,"div",4),p(5,ng,1,4,"ta-user-group-team-events",5),s()()),n&2&&(o(),a("showMargins",!1),o(),a("formControl",i.selectedType),o(),a("ngForOf",i.approverTypeOptions),o(2),a("ngIf",i.selectedType.value===i.EventApproverType.SELECTED_USER))},dependencies:[mt,_e,L,he,Me,wt,Qt,gn,Ri,Ni,Oi,Mi,Ds],styles:[".event-approver__user[_ngcontent-%COMP%]{margin-top:var(--dim-step4)}"],changeDetection:0})}}return t})();E();E();function ig(t,_){if(t&1){let e=O();r(0,"span",9),C(1),r(2,"ta-icon-v2",10),S("click",function(i){let l=f(e).$implicit,d=c();
5return v(d.removeOption(i,l))}),s()()}if(t&2){let e=_.$implicit,n=_.index;Bt("data-testid","team-event-direct-bill__pill-"+n),o(),B(" ",e.nickname," ")}}function og(t,_){if(t&1&&(r(0,"span",11),C(1),s()),t&2){let e=c();o(),B(" ",e.placeholder," ")}}function ag(t,_){t&1&&m(0,"ta-icon-v2",18)}function rg(t,_){if(t&1){let e=O();r(0,"div",14),S("click",function(i){let l=f(e).$implicit,d=c(2);return v(d.toggleOption(i,l))}),r(1,"div",15),p(2,ag,1,0,"ta-icon-v2",16),s(),r(3,"span",17),C(4),s()()}if(t&2){let e=_.$implicit,n=c(2);o(2),a("ngIf",n.isOptionSelected(e)),o(2),G(e.nickname)}}function sg(t,_){if(t&1){let e=O();r(0,"div",12),S("click",function(i){return f(e),v(i.stopPropagation())}),p(1,rg,5,2,"div",13),s()}if(t&2){let e=c();o(),a("ngForOf",e.availableDirectBillAccounts)}}var A_=(()=>{class t{constructor(e){this.changeDetectorRef=e,this.availableDirectBillAccounts=[],this.selectedDirectBillAccounts=[],this.isDropdownOpen=!1,this.placeholder=$localize`None (use payment method selected above)`,this.directBillLabel=$localize`Rental car direct billing accounts`,this.popoverConfig={customClasses:"team-event-direct-bill__popover",placement:{placeAt:"bottomLeftAlign"},withArrow:!1,width:"container"},this.onTouch=()=>{},this.onChange=()=>{}}toggleOption(e,n){this.selectedDirectBillAccounts.some(i=>i.uuid===n.uuid)?this.selectedDirectBillAccounts=this.selectedDirectBillAccounts.filter(i=>i.uuid!==n.uuid):this.selectedDirectBillAccounts=[...this.selectedDirectBillAccounts,n],this.onChange({directBillAccounts:this.selectedDirectBillAccounts.map(i=>i.uuid)}),this.changeDetectorRef.markForCheck()}removeOption(e,n){e.stopPropagation(),this.selectedDirectBillAccounts=this.selectedDirectBillAccounts.filter(i=>i.uuid!==n.uuid),this.onChange({directBillAccounts:this.selectedDirectBillAccounts.map(i=>i.uuid)}),this.changeDetectorRef.markForCheck()}isOptionSelected(e){return this.selectedDirectBillAccounts.some(n=>n.uuid===e.uuid)}getDirectBillAccountByUuid(e){return this.availableDirectBillAccounts.find(n=>n.uuid===e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){e?.directBillAccounts&&(this.selectedDirectBillAccounts=e.directBillAccounts.map(n=>this.getDirectBillAccountByUuid(n)).filter(n=>n!==void 0),this.changeDetectorRef.markForCheck())}static{this.\u0275fac=function(n){return new(n||t)(T($e))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-direct-bill"]],inputs:{availableDirectBillAccounts:"availableDirectBillAccounts"},standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0}]),y],decls:11,vars:7,consts:[["dropdownContent",""],[1,"team-event-direct-bill"],[1,"team-event-direct-bill__header"],[1,"team-event-direct-bill__label"],["data-testid","team-event-direct-bill__input","popoverTrigger","click",1,"team-event-direct-bill__input",3,"taPopoverOnOpen","taPopoverOnClose","taPopover","popoverConfig"],["data-testid","team-event-direct-bill__pills-container",1,"team-event-direct-bill__pills-container"],["class","team-event-direct-bill__pill",4,"ngFor","ngForOf"],["class","team-event-direct-bill__placeholder","data-testid","team-event-direct-bill__placeholder",4,"ngIf"],["icon","chevron-bottom",1,"team-event-direct-bill__icon"],[1,"team-event-direct-bill__pill"],["icon","cross-small",1,"team-event-direct-bill__pill-remove",3,"click"],["data-testid","team-event-direct-bill__placeholder",1,"team-event-direct-bill__placeholder"],["data-testid","team-event-direct-bill__list",1,"team-event-direct-bill__list",3,"click"],["class","team-event-direct-bill__option",3,"click",4,"ngFor","ngForOf"],[1,"team-event-direct-bill__option",3,"click"],[1,"team-event-direct-bill__checkbox"],["icon","check","class","team-event-direct-bill__checkbox-icon",4,"ngIf"],[1,"team-event-direct-bill__option-label"],["icon","check",1,"team-event-direct-bill__checkbox-icon"]],template:function(n,i){if(n&1){let l=O();r(0,"div",1)(1,"div",2)(2,"span",3),C(3),s()(),r(4,"div",4),S("taPopoverOnOpen",function(){return f(l),v(i.isDropdownOpen=!0)})("taPopoverOnClose",function(){return f(l),v(i.isDropdownOpen=!1)}),r(5,"div",5),p(6,ig,3,2,"span",6)(7,og,2,1,"span",7),s(),m(8,"ta-icon-v2",8),s()(),p(9,sg,2,1,"ng-template",null,0,k)}if(n&2){let l=V(10);o(3),G(i.directBillLabel),o(),a("taPopover",l)("popoverConfig",i.popoverConfig),o(2),a("ngForOf",i.selectedDirectBillAccounts),o(),a("ngIf",i.selectedDirectBillAccounts.length===0),o(),te("team-event-direct-bill__icon--open",i.isDropdownOpen)}},dependencies:[mt,_e,L,re,K,Z],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.team-event-direct-bill[_ngcontent-%COMP%]{display:block;width:100%;margin-top:var(--dim-step6)}.team-event-direct-bill__header[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2)}.team-event-direct-bill__label[_ngcontent-%COMP%]{font-size:var(--text-size-medium, 16px);font-style:normal;font-weight:var(--text-weight-medium, 500);line-height:var(--dim-step6)}.team-event-direct-bill__input[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:35px;padding:var(--dim-step2) var(--dim-step4);border:1px solid var(--ta-color-border-default);border-radius:var(--dim-step3);background:var(--ta-color-surface-default);cursor:pointer}.team-event-direct-bill__pills-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--dim-step2);flex:1}.team-event-direct-bill__pill[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step2);padding:var(--dim-step1) 0 var(--dim-step1) var(--dim-step3);background:var(--ta-color-surface-subdued, #f5f5f8);border:1px solid var(--ta-color-border-default, #74748c);border-radius:100px;color:var(--ta-color-text-default, #131316);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;white-space:nowrap}.team-event-direct-bill__pill-remove[_ngcontent-%COMP%]{cursor:pointer;color:var(--ta-color-text-subtle);display:flex;align-items:center}.team-event-direct-bill__pill-remove[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.team-event-direct-bill__placeholder[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start}.team-event-direct-bill__icon[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);flex-shrink:0;margin-left:var(--dim-step2)}.team-event-direct-bill__icon--open[_ngcontent-%COMP%]{transform:rotate(180deg)}.team-event-direct-bill__list[_ngcontent-%COMP%]{max-height:240px;overflow-y:auto;padding:var(--dim-step2) 0;width:100%;box-sizing:border-box}.team-event-direct-bill__option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step4);padding:var(--dim-step4) var(--dim-step4) var(--dim-step4) var(--dim-step4);cursor:pointer}.team-event-direct-bill__checkbox[_ngcontent-%COMP%]{width:20px;height:20px;border:1px solid var(--ta-color-border-default);border-radius:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.team-event-direct-bill__option[_ngcontent-%COMP%]:hover   .team-event-direct-bill__checkbox[_ngcontent-%COMP%]{border-color:var(--ta-color-border-strong)}.team-event-direct-bill__option-label[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]})}}return t})();function lg(t,_){t&1&&(r(0,"div",12),g(1,1),s())}function _g(t,_){if(t&1){let e=O();r(0,"div")(1,"ta-payment-card",16),S("toggle",function(){f(e);let i=c(2);return v(i.isAvailablePaymentMethodExpandedEmployee=!i.isAvailablePaymentMethodExpandedEmployee)}),s()()}if(t&2){let e=c(2);o(),a("paymentCard",e.selectedPaymentMethodEmployee)("showEdit",e.availablePaymentMethods.length===0||e.formGroup.disabled)("showDetail",e.isAvailablePaymentMethodExpandedEmployee)}}function cg(t,_){if(t&1){let e=O();r(0,"ta-payment-card",17),S("toggle",function(){f(e);let i=c(2);return v(i.isAvailablePaymentMethodExpandedEmployee=!i.isAvailablePaymentMethodExpandedEmployee)}),s()}if(t&2){let e=c(2);a("placeholderCardLabels",e.placeholderCardLabelsEmployee)("showEdit",e.availablePaymentMethods.length===0||e.formGroup.disabled)("showDetail",e.isAvailablePaymentMethodExpandedEmployee)}}function dg(t,_){if(t&1&&(r(0,"ta-radio-button-v2",23),m(1,"ta-payment-card",24),s()),t&2){let e=_.$implicit;a("value",e.uuid),o(),a("paymentCard",e)("showEdit",!0)}}function pg(t,_){if(t&1&&(r(0,"div",18)(1,"ta-radio-group-v2",19)(2,"ta-radio-button-v2",20),m(3,"ta-payment-card",21),s(),p(4,dg,2,3,"ta-radio-button-v2",22),s()()),t&2){let e=c(2);o(3),a("placeholderCardLabels",e.placeholderCardLabelsEmployee)("showEdit",!0),o(),a("ngForOf",e.availablePaymentMethods)}}function mg(t,_){if(t&1&&(r(0,"div",13),p(1,_g,2,3,"div",14)(2,cg,1,3,"ng-template",null,0,k)(4,pg,5,3,"div",15),s()),t&2){let e=V(3),n=c();o(),a("ngIf",n.selectedPaymentMethodEmployee)("ngIfElse",e),o(3),a("ngIf",n.isAvailablePaymentMethodExpandedEmployee)}}function Eg(t,_){if(t&1){let e=O();r(0,"div")(1,"ta-payment-card",16),S("toggle",function(){f(e);let i=c(3);return v(i.isAvailablePaymentMethodExpandedGuest=!i.isAvailablePaymentMethodExpandedGuest)}),s()()}if(t&2){let e=c(3);o(),a("paymentCard",e.selectedPaymentMethodGuest)("showEdit",e.availablePaymentMethods.length==0||e.formGroup.disabled)("showDetail",e.isAvailablePaymentMethodExpandedGuest)}}function ug(t,_){if(t&1){let e=O();r(0,"ta-payment-card",17),S("toggle",function(){f(e);let i=c(3);return v(i.isAvailablePaymentMethodExpandedGuest=!i.isAvailablePaymentMethodExpandedGuest)}),s()}if(t&2){let e=c(3);a("placeholderCardLabels",e.placeholderCardLabelsGuest)("showEdit",e.availablePaymentMethods.length==0||e.formGroup.disabled)("showDetail",e.isAvailablePaymentMethodExpandedGuest)}}function gg(t,_){if(t&1&&(r(0,"ta-radio-button-v2",23),m(1,"ta-payment-card",24),s()),t&2){let e=_.$implicit;a("value",e.uuid),o(),a("paymentCard",e)("showEdit",!0)}}function fg(t,_){if(t&1&&(r(0,"div",18)(1,"ta-radio-group-v2",26)(2,"ta-radio-button-v2",20),m(3,"ta-payment-card",21),s(),p(4,gg,2,3,"ta-radio-button-v2",22),s()()),t&2){let e=c(3);o(3),a("placeholderCardLabels",e.placeholderCardLabelsGuest)("showEdit",!0),o(),a("ngForOf",e.availablePaymentMethods)}}function vg(t,_){if(t&1&&(r(0,"div",13),p(1,Eg,2,3,"div",14)(2,ug,1,3,"
5ng-template",null,0,k)(4,fg,5,3,"div",15),s()),t&2){let e=V(3),n=c(2);o(),a("ngIf",n.selectedPaymentMethodGuest)("ngIfElse",e),o(3),a("ngIf",n.isAvailablePaymentMethodExpandedGuest)}}function Tg(t,_){if(t&1&&(r(0,"div",25)(1,"div",12),g(2,2),s(),p(3,vg,5,3,"div",8),s()),t&2){let e=c();o(3),a("ngIf",!!e.availablePaymentMethods)}}function Sg(t,_){if(t&1&&m(0,"ta-settings-diff-notification",27),t&2){let e=c();a("propertyType",e.PropertyType.PAYMENT_METHOD)("propertyValue",e.paymentMethodPropertyValue)}}function Pg(t,_){if(t&1&&m(0,"ta-team-event-direct-bill",29),t&2){let e=c(2);a("availableDirectBillAccounts",e.availableDirectBillAccounts)}}function Cg(t,_){if(t&1&&(r(0,"div",6),p(1,Pg,1,1,"ta-team-event-direct-bill",28),s()),t&2){let e=c();a("taLoading",e.isFetchingDirectBillAccounts),o(),a("ngIf",!e.isFetchingDirectBillAccounts&&e.availableDirectBillAccounts.length>0)}}var Ka="totalAvailablePaymentMethods",Ma=(()=>{class t{constructor(e,n,i,l,d,u,h,I){this.elementRef=e,this.fb=n,this.paymentMethodsService=i,this.changeDetectorRef=l,this.amplitudeService=d,this.splitSvc=u,this.groupTravelApiService=h,this.travelEventQuery=I,this.isMultiplePaymentGroupTravelAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_MULTIPLE_PAYMENT_SELECTION"),this.isSelectedPaymentMethodsEnabled=this.splitSvc.isOn("GME_SELECTED_PAYMENT_METHODS"),this.PropertyType=Hn,this.paymentMethodPropertyValue=null,this.isAvailablePaymentMethodExpandedEmployee=!1,this.isAvailablePaymentMethodExpandedGuest=!1,this.availablePaymentMethods=[],this.availableDirectBillAccounts=[],this.isFetchingPaymentMethods=!1,this.isFetchingSelectedPaymentMethod=!1,this.isFetchingDirectBillAccounts=!1,this.hasFetchedPaymentMethods=!1,this.startedSelectedPaymentMethodRequest=!1,this.placeholderCardLabelsEmployee={title:$localize`Participants will select a card`,subtitle:$localize`Employees can use any card available to them for business travel or a personal card. Guests will need to use a personal card.`},this.placeholderCardLabelsGuest={title:$localize`Use guest payment methods`,subtitle:$localize`Guests will use their own personal card`},this.onTouch=()=>{},this.onChange=()=>{}}get inviterPaymentMethodUuid(){return this.formGroup.controls.inviterPaymentMethodUuid.value}get guestsPaymentMethodUuid(){return this.formGroup.controls.guestsPaymentMethodUuid.value}ngOnInit(){this.formGroup=this.fb.group({inviterPaymentMethodUuid:[],guestsPaymentMethodUuid:[],directBill:[]}),this.fetchPaymentMethods(),this.fetchDirectBillAccounts(),this.subscribeToValueChanges()}subscribeToValueChanges(){this.formGroup.valueChanges.pipe(ft(this.elementRef)).subscribe(e=>{N(X.TEAM_EVENT_PAYMENT_METHOD_VALUE_CHANGED,{inviterPaymentMethodUuid:e.inviterPaymentMethodUuid,guestPaymentMethodUuid:e.guestsPaymentMethodUuid}),N(z.EVENT_SETTINGS_CHANGED,{[x.VIEW]:H.EVENT_SETTINGS_POLICY_AND_PAYMENT,[x.CONTEXT]:nt.PAGE,[x.NAVAN_EVENT_SETTING]:Tn.POLICY_AND_PAYMENT_PAYMENT_INVITER_PAYMENT_METHOD_UUID}),this.isAvailablePaymentMethodExpandedEmployee=!1,this.isAvailablePaymentMethodExpandedGuest=!1,this.updateSelectedPaymentMethods();let n=e.inviterPaymentMethodUuid==="empty"?void 0:e.inviterPaymentMethodUuid,i=n!==this.initialInviterPaymentMethodUuid;this.paymentMethodPropertyValue=i?{allowedPaymentMethodId:n??""}:null,this.onChange({inviterPaymentMethodUuid:n,guestsPaymentMethodUuid:e.guestsPaymentMethodUuid==="empty"?void 0:e.guestsPaymentMethodUuid,directBill:e.directBill}),this.changeDetectorRef.detectChanges()})}fetchPaymentMethods(){this.isFetchingPaymentMethods=!0;let e={personal:!1,guest:!0,excludeDirectBill:!0,excludeExpired:!0};this.paymentMethodsService.getPaymentMethods(e).pipe(He(()=>{this.isFetchingPaymentMethods=!1,this.changeDetectorRef.detectChanges()})).subscribe(n=>{this.availablePaymentMethods=n,this.hasFetchedPaymentMethods=!0,this.updateSelectedPaymentMethods(),this.fetchMissingInviterPaymentMethod(),N(X.TOTAL_TEAM_EVENT_AVAILABLE_PAYMENT_METHODS,{total:this.availablePaymentMethods.length}),this.amplitudeService.addCustomData(Ka,this.availablePaymentMethods.length)})}fetchMissingInviterPaymentMethod(){if(!this.isSelectedPaymentMethodsEnabled||!this.hasFetchedPaymentMethods||this.startedSelectedPaymentMethodRequest||this.selectedPaymentMethodEmployee)return;let e=this.inviterPaymentMethodUuid==="empty"?void 0:this.inviterPaymentMethodUuid,n=this.travelEventQuery.activeEventId;!e||!n||(this.startedSelectedPaymentMethodRequest=!0,this.isFetchingSelectedPaymentMethod=!0,this.changeDetectorRef.markForCheck(),this.groupTravelApiService.getSelectedPaymentMethods(n).pipe(He(()=>{this.isFetchingSelectedPaymentMethod=!1,this.changeDetectorRef.detectChanges()})).subscribe({next:i=>{this.mergeSelectedPaymentMethod(i,e)&&(this.updateSelectedPaymentMethods(),this.amplitudeService.addCustomData(Ka,this.availablePaymentMethods.length))},error:()=>{}}))}mergeSelectedPaymentMethod(e,n){let i=e.find(l=>l.uuid===n);return!i||this.hasPaymentMethod(i.uuid)?!1:(this.availablePaymentMethods=[...this.availablePaymentMethods,this.toPaymentMethod(i)],!0)}hasPaymentMethod(e){return this.availablePaymentMethods.some(n=>n.uuid===e)}toPaymentMethod(e){let n=e.cardType??"UNKNOWN";return{uuid:e.uuid,nickname:e.nickname,ownerType:e.ownerType,creditCardType:n,creditCard:{lastFourDigits:e.lastFourDigits,type:n}
5,valid:!0}}fetchDirectBillAccounts(){this.isFetchingDirectBillAccounts=!0,this.paymentMethodsService.getDirectBillsCarsForEventDetails().pipe(He(()=>{this.isFetchingDirectBillAccounts=!1,this.changeDetectorRef.detectChanges()})).subscribe(e=>{this.availableDirectBillAccounts=e,N(X.TOTAL_TEAM_EVENT_AVAILABLE_DIRECT_BILLS,{total:this.availableDirectBillAccounts.length})})}ngOnDestroy(){this.amplitudeService.removeCustomData(Ka)}updateSelectedPaymentMethods(){this.selectedPaymentMethodEmployee=this.availablePaymentMethods.find(e=>e.uuid===this.inviterPaymentMethodUuid),this.selectedPaymentMethodGuest=this.availablePaymentMethods.find(e=>e.uuid===this.guestsPaymentMethodUuid),this.changeDetectorRef.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){this.initialInviterPaymentMethodUuid=e.inviterPaymentMethodUuid,this.paymentMethodPropertyValue=null,this.formGroup.patchValue({inviterPaymentMethodUuid:e.inviterPaymentMethodUuid||"empty",guestsPaymentMethodUuid:e.guestsPaymentMethodUuid||"empty",directBill:e.directBill},{emitEvent:!1}),this.updateSelectedPaymentMethods(),this.fetchMissingInviterPaymentMethod(),this.changeDetectorRef.detectChanges()}validate(e){return this.formGroup.valid?null:{paymentMethodInvalid:!0}}setDisabledState(e){e?this.formGroup.disable():this.formGroup.enable()}static{this.\u0275fac=function(n){return new(n||t)(T(it),T(qe),T(Rs),T($e),T($o),T(Ce),T(Ae),T(ve))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-payment-method"]],standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0},{provide:Et,useExisting:t,multi:!0}]),y],decls:9,vars:7,consts:()=>{let e;e=$localize`:␟2f3c256ce511ea48465ad92f77f1e3c205320116␟5572967156452146825: Company employees `;let n;return n=$localize`:␟5b1fa5c2021a6df06edc0f58f7acd2ee139142fc␟7184318772253450841:Guests`,[["noPaymentSelectedTemplate",""],e,n,[1,"team-event-payment-method"],[3,"formGroup"],[1,"team-event-payment-method__options"],[3,"taLoading"],["class","team-event-payment-method__title",4,"ngIf"],["class","team-event-payment-method__options-wrapper",4,"ngIf"],["class","team-event-payment-method__guests-container",4,"ngIf"],["class","with-margin-top",3,"propertyType","propertyValue",4,"ngIf"],[3,"taLoading",4,"ngIf"],[1,"team-event-payment-method__title"],[1,"team-event-payment-method__options-wrapper"],[4,"ngIf","ngIfElse"],["class","team-event-payment-method__cards",4,"ngIf"],["theme","v2",3,"toggle","paymentCard","showEdit","showDetail"],["theme","placeholder",3,"toggle","placeholderCardLabels","showEdit","showDetail"],[1,"team-event-payment-method__cards"],["formControlName","inviterPaymentMethodUuid",1,"team-event-payment-method__cards__options"],["value","empty",1,"team-event-payment-method__cards__options__item"],["theme","placeholder",3,"placeholderCardLabels","showEdit"],["class","team-event-payment-method__cards__options__item",3,"value",4,"ngFor","ngForOf"],[1,"team-event-payment-method__cards__options__item",3,"value"],["theme","v2",3,"paymentCard","showEdit"],[1,"team-event-payment-method__guests-container"],["formControlName","guestsPaymentMethodUuid",1,"team-event-payment-method__cards__options"],[1,"with-margin-top",3,"propertyType","propertyValue"],["formControlName","directBill",3,"availableDirectBillAccounts",4,"ngIf"],["formControlName","directBill",3,"availableDirectBillAccounts"]]},template:function(n,i){n&1&&(r(0,"div",3)(1,"form",4)(2,"div",5)(3,"div",6),p(4,lg,2,0,"div",7)(5,mg,5,3,"div",8)(6,Tg,4,1,"div",9),s()(),p(7,Sg,1,2,"ta-settings-diff-notification",10)(8,Cg,2,2,"div",11),s()()),n&2&&(o(),a("formGroup",i.formGroup),o(2),a("taLoading",i.isFetchingPaymentMethods||i.isFetchingSelectedPaymentMethod),o(),a("ngIf",i.isMultiplePaymentGroupTravelAllowed),o(),a("ngIf",!!i.availablePaymentMethods),o(),a("ngIf",i.isMultiplePaymentGroupTravelAllowed),o(),a("ngIf",i.paymentMethodPropertyValue),o(),a("ngIf",i.isFetchingDirectBillAccounts||i.availableDirectBillAccounts.length>0))},dependencies:[je,Ut,Me,Xe,he,Ge,Qe,Mt,L,il,Uo,Lo,Fo,_e,A_,$i],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.team-event-payment-method[_ngcontent-%COMP%]{--border-radius: 12px}.team-event-payment-method__title[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);margin-bottom:var(--dim-step4)}.team-event-payment-method__options-wrapper[_ngcontent-%COMP%]{border:solid 1px var(--ta-color-border-secondary);border-radius:var(--border-radius);padding:var(--dim-step4);background-color:#fff}.team-event-payment-method__options[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:normal;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step8)}.team-event-payment-method__option[_ngcontent-%COMP%]{padding-left:var(--ta-size-padding-08)}.team-event-payment-method__option[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start;line-height:26px;margin:0}.team-event-payment-method__option[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;line-height:24px;margin:0}.team-event-payment-method__cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:normal;justify-content:flex-start;flex-wrap:nowrap;gap:var(--dim-step5);margin-top:var(--dim-step5);transition:max-height 1s ease}.team-event-payment-method__cards__options[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:normal;justify-content:flex-start;flex-wrap:nowrap}.team-event-payment-method__cards__options__item[_ngcontent-%COMP%]{border-top:var(--ta-color-border-default) 1px solid}.team-event-payment-method__cards__options__item[_ngcontent-%COMP%]   ta-payment-card[_ngcontent-%COMP%]{padding:var(--dim-step4) 0;margin-left:var(--dim-step2)}.team-event-payment-method__guests-container[_ngcontent-%COMP%]{background-color:var(--ta-color-surface-background);padding:var(--dim-step5) var(--dim-step4);border-radius:var(--border-radius);margin:var(--dim-step6) calc(var(--dim-step4) * -1) 0}"],changeDetection:0})}}return t})();E();var hg=()=>({placeAt:"top"}),Ag=t=>({placement:t});function Og(t,_){if(t&1){let e=O();r(0,"ta-select-option-v2",21),S("click",function(i){f(e);let l=c(3);return v(l.handleCustomPolicyClick(i))}),s()}if(t&2){let e=c(3);oi("value",e.customPolicyUuid),a("label","Custom policy")}}function Mg(t,_){t&1&&(r(0,"ta-select-option-v2-section-header")(1,"div",22)(2,"div",23)(3,"div",24),g(4,3),s(),m(5,"div",25),s()()())}function Ng(t,_){if(t&1&&m(0,"ta-select-option-v2",27),t&2){let e=c().$implicit;a("label",e.name)("value",e.uuid)}}function Rg(t,_){if(t&1&&(w(0),p(1,Ng,1,2,"ta-select-option-v2",26),U()),t&2){let e=_.$implicit,n=c(3);o(),a("ngIf",e.uuid!==n.EMPLOYEE_POLICY_UUID&&e.uuid!==n.customPolicyUuid)}}function bg(t,_){if(t&1&&m(0,"ta-settings-diff-notification",28),t&2){let e=c(3);a("propertyType",e.PropertyType.TRAVEL_POLICY)("propertyValue",e.travelPolicyPropertyValue)}}function yg(t,_){if(t&1&&(r(0,"div",37),C(1),s()),t&2){let e=c().$implicit,n=c(4);o(),B(" $",n.getMaxAmount(e)," ")}}function Ig(t,_){if(t&1){let e=O();r(0,"div",40),de(1,8),m(2,"span"),r(3,"a",41),S("click",function(i){return f(e),c(7).handleCustomPolicyClick(i),v(i.stopPropagation())}),s(),pe(),s()}if(t&2){let e=c(3).$implicit,n=c(4);o(3),q(n.bookingLabelMap[e].toLowerCase()),J(1)}}function xg(t,_){if(t&1){let e=O();w(0),r(1,"div",38)(2,"div"),g(3,7),s(),r(4,"ta-icon-v2",39),S("click",function(i){f(e);let l=c(6);return v(l.handleCustomPolicyClick(i))}),s()(),p(5,Ig,4,1,"ng-template",null,2,k),U()}if(t&2){let e=V(6);o(4),a("taPopover",e)("popoverConfig",me(3,Ag,Se(2,hg)))}}function Fg(t,_){if(t&1&&(r(0,"div"),g(1,6),s(),p(2,xg,7,5,"ng-container",13),P(3,"async")),t&2){let e=c().$implicit,n=c(4);o(2),a("ngIf",A(3,1,n.allowedBookingVerticals$)[e])}}function Lg(t,_){if(t&1&&(w(0),r(1,"div",32)(2,"div",33),m(3,"ta-icon-v2",34),s(),r(4,"div",35),C(5),s(),p(6,yg,2,1,"div",36)(7,Fg,4,3,"ng-template",37,1,k),s(),U()),t&2){let e=_.$implicit,n=V(8),i=c(4);o(3),a("icon",i.bookingIconMap[e]),o(2),B("",i.bookingLabelMap[e],":"),o(),a("ngIf",i.getMaxAmount(e))("ngIfElse",n)}}function Ug(t,_){if(t&1){let e=O();r(0,"div",29)(1,"div",30),g(2,4),s(),p(3,Lg,9,4,"ng-container",18),r(4,"button",31),S("click",function(i){f(e);let l=c(3);return v(l.handleCustomPolicyClick(i))}),g(5,5),s()()}if(t&2){let e=c(3);o(3),a("ngForOf",e.bookingTypes)}}function wg(t,_){if(t&1){let e=O();w(0),r(1,"ta-form-wrap-v2",14)(2,"ta-select-v2",15),S("ngModelChange",function(i){f(e);let l=c(2);return v(l.onPolicyChange(i))}),m(3,"ta-select-option-v2",16),p(4,Og,1,2,"ta-select-option-v2",17)(5,Mg,6,0,"ta-select-option-v2-section-header",13)(6,Rg,2,1,"ng-container",18),s()(),p(7,bg,1,2,"ta-settings-diff-notification",19)(8,Ug,6,1,"div",20),U()}if(t&2){let e=c(2);o(),a("showMargins",!1),o(),a("formControl",e.internalPolicyUuidControl),o(),oi("value",e.EMPLOYEE_POLICY_UUID),o(),a("ngIf",e.isCustomPolicyEnabled),o(),a("ngIf",e.isCustomPolicyEnabled),o(),a("ngForOf",e.availablePolicies),o(),a("ngIf",!e.formGroup.pristine),o(),a("ngIf",e.internalPolicyUuidValue===e.customPolicyUuid&&e.customPolicyData)}}function Vg(t,_){if(t&1&&m(0,"ta-select-option-v2",27),t&2){let e=_.$implicit;a("label",e.name)("value",e.uuid)}}function kg(t,_){if(t&1&&m(0,"ta-select-option-v2",27),t&2){let e=_.$implicit;a("label",e.name)("value",e.uuid)}}function Dg(t,_){if(t&1&&(w(0),r(1,"div",42)(2,"ta-form-wrap-v2",43)(3,"ta-select-v2",44),p(4,Vg,1,2,"ta-select-option-v2",45),s()(),r(5,"ta-form-wrap-v2",46)(6,"ta-select-v2",44),p(7,kg,1,2,"ta-select-option-v2",45),s()()(),U()),t&2){let e=c(2);o(3),a("formControl",e.internalPolicyUuidControl),o(),a("ngForOf",e.internalAvailablePolicies),o(),a("showMargins",!1),o(),a("formControl",e.guestPolicyUuidControl),o(),a("ngForOf",e.guestAvailablePolicies)}}function $g(t,_){if(t&1&&(w(0),p(1,wg,9,8,"ng-container",13)(2,Dg,8,5,"ng-container",13),U()),t&2){let e=c();o(),a("ngIf",!e.isMultiplePolicyGroupTravelAllowed),o(),a("ngIf",e.isMultiplePolicyGroupTravelAllowed)}}function Gg(t,_){t&1&&(r(0,"span"),g(1,9),s())}var Na=(()=>{class t{constructor(e,n,i,l,d,u){this.elementRef=e,this.fb=n,this.policyService=i,this.changeDetectorRef=l,this.splitService=d,this.travelEventQuery=u,this.availablePolicies=[],this.internalAvailablePolicies=[],this.guestAvailablePolicies=[],this.isFetchingPolicies=!1,this.EMPTY_POLICY_UUID="EMPTY_POLICY",this.EMPLOYEE_POLICY_UUID="EMPLOYEE POLICY",this.previousInternalPolicyUuid="",this.isMultiplePolicyGroupTravelAllowed=this.splitService.isOn("ENT_GROUP_TRAVEL_MULTIPLE_POLICY_SELECTION"),this.isCu
5stomPolicyEnabled=this.splitService.isOn("ENT_GROUP_TRAVEL_CUSTOM_POLICY"),this.showCustomPolicyModal=!1,this.customPolicyData=null,this.travelPolicyPropertyValue={},this.BookingType=D,this.PropertyType=Hn,this.bookingTypes=[D.FLIGHT,D.HOTEL,D.RAIL,D.CAR],this.bookingIconMap={[D.FLIGHT]:"booking-type-flight",[D.HOTEL]:"booking-type-hotel",[D.RAIL]:"booking-type-train",[D.CAR]:"booking-type-car"},this.bookingLabelMap={[D.FLIGHT]:$localize`Flights`,[D.HOTEL]:$localize`Hotels`,[D.RAIL]:$localize`Trains`,[D.CAR]:$localize`Rental cars`},this.onTouch=()=>{},this.onChange=()=>{}}get internalPolicyUuidControl(){return this.formGroup.controls.internalPolicyUuid}get internalPolicyUuidValue(){return this.internalPolicyUuidControl.value}get guestPolicyUuidControl(){return this.formGroup.controls.guestPolicyUuid}get guestPolicyUuidValue(){return this.guestPolicyUuidControl.value}get customPolicyUuid(){return Rt}updateTravelPolicyPropertyValue(){if(this.internalPolicyUuidValue!==Rt){this.travelPolicyPropertyValue={travelPolicy:{companyPolicyId:this.internalPolicyUuidValue,maxPricePolicies:[]}};return}let n=[{tripItemType:Ji.FLIGHT,field:this.customPolicyData?.flights},{tripItemType:Ji.HOTEL,field:this.customPolicyData?.hotels},{tripItemType:Ji.RAIL,field:this.customPolicyData?.trains},{tripItemType:Ji.CAR,field:this.customPolicyData?.rentalCars}].filter(({field:i})=>i?.amount!=null).map(({tripItemType:i,field:l})=>({tripItemType:i,maxPrice:{amount:l.amount,currency:"USD"}}));this.travelPolicyPropertyValue={travelPolicy:{companyPolicyId:Rt,maxPricePolicies:n}}}ngOnInit(){this.formGroup=this.fb.group({internalPolicyUuid:[""],guestPolicyUuid:[""],customPolicyData:[""]}),this.isFetchingPolicies=!0,this.allowedBookingVerticals$=this.travelEventQuery.activeEvent$.pipe(ee(n=>!!n?.settings?.travelConditions),Q(n=>({[D.FLIGHT]:this.isBookingTypeAllowed(n,D.FLIGHT),[D.HOTEL]:this.isBookingTypeAllowed(n,D.HOTEL),[D.RAIL]:this.isBookingTypeAllowed(n,D.RAIL),[D.CAR]:this.isBookingTypeAllowed(n,D.CAR)})),or(1),ft(this.elementRef));let e=this.splitService.isOn("ENT_FILTER_UNUSED_DEFAULT_POLICIES");this.policyService.getPolicyLevels({queryParams:{filterUnusedPolicyLevels:e}}).pipe(He(()=>{this.isFetchingPolicies=!1,this.changeDetectorRef.detectChanges()})).subscribe(n=>{let i=this.removeDefaultPolicy(n);this.availablePolicies=[{uuid:this.EMPLOYEE_POLICY_UUID,name:$localize`Employee's assigned policy (default guest policy will be used for guests)`},{uuid:Rt,name:$localize`Custom policy`},{uuid:this.getDefaultPolicyUuid(n),name:$localize`Default Guest policy`},...i],this.internalAvailablePolicies=[{uuid:this.EMPLOYEE_POLICY_UUID,name:$localize`Use traveler policy`},{uuid:this.getDefaultPolicyUuid(n),name:$localize`Default Guest policy`},...i],this.guestAvailablePolicies=[{uuid:this.EMPTY_POLICY_UUID,name:$localize`Use Default guest policy`},...i]}),this.formGroup.valueChanges.pipe(ft(this.elementRef),xt(this.distinctUntilChangedValue)).subscribe(n=>{N(X.TEAM_EVENT_POLICY_VALUE_CHANGED,{internalPolicyUuid:n.internalPolicyUuid,guestPolicyUuid:n.guestPolicyUuid}),N(z.EVENT_SETTINGS_CHANGED,{[x.VIEW]:H.EVENT_SETTINGS_POLICY_AND_PAYMENT,[x.CONTEXT]:nt.PAGE,[x.NAVAN_EVENT_SETTING]:Tn.POLICY_AND_PAYMENT_POLICY_INTERNAL_POLICY_UUID}),n.internalPolicyUuid!==Rt&&this.updateTravelPolicyPropertyValue(),this.onChange(Re(le({},n),{internalPolicyUuid:n.internalPolicyUuid===this.EMPLOYEE_POLICY_UUID?null:n.internalPolicyUuid,guestPolicyUuid:n.guestPolicyUuid===this.EMPTY_POLICY_UUID?null:n.guestPolicyUuid,customPolicyData:n.internalPolicyUuid===Rt?n.customPolicyData:null}))})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){this.customPolicyData=e.customPolicyData||null,this.formGroup.patchValue({internalPolicyUuid:e.internalPolicyUuid||this.EMPLOYEE_POLICY_UUID,guestPolicyUuid:e.guestPolicyUuid||this.EMPTY_POLICY_UUID}),this.formGroup.markAsPristine(),this.previousInternalPolicyUuid=e.internalPolicyUuid||this.EMPLOYEE_POLICY_UUID,this.updateTravelPolicyPropertyValue(),this.changeDetectorRef.detectChanges()}validate(e){return this.formGroup.valid?null:{policyInvalid:!0}}setDisabledState(e){e?this.formGroup.disable():this.formGroup.enable()}distinctUntilChangedValue(e,n){return e.internalPolicyUuid===n.internalPolicyUuid&&e.guestPolicyUuid===n.guestPolicyUuid}removeDefaultPolicy(e){return e.filter(n=>n.level!=="DEFAULT")}getDefaultPolicyUuid(e){return e.find(n=>n.level==="DEFAULT")?.uuid||this.EMPLOYEE_POLICY_UUID}onPolicyChange(e){e===Rt?this.showCustomPolicyModal&&(this.showCustomPolicyModal=!1,this.changeDetectorRef.detectChanges()):(this.previousInternalPolicyUuid=e,this.customPolicyData=null)}openCustomPolicyModal(){this.showCustomPolicyModal=!0,this.changeDetectorRef.detectChanges()}onCloseCustomPolicyModal(){this.showCustomPolicyModal=!1,this.changeDetectorRef.detectChanges();let e=this.getPreviousPolicyValue();e?this.internalPolicyUuidControl.setValue(e,{emitEvent:!0}):this.internalPolicyUuidControl.setValue(this.EMPLOYEE_POLICY_UUID,{emitEvent:!0})}onSaveCustomPolicy(e){this.customPolicyData=e,this.showCustomPolicyModal=!1,this.formGroup.patchValue({internalPolicyUuid:Rt,customPolicyData:this.customPolicyData}),this.updateTravelPolicyPropertyValue(),this.onChange({internalPolicyUuid:Rt,customPolicyData:this.customPolicyData}),this.previousInternalPolicyUuid=Rt}onCancelCustomPolicyModal(){this.showCustomPolicyModal=!1,this.changeDetectorRef.detectChanges();let e=this.getPreviousPolicyValue();e?this.internalPolicyUuidControl.setValue(e,{emitEvent:!0}):this.internalPolicyUuidControl.setValue(this.EMPLOYEE_POLICY_UUID,{emitEvent:!0})}getPreviousPolicyValue(){return this.previousInternalPolicyUuid}handleCustomPolicyClick(e){this.openCustomPolicyModal()}getMaxAmount(e){if(!this.customPolicyData)return null;switch(e){case D.FLIGHT:return this.customPolicyData.flights?.amount||null;case D.HOTEL:return this.customPolicyData.hotels?.amount||null;case D.RAIL:return this.customPolicyData.trains?.amount||null;case D.CAR:return this.customPolicyData.rentalCars?.amount||null;default:return null}}isBookingTypeAllowed(e,n){switch(n){case D.FLIGHT:return e.settings.travelConditions.transportation?.flightConditions?.numberOfBookingsAllowed>0;case D.HOTEL:return e.settings.travelConditions.accommodation?.hotelConditions?.numberOfBookingsAllowed>0;case D.RAIL:return e.settings.travelConditions.transportation?.trainConditions?.numberOfBookingsAllowed>0;case D.CAR:return e.settings.travelConditions.transportation?.carConditions?.numberOfBookingsAllowed>0;default:return!1}}static{this.\u0275fac=function(n){return new(n||t)(T(it),T(qe),T(ys),T($e),T(Ce),T(ve))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-policy"]],standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0},{provide:Et,useExisting:t,multi:!0}]),y],decls:5,vars:4,consts:()=>{let e;e=$localize`:␟81984035ddcbc0c4cf205b103c9e0a100be3765b␟1690636272435370777:Policy`;let n;n=$localize`:␟a983f050c7a25188fa3a7bc82544a6e90f1595c3␟8927152395527165826:Employee's assigned policy (default guest policy will be used for guests)`;let i;i=$localize`:␟7bdfa40191c2049a504ee8a0cc44dd7157e094f9␟3166281031708653545:OTHER GUEST POLICIES`;let l;l=$localize`:␟06213efc02b094cf049ce54753bbf143ef86221b␟1656813885526267900:Maximum booking price`;let d;d=$localize`:␟25204625e58666c12d8be5af4844040d5e6bb1ba␟8217145761515576502: Edit custom policy `;let u;u=$localize`:␟5f33696d8b603f46afa419a00ca8755abfdfc196␟9060063240113445822:No maximum set`;let h;h=$localize`:␟dbb8d643ada4d9811c89542bcf6e035e1c0f9f62␟8708428591961737524: | Enabled for this event `;let I;I=$localize`:␟e0ff3ed1889c1cd50ea9c7167ace598ad3118db5␟1578972127327883427:${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:To set a maximum booking price for ${"\uFFFD0\uFFFD"}:INTERPOLATION:, go to the event's ${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:${"\uFFFD#3\uFFFD"}
5:START_LINK:custom policy.${"\uFFFD/#3\uFFFD"}:CLOSE_LINK:`;let F;F=$localize`:␟27bfea30d3b499e56ee7893420252510cd71603a␟5177529553251151760:Company employees`;let $;$=$localize`:␟5b1fa5c2021a6df06edc0f58f7acd2ee139142fc␟7184318772253450841:Guests`;let ge;return ge=$localize`:␟7ffd4f7c2a84443812c3a9016bd3f91f8d51bca2␟1678454094622526041:Loading policies...`,[["loading",""],["noMaximum",""],["warningPopover",""],i,l,d,u,h,I,ge,[1,"team-event-policy"],[4,"ngIf","ngIfElse"],[3,"closeModal","savePolicy","cancelModal","isVisible","initialData"],[4,"ngIf"],["label",e,"size","large",3,"showMargins"],[3,"ngModelChange","formControl"],["label",n,3,"value"],[3,"value","label","click",4,"ngIf"],[4,"ngFor","ngForOf"],["class","with-margin-top",3,"propertyType","propertyValue",4,"ngIf"],["class","custom-policy-summary",4,"ngIf"],[3,"click","value","label"],[1,"custom-section-header-container"],[1,"custom-section-header"],[1,"section-title"],[1,"section-divider"],[3,"label","value",4,"ngIf"],[3,"label","value"],[1,"with-margin-top",3,"propertyType","propertyValue"],[1,"custom-policy-summary"],[1,"summary-heading"],[1,"edit-button",3,"click"],[1,"booking-type-row"],[1,"booking-icon"],[3,"icon"],[1,"booking-label"],["class","booking-value",4,"ngIf","ngIfElse"],[1,"booking-value"],[1,"warning-icon-container"],["icon","warning","popoverTrigger","hover",1,"allowed-booking-type-warning-icon",3,"click","taPopover","popoverConfig"],[1,"warning-popover"],["href","javascript:void(0)",3,"click"],[1,"team-event-policy--multiple-policies"],["label",F,"size","large",1,"team-event-policy__policy","team-event-policy__policy--employee"],[3,"formControl"],[3,"label","value",4,"ngFor","ngForOf"],["label",$,"size","large",1,"team-event-policy__policy","team-event-policy__policy--guest",3,"showMargins"]]},template:function(n,i){if(n&1){let l=O();r(0,"div",10),p(1,$g,3,2,"ng-container",11),s(),p(2,Gg,2,0,"ng-template",null,0,k),r(4,"ta-custom-policy-modal",12),S("closeModal",function(){return f(l),v(i.onCloseCustomPolicyModal())})("savePolicy",function(u){return f(l),v(i.onSaveCustomPolicy(u))})("cancelModal",function(){return f(l),v(i.onCancelCustomPolicyModal())}),s()}if(n&2){let l=V(3);o(),a("ngIf",!i.isFetchingPolicies)("ngIfElse",l),o(3),a("isVisible",i.showCustomPolicyModal)("initialData",i.customPolicyData)}},dependencies:[L,Qt,gn,Ri,Ni,Oi,je,Me,he,wt,_e,Mi,ua,$i,K,Z,re,we,$n],styles:[".team-event-policy--multiple-policies[_ngcontent-%COMP%]{display:flex}.team-event-policy__policy[_ngcontent-%COMP%]{width:50%}.team-event-policy__policy--employee[_ngcontent-%COMP%]{margin-right:var(--dim-step3)}.team-event-policy__policy--guest[_ngcontent-%COMP%]{margin-left:var(--dim-step3)}.custom-section-header[_ngcontent-%COMP%]{padding:20px 0 10px}.section-title[_ngcontent-%COMP%]{color:#666;font-size:16px;font-weight:var(--text-weight-medium);text-transform:uppercase;margin-bottom:10px}.section-divider[_ngcontent-%COMP%]{height:1px;background-color:var(--ta-color-divider-default);width:100%}.custom-section-header-container[_ngcontent-%COMP%]{padding:0 12px}.custom-policy-summary[_ngcontent-%COMP%]{margin-top:20px;padding:24px;border-radius:12px;background-color:var(--ta-color-surface-background)}.summary-heading[_ngcontent-%COMP%]{font-size:16px;font-weight:var(--text-weight-medium);margin-bottom:16px}.booking-type-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:8px}.booking-icon[_ngcontent-%COMP%]{margin-right:8px}.booking-label[_ngcontent-%COMP%]{font-weight:400;margin-right:8px}.booking-value[_ngcontent-%COMP%]{font-weight:400}.warning-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center}.allowed-booking-type-warning-icon[_ngcontent-%COMP%]{color:var(--ta-color-icon-alert);margin-left:4px;cursor:pointer}.edit-button[_ngcontent-%COMP%]{margin-top:16px;background-color:var(--ta-color-action-secondary);border:1px solid var(--ta-color-border-default);border-radius:8px;color:var(--ta-color-text-primary);cursor:pointer;padding:12px 16px;font-weight:var(--text-weight-medium);font-size:16px;text-decoration:none;display:inline-block}.warning-popover[_ngcontent-%COMP%]{width:320px;padding:8px 12px;font-size:14px;line-height:1.4}.warning-popover[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--ta-color-action-primary);font-weight:var(--text-weight-medium)}.warning-popover[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return t})();E();function Bg(t,_){if(t&1&&(r(0,"ta-notification-banner",2)(1,"span",3),g(2,0),s()()),t&2){let e=c();o(2),q(e.affectedParticipantsCount)(e.attributesText)(e.affectedParticipantsCount),J(2)}}var N_=(()=>{class t{constructor(){this.affectedParticipantsCount=0,this.affectedFieldLabels=[]}get showNotification(){return this.affectedParticipantsCount>0}get attributesText(){if(this.affectedFieldLabels.length<=1)return this.affectedFieldLabels[0]||"";let e=this.affectedFieldLabels.slice(0,-1).join(", "),n=this.affectedFieldLabels[this.affectedFieldLabels.length-1];return $localize`${e} and ${n}`}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-hr-fields-diff-notification"]],inputs:{affectedParticipantsCount:"affectedParticipantsCount",affectedFieldLabels:"affectedFieldLabels"},standalone:!0,features:[y],decls:1,vars:1,consts:()=>{let e;e=$localize`:␟e611650e8105c7e497cc4ed081b0559c936cc601␟602111642350007222:{VAR_PLURAL, plural, =1 {Changes to {START_BOLD_TEXT}{INTERPOLATION}{CLOSE_BOLD_TEXT} won't apply to {START_BOLD_TEXT}1{CLOSE_BOLD_TEXT} participant who has custom participant settings.} other {Changes to {START_BOLD_TEXT}{INTERPOLATION}{CLOSE_BOLD_TEXT} won't apply to {START_BOLD_TEXT}{INTERPOLATION_1}{CLOSE_BOLD_TEXT} participants who have custom participant settings.}}`,e=Ft(e,{CLOSE_BOLD_TEXT:"</b>",INTERPOLATION:"\uFFFD1\uFFFD",INTERPOLATION_1:"\uFFFD2\uFFFD",START_BOLD_TEXT:"<b>",VAR_PLURAL:"\uFFFD0\uFFFD"});let n;
5return n=$localize`:␟3f183a293457ce072216ff23c52a31aaf5064893␟1468649318624247358: ${e}:ICU: `,[n,["type","SECONDARY","variant","SMALL",4,"ngIf"],["type","SECONDARY","variant","SMALL"],["description",""]]},template:function(n,i){n&1&&p(0,Bg,3,3,"ta-notification-banner",1),n&2&&a("ngIf",i.showNotification)},dependencies:[L,$n,Ai],styles:["[_nghost-%COMP%]{display:block;margin-top:var(--dim-step2);margin-bottom:var(--dim-step2)}"],changeDetection:0})}}return t})();E();be();var R_=(()=>{class t{constructor(){this.groupTravelApiService=M(Ae),this.travelEventQuery=M(ve),this.userFieldsService=M(xi)}fetchFieldDiff(e,n,i){if(!n)return Te(null);let l=i.find(u=>u.name===e.attributeName);if(!l)return Te(null);let d=this.resolveHrPropertyValue(e,l,n);return this.travelEventQuery.activeEvent$.pipe(ce(1),ee(u=>!!u),ue(u=>d.pipe(ue(h=>h?this.groupTravelApiService.getInvitationsWithDifferentSettings(u.id,e.propertyType,h).pipe(Q(I=>({label:e.label,invitationIds:I.invitationIds}))):Te(null)))),Ye(()=>Te(null)))}fetchHrAttributeDiff(e,n){return!n?.attributeUuid||!n?.responseUuid?Te(null):this.travelEventQuery.activeEvent$.pipe(ce(1),ee(i=>!!i),ue(i=>this.groupTravelApiService.getInvitationsWithDifferentSettings(i.id,e.propertyType,{hrAttributeValue:{attributeUuid:n.attributeUuid,responseUuid:n.responseUuid}}).pipe(Q(l=>({label:e.label,invitationIds:l.invitationIds})))),Ye(()=>Te(null)))}fetchLegalEntityDiff(e){return e?this.travelEventQuery.activeEvent$.pipe(ce(1),ee(n=>!!n),ue(n=>this.groupTravelApiService.getInvitationsWithDifferentSettings(n.id,Hn.LEGAL_ENTITY,{legalEntity:e})),Q(n=>({label:$localize`Legal entity`,invitationIds:n.invitationIds})),Ye(()=>Te(null))):Te(null)}resolveHrPropertyValue(e,n,i){return i===dl?Te({hrAttributeValue:{attributeUuid:n.uuid,responseUuid:`PARTICIPANT_DATA_${e.suffix}`}}):this.userFieldsService.fetchUserAttributeResponses(n.uuid,{label:i,limit:1}).pipe(ue(l=>{let d=l?._embedded?.attributeResponses?.[0];return!d?.uuid||d.label!==i?Te(null):Te({hrAttributeValue:{attributeUuid:n.uuid,responseUuid:d.uuid}})}),Ye(()=>Te(null)))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function zg(t,_){t&1&&(r(0,"div",8)(1,"h2",9),g(2,0),s()())}function Hg(t,_){if(t&1&&(r(0,"ta-team-event-card",10),m(1,"ta-team-event-policy",11),s()),t&2){let e=c();a("titleInfo",e.policyAndApprovalsTitleInfo),o(),a("formControl",e.policy)}}function Xg(t,_){if(t&1&&(r(0,"ta-team-event-card",12),m(1,"ta-event-approver-type",11),s()),t&2){let e=c();o(),a("formControl",e.approver)}}function jg(t,_){if(t&1&&(r(0,"div",21),m(1,"ta-reporting-field",22),s()),t&2){let e=c(3);o(),a("formControl",e.legalEntity)("options",e.companyUserFields==null?null:e.companyUserFields.legalEntity)("isEditModeDisabled",e.form.disabled)}}function Yg(t,_){if(t&1&&(r(0,"div",16),m(1,"ta-user-attributes-form",19),p(2,jg,2,3,"div",20),s()),t&2){let e=c(2);o(),a("formGroup",e.policyAndPaymentView)("nestedEnabled",e.isNestedHrAttributesEnabled),o(),a("ngIf",e.isShowLegalEntity)}}function Wg(t,_){if(t&1&&(r(0,"div",21),m(1,"ta-reporting-field",27),s()),t&2){let e=c(3);o(),a("formControl",e.legalEntity)("options",e.companyUserFields==null?null:e.companyUserFields.legalEntity)("isEditModeDisabled",e.form.disabled)}}function Kg(t,_){if(t&1&&(r(0,"div",21),m(1,"ta-reporting-field",23),s(),r(2,"div",21),m(3,"ta-reporting-field",24),s(),r(4,"div",21),m(5,"ta-reporting-field",25),s(),r(6,"div",21),m(7,"ta-reporting-field",26),s(),p(8,Wg,2,3,"div",20)),t&2){let e=c(2);o(),a("formControl",e.billTo)("label",e.userAttributeLabelByName()[e.UserAttributeName.COST_CENTER])("options",e.companyUserFields==null?null:e.companyUserFields.billTo)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.department)("label",e.userAttributeLabelByName()[e.UserAttributeName.DEPARTMENT])("options",e.companyUserFields==null?null:e.companyUserFields.department)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.region)("label",e.userAttributeLabelByName()[e.UserAttributeName.REGION])("options",e.companyUserFields==null?null:e.companyUserFields.region)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.subsidiary)("label",e.userAttributeLabelByName()[e.UserAttributeName.SUBSIDIARY])("options",e.companyUserFields==null?null:e.companyUserFields.subsidiary)("isEditModeDisabled",e.form.disabled),o(),a("ngIf",e.isShowLegalEntity)}}function Qg(t,_){if(t&1&&m(0,"ta-hr-fields-diff-notification",28),t&2){let e=c(2);a("affectedParticipantsCount",e.affectedParticipantsCount)("affectedFieldLabels",e.affectedFieldLabels)}}function qg(t,_){if(t&1&&(r(0,"ta-team-event-card",13)(1,"div",14)(2,"div",15),p(3,Yg,3,3,"div",16)(4,Kg,9,17),s(),p(5,Qg,1,2,"ta-hr-fields-diff-notification",17),m(6,"ta-team-event-custom-fields",18),s()()),t&2){let e=c();o(3),co(e.isCustomUserAttributeM3Enabled?3:4),o(2),a("ngIf",e.participantSettingsEnabled),o(),a("formControl",e.customFieldValues)("customFields",e.customFields)("isTeamOffsite",e.isTeamOffsite)}}function Jg(t,_){if(t&1&&(r(0,"ta-team-event-card",29)(1,"div",14),m(2,"ta-team-event-custom-fields",18),s()()),t&2){let e=c();o(2),a("formControl",e.customFieldValues)("customFields",e.customFields)("isTeamOffsite",e.isTeamOffsite)}}function Zg(t,_){if(t&1&&(r(0,"ta-team-event-card",30),m(1,"ta-team-event-payment-method",11),s()),t&2){let e=c();o(),a("formControl",e.payment)}}var b_=(()=>{class t{get areCustomFieldsPresent(){return!!(this.customFields||[]).filter(e=>e.name!=="tripName").length}get showReportingFields(){return!this.isTeamOffsite||this.isTeamOffsiteClaimedAdmin}get policyAndPaymentView(){return this.form.get("policyAndPaymentView")}get policy(){return this.policyAndPaymentView.get("policy")}get approver(){return this.policyAndPaymentView.get("approver")}get payment(){return this.policyAndPaymentView.get("payment")}get billTo(){return this.policyAndPaymentView.get("billTo")}get department(){return this.policyAndPaymentView.get("department")}get region(){return this.policyAndPaymentView.get("region")}get subsidiary(){return this.policyAndPaymentView.get("subsidiary")}get legalEntity(){return this.policyAndPaymentView.get("legalEntity")}get customFieldValues(){return this.policyAndPaymentView.get("customFieldValues")}get policyAndApprovalsTitleInfo(){return this.isTravelEventRoomBlockEnabled?$localize`This travel policy only applies to participant-made bookings, not accommodations booked on their behalf.`:null}constructor(e,n,i,l){this.fb=e,this.travelEventQuery=n,this.splitSvc=i,this.userFieldsService=l,this.isTeamOffsite=!1,this.isTeamOffsiteClaimedAdmin=!1,this.isTravelEventRoomBlockEnabled=!1,this.hrFieldsDiffService=M(R_),this.cdRef=M($e),this.destroyRef=M(Lt),this.isShowLegalEntity=this.splitSvc.isOn("COST_FIELDS_ADD_LEGAL_ENTITY"),this.isPaymentGroupTravelAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_PAYMENT_SELECTION"),this.isPolicyGroupTravelAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_POLICY_SELECTION"),this.isBookingApproverAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_APPROVER_SELECTION"),this.isEventsSettingsDeclutter=this.splitSvc.isOn("EVENTS_SETTINGS_DECLUTTER_ENABLED"),this.isCu
5stomUserAttributeM3Enabled=this.splitSvc.isOn("CV_CUSTOM_USER_ATTRIBUTE_M3"),this.isNestedHrAttributesEnabled=this.splitSvc.isOn("NESTED_HR_ATTRIBUTES"),this.participantSettingsEnabled=this.splitSvc.isOn("ENT_EDIT_PARTICIPANT_SETTINGS_PHASE_2"),this.affectedParticipantsCount=0,this.affectedFieldLabels=[],this.fieldResults=new Map,this.customFieldOrder=[],this.hrFieldsDiffSubscription=new ba,this.cachedUserAttributes=[],this.form=this.fb.group({policyAndPaymentView:this.fb.group({policy:[],approver:[],payment:[],billTo:[""],department:[""],region:[""],subsidiary:[""],legalEntity:[""],customFieldValues:[],hrAttributeValues:[[]]})}),this.inIframe=Ke(),this.UserAttributeName=Ki,this.userAttributeLabelByName=this.userFieldsService.userAttributeLabelByName,this.onTouch=()=>{},this.onChange=()=>{}}ngOnInit(){this.subscribeToValueChanges(),this.initHrFieldsDiffTracking()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){let n=this.participantSettingsEnabled&&this.cachedUserAttributes.length>0;n&&(this.hrFieldsDiffSubscription.unsubscribe(),this.resetHrFieldsDiffState()),this.form.get("policyAndPaymentView").patchValue(e,{emitEvent:!this.participantSettingsEnabled}),n&&this.setupHrFieldsDiffStreams()}setDisabledState(e){e?this.form.disable():this.form.enable()}subscribeToValueChanges(){this.form.valueChanges.subscribe(e=>{this.onChange(this.form.get("policyAndPaymentView").getRawValue())})}ngOnChanges(e){}initHrFieldsDiffTracking(){this.participantSettingsEnabled&&this.userFieldsService.fetchUserAttributes().pipe(Ye(()=>Te([])),ce(1)).subscribe(e=>{this.cachedUserAttributes=e,this.setupHrFieldsDiffStreams()})}setupHrFieldsDiffStreams(){this.hrFieldsDiffSubscription=new ba,this.isCustomUserAttributeM3Enabled?this.subscribeToHrAttributeValuesChanges(this.cachedUserAttributes):this.subscribeToHrFieldChanges(this.cachedUserAttributes),this.subscribeToLegalEntityChanges()}subscribeToHrFieldChanges(e){Da.forEach(n=>{let i=this.policyAndPaymentView.get(n.formField);if(!i)return;let l=i.valueChanges.pipe(yn(ca),ue(d=>this.hrFieldsDiffService.fetchFieldDiff(n,d,e)),ut(this.destroyRef)).subscribe(d=>{this.applyFieldResult(n.formField,d)});this.hrFieldsDiffSubscription.add(l)})}subscribeToHrAttributeValuesChanges(e){let n=this.policyAndPaymentView.get("hrAttributeValues");if(!n)return;Da.forEach(d=>{let u=e.find(h=>h.name===d.attributeName);u&&this.subscribeToSingleHrAttributeChange(n,u,d)});let i=new Set(Object.values(Ki)),l=e.filter(d=>!i.has(d.name));this.customFieldOrder=[],l.forEach(d=>{let u=cl(d);this.customFieldOrder.push(u.formField),this.subscribeToSingleHrAttributeChange(n,d,u)})}subscribeToSingleHrAttributeChange(e,n,i){let l=e.valueChanges.pipe(ii(e.value),Q(d=>(d??[]).find(u=>u.attributeUuid===n.uuid)??null),xt((d,u)=>d?.responseUuid===u?.responseUuid),In(1),yn(ca),ue(d=>this.hrFieldsDiffService.fetchHrAttributeDiff(i,d?ml(d):null)),ut(this.destroyRef)).subscribe(d=>{this.applyFieldResult(i.formField,d)});this.hrFieldsDiffSubscription.add(l)}subscribeToLegalEntityChanges(){if(!this.isShowLegalEntity)return;let e=this.policyAndPaymentView.get(ka);if(!e)return;let n=e.valueChanges.pipe(yn(ca),ue(i=>this.hrFieldsDiffService.fetchLegalEntityDiff(i)),ut(this.destroyRef)).subscribe(i=>{this.applyFieldResult(ka,i)});this.hrFieldsDiffSubscription.add(n)}applyFieldResult(e,n){n&&n.invitationIds.length>0?this.fieldResults.set(e,n):this.fieldResults.delete(e),this.updateAggregatedResults()}resetHrFieldsDiffState(){this.fieldResults.clear(),this.updateAggregatedResults()}updateAggregatedResults(){let e=new Set,n=[];[...pl,...this.customFieldOrder].forEach(i=>{let l=this.fieldResults.get(i);l&&(n.push(l.label),l.invitationIds.forEach(d=>e.add(d)))}),this.affectedParticipantsCount=e.size,this.affectedFieldLabels=n,this.cdRef.markForCheck()}validate(){return this.form.invalid?{invalid:!0}:null}static{this.\u0275fac=function(n){return new(n||t)(T(qe),T(ve),T(Ce),T(xi))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-policy-payment"]],inputs:{isTeamOffsite:"isTeamOffsite",isTeamOffsiteClaimedAdmin:"isTeamOffsiteClaimedAdmin",companyUserFields:"companyUserFields",customFields:"customFields",isTravelEventRoomBlockEnabled:"isTravelEventRoomBlockEnabled"},standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0},{provide:Et,useExisting:t,multi:!0}]),At,y],decls:7,vars:7,consts:()=>{let e;e=$localize`:␟a3e90308d9e3e94f4d42bfd38e84ee549e77d35d␟1160616695636675473:Travel policy and approvals`;let n;n=$localize`:␟eecf1b17fffe5de8c0d3493e2bfd0025e0f2e64d␟6496118940712020254:Booking approvals`;let i;i=$localize`:␟f9b0699633beca8b908623ba443beb317912e82a␟5958866670336586465:Reporting settings`;let l;l=$localize`:␟42e720561f4a8a5cc791bfd73b92b4ca452b50e8␟3714020147434423697:Let us know how the cost and data for your event should be allocated on company reporting.`;let d;d=$localize`:␟4006e6e4387d796bd603dd219f540c8b3c796a99␟8894271275633172073:Company required Fields`;let u;u=$localize`:␟1e03e781f7589e828718720dcb83ad721bb130f6␟1770687049384197175:Let us know how the company required fields should be set for all bookings.`;let h;h=$localize`:␟f618cebebc08b6a12af1f9034bddf157ac3ef5e4␟5722353260643724736:Payment method`;let I;I=$localize`:␟b7bce836f66232e215c2230e49d70c45ed5b5761␟3371053334984628496:Policy and payment`;let F;F=$localize`:␟1fc1c62f9ed4fed1baacca0740bfeb8ca9ccb655␟7741543205162691628:Legal entity`;let $;
5$=$localize`:␟2282de02308a6afd72c3924776a213f0f2f84f92␟2921233273661446199:Reports will be based on this event's participant data, unless you specify a legal entity.`;let ge;ge=$localize`:␟439a060df630657d1a4bd2f315fc00426fd0abda␟5093756816437767537:Reports will be based on this event's participant data, unless you specify a cost center.`;let W;W=$localize`:␟0245b0ff857cf8956947e448804f5c258cd0cd1f␟6269978346440266466:Reports will be based on this event's participant data, unless you specify a department.`;let oe;oe=$localize`:␟0ef388cba7719e491c58d7abcd3b5905b74eb793␟8919669294488122796:Reports will be based on this event's participant data, unless you specify a region.`;let Ie;Ie=$localize`:␟f043eee5573a11a1524f00e6589fe445c708bec8␟7323484543612626589:Reports will be based on this event's participant data, unless you specify a subsidiary.`;let ae;ae=$localize`:␟1fc1c62f9ed4fed1baacca0740bfeb8ca9ccb655␟7741543205162691628:Legal entity`;let It;return It=$localize`:␟2282de02308a6afd72c3924776a213f0f2f84f92␟2921233273661446199:Reports will be based on this event's participant data, unless you specify a legal entity.`,[I,[1,"event-policy-payment",3,"formGroup"],["class","event-policy-payment__header",4,"ngIf"],["title",e,3,"titleInfo",4,"ngIf"],["title",n,4,"ngIf"],["title",i,"subtitle",l,4,"ngIf"],["title",d,"subtitle",u,4,"ngIf"],["title",h,4,"ngIf"],[1,"event-policy-payment__header"],[1,"event-policy-payment__header__title"],["title",e,3,"titleInfo"],[3,"formControl"],["title",n],["title",i,"subtitle",l],[1,"event-policy-payment__reporting"],[1,"event-policy-payment__section--flex"],[1,"user-attributes-wrapper"],[3,"affectedParticipantsCount","affectedFieldLabels",4,"ngIf"],[3,"formControl","customFields","isTeamOffsite"],[3,"formGroup","nestedEnabled"],["class","event-policy-payment__flex-item",4,"ngIf"],[1,"event-policy-payment__flex-item"],["label",F,"tooltip",$,3,"formControl","options","isEditModeDisabled"],["tooltip",ge,3,"formControl","label","options","isEditModeDisabled"],["tooltip",W,3,"formControl","label","options","isEditModeDisabled"],["tooltip",oe,3,"formControl","label","options","isEditModeDisabled"],["tooltip",Ie,3,"formControl","label","options","isEditModeDisabled"],["label",ae,"tooltip",It,3,"formControl","options","isEditModeDisabled"],[3,"affectedParticipantsCount","affectedFieldLabels"],["title",d,"subtitle",u],["title",h]]},template:function(n,i){n&1&&(r(0,"div",1),p(1,zg,3,0,"div",2)(2,Hg,2,2,"ta-team-event-card",3)(3,Xg,2,1,"ta-team-event-card",4)(4,qg,7,5,"ta-team-event-card",5)(5,Jg,3,3,"ta-team-event-card",6)(6,Zg,2,1,"ta-team-event-card",7),s()),n&2&&(a("formGroup",i.form),o(),a("ngIf",i.inIframe),o(),a("ngIf",!i.isTeamOffsite&&i.isPolicyGroupTravelAllowed),o(),a("ngIf",!i.isTeamOffsite&&i.isBookingApproverAllowed),o(),a("ngIf",i.showReportingFields),o(),a("ngIf",!i.showReportingFields&&i.areCustomFieldsPresent),o(),a("ngIf",!i.isTeamOffsite&&i.isPaymentGroupTravelAllowed))},dependencies:[je,Me,Xe,he,wt,Ge,L,Kn,Na,Oa,fa,Ta,Ma,ia,N_],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-policy-payment[_ngcontent-%COMP%]{display:block;width:100%;margin:0 auto}.event-policy-payment__header[_ngcontent-%COMP%]{align-items:center;justify-content:space-between;display:flex;margin-bottom:var(--dim-step8)}.event-policy-payment__header__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start;line-height:var(--dim-step9);margin:var(--dim-step2) 0}.event-policy-payment__section[_ngcontent-%COMP%]{display:block;margin-bottom:var(--dim-step7)}.event-policy-payment__section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.event-policy-payment__section[_ngcontent-%COMP%]   .event-form-wrap[_ngcontent-%COMP%]{width:100%;display:block}.event-policy-payment__section__return-flight-checkbox[_ngcontent-%COMP%]{margin-left:6px}.event-policy-payment__section--flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;flex-wrap:wrap}.event-policy-payment__section--note[_ngcontent-%COMP%]{margin-top:var(--dim-step8)}.event-policy-payment__flex-item[_ngcontent-%COMP%]{width:100%;display:block;margin-right:var(--dim-step6)}.event-policy-payment__flex-item[_ngcontent-%COMP%]:last-child{margin-right:0}.event-policy-payment__date-wrapper[_ngcontent-%COMP%]   .date-trigger[_ngcontent-%COMP%]{display:block}.event-policy-payment__date-wrapper[_ngcontent-%COMP%]   .date-trigger[_ngcontent-%COMP%]:first-child{margin-bottom:var(--dim-step5)}.event-policy-payment__date-wrapper[_ngcontent-%COMP%]   .event-time[_ng
5content-%COMP%]{color:var(--ta-color-text-subtle)}.event-policy-payment__error-text[_ngcontent-%COMP%]{color:var(--ta-color-text-warning);font-size:var(--text-size-xs);font-weight:var(--text-weight-regular);text-align:start;display:block}.event-policy-payment__reporting[_ngcontent-%COMP%]{border-radius:8px;background:var(--ta-color-surface-default);padding:0}.event-policy-payment__reporting[_ngcontent-%COMP%]   .event-policy-payment__section--flex[_ngcontent-%COMP%]{flex-direction:row}.event-policy-payment__reporting[_ngcontent-%COMP%]   .event-policy-payment__flex-item[_ngcontent-%COMP%]{margin-right:var(--dim-step6);width:calc(50% - var(--dim-step3))}.event-policy-payment__reporting[_ngcontent-%COMP%]   .event-policy-payment__flex-item[_ngcontent-%COMP%]:nth-child(2n){margin-right:0}.event-policy-payment__reporting[_ngcontent-%COMP%]   .user-attributes-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--dim-step6, 24px);width:100%}.event-policy-payment__reporting[_ngcontent-%COMP%]   .user-attributes-wrapper[_ngcontent-%COMP%]   .event-policy-payment__flex-item[_ngcontent-%COMP%]{width:100%;margin-right:0}"],changeDetection:0})}}return t})();E();be();E();E();E();function e0(t,_){if(t&1&&(w(0),r(1,"ta-modal-header",7)(2,"div",8)(3,"h3",9),g(4,2),s(),r(5,"span",10),C(6),s()()(),U()),t&2){let e=c();o(),a("showClose",!0)("extraPaddingTop",!0)("extraPaddingRight",!0)("extraPaddingLeft",!0)("bottomPadding",!1)("custom",!0),o(5),B("\xA0(",e.users==null?null:e.users.length,")")}}function t0(t,_){if(t&1&&(r(0,"ta-modal-header",11)(1,"div",8)(2,"h3",9),g(3,3),s(),r(4,"span"),C(5),s()()()),t&2){let e=c();a("custom",!0),o(3),q(e.users==null?null:e.users.length),J(3),o(2),B(" (",e.users==null?null:e.users.length,")")}}function n0(t,_){t&1&&(r(0,"div",23),g(1,4),s())}function i0(t,_){t&1&&m(0,"div",24)}function o0(t,_){if(t&1){let e=O();r(0,"div")(1,"div",14),m(2,"ta-user-avatar",15),r(3,"div",16)(4,"div",17)(5,"div",18),C(6),P(7,"fullName"),s(),r(8,"div",19),C(9),s(),p(10,n0,2,0,"div",20),s(),r(11,"ta-button-v2",21),S("clickEvent",function(){let i=f(e).$implicit,l=c(2);return v(l.viewHotelBooking(i))}),s()()(),p(12,i0,1,0,"div",22),s()}if(t&2){let e=_.$implicit,n=_.last;o(2),a("user",e),o(4),G(A(7,5,e)),o(3),G(e.email),o(),a("ngIf",e.removed),o(2),a("ngIf",!n)}}function a0(t,_){if(t&1&&(w(0),r(1,"div",12),p(2,o0,13,7,"div",13),s(),U()),t&2){let e=c();o(2),a("ngForOf",e.users)}}function r0(t,_){if(t&1&&(r(0,"div")(1,"div",25),m(2,"ta-user-avatar",15),r(3,"div",26)(4,"div"),C(5),P(6,"fullName"),s(),r(7,"div"),C(8),s()()()()),t&2){let e=_.$implicit;o(2),a("user",e),o(3),G(A(6,3,e)),o(3),G(e.email)}}function s0(t,_){if(t&1&&p(0,r0,9,5,"div",13),t&2){let e=c();a("ngForOf",e.users)}}var y_=(()=>{class t{constructor(e,n){this.modalRef=e,this.router=n}ngOnInit(){this.users=this.modalRef.data?.users,this.useNewDesign=this.modalRef.data?.useNewDesign,this.roomBlockTripUuid=this.modalRef.data?.roomBlockTripUuid,this.headerTitle=$localize`Guests (${this.users?.length})`}viewHotelBooking(e){let n=e.tripUuid||this.roomBlockTripUuid;n&&(this.router.navigate([`/trips/${n}/itinerary`]),this.modalRef.close())}static{this.\u0275fac=function(n){return new(n||t)(T(ot),T(Je))}}static{this.\u0275cmp=b({type:t,selectors:[["navan-room-block-view-all-guests-modal"]],standalone:!0,features:[y],decls:7,vars:5,consts:()=>{let e;e=$localize`:␟5b1fa5c2021a6df06edc0f58f7acd2ee139142fc␟7184318772253450841:Guests`;let n;n=$localize`:␟bd9cc41eca5bb03bdb5277b87555c299b9804843␟3763415821051084693:{VAR_PLURAL, plural, =1 {Guest} other {Guests}}`,n=Ft(n,{VAR_PLURAL:"\uFFFD0\uFFFD"});let i;i=$localize`:␟0b52b8d90717cfd54f0bc9c1cbe06b39d658eee1␟4674008936360750813: ${n}:ICU: `;let l;l=$localize`:␟c4c933c9fa10191720c173d80b27b1594a75f2ea␟5419358936106319157:View hotel booking`;let d;return d=$localize`:␟1aa4883bc4f1352f7a0bdd94810a9bf6dc22bd02␟5406093358072761930:Removed`,[["legacyHeader",""],["legacyLayout",""],e,i,d,[1,"room-block-view-all-guests-modal",3,"sidePadding"],[4,"ngIf","ngIfElse"],[3,"showClose","extraPaddingTop","extraPaddingRight","extraPaddingLeft","bottomPadding","custom"],[1,"room-block-view-all-guests-modal__header-container"],[1,"room-block-view-all-guests-modal__header"],[1,"room-block-view-all-guests-modal__header-count"],[3,"custom"],[1,"room-block-view-all-guests-modal__body"],[4,"ngFor","ngForOf"],[1,"room-block-view-all-guests-modal__guest-row","room-block-view-all-guests-modal__guest-row--new"],[3,"user"],[1,"room-block-view-all-guests-modal__guest-info","room-block-view-all-guests-modal__guest-info--new"],[1,"room-block-view-all-guests-modal__guest-details"],[1,"room-block-view-all-guests-modal__guest-name"],[1,"room-block-view-all-guests-modal__guest-email"],["class","room-block-view-all-guests-modal__removed-label",4,"ngIf"],["kind","ghost","size","small","text",l,3,"clickEvent"],["class","room-block-view-all-guests-modal__divider",4,"ngIf"],[1,"room-block-view-all-guests-modal__removed-label"],[1,"room-block-view-all-guests-modal__divider"],[1,"room-block-view-all-guests-modal__guest-row"],[1,"room-block-view-all-guests-modal__guest-info"]]}
5,template:function(n,i){if(n&1&&(r(0,"ta-modal",5),p(1,e0,7,7,"ng-container",6)(2,t0,6,3,"ng-template",null,0,k)(4,a0,3,1,"ng-container",6)(5,s0,1,1,"ng-template",null,1,k),s()),n&2){let l=V(3),d=V(6);a("sidePadding",!i.useNewDesign),o(),a("ngIf",i.useNewDesign)("ngIfElse",l),o(3),a("ngIf",i.useNewDesign)("ngIfElse",d)}},dependencies:[Ze,at,_e,L,Bo,is,ie,Ee],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.room-block-view-all-guests-modal[_ngcontent-%COMP%]{width:600px}.room-block-view-all-guests-modal__header-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;align-items:baseline}.room-block-view-all-guests-modal__header[_ngcontent-%COMP%]{margin:0;font-size:26px;font-weight:700;line-height:36px;color:var(--ta-color-text-default)}.room-block-view-all-guests-modal__header-count[_ngcontent-%COMP%]{font-size:18px;font-weight:400;line-height:26px;color:var(--ta-color-text-subtle)}.room-block-view-all-guests-modal__body[_ngcontent-%COMP%]{padding:24px 40px}.room-block-view-all-guests-modal__guest-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin-bottom:var(--dim-step6)}.room-block-view-all-guests-modal__guest-row--new[_ngcontent-%COMP%]{margin-bottom:0;padding:var(--dim-step4) 0;align-items:center;gap:var(--dim-step4)}.room-block-view-all-guests-modal__guest-info[_ngcontent-%COMP%]{margin-left:var(--dim-step6);flex:1;min-width:0}.room-block-view-all-guests-modal__guest-info--new[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-left:0;gap:var(--dim-step4)}.room-block-view-all-guests-modal__guest-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.room-block-view-all-guests-modal__guest-name[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:24px;color:var(--ta-color-text-default)}.room-block-view-all-guests-modal__guest-email[_ngcontent-%COMP%]{font-size:16px;font-weight:400;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ta-color-text-subtle)}.room-block-view-all-guests-modal__removed-label[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;color:var(--color-text-danger)}.room-block-view-all-guests-modal__divider[_ngcontent-%COMP%]{height:1px;background-color:var(--ta-color-divider-default)}"]})}}return t})();var I_=(t,_)=>[t,!1,!1,_,null,0,!0];function l0(t,_){if(t&1&&m(0,"ta-icon-v2",13),t&2){c(2);let e=V(3);a("taPopover",e)}}function _0(t,_){if(t&1&&(r(0,"div",11)(1,"span"),C(2),s(),p(3,l0,1,1,"ta-icon-v2",12),s()),t&2){let e=c();o(2),G(e.canceledBannerText),o(),a("ngIf",!e.isDraft)}}function c0(t,_){if(t&1&&(w(0),r(1,"span"),C(2),P(3,"userCurrency"),s(),r(4,"span"),g(5,4),s(),U()),t&2){let e=c(3);o(2),G(di(3,1,tt(9,I_,e.roomBlock.rewardDetail==null?null:e.roomBlock.rewardDetail.totalReward,e.roomBlock.rewardDetail==null?null:e.roomBlock.rewardDetail.currency)))}}function d0(t,_){if(t&1&&(w(0),r(1,"span"),C(2),s(),r(3,"span"),g(4,5),s(),U()),t&2){let e=c(3);o(2),G(e.roomBlock.rewardDetail==null?null:e.roomBlock.rewardDetail.totalRewardPoints)}}function p0(t,_){if(t&1&&(r(0,"div",21)(1,"div",30),p(2,c0,6,12,"ng-container",31)(3,d0,5,1,"ng-container",31),s(),r(4,"div",32),g(5,3),s()()),t&2){let e=c(2);o(2),a("ngIf",e.roomBlock.rewardDetail==null?null:e.roomBlock.rewardDetail.totalReward),o(),a("ngIf",e.roomBlock.rewardDetail==null?null:e.roomBlock.rewardDetail.totalRewardPoints)}}function m0(t,_){if(t&1&&(r(0,"span",33),g(1,6),s()),t&2){let e=c(2);o(),q(e.roomBlock==null||e.roomBlock.users==null?null:e.roomBlock.users.length)(e.roomBlock==null||e.roomBlock.users==null?null:e.roomBlock.users.length),J(1)}}function E0(t,_){if(t&1){let e=O();r(0,"button",34),S("click",function(){f(e);let i=c(2);return v(i.onViewAllGuests())}),g(1,7),s()}if(t&2){let e=c(2);o(),q(e.roomBlock==null||e.roomBlock.users==null?null:e.roomBlock.users.length),J(1)}}function u0(t,_){if(t&1){let e=O();r(0,"ta-button-v2",38),S("clickEvent",function(){f(e);let i=c(3);return v(i.onManageGuestBookings())}),s()}if(t&2){let e=c(3);a("disabled",e.isRoomBlockEmpty)}}function g0(t,_){if(t&1){let e=O();r(0,"button",39),S("click",function(){f(e);let i=c(3);return v(i.goToItinerary())}),g(1,8),s()}}function f0(t,_){if(t&1&&(r(0,"div",35),p(1,u0,1,1,"ta-button-v2",36)(2,g0,2,0,"button",37),s()),t&2){let e=c(2);o(),a("ngIf",e.useNewDesign),o(),a("ngIf",!e.useNewDesign)}}function v0(t,_){if(t&1&&(r(0,"div",14)(1,"div",15),m(2,"div",16)(3,"div",17),r(4,"div",18),m(5,"ta-icon-v2",19),r(6,"span"),g(7,1),s()()(),r(8,"div",20)(9,"div",21)(10,"div",22),C(11),s()(),r(12,"div",21)(13,"div",23),g(14,2),P(15,"userCurrency"),s()(),p(16,p0,6,2,"div",24),r(17,"div",25),m(18,"ta-passenger-group",26),p(19,m0,2,2,"span",27)(20,E0,2,1,"button",28),s()(),p(21,f0,3,2,"div",29),s()),t&2){let e=c();te("navan-room-blocks-card--canceled",(e.roomBlock==null?null:e.roomBlock.bookingStatus)==="CANCELED"),o(2),Dt("background-image","url("+(e.roomBlock.hotel==null?null:e.roomBlock.hotel.hotelLogoUrl)+")"),o(5),q(e.roomBlock.hotelRoomCount)(e.roomBlock.hotelRoomCount),J(7),o(4),B(" ",e.roomBlock.hotel==null?null:e.roomBlock.hotel.name," "),o(4),q(di(15,17,tt(25,I_,e.roomBlock.totalCost==null?null:e.roomBlock.totalCost.amount,e.roomBlock.totalCost==null?null:e.roomBlock.totalCost.currency))),J(14),o(),a("ngIf",(e.roomBlock==null?null:e.roomBlock.bookingStatus)!=="CANCELED"),o(2),a("size",34)("displayLimit",2)("overlap",!0)("users",e.roomBlock.users)("showAlways",!0),o(),a("ngIf",e.useNewDesign),o(),a("ngIf",!e.useNewDesign),o(),a("ngIf",!e.isEditModeDisabled)}}function T0(t,_){if(t&1&&(r(0,"div",40)(1,"div"),C(2),s()()),t&2){let e=c();o(2),G(e.canceledPopoverText)}}var S0=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,x_=(()=>{class t{constructor(e){this.modalService=e,this.splitService=M(Ce),this.internalAppsCommunicatorService=M(hn),this.useNewDesign=!1}ngOnChanges(){this.useNewDesign=!this.isOffsite&&this.splitService.isOn("ENT_DISABLE_PROVIDERS_FOR_EVENT_ACCOMMODATION")}get refundDeadline(){return this.roomBlock?.cancelable&&this.roomBlock?.fullRefundDeadline}get canceledBannerText(){return this.isDraft?this.isOffsite?$localize`This room block was cancelled and you can book new one for the event.`:$localize`This group hotel booking was canceled. You can book a new one for the event.`:this.isOffsite?$localize`This room block can’t be rebooked since event invitations have already been sent.`:$localize`This group hotel booking can’t be rebooked since event invitations have already been sent.`}
5get canceledPopoverText(){return this.isOffsite?$localize`Room blocks can’t be added to events once invites have been sent to participants. You can create a separate room block on the Navan homepage.`:$localize`Group hotel bookings can’t be added to events once invites have been sent to participants. You can create a separate group hotel booking on the Navan homepage.`}get isRoomBlockEmpty(){return this.roomBlock?.hotelRoomCount===0}goToItinerary(){let e=this.roomBlock?.tripUuid;if(N(X.GROUP_TRAVEL_ROOM_BLOCK_MANAGE_BOOKING_CLICKED,{uuid:this.roomBlock?.uuid,tripUuid:e,bookingStatus:this.roomBlock?.bookingStatus}),!e||!S0.test(e))return;let n=`/app/user2/trips/${e}/itinerary`;if(Ke())try{window.top?window.top.location.href=n:window.location.href=n}catch{window.location.href=n}else window.location.href=n}onViewAllGuests(){N(X.GROUP_TRAVEL_ROOM_BLOCK_VIEW_ALL_GUESTS_CLICKED,{uuid:this.roomBlock?.uuid,bookingStatus:this.roomBlock?.bookingStatus}),this.modalService.open(y_,{data:{users:this.roomBlock?.users,useNewDesign:this.useNewDesign}})}onManageGuestBookings(){N(X.GROUP_TRAVEL_ROOM_BLOCK_VIEW_ALL_GUESTS_CLICKED,{uuid:this.roomBlock?.uuid,bookingStatus:this.roomBlock?.bookingStatus}),this.internalAppsCommunicatorService.openViewAllGuestsModal({users:this.roomBlock?.users??[],roomBlockTripUuid:this.roomBlock?.tripUuid})}static{this.\u0275fac=function(n){return new(n||t)(T(et))}}static{this.\u0275cmp=b({type:t,selectors:[["navan-room-blocks-card"]],inputs:{roomBlock:"roomBlock",isDraft:"isDraft",isEditModeDisabled:"isEditModeDisabled",isOffsite:"isOffsite"},standalone:!0,features:[At,y],decls:4,vars:2,consts:()=>{let e;e=$localize`:␟fbc332e5f1ac036926b90bd73c0136a9973e972a␟1081188567701183324:{VAR_PLURAL, plural, =1 {room} other {rooms}}`,e=Ft(e,{VAR_PLURAL:"\uFFFD1\uFFFD"});let n;n=$localize`:␟b82219b84b6bcdf7ca62212ef35b56c286798ce7␟7083633275325617845:${"\uFFFD0\uFFFD"}:INTERPOLATION: ${e}:ICU:`;let i;i=$localize`:␟9a97f6e7e42eff7b74e8be8c94591e52a5b59c96␟6159785716076256314: ${"\uFFFD0\uFFFD"}:INTERPOLATION: total cost `;let l;l=$localize`:␟295beaeb78ad5eedb981e1e2ed523ccbf7eb1ae9␟122991808584441861:for booking on behalf of others`;let d;d=$localize`:␟23ac9811ae9dc264b77d3f5e3debc6d28b02b185␟4309602903879507367: in Navan rewards `;let u;u=$localize`:␟23ac9811ae9dc264b77d3f5e3debc6d28b02b185␟4309602903879507367: in Navan rewards `;let h;h=$localize`:␟f109143fafb9d5968a351140245f6424e2dcbbc7␟8115757849080424221:{VAR_PLURAL, plural, =1 {1 guest} other {{INTERPOLATION} guests}}`,h=Ft(h,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let I;I=$localize`:␟4b268a57c6edf80cbe0c2d143d7cec40810cd6ca␟1006050056848682713:{VAR_PLURAL, plural, =1 {View guest} other {View all guests}}`,I=Ft(I,{VAR_PLURAL:"\uFFFD0\uFFFD"});let F;F=$localize`:␟4079d1d12a5f4c3ce131f2e33512ef15b042677a␟3020083318440874160: ${I}:ICU: `;let $;$=$localize`:␟54395a02467ab269caa3f9e4acdf120a99a2a704␟6543172276477223745:Manage guest bookings`;let ge;return ge=$localize`:␟69b7ea64af1495da3118c984cfbd3d387ae6859a␟1566635850018713381: Manage booking `,[["canceledRoomBlockPopoverTmpl",""],n,i,l,d,u,h,F,ge,["class","navan-room-blocks-card__canceled-banner",4,"ngIf"],["class","navan-room-blocks-card",3,"navan-room-blocks-card--canceled",4,"ngIf"],[1,"navan-room-blocks-card__canceled-banner"],["icon","info","popoverTrigger","hover",3,"taPopover",4,"ngIf"],["icon","info","popoverTrigger","hover",3,"taPopover"],[1,"navan-room-blocks-card"],[1,"navan-room-blocks-card__image-container"],[1,"navan-room-blocks-card__image"],[1,"navan-room-blocks-card__image--mask"],[1,"navan-room-blocks-card__rooms"],["icon","booking-type-hotel"],[1,"navan-room-blocks-card__content"],[1,"navan-room-blocks-card__content__row"],[1,"navan-room-blocks-card__content__trip-name"],[1,"navan-room-blocks-card__content__cost"],["class","navan-room-blocks-card__content__row",4,"ngIf"],[1,"navan-room-blocks-card__content__row","navan-room-blocks-card__content__row--bottom"],[1,"navan-room-blocks-card__content__avatars",3,"size","displayLimit","overlap","users","showAlways"],["class","navan-room-blocks-card__content__guests-count",4,"ngIf"],["taButton","","theme","link",3,"click",4,"ngIf"],["class","navan-room-blocks-card__action",4,"ngIf"],[1,"navan-room-blocks-card__content__rewards-amount"],[4,"ngIf"],[1,"navan-room-blocks-card__content__rewards-text"],[1,"navan-room-blocks-card__content__guests-count"],["taButton","","theme","link",3,"click"],[1,"navan-room-blocks-card__action"],["class","navan-room-blocks-card__actions__manage","kind","outline","text",$,3,"disabled","clickEvent",4,"ngIf"],["class","navan-room-blocks-card__actions__manage","taButton","","theme","secondary",3,"click",4,"ngIf"],["kind","outline","text",$,1,"navan-room-blocks-card__actions__manage",3,"clickEvent","disabled"],["taButton","","theme","secondary",1,"navan-room-blocks-card__actions__manage",3,"click"],[1,"navan-room-blocks-card__canceled-popover"]]},template:function(n,i){n&1&&p(0,_0,4,2,"div",9)(1,v0,22,28,"div",10)(2,T0,3,1,"ng-template",null,0,k),n&2&&(a("ngIf",(i.roomBlock==null?null:i.roomBlock.bookingStatus)==="CANCELED"),o(),a("ngIf",i.roomBlock))},dependencies:[L,K,Z,re,Js,un,ie,Ee,Li],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}[_ngcontent-%COMP%]:root{--color-rewards-purple: #8d13ec;--color-rewards-pink: #b21093;--color-rewards-salmon: #f07582;--ta-rewards-color-action-primary: #7610c6;--ta-rewards-color-action-primary-hovered: #540b8e;--ta-rewards-color-action-primary-pressed: #38085e;--ta-rewards-color-surface-brand-salmon: #ff7466;--ta-promotion-color-surface-banner: #ffb3fa}
5.navan-room-blocks-card__content__rewards-amount[_ngcontent-%COMP%]{background:linear-gradient(82deg,var(--ta-color-surface-brand-salmon) 0%,var(--ta-color-surface-brand-primary) 105%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.navan-room-blocks-card__content__rewards-amount[_ngcontent-%COMP%]{background:radial-gradient(160.91% 160.91% at -5.79% -2.55%,var(--color-rewards-purple) 0%,var(--color-rewards-pink) 44%,var(--color-rewards-salmon) 100%);color:radial-gradient(99.25% 400.08% at .75% 175.94%,var(--ta-color-surface-brand-salmon) 0%,var(--ta-color-surface-brand-primary) 50.12%,#3a0066 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.navan-room-blocks-card[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:wrap;height:212px;padding:var(--dim-step4);border-radius:12px;border:1px solid var(--ta-color-border-default)}.navan-room-blocks-card--canceled[_ngcontent-%COMP%]{border-radius:0 0 12px 12px;border-color:var(--ta-color-action-alert)}.navan-room-blocks-card__canceled-banner[_ngcontent-%COMP%]{gap:var(--dim-step2);box-shadow:0 1px 4px #18191b1a,0 4px 20px #18191b1a;overflow:hidden;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;padding:var(--dim-step4);border-radius:12px 12px 0 0;background-color:var(--ta-color-action-alert);color:var(--ta-color-text-inverse);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.navan-room-blocks-card__image-container[_ngcontent-%COMP%]{position:relative}.navan-room-blocks-card__image[_ngcontent-%COMP%]{width:240px;height:212px;background-size:cover;background-position:50%;box-shadow:none;padding:var(--dim-step4);display:flex;box-sizing:border-box;position:relative;border-radius:var(--dim-step4)}.navan-room-blocks-card__image--mask[_ngcontent-%COMP%]{width:100%;height:65px;left:0;bottom:0;position:absolute;z-index:2;background-image:url(https://d2w7f1pl8j4yzn.cloudfront.net/growth/group-travel/trip-bg-mask.svg);background-repeat:no-repeat;background-size:contain;background-position:left top;pointer-events:none}.navan-room-blocks-card__cancelation-policy[_ngcontent-%COMP%]{position:absolute;top:12px;left:8px;font-size:var(--text-size-xs);text-align:center;border-radius:var(--dim-step4);padding:var(--dim-step1) var(--dim-step2)}.navan-room-blocks-card__cancelation-policy--refundable[_ngcontent-%COMP%]{color:var(--ta-color-text-success);background-color:var(--ta-color-surface-success)}.navan-room-blocks-card__cancelation-policy--non-refundable[_ngcontent-%COMP%]{color:var(--ta-color-text-warning);background-color:var(--ta-color-surface-warning)}.navan-room-blocks-card__rooms[_ngcontent-%COMP%]{position:absolute;left:25px;bottom:14px;z-index:2;gap:var(--dim-step1);line-height:20px;display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-medium);text-align:start}.navan-room-blocks-card__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding:0 var(--dim-step4);max-width:650px}.navan-room-blocks-card__content__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin-bottom:var(--dim-step3)}.navan-room-blocks-card__content__row--bottom[_ngcontent-%COMP%]{margin-top:auto;margin-bottom:var(--dim-step2)}.navan-room-blocks-card__content__avatars[_ngcontent-%COMP%]{margin-right:var(--dim-step2);height:36px}.navan-room-blocks-card__content__trip-name[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xxb);font-weight:var(--text-weight-xb);text-align:start;line-height:32px;text-overflow:ellipsis;overflow:hidden}.navan-room-blocks-card__content__guests-count[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;line-height:20px}
5.navan-room-blocks-card__content__rewards-amount[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;margin-right:var(--dim-step1)}.navan-room-blocks-card__content__rewards-text[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}.navan-room-blocks-card__canceled-popover[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;max-width:392px;padding:var(--dim-step2) var(--dim-step3);font-family:var(--text-font);font-style:normal;line-height:20px}"],changeDetection:0})}}return t})();var P0=t=>({"team-event-room-blocks--minified":t});function C0(t,_){if(t&1&&(r(0,"div",36)(1,"h2",37),de(2,0),m(3,"span",38),pe(),s()()),t&2){let e=c();o(3),q(e.title),J(2)}}function h0(t,_){if(t&1&&(r(0,"h2"),de(1,1),m(2,"span",38),pe(),s()),t&2){let e=c();te("team-event-room-blocks__title",e.isOffsite)("team-event-room-blocks__title-accommodation",!e.isOffsite),o(2),q(e.title),J(1)}}function A0(t,_){t&1&&(r(0,"div",39),g(1,2),s())}function O0(t,_){if(t&1&&(r(0,"div",39),C(1),s()),t&2){let e=c();o(),B(" ",e.getRoomBlockDatesWarningMessage()," ")}}function M0(t,_){if(t&1){let e=O();r(0,"div",40)(1,"button",41),S("click",function(){f(e);let i=c();return v(i.search())}),g(2,3),s()()}if(t&2){let e=c();o(),a("disabled",e.validInputs||e.isSearchDisabled)}}function N0(t,_){if(t&1&&(r(0,"div",42)(1,"span"),C(2),s()()),t&2){let e=c();o(2),G(e.getBannerInfo())}}function R0(t,_){t&1&&(r(0,"div",43),g(1,4),s())}function b0(t,_){if(t&1){let e=O();r(0,"div",44)(1,"ta-notification-banner",45)(2,"span",46),de(3,5),r(4,"a",47),S("click",function(){f(e);let i=c();return v(i.goToPolicyAndPayments.emit())}),s(),pe(),s()()()}}function y0(t,_){t&1&&m(0,"div",48)}function I0(t,_){if(t&1&&(r(0,"div",49),m(1,"img",50),P(2,"cdnImage"),s()),t&2){let e=c();o(),te("team-event-room-blocks__img-round",(e.roomBlocks==null?null:e.roomBlocks.length)===0),a("src",A(2,3,e.imageSrc),ze)}}function x0(t,_){t&1&&(r(0,"h4",54),g(1,6),s())}function F0(t,_){t&1&&(r(0,"h4",54),g(1,7),s())}function L0(t,_){if(t&1&&(w(0),m(1,"navan-room-blocks-card",55),U()),t&2){let e=_.$implicit,n=c(2);o(),a("isEditModeDisabled",n.isEditModeDisabled)("roomBlock",e)("isDraft",n.isDraft)("isOffsite",n.isOffsite)}}function U0(t,_){if(t&1&&(r(0,"div",51),p(1,x0,2,0,"h4",52)(2,F0,2,0,"h4",52)(3,L0,2,4,"ng-container",53),s()),t&2){let e=c();o(),a("ngIf",e.hasActiveRoomBlocks),o(),a("ngIf",!e.hasActiveRoomBlocks),o(),a("ngForOf",e.getVisibleRoomBlocks())}}var w0=25,F_=(()=>{class t{constructor(){this.locationService=M(Ps),this.hotelSearchService=M(Hs),this.route=M(Je),this.elRef=M(it),this.sanitizer=M(gr),this.roomBlockMissingParticipants=0,this.isMissingPermissionToBookAccommodations=!1,this.goToPolicyAndPayments=new Y,this.exploratorySearchParams={childrenAges:[],numberOfRooms:2,numberOfAdults:2},this.bookingType=D.ROOM_BLOCK,this.imageSrc="team-events/team-events-room-block-bg.webp",this.fromDateConfig1={calendarConfig:{twoMonths:!0,attachTo:".team-event-room-blocks__calender-anchor-sm",minRange:1,minRangeMessage:$localize`Check-in and check-out dates can not be on the same day`},showArrows:!1},this.toDateConfig2={calendarConfig:{twoMonths:!0,attachTo:".team-event-room-blocks__calender-anchor-sm",minRange:1,minRangeMessage:$localize`Check-in and check-out dates can not be on the same day`},showArrows:!1,showIcon:!1},this.inIframe=Ke(),this.isDifferentLocation=!1,this.isDifferentDate=!1,this.tripPassengers=[],this.isRoomBlockDatesInRange=!0,this._subtitle=null}ngOnInit(){this.hotelDateRange=new Fa,this.minmaxRange={from:We.addDays(We.now(),-1)},this.teamEventSearchForm=new mi({location:new $t(null,ct.required),fromDate:new $t(null,ct.required),toDate:new $t(null,ct.required)}),this.updateSearchForm(),this.subscribeToValueChanges(),N(X.GROUP_TRAVEL_ROOM_BLOCK_TAB_LOADED,{hasRoomBlocks:this.hasRoomBlocks,roomBlockMissingParticipants:this.roomBlockMissingParticipants})}ngOnChanges(e){e?.teamEventSearchConfig?.currentValue&&!e?.teamEventSearchConfig.firstChange&&(this.teamEventSearchConfig=e.teamEventSearchConfig?.currentValue,this.updateSearchForm())}get title(){return this.isOffsite?$localize`Room block`:$localize`Accommodation`}get subTitle(){return this.isOffsite?$localize`Book up to 9 rooms at the same hotel for easier coordination and a more connected experience.`:$localize`Reserve up to 9 rooms at one hotel for easy coordination and a connected experience. Skip this 
5step if participants will book their own rooms.`}get formEventLocationControl(){return this.teamEventSearchForm.get("location")}subscribeToValueChanges(){this.formEventLocationControl.valueChanges.pipe(ft(this.elRef)).subscribe(e=>{e?.location?.geo&&(this.isDifferentLocation=this.locationService.haversineDistance(this.teamEventSearchConfig?.location?.location?.coordinates,e?.location?.geo)>w0)})}updateSearchForm(){if(!this.teamEventSearchConfig)return;let{location:e,range:n,numberOfRooms:i}=this.teamEventSearchConfig,l=this.getNewDefaultDatesForRoomBlock(n),d=l?.from,u=l?.to;this.teamEventSearchForm.patchValue({location:e,fromDate:d,toDate:u}),this.hotelDateRange=new Fa(d,u),i>1?this.exploratorySearchParams=Re(le({},this.exploratorySearchParams),{numberOfRooms:Math.min(i,9)}):this.exploratorySearchParams={childrenAges:[],numberOfRooms:1,numberOfAdults:1}}getNewDefaultDatesForRoomBlock(e){let n=dr(e?.from,e?.to),i=pr(e?.from);return n?i?{from:e?.from,to:xa(e?.to,1)}:{from:mr(e?.from,1),to:xa(e?.to,1)}:e}getBannerInfo(){return this.roomBlocks?.length?this.roomBlockMissingParticipants?$localize`A room block already exists for this event. If you need accommodations for participants not in the current room block, you can book an additional room block from the Navan homepage.`:$localize`A room block already exists for this event and all participants have been assigned a room.`:$localize`A room block is not available, because the event is in progress. If you need accommodations for participants, you can book a room block from the Navan homepage.`}changeHotelDateRange({range:e}){this.updateDateRange(e),this.isDifferentDate=this.hasDateRangeChanged(e,this.teamEventSearchConfig.range),this.isRoomBlockDatesInRange=this.isRoomBlockDatesInTravelWindowRange(e)}showRoomBlockDatesWarningMessage(){return!this.isRoomBlockDatesInRange}getRoomBlockDatesWarningMessage(){return $localize`Room block dates don't match travel window dates.`}isRoomBlockDatesInTravelWindowRange(e){let n=this.travelWindows?.travelDate;return We.isAfterOrEqual(e.from,n.from)&&We.isBeforeOrEqual(e.to,n.to)}updateDateRange({from:e,to:n}){this.teamEventSearchForm.patchValue({fromDate:e,toDate:n})}hasDateRangeChanged(e,n){return!We.isDateEqual(e.from,n.from)||!We.isDateEqual(e.to,n.to)}updateExploratorySearchParams(e){this.exploratorySearchParams=e}search(){if(!this.teamEventSearchForm?.valid)return;let e={roomBlock:!0,checkInDate:We.format(this.teamEventSearchForm.value?.fromDate,"yyyy-MM-dd"),checkOutDate:We.format(this.teamEventSearchForm.value?.toDate,"yyyy-MM-dd"),numberOfRooms:this.exploratorySearchParams?.numberOfRooms,numberOfAdults:this.exploratorySearchParams?.numberOfAdults,placeId:this.teamEventSearchForm.value?.location?.placeId,description:this.teamEventSearchForm.value?.location?.description,travelEventId:this.teamEventId};N(X.GROUP_TRAVEL_ROOM_BLOCK_SEARCH_INITIATED,{travelEventId:this.teamEventId,numberOfRooms:this.exploratorySearchParams?.numberOfRooms}),this.hotelSearchService.createSearch(e).pipe(Ye(n=>(Nt("PLGR","GroupTravelRoomBlocks","roomBlocksSearch",n),Te(null)))).subscribe(n=>{n?.searchId&&this.route.navigate([`/search/hotels/${n.searchId}`])})}get validInputs(){return!this.teamEventSearchForm.valid}get isSearchDisabled(){return!this.isDraft||this.isEditModeDisabled||!this.isOffsite&&(this.roomBlockMissingEventSettings||this.isMissingPermissionToBookAccommodations)?!0:this.hasActiveRoomBlocks}get hasActiveRoomBlocks(){return this.roomBlocks?.some(e=>e.bookingStatus!==vn.CANCELED)}get showRoomBlockStatusBanner(){return this.hasActiveRoomBlocks?!0:this.roomBlocks?.length||this.isDraft?!1:!this.isDraft}getVisibleRoomBlocks(){return this.hasActiveRoomBlocks?this.roomBlocks?.filter(e=>e.bookingStatus!==vn.CANCELED):this.roomBlocks?.filter(e=>e.bookingStatus===vn.CANCELED)}showPolicyAndPaymentsBanner(){return!this.hasActiveRoomBlocks&&this.isDraft&&!this.isOffsite&&!this.roomBlockMissingEventSettings&&!this.isMissingPermissionToBookAccommodations}showRoomBlockMissingEventSettingsWarning(){return!this.hasRoomBlocks&&!this.isEditModeDisabled&&!this.isOffsite&&this.roomBlockMissingEventSettings&&!this.isMissingPermissionToBookAccommodations}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["navan-team-event-room-blocks"]],inputs:{teamEventSearchConfig:"teamEventSearchConfig",teamEventId:"teamEventId",isDraft:"isDraft",isEditModeDisabled:"isEditModeDisabled",hasRoomBlocks:"hasRoomBlocks",roomBlockMissingParticipants:"roomBlockMissingParticipants",roomBlocks:"roomBlocks",travelWindows:"travelWindows",isOffsite:"isOffsite",roomBlockMissingEventSettings:"roomBlockMissingEventSettings",isMissingPermissionToBookAccommodations:"isMissingPermissionToBookAccommodations"},outputs:{goToPolicyAndPayments:"goToPolicyAndPayments"},standalone:!0,features:[At,y],decls:30,vars:39,consts:()=>{let e;e=$localize`:␟ed31c09fd77c36238c13d83635f3fe5294c733d2␟471816275243265264:Location`;let n;n=$localize`:␟77bbe324b08f6636fb50f673cea05313b86fb692␟888341446683346521:Start date`;let i;
5i=$localize`:␟f60960faa2cd3e0db11e48688774d05dfa9d715b␟126074860850048964:End date`;let l;l=$localize`:␟bbbc02d2c79d928e13bfb750dc19a391e0e58d93␟1353423934243768300: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SPAN:(optional)${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SPAN:`;let d;d=$localize`:␟1bef968d0a7b52364a44df31bfd43487ba273f98␟3416090504631652376: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#2\uFFFD"}:START_TAG_SPAN:(optional)${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPAN:`;let u;u=$localize`:␟6e8928c993e58ae72baadc152b8b66681b79cb1e␟3839208545509654321: Room block location doesn't match event location. `;let h;h=$localize`:␟d52accda82e1bfab1f36d0f0417cb9cc93d0f283␟5065837375253935970: Search `;let I;I=$localize`:␟31057a671575103bee6592c67193dabe1c2ec26f␟1955221091505044295: Accommodations booked on behalf of participants use the organizer's travel policy and payment methods. `;let F;F=$localize`:␟fbe12d1a8daddaf5bbdc88c5d2e10a6bb7247a27␟35160328187566100: Complete the missing details in ${"\uFFFD#4\uFFFD"}:START_LINK:Policy and payments${"\uFFFD/#4\uFFFD"}:CLOSE_LINK: to book accommodations. `;let $;$=$localize`:␟b60a3fcd2236c006d84ff290bd50aaa1c284fa54␟9148220063085860038:Team event room blocks image`;let ge;ge=$localize`:␟125135aeda3c73204567bf0f42da44f2da4aab50␟6649888982910009924: Active reservations `;let W;return W=$localize`:␟6dd7af7641c02ffcd06801250768d3e9f056e8ab␟8299593169425007488: Cancelled reservations `,[l,d,u,h,I,F,ge,W,["class","team-event-room-blocks__header iframe",4,"ngIf"],[1,"team-event-room-blocks"],[1,"team-event-room-blocks",3,"ngClass"],[1,"team-event-room-blocks__header"],[3,"team-event-room-blocks__title","team-event-room-blocks__title-accommodation",4,"ngIf"],[1,"team-event-room-blocks__sub-title"],[1,"team-event-room-blocks__search-container"],[1,"team-event-room-blocks__search-form"],[1,"team-event-room-blocks__search-form-mask",3,"formGroup","taDisabled"],["iconName","location-pin","label",e,"theme","none",1,"team-event-room-blocks__location-form"],["formControlName","location","type","location",3,"required","isPersonal","newLocationSearch"],["class","team-event-room-blocks__form-warning",4,"ngIf"],[1,"team-event-room-blocks__date-trigger-group-container"],[1,"team-event-room-blocks__date-trigger-group"],["theme","none","placeholder",n,1,"team-event-room-blocks__date-trigger",3,"changeRange","range","minmaxRange","required","config"],[1,"team-event-room-blocks__date-trigger-divider"],["theme","none","placeholder",i,1,"team-event-room-blocks__date-trigger",3,"changeRange","range","minmaxRange","required","type","config"],[1,"team-event-room-blocks__calender-anchor-sm"],[1,"team-event-room-blocks__action-container"],[1,"team-event-room-blocks__rooms-selection"],[3,"updateExploratorySearchParams","bookingType","expandedPillWidth","defaultRoomCount","exploratorySearchParams"],["class","team-event-room-blocks__search-action",4,"ngIf"],["class","team-event-room-blocks__banner-container",4,"ngIf"],["class","team-event-room-blocks__default-banner-container",4,"ngIf"],["class","warning-box",4,"ngIf"],["class","team-event-room-blocks__mask",4,"ngIf"],["class","team-event-room-blocks__background",4,"ngIf"],["class","team-event-room-blocks__cards",4,"ngIf"],[1,"team-event-room-blocks__header","iframe"],[1,"team-event-room-blocks__header__title"],[1,"team-event-room-blocks__title-note"],[1,"team-event-room-blocks__form-warning"],[1,"team-event-room-blocks__search-action"],["taButton","","qaId","teamEventRoomBlocksSearchButton","icon","search",3,"click","disabled"],[1,"team-event-room-blocks__banner-container"],[1,"team-event-room-blocks__default-banner-container"],[1,"warning-box"],["type","WARNING"],["description",""],[3,"click"],[1,"team-event-room-blocks__mask"],[1,"team-event-room-blocks__background"],["alt",$,1,"team-event-room-blocks__img",3,"src"],[1,"team-event-room-blocks__cards"],["class","team-event-room-blocks__cards--title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"team-event-room-blocks__cards--title"],[1,"team-event-room-blocks__card",3,"isEditModeDisabled","roomBlock","isDraft","isOffsite"]]},template:function(n,i){n&1&&(p(0,C0,4,1,"div",8),r(1,"div",9)(2,"div",10)(3,"div",11),p(4,h0,3,5,"h2",12),r(5,"p",13),C(6),s()(),r(7,"div",14)(8,"div",15)(9,"form",16)(10,"ta-form-wrap",17),m(11,"ta-hotel-search",18),s(),p(12,A0,2,0,"div",19),r(13,"div",20)(14,"ta-date-trigger-group",21)(15,"ta-date-trigger-v2",22),S("changeRange",function(d){return i.changeHotelDateRange(d)}),s(),m(16,"div",23),r(17,"ta-date-trigger-v2",24),S("changeRange",function(d){return i.changeHotelDateRange(d)}),s()(),p(18,O0,2,1,"div",19),m(19,"div",25),s(),r(20,"div",26)(21,"div",27)(22,"navan-user-exploratory-search-v2",28),S("updateExploratorySearchParams",function(d){return i.updateExploratorySearchParams(d)}),s()(),p(23,M0,3,1,"div",29),s()(),p(24,N0,3,1,"div",30)(25,R0,2,0,"div",31)(26,b0,5,0,"div",32),s(),p(27,y0,1,0,"div",33)(28,I0,3,5,"div",34),s(),p(29,U0,4,3,"div",35),s()()),n&2&&(a("ngIf",i.inIframe),o(2),a("ngClass",me(37,P0,i.hasActiveRoomBlocks)),o(2),a("ngIf",!i.inIframe),o(2),B(" ",i.subTitle," "),o(),te("team-event-room-blocks__search-container--banner",!i.isDraft),o(2),a("formGroup",i.teamEventSearchForm)("taDisabled",i.isSearchDisabled),o(),te("team-event-room-blocks__location-form--warning",i.isDifferentLocation),o(),a("required",!0)("isPersonal",!0)("newLocationSearch",!0),o(),a("ngIf",i.isDifferentLocation),o(3),a("range",i.hotelDateRange)("minmaxRange",i.minmaxRange)("required",!0)("config",i.fromDateConfig1),o(2),a("range",i.hotelDateRange)("minmaxRange",i.minmaxRange)("required",!0)("type","to")("config",i.toDateConfig2),o(),a("ngIf",i.showRoomBlockDatesWarningMessage()),o(3),te("team-event-room-blocks__rooms-selection--not-offsite",!i.isOffsite),o(),a("bookingType",i.bookingType)("expandedPillWidth",340)("defaultRoomCount",(i.teamEventSearchConfig==null?null:i.teamEventSearchConfig.numberOfRooms)>=1?i.teamEventSearchConfig==null?null:i.teamEventSearchConfig.numberOfRooms:0)("exploratorySearchParams",i.exploratorySearchParams),o(),a("ngIf",!i.hasActiveRoomBlocks),o(),a("ngIf",i.showRoomBlockStatusBanner),o(),a("ngIf",i.showPolicyAndPaymentsBanner()),o(),a("ngIf",i.showRoomBlockMissingEventSettingsWarning()),o(),a("ngIf",!i.hasActiveRoomBlocks),o(),a("ngIf",!i.hasActiveRoomBlocks),o(),a("ngIf",(i.roomBlocks==null?null:i.roomBlocks.length)>0))},dependencies:[je,Ut,Me,Xe,Vt,he,Ge,Qe,Fn,kt,js,L,Ho,ls,tl,un,_e,x_,fn,$n,Ai,Ht],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.team-event-room-blocks[_ngcontent-%COMP%]{background-color:var(--ta-color-surface-default);border-radius:var(--dim-step3);box-shadow:0 1px var(--dim-step1) 0 #18191b26;margin-bottom:var(--dim-step4)}.team-event-room-blocks__header[_ngcontent-%COMP%]{padding:var(--dim-step6) var(--dim-step8);border-bottom:1px solid var(--ta-color-border-disabled)}.team-event-room-blocks__header__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start;line-height:36px;margin:var(--dim-step2) 0 var(--dim-step2) 0}.team-event-room-blocks__header__action-btn[_ngcontent-%COMP%]{margin-left:8px}.team-event-room-blocks__header__action-btn[_ngcontent-%COMP%]   ta-icon[_ngcontent-%COMP%]{margin-right:8px}.team-event-room-blocks__header__action-btn__hint[_ngcontent-%COMP%]{width:250px;padding:8px 12px}.team-event-room-blocks__header.iframe[_ngcontent-%COMP%]{padding:0;border-bottom:unset;margin-bottom:32px;display:flex;justify-content:space-between;align-items:center}.team-event-room-blocks__title[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin:0;font-weight:var(--text-weight-xb);font-size:var(--text-size-xl);line-height:36px}.team-event-room-blocks__title-note[_ngcontent-%COMP%]{font-family:var(--main-font);font-weight:var(--text-weight-regular);font-size:var(--ta-size-font-body-medium);line-height:24px;color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;padding-inline-start:var(--dim-step2)}.team-event-room-blocks__title-accommodation[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;margin:0;font-weight:var(--text-weight-medium);font-size:var(--text-size-xb);line-height:var(--dim-step9)}.team-event-room-blocks__sub-title[_ngcontent-%COMP%]{margin:0;padding-top:var(--dim-step1);line-height:28px}.team-event-room-blocks__sub-title[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{max-height:28px}.team-event-room-blocks__search-container[_ngcontent-%COMP%]{position:relative}.team-event-room-blocks__search-container--banner[_ngcontent-%COMP%]{margin-bottom:var(--dim-step3)}.team-event-room-blocks__search-form[_ngcontent-%COMP%]{position:relative;width:680px;z-index:3;padding:var(--dim-step4) var(--dim-step8)}.team-event-room-blocks__search-form-mask[_ngcontent-%COMP%]{padding-bottom:var(--dim-step1);padding-left:var(--dim-step1);left:var(--dim-step1)}.team-event-room-blocks__location-form[_ngcontent-%COMP%]{border:1px solid var(--ta-color-border-default);border-radius:12px;margin:var(--dim-step5) 0;
5height:52px;box-sizing:border-box;transition:border-color .4s}.team-event-room-blocks__location-form[_ngcontent-%COMP%]:hover{border:2px solid var(--ta-color-border-primary)}.team-event-room-blocks__location-form--warning[_ngcontent-%COMP%]{margin-bottom:0}.team-event-room-blocks__form-warning[_ngcontent-%COMP%]{margin-bottom:var(--dim-step5);padding:var(--dim-step2) 0 0 var(--dim-step4);color:var(--ta-color-text-alert);font-size:var(--text-size-xs);font-weight:var(--text-weight-regular);text-align:start}.team-event-room-blocks__action-container[_ngcontent-%COMP%]{display:flex;margin:var(--dim-step5) 0}.team-event-room-blocks__rooms-selection[_ngcontent-%COMP%]{flex:4}.team-event-room-blocks__rooms-selection--not-offsite[_ngcontent-%COMP%]     .navan-exploratory-search .traveller-pill{border-radius:var(--ta-radius-pill)}.team-event-room-blocks__search-action[_ngcontent-%COMP%]{flex:3}.team-event-room-blocks__search-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;height:100%}.team-event-room-blocks__date-trigger[_ngcontent-%COMP%]{width:50%}.team-event-room-blocks__date-trigger-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;box-sizing:border-box;border-radius:12px;border:1px solid var(--ta-color-border-default);height:52px;transition:border-color .4s;position:relative}.team-event-room-blocks__date-trigger-group[_ngcontent-%COMP%]:hover{border:2px solid var(--ta-color-border-primary)}.team-event-room-blocks__date-trigger-group-container[_ngcontent-%COMP%]{width:100%;position:relative}.team-event-room-blocks__date-trigger-divider[_ngcontent-%COMP%]{position:absolute;left:50%;right:50%;top:5px;width:1px;height:40px;background-color:var(--ta-color-divider-default)}.team-event-room-blocks__calender-anchor-sm[_ngcontent-%COMP%]{position:absolute;top:0;right:-90px}.team-event-room-blocks__mask[_ngcontent-%COMP%]{height:100%;right:0;position:absolute;top:0;z-index:2;background-image:url(https://d2w7f1pl8j4yzn.cloudfront.net/team-events/team-events-room-block-mask.svg);background-repeat:no-repeat;background-size:contain;background-position:left top;width:482px;pointer-events:none}.team-event-room-blocks__background[_ngcontent-%COMP%]{position:absolute;right:0;z-index:1;top:0;width:480px;height:100%}.team-event-room-blocks__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}.team-event-room-blocks__img-round[_ngcontent-%COMP%]{border-bottom-right-radius:var(--dim-step3)}.team-event-room-blocks__banner-container[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start}.team-event-room-blocks__default-banner-container[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-small);font-weight:var(--text-weight-regular);text-align:start;padding-left:var(--dim-step5);margin-bottom:var(--dim-step8);max-width:90%}.team-event-room-blocks__empty-container[_ngcontent-%COMP%]{width:100%;height:52px}.team-event-room-blocks__cards[_ngcontent-%COMP%]{padding:var(--dim-step5) var(--dim-step8) var(--dim-step9)}.team-event-room-blocks__cards--title[_ngcontent-%COMP%]{margin-top:0;margin-bottom:var(--dim-step4)}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__search-form[_ngcontent-%COMP%]{width:unset}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__search-form-mask[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__location-form[_ngcontent-%COMP%]{display:inline-block;width:38%}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__action-container[_ngcontent-%COMP%]{display:inline-flex}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__date-trigger-group[_ngcontent-%COMP%]{display:inline-flex;width:100%}.team-event-room-blocks--minified[_ngcontent-%COMP%]   .team-event-room-blocks__date-trigger-group-container[_ngcontent-%COMP%]{display:inline;width:33%}"]})}}return t})();E();be();E();var L_=ao(Wr());function V0(t,_){t&1&&(r(0,"div",25),m(1,"ta-icon-v2",26),r(2,"span",27),g(3,5),s()())}function k0(t,_){if(t&1&&m(0,"ta-settings-diff-notification",28),t&2){let e=c();a("propertyType",e.PropertyType.FLIGHT_TYPES)("propertyValue",e.flightTypesPropertyValue)}}function D0(t,_){if(t&1&&(r(0,"ta-checkbox-v2",29)(1,"div",13)(2,"span"),g(3,6),s()()()),t&2){let e=c();a("disabled",e.isEditModeDisabled||e.disabled)}}var U_=(()=>{class t{constructor(){this.elementRef=M(it),this.fb=M(qe),this.iconRegistry=M(ne),this.isEditModeDisabled=!1,this.isFlightBookingAllowed=!1,this.disabled=!1,this.PropertyType=Hn,this.flightTypesPropertyValue={},this.onTouched=()=>{},this.onChange=()=>{},this.iconRegistry.registerIcons(En)}get isAirportSelected(){return!!this.formGroup.get("recommendedAirport").value}get hasFlightTypeError(){return!this.atLeastOneFlightTypeSelected()}validate(){return this.atLeastOneFlightTypeSelected()?null:{noFlightTypeSelected:!0}}atLeastOneFlightTypeSelected(){if(!this.formGroup||!this.isFlightBookingAllowed)return!0;let{oneWay:e,roundTrip:n,multiCity:i}=this.formGroup.value;return e||n||i}ngOnInit(){this.initializeForm(),this.subscribeToValueChanges()}initializeForm(){this.formGroup=this.fb.group({oneWay:[!0],roundTrip:[!0],multiCity:[!1],recommendedAirport:[null],allowNearbyAirports:[!1]})}writeValue(e){if(e){let n=e?.recommendedAirport[0],i=Re(le({},e),{recommendedAirport:n?{iata:n}:null});this.formGroup.setValue(i,{emitEvent:!1}),this.updateFlightTypesPropertyValue(i)}else this.formGroup.reset({emitEvent:!1}),this.flightTypesPropertyValue={};this.formGroup.markAsPristine()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}subscribeToValueChanges(){this.formGroup.valueChanges.pipe(ft(this.elementRef),xt(L_.default)).subscribe(e=>{let n=this.transformFormValue(e);this.updateFlightTypesPropertyValue(e),this.onChange(n)}
5),["oneWay","roundTrip","multiCity"].forEach(e=>{this.formGroup.get(e).valueChanges.pipe(ft(this.elementRef)).subscribe(()=>{this.formGroup.markAsTouched(),this.formGroup.updateValueAndValidity()})})}updateFlightTypesPropertyValue(e){if(!e){this.flightTypesPropertyValue={};return}let n={};e.oneWay&&(n[Zi.ONE_WAY]=2),e.roundTrip&&(n[Zi.ROUND_TRIP]=1),e.multiCity&&(n[Zi.BUNDLE]=1,n[Zi.FLEXIBLE_BUNDLE]=1),this.flightTypesPropertyValue={flightTypes:Object.keys(n).length>0?n:void 0}}transformFormValue(e){let n=e?.recommendedAirport?.iata;return Re(le({},e),{recommendedAirport:n?[n]:[]})}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-flight-settings"]],inputs:{isEditModeDisabled:"isEditModeDisabled",isFlightBookingAllowed:"isFlightBookingAllowed"},standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0},{provide:Et,useExisting:ht(()=>t),multi:!0}]),y],decls:30,vars:10,consts:()=>{let e;e=$localize`:␟bf527a53f6af1117f4d31589f72e4e67a1bd85fc␟3823698994112689242:Flight types allowed`;let n;n=$localize`:␟fe97d31d4aa186e9661cb38ab9b679bc667e4af0␟5609903677027719778:One-way (up to 2 tickets)`;let i;i=$localize`:␟79038e5af6f24cf579d64ebc30a32698c0b88989␟704077781542700158:Roundtrip`;let l;l=$localize`:␟296dabc7716f84e0fa6d1c3f9975033d747e4f34␟4290950710927955109:Multi-city`;let d;d=$localize`:␟1c2a6fcdce3b16591d442afcc5daeac0cf84be8c␟5526446709799778172:Specify a required airport for arrival (optional)`;let u;u=$localize`:␟fccddf925403c03f3e34a7e799c384fcc5841ffb␟9124116068227779922:Please select at least one flight type`;let h;return h=$localize`:␟77aa22172ffeb8548969e1165df78c97a76196af␟490580089167870321:Include nearby airports`,[e,n,i,l,d,u,h,[1,"event-flight-settings",3,"formGroup"],[1,"event-flight-settings__section"],[1,"event-flight-settings__row"],[1,"event-flight-settings__section-title"],[1,"event-flight-settings__row","event-flight-settings__row--small-margin"],["formControlName","oneWay",3,"disabled"],[1,"event-flight-settings__option"],["formControlName","roundTrip",3,"disabled"],["formControlName","multiCity",3,"disabled"],["class","event-flight-settings__error",4,"ngIf"],[3,"propertyType","propertyValue",4,"ngIf"],["id","event-flight-arrival-airport-label",1,"event-flight-settings__section-title"],[1,"event-flight-settings__row","event-flight-settings__row--no-margin"],[1,"event-flight-settings__airport-selection"],[1,"event-flight-settings__airport"],["theme","none",1,"event-flight-settings__airport-form"],["formControlName","recommendedAirport","routeDirection","To","ariaLabelledBy","event-flight-arrival-airport-label",3,"disabled","hideNearby","required"],["formControlName","allowNearbyAirports",3,"disabled",4,"ngIf"],[1,"event-flight-settings__error"],["icon","cancel"],[1,"error-message"],[3,"propertyType","propertyValue"],["formControlName","allowNearbyAirports",3,"disabled"]]},template:function(n,i){n&1&&(r(0,"form",7)(1,"div",8)(2,"div",9)(3,"label",10),g(4,0),s()(),r(5,"div",11)(6,"ta-checkbox-v2",12)(7,"div",13)(8,"span"),g(9,1),s()()(),r(10,"ta-checkbox-v2",14)(11,"div",13)(12,"span"),g(13,2),s()()(),r(14,"ta-checkbox-v2",15)(15,"div",13)(16,"span"),g(17,3),s()()()(),p(18,V0,4,0,"div",16)(19,k0,1,2,"ta-settings-diff-notification",17),s(),r(20,"div",8)(21,"div",11)(22,"label",18),g(23,4),s()(),r(24,"div",19)(25,"div",20)(26,"div",21)(27,"ta-form-wrap",22),m(28,"ta-airport-search",23),s()(),p(29,D0,4,1,"ta-checkbox-v2",24),s()()()()),n&2&&(a("formGroup",i.formGroup),o(6),a("disabled",i.isEditModeDisabled||i.disabled),o(4),a("disabled",i.isEditModeDisabled||i.disabled),o(4),a("disabled",i.isEditModeDisabled||i.disabled),o(4),a("ngIf",i.hasFlightTypeError),o(),a("ngIf",!i.formGroup.pristine),o(9),a("disabled",i.isEditModeDisabled||i.disabled)("hideNearby",!0)("required",!1),o(),a("ngIf",i.isAirportSelected))},dependencies:[je,Ut,Me,Xe,Vt,he,Ge,Qe,bo,Ro,L,K,Z,kt,qs,$i],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-flight-settings[_ngcontent-%COMP%]{display:flex;flex-direction:column}.event-flight-settings__error[_ngcontent-%COMP%]{border-radius:var(--dim-step2);border:1px solid var(--color-action-danger);padding:var(--dim-step4);gap:var(--dim-step4);background-color:#fff0ea;display:flex;align-items:center}.event-flight-settings__error[_ngcontent-%COMP%]   .ta-icon[_ngcontent-%COMP%]{color:var(--color-action-danger)}.event-flight-settings__error[_ngcontent-%COMP%]   .error-message[_ngcontent-%COMP%]{font-weight:700}.event-flight-settings__section[_ngcontent-%COMP%]:not(:last-child){margin-bottom:var(--dim-step5)}.event-flight-settings__row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:var(--dim-step8);margin-bottom:var(--dim-step5)}.event-flight-settings__row--small-margin[_ngcontent-%COMP%]{margin-bottom:var(--dim-step2)}.event-flight-settings__row--no-margin[_ngcontent-%COMP%]{margin-bottom:0}.event-flight-settings__section-title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-medium);line-height:var(--text-size-large)}.event-flight-settings__airport-selection[_ngcontent-%COMP%]{display:flex;align-items:baseline}.event-flight-settings__airport[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;border-radius:12px;width:328px;border:1px solid var(--ta-color-border-default);transition:border-color .4s;position:relative;height:52px;margin-right:var(--dim-step5)}.event-flight-settings__airport-form[_ngcontent-%COMP%]{width:100%}"]})}}return t})();E();function $0(t,_){t&1&&(r(0,"div",16),m(1,"ta-icon-v2",17),r(2,"span",18),g(3,7),s()())}var w_=(()=>{class t{constructor(e,n,i){this.elementRef=e,this.fb=n,this.iconRegistry=i,this.isEditModeDisabled=!1,this.disabled=!1,this.HotelPrepaidRate=eo,this.HotelPayAtHotelRate=to,this.onTouched=()=>{},this.onChange=()=>{},this.iconRegistry.registerIcons(Ti)}get prepaidRatesControl(){return this.formGroup.controls.prepaidRates}get payAtHotelRatesControl(){return this.formGroup.controls.payAtHotelRates}get noRatesSelected(){return this.prepaidRatesControl.value===eo.NOT_ALLOWED&&this.payAtHotelRatesControl.value===to.NOT_ALLOWED}ngOnInit(){this.formGroup=this.fb.group({prepaidRates:[],payAtHotelRates:[]},{validator:this.atLeastOneRateRequiredValidator}),this.subscribeToValueChanges()}writeValue(e){this.formGroup.patchValue({prepaidRates:e?.prepaidRates||eo.ALLOWED,payAtHotelRates:e?.payAtHotelRates||to.ALL})}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}validate(e){return this.formGroup.valid?null:{hotelSettingsInvali
5d:!0}}setDisabledState(e){e?this.formGroup.disable():this.formGroup.enable()}subscribeToValueChanges(){this.formGroup.valueChanges.pipe(ft(this.elementRef)).subscribe(e=>this.onChange(e))}atLeastOneRateRequiredValidator(e){return e.get("prepaidRates").value===eo.NOT_ALLOWED&&e.get("payAtHotelRates").value===to.NOT_ALLOWED?{noRateSelected:!0}:null}static{this.\u0275fac=function(n){return new(n||t)(T(it),T(qe),T(ne))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-event-hotel-settings"]],inputs:{isEditModeDisabled:"isEditModeDisabled"},standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0},{provide:Et,useExisting:ht(()=>t),multi:!0}]),y],decls:20,vars:8,consts:()=>{let e;e=$localize`:␟5faee073a37d889257286c7fc9b5b252fb3db132␟3404894888364345813:Prepaid rooms`;let n;n=$localize`:␟c0e2713818759d229b3608efde4b7408bc46eab3␟6516092255978637584: Allowed `;let i;i=$localize`:␟62ba1d4c49f60f2f543455d7f7eab11c459b171d␟2122050094772759354: Not allowed `;let l;l=$localize`:␟dee30d547a78ab7b06d95a055317543d4e8c15a5␟4278675658694035292:Pay-at-hotel rooms`;let d;d=$localize`:␟c0e2713818759d229b3608efde4b7408bc46eab3␟6516092255978637584: Allowed `;let u;u=$localize`:␟f0a02b8ebb53e73749fb67ba2cb551ddc2950fe2␟5538013625510484414: Allowed only for company-discounted rates `;let h;h=$localize`:␟62ba1d4c49f60f2f543455d7f7eab11c459b171d␟2122050094772759354: Not allowed `;let I;return I=$localize`:␟f433ad307bfda0fdbc08e6642a4616d9fc2c723c␟3943480780281045700:Please select at least one allowed room type`,[e,n,i,l,d,u,h,I,[1,"event-hotel-settings"],[1,"event-hotel-settings__prepaid"],[1,"event-hotel-settings__title"],[3,"formControl"],["data-testid","paymentScheduleAll",1,"event-hotel-settings__radio-option",3,"value"],["data-testid","paymentSchedulePayNow",1,"event-hotel-settings__radio-option",3,"value"],[1,"event-hotel-settings__pay-at-hotel"],["class","event-hotel-settings__error",4,"ngIf"],[1,"event-hotel-settings__error"],["icon","cancel",1,"event-hotel-settings__error-icon"],[1,"event-hotel-settings__error-message"]]},template:function(n,i){n&1&&(r(0,"div",8)(1,"div",9)(2,"div",10),g(3,0),s(),r(4,"ta-radio-group-v2",11)(5,"ta-radio-button-v2",12),g(6,1),s(),r(7,"ta-radio-button-v2",13),g(8,2),s()()(),r(9,"div",14)(10,"div",10),g(11,3),s(),r(12,"ta-radio-group-v2",11)(13,"ta-radio-button-v2",12),g(14,4),s(),r(15,"ta-radio-button-v2",13),g(16,5),s(),r(17,"ta-radio-button-v2",13),g(18,6),s()()()(),p(19,$0,4,0,"div",15)),n&2&&(o(4),a("formControl",i.prepaidRatesControl),o(),a("value",i.HotelPrepaidRate.ALLOWED),o(2),a("value",i.HotelPrepaidRate.NOT_ALLOWED),o(5),a("formControl",i.payAtHotelRatesControl),o(),a("value",i.HotelPayAtHotelRate.ALL),o(2),a("value",i.HotelPayAtHotelRate.CNR_ONLY),o(2),a("value",i.HotelPayAtHotelRate.NOT_ALLOWED),o(2),a("ngIf",i.formGroup.errors==null?null:i.formGroup.errors.noRateSelected))},dependencies:[mt,L,he,Me,wt,Uo,Lo,Fo,K,Z],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-hotel-settings[_ngcontent-%COMP%]{display:flex}.event-hotel-settings__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--ta-size-font-body-medium);font-weight:var(--text-weight-medium);text-align:start;line-height:var(--text-size-large);margin-bottom:var(--dim-step4)}.event-hotel-settings__prepaid[_ngcontent-%COMP%], .event-hotel-settings__pay-at-hotel[_ngcontent-%COMP%]{flex-grow:1}.event-hotel-settings__radio-option[_ngcontent-%COMP%]{display:block;margin-bottom:var(--dim-step4)}.event-hotel-settings__error[_ngcontent-%COMP%]{border-radius:var(--dim-step2);border:1px solid var(--color-action-danger);padding:var(--dim-step4);gap:var(--dim-step4);background-color:#fff0ea;display:flex;align-items:center}.event-hotel-settings__error-icon[_ngcontent-%COMP%]{color:var(--color-action-danger)}.event-hotel-settings__error-message[_ngcontent-%COMP%]{font-weight:700}"]})}}return t})();E();E();E();function G0(t,_){t&1&&(r(0,"span"),g(1,0),s())}function B0(t,_){if(t&1&&(r(0,"div",16),m(1,"ta-icon-v2",17),p(2,G0,2,0,"span",18),s()),t&2){let e=c();o(2),a("ngIf",e.noteControl==null||e.noteControl.errors==null?null:e.note
5Control.errors.required)}}function z0(t,_){t&1&&(r(0,"span"),g(1,1),s())}function H0(t,_){if(t&1&&(r(0,"div",16),m(1,"ta-icon-v2",17),p(2,z0,2,0,"span",18),s()),t&2){let e=c(2);o(2),a("ngIf",e.urlControl==null||e.urlControl.errors==null?null:e.urlControl.errors.pattern)}}function X0(t,_){if(t&1){let e=O();r(0,"div",19)(1,"div",20),C(2,"URL for 'Learn more' link (optional)"),s(),r(3,"ta-form-wrap",21)(4,"input",22),S("focus",function(){f(e);let i=c();return v(i.onUrlFocus())})("blur",function(){f(e);let i=c();return v(i.onUrlBlur())}),s()(),r(5,"div",23),p(6,H0,3,1,"div",12),s()()}if(t&2){let e=c();o(3),a("invalid",e.urlControl==null?null:e.urlControl.invalid)("showInvalid",(e.urlControl==null?null:e.urlControl.touched)&&!e.isUrlFocused),o(3),a("ngIf",(e.urlControl==null?null:e.urlControl.invalid)&&(e.urlControl==null?null:e.urlControl.touched)&&!e.isUrlFocused)}}var Qa=(()=>{class t{constructor(e,n,i){this.modalRef=e,this.formBuilder=n,this.iconRegistry=i,this.maxChars=500,this.isUrlFocused=!1;let l=this.modalRef.data||{};this.title=l.title||"Add Note",this.isEdit=l.isEdit||!1,this.noteType=l.noteType||"general-note";let d=l.existingNote;this.form=this.formBuilder.group({note:[d?.note||"",[ct.required,ct.maxLength(this.maxChars)]],url:[d?.url||"",[ct.pattern(/^https?:\/\/.+/)]]}),this.iconRegistry.registerIcons($r)}ngOnInit(){}onCancel(){this.modalRef.close({note:"",action:"cancel"})}onSave(){if(this.form.valid){let e={note:this.form.get("note")?.value||"",url:this.form.get("url")?.value||"",action:"save"};this.modalRef.close(e)}else this.form.markAllAsTouched()}get isFormValid(){return this.form.valid}get noteControl(){return this.form.get("note")}get urlControl(){return this.form.get("url")}get modalTitle(){return this.title}get showUrlField(){return this.noteType==="general-note"}get remainingChars(){let e=this.noteControl?.value||"";return this.maxChars-e.length}onUrlFocus(){this.isUrlFocused=!0}onUrlBlur(){this.isUrlFocused=!1}static{this.\u0275fac=function(n){return new(n||t)(T(ot),T(qe),T(ne))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-note-modal"]],standalone:!0,features:[y],decls:17,vars:11,consts:()=>{let e;e=$localize`:␟d7b35c384aecd25a516200d6921836374613dfe7␟2159130950882492111:Cancel`;let n;n=$localize`:␟8a1b60f1df66d9e25c2a43fec8db2ed60be24b59␟3879860012674086560:Enter a note`;let i;return i=$localize`:␟53402ea7292669d3a4e4b47c97d648eca1713373␟5617000181439769848:Incorrect URL`,[n,i,[1,"note-modal"],[3,"header"],[1,"note-modal__body"],[1,"note-modal-form",3,"formGroup"],[1,"note-section"],[1,"note-label"],[1,"note-lable-required"],[1,"note-field",3,"isTextArea","invalid","showInvalid","hint"],["formControlName","note","taInput","","data-testid","note-textarea",1,"note-modal__textarea",3,"required"],[1,"note-feedback-container"],["class","note-modal__error","role","alert","aria-live","polite",4,"ngIf"],["class","url-section",4,"ngIf"],["size","regular","taModalSecondaryAction","","kind","outline","flex","true","text",e,"data-testid","note-cancel-button",3,"clickEvent"],["size","regular","taModalPrimaryAction","","flex","true","data-testid","note-save-button",3,"clickEvent","text"],["role","alert","aria-live","polite",1,"note-modal__error"],["icon","error-small","size","small","aria-hidden","true"],[4,"ngIf"],[1,"url-section"],[1,"url-label"],[1,"url-field",3,"invalid","showInvalid"],["formControlName","url","type","url","placeholder","https://company.com/url","taInput","","data-testid","note-url-input",1,"note-modal__input",3,"focus","blur"],[1,"url-feedback-container"]]},template:function(n,i){n&1&&(r(0,"ta-modal",2),m(1,"ta-modal-header",3),r(2,"div",4)(3,"form",5)(4,"div",6)(5,"div",7),C(6," Note "),r(7,"span",8),C(8,"*"),s()(),r(9,"ta-form-wrap",9),m(10,"textarea",10),s(),r(11,"div",11),p(12,B0,3,1,"div",12),s()(),p(13,X0,7,3,"div",13),s()(),r(14,"ta-modal-footer")(15,"ta-button-v2",14),S("clickEvent",function(){return i.onCancel()}),s(),r(16,"ta-button-v2",15),S("clickEvent",function(){return i.onSave()}),s()()()),n&2&&(o(),a("header",i.modalTitle),o(2),a("formGroup",i.form),o(6),a("isTextArea",!0)("invalid",(i.noteControl==null?null:i.noteControl.invalid)&&
5(i.noteControl==null?null:i.noteControl.touched))("showInvalid",(i.noteControl==null?null:i.noteControl.invalid)&&(i.noteControl==null?null:i.noteControl.touched))("hint",i.noteControl!=null&&i.noteControl.invalid&&(i.noteControl!=null&&i.noteControl.touched)?"":i.remainingChars+" characters remaining"),o(),a("required",!0),Bt("maxlength",i.maxChars),o(2),a("ngIf",(i.noteControl==null?null:i.noteControl.invalid)&&(i.noteControl==null?null:i.noteControl.touched)),o(),a("ngIf",i.showUrlField),o(3),a("text",i.isEdit?"Save":"Add"))},dependencies:[Ze,at,Zt,kt,ie,Ee,K,Z,Pi,he,Ut,Wt,Me,Xe,Vt,Ge,Qe,L,pn,Kt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.note-modal[_ngcontent-%COMP%]{width:600px}.note-modal__textarea[_ngcontent-%COMP%], .note-modal__input[_ngcontent-%COMP%]{width:100%;border:0;padding:var(--dim-step3) 0}.note-modal__textarea[_ngcontent-%COMP%]:focus-visible, .note-modal__input[_ngcontent-%COMP%]:focus-visible{outline:0}.note-modal-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-self:stretch;overflow:hidden}.note-label[_ngcontent-%COMP%]{padding:0 var(--dim-step4) var(--dim-step2) 0;gap:var(--dim-step1);font-weight:var(--text-weight-medium);line-height:var(--dim-step6)}.note-lable-required[_ngcontent-%COMP%]{color:var(--Light-Icon-Warning, var(--Icon-Warning, #B30400))}.note-section[_ngcontent-%COMP%]{margin-bottom:var(--dim-step6)}.url-label[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium);line-height:var(--dim-step6);padding:0 var(--dim-step4) var(--dim-step2) 0}.note-feedback-container[_ngcontent-%COMP%], .url-feedback-container[_ngcontent-%COMP%]{height:var(--dim-step6);display:flex}.note-modal__error[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:var(--dim-step2);color:var(--ta-color-text-danger);font-size:var(--text-size-xs)}.note-modal__error[_ngcontent-%COMP%]   ta-icon-v2[_ngcontent-%COMP%]{margin-right:var(--dim-step1)}  .ta-form-wrap.ta-form-wrap--theme-filled{margin-bottom:0}  .ta-form-wrap.ta-form-wrap--theme-filled.ta-form-wrap--invalid{border-color:var(--ta-color-border-warning)}"]})}}return t})();E();var V_=(()=>{class t{constructor(e){this.modalRef=e;let n=this.modalRef.data||{};this.noteType=n.noteType||"general-note"}onCancel(){this.modalRef.close({action:"cancel"})}onDelete(){this.modalRef.close({action:"delete"})}get modalTitle(){return this.getDeleteNoteTitle(this.noteType)}get modalSubtitle(){return this.getDeleteNoteSubtitle(this.noteType)}getDeleteNoteTitle(e){switch(e){case Pe.GENERAL:return $localize`Delete general note?`;case Pe.FLIGHT:return $localize`Delete flight note?`;case Pe.HOTEL:return $localize`Delete hotel note?`;case Pe.TRAIN:return $localize`Delete train note?`;case Pe.RENTAL_CAR:return $localize`Delete rental car note?`;default:return $localize`Delete note?`}}getDeleteNoteSubtitle(e){switch(e){case Pe.GENERAL:return $localize`Are you sure you want to delete general note?`;case Pe.FLIGHT:return $localize`Are you sure you want to delete flight note?`;case Pe.HOTEL:return $localize`Are you sure you want to delete hotel note?`;case Pe.TRAIN:return $localize`Are you sure you want to delete train note?`;case Pe.RENTAL_CAR:return $localize`Are you sure you want to delete rental car note?`;default:return $localize`Are you sure you want to delete this note?`}}static{this.\u0275fac=function(n){return new(n||t)(T(ot))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-delete-note-modal"]],standalone:!0,features:[y],decls:8,vars:2,consts:()=>{let e;e=$localize`:␟d7b35c384aecd25a516200d6921836374613dfe7␟2159130950882492111:Cancel`;let n;return n=$localize`:␟826b25211922a1b46436589233cb6f1a163d89b7␟7022070615528435141:Delete`,[[1,"delete-note-modal"],[3,"header"],[1,"delete-note-modal__body"],[1,"delete-note-modal__body-subtitle"],["size","regular","taModalSecondaryAction","","kind","outline","text",e,"data-testid","delete-note-modal-cancel-button",1,"delete-note-modal__button",3,"clickEvent"],["size","regular","type","warning","taModalPrimaryAction","","text",n,"data-testid","delete-note-modal-delete-button",1,"delete-note-modal__button",3,"clickEvent"]]},template:function(n,i){n&1&&(r(0,"ta-modal",0),m(1,"ta-modal-header",1),r(2,"div",2)(3,"div",3),C(4),s()(),r(5,"ta-modal-footer")(6,"ta-button-v2",4),S("clickEvent",function(){return i.onCancel()}),s(),r(7,"ta-button-v2",5),S("clickEvent",function(){return i.onDelete()}),s()()()),n&2&&(o(),a("header",i.modalTitle),o(3),G(i.modalSubtitle))},dependencies:[Ze,at,Zt,ie,Ee,pn,Kt],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.delete-note-modal[_ngcontent-%COMP%]{width:600px}"]})}}return t})();E();E();var li={[Pe.GENERAL]:{order:1,icon:"notes",label:"General note"},[Pe.FLIGHT]:{order:2,icon:"booking-type-flight",label:"Flight note"},[Pe.HOTEL]:{order:3,icon:"booking-type-hotel",label:"Hotel note"},[Pe.TRAIN]:{order:4,icon:"booking-type-train",label:"Train note"},[Pe.RENTAL_CAR]:{order:5,icon:"booking-type-car",label:"Rental car note"}},_i=class{static getNoteIcon(_){return li[_]?.icon||"notes"}static getNoteTypeLabel(_){return li[_]?.label||"Note"}static sortNotesByOrder(_){return[..._].sort((e,n)=>{let i=li[e.type]?.order||Object.entries(Pe).length+1,l=li[n.type]?.order||Object.entries(Pe).length+1;return i-l})}static getTotalNoteTypesCount(){return Object.keys(li).length}};function j0(t,_){if(t&1&&(r(0,"a",13),de(1,0),m(2,"ta-icon-v2",14),pe(),s()),t&2){let e=c();a("href",e.noteItem.url,ze)}}var k_=(()=>{class t{constructor(){this.iconRegistry=M(ne),this.editNote=new Y,this.deleteNote=new Y,this.NOTE_TYPE_CONFIG=li,this.iconRegistry.registerIcons(En,Vn,wn,kn,To,Co,Un,Dr)}onEdit(){this.editNote.emit()}onDelete(){this.deleteNote.emit()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-item-note"]],inputs:{noteItem:"noteItem"},outputs:{editNote:"editNote",deleteNote:"deleteNote"},standalone:!0,features:[y],decls:14,vars:5,consts:()=>{let e;return e=$localize`:␟d63210e3a50128290fc9299c8200f5c195c9a7a6␟8369780286001460799: Learn more ${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2:`,[e,[1,"note-item"],[1,"note-type-info"],[1,"n
5ote-type-icon",3,"icon"],[1,"note-type-label"],[1,"note-content"],[1,"note-text"],["target","_blank","rel","noopener noreferrer","class","note-url",3,"href",4,"ngIf"],[1,"note-actions"],["kind","ghost","size","small","data-testid","edit-note-btn",1,"note-action-btn","edit-btn",3,"clickEvent"],["icon","edit","size","regular",1,"edit-icon"],["kind","ghost","size","small","data-testid","delete-note-btn",1,"note-action-btn","delete-btn",3,"clickEvent"],["icon","trash","size","regular",1,"delete-icon"],["target","_blank","rel","noopener noreferrer",1,"note-url",3,"href"],["icon","external-link-small",1,"external-link-icon"]]},template:function(n,i){n&1&&(r(0,"div",1)(1,"div",2),m(2,"ta-icon-v2",3),r(3,"span",4),C(4),s()(),r(5,"div",5)(6,"div",6),C(7),s(),p(8,j0,3,1,"a",7),s(),r(9,"div",8)(10,"ta-button-v2",9),S("clickEvent",function(){return i.onEdit()}),m(11,"ta-icon-v2",10),s(),r(12,"ta-button-v2",11),S("clickEvent",function(){return i.onDelete()}),m(13,"ta-icon-v2",12),s()()()),n&2&&(Bt("data-testid","note-item-"+i.noteItem.type),o(2),a("icon",(i.NOTE_TYPE_CONFIG[i.noteItem.type]==null?null:i.NOTE_TYPE_CONFIG[i.noteItem.type].icon)||"notes"),o(2),G((i.NOTE_TYPE_CONFIG[i.noteItem.type]==null?null:i.NOTE_TYPE_CONFIG[i.noteItem.type].label)||"Note"),o(3),G(i.noteItem.note),o(),a("ngIf",i.noteItem.url))},dependencies:[L,ie,Ee,K,Z],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.note-item[_ngcontent-%COMP%]{padding:24px 0;display:flex;align-items:flex-start;gap:var(--dim-step6)}.note-type-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--dim-step2);width:160px}.note-type-icon[_ngcontent-%COMP%]{color:var(--ta-color-icon-secondary)}.note-type-label[_ngcontent-%COMP%]{font-weight:var(--text-weight-medium)}.note-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;flex:1;width:400px}.note-text[_ngcontent-%COMP%]{font-size:14px;line-height:20px;margin:0;word-wrap:break-word;white-space:pre-line}.note-url[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--dim-step1);color:var(--Text-Primary, #7610C6);font-size:14px;text-decoration-line:underline;word-break:break-all;width:fit-content}.note-url[_ngcontent-%COMP%]   .external-link-icon[_ngcontent-%COMP%]{flex-shrink:0}.note-actions[_ngcontent-%COMP%]{display:flex;gap:var(--dim-step4);flex-shrink:0}.edit-icon[_ngcontent-%COMP%]{color:var(--Icon-Primary, #7610C6)}.delete-icon[_ngcontent-%COMP%]{color:var(--Icon-Danger, #D6293A)}"],changeDetection:0})}}return t})();var Y0=()=>({placeAt:"bottomLeftAlign",offsetY:8}),W0=t=>({placement:t,trapFocus:!0,trapFocusAutoCapture:!0}),K0=t=>({itemSelector:".notes-dropdown__popover-item",popoverRef:t});function Q0(t,_){if(t&1){let e=O();r(0,"div",14)(1,"div",15),S("taPopoverOnOpen",function(){f(e);let i=c();return v(i.openDropdown())})("taPopoverOnClose",function(){f(e);let i=c();return v(i.isOpened=!1)})("kbdSelect",function(i){f(e);let l=c();return v(l.onKbdSelect(i))}),r(2,"ta-button-v2",16),S("clickEvent",function(){f(e);let i=c();return v(i.toggleDropdown())}),m(3,"ta-icon-v2",17),s()()()}if(t&2){let e=c(),n=V(9);o(),a("taPopover",n)("popoverConfig",me(7,W0,Se(6,Y0)))("taKbdListNav",me(9,K0,e.dropdownRef)),o(),Bt("aria-haspopup","menu")("aria-expanded",e.isOpened),o(),a("icon",e.isOpened?"chevron-top":"chevron-bottom")}}function q0(t,_){if(t&1){let e=O();r(0,"ta-item-note",20),S("editNote",function(){let i=f(e).$implicit,l=c(2);return v(l.editNote(i))})("deleteNote",function(){let i=f(e).$implicit,l=c(2);return v(l.deleteNote(i))}),s()}if(t&2){let e=_.$implicit;a("noteItem",e)}}function J0(t,_){if(t&1&&(r(0,"div",18),p(1,q0,1,1,"ta-item-note",19),s()),t&2){let e=c();o(),a("ngForOf",e.notes)}}function Z0(t,_){if(t&1){let e=O();r(0,"div",27),S("click",function(){f(e);let i=c(2);return v(i.selectOption(i.NOTE_TYPES.GENERAL))}),de(1,3),m(2,"ta-icon-v2",28),pe(),s()}}function ef(t,_){if(t&1){let e=O();r(0,"div",29),S("click",function(){f(e);let i=c(2);return v(i.selectOption(i.NOTE_TYPES.FLIGHT))}),de(1,4),m(2,"ta-icon-v2",30),pe(),s()}}function tf(t,_){if(t&1){let e=O();r(0,"div",31),S("click",function(){f(e);let i=c(2);return v(i.selectOption(i.NOTE_TYPES.HOTEL))}),de(1,5),m(2,"ta-icon-v2",32),pe(),s()}}function nf(t,_){if(t&1){let e=O();r(0,"div",33),S("click",function(){f(e);let i=c(2);return v(i.selectOption(i.NOTE_TYPES.TRAIN))}),de(1,6),m(2,"ta-icon-v2",34),pe(),s()}}function of(t,_){if(t&1){let e=O();r(0,"div",35),S("click",function(){f(e);let i=c(2);return v(i.selectOption(i.NOTE_TYPES.RENTAL_CAR))}),de(1,7),m(2,"ta-icon-v2",36),pe(),s()}}function af(t,_){if(t&1&&(r(0,"div",21),p(1,Z0,3,0,"div",22)(2,ef,3,0,"div",23)(3,tf,3,0,"div",24)(4,nf,3,0,"div",25)(5,of,3,0,"div",26),s()),t&2){let e=c();o(),a("ngIf",!e.isNoteTypeUsed(e.NOTE_TYPES.GENERAL)),o(),a("ngIf",!e.isNoteTypeUsed(e.NOTE_TYPES.FLIGHT)),o(),a("ngIf",!e.isNoteTypeUsed(e.NOTE_TYPES.HOTEL)),o(),a("ngIf",!e.isNoteTypeUsed(e.NOTE_TYPES.TRAIN)),o(),a("ngIf",!e.isNoteTypeUsed(e.NOTE_TYPES.RENTAL_CAR))}}var D_=(()=>{class t{constructor(){this.iconRegistry=M(ne),this.modalService=M(et),this.cdr=M($e),this.value=[],this.onChange=e=>{},this.onTouched=()=>{},this.isOpened=!1,this.NOTE_TYPES=Pe,this.noteMenuOrder=[Pe.GENERAL,Pe.FLIGHT,Pe.HOTEL,Pe.TRAIN,Pe.RENTAL_CAR],this.iconRegistry.registerIcons(Xr,jr,En,Vn,wn,kn,To,Un)}get visibleNoteTypes(){return this.noteMenuOrder.filter(e=>!this.isNoteTypeUsed(e))}onKbdSelect({index:e}){let n=this.visibleNoteTypes[e];n&&this.selectOption(n)}get usedNoteTypes(){return new Set(this.value.map(e=>e.type))}get hasAllNoteTypes(){return this.value.length>=_i.getTotalNoteTypesCount()}selectOption(e){this.closeDropdown(),this.openAddNoteModal(e)}isNoteTypeUsed(e){return this.usedNoteTypes.has(e)}openAddNoteModal(e){let n={title:this.getAddNoteTitle(e),isEdit:!1,noteType:e};this.modalService.open(Qa,{data:n}).afterClosed$.pipe(ce(1),ee(({type:l,result:d})=>l==="close"&&d&&d.action==="save")).subscribe(({result:l})=>{this.addNewNote(e,l)})}openEditNoteModal(e){let n={title:this.getEditNoteTitle(e.type),isEdit:!0,noteType:e.type,existingNote:e};this.modalService.open(Qa,{data:n}).afterClosed$.pipe(ce(1),ee(({type:l,result:d})=>l==="close"&&d&&d.action==="save")).subscribe(({result:l})=>{this.updateExistingNote(e.type,l)})}addNewNote(e,n){let i={type:e,note:n.note,url:n.url};this.value=[...this.value,i],this.onChange(this.value),this.onTouched(),this.cdr.markForCheck()}updateExistingNote(e,n){let i=this.value.map(l=>l.type===e?{type:e,note:n.note,url:n.url}:l);this.value=i,this.onChange(this.value),this.onTouched(),this.cdr.markForCheck()}editNote(e){this.openEditNoteModal(e)}deleteNote(e){this.openDeleteNoteModal(e)}openDeleteNoteModal(e){let n={noteType:e.type};this.modalService.open(V_,{data:n}).afterClosed$.pipe(ce(1),ee(({type:l,result:d})=>l==="close"&&d&&d.action==="delete")).subscribe(()=>{this.removeNote(e.type)})}removeNote(e){this.value=this.value.filter(n=>n.type!==e),this.onChange(this.value),this.onTouched(),this.cdr.markForCheck()}getAddNoteTitle(e){switch(e){case Pe.GENERAL:return $localize`Add a general note`;case Pe.FLIGHT:return $localize`Add a flight note`;case Pe.HOTEL:return $localize`Add a hotel note`;case Pe.TRAIN:return $localize`Add a train note`;case Pe.RENTAL_CAR:return $localize`Add a rental car note`;default:return $localize`Add a note`}}getEditNoteTitle(e){switch(e){case Pe.GENERAL:return $localize`Edit general note`;case Pe.FLIGHT:return $localize`Edit flight note`;case Pe.HOTEL:return $localize`Edit hotel note`;case Pe.TRAIN:return $localize`Edit train note`;case Pe.RENTAL_CAR:return $localize`Edit rental car note`;default:return $localize`Edit note`}}toggleDropdown(){this.isOpened?this.closeDropdown():this.openDropdown()}openDropdown(){this.isOpened=!0,this.dropdownRef?.open()}closeDropdown(){this.dropdownRef?.close()}writeValue(e){this.value=e||[],this.cdr.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}
5get notes(){return _i.sortNotesByOrder(this.value)}getNoteIcon(e){return _i.getNoteIcon(e)}getNoteTypeLabel(e){return _i.getNoteTypeLabel(e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=b({type:t,selectors:[["ta-notes"]],viewQuery:function(n,i){if(n&1&&st(re,5),n&2){let l;lt(l=_t())&&(i.dropdownRef=l.first)}},standalone:!0,features:[fe([{provide:Ve,useExisting:t,multi:!0}]),y],decls:10,vars:2,consts:()=>{let e;e=$localize`:␟6890c7e985735fcffd6ea8474dd1024629cd44d5␟2371793477089105889:Participant note`;let n;n=$localize`:␟1b19b2d23ff23707fbcc9868c94912b747576b9c␟6480810730708176946:Visible on the participant's invitation page and email invite.`;let i;i=$localize`:␟41a0c609bac5bb59719502ad774495dc79959c4f␟5032914337530287476:Add a note`;let l;l=$localize`:␟9ab00b5c37a7b12d38f8d84189cd17e45a84e45c␟3062246309422973650:${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2: General note `;let d;d=$localize`:␟d7e1a1b5e08d0565afb53c7568d2079fce856f13␟3906464537813832058:${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2: Flight note `;let u;u=$localize`:␟d43ca761ae68e8885758478097f74f7b82eed8bb␟7055853432619082621:${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2: Hotel note `;let h;h=$localize`:␟330d3d8b4b2da3e72fbe9e41452d7bec206c47df␟7729523989425218168:${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2: Train note `;let I;return I=$localize`:␟2d47d53c28692824cb52c85ef0eaa36d6e9a8bf1␟2380441863264113042:${"\uFFFD#2\uFFFD"}:START_TAG_TA_ICON_V2:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_TA_ICON_V2: Rental car note `,[["dropdown",""],e,n,l,d,u,h,I,[1,"notes-header"],[1,"notes-header__content"],[1,"notes-header__title"],[1,"notes-header__subtitle"],["class","notes-header__action",4,"ngIf"],["class","notes-list",4,"ngIf"],[1,"notes-header__action"],[1,"notes-dropdown-wrapper",3,"taPopoverOnOpen","taPopoverOnClose","kbdSelect","taPopover","popoverConfig","taKbdListNav"],["kind","outline","size","regular","text",i,"data-testid","Add-a-note-button",1,"notes-dropdown-button",3,"clickEvent"],[1,"notes-dropdown-chevron",3,"icon"],[1,"notes-list"],[3,"noteItem","editNote","deleteNote",4,"ngFor","ngForOf"],[3,"editNote","deleteNote","noteItem"],[1,"notes-dropdown__popover"],["class","notes-dropdown__popover-item","role","button","tabindex","0","taKbdTrigger","","data-testid","General note option",3,"click",4,"ngIf"],["class","notes-dropdown__popover-item","role","button","tabindex","0","taKbdTrigger","","data-testid","Flight note option",3,"click",4,"ngIf"],["class","notes-dropdown__popover-item","role","button","tabindex","0","taKbdTrigger","","data-testid","Hotel note option",3,"click",4,"ngIf"],["class","notes-dropdown__popover-item","role","button","tabindex","0","taKbdTrigger","","data-testid","Train note option",3,"click",4,"ngIf"],["class","notes-dropdown__popover-item","role","button","tabindex","0","taKbdTrigger","","data-testid","Rental car note option",3,"click",4,"ngIf"],["role","button","tabindex","0","taKbdTrigger","","data-testid","General note option",1,"notes-dropdown__popover-item",3,"click"],["icon","notes",1,"notes-dropdown__item-icon"],["role","button","tabindex","0","taKbdTrigger","","data-testid","Flight note option",1,"notes-dropdown__popover-item",3,"click"],["icon","booking-type-flight",1,"notes-dropdown__item-icon"],["role","button","tabindex","0","taKbdTrigger","","data-testid","Hotel note option",1,"notes-dropdown__popover-item",3,"click"],["icon","booking-type-hotel",1,"notes-dropdown__item-icon"],["role","button","tabindex","0","taKbdTrigger","","data-testid","Train note option",1,"notes-dropdown__popover-item",3,"click"],["icon","booking-type-train",1,"notes-dropdown__item-icon"],["role","button","tabindex","0","taKbdTrigger","","data-testid","Rental car note option",1,"notes-dropdown__popover-item",3,"click"],["icon","booking-type-car",1,"notes-dropdown__item-icon"]]},template:function(n,i){n&1&&(r(0,"div",8)(1,"div",9)(2,"h2",10),g(3,1),s(),r(4,"p",11),g(5,2),s()(),p(6,Q0,4,11,"div",12),s(),p(7,J0,2,1,"div",13)(8,af,6,5,"ng-template",null,0,k)),n&2&&(o(6),a("ngIf",!i.hasAllNoteTypes),o(),a("ngIf",i.notes.length))},dependencies:[ie,Ee,K,Z,zo,re,k_,L,_e,mo,Cr],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.notes-header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.notes-header__content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.notes-header__title[_ngcontent-%COMP%]{margin:0;display:flex;align-items:center;font-weight:var(--text-weight-xb);font-size:var(--text-size-xb);line-height:28px}.notes-header__subtitle[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);margin:var(--dim-step1) 0 0 0}.notes-header__action[_ngcontent-%COMP%]{flex-shrink:0}.notes-dropdown-wrapper[_ngcontent-%COMP%]{position:relative}.notes-dropdown__popover[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;flex:1 0 0;align-self:stretch;width:223px;padding:16px 0}.notes-dropdown__popover-item[_ngcontent-%COMP%]{display:flex;align-items:center;align-self:stretch;padding:var(--dim-step4) var(--dim-step4);cursor:pointer;line-height:2;color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;gap:var(--dim-step2)}.notes-dropdown__popover-item[_ngcontent-%COMP%]:hover, .notes-dropdown__popover-item[_ngcontent-%COMP%]:focus{background-color:var(--color-surface-background)}.notes-dropdown__popover-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-border-focus);outline-offset:-2px;box-shadow:inset 0 0 0 3px var(--color-border-inverse)}ta-button-v2.notes-dropdown-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{gap:var(--dim-step1)}.notes-dropdown-chevron[_ngcontent-%COMP%]{margin-left:var(--dim-step1)}.notes-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--dim-step3)}.notes-list[_ngcontent-%COMP%]   ta-item-note[_ngcontent-%COMP%]:not(:first-child)     .note-item{border-top:1px solid var(--Divider-Default, #C7C6D6);background:#fff}"],changeDetection:0})}}return t})();function rf(t,_){if(t&1&&(r(0,"ta-team-event-card",13),m(1,"ta-team-event-details",14),s()),t&2){let e=c(3);a("title",e.eventDetailsTitle),o(),oi("eventNameLabel",e.eventDetailsNameLabel),a("isTeamOffsite",e.isTeamOffsite)}}function sf(t,_){if(t&1&&(r(0,"div"),p(1,rf,2,3,"ta-team-event-card",12),s()),t&2){let e=c(2);o(),a("ngIf",!e.isEventsSettingsDeclutter||e.isTeamOffsite)}}function lf(t,_){t&1&&m(0,"ta-team-event-booking-restrictions",19)}function _f(t,_){if(t&1&&(r(0,"ta-team-event-card",16),m(1,"ta-allowed-booking-verticals",17),p(2,lf,1,0,"ta-team-event-booking-restrictions",18),s()),t&2){let e=c(3);o(),a("disabled",!!e.numberOfParticipants),o(),a("ngIf",e.isExtraGuestAllowedByAccessControl)}}function cf(t,_){if(t&1&&(r(0,"div"),p(1,_f,3,2,"ta-team-event-card",15),s()),t&2){let e=c(2);o(),a("ngIf",!e.isTeamOffsite)}}function df(t,_){if(t&1&&(r(0,"ta-team-event-card",22),m(1,"ta-event-flight-settings",23),s()),t&2){let e=c(3);o(),a("isEditModeDisabled",e.form.disabled)}}function pf(t,_){if(t&1&&(r(0,"ta-team-event-card",24),m(1,"ta-event-hotel-settings",25),s()),t&2){let e=c(3);a("subtitle",e.hotelSettingsCardSubtitle),o(),a("isEditModeDisabled",e.form.disabled)}}function mf(t,_){if(t&1&&(r(0,"div"),p(1,df,2,1,"ta-team-event-card",20)(2,pf,2,2,"ta-team-event-card",21),s()),t&2){let e=c(2);o(),a("ngIf",e.isShowFlightSettings),o(),a("ngIf",e.isShowHotelSettings)}}function Ef(t,_){t&1&&(r(0,"h2",28),g(1,0),s())}function uf(t,_){if(t&1&&(r(0,"div")(1,"div",26),p(2,Ef,2,0,"h2",27),s()()),t&2){let e=c(2);o(2),a("ngIf",e.inIframe)}}function gf(t,_){if(t&1&&(r(0,"div")(1,"ta-team-event-card",29),m(2,"ta-travel-window",30),s()()),t&2){let e=c(2);o(),a("subtitle",e.travelWindowsSubtitle),o(),a("eventDate",e.formEventDates)("checkboxTitle",e.getCheckboxTitle())("checkboxSubTitle",e.getCheckboxSubTitle())}}function ff(t,_){if(t&1&&(r(0,"div")(1,"ta-team-event-card",31)(2,"div",32),m(3,"ta-organiser-notifications",33),s()()()),t&2){let e=c(2);o(),a("title",e.notificationCardTitle)("subtitle",e.notificationCardSubtitle)}}function vf(t,_){if(t&1&&(r(0,"ta-team-event-card",35),m(1,"ta-team-event-policy",36),s()),t&2){let e=c(3);o(),a("formControl",e.policy)}}function Tf(t,_){if(t&1&&(r(0,"div"),p(1,vf,2,1,"ta-team-event-card",34),s()),t&2){let e=c(2);o(),a("ngIf",e.settingsDeclutterDisabledAndTeamIsNotOffsite&&e.isPol
5icyGroupTravelAllowed)}}function Sf(t,_){if(t&1&&(r(0,"ta-team-event-card",38),m(1,"ta-event-approver-type",36),s()),t&2){let e=c(3);o(),a("formControl",e.approver)}}function Pf(t,_){if(t&1&&(r(0,"div"),p(1,Sf,2,1,"ta-team-event-card",37),s()),t&2){let e=c(2);o(),a("ngIf",e.settingsDeclutterDisabledAndTeamIsNotOffsite&&e.isBookingApproverAllowed||e.shouldDisplayBookingApproverSelfSell())}}function Cf(t,_){if(t&1&&(r(0,"ta-team-event-card",40),m(1,"ta-team-event-payment-method-offsite",36),s()),t&2){let e=c(3);o(),a("formControl",e.payment)}}function hf(t,_){if(t&1&&(r(0,"div"),p(1,Cf,2,1,"ta-team-event-card",39),s()),t&2){let e=c(2);o(),a("ngIf",e.isTeamOffsite)}}function Af(t,_){if(t&1&&(r(0,"ta-team-event-card",42),m(1,"ta-team-event-payment-method",36),s()),t&2){let e=c(3);o(),a("formControl",e.payment)}}function Of(t,_){if(t&1&&(r(0,"div"),p(1,Af,2,1,"ta-team-event-card",41),s()),t&2){let e=c(2);o(),a("ngIf",e.settingsDeclutterDisabledAndTeamIsNotOffsite&&e.isPaymentGroupTravelAllowed)}}function Mf(t,_){if(t&1&&(r(0,"div",51),m(1,"ta-reporting-field",52),s()),t&2){let e=c(5);o(),a("formControl",e.legalEntity)("options",e.companyUserFields==null?null:e.companyUserFields.legalEntity)("isEditModeDisabled",e.form.disabled)}}function Nf(t,_){if(t&1&&(r(0,"div",47),m(1,"ta-user-attributes-form",49),p(2,Mf,2,3,"div",50),s()),t&2){let e=c(4);o(),a("formGroup",e.policyAndPaymentView),o(),a("ngIf",!e.isEventsSettingsDeclutter&&e.isShowLegalEntity)}}function Rf(t,_){if(t&1&&(r(0,"div",51),m(1,"ta-reporting-field",57),s()),t&2){let e=c(5);o(),a("formControl",e.legalEntity)("options",e.companyUserFields==null?null:e.companyUserFields.legalEntity)("isEditModeDisabled",e.form.disabled)}}function bf(t,_){if(t&1&&(r(0,"div",51),m(1,"ta-reporting-field",53),s(),r(2,"div",51),m(3,"ta-reporting-field",54),s(),r(4,"div",51),m(5,"ta-reporting-field",55),s(),r(6,"div",51),m(7,"ta-reporting-field",56),s(),p(8,Rf,2,3,"div",50)),t&2){let e=c(4);o(),a("formControl",e.billTo)("label",e.userAttributeLabelByName()[e.UserAttributeName.COST_CENTER])("options",e.companyUserFields==null?null:e.companyUserFields.billTo)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.department)("label",e.userAttributeLabelByName()[e.UserAttributeName.DEPARTMENT])("options",e.companyUserFields==null?null:e.companyUserFields.department)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.region)("label",e.userAttributeLabelByName()[e.UserAttributeName.REGION])("options",e.companyUserFields==null?null:e.companyUserFields.region)("isEditModeDisabled",e.form.disabled),o(2),a("formControl",e.subsidiary)("label",e.userAttributeLabelByName()[e.UserAttributeName.SUBSIDIARY])("options",e.companyUserFields==null?null:e.companyUserFields.subsidiary)("isEditModeDisabled",e.form.disabled),o(),a("ngIf",!e.isEventsSettingsDeclutter&&e.isShowLegalEntity)}}function yf(t,_){if(t&1&&(r(0,"ta-team-event-card",44)(1,"div",45)(2,"div",46),p(3,Nf,3,2,"div",47)(4,bf,9,17),s(),m(5,"ta-team-event-custom-fields",48),s()()),t&2){let e=c(3);o(3),co(e.isTravelCustomUserAttributeEnabled?3:4),o(2),a("formControl",e.customFieldValues)("customFields",e.customFields)("isTeamOffsite",e.isTeamOffsite)}}function If(t,_){if(t&1&&(r(0,"div"),p(1,yf,6,4,"ta-team-event-card",43),s()),t&2){let e=c(2);o(),a("ngIf",e.showReportingSection())}}function xf(t,_){if(t&1&&(r(0,"ta-team-event-card",59)(1,"div",45),m(2,"ta-team-event-custom-fields",48),s()()),t&2){let e=c(3);o(2),a("formControl",e.customFieldValues)("customFields",e.customFields)("isTeamOffsite",e.isTeamOffsite)}}function Ff(t,_){if(t&1&&(r(0,"div"),p(1,xf,3,3,"ta-team-event-card",58),s()),t&2){let e=c(2);o(),a("ngIf",!e.isEventsSettingsDeclutter&&!e.showReportingFields&&e.areCustomFieldsPresent)}}function Lf(t,_){if(t&1&&m(0,"ta-note-control",67),t&2){let e=c(3);a("disabled",e.form.disabled)("invalid",!!e.note.errors)}}function Uf(t,_){if(t&1&&(r(0,"div",70),g(1,3),s()),t&2){let e=c(4);o(),q(e.note.errors==null?null:e.note.errors.emojiPattern),J(1)}}function wf(t,_){t&1&&(r(0,"div",71),g(1,4),s())}function Vf(t,_){if(t&1&&(r(0,"div"),p(1,Uf,2,1,"div",68)(2,wf,2,0,"div",69),s()),t&2){let e=c(3);o(),a("ngIf",e.note.errors==null?null:e.note.errors.emojiPattern),o(),a("ngIf",e.note.errors==null?null:e.note.errors.required)}}function kf(t,_){t&1&&(r(0,"div",71),g(1,5),s())}function Df(t,_){if(t&1&&(r(0,"div"),p(1,kf,2,0,"div",69),s()),t&2){let e=c(4);o(),a("ngIf",e.link.errors==null?null:e.link.errors.urlInvalid)}}function $f(t,_){if(t&1&&(r(0,"div",72)(1,"ta-form-wrap-v2",73),m(2,"input",74),s(),p(3,Df,2,1,"div",9),s()),t&2){let e=c(3);o(),a("label",e.linkLabel)("invalid",!!e.link.errors),o(2),a("ngIf",e.isChecked.value&&e.link.invalid&&(e.link.dirty||e.link.touched))}}function Gf(t,_){if(t&1&&(r(0,"div")(1,"ta-team-event-card")(2,"ta-checkbox-v2",60)(3,"div",61)(4,"span",62),g(5,1),s(),r(6,"div",63),g(7,2),s()()(),r(8,"div",64),p(9,Lf,1,2,"ta-note-control",65)(10,Vf,3,2,"div",9),s(),p(11,$f,4,3,"div",66),s()()),t&2){let e=c(2);o(9),a("ngIf",e.isChecked.value),o(),a("ngIf",e.isChecked.value&&e.note.invali
5d&&(e.note.dirty||e.note.touched)),o(),a("ngIf",e.isChecked==null?null:e.isChecked.value)}}function Bf(t,_){if(t&1&&(r(0,"ta-team-event-card"),m(1,"ta-notes",36),s()),t&2){let e=c(3);o(),a("formControl",e.notes)}}function zf(t,_){if(t&1&&(r(0,"div"),p(1,Bf,2,1,"ta-team-event-card",9),s()),t&2){let e=c(2);o(),a("ngIf",e.isEventsNotePerLobEnabled)}}function Hf(t,_){if(t&1&&(r(0,"ta-team-event-card",76),m(1,"ta-event-recommended-hotels",77),s()),t&2){let e=c(3);o(),a("hotelSearchConfig",e.hotelSearchConfig)("userInfo",e.userInfo)}}function Xf(t,_){if(t&1&&(r(0,"div"),p(1,Hf,2,2,"ta-team-event-card",75),s()),t&2){let e=c(2);o(),a("ngIf",e.hotelSearchConfig&&!e.travelEventQuery.isActiveEventInPast&&(e.travelEventQuery.isActiveEventOffsite||e.isHotelBookingAllowed()))}}function jf(t,_){if(t&1&&(w(0)(1,10),p(2,sf,2,1,"div",11)(3,cf,2,1,"div",11)(4,mf,3,2,"div",11)(5,uf,3,1,"div",11)(6,gf,3,4,"div",11)(7,ff,4,2,"div",11)(8,Tf,2,1,"div",11)(9,Pf,2,1,"div",11)(10,hf,2,1,"div",11)(11,Of,2,1,"div",11)(12,If,2,1,"div",11)(13,Ff,2,1,"div",11)(14,Gf,12,3,"div",11)(15,zf,2,1,"div",11)(16,Xf,2,1,"div",11),U()()),t&2){let e=_.$implicit;o(),a("ngSwitch",e),o(),a("ngSwitchCase","event-details"),o(),a("ngSwitchCase","allowed-bookings"),o(),a("ngSwitchCase","flight-settings"),o(),a("ngSwitchCase","booking-settings-header"),o(),a("ngSwitchCase","travel-windows"),o(),a("ngSwitchCase","notifications"),o(),a("ngSwitchCase","policy"),o(),a("ngSwitchCase","approver-type"),o(),a("ngSwitchCase","payment-method-offsite"),o(),a("ngSwitchCase","payment-method"),o(),a("ngSwitchCase","reporting-settings"),o(),a("ngSwitchCase","company-required-fields"),o(),a("ngSwitchCase","note-mandatory-split"),o(),a("ngSwitchCase","new-participant-notes"),o(),a("ngSwitchCase","recommended-hotels")}}function Yf(t,_){t&1&&m(0,"ta-team-event-delete")}var $_=(()=>{class t{get formEventName(){return this.formEventDetails?.eventName}get formEvenLocation(){return this.formEventDetails?.location}get formEventDates(){return this.formEventDetails?.range}get recommendedAirport(){return this.formEventFlightSettings.recommendedAirport?this.formEventFlightSettings.recommendedAirport[0]:""}get isExtraGuestAllowed(){return this.formEventBookingRestrictions.extraGuestAllowed}get whenToNotifyRulesControl(){return this.form.get("whenToNotifyRules")}get areCustomFieldsPresent(){return!!(this.customFields||[]).filter(e=>e.name!=="tripName").length}get showReportingFields(){return!this.isTeamOffsite||this.isTeamOffsiteClaimedAdmin}get note(){return this.form.get("note")}get notes(){return this.form.get("notes")}get isFormValid(){let e=this.form.get("settings.eventFlightSettings");return this.form.valid&&!e?.errors?.noFlightTypeSelected}get link(){return this.form.get("link")}get isChecked(){return this.form.get("isChecked")}get formEventDetailsControl(){return this.form.get("details")}get formEventDetails(){return this.formEventDetailsControl.value}get formEventBookingRestrictionsControl(){return this.form.get("bookingRestrictions")}get formEventBookingRestrictions(){return this.formEventBookingRestrictionsControl.value}get formTravelWindowsFormControl(){return this.form.get("travelWindows")}get formEventTravelWindows(){return this.formTravelWindowsFormControl.value.travelDate}get formEventFlightSettingsControl(){return this.form.get("eventFlightSettings")}get formEventFlightSettings(){return this.formEventFlightSettingsControl.value}get policyAndPaymentView(){return this.form.get("policyAndPaymentView")}get policy(){return this.policyAndPaymentView.get("policy")}get approver(){return this.policyAndPaymentView.get("approver")}get payment(){return this.policyAndPaymentView.get("payment")}get billTo(){return this.policyAndPaymentView.get("billTo")}get department(){return this.policyAndPaymentView.get("department")}get region(){return this.policyAndPaymentView.get("region")}get subsidiary(){return this.policyAndPaymentView.get("subsidiary")}get legalEntity(){return this.policyAndPaymentView.get("legalEntity")}get customFieldValues(){return this.policyAndPaymentView.get("customFieldValues")}get travelWindows(){return{from:this.formEventTravelWindows.from,to:this.formEventTravelWindows.to}}get eventDetailsTitle(){return $localize`Event details`}get eventDetailsNameLabel(){return $localize`Event name`}get notificationCardTitle(){return this.isTeamOffsite?$localize`Notifications`:$localize`Booking notifications`}get settingsDeclutterDisabledAndTeamIsNotOffsite(){return!this.isEventsSettingsDeclutter&&!this.isTeamOffsite}get hotelSettingsCardSubtitle(){return this.isBoomPopEvent?$localize`Since this event has a room block, these settings only apply to hotels enabled for individual attendees.`:""}get notificationCardSubtitle(){return this.isTeamOffsite?$localize`Control which group travel-related notifications you receive.`:$localize`Set your notification preferences (we’ll notify you about out-of-policy bookings by default).`}
5get isShowHotelSettings(){return!this.isTeamOffsite}isSettingsDeclutterDisabledOrTeamOffsite(){return!this.isEventsSettingsDeclutter||this.isTeamOffsite}getCheckboxTitle(){return this.isSettingsDeclutterDisabledOrTeamOffsite()?this.checkboxTitleLabel:this.checkboxTitleSettingsDeclutterLabel}getCheckboxSubTitle(){return this.isSettingsDeclutterDisabledOrTeamOffsite()?this.checkboxSubTitleLabel:this.checkboxSubTitleSettingsDeclutterLabel}constructor(e,n,i,l,d,u,h,I){this.fb=e,this.elRef=n,this.groupTravelUtilService=i,this.cdRef=l,this.travelEventQuery=d,this.splitSvc=u,this.growthService=h,this.userFieldsService=I,this.isTeamOffsite=!1,this.isTeamOffsiteClaimedAdmin=!1,this.isBoomPopEvent=!1,this.isExtraGuestAllowedByAccessControl=!1,this.isActiveEventOffsite=ui(this.travelEventQuery.isActiveEventOffsite$,{initialValue:!1}),this.showReportingSection=Ia(()=>{let F=this.travelEventQuery.shouldShowTeamOffsiteUI();return!this.isEventsSettingsDeclutter&&!F||F&&this.showReportingFields}),this.travelWindowsSubtitle=$localize`Define what days participants can travel and what time you'd like them to arrive and return.`,this.isShowLegalEntity=this.splitSvc.isOn("COST_FIELDS_ADD_LEGAL_ENTITY"),this.isPaymentGroupTravelAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_PAYMENT_SELECTION"),this.isPolicyGroupTravelAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_POLICY_SELECTION"),this.isBookingApproverAllowed=this.splitSvc.isOn("ENT_GROUP_TRAVEL_APPROVER_SELECTION"),this.isBookingApproverAllowedSelfSell=this.splitSvc.isOn("ENT_GROUP_TRAVEL_APPROVER_SELECTION_SELF_SELL"),this.isShowFlightSettings=this.splitSvc.isOn("ENT_EVENT_RECOMMENDED_AIRPORT"),this.isEventsSettingsDeclutter=this.splitSvc.isOn("EVENTS_SETTINGS_DECLUTTER_ENABLED"),this.isEventsNotePerLobEnabled=this.splitSvc.isOn("ENT_EVENTS_NOTE_PER_LOB"),this.isTravelCustomUserAttributeEnabled=this.splitSvc.isOn("TRAVEL_CUSTOM_USER_ATTRIBUTE"),this.shouldDisplayBookingApproverSelfSell=Ia(()=>{let F=this.travelEventQuery.isActiveEventOffsiteSignal(),$=this.travelEventQuery.userInfoSignal(),W=this.growthService.isAdminClaimedWithoutAffiliate($)?F:$&&this.growthService.isAdminClaimed($);return this.isBookingApproverAllowed&&this.isBookingApproverAllowedSelfSell&&W}),this.form=this.fb.group({details:[],allowedBookingVerticals:[{value:null,disabled:!1}],bookingRestrictions:[],travelWindows:[],whenToNotifyRules:[],note:["",yi.noEmojiPattern],notes:[],link:[""],isChecked:[],policyAndPaymentView:this.fb.group({policy:[],approver:[],billTo:[""],department:[""],region:[""],subsidiary:[""],legalEntity:[""],customFieldValues:[],payment:[],hrAttributeValues:[[]]}),eventFlightSettings:[],eventHotelSettings:[],recommendedHotels:[]}),this.linkLabel="URL for 'Learn more' link (optional)",this.checkboxTitleLabel=$localize`Set different hotel dates`,this.checkboxTitleSettingsDeclutterLabel=$localize`Set company-paid accommodation dates`,this.checkboxSubTitleLabel=$localize`Specify hotel-only dates to notify participants of the company-provided hotel dates. This will be visible to all participants, even if they’re not allowed to book a hotel on Navan.`,this.checkboxSubTitleSettingsDeclutterLabel=$localize`Show participants when accommodations are paid by the company, even if not booked on Navan.`,this.inIframe=Ke(),this.UserAttributeName=Ki,this.userAttributeLabelByName=this.userFieldsService.userAttributeLabelByName,this.onTouch=()=>{},this.onChange=()=>{}}ngOnChanges(e){e.numberOfParticipants&&this.toggleAllowedBookingVerticalsControl()}ngOnInit(){this.subscribeToValueChanges(),this.setupFieldValidations(),this.updateSettingsOrder()}updateSettingsOrder(){this.isEventsSettingsDeclutter&&!this.isTeamOffsite?this.settingsOrder=["event-details","booking-settings-header","travel-windows","allowed-bookings","flight-settings","notifications","policy","approver-type","payment-method","payment-method-offsite","reporting-settings","company-required-fields","participant-notes",...this.isEventsNotePerLobEnabled?["new-participant-notes"]:["note-mandatory-split"],"recommended-hotels","delete"]:this.settingsOrder=["event-details","allowed-bookings","flight-settings","travel-windows","notifications","policy",...this.shouldDisplayBookingApproverSelfSell()?["approver-type"]:[],"payment-method","payment-method-offsite","reporting-settings","company-required-fields","participant-notes",...this.isEventsNotePerLobEnabled?["new-participant-notes"]:["note-mandatory-split"],"recommended-hotels","delete"]}ngAfterViewInit(){setTimeout(()=>{this.toggleAllowedBookingVerticalsControl(),this.cdRef.detectChanges()})}setupFieldValidations(){this.isChecked.valueChanges.pipe(ii(this.isChecked.value),ft(this.elRef)).subscribe(e=>{e?(this.setNoteValidators(),this.setLinkValidators()):(this.clearNoteV
5alidators(),this.clearLinkValidators()),this.note.markAsTouched(),this.link.markAsTouched()})}isFlightBookingAllowed(){return!!this.form.get("allowedBookingVerticals")?.getRawValue()?.FLIGHT}isHotelBookingAllowed(){return!!this.form.get("allowedBookingVerticals")?.getRawValue()?.HOTEL}setNoteValidators(){if(this.isEventsNotePerLobEnabled&&!this.note.value){this.note.clearValidators(),this.note.updateValueAndValidity();return}this.note.setValidators([ct.required,yi.notEmpty,yi.noEmojiPattern]),this.note.updateValueAndValidity()}clearNoteValidators(){this.note.setValidators([yi.noEmojiPattern]),this.note.updateValueAndValidity()}setLinkValidators(){this.link.setValidators([yi.requiredUrl]),this.link.updateValueAndValidity()}clearLinkValidators(){this.link.clearValidators(),this.link.updateValueAndValidity()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouch=e}writeValue(e){e&&(this.form.patchValue(e),this.toggleAllowedBookingVerticalsControl(),this.cdRef.markForCheck())}validate(){return this.form.invalid?{invalid:!0}:null}setDisabledState(e){e?this.form.disable():this.form.enable()}subscribeToValueChanges(){this.form.valueChanges.pipe(ft(this.elRef)).subscribe(()=>{this.onChange(this.form.getRawValue())}),this.formEventDetailsControl.valueChanges.pipe(ft(this.elRef),ee(e=>!!e),Be(e=>this.setHotelSearchConfig(e)),In(1)).subscribe(()=>this.cdRef.detectChanges())}toggleAllowedBookingVerticalsControl(){let e=this.form.get("allowedBookingVerticals");if(!e)return;let n=this.numberOfParticipants>0||this.form.disabled;n!==e.disabled&&(n?e.disable({emitEvent:!1}):e.enable({emitEvent:!1}),this.cdRef.markForCheck())}setHotelSearchConfig(e){let n=e.location,i=e.range,l=We.format(new Date(i.from),"yyyy-MM-dd"),d=We.format(new Date(i.to),"yyyy-MM-dd")===l?We.format(We.addDays(new Date(i.to),1),"yyyy-MM-dd"):We.format(new Date(i.to),"yyyy-MM-dd");this.hotelSearchConfig=n?{placeId:n.placeId,description:n.description,checkInDate:l,checkOutDate:d,numberOfRooms:1,numberOfGuests:1,emptyData:!1,prefetchRooms:!1,travelerUuids:[],teamEventConfig:{startDateTime:this.groupTravelUtilService.dateToBackendFormat(i.from),endDateTime:this.groupTravelUtilService.dateToBackendFormat(i.to),location:n.location,eventName:this.formEventName}}:void 0}static{this.\u0275fac=function(n){return new(n||t)(T(qe),T(it),T(nn),T($e),T(ve),T(Ce),T(en),T(xi))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event-settings"]],inputs:{isTeamOffsite:"isTeamOffsite",isTeamOffsiteClaimedAdmin:"isTeamOffsiteClaimedAdmin",isBoomPopEvent:"isBoomPopEvent",isExtraGuestAllowedByAccessControl:"isExtraGuestAllowedByAccessControl",numberOfParticipants:"numberOfParticipants",companyUserFields:"companyUserFields",customFields:"customFields",userInfo:"userInfo"},standalone:!0,features:[fe([{provide:Ve,useExisting:ht(()=>t),multi:!0},{provide:Et,useExisting:t,multi:!0}]),At,y],decls:4,vars:3,consts:()=>{let e;e=$localize`:␟c3bcb609adf9d2472c1c1a399e27790d09bbf6df␟5093503871431721271:Allowed bookings`;let n;n=$localize`:␟647fc87d4c0934cef4894c43d21830e38ecf82ab␟1045803388954455553:Flight settings`;let i;i=$localize`:␟68c4f7e022158e6756c7ee0900fd0c63898b45c5␟787184328142591145:Hotel settings`;let l;l=$localize`:␟44fa45a2aa7bd1bc319f8e5c729ce6e15845acaf␟3077424722557884144: Booking settings `;let d;d=$localize`:␟3c07e5e58c7bbee297e17e309c3afc0fe0a07f64␟4340709795296183385:Travel windows`;let u;u=$localize`:␟81984035ddcbc0c4cf205b103c9e0a100be3765b␟1690636272435370777:Policy`;let h;h=$localize`:␟eecf1b17fffe5de8c0d3493e2bfd0025e0f2e64d␟6496118940712020254:Booking approvals`;let I;I=$localize`:␟f618cebebc08b6a12af1f9034bddf157ac3ef5e4␟5722353260643724736:Payment method`;let F;F=$localize`:␟817aa338a4a232512e70ce0277e5750181dcd715␟9001434970933102657:Select how you want participants to pay for their travel.`;let $;$=$localize`:␟f618cebebc08b6a12af1f9034bddf157ac3ef5e4␟5722353260643724736:Payment method`;let ge;ge=$localize`:␟f9b0699633beca8b908623ba443beb317912e82a␟5958866670336586465:Reporting settings`;let W;W=$localize`:␟42e720561f4a8a5cc791bfd73b92b4ca452b50e8␟3714020147434423697:Let us know how the cost and data for your event should be allocated on company reporting.`;let oe;oe=$localize`:␟1fc1c62f9ed4fed1baacca0740bfeb8ca9ccb655␟7741543205162691628:Legal entity`;let Ie;
5Ie=$localize`:␟2282de02308a6afd72c3924776a213f0f2f84f92␟2921233273661446199:Reports will be based on this event's participant data, unless you specify a legal entity.`;let ae;ae=$localize`:␟439a060df630657d1a4bd2f315fc00426fd0abda␟5093756816437767537:Reports will be based on this event's participant data, unless you specify a cost center.`;let It;It=$localize`:␟0245b0ff857cf8956947e448804f5c258cd0cd1f␟6269978346440266466:Reports will be based on this event's participant data, unless you specify a department.`;let Le;Le=$localize`:␟0ef388cba7719e491c58d7abcd3b5905b74eb793␟8919669294488122796:Reports will be based on this event's participant data, unless you specify a region.`;let _n;_n=$localize`:␟f043eee5573a11a1524f00e6589fe445c708bec8␟7323484543612626589:Reports will be based on this event's participant data, unless you specify a subsidiary.`;let cn;cn=$localize`:␟1fc1c62f9ed4fed1baacca0740bfeb8ca9ccb655␟7741543205162691628:Legal entity`;let ke;ke=$localize`:␟2282de02308a6afd72c3924776a213f0f2f84f92␟2921233273661446199:Reports will be based on this event's participant data, unless you specify a legal entity.`;let Rn;Rn=$localize`:␟4006e6e4387d796bd603dd219f540c8b3c796a99␟8894271275633172073:Company required Fields`;let bn;bn=$localize`:␟1e03e781f7589e828718720dcb83ad721bb130f6␟1770687049384197175:Let us know how the company required fields should be set for all bookings.`;let qn;qn=$localize`:␟fdd2c50330d32e977032e074c3a60a4b1d0a6025␟6687364589976569113:Add a note for participants `;let Jn;Jn=$localize`:␟652d22c0e3bffd5a3e15710ff09b0910be065352␟3126511531185899970: Visible on the participant's invitation page and email invite. `;let Zn;Zn=$localize`:␟c2bd51077cb22b0df999ab2eeaab6d1566d4fbb5␟886853680580382357: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ei;ei=$localize`:␟8cebb218435d6dbc94fbd7841c36a6097f4dd4c9␟1399199016854871098: Note is required once added `;let ti;ti=$localize`:␟10f8e50033b63cc7423776f69c15ee4e7d3d09bc␟5163362445793732171:custom field input`;let ni;ni=$localize`:␟2d31eee8ad3e5a741db50b166839f46f63958ccb␟7498627448412767676: Provide a valid url `;let Oe;Oe=$localize`:␟d92b1a5bfab0611ca5b1c6f905baa73759fbc344␟1248782757644411048:Recommended hotels (optional)`;let Yi;return Yi=$localize`:␟0cbfb8fe78b065f5a8edc91e0e3520303ed7a979␟873460009750050048:Participants booking their own hotels will see your recommendations on their invite.`,[l,qn,Jn,Zn,ei,ni,[1,"event-settings",3,"formGroup"],[4,"ngFor","ngForOf"],[1,"event-card-container","delete"],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],["id","event-details",3,"title",4,"ngIf"],["id","event-details",3,"title"],["formControlName","details",3,"isTeamOffsite","eventNameLabel"],["title",e,"class","allowed-bookings-card",4,"ngIf"],["title",e,1,"allowed-bookings-card"],["formControlName","allowedBookingVerticals","data-testid","allowedVerticalsGroup",3,"disabled"],["formControlName","bookingRestrictions",4,"ngIf"],["formControlName","bookingRestrictions"],["title",n,4,"ngIf"],["title",i,3,"subtitle",4,"ngIf"],["title",n],["formControlName","eventFlightSettings",3,"isEditModeDisabled"],["title",i,3,"subtitle"],["formControlName","eventHotelSettings",3,"isEditModeDisabled"],[1,"event-settings__header"],["class","event-settings__header__title",4,"ngIf"],[1,"event-settings__header__title"],["title",d,3,"subtitle"],["formControlName","travelWindows",3,"eventDate","checkboxTitle","checkboxSubTitle"],[3,"title","subtitle"],[1,"booking-control-settings"],["formControlName","whenToNotifyRules"],["title",u,4,"ngIf"],["title",u],[3,"formControl"],["title",h,4,"ngIf"],["title",h],["title",I,"subtitle",F,4,"ngIf"],["title",I,"subtitle",F],["title",$,4,"ngIf"],["title",$],["title",ge,"subtitle",W,4,"ngIf"],["title",ge,"subtitle",W],[1,"event-settings__reporting"],[1,"event-settings__section--flex"],[1,"user-attributes-wrapper"],[3,"formControl","customFields","isTeamOffsite"],[3,"formGroup"],["class","event-settings__flex-item",4,"ngIf"],[1,"event-settings__flex-item"],["label",oe,"tooltip",Ie,3,"formControl","options","isEditModeDisabled"],["tooltip",ae,3,"formControl","label","options","isEditModeDisabled"],["tooltip",It,3,"formControl","label","options","isEditModeDisabled"],["tooltip",Le,3,"formControl","label","options","isEditModeDisabled"],["tooltip",_n,3,"formControl","label","options","isEditModeDisabled"],["label",cn,"tooltip",ke,3,"formControl","options","isEditModeDisabled"],["title",Rn,"subtitle",bn,4,"ngIf"],["title",Rn,"subtitle",bn],["formControlName","isChecked"],[1,"wrapper"],[1,"checkbox-content"],[1,"additional-text"],[1,"note-container"],["formControlName","note",3,"disabled","invali
5d",4,"ngIf"],["class","url",4,"ngIf"],["formControlName","note",3,"disabled","invalid"],["class","event-settings__error-text",4,"ngIf"],["class","error-text",4,"ngIf"],[1,"event-settings__error-text"],[1,"error-text"],[1,"url"],["size","large",3,"label","invalid"],["formControlName","link","taInputV2","","type","url","aria-label",ti],["class","event-settings__recommended","title",Oe,"subtitle",Yi,4,"ngIf"],["title",Oe,"subtitle",Yi,1,"event-settings__recommended"],["formControlName","recommendedHotels",3,"hotelSearchConfig","userInfo"]]},template:function(n,i){n&1&&(r(0,"div",6),p(1,jf,17,16,"ng-container",7),r(2,"div",8),p(3,Yf,1,0,"ta-team-event-delete",9),s()()),n&2&&(a("formGroup",i.form),o(),a("ngForOf",i.settingsOrder),o(2),a("ngIf",!i.isEventsSettingsDeclutter||i.isTeamOffsite))},dependencies:[je,Wt,Me,Xe,he,wt,Ge,Qe,_e,Xt,jt,L,Kn,El,Ml,Tl,U_,w_,Il,kl,Na,Oa,fl,Ma,fa,Ta,yl,ie,bo,Ro,Qt,gn,K,Pi,xo,C_,Vl,D_,ia],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-settings[_ngcontent-%COMP%]{display:block;width:100%;margin:0 auto}.event-settings__header[_ngcontent-%COMP%]{justify-content:space-between;align-items:center;display:flex;margin-bottom:32px}.event-settings__header__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start;line-height:36px;margin:var(--dim-step2) 0 var(--dim-step6) 0}.event-settings__section[_ngcontent-%COMP%]{display:block;margin-bottom:var(--dim-step7)}.event-settings__section[_ngcontent-%COMP%]:last-child{margin-bottom:0}.event-settings__section[_ngcontent-%COMP%]   .event-form-wrap[_ngcontent-%COMP%]{width:100%;display:block}.event-settings__section__return-flight-checkbox[_ngcontent-%COMP%]{margin-left:6px}.event-settings__section--flex[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;flex-wrap:wrap}.event-settings__section--note[_ngcontent-%COMP%]{margin-top:var(--dim-step8)}.event-settings__flex-item[_ngcontent-%COMP%]{width:100%;display:block;margin-right:var(--dim-step6)}.event-settings__flex-item[_ngcontent-%COMP%]:last-child{margin-right:0}.event-settings__date-wrapper[_ngcontent-%COMP%]   .date-trigger[_ngcontent-%COMP%]{display:block}.event-settings__date-wrapper[_ngcontent-%COMP%]   .date-trigger[_ngcontent-%COMP%]:first-child{margin-bottom:var(--dim-step5)}.event-settings__date-wrapper[_ngcontent-%COMP%]   .event-time[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle)}.event-settings__error-text[_ngcontent-%COMP%]{color:var(--ta-color-text-warning);font-size:var(--text-size-xs);font-weight:var(--text-weight-regular);text-align:start;display:block}.event-settings__reporting[_ngcontent-%COMP%]{border-radius:8px;background:var(--ta-color-surface-default);padding:0}.event-settings__reporting[_ngcontent-%COMP%]   .event-settings__section--flex[_ngcontent-%COMP%]{flex-direction:row}.event-settings__reporting[_ngcontent-%COMP%]   .event-settings__flex-item[_ngcontent-%COMP%]{margin-right:var(--dim-step6);width:calc(50% - var(--dim-step3))}.event-settings__reporting[_ngcontent-%COMP%]   .event-settings__flex-item[_ngcontent-%COMP%]:nth-child(2n){margin-right:0}.event-settings__reporting[_ngcontent-%COMP%]   .user-attributes-wrapper[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--dim-step6, 24px);width:100%}.event-settings__reporting[_ngcontent-%COMP%]   .user-attributes-wrapper[_ngcontent-%COMP%]   .event-settings__flex-item[_ngcontent-%COMP%]{width:100%;margin-right:0}.note[_ngcontent-%COMP%]{background:var(--ta-color-surface-default);border-radius:8px;padding:var(--dim-step5)}.note__padding[_ngcontent-%COMP%]{padding-right:10px}.card-title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-bold);text-align:start;display:flex;margin-bottom:var(--dim-step5)}.card-title__icon-container[_ngcontent-%COMP%]{display:flex;margin-right:var(--dim-step1)}.card-title__icon[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.card-title__label[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-bold);text-align:start;margin-bottom:var(--dim-step5)}.card-title__subtext[_ngcontent-%COMP%]{color:var(--ta-color-text-subtle);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;margin-bottom:var(--dim-step5)}.card-title-button[_ngcontent-%COMP%]{justify-content:space-between;
5height:30px;align-items:center}.error-text[_ngcontent-%COMP%]{color:#d6293a;font-size:12px;margin-bottom:15px;margin-top:-20px}.ta-checkbox__input[_ngcontent-%COMP%]{margin-left:0;padding-left:0}.url[_ngcontent-%COMP%], .note-container[_ngcontent-%COMP%]{margin-left:32px;margin-top:20px}.wrapper[_ngcontent-%COMP%]{display:inline-block;margin-top:15px}.checkbox-content[_ngcontent-%COMP%]{color:var(--Text-Default, #131316);font-size:16px;font-style:normal;font-weight:400;line-height:24px}.additional-text[_ngcontent-%COMP%]{color:var(--Text-Subtle, #68687d);font-size:14px;font-style:normal;font-weight:400;line-height:20px}ta-notes[_ngcontent-%COMP%]{margin-left:auto}"],changeDetection:0})}}return t})();E();var Wf=[{label:$localize`Participants`,id:"participants",joyrideStep:"group-travel-participants-tab"},{label:$localize`Room block`,id:"roomBlocks",joyrideStep:"group-travel-room-block-tab"},{label:$localize`Settings`,id:"settings",joyrideStep:"group-travel-settings-tab"}],Kf=t=>Wf.find(_=>_.id===t),G_=t=>{let _=[];return t.forEach(e=>{_.push(Kf(e))}),_};E();E();be();var B_=(()=>{class t{constructor(e,n){this.apiService=e,this.newSurveyService=n,this.surveyTopic=$localize`creating this event`,this.surveyType="EVENTS_CSAT"}canShow(){return this.apiService.get(La.LIQUID_CAN_SHOW_EVENTS_USER_SURVEY("CSAT","EVENTS_SEND_INVITES")).pipe(ee(e=>e))}open(){return new Za(e=>{this.canShow().pipe(ee(n=>n)).subscribe(()=>{N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_CSAT}),this.newSurveyService.open({surveyTopic:this.surveyTopic,surveyType:this.surveyType,submit:({score:n,comment:i})=>{this.submit(n,i).subscribe()},close:(n,i)=>{this.close(n,i,e)}})})})}submit(e,n=""){let i={surveyType:"CSAT",score:e,comment:n,featureType:"EVENTS_SEND_INVITES"};return i.score>-1&&N(z.EVENTS_CSAT_SUBMITTED,{[x.VIEW]:H.EVENT_CSAT,[x.TEXT_SUBMITTED]:!!i.comment}),this.apiService.post(La.LIQUID_SUBMIT_EVENTS_USER_SURVEY(),{body:i})}close(e,n=!1,i){!e&&!n&&(this.submit(-1).subscribe(),N(z.EVENTS_CSAT_SKIPPED,{[x.VIEW]:H.EVENT_CSAT})),i.complete()}static{this.\u0275fac=function(n){return new(n||t)(xe(Ts),xe(Ws))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();E();be();E();var z_=[{id:"group-travel-settings-tab",name:"group event settings",title:$localize`Choose your event settings`,description:$localize`Set participant arrival and departure times, recommend hotels, select payment methods, add notes, and more.`,nextButtonText:$localize`Next`,stepPosition:"right"},{id:"group-travel-participants-tab",name:"group event participants",title:$localize`Create your participant list`,description:$localize`Add participants and set their allowed booking types. You’ll see estimated booking costs, and your event will stay private until you send invites.`,nextButtonText:$localize`Next`,stepPosition:"right"},{id:"group-travel-room-block-tab",name:"group event room blocks",title:$localize`Simplify stays with a room block`,description:$localize`Book up to 9 rooms at the same hotel and lock in the same rate for all participants.`,nextButtonText:$localize`Next`,stepPosition:"right"},{id:"group-travel-send-invites",name:"group event send invites",title:$localize`Share your event with participants`,description:$localize`Once your event is set up, you’re ready to send invites. We recommend sending them early so participants can save by booking their travel in advance.`,nextButtonText:$localize`Done`,stepPosition:"bottom"}];var H_=(()=>{class t{static{this.GROUP_TRAVEL_TOUR_GUIDE_DISPLAYED="group-travel-tour-guide-displayed"}constructor(e,n,i){this.usersDataService=e,this.tourGuideService=n,this.destroyRef=i,this.tourGuideEnded$=new rt(!1)}startGroupTravelTourGuide(){this.tourGuideEnded$.next(!1),so(2e3).pipe(ut(this.destroyRef),ue(()=>this.usersDataService.getComponentState(t.GROUP_TRAVEL_TOUR_GUIDE_DISPLAYED)),ee(e=>e!=="true"),ue(()=>(this.tourGuideService.startTourGuideSteps(z_,fi,"group travel general layout"),this.tourGuideEnded$)),ee(Boolean),Be(()=>{N(gi.TOUR_GUIDE_CLOSED,{context:"group travel general layout"}),this.terminateTourGuide()}),ue(()=>this.usersDataService.updateComponent(t.GROUP_TRAVEL_TOUR_GUIDE_DISPLAYED,"true"))).subscribe(),this.tourGuideBroadcast=new BroadcastChannel("tour-guide-channel"),this.tourGuideBroadcast.onmessage=({data:e})=>{e.type==="end-tour-guide"&&e.currentStepId==="group-travel-send-invites"&&this.tourGuideEnded$.next(!0)}}terminateTourGuide(){this.tourGuideBroadcast?.close(),this.tourGuideService.terminateTourGuide()}static{this.\u0275fac=function(n){return new(n||t)(xe(zn),xe(ko),xe(Lt))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ev=["eventUsersMonitoring"],tv=["teamEventTabs"],nv=["settingsComponent"],iv=["policyPaymentComponent"],ov=t=>({"search-form-team--save-toaster":t}),X_=t=>({"hidden-tab":t}),j_=(t,_)=>({"hidden-tab":t,"settings-two-columns":_});function av(t,_){if(t&1){let e=O();w(0),r(1,"ta-team-event-header",30),P(2,"async"),S("sendInvitesClick",function(){f(e);let i=c(3);return v(i.sendInvites())}),s(),U()}if(t&2){let e=c(3);o(),a("showSendInvites",A(2,7,e.showSendInvites$))("disableSendInvites",e.disableSendInvites)("hasRoomBlocks",e.hasRoomBlocks)("teamEventRoomBlocksEnabled",e.teamEventRoomBlocksEnabled)("activeTab",e.activeTab)("isOffsite",e.isOffsite)("isSelfSellGroupTravelOnboardingEnabled",e.isSelfSellGroupTravelOnboardingEnabled)}}function rv(t,_){if(t&1){let e=O();r(0,"ta-team-event-header-form",31),P(1,"async"),P(2,"async"),S("sendInvitesClick",function(){f(e);let i=c(3);return v(i.sendInvites())})("eventUpdated",function(i){f(e);let l=c(3);return v(l.updateForm(i))}),s()}if(t&2){let e=c(3);a("eventDetails",e.form.value.settings.details)("showSendInvites",A(1,8,e.showSendInvites$))("disableSendInvites",e.disableSendInvites)("hasRoomBlocks",e.hasRoomBlocks)("teamEventRoomBlocksEnabled",e.teamEventRoomBlocksEnabled)("isEditModeDisabled",A(2,10,e.travelEventQuery.isActiveEventDisabled$))("activeTab",e.activeTab)("isOffsite",e.isOffsite)}}function sv(t,_){if(t&1){let e=O();r(0,"ta-team-event-card")(1,"ta-event-details-approval",32),P(2,"async"),S("declineProposal",function(){f(e);let i=c(3);return v(i.onDeclineProposal())})("approveProposal",function(){f(e);let i=c(3);return v(i.onApproveProposal())}),s()()}if(t&2){let e=c(3);o(),a("requesterNote",A(2,1,e.travelEventQuery.proposalNote$))}}function lv(t,_){if(t&1){let e=O();r(0,"ta-team-event-card")(1,"ta-team-event-control-panel",33),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),P(6,"async"),P(7,"async"),P(8,"async"),S("scrollToDetail
5s",function(){f(e);let i=c(3);return v(i.scrollToDetails())})("openAddParticipantsModal",function(){f(e);let i=c(3);return v(i.switchToParticipantsAndOpenModal())})("sendInvites",function(){f(e);let i=c(3);return v(i.sendInvites())})("requestApproval",function(){f(e);let i=c(3);return v(i.onRequestApproval())}),s()()}if(t&2){let e=c(3);o(),a("isValid",e.form.valid&&e.isFormValid&&!e.form.dirty)("numberOfParticipants",A(2,9,e.travelEventInvitationsQuery.totalInvitations$))("tagData",e.groupTravelUtilService.getEventProposalStatusTagData())("isApprovalRequestedAtLeastOnce",A(3,11,e.travelEventQuery.isApprovalRequestedAtLeastOnce$))("proposalStatus",A(4,13,e.travelEventQuery.proposalStatus$))("approverName",A(5,15,e.travelEventQuery.proposalApproverFullName$))("approveDate",A(6,17,e.travelEventQuery.proposalDateModified$))("approverNote",A(7,19,e.travelEventQuery.proposalNote$))("isSaving",A(8,21,e.travelEventQuery.isSaving$))}}function _v(t,_){if(t&1){let e=O();r(0,"ta-team-event-card")(1,"ta-team-offsite-steps",34),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),S("scrollToDetails",function(){f(e);let i=c(3);return v(i.scrollToDetails())})("openAddParticipantsModal",function(){f(e);let i=c(3);return v(i.switchToParticipantsAndOpenModal())})("openPolicyAndPayments",function(){f(e);let i=c(3);return v(i.switchToPolicyAndPayments())})("openAccommodations",function(){f(e);let i=c(3);return v(i.switchToAccommodations())})("sendInvites",function(){f(e);let i=c(3);return v(i.sendInvites())}),s()()}if(t&2){let e=c(3);o(),a("isValid",e.form.valid&&e.isFormValid&&!e.form.dirty)("isTeamOffsite",A(2,10,e.isOffsite$))("isPendingSave",e.form.dirty)("isSaving",A(3,12,e.travelEventQuery.isSaving$))("teamOffsiteStep",A(4,14,e.groupTravelStoreFacadeService.teamOffsiteStep$))("canSendInvites",A(5,16,e.travelEventQuery.canDirectlyActivate$))("hasRoomBlocks",e.hasRoomBlocks)("activeTab",e.activeTab)("activateSendInvitesWhenFiltersApplied",e.activateSendInvitesWhenFiltersApplied)("isTravelEventRoomBlockEnabled",e.isTravelEventRoomBlockEnabled)}}function cv(t,_){t&1&&(r(0,"span"),C(1,",\xA0"),s())}function dv(t,_){if(t&1){let e=O();r(0,"span")(1,"a",39),S("click",function(){let i=f(e).$implicit,l=c(5);return v(l.trackRequestSendInvitesAccess(i.email))}),C(2),s(),p(3,cv,2,0,"span",12),s()}if(t&2){let e=_.$implicit,n=_.last;o(2),dn("",e.givenName," ",e.familyName,""),o(),a("ngIf",!n)}}function pv(t,_){if(t&1&&(r(0,"div")(1,"span"),g(2,6),s(),p(3,dv,4,3,"span",38),P(4,"async"),s()),t&2){let e=c(4);o(3),a("ngForOf",A(4,1,e.travelEventQuery.adminsList$))}}function mv(t,_){t&1&&(r(0,"div"),g(1,7),s())}function Ev(t,_){if(t&1&&(r(0,"div")(1,"ta-notification-banner",35)(2,"span",36),g(3,4),s(),r(4,"span",37),p(5,pv,5,3,"div",12),P(6,"async"),p(7,mv,2,0,"div",12),P(8,"async"),r(9,"div")(10,"span"),g(11,5),s()()()()()),t&2){let e=c(3);o(),a("showClose",!1),o(4),a("ngIf",A(6,3,e.showNamedAdminList$)),o(2),a("ngIf",!A(8,5,e.showNamedAdminList$))}}function uv(t,_){if(t&1&&(r(0,"section"),p(1,av,3,9,"ng-container",29),P(2,"async"),p(3,rv,3,12,"ng-template",null,0,k)(5,sv,3,3,"ta-team-event-card",12),P(6,"async"),p(7,lv,9,23,"ta-team-event-card",12),P(8,"async"),p(9,_v,6,18,"ta-team-event-card",12),P(10,"async"),p(11,Ev,12,7,"div",12),P(12,"async"),s()),t&2){let e=V(4),n=c(2);o(),a("ngIf",!n.isEventsSettingsDeclutter||A(2,6,n.isOffsite$))("ngIfElse",e),o(4),a("ngIf",A(6,8,n.showApprovalRequest$)),o(2),a("ngIf",A(8,10,n.showControlPanel$)&&!n.customFieldsLoading),o(2),a("ngIf",A(10,12,n.showOffsiteSteps$)&&!n.customFieldsLoading),o(2),a("ngIf",A(12,14,n.showAdminsList$))}}function gv(t,_){if(t&1){let e=O();r(0,"div",40)(1,"ta-tabs",41,1),S("change",function(i){f(e);let l=c(2);return v(l.setActiveTab(l.tabs[i]==null?null:l.tabs[i].id,"tab"))}),s()()}if(t&2){let e=c(2);o(),a("tabs",e.tabs)("tourGuideStepRef",e.tourGuideStepRef)("activeTab",e.activeTabIndex)("height",64)("isSelfSellGroupTravelOnboardingEnabled",e.isSelfSellGroupTravelOnboardingEnabled)}}function fv(t,_){t&1&&(r(0,"div",42)(1,"h2",43),g(2,8),s()())}function vv(t,_){if(t&1){let e=O();r(0,"div")(1,"ta-event-users-monitoring",44),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),S("closeRoomBlockOnlyBanner",function(){f(e);let i=c(2);return v(i.onCloseRoomBlockOnlyBanner())}),s()()}if(t&2){let e=c(2);o(),a("teamEventId",A(2,13,e.travelEventQuery.selectActiveId()))("teamEventName",A(3,15,e.travelEventQuery.activeEventName$))("isEventSent",A(4,17,e.travelEventQuery.isActiveEventSent$))("isEditModeDisabled",A(5,19,e.travelEventQuery.isActiveEventDisabled$))("hasRoomBlocks",e.hasRoomBlocks)("bodyElRef",e.elRef)("teamEventRoomBlocksEnabled",e.teamEventRoomBlocksEnabled)("teamEventNonRoomBlockBookingEnabled",e.teamEventNonRoomBlockBookingEnabled)("roomBlockMissingParticipants",e.participantsMissingBannerNotShown&&e.roomBlockMissingParticipants||0)("roomBlockAddedParticipants",e.participantsAddedBannerNotShown&&e.roomBlockAddedParticipants||0)("tripUuid",e.activeRoomBlock==null?null:e.activeRoomBlock.tripUuid)("isSelfSellGroupTravelOnboardingEnabled",e.isSelfSellGroupTravelOnboardingEnabled)("activeTab",e.activeTab==="participants")}
5}function Tv(t,_){if(t&1&&(r(0,"div",22)(1,"div",23),m(2,"ta-event-co2",45),P(3,"async"),s()()),t&2){let e=c(2);o(2),a("carbonFootprint",A(3,1,e.travelEventQuery.activeEventCarbonFootprint$))}}function Sv(t,_){if(t&1&&(m(0,"ta-team-event-settings",46,2),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async"),P(6,"async"),P(7,"async"),P(8,"async"),P(9,"async")),t&2){let e=c(2);a("userInfo",A(2,8,e.sessionQuery.selectUserInfo$))("isTeamOffsite",A(3,10,e.travelEventQuery.isActiveEventOffsite$))("isTeamOffsiteClaimedAdmin",A(4,12,e.travelEventQuery.isActiveEventOffsiteClaimedAdmin$))("isBoomPopEvent",A(5,14,e.travelEventQuery.isBoomPopEvent$))("numberOfParticipants",A(6,16,e.travelEventInvitationsQuery.totalInvitations$))("isExtraGuestAllowedByAccessControl",A(7,18,e.travelEventQuery.isExtraGuestAllowedByAccessControl$))("companyUserFields",A(8,20,e.travelEventQuery.companyUserFields$))("customFields",A(9,22,e.customFields$))}}function Pv(t,_){if(t&1&&m(0,"ta-team-event-reed-and-mackay",49),t&2){let e=c(3);a("disabled",e.form.disabled)("activeTab",e.activeTab)}}function Cv(t,_){if(t&1&&m(0,"ta-team-event-create-account",50),t&2){let e=c(3);a("disabled",e.form.disabled)("userInfo",e.userInfo)}}function hv(t,_){if(t&1&&(r(0,"div"),p(1,Pv,1,2,"ta-team-event-reed-and-mackay",47)(2,Cv,1,2,"ta-team-event-create-account",48),s()),t&2){let e=c(2);o(),a("ngIf",!e.hideReedMackayBanner),o(),a("ngIf",e.isGroupTravelBannerEnabled)}}function Av(t,_){if(t&1&&(m(0,"ta-team-event-policy-payment",53,3),P(2,"async"),P(3,"async"),P(4,"async"),P(5,"async")),t&2){let e=c(3);a("isTeamOffsite",A(2,5,e.travelEventQuery.isActiveEventOffsite$))("isTeamOffsiteClaimedAdmin",A(3,7,e.travelEventQuery.isActiveEventOffsiteClaimedAdmin$))("companyUserFields",A(4,9,e.travelEventQuery.companyUserFields$))("customFields",A(5,11,e.customFields$))("isTravelEventRoomBlockEnabled",e.isTravelEventRoomBlockEnabled)}}function Ov(t,_){if(t&1&&m(0,"ta-team-event-reed-and-mackay",49),t&2){let e=c(4);a("disabled",e.form.disabled)("activeTab",e.activeTab)}}function Mv(t,_){if(t&1&&m(0,"ta-team-event-create-account",50),t&2){let e=c(4);a("disabled",e.form.disabled)("userInfo",e.userInfo)}}function Nv(t,_){if(t&1&&(r(0,"div"),p(1,Ov,1,2,"ta-team-event-reed-and-mackay",47)(2,Mv,1,2,"ta-team-event-create-account",48),s()),t&2){let e=c(3);o(),a("ngIf",!e.hideReedMackayBanner),o(),a("ngIf",e.isGroupTravelBannerEnabled)}}function Rv(t,_){if(t&1&&(r(0,"div",15)(1,"div")(2,"div",51),p(3,Av,6,13,"ta-team-event-policy-payment",52),s()(),p(4,Nv,3,2,"div",12),s()),t&2){let e=c(2);a("ngClass",tt(3,j_,e.activeTab!=="policyAndPayment",!e.inIframe)),o(3),a("ngIf",e.customFields$),o(),a("ngIf",!e.hideReedMackayBanner||e.isGroupTravelBannerEnabled)}}function bv(t,_){if(t&1){let e=O();r(0,"form",13),p(1,uv,13,16,"section",12),r(2,"section"),p(3,gv,3,5,"div",14),r(4,"div",15)(5,"div",16),p(6,fv,3,0,"div",17),r(7,"div",18)(8,"div",19),p(9,vv,6,21,"div",12),P(10,"async"),r(11,"div",20),p(12,Tv,4,3,"div",21),P(13,"async"),r(14,"div",22)(15,"div",23),m(16,"ta-event-cost",24),P(17,"async"),P(18,"async"),P(19,"async"),P(20,"async"),P(21,"async"),s()()()()()()(),r(22,"div",15)(23,"div")(24,"div",25),p(25,Sv,10,24,"ta-team-event-settings",26),s()(),p(26,hv,3,2,"div",12),s(),p(27,Rv,5,6,"div",27),r(28,"div",15)(29,"navan-team-event-room-blocks",28),P(30,"async"),P(31,"async"),P(32,"async"),P(33,"async"),S("goToPolicyAndPayments",function(){f(e);let i=c();return v(i.switchToPolicyAndPayments())}),s()()()()}if(t&2){let e=c();a("formGroup",e.form)("ngClass",me(53,ov,e.form.dirty)),o(),a("ngIf",!e.inIframe),o(2),a("ngIf",!e.inIframe),o(),a("ngClass",me(55,X_,e.activeTab!=="participants")),o(2),a("ngIf",e.inIframe),o(2),Bt("data-appcue-id","teamEventTravelers_enUS"),o(),a("ngIf",A(10,31,e.travelEventQuery.activeEvent$)),o(3),a("ngIf",!A(13,33,e.isOffsite$)),o(4),a("showTotalCost",A(17,35,e.travelEventQuery.isActiveEventSent$)||e.hasRoomBlocks)("totalCost",A(18,37,e.travelEventQuery.totalCost$))("totalEstimate",A(19,39,e.travelEventQuery.totalCostEstimate$))("isExtraGuestAllowed",A(20,41,e.travelEventQuery.isActiveEventExtraGuestAllowed$))("isLoading",A(21,43,e.travelEventQuery.isLoading$))("hasRoomBlockMismatch",e.hasRoomBlockMismatch&&e.isManageGuestBookingsEnabled),o(6),a("ngClass",tt(57,j_,e.activeTab!=="settings",!e.inIframe)),o(3),a("ngIf",e.customFields$),o(),a("ngIf",!e.hideReedMackayBanner||e.isGroupTravelBannerEnabled),o(),a("ngIf",e.isEventsSettingsDeclutter),o(),a("ngClass",me(60,X_,e.activeTab!=="roomBlocks")),o(),a("teamEventSearchConfig",e.teamEventSearchConfig)("isDraft",A(30,45,e.isDraft$))("hasRoomBlocks",e.hasRoomBlocks)("isEditModeDisabled",A(31,47,e.travelEventQuery.isActiveEventDisabled$))("roomBlocks",e.roomBlocks)("roomBlockMissingParticipants",e.roomBlockMissingParticipants)("teamEventId",A(32,49,e.travelEventQuery.selectActiveId()))("travelWindows",e.travelWindows)("isOffsite",e.isOffsite)("roomBlockMissingEventSettings",!e.canProceedToRoomBlocks)("isMissingPermissionToBookAccommodations",A(33,51,e.isMissingPermissionToBookAccommodations$))}}function yv(t,_){if(t&1){let e=O();r(0,"ta-sticky-footer",54),P(1,"async"),P(2,"async"),P(3,"async"),S("cancel",function(){f(e);let i=c();return v(i.resetForm(!0))})("save",function(){f(e);let i=c();return v(i.saveTeamEvent())}),s()}if(t&2){let e=c();
5a("disabled",e.form.invalid&&!A(1,2,e.isDraft$)||e.shouldDisableSaveButton&&A(2,4,e.isDraft$))("loading",A(3,6,e.travelEventQuery.isSaving$))}}function Iv(t,_){t&1&&zt(0)}function qa(t,_,e=""){let n=[];return Object.keys(_).forEach(i=>{let l=e?`${e}.${i}`:i;if(typeof _[i]=="object"&&_[i]!==null)if(_[i]instanceof Date&&t[i]instanceof Date)_[i].toISOString()!==t[i].toISOString()&&n.push(l);else if(t[i]!==null&&t[i]!==void 0){let d=qa(t[i],_[i],l);d&&n.push(d)}else n.push(l);else _[i]!==t[i]&&n.push(l)}),n.join(", ")}var xv=new Set([vn.CANCELED,vn.VOIDED]),Fv=new Set([Sn.DECLINED,Sn.REVOKED]),Y_=(()=>{class t{get shouldDisableSaveButton(){return this.form.invalid&&this.teamEventSettingsComponent.formEventDetailsControl.invalid}get eventUuid(){return this.route.snapshot.paramMap.get("eventUuid")}get activeTabIndex(){return this.tabs.findIndex(({id:e})=>e===this.activeTab)}get showSaveBar(){return this.form&&this.form.dirty&&this.form.enabled}constructor(e,n,i,l,d,u,h,I,F,$,ge,W,oe,Ie,ae,It,Le,_n,cn,ke,Rn,bn,qn,Jn,Zn,ei,ti,ni,Oe,Yi,Ne,Z_){this.fb=e,this.route=n,this.router=i,this.taToastrService=l,this.invitationsService=d,this.splitSvc=u,this.modalService=h,this.sessionQuery=I,this.travelEventStore=F,this.groupTravelApiService=$,this.groupTravelUtilService=ge,this.travelEventQuery=W,this.travelEventInvitationsQuery=oe,this.groupTravelStoreFacadeService=Ie,this.groupTravelAnalyticsService=ae,this.travelEventMetadataUtilService=It,this.groupTravelModalsService=Le,this.travelEventSummaryUtilService=_n,this.growthService=cn,this.elRef=ke,this.userComponentService=Rn,this.teamEventSurveyService=bn,this.tooltipEducationService=qn,this.groupTravelOnboardingTooltipsService=Jn,this.preloadAssetsService=Zn,this.groupTravelGeneralLayoutTourGuideService=ei,this.tourGuideRefService=ti,this.travelEventRequestService=ni,this.usersDataService=Oe,this.customFieldService=Yi,this.internalAppsCommunicatorService=Ne,this.splitService=Z_,this.showNamedAdminsEnabled=this.splitSvc.isOn("GME_SHOW_NAMED_ADMINS"),this.isReedAndMackayLinkSplit=this.splitSvc.isOn(oa),this.isShowLegalEntity=this.splitSvc.isOn("COST_FIELDS_ADD_LEGAL_ENTITY"),this.isEventsSettingsDeclutter=this.splitSvc.isOn("EVENTS_SETTINGS_DECLUTTER_ENABLED"),this.isTravelEventRoomBlockEnabled=this.splitSvc.isOn("TEAM_EVENT_ROOM_BLOCKS"),this.teamEventNonRoomBlockBookingEnabled=this.splitSvc.isOn("ENT_NON_ROOM_BLOCK_BOOKING_ENABLED"),this.isManageGuestBookingsEnabled=this.splitSvc.isOn("ENT_DISABLE_PROVIDERS_FOR_EVENT_ACCOMMODATION"),this.teamEventRoomBlocksEnabled=!1,this.isGroupTravelBannerEnabled=!1,this.disableSendInvites=!1,this.roomBlockMissingParticipants=0,this.roomBlockAddedParticipants=0,this.participantsMissingBannerNotShown=!0,this.participantsAddedBannerNotShown=!0,this.hasRoomBlockMismatch=!1,this.activateSendInvitesWhenFiltersApplied=!1,this.roomBlockMissingEventSettings=!0,this.canBookAccommodationsState$=new rt(!1),this.form=this.fb.group({settings:[],policyAndPayment:[]}),this.tabs=[],this.activeTab="settings",this.pendingTab=null,this.isDraft$=this.travelEventQuery.isActiveEventDraft$,this.isOffsite$=this.travelEventQuery.isActiveEventOffsite$,this.isBoompop$=this.travelEventQuery.isBoomPopEvent$,this.isOffsiteSignal=ui(this.isOffsite$),this.showNamedAdminList$=this.travelEventQuery.adminsList$.pipe(Q(Ct=>!!(Ct||[]).length)),this.isSelfSellGroupTravelOnboardingEnabled=!1,this.hideReedMackayBanner=!1,this.inIframe=Ke(),this.showApprovalRequest$=Ue([this.sessionQuery.selectUserInfo$,this.travelEventQuery.isApprovalWorkflow$,this.isDraft$,this.travelEventQuery.isPendingApproval$]).pipe(Q(([Ct,an,rn,An])=>rn&&an&&Ct.admin&&An)),this.showControlPanel$=Ue([this.travelEventQuery.canDirectlyActivate$,this.travelEventQuery.isApprovalWorkflow$,this.isDraft$]).pipe(Q(([Ct,an,rn])=>!Ct&&an&&rn)),this.showAdminsList$=Ue([this.travelEventQuery.canDirectlyActivate$,this.travelEventQuery.isApprovalWorkflow$,this.isDraft$,this.isOffsite$]).pipe(Q(([Ct,an,rn,An])=>!Ct&&this.showNamedAdminsEnabled&&rn&&!An&&!an)),this.showOffsiteSteps$=Ue([this.travelEventQuery.canDirectlyActivate$,this.isDraft$,this.travelEventQuery.cannotManageActiveEvent$,this.travelEventQuery.isApprovalWorkflow$,this.isOffsite$]).pipe(Q(([Ct,an,rn,An,Wi])=>(Ct||!this.showNamedAdminsEnabled&&!An)&&an&&!rn&&(!Wi||!this.teamEventRoomBlocksEnabled))),this.showSendInvites$=Ue([this.travelEventQuery.canDirectlyActivate$,this.isDraft$,this.travelEventQuery.cannotManageActiveEvent$,this.travelEventQuery.isApprovalWorkflow$,this.isOffsite$]).pipe(Q(([Ct,an,rn,An,Wi])=>(Ct||!this.showNamedAdminsEnabled&&!An)&&an&&!rn&&Wi&&this.teamEventRoomBlocksEnabled)),this.eventMetadata$=this.travelEventQuery.eventMetadata$.pipe(Be(Ct=>{(this.travelEventMetadataUtilService.isEstimationInProgress(Ct)||this.travelEventMetadataUtilService.isCarbonEvaluationInProgress(Ct))&&Te(null).pipe(ya(5e3),De(this.travelEventQuery.eventMetadata$.pipe(In(1),ce(1))),ue(()=>this.groupTravelApiService.getTravelEventMetadata(this.eventUuid))).subscribe()})),this.isMissingPermissionToBookAccommodations$=Ue([this.showControlPanel$,this.travelEventQuery.proposalStatus$,this.showAdminsList$,this.travelEventQuery.cannotManageActiveEvent$,this.isOffsite$,this.canBookAccommodationsState$]).pipe(Q(([Ct,an,rn,An,Wi,ec])=>Wi?An&&(Ct&&an!==Ms.APPROVED||rn):!ec)),this.requiredCustomFields=[],this.customFields$=null,this.customFieldsLoading=!0,this.isFormValid=!1,this.destroy=new dt,this.loadedEventSent=!1,this.fieldsPolicy={}}ngOnInit(){this.tourGuideStepRef=this.tourGuideRefService.tourGuideStepRef,this.disableFieldsBasedOnUserRolesAndEventStatus(),this.isOffsite$.pipe(De(this.destroy)).subscribe(e=>{this.isOffsite=e}),this.internalAppsCommunicatorService.receiveFromParent(yt.canBookAccommodationsUpdated,e=>{let n=e?.canBookAccommodations??!1;this.canBookAccommodationsState$.next(n)}),this.initTabsAndBanners(),this.internalAppsCommunicatorService.receiveFromParent(yt.changeTab,e=>{if(!e?.tab)return;this.tabs.length>0&&this.tabs.some(({id:i})=>i===e.tab)?this.setActiveTab(e.tab,"postMessage"):this.inIframe&&(this.pendingTab=e.tab)}),this.travelEventQuery.activeEventSettings$.pipe(De(this.destroy)).subscribe(e=>{let{settings:n,policyAndPayment:i}=e;this.form.get("settings").patchValue(n),this.isEventsSettingsDeclutter&&!this.isOffsite&&this.form.get("policyAndPayment").patchValue(i),this.sessionQuery.selectUserInfo$.subscribe(l=>{let u=this.splitService.isOn("EXPENSE_TRAVEL_POLICY_FIELDS")&&this.splitService.isOn("TRAVEL_EVENTS_CUSTOM_FIELD")?this.usersDataService.getCustomFieldsPolicy(!0):Te({});Ue([this.usersDataService.getCustomFields(!0,l.admin),u]).pipe(De(this.destroy)).subscribe({next:([h,I])=>{this.fieldsPolicy=I;let F=this.isEventsSettingsDeclutter&&!this.isOffsite?i?.customFieldValues:n?.policyAndPaymentView?.customFieldValues;this.customFieldService.initializeCustomFields(h,F||[],I),this.customFields$=this.customFieldService.customFieldUISetting$.pipe(Be($=>{this.customFieldsLoading=!1,this.requiredCustomFields=$}))},error:()=>{this.customFieldsLoading=!1}})}),this.customFieldService.customFieldValues$.subscribe(l=>{let d=Object.values(l).every(u=>u.value!==""||!u.required);this.isFormValid=d}),this.initialFormValue=this.form.getRawValue(),this.travelWindows=n?.travelWindows??null,this.form.markAsPristine(),this.teamEventSearchConfig=n?.details,this.groupTravelAnalyticsService.updateEventTrackingData(this.travelEventQuery.getActive())}),Ue([this.travelEventQuery.isActiveEventDraft$,this.travelEventInvitationsQuery.totalInvitations$,this.travelEventInvitationsQuery.isLoading$,this.travelEventInvitationsQuery.isParticipantsFilterApplied$,this.sessionQuery.selectUserInfo$]).pipe(De(this.destroy)).subscribe(([e,n,i,l,d])=>{this.teamEventSearchConfig=Re(le({},this.teamEventSearchConfig),{numberOfRooms:n}),this.disableSendInvites=!n||n<1,n===0&&(l||i)&&(this.disableSendInvites=!1),this.activateSendInvitesWhenFiltersApplied=l&&n===0,this.groupTravelAnalyticsService.updateInvitationTrackingData({numberOfParticipants:n});let u=this.travelEventQuery.shouldShowTeamOffsiteUI();!i&&e&&u&&this.groupTravelOnboardingTooltipsService.prepareEventEducation(d,this.hasRoomBlocks,this.elRef,n),this.sendLoadedEvent()}),this.groupTravelAnalyticsService.updateEventTrackingData(this.travelEventQuery.getActive()),this.groupTravelAnalyticsService.initCompanySettingsTrackingData(this.travelEventQuery.canDirectlyActivate),N(X.OPEN_TEAM_EVENT_PAGE),N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_SETTINGS_BOOKING,[x.CONTEXT]:nt.PAGE})}ngAfterViewInit(){this.internalAppsCommunicatorService.sendReadySignal(),this.form.get("settings").updateV
5alueAndValidity(),this.isEventsSettingsDeclutter&&!this.isOffsite&&this.form.get("policyAndPayment").updateValueAndValidity(),N(X.GROUP_TRAVEL_EVENT_PAGE_LOADED,{eventUuid:this.eventUuid,teamEventRoomBlocksEnabled:this.teamEventRoomBlocksEnabled});let e=this.route.snapshot.queryParams?.tourGuide;this.isSelfSellGroupTravelOnboardingEnabled&&e===Pl&&this.groupTravelGeneralLayoutTourGuideService.startGroupTravelTourGuide(),N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_SETTINGS_BOOKING,[x.CONTEXT]:nt.PAGE})}ngOnDestroy(){this.destroy.next(),this.destroy.complete(),this.canBookAccommodationsState$.complete(),this.internalAppsCommunicatorService.cleanupListener(yt.canBookAccommodationsUpdated),this.internalAppsCommunicatorService.cleanupListener(yt.changeTab),this.travelEventStore.unsetActiveEvent(),this.groupTravelAnalyticsService.destroyEventTrackingData(),this.groupTravelAnalyticsService.destroyCompanySettingsTrackingData(),this.updateParticipantsBannerTracking(),this.groupTravelGeneralLayoutTourGuideService.terminateTourGuide()}setActiveTab(e,n){if(!e)return Te(!1);let i=new Y,l=i.asObservable(),d=this.activeTab==="settings"&&e!=="settings",u=this.activeTab==="participants"&&e!=="participants",h=this.activeTab==="policyAndPayment"&&e!=="policyAndPayment";return((d||h||this.isEventsSettingsDeclutter&&u)&&this.form.dirty&&this.form.enabled?this.showDiscardModal():Te(!0)).pipe(ce(1)).subscribe(F=>{F&&(this.activeTab=e,this.growthService.isGrowthSelfSellAndSetupNotCompleted(this.userInfo)&&this.router.navigate([],{relativeTo:this.route,queryParams:{"room-block":e==="roomBlocks"?"true":null},queryParamsHandling:"merge"}),e==="participants"?this.groupTravelUtilService.markEventAsReviewed(this.eventUuid):e==="settings"&&n?(this.tooltipEducationService.emitComponentKey(Pt.TEAM_EVENT_ROOM_BLOCKS_ADD_PARTICIPANTS_POPOVER),this.userComponentService.dismiss$(Pt.TEAM_EVENT_ROOM_BLOCKS_SETTINGS_TAB_POPOVER).subscribe(),this.teamEventRoomBlocksEnabled&&Ue([this.travelEventQuery.isActiveEventDraft$,this.sessionQuery.selectUserInfo$,this.travelEventInvitationsQuery.totalInvitations$]).pipe(ir()).subscribe(([$,ge,W])=>{$&&this.groupTravelOnboardingTooltipsService.onSettingTabSwitch(this.elRef,ge,W)})):(this.tooltipEducationService.emitComponentKey(Pt.TEAM_EVENT_ROOM_BLOCKS_ADD_PARTICIPANTS_POPOVER),this.userComponentService.dismiss$(Pt.TEAM_EVENT_ROOM_BLOCKS_TAB_INTRO_POPOVER).subscribe()),n&&(this.sendTrackEvent(`${this.activeTab} clicked`),N(X.TEAM_EVENT_TAB_CHANGED,{activeTab:this.activeTab,source:n,hasRoomBlocks:this.hasRoomBlocks,groupTravelRoomBlocksEnabled:this.teamEventRoomBlocksEnabled}),this.activeTab==="settings"&&N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_SETTINGS_BOOKING,[x.CONTEXT]:nt.PAGE}),this.activeTab==="policyAndPayment"&&N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.EVENT_SETTINGS_POLICY_AND_PAYMENT,[x.CONTEXT]:nt.PAGE}),this.activeTab==="participants"&&N(z.EVENTS_VIEW_APPEARED,{[x.VIEW]:H.PARTICIPANTS_MAIN,[x.CONTEXT]:nt.PAGE}),this.activeTab==="roomBlocks"&&N(X.GROUP_TRAVEL_ROOM_BLOCK_TAB_CHANGED)),u&&this.updateParticipantsBannerTracking()),i.next(F)}),l.pipe(ce(1))}scrollToDetails(){this.setActiveTab("settings","event checklist"),setTimeout(()=>{this.scrollToSection('[id="event-details"]'),this.groupTravelUtilService.markEventAsReviewed(this.eventUuid)})}switchToParticipantsAndOpenModal(){this.setActiveTab("participants","event checklist").subscribe(e=>{this.eventUsersMonitoringComponent&&e&&this.eventUsersMonitoringComponent.openAddParticipantsModal()})}switchToPolicyAndPayments(){if(this.inIframe){this.internalAppsCommunicatorService.goToPolicyAndPayment();return}this.setActiveTab("policyAndPayment","event checklist").subscribe()}switchToAccommodations(){this.setActiveTab("roomBlocks","event checklist").subscribe()}sendInvites(){N(z.EVENT_INVITES_SENT,{[x.VIEW]:Vi(this.activeTab)});let e=["growth/group-travel/new-confirmation-model-wave.png"];this.preloadAssetsService.preloadFromCdn(e),(this.form.dirty?this.saveTeamEvent$():this.travelEventQuery.activeEvent$.pipe(ce(1))).pipe(Be(()=>{this.sendTrackEvent("sendEventInvite")}),ue(i=>this.groupTravelApiService.sendInvite(this.eventUuid,{isTestTravelEvent:this.travelEventSummaryUtilService.isTestTravelEvent(i.summary),isRemoteTravelEvent:this.travelEventSummaryUtilService.isRemoteTravelEvent(i.summary)})),ya(5e3),Be(i=>{this.groupTravelAnalyticsService.updateEventTrackingData(i),this.openConfirmationModal(),this.invitationsService.reloadUserInvitations()}),ue(()=>this.groupTravelApiService.getTravelEventInvitations(this.eventUuid)),Be(()=>{this.openEventsSurvey()})).subscribe(()=>{},i=>{let l=i?.fieldValidationErrors?[].concat.apply([],Object.values(i?.fieldValidationErrors)).find(u=>u.fieldName?.split(".")?.pop()==="allowedBookingsDetails"&&u.code==="NotEmpty"):null,d=(i?.messages||[])[0];this.taToastrService.error(l?$localize`Every participant needs to have at least one booking type selected.`:d||$localize`There was a problem in sending the invitations.`),Nt("PLGR","GroupTravelRoomBlocks","sendInvites",i)})}openEventsSurvey(){this.isOffsite$.pipe(ee(e=>!e),ue(()=>this.teamEventSurveyService.open())).subscribe()}scrollToSection(e){Ys.scrollToView(document.querySelector(e))}resetForm(e=!1){let n=qa(this.initialFormValue,this.form.getRawValue());this.form.reset(this.initialFormValue),this.form.markAsPristine();let i=this.isEventsSettingsDeclutter&&!this.isOffsite?this.initialFormValue?.policyAndPayment:this.initialFormValue?.settings?.policyAndPaymentView;this.customFieldService.initializeCustomFields(this.requiredCustomFields,i?.customFieldValues||[],this.fieldsPolicy),this.sendTrackEvent("revertButtonClicked"),N(X.REVERT_TEAM_EVENT_FORM_CHANGES),N(z.EVENT_SETTINGS_DISCARDED,{[x.VIEW]:H.EVENT_DISCARD_CHANGES,[x.CONTEXT]:e?nt.TOAST:nt.POP_UP,[x.NAVAN_EVENT_SETTING]:n})}saveTeamEvent(){let e=qa(this.initialFormValue,this.form.getRawValue());this.sendTrackEvent("saveButtonClicked"),this.saveTeamEvent$().subscribe(()=>{this.taToastrService.show($localize`Event has been saved.`),this.internalAppsCommunicatorService.eventSettingsUpdated()});let n;switch(this.activeTab){case"settings":n=H.EVENT_SETTINGS_BOOKING;break;case"policyAndPayment":n=H.EVENT_SETTINGS_POLICY_AND_PAYMENT;break;case"participants":n=H.PARTICIPANTS_MAIN;break;default:n=null}N(z.EVENT_SETTINGS_SAVED,{[x.VIEW]:n,[x.NAVAN_EVENT_SETTING]:e})}canDeactivate(){return this.form.dirty&&this.form.enabled?this.showDiscardModal():!0}trackRequestSendInvitesAccess(e){N(X.REQUEST_SEND_INVITES_ACCESS),window.location.href=`mailto:${e}`}onDeclineProposal(){this.groupTravelModalsService.declineProposal(this.eventUuid,this.travelEventQuery.activeProposalId).afterClosed$.pipe(ee(e=>!!(e.type==="close"&&e.result?.id))).subscribe(e=>this.travelEventStore.updateTravelEventProposal(this.eventUuid,e.result))}onApproveProposal(){this.groupTravelModalsService.approveProposal(this.eventUuid,this.travelEventQuery.activeProposalId).afterClosed$.pipe(ee(e=>!!(e.type==="close"&&e.result.id))).subscribe(e=>this.travelEventStore.updateTravelEventProposal(this.eventUuid,e.result))}onRequestApproval(){this.groupTravelModalsService.requestProposalApproval(this.eventUuid).afterClosed$.pipe(ee(e=>!!(e.type==="close"&&e.result?.id))).subscribe(e=>this.travelEventStore.updateTravelEventProposal(this.eventUuid,e.result))}openConfirmationModal(){Ue([this.sessionQuery.selectUserInfo$,this.travelEventQuery.isActiveEventOffsite$]).pipe(ce(1),Be(([e,n])=>{n&&this.isSelfSellGroupTravelOnboardingEnabled?this.modalService.open(Ol).afterClosed$.subscribe(()=>{this.setActiveTab("participants")}
5):n&&this.growthService.isGroupTravelAdmin(e)&&this.modalService.open(Al,{}),this.taToastrService.show($localize`Invites sent successfully.`)})).subscribe()}initTabs(){if(this.travelEventQuery.shouldShowTeamOffsiteUI())this.tabs=G_(["settings","participants","roomBlocks"]),this.setActiveTab("settings").subscribe();else{this.tabs=[{label:this.isEventsSettingsDeclutter&&!this.isOffsite?$localize`Booking settings`:$localize`Event Settings`,id:"settings"},...this.isEventsSettingsDeclutter&&!this.isOffsite?[{label:$localize`Policy and payment`,id:"policyAndPayment"}]:[],{label:$localize`Participants`,id:"participants"},...this.isTravelEventRoomBlockEnabled&&!this.isOffsite?[{label:$localize`Accommodations`,id:"roomBlocks"}]:[]],this.isOffsite&&this.addRoomBlockTab();let e=this.route.snapshot.queryParams?.tab;e||(e=!this.groupTravelUtilService.isReviewed(this.eventUuid)||!this.teamEventRoomBlocksEnabled?"settings":"participants"),this.setActiveTab(e).subscribe()}this.applyPendingTab()}applyPendingTab(){if(!this.pendingTab)return;let e=this.pendingTab;this.pendingTab=null,this.tabs.some(({id:i})=>i===e)&&this.setActiveTab(e,"postMessage")}disableFieldsBasedOnUserRolesAndEventStatus(){this.travelEventQuery.isActiveEventDisabled$.pipe(De(this.destroy)).subscribe(e=>{e?this.form.disable():this.form.enable()})}showDiscardModal(){return this.modalService.open(ea,{data:{header:$localize`Discard changes?`,description:$localize`You have unsaved information. Are you sure you want to navigate away from this page?`,primaryButton:{text:$localize`Discard changes`},secondaryButton:{text:$localize`Go back to edit`}},closeOnOutsideClick:!1}).afterClosed$.pipe(Q(({type:e,result:n})=>e==="close"&&n),Q(e=>e?.action===Zo.PRIMARY?(this.resetForm(),!0):(this.isEventsSettingsDeclutter&&this.activeTab==="participants"?setTimeout(()=>{this.setActiveTab("participants"),this.tabsComponent.selectTab(this.activeTabIndex)}):this.isEventsSettingsDeclutter&&this.activeTab==="policyAndPayment"?setTimeout(()=>{this.setActiveTab("policyAndPayment"),this.tabsComponent.selectTab(this.activeTabIndex)}):setTimeout(()=>{this.setActiveTab("settings"),this.tabsComponent.selectTab(this.activeTabIndex)}),setTimeout(()=>{this.setActiveTab(this.activeTab),this.tabsComponent.selectTab(this.activeTabIndex)}),!1)))}updateForm(e){let n=this.form.value,i=Re(le({},n.settings.details),{eventName:e.summary.name,location:{description:e.summary.location.formattedAddress,placeId:e.summary.location.placeId,companyOfficeUuid:e.summary.location.companyOfficeId,location:e.summary.location},eventType:e.eventType,customEventType:e.customEventType,range:{from:new Date(e.summary.startDateTime),to:e.summary.endDateTime?new Date(e.summary.endDateTime):void 0}});this.form.patchValue({settings:{details:i}}),N(z.EVENT_SETTINGS_CHANGED,{[x.VIEW]:H.EVENT_SETTINGS_DETAILS,[x.CONTEXT]:nt.POP_UP,[x.NAVAN_EVENT_SETTING]:Tn.SETTINGS_DETAILS})}saveTeamEvent$(){let e=this.form.value.policyAndPayment,n=this.form.value.settings;if(this.isEventsSettingsDeclutter&&!this.isOffsite){let l=this.initialFormValue?.policyAndPayment?.customFieldValues?.find(u=>u.name==="tripName"),d=e?.customFieldValues;d&&l&&(e.customFieldValues=[...d,l])}else{let l=this.initialFormValue?.settings?.policyAndPaymentView?.customFieldValues?.find(u=>u.name==="tripName"),d=n?.policyAndPaymentView?.customFieldValues;d&&l&&(n.policyAndPaymentView.customFieldValues=[...d,l])}return this.travelEventQuery.activeEvent$.pipe(ce(1),Q(i=>this.travelEventRequestService.transformTravelEvent(i,n,e,this.isOffsite)),ue(i=>this.groupTravelApiService.updateTeamEvent(i)))}sendTrackEvent(e){le({clickedItem:e},this.eventTrackingDetails)}get eventTrackingDetails(){return{source:"teamEvent",eventStatus:this.travelEventQuery.getActive().status||"CONFIGURE",eventItemsAmount:this.travelEventInvitationsQuery.totalInvitations,eventUuid:this.eventUuid}}getBannerKey(e){let n=this.userComponentService.getUuidWithoutSpecialChars(this.eventUuid);return`${e}${n}`}initTabsAndBanners(){this.sessionQuery.selectUserInfo$.subscribe(e=>{this.userInfo=e;let n=this.travelEventQuery.shouldShowTeamOffsiteUI();this.isGroupTravelBannerEnabled=this.growthService.isGroupTravelNotClaimed(e),this.teamEventRoomBlocksEnabled=this.isTravelEventRoomBlockEnabled||this.growthService.isSelfSellUser(this.userInfo)&&n,this.isSelfSellGroupTravelOnboardingEnabled=n,this.initTabs(),this.teamEventRoomBlocksEnabled&&this.getTeamEventRoomBlocks(),this.hideReedMackayBanner=!this.isReedAndMackayLinkSplit||this.isOffsite||Ke()})}checkRoomBlocks(){this.teamEventRoomBlocksEnabled&&this.getParticipantsRoomBlockStatus()}addRoomBlockTab(){this.tabs=[{label:$localize`Participants`,id:"participants"},{label:$localize`Room block`,id:"roomBlocks"},{label:$localize`Settings`,id:"settings"}],this.setActiveTab("participants")}
5getParticipantsRoomBlockStatus(){let e=this.getBannerKey(Pt.TEAM_EVENT_ROOM_BLOCKS_PARTICIPANT_MISSING_BANNER),n=this.getBannerKey(Pt.TEAM_EVENT_ROOM_BLOCKS_PARTICIPANT_ADDED_BANNER);Ue([this.travelEventInvitationsQuery.invitationViews$,this.userComponentService.isComponentOn$(e),this.userComponentService.isComponentOn$(n)]).pipe(De(this.destroy)).subscribe(([i,l,d])=>{if(!this.hasRoomBlocks)return;let u=i.reduce((h,I)=>(I.participantMissingRoomBlock&&h.missing++,I.participantAddedInRoomBlock&&h.added++,h),{missing:0,added:0});this.participantsMissingBannerNotShown=l,this.participantsAddedBannerNotShown=d,this.roomBlockMissingParticipants=u.missing,this.roomBlockAddedParticipants=u.added,this.hasRoomBlockMismatch=this.detectRoomBlockMismatch(this.roomBlocks,i)})}detectRoomBlockMismatch(e,n){if(!e?.length)return!1;let i=Object.fromEntries(n.map(l=>[l.participant.participantId,l]));for(let l of e)if(!(l.bookingStatus&&xv.has(l.bookingStatus)))for(let d of l.passengers){if(!d.id)continue;let u=i[d.id];if(!u||Fv.has(u.invitationStatus))return!0}return!1}onCloseRoomBlockOnlyBanner(){this.roomBlockAddedParticipants>0&&this.participantsAddedBannerNotShown&&(this.userComponentService.dismiss$(this.getBannerKey(Pt.TEAM_EVENT_ROOM_BLOCKS_PARTICIPANT_ADDED_BANNER)).subscribe(),N(X.GROUP_TRAVEL_ROOM_BLOCKS_PARTICIPANT_ADDED_BANNER_CLOSED))}updateParticipantsBannerTracking(){this.onCloseRoomBlockOnlyBanner()}goToOverviewPage(){this.internalAppsCommunicatorService.goToOverviewPage()}getTeamEventRoomBlocks(){let e=this.groupTravelApiService.getTeamEventRoomBlocks(this.eventUuid).pipe(Ye(n=>(Nt("PLGR","GroupTravelRoomBlocks","getRoomBlocks",n),Te([]))));this.isManageGuestBookingsEnabled?Ue([e,this.travelEventInvitationsQuery.select("viewableUsers"),this.travelEventInvitationsQuery.isLoading$]).pipe(De(this.destroy)).subscribe(([n,i,l])=>{this.processRoomBlocks(n,i,l)}):e.pipe(De(this.destroy)).subscribe(n=>{this.processRoomBlocks(n)})}processRoomBlocks(e,n=[],i=!0){this.activeRoomBlock=e?.find(l=>l.bookingStatus!==vn.CANCELED),this.hasRoomBlocks=!!this.activeRoomBlock,e?.forEach(l=>{l.users=this.getUsersFromPassengers(l.passengers,l.tripItems,n,i)}),this.roomBlocks=e,this.checkRoomBlocks()}getUsersFromPassengers(e,n=[],i=[],l=!0){let d=new Set(i.map(h=>h.id)),u=!l;return e.map(h=>{let I=(n||[]).find(F=>F.userUuid===h.id);return{id:h.id,givenName:h.firstName,familyName:h.lastName,email:h.email,picture:h.pictureUrl,tripUuid:I?.tripUuid,removed:u&&!!h.id&&!d.has(h.id)}})}get canProceedToRoomBlocks(){return this.isTravelEventRoomBlockEnabled&&!this.isOffsite&&this.form.valid&&this.isFormValid&&!this.form.dirty}sendLoadedEvent(){Ke()&&!this.loadedEventSent&&(this.internalAppsCommunicatorService.teamEventLoaded(),this.loadedEventSent=!0)}static{this.\u0275fac=function(n){return new(n||t)(T(qe),T(Ei),T(Je),T(gt),T(na),T(Ce),T(et),T(vt),T(tn),T(Ae),T(nn),T(ve),T(Tt),T(ma),T(Yn),T(zs),T(Wn),T(ra),T(en),T(it),T(ki),T(B_),T(Xn),T($s),T(ta),T(H_),T(Fi),T(ga),T(zn),T(la),T(hn),T(Ce))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-team-event"]],viewQuery:function(n,i){if(n&1&&(st(ev,5),st(tv,5),st(re,5),st(nv,5),st(iv,5)),n&2){let l;lt(l=_t())&&(i.eventUsersMonitoringComponent=l.first),lt(l=_t())&&(i.tabsComponent=l.first),lt(l=_t())&&(i.popoverRef=l.first),lt(l=_t())&&(i.teamEventSettingsComponent=l.first),lt(l=_t())&&(i.policyPaymentComponent=l.first)}},standalone:!0,features:[y],decls:6,vars:8,consts:()=>{let e;e=$localize`:␟c5987faaaa6a61c2ddf254e38d61c8dbb63cc43b␟2269991137857816782:You currently do not have permission to send out team event invites`;let n;n=$localize`:␟ddcaecf166722919276046b6de455af953639d4b␟4222665311148778176:Admins can see all events, including drafts, on the events page`;let i;i=$localize`:␟00445d095fef978025029b2335be3b0ec63941b4␟1220236071540086282:Please reach out to your admin for next steps: `;let l;l=$localize`:␟e5a9e62dc6262bf420ed9b4d91eda30840a9eb7a␟5604801204265800939: Please reach out to an admin for next steps `;let d;return d=$localize`:␟46f15ce155f68d2c5383893e7eb94fd424755602␟3083040219911301089:Participant list`,[["teamEventHeaderForm",""],["teamEventTabs",""],["settingsComponent",""],["policyPaymentComponent",""],e,
5n,i,l,d,[1,"event-details",3,"taLoading"],["class","search-form-team","taFormGroup","",3,"formGroup","ngClass",4,"ngIf"],[3,"disabled","loading","cancel","save",4,"ngIf"],[4,"ngIf"],["taFormGroup","",1,"search-form-team",3,"formGroup","ngClass"],["class","event-details__tab","role","tablist",4,"ngIf"],[3,"ngClass"],[1,"event-details__main"],["class","event-details__header",4,"ngIf"],[1,"event-details__card"],[1,"users-section"],[1,"users-section__footer"],["class","users-section__footer-block",4,"ngIf"],[1,"users-section__footer-block"],[1,"users-section__footer-block-content"],[3,"showTotalCost","totalCost","totalEstimate","isExtraGuestAllowed","isLoading","hasRoomBlockMismatch"],[1,"event-settings-main"],["formControlName","settings",3,"userInfo","isTeamOffsite","isTeamOffsiteClaimedAdmin","isBoomPopEvent","numberOfParticipants","isExtraGuestAllowedByAccessControl","companyUserFields","customFields",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"goToPolicyAndPayments","teamEventSearchConfig","isDraft","hasRoomBlocks","isEditModeDisabled","roomBlocks","roomBlockMissingParticipants","teamEventId","travelWindows","isOffsite","roomBlockMissingEventSettings","isMissingPermissionToBookAccommodations"],[4,"ngIf","ngIfElse"],[3,"sendInvitesClick","showSendInvites","disableSendInvites","hasRoomBlocks","teamEventRoomBlocksEnabled","activeTab","isOffsite","isSelfSellGroupTravelOnboardingEnabled"],[3,"sendInvitesClick","eventUpdated","eventDetails","showSendInvites","disableSendInvites","hasRoomBlocks","teamEventRoomBlocksEnabled","isEditModeDisabled","activeTab","isOffsite"],[3,"declineProposal","approveProposal","requesterNote"],[3,"scrollToDetails","openAddParticipantsModal","sendInvites","requestApproval","isValid","numberOfParticipants","tagData","isApprovalRequestedAtLeastOnce","proposalStatus","approverName","approveDate","approverNote","isSaving"],[3,"scrollToDetails","openAddParticipantsModal","openPolicyAndPayments","openAccommodations","sendInvites","isValid","isTeamOffsite","isPendingSave","isSaving","teamOffsiteStep","canSendInvites","hasRoomBlocks","activeTab","activateSendInvitesWhenFiltersApplied","isTravelEventRoomBlockEnabled"],["type","WARNING",3,"showClose"],["title",""],["description",""],[4,"ngFor","ngForOf"],[3,"click"],["role","tablist",1,"event-details__tab"],["width","auto",3,"change","tabs","tourGuideStepRef","activeTab","height","isSelfSellGroupTravelOnboardingEnabled"],[1,"event-details__header"],[1,"event-details__header__title"],[3,"closeRoomBlockOnlyBanner","teamEventId","teamEventName","isEventSent","isEditModeDisabled","hasRoomBlocks","bodyElRef","teamEventRoomBlocksEnabled","teamEventNonRoomBlockBookingEnabled","roomBlockMissingParticipants","roomBlockAddedParticipants","tripUuid","isSelfSellGroupTravelOnboardingEnabled","activeTab"],[3,"carbonFootprint"],["formControlName","settings",3,"userInfo","isTeamOffsite","isTeamOffsiteClaimedAdmin","isBoomPopEvent","numberOfParticipants","isExtraGuestAllowedByAccessControl","companyUserFields","customFields"],[3,"disabled","activeTab",4,"ngIf"],[3,"disabled","userInfo",4,"ngIf"],[3,"disabled","activeTab"],[3,"disabled","userInfo"],[1,"policy-payment-main"],["formControlName","policyAndPayment",3,"isTeamOffsite","isTeamOffsiteClaimedAdmin","companyUserFields","customFields","isTravelEventRoomBlockEnabled",4,"ngIf"],["formControlName","policyAndPayment",3,"isTeamOffsite","isTeamOffsiteClaimedAdmin","companyUserFields","customFields","isTravelEventRoomBlockEnabled"],[3,"cancel","save","disabled","loading"]]},template:function(n,i){n&1&&(r(0,"div",9),P(1,"async"),p(2,bv,34,62,"form",10),s(),p(3,yv,4,8,"ta-sticky-footer",11)(4,Iv,1,0,"ng-container",12),P(5,"async")),n&2&&(a("taLoading",A(1,4,i.travelEventQuery.isSaving$)),o(2),a("ngIf",i.form),o(),a("ngIf",i.showSaveBar),o(),a("ngIf",A(5,6,i.eventMetadata$)))},dependencies:[Mt,L,je,Ut,Me,Xe,ps,Qt,Qr,he,Ge,Qe,Ht,g_,v_,Kn,Nl,Sl,gl,$n,Ai,_e,as,E_,Ll,Ul,$_,ul,h_,b_,F_,ol,we,K,ie],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.event-details[_ngcontent-%COMP%]{border-radius:8px;padding:var(--dim-step5)}.event-details__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--dim-step8)}.event-details__header__title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xl);font-weight:var(--text-weight-bold);text-align:start;line-height:var(--dim-step9);margin:var(--dim-step2) 0 var(--dim-step2) 0}.event-details__subheader[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-medium);font-weight:var(--text-weight-regular);text-align:start;line-height:24px;margin:0 0 var(--dim-step8) 0}.event-details__subheader--link[_ngcontent-%COMP%]{color:var(--ta-color-text-primary);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;line-height:24px;margin:0 0 var(--dim-step8) 0;text-decoration:underline;cursor:pointer}.event-details__subheader--link[_ngcontent-%COMP%]:hover{color:var(--ta-color-text-default)}.event-details__tab[_ngcontent-%COMP%]{margin-bottom:20px}.event-details__tab--room-block[_ngcontent-%COMP%]{margin-bottom:var(--dim-step11)}.event-details__card[_ngcontent-%COMP%]{display:block;background-color:var(--ta-color-surface-default);box-shadow:0 1px 4px #0003;border-radius:10px;box-sizing:border-box;margin-bottom:var(--dim-step6)}.event-details__card-title[_ngcontent-%COMP%]{color:var(--ta-color-text-default);font-size:var(--text-size-xb);font-weight:var(--text-weight-bold);text-align:start;display:flex;margin-bottom:var(--dim-step5)}.event-details__card-title-icon[_ngcontent-%COMP%]{margin-right:var(--dim-step2)}.event-details__notifications[_ngcontent-%COMP%]{margin-bottom:var(--dim-step6);display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;flex-wrap:nowrap}.event-details__footer[_ngcontent-%COMP%]{text-align:center;margin-top:var(--dim-step8);display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:nowrap}.event-details__footer-button[_ngcontent-%COMP%]{margin-left:var(--dim-step2)}.event-details__footer-link[_ngcontent-%COMP%]{color:var(--ta-color-text-primary);font-size:var(--text-size-big);font-weight:var(--text-weight-bold);text-align:start;margin-bottom:var(--dim-step7);
5display:inline-block}.event-details__footer-link--warn[_ngcontent-%COMP%]{color:var(--ta-color-text-warning)}.event-details__banner[_ngcontent-%COMP%]{display:block;margin-bottom:var(--dim-step6)}.hidden-tab[_ngcontent-%COMP%]{visibility:hidden;height:0;overflow:hidden}.search-form-team--save-toaster[_ngcontent-%COMP%]{padding-bottom:var(--dim-step20)}section[_ngcontent-%COMP%]{max-width:1128px;margin:var(--dim-step5) auto var(--dim-step10);padding:0 var(--dim-step3)}.notifications__block[_ngcontent-%COMP%]{flex:0 0 calc(50% - var(--dim-step2))}.field-close-icon[_ngcontent-%COMP%]     .ta-select-option__label, .field-close-icon[_ngcontent-%COMP%]     .ta-select-option__icon{color:var(--ta-color-text-primary);font-weight:var(--text-weight-medium)}.field-close-icon[_ngcontent-%COMP%]     .ta-svg-image{width:24px;height:24px}.settings-two-columns[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:normal;justify-content:flex-start;flex-wrap:nowrap;gap:40px}.users-section[_ngcontent-%COMP%]{padding:var(--dim-step6) var(--dim-step10) 0 var(--dim-step8)}.users-section__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap}.users-section__footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;flex-wrap:nowrap}.users-section__footer-block[_ngcontent-%COMP%]{flex:1;border-right:1px solid var(--ta-color-divider-default)}.users-section__footer-block-content[_ngcontent-%COMP%]{padding:var(--dim-step6)}.users-section__footer-block[_ngcontent-%COMP%]:first-child   .users-section__footer-block-content[_ngcontent-%COMP%]{padding-left:0}.users-section__footer-block[_ngcontent-%COMP%]:last-child{border-right:0}.backdrop[_ngcontent-%COMP%]{background:var(--ta-color-surface-default);opacity:.5;position:fixed;inset:0;z-index:2}.event-settings-main[_ngcontent-%COMP%], .policy-payment-main[_ngcontent-%COMP%]{max-width:760px;margin:auto}.central-block[_ngcontent-%COMP%]{display:block;width:100%;margin:0 auto;background:none;padding:0}.send-invite-popover[_ngcontent-%COMP%]{padding:var(--dim-step4) var(--dim-step5)}.flexibility-block--bottom-margin[_ngcontent-%COMP%]{margin-bottom:var(--dim-step7)}"]})}}return t})();E();E();E();E();E();be();var Lv=[".amazonaws.com"],Uv=[".csv",".xls",".xlsx",".zip"],W_=(()=>{class t{constructor(e,n){this.groupTravelApiService=e,this.route=n,this.message=$localize`Downloading report...`}ngOnInit(){this.route.queryParams.pipe(ue(e=>{let n=e.fileKey;if(!n)throw new Error("File key is missing");return this.groupTravelApiService.downloadFile(this.route.snapshot.paramMap.get("eventUuid"),n)})).subscribe({next:e=>this.goByUrl(e.url),error:()=>this.message=$localize`Could not download report`})}goByUrl(e){let n=new URL(e),i=Lv.some(d=>n.host.endsWith(d)),l=Uv.some(d=>n.pathname.endsWith(d));if(n.protocol!=="https:"){this.message=$localize`Something went wrong`,console.error("Download file URL protocol must be HTTPS");return}if(!i){this.message=$localize`Something went wrong`,console.error("Download file URL domain is not supported");return}if(!l){this.message=$localize`Something went wrong`,console.error("Download file extension is not supported");return}window.location.replace(n.href),this.message=$localize`Report downloaded successfully`}static{this.\u0275fac=function(n){return new(n||t)(T(Ae),T(Ei))}}static{this.\u0275cmp=b({type:t,selectors:[["ta-download-report"]],standalone:!0,features:[y],decls:1,vars:1,template:function(n,i){n&1&&C(0),n&2&&B("",i.message,`
6`)},styles:["[_nghost-%COMP%]{padding:var(--dim-step4);display:block}"]})}}return t})();E();E();E();E();E();E();be();var K_=(()=>{class t{constructor(e,n,i,l,d,u,h){this.groupTravelApiService=e,this.preloadAssetsService=n,this.growthService=i,this.userComponentService=l,this.elRef=d,this.sessionQuery=u,this.userEducationService=h,this.isSelfSellGroupTravelOnboardingEnabled=!1,this.description=$localize`Easily manage group travel by creating an event. Customize settings, invite participants to book on their own, or reserve a hotel room block—all while tracking projected and actual costs.`,this.preloadAssetsService.preloadFromCdn(["growth/group-travel/create-group-event-bg.webp"])}ngOnInit(){N(X.CREATE_GROUP_TRAVEL_LOADED)}ngAfterViewInit(){this.prepareEventEducation()}attachEventEducationalComponent(e){setTimeout(()=>{let n=this.elRef.nativeElement.querySelector(".team-event-overlay__form__location-form");if(n){let i={yOffset:-20,header:$localize`Create a group travel event`,body:$localize`Tell us where and when your group will be traveling, and what to call your event— you can update these later.`};this.userEducationService.createServerEducationalComponent(n,i,e,this.elRef,null)}},500)}prepareEventEducation(){let e=Pt.TEAM_EVENT_ROOM_BLOCKS_EVENT_NAME_POPOVER;this.sessionQuery.selectUserInfo$.pipe(ce(1),Be(n=>{this.isSelfSellGroupTravelOnboardingEnabled=this.growthService.isSelfSellGroupTravelOnboardingEnabled(n)}),ue(n=>(this.userInfo=n,this.growthService.isGrowthSelfSell(n)?Ue([this.userComponentService.isComponentOn$(e),this.userComponentService.isComponentOn$(Pt.TEAM_EVENT_ROOM_BLOCKS_WELCOME_MODAL),this.groupTravelApiService.getEvents(0,{organizers:[n?.uuid]}).pipe(ce(1))]).pipe(Q(([i,l,d])=>({isTooltipOn:i,isModalOn:l,travelEventListItems:d,userInfo:n}))):ro))).subscribe({next:({isTooltipOn:n,isModalOn:i,travelEventListItems:l,userInfo:d})=>{this.totalElements=l?.travelEvents?.totalElements;let u=this.growthService.isSelfSellGroupTravelOnboardingEnabled(d);n&&!u&&(!i||!this.growthService.isFirstGroupTravelAdminOnCompany(d))&&this.totalElements===0&&this.attachEventEducationalComponent(e)},error:n=>{console.error(n?.message)}})}static{this.\u0275fac=function(n){return new(n||t)(T(Ae),T(ta),T(en),T(ki),T(it),T(vt),T(xs))}}static{this.\u0275cmp=b({type:t,selectors:[["create-group-event"]],standalone:!0,features:[y],decls:4,vars:5,consts:[[1,"create-group-event"],[1,"create-group-event__container"],[3,"isSelfSellGroupTravelOnboardingEnabled","teamOffsite","description","userInfo","isDismissHidden"],[1,"create-group-event__background-container"]],template:function(n,i){n&1&&(r(0,"div",0)(1,"div",1),m(2,"ta-team-event-overlay",2),s(),m(3,"div",3),s()),n&2&&(o(2),a("isSelfSellGroupTravelOnboardingEnabled",i.isSelfSellGroupTravelOnboardingEnabled)("teamOffsite",!0)("description",i.description)("userInfo",i.userInfo)("isDismissHidden",i.totalElements===0))},dependencies:[Cl],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.create-group-event[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;background-color:var(--ta-color-surface-raised);width:100%;min-height:100vh;position:relative;backface-visibility:hidden}.create-group-event__container[_ngcontent-%COMP%]{width:1128px;z-index:10;margin-top:var(--dim-step8)}.create-group-event__background-container[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;width:100%;height:calc(100vh - 250px);background-image:url(https://d2w7f1pl8j4yzn.cloudfront.net/growth/group-travel/create-group-event-bg.webp);background-size:cover;background-position:top;z-index:0}"]})}}return t})();E();E();E();E();E();E();function wv(t,_){if(t&1&&(r(0,"div",22)(1,"div",23),C(2),s(),r(3,"div",24),C(4),s()()),t&2){let e=_.$implicit,n=_.index;
6o(2),dn(" ",n+1,". ",e.title," "),o(2),B(" ",e.description," ")}}var Q_=(()=>{class t{constructor(e,n,i){this.router=e,this.createEventNavigationService=n,this.window=i,this.steps=[{title:$localize`Create your group travel event`,description:$localize`Enter the location, dates, and choose a name for your event. You can update these details later if plans change.`},{title:$localize`Set your preferences`,description:$localize`Set arrival and departure times for participants, recommend hotels, choose payment methods, add notes, and more.`},{title:$localize`Add participants`,description:$localize`Create your participant list and specify the bookings they'll need. You'll see estimated booking costs, and participants won't see the event until you send the invites.`},{title:$localize`Send invites`,description:$localize`Once your preferences are set and participants are added, you'll be ready to send invites! We'll notify you as bookings are made and show you actual booking costs. `}],N(X.GROUP_TRAVEL_EMPTY_STATE_VIEW,{},!0)}createEvent(e){N(X.GROUP_TRAVEL_CREATE_EVENT_BUTTON_CLICK,{location:e},!0),this.createEventNavigationService.navigateToCreateEventWhenReady(this.window,()=>this.router.navigate(["/group-travel/create"],{state:{bypassGuard:!0}}))}static{this.\u0275fac=function(n){return new(n||t)(T(Je),T(aa),T(Di))}}static{this.\u0275cmp=b({type:t,selectors:[["group-travel-landing-page"]],standalone:!0,features:[y],decls:26,vars:9,consts:()=>{let e;e=$localize`:␟5c939da8e23b79399f30b617dd9514663bad39b0␟6612580946545131013:Create event`;let n;n=$localize`:␟5c939da8e23b79399f30b617dd9514663bad39b0␟6612580946545131013:Create event`;let i;i=$localize`:␟6230093058322b573f0cc7544169592b991c1e3c␟6754394017164791684: Group travel `;let l;l=$localize`:␟9c13838634f81aaef2e8bc47f5f334e1dbca97f7␟777130838789358940: The best way to organize travel for your team's next event. `;let d;d=$localize`:␟f43adb6ac6233f457fc21a5256afffeb26dad186␟902685381659532871: How it works `;let u;u=$localize`:␟8923f779f1f27ea835008a96a47cf363fc2200d4␟8375821291744490359: Simplify stays with a hotel room block `;let h;return h=$localize`:␟cadfbc777b46b15f72c4a624ffa1d342b12ab5eb␟4895450988851197862: Book up to 9 rooms at the same hotel for easier coordination and lock in the same rate for all participants. `,[i,l,d,u,h,["data-testid","groupTravelLandingPage",1,"group-travel-lp"],[1,"group-travel-lp__header"],[1,"group-travel-lp__header__title"],[1,"group-travel-lp__header__subtitle"],["data-testid","group-travel-lp-create-event","flex","true","size","medium","text",e,3,"clickEvent"],[1,"group-travel-lp__body"],[1,"group-travel-lp__body__content"],[1,"group-travel-lp__body__content__title"],[1,"group-travel-lp__body__content__steps"],["class","group-travel-lp__body__content__steps__step",4,"ngFor","ngForOf"],["size","medium","text",n,"data-testid","group-travel-lp-create-event-bottom",1,"group-travel-lp__body__content__cta",3,"clickEvent"],[1,"group-travel-lp__body__image"],["alt","Group travel Terminal",3,"src"],[1,"group-travel-lp__footer"],["alt","Group travel hotel",1,"group-travel-lp__footer__image",3,"src"],[1,"group-travel-lp__footer__text"],[1,"group-travel-lp__footer__text__title"],[1,"group-travel-lp__body__content__steps__step"],[1,"group-travel-lp__body__content__steps__step__title"],[1,"group-travel-lp__body__content__steps__step__description"]]},template:function(n,i){n&1&&(r(0,"div",5)(1,"div",6)(2,"div")(3,"h1",7),g(4,0),s(),r(5,"p",8),g(6,1),s()(),r(7,"ta-button-v2",9),S("clickEvent",function(){return i.createEvent("header")}),s()(),r(8,"div",10)(9,"div",11)(10,"p",12),g(11,2),s(),r(12,"div",13),p(13,wv,5,3,"div",14),s(),r(14,"ta-button-v2",15),S("clickEvent",function(){return i.createEvent("bottom")}),s()(),r(15,"div",16),m(16,"img",17),P(17,"cdnImage"),s()(),r(18,"div",18),m(19,"img",19),P(20,"cdnImage"),r(21,"div",20)(22,"p",21),g(23,3),s(),r(24,"p"),g(25,4),s()()()()),n&2&&(o(13),a("ngForOf",i.steps),o(3),a("src",Ot(17,3,"f_auto,q_auto/v1738749907/site/growth/group-travel-self-sell/terminal.png",!0),ze),o(3),a("src",Ot(20,6,"f_auto,q_auto/v1738578323/site/growth/group-travel-self-sell/bed.png",!0),ze))},dependencies:[mt,_e,ie,Ee,fn],styles:["@keyframes _ngcontent-%COMP%_placeHolderShimmer{0%{background-position:-960px 0}to{background-position:960px 0}}@keyframes _ngcontent-%COMP%_error-blink{0%{background-color:#fff0f0}20%{background-color:#ffc0c0}40%{background-color:#fff0f0}to{background-color:#fff0f0}}.group-travel-lp[_ngcontent-%COMP%]{width:1000px;margin:auto auto 100px;padding-top:var(--dim-step7)}.group-travel-lp__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;margin-bottom:var(--dim-step4)}.group-travel-lp__header__title[_ngcontent-%COMP%]{font-family:nvn-heading,Sanomat;font-size:var(--ta-size-padding-40);font-weight:var(--text-weight-medium);line-height:56px;margin-block-end:0;margin-block-start:0}.group-travel-lp__header__subtitle[_ngcontent-%COMP%]{margin-block-start:0;color:var(--ta-color-palette-gray-60, #68687d)}.group-travel-lp__body[_ngcontent-%COMP%]{position:relative;box-sizing:border-box;border-radius:var(--dim-step2);background:var(--color-white);width:100%;padding:var(--dim-step10)}.group-travel-lp__body__content[_ngcontent-%COMP%]{width:550px}.group-travel-lp__body__content__steps[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;flex-wrap:wrap;gap:var(--dim-step4);margin-bottom:var(--dim-step6)}.group-travel-lp__body__content__steps__step[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;flex-direction:column;gap:var(--dim-step3)}.group-travel-lp__body__content__steps__step__title[_ngcontent-%COMP%]{font-size:var(--ta-size-font-heading-small);font-weight:var(--text-weight-medium)}.group-travel-lp__body__content__steps__step__description[_ngcontent-%COMP%]{line-height:var(--dim-step6)}.group-travel-lp__body__content__title[_ngcontent-%COMP%]{color:var(--ta-color-palette-gray-60, #68687d);font-size:var(--text-size-medium);font-weight:var(--text-weight-medium);text-align:start;line-height:24px;margin:0 0 var(--dim-step6) 0}.group-travel-lp__body__image[_ngcontent-%COMP%]{position:absolute;top:0;right:0}.group-travel-lp__body__image[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{border-radius:var(--dim-step2)}.group-travel-lp__footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:nowrap;background:var(--color-palette-gray-200, #EBEAF0);border-radius:var(--dim-step2)}.group-travel-lp__footer__image[_ngcontent-%COMP%]{border-radius:var(--dim-step2)}.group-travel-lp__footer__text[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding:0 40px}.group-travel-lp__footer__text__title[_ngcontent-%COMP%]{font-size:20px;font-weight:var(--text-weight-medium);margin-block-end:0}"]})}}return t})();E();be();var Ja=(()=>{class t{constructor(e,n,i,l){this.router=e,this.growthService=n,this.sessionQuery=i,this.groupTravelApiService=l}canActivate(e,n){return this.router.getCurrentNavigation()?.extras?.state?.bypassGuard?Te(!0):this.sessionQuery.selectUserInfo$.pipe(ue(i=>{let l=this.growthService.isAdminClaimedWithoutAffiliate(i);if(!this.growthService.isGrowthSelfSell(i))return Te(!0);let u={types:l?[sn.TEAM_OFFSITE,sn.GROUP_TRAVEL]:[sn.TEAM_OFFSITE]};return this.groupTravelApiService.getEvents(0,u).pipe(Q(h=>!h.travelEvents?.totalElements?(this.router.navigate(["/group-travel/landing-page"]),!1):!0),Ye(()=>Te(!0)))}))}static{this.\u0275fac=function(n){return new(n||t)(xe(Je),xe(en),xe(vt),xe(Ae))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();E();be();var q_=(()=>{class t{constructor(e,n,i,l){this.groupTravelApiService=e,this.travelEventQuery=n,this.travelEventStore=i,this.taToastrService=l}resolve(e,n){let i=e.params.eventUuid,l=this.travelEventQuery.selectEntity(i).pipe(ce(1),ue(u=>u?Te(u):this.groupTravelApiService.getTravelEvent(i)),Be(u=>this.travelEventStore.setActiveEvent(u))),d=this.travelEventQuery.companySettings$.pipe(ce(1),ue(u=>u?Te(u):this.groupTravelApiService.getTravelEventCompanySettings()));return Ue([l,d]).pipe(ce(1),Ye(u=>{let h="";return u instanceof Er&&(h=u.error.message),u instanceof Error&&(h=u.message),this.taToastrService.error($localize`Event could not be opened.`+(h?` ${h}`:"")),ro}))}static{this.\u0275fac=function(n){return new(n||t)(xe(Ae),xe(ve),xe(tn),xe(gt))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();E();be();var J_=(()=>{class t{constructor(e,n,i,l){this.window=e,this.splitService=n,this.travelEventQuery=i,this.groupTravelApiService=l}canActivate(e){return Ra(this,null,function*(){let n=e.params.eventUuid;return this.splitService.isOn("ENT_EVENTS_NEW_REACT_EXPERIENCE")&&!Ke()&&!(yield this.isEventTypeOffsite(n))?(this.window.open(`${ri}/${n}/overview`,"_self"),!1):!0})}isEventTypeOffsite(e){return Ra(this,null,function*(){return(yield nr(this.travelEventQuery.selectEntity(e).pipe(ce(1),ue(i=>i?Te(i):this.groupTravelApiService.getTravelEvent(e))))).type===sn.TEAM_OFFSITE})}static{this.\u0275fac=function(n){return new(n||t)(xe(Di),xe(Ce),xe(ve),xe(Ae))}}static{this.\u0275prov=pt({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var UU=[{path:"",providers:[ma,jn,Ea,sl,_a,sa,Ks,Xs],children:[{path:"landing-page",component:Q_},{path:"create",component:K_,canActivate:[Ja]},{path:"list",component:Xl,canActivate:[Ja]},{path:":eventUuid",component:Y_,canActivate:[Fl,J_],canDeactivate:[rl],resolve:{entity:q_}},{path:":eventUuid/download",component:W_},{path:"",redirectTo:"list",pathMatch:"full"}]}];export{UU as routes};

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.