PageSourceSearch

https://www.invia.hu/assets/invia2020/js/common.5812ddf91fe0631bca53.js

js invia.hu collected 2026-09-25 07:06:48 UTC 174,666 bytes, 2 lines download raw bytes

1"use strict";(globalThis.webpackChunkinvia2020=globalThis.webpackChunkinvia2020||[]).push([[2076],{6249(e,t,s){s.d(t,{D0:()=>g,Wd:()=>r});var i=s(92860),a=s(39272);const[n,r]=(0,a.x)("FormFieldContext");var o=s(51882),l=s(38048);const c=(0,i.forwardRef)(((e,t)=>{const{children:s,className:i,...a}=e,{id:n,label:c}=r();return(0,l.jsx)("label",{ref:t,htmlFor:n,className:(0,o.A)("i-field__label",i),...a,children:s??c})}));c.displayName="FieldLabel";var d=s(34836);const u=e=>{const{children:t,name:s,invalid:a,...r}=e,o=(0,i.useRef)(d.q.getNext()),c=`${o.current}-description`,u=`${o.current}-error`,h=!!a||void 0,m=[a&&u,c].filter(Boolean).join(" ")||void 0,p={id:o.current,name:s,"data-invalid":h,"aria-invalid":h,"aria-describedby":m};return(0,l.jsx)(n,{value:{...r,name:s,id:o.current,descriptionId:c,errorId:u,field:p},children:t})},h=e=>{const{children:t,className:s,...i}=e;return(0,l.jsx)("div",{className:(0,o.A)("i-field__wrapper",s),...i,children:t})},m=e=>{const{children:t,className:s,...i}=e,{descriptionId:a,description:n}=r();return n||t?(0,l.jsx)("div",{id:a,className:(0,o.A)("i-field__description",s),...i,children:t??n}):null},p=e=>{const{children:t,className:s,...i}=e,{errorId:a,error:n}=r();return n||t?(0,l.jsx)("div",{id:a,className:(0,o.A)("i-field__error",s),...i,children:t??n}):null},g=e=>{const{children:t,selfLabeled:s,...i}=e;return(0,l.jsx)(u,{...i,children:(0,l.jsxs)(h,{children:[!s&&(0,l.jsx)(c,{}),t,(0,l.jsx)(m,{}),(0,l.jsx)(p,{})]})})};g.Provider=u,g.Wrapper=h,g.Label=c,g.Description=m,g.Error=p,g.displayName="Field"},71735(e,t,s){s.d(t,{pd:()=>h});var i=s(92860),a=s(6249),n=s(57585),r=s(51882),o=s(5419),l=s(49865),c=s(34836),d=s(93426),u=s(38048);const h=(0,i.forwardRef)(((e,t)=>{const{className:s,type:h,...m}=e,p="password"===h,[g,f]=(0,i.useState)(!p),v=(0,i.useRef)(c.q.getNext()),{field:_}=(0,a.Wd)(),{register:b}=(0,n.xW)(),y=()=>{f(!g)};return(0,u.jsxs)("div",{className:"i-form-input__wrapper",children:[(0,u.jsx)("input",{ref:t,type:p&&g?"text":h,..._,...m,className:(0,r.A)("i-form-input__input",s),...b(_.name,{disabled:m.disabled,value:m.value,onChange:m.onChange,onBlur:m.onBlur})}),p&&(0,u.jsx)("div",{className:"i-form-input__right-section",children:(0,u.jsxs)(o.m,{events:{click:!1},children:[(0,u.jsx)(o.m.Target,{children:(0,u.jsxs)("button",{type:"button",onClick:y,"aria-describedby":v.current,className:"i-form-input__right-section__button",children:[(0,u.jsx)(d.U,{icon:"eye-closed",wrapperClass:(0,r.A)("i-form-input__right-section__icon",{"i-form-input__right-section__icon--hidden":!g})}),(0,u.jsx)(d.U,{icon:"eye-open",wrapperClass:(0,r.A)("i-form-input__right-section__icon",{"i-form-input__right-section__icon--hidden":g})})]})}),(0,u.jsx)(o.m.Content,{id:v.current,children:g?(0,l.T)("input_hide_password"):(0,l.T)("input_show_password")})]})})]})}));h.displayName="Input";const m=void 0;(0,i.forwardRef)(((e,t)=>{const{className:s,min:i=0,max:o,step:l=1,...c}=e,{field:d}=(0,a.Wd)(),{register:h}=(0,n.xW)();return(0,u.jsx)("div",{className:"i-form-input__wrapper",children:(0,u.jsx)("input",{ref:t,type:"number",min:i,max:o,step:l,...d,...c,className:(0,r.A)("i-form-input__input",s),...h(d.name,{valueAsNumber:!0,disabled:c.disabled,value:c.value,onChange:c.onChange,onBlur:c.onBlur})})})})).displayName="NumberInput";const p=void 0;(0,i.forwardRef)(((e,t)=>{const{className:s,...i}=e,{field:o}=(0,a.Wd)(),{register:l}=(0,n.xW)();return(0,u.jsx)("div",{className:"i-form-input__wrapper",children:(0,u.jsx)("input",{ref:t,type:"time",...o,...i,className:(0,r.A)("i-form-input__input",s),...l(o.name,{disabled:i.disabled,value:i.value,onChange:i.onChange,onBlur:i.onBlur})})})})).displayName="TimeInput"},10974(e,t,s){s.d(t,{Iy:()=>v});var i=s(92860),a=s(51882),n=s(12868),r=s(34836),o=s(55008),l=s(41329),c=s(45141),d=s(34119),u=s(95853),h=s(93426),m=s(83138),p=s(95053),g=s(38048);let f=function(e){return e.lg="modal--lg",e.md="modal--md",e.sm="modal--sm",e.xs="modal--xs",e}({});const v=e=>e.show?(0,g.jsx)(_,{...e}):null,_=e=>{let{size:t,maxHeightViewport:s,heading:v,showHeading:_,modifier:b,subheader:y,bottom:x,subfooter
1:w,footer:T,onClickOutside:k,onClose:C,autofocusChildSelector:S,autofocusFirstFocusableElement:E,children:L,...I}=e;const A=(0,i.useRef)(null),j=(0,i.useRef)(null),N=r.q.getNext();(0,o.V)(A,I.openerSelector,{autofocusChildSelector:S,autofocusFirstFocusableElement:E,contentRef:E?j:void 0});const O=(0,m.r)(!0),P=(0,p.pc)(A,O),R=(0,a.A)("modal","is-opened",b,t&&f[t],{"modal--max-height-viewport":s}),D=(0,i.useMemo)((()=>({role:"dialog",className:R,"aria-labelledby":N,"aria-modal":!0,tabIndex:-1})),[R,N]);return(0,g.jsx)(l.F,{...I,containerProps:D,children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(c.I,{onBackdropClick:k,className:"modal__bg"}),(0,g.jsxs)("div",{ref:P,className:"modal__wrap",children:[(0,g.jsxs)("div",{className:"modal__header",children:[(0,g.jsx)(d.$n,{label:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.U,{icon:n.LZ.cross,wrapperClass:"modal__close-icon modal__close-icon--cross"}),(0,g.jsx)("span",{className:"u-vhide",children:(0,g.jsx)(u.s,{id:"close"})}),(0,g.jsx)(h.U,{icon:n.LZ.pointerLeft,wrapperClass:"modal__close-icon modal__close-icon--pointer"})]}),variant:"link",modifier:"modal__close",onClick:C}),_?(0,g.jsx)("h2",{id:N,className:"modal__heading is-shown h3 u-mt-0",children:v}):(0,g.jsx)("div",{id:N,className:"modal__heading",children:v})]}),y&&(0,g.jsx)("div",{className:"modal__subheader",children:y}),(0,g.jsx)("div",{className:"modal__content",ref:j,children:L}),x&&(0,g.jsx)("div",{className:"modal__bottom",children:x}),w&&(0,g.jsx)("div",{className:"modal__subfooter",children:w}),T&&(0,g.jsx)("div",{className:"modal__footer",children:T})]})]})})}},1680(e,t,s){s.d(t,{gm:()=>u});var i=s(92860),a=s(87087),n=s(51882),r=s(94450),o=s(26087),l=s(38048);let c=function(e){return e.sm="price--sm",e.md="price--md",e.lg="price--lg",e.xl="price--xl",e.xxl="price--xxl",e}({}),d=function(e){return e.light="price--light",e.dark="price--dark",e}({});const u=e=>{let{value:t,size:s,variant:i,modifier:u,currency:h,prefix:m,suffix:p,stroke:g=!1,deemphasizedCurrency:f}=e;const v=(0,n.A)("price",s?c[s]:null,i?d[i]:null,u||null),_=g?"s":"span";return(0,l.jsxs)("span",{className:v,children:[m?(0,l.jsxs)("span",{className:"price__prefix",children:[m," "]}):null,(0,l.jsx)(_,{className:"price__value",children:f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("strong",{className:"price__highlight",children:o.h.formatDecimal(t)})," ",(0,a.Ay)(r._d[h||r.wI.locale.currencyCode])]}):(0,l.jsx)("strong",{className:"price__highlight",children:o.h.formatCurrency(t,h)})}),p?(0,l.jsxs)("span",{className:"price__suffix",children:[" ",p]}):null]})}},70296(e,t,s){s.d(t,{X:()=>n});var i=s(92860),a=s(38048);const n=e=>{let{children:t,modifier:s}=e;const i=["b-tour-term-picker__note",s||""].filter((e=>e)).join(" ");return(0,a.jsx)("div",{className:i,children:t})}},76315(e,t,s){var i,a;s.d(t,{Bd:()=>h,Gs:()=>d});var n=s(92860),r=s(38048);const o=(0,r.jsxs)("div",{className:"grid__cell size--6-12@md size--4-12@lg size--4-12@xl",children:[(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__label"}),(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__field"})]}),l=(0,r.jsxs)("div",{className:"grid__cell size--6-12@md size--4-12@lg size--2-12@xl",children:[(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__label"}),(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__field"})]}),c=()=>i("div",{className:"b-tour-term-picker-placeholder",children:[i("div",{className:"b-tour-term-picker-placeholder__fields grid grid--x-xxs grid--y-xxs grid--middle@xlUp u-mb-sm",children:[o,o,o,o,o,o,o,o]}),i("div",{className:"b-tour-term-picker-placeholder__menu-sort u-mb-xs",children:[a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item"}),a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item b-tour-term-picker-placeholder__menu-sort-item--active"})]}),a("div",{className:"b-tour-term-picker-placeholder__sort u-mb-xs"}),i("div",{className:"b-tour-term-picker-placeholder__terms-list u-mb-xs",children:[a("div",{className:"b-tour-term-picker-placeholder__terms-item"}),a("div",{className:"b-tour-term-picker-placeholder__terms-item"}),a("div",{className:"b-tour-term-picker-placeholder__terms-item"}),a("div",{className:"b-tour-term-picker-placeholder__terms-item"}),a("div",{className:"b-tour-term-picker-placeholder__terms-item"})]})]}),d=e=>{let{elements:t=5}=e;return(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__terms-list-2 u-mb-xs",children:Array.apply(0,Array(t)).map((function(e,t){return(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__terms-item-2 u-mb-xs"},t)}))})},u=()=>i("div",{className:"b-tour-term-picker-placeholder",children:[i("div",{className:"b-tour-term-picker-placeholder__fields grid grid--x-xxs grid--y-xxs grid--middle@xlUp u-mb-sm",children:[i("div",{className:"grid__cell size--4-12@md size--2-12@xl",children:[a("div",{className:"b-tour-term-picker-placeholder__label"}),a("div",{className:"b-tour-term-picker-placeholder__field"})]}),i("div",{className:"grid__cell size--4-12@md size--2-12@xl",children:[a("div",{className:"b-tour-term-picker-placeholder__label"}),a("div",{className:"b-tour-term-picker-placeholder__field"})]}),i("div",{className:"grid__cell size--4-12@md size--2-12@xl",children:[a("div",{className:"b-tour-term-picker-placeholder__label"}),a("div",{className:"b-tour-term-picker-placeholder__field"})]}),i("div",{className:"grid__cell size--4-12@md size--2-12@xl",children:[a("div",{className:"b-tour-term-picker-placeholder__label"}),a("div",{className:"b-tour-term-picker-placeholder__field"})]}),i("div",{className:"grid__cell size--4-12@md size--2-12@xl",children:[a("div",{className:"b-tour-term-picker-placeholder__label"}),a("div",{className:"b-tour-term-picker-placeholder__field"})]}),a("div",{className:"b-tour-term-picker-placeholder__sepparator"}),a("div",{className:"grid__cell size--4-12@md size--2-12@xl u-mb-xxs u-mb-0@xlUp u-pt-xs@xlUp",children:a("div",{className:"b-tour-term-picker-placeholder__switch"})}),a("div",{className:"grid__cell size--4-12@md size--2-12@xl u-mb-xxs u-mb-0@xlUp u-pt-xs@xlUp",children:a("div",{className:"b-tour-term-picker-placeholder__switch"})})]}),i("div",{className:"b-tour-term-picker-placeholder__menu-sort u-mb-xs",children:[a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item"}),a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item b-tour-term-picker-placeholder__menu-sort-item--active"})]}),a("div",{className:"b-tour-term-picker-placeholder__sort u-mb-xs"}),a(d,{})]}),h=()=>(0,r.jsxs)("div",{className:"b-tour-term-picker-placeholder",children:[(0,r.jsxs)("div",{className:"b-tour-term-picker-placeholder__fields grid grid--x-xxs grid--y-xxs grid--middle@xlUp u-mb-sm",children:[o,l,o,l,l,o,o]}),(0,r.jsxs)("div",{className:"b-tour-term-picker-placeholder__menu-sort u-mb-xs",children:[(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__menu-sort-item b-tour-term-picker-placeholder__menu-sort-item--active"}),(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__menu-sort-item"})]}),(0,r.jsx)("div",{className:"b-tour-term-picker-placeholder__sort u-mb-xs"}),(0,r.jsx)(d,{})]}),m=()=>i("div",{className:"b-tour-term-picker-placeholder",children:[i("div",{className:"b-tour-term-picker-placeholder__fields grid grid--x-xxs grid--y-xxs grid--middle@xlUp u-mb-sm",children:[o,o,o,o]}),i("div",{className:"b-tour-term-picker-placeholder__menu-sort u-mb-xs",children:[a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item b-tour-term-picker-placeholder__menu-sort-item--active"}),a("div",{className:"b-tour-term-picker-placeholder__menu-sort-item"})]})]})},35494(e,t,s){s.d(t,{K:()=>q,q:()=>Y});var i=s(92860),a=s(49865),n=s(93426),r=s(95853),o=s(38048);const l=e=>{let{offsets:t,onPageChange:s,gtm:i,currentPage:l,maxButtonsAmount:c=5}=e;const d=Object.keys(t).length==l?l:l+1,u=(e,t)=>
1(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("span",{className:"pagination__label",children:[e,(0,o.jsx)("span",{className:"u-vhide",children:(0,o.jsx)(r.s,{id:"js:page"})})]}),(0,o.jsx)(n.U,{wrapperClass:"pagination__icon",icon:t,width:20,height:20})]}),h=e=>{e.preventDefault(),1!==l&&s(l-1,t[l-1])},m=e=>{e.preventDefault(),l!==d&&s(l+1,t[l+1])},p=(e,i)=>{e.preventDefault(),s(i,t[i])};return d<=1?null:(0,o.jsx)("nav",{role:"navigation",className:"pagination u-mb-md","aria-labelledby":"{translate('pagination')}",children:(0,o.jsxs)("div",{className:"pagination__wrap",children:[l===d?(0,o.jsx)("span",{className:"pagination__current pagination__link--next",children:u((0,a.T)("term_picker_pagination_next"),"chevron-right")}):(0,o.jsx)("a",{href:"#",className:"pagination__link  pagination__link--next",onClick:m,children:u((0,a.T)("term_picker_pagination_next"),"chevron-right")}),1===l?(0,o.jsx)("span",{className:"pagination__current pagination__link--prev",children:u((0,a.T)("term_picker_pagination_previous"),"chevron-left")}):(0,o.jsx)("a",{href:"#",className:"pagination__link pagination__link--prev",onClick:h,children:u((0,a.T)("term_picker_pagination_previous"),"chevron-left")}),(0,o.jsx)("ul",{className:"pagination__list",children:Array.from(Array(d)).map(((e,t)=>++t)).filter((e=>e>d-c)).map((e=>(0,o.jsx)("li",{className:"pagination__item",children:e===l?(0,o.jsxs)("span",{className:"pagination__current","aria-current":"page",children:[(0,o.jsxs)("span",{className:"u-vhide",children:[(0,o.jsx)(r.s,{id:"js:page"})," "]}),e]}):(0,o.jsxs)("a",{href:"#",className:"pagination__link",onClick:t=>p(t,e),"data-controller":i&&i.click?i.click.controller:null,"data-action":i&&i.click?i.click.action:null,"data-gtm_action_params":i&&i.click?i.click.actionParams:null,"data-gtm_cee_gan_click":i&&i.click?JSON.stringify({eventLabel:"Pagination: "+e}):null,children:[(0,o.jsxs)("span",{className:"u-vhide",children:[(0,o.jsx)(r.s,{id:"js:page"})," "]}),e]})},e)))})]})})};var c=s(12868),d=s(17272),u=s(43336),h=s(64060),m=s(6543),p=s(30951),g=s(94450);function f(e){const{priceGroup:t,pricePerPerson:s,priceChange:i,priceChangePoint:a,isPriceHarmonizationEnabled:n,passengers:r}=e;let o=s,l=!1;const c=Math.abs(i)>a;return n?g.WI.TravelplanetPl===g.wI.domainId||g.WI.WakacyjniPiraciPl===g.wI.domainId?(0===r.children&&r.adults>1||r.multipleRooms)&&(l=!0):r.adults>1&&(l=!0):l=!0,0!==i&&l&&(o=r&&r.multipleRooms?s:(t+i)/(r.adults+r.children)),{finalPricePerPerson:o,showPricePerPerson:l,showPriceDiff:c}}var v=s(87087),_=s(51882),b=s(60010),y=s(24342),x=s(34119),w=s(93627),T=s(5419),k=s(39889),C=s(2256);const S=e=>{let{component:t,items:s,separator:a,lastSeparator:n}=e;const r=e=>(0,o.jsx)("span",{className:"tour-params__desc-logo",children:(0,o.jsx)(t,{...e})});return 0===s.length?null:1===s.length?(0,o.jsx)(r,{...s[0]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r,{...s[0]})," ",s.slice(1,-1).map(((e,t)=>(0,o.jsxs)(i.Fragment,{children:[a," ",(0,o.jsx)(r,{...e},`joint-list-component-id=${t}`)]},`joint-list-fragment-id=${t}`)))," ",n," ",(0,o.jsx)(r,{...s[s.length-1]})]})},E=e=>{let{items:t,modifier:s}=e;const i=["tour-params",s||""].filter((e=>e)).join(" ");return(0,o.jsx)("div",{className:i,children:(0,o.jsx)("ul",{className:"tour-params__list",children:t.map(((e,t)=>{const s=(0,o.jsxs)(o.Fragment,{children:[e.title,e.desc&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsx)("span",{className:"tour-params__desc",children:e.desc})]}),e.groupDesc&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsxs)("span",{className:"tour-params__desc",children:[e.groupDesc.text,e.groupDesc.logos&&" ",(0,o.jsx)(S,{component:n.U,items:e.groupDesc.logos,separator:",",lastSeparator:(0,a.T)("and")})]})]}),e.img&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsx)("span",{className:"tour-params__img",children:(0,o.jsx)(C.E,{...e.img,ratio:"auto"})})]}),e.btn&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsx)(x.$n,{...e.btn,variant:"link"})]})]});return(0,o.jsx)("li",{className:"tour-params__item",children:e.iconName?(0,o.jsx)(k.zG,{iconName:e.iconName,iconAlt:e.iconAlt,title:s,verticalAlign:"top"}):s},t)}))})})},L=e=>{let{iconName:t,items:s,title:i,btnLinkHref:a,modifier:n}=e;const r=["b-promos",n||""].filter((e=>e)).join(" ");return(0,o.jsx)("div",{className:r,children:(0,o.jsxs)("div",{className:"b-promos__tags tags",children:[i&&(0,o.jsxs)("span",{className:"b-promos__title",children:[i,":"]}),s.map(((e,s)=>{const i="b-promos__tag",n=a?{variant:"link",modifier:i,"data-controller":"modal--opener","data-action":"modal--opener#open","data-modal--opener-type":"ajax","data-modal--opener-hasbaretemplate":"true","data-modal--opener-id":e.id,"data-modal--opener-modifier":"modal--promo","data-modal--opener-format":"json",linkHref:a}:{variant:"link",modifier:i},r={iconName:t||"info",size:"sm",rounded:!0,variant:"onlinePayment"};return(0,o.jsx)(x.$n,{label:(0,o.jsx)(w.vw,{label:e.label,...r,...e.tagProps}),...n},s)}))]})})};var I=s(1680),A=s(10662);let j=function(e){return e.decrease="decrease",e.increase="increase",e}({});const N=e=>{let{variant:t,price:s,modifier:i}=e;const a=["b-price-gap","u-font-sm",i||""].filter((e=>e)).join(" ");return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(k.zG,{size:"sm",iconName:c.LZ[t],iconModifier:t===j.decrease?"u-color-green-bright":"u-color-lighter",title:(0,o.jsx)(I.gm,{...s,variant:"light",modifier:"b-price-gap__price"}),modifier:a})})};var O=s(18227);const P=e=>{let{availabilityState:t,flightModal:s,priceChange:i=0,priceTooltip:r,roomType:l,meal:u,isTransferIncluded:h,passengers:m,tourOperatorNameForClient:p,tourOperatorDesc:f,tourOperatorMembers:k,tourOperatorLogoUrl:C,count:S,daysCount:j,nightsCount:P,outboundDate:R,outboundTimes:D,outboundDesc:M,returnDate:H,returnTimes:F,returnDesc:B,departureCity:$,arrivalCity:V,url:U,transportId:z,meansOfTransport:q,promos:W,modifier:G,discount:J,favouriteData:Y,offerId:K,uniqueOfferId:Q,isFavouriteItem:Z,splitIOData:X,isRemoved:ee,boxHeight:te,openFlightModal:se,onOnRequestClick:ie,onAvailableClick:ae,setManualCheckInitiated:ne,handleClosePriceChangeMessage:re,boxRef:oe,transportByPlane:le,isClosedPriceChangeMessage:ce,isRemovedPriceChangeMessage:de,finalPricePerPerson:ue,showPricePerPerson:he,showPriceDiff:me,adjustedPriceGroup:pe,itemInfo:ge}=e;const fe=e=>{switch(e){case 11:return(0,a.T)("by-train");case 5:return(0,a.T)("by-combined");case 2:return(0,a.T)("by-bus");case 4:return(0,a.T)("on-your-own");case 3:return(0,a.T)("by-airplane");default:return""}},ve=()=>{const e=[];return l&&e.push({iconName:c.LZ.bed,iconAlt:(0,a.T)("of_room_type"),title:l}),u&&e.push({iconName:c.LZ.food,iconAlt:(0,a.T)("meal_type"),title:u}),p&&e.push({iconName:c.LZ.networkUser,iconAlt:(0,a.T)("tour_operator"),title:p,desc:f,groupDesc:k,img:C?{src:C,alt:p}:null}),e},_e=t===O.Pt.SoldOut,be=g.wI.domainId===g.WI.TravelplanetPl,ye="true"===document.body.dataset.betterContrastTheme,xe=be&&ye?void 0:"light",we=(0,_.A)("c-terms-list-2__item",_e&&"c-terms-list-2__item--disabled",ee&&"c-terms-list-2__item--removed",Z&&"c-terms-list-2__item--favourite",G);function Te(e){return(0,b.G)(e)}return(0,o.jsx)("div",{ref:oe,className:we,style:{height:te},children:(0,o.jsxs)("div",{className:"c-terms-list-2__item-wrap",children:[(0,o.jsxs)("div",{className:"c-terms-list-2__inner",children:[(0,o.jsxs)("div",{className:"c-terms-list-2__header u-mb-xs",children:[(0,o.jsxs)("h3",{className:"c-terms-list-2__title u-mb-0",children:[!z&&(0,o.jsx)(o.Fragment,{children:(0,a.T)("accommodation_for")})," ",(0,a.z)("day_v2",j),!(0,d.Im)(P,!0)&&(0,o.jsxs)(o.Fragment,{children:[" & ",(0,a.z)("nights_v2",P)]})," ",fe(z),q," ",$&&V&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"c-terms-list-2__title-divider",children:"/"})," ",(0,o.jsxs)("span",{className:"c-terms-list-2__title-info",children:[$," ",(0,o.jsx)(n.U,{icon:c.LZ.swap})," ",V]})]})]}),Y&&(0,o.jsx)("div",{className:"c-terms-list-2__img",children:(0,o.jsx)(y.E,{offerData:Y.offerData,offerId:Y.offerData.offerId||Y.offerData.s_offer_id||K,linkHref:Y.linkHref})})]}),W&&(0,o.jsx)("div",{className:"c-terms-list-2__tags u-mt-xs",children:(0,o.jsx)(L,{...W})}),(0,o.jsxs)("div",{className:"c-terms-list-2__wrap",children:[(0,o.jsxs)("div",{className:"c-terms-list-2__dates",children:[(0,o.jsx)(E,{items:[{iconName:le?c.LZ.airplane:c.LZ.calendarStart,iconAlt:le?(0,a.T)("departure_flight"):(0,a.T)("departure_date"),title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("strong",{children:Te(R)}),t===O.Pt.Available&&(0,o.jsx)(o.Fragment,{children:D&&(0,o.jsxs)(o.Fragment,{children:[", ",D]})})]}),desc:t===O.Pt.Available?M:""},{iconName:le?c.LZ.airplaneReturn:c.LZ.calendarEnd,iconAlt:le?(0,a.T)("arrival_flight"):(0,a.T)("arrival_date"),title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("strong",{children:Te(H)}),t===O.Pt.Available&&(0,o.jsx)(o.Fragment,{children:F&&(0,o.jsxs)(o.Fragment,{children:[", ",F]})})]}),desc:t===O.Pt.Available?B:""}]}),h&&X?.transferIncludedSplit&&(0,o.jsx)(E,{modifier:"u-mt-xs u-mb-xs",items:[{iconName:c.LZ.bus,iconAlt:(0,a.T)("td_transfer_included"),title:(0,a.T)("td_transfer_included")}]}),s&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{id:"#flight-modal-offer-"+K.toString(),label:(0,a.T)("term_picker_more_flight_info"),onClick:()=>se(Q),variant:"link"}),s]})]}),(0,o.jsxs)("div",{className:"c-terms-list-2__content",children:[(0,o.jsx)("div",{className:"c-terms-list-2__desc",children:(0,o.jsx)(E,{items:ve()})}),(0,o.jsxs)("div",{className:"c-terms-list-2__info",children:[(0,o.jsx)("div",{className:"c-terms-list-2__prices",children:t===O.Pt.Loading?(0,o.jsxs)("div",{className:"content-placeholder u-flex u-flex-column u-items-end u-mb-xxs",children:[J&&(0,o.jsx)("span",{className:"content-placeholder__item u-mb-xxs",style:{"--content-placeholder-height":"1.375rem","--content-placeholder-width":"3.5rem"}}),(0,o.jsx)("span",{className:"content-placeholder__item u-mb-xxxs",style:{"--content-placeholder-height":"1.6875rem","--content-placeholder-width":"9.375rem"}}),(0,o.jsx)("span",{className:"content-placeholder__item",style:{"--content-placeholder-height":"1rem","--content-placeholder-width":"6.875rem"}})]}):(0,o.jsxs)(o.Fragment,{children:[pe&&!m?.multipleRooms&&(0,o.jsxs)(o.Fragment,{children:[J&&(0,o.jsx)("div",{className:"u-mb-xxs",children:(0,o.jsx)(w.vw,{label:(0,v.Ay)(J),variant:"discountOutline"})}),(0,o.jsxs)("div",{className:"c-terms-list-2__group",children:[0!==i&&me?(0,o.jsxs)("span",{className:"c-terms-list-2__price-gap",children:[(0,o.jsx)(N,{variant:i>0?"increase":"decrease",price:{value:Math.abs(i),prefix:i<0?"−":"+"},modifier:ce?" is-hidden":""}),r&&(0,o.jsxs)(T.m,{children:[(0,o.jsx)(T.m.Target,{className:"u-ml-xxxs"}),(0,o.jsx)(T.m.Content,{children:r})]})]}):r&&(0,o.jsxs)(T.m,{children:[(0,o.jsx)(T.m.Target,{className:"u-mr-xxs"}),(0,o.jsx)(T.m.Content,{children:r})]}),(0,o.jsx)(I.gm,{value:pe,size:"xl",deemphasizedCurrency:!0})]})]}),(0,o.jsx)("p",{className:"c-terms-list-2__price u-mb-xxs",children:he&&ue&&(0,o.jsx)(I.gm,{value:ue,variant:xe,suffix:m&&m.multipleRooms?(0,a.z)("price_per_person_from_v2",1):(0,a.T)("for_one_person")})})]})}),(0,o.jsx)("div",{className:"c-terms-list-2__btn",children:m&&m.multipleRooms?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{label:(0,a.T)("see_details_and_book"),size:"sm",variant:"main",onClick:()=>{ie&&ie(z,ge,O.QP.ON_MANUAL),setTimeout((()=>{window.location.assign(U)}),250)},onMouseUp:e=>{1===e.button&&(e.preventDefault(),ie&&ie(z,ge,O.QP.ON_MANUAL),window.open(U,"_blank"))},onMouseDown:e=>{1===e.button&&e.preventDefault()}}),(0,o.jsx)("span",{className:"c-terms-list-2__availability c-terms-list-2__availability--warning",children:(0,a.T)("booking_on_request")})]}):X?.useAAPC?(0,o.jsxs)(o.Fragment,{children:[t===O.Pt.Default&&(0,o.jsx)(x.$n,{label:(0,a.T)("check_availability"),size:"sm",variant:"minor",onClick:()=>ne(!0)}),t===O.Pt.Loading&&(0,o.jsx)(x.$n,{label:(0,a.T)("check_availability"),size:"sm",variant:"minor",loading:!0}),t===O.Pt.Available&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{label:(0,a.T)("see_details_and_book"),size:"sm",variant:"main",onClick:()=>{ae&&ae(z,ge,O.QP.ON_MANUAL),setTimeout((()=>{window.location.assign(U)}),250)},onMouseUp:e=>{1===e.button&&(e.preventDefault(),ae&&ae(z,ge,O.QP.ON_MANUAL),window.open(U,"_blank"))},onMouseDown:e=>{1===e.button&&e.preventDefault()}}),(0,o.jsx)("span",{className:"c-terms-list-2__availability c-terms-list-2__availability--ok",children:(0,a.T)("tour_is_available")})]}),t===O.Pt.OnRequest&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{label:(0,a.T)("see_details_and_book"),size:"sm",variant:"main",onClick:()=>{ie&&ie(z,ge,O.QP.ON_MANUAL),setTimeout((()=>{window.location.assign(U)}),250)},onMouseUp:e=>{1===e.button&&(e.preventDefault(),ie&&ie(z,ge,O.QP.ON_MANUAL),window.open(U,"_blank"))},onMouseDown:e=>{1===e.button&&e.preventDefault()}}),(0,o.jsx)("span",{className:"c-terms-list-2__availability c-terms-list-2__availability--warning",children:(0,a.T)("booking_on_request")})]}),_e&&(0,o.jsx)(x.$n,{label:(0,a.T)("sold_out"),size:"sm"})]}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(x.$n,{label:(0,a.T)("see_details_and_book"),size:"sm",variant:"main",linkHref:U})})})]})]})]}),i<0&&me&&!de&&(0,o.jsx)("div",{className:"c-terms-list-2__message"+(ce?" is-hidden":""),children:(0,o.jsx)(A.Q,{type:"success",iconName:c.LZ.like,message:(0,a.T)("term_picker_price_decrease"),dismissible:!0,onClose:re})})]}),_e&&(0,o.jsx)("div",{className:"c-terms-list-2__notice",children:(0,o.jsxs)("div",{className:"c-terms-list-2__notice-inner",children:[(0,o.jsx)(n.U,{icon:c.LZ.calendarDisable}),(0,o.jsx)("p",{children:(0,a.T)("term_is_unavailable_now_cause_sold_out")})]})})]})},`TourTermsListItem-${S}`)};function R(e){let t=0,s=0,i=e;for(;null!=i;)t+=i.offsetLeft,s+=i.offsetTop,i=i.offsetParent;return{x:t,y:s}}const D=e=>{let{count:t,pricePerPerson:s,isPriceHarmonizationEnabled:n,isTransferIncluded:r,priceGroup:l,daysCount:v,nightsCount:_,outboundDate:b,outboundTimes:y,outboundDesc:x,returnDate:w,returnTimes:T,returnDesc:k,departureCity:C,arrivalCity:S,meal:E,url:L,tourOperatorNameForClient:I,tourOperatorLogoUrl:A,tourOperatorDesc:j,tourOperatorMembers:N,roomType:D,transportId:M,meansOfTransport:H,promos:F,discount:B,modifier:$,favouriteData:V,isFavouriteItem:U,offerId:z,offerSourceId:q,orderFormType:W,tourOperatorId:G,tourOperatorCode:J,flightModal:Y,passengers:K,uniqueOfferId:Q,openFlightModal:Z,onCheckTour:X,onCheckTourAvailable:ee,onCheckTourSoldOut:te,onCheckTourOnRequest:se,onOnRequestClick:ie,checkAAPCOnLoad:ae,availabilityCheckForAll:ne,splitIOData:re,ga4Item:oe}=e;const[le,ce]=(0,i.useState)(!1),[de,ue]=(0,i.useState)("auto"),[he,me]=(0,i.useState)(0),[pe,ge]=(0,i.useState)(g.wI.domainId===g.WI.TravelplanetPl?(0,a.T)("term_picker_price_tooltip_before_aapc"):""),[fe,ve]=(0,i.useState)(!1),[_e,be]=(0,i.useState)(!1),[ye,xe]=(0,i.useState)(O.Pt.Default),[we,Te]=(0,i.useState)(null),[ke,Ce]=(0,i.useState)(!1),[Se,Ee]=(0,i.useState)(!1),[Le,Ie]=(0,i.useState)(!1),[Ae,je]=(0,i.useState)(0),Ne=(0,i.useRef)(null),Oe=(0,i.useRef)(null),Pe=()=>{Oe.current=setTimeout((()=>{ce(!0)}),3500)},Re={[g.WI.InviaCz]:99,[g.WI.InviaHu]:999,[g.WI.InviaSk]:3,[g.WI.TravelplanetPl]:9}[g.wI.domainId],De=new AbortController;(0,i.useEffect)((()=>{xe(O.Pt.Default),ce(!1),Ie(!1)}),[z]),(0,i.useEffect)((()=>
1{if(ne||Le){const e=Le?O.QP.ON_MANUAL:O.QP.ON_LOAD,t=void 0;(async()=>{try{await Ge(De.signal,e)}catch(e){if("AbortError"===e.message||"AbortError"===e.name)return;(0,h.Cp)(e)}})()}}),[ne,Le]),(0,i.useEffect)((()=>{le||ye!==O.Pt.SoldOut||(ue(Ne.current.getBoundingClientRect().height+"px"),clearTimeout(Oe.current),Pe())}),[ye,le]);const Me=()=>{ve(!0),setTimeout((()=>{be(!0)}),300)},He=M===c.LY.TRANSPORTATION_ID_AIRPLANE,Fe=f({priceGroup:l,pricePerPerson:s,priceChange:he,priceChangePoint:Re,isPriceHarmonizationEnabled:n,passengers:K}),{finalPricePerPerson:Be,showPricePerPerson:$e,showPriceDiff:Ve}=Fe,Ue=0===he?l:l+he,ze={...V?.offerData,ga4Item:oe,priceGroup:Ue,price:Be,availabilityData:we},qe=(e,t)=>{let s=0;(0,d.Im)(e.customData?.totalPrice)||(s=Math.round(e.customData?.totalPrice)-Math.round(t),me(s));const i=void 0;let n="term_picker_price_tooltip_after_aapc_unchanged";return Math.abs(s)>Re&&(s>0?n="term_picker_price_tooltip_after_aapc_increased":s<0&&(n="term_picker_price_tooltip_after_aapc_decreased")),g.wI.domainId===g.WI.TravelplanetPl&&ge((0,a.T)(n)),s},We=async(e,t)=>(X&&X(M),(0,u.ll)("/direct/checkout_trip-request-handler/ajax-check-room-availability/",{tripData:e},t)),Ge=async(e,t)=>{xe(O.Pt.Loading);try{const i=(0,m.$n)(Q),a={type:W,s_offer_id:Q,s_offer_source_id:q,nl_form_type:W,nl_tourop_id:G,s_offer_tourop_code:J,nl_room_dict_id:i?.dictRoomId?parseInt(i?.dictRoomId,10):null,nl_country_id:i?.countryId??null,nl_tour_id:i?.tourId??null,nl_locality_id:i?.localityId??null,s_departure_date_from:(0,p.A2)(b).format("YYYY-MM-DD"),s_departure_date_to:(0,p.A2)(w).format("YYYY-MM-DD"),nl_stay_length_days:v,nl_hotel_id:i?.hotelId??null,
1nl_transportation_id:i?.transportationId??null,nl_airport_id:i?.departureAirport??null,nl_departure_id:i?.departurePlaceId??null,nl_total_price:l,passengers:K,roomOccupancy:{adults:0,children:0},liveAAPC:!0},r=await We(a,e);Te(r.customData??null);const o=qe(r,l),c=f({priceGroup:l,pricePerPerson:s,priceChange:o,priceChangePoint:Re,isPriceHarmonizationEnabled:n,passengers:K}),d={...ze,priceGroup:0===o?l:l+o,price:c.finalPricePerPerson,availabilityData:r.customData??null};switch(r.customData.status){case O.R3.Available:ee&&ee(M,d,t),xe(O.Pt.Available);break;case O.R3.SoldOut:te&&te(M,d,t),xe(O.Pt.SoldOut);break;case O.R3.OnRequest:case O.R3.Failed:se&&se(M,d,t),xe(O.Pt.OnRequest);break;default:te&&te(M,d,t),xe(O.Pt.SoldOut)}}catch(e){if("AbortError"===e.message||"AbortError"===e.name)return;(0,h.Cp)(e)}};return(0,i.useEffect)((()=>{if(re?.termPickerLocationSplit){const e=e=>{Ce(e.target.documentElement.scrollTop),window.innerHeight+document.documentElement.scrollTop>=Ae&&Ee(!0)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[Ae,ke,re?.termPickerLocationSplit]),(0,i.useEffect)((()=>{if(Ne&&re?.termPickerLocationSplit){const e=R(Ne.current);je(e.y)}}),[Ne,re?.termPickerLocationSplit]),(0,i.useEffect)((()=>{if(ae&&re?.useAAPC&&ye===O.Pt.Default&&!K.multipleRooms&&(Se&&re?.termPickerLocationSplit||!Se&&!re?.termPickerLocationSplit)){const e=void 0;(async()=>{try{await Ge(De.signal,O.QP.ON_LOAD)}catch(e){if("AbortError"===e.message||"AbortError"===e.name)return xe(O.Pt.Default),void Te(null);(0,h.Cp)(e)}})()}}),[ae,Se,K.multipleRooms,re?.useAAPC,re?.termPickerLocationSplit,ye,Ge]),(0,i.useEffect)((()=>()=>{De.abort()}),[]),(0,o.jsx)(P,{availabilityState:ye,flightModal:Y,priceChange:he,priceTooltip:pe,finalPricePerPerson:Be,showPricePerPerson:$e,showPriceDiff:Ve,adjustedPriceGroup:Ue,itemInfo:ze,roomType:D,meal:E,isTransferIncluded:r,passengers:K,tourOperatorNameForClient:I,tourOperatorDesc:j,tourOperatorMembers:N,tourOperatorLogoUrl:A,count:t,daysCount:v,nightsCount:_,outboundDate:b,outboundTimes:y,outboundDesc:x,returnDate:w,returnTimes:T,returnDesc:k,departureCity:C,arrivalCity:S,url:L,transportId:M,meansOfTransport:H,promos:F,modifier:$,discount:B,favouriteData:V,offerId:z,uniqueOfferId:Q,isFavouriteItem:U,splitIOData:re,openFlightModal:Z,setManualCheckInitiated:Ie,handleClosePriceChangeMessage:Me,isRemoved:le,boxHeight:de,boxRef:Ne,transportByPlane:He,onOnRequestClick:ie,onAvailableClick:ie,isClosedPriceChangeMessage:fe,isRemovedPriceChangeMessage:_e})};var M=s(76680),H=s(70296),F=s(67511),B=s(36999);const $=e=>{let{cssWrapper:t,avatarUrl:s,title:a,children:n,bottomText:r,bottomButtons:l}=e;const c=["b-service",t||""].filter((e=>e)).join(" "),[d,u]=(0,i.useState)(!1),h=(0,i.useRef)(null),m=void 0;return(0,F.P)(h)&&!d&&p(),(0,o.jsxs)("div",{className:c,ref:h,children:[s&&(0,o.jsx)("div",{className:"b-service__avatar",children:(0,o.jsx)(C.E,{width:120,height:136,src:s,alt:"","aria-hidden":"true"})}),n&&(0,o.jsxs)("div",{className:"b-service__content",children:[(0,o.jsxs)("div",{className:"u-mb-last-0",children:[a&&(0,o.jsx)("p",{className:"h6 u-mt-0 u-mb-xms b-service__title",children:a}),n]}),r&&(0,o.jsx)("div",{className:`u-mt-xms u-font-lg@mdUp ${l?"u-hide@mdDown":""} u-mb-last-0`,children:r})]}),l&&(0,o.jsx)("div",{className:"b-service__bottom u-mt-xxs u-hide@md",children:l})]});function p(){(0,B.XM)({event:"trackEcommerceEvent",eventCategory:"Ecommerce",eventAction:"Promo View",eventLabel:"Service Banner",nonInteraction:!0,ecommerce:{promoView:{promotions:[{id:"service-banner",name:"view-banner",creative:"term-picker-banner",position:1}]}}}),u(!0)}};var V=s(76315),U=s(91973),z=s(18729);const q="termPickerServiceBannerDataSource",W="48",G=e=>{let{loading:t}=e;return(0,o.jsx)("div",{className:"c-terms-list-2__item c-terms-list-2__item--noterms",children:t?(0,o.jsx)(V.Gs,{}):(0,o.jsx)(H.X,{modifier:"u-text-center u-pt-md u-mb-md",children:(0,o.jsx)(k.zG,{size:"xxxl",iconName:c.LZ.planeTakeOffCancel,iconModifier:"u-color-primary",title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("strong",{children:(0,a.T)("bold_text_term_picker_no_tours_found")})," ",(0,a.T)("js:term_picker_no_tours_found")]})})})})},J=(e,t,s,n,r,l,d,u,h,m,p,g,f)=>{const v=[];let _=0;const b=K(t);for(const y of e){3===_&&t?.serviceBanner&&v.push((0,o.jsx)($,{avatarUrl:t?.serviceBanner?.avatarUrl,title:t?.serviceBanner?.title,bottomText:b,cssWrapper:"u-mb-xs",bottomButtons:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{iconName:c.LZ.call,label:t?.serviceBanner?.phoneNumber,linkHref:t?.serviceBanner?.phoneNumberLink,size:"sm",variant:"main"}),(0,o.jsx)(x.$n,{iconName:c.LZ.liveChat,label:(0,a.T)("service_banner_button_live_chat"),size:"sm",variant:"minor",linkHref:"#","data-controller":"component--live-chat-trigger","data-action":"click->component--live-chat-trigger#open"})]}),children:(0,o.jsx)("p",{children:t?.serviceBanner?.workingHours})},`service-banner-${_}`));const e=String(y.tourOperatorId)!==W&&y.isOnlineAvailable;v.push((0,i.createElement)(D,{...y,count:_,key:`tourtermslistitem2-${_}`,gtm:s,openFlightModal:r,passengers:n,onCheckTour:l,onCheckTourAvailable:d,onCheckTourSoldOut:h,onAvailableClick:m,onCheckTourOnRequest:u,onOnRequestClick:p,checkAAPCOnLoad:_<3,availabilityCheckForAll:g,splitIOData:{...f,useAAPC:f.useAAPC&&e}})),_++}return v.length<=3&&t?.serviceBanner&&v.push((0,o.jsx)($,{avatarUrl:t?.serviceBanner?.avatarUrl,title:t?.serviceBanner?.title,bottomText:b,cssWrapper:"u-mb-xs",bottomButtons:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.$n,{iconName:c.LZ.call,label:t?.serviceBanner?.phoneNumber,linkHref:t?.serviceBanner?.phoneNumberLink,size:"sm",variant:"main"}),(0,o.jsx)(x.$n,{iconName:c.LZ.liveChat,label:(0,a.T)("service_banner_button_live_chat"),size:"sm",variant:"minor",linkHref:"#","data-controller":"component--live-chat-trigger","data-action":"click->component--live-chat-trigger#open"})]}),children:(0,o.jsx)("p",{children:t?.serviceBanner?.workingHours})},"service-banner-4")),v},Y=e=>{let{listData:t,bannerPhoneNumbers:s,page:a,offsets:n,onPageChange:r,loading:c=!1,gtm:d,passengers:u,openFlightModal:m,onCheckTour:p,onCheckTourAvailable:g,onCheckTourOnRequest:f,onCheckTourSoldOut:v,onAvailableClick:_,onOnRequestClick:b,availabilityCheckForAll:y}=e;const x=(0,i.useRef)(null),w=(0,i.useRef)(null),[T,k]=(0,i.useState)({useAAPC:!1,termPickerLocationSplit:!1,transferIncludedSplit:!1}),C=(0,i.useCallback)((async()=>{w.current?.abort();const e=new AbortController;w.current=e;try{const t=new U.A,s=await t.getTreatments(["TERM_Picker_availabililty_check","TD_visible_term_picker_all","TD_transfer_included"],e.signal);k({useAAPC:s.TERM_Picker_availabililty_check===z._.On,termPickerLocationSplit:s.TD_visible_term_picker_all===z._.On,transferIncludedSplit:s.TD_transfer_included===z._.On})}catch(e){"AbortError"!==e.name&&(0,h.Cp)(e)}}),[]),S=t.length>0;return(0,i.useEffect)((()=>(S&&C(),()=>{w.current?.abort()})),[S,C]),(0,o.jsxs)(o.Fragment,{children:[c?(0,o.jsx)(G,{loading:c}):(0,o.jsx)("div",{ref:x,className:"c-terms-list-2 u-mb-xs",children:(0,o.jsx)("div",{className:"c-terms-list-2__list",children:t.length>0?J(t,s,d,u,m,p,g,f,v,_,b,y,T):(0,o.jsx)(G,{loading:c})})}),(0,o.jsx)(l,{offsets:n,currentPage:a,onPageChange:(e,t)=>
1{if(r(e,t),null!==x.current){const e=document.querySelector(".modal.is-opened"),t=document.querySelector(".fixed-bar.is-visible");let s=0;const i=!!e;t&&(s-=t.offsetHeight),(0,M.Io)(x,s,!i,i?e:null)}},gtm:d?d.pagination:null})]})},K=e=>{if(e?.serviceBanner?.isLiveChatEnabled){const t=(0,a.T)("term_picker_service_banner_contact_info_link_text");return(0,o.jsx)(r.s,{id:"term_picker_service_banner_contact_info",values:{NUMBER_WITH_LINK:(0,o.jsx)("a",{href:e?.serviceBanner?.phoneNumberLink,children:e?.serviceBanner?.phoneNumber},"match1"),LINK_CHAT:(0,o.jsx)("a",{href:"#","data-controller":"component--live-chat-trigger","data-action":"click->component--live-chat-trigger#open","data-source":q,children:t},"match2")}})}return(0,o.jsx)(r.s,{id:"term_picker_service_banner_contact_info_without_chat",values:{NUMBER_WITH_LINK:(0,o.jsx)("a",{href:e?.serviceBanner?.phoneNumberLink,children:e?.serviceBanner?.phoneNumber},"match1")}})}},18227(e,t,s){s.d(t,{Pt:()=>a,QP:()=>i,R3:()=>n});let i=function(e){return e.ON_LOAD="checkAAPCOnLoad",e.ON_MANUAL="checkAAPCOnManual",e}({}),a=function(e){return e[e.Default=0]="Default",e[e.Loading=1]="Loading",e[e.Available=2]="Available",e[e.OnRequest=3]="OnRequest",e[e.SoldOut=4]="SoldOut",e}({}),n=function(e){return e.Available="available",e.OnRequest="on_request",e.SoldOut="sold_out",e.Failed="failed",e}({})},76680(e,t,s){var i,a;s.d(t,{Gm:()=>o,Io:()=>d});var n=s(92860),r=s(38048);async function o(e,t){return new Promise((s=>e.setState(t,s)))}const l=e=>Array.isArray(e)?a(i.Fragment,{children:e.map(((e,t)=>a(i.Fragment,{children:e},`mapped${t}`)))}):e,c=function(e){let t=0,s=0,i=e;do{t+=i.offsetTop||0,s+=i.offsetLeft||0,i=i.offsetParent}while(i);return{top:t,left:s}},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const a=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?c(e.current).top+t:e.current.offsetTop+t;null!==i?i.scrollTo(0,a):window.scrollTo(0,a)}},24342(e,t,s){s.d(t,{E:()=>g});var i=s(87387),a=s.n(i),n=s(92860),r=s(34119),o=s(93426),l=s(94450),c=s(17272),d=s(49865),u=s(11870),h=s.n(u),m=s(38048);let p=function(e){return e.primary="favourite--primary",e.secondary="favourite--secondary",e}({});const g=e=>{let{variant:t,active:s=!1,modifier:i,linkHref:a,onClick:u,offerData:g,offerId:f}=e;const v=f||g?.offerId||g?.s_offer_id||"",[_,b]=(0,n.useState)(s);(0,n.useEffect)((()=>{const e=()=>{if(!v||(0,c.Im)(l.wI.favouriteOffers))return;const e=l.wI.favouriteOffers.includes(v)||l.wI.favouriteOffers.includes(h()(v));b(e)};return document.addEventListener("favouritesListFetched",e),e(),()=>document.removeEventListener("favouritesListFetched",e)}),[v]);const y=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(null!==y.current){const e=e=>{e.detail.offerId===v&&b(e.detail.isActive)},t=y.current;return t.addEventListener("favouritesButtonReact",e),()=>t.removeEventListener("favouritesButtonReact",e)}}),[y,v]);const x=["favourite",t?p[t]:"",_?"favourite--active":"",i||""].filter((e=>e)).join(" ");return(0,m.jsx)(r.$n,{ref:y,variant:"link",modifier:x,onClick:u,"data-action":"modal--favourite-modal#open","data-controller":"modal--favourite-modal","data-modal--favourite-modal-button-framework":"react","data-modal--favourite-modal-offer-id":v,"data-modal--favourite-modal-offer-data":"string"==typeof g?g:JSON.stringify(g),"data-modal--favourite-modal-type":_?"favourite-remove":"favourite-add","data-modal--favourite-modal-href":a,children:(0,m.jsx)(o.U,{icon:"heart",alt:_?(0,d.T)("remove_from_favourites"):(0,d.T)("add_to_favourites")})})}},31055(e,t,s){s.d(t,{A:()=>p});var i=s(92860),a=s(92987),n=s(17272),r=s(49865),o=s(9912),l=s(34836),c=s(10662),d=s(38048);const u=(0,i.memo)((e=>{let{flagsPath:t,selectedCountryCode:s,showCallingCode:n=!1,disabled:r,onSelectChange:l}=e;const c=e=>{try{return(0,a.K)(e)}catch(e){return""}},u=c(s),h=(0,i.useMemo)((()=>Object.keys(o.X).sort(((e,t)=>o.X[e].localeCompare(o.X[t]))).map((e=>(0,d.jsxs)("option",{value:e,children:[o.X[e]," ",n&&c(e)?`(+${c(e)})`:""]},e)))),[n]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"i-textbox__select-wrap",children:[(0,d.jsx)("select",{className:"i-textbox__select",title:o.X[s],value:s,disabled:r,onChange:l,children:h}),(0,d.jsx)("div",{className:"i-textbox__select-triangle"}),(0,d.jsx)("div",{className:"i-textbox__select-triangle-circle"})]}),s&&(0,d.jsxs)("span",{className:"i-textbox__flag",children:[(0,d.jsx)("img",{src:`${t}${s}.svg`,alt:s}),n&&u&&(0,d.jsxs)("span",{className:"i-textbox__calling-code",children:["+",u]})]})]})}));class h{phoneInputBase=(()=>new o.A)();constructor(e){this._countryCode=this.phoneInputBase.getSelectedCountryCode("",e),this._placeholder=this.phoneInputBase.getPlaceholder(this._countryCode),this.phoneInputBase.createNewFormatter(this._countryCode)}get countryCode(){return this._countryCode}get placeholder(){return this._placeholder}changeCountryCode(e){this._countryCode=e,this._placeholder=this.phoneInputBase.getPlaceholder(e),this.phoneInputBase.createNewFormatter(e)}formatValueWithCountryCode(e){const t=this.formatValue(e);if(!t.trim())return"";try{const e=void 0;return`+${(0,a.K)(this._countryCode)} ${t}`}catch(e){return t}}formatDisplayValue(e){const t=this.phoneInputBase.removeCallingCode(e);return this.phoneInputBase.formatFakeInputValue(t,this._placeholder)}formatValue(e){return this.phoneInputBase.formatFakeInputValue(this.phoneInputBase.removeCallingCode(e),this._placeholder)}getFormattedOutput(e){return this.phoneInputBase.formatterAsYouType.reset(),this.phoneInputBase.formatterAsYouType.input(this.phoneInputBase.removeCallingCode(e)),this.phoneInputBase.formatterAsYouType.formattedOutput}
1shouldPreventDefaultOnFakeKeyDown(e){return this.phoneInputBase.shouldPreventDefaultOnFakeKeyDown(e)}handleFakeInputKeyUp(e,t,s,i){this.phoneInputBase.handleFakeInputKeyUp(e,t,s,i)}checkInputValidity(){return this.phoneInputBase.checkInputValidity()}handleFakeInputPaste(e){const t=e.clipboardData.getData("text"),s=this.phoneInputBase.clearPastedString(t),i=this.phoneInputBase.getSelectedCountryCode(s,this._countryCode);return i!=this._countryCode&&this.changeCountryCode(i),s}}const m=e=>{let{value:t="",onChange:s,showCallingCode:a=!0,defaultCountryCode:o,cssWrapper:m,labelHidden:p,hasAnotherLabelOutside:g,label:f,disabled:v,autoComplete:_,readOnly:b,required:y,textboxId:x,textboxDescribedby:w,hasError:T,validationMessages:k,onValidationChange:C,...S}=e;const E="MISSING_ENV_VAR".STORYBOOK_RUNNING?"invia2020-dist/img/flags/":"/assets/invia2020/img/flags/",L=(0,i.useRef)(),I=l.q.getNext(),A=l.q.getNext(),j=x||I,N=(0,i.useRef)(new h(o)),[O,P]=(0,i.useState)(N.current.placeholder),[R,D]=(0,i.useState)(N.current.countryCode),[M,H]=(0,i.useState)(),[F,B]=(0,i.useState)(""),[$,V]=(0,i.useState)(""),U=N.current.getFormattedOutput(t),z=(0,i.useCallback)((e=>{const t=e.target.value;N.current.changeCountryCode(t),L.current.focus(),D(N.current.countryCode),P(N.current.placeholder);const s=N.current.checkInputValidity();H(s),C&&C(!s)}),[C]),q=e=>{V(U),N.current.shouldPreventDefaultOnFakeKeyDown(e.nativeEvent)&&(e.preventDefault(),e.stopPropagation()),S.onKeyDown&&S.onKeyDown(e)},W=e=>{N.current.handleFakeInputKeyUp(e.nativeEvent,L.current,$,U)},G=e=>{e.preventDefault();const t=N.current.handleFakeInputPaste(e);V(U),s(N.current.formatValueWithCountryCode(t));const i=N.current.formatDisplayValue(t);B(i),D(N.current.countryCode),P(N.current.placeholder);const a=N.current.checkInputValidity();H(a),C&&C(!a)},J=e=>{const t=N.current.formatValueWithCountryCode(e.target.value),i=N.current.formatDisplayValue(e.target.value);B(i),s(t);const a=N.current.checkInputValidity();H(a),C&&C(!a)},Y=["i-textbox__label-text",p?"u-vhide":""].filter((e=>e)).join(" ");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:`i-textbox i-textbox--phone ${m}`,children:[(0,d.jsx)("label",{className:"i-textbox__label",id:A,htmlFor:j,children:(0,d.jsxs)("span",{className:Y,"aria-hidden":g,children:[f,y&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsxs)("span",{className:"required",children:[(0,d.jsx)("span",{className:"required__star","aria-hidden":"true",children:"*"}),(0,d.jsx)("span",{className:"u-vhide",children:(0,r.T)("required_field")})]})]})]})}),(0,d.jsx)("div",{className:"i-textbox__input-group-wrapper",children:(0,d.jsx)("div",{className:"i-textbox__input-outer-wrapper",children:(0,d.jsxs)("div",{className:"i-textbox__input-wrapper i-textbox--has-country",children:[(0,d.jsx)("span",{className:"i-textbox__placeholder",children:U?"":O}),(0,d.jsx)(u,{flagsPath:E,selectedCountryCode:R,showCallingCode:a,disabled:v,onSelectChange:z}),(0,d.jsx)("input",{id:j,className:"i-textbox__input",type:"tel",value:F||N.current.formatDisplayValue(t),autoComplete:_?"tel-local":"off",inputMode:"tel",ref:L,disabled:v,readOnly:b,required:y,onKeyDown:q,onKeyUp:W,onChange:J,onPaste:G,onFocus:S.onFocus,onBlur:S.onBlur,"aria-describedby":w,"aria-invalid":!(!T&&!M)||void 0}),(0,d.jsx)("div",{className:"i-textbox__visual-input"})]})})})]}),!(0,n.Im)(k)&&(0,d.jsx)(c.Q,{message:k,type:"error",modifier:"u-mb-xs"})]})};u.displayName="PhoneTextboxSelect",m.displayName="PhoneTextboxControl";const p=m},93627(e,t,s){s.d(t,{vw:()=>c});var i=s(92860),a=s(39889),n=s(38048);let r=function(e){return e.grey="tag--grey",e.primary="tag--primary",e.white="tag--white",e.suppressed="tag--suppressed",e.dark="tag--dark",e.greenLight="tag--green-light",e.smartDeposit="tag--smart-deposit",e.onlinePayment="tag--online-payment",e.discount="tag--discount",e.discountOutline="tag--discount-outline",e.promo="tag--promo",e.whiteBordered="tag--greywhite",e.greywhiteRTransf="tag--greywhite-r-transf",e.colored1="tag--colored-1",e.colored2="tag--colored-2",e.transparent="transparent",e}({}),o=function(e){return e.xl="tag--xl",e.lg="tag--lg",e.md="tag--md",e.sm="tag--sm",e}({}),l=function(e){return e.rounded="tag--rounded",e.uppercase="tag--uppercase",e}({});const c=e=>{let{label:t,variant:s,size:i,rounded:c,uppercase:d,iconName:u,linkHref:h,modifier:m}=e;const p=["tag",s?r[s]:"",i?o[i]:"",c?l.rounded:"",d?l.uppercase:"",m||""].filter((e=>e)).join(" "),g=u?(0,n.jsx)(a.zG,{iconName:u,title:t}):(0,n.jsx)("span",{className:"tag__label",children:t});return h?(0,n.jsx)("a",{href:h,className:p,children:g}):(0,n.jsx)("span",{className:p,children:g})}},36230(e,t,s){s.d(t,{u:()=>i});class i{init(){}}},28703(e,t,s){s.d(t,{O:()=>g});var i=s(87387),a=s(94450),n=s(95455),r=s(64060),o=s(2716),l=s(91973),c=s(64905),d=s(54134);function u(){const e=new Uint8Array(18);(window.crypto||window.msCrypto).getRandomValues(e);const t=String.fromCharCode.apply(null,e);return btoa(t).replace("+","-").replace("/","_").replace(/=+$/,"")}var h=s(34788);function m(){const e=window.localStorage.getItem("inviaLogApiRequests");return null===e||"true"===e||"1"===e}function p(){const e="csrf-token",t=10,s=new Date;s.setTime(s.getTime()+1e4);const i=u(),a=`${e}_${i}=${e}; expires=${s.toUTCString()}; path=/; samesite=strict`;return document.cookie="https:"===window.location.protocol?`__Host-${a}; secure`:a,i}class g{constructor(e,t){this.controllers=e,this.components=t}run(e){this.interceptAjaxCalls(e),this.stimulus=n.lg.start(),Object.keys(this.controllers).forEac
1h((e=>{this.stimulus.register(e,this.controllers[e])}));for(const e of this.components){(0,r.aO)(`Creating an instance of the component ${e.name}`);const t=void 0;(new e).init()}a.wI.splitHelper=l.A,(0,o.uc)()!==o.E1.PRODUCTION&&this.checkControllers();const t=()=>{(0,d.X0)("offerSeenOnSerp"),(0,d.X0)("offerLoggedOnTd")};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(t,{timeout:5e3}):window.setTimeout(t,5e3),document.addEventListener("offerIdSeenOnSerp",(e=>{(0,c.aZ)(e.detail.offerId,e.detail.unitPrice,e.detail.totalPrice)}))}checkControllers(){const e=this.getControllersInitialized(),t=this.getControllersUsedOnPage(),s=t.filter((t=>!e.includes(t)));s.length>0&&(0,r.yA)("Stimulus controllers probably used on the page but not initialized:",s);const i=e.filter((e=>!t.includes(e)));i.length>0&&(0,r.OP)("Stimulus controllers initialized but probably not used on the page:",i)}getControllersInitialized(){return this.stimulus?[...this.stimulus.router.modulesByIdentifier.keys()]:[]}getControllersUsedOnPage(){const e=void 0,t=[...document.querySelectorAll("[data-controller]")].map((e=>e.dataset.controller)).map((e=>e.split(" "))).flat().filter((e=>""!=e));return[...new Set(t)]}interceptAjaxCalls(e){let{apiClientRequestId:t,apiSessionId:s,apiTraceId:i,apiLogAll:a}=e;const n="X-Invia-Api-ClientRequest-Id",r="X-Invia-Api-Session-Id",o="X-Invia-Api-Trace-Id",l="X-Invia-Api-Log-All",c="X-CSRF-Token";if(m()&&console.table({Type:"Page load",URL:window.location.href,[n]:t,[r]:s,[o]:i,[l]:a}),m()){let e="";null!==a&&(e=",query:(language:kuery,query:'LogAllValue.keyword%20:%20%22"+encodeURIComponent(a)+"%22'%29"),console.debug("http://elasticnode1.invia:5601/app/discover#/?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-1h,to:now))&_a=(index:bfedaab0-a5f4-11ec-9bf0-4990bfea0f79,interval:auto"+e+"%29")}if(window.fetch&&void 0===window.fetch.polyfill){const e=window.fetch;window.fetch=function(s,i){const d=new Request(s instanceof Request?s.clone():s,i);if(!d.url.startsWith(window.location.origin))return e.apply(this,[s,i]);t&&!d.headers.has(n)&&d.headers.append(n,t),["POST","PUT","PATCH","DELETE"].includes(d.method)&&d.headers.set(c,p());const u=e.apply(this,[d]);return u.then((function(e){const s=e.headers.get(r),i=e.headers.get(o);m()&&console.table({Type:"Fetch API",URL:d.url,[n]:t,[r]:s,[o]:i,[l]:a})}),(()=>{})),u}}}}},18037(e,t,s){s.d(t,{A:()=>n});var i=s(36230),a=s(51440);class n extends i.u{init(){document.addEventListener("submit",(function(e){var t=e.target.querySelector('input[data-csrf-protection="csrf-protection"]');t&&a.R.processFormField(t)}))}}},50778(e,t,s){s.d(t,{A:()=>n});var i=s(36230),a=s(64060);class n extends i.u{init(){this.setupProtection("nl_check1","nl_check2","nl_check_js")}setupProtection(e,t,s){const i=document.querySelectorAll(`input[name*="[${s}]"]`);for(const s of i){const i=s.closest("form");if(!i){(0,a.OP)("Cannot setup robots protection. Parent form element is missing.");continue}const n=i.querySelector(`input[name*="[${e}]"]`),r=i.querySelector(`input[name*="[${t}]"]`);n&&r?s.value=(parseInt(n.value)^parseInt(r.value)).toString():(0,a.OP)("Cannot setup robots protection. Checksum values are missing.")}}}},73439(e,t,s){s.d(t,{A:()=>h});var i=s(91973),a=s(36230);const n="https://api.exponea.com";let r=!1;const o=e=>new Promise(((t,s)=>{if(window.exponea)return void t();const i=document.createElement("script");i.src=`${e}/js/exponea.min.js`,i.async=!0,i.onload=()=>t(),i.onerror=()=>s(new Error("Failed to load the Bloomreach (Exponea) SDK")),document.head.appendChild(i)})),l=()=>{if(r)return;const e=window.inviaBloomreachToken;e&&(r=!0,o(n).then((()=>{window.exponea?.start({target:n,token:e,ping:{enabled:!0},new_experiments:{mode:"async",timeout:1e3,hide_class:"exponea-hide"}})})).catch((()=>{})))},c="Bloomreach_service_worker",d="on",u="/samba-sw.js";class h extends a.u{started=!1;init(){window.inviaCmp&&this.bootstrap()}async bootstrap(){const e=await this.isBloomreachEnabled(),t=window.inviaCmp;t&&(this.startIfAllowed(t.getConsent?.()??null,e),t.subscribe?.((t=>{this.startIfAllowed(t,e)})))}async isBloomreachEnabled(){try{const e=void 0;return await(new i.A).getTreatment(c)===d}catch(e){return!1}}startIfAllowed(e,t){this.started||!0!==e?.marketing||(this.started=!0,t?l():this.startSambaWorker())}startSambaWorker(){try{new Worker(u)}catch(e){}}}}
1,31674(e,t,s){s.r(t),s.d(t,{default:()=>r});var i=s(95455);const a="has-emergency-announcement-banner",n="--emergency-banner-height";class r extends i.xI{resizeObserver=null;connect(){document.body.classList.add(a),this.updateHeight(),this.resizeObserver=new ResizeObserver((()=>{this.updateHeight()})),this.resizeObserver.observe(this.element)}disconnect(){this.resizeObserver?.disconnect(),this.resizeObserver=null,document.body.classList.remove(a),document.documentElement.style.removeProperty(n)}updateHeight(){const e=Math.ceil(this.element.getBoundingClientRect().height);document.documentElement.style.setProperty(n,`${e}px`)}}},91038(e,t,s){s.r(t),s.d(t,{default:()=>g});var i=s(64457),a=s(46872),n=s(36999),r=s(96700),o=s(87546),l=s(30380),c=s(95455);const d=(e,t)=>{let s=[];const i=()=>{e.innerHTML=t.scrollSnapList().map(((e,s)=>`<button class="dot" type="button" aria-label="${++s} of ${t.scrollSnapList().length}"></button>`)).join(""),s=Array.from(e.querySelectorAll(".carousel__dots .dot"));const i=1==s.length?"add":"remove";e.classList[i]("is-disabled"),s.forEach(((e,s)=>{e.addEventListener("click",(()=>t.scrollTo(s)),!1)}))},a=()=>{const e=t.previousScrollSnap(),i=t.selectedScrollSnap();s.length>0&&(s[e].classList.remove("is-selected"),s[i].classList.add("is-selected"))};return t.on("init",i).on("reInit",i).on("init",a).on("reInit",a).on("select",a),()=>{e.innerHTML=""}};var u=s(87387);const h=(e,t,s,i)=>()=>{const a="u-hide",n=s.rootNode();let r=!1,o=!1;const l=void 0;if(s.internalEngine().options.active?0!=s.slidesNotInView().length&&s.slidesInView().length>1&&!i.loop?(r=!!s.slidesNotInView().includes(0),o=!!s.slidesNotInView().includes(s.slideNodes().length-1)):(r=s.canScrollPrev(),o=s.canScrollNext()):(r=!1,o=!1),s){const s=r?"add":"remove",i=o?"add":"remove",l=r?"remove":"add",c=o?"remove":"add";n.parentElement.classList[s]("has-prev-button"),n.parentElement.classList[i]("has-next-button"),e.disabled=!r,t.disabled=!o,e.classList[l](a),t.classList[c](a)}else e.classList.add(a),t.classList.add(a)};var m=function(e){return e.ISREADY="carousel--is-ready",e.ISINITIALIZED="carousel--initialized",e.ISNOTREADY="carousel--not-initialized",e.ISSELECTED="is-selected",e}(m||{}),p=function(e){return e.INTERVAL="autoplay-interval",e.AUTOSCROLL="autoscroll",e.DRAGFREE="drag-free",e.SLIDESTOSCROLL="slides-to-scroll",e.CONTAINSCROLL="contain-scroll",e.STOPONINTERACTION="stop-on-interaction",e.STOPONMOUSEENTER="stop-on-mouse-enter",e.LOOP="loop",e}(p||{});class g extends c.xI{carousel=null;isVisible=!1;static targets=["list","viewport","prevButton","nextButton","dots"];defaultIntersectionOptions={root:null,rootMargin:"0px",threshold:.1};toggleCarouselReady=e=>{const t=void 0;this.listTarget.scrollWidth+parseFloat(getComputedStyle(this.listTarget).marginLeft)>this.viewportTarget.clientWidth?(this.element.classList.add(m.ISREADY),"resize"===e&&this.reinitializeCarousel()):0===this.carousel.slidesNotInView().length&&this.disconnect()};appear(){this.viewportTarget&&(this.element.classList.remove(m.ISNOTREADY),this.element.classList.add(m.ISINITIALIZED),this.initializeCarousel(),this.observer.unobserve(this.element))}connect(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(this.appear(),this.initAutoplay(),this.observer.unobserve(e.target))}))}),this.defaultIntersectionOptions),this.observer.observe(this.element),this.viewportTarget}initializeCarousel(){const e=new CustomEvent("staticClick",{bubbles:!1,cancelable:!0,detail:null});if(this.options={loop:!!this.data.get(p.LOOP)&&JSON.parse(this.data.get(p.LOOP)),align:this.data.get("cell-align")?this.data.get("cell-align"):"start",containScroll:this.data.get(p.CONTAINSCROLL)||"keepSnaps",slidesToScroll:parseInt(this.data.get(p.SLIDESTOSCROLL))||"auto",dragFree:!!this.data.get(p.DRAGFREE),inViewThreshold:1,active:!0,breakpoints:this.data.get("disableMdUp")?{"(min-width: 735px)":{active:!1}}:{}},this.plugins=[(0,o.A)({delay:parseInt(this.data.get(p.INTERVAL)),stopOnInteraction:!this.data.get(p.STOPONINTERACTION)||JSON.parse(this.data.get(p.STOPONINTERACTION)),stopOnMouseEnter:!this.data.get(p.STOPONMOUSEENTER)||JSON.parse(this.data.get(p.STOPONMOUSEENTER)),stopOnLastSnap:!this.data.get(p.LOOP)||!JSON.parse(this.data.get(p.LOOP))})],this.carousel=this.data.get(p.INTERVAL)?(0,r.A)(this.viewportTarget,this.options,this.plugins):this.data.get(p.AUTOSCROLL)?(0,r.A)(this.viewportTarget,this.options,[(0,l.A)({playOnInit:!0,speed:.5})]):(0,r.A)(this.viewportTarget,this.options),this.hasListTarget&&this.listTarget.childElementCount>0){const e=()=>{const e=void 0;
1Array.from(this.listTarget.children).forEach(((e,t)=>{if(t===this.carousel.selectedScrollSnap()){if(e.classList.add(m.ISSELECTED),this.carousel?.plugins()?.autoplay){const t=1e3*parseInt(e.getAttribute("data-component--carousel-interval-value"),10)||void 0;if(!t)return;this.carousel.plugins().autoplay.stop(),this.carousel.plugins().autoplay.reset(),this.carousel.plugins().autoplay.options.delay=t,this.reinitializeCarousel()}}else e.classList.remove(m.ISSELECTED)}))};this.carousel.on("init",this.toggleCarouselReady.bind(this)),this.carousel.on("resize",this.toggleCarouselReady.bind(this)),this.carousel.on("init",e),this.carousel.on("select",e)}if(this.carousel?.plugins()?.autoplay&&this.carousel.plugins().autoplay.reset(),this.hasPrevButtonTarget&&this.hasNextButtonTarget){const e=h(this.prevButtonTarget,this.nextButtonTarget,this.carousel,this.options);this.carousel.on("init",e),this.carousel.on("scroll",e),this.carousel.on("select",e),this.carousel.on("resize",e),this.carousel.on("reInit",e)}this.hasDotsTarget&&d(this.dotsTarget,this.carousel);const t=()=>{const e=void 0;"TRIPS_SEARCH"===(0,a.E)()&&((0,n.XM)({event:"trackEvent",eventAction:"Photo Gallery",eventCategory:"Search Results",eventLabel:this.lastScrollSnap||"undefined",nonInteraction:!1}),(0,i.B)({event:"search_result",event_action:"photo_gallery",event_label:this.lastScrollSnap||"undefined",non_interaction:!1,analytics:"ga4"}))};this.carousel.on("select",t),this.carousel.rootNode().addEventListener("staticClick",(t=>{(0,n.XM)({event:"trackEvent",eventAction:"Photo Gallery",eventCategory:"Search Results",eventLabel:"Click Photo",nonInteraction:!1}),t.target.dispatchEvent(e)}))}initAutoplay(){this.carousel?.plugins()?.autoplay&&this.carousel.plugins().autoplay.play()}prev(e){e.preventDefault(),this.lastScrollSnap="prev",this.carousel.scrollPrev()}next(e){e.preventDefault(),this.lastScrollSnap="next",this.carousel.scrollNext()}reinitializeCarousel(){this.carousel&&this.carousel.reInit()}disconnect(){this.carousel&&(this.element.classList.remove(m.ISREADY),this.element.classList.remove(m.ISINITIALIZED),this.element.classList.add(m.ISNOTREADY),this.carousel.destroy()),this.observer&&this.observer.disconnect()}}},26405(e,t,s){s.r(t),s.d(t,{default:()=>g});var i=s(87387),a=s.n(i),n=s(94502),r=s(27384),o=s(81946),l=s(95455),c=s(89994),d=s(26903),u=s(78315),h=s(7995),m=s(77335);const p=e=>Math.round(window.scrollY+e.getBoundingClientRect().top);class g extends l.xI{static targets=["toggleable","hideable","visibleContent"];isAnimating=!1;connect(){const e=this.data.get("md-hide"),t=(0,r.nB)(this.element,"is-toggled");(0,m.$_)("mdDown")&&e&&t&&(0,r.vy)(this.element,"is-toggled"),(0,m.$_)("mdUp")&&e&&!t&&(0,r.iQ)(this.element,"is-toggled")}switchToggleLabel(e){const t=e.textContent.trim(),s=this.data.get("toggle-label"),i=(0,n.o8)(e.querySelectorAll("*")).filter((e=>e.textContent.includes(t))),a=i.length>0?i[i.length-1]:e;if((0,r.p1)(e,"is-toggled"),s)a.textContent=s,this.data.set("toggle-label",t);else{const e=a.closest(".content-toggler__btn");e?.remove()}}toggle(e){e.preventDefault();const{currentTarget:t}=e,s=(0,r.nB)(t,"is-toggled"),i=(0,c.kp)(t,"[data-component--collapse--content-toggler-wrapper]"),a=(0,r.nB)(i,"is-toggled"),n=this.data.get("content");n&&(this.toggleableTarget.innerHTML=JSON.parse(n));const l=e=>{const t=e.scrollHeight,s=e.style.transition;e.style.transition="",(0,u.er)((()=>{e.style.height=t+"px",e.style.transition=s,(0,u.er)((()=>{e.style.height="0px"}))}))},m=e=>{const t=e.scrollHeight;e.style.height=t+"px";const s=t=>{(0,d.AU)(e,"transitionend",s);const{propertyName:i}=t;"height"===i&&(e.style.height=null)};(0,d.on)(e,"transitionend",s)};if(this.toggleableTargets.forEach((e=>{m(e)})),(0,r.p1)(i,"is-toggled"),this.hasHideableTarget&&(0,r.iQ)(this.hideableTarget,"u-hide"),a&&(this.toggleableTargets.forEach((e=>{l(e)})),(0,o.ny)((()=>{(0,r.vy)(t,"is-toggled")}))),s&&(this.toggleableTargets.forEach((e=>{l(e)})),(0,o.ny)((()=>{this.toggleableTargets.forEach((e=>{e.style.height=null}))}))),s){(0,o.ny)((()=>{this.toggleableTargets.forEach((e=>{e.style.height=null}))}));const e=()=>{const e=(0,h.PV)(".header"),s=e?e.offsetHeight:60,i=(0,h.PV)(".fixed-bar"),a=i?i.offsetHeight:60;i&&e?window.scrollTo({top:t-(a+s),behavior:"smooth"}):window.scrollTo({top:t-s,behavior:"smooth"})};if(!i)return;const t=p(i),s=void 0;i.getBoundingClientRect().top<0&&e()}this.switchToggleLabel(t)}}},61718(e,t,s){s.r(t),s.d(t,{default:()=>_,expandSection:()=>f});var i=s(87387),a=s.n(i),n=s(77335),r=s(94502),o=s(27384),l=s(81946),c=s(89994),d=s(95455),u=s(84979),h=s(7995),m=s(78315);const p=e=>Math.round(window.scrollY+e.getBoundingClientRect().top),g=e=>{const t=(0,h.PV)(".header"),s=t?t.offsetHeight:60,i=(0,h.PV)(".fixed-bar"),a=i?i.offsetHeight:60;i&&t?window.scrollTo({top:e-a-10,behavior:"smooth"}):window.scrollTo({top:e-s-10,behavior:"smooth"})},f=e=>{const t=e.scrollHeight;e.style.height=t+"px";const s=()=>{e.style.height="auto",e.removeEventListener("transitionend",s)};e.addEventListener("transitionend",s)},v=(e,t)=>
1{const s=e.scrollHeight,i=e.style.transition;e.style.transition="",(0,m.er)((()=>{e.style.height=s+"px",e.style.transition=i,(0,m.er)((()=>{e.style.height=`${t}px`}))}))};class _ extends d.xI{static targets=["content","wrap"];mobileHeight=this.data.get("mobile-height");tabletHeight=this.data.get("tablet-height");desktopHeight=this.data.get("desktop-height");maxLinesCount=this.data.get("lines-count");resizeObserver=null;constructor(e){super(e),this.resizeContent=this.resizeContent.bind(this)}initResize(){const e=this.getCloseHeight(),t=this.contentTarget.scrollHeight,s=(0,o.nB)(this.wrapTarget,"is-toggled");e<t?((0,o.iQ)(this.wrapTarget,"is-toggleable"),s||(this.contentTarget.style.height=e+"px")):((0,o.vy)(this.wrapTarget,"is-toggleable"),this.contentTarget.style.height="auto")}connect(){this.contentTarget&&this.wrapTarget?((0,u.G4)(this),this.initResize(),this.resizeObserver=new ResizeObserver((()=>{this.initResize()})),this.resizeObserver.observe(this.wrapTarget),document.addEventListener("tourAlertsSectionResize",this.resizeContent)):console.error("Content or wrap target not found.")}windowResize(){this.initResize()}resizeContent(){const e=void 0;(0,o.nB)(this.wrapTarget,"is-toggled")||this.contentTarget.style.height===`${this.contentTarget.scrollHeight}px`||f(this.contentTarget)}getCloseHeight(){const e=window.getComputedStyle(this.contentTarget,null).lineHeight,t=parseInt(e,10);if(this.maxLinesCount)return parseInt(this.maxLinesCount,10)*t;const s=(0,n.Kz)();return s===n.Ww.Small?parseInt(this.mobileHeight,10):s===n.Ww.Medium&&this.tabletHeight?parseInt(this.tabletHeight,10):parseInt(this.desktopHeight,10)}switchToggleLabel(e){const t=void 0;if(!this.data.get("toggle-label"))return void e.parentElement.remove();const s=e.textContent.trim(),i=this.data.get("toggle-label"),a=(0,r.o8)(e.querySelectorAll("*")).filter((e=>e.textContent.includes(s))),n=a.length>0?a[a.length-1]:e;(0,o.p1)(e,"is-toggled"),n.textContent=i,this.data.set("toggle-label",s)}toggle(e){e.preventDefault();const{currentTarget:t}=e,s=(0,o.nB)(t,"is-toggled"),i=this.contentTarget,a=(0,c.kp)(t,"[data-component--collapse--max-height-content-toggler-wrapper]"),n=(0,o.nB)(a,"is-toggled"),r=this.getCloseHeight();if((0,o.p1)(a,"is-toggled"),s||n){if(v(i,r),(0,l.ny)((()=>{(0,o.vy)(t,"is-toggled")})),!a)return;const e=p(a),s=void 0;a.getBoundingClientRect().top<0&&g(e)}else f(i);this.switchToggleLabel(t)}disconnect(){this.resizeObserver?.disconnect(),this.resizeObserver=null,document.removeEventListener("tourAlertsSectionResize",this.resizeContent)}}},21256(e,t,s){s.r(t),s.d(t,{default:()=>T});var i=s(95455),a=s(92860),n=s(91930),r=s(89994),o=s(85452),l;const c=s(81958).Yj().length(6);async function d(){const e=await o.Ay.get("/ajax-get-or-create-smartseer-vip-code").json();return c.parse(e)}var u=s(64060),h=s(34119);const m=function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return t.filter(Boolean).join(" ")};var p=s(38048);const g=e=>{let{callLoad:t,loadModifier:s,callLoadDesc:i,time:a,isActive:n,index:r}=e;const o=m("b-time-chart__item",n&&"b-time-chart__item--active"),l=m("b-time-chart__load",s);return(0,p.jsxs)("li",{className:o,children:[void 0!==t&&(0,p.jsx)("span",{className:l,style:{maxHeight:`${t}%`},children:i&&(0,p.jsx)("span",{className:"u-vhide",children:i})}),a&&(0,p.jsx)("span",{className:"b-time-chart__time",children:a})]},r)},f=e=>{let{modifier:t,items:s=[]}=e;const i=m("b-time-chart",t),a=s.length>0;return(0,p.jsx)("div",{className:i,children:a&&(0,p.jsx)("ul",{className:"b-time-chart__list","data-testid":"call-center-graph",children:s.map(((e,t)=>(0,p.jsx)(g,{...e,index:t},t)))})})};var v=s(93426),_=s(56413),b=s(12868),y=s(49865),x=s(87087);const w=e=>{let{phone:t,phoneLink:s,displayChart:i,workload:n,staticBlocks:r,showSmartseerVipCode:o,smartseerVipCode:l,onClose:c}=e;const[d,u]=(0,a.useState)(o&&!l),m=(0,_.a)();return(0,a.useEffect)((()=>{l&&u(!1)}),[l]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"m-top-2__header",children:[(0,p.jsx)(h.$n,{type:"button",modifier:"m-top-2__close",variant:"link",onClick:c,"data-testid":"call-center-popup-close-button",label:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.U,{icon:m?b.LZ.pointerLeft:b.LZ.cross,wrapperClass:"m-top-2__close-icon "+(m?"m-top-2__close-icon--pointer":"m-top-2__close-icon--cross")}),(0,p.jsx)("span",{className:"m-top-2__close-label",children:(0,y.T)("close")})]}),"aria-label":(0,y.T)("close")}),(0,p.jsx)("h2",{className:"m-top-2__title",children:(0,y.T)("header_content_info_header")})]}),(0,p.jsx)("div",{className:"m-top-2__wrap",children:(0,p.jsxs)("div",{className:"grid grid--x-md",children:[(0,p.jsxs)("div",{className:`grid__cell${i?" size--6-12@lg":""} u-mb-last-0 u-flex u-flex-column`,children:[r.headerTop&&(0,p.jsx)("div",{className:"u-mb-last-0 u-mb-xs u-mb-md@lgUp",children:(0,x.Ay)(r.headerTop)}),o&&(0,p.jsxs)("div",{"data-component--content-info-target":"smartseerVipCodeWrapper",children:[(0,p.jsx)("p",{className:"u-mb-xxs",children:(0,y.T)("share_your_unique_code")}),(0,p.jsx)("p",{className:"u-font-xl u-text-uppercase u-font-medium u-color-tertiary u-text-center",children:d?(0,p.jsx)("span",{"data-component--content-info-target":"smartseerVipCodeLoader",children:"000000"}):(0,p.jsx)("span",{"data-component--content-info-target":"smartseerVipCode",children:l||"------"})})]}),(0,p.jsx)("div",{className:"u-mx-auto u-mb-sm u-mb-md@lgUp u-flex-1",children:t&&(0,p.jsx)(h.$n,{type:"button",modifier:"u-mb-xxs",linkHref:s,iconName:b.LZ.call,"data-testid":"call-center-popup-call-link",label:`${(0,y.T)("call")} ${t}`})}),r.headerInfo2&&(0,p.jsx)("div",{className:"u-mb-last-0 u-font-sm",children:(0,x.Ay)(r.headerInfo2)})]}),i&&(0,p.jsxs)("div",{className:`grid__cell${i?" size--6-12@lg":""} u-mb-last-0 u-font-sm`,children:[r.headerInfo3&&(0,p.jsx)("div",{className:"u-mb-last-0 u-mb-xs",children:(0,x.Ay)(r.headerInfo3)}),i&&n&&n.length>0&&(0,p.jsx)(f,{items:n,modifier:"u-mb-xs u-max-width-460 u-mx-auto"}),r.headerBottom&&(0,p.jsx)("div",{className:"u-color-light u-mb-last-0",children:(0,x.Ay)(r.headerBottom)})]})]})})]})};class T extends i.xI{reactDomRoot=null;popupContainer=null;isPopupOpen=!1;smartseerVipCode=null;static targets=["triggerBtn","popup"];static values=(()=>({phone:String,phoneLink:String,displayChart:Boolean,workload:Array,staticBlockHeaderTop:String,staticBlockHeaderBottom:String,staticBlockHeaderInfo2:String,staticBlockHeaderInfo3:String,showSmartseerVipCode:Boolean}))();disconnect(){this.closeCallCenterPopup()}closeCallCenterPopup(){this.reactDomRoot&&(this.reactDomRoot.unmount(),this.reactDomRoot=null),this.popupContainer&&this.popupContainer.parentNode&&(this.popupContainer.parentNode.removeChild(this.popupContainer),this.popupContainer=null),this.element.classList.remove("call
1center-popup-open"),this.isPopupOpen=!1,this.hasTriggerBtnTarget&&this.triggerBtnTargets.forEach((e=>{e.setAttribute("aria-expanded","false")}))}async showCallCenterPopup(){if(this.showSmartseerVipCodeValue&&!this.smartseerVipCode)try{this.smartseerVipCode=await d()}catch(e){(0,u.Cp)(e),this.smartseerVipCode=null}this.popupContainer=document.createElement("div"),this.popupContainer.className="m-top-2__popup m-top-2__callcenter-popup",this.popupContainer.setAttribute("data-component--content-info-target","popup");const e=this.triggerBtnTargets[this.triggerBtnTargets.length-1]?.closest(".m-top-2__inner");e&&e.appendChild(this.popupContainer),this.reactDomRoot=(0,n.H)(this.popupContainer),this.reactDomRoot.render((0,p.jsx)(w,{phone:this.phoneValue,phoneLink:this.phoneLinkValue,displayChart:this.displayChartValue,workload:this.workloadValue,staticBlocks:{headerTop:this.staticBlockHeaderTopValue,headerBottom:this.staticBlockHeaderBottomValue,headerInfo2:this.staticBlockHeaderInfo2Value,headerInfo3:this.staticBlockHeaderInfo3Value},showSmartseerVipCode:this.showSmartseerVipCodeValue,smartseerVipCode:this.smartseerVipCode,onClose:()=>this.closeCallCenterPopup()})),this.element.classList.add("callcenter-popup-open"),this.isPopupOpen=!0,this.hasTriggerBtnTarget&&this.triggerBtnTargets.forEach((e=>{e.setAttribute("aria-expanded","true")}))}outClick(e){(0,r.kp)(e.target,".m-top-2__inner.has-popup")||this.closeCallCenterPopup()}async toggleContentInfo(e){e.preventDefault(),"click"===e.type&&(this.isPopupOpen?this.closeCallCenterPopup():await this.showCallCenterPopup())}}},60922(e,t,s){s.r(t),s.d(t,{default:()=>b});var i=s(95455),a=s(64060),n=s(10715);const r="privacySettings",o="privacyProtectionPopupShown",l=365,c={b_search_tracking:null,b_advert_personalization:null,b_email_non_personalized:null,b_email_personalized:null,b_phone_customer_care:null,b_account_legal_conditions_shown:null};let d=!1;const u=(e,t,s,i,a)=>{const n=new Date;n.setTime(n.getTime()+1e3*s*60*60*24);const r=`expires=${n.toUTCString()}`;document.cookie=`${e}=${t}; ${r}; path=${i}; domain=${a}`},h=e=>{const t=document.cookie.split("; ").find((t=>t.startsWith(e+"=")));if(t){const e=t.indexOf("=");return t.slice(e+1)}},m=()=>{if(!d){const e=h(r);if(e){let t={};try{t=JSON.parse(e)}catch(e){(0,a.Cp)(e,"Cannot parse privacy settings cookie")}for(const e in t)e in c?c[e]=!!t[e]:(0,a.OP)('Unknown privacy settings cookie property "'+e+'"')}d=!0}},p=()=>{u(o,"1",l,"/",(0,n.R)())};var g=s(66354),f=s(89994),v=s(47662),_=s(27384);class b extends i.xI{static targets=["bar"];connect(){m()}close(){this.closeBarAndSetCookies()}outClick(e){(0,f.kp)(e.target,".cookie-bar")||this.closeBarAndSetCookies()}closeBarAndSetCookies(){(0,g.TF)(this.barTarget),p(),(0,v.P)(".cookie-bar--secondary").length&&(0,_.iQ)((0,v.P)(".cookie-bar--secondary")[0],"is-visible")}}},14148(e,t,s){s.r(t),s.d(t,{default:()=>d});var i=s(95455),a=s(64060),n=s(49865),r=s(26544),o=s(35494),l=s(36999),c=s(33481);class d extends i.xI{static targets=["label","placeholder","outsideItems"];loadTimeout=1e4;loadTimeoutId=null;isLiveChatLoaded=!1;isLoading=!1;shouldOpenWhenReady=!1;static values=(()=>({gtmChatInitEvent:String}))();connect(){document.body.classList.add(c.C$),document.addEventListener("LiveChatReady",this.handleLiveChatReady),document.addEventListener(c._Y,this.handleOpenRequest)}disconnect(){document.removeEventListener("LiveChatReady",this.handleLiveChatReady),document.removeEventListener(c._Y,this.handleOpenRequest),this.clearLoadTimeout(),document.body.classList.remove(c.C$,c.$Y,c.Ar)}open(e){e?.preventDefault(),this.requestOpen()}handleOpenRequest=e=>{const{source:t}=e.detail??{};t===o.K&&(0,l.XM)({event:"trackEcommerceEvent",eventCategory:"Ecommerce",eventAction:"Promo Click",eventLabel:"Service Banner",nonInteraction:!0,ecommerce:{promoClick:{promotions:[{id:"service-banner",name:"click-to-chat",creative:"term-picker-banner",position:1}]}}}),this.requestOpen()};requestOpen(){this.isLiveChatLoaded?this.callLiveChatWidget():(this.shouldOpenWhenReady=!0,this.ensureLoaded())}ensureLoaded(){this.hasPlaceholderTarget&&this.hasLabelTarget?this.isLoading||(this.isLoading=!0,document.body.classList.add(c.$Y),this.labelTarget.innerText=(0,n.T)("loading_chat"),this.placeholderTarget.classList.add("is-loading"),(0,r.A)({event:this.gtmChatInitEventValue,eventAction:"click",value:"Placeholder Clicked"}),this.loadTimeoutId=window.setTimeout(this.handleLoadTimeout,this.loadTimeout)):(0,a.yA)("LiveChat root placeholder is not available.")}handleLiveChatReady=()=>{this.isLiveChatLoaded=!0,this.isLoading=!1,document.body.classList.remove(c.$Y),document.body.classList.add(c.Ar),this.clearLoadTimeout(),this.hasPlaceholderTarget&&this.hasLabelTarget&&(this.placeholderTarget.classList.remove("is-loading"),this.placeholderTarget.classList.add("u-hide"),this.shouldOpenWhenReady&&(this.shouldOpenWhenReady=!1,this.callLiveChatWidget()))};handleLoadTimeout=()=>{this.isLoading=!1,this.shouldOpenWhenReady=!1,document.body.classList.remove(c.$Y),this.element.parentNode&&this.hasPlaceholderTarget&&this.hasLabelTarget&&(this.placeholderTarget.classList.remove("is-loading"),this.labelTarget.innerText=(0,n.T)("error_happened"),(0,a.yA)("LiveChat load timeout expired."))};clearLoadTimeout(){null!==this.loadTimeoutId&&(window.clearTimeout(this.loadTimeoutId),this.loadTimeoutId=null)}callLiveChatWidget(){window.LiveChatWidget?.call("maximize")}}},33481(e,t,s){s.d(t,{$Y:()=>n,Ar:()=>r,C$:()=>a,_Y:()=>i});const i="livechat:open",a="live-chat-on",n="live-chat-loading",r="live-chat-ready"},40745(e,t,s){s.r(t),s.d(t,{default:()=>n});var i=s(95455),a=s(33481);
1class n extends i.xI{open(e){e.preventDefault(),e.stopPropagation();const t={source:this.element?.dataset.source};document.dispatchEvent(new CustomEvent(a._Y,{detail:t}))}}},35801(e,t,s){s.r(t),s.d(t,{default:()=>d});var i=s(95455),a=s(27384),n=s(78315);const r=document.querySelectorAll('html[data-page_action="TRIPS_HP"], html[data-page_action="OFFER_MAIL"], html[data-page_action="OFFER_MAIL_SHOW"], html[data-page_action^="ONLINE_BOOKING"]'),o=document.querySelector(".b-major-information"),l=()=>(0,a.nB)(document.documentElement,"menu-open")||(0,a.nB)(document.body,"menu-open"),c=(e,t)=>{if(!r.length){const s=(0,n.F1)();let i=0;o&&!(0,a.nB)(o,"is-hidden")&&(i=o.clientHeight),s>i&&!l()&&!(0,a.nB)(document.body,"user-popup-open")?((0,a.iQ)(e,"is-shown"),(0,a.iQ)(t,"is-hidden")):((0,a.vy)(e,"is-shown"),(0,a.vy)(t,"is-hidden"))}};class d extends i.xI{static targets=["navbar","header"];connect(){this.hasNavbarTarget&&this.hasHeaderTarget&&c(this.navbarTarget,this.headerTarget);let e=0;window.addEventListener("scroll",(()=>{const t=window.scrollY;e-t<0?document.body.classList.add("scroll-down"):e-t>0&&document.body.classList.remove("scroll-down"),e=t}))}toggleNavbar(){this.hasNavbarTarget&&this.hasHeaderTarget&&c(this.navbarTarget,this.headerTarget)}}},27025(e,t,s){s.r(t),s.d(t,{default:()=>l});var i=s(95455),a=s(27384),n=s(89994),r=s(77335);const o=e=>{if((0,r.$_)("mdUp"))for(const t of e){t.removeAttribute("style");const e=t.getBoundingClientRect();if((0,a.nB)(t,"m-main__submenu--lg")){const s=2*Math.ceil(Math.ceil(e.width)/2);t.style.width=s+"px"}const s=e.right,i=document.body.clientWidth,n=10,r=Math.ceil(i-n-s);r<0&&(t.style.marginLeft=r+"px")}else for(const t of e)t.removeAttribute("style")};class l extends i.xI{static targets=["triggerBtn","submenu"];syncMenuOpenState(e){document.documentElement.classList.toggle("menu-open",e),document.body.classList.toggle("menu-open",e)}connect(){if(o(this.submenuTargets),this.hasTriggerBtnTarget){const e="true"===this.triggerBtnTarget.getAttribute("aria-expanded");this.syncMenuOpenState(e)}}toggleMenu(e){e.preventDefault();const t=e.currentTarget,s="false"===t.getAttribute("aria-expanded")||null===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",s?"true":"false"),this.syncMenuOpenState(s),(0,a.vy)(document.body,"user-popup-open")}closeMenu(){this.triggerBtnTarget.setAttribute("aria-expanded","false"),this.syncMenuOpenState(!1)}toggleSubMenuMobile(e){e.preventDefault();const t=e.currentTarget;t.setAttribute("aria-expanded","false"===t.getAttribute("aria-expanded")||null===t.getAttribute("aria-expanded")?"true":"false")}toggleSubMenu(e){if((0,r.$_)("mdUp")&&(0,a.nB)(document.documentElement,"touchevents")){const t=e.currentTarget,s=(0,n.kp)(t,".m-main__item");(0,a.nB)(s,"is-open")||(e.preventDefault(),(0,a.p1)(s,"is-open"))}}clickOutside(e){if((0,r.$_)("mdUp")&&(0,a.nB)(document.documentElement,"touchevents")){const t=e.target,s=(0,n.kp)(t,".m-main__item"),i=void 0;[...document.querySelectorAll(".m-main__item.is-open")].forEach((e=>{s!==e&&(0,a.vy)(e,"is-open")}))}}correctSubmenuPosition(){o(this.submenuTargets)}}},89897(e,t,s){s.r(t),s.d(t,{default:()=>o});var i=s(95455),a=s(89994),n=s(27384);const r=e=>{document.documentElement.classList.toggle("menu-open",e),document.body.classList.toggle("menu-open",e)};class o extends i.xI{static targets=["triggerBtn"];togglePopup(e){e.preventDefault(),this.triggerBtnTarget.setAttribute("aria-expanded","false"===this.triggerBtnTarget.getAttribute("aria-expanded")||null===this.triggerBtnTarget.getAttribute("aria-expanded")?"true":"false"),(0,n.p1)(document.body,"user-popup-open"),document.querySelector(".header__menu-trigger").setAttribute("aria-expanded","false"),r(!1)}closeMenu(){this.triggerBtnTarget.setAttribute("aria-expanded","false"),(0,n.nB)(document.body,"user-popup-open")&&(0,n.vy)(document.body,"user-popup-open")}outClick(e){(0,a.kp)(e.target,".m-top__inner.has-popup")||(0,a.kp)(e.target,".m-top-2__inner.has-popup")||this.closeMenu()}}},40199(e,t,s){s.r(t),s.d(t,{NotificationIcons:()=>o,NotificationTypes:()=>l,default:()=>c});var i=s(95455),a=s(24590),n=s(65907),r=s(66354);const o={INFO:"info",SUCCESS:"tick-circle",WARNING:"warning",ERROR:"alert-circle"},l={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error"};class c extends i.xI{messageListener=null;addMessage(e,t){const s=document.createElement("div");s.className=`message message--notification message--${t.type||l.INFO} message--icon message--dismissible message--notification`,s.dataset.controller="component--message",s.dataset.messageTime=`${t.time||5}`,s.innerHTML=`\n\t\t\t${(0,n.U)(t.icon||o.INFO,"icon-svg--md message__icon")}\n\t\t\t<div class="message__content">\n\t\t\t\t${t.content?`<div class="message__message">${t.content}</div>`:""}\n\t\t\t</div>\n\t\t\t<button type="button" class="btn message__btn-dismiss" data-action="click->
1component--message#close">\n\t\t\t\t${(0,n.U)("cross","message__btn-dismiss-icon")}\n\t\t\t\t<span class="u-vhide">Skrýt zprávu</span>\n\t\t\t</button>\n\t\t\t<span class="message__timer" data-component--message-target="timer"></span>\n\t\t`,(0,r.BC)(this.element,s)}connect(){this.messageListener=this.addMessage.bind(this),(0,a.on)("notify",this.messageListener)}disconnect(){this.messageListener&&(0,a.AU)("notify",this.messageListener)}}},43085(e,t,s){s.r(t),s.d(t,{default:()=>a});var i=s(95455);class a extends i.xI{converted=!1;connect(){const e=void 0;this.element.getAttribute("data-href")&&(this.element.addEventListener("mouseenter",this.convertToHref.bind(this),{once:!0}),this.element.addEventListener("touchstart",this.convertToHref.bind(this),{once:!0}),this.element.addEventListener("focus",this.convertToHref.bind(this),{once:!0}))}convertToHref(){if(this.converted)return;const e=this.element.getAttribute("data-href");e&&(this.element.setAttribute("href",e),this.converted=!0)}}},10122(e,t,s){s.r(t),s.d(t,{default:()=>m});var i=s(87387),a=s.n(i),n=s(95455),r=s(94343),o=s(27384),l=s(87352),c=s(64457);const d="a[href], button, input, select, textarea, [tabindex]",u=300;let h=0;class m extends n.xI{static targets=["trigger"];isVisible=!1;listenerCleanup=(()=>new AbortController)();connect(){this.makeTriggerFocusable(),this.bindTriggerEvents(),"true"===this.triggerTarget.getAttribute("data-tippy-showOnCreate")&&this.show()}disconnect(){this.listenerCleanup.abort(),window.clearTimeout(this.showTimer),this.destroyPopper()}get trigger(){return this.triggerTarget.getAttribute("data-tippy-trigger")??(this.data.get("ajax")?"click":"mouseenter focus")}get isInteractive(){const e=this.triggerTarget.getAttribute("data-tippy-interactive");return null!==e?"false"!==e:null!==this.data.get("ajax")}get hidesOnOutsideClick(){return"false"!==this.triggerTarget.getAttribute("data-tippy-hideOnClick")}get showDelay(){const e=this.triggerTarget.getAttribute("data-tippy-delay");if(!e)return 0;try{const t=JSON.parse(e);return Array.isArray(t)?Number(t[0])||0:Number(t)||0}catch{return 0}}bindTriggerEvents(){const{signal:e}=this.listenerCleanup,t=this.trigger;t.includes("mouseenter")&&(this.triggerTarget.addEventListener("mouseenter",(()=>{const e=this.showDelay;e>0?this.showTimer=window.setTimeout((()=>this.show()),e):this.show()}),{signal:e}),this.triggerTarget.addEventListener("mouseleave",(()=>{window.clearTimeout(this.showTimer),this.hide()}),{signal:e})),t.includes("focus")&&(this.triggerTarget.addEventListener("focus",(()=>this.show()),{signal:e}),this.triggerTarget.addEventListener("blur",(e=>this.hideOnBlur(e)),{signal:e})),t.includes("click")&&this.triggerTarget.addEventListener("click",(()=>{this.isVisible?this.hidesOnOutsideClick&&this.hide():this.show()}),{signal:e}),document.addEventListener("click",(e=>{if(!this.isVisible||!this.hidesOnOutsideClick)return;const t=e.target;this.triggerTarget.contains(t)||this.popper?.contains(t)||this.hide()}),{signal:e}),t.includes("focus")||t.includes("manual")||this.showOnKeyboardFocus()}makeTriggerFocusable(){this.triggerTarget.matches(d)||this.triggerTarget.setAttribute("tabindex","0")}showOnKeyboardFocus(){const{signal:e}=this.listenerCleanup;this.triggerTarget.addEventListener("focus",(()=>{this.isKeyboardFocus()&&this.show()}),{signal:e}),this.triggerTarget.addEventListener("blur",(e=>this.hideOnBlur(e)),{signal:e})}hideOnBlur(e){const t=e.relatedTarget;t&&this.popper?.contains(t)||this.hide()}isKeyboardFocus(){try{return this.triggerTarget.matches(":focus-visible")}catch{return!1}}show(){if(this.isVisible)return;this.isVisible=!0;const e=this.ensurePopper();window.clearTimeout(this.removeTimer),e.isConnected||document.body.appendChild(e),this.resolveContent(),this.sendGaEventOnShow(),this.linkAria(),this.stopAutoUpdate=(0,r.ll)(this.triggerTarget,e,(()=>this.updatePosition())),window.requestAnimationFrame((()=>{window.requestAnimationFrame((()=>{this.isVisible&&this.tooltip?.setAttribute("data-state","visible")}))}))}hide(){this.isVisible&&(this.isVisible=!1,this.unlinkAria(),this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0,this.tooltip?.setAttribute("data-state","hidden"),this.removeTimer=window.setTimeout((()=>{this.popper?.remove()}),u))}updatePosition(){if(!this.popper||!this.arrowElement)return;const e=this.popper,t=this.arrowElement;(0,r.rD)(this.triggerTarget,e,{placement:this.triggerTarget.getAttribute("data-tippy-placement")??"top",middleware:[(0,r.cY)(10),(0,r.UU)(),(0,r.BN)({padding:5}),(0,r.UE)({element:t})]}).then((s=>{let{x:i,y:a,placement:n,middlewareData:r}=s;if(e.style.left=`${i}px`,e.style.top=`${a}px`,e.setAttribute("x-placement",n),this.tooltip?.setAttribute("data-placement",n),r.arrow){const{x:e,y:s}=r.arrow;t.style.left=void 0!==e?`${e}px`:"",t.style.top=void 0!==s?`${s}px`:""}}))}
1ensurePopper(){if(this.popper)return this.popper;const e=document.createElement("div");e.className="tippy-popper";const t=this.triggerTarget.getAttribute("data-tippy-zIndex");t&&(e.style.zIndex=t),this.isInteractive&&(e.style.pointerEvents="auto");const s=document.createElement("div");h+=1,s.id=`tooltip-${h}`,s.setAttribute("role","tooltip"),s.setAttribute("data-state","hidden");const i=(this.triggerTarget.getAttribute("data-tippy-theme")??"").split(" ").filter((e=>""!==e)).map((e=>`${e}-theme`));s.className=["tippy-tooltip",...i].join(" "),s.style.maxWidth=`${this.triggerTarget.getAttribute("data-tippy-maxWidth")??"400"}px`;const a=document.createElement("div");a.className="tippy-arrow";const n=document.createElement("div");return n.className="tippy-content",s.appendChild(a),s.appendChild(n),e.appendChild(s),this.popper=e,this.tooltip=s,this.arrowElement=a,this.contentElement=n,e}destroyPopper(){window.clearTimeout(this.removeTimer),this.stopAutoUpdate?.(),this.stopAutoUpdate=void 0,this.popper?.remove(),this.popper=void 0,this.tooltip=void 0,this.arrowElement=void 0,this.contentElement=void 0,this.isVisible=!1}setContent(e){this.contentElement&&(this.contentElement.innerHTML=e)}resolveContent(){const e=this.data.get("ajax");if(e){if(!(0,o.nB)(this.triggerTarget,"is-ajax"))if(this.setContent('<div class="loader"></div>'),"json"===this.data.get("ajax-content")){const t=void 0;new l.A(e,{method:l.I.GET,showLoader:!1}).send().then((e=>{this.setContent(e.html),(0,o.iQ)(this.triggerTarget,"is-ajax"),this.updatePosition()}))}else fetch(e,{method:"GET",headers:{"Content-Type":"text/html"}}).then((e=>e.text())).then((e=>{this.setContent(e),(0,o.iQ)(this.triggerTarget,"is-ajax"),this.updatePosition()}))}else{const e=this.triggerTarget.getAttribute("data-tippy-content"),t=this.triggerTarget.closest("[data-shared-tooltip-content]")?.getAttribute("data-shared-tooltip-content");this.setContent(e||t||"")}}linkAria(){this.tooltip&&this.triggerTarget.setAttribute("aria-describedby",this.tooltip.id)}unlinkAria(){this.tooltip&&this.triggerTarget.getAttribute("aria-describedby")===this.tooltip.id&&this.triggerTarget.removeAttribute("aria-describedby")}sendGaEventOnShow(){const e=this.data.get("ga-category"),t=this.data.get("ga-action"),s=this.data.get("ga-label"),i=this.data.get("ga-non-interaction");e&&t&&s&&i&&(0,c.B)({event:e,event_action:t,event_label:s,non_interaction:"true"===i,analytics:"ga4"})}}},95885(e,t,s){s.r(t),s.d(t,{default:()=>n});var i=s(95455);const a="run-animate";class n extends i.xI{connect(){if(this.element){const e=void 0,t=void 0;new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&this.element.classList.add(a)}))}),{rootMargin:"-100px",threshold:0}).observe(this.element)}}}},53622(e,t,s){s.r(t),s.d(t,{default:()=>b});var i=s(95455),a=s(70044),n=s.n(a),r=s(43336),o=s(64060),l=s(50253);const c=function(e){let t,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return`\n\t\t<span class="icon-svg icon-svg--${e}${s?" "+s:""}">\n\t\t\t<svg class="icon-svg__svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t\t<use xlink:href="/assets/${arguments.length>1&&void 0!==arguments[1]?arguments[1]:"invia2020"}/img/bg/icons-svg.svg#icon-${e}" x="0" y="0" width="100%" height="100%"></use>\n\t\t\t</svg>\n\t\t</span>\n\t`};let d=function(e){return e.Error="error",e.Warning="warning",e.Success="success",e.Info="info",e}({});const u={[d.Error]:c("cross-circle","invia2020","message__icon"),[d.Warning]:c("warning","invia2020","message__icon"),[d.Success]:c("check","invia2020","message__icon"),[d.Info]:c("info","invia2020","message__icon")},h=(e,t)=>`\n\t\t<div class="message message--${e} message--icon u-mb-xs">\n\t\t\t${u[e]}\n\t\t\t<div class="message__content">\n\t\t\t\t<div class="message__message">\n\t\t\t\t\t${t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>`,m=(e,t)=>{const s=document.createElement("div");return s.innerHTML=h(e,t),s.firstElementChild},p=e=>h(d.Success,e),g=e=>h(d.Error,e),f=e=>h(d.Warning,e),v=e=>h(d.Info,e);var _=s(49865);class b extends i.xI{prevErrorMessage=null;async send(e){if(e.preventDefault(),e instanceof CustomEvent&&e.detail&&e.detail.csrfEvent)return;const t=e.currentTarget instanceof HTMLFormElement?e.currentTarget:this.element;
1t.dispatchEvent(new CustomEvent("submit",{bubbles:!0,cancelable:!0,detail:{csrfEvent:!0}}));const s=t.getAttribute("action"),i=n()(t,{hash:!1,empty:!1,disabled:!0});try{l.W(t),null!==this.prevErrorMessage&&this.prevErrorMessage.remove();const a=await this.postData(s,i);if(a.responseIsOk??1)t.outerHTML=a.html,this.onSendSuccess(a,e);else if((0,o.yA)("AJAX response error",a),Array.isArray(a.userMessages)){let e="";for(const t of a.userMessages)e+=h(t.type,t.text);t.outerHTML=e}}catch(e){this.prevErrorMessage=m(d.Error,(0,_.T)("error_happened")),t.firstChild.before(this.prevErrorMessage),(0,o.Cp)(e)}finally{l.j(t)}}onSendSuccess(e,t){e.redirectUrl&&setTimeout((function(){window.location.href=e.redirectUrl}),500)}async postData(e,t){const s=await fetch(e,{method:"POST",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t});if(!s.ok)throw new Error("Network response was not ok.");return new r.Ay(await s.json())}}},57610(e,t,s){s.r(t),s.d(t,{default:()=>r});var i=s(53622),a=s(29416),n=s(99030);class r extends i.default{loginFormWrapperSelector=".js-login-form-wrapper";resetPasswordFormWrapperSelector=".js-reset-password-form-wrapper";hiddenClass="u-vhide";onSendSuccess(e,t){(0,a.P)(e),!0===e.customData?.loginSuccess&&(document.documentElement.dataset.user_logged_in="1",document.dispatchEvent(new CustomEvent("userLoggedIn")),(0,n.MC)()?(0,n.xt)():(0,n._L)())}showLostPasswordForm(e){e.preventDefault();const t=e.target.closest(this.loginFormWrapperSelector);t&&(t.classList.add(this.hiddenClass),t.parentElement.querySelector(this.resetPasswordFormWrapperSelector).classList?.remove(this.hiddenClass))}showLoginForm(e){e.preventDefault();const t=e.target.closest(this.resetPasswordFormWrapperSelector);t&&(t.classList.add(this.hiddenClass),t.parentElement.querySelector(this.loginFormWrapperSelector).classList?.remove(this.hiddenClass))}}},10202(e,t,s){s.r(t),s.d(t,{default:()=>o,userLoggedInEventName:()=>r});var i=s(29416),a=s(60482),n=s(57610);const r="userLoggedIn";class o extends n.default{static targets=["topMenu"];onSendSuccess(e){if(!0===e.customData?.loginSuccess){(0,i.P)(e);const t=document.querySelector('[data-action="modal--close#close"]');if(t){const e=new Event("click");t.dispatchEvent(e)}document.documentElement.dataset.user_logged_in="1";const s=new CustomEvent(r);document.dispatchEvent(s)}e.customData?.addFavouriteOfferId&&!0===e.customData?.loginSuccess&&(0,a.Q)(e.customData.addFavouriteOfferId,this.application)}showLostPasswordForm(){}showLoginForm(){}}},29634(e,t,s){s.r(t),s.d(t,{default:()=>a});var i=s(53622);class a extends i.default{onSendSuccess(){}}},43059(e,t,s){s.r(t),s.d(t,{default:()=>h});var i=s(95455),a=s(24590),n=s(26903),r=s(27384);class o{constructor(e,t){this.input=e,this.options={minLength:2,typeInterval:500,url:"/",loadingClass:"is-loading",typingClass:"is-typing",fetchOptions:null,...t},this.isResult=!1,this.typeTimer=null,this.searchTerm="",this.ajax=[];const s=(0,a.vt)({});this.on=s.on,this.off=s.off,this.trigger=s.trigger,this.keydown=this.keydown.bind(this),this.keypress=this.keypress.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this)}init(){return this.input.setAttribute("autocomplete","off"),(0,n.on)(this.input,"keydown",this.keydown),(0,n.on)(this.input,"keypress",this.keypress),(0,n.on)(this.input,"focus",this.focus),(0,n.on)(this.input,"blur",this.blur),this}destroy(){return(0,n.AU)(this.input,"keydown",this.keydown),(0,n.AU)(this.input,"keypress",this.keypress),(0,n.AU)(this.input,"focus",this.focus),(0,n.AU)(this.input,"blur",this.blur),this}focus(){this.trigger("suggeststart"),this.type()}blur(){this.trigger("suggestend"),(0,r.vy)(this.input,this.options.typingClass)}keydown(e){clearTimeout(this.typeTimer),this.typeTimer=setTimeout((()=>this.type()),this.options.typeInterval);let t=!1;this.trigger("typestart",{which:e.which,preventDefault(){t=!0}}),t?e.preventDefault():(0,r.iQ)(this.input,this.options.typingClass)}keypress(){this.trigger("typing"),this.input.value!==this.searchTerm&&this.ajaxAbort()}ajaxRemove(e){this.ajax=this.ajax.filter((t=>t!==e))}
1ajaxAbort(){this.ajax.forEach((e=>e.abort()))}type(){var e=this.input.value,t=this.options;if(e!==this.searchTerm)if(this.searchTerm=e,e.length>=t.minLength){this.ajaxAbort();let s=!1,i={...this.options.fetchOptions||{}};if(this.trigger("beforeSend",{fetchOptions:i,preventDefault(){s=!0}}),s)return!1;(0,r.iQ)(this.input,t.loadingClass);const a=new AbortController,n=a.signal,o={abort(){a.abort()}};this.trigger("showPreloader"),fetch(this.options.url,{...i,method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:this.input.getAttribute("name")+"="+e,signal:n}).then((e=>e.text())).then((e=>{this.ajaxRemove(o),this.trigger("success",{respond:e}),(0,r.vy)(this.input,t.loadingClass),this.isResult=!0})).catch((()=>{this.ajaxRemove(o),(0,r.vy)(this.input,t.loadingClass)})),this.ajax.push(o)}else this.isResult?(this.isResult=!1,this.ajaxAbort(),this.trigger("typeclear")):this.trigger("typeend");else this.trigger("typeend");(0,r.vy)(this.input,t.typingClass)}clear(){this.input.value="",clearTimeout(this.typeTimer),this.type()}}var l=s(47662),c=s(50253);class d{constructor(e,t,s){this.element=e,this.Suggest=t,this.options={item:"li",selectedClass:"is-selected",visibleClass:"is-visible",...s},this.items=[],this.selectedIndex=0,this.size=0,this.isOpen=!1;const i=(0,a.vt)({});this.on=i.on,this.off=i.off,this.trigger=i.trigger,this.handleMouseEnter=(0,n.Mm)(this.options.item,this.handleMouseEnter.bind(this)),this.handleMouseDown=(0,n.Mm)(this.options.item,this.handleMouseDown.bind(this)),this.handleClick=(0,n.Mm)(this.options.item,this.handleClick.bind(this)),this.handleSuggestStart=this.handleSuggestStart.bind(this),this.handleSuggestEnd=this.handleSuggestEnd.bind(this),this.handleSuccess=this.handleSuccess.bind(this),this.handleTypeStart=this.handleTypeStart.bind(this),this.handleTypeClear=this.handleTypeClear.bind(this),this.handleShowPreloader=this.handleShowPreloader.bind(this)}init(){return null==this.element||null==this.Suggest||((0,r.vy)(this.element,this.options.visibleClass),this.element.addEventListener("mouseenter",this.handleMouseEnter,!0),(0,n.on)(this.element,"mousedown",this.handleMouseDown),(0,n.on)(this.element,"click",this.handleClick),this.Suggest.on("suggeststart",this.handleSuggestStart).on("suggestend",this.handleSuggestEnd).on("success",this.handleSuccess).on("showPreloader",this.handleShowPreloader).on("typestart",this.handleTypeStart).on("typeclear",this.handleTypeClear),this.Suggest.init()),this}destroy(){return null==this.element||null==this.Suggest||((0,r.vy)(this.element,this.options.visibleClass),this.element.innerHTML="",this.element.removeEventListener("mouseenter",this.handleMouseEnter),(0,n.AU)(this.element,"mousedown",this.handleMouseDown),(0,n.AU)(this.element,"click",this.handleClick),this.Suggest.off("suggeststart",this.handleSuggestStart).off("suggestend",this.handleSuggestEnd).off("success",this.handleSuccess).off("showPreloader",this.handleShowPreloader).off("typestart",this.handleTypeStart).off("typeclear",this.handleTypeClear),this.Suggest.destroy()),this}open(){this.isOpen||""===this.element.innerHTML||(this.trigger("beforeopen"),(0,r.iQ)(this.element,this.options.visibleClass),this.trigger("afteropen"),this.isOpen=!0)}hide(){this.isOpen&&(this.trigger("beforehide"),(0,r.vy)(this.element,this.options.visibleClass),this.trigger("afterhide"),this.isOpen=!1)}handleShowPreloader(){this.element.innerHTML="",c.W(this.element,!1),this.open()}handleSuggestStart(){!1!==this.Suggest.isResult&&(this.clearIndex(),this.open())}handleSuggestEnd(){this.Suggest.typeTimer=clearTimeout(this.Suggest.typeTimer),this.Suggest.ajaxAbort(),(0,r.vy)(this.Suggest.input,this.Suggest.options.loadingClass),this.hide()}handleSuccess(e,t){let{respond:s}=t,i=!1;this.trigger("content",{respond:s,preventDefault(){i=!0}}),i||(this.element.innerHTML=s),this.items=(0,l.P)(this.options.item,this.element),this.size=this.items.length+1,this.clearIndex(),""===this.element.innerHTML?this.hide():this.open()}handleTypeStart(e,t){let{which:s,preventDefault:i}=t;this.items.length<1||(38===s?(this.open(),this.handleArrUp({preventDefault:i})):40===s?(this.open(),this.handleArrDown({preventDefault:i})):13===s&&this.selectedIndex&&this.handleEnter({preventDefault:i}))}handleTypeClear(){this.hide(),this.clearIndex(),this.element.innerHTML="",this.items=[]}handleMouseEnter(e,t){e.target,this.setIndex(this.items.indexOf(t)+1,"enter")}setIndex(e,t){e!==this.selectedIndex&&(this.trigger("menuchange",{type:t,index:e}
1),this.items.forEach((e=>(0,r.vy)(e,this.options.selectedClass))),e&&(0,r.iQ)(this.items[e-1],this.options.selectedClass),this.selectedIndex=e)}clearIndex(){this.items.forEach((e=>(0,r.vy)(e,this.options.selectedClass))),this.selectedIndex=0}handleArrUp(e){e.preventDefault(),this.setIndex((this.selectedIndex-1+this.size)%this.size,"up")}handleArrDown(e){e.preventDefault(),this.setIndex((this.selectedIndex+1)%this.size,"down")}handleEnter(e){e.preventDefault(),this.trigger("menuselect")}handleMouseDown(e,t){e.preventDefault(),this.setIndex(this.items.indexOf(t)+1,"click"),this.trigger("menuselect")}handleClick(e){e.preventDefault()}}var u=s(66354);class h extends i.xI{static targets=["input","wrapper"];connect(){const e=document.createElement("div");(0,r.iQ)(e,"b-suggest"),this.data.get("boxClass")&&(0,r.iQ)(e,this.data.get("boxClass")),(0,u.BC)(this.wrapperTarget,e);const t=new o(this.inputTarget,{minLength:2,typeInterval:250,url:this.data.get("action")}),s=new d(e,t,{item:".b-suggest__item, .b-suggest__more"}).init();s.on("menuselect",(()=>{const e=s.items[s.selectedIndex-1];if((0,r.nB)(e,"b-suggest__more")){const t=(0,l.P)("a",e)[0];t&&(window.location=t.href)}else{const t=(0,l.P)("a",e)[0];t&&(window.location=t.href)}s.hide()}))}}},80676(e,t,s){s.d(t,{A:()=>n});var i=s(95455),a=s(64060);class n extends i.xI{static targets=["checkValue1","checkValue2","checksum"];connect(){this.hasCheckValue1Target&&this.hasCheckValue2Target&&this.hasChecksumTarget?this.checksumTarget.value=(parseInt(this.checkValue1Target.value)^parseInt(this.checkValue2Target.value)).toString():(0,a.OP)("Cannot setup form robots protection. Check inputs are missing.")}}},25133(e,t,s){s.r(t),s.d(t,{default:()=>k});var i=s(95455),a=s(84979),n=s(64060),r=s(64457),o=s(33770),l=s(72860),c=s(17486);const d="Hotel Detail Preset Terms",u=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),h=e=>u(e.clickEvent)?e.clickEvent:e,m=()=>{const e=document.querySelector("[data-page--hotel-detail--hotel-detail-hotel-id]"),t=e?.getAttribute("data-page--hotel-detail--hotel-detail-hotel-id");return t&&""!==t.trim()?t:null},p=e=>{try{return new URL(e.href,window.location.origin).searchParams.has("s_offer_id")}catch{return!1}},g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.getElementById("js-main-order-form-container");const t=e?.dataset.offerParams;if(!t)return m();try{const e=JSON.parse(t);return null==e.nl_hotel_id?m():String(e.nl_hotel_id)}catch{return m()}},f=e=>{const{pageType:t,data:s,element:i,orderFormElement:a}=e;if(t!==l.UB.HOTEL_DETAIL||!(i instanceof HTMLAnchorElement))return null;if(!p(i))return null;const n=h(s);if(n.event!==l.UB.HOTEL_DETAIL||"select_preset_terms"!==n.event_action)return null;const r=g(a);return r?{hotelId:r,itemListName:d,navigationSource:c.it.HOTEL}:null};var v=s(64599),_=s(2375),b=s(71056),y=s(94042),x=s(83880),w=s(7613),T=function(e){return e.Load="load",e.Click="click",e.Appear="appear",e}(T||{});class k extends i.xI{static values=(()=>({loadData:Object,loadArrayData:Array,clickData:Object,clickArrayData:Array,appearData:Object,appearArrayData:Array}))();defaultIntersectionOptions={threshold:.1};connect(){const[,e]=(0,a.v1)(this,this.defaultIntersectionOptions);this.unobserve=e,this.hasLoadDataValue?this.pushData(T.Load,this.loadDataValue):this.hasLoadArrayDataValue&&this.pushArrayData(T.Load,this.loadArrayDataValue),(this.hasClickDataValue||this.hasClickArrayDataValue)&&this.element.addEventListener("auxclick",this.onAuxClick)}disconnect(){this.element.removeEventListener("auxclick",this.onAuxClick)}click(){this.hasClickDataValue?this.pushData(T.Click,this.clickDataValue):this.hasClickArrayDataValue&&this.pushArrayData(T.Click,this.clickArrayDataValue)}onAuxClick=e=>{if(1!==e.button)return;const t=e.target?.closest?.("a[href]");t&&"#"!==t.getAttribute("href")&&this.click()};
1appear(){this.hasAppearDataValue?this.pushData(T.Appear,this.appearDataValue):this.hasAppearArrayDataValue&&this.pushArrayData(T.Appear,this.appearArrayDataValue),this.unobserve()}pushData(e,t){const s=f({pageType:(0,l.u1)(),data:t,element:this.element});if(e===T.Click&&s&&(0,c.aM)(s.hotelId,s.itemListName,s.navigationSource),"select_item"===t.event&&t.ecommerce?.items?.[0]){const e=t.ecommerce.items[0],s=e.item_list_name,i=e.item_id;if(s&&i&&(0,c.aM)(i.toString(),s,(0,c.f0)(s)),"string"==typeof e.item_parameter_5&&(e.item_parameter_5=(0,b.D)(e.item_parameter_5,w.A.searchForm.getTotalBoxesCount())),(0,l.u1)()===l.UB.SERP){const t=this.element.closest(`[${x.fT}]`)?.getAttribute(x.fT);(0,x.$b)({item:e,offerJwt:t,filters:(0,y.P3)(),sortContext:(0,y.Cu)()})}(0,r.B)({event:"select_item",page_type:(0,v.Z)("string"==typeof t.page_type?t.page_type:void 0),ecommerce:t.ecommerce},o.v)}else if("plp_click"!==t.event)(0,n.aO)(`GA object from Stimulus "ga" controller constructed and of type: "${e.toString()}"`),"view_item_list"!==t.event?(0,r.B)(t):(0,r.B)(t,o.v);else{if(!(0,_.Eo)())return;(0,r.B)({...t,page_type:(0,v.Z)()},o.v)}}pushArrayData(e,t){for(const s of t)this.pushData(e,s)}}},82065(e,t,s){s.r(t),s.d(t,{default:()=>o});var i=s(95455),a=s(64060),n=s(47662),r=s(94450);class o extends i.xI{static targets=["load","view","modal"];connect(){this.hasLoadTarget&&this.load()}initialize(){if(r.mR.dataLayer&&Array.isArray(r.mR.dataLayer)||(r.mR.dataLayer=[],(0,a.OP)("Variable inviaWindow.dataLayer is undefined.")),this.hasModalTarget){const e=this.element.dataset;if(e.gtm_action_params){const t=JSON.parse(e.gtm_action_params);t||(0,a.OP)("onView modal measurement pageviews missing gtm_action_params"),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t)}}const e=void 0,t=new IntersectionObserver((e=>{e.forEach((e=>{if(e.intersectionRatio>0){const s=e.target.dataset;if(s.gtm_action_params){const t=JSON.parse(s.gtm_action_params);if("trackEcommerceEvent"===t.event){const i=s.gtm_selector;void 0===i&&(0,a.OP)("onView missing data-gtm_selector!");const r=[],o=void 0;(0,n.P)(i,e.target).forEach((e=>{const t=e.getAttribute("data-gtm_cee_gan_view");t&&r.push(JSON.parse(t))})),this.trackEcommerceEventCreateObject(t,r)}else"trackEvent"===t.event?this.trackEventCreateObject(t):(0,a.OP)("onView bad event!")}else(0,a.OP)("onView missing data-gtm_action_params!");t.unobserve(e.target)}}))}),{threshold:[.5]});this.hasViewTarget&&t.observe(this.viewTarget)}load(){const e=this.element.dataset;if(e){if(e.gtm_action_params){const t=JSON.parse(e.gtm_action_params);if(t.pageViews&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.pageViews)),t.contentGroup&&Object.keys(t.contentGroup).forEach((function(e){r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push({[e]:t.contentGroup[e]})})),t.dimension&&Object.keys(t.dimension).forEach((function(e){r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push({[e]:t.dimension[e]})})),t.trackEvent&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.trackEvent)),t.ecommerce){const s=e.gtm_selector;if(void 0===s){let s=[];const i=JSON.parse(e.gtm_cee_gan_load);let a=null;e.gtm_action_field&&(a=JSON.parse(e.gtm_action_field)),i.length>=1?s=i:s.push(i),this.trackEcommerceEventCreateObject(t.ecommerce,s,a)}else{const i=(0,n.P)(s,document),a=[];i.forEach((e=>{const t=JSON.parse(e.getAttribute("data-gtm_cee_gan_load"));t&&a.push(t)}));let r=null;e.gtm_action_field&&(r=JSON.parse(e.gtm_action_field)),this.trackEcommerceEventCreateObject(t.ecommerce,a,r)}}}if(e.gtm_action_params_platform){const t=JSON.parse(e.gtm_action_params_platform);if(t.lead&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.lead)),t.purchase&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.purchase)),t.detail&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.detail)),t.testDetail&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.testDetail)),t.trackEvent&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t.trackEvent)),t.pageType){const s=e.gtm_selector;if(void 0!==s){const e=(0,n.P)(s,document),i=[];e.forEach((e=>{const t=JSON.parse(e.getAttribute("data-gtm_cee_platform_load"));t&&i.push(t)})),this.trackPlatformEventCreateObject(t,i)}}}}}onLoad(e){const t=this.targets.element.dataset;if(t.gtm_action_params){const s=JSON.parse(t.gtm_action_params);if(s.pageViews&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s.pageViews)),s.contentGroup&&Object.keys(s.
1contentGroup).forEach((function(e){r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push({[e]:s.contentGroup[e]})})),s.dimension&&Object.keys(s.dimension).forEach((function(e){r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push({[e]:s.dimension[e]})})),s.trackEvent&&(r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s.trackEvent)),s.ecommerce){const i=t.gtm_selector,a=[],r=void 0;(0,n.P)(i,e.target).forEach((e=>{const t=JSON.parse(e.getAttribute("data-gtm_cee_gan_load"));a.push(t)})),this.trackEcommerceEventCreateObject(s.ecommerce,a)}}if(t.gtm_action_params_platform){const e=JSON.parse(t.gtm_action_params_platform);r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(e)}}click(){const e=this.targets.element.dataset;if(e.gtm_action_params)if(e.gtm_cee_gan_click){const t=JSON.parse(e.gtm_action_params),s=JSON.parse(e.gtm_cee_gan_click),i=Object.assign(s,t);r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}else(0,a.OP)("gtm#click missing data-gtm_cee_gan_click");else(0,a.OP)("gtm#click missing data-gtm_action_params")}onChange(){const e=this.targets.element.dataset;if(e.gtm_action_params){const t=JSON.parse(e.gtm_action_params);this.targets.element.hasAttribute("aria-checked")&&(t.dimension54=this.targets.element.getAttribute("aria-checked")),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(t)}else(0,a.OP)("gtm#onChange missing data-gtm_aciton_params")}trackEventCreateObject(e){r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(e)}trackPlatformEventCreateObject(e,t){if("landing-page"===e.pageType||"search-results"===e.pageType){const s=[],i=[],a=[],n=[];t.forEach((e=>{s.push(e.itemId),i.push(e.itemId2),a.push(e.offerId),n.push(e.tourId)})),e.itemId=s,e.itemId2=i,e.offerId=a,e.tourId=n,r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(e)}}trackEcommerceEventCreateObject(e,t,s){if("Impressions"===e.eventAction){const s=Object.assign(e,{ecommerce:{currencyCode:"",impressions:t}});r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s)}else if("Promo View"===e.eventAction){const s=Object.assign(e,{ecommerce:{promoView:{promotions:t}}});r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s)}else if("Product Click"===e.eventAction){const s=Object.assign(e,{ecommerce:{click:{actionField:{list:e.eventLabel},products:t}}});r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s)}else if("View Hotel Detail"===e.eventAction){const s=Object.assign(e,{ecommerce:{detail:{actionField:{},products:t}}});r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s)}else if("View Tour Detail"===e.eventAction){const s=Object.assign(e,{ecommerce:{detail:{actionField:{},products:t}}});r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(s)}else if("Web Paid Tour"===e.eventAction){const i=Object.assign(e,{ecommerce:{purchase:{products:t}}});s&&(i.ecommerce.purchase.actionField=s),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}else if("Checkout"===e.eventAction){const i=Object.assign(e,{ecommerce:{checkout:{products:t}}});s&&(i.ecommerce.checkout.actionField=s),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}else if("View Insurance Detail"===e.eventAction){const i=Object.assign(e,{ecommerce:{detail:{products:t}}});s&&(i.ecommerce.detail.actionField=s),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}else if("Add To Cart"===e.eventAction){const i=Object.assign(e,{ecommerce:{add:{products:t}}});s&&(i.ecommerce.add.actionField=s),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}
1else if("View Luggage Detail"===e.eventAction){const i=Object.assign(e,{ecommerce:{detail:{products:t}}});s&&(i.ecommerce.detail.actionField=s),r.mR.dataLayer.push({ecommerce:null,event_action:null,event_label:null}),r.mR.dataLayer.push(i)}}}},77953(e,t,s){s.r(t),s.d(t,{default:()=>n});var i=s(95455),a=s(84312);class n extends i.xI{modalElementId=null;connect(){this.modalElementId=this.element.dataset?.id||null}close=()=>{setTimeout((()=>{const e=this.element,t=document.querySelectorAll(".modal.is-opened"),s=e.dataset?.id,i=e.dataset?.registeredModalId;i&&(0,a.MX)(i),this.element.classList.remove("is-opened");const n=e._focusTrap;n&&"function"==typeof n.deactivate&&n.deactivate(),this.element.remove(),1===t.length&&(document.documentElement.classList.remove("modal-open"),document.body.classList.remove("modal-open"),document.body.classList.remove("modal-fix-height"));const r=new CustomEvent("inviaModalClose",{detail:{modalId:s}});document.body.dispatchEvent(r);const o=document.head.getElementsByClassName("modal-scrollbar-fix")[0];if(o&&o.remove(),document.body.dataset&&document.body.dataset.id&&document.body.dataset.content){const e=document.body.dataset.id.split("#")[1],t=document.getElementById(e);t&&(t.innerHTML=document.body.dataset.content),document.body.dataset.id=null,document.body.dataset.content=null}}),300)};keyUp=e=>{"Escape"===e.key&&this.close()}}},44798(e,t,s){s.r(t),s.d(t,{default:()=>w,favouritesListFetchedEventName:()=>x.J});var i=s(87387),a=s.n(i),n=s(95455),r=s(92860),o=s(91930),l=s(43336),c=s(52537),d=s(27384),u=s(11487),h=s(94450),m=s(64060),p=s(11870),g=s.n(p),f=s(10202),v=s(6543),_=s(98323),b=s(17741),y=s(64046),x=s(72199);class w extends n.xI{favouriteTypeRemove="favourite-remove";favouriteTypeAdd="favourite-add";favouriteClassActive="favourite--active";reactRoot=null;modalContainer=null;connect(){this.init(),document.addEventListener(f.userLoggedInEventName,(()=>{this.init()}))}init(){const e=this.data.get("button-framework")||"",t=this.loadFavouritesData();"react"!==e&&t.then((e=>this.handleLoadedOffers(e)))}resolveOfferId(e){const t=void 0;return this.data.get("offer-id")||("string"==typeof e?.offerId?e.offerId:"string"==typeof e?.s_offer_id?e.s_offer_id:null)}handleLoadedOffers(e){const t=this.resolveOfferId();t&&e.includes(g()(t))?((0,d.iQ)(this.element,this.favouriteClassActive),this.data.set("type",this.favouriteTypeRemove)):this.data.set("type",this.favouriteTypeAdd)}open=async e=>{e.preventDefault(),e.stopPropagation();const t=this.data.get("type"),s=this.data.get("title")||"",i=this.data.get("button-framework")||"";let a;if(this.element.closest("#js-tour-detail-header-buttons")){const e=(0,_.p)();a=e?JSON.stringify(e):null}else a=this.data.get("offerData");if(null===a)return void(0,m.yA)("FavouriteModal: Offer data is missing.");const n=this.data.get("href"),r=this.element.getAttribute("data-favourite-toggle-label"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json","X-Modal":"true"},body:a}),u=new l.Ay(await o.json());if(u.customData&&!u.html.includes("ajax-login-form")){const e=JSON.parse(a),s=this.resolveOfferId(e);if(!s)return void(0,m.yA)("FavouriteModal: Offer ID is missing.");const n=g()(s);if(h.wI.favouriteOffers.includes(n)?h.wI.favouriteOffers=(0,v.Ai)(h.wI.favouriteOffers,n):h.wI.favouriteOffers.push(n),"react"===i){const e=void 0,i=new CustomEvent("favouritesButtonReact",{detail:{offerId:s,isActive:"favourite-add"===t,toggleLabel:!!r}});this.element.dispatchEvent(i)}else if(u.customData.add_favourite&&!u.customData.too_many?(this.element.setAttribute("data-modal--favourite-modal-type",this.favouriteTypeRemove),(0,d.iQ)(this.element,this.favouriteClassActive)):u.customData.add_favourite||(this.element.setAttribute("data-modal--favourite-modal-type",this.favouriteTypeAdd),(0,d.vy)(this.element,this.favouriteClassActive)),r){const e=this.element.querySelector(".item-icon__text"),t=e.textContent;this.element.setAttribute("data-favourite-toggle-label",t),e.textContent=r}}const p=u.html.includes("ajax-login-form")?"xs":this.data.get("size");if(u.html.includes("ajax-login-form")){const e=void 0;if(await(0,b.ug)()===b.wC.On)return void this.openReactModal()}const f=(0,c.QJ)({size:p,paddingSize:this.data.get("paddingsize"),notDismissable:!!this.data.get("notdismissable"),containsMap:this.data.get("containsmap"),containsFooter:!!this.data.get("containsfooter")});(0,c.Yg)({wrapper:f,headerContent:this.data.get("header-content")||"",title:s,content:u.html,notDismissable:!!this.data.get("notdismissable"),triggerEvent:this.data.get("trigger"),triggerElement:this.element})};openReactModal(){this.modalContainer||(this.modalContainer=document.createElement("div"),this.modalContainer.id="react-auth-modal-root-favourite",document.body.appendChild(this.modalContainer)),this.reactRoot||(this.reactRoot=(0,o.H)(this.modalContainer));const e=this.data.get("offer-id");this.reactRoot.render(r.createElement(y.w,{onClose:this.closeReactModal.bind(this),addFavouriteOfferId:e||void 0}))}closeReactModal(){this.reactRoot&&this.modalContainer&&(this.reactRoot.unmount(),this.reactRoot=null,this.modalContainer.remove(),this.modalContainer=null)}async loadFavouritesData(){if(!(0,u.x)())return[];if(null===h.wI.favouriteOffers||void 0===h.wI.favouriteOffers){h.wI.favouriteOffers=["loading"];const e=(async()=>{const e="/tour/favourite/ajax-get-favourite-offers",t=await fetch(e);return await t.json()})();try{h.wI.favouriteOffers=await e;const t=new CustomEvent(x.J);return document.dispatchEvent(t),h.wI.favouriteOffers}catch(e){return(0,m.Cp)(e),h.wI.favouriteOffers=[],[]}}return h.wI.favouriteOffers.includes("loading")&&await new Promise((e=>{document.addEventListener(x.J,e,{once:!0})})),h.wI.favouriteOffers}disconnect(){this.closeReactModal()}}}
1,72199(e,t,s){s.d(t,{J:()=>i});const i="favouritesListFetched"},78207(e,t,s){s.d(t,{A:()=>d});var i=s(95455),a=s(12846),n=s.n(a),r=s(27384),o=s(10715),l=s(52537),c=s(7995);class d extends i.xI{leavePageModalId="inv-leave-page-modal";leavePageModalOpen="is-opened";cookieLeavePageModalDisabled="leave_info_modal_disabled";cookieLeavePageModalTimestamp="leave_info_modal_timestamp";initialize(){this.leavingPage=this.leavingPage.bind(this),this.handleClose=this.handleClose.bind(this);const e=new Date,t=new Date(e.getTime()+7e4);n().set(this.cookieLeavePageModalTimestamp,e.toLocaleString(),{path:"/",expires:t}),document.documentElement.addEventListener("mouseleave",this.leavingPage)}leavingPage(e){n().get(this.cookieLeavePageModalTimestamp)||"true"===n().get(this.cookieLeavePageModalDisabled)||null!=document.querySelector(".b-modal.is-opened .b-modal__image")||(setTimeout((()=>{e.preventDefault();const t=document.getElementById(this.leavePageModalId);if(t&&!(0,r.nB)(t,this.leavePageModalOpen)){const e=(0,l.QJ)({size:this.data.get("size"),notDismissable:!!this.data.get("notdismissable"),modifier:this.data.get("modifier"),containsMap:"false",paddingSize:"",dataId:this.element.id});let t;const s=document.getElementById(this.leavePageModalId);s&&(t=s.innerHTML),(0,c.vX)(document.body,{id:`#${this.leavePageModalId}`,content:s.innerHTML}),s.innerHTML="",(0,l.Yg)({wrapper:e,headerContent:this.data.get("header-content")||"",title:"",content:t,notDismissable:!!this.data.get("notdismissable"),triggerElement:this.element})}}),500),document.body.addEventListener("inviaModalClose",this.handleClose),document.documentElement.removeEventListener("mouseleave",this.leavingPage))}handleClose=e=>{e?.detail?.modalId===this.leavePageModalId&&(n().set(this.cookieLeavePageModalDisabled,"true",{domain:(0,o.R)(),expires:30}),document.body.removeEventListener("inviaModalClose",this.handleClose))}}},90428(e,t,s){s.r(t),s.d(t,{default:()=>d});var i=s(95455),a=s(92860),n=s(91930),r=s(43336),o=s(52537),l=s(17741),c=s(64046);class d extends i.xI{reactRoot=null;modalContainer=null;open=async e=>{e.preventDefault(),e.stopPropagation();const t=void 0;await(0,l.ug)()===l.wC.On?this.openReactModal():await this.openTwigModal()};openReactModal(){this.reactRoot||(this.modalContainer=document.createElement("div"),this.modalContainer.id="react-auth-modal-root",document.body.appendChild(this.modalContainer),this.reactRoot=(0,n.H)(this.modalContainer),this.reactRoot.render(a.createElement(c.w,{onClose:this.closeReactModal.bind(this),registrationUrl:this.data.get("registration-href")})))}closeReactModal(){this.reactRoot&&this.modalContainer&&(this.reactRoot.unmount(),this.reactRoot=null,this.modalContainer.remove(),this.modalContainer=null)}openTwigModal=async()=>{const e=this.data.get("title")||"",t=(0,o.QJ)({size:"xs",paddingSize:this.data.get("paddingsize"),notDismissable:!!this.data.get("notdismissable"),containsMap:this.data.get("containsmap"),containsFooter:!!this.data.get("containsfooter")}),s=this.data.get("href"),i=await fetch(s,{method:"GET",headers:{"content-type":"application/json","X-Modal":"true"},mode:"no-cors"}),a=new r.Ay(await i.json());(0,o.Yg)({wrapper:t,headerContent:this.data.get("header-content")||"",title:e,content:a.html,notDismissable:!!this.data.get("notdismissable"),triggerEvent:this.data.get("trigger"),triggerElement:this.element})};disconnect(){this.closeReactModal()}}},70926(e,t,s){s.r(t),s.d(t,{default:()=>o});var i=s(95455),a=s(43336),n=s(52537),r=s(7995);class o extends i.xI{open=async e=>{e.preventDefault(),e.stopPropagation();const t=void 0;let s=this.data.get("href")||e.currentTarget.getAttribute("href")||e.currentTarget.dataset?.href;!s||s.startsWith("http")||s.startsWith("//")||(s=new URL(s,window.location.href).href);const i=this.data.get("type"),o=this.data.get("fix-position"),l=this.data.get("title")||"",c=this.data.get("id")||"";let d;const u=(0,n.QJ)({size:this.data.get("size"),paddingSize:this.data.get("paddingsize"),notDismissable:null!==this.data.get("notdismissable"),containsMap:this.data.get("containsmap"),containsFooter:!!this.data.get("containsfooter"),modifier:this.data.get("modifier"),dataId:c}),h=e=>{const t=document.createElement("iframe");return t.allowFullscreen=!0,t.width="560",t.height="315",t.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",t.src=e,t.style.border="none",t};if(o&&document.body.classList.add("modal-fix-height"),"inline"===i){const e=s&&s.split("#")[1],t=document.getElementById(e);t&&(d=t.innerHTML),(0,r.vX)(document.body,{id:s,content:t.innerHTML}),t.innerHTML=""}else if("ajax"===i){const e=await fetch(s,{headers:{"X-Modal":"true"}});if("json"===this.data.get("format")){const t=void 0;d=new a.Ay(await e.json()).html}else d=await e.text();this.data.get("contentwrapper")&&(d=`<div class="${this.data.get("contentwrapper")}">${d}</div>`)}else if("youtube"===i){const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(watch\?))\??v?=?([^#&?]*).*/,t=s.match(e),i=void 0,a=void 0,n=void 0;d=`<div class="b-video__holder--youtube">${h(`https://www.youtube.com/embed/${!(!t||!t[6]||11!=t[6].length)&&t[6]}?autoplay=1&autohide=1&fs=1&rel=0&hd=1&wmode=transparent&enablejsapi=1&html5=1`).outerHTML}</div>`}(0,n.Yg)({wrapper:u,headerContent:this.data.get("header-content")||"",title:l,content:d,notDismissable:null!==this.data.get("notdismissable"),triggerEvent:this.data.get("trigger"),triggerElement:this.element,hasBareTemplate:"true"==this.data.get("hasbaretemplate")})}}}
1,5404(e,t,s){s.d(t,{A:()=>B});var i=s(95455),a=s(92860),n=s(91930),r=s(84312),o=s(64060),l=s(94450),c=s(10974),d=s(34119),u=s(31055),h=s(91280),m=s(95853),p=s(10662),g=s(93426),f=s(12868),v=s(49865);const _=()=>"undefined"!=typeof window&&l.wI&&"number"==typeof l.wI.domainId?l.wI.domainId:0,b=()=>_()===l.WI.InviaCz,y=()=>_()===l.WI.TravelplanetPl,x=()=>_()===l.WI.InviaSk,w=()=>_()===l.WI.InviaHu,T=()=>_()===l.WI.WakacyjniPiraciPl,k=()=>b()?"CZ":x()?"SK":y()||T()?"PL":w()?"HU":"CZ";var C=s(85452);const S=async(e,t)=>{const s=await C.Ay.post("/customer/callback/create",{json:e,signal:t,throwHttpErrors:!1}),i=await s.json();return{status:s.status,data:i,ok:s.ok}},E=function(){let{onSuccess:e,onError:t,messageTimeout:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[i,n]=(0,a.useState)(!1),[r,l]=(0,a.useState)(!1),[c,d]=(0,a.useState)("success"),[u,h]=(0,a.useState)(""),m=(0,a.useRef)(null);(0,a.useEffect)((()=>()=>{m?.current&&m.current.abort()}),[]);const p=void 0;return{submitRequest:async(i,a)=>{n(!0);try{m.current=new AbortController;const n=await S(i,m.current.signal);n.ok?(d("success"),h(n.data.message),l(!0),e&&e(n.data.message),a&&s&&setTimeout((()=>{l(!1),a()}),s)):(d("error"),h(n.data.message||""),l(!0),t&&t(new Error(n.data.message)))}catch(e){if("AbortError"===e.name)return;if(m?.current?.signal?.aborted)return;(0,o.Cp)(e),d("error"),h("An unexpected error occurred"),l(!0),t&&t(e)}finally{n(!1),a&&s&&setTimeout((()=>{l(!1)}),s)}},isSubmitting:i,showMessage:r,setShowMessage:l,messageType:c,messageText:u}};var L=s(38048);const I=e=>{let{show:t,onClose:s}=e;const i="popup-callback-form",{submitRequest:n,isSubmitting:r,showMessage:o,setShowMessage:l,messageType:_,messageText:b}=E(),x=y(),[w,T]=(0,a.useState)(""),[C,S]=(0,a.useState)(!0),[I,A]=(0,a.useState)(!1),j=k(),N=()=>A((e=>!e)),O=async e=>{if(l(!1),e.preventDefault(),!C)return;const t={phoneNumber:w,gdprAgreement:!x||I};await n(t,s)};return(0,L.jsx)(c.Iy,{heading:(0,v.T)("popup_callback_arrange_phone_call"),show:t,showHeading:!0,size:"md",footer:(0,L.jsx)("p",{className:"u-text-center u-mb-0",children:(0,L.jsx)(d.$n,{label:(0,v.T)("popup_callback_call_me"),variant:"main",form:"popup-callback-form",type:"submit",loading:r})}),autofocusChildSelector:`#${i} input`,onClickOutside:s,onEscPress:s,onClose:s,children:(0,L.jsxs)(L.Fragment,{children:[o&&(0,L.jsx)(p.Q,{type:_,message:b,modifier:"u-mx-auto",iconName:"success"===_?f.LZ.tickCircle:f.LZ.alertCircle,dismissible:!0,onClose:()=>l(!1)}),(0,L.jsx)("div",{className:"u-color-light-alpha u-pt-sm u-pb-xs",children:(0,v.T)("popup_callback_operator_callback_leave_number_business_hours")}),(0,L.jsx)("form",{id:i,className:"f-order",onSubmit:O,children:(0,L.jsx)("div",{className:"u-mb-xs",children:(0,L.jsxs)("div",{className:"grid grid--x-xs",children:[(0,L.jsx)("div",{className:"grid__cell size--6-12@sm",children:(0,L.jsx)(u.A,{name:"phone",label:(0,v.T)("phone"),defaultCountryCode:j,required:!0,value:w,onChange:e=>{T(e)},onValidationChange:e=>{S(e)}})}),(0,L.jsxs)("div",{className:"grid__cell",children:[x&&(0,L.jsx)(h.v,{name:"agree-checkbox",cssWrapper:"u-mb-xs u-color-light-alpha i-checkbox--font-md",value:"",required:!0,label:(0,v.T)("popup_callback_of_legal_condition_agreement"),labelId:"label-id-01",checkboxId:"checkbox-id-01",checked:I,onChange:N}),(0,L.jsxs)("p",{className:"u-mb-0 u-color-light-alpha "+(x?"":"u-mt-xxs"),children:[(0,L.jsx)(g.U,{icon:f.LZ.shieldCheck,wrapperClass:"u-color-gray-300 u-mr-xxxs"}),(0,L.jsx)(m.s,{id:"popup_callback_click_confirm_information_clause",values:{link:(0,L.jsx)("a",{href:(0,v.T)("popup_callback_information_clause_url"),children:(0,v.T)("popup_callback_information_clause")})}})]})]})]})})})]})})};var A=s(87387);const j=(e,t,s)=>{t.forEach((t=>{e.addEventListener(t,s)}))},N=(e,t,s)=>{t.forEach((t=>{e.removeEventListener(t,s)}))};class O{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.defaults={idle:1e4,events:["mousemove","scroll","keydown","mousedown","touchstart"],onIdle:null,onActive:null,onHide:null,onShow:null,keepTracking:!0,startAtIdle:!1,recurIdleCall:!1},Object.keys(e).length&&this.throwOnBadKey(Object.keys(e),Object.keys(this.defaults)),this.settings=Object.assign({},this.defaults,e),this.visibilityEvents=["visibilitychange","webkitvisibilitychange","mozvisibilitychange","msvisibilitychange"],this.clearTimeout=null,this.reset(),this.stopListener=()=>{this.stop()},this.idlenessEventsHandler=()=>{this.idle&&(this.idle=!1,this.settings.onActive&&this.settings.onActive()),this.resetIdleTimeout()},this.visibilityEventsHandler=()=>{document.hidden?this.visible&&(this.visible=!1,this.settings.onHide&&this.settings.onHide()):this.visible||(this.visible=!0,this.settings.onShow&&this.settings.onShow())}}resetIdleTimeout(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.settings.keepTracking;this.clearTimeout&&(this.clearTimeout(),this.clearTimeout=null),e&&this.setupIdleTimeout()}setupIdleTimeout(){const e=this.settings.recurIdleCall?{set:setInterval.bind(window),clear:clearInterval.bind(window)}:{set:setTimeout.bind(window),clear:clearTimeout.bind(window)},t=e.set((()=>{this.idle=!0,this.settings.onIdle&&this.settings.onIdle()}),this.settings.idle);this.clearTimeout=()=>e.clear(t)}start(){return window.addEventListener("idle:stop",this.stopListener),this.setupIdleTimeout(),j(window,this.settings.events,this.idlenessEventsHandler),(this.settings.onShow||this.settings.onHide)&&j(document,this.visibilityEvents,this.visibilityEventsHandler),this}stop(){return window.removeEventListener("idle:stop",this.stopListener),N(window,this.settings.events,this.idlenessEventsHandler),this.resetIdleTimeout(!1),(this.settings.onShow||this.settings.onHide)&&N(document,this.visibilityEvents,this.visibilityEventsHandler),this}reset(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.idle=void 0!==e.idle?e.idle:!!this.settings.startAtIdle,this.visible=void 0!==e.visible?e.visible:!this.settings.startAtIdle,this}throwOnBadKey(e,t){e.forEach((function(e){if(!t.includes(e))throw`set: Unknown key ${e}`}))}set(e){this.throwOnBadKey(Object.keys(e),Object.keys(this.defaults)),this.settings=Object.assign({},this.settings,e)}}const P=(e,t)=>{let s=!1,i,a;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];s?(clearTimeout(i),i=setTimeout((()=>{Date.now()-a>=t&&(e.apply(this,r),a=Date.now())}),t-(Date.now()-a))):(e.apply(this,r),a=Date.now(),s=!0,setTimeout((()=>{s=!1}),t))}};class R{defaults={throttleDelay:100,trackWhenHidden:!1,trackedElements:"",trackedRegions:[],onElementEnter:()=>{},onElementLeave:()=>{},onRegionEnter:()=>{},onRegionLeave:()=>{},onMove:()=>{},trackVelocity:!1,velocityThreshold:50,onVelocityChange:()=>{},usePassiveEvents:!0};position={x:0,y:0};velocity={x:0,y:0};lastMoveTime=0;lastPosition=null;active=!1;currentElements=(()=>new Set)();currentRegions=(()=>new Set)();constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={...this.defaults,...e},this.throttledMouseMoveHandler=P(this.handleMouseMove.bind(this),this.config.throttleDelay),this.visibilityChangeHandler=this.handleVisibilityChange.bind(this)}start(){return this.active||(this.active=!0,document.hidden&&!this.config.trackWhenHidden||document.addEventListener("mousemove",this.throttledMouseMoveHandler,{passive:this.config.usePassiveEvents}),document.addEventListener("visibilitychange",this.visibilityChangeHandler),this.config.trackVelocity&&(this.lastPosition=null,this.lastMoveTime=0,this.velocity={x:0,y:0})),this}stop(){return this.active?(document.removeEventListener("mousemove",this.throttledMouseMoveHandler,{passive:this.config.usePassiveEvents}),document.removeEventListener("visibilitychange",this.visibilityChangeHandler),this.currentElements.clear(),this.currentRegions.clear(),this.active=!1,this):this}updateConfig(e){const t=this.active;return t&&this.stop(),this.config={...this.config,...e},void 0!==e.throttleDelay&&(this.throttledMouseMoveHandler=P(this.handleMouseMove.bind(this),this.config.throttleDelay)),t&&this.start(),this}getPosition(){return{...this.position}}
1isInRegion(e){return this.checkRegion(e,this.position)}isOnTrackedElement(){return this.currentElements.size>0}isInTrackedRegion(){return this.currentRegions.size>0}isNearTopEdge(e){return this.position.y<=e}handleMouseMove(e){if(this.position={x:e.clientX,y:e.clientY},this.config.trackVelocity){const t=Date.now();if(this.lastPosition&&this.lastMoveTime){const s=t-this.lastMoveTime;if(s>0&&s>=this.config.velocityThreshold){const t=e.clientX-this.lastPosition.x,i=e.clientY-this.lastPosition.y;0===t&&0===i||(this.velocity={x:t/s*100,y:i/s*100},this.config.onVelocityChange(this.velocity))}}this.lastPosition={x:e.clientX,y:e.clientY},this.lastMoveTime=t}this.config.onMove(this.position,e),this.config.trackedElements&&this.checkElements(e),this.config.trackedRegions.length>0&&this.checkRegions(e)}handleVisibilityChange(){this.active&&(document.hidden&&!this.config.trackWhenHidden?document.removeEventListener("mousemove",this.throttledMouseMoveHandler):document.hidden||(document.removeEventListener("mousemove",this.throttledMouseMoveHandler),document.addEventListener("mousemove",this.throttledMouseMoveHandler)))}checkElements(e){const t=document.elementsFromPoint(e.clientX,e.clientY),s=Array.from(t).filter((e=>e.matches(this.config.trackedElements))),i=new Set(s);i.forEach((t=>{this.currentElements.has(t)||this.config.onElementEnter(t,e)})),this.currentElements.forEach((t=>{i.has(t)||this.config.onElementLeave(t,e)})),this.currentElements=i}checkRegions(e){const t={x:e.clientX,y:e.clientY},s=new Set;this.config.trackedRegions.forEach((i=>{this.checkRegion(i,t)?(s.add(i),this.currentRegions.has(i)||this.config.onRegionEnter(i,e)):this.currentRegions.has(i)&&this.config.onRegionLeave(i,e)})),this.currentRegions=s}checkRegion(e,t){const{top:s,left:i}=e,a=e.bottom??(void 0!==e.height?s+e.height:window.innerHeight),n=e.right??(void 0!==e.width?i+e.width:window.innerWidth);return t.y>=s&&t.y<=a&&t.x>=i&&t.x<=n}}const D=(e,t)=>{const s={top:0,left:0,height:e,width:window.innerWidth};return new R({throttleDelay:100,trackedRegions:[s],onRegionEnter:(e,s)=>{t({x:s.clientX,y:s.clientY},s)}})};class M{defaultOptions={keyPrefix:"",cleanupOnUnload:!1};changeHandlers=(()=>new Map)();isListening=!1;managedKeys=(()=>new Set)();constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options={...this.defaultOptions,...e},this.boundCleanup=this.cleanup.bind(this),this.setupEventListener(),this.options.cleanupOnUnload&&window.addEventListener("unload",this.boundCleanup)}setupEventListener(){this.isListening||(window.addEventListener("storage",(e=>{if(e.key&&this.isPrefixedKey(e.key)){const t=this.removePrefix(e.key);this.notifyChangeHandlers(t,e.newValue,e.oldValue)}})),this.isListening=!0)}addPrefix(e){return this.options.keyPrefix?`${this.options.keyPrefix}_${e}`:e}removePrefix(e){if(!this.options.keyPrefix)return e;const t=`${this.options.keyPrefix}_`;return e.startsWith(t)?e.substring(t.length):e}isPrefixedKey(e){return!this.options.keyPrefix||e.startsWith(`${this.options.keyPrefix}_`)}setValue(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.addPrefix(e),a=localStorage.getItem(i);if(this.managedKeys.add(e),localStorage.setItem(i,t),s.expireAfter){const e=Date.now()+s.expireAfter;localStorage.setItem(`${i}_expires`,e.toString())}return!1===s.broadcast||this.notifyChangeHandlers(e,t,a),this}getValue(e){const t=this.addPrefix(e),s=localStorage.getItem(`${t}_expires`);if(s){const t=parseInt(s,10);if(Date.now()>t)return this.removeValue(e),null}return localStorage.getItem(t)}removeValue(e){const t=this.addPrefix(e),s=localStorage.getItem(t);return localStorage.removeItem(t),localStorage.removeItem(`${t}_expires`),this.managedKeys.delete(e),this.notifyChangeHandlers(e,null,s),this}onChange(e,t){return this.changeHandlers.has(e)||this.changeHandlers.set(e,new Set),this.changeHandlers.get(e)?.add(t),this}offChange(e,t){return this.changeHandlers.get(e)?.delete(t),0===this.changeHandlers.get(e)?.size&&this.changeHandlers.delete(e),this}notifyChangeHandlers(e,t,s){const i=this.changeHandlers.get(e);
1i&&i.forEach((i=>{try{i(e,t,s)}catch(t){console.error(`Error in storage change handler for key "${e}":`,t)}}))}hasValue(e){return null!==this.getValue(e)}cleanup(){return this.managedKeys.forEach((e=>{this.removeValue(e)})),this.changeHandlers.clear(),this}disconnect(){let e;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.cleanup(),this.options.cleanupOnUnload&&window.removeEventListener("unload",this.boundCleanup)}}const H=()=>{try{const e="__test_storage__";localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t}catch(e){return!1}},F=e=>new M({keyPrefix:e});class B extends i.xI{cookieCallbackModalShown="callback_modal_shown_session";sessionLastActivityKey="session_last_activity";static INACTIVITY_THRESHOLD=6e4;static TOP_EDGE_THRESHOLD=40;static STORAGE_UPDATE_THRESHOLD=1e3;static SESSION_TIMEOUT=36e5;static MODAL_CHECK_INTERVAL=1e3;idleTracker=null;cursorTracker=null;isTabActive=!0;lastStorageUpdateTime=0;modalCheckIntervalId=null;wasModalActive=!1;mouseVelocity={x:0,y:0};initialize(){if(this.showCallbackModal=this.showCallbackModal.bind(this),this.handleUserIdle=this.handleUserIdle.bind(this),this.handleUserActive=this.handleUserActive.bind(this),this.handleTopEdgeEnter=this.handleTopEdgeEnter.bind(this),this.handleStorageChange=this.handleStorageChange.bind(this),!H())return void console.warn("LocalStorage is not available. Cross-tab synchronization will be disabled.");const e=l.wI.domain.replace(/\./g,"_");this.storageManager=new M({keyPrefix:`popup_callback_${e}`,cleanupOnUnload:!1}),this.checkSessionState(),this.isModalShown()||(this.storageManager.onChange(this.cookieCallbackModalShown,this.handleStorageChange),this.initializeIdleTracker(),this.initializeCursorTracker(),this.startModalStateCheck())}checkSessionState(){if(!this.storageManager)return;const e=this.storageManager.getValue(this.sessionLastActivityKey);if(e){const t=void 0;if(Date.now()-parseInt(e,10)>B.SESSION_TIMEOUT)return this.storageManager.removeValue(this.cookieCallbackModalShown),void this.storageManager.removeValue(this.sessionLastActivityKey)}this.storageManager.setValue(this.sessionLastActivityKey,Date.now().toString())}disconnect(){this.idleTracker&&(this.idleTracker.stop(),this.idleTracker=null),this.cursorTracker&&(this.cursorTracker.stop(),this.cursorTracker=null),this.storageManager&&this.storageManager.offChange(this.cookieCallbackModalShown,this.handleStorageChange),this.stopModalStateCheck()}isModalShown(){return!!this.storageManager&&this.storageManager.hasValue(this.cookieCallbackModalShown)}setModalShown(){this.storageManager&&this.storageManager.setValue(this.cookieCallbackModalShown,"true")}handleStorageChange(e,t){e===this.cookieCallbackModalShown&&"true"===t&&(this.idleTracker&&(this.idleTracker.stop(),this.idleTracker=null),this.cursorTracker&&(this.cursorTracker.stop(),this.cursorTracker=null))}initializeIdleTracker(){this.idleTracker=new O({idle:B.INACTIVITY_THRESHOLD,events:["mousedown","keydown","touchstart"],onIdle:()=>{this.handleUserIdle()},onActive:()=>{this.handleUserActive()},onHide:()=>{this.isTabActive=!1,this.cursorTracker&&this.cursorTracker.stop()},onShow:()=>{if(this.isTabActive=!0,this.storageManager){const e=this.storageManager.getValue(this.sessionLastActivityKey);if(e){const t=void 0;Date.now()-parseInt(e,10)>=B.INACTIVITY_THRESHOLD&&this.handleUserIdle()}}},keepTracking:!0,startAtIdle:!1}),this.idleTracker.start(),this.storageManager&&this.storageManager.setValue(this.sessionLastActivityKey,Date.now().toString())}initializeCursorTracker(){const e={top:0,left:0,height:B.TOP_EDGE_THRESHOLD,width:window.innerWidth};this.cursorTracker=new R({throttleDelay:100,trackedRegions:[e],trackVelocity:!0,velocityThreshold:50,usePassiveEvents:!0,onRegionEnter:()=>{this.isLikelyLeavingPage()&&this.handleTopEdgeEnter()},onMove:e=>{e.y<=B.TOP_EDGE_THRESHOLD&&this.isLikelyLeavingPage()&&this.handleTopEdgeEnter()},onVelocityChange:e=>{this.mouseVelocity=e},trackWhenHidden:!1}),this.cursorTracker&&this.isTabActive&&this.cursorTracker.start()}isLikelyLeavingPage(){return this.mouseVelocity.y<-5}handleUserActive(){const e=Date.now();!this.isModalShown()&&this.storageManager&&e-this.lastStorageUpdateTime>=B.STORAGE_UPDATE_THRESHOLD&&(this.storageManager.setValue(this.sessionLastActivityKey,e.toString()),this.lastStorageUpdateTime=e)}handleUserIdle(){if(!this.isModalShown()&&this.isTabActive&&(this.checkConditionsAndShow(),this.cursorTracker&&this.isTabActive)){this.cursorTracker.start();const e=void 0;this.cursorTracker.getPosition().y<=B.TOP_EDGE_THRESHOLD&&this.mouseVelocity.y<0&&this.handleTopEdgeEnter()}}handleTopEdgeEnter(){this.checkConditionsAndShow()}checkConditionsAndShow(){this.isModalShown()||this.isTabActive&&((0,r.y0)()||this.showCallbackModal())}showCallbackModal(){this.setModalShown(),this.idleTracker&&(this.idleTracker.stop(),this.idleTracker=null),this.cursorTracker&&(this.cursorTracker.stop(),this.cursorTracker=null);const e=document.createElement("div");e.id="callback-modal-container",document.body.appendChild(e);const t=(0,n.H)(e);t.render((0,L.jsx)(I,{show:!0,onClose:()=>{t.unmount(),e.remove()}}))}startModalStateCheck(){null===this.modalCheckIntervalId&&(this.wasModalActive=(0,r.y0)(),this.wasModalActive&&this.pauseTrackers(),this.modalCheckIntervalId=window.setInterval((()=>this.checkModalStateAndManageTrackers()),B.MODAL_CHECK_INTERVAL))}stopModalStateCheck(){null!==this.modalCheckIntervalId&&(window.clearInterval(this.modalCheckIntervalId),this.modalCheckIntervalId=null)}checkModalStateAndManageTrackers(){const e=(0,r.y0)();e!==this.wasModalActive&&(this.wasModalActive=e,e?this.pauseTrackers():this.resumeTrackers())}pauseTrackers(){this.idleTracker&&this.idleTracker.stop(),this.cursorTracker&&this.cursorTracker.stop(),(0,o.aO)("Trackers paused due to active modal")}resumeTrackers(){!this.isModalShown()&&this.isTabActive&&(this.idleTracker&&this.idleTracker.start(),this.cursorTracker&&this.cursorTracker.start(),(0,o.aO)("Trackers resumed after modal closed"))}}},19295(e,t,s){s.r(t),s.d(t,{default:()=>r});var i=s(95455);const a="scroll-down",n=".typeform-share-wrap";class r extends i.xI{cookieName="surveyTypeformClosed";connect(){const e=document.querySelector(n),t=document.body,s=void 0;new MutationObserver((s=>
1{s.forEach((s=>{if("class"===s.attributeName){const s=void 0;t.classList.contains(a)?e.style.display="block":e.style.display="none"}}))})).observe(t,{attributes:!0})}close(e){e.preventDefault(),e.stopPropagation();const t=document.domain.match(/[a-z0-9-]+\.[a-z0-9-]+$/);let s;s=t?"."+t[0]:document.domain;const i=new Date;i.setTime(i.getTime()+6048e5);const a=`expires=${i.toUTCString()}`;document.cookie=`${this.cookieName}=1; ${a}; path=/; domain=${s}`,this.element.style.opacity="0",this.element.addEventListener("transitionend",(()=>this.element.remove()))}}},62853(e,t,s){s.d(t,{A:()=>o});var i=s(95455),a=s(64060),n=s(64457),r=s(72860);class o extends i.xI{static values=(()=>({formName:String,formStep:String,pageType:String,clickText:String}))();track(e){if(!this.hasFormNameValue)return void(0,a.OP)(`consent-checkbox-tracking: missing required data-value form-name at ${window.location.pathname}`);const t=e.target;t instanceof HTMLInputElement&&"checkbox"===t.type&&(0,n.B)({event:"form_click",form_name:this.formNameValue,form_step:this.formStepValue,click_type:t.checked?"a:_checkbox":"d:_checkbox",click_text:this.clickTextValue,click_name:"consent_marketing",button_state:"active",button_error:"no_error",page_type:this.resolvePageType()})}resolvePageType(){return this.hasPageTypeValue&&""!==this.pageTypeValue?this.pageTypeValue:(0,r.u1)()}}},22073(e,t,s){s.r(t),s.d(t,{default:()=>r});var i=s(95455),a=s(47662),n=s(78315);class r extends i.xI{scroll(e){e.preventDefault();const t=e.currentTarget.getAttribute("href").replace("#",""),s=(0,a.$X)(t)[0];(0,n.PA)(s)}}},71056(e,t,s){s.d(t,{D:()=>i});const i=(e,t)=>t<=0?e:e.replace(/_offers:_\d*$/,`_offers:_${t}`)},72860(e,t,s){s.d(t,{UB:()=>a,gj:()=>l,lN:()=>o,u1:()=>n});var i=s(33258);const a={HOMEPAGE:"homepage",SERP:"serp",HOTEL_DETAIL:"hotel_detail",TOUR_DETAIL:"tour_detail",UNKNOWN:"unknown"},n=()=>{const e=(0,i.M)().toLowerCase();switch(e){case a.HOMEPAGE:case a.SERP:case a.HOTEL_DETAIL:case a.TOUR_DETAIL:return e;default:return a.UNKNOWN}},r=e=>n()===e,o=()=>r(a.HOTEL_DETAIL),l=()=>o()?a.HOTEL_DETAIL:a.TOUR_DETAIL},51440(e,t,s){s.d(t,{R:()=>o});const i="csrf-token",a=10,n=/^[-_a-zA-Z0-9]{4,22}$/,r=/^[-_/+a-zA-Z0-9]{24,}$/;class o{static generate(){const e=new Uint8Array(18),t=window.crypto||window.msCrypto;if(!t||!t.getRandomValues)throw new Error("Web Crypto API not available");t.getRandomValues(e);const s=btoa(String.fromCharCode.apply(null,Array.from(e)));if(!r.test(s))throw new Error("Generated CSRF token has invalid format");return this.setCsrfCookie(s),s}static setCsrfCookie(e){const t=new Date;t.setTime(t.getTime()+1e4);const s=`${i}_${e}=${i}; expires=${t.toUTCString()}; path=/; samesite=strict`,a="https:"===window.location.protocol?`__Host-${s}; secure`:s;document.cookie=a}
1static processFormField(e){const t=e.getAttribute("data-csrf-protection-cookie-value");let s=e.value;!t&&n.test(s)?(e.setAttribute("data-csrf-protection-cookie-value",s),s=this.generate(),e.value=s):t&&r.test(s)&&this.setCsrfCookie(s)}}},54134(e,t,s){s.d(t,{Jt:()=>r,X0:()=>d,hZ:()=>o});var i=s(28853);let a=null;async function n(){return null===a&&(a=(0,i.P2)("dataQualityLog",1,{upgrade(e){e.createObjectStore("offerSeenOnSerp"),e.createObjectStore("offerLoggedOnTd")}})),a}async function r(e,t){const s=await(await n()).get(e,t);return void 0===s?null:Number.isInteger(s?.expiryTimestamp)&&s.expiryTimestamp<Date.now()?(await l(e,t),null):s.value}async function o(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const a={expiryTimestamp:Number.isInteger(i)?Date.now()+1e3*i:null,value:s};return(await n()).put(e,a,t)}async function l(e,t){return(await n()).delete(e,t)}async function c(e){return(await n()).clear(e)}async function d(e){const t=await u(e),s=Date.now();for(const i of t){const t=await r(e,i);null!==t&&t.expiryTimestamp<s&&await l(e,i)}}async function u(e){return(await n()).getAllKeys(e)}},64905(e,t,s){s.d(t,{aZ:()=>l,l:()=>c,n4:()=>u,sD:()=>h});var i=s(11870),a=s.n(i),n=s(54134);const r=7200;function o(e){return a()(e)}async function l(e,t,s){const i={total:s,unit:t??null};await(0,n.hZ)("offerSeenOnSerp",o(e),i,r)}async function c(e){await(0,n.hZ)("offerLoggedOnTd",o(e),{},r)}function d(e){try{if(new URL(document.referrer).origin!==window.location.origin)return null;const t=new URLSearchParams(window.location.search);if(""===e||t.get("s_offer_id")!==e)return null;const s=Number(t.get("c_price_group")),i=Number(t.get("c_price_unit"));return!Number.isFinite(s)||s<=0?null:{total:s,unit:Number.isFinite(i)&&i>0?i:null}}catch{return null}}async function u(e){return await(0,n.Jt)("offerSeenOnSerp",o(e))??d(e)}async function h(e){const t=o(e),s=void 0;if(null!==await(0,n.Jt)("offerLoggedOnTd",t))return!1;const i=void 0;return null!==await(0,n.Jt)("offerSeenOnSerp",t)||null!==d(e)}},60482(e,t,s){function i(e,t){let s=document.querySelector(`[data-modal--favourite-modal-offer-id="${e}"]`);if(!s){const t=document.querySelectorAll('[data-controller*="modal--favourite-modal"][data-modal--favourite-modal-offer-data]');for(const i of t){const t=i.getAttribute("data-modal--favourite-modal-offer-data");if(t)try{const a=void 0;if(JSON.parse(t).offerId===e){s=i;break}}catch(e){}}}if(!s)return void console.warn(`[Favourites] Could not find favorite button for offer ID: ${e}`);if(t){const e=t.getControllerForElementAndIdentifier(s,"modal--favourite-modal");if(e&&"function"==typeof e.open)return void e.open(new Event("click"))}const i=new Event("click",{bubbles:!0,cancelable:!0});s.dispatchEvent(i)}s.d(t,{Q:()=>i})},30875(e,t,s){s.d(t,{aN:()=>r,pP:()=>i});const i="keyboard-focus",a="keyboard-focus-enabled",n=()=>{const e=window;return e.__inviaFocusModalityState||(e.__inviaFocusModalityState={initialized:!1,keyboardFocusClasses:new Set([i])}),e.__inviaFocusModalityState},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=document.documentElement,s=n(),r=e.keyboardFocusClasses?.length?e.keyboardFocusClasses:[i],o=Array.from(s.keyboardFocusClasses).some((e=>t.classList.contains(e)));if(r.forEach((e=>s.keyboardFocusClasses.add(e))),t.classList.add(a),s.initialized)return void(o&&r.forEach((e=>t.classList.add(e))));s.initialized=!0;const l=()=>{s.keyboardFocusClasses.forEach((e=>t.classList.remove(e)))},c=e=>{"Tab"===e.key&&s.keyboardFocusClasses.forEach((e=>t.classList.add(e)))};document.addEventListener("keydown",c,!0),document.addEventListener("pointerdown",l,!0),document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0)}},17486(e,t,s){s.d(t,{Bz:()=>m,aM:()=>h,cA:()=>g,f0:()=>d,it:()=>r});var i=s(87387),a=s.n(i),n=s(64060);const r={LISTING:"listing",HOMEPAGE:"homepage",CONFIGURATOR:"configurator",HOTEL:"hotel",OFFER:"offer",DIRECT:"direct"},o="ga4_records",l=36e5,c=()=>`${Date.now()}_${Math.random().toString(36).substr(2,9)}`,d=e=>{const t=e.toLowerCase();return t.includes("term picker")?r.CONFIGURATOR:t.includes("homepage")||t.includes("home page")?r.HOMEPAGE:t.includes("hotel detail")?r.HOTEL:t.includes("tour detail")?r.OFFER:t.includes("search")||t.includes("result")||t.includes("serp")||t.includes("boxes")?r.LISTING:void 0},u=()=>{try{if("undefined"==typeof localStorage)return[];const e=localStorage.getItem(o);return e?JSON.parse(e):[]}catch(e){return(0,n.yA)("[GA4_STORAGE] Error reading from localStorage:",e),[]}},h=(e,t,s)=>{try{if("undefined"==typeof localStorage)return;const i=c(),a=u(),n={hotelId:e,itemListName:t,navigationSource:s??d(t),timestamp:Date.now(),sessionId:i};a.push(n);const r=a.filter((e=>Date.now()-e.timestamp<l));localStorage.setItem(o,JSON.stringify(r))}catch(e){(0,n.yA)("[GA4_STORAGE] Error saving to localStorage:",e)}},m=e=>{try{if("undefined"==typeof localStorage)return null;const t=void 0,s=u().filter((t=>t.hotelId===e));if(0===s.length)return null;const i=s[s.length-1];return{itemListName:i.itemListName,navigationSource:i.navigationSource??d(i.itemListName)}}catch(e){return(0,n.yA)("[GA4_STORAGE] Error reading from localStorage:",e),null}},p=e=>m(e)?.itemListName??"",g=()=>{try{if("undefined"==typeof localStorage)return;const e=u(),t=e.filter((e=>Date.now()-e.timestamp<l));t.length!==e.length&&localStorage.setItem(o,JSON.stringify(t))}catch(e){(0,n.yA)("[GA4_STORAGE] Error during cleanup:",e)}},f=()=>u();"undefined"!=typeof window&&(window.getGa4ItemListName=p)},83880(e,t,s){s.d(t,{$b:()=>m,RB:()=>p,fT:()=>d});var i=s(87387),a=s.n(i),n=s(64060),r=s(46667);const o="ga4_serp_click_context",l=36e5,c=50,d="data-page--search--serp-offer-id-storage-offer-id-value",u=e=>{if(!e||"object"!=typeof e||Array.isArray(e))return!1;const{keys:t,timestamp:s,item:i}=e;return Array.isArray(t)&&t.every((e=>"string"==typeof e))&&"number"==typeof s&&!!i&&"object"==typeof i&&!Array.isArray(i)},h=()=>{try{if("undefined"==typeof localStorage)return[];const e=localStorage.getItem(o);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(u).filter((e=>Date.now()-e.timestamp<l)):[]}catch(e){return(0,n.yA)("[GA4_SERP_CLICK_CONTEXT] Error reading from localStorage:",e),[]}},m=e=>{try{if("undefined"==typeof localStorage)return;const t=e.offerJwt?.trim()??"",s=(0,r.fL)(e.item);if(""===t||s.includes(t)||s.push(t),0===s.length)return;const i=h();i.push({keys:s,filters:e.filters,sortContext:e.sortContext,item:e.item,timestamp:Date.now()}),localStorage.setItem(o,JSON.stringify(i.slice(-50)))}catch(e){(0,n.yA)("[GA4_SERP_CLICK_CONTEXT] Error saving to localStorage:",e)}},p=function(){try{for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const i=t.map((e=>"string"==typeof e?e.trim():"")).filter((e=>""!==e));if(0===i.length)return null;const a=h();for(let e=a.length-1;e>=0;e--){const t=a[e];if(t.keys.some((e=>i.includes(e))))return{filters:t.filters,sortContext:t.sortContext,item:t.item}}return null}catch(e){return(0,n.yA)("[GA4_SERP_CLICK_CONTEXT] Error reading from localStorage:",e),null}}},94042(e,t,s){s.d(t,{Cu:()=>h,K_:()=>d,P3:()=>u});var i=s(64060);const a="ga4_serp_filters_last",n=36e5,r=e=>Object.keys(e).length>0,o=e=>{if(!e||"object"!=typeof e||Array.isArray(e))return!1;const{canonicalValue:t,localLabel:s}=e;return"string"==typeof t&&""!==t||"string"==typeof s&&""!==s},l=e=>{if(!e)return null;try{const t=JSON.parse(e);return!t||"object"!=typeof t||Array.isArray(t)||"number"!=typeof t.timestamp||"object"!=typeof t.filters||null===t.filters||Array.isArray(t.filters)?null:{filters:t.filters,sortContext:o(t.sortContext)?t.sortContext:null,timestamp:t.timestamp}}catch(e){return(0,i.yA)("[GA4_SERP_FILTERS] Error parsing stored filters:",e),null}},c=()=>{try{if("undefined"==typeof localStorage)return null;const e=l(localStorage.getItem(a));return e?Date.now()-e.timestamp>=n?(localStorage.removeItem(a),null):e:null}catch(e){return(0,i.yA)("[GA4_SERP_FILTERS] Error reading filters:",e),null}},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{if("undefined"==typeof localStorage)return;if(!e||"object"!=typeof e||Array.isArray(e))return;const s=o(t)?t:null;if(!r(e)&&null===s)return;const i={filters:e,sortContext:s,timestamp:Date.now()};localStorage.setItem(a,JSON.stringify(i))}catch(e){(0,i.yA)("[GA4_SERP_FILTERS] Error saving filters:",e)}},u=()=>{const e=c();return e&&r(e.filters)?e.filters:null},h=()=>{const e=c();
1return e&&o(e.sortContext)?e.sortContext:null}},46667(e,t,s){s.d(t,{BV:()=>c,Bx:()=>d,fL:()=>o});var i=s(64060);const a="ga4_serp_items_last",n=36e5,r=e=>"string"==typeof e||"number"==typeof e?String(e).trim():"",o=e=>[e.item_id,e.item_offer_id,e.offer_id,e.offerId,e.s_offer_id].map(r).filter(((e,t,s)=>""!==e&&s.indexOf(e)===t)),l=e=>{if(!e)return null;try{const t=JSON.parse(e);return!t||"object"!=typeof t||Array.isArray(t)?null:"number"==typeof t.timestamp&&t.itemsById&&"object"==typeof t.itemsById?t:null}catch(e){return(0,i.yA)("[GA4_SERP_ITEMS] Error parsing stored items:",e),null}},c=e=>{try{if("undefined"==typeof localStorage||!Array.isArray(e)||0===e.length)return;const t=e.reduce(((e,t)=>{if(!t||"object"!=typeof t||Array.isArray(t))return e;const s=o(t);return 0===s.length||s.forEach((s=>{e[s]=t})),e}),{});if(0===Object.keys(t).length)return;const s={itemsById:t,timestamp:Date.now()};localStorage.setItem(a,JSON.stringify(s))}catch(e){(0,i.yA)("[GA4_SERP_ITEMS] Error saving items:",e)}},d=e=>{try{const t=r(e);if("undefined"==typeof localStorage||""===t)return null;const s=l(localStorage.getItem(a));if(!s)return null;if(Date.now()-s.timestamp>=n)return localStorage.removeItem(a),null;const i=s.itemsById[t];return!i||"object"!=typeof i||Array.isArray(i)?null:i}catch(e){return(0,i.yA)("[GA4_SERP_ITEMS] Error reading items:",e),null}}},99030(e,t,s){s.d(t,{MC:()=>r,Mm:()=>l,_L:()=>o,xt:()=>c});var i=s(87387),a=s.n(i);const n=350,r=()=>{const e=document.documentElement,t=e.getAttribute("data-page_action")??"",s=e.getAttribute("data-page_group")??"";return t.includes("checkout")||s.includes("checkout")},o=()=>{const e=document.querySelector('.modal.is-opened [data-action="modal--close#close"]')??document.querySelector('[data-action="modal--close#close"]');return!!e&&(e.dispatchEvent(new Event("click",{bubbles:!0})),!0)},l=()=>{window.location.reload()},c=()=>{const e=void 0,t=o()?n:0;window.setTimeout((()=>{l()}),t)}},52537(e,t,s){s.d(t,{QJ:()=>p,Yg:()=>g});var i=s(59139),a=s.n(i),n=s(65907),r=s(17272),o=s(49865),l=s(84312);const c=window.styleGuidePage?"Loading":(0,o.T)("loading"),d=()=>`\n\t<div class="loader loader--site loader--blocking site-blocking-loader-example">\n\t\t<div class="loader__loader">\n\t\t\t<div class="u-vhide" role="status" aria-live="assertive">${c}</div>\n\t\t</div>\n\t</div>\n`,u=window.styleGuidePage?"Zavřít":(0,o.T)("close"),h=function(e,t,s,i){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"modal-title",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"modal-content";return`\n\t<div class="modal__bg"${i?' data-action="keyup@document->modal--close#keyUp click->modal--close#close"':""}></div>\n\t<div class="modal__wrap" role="dialog" aria-modal="true" aria-labelledby="${a}" aria-describedby="${r}" tabindex="-1">\n\t\t<div class="modal__header">\n\t\t\t${i?`<button type="button" class="btn btn--link modal__close" data-action="modal--close#close">\n\t\t\t\t\t\t<span class="btn__inner">\n\t\t\t\t\t\t\t${(0,n.U)("cross","modal__close-icon modal__close-icon--cross")}\n\t\t\t\t\t\t\t<span class="u-vhide">\n\t\t\t\t\t\t\t\t${u}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t${(0,n.U)("pointer-left","modal__close-icon modal__close-icon--pointer")}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>`:""}\n\t\t\t\n\t\t\t${e}\n\t\t\t\n\t\t\t<div class="modal__heading" id="${a}">\n\t\t\t\t${t}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="modal__content" id="${r}">\n\t\t\t${s}\n\t\t</div>\n\t</div>\n`},m=(e,t)=>
1`\n\t<div class="modal__bg"${t?' data-action="keyup@document->modal--close#keyUp click->modal--close#close"':""}></div>\n\t<div class="modal__wrap" role="dialog" aria-modal="true" tabindex="-1">\n\t\t\t${e}\n\t</div>\n`,p=e=>{let{size:t,paddingSize:s,notDismissable:i,containsMap:a,containsFooter:n,modifier:o,dataId:c,modalType:u=l.q3.STIMULUS}=e;const h=!!(0,r.Im)(i)||!i,m="true"===a,p=!(0,r.Im)(n),g=document.createElement("div"),f=d(),v=(0,l.Ju)(u);return g.dataset.registeredModalId=v,g.className=`modal${t?` modal--${t}`:""} modal${s?` modal--padding-${s}`:""}${h?" modal--dismiss":""}${m?" modal--map":""}\n\t${p?" modal--w-footer":""} ${o||""}`,g.innerHTML=f,g.dataset.controller="modal--close",g.setAttribute("tabindex","-1"),g.setAttribute("data-no-focus-lock",""),c&&(g.dataset.id=`${c}`),document.body.classList.add("modal-open"),document.body.appendChild(g),setTimeout((()=>{g.classList.add("is-opened"),document.documentElement.classList.add("modal-open")})),g},g=e=>{let{wrapper:t,headerContent:s,title:i,content:n,notDismissable:o,triggerEvent:l,triggerElement:c,hasBareTemplate:d}=e,u=!0;(0,r.Im)(o)||(u=!o);const p=t.dataset.registeredModalId,g=`${p}-title`,f=`${p}-content`;t.innerHTML=d?m(n,u):h(s,i,n,u,g,f);const v=a()(t,{escapeDeactivates:!1,clickOutsideDeactivates:!1,fallbackFocus:t});if(v.activate(),t._focusTrap=v,t.focus(),null!==l){const e=new Event(l);c.dispatchEvent(e)}}},98323(e,t,s){function i(){const e=document.getElementById("js-tour-detail-header-buttons");if(!e)return null;const t=e.getAttribute("data-page--tour-detail--header-buttons-props-value"),s=t?JSON.parse(t):{};return s?.offerData??null}s.d(t,{p:()=>i})},7995(e,t,s){s.d(t,{$d:()=>d,OT:()=>i,PN:()=>u,PV:()=>o,RJ:()=>r,W8:()=>c,io:()=>l,ip:()=>n,vX:()=>m});const i=e=>document.getElementById(e),a=e=>document.getElementById(e),n=e=>document.getElementById(e),r=e=>document.querySelector(e),o=e=>document.querySelector(e),l=e=>document.querySelectorAll(e),c=e=>document.querySelectorAll(e),d=e=>document.getElementsByClassName(e),u=e=>document.getElementsByName(e),h=e=>{for(const t in e.dataset)Object.prototype.hasOwnProperty.call(e.dataset,t)&&(delete e.dataset[t],e.removeAttribute("data-"+t.split(/(?=[A-Z])/).join("-").toLowerCase()))},m=(e,t)=>{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e.dataset[s]=t[s])},p=(e,t)=>{h(e),m(e,t)}},29416(e,t,s){s.d(t,{P:()=>a});var i=s(26544);const a=e=>{const t=document.getElementById("header-top-menu");t&&(e?.customData?.topMenuHtml&&(t.outerHTML=e.customData.topMenuHtml),e?.customData?.emailHash&&(0,i.A)({event:"userLoggedIn",hashedEmail:e.customData.emailHash}),e?.customData?.loginSuccess&&(document.body.classList.remove("login-open"),document.body.classList.add("user-logged-in")))}},64046(e,t,s){s.d(t,{w:()=>X});var i=s(92860),a=s(92128),n=s(77868),r;const o=(0,s(42449).mj)({types:{context:{},events:{}}}).createMachine({context:{},id:"auth-modal-forms",initial:"login-form",states:{"login-form":{on:{"account.restore":{target:"restore-password-form"},"account.create":{target:"create-account-form"},"account.sso":{target:"external-provider"},"account.login":{target:"logged-in"}}},"restore-password-form":{on:{"modal.back":{target:"login-form"}}},"create-account-form":{on:{"modal.back":{target:"login-form"},"account.sso":{target:"external-provider"},"account.login":{target:"logged-in"}}},"external-provider":{type:"final"},"logged-in":{type:"final"}}});var l=s(57585),c=s(60689),d=s(81958),u=s(49865),h=s(94450),m=s(34119),p=s(6249),g=s(71735),f=s(87387),v=s(93426),_=s(5419),b=s(5738),y=s(38048);const x=[{id:"apple",label:"Apple",icon:"apple-colored"},{id:"facebook",label:"Facebook",icon:"facebook-colored"},{id:"google",label:"Google",icon:"google-colored"},{id:"seznam",label:"Seznam",icon:"seznam-colored"}];function w(e){const{onClick:t,availableProviders:s,isLoading:a=!1}=e,[n,r]=(0,i.useState)(null),o=(0,i.useMemo)((()=>x.filter((e=>s.includes(e.id)))),[s]),l=e=>{t?.(e),r(e),window.location.href=`/community/social-login/${e}`};return a||n?(0,y.jsx)("div",{className:"b-social-login-buttons",children:(0,y.jsx)(b.a,{isInline:!0})}):(0,y.jsx)("div",{className:"b-social-login-buttons",children:o.map((e=>{let{id:t,label:s,icon:i}=e;return(0,y.jsxs)(_.m,{events:{click:!1},children:[(0,y.jsx)(_.m.Target,{children:(0,y.jsx)("button",{onClick:()=>l(t),type:"button","aria-describedby":t,className:"b-social-login-buttons__button",children:(0,y.jsx)(v.U,{icon:i,width:24,height:24})})}),(0,y.jsx)(_.m.Content,{id:t,children:`${(0,u.T)("auth_sso_continue_with")} ${s}`})]},t)}))})}function T(e){const{children:t}=e;return(0,y.jsx)("div",{className:"b-login-form__divider","aria-hidden":"true",children:(0,y.jsx)("div",{className:"b-login-form__divider__label",children:t})})}var k=s(10662);const C=()=>h.wI.domainId===h.WI.TravelplanetPl?void 0:"secondary",S=d.Ik({email:d.Yj().min(1,(0,u.T)("required_field")).email({message:(0,u.T)("auth_email_invalid_format")}),password:d.Yj().min(1,(0,u.T)("required_field")).min(8,(0,u.T)("auth_password_min_length"))});function E(e){const{onSubmit:t,onCreateAccount:s,onRestoreAccount:i,isLoading:a=!1,errorMessage:n,availableSsoProviders:r=[],isSsoProvi
1dersLoading:o=!1}=e,d=(0,l.mN)({resolver:(0,c.u)(S)}),{errors:h}=d.formState,f=e=>{t?.(e)};return(0,y.jsxs)("div",{className:"b-login-form",children:[(0,y.jsx)(l.Op,{...d,children:(0,y.jsxs)("form",{onSubmit:d.handleSubmit(f),className:"b-login-form",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{className:"b-login-form__heading h3",children:(0,u.T)("auth_login_form_title")}),(0,y.jsx)("p",{className:"b-login-form__subtitle",children:(0,u.T)("auth_login_form_description")})]}),n&&(0,y.jsx)(k.Q,{type:"error",children:n}),(0,y.jsx)(p.D0,{name:"email",label:(0,u.T)("auth_login_form_email_field_label"),error:h.email?.message,invalid:!!h.email,children:(0,y.jsx)(g.pd,{autoComplete:"email","data-testid":"login-form-email"})}),(0,y.jsx)(p.D0,{name:"password",label:(0,u.T)("auth_login_form_password_field_label"),error:h.password?.message,invalid:!!h.password,children:(0,y.jsx)(g.pd,{type:"password",autoComplete:"current-password","data-testid":"login-form-password"})}),(0,y.jsx)("button",{onClick:i,type:"button",className:"b-login-form__link-btn",children:(0,u.T)("auth_login_form_forgot_password")}),(0,y.jsx)(m.$n,{type:"submit",variant:C(),fullWidth:!0,loading:a,"data-testid":"login-form-submit",children:(0,u.T)("auth_login_form_submit")})]})}),(0,y.jsxs)("p",{className:"b-login-form__text",children:[(0,u.T)("auth_login_form_no_account_text")," ",(0,y.jsx)("button",{onClick:s,type:"button",className:"b-login-form__link-btn",children:(0,u.T)("auth_login_form_create_account")})]}),(o||r.length>0)&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(T,{children:(0,u.T)("auth_login_form_divider")}),(0,y.jsx)("div",{children:(0,y.jsx)("p",{className:"b-login-form__text",children:(0,u.T)("auth_legal_disclaimer")})}),(0,y.jsx)(w,{availableProviders:r,isLoading:o})]})]})}var L=s(51882);const I=(0,i.forwardRef)(((e,t)=>{const{children:s,classNames:i,...a}=e,{id:n,field:r}=(0,p.Wd)(),{register:o}=(0,l.xW)();return(0,y.jsxs)("label",{htmlFor:n,className:(0,L.A)("i-form-checkbox",i?.wrapper),children:[(0,y.jsx)("input",{type:"checkbox",ref:t,...r,...a,...o(r.name,{disabled:a.disabled,value:a.value,onChange:a.onChange,onBlur:a.onBlur}),className:(0,L.A)("i-form-checkbox__input",i?.input)}),(0,y.jsx)("span",{className:(0,L.A)("i-form-checkbox__box",i?.box),"aria-hidden":"true",children:(0,y.jsxs)("svg",{className:"i-form-checkbox__box__tick",viewBox:"0 0 22 22",focusable:"false",children:[(0,y.jsx)("path",{d:"M6.2 11.7L8.5 14a1.6 1.6 0 0 0 2.4 0L16 7.1",className:"i-form-checkbox__box__tick--determinate"}),(0,y.jsx)("path",{d:"M6,11 H16",className:"i-form-checkbox__box__tick--indeterminate"})]})}),(0,y.jsx)("span",{className:(0,L.A)(i?.label),children:s})]})}));I.displayName="Checkbox";const A=()=>h.wI.domainId===h.WI.TravelplanetPl?void 0:"secondary",j=d.Ik({email:d.Yj().min(1,(0,u.T)("required_field")).email({message:(0,u.T)("auth_email_invalid_format")}),password:d.Yj().min(1,(0,u.T)("required_field")),phone:d.Yj().min(1,(0,u.T)("required_field")),terms:d.eu(!0,{message:(0,u.T)("required_field")})});function N(e){const{onSubmit:t,onBack:s}=e,i=(0,l.mN)({resolver:(0,c.u)(j)}),{errors:a}=i.formState,n=e=>{t?.(e)};return(0,y.jsxs)("div",{className:"b-login-form",children:[(0,y.jsx)(l.Op,{...i,children:(0,y.jsxs)("form",{onSubmit:i.handleSubmit(n),className:"b-login-form",children:[(0,y.jsxs)("div",{children:[(0,y.jsx)("h2",{className:"b-login-form__heading h3",children:(0,u.T)("auth_register_form_title")}),(0,y.jsx)("p",{className:"b-login-form__subtitle",children:(0,u.T)("auth_register_form_description")})]}),(0,y.jsx)(p.D0,{name:"email",label:(0,u.T)("auth_register_form_email_field_label"),error:a.email?.message,invalid:!!a.email,children:(0,y.jsx)(g.pd,{autoComplete:"email","data-testid":"register-form-email"})}),(0,y.jsx)(p.D0,{name:"password",label:(0,u.T)("auth_register_form_password_field_label"),error:a.password?.message,invalid:!!a.password,children:(0,y.jsx)(g.pd,{type:"password",autoComplete:"current-password","data-testid":"register-form-password"})}),(0,y.jsx)(p.D0,{name:"phone",label:(0,u.T)("auth_register_form_phone_field_label"),error:a.phone?.message,invali
1d:!!a.phone,children:(0,y.jsx)(g.pd,{autoComplete:"tel","data-testid":"register-form-phone"})}),(0,y.jsx)(p.D0,{name:"terms",error:a.terms?.message,invalid:!!a.terms,selfLabeled:!0,children:(0,y.jsx)(I,{"data-testid":"register-form-terms",children:(0,u.T)("auth_register_form_terms_field_label")})}),(0,y.jsx)("p",{className:"b-login-form__text",children:(0,u.T)("auth_legal_disclaimer")}),(0,y.jsx)(m.$n,{type:"submit",variant:A(),fullWidth:!0,"data-testid":"register-form-submit",children:(0,u.T)("auth_register_form_submit")})]})}),(0,y.jsx)(T,{children:(0,u.T)("auth_register_form_divider")}),(0,y.jsx)("div",{children:(0,y.jsxs)("p",{className:"b-login-form__text",children:[(0,u.T)("auth_register_form_back_text")," ",(0,y.jsx)("button",{onClick:s,type:"button",className:"b-login-form__link-btn",children:(0,u.T)("auth_register_form_back_button")})]})})]})}const O=()=>h.wI.domainId===h.WI.TravelplanetPl?void 0:"secondary",P=d.Ik({email:d.Yj().min(1,(0,u.T)("required_field")).email({message:(0,u.T)("auth_email_invalid_format")})});function R(e){const{onSubmit:t,onBack:s,isLoading:i=!1,errorMessage:a,successMessage:n}=e,r=(0,l.mN)({resolver:(0,c.u)(P)}),{errors:o}=r.formState,d=e=>{t?.(e)};return(0,y.jsx)("div",{className:"b-login-form",children:(0,y.jsx)(l.Op,{...r,children:(0,y.jsxs)("form",{onSubmit:r.handleSubmit(d),className:"b-login-form",children:[(0,y.jsx)("h2",{className:"b-login-form__heading h3",children:(0,u.T)("auth_restore_password_title")}),a&&(0,y.jsx)(k.Q,{type:"error",children:a}),n&&(0,y.jsx)(k.Q,{type:"success",children:n}),(0,y.jsx)(p.D0,{name:"email",label:(0,u.T)("auth_restore_password_email_field_label"),error:o.email?.message,invalid:!!o.email,children:(0,y.jsx)(g.pd,{autoComplete:"email",disabled:i,"data-testid":"restore-password-form-email"})}),(0,y.jsxs)("p",{className:"b-login-form__text",children:[(0,u.T)("auth_restore_password_back_text")," ",(0,y.jsx)("button",{onClick:s,type:"button",className:"b-login-form__link-btn",disabled:i,children:(0,u.T)("auth_restore_password_back_button")})]}),(0,y.jsx)(m.$n,{type:"submit",variant:O(),fullWidth:!0,loading:i,disabled:i,"data-testid":"restore-password-form-submit",children:(0,u.T)("auth_restore_password_submit")})]})})})}var D=s(98058);const M=100,H={transition:"opacity 100ms ease-in-out",opacity:0},F={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}};function B(e){const{children:t,...s}=e,a=(0,i.useRef)(null);return(0,y.jsx)(D.Ay,{nodeRef:a,timeout:M,mountOnEnter:!0,unmountOnExit:!0,...s,children:e=>(0,y.jsx)("div",{ref:a,style:{...H,...F[e]},children:t})})}var $=s(10974);const V=!1;function U(e){let{onClose:t,onLogin:s,isLoginLoading:i=!1,loginError:r,onPasswordResetRequest:l,isPasswordResetLoading:c=!1,passwordResetError:d,passwordResetSuccess:u,onClearPasswordResetMessages:h,availableSsoProviders:m,isSsoProvidersLoading:p=!1,registrationUrl:g}=e;const[f,v]=(0,a.zl)(o),_=async e=>{if(s)try{await s(e)}catch(e){}},b=async e=>{if(l)try{await l(e.email)}catch(e){}},x=()=>{h?.(),v({type:"modal.back"})},w=()=>{g&&window.location.assign(g)};return(0,y.jsx)($.Iy,{onClose:t,show:!0,heading:"",onClickOutside:t,onEscPress:t,size:"xs",children:(0,y.jsx)(n.A,{children:f.matches("login-form")?(0,y.jsx)(B,{children:(0,y.jsx)(E,{onSubmit:_,onCreateAccount:w,onRestoreAccount:()=>v({type:"account.restore"}),isLoading:i,errorMessage:r,availableSsoProviders:m,isSsoProvidersLoading:p})},"login-form"):f.matches("create-account-form")?(0,y.jsx)(B,{children:(0,y.jsx)(N,{onSubmit:()=>v({type:"account.sso"}),onBack:()=>v({type:"modal.back"})})},"create-account-form"):f.matches("restore-password-form")?(0,y.jsx)(B,{children:(0,y.jsx)(R,{onSubmit:b,onBack:x,isLoading:c,errorMessage:d,successMessage:u})},"restore-password-form"):null})})}var z=s(51440);class q{constructor(e){this.config=e}requestPasswordReset=async e=>{const t=z.R.generate();if(!t)throw new Error("Failed to generate CSRF token");const s=new URLSearchParams({"reset_password[email]":e,"reset_password[_token]":t});try{const e=await fetch(this.config.loginEndpoint,{method:"POST",body:s,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=await e.json();
1if(t.userMessages&&t.userMessages.length>0){const e=t.userMessages[0];if("error"===e.type)throw new Error(e.text||"Password reset request failed");return{success:!0,message:e.text}}const i=this.parseMessageFromHtml(t.html);if(i){if(!i.success)throw new Error(i.message||"Password reset request failed");return i}throw new Error("Password reset request failed - no response from server")}catch(e){if(e instanceof Error)throw e;throw new Error("Password reset request failed")}};parseMessageFromHtml(e){const t=void 0,s=(new DOMParser).parseFromString(e,"text/html"),i=s.querySelector(".message--success .message__message");if(i)return{success:!0,message:i.textContent?.trim()||"Password reset email sent"};const a=s.querySelector(".message--error .message__message, .message--danger .message__message");return a?{success:!1,message:a.textContent?.trim()||"Password reset failed"}:null}login=async e=>{const t=z.R.generate();if(!t)throw new Error("Failed to generate CSRF token");const s=new URLSearchParams({"login[email]":e.email,"login[password]":e.password,"login[_token]":t});try{const e=await fetch(this.config.loginEndpoint,{method:"POST",body:s,credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=await e.json(),i=void 0;if(!0===t.customData?.loginSuccess)return{success:!0,emailHash:t.customData?.emailHash,topMenuHtml:t.customData?.topMenuHtml,addFavouriteOfferId:t.customData?.addFavouriteOfferId};{const e=this.extractErrorMessage(t);throw new Error(e||"Invalid email or password")}}catch(e){if(e instanceof Error)throw e;throw new Error("Login failed")}};extractErrorMessage(e){if(e.userMessages&&e.userMessages.length>0){const t=e.userMessages.find((e=>"error"===e.type));if(t)return t.text}const t=void 0,s=void 0,i=(new DOMParser).parseFromString(e.html,"text/html").querySelector(".message--error .message__message, .message--danger .message__message");return i?.textContent?.trim()||null}getAvailableSsoProviders=async()=>{try{const e=await fetch("/community/available-sso-providers",{method:"GET",credentials:"include"});if(!e.ok)throw new Error(`HTTP ${e.status}`);const t=void 0;return(await e.json()).providers||[]}catch(e){return console.error("Error fetching available SSO providers:",e),[]}}}var W=s(26544);class G{updateHeaderTopMenu(e){if(!e)return;const t=document.getElementById("header-top-menu");t&&(t.outerHTML=e)}trackLoginSuccess(e){e&&(0,W.A)({event:"userLoggedIn",hashedEmail:e})}updateLoginUIState(){document.body.classList.remove("login-open"),document.body.classList.add("user-logged-in"),document.documentElement.dataset.user_logged_in="1"}notifyLoginSuccess(){document.dispatchEvent(new CustomEvent("userLoggedIn"))}handleLoginSuccess(e,t){this.updateHeaderTopMenu(t),this.trackLoginSuccess(e),this.updateLoginUIState(),this.notifyLoginSuccess()}}var J=s(60482),Y=s(99030);function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{onSuccess:s,onError:a,onSettled:n}=t,[r,o]=(0,i.useState)(null),[l,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(null),h=(0,i.useRef)(!0),m=(0,i.useCallback)((async t=>{c(!0),u(null);try{const i=await e(t);h.current&&(o(i),u(null),s?.(i,t),n?.(i,null,t))}catch(e){if(h.current){const s=e instanceof Error?e:new Error("An error occurred");u(s),a?.(s,t),n?.(null,s,t)}}finally{h.current&&c(!1)}}),[e,s,a,n]),p=void 0;return{data:r,isLoading:l,error:d,isError:!!d,isSuccess:!d&&null!==r,mutate:m,reset:(0,i.useCallback)((()=>{o(null),u(null),c(!1)}),[])}}function Q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{enabled:s=!0,refetchOnMount:a=!0,onSuccess:n,onError:r}=t,[o,l]=(0,i.useState)(null),[c,d]=(0,i.useState)(!1),[u,h]=(0,i.useState)(null),m=(0,i.useRef)(!0),p=(0,i.useRef)(null),g=(0,i.useCallback)((async()=>{if(s){p.current&&p.current.abort(),p.current=new AbortController,d(!0),h(null);try{const t=await e({signal:p.current.signal});m.current&&(l(t),h(null),n?.(t))}catch(e){if("AbortError"!==e.name&&m.current){const t=e instanceof Error?e:new Error("An error occurred");h(t),r?.(t)}}finally{m.current&&d(!1)}}}),[e,s,n,r]);(0,i.useEffect)((()=>(m.current=!0,s&&a&&g(),()=>{m.current=!1,p.current&&p.current.abort()})),[g,s,a]);const f=void 0;return{data:o,isLoading:c,error:u,isError:!!u,isSuccess:!u&&null!==o,refetch:(0,i.useCallback)((()=>g()),[g])}}const Z=new G;function X(e){let{onClose:t,registrationUrl:s,addFavouriteOfferId:a}=e;const n=a?`/community/ajax-login-form/${a}`:"/community/ajax-login-form",r=(0,i.useMemo)((()=>new q({loginEndpoint:n})),[n]),{data:o,isLoading:l}=Q(r.getAvailableSsoProviders),{data:c,mutate:d,isLoading:u,error:h,reset:m}=K(r.requestPasswordReset),{mutate:p,isLoading:g,error:f}=K(r.login,{onSuccess:e=>{Z.handleLoginSuccess(e.emailHash,e.topMenuHtml);const s=a||e.addFavouriteOfferId;if(s)return(0,J.Q)(s),void t();t(),(0,Y.MC)()&&window.setTimeout((()=>{(0,Y.Mm)()}),350)},onError:e=>{console.error("Login failed:",e.message)}}),v=async e=>{await p(e)},_=async e=>{m(),await d(e)};return(0,y.jsx)(U,{onClose:t,onLogin:v,isLoginLoading:g,loginError:f?.message,onPasswordResetRequest:_,isPasswordResetLoading:u,passwordResetError:h?.message,passwordResetSuccess:c?.message,onClearPasswordResetMessages:m,availableSsoProviders:o??[],isSsoProvi
1dersLoading:l,registrationUrl:s})}},65907(e,t,s){s.d(t,{U:()=>i});const i=(e,t)=>{const s=void 0;return`\n\t\t<span class="icon-svg icon-svg--${e} ${t||""}">\n\t\t\t<svg class="icon-svg__svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t\t<use xlink:href="${window.styleGuidePage?"../":"/assets/invia2020/"}img/bg/icons-svg.svg#icon-${e}" x="0" y="0" width="100%" height="100%"></use>\n\t\t\t</svg>\n\t\t</span>\n\t`}},78315(e,t,s){s.d(t,{$J:()=>c,F1:()=>r,PA:()=>l,cc:()=>o,er:()=>n,su:()=>d});var i=s(77335);const a=(e,t,s)=>{e.addEventListener(t,(function i(a){return e.removeEventListener(t,i),s(a)}))},n=e=>window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout((()=>{e()}),16),r=()=>void 0!==window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0,o=(e,t)=>{window.scrollTo({top:e,behavior:t<=0?"instant":"smooth"})},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;n((()=>{let s=e.getBoundingClientRect().top+r();const a=document.querySelector(".b-navigation-bar"),n=document.querySelector(".fixed-bar"),l=document.querySelector(".m-anchor"),c=20;l&&a&&(0,i.$_)("mdDown")?s-=a.offsetHeight+l.offsetHeight+c:a&&(0,i.$_)("mdDown")?s-=a.offsetHeight:n&&(0,i.$_)("mdUp")?s-=n.offsetHeight:l&&(0,i.$_)("mdUp")&&(s-=l.offsetHeight+c),o(s,t)}))},c=function(e){return e.replace(/<\/?[^>]+(>|$)/g,"")},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.replace(/(?:\r\n\t|\r|\n|\t)/g,t)}}}]);
2//# sourceMappingURL=common.5812ddf91fe0631bca53.js.map

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.