1import{a as fr,b as qi,c as zi,d as Zn,e as Oa,f as ya,g as xa}from"./chunk-UYLCDBRU.js";import{a as pa}from"./chunk-JPWHMTHX.js";import{a as Gn,b as Qn,c as Jn,d as ea,e as ta,f as Xi,g as ia,h as hi,i as oa,j as ra,k as na,l as aa,m as sa,n as la,o as ca}from"./chunk-6RG2AAUO.js";import{a as pr}from"./chunk-NUIN25Z7.js";import"./chunk-ITXRGSBY.js";import"./chunk-U46GKHG6.js";import{a as Bn,b as ui}from"./chunk-5SLM2TXV.js";import{a as Nn}from"./chunk-F7KDYCH4.js";import{a as kn,b as Tn,c as Mn,d as Fn,e as wn,f as En,g as Gi,h as Qi,i as nt}from"./chunk-UYA3IDM2.js";import"./chunk-NIEWYKLB.js";import"./chunk-4NBGPUQ2.js";import"./chunk-ALUVFOOK.js";import{a as mi,c as ma,d as da,e as ua,g as ha,h as _a,l as ga,n as Sa,o as Ca,r as va,s as Pa}from"./chunk-BN7QZEK4.js";import{b as Wn,c as Yn}from"./chunk-I3T4K6UN.js";import"./chunk-OLJ2ABGX.js";import{a as Hn}from"./chunk-3W3G7NEK.js";import{a as qn}from"./chunk-V5YGBLEJ.js";import{a as $n,b as Un}from"./chunk-6A774HWC.js";import{a as zn}from"./chunk-ZXBHKINM.js";import"./chunk-2AU7QBEB.js";import{a as Wi}from"./chunk-NAGZIUVD.js";import"./chunk-LX2ZT3FA.js";import"./chunk-DBNFOAO4.js";import"./chunk-YWCRPL3K.js";import"./chunk-FJVLRWII.js";import"./chunk-3DUAOSZT.js";import{a as Kn}from"./chunk-JNZZ6ZCT.js";import"./chunk-3SJ4NFPR.js";import{b as Xn}from"./chunk-6CYIAEV3.js";import{a as An,b as Rn,c as Ln,d as di}from"./chunk-ZK4WEZ5P.js";import"./chunk-APASHIFL.js";import{a as In,b as Dn}from"./chunk-MSNET3JO.js";import"./chunk-6GZNPSWW.js";import"./chunk-K4MSM4WG.js";import{a as kr}from"./chunk-PPOHNLXW.js";import{b as Pn,c as bn,d as fa}from"./chunk-AYNRXOXR.js";import{a as _n,b as pi,c as Cn}from"./chunk-PMKSQKUJ.js";import{a as Sn}from"./chunk-N3USYP6O.js";import{a as rt,b as fi}from"./chunk-NOJG23FQ.js";import{a as $i,b as un,c as hn,h as vn}from"./chunk-RPI4WXQ5.js";import{b as wr,c as dn,d as Ni,e as Tt}from"./chunk-EOROI5BA.js";import{c as jn,e as Vn}from"./chunk-YLPQ3MWF.js";import"./chunk-HR755263.js";import{c as Ui}from"./chunk-F37DFTGE.js";import{b as On,c as yn,d as xn,f as Hi}from"./chunk-CWIJHORJ.js";import{a as gn,d as ci}from"./chunk-HMIVF3GU.js";import{a as Xt}from"./chunk-4MM3CUEM.js";import{a as ei,b as ni,c as Vr,f as rn,g as nn,h as fn,i as li,k as mn}from"./chunk-F35KXY5G.js";import"./chunk-QASTAEA3.js";import{A as P,B as Jr,C as Li,D as j,E as en,G as tn,H as on,I as Bi,J as kt,K as N,L as an,M as sn,N as ln,O as cn,P as ji,Q as Vi,R as pn,h as jr,r as wi,v as Di,w as bt,x as Ur,y as Hr}from"./chunk-JU3DEOWY.js";import{d as yi,g as $r}from"./chunk-7GKGBSIZ.js";import"./chunk-4T7RNU6K.js";import{a as Ii}from"./chunk-AIS5XO32.js";import{m as Wr}from"./chunk-4CQGKORS.js";import{c as Xr,e as Yr,h as Kr}from"./chunk-B4AWG7CY.js";import{c as Tr,d as Mr}from"./chunk-MEJXHMSO.js";import"./chunk-PWHZ4ZYG.js";import"./chunk-B4QWCRYA.js";import"./chunk-HOADZ3FF.js";import"./chunk-RCXLAM2A.js";import"./chunk-IDETHVUV.js";import"./chunk-U2JUGXNZ.js";import{c as Ar,k as yt}from"./chunk-2ZF4NK4V.js";import"./chunk-ZLSKFZ2T.js";import{a as Ir,b as Dr,e as Fi,f as Rr,i as Lr,l as ai,m as Br}from"./chunk-2ZTVM3T3.js";import{a as si,b as Zr}from"./chunk-VCYJHWMW.js";import"./chunk-6JNU4IBW.js";import{a as Nr,b as Ei,c as Ai,d as xt}from"./chunk-7VZYK2YZ.js";import"./chunk-5FLWDBMW.js";import{a as Qr}from"./chunk-KR3UX24N.js";import{a as ti,b as ii,c as Ot,d as ri,i as Er}from"./chunk-RTLFFRP4.js";import{a as oi}from"./chunk-TA36SRWX.js";import"./chunk-FTRRFH75.js";import{r as Ri}from"./chunk-MCCK5EV2.js";import{d as zr,e as Gr}from"./chunk-TFQKSA7T.js";import"./chunk-42MVB2UK.js";import"./chunk-PHDKZSMJ.js";import{a as Mi}from"./chunk-DOVMZU3V.js";import{b as Fr}from"./chunk-D4OFLXGC.js";import{d as ar,k as et,m as sr,n as Ce}from"./chunk-DOEEZE2M.js";import"./chunk-6IXNIOVL.js";import"./chunk-IK6LHSP5.js";import{c as qr}from"./chunk-H6VFWK3E.js";import"./chunk-QRQOT74E.js";import"./chunk-NMX7IUTQ.js";import"./chunk-DJOTXU3T.js";import"./chunk-LLKRHPEX.js";import"./chunk-HNOGK4DG.js";import{b as Oi}from"./chunk-53TSFHL7.js";import{a as zt}from"./chunk-7EI7SIPR.js";import{j as Sr}from"./chunk-TF7JCSPS.js";import{a as Cr}from"./chunk-LSR6WPFV.js";import{a as Ps}
1from"./chunk-WNU6RZIW.js";import"./chunk-XSFQIBNG.js";import"./chunk-HEKKPLNE.js";import{b as xr,e as br}from"./chunk-W37FCTIR.js";import"./chunk-23MQK2BR.js";import"./chunk-A4Z26JBV.js";import"./chunk-AA7Y7LIM.js";import{b as pe}from"./chunk-YW2BWIT4.js";import{a as Ve}from"./chunk-F2FRKFAZ.js";import"./chunk-UYDYKDGR.js";import{a as vr}from"./chunk-QGSHHFP7.js";import"./chunk-HQJOTQQO.js";import"./chunk-FNTJHQ4C.js";import"./chunk-C3POATVJ.js";import"./chunk-MJKZM7FH.js";import"./chunk-3QFCW5XA.js";import"./chunk-BHMXNJKB.js";import{a as Jt,b as ot}from"./chunk-TPHK7BBA.js";import"./chunk-F7WTWR5H.js";import"./chunk-O2QZHS76.js";import{c as Yt,e as it,g as fe}from"./chunk-IE3SAPII.js";import"./chunk-LUUZ4PZO.js";import"./chunk-6J6FKHGZ.js";import{m as ki,n as Ti,q as vt}from"./chunk-OEASEAUF.js";import{d as Pt}from"./chunk-HDTXC5QX.js";import{F as Or,G as yr,h as Kt,m as Pr,o as Zt}from"./chunk-RIBOCQZ7.js";import{a as gr}from"./chunk-65NKH7ED.js";import"./chunk-LKRSUA5O.js";import{a as ce,d as ve,e as ze,o as x,s as mr,t as ee,u as xi,v as dr,w as M,x as V,y as A,z as bi}from"./chunk-USFBPPJI.js";import"./chunk-464T4VHX.js";import{a as Me,b as ur,c as hr,j as Qt,k as Wt}from"./chunk-XFC72DIV.js";import{m as Gt,o as cr}from"./chunk-UATFBOYT.js";import{a as ke,d as Te}from"./chunk-I5DD43AY.js";import"./chunk-RR4EYFQD.js";import{b as lr}from"./chunk-WTYCPADN.js";import{e as tt}from"./chunk-XWDUDBGP.js";import{a as _r}from"./chunk-3VUGGK7I.js";import{C as J,D as oe,E as rr,K as nr,n as tr,p as Ut,r as Ht,s as ir,u as qt,x as or}from"./chunk-WKUF5PZ6.js";import{$c as K,Ac as Ue,Ba as C,Bc as ue,Bd as Pi,Ca as v,Cd as q,Dc as Y,Dd as Jo,E as ut,Eb as jo,Fa as Io,Fd as Se,G as yo,Ga as Ee,Gd as ie,H as xo,Ha as Ae,Hd as je,I as H,Ka as It,Kb as X,Kc as b,L as bo,Lb as Vo,M as Si,Mb as Ie,Mc as c,N as ko,Na as te,Nb as De,O as Q,Ob as No,Pa as Do,Pd as er,Q as To,Qb as be,Rb as Ze,S as Mo,Sa as Ro,Uc as Lt,Va as xe,Vc as Bt,Wc as se,Xc as jt,Yc as He,Za as $,_c as E,ac as Je,ad as z,bc as $o,cb as Lo,cc as _t,da as Fo,ea as Ci,f as dt,fa as L,fd as Qo,ga as wo,gc as Uo,gd as Wo,hd as Xo,ia as B,id as le,jd as gt,ka as ht,kd as Be,l as ye,lc as O,m as Ke,md as Vt,nc as y,nd as St,oc as Rt,od as Nt,pa as U,pb as Dt,pc as Ho,pd as $t,qa as Eo,qb as Bo,qc as Re,qd as Yo,rc as Le,rd as Ko,sa as Ao,sc as h,sd as d,ta as we,tc as f,td as _,ua as a,uc as m,ud as qe,vb as l,vc as S,vd as Zo,w,wc as qo,x as de,xa as vi,xc as zo,xd as Ct,yc as Go,zc as $e}from"./chunk-HYQSEJCS.js";import{a as G,b as ae,d as At,h as vs,j as Oe}from"./chunk-AX2SH2D2.js";var Ge=(function(e){return e.OpenOfferInNewTabDesktop="HotelAndDynamicPackageSearchSettings.OpenOfferInNewTabDesktop",e.OpenOfferInNewTabMobile="HotelAndDynamicPackageSearchSettings.OpenOfferInNewTabMobile",e})(Ge||{}),Os={[Ge.OpenOfferInNewTabDesktop]:e=>e.features.packages.openTileInNewTabDesktop,[Ge.OpenOfferInNewTabMobile]:e=>e.features.packages.openTileInNewTabMobile},Yi=(()=>{let t=class t{constructor(){this.globalConfig=a(ce),this.abTestService=a($r),this.partnerSettingsAbTestsFlag=this.abTestService.getFeatureFlagSignal("bizon_override_settings")}getFlagValue(i){let o=this.partnerSettingsAbTestsFlag();if(o==null)return this.getFallbackValue(i);let r=o.value;if(r===null)return this.getFallbackValue(i);let s=this.extractValueFromFlag(r,i);return s!==null?s:this.getFallbackValue(i)}getFallbackValue(i){let o=Os[i];return o?o(this.globalConfig):null}extractValueFromFlag(i,o){let r=new RegExp(`${o}:(true|false)`),s=i.match(r);return s&&s[1]?s[1]==="true":null}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var xs=e=>({"active-slide":e});function bs(e,t){if(e&1&&(f(0,"div",1)(1,"div",2),E(2),m()()),e&2){let n=t.$implicit,i=t.$index,o=c();l(),h("ngClass",Nt(2,xs,i===o.currentSlide)),l(),z(" ",n," ")}}var at=class at{constructor(t){this.changeDetector=t,this.interval=2e3,this.slides=[],this.running=!1,this.currentSlide=0,this.stopSubject=new dt}ngOnChanges(t){t.hasOwnProperty("running")&&(t.running.currentValue?this.start():this.stop())}
1ngOnDestroy(){this.stop(),this.stopSubject.complete()}start(){this.currentSlide=0,yo(this.interval).pipe(wo(this.stopSubject.asObservable())).subscribe(()=>{this.changeSlide(this.currentSlide+1),this.currentSlide===this.slides.length-1&&this.stop()})}stop(){this.stopSubject.next(!0)}changeSlide(t){this.currentSlide=t,this.changeDetector.markForCheck()}};at.\u0275fac=function(n){return new(n||at)(jo(er))},at.\u0275cmp=X({type:at,selectors:[["esky-headline-slider"]],inputs:{interval:"interval",slides:"slides",running:"running"},standalone:!1,features:[Ro],decls:3,vars:0,consts:[[1,"search-header-slider"],[1,"header-element"],[1,"slide",3,"ngClass"]],template:function(n,i){n&1&&(f(0,"div",0),Re(1,bs,3,4,"div",1,Ho),m()),n&2&&(l(),Le(i.slides))},dependencies:[tr],styles:['@property --eui-font-family{syntax: "<font-family>"; inherits: false;}@property --eui-font-base{syntax: "<font-family>"; inherits: false;}@property --eui-font-head{syntax: "<font-family>"; inherits: false;}@property --eui-font-head-light{syntax: "<font-family>"; inherits: false;}@property --eui-font-mono{syntax: "<font-family>"; inherits: false;}@property --eui-font-mobile-base{syntax: "<font-family>"; inherits: false;}[_nghost-%COMP%]{display:block}.search-header-slider[_ngcontent-%COMP%]{padding-bottom:10px;line-height:20px}.slide[_ngcontent-%COMP%]{display:none;font-family:var(--eui-font-head-light, var(--eui-font-family, "Ubuntu-Light")),"Ubuntu Light","Ubuntu",sans-serif;font-size:16px;font-weight:300}.slide.active-slide[_ngcontent-%COMP%]{display:block;position:relative;animation:_ngcontent-%COMP%_animateFromBottom .4s}@keyframes _ngcontent-%COMP%_animateFromBottom{0%{bottom:-20px;opacity:0}to{bottom:0;opacity:1}}']});var Qe=at;Ke([tt()],Qe.prototype,"ngOnChanges",null);Ke([tt()],Qe.prototype,"ngOnDestroy",null);var Ki=(()=>{let t=class t{};t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=Vo({type:t}),t.\u0275inj=Eo({imports:[or,lr]});let e=t;return e})();function ba(e,t){if(!e)return!1;if(e.closest('[pi-popover][pi-state="opened"], .collapsibleModalBody'))return!0;let n=e.closest('dialog[pi-state="opened"]');if(!n)return!1;if(e!==n)return!0;let i=n.getBoundingClientRect();return t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom}function Zi(e){return e?[e,e.querySelector("qsf-portfolio-search-form")].filter(n=>n instanceof HTMLElement).some(n=>["collapsible","expanded","inlineExpanded"].every(i=>n.classList.contains(i))):!1}function Ts(e,t){if(e&1&&S(0,"le-stars",1),e&2){let n=c().$implicit;h("maxValue",n.maxValue)("value",n.displayValue)("size",16)}}function Ms(e,t){if(e&1&&S(0,"img",2),e&2){let n=c().$implicit;h("src",n.displayValue,Bo)}}function Fs(e,t){if(e&1&&S(0,"le-icon",3),e&2){let n=c().$implicit;h("name","pi-"+n.displayValue)("size",24)}}function ws(e,t){if(e&1&&(f(0,"div",4),S(1,"le-tripadvisor-rating",8),f(2,"span"),E(3),d(4,"i18n"),m()()),e&2){let n=c().$implicit;l(),h("value",n.value)("maxValue",n.maxValue)("size",16),l(2),K(Zo(4,4,"and_up",void 0,"filters"))}}function Es(e,t){if(e&1&&(f(0,"span",5),E(1),m()),e&2){let n=c().$implicit;l(),K(n.displayValue)}}function As(e,t){if(e&1){let n=Y();f(0,"span",0),O(1,Ts,1,3,"le-stars",1)(2,Ms,1,1,"img",2)(3,Fs,1,2,"le-icon",3)(4,ws,5,8,"div",4)(5,Es,2,1,"span",5),f(6,"button",6),b("click",function(){let o=C(n).$implicit,r=c();return v(r.onRemoveFilter(o))}),S(7,"le-icon",7),m()()}if(e&2){let n,i=t.$implicit;h("round",!0),l(),y((n=i.type)==="Stars"?1:n==="Image"?2:n==="Icons"?3:n==="Tripadvisor"?4:5),l(6),h("size",16)}}var ka=(()=>{let t=class t{constructor(){this.activeFilters=ie([]),this.removeFilter=Se()}onRemoveFilter(i){this.removeFilter.emit({value:i.originalValue,filterName:i.groupName,selected:!1,filterType:i.sourceFilterGroupType,groupId:i.groupId})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-active-filters-list"]],inputs:{activeFilters:[1,"activeFilters"]},outputs:{removeFilter:"removeFilter"},decls:2,vars:0,consts:[["le-chip","","color","accent-1","state","active",3,"round"],[1,"stars",3,"maxValue","value","size"],[1,"image",3,"src"],[3,"name","size"],[1,"tripadvisor-filter"],[1,"text"],["le-chip-action","",3,"click"],["name","pi-ic-s-cross",3,"size"],[3,"value","maxValue","size"]],template:function(o,r){o&1&&Re(0,As,8,3,"span",0,Rt),o&2&&Le(r.activeFilters())},dependencies:[$n,Hn,pe,Un,qn,fe],styles:["@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{display:flex;gap:.5rem;flex-wrap:wrap}.image[_ngcontent-%COMP%]{height:16px;width:auto}.text[_ngcontent-%COMP%]{font-size:14px;white-space:nowrap}.tripadvisor-filter[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.25rem}"],changeDetection:0});let e=t;return e})();var Is=["popover"],Ji=(()=>{let t=class t{constructor(){this.selectors=a(ui),this.store=a(x),this.popover=je.required("popover"),this.sorters=Te(this.selectors.sorters$),this.isSortingDisabled=Te(this.selectors.sortingDisabled$),this.selectedSorter=Jo({source:this.sorters,computation:i=>i.find(o=>o.selected)}),this.isPopoverOpen=te(!1),Do(()=>{let i=this.selectedSorter();!i||Pi(()=>this.sorters().find(o=>o.selected).id===i.id)||(Pi(()=>this.popover().close()),this.store.dispatch(N.changeSort(i)))})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-search-results-sorter"]],viewQuery:function(o,r){o&1&&Lt(r.popover,Is,5),o&2&&Bt()},features:[Vt([{provide:Yt,useValue:"sorters"}])],decls:13,vars:15,consts:[["popover",""],["le-button","","popovertarget","portfolioSorterPopover",3,"click","variant","color","size","disabled"],[1,"sort-by-title"],[1,"selection-value"],[3,"name","size"],["piPopover","","id","portfolioSorterPopover","piPosition","bottom-end",3,"piStateChange","piAutoClose"],["piPopoverContent",""],[3,"selectedSorterChange","sorters","selectedSorter"]],template:function(o,r){if(o&1){let s=Y();f(0,"button",1),b("click",function(){C(s);let u=se(10);
1return v(u.toggle())}),f(1,"span")(2,"span",2),E(3),d(4,"i18n"),m(),E(5,"\xA0 "),f(6,"span",3),E(7),m()(),S(8,"le-icon",4),m(),f(9,"dialog",5,0),b("piStateChange",function(u){return r.isPopoverOpen.set(u==="opened")}),f(11,"div",6)(12,"jan-sorter-selection-list",7),Xo("selectedSorterChange",function(u){return C(s),Wo(r.selectedSorter,u)||(r.selectedSorter=u),v(u)}),m()()()}if(o&2){let s;h("variant","outline")("color","neutral")("size","small")("disabled",r.isSortingDisabled()),l(3),z(" ",_(4,13,"Sort_by"),":"),l(4),K((s=r.selectedSorter())==null?null:s.displayName),l(),He("rotate",r.isPopoverOpen()),h("name","pi-ic-s-arrow-down")("size",24),l(),h("piAutoClose",!0),l(3),h("sorters",r.sorters()),Qo("selectedSorter",r.selectedSorter)}},dependencies:[Ve,pe,yr,Or,zn,fe],styles:["@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}#portfolioSorterPopover[_ngcontent-%COMP%]{min-width:340px;margin-top:.375rem;--pi-popover-padding: var(--pi-size-spacing-8)}le-icon[_ngcontent-%COMP%]{transition:transform .2s ease}le-icon.rotate[_ngcontent-%COMP%]{transform:rotate(180deg)}.sort-by-title[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1rem;font-weight:500}.selection-value[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1rem;font-weight:800}"],changeDetection:0});let e=t;return e})();var Ds=e=>({total:e}),Rs=(e,t)=>({count:e,total:t});function Ls(e,t){e&1&&(f(0,"div",7),S(1,"div",6),m())}function Bs(e,t){if(e&1&&(f(0,"div",0),S(1,"div",3),f(2,"div",4)(3,"div",5),S(4,"div",6),m(),O(5,Ls,2,0,"div",7),f(6,"div",8),S(7,"div",6),m()()()),e&2){let n=c();l(5),y(n.mapFeatureEnabled?5:-1)}}function js(e,t){if(e&1&&(S(0,"span",17),d(1,"plural"),d(2,"i18n")),e&2){let n=c();h("innerHTML",qe(2,4,qe(1,1,"Results_found",n.totalOffersCount),Nt(7,Ds,n.totalOffersCount)),Dt)}}function Vs(e,t){if(e&1&&(S(0,"span",17),d(1,"i18n")),e&2){let n=c();h("innerHTML",qe(1,1,"Results_of",$t(4,Rs,n.filteredOffersCount,n.totalOffersCount)),Dt)}}function Ns(e,t){if(e&1&&O(0,js,3,9,"span",17)(1,Vs,2,7,"span",17),e&2){let n=t;y(n.filteredOffersCount===n.totalOffersCount?0:1)}}function $s(e,t){if(e&1){let n=Y();f(0,"div",16)(1,"button",18),b("click",function(){C(n);let o=c(2);return v(o.openMap.emit())}),S(2,"le-icon",19),E(3),d(4,"i18n"),m(),f(5,"span",20),b("click",function(){C(n);let o=c(2);return v(o.openMap.emit())}),E(6),d(7,"i18n"),m()()}e&2&&(l(2),h("size",24),l(),z(" ",_(4,7,"Map")," "),l(2),h("size","extra-small")("variant","status")("color","success")("lowercase",!0),l(),K(_(7,9,"New_Badge")))}function Us(e,t){if(e&1){let n=Y();f(0,"div",1),O(1,Ns,2,1),f(2,"div",9)(3,"jan-price-switch-search",10),S(4,"span",11),d(5,"i18n"),m(),f(6,"button",12),b("click",function(){C(n);let o=c();return v(o.sortClick.emit())}),S(7,"i",13),E(8),d(9,"i18n"),m(),f(10,"button",14),b("click",function(){C(n);let o=c();return v(o.filtersClick.emit())}),S(11,"i",15),E(12),d(13,"i18n"),m(),O(14,$s,8,11,"div",16),S(15,"jan-search-results-sorter"),m()()}if(e&2){let n,i=c();l(),y((n=i.resultsCount())?1:-1,n),l(3),h("innerHTML",_(5,5,"show_price_for_all"),Dt),l(4),z(" ",_(9,7,"sort")," "),l(4),z(" ",_(13,9,"Filter")," "),l(2),y(i.showMap()?14:-1)}}function Hs(e,t){if(e&1){let n=Y();f(0,"jan-active-filters-list",21),b("removeFilter",function(o){C(n);let r=c();return v(r.changeFilter(o))}),m()}if(e&2){let n=c();h("activeFilters",n.activeFilters())}}var eo=(()=>{let t=class t{constructor(){this.sortClick=Se(),this.filtersClick=Se(),this.openMap=Se(),this.selectors=a(ui),this.store=a(x),this.config=a(ce),this.hasFetchedAll=this.store.selectSignal(j.hasFetchedAll),this.isContextFallback=this.store.selectSignal(j.isContextFallback),this.mapFeatureEnabled=this.config.features.portfolio.search.showMap,this.showMap=q(()=>this.mapFeatureEnabled&&this.hasFetchedAll()&&!this.isContextFallback()),this.isLoading=this.store.selectSignal(j.hasNoOffersYet),this.activeFiltersCount=Te(this.selectors.activeFiltersCount$),this.showActiveFilters=Te(this.selectors.showActiveFilters$,{requireSync:!0}),this.activeFilters=Te(this.selectors.activeFilters$,{requireSync:!0}),this.resultsCount=q(()=>{let i=this.store.selectSignal(pn.hotelCounts)();return i.totalOffersCount>0?i:void 0})}changeFilter(i){this.store.dispatch(N.changeFilter(i))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-search-results-bar"]],outputs:{sortClick:"sortClick",filtersClick:"filtersClick",openMap:"openMap"},decls:3,vars:2,consts:[[1,"below-header-skeletons"],[1,"below-header"],[3,"activeFilters"],[1,"count-skeleton"],[1,"skeleton-actions"],[1,"button-skeleton","price-switch-skeleton"],[1,"text-skeleton"],[1,"button-skeleton","map-skeleton"],[1,"button-skeleton","filters-skeleton"],[1,"actions"],["janPricePresentationPortfolioSearchAnalytics",""],[3,"innerHTML"],["piButton","outline","piSize","small","piColor","neutral",1,"mobile-sort-button",3,"click"],["piIcon","ic-s-list-center"],["piButton","outline","piSize","small","piColor","neutral",1,"mobile-filters-button",3,"click"],["piIcon","ic-s-filters"],[1,"map-button-wrapper"],[1,"results-summary",3,"innerHTML"],["le-button","","variant","outline","color","neutral","size","small",1,"map-button",3,"click"],["name","pi-ic-s-map",3,"size"],["le-badge","",3,"click","
1size","variant","color","lowercase"],[3,"removeFilter","activeFilters"]],template:function(o,r){o&1&&(O(0,Bs,8,1,"div",0)(1,Us,16,11,"div",1),O(2,Hs,1,1,"jan-active-filters-list",2)),o&2&&(y(r.isLoading()?0:1),l(2),y(r.showActiveFilters()?2:-1))},dependencies:[ka,Vn,Nn,Kt,Zt,Ji,Ve,pe,Qr,Zr,fe],styles:['@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.below-header[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:space-between;align-items:center;flex-wrap:wrap}.below-header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.25rem}.results-summary[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1rem;font-weight:700;color:var(--pi-color-neutral-500);text-wrap:balance}.results-summary[_ngcontent-%COMP%] strong{font-size:.8125rem;line-height:1rem;font-weight:800;color:var(--pi-color-neutral-900)}@media screen and (max-width:1089px){jan-search-results-sorter[_ngcontent-%COMP%]{display:none}}@media screen and (min-width:1090px){.mobile-sort-button[_ngcontent-%COMP%], .mobile-filters-button[_ngcontent-%COMP%]{display:none}}.map-button-wrapper[_ngcontent-%COMP%]{display:grid}.map-button-wrapper[_ngcontent-%COMP%] span[le-badge][_ngcontent-%COMP%]{grid-row:1;grid-column:1;align-self:start;justify-self:end;margin-top:-.5rem;margin-left:1rem;z-index:1;cursor:pointer}.map-button-wrapper[_ngcontent-%COMP%] .map-button[_ngcontent-%COMP%]{grid-row:1;grid-column:1}.map-button[_ngcontent-%COMP%]{display:flex}.below-header-skeletons[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.75rem}.below-header-skeletons[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{border-radius:1.25rem}.below-header-skeletons[_ngcontent-%COMP%] .count-skeleton[_ngcontent-%COMP%]{width:160px;height:16px;background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.below-header-skeletons[_ngcontent-%COMP%] .count-skeleton[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;height:40px}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .text-skeleton[_ngcontent-%COMP%]{height:16px;width:100%;background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .text-skeleton[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .button-skeleton[_ngcontent-%COMP%]{padding:.75rem 1.25rem;border:.0625rem solid var(--pi-color-neutral-200);height:40px;border-radius:1.25rem}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .price-switch-skeleton[_ngcontent-%COMP%]{width:240px}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .map-skeleton[_ngcontent-%COMP%]{width:110px}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .filters-skeleton[_ngcontent-%COMP%]{min-width:190px}@media screen and (max-width:683px){[_nghost-%COMP%]{gap:.5rem}.map-button-wrapper[_ngcontent-%COMP%], .map-skeleton[_ngcontent-%COMP%]{order:1}.below-header[_ngcontent-%COMP%]{flex-direction:row;gap:.75rem;
1align-items:center}jan-price-switch-search[_ngcontent-%COMP%]{display:none}.below-header-skeletons[_ngcontent-%COMP%] .count-skeleton[_ngcontent-%COMP%]{width:160px;height:16px}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%]{flex-grow:1}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .price-switch-skeleton[_ngcontent-%COMP%]{display:none}.below-header-skeletons[_ngcontent-%COMP%] .skeleton-actions[_ngcontent-%COMP%] .filters-skeleton[_ngcontent-%COMP%]{flex-grow:1}}@media screen and (min-width:1090px){.map-button-wrapper[_ngcontent-%COMP%], .map-skeleton[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let e=t;return e})();var qs=ve("[PORTFOLIO_SEO] SET_SEARCH_SEO"),zs=ve("[PORTFOLIO_SEO] SET_SEARCH_DEFAULT_SEO"),Gs=ve("[PORTFOLIO_SEO] SEO_SET_SUCCESSFULLY",ze()),Qs=ve("[PORTFOLIO_SEO] SEO_SET_WITH_ERROR"),me={setPortfolioSearchSeo:qs,searchSeoSetSuccessfully:Gs,setPortfolioSearchDefaultSeo:zs,searchSeoSetWithError:Qs};var st="PORTFOLIO_SEARCH_SEO",Ws={status:"INITIAL"},Xs=dr(Ws,xi(me.searchSeoSetSuccessfully,(e,{response:t})=>({status:"LOADED",response:t})),xi(me.searchSeoSetWithError,()=>({status:"ERROR"})));function to(e,t){return Xs(e,t)}var Ys=mr(st),Ma={state:Ys};function Ks(e,t){if(e&1&&(qo(0,"h1"),E(1),zo()),e&2){c();let n=Be(0);l(),K(n.response.contextDetails.pageConfiguration.header)}}function Zs(e,t){e&1&&Go(0,"div",0)}var io=(()=>{let t=class t{constructor(){this.store=a(x),this.header=this.store.selectSignal(Ma.state)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-search-results-heading"]],decls:3,vars:2,consts:[[1,"header-skeleton"]],template:function(o,r){if(o&1&&(le(0),O(1,Ks,2,1,"h1")(2,Zs,1,0,"div",0)),o&2){let s,p=gt(r.header());l(),y((s=p.status)==="LOADED"?1:2)}},styles:['@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{display:block}h1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:2rem;letter-spacing:-.03rem;font-weight:800;color:var(--pi-color-neutral-900)}.header-skeleton[_ngcontent-%COMP%]{background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.header-skeleton[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.header-skeleton[_ngcontent-%COMP%]{height:2rem;width:100%}@media screen and (max-width:683px){h1[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;letter-spacing:.005rem;font-weight:800}.header-skeleton[_ngcontent-%COMP%]{height:1.5rem}}'],changeDetection:0});let e=t;return e})();var oo=(()=>{let t=class t{constructor(){this.janLoadMoreButton=ie(),this.store=a(x),this.breakpointMatcherService=a(ot),this.displayValue=null,this.widthValue=null,this.store.select(j.showLoadMoreButton).pipe(ke()).subscribe(i=>this.displayValue=i?null:"none"),this.breakpointMatcherService.activeBreakpoint$.pipe(ke(),w(i=>i<Jt.Desktop)).subscribe(i=>this.widthValue=i?"fullwidth":null)}loadMore(){this.store.dispatch(P.loadMoreOffers())}};t.\u0275fac=function(o){return new(o||t)},t.\u0275dir=Ie({type:t,selectors:[["","janLoadMoreButton",""]],hostVars:3,hostBindings:function(o,r){o&1&&b("click",function(){return r.loadMore()}),o&2&&(Uo("fullwidth",r.widthValue),jt("display",r.displayValue))},inputs:{janLoadMoreButton:[1,"janLoadMoreButton"]}});let e=t;return e})();var ro=(()=>{let t=class t{constructor(){this.store=a(x),this.ngIf=a(Ut,{self:!0}),this.store.select(j.showOffersLoadingSkeleton).pipe(ke()).subscribe(i=>this.ngIf.ngIf=i)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275dir=Ie({type:t,selectors:[["","janShowLoadingMoreSkeleton",""]],features:[No([Ut])]});let e=t;return e})();var lt=(()=>{let t=class t{constructor(){this.store=a(x),this.activatedRoute=a(et),this.queryParamsSignal=Te(this.activatedRoute.queryParams),this.departurePlacesSignal=q(()=>{var i;return(i=this.queryParamsSignal())==null?void 0:i.departurePlaces})}getLinkOptions(i){return q(()=>{let o=this.store.selectSignal(j.state)();return this.resolveLinkOptions(i.metaCode,i.items[0],o.lastResponse.contextId,this.store.selectSignal(jn.mode)(),this.departurePlacesSignal())})}getMapLinkOptions(i){return q(()=>({commands:["portfolio","map"],queryParams:ae(G({},mi(this.queryParamsSignal()??{})),{selectedMetaCode:Wi(i)}),relativeTo:null}))}getAlternativeFlightsLinkOptions(i,o){return this.appendAlternativeFlightsParams(this.getLinkOptions(i)(),o)}resolveLinkOptions(i,o,r,s,p){var u;return{commands:["portfolio","details","select-room"],queryParamsHandling:"merge",queryParams:{packageId:o.packageId,flightOptionId:o.flightOptionId,departureC
1ode:(u=o.flight)==null?void 0:u.outboundAirportCode,arrivalCode:o.flight.inboundAirportCode,checkInDate:o.stayInformation.checkInDate,checkOutDate:o.stayInformation.checkOutDate,destinationDepartureDate:o.flight.destinationFlightDepartureDateTime,destinationArrivalDate:o.flight.destinationFlightArrivalDateTime,returnDepartureDate:o.flight.returnFlightDepartureDateTime,returnArrivalDate:o.flight.returnFlightArrivalDateTime,metaCode:Wi(i),pricePresentation:s,selectedDeparturePlaces:p,context:r,noCalendar:o.hasCalendar?void 0:"true",psp_id:o.offerTraceId,selectedMealPlan:null},relativeTo:null}}appendAlternativeFlightsParams(i,o){return ae(G({},i),{queryParams:ae(G({},i.queryParams),{dialog:"alternative-flights",click_id:o,eventSource:"packages.search.results"})})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Fa=(()=>{let t=class t{constructor(){this.i18n=a(it),this.pluralService=a(si),this.distancePipe=a(fi),this.datePipe=a(qt),this.portfolioOfferTileService=a(lt),this.variantUrlService=a(nt),this.globalConfig=a(ce),this.store=a(x),this.offerTilePerksMapperService=a(Qn),this.offerTileDiscountBadgesMapperService=a(Gn)}transform(i,o=!1){let r=i.items[0],s=this.portfolioOfferTileService.getLinkOptions(i);return{variantUrl:q(()=>this.variantUrlService.transform(s())),isHighlighted:o,metaCode:i.metaCode,name:i.hotel.details.name,stars:i.hotel.details.category??void 0,location:i.hotel.location.generalDisplayAddress,departureAirportPrefix:this.i18n.translate("Outbound","portfolio"),departureAirport:r.flight.outboundAirportFullName,tripDatePrefix:this.i18n.translate("Outbound_date","portfolio"),tripDate:` 2 ${this.datePipe.transform(r.flight.destinationFlightDepartureDateTime,"d MMM yyy")} - 3 ${this.datePipe.transform(r.flight.returnFlightArrivalDateTime,"d MMM yyy")} 4 (${this.i18n.translate(this.pluralService.transform("Nights",r.stayInformation.nights),"portfolio",{number:r.stayInformation.nights})}) 5 `,distance:{length:this.distancePipe.transform(i.hotel.location.distanceToRequestedLocationInMeters,rt.Meter,rt.Kilometer,1),location:this.i18n.translate("From_city","hotel-distance")},tripAdvisor:i.hotel.details.tripAdvisorRating,galleryThumbnail:i.hotel.details.images.map(u=>({alt:i.hotel.details.name,src:u})),perks:this.offerTilePerksMapperService.mapIntoPerks({mealPlan:r.mealPlan,isTransferToHotelIncluded:r.transfer.isIncluded,flightFacilities:r.flight.facilities}),wishlist:this.getWishlistStatus(i),badges:this.buildBadges(o,r.discounts,r.labels),amenities:this.buildAmenities(r),packageVariantId:r.packageVariantId}}buildAmenities(i){var r;let o=[];return i.arePaymentPlansAvailable&&o.push({type:"LowDeposit",icon:"pi-ic-s-wallet",text:this.i18n.translate("Low_deposit","hotel-landing-page")}),((r=i.paymentMethods)==null?void 0:r.klarna.status)==="AVAILABLE"&&o.push({type:"Klarna",icon:"pi-ic-s-wallet",price:i.priceForAll.amount}),o}buildBadges(i,o,r){let s=[];return i&&s.push({text:this.i18n.translate("Selected_hotel","portfolio"),color:"accent-1"}),s.push(...this.offerTileDiscountBadgesMapperService.mapIntoBadges({discounts:o}),...r.filter(p=>p.placement!=="price").map(p=>({icon:p.icon,text:p.text,variant:p.design.variant,color:p.design.palette,backgroundCustomColor:p.design.backgroundColor}))),s}getWishlistStatus(i){if(!this.globalConfig.features.portfolio.isWishlistEnabled)return te({status:"UNAVAILABLE"});let o=i.items[0].wishlist;return o.itemState==="UNAVAILABLE"?te({status:"UNAVAILABLE"}):q(()=>({status:"AVAILABLE",isWishlisted:this.store.selectSignal(ci.isItemSelected(o.itemId))(),itemId:o.itemId}))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275pipe=De({name:"portfolioOfferTileViewModel",type:t,pure:!0});let e=t;return e})();var wa=(()=>{let t=class t{constructor(i,o){this.fragmentModalService=i,this.breakpointMatcher=o,this.filtersModalOpenedFragment="portfolioFilters",this.filtersAndSortersModalOpenedFragment="portfolioFiltersAndSorters",this.sortersModalOpenedFragment="portfolioSorters",this.isFiltersModalOpened$=this.fragmentModalService.register(this.filtersModalOpenedFragment).pipe(w(({isOpened:r})=>r)),this.isSortersModalOpened$=this.fragmentModalService.register(this.sortersModalOpenedFragment).pipe(w(({isOpened:r})=>r)),this.modalMode$=this.breakpointMatcher.activeBreakpoint$.pipe(w(r=>r===Jt.Desktop?Ri.Default:Ri.Fullscreen),Mo())}openFiltersModal(){this.fragmentModalService.openModal(this.filtersModalOpenedFragment)}openFiltersAndSortersModal(){this.fragmentModalService.openModal(this.filtersAndSortersModalOpenedFragment)}openSortersModal(){this.fragmentModalService.openModal(this.sortersModalOpenedFragment)}closeModal(){this.fragmentModalService.closeModal()}};t.\u0275fac=function(o){return new(o||t)(we(Cn),we(ot))},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ea=(()=>{let t=class t{constructor(){this.platformId=a($),this.store=a(x),this.isFirstSearch=!0}selectOffer(i){this.store.dispatch(N.selectOffer(i))}initSearch(){if(this.isFirstSearch&&(this.isFirstSearch=!1,this.store.selectSignal(j.state)().status==="LOADED")){this.store.dispatch(P.ssrResultsRestored());return}this.fetchPortfolio()}fetchPortfolio(){J(this.platformId)?this.store.dispatch(P.requestFirstPage()):oe(this.platformId)&&this.store.dispatch(P.requestPrefetch())}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Js=3,Ia=(()=>{let t=class t{shouldDisplayCallbackBox({offerIndex:i,allDisplayedOffersCount:o}){let r=i+1,s=r===o,p=r%20;return s?o<=20||p===0?!0:p>Js:p===0}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var el=2,tl=0,Da=(()=>
5{let t=class t{constructor(){this.partnerSettingsConfig=a(ce),this.genericPromoBannerConfig=this.partnerSettingsConfig.features.portfolio.search.genericPromoBanner}shouldDisplayGenericBanner({offerIndex:i,isMobile:o,allDisplayedOffersCount:r}){var s;return((s=this.genericPromoBannerConfig)==null?void 0:s.enabled)!==!0?!1:o?i===Math.min(tl,r-1):i===Math.min(el,r-1)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Na=vs(Ps());var Ra="http://esky-hotels-seoservice-api-green.service.gcp-staging.consul",La="http://esky-hotels-seoservice-api-green.service.gcp-pro.consul",Ba="https://hotelsapi.esky.com.hotels.staging.esky.io",ja="https://hotelsapi.esky.com",no="/hotels-seo";var Va=new Ao("HOTELS_SEO_API_URL",{providedIn:"root",factory:il});function il(){let e=a(Cr),t=oe(a($)),n=e.getHostSuffix()!=="";return t?n?Ra:La:n?`${Ba}${no}`:`${ja}${no}`}var $a=(()=>{let t=class t{constructor(){this.hotelsSeoServiceApiUrl=a(Va),this.httpClient=a(nr)}getPortfolioSearchSeo(i){let o=(0,Na.stringify)(i);return this.httpClient.get(`${this.hotelsSeoServiceApiUrl}/api/v1/PortfolioSeo/search?${o}`)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var ol=ve("[PORTFOLIO] DATALAYER_SET_PAGE",ze()),rl=ve("[PORTFOLIO] DATALAYER_SET_OFFERS_LOWEST_PRICE",ze()),ct={setPage:ol,setOffersLowestPrice:rl};var We=class We{constructor(t){this.googleService=t}setPageData(t,n){t&&n&&this.googleService.pushEvent({Page:{Category:t,Type:n}})}setOffersLowestPrice(t){this.googleService.pushEvent({Offers:{PriceLowest:t}})}};We.\u0275fac=function(n){return new(n||We)(we(Fr))},We.\u0275prov=U({token:We,factory:We.\u0275fac,providedIn:"root"});var pt=We;Ke([tt()],pt.prototype,"setPageData",null);Ke([tt()],pt.prototype,"setOffersLowestPrice",null);var Ua=(()=>{let t=class t{constructor(i,o){this.actions$=i,this.datalayerAnalytics=o,this.setPage$=M(()=>this.actions$.pipe(A(ct.setPage),H(r=>r.page!=null),B(({page:r})=>{this.datalayerAnalytics.setPageData(r.category,r.type)})),{dispatch:!1}),this.setOffers$=M(()=>this.actions$.pipe(A(ct.setOffersLowestPrice),B(({priceLowest:r})=>{this.datalayerAnalytics.setOffersLowestPrice(r)})),{dispatch:!1})}};t.\u0275fac=function(o){return new(o||t)(we(V),we(pt))},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();function Ha(){let e=a(et),t=al(),n=a(gr);return e.queryParams.pipe(w(i=>({landingPageId:i.landingPageId,cardId:i.cardId,market:n.get(),url:t()})))}function al(){let e=a(Ee),t=a(_r,{optional:!0}),n=a($);return function(){return oe(n)?`${t.hostname??""}${e.location.href}`:e.location.href}}var sl=M(()=>{let e=a(V),t=a($a),n=a(Xr),i=Ha();return e.pipe(A(me.setPortfolioSearchSeo),L(()=>i.pipe(Q(1))),L(o=>t.getPortfolioSearchSeo(o).pipe(B(r=>{let s=Br(r.meta,r.canonicalUrl);n.updateSeo(s)}),L(r=>{var s,p;return[ct.setPage({page:(p=(s=r.contextDetails)==null?void 0:s.dataLayer)==null?void 0:p.page}),me.searchSeoSetSuccessfully({response:r})]}),bo(()=>[me.setPortfolioSearchDefaultSeo(),ct.setPage({page:null}),me.searchSeoSetWithError()]))))},{functional:!0}),ll=M(()=>{let e=a(V),t=a(Sn);return e.pipe(A(me.setPortfolioSearchDefaultSeo),B(()=>t.setSearchPageSeo()))},{dispatch:!1,functional:!0}),ao={updateSeoEffect:sl,defaultSeoEffect:ll};var Mt={toggleWishlistItem:ve("[Portfolio Search Wishlist] Toggle Wishlist Item",ze())};var qa=M(()=>{let e=a(V),t=a(x);return e.pipe(A(Mt.toggleWishlistItem),w(({offer:n,triggerElementId:i})=>{let o=t.selectSignal(j.state)();Nr(o,["LOADED"],"Search state is not LOADED");let r=n.items[0];if(r.wishlist.itemState==="UNAVAILABLE")throw new Error("Cannot toggle wishlist item for an UNAVAILABLE offer");let s=r.wishlist.itemId;return gn.toggleWishlistItem({addWishlistItemById:{path:{wishlistItemId:s},query:{partnerCode:o.lastRequest.partnerCode},body:{contextId:o.lastRequest.contextId,checkInDate:r.stayInformation.checkInDate}},removeWishlistItem:{path:{itemId:s},query:{partnerCode:o.lastRequest.partnerCode}},analytics:{metaCode:n.metaCode},triggerElementId:i})}))},{functional:!0});var za={toggleWishlistItem$:qa};var ft="hotel-";var mt=(()=>{let t=class t{constructor(){this.platform=a($),this.seenMetaCodes=new Set,this.seenHotelMetaCodes$=new dt,this.seenMetaCodesCleared$=new dt,this._desktopIntersectionObserver=null,this._mobileIntersectionObserver=null,this.callback=i=>
5{i.forEach(o=>{if(o.isIntersecting){let s=+o.target.id.replace(ft,"")||0;if(s===0)throw new Error("Hotel metacode is invalid");let p=this.seenMetaCodes.size;this.seenMetaCodes.add(s),this.seenMetaCodes.size>p&&this.seenHotelMetaCodes$.next(Array.from(this.seenMetaCodes))}})}}get desktopIntersectionObserver(){if(oe(this.platform))throw new Error("desktopIntersectionObserver is not available on the server");return this._desktopIntersectionObserver===null&&(this._desktopIntersectionObserver=new IntersectionObserver(this.callback,{root:null,rootMargin:"0px",threshold:.25})),this._desktopIntersectionObserver}get mobileIntersectionObserver(){if(oe(this.platform))throw new Error("desktopIntersectionObserver is not available on the server");return this._mobileIntersectionObserver===null&&(this._mobileIntersectionObserver=new IntersectionObserver(this.callback,{root:null,rootMargin:"0px",threshold:.85})),this._mobileIntersectionObserver}clearListOfSeenPackages(){this.seenMetaCodes.clear(),this.seenMetaCodesCleared$.next()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var so=(()=>{let t=class t{constructor(){this.selector=ie("",{alias:"janSeenPackage"}),this.elementRef=a(xe),this.destroyRef=a(Ae),this.seenPackagesService=a(mt),this.platform=a(vr)}ngAfterContentInit(){if(!this.platform.isBrowser)return;let i=this.platform.ANDROID||this.platform.IOS?this.seenPackagesService.mobileIntersectionObserver:this.seenPackagesService.desktopIntersectionObserver;i.observe(this.elementRef.nativeElement),this.destroyRef.onDestroy(()=>i.unobserve(this.elementRef.nativeElement)),this.seenPackagesService.seenMetaCodesCleared$.subscribe(()=>{i.unobserve(this.elementRef.nativeElement),i.observe(this.elementRef.nativeElement)})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275dir=Ie({type:t,selectors:[["","janSeenPackage",""]],inputs:{selector:[1,"janSeenPackage","selector"]}});let e=t;return e})();var cl=()=>({itemsCount:1}),pl=()=>({itemsCount:4}),fl=()=>({itemsCount:2}),ml=()=>[];function dl(e,t){e&1&&ue(0)}function ul(e,t){e&1&&ue(0)}function hl(e,t){e&1&&ue(0)}function _l(e,t){e&1&&ue(0)}function gl(e,t){e&1&&ue(0)}function Sl(e,t){e&1&&ue(0)}function Cl(e,t){e&1&&ue(0)}function vl(e,t){e&1&&(f(0,"div",5)(1,"div",6),S(2,"div",7)(3,"le-icon",8),m()()),e&2&&(l(3),h("size",24))}function Pl(e,t){e&1&&(f(0,"div",11),S(1,"div",7),m())}function Ol(e,t){if(e&1&&(f(0,"div",5)(1,"div",6),S(2,"div",7)(3,"le-icon",9),m(),f(4,"div",10),Re(5,Pl,2,0,"div",11,Rt),m()()),e&2){let n=t.itemsCount;l(3),h("size",24),l(2),Le(St(1,ml).constructor(n))}}var Ga=(()=>{let t=class t{constructor(){this.stroke=ie("full")}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-filters-sidebar-skeleton"]],hostVars:4,hostBindings:function(o,r){o&2&&He("stroke-full",r.stroke()==="full")("stroke-bottom",r.stroke()==="bottom")},inputs:{stroke:[1,"stroke"]},decls:14,vars:16,consts:[["collapsedAccordion",""],["expandedAccordion",""],[1,"filters-header"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],[1,"filter-accordion"],[1,"filter-accordion-header"],[1,"skeleton-text"],["name","pi-ic-s-arrow-up",3,"size"],["name","pi-ic-s-arrow-down",3,"size"],[1,"filter-accordion-content"],[1,"filter-item"]],template:function(o,r){if(o&1&&(f(0,"span",2),E(1),d(2,"i18n"),m(),be(3,dl,1,0,"ng-container",3)(4,ul,1,0,"ng-container",4)(5,hl,1,0,"ng-container",4)(6,_l,1,0,"ng-container",3)(7,gl,1,0,"ng-container",4)(8,Sl,1,0,"ng-container",3)(9,Cl,1,0,"ng-container",4)(10,vl,4,1,"ng-template",null,0,Ct)(12,Ol,7,2,"ng-template",null,1,Ct)),o&2){let s=se(11),p=se(13);l(),z(" ",_(2,11,"Filters"),` 6`),l(2),h("ngTemplateOutlet",p)("ngTemplateOutletContext",St(13,cl)),l(),h("ngTemplateOutlet",s),l(),h("ngTemplateOutlet",s),l(),h("ngTemplateOutlet",p)("ngTemplateOutletContext",St(14,pl)),l(),h("ngTemplateOutlet",s),l(),h("ngTemplateOutlet",p)("ngTemplateOutletContext",St(15,fl)),l(),h("ngTemplateOutlet",s)}},dependencies:[Ht,pe,fe],styles:['@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{display:flex;flex-direction:column;min-width:286px;max-width:328px;overflow:hidden}.filters-header[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;letter-spacing:.005rem;font-weight:800;color:var(--pi-color-neutral-900);display:flex;align-items:center;gap:1rem}.stroke-full[_nghost-%COMP%]{gap:.5rem}.stroke-full[_nghost-%COMP%] .filters-header[_ngcontent-%COMP%]{height:56px;padding:0 1rem;border:.0625rem solid var(--pi-color-neutral-200);border-radius:.75rem}.stroke-full[_nghost-%COMP%] .filter-accordion[_ngcontent-%COMP%]{border:.0625rem solid var(--pi-color-neutral-200);border-radius:.75rem}.stroke-bottom[_nghost-%COMP%] .filters-header[_ngcontent-%COMP%]{height:36px;margin-bottom:.25rem}.stroke-bottom[_nghost-%COMP%] .filter-accordion[_ngcontent-%COMP%]{border-bottom:.0625rem solid var(--pi-color-neutral-200);border-radius:.125rem}.stroke-bottom[_nghost-%COMP%] .filter-accordion[_ngcontent-%COMP%]:last-of-type{border-bottom:none}.filter-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:clip}.filter-accordion-header[_ngcontent-%COMP%]{gap:1rem;padding:1rem;display:flex;height:68px;flex-direction:row;justify-content:space-between;align-items:center}.filter-accordion-header[_ngcontent-%COMP%]:hover{background-color:var(--pi-color-neutral-100)}.filter-accordion-header[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]{flex:1;background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.filter-accordion-header[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.filter-accordion-header[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]{height:13px;max-width:140px}.filter-accordion-header[_ngcontent-%COMP%] le-icon[_ngcontent-%COMP%]{flex-shrink:0;color:var(--pi-color-neutral-700)}.filter-accordion-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;padding:1rem 2rem}.filter-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;height:40px}.filter-item[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]{background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.filter-item[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.filter-item[_ngcontent-%COMP%] .skeleton-text[_ngcontent-%COMP%]{height:13px;width:140px}'],changeDetection:0});let e=t;return e})();var Qa=(()=>{let t=class t{constructor(){this.offerTileDiscountBadgesMapperService=a(hi)}transform(i){var ge,W,Pe,Ye,Et;let{stayInformation:o,pricePerPax:r,priceForAll:s,regularPricePerPax:p,regularPriceForAll:u,lowestPriceIn30DaysPerPax:k,lowestPriceIn30DaysForAll:F,priceDropLevel:T,discounts:g,packageVariantId:I,priceAtHotelDetails:re,earnEstimate:Z,regulatoryFee:R,paymentMethods:he,labels:_e,socialProof:Fe}=i.items[0];return{pricePerPax:r,priceForAll:s,regularPricePerPax:p,regularPriceForAll:u,lowestPriceIn30DaysPerPax:k,lowestPriceIn30DaysForAll:F,priceDropLevel:T,discounts:{partnerPriceAppliedNote:(ge=g==null?void 0:g.applied.find(ne=>ne.label==="Partner"))==null?void 0:ge.translatedNote,memberPriceAppliedBadge:(W=g==null?void 0:g.applied.find(ne=>ne.label==="Member"))==null?void 0:W.translatedBadge,memberPricePotentialNote:(Pe=g==null?void 0:g.potential.find(ne=>ne.label==="Member"))==null?void 0:Pe.translatedNote,blackWeekPriceAppliedNote:(Ye=g==null?void 0:g.applied.find(ne=>ne.label==="BlackWeek"))==null?void 0:Ye.translatedNote,blackWeekPricePotentialNote:(Et=g==null?void 0:g.potential.find(ne=>ne.label==="BlackWeek"))==null?void 0:Et.translatedNote},earnEstimate:Z,pills:this.buildPills(g,_e),regulatoryFeeType:(R==null?void 0:R.type)==="ATOL"||(R==null?void 0:R.type)==="TFG"?R.type:void 0,nightsCount:o.nights,packageVariantId:I,extraCharges:ai(re),isKlarnaAvailable:he.klarna.status==="AVAILABLE",socialProof:Fe}}buildPills(i,o){if(!i)return Xi(o);let r=this.offerTileDiscountBadgesMapperService.mapMemberDiscountPill(i);return[...r?[r]:[],...Xi(o)]}};t.\u0275fac=function(o){return new(o||t)},t.\u0275pipe=De({name:"searchOfferTilePricingV2",type:t,pure:!0});let e=t;return e})();var Wa=(()=>{let t=class t{constructor(){this.i18n=a(it),this.pluralService=a(si),this.distancePipe=a(fi),this.datePipe=a(qt),this.portfolioOfferTileService=a(lt),this.variantUrlService=a(nt),this.globalConfig=a(ce),this.store=a(x),this.offerTilePerksMapperService=a(ca),this.offerTileDiscountBadgesMapperService=a(hi)}transform(i,o=!1){let r=i.items[0],s=r.transfer.isIncluded,p=this.portfolioOfferTileService.getLinkOptions(i),u=q(()=>this.variantUrlService.transform(p())),k=this.portfolioOfferTileService.getMapLinkOptions(i.metaCode),F=q(()=>this.variantUrlService.transform(k()));return{variantUrl:u,mapUrl:F,isHighlighted:o,metaCode:i.metaCode,name:i.hotel.details.name,stars:i.hotel.details.category??void 0,location:i.hotel.location.generalDisplayAddress,tripDate:` 7 ${ea(this.datePipe,r.flight.destinationFlightDepartureDateTime,r.flight.returnFlightArrivalDateTime)} 8 \xB7 ${this.i18n.translate(this.pluralService.transform("Nights",r.stayInformation.nights),"portfolio",{number:r.stayInformation.nights})} 9 `,distance:this.buildDistance(i.hotel.location.distanceToRequestedLocationInMeters),departureAirport:r.flight.outboundAirportFullName,tripAdvisor:i.hotel.details.tripAdvisorRating,galleryThumbnail:i.hotel.details.images.map(T=>({alt:i.hotel.details.name,src:T})),perks:this.offerTilePerksMapperService.mapIntoPerks({flightFacilities:r.flight.facilities}),transfer:this.offerTilePerksMapperService.mapTransferChip(s),wishlist:this.getWishlistStatus(i),badges:this.buildBadges(o,r.discounts,r.labels),packageVariantId:r.packageVariantId,flightConnections:la(r.flight.connections),mealPlan:this.buildMealPlan(r)}}buildDistance(i){if(i!=null)return{length:this.distancePipe.transform(i,rt.Meter,rt.Kilometer,1),location:this.i18n.translate("From_city","hotel-distance")}}buildMealPlan(i){return{icon:"pi-ic-s-food-fork-spoon",text:i.mealPlan.name}}buildBadges(i,o,r){let s=[];return i&&s.push({text:this.i18n.translate("Selected_hotel","portfolio"),color:"accent-1"}),s.push(...this.offerTileDiscountBadgesMapperService.mapIntoBadges({discounts:o}),...ta(r)),s}getWishlistStatus(i){if(!this.globalConfig.features.portfolio.isWishlistEnabled)return te({status:"UNAVAILABLE"});let o=i.items[0].wishlist;if(o.itemState==="UNAVAILABLE")return te({status:"UNAVAILABLE"});let r=this.store.selectSignal(ci.isItemSelected(o.itemId));return q(()=>({status:"AVAILABLE",isWishlisted:r(),itemId:o.itemId}))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275pipe=De({name:"portfolioOfferTileViewModelV2",type:t,pure:!0});let e=t;return e})();var Xa=(()=>{let t=class t{transform(i){var R,he,_e,Fe,ge;let{stayInformation:o,pricePerPax:r,priceForAll:s,regularPricePerPax:p,regularPriceForAll:u,lowestPriceIn30DaysPerPax:k,lowestPriceIn30DaysForAll:F,priceDropLevel:T,discounts:g,packageVariantId:I,priceAtHotelDetails:re,earnEstimate:Z}=i.items[0];return{pricePerPax:r,priceForAll:s,regularPricePerPax:p,regularPriceForAll:u,lowestPriceIn30DaysPerPax:k,lowestPriceIn30DaysForAll:F,priceDropLevel:T,discounts:{partnerPriceAppliedNote:(R=g==null?void 0:g.applied.find(W=>W.label==="Partner"))==null?void 0:R.translatedNote,memberPriceAppliedNote:(he=g==null?void 0:g.applied.find(W=>W.label==="Member"))==null?void 0:he.translatedNote,memberPricePotentialNote:(_e=g==null?void 0:g.potential.find(W=>W.label==="Member"))==null?void 0:_e.translatedNote,blackWeekPriceAppliedNote:(Fe=g==null?void 0:g.applied.find(W=>W.label==="BlackWeek"))==null?void 0:Fe.translatedNote,blackWeekPricePotentialNote:(ge=g==null?void 0:g.potential.find(W=>W.label==="BlackWeek"))==null?void 0:ge.translatedNote},earnEstimate:Z,nightsCount:o.nights,packageVariantId:I,extraCharges:ai(re)}}};t.\u0275fac=function(o){return new(o||t)},t.\u0275pipe=De({name:"searchOfferTilePricing",type:t,pure:!0});let e=t;return e})();var yl=300,lo=(()=>{let t=class t{constructor(){this.host=a(xe),this.ngZone=a(It),this.document=a(Ee),this.destroyRef=a(Ae),this.server=oe(a($)),this.visible=!1}scrollToTop(){window.scrollTo({behavior:"smooth",left:0,top:0})}ngAfterViewInit(){if(this.server)return;let i=this.document.querySelector('[data-anchor="scroll-top"]'),o=!1,r=()=>{o=!1;let p=(i==null?void 0:i.clientHeight)||yl,u=window.scrollY>p;u!==this.visible&&(this.visible=u,this.host.nativeElement.classList.toggle("is-visible",u))},s=()=>{o||(o=!0,requestAnimationFrame(r))};this.ngZone.runOutsideAngular(()=>{window.addEventListener("scroll",s,{passive:!0})}),this.destroyRef.onDestroy(()=>window.removeEventListener("scroll",s))}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-scroll-top-button"]],decls:2,vars:1,consts:[["le-button","","data-testid","scroll-top-button","size","medium","palette","neutral","variant","outline",3,"click","iconOnly"],["name","pi-ic-s-arrow-up","size","24"]],template:function(o,r){o&1&&(f(0,"button",0),b("click",function(){return r.scrollToTop()}),S(1,"le-icon",1),m()),o&2&&h("iconOnly",!0)},dependencies:[Ve,pe],styles:["@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{position:fixed;right:16px;bottom:24px;z-index:1;opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}.is-visible[_nghost-%COMP%]{opacity:1;visibility:visible}button[_ngcontent-%COMP%]{border-radius:9999px;border:var(--pi-color-neutral-200) 1px solid;--color: components.$le-color-neutral-900;--background: components.$le-color-white}@media screen and (min-width:772px){[_nghost-%COMP%]{right:24px}}@media screen and (min-width:1090px){[_nghost-%COMP%]{right:40px;bottom:40px}}"],changeDetection:0});let e=t;return e})();function xl(e,t){if(e&1&&(f(0,"div",4),E(1),m()),e&2){let n=c();l(),z(" ",n.activeFiltersCount()," ")}}var co=(()=>{let t=class t{constructor(){this.activeFiltersCount=ie(0),this.sortClick=Se(),this.filtersClick=Se(),this.mapClick=Se()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-subnavigation-bar"]],inputs:{activeFiltersCount:[1,"activeFiltersCount"]},outputs:{sortClick:"sortClick",filtersClick:"filtersClick",mapClick:"mapClick"},decls:14,vars:10,consts:[["piButton","invisible","piSize","small","piColor","neutral",3,"click"],["piIcon","ic-s-list-center"],[1,"filter-button-wrapper"],["piIcon","ic-s-filters"],["piCornerBadge","","piType","number","piColor","accent-1",1,"filter-badge"],["piIcon","ic-s-map"]],template:function(o,r){o&1&&(f(0,"button",0),b("click",function(){return r.sortClick.emit()}),S(1,"i",1),E(2),d(3,"i18n"),m(),f(4,"div",2)(5,"button",0),b("click",function(){return r.filtersClick.emit()}),S(6,"i",3),E(7),d(8,"i18n"),m(),O(9,xl,2,1,"div",4),m(),f(10,"button",0),b("click",function(){return r.mapClick.emit()}),S(11,"i",5),E(12),d(13,"i18n"),m()),o&2&&(l(2),z(" ",_(3,4,"sort"),` 10`),l(5),z(" ",_(8,6,"Filter")," "),l(2),y(r.activeFiltersCount()>0?9:-1),l(3),z(" ",_(13,8,"Map"),` 11`))},dependencies:[Kt,Zt,Pr,fe],styles:["@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{display:flex;justify-content:center;gap:.5rem}.filter-button-wrapper[_ngcontent-%COMP%]{position:relative;display:inline-flex}.filter-badge[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}"],changeDetection:0});let e=t;return e})();var bl=5,Ya=(()=>{let t=class t{constructor(){this.document=a(Ee),this.destroyRef=a(Ae),this.platformId=a($),this.janStickyHeaderTr
11igger=ie(),this.paused=ie(!1),this.visible=te(!1),this.scrollingUp=te(!1),this.observer=null}ngAfterViewInit(){J(this.platformId)&&this.initObserver()}ngOnDestroy(){var i;(i=this.observer)==null||i.disconnect()}initObserver(){let i=this.janStickyHeaderTrigger();if(!i)return;let o=this.getStickyTopBarHeight();this.observer=new IntersectionObserver(r=>{let p=r[0].boundingClientRect.bottom<o;this.visible.set(p)},{threshold:0,rootMargin:`-${o}px 0px 0px 0px`}),this.observer.observe(i),this.initScrollDirectionListeners()}getStickyTopBarHeight(){let i=getComputedStyle(this.document.documentElement).getPropertyValue("--sticky-navigation-top-bar-height");return parseInt(i,10)||0}initScrollDirectionListeners(){let i=this.document.defaultView;if(!i)return;let o=i.scrollY,r=null,s=0,p=ut(i,"wheel",{passive:!0}).pipe(B(T=>r=T.deltaY<0?"up":"down")),u=ut(i,"touchstart",{passive:!0}).pipe(B(T=>{s=T.touches[0].clientY,r=null})),k=ut(i,"touchmove",{passive:!0}).pipe(B(T=>{let g=T.touches[0].clientY-s;Math.abs(g)>bl&&(r=g>0?"up":"down")})),F=ut(i,"scroll",{passive:!0}).pipe(w(()=>i.scrollY),H(T=>T!==o),B(T=>{let g=T<o;if(o=T,this.paused()||r===null)return;let I=r==="up"&&g;this.scrollingUp.set(I),r=null}));xo(p,u,k,F).pipe(ke(this.destroyRef)).subscribe()}};t.\u0275fac=function(o){return new(o||t)},t.\u0275dir=Ie({type:t,selectors:[["","janStickyHeader",""]],inputs:{janStickyHeaderTrigger:[1,"janStickyHeaderTrigger"],paused:[1,"paused"]},exportAs:["janStickyHeader"]});let e=t;return e})();var kl=["resultsBarSection"],Ka=["topSearchForm"],Za=["stickySearchForm"],Tl=()=>[import("./chunk-FBCY6LDP.js").then(e=>e.ChatButtonComponent)],Ml=()=>[import("./chunk-NV4BHDW2.js").then(e=>e.NotFoundMessageBoxComponent)],Fl=()=>[import("./chunk-OJZUY6LI.js").then(e=>e.SearchParametersChangedComponent)],wl=()=>[import("./chunk-LWM6I6NI.js").then(e=>e.GenericPromoBannerComponent),import("./chunk-WYUPNBTZ.js").then(e=>e.PromoBannerClickAnalyticsDirective)],El=()=>[qi,zi,$i,Mi],Al=(e,t,n,i)=>[e,t,n,i],Il=(e,t,n)=>({offerIndex:e,isMobile:t,allDisplayedOffersCount:n}),Dl=(e,t)=>({offerIndex:e,allDisplayedOffersCount:t}),Rl=(e,t)=>t.metaCode;function Ll(e,t){if(e&1&&S(0,"div",25),e&2){c();let n=se(6);jt("top",n.top())}}function Bl(e,t){if(e&1&&S(0,"jan-not-found-message-box",26),e&2){let n=c(2);h("filteredOffersNotFound",n.searchState.filteredOffersNotFound())("offersNotFound",n.searchState.offersNotFound())}}function jl(e,t){e&1&&(Ze(0,Bl,1,2),Je(1,0,Ml),_t())}function Vl(e,t){e&1&&S(0,"jan-search-parameters-changed")}function Nl(e,t){e&1&&(Ze(0,Vl,1,0),Je(1,0,Fl),_t())}function $l(e,t){if(e&1){let n=Y();f(0,"div",27,4)(2,"esky-portfolio-search-form",28,5),b("piQSFPopoverOpen",function(){C(n);let o=c();return v(o.isStickyPopoverOpen.set(!0))})("piQSFPopoverClose",function(){C(n);let o=c();return v(o.isStickyPopoverOpen.set(!1))})("piQSFFiltersClick",function(){C(n);let o=c();return v(o.openFiltersDialog())})("piQSFRecentSearchesVisible",function(){C(n);let o=c();return v(o.onRecentSearchesVisible())}),m(),f(4,"jan-subnavigation-bar",29),d(5,"async"),b("sortClick",function(){C(n);let o=c();return v(o.openSortBottomSheet())})("filtersClick",function(){C(n);let o=c();return v(o.openFiltersDialog())})("mapClick",function(){C(n);let o=c();return v(o.openMap())}),m()()}if(e&2){let n=se(1),i=c(),o=se(16);He("sticky-header--visible",n.visible()),h("janStickyHeaderTrigger",o)("paused",i.isStickyPopoverOpen()||i.isStickyFormExpanded()),l(2),He("sticky-qsf--visible",n.scrollingUp()||i.isStickyPopoverOpen()),h("collapsible",!0)("collapseOnOutsideClick",!1)("expandInlineOnDesktop",i.isAboveXxs())("stickySummary",!1)("showFiltersButton",!1)("showSearchButtonInSummary",!1)("forceMobileLayout",!i.isAboveXxs())("disableScrollOnPopoverOpen",!0),l(2),h("activeFiltersCount",_(5,15,i.searchState.activeFiltersCount$))}}function Ul(e,t){e&1&&S(0,"jan-search-results-heading")}function Hl(e,t){e&1&&ue(0)}function ql(e,t){if(e&1&&be(0,Hl,1,0,"ng-container",30),e&2){c();let n=se(43);h("ngTemplateOutlet",n)}}function zl(e,t){e&1&&S(0,"jan-portfolio-offer-tile-skeleton-v2",13)}function Gl(e,t){if(e&1){let n=Y();le(0),d(1,"portfolioOfferTileViewModelV2"),f(2,"jan-portfolio-offer-tile-v2",31),b("tileClicked",function(o){C(n);let r=c();return v(r.selectPortfolioTile(o,!0))})("mapClicked",function(o){C(n);let r=c();return v(r.openHotelMap(o))})("wishlistToggle",function(o){let r=C(n),s=c();return v(s.handleWishlistToggle(o,r))})("seeOtherOptionsShown",function(o){C(n);let r=c();return v(r.onSrpAltFlightsButtonShown(o))})("seeOtherOptionsClicked",function(o){C(n);let r=c();return v(r.openAlternativeFlightsFromSrp(o))}),$e(3,32),le(4),d(5,"searchOfferTilePricingV2"),f(6,"jan-offer-tile-available-pricing-v2",33),b("potentialDiscountClicked",function(o){C(n);let r=c();return v(r.handlePotentialDiscountClicked(o))})("chooseClicked",function(o){let r=C(n),s=c();return v(s.selectPortfolioTile({event:o,offer:r},!0))}),m(),Ue(),m()}if(e&2){let n=t,i=c(),o=qe(1,5,n,!0);l(2),h("id",i.TILE_PREFIX_ID+n.metaCode)("offer",o)("showSeeOtherOptions",i.showAlternativeFlightsButton);let r=_(5,8,n);l(4),h("data",r)("href",o.variantUrl())}}function Ql(e,t){if(e&1){let n=Y();f(0,"label",34),d(1,"i18n"),b("clicked",function(){C(n);let o=c();return v(o.openMap())}),m()}e&2&&h("text",_(1,1,"View_On_Map"))}function Wl(e,t){e&1&&S(0,"div",18)}function Xl(e,t){if(e&1&&(S(0,"jan-filters",19),d(1,"async"),d(2,"async")),e&2){let n=c();h("filterGroups",_(1,2,n.searchState.filterGroups$))("activeFiltersCount",_(2,4,n.searchState.activeFiltersCount$))}}function Yl(e,t){e&1&&S(0,"jan-filters-sidebar-skeleton",20)}function Kl(e,t){e&1&&S(0,"esky-member-status-bar",22),e&2&&h("memberEarn
11Bar",t)}function Zl(e,t){if(e&1&&(f(0,"progress-bar",35),S(1,"esky-headline-slider",40),d(2,"i18n"),d(3,"i18n"),d(4,"i18n"),d(5,"i18n"),m()),e&2){let n=c(2);h("clearLoaderSource$",n.uiState.clearProgress$)("loading",!0),l(),h("interval",2e3)("running",!0)("slides",Ko(13,Al,_(2,5,"Search_headline_1"),_(3,7,"Search_headline_2"),_(4,9,"Search_headline_3"),_(5,11,"Search_headline_4")))}}function Jl(e,t){e&1&&ue(0)}function ec(e,t){if(e&1&&be(0,Jl,1,0,"ng-container",30),e&2){c(2);let n=se(43);h("ngTemplateOutlet",n)}}function tc(e,t){e&1&&S(0,"jan-portfolio-offer-tile-skeleton-v2")(1,"jan-portfolio-offer-tile-skeleton-v2")(2,"jan-portfolio-offer-tile-skeleton-v2")}function ic(e,t){e&1&&S(0,"jan-portfolio-offer-tile-skeleton")(1,"jan-portfolio-offer-tile-skeleton")(2,"jan-portfolio-offer-tile-skeleton")}function oc(e,t){if(e&1&&O(0,tc,3,0)(1,ic,3,0),e&2){c(2);let n=Be(4);y(n?0:1)}}function rc(e,t){if(e&1){let n=Y();f(0,"a",42),d(1,"portfolioOfferTileViewModel"),b("tileClicked",function(o){C(n);let r=c(3);return v(r.selectPortfolioTile(o,!0))})("wishlistToggle",function(o){let r=C(n),s=c(3);return v(s.handleWishlistToggle(o,r))}),$e(2,32),le(3),d(4,"searchOfferTilePricing"),f(5,"jan-offer-tile-available-pricing",43),b("potentialDiscountClicked",function(o){C(n);let r=c(3);return v(r.handlePotentialDiscountClicked(o))}),m(),Ue(),m()}if(e&2){let n=t,i=c(3);h("id",i.TILE_PREFIX_ID+n.metaCode)("offer",qe(1,3,n,!0));let o=_(4,6,n);l(5),h("data",o)}}function nc(e,t){if(e&1&&O(0,rc,6,8,"a",41),e&2){let n,i=c(2);y((n=i.searchState.preselectedPackageSignal())?0:-1,n)}}function ac(e,t){e&1&&(f(0,"h2",36),E(1),d(2,"i18n"),m()),e&2&&(l(),z("",_(2,1,"See_other_hotels"),":"))}function sc(e,t){if(e&1){let n=Y();le(0),d(1,"portfolioOfferTileViewModelV2"),f(2,"jan-portfolio-offer-tile-v2",46),b("tileClicked",function(o){C(n);let r=c(3);return v(r.selectPortfolioTile(o))})("mapClicked",function(o){C(n);let r=c(3);return v(r.openHotelMap(o))})("wishlistToggle",function(o){C(n);let r=c().$implicit,s=c(2);return v(s.handleWishlistToggle(o,r))})("seeOtherOptionsShown",function(o){C(n);let r=c(3);return v(r.onSrpAltFlightsButtonShown(o))})("seeOtherOptionsClicked",function(o){C(n);let r=c(3);return v(r.openAlternativeFlightsFromSrp(o))}),$e(3,32),le(4),d(5,"searchOfferTilePricingV2"),f(6,"jan-offer-tile-available-pricing-v2",33),b("potentialDiscountClicked",function(o){C(n);let r=c(3);return v(r.handlePotentialDiscountClicked(o))})("chooseClicked",function(o){C(n);let r=c().$implicit,s=c(2);return v(s.selectPortfolioTile({event:o,offer:r}))}),m(),Ue(),m()}if(e&2){let n=c().$implicit,i=c(2),o=_(1,5,n);l(2),h("id",i.TILE_PREFIX_ID+n.metaCode)("offer",o)("showSeeOtherOptions",i.showAlternativeFlightsButton);let r=_(5,7,n);l(4),h("data",r)("href",o.variantUrl())}}function lc(e,t){if(e&1){let n=Y();f(0,"a",47),d(1,"portfolioOfferTileViewModel"),b("tileClicked",function(o){C(n);let r=c(3);return v(r.selectPortfolioTile(o))})("wishlistToggle",function(o){C(n);let r=c().$implicit,s=c(2);return v(s.handleWishlistToggle(o,r))}),$e(2,32),le(3),d(4,"searchOfferTilePricing"),f(5,"jan-offer-tile-available-pricing",43),b("potentialDiscountClicked",function(o){C(n);let r=c(3);return v(r.handlePotentialDiscountClicked(o))}),m(),Ue(),m()}if(e&2){let n=c().$implicit,i=c(2);h("id",i.TILE_PREFIX_ID+n.metaCode)("offer",_(1,3,n));let o=_(4,5,n);l(5),h("data",o)}}function cc(e,t){if(e&1&&S(0,"jan-generic-promo-banner",48),e&2){let n=c(4);h("config",n.genericBannerSlot.genericPromoBannerConfig)}}function pc(e,t){e&1&&(Ze(0,cc,1,1),Je(1,0,wl),_t())}function fc(e,t){e&1&&S(0,"jan-callback-box",50)}function mc(e,t){if(e&1&&be(0,fc,1,0,"jan-callback-box",49),e&2){let n=c(4);h("janShowCallbackBox",n.showCallback)}}function dc(e,t){e&1&&(Ze(0,mc,1,1),Je(1,0,El),_t())}function uc(e,t){if(e&1&&(O(0,sc,7,9,"jan-portfolio-offer-tile-v2",44)(1,lc,6,7,"a",45),O(2,pc,3,0),O(3,dc,3,0)),e&2){let n=t.$index,i=c(2),o=Be(0),r=Be(4);y(r?0:1),l(2),y(i.genericBannerSlot.shouldDisplayGenericBanner(Yo(3,Il,n,o,i.offersToDisplay().length))?2:-1),l(),y(i.callbackSlot.shouldDisplayCallbackBox($t(7,Dl,n,i.offersToDisplay().length))?3:-1)}}function hc(e,t){e&1&&S(0,"jan-portfolio-offer-tile-skeleton-v2")}function _c(e,t){e&1&&S(0,"jan-portfolio-offer-tile-skeleton")}function gc(e,t){if(e&1&&($e(0),O(1,hc,1,0,"jan-portfolio-offer-tile-skeleton-v2")(2,_c,1,0,"jan-portfolio-offer-tile-skeleton"),Ue()),e&2){c(2);let n=Be(4);l(),y(n?1:2)}}function Sc(e,t){if(e&1&&(O(0,Zl,6,18,"progress-bar",35),d(1,"async"),O(2,ec,1,1,"ng-container"),O(3,oc,2,1),d(4,"async"),O(5,nc,1,1),O(6,ac,3,3,"h2",36),Re(7,uc,4,10,null,null,Rl),be(9,gc,3,1,"ng-container",37),f(10,"div",38)(11,"button",39),E(12),d(13,"i18n"),m()()),e&2){let n=c(),i=Be(4);y(_(1,6,n.searchState.isFirstPageLoading$)?0:-1),l(2),y(!i&&n.searchState.showNoPreselectedPackageMsgSignal()?2:-1),l(),y(_(4,8,n.searchState.initialLoading$)?3:-1),l(2),y(i?-1:5),l(),y(n.searchState.showOtherOffersHeading()?6:-1),l(),Le(n.offersToDisplay()),l(5),z(" ",_(13,10,"Show_more_results")," ")}}function Cc(e,t){if(e&1){let n=Y();f(0,"h1"),E(1),d(2,"i18n"),m(),f(3,"small",52),E(4),d(5,"i18n"),m(),f(6,"button",53),b("click",function(){C(n);let o=c(2);return v(o.qsfState.clearQsf())}),E(7),d(8,"i18n"),m()}e&2&&(l(),K(_(2,3,"Results_not_found")),l(3),K(_(5,5,"Results_not_found_description")),l(3),z(" ",_(8,7,"See_all_offers")," "))}function vc(e,t){if(e&1){let n=Y();f(0,"h1"),E(1),d(2,"i18n"),m(),f(3,"small",52),E(4),d(5,"i18n"),m(),f(6,"esky-active-filters-list",54),d(7,"async"),d(8,"async"),b("removeFilter",function(o){C(n);let r=c(2);
11return v(r.store.dispatch(r.PortfolioActions.changeFilter(o)))}),m(),f(9,"button",53),b("click",function(){C(n);let o=c(2);return v(o.store.dispatch(o.PortfolioActions.clearAllFilters()))}),E(10),d(11,"i18n"),m()}if(e&2){let n=c(2);l(),K(_(2,5,"Results_not_found")),l(3),K(_(5,7,"Filtered_results_not_found_description")),l(2),h("activeFilters",_(7,9,n.searchState.activeFilters$))("maxPresentedCount",_(8,11,n.uiState.presentedActiveFiltersNumber$)),l(4),z(" ",_(11,13,"Clear_all")," ")}}function Pc(e,t){if(e&1&&(f(0,"div",23),S(1,"esky-pms-image",51),O(2,Cc,9,9),d(3,"async"),O(4,vc,12,15),d(5,"async"),m()),e&2){let n=c();l(2),y(_(3,2,n.searchState.offersNotFound$)?2:-1),l(2),y(_(5,4,n.searchState.filteredOffersNotFound$)?4:-1)}}function Oc(e,t){e&1&&(f(0,"div",55),S(1,"jan-callback-box",50),m())}function yc(e,t){if(e&1&&($e(0),O(1,Oc,2,0,"div",55),d(2,"async"),Ue()),e&2){let n=c();l(),y(_(2,1,n.showCallbackBoxWhenNoResults$)?1:-1)}}function xc(e,t){e&1&&S(0,"jan-chat-button")}function bc(e,t){e&1&&(f(0,"le-helper",56),S(1,"le-icon",57),f(2,"span",58),E(3),d(4,"i18n"),m(),f(5,"p"),E(6),d(7,"i18n"),m()()),e&2&&(l(),h("size",20),l(2),K(_(4,3,"No_selected_offer_header")),l(3),K(_(7,5,"No_selected_offer_description")))}var kc=-1,po=(()=>{let t=class t{constructor(){var i,o,r,s;this.breakpointMatcherService=a(ot),this.leBreakpointObserver=a(xr),this.isAboveXxs=this.leBreakpointObserver.observe("min-xs"),this.isAboveXs=this.leBreakpointObserver.observe("min-s"),this.portfolioSearchFormDatesService=a(jr),this.activatedRoute=a(et),this.document=a(Ee),this.destroyRef=a(Ae),this.ngZone=a(It),this.resultsBarSection=je("resultsBarSection"),this.topSearchForm=je("topSearchForm"),this.topSearchFormElement=je("topSearchForm",{read:xe}),this.stickySearchForm=je("stickySearchForm"),this.stickySearchFormElement=je("stickySearchForm",{read:xe}),this.isStickyPopoverOpen=te(!1),this.isStickyFormExpanded=q(()=>{var p;return Zi((p=this.stickySearchFormElement())==null?void 0:p.nativeElement)}),this.outsideClickCleanups=[],this.webViewDisplayMode=a(Xt).webViewDisplayMode,this.memberEarnBar=a(x).selectSignal(j.memberEarnBar),this.portfolioOfferTileService=a(lt),this.router=a(Ce),this.openExternalPageFeature=a(Kn),this.config=a(ce),this.partnerSettingsAbTestsService=a(Yi),this.variantUrlPipe=a(nt),this.platformId=a($),this.userZoneFeature=a(pa),this.openLoginAnalyticsService=a(_n),this.dialog=a(br),this.bottomSheet=a(qr),this.injector=a(Io),this.portfolioSearchAnalyticsService=a(Gi),this.srpAltFlightsButtonAnalyticsService=a(Qi),this.portfolioEnterAnalyticsService=a(Er),this.store=a(x),this.modalState=a(wa),this.stateDispatcher=a(Ea),this.qsfState=a(Pn),this.searchState=a(di),this.uiState=a(Bn),this.genericBannerSlot=a(Da),this.callbackSlot=a(Ia),this.offerTileAbTests=a(ra),this.TILE_PREFIX_ID=ft,this.offersToDisplay=this.store.selectSignal(j.offersToDisplay),this.PortfolioActions=N,this.shouldRestoreScrollPosition=((i=this.router.currentNavigation())==null?void 0:i.trigger)==="popstate"||((o=this.router.lastSuccessfulNavigation())==null?void 0:o.trigger)==="popstate"||Hi((r=this.router.currentNavigation())==null?void 0:r.extras.state)||Hi((s=this.router.lastSuccessfulNavigation())==null?void 0:s.extras.state),this.isMobile$=this.breakpointMatcherService.lessEqualTablet$,this.hasFetchedAll=this.store.selectSignal(j.hasFetchedAll),this.isContextFallback=this.store.selectSignal(j.isContextFallback),this.showPureCloud=J(this.platformId)&&this.config.features.pureCloud.webChat.enabled,this.showCallback=this.config.features.portfolio.search.showCallback,this.mapFeatureEnabled=this.config.features.portfolio.search.showMap,this.showAlternativeFlightsButton=this.config.features.portfolio.search.showAlternativeFlightsButton,this.showMap=q(()=>this.mapFeatureEnabled&&this.hasFetchedAll()&&!this.isContextFallback()),this.preselectedSlotVisible=q(()=>this.offerTileAbTests.showOfferTileV2()&&!this.searchState.showNotFoundBox()),this.preselectedOfferInResultsBar=q(()=>this.preselectedSlotVisible()?this.searchState.preselectedPackageSignal():void 0),this.showPreselectedUnavailableBanner=q(()=>this.preselectedSlotVisible()&&this.searchState.showNoPreselectedPackageMsgSignal()),this.preselectedOfferIsAwaited=this.store.selectSignal(kt.preselectedOfferIsAwaited),this.showPreselectedOfferSkeleton=q(()=>this.preselectedSlotVisible()&&this.preselectedOfferIsAwaited()),this.showCallbackBoxWhenNoResults$=de([this.searchState.offersNotFound$,this.searchState.filteredOffersNotFound$]).pipe(w(([p,u])=>p||u)),this.resultsCount$=de([this.searchState.filteredOffersCount$,this.searchState.totalOffersCount$]).pipe(w(([p,u])=>({filteredOffersCount:p,totalOffersCount:u})))}handlePotentialDiscountClicked(i){i.event.stopPropagation(),i.event.preventDefault(),this.userZoneFeature.openLogin(),this.openLoginAnalyticsService.sendOpenLoginAnalytics({eventSourceComponent:"PriceLoginTextTile"})}selectPortfolioTile(i,o=!1){i.event.preventDefault();let r=o?this.searchState.preselectedPackageSignal():this.offersToDisplay().find(p=>p.metaCode===i.offer.metaCode);this.stateDispatcher.selectOffer(r);let s=Ui(this.portfolioOfferTileService.getLinkOptions(r)(),this.activatedRoute.snapshot.queryParamMap);this.shouldOpenInNewTab(i.event.ctrlKey||i.event.metaKey)?(s.queryParams.eventSource="packages.search.results",this.openExternalPageFeature.handle(this.variantUrlPipe.transform(s))):this.router.navigate(s.commands,s)}onSrpAltFlightsButtonShown(i){let o=this.resolveSearchOffer(i.metaCode);o&&this.srpAltFlightsButtonAnalyticsService.sendButtonShown(o,this.resolveTilePosition(o.metaCode))}openAlternativeFlightsFromSrp(i){let o=this.resolveSearchOffer(i.metaCode);if(!o)return;let r=crypto.randomUUID();this.srpAltFlightsButtonAnalyticsService.sendButtonClick(o,this.resolveTilePosition(o.metaCode),r);let s=Ui(this.portfolioOfferTileService.getAlternativeFlightsLinkOptions(o,r),this.activatedRoute.snapshot.queryParamMap);this.webViewDisplayMode?this.router.navigate(s.commands,s):this.openExternalPageFeature.handle(this.variantUrlPipe.transform(s))}openHotelMap(i){let o=this.portfolioOfferTileService.getMapLinkOptions(i.offer.metaCode)();this.router.navigate(o.commands,o)}openSortBottomSheet(){return Oe(this,null,function*(){let[{LeSBottomSheetContainerComponent:i},{SorterBottomSheetComponent:o}]=yield Promise.all([import("./chunk-NHAMKBQ3.js"),import("./chunk-F6FJYQCR.js")]);this.bottomSheet.open(o,{container:i,parentInjector:this.injector})})}openFiltersDialog(){return Oe(this,null,function*(){let[{FiltersDialogComponent:i},{LeMDialogContainerComponent:o}]=yield Promise.all([import("./chunk-PJFSL5CM.js"),import("./chunk-JHKIOGET.js")]);this.dialog.open(i,{container:o,parentInjector:this.injector})})}ngOnInit(){this.portfolioEnterAnalyticsService.dispatchEnterEvent(this.activatedRoute.snapshot),de([this.portfolioSearchFormDatesService.getPossibleDatesRanges(),this.portfolioSearchFormDatesService.getDefaultStayLengths()]).pipe(Q(1)).subscribe(([i,o])=>{i&&this.store.dispatch(bt.possibleDatesRangesChanged({ranges:i})),o&&this.store.dispatch(bt.defaultStayLengthsChanged({stayLengths:o})),this.init()})}ngAfterViewInit(){var i;J(this.platformId)&&((i=this.document.defaultView)==null||i.scrollTo({top:0,behavior:"instant"}),this.outsideClickCleanups.push(this.initOutsideClickListener(()=>this.stickySearchForm(),()=>this.stickySearchFormElement()),this.initOutsideClickListener(()=>this.topSearchForm(),()=>this.topSearchFormElement()))),this.shouldRestoreScrollPosition&&this.store.select(Tt.state).pipe(Fo(o=>o.source==="UNKNOWN"),Q(1),H(o=>o.source==="CACHE"),L(()=>this.store.select(xn.state).pipe(Q(1))),H(o=>o.status==="AVAILABLE"),To(0)).subscribe({next:o=>{var r;(r=this.document.getElementById(`${ft}${o.metaCode}`))==null||r.scrollIntoView({behavior:"instant",block:"start"})}})}ngOnDestroy(){this.outsideClickCleanups.forEach(i=>
11i()),this.outsideClickCleanups.splice(0),this.store.dispatch(N.clearSearch())}handleWishlistToggle(i,o){this.store.dispatch(Mt.toggleWishlistItem({offer:o,triggerElementId:i.wishlistElementTriggerId}))}onRecentSearchesVisible(){this.portfolioSearchAnalyticsService.sendRecentSearchesVisibleEvent()}openMap(){this.portfolioSearchAnalyticsService.sendMapClickEvent();let i=this.activatedRoute.snapshot.queryParams,o=mi(i);this.router.navigate(["portfolio","map"],{queryParams:o})}initOutsideClickListener(i,o){let r=s=>{var I;let p=i(),u=(I=o())==null?void 0:I.nativeElement,k=s.target;if(!p||!u||!(k instanceof Node))return;let F=k instanceof Element?k:k.parentElement,T=s.composedPath().includes(u),g=ba(F,s);T||g||this.ngZone.run(()=>{p.closeOpenedPopover()||Zi(u)&&p.collapseSearchForm()})};return this.ngZone.runOutsideAngular(()=>{this.document.addEventListener("click",r)}),()=>this.document.removeEventListener("click",r)}resolveSearchOffer(i){let o=this.searchState.preselectedPackageSignal();return(o==null?void 0:o.metaCode)===i?o:this.offersToDisplay().find(r=>r.metaCode===i)}resolveTilePosition(i){let o=this.offersToDisplay().findIndex(r=>r.metaCode===i);return o===-1?kc:o}getRequiredQueryParams(i){let u=i,{pricePresentation:o,portfolioToken:r,searchParamsChanged:s}=u;return At(u,["pricePresentation","portfolioToken","searchParamsChanged"])}init(){this.store.dispatch(N.searchEnter()),this.activatedRoute.queryParams.pipe(w(i=>this.getRequiredQueryParams(i??{})),Lr(),ke(this.destroyRef)).subscribe(()=>{this.stateDispatcher.initSearch(),this.webViewDisplayMode||this.store.dispatch(me.setPortfolioSearchSeo())})}getFeatureFlagValue(i,o){let r=this.partnerSettingsAbTestsService.getFlagValue(i);return r!==null?r:o}shouldOpenInNewTab(i){return i?!0:this.breakpointMatcherService.isDesktop()||this.breakpointMatcherService.isLarge()?this.getFeatureFlagValue(Ge.OpenOfferInNewTabDesktop,this.config.features.packages.openTileInNewTabDesktop):this.getFeatureFlagValue(Ge.OpenOfferInNewTabMobile,this.config.features.packages.openTileInNewTabMobile)}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=X({type:t,selectors:[["jan-portfolio-search"]],viewQuery:function(o,r){o&1&&Lt(r.resultsBarSection,kl,5)(r.topSearchForm,Ka,5)(r.topSearchFormElement,Ka,5,xe)(r.stickySearchForm,Za,5)(r.stickySearchFormElement,Za,5,xe),o&2&&Bt(5)},features:[Vt([{provide:Yt,useValue:"portfolio"},Gi,Qi])],decls:44,vars:39,consts:[["overlayController","qsfOverlay"],["topSearchForm",""],["resultsBarSection",""],["preselectedUnavailableBanner",""],["stickyHeaderDir","janStickyHeader"],["stickySearchForm",""],["data-anchor","scroll-top","eskySearchFormOverlay","",1,"hero"],[1,"qsf-container"],["janPortfolioQsfAnalytics","","janPortfolioQsfInteractionAnalytics","","janPortfolioQsfSearch","","popoverIdPrefix","top",3,"piQSFFiltersClick","piQSFRecentSearchesVisible","collapsible","collapseOnOutsideClick","stickySummary","showFiltersButton","expandOnFiltersClick","expandInlineOnDesktop","forceMobileSummaryAppearance"],[1,"overlay",3,"top"],["janStickyHeader","",1,"sticky-header",3,"janStickyHeaderTrigger","paused","sticky-header--visible"],[1,"p-layout"],[1,"p-layout__header"],["data-testid","selected-hotel-banner-skeleton"],["janPortfolioSearchAnalytics","","data-testid","selected-hotel-banner",3,"id","offer","janSeenPackage","showSeeOtherOptions"],[3,"sortClick","filtersClick","openMap"],[1,"p-layout__filters"],["le-map-button","","data-testid","open-search-map-button",1,"desktop-map-button",3,"text"],[1,"desktop-map-button","desktop-map-button--skeleton"],[1,"filters-sidebar",3,"filterGroups","activeFiltersCount"],["stroke","full"],[1,"p-layout__results"],["labelKey","Member_status_bar_packages_label","labelContext","portfolio",3,"memberEarnBar"],[1,"not-found-info"],[4,"janShowCallbackBox"],[1,"overlay"],[3,"filteredOffersNotFound","offersNotFound"],["janStickyHeader","",1,"sticky-header",3,"janStickyHeaderTrigger","paused"],["janPortfolioQsfAnalytics","","janPortfolioQsfInteractionAnalytics","","janPortfolioQsfSearch","","popoverIdPrefix","sticky",1,"sticky-qsf",3,"piQSFPopoverOpen","piQSFPopoverClose","piQSFFiltersClick","piQSFRecentSearchesVisible","collapsible","collapseOnOutsideClick","expandInlineOnDesktop","stickySummary","showFiltersButton","showSearchButtonInSummary","forceMobileLayout","disableScrollOnPopoverOpen"],[3,"sortClick","filtersClick","mapClick","activeFiltersCount"],[4,"ngTemplateOutlet"],["janPortfolioSearchAnalytics","","data-testid","selected-hotel-banner",3,"tileClicked","mapClicked","wishlistToggle","seeOtherOptionsShown","seeOtherOptionsClicked","id","offer","janSeenPackage","showSeeOtherOptions"],["janOfferTilePricing",""],[3,"potentialDiscountClicked","chooseClicked","data","href"],["le-map-button","","data-testid","open-search-map-button",1,"desktop-map-button",3,"clicked","text"],[1,"progress",3,"clearLoaderSource$","loading"],[1,"pi-single-line-18","pi-font-bold"],[4,"janShowLoadingMoreSkeleton"],[1,"load-more-container"],["le-button","","data-testid","load-more-button",1,"load-more-button",3,"janLoadMoreButton"],[3,"interval","running","slides"],["jan-portfolio-offer-tile","","janPortfolioSearchAnalytics","","data-testid","selected-hotel-banner",3,"id","offer","janSeenPackage"],["jan-portfolio-offer-tile","","janPortfolioSearchAnalytics","","data-testid","selected-hotel-banner",3,"tileClicked","wishlistToggle","id","offer","janSeenPackage"],[3,"potentialDiscountClicked","data"],["janPortfolioSearchAnalytics","","data-testid","hotel-offer-block",3,"id","offer","janSeenPackage","showSeeOtherOptions"],["jan-portfolio-offer-tile","","janPortfolioSearchAnalytics","","data-testid","hotel-offer-block",3,"id","offer","janSeenPackage"],["janPortfolioSearchAnalytics","","data-testid","hotel-offer-block",3,"tileClicked","mapClicked","wishlistToggle","seeOtherOptionsShown","seeOtherOptionsClicked","id","offer","janSeenPackage","showSeeOtherOptions"],["jan-portfolio-offer-tile","","janPortfolioSearchAnalytics","","data-testid","hotel-offer-block",3,"tileClicked","wishlistToggle","id","offer","janSeenPackage"],["janPromoBannerClickAnalytics","GENERIC",3,"config"],["janCallbackPortfolioAnalytics","",3,"eskyCallbackDataLayer",4,"janShowCallbackBox"],["janCallbackPortfolioAnalytics","",3,"eskyCallbackDataLayer"],["name","illustration-default-island",1,"not-found-img"],[1,"not-found-description"],["le-button","","variant","text","color","accent-1","size","medium",3,"click"],["presentation","centered",1,"active-filters-in-msg",3,"removeFilter","activeFilters","maxPresentedCount"],[1,"callback-container"],["color","warning","data-testid","no-selected-offer-banner",1,"hotel-no-available"],["name","pi-ic-s-info-shield","ngProjectAs","icon",5,["icon"],3,"size"],["ngProjectAs","title",5,["title"]]],template:function(o,r){if(o&1&&(le(0),d(1,"async"),le(2),d(3,"async"),le(4),f(5,"section",6,0)(7,"div",7)(8,"esky-portfolio-search-form",8,1),b("piQSFFiltersClick",function(){return r.openFiltersDialog()})("piQSFRecentSearchesVisible",function(){return r.onRecentSearchesVisible()}),m()()(),O(10,Ll,1,2,"div",9),O(11,jl,3,0)(12,Nl,3,0),O(13,$l,6,17,"div",10),f(14,"div",11)(15,"section",12,2),O(17,Ul,1,0,"jan-search-results-heading"),O(18,ql,1,1,"ng-container")(19,zl,1,0,"jan-portfolio-offer-tile-skeleton-v2",13)(20,Gl,7,10,"jan-portfolio-offer-tile-v2",14),f(21,"jan-search-results-bar",15),b("sortClick",function(){return r.openSortBottomSheet()})("filtersClick",function(){return r.openFiltersDialog()})("openMap",function(){return r.openMap()}),m()(),f(22,"aside",16),O(23,Ql,2,3,"label",17),O(24,Wl,1,0,"div",18),O(25,Xl,3,6,"jan-filters",19),d(26,"async"),O(27,Yl,1,0,"jan-filters-sidebar-skeleton",20),d(28,"async"),d(29,"async"),m(),f(30,"section",21),O(31,Kl,1,1,"esky-member-status-bar",22),O(32,Sc,14,12),d(33,"async"),d(34,"async"),O(35,Pc,6,6,"div",23),d(36,"async"),m()(),be(37,yc,3,3,"ng-container",24),S(38,"jan-scroll-top-button"),Ze(39,xc,1,0),Je(40,39,Tl),be(42,bc,8,7,"ng-template",null,3,Ct)),o&2){let s,p,u=se(6);gt(_(1,21,r.isMobile$));let k=_(3,24,r.searchState.isFirstPageLoading$);l(4),gt(r.offerTileAbTests.showOfferTileV2()),l(4),h("collapsible",!r.isAboveXs())("collapseOnOutsideClick",!1)("stickySummary",!1)("showFiltersButton",!1)("expandOnFiltersClick",!1)("expandInlineOnDesktop",r.isAboveXxs())("forceMobileSummaryAppearance",!1),l(2),y(u.isOverlayVisible()?10:-1),l(),y(r.searchState.showNotFoundBox()?11:r.searchState.showSearchParamsChangedBox()?12:-1),l(2),y(r.isAboveXs()?-1:13),l(4),y(r.webViewDisplayMode?-1:17),l(),y(r.showPreselectedUnavailableBanner()?18:r.showPreselectedOfferSkeleton()?19:(s=r.preselectedOfferInResultsBar())?20:-1,s),l(5),y(r.showMap()?23:-1),l(),y(r.mapFeatureEnabled&&k?24:-1),l(),y(_(26,27,r.uiState.showFilters$)?25:-1),l(2),y(_(29,31,!_(28,29,r.uiState.showFilters$)&&r.searchState.isFirstPageLoading$)?27:-1),l(4),y((p=r.memberEarn
11Bar())?31:-1,p),l(),y(!_(33,33,r.searchState.offersNotFound$)&&!_(34,35,r.searchState.filteredOffersNotFound$)?32:-1),l(3),y(_(36,37,r.uiState.showNotfoundMessage$)?35:-1),l(2),h("janShowCallbackBox",r.showCallback),l(3),$o(r.showPureCloud)}},dependencies:[kn,vn,wn,En,hn,Ht,eo,io,Wn,Mr,Ki,Qe,kr,aa,un,na,so,qi,zi,oo,$i,Mi,ro,Ve,Gr,zr,lo,Tr,Yn,pe,Ga,sa,Zn,co,Ya,Jn,oa,ia,Wr,ir,fe,Fa,Xa,Wa,Qa],styles:['@keyframes _ngcontent-%COMP%_le-shimmer{to{transform:translate(100%)}}[_nghost-%COMP%]{--search-form-sticky-z-index: 3;--search-form-z-index: 3}.hero[_ngcontent-%COMP%]{background-color:var(--qsf-background-color);min-height:90px;box-sizing:content-box}@media(min-width:852px){.hero[_ngcontent-%COMP%]{position:relative;z-index:9}}.overlay[_ngcontent-%COMP%]{display:none;background:#0000007a;position:fixed;inset:0;z-index:3}@media(min-width:852px){.overlay[_ngcontent-%COMP%]{display:block}}.ghost[_ngcontent-%COMP%]{opacity:.3;transition:ease .5s}.load-more-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.filters-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:286px;max-width:328px;background-color:var(--pi-color-white);overflow:hidden}@media screen and (min-width:1090px){.mobile-bar[_ngcontent-%COMP%]{display:none}}.not-found-info[_ngcontent-%COMP%]{text-align:center;width:calc(100vw - 2 * var(--pi-size-spacing-24))}@media screen and (min-width:772px){.not-found-info[_ngcontent-%COMP%]{width:600px;margin:0 auto}}.not-found-info[_ngcontent-%COMP%] .not-found-img[_ngcontent-%COMP%]{width:272px;height:244px;margin:0 auto}.not-found-info[_ngcontent-%COMP%] .not-found-description[_ngcontent-%COMP%]{color:var(--pi-color-neutral-500);margin-bottom:var(--pi-size-spacing-24);display:block}.not-found-info[_ngcontent-%COMP%] .active-filters-in-msg[_ngcontent-%COMP%]{margin-bottom:.75rem}esky-search-results-layout[_ngcontent-%COMP%]{background-color:var(--pi-color-white)}jan-chat-button[_ngcontent-%COMP%]{position:fixed;right:16px;bottom:64px;z-index:99}@media screen and (min-width:1090px){jan-chat-button[_ngcontent-%COMP%]{bottom:16px}}jan-callback-box[_ngcontent-%COMP%]{border:1px solid #d9d9d9;border-radius:20px}.p-layout[_ngcontent-%COMP%]{padding:2rem 1.25rem;display:grid;grid-template-areas:"header header" "results results";grid-template-columns:1fr 1fr;gap:2rem;grid-template-rows:min-content 1fr}@media screen and (min-width:684px){.p-layout[_ngcontent-%COMP%]{padding:2.5rem}}@media screen and (min-width:1090px){.p-layout[_ngcontent-%COMP%]{grid-template-areas:"filters header" "filters results";grid-template-columns:minmax(286px,328px) minmax(604px,1fr)}}@media screen and (min-width:1408px){.p-layout[_ngcontent-%COMP%]{grid-template-columns:328px 1fr;padding:2.5rem 0;max-width:1240px;width:1240px;margin-left:auto;margin-right:auto}}@media screen and (min-width:1920px){.p-layout[_ngcontent-%COMP%]{width:calc(100vw - var(--sticky-navigation-left-bar-height) - var(--scrollbar));max-width:none;margin-left:auto;margin-right:auto;padding:2.5rem 296px;grid-template-rows:min-content 1fr}}@media screen and (min-width:2344px){.p-layout[_ngcontent-%COMP%]{padding:2.5rem 0;margin-left:auto;margin-right:auto;max-width:1664px;width:1664px}}.p-layout__header[_ngcontent-%COMP%]{grid-area:header;display:flex;flex-direction:column}.p-layout__header[_ngcontent-%COMP%] le-helper[_ngcontent-%COMP%]{margin-top:1rem}.p-layout__header[_ngcontent-%COMP%] le-helper[_ngcontent-%COMP%] + jan-search-results-bar[_ngcontent-%COMP%]{margin-top:2rem}.p-layout__header[_ngcontent-%COMP%] jan-search-results-heading[_ngcontent-%COMP%] + jan-search-results-bar[_ngcontent-%COMP%]{margin-top:.75rem}@media screen and (max-width:683px){.p-layout__header[_ngcontent-%COMP%] jan-search-results-heading[_ngcontent-%COMP%] + jan-search-results-bar[_ngcontent-%COMP%]{margin-top:.5rem}}.p-layout__header[_ngcontent-%COMP%] jan-portfolio-offer-tile-v2[_ngcontent-%COMP%]{margin-top:1.625rem;scroll-margin-top:calc(var(--sticky-navigation-top-bar-height, 0px) + 1rem)}@media screen and (min-width:772px)and (max-width:1089px){.p-layout__header[_ngcontent-%COMP%] jan-portfolio-offer-tile-v2[_ngcontent-%COMP%]{scroll-margin-top:calc(var(--sticky-navigation-top-bar-height, 0px) + 64px + 1rem)}}.p-layout__header[_ngcontent-%COMP%] jan-portfolio-offer-tile-v2[_ngcontent-%COMP%] + jan-search-results-bar[_ng
11content-%COMP%]{margin-top:2.625rem}.p-layout__header[_ngcontent-%COMP%] jan-portfolio-offer-tile-skeleton-v2[_ngcontent-%COMP%]{margin-top:1rem}.p-layout__header[_ngcontent-%COMP%] jan-portfolio-offer-tile-skeleton-v2[_ngcontent-%COMP%] + jan-search-results-bar[_ngcontent-%COMP%]{margin-top:2rem}.p-layout__filters[_ngcontent-%COMP%]{grid-area:filters;display:none}@media screen and (min-width:1090px){.p-layout__filters[_ngcontent-%COMP%]{display:block}}.p-layout__results[_ngcontent-%COMP%]{grid-area:results;display:flex;flex-direction:column;width:100%;gap:2rem}.p-layout__results[_ngcontent-%COMP%] jan-portfolio-offer-tile-v2[_ngcontent-%COMP%], .p-layout__results[_ngcontent-%COMP%] [jan-portfolio-offer-tile][_ngcontent-%COMP%]{scroll-margin-top:calc(var(--sticky-navigation-top-bar-height, 0px) + 1rem)}@media screen and (min-width:772px)and (max-width:1089px){.p-layout__results[_ngcontent-%COMP%] jan-portfolio-offer-tile-v2[_ngcontent-%COMP%], .p-layout__results[_ngcontent-%COMP%] [jan-portfolio-offer-tile][_ngcontent-%COMP%]{scroll-margin-top:calc(var(--sticky-navigation-top-bar-height, 0px) + 64px + 1rem)}}.qsf-container[_ngcontent-%COMP%]{padding:1rem 1.25rem;min-height:calc(74px + 2rem)}@media screen and (min-width:684px)and (max-width:768px){.qsf-container[_ngcontent-%COMP%]{display:flex;justify-content:center}}@media screen and (min-width:684px){.qsf-container[_ngcontent-%COMP%]{padding:1rem 2.5rem}}@media screen and (min-width:772px){.qsf-container[_ngcontent-%COMP%]{padding:1.5rem 2.5rem}}@media screen and (min-width:1090px){.qsf-container[_ngcontent-%COMP%]{padding:2rem 2.5rem;min-height:calc(92px + 4rem)}}@media screen and (min-width:1408px){.qsf-container[_ngcontent-%COMP%]{padding:2rem 0;max-width:1240px;width:1240px;margin-left:auto;margin-right:auto}}@media screen and (min-width:1920px){.qsf-container[_ngcontent-%COMP%]{width:100%;max-width:100%;margin:0;padding:2.5rem 296px}}@media screen and (min-width:2344px){.qsf-container[_ngcontent-%COMP%]{padding:2.5rem 0;margin-left:auto;margin-right:auto;max-width:1664px;width:1664px}}@media screen and (min-width:684px)and (max-width:1089px){.qsf-container[_ngcontent-%COMP%] qsf-search-form-summary{margin:0!important}}.callback-container[_ngcontent-%COMP%]{width:100%;padding:0 1.25rem}@media screen and (min-width:684px){.callback-container[_ngcontent-%COMP%]{padding:0 2.5rem}}@media screen and (min-width:1408px){.callback-container[_ngcontent-%COMP%]{padding:0;max-width:1240px;width:1240px;margin-left:auto;margin-right:auto}}.desktop-map-button[_ngcontent-%COMP%]{width:100%;height:6rem;margin-bottom:1rem}.desktop-map-button--skeleton[_ngcontent-%COMP%]{background-color:var(--pi-color-neutral-200);border-radius:.25rem;position:relative;overflow:hidden}.desktop-map-button--skeleton[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,rgba(255,255,255,0) 0%,var(--pi-color-neutral-25) 50%,rgba(255,255,255,0) 100%);animation:_ngcontent-%COMP%_le-shimmer 1.5s infinite}.desktop-map-button--skeleton[_ngcontent-%COMP%]{border-radius:1.25rem}.sticky-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:fixed;right:0;z-index:10;top:0;left:0;padding:.5rem 1.25rem;background-color:var(--pi-color-white);border-bottom:.0625rem solid var(--pi-color-neutral-300);box-shadow:0 0 50px #0000000d;transform:translateY(-100%);visibility:hidden;transition:transform .25s ease-out,visibility .25s}.sticky-header--visible[_ngcontent-%COMP%]{transform:none;visibility:visible}@media screen and (min-width:772px){.sticky-header[_ngcontent-%COMP%]{top:var(--sticky-navigation-top-bar-height);left:var(--sticky-navigation-left-bar-height);padding:.75rem 1.25rem}}.sticky-qsf[_ngcontent-%COMP%]{opacity:0;max-height:0;overflow:hidden;transition:opacity .2s ease-out,max-height .2s ease-out}@supports (font: -apple-system-body){.sticky-qsf[_ngcontent-%COMP%]{display:none;max-height:none;opacity:1;overflow:visible;transition:none}}.sticky-qsf--visible[_ngcontent-%COMP%]{opacity:1;max-height:100px;overflow:visible;margin-bottom:.75rem}@supports (font: -apple-system-body){.sticky-qsf--visible[_ngcontent-%COMP%]{display:block}}.sticky-qsf[_ngcontent-%COMP%] qsf-search-form-summary .summaryShell{padding:var(--pi-size-spacing-8) var(--pi-size-spacing-16)!important}
11@media screen and (max-width:771px){[_nghost-%COMP%] .collapsibleModalBody{width:initial!important}}@media screen and (min-width:772px){[_nghost-%COMP%] .sticky-header:has(qsf-portfolio-search-form.inlineExpanded){z-index:13}[_nghost-%COMP%] .sticky-header:has(qsf-portfolio-search-form.inlineExpanded) .sticky-qsf{position:fixed;top:0;left:0;right:0;z-index:2;padding:1rem 2.5rem}[_nghost-%COMP%] .sticky-header:has(qsf-portfolio-search-form.inlineExpanded):after{content:"";position:fixed;inset:0;background:#0000007a;z-index:1;pointer-events:auto}[_nghost-%COMP%] .sticky-qsf esky-portfolio-search-form{--search-form-popover-z-index: 3}}'],changeDetection:0});let e=t;return e})();var Tc=/^\d+:\d+$/,Mc=/^\d{4}-\d{2}-\d{2}$/,Fc=/^\d{1,3}$/,ts=2,is=e=>Oe(null,null,function*(){let t=a(Ce);if(wc(e.queryParams))return Ne(t,e,{resolveOffsets:!0});let{departureDate:n,returnDate:i,stayLength:o}=e.queryParams;return o&&!Ec(o)?Ne(t,e,{stripStayLength:!0}):!n&&!i?!0:n&&!i?_i(n)?!0:Ne(t,e,{stripDates:!0}):!n&&i?_i(i)?Ne(t,e,{setDepartureDate:es()}):Ne(t,e,{stripDates:!0}):_i(i)?_i(n)?new Date(i)<=new Date(n)?Ne(t,e,{stripDates:!0}):!0:Ne(t,e,{setDepartureDate:es()}):Ne(t,e,{stripDates:!0})});function Ne(e,t,n){return Oe(this,null,function*(){let i=G({},t.queryParams);if(n.resolveOffsets){let o=Ja(os(t.queryParams)),r=Ja(rs(t.queryParams));delete i.departureDateOffset,delete i.departuredateoffset,delete i.returnDateOffset,delete i.returndateoffset,o&&(i.departureDate=o),r&&(i.returnDate=r)}return n.stripDates&&(delete i.departureDate,delete i.returnDate),n.stripStayLength&&delete i.stayLength,n.setDepartureDate&&(i.departureDate=n.setDepartureDate),yield e.navigate(["/portfolio"],{replaceUrl:!0,queryParams:i}),!1})}function wc(e){return os(e)!==void 0||rs(e)!==void 0}function os(e){return e.departureDateOffset??e.departuredateoffset}function rs(e){return e.returnDateOffset??e.returndateoffset}function Ja(e){if(!(!e||!Fc.test(e)))return yi(Gt(zt(new Date,Number(e))),{representation:"date"})}function Ec(e){if(!Tc.test(e))return!1;let[t,n]=e.split(":").map(Number);return t<=n}function _i(e){if(!Mc.test(e))return!1;let t=new Date(e);return isNaN(t.getTime())?!1:t>=Gt(zt(new Date,ts))}function es(){return yi(Gt(zt(new Date,ts)),{representation:"date"})}function Ft(e){return Oe(this,null,function*(){yield a(Ce).navigate(["/portfolio"],{replaceUrl:!0,queryParams:e})})}var ns=e=>Oe(null,null,function*(){if(!a(Sr).toUpperCase().includes("THOMASCOOKUK"))return!0;let I=e.queryParams,{datesTab:n,isFlexSearch:i,departureDate:o,returnDate:r,stayLength:s}=I,p=At(I,["datesTab","isFlexSearch","departureDate","returnDate","stayLength"]);if(n&&n!=="flexDates"||!n&&i!=="true")return!0;if(!o||!r)return yield Ft(ae(G({},p),{datesTab:"exactDate",stayLength:s})),!1;let u=new Date(o),k=new Date(r);if(Oi(fr(u),u)&&Oi(pr(u),k))return yield Ft(ae(G({},p),{datesTab:"months",stayLength:s,departureDate:o,returnDate:r})),!1;s||(yield Ft(ae(G({},p),{datesTab:"exactDate"})));let T=s.split(":").reduce((re,Z)=>re===Z?re:null);return cr(k,u).toString()===T?(yield Ft(ae(G({},p),{datesTab:"exactDate",departureDate:o,stayLength:s})),!1):(yield Ft(G(ae(G({},p),{datesTab:"exactDate"}),T!==null?{stayLength:s}:{})),!1)});var as=(e,t)=>{if(!In.some(i=>e.queryParamMap.has(i)))return!0;let n=a(Ce).parseUrl(t.url);return n.queryParams=Dn(n.queryParams),new sr(n,{replaceUrl:!0})};var ss=()=>(a(x).dispatch(en.resetSearchSource()),!0);var cs=(()=>{let t=class t{constructor(){this.actions$=a(V),this.store=a(x),this.routerStore=a(x),this.router=a(Ce),this.viewportScroller=a(rr),this.sectionsState=a(Yr),this.linkUpdateService=a(fa),this.recentFiltersStorageService=a(Kr),this.portfolioPageSearchStateQuery=a(di),this.mapSearchStateQuery=a(Pa),this.translationService=a(it),this.webViewTitleFeature=a(Oa),this.portfolioRouteService=a(pi),this.params$=this.routerStore.select(yt.queryParams),this.filterParams$=this.routerStore.select(yt.filtersParams),this.activeFilterGroups$=de([this.store.select(ua.state),this.mapSearchStateQuery.filterGroups$,this.portfolioPageSearchStateQuery.filterGroups$]).pipe(w(([i,o,r])=>(i.status==="LOADED"||i.status==="LOADING")&&o.length>0?o:r)),this.isOnMapPage$=this.portfolioRouteService.currentRoute$.pipe(w(i=>i==="portfolio-variants")),this.changeFilter$=M(()=>this.actions$.pipe(A(N.changeFilter),ht(this.activeFilterGroups$,this.store.select(ln.contextType),this.isOnMapPage$),B(([i,o,r])=>{r!==null&&this.recentFiltersStorageService.updateRecentMultiselectOptionIds("jan",Ln(r),i)}),w(([i,o,r,s])=>{let p=Ir(o,i),u=Fi(p);return this.router.navigate([],{queryParamsHandling:"merge",queryParams:G({page:null},u),preserveFragment:!0,replaceUrl:s}),N.filterChanged({filters:ls(u),action:i.selected?"selected":"deselected"})}))),this.clearFilterGroup$=M(()=>this.actions$.pipe(A(N.clearFiltersGroup),ht(this.activeFilterGroups$,this.isOnMapPage$),w(([{groupId:i},o,r])=>{let s=Dr(o,i),p=Fi(s);return this.router.navigate([],{queryParamsHandling:"merge",queryParams:G({page:null},p),preserveFragment:!0,replaceUrl:r}),N.filterChanged({filters:ls(p),action:"clear_group",groupId:i})}))),this.clearAllFilters$=M(()=>this.actions$.pipe(A(N.clearAllFilters),ht(this.filterParams$,this.isOnMapPage$),w(([i,o,r])=>{for(let s in o)o[s]=null;return this.router.navigate([],{queryParams:G({},o),queryParamsHandling:"merge",preserveFragment:!0,replaceUrl:r}),N.filterChanged({filters:{},action:"clear_all"})}))),this.sectionCollapseChange$=M(()=>this.actions$.pipe(A(N.filterSectionCollapseChange),w(({groupId:i,isExpanded:o})=>{this.sectionsState.updateSectionState(i,o)})),{dispatch:!1}),this.changeSort$=M(()=>this.actions$.pipe(A(N.changeSort),L(i=>this.linkUpdateService.updateSorter({direction:i.direction,name:i.field},0)),L(()=>[N.sortChanged()]))),this.resetSort$=M(()=>this.actions$.pipe(A(N.resetSort),L(()=>this.linkUpdateService.updateSorter({direction:wi.direction,name:wi.field})),L(()=>[N.sortChanged()]))),this.clearSearchParams$=M(()=>this.actions$.pipe(A(N.clearSearchParams),ht(this.params$),L(([i,o])=>this.router.navigate([],{queryParams:{context:o.contextId??o.context}}))),{dispatch:!1}),this.setTitleForMobileEffect$=M(()=>this.actions$.pipe(A(N.searchEnter),L(()=>{let i=this.translationService.translate("Page_title","portfolio-search-seo");return this.webViewTitleFeature.setTitle(i)})),{functional:!0,dispatch:!1}),this.scrollToTopOnQsfSearch$=M(()=>this.actions$.pipe(A(bt.searchSubmitted),L(()=>this.router.events.pipe(H(i=>i instanceof ar),Q(1),B(()=>this.viewportScroller.scrollToPosition([0,0]))))),{dispatch:!1})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();function ls(e){return Object.entries(Rr(e)).filter(([,t])=>t!=null).reduce((t,[n,i])=>ae(G({},t),{[n]:String(i)}),{})}var Ic=M(()=>{let e=a($),t=a(V);if(oe(e))return ye;let n=a(ya);return t.pipe(A(P.firstPageFullyLoaded,P.loadMoreOffersSuccess),B(({response:i})=>{var o;n.addSearchPricesToLocalStorage([(o=i.selectedOffer)==null?void 0:o.items[0],...i.offers.flatMap(r=>r.items)])}))},{functional:!0,dispatch:!1}),fo={updateSearchPricesEffect:Ic};var Dc=M(()=>{let e=a(V),t=a(x),n=a(Di),i=a(Ii),o=t.select(j.state).pipe(w(Ei(["LOADED"])),Q(1)),r=t.select(Vi.state).pipe(H(xt(["HAS_DATA"]))),s=t.select(kt.state),p=t.selectSignal(vt.isAuthorized),u=t.selectSignal(vt.email);return i.configurationsPackages$.pipe(L(k=>k.search.cacheSearchResults?e:ye),A(P.requestingFirstPage,P.restoreFromCache),L(k=>{let F={isAuthorized:p(),memberEmail:u()};return e.pipe(A(P.firstPageFullyLoaded,P.loadMoreOffersSuccess),L(()=>de([o,r,s]).pipe(Q(1))),Si(([T,g,I])=>n.saveSearchResults(k.request,{portfolioSearchLoadedState:T,portfolioSearchAggregatesState:g,portfolioSearchPreselectedOfferState:I},F)))}))},{functional:!0,dispatch:!1}),Rc=M(()=>{let e=a(V),t=a(x),n=a(Di),i=a(Ii),o=t.selectSignal(vt.isAuthorized),r=t.selectSignal(vt.email);return i.configurationsPackages$.pipe(L(s=>s.search.cacheSearchResults?e:ye),A(P.ssrResultsRestored),L(()=>
11{let s={isAuthorized:o(),memberEmail:r()};return de([t.select(j.state).pipe(w(Ei(["LOADED"])),Q(1)),t.select(Vi.state).pipe(H(xt(["HAS_DATA"])),Q(1)),t.select(kt.state).pipe(Q(1))]).pipe(Si(([p,u,k])=>n.saveSearchResults(p.lastRequest,{portfolioSearchLoadedState:p,portfolioSearchAggregatesState:u,portfolioSearchPreselectedOfferState:k},s)))}))},{functional:!0,dispatch:!1}),mo={updateCacheEffect:Dc,saveSsrResultsToCacheEffect:Rc};var Lc=M(()=>{let e=a(V),t=a(pi);return e.pipe(A(ki.loginSuccess,ki.logoutSuccess),L(()=>t.currentRoute$.pipe(Q(1))),H(n=>n==="portfolio-search"),w(()=>P.refreshSearchResults()))},{functional:!0}),uo={authChanged:Lc};var Bc=Wt(ei,{dimensions:{SearchTrigger:Me.String,IsSuccess:Me.Boolean,OffersResolvedAtPlatform:Me.String},measures:{DurationMs:[ur.Int,hr.Average]}}),ho="PO_SR_OffersLoaded",ps=Qt({eventName:ho,schema:Bc});var jc=Wt(ei,{dimensions:{BreakPageNumber:Me.Int,SortDirection:Me.String,BreakNumberInSession:Me.Int,BestSortedOfferIndex:Me.Int}}),fs=Qt({eventName:"PO_SR_PriceSortMonotonicityBreak",schema:jc});function ms(e,t){return e.offersToDisplay.map((n,i)=>t.includes(n.metaCode)?Vr(n,i):void 0).filter(Boolean)}var _o=new Set,go=!0,ds=null,gi=!0,wt=null,us=ho,Vc=M(()=>{let e=a(mt),t=hs(),n=a(x);return e.seenHotelMetaCodes$.pipe(w(i=>({metaCodes:i,stateSnapshot:n.selectSignal(j.state)()})),ko(1e3),L(({metaCodes:i,stateSnapshot:o})=>Ai(o,["LOADED"])?t(i,o):ye))},{dispatch:!1,functional:!0}),Nc=M(()=>{let e=a(x),t=hs();return e.select(j.state).pipe(H(xt(["LOADED"])),H(n=>n.lastResponse.offers.length===0),L(n=>t([],n)))},{dispatch:!1,functional:!0}),$c=M(()=>{let e=a(mt);return a(V).pipe(A(P.requestFirstPage,P.ssrResultsRestored),B(()=>e.clearListOfSeenPackages()),B(()=>_o.clear()))},{dispatch:!1,functional:!0}),Uc=M(()=>{let e=a(V),t=a(x);return e.pipe(A(Ar),L(()=>t.select(yt.currentPathname).pipe(Q(1))),B(n=>{(n==="/portfolio"||n==="/portfolio/")&&ds!==n&&(go=!0,gi=!0),ds=n}))},{dispatch:!1,functional:!0});function hs(){let e=a(ni),t=a(ti),n=a(li),i=a(mn),o=a(x),r=a(Pt),s=a(ii),p=a(ri);return(u,k)=>de([t.common$,n.searchCommonData$,e.resolveQsfDataFromUrl$,i.resolveHotelOffersTotalCount$,i.resolveHotelOffersFilteredCount$,i.resolveHotelOfferSearchResultsSelectedHotel$,o.select(Tt.state),s.attribution$]).pipe(Q(1),B(([F,T,g,I,re,Z,R,he])=>{let Fe=ms(k,u).filter(Pe=>!_o.has(Pe.MetaCode));Fe.forEach(Pe=>_o.add(Pe.MetaCode));let ge=go?Ot.AUTOMATIC:Ot.MANUAL;go=!1;let W=p.resolve(he,ge);r.sendAnalyticsEvent(wr({EventSource:W.eventSource,EventSourceCategory:W.eventSourceCategory,QSFData:g,ReferrerURL:F.referrer,Context:T.resultsContextId,SearchId:T.searchId,SortType:T.sort,Filters:T.filters,PriceCurrency:T.priceCurrency,HotelOffers:Fe,TotalCount:I,FilteredCount:re,SelectedHotel:Z,SearchOffersSource:R.source,UnavailabilityReason:k.lastResponse.unavailabilityReason,PageLabel:F.pageLabel,EventSourceComponent:F.eventSourceComponent,EventSourceLandingPageType:F.eventSourceLandingPageType}))}),w(()=>{}))}var Hc=M(()=>{let e=a(V),t=a(Pt);return e.pipe(A(P.requestFirstPage,P.loadMoreOffers),B(n=>{n.type===P.loadMoreOffers.type?wt="LOAD_MORE":(wt=gi?"INITIAL_LOAD":"CRITERIA_CHANGED",gi=!1),t.startTimer(us)}))},{dispatch:!1,functional:!0}),qc=M(()=>{let e=a(V),t=a($),n=a(Pt),i=a(ni),o=a(ti),r=a(li),s=a(ii),p=a(ri);return e.pipe(A(P.firstPageFullyLoaded,P.loadMoreOffersSuccess,P.sendRequestError,P.loadMoreOffersError,P.ssrResultsRestored),H(()=>J(t)),H(u=>wt!==null||u.type===P.ssrResultsRestored.type),Ti(()=>[o.common$,r.searchCommonData$.pipe(Ci(null)),i.resolveQsfDataFromUrl$,s.attribution$]),B(([u,k,F,T,g])=>{let I=u.type===P.ssrResultsRestored.type,re=I?0:n.stopTimer(us),Z=I?"INITIAL_LOAD":wt,R=I?"SERVER":"BROWSER";wt=null,I&&(gi=!1);let he=u.type===P.firstPageFullyLoaded.type||u.type===P.loadMoreOffersSuccess.type||I,_e=p.resolve(g,Ot.AUTOMATIC);n.sendAnalyticsEvent(ps({DurationMs:re,SearchTrigger:Z,IsSuccess:he,OffersResolvedAtPlatform:R,EventSource:_e.eventSource,EventSourceCategory:_e.eventSourceCategory,EventSourceComponent:k.eventSourceComponent,EventSourceLandingPageType:k.eventSourceLandingPageType,QSFData:T,ReferrerURL:k.referrer,Context:F==null?void 0:F.resultsContextId,SearchId:F==null?void 0:F.searchId,SortType:F==null?void 0:F.sort,Filters:F==null?void 0:F.filters,PageLabel:k.pageLabel}))}),w(()=>{}))},{dispatch:!1,functional:!0});
11function zc(e,t,n){return n==="asc"&&t<e||n==="desc"&&t>e}function Gc(e,t){let n=e[0].items[0].priceForAll.amount;return e.reduce((i,o,r)=>{let s=o.items[0].priceForAll.amount;return(t==="asc"?s<i.price:s>i.price)?{index:r,price:s}:i},{index:0,price:n}).index}var Qc=M(()=>{let e=a(V),t=a(x),n=a($),i=a(Pt),o=a(ni),r=a(ti),s=a(li),p=a(ii),u=a(ri),k=0,F=0,T=0;return e.pipe(A(P.firstPageFullyLoaded,P.loadMoreOffersSuccess,P.ssrResultsRestored),H(()=>J(n)),Ti(()=>[t.select(j.state),t.select(Tt.hasValuesFromCache),r.common$,s.searchCommonData$.pipe(Ci(null)),o.resolveQsfDataFromUrl$,p.attribution$]),w(([g,I,re,Z,R,he,_e])=>{var Co,vo,Po,Oo;if(!Ai(I,["LOADED"])||re||I.lastResponse.sorting.sortBy!=="TotalPrice")return null;if(!(g.type===P.loadMoreOffersSuccess.type))return k=1,F=I.offersToDisplay.length,T=0,null;let ge=F;k+=1,F=I.offersToDisplay.length;let W=(vo=(Co=I.offersToDisplay[ge-1])==null?void 0:Co.items[0].priceForAll)==null?void 0:vo.amount,Pe=(Oo=(Po=I.offersToDisplay[ge])==null?void 0:Po.items[0].priceForAll)==null?void 0:Oo.amount;if(W===void 0||Pe===void 0)return null;let Ye=I.lastResponse.sorting.sortDirection.toLowerCase();if(!zc(W,Pe,Ye))return null;T+=1;let Et=Gc(I.offersToDisplay,Ye),ne=u.resolve(_e,Ot.AUTOMATIC);return fs({BreakPageNumber:k,SortDirection:Ye,BreakNumberInSession:T,BestSortedOfferIndex:Et,EventSource:ne.eventSource,EventSourceCategory:ne.eventSourceCategory,EventSourceComponent:Z.eventSourceComponent,EventSourceLandingPageType:Z.eventSourceLandingPageType,QSFData:he,ReferrerURL:Z.referrer,Context:R==null?void 0:R.resultsContextId,SearchId:R==null?void 0:R.searchId,SortType:R==null?void 0:R.sort,Filters:R==null?void 0:R.filters,PageLabel:Z.pageLabel})}),H(g=>g!==null),B(g=>i.sendAnalyticsEvent(g)),w(()=>{}))},{dispatch:!1,functional:!0}),_s={seenPackagesEffect:Vc,clearListOfSeenPackages:$c,noOffersEffect:Nc,resetFirstEventFlagOnRouteChange:Uc,startOffersLoadedTimingEffect:Hc,offersLoadedTimingEffect:qc,priceSortMonotonicityBreakEffect:Qc};var So="NGRX_STATE";function Xe(e){return()=>{let t=a(Lo),n=a($);if(J(n)&&t.hasKey(So)){let i=t.get(So,void 0);return i==null?void 0:i[e]}}}var gs=M(()=>{let e=a(V),t=a($),n=a(Xt),i=a(xa);return!J(t)||!n.webViewDisplayMode?ye:e.pipe(A(P.firstPageFullyLoaded,P.loadMoreOffersSuccess,P.ssrResultsRestored,P.restoreFromCache),B(()=>{i.sendEvent("search_package",{})}))},{dispatch:!1,functional:!0});var Ss={searchPackageEffect$:gs};var Cs=[{path:"",canActivate:[as],data:{[oi]:"packages.search.results"},children:[{path:"",component:po,canActivate:[is,ns],canDeactivate:[ss],data:{[oi]:"packages.search.results"}},{path:"map",loadComponent:()=>import("./chunk-YCPLA737.js"),resolve:{useLayout:()=>!1,lastViewedHotel:bn()},data:{[oi]:"packages.search.results.map"},providers:[vi([bi.forFeature([va])])]}],providers:[vi([ee.forFeature(rn,nn),ee.forFeature(an,sn),ee.forFeature(Li,Jr,{initialState:Xe(Li)}),ee.forFeature(Ni,dn,{initialState:Xe(Ni)}),ee.forFeature(ji,cn,{initialState:Xe(ji)}),ee.forFeature(Mn,Tn),ee.forFeature(Bi,on,{initialState:Xe(Bi)}),ee.forFeature(Ur,Hr),ee.forFeature(da,ma),ee.forFeature(Sa,Ca),ee.forFeature(_a,ha),ee.forFeature(st,to,{initialState:Xe(st)}),ee.forFeature(yn,On),bi.forFeature([Fn,cs,tn,ao,fo,An,mo,Rn,uo,_s,ga,Ua,za,Xn,Ss])]),fn]}];var TS=Cs;export{TS as default};
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.