hubs-travel-js 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (()=>{var ee=Object.create;var F=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ne=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var M=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var se=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of oe(t))!re.call(e,n)&&n!==o&&F(e,n,{get:()=>t[n],enumerable:!(i=te(t,n))||i.enumerable});return e};var ie=(e,t,o)=>(o=e!=null?ee(ne(e)):{},se(t||!e||!e.__esModule?F(o,"default",{value:e,enumerable:!0}):o,e));function V(e){let t=document.querySelectorAll(".room-price-data"),o=Array.from(t).map(i=>JSON.parse(i.textContent));return e?o.filter(i=>i.editionSlug===e):o}function T(e,t){return!e||!t?0:Math.floor((t-e)/(1e3*60*60*24*30))}function w(e,t){return new Intl.NumberFormat("de-DE",{style:"currency",currency:t,currencyDisplay:"code"}).format(e)}var N=M(()=>{});function U(){document.querySelectorAll("[data-trigger]").forEach(o=>{o.addEventListener("change",()=>t(o)),t(o)});function t(o){let i=o.getAttribute("data-trigger"),n=o.value;document.querySelectorAll(`[data-condition-trigger="${i}"]`).forEach(s=>{let d=s.getAttribute("data-condition-value")===n,a=s.matches("input, select, textarea")?s:s.querySelector("input, select, textarea");s.style.display=d?"block":"none",a&&(a.required=d,d||(a.value=""))})}}function z(){document.querySelectorAll("[data-custom-dropdown]").forEach(e=>{let t=document.createElement("input");t.type="hidden",t.name=e.dataset.name||"custom-dropdown",t.setAttribute("required",e.dataset.required==="true"||!1),t.value="",e.appendChild(t);let o=e.querySelector(".dropdown-selected-value");e.querySelectorAll(".dropdown-item").forEach(n=>{n.addEventListener("click",c=>{c.preventDefault();let s=n.dataset.value,d=n.cloneNode(!0);d.style.padding=0,o.innerHTML="",o.appendChild(d),t.value=s})})})}function O(e,t,o=30){let i=document.querySelector(e),n=document.querySelector(t),c=new DateRangePicker(i,{format:"dd. MM yyyy"}),s=o;return c.setMinimumDays=d=>{s=d},c.validateDateRange=()=>{let[d,a]=c.getDates();d&&a&&Math.floor((a-d)/864e5)<s?(n.setCustomValidity(`You need to choose a minimum of ${s} days.`),c.setDates(d,new Date(d.getTime()+s*24*60*60*1e3))):n.setCustomValidity(""),n.reportValidity()},i.addEventListener("changeDate",c.validateDateRange),{rangepicker:c,datesInput:i,startDateField:n}}function W(){let e=document.querySelectorAll(".form-step"),t=document.querySelectorAll(".form-wizard-step .form-wizard-step-progress"),o=0;function i(a){e.forEach((l,r)=>{l.style.display=r===a?"block":"none"}),t.forEach((l,r)=>{r<a||r===a?l.classList.add("active"):l.classList.remove("active")})}function n(){let a=e[o].querySelectorAll("input, select, textarea"),l=[];return a.forEach(r=>{let m=r.type==="hidden"||r.offsetParent===null;if(r.required&&(!r.value||r.value.trim()==="")){let y=r.dataset.name||r.name||r.placeholder||"Unnamed field";l.push(`${y} is required.`)}if(!m&&r.value&&!r.checkValidity()){let p=r.name||r.placeholder||"Unnamed field";l.push(`${p} is invalid.`)}}),l}function c(a,l){let r=document.querySelector(a);if(!r)return;r.innerHTML="";let m=document.createElement("ul");l.forEach(p=>{let y=document.createElement("li");y.textContent=p,m.appendChild(y)}),r.appendChild(m)}function s(a){let l=document.querySelector(a);l&&(l.innerHTML="")}document.querySelectorAll(".form-next-step-btn").forEach(a=>{a.addEventListener("click",()=>{if(a.getAttribute("disabled")==="true")return;let l=n(),r=`#error-list-step-${o}`;s(r),l.length==0?(o=Math.min(o+1,e.length-1),o===e.length-1&&d(),i(o)):c(r,l)})});function d(){document.querySelectorAll('[id^="review-"]').forEach(l=>{let r=l.dataset.fieldname;try{let m=document.querySelector(`[name="${r}"]`).value;l.innerText=m}catch{}})}document.querySelectorAll(".form-previous-step-btn").forEach(a=>{a.addEventListener("click",()=>{o=Math.max(o-1,0),i(o)})}),i(o)}var _=M(()=>{});function j(){document.getElementById("close-button").addEventListener("click",function(){let e=document.referrer,t=window.location.hostname,o=null;try{o=e?new URL(e).hostname:null}catch{o=null}window.history.length>1&&o===t?window.history.back():window.location.href="/"})}var J=M(()=>{});var Y=H(()=>{N();_();J();var h="EUR",$=null;document.addEventListener("DOMContentLoaded",function(){j(),U(),W(),z(),$=O("#dates-start-end-group","#Start-Date"),ae(),le(),de(),ce(),ue()});function ce(){let e=new URLSearchParams(window.location.search),t=e.get("destination"),o=e.get("edition"),i=e.get("room"),n=e.get("guests");t&&I("#destination-dropdown",t,"data-destinationslug");let c=o&&I("#edition-dropdown",o,"data-editionslug");if(i&&I("#room-dropdown",i,"data-roomslug"),n){let s=document.getElementById("Guests");s&&(s.value=n)}if(c){let s=c.dataset.startdate,d=c.dataset.enddate,a=$.rangepicker;a.setOptions({minDate:s,maxDate:d}),a.setDates(s,d)}}function ae(){let e=document.querySelector("#destination-dropdown"),t=document.querySelector("#edition-dropdown"),o=t.querySelector(".dropdown-selected-value"),i=o.innerHTML,n=document.querySelector("#room-dropdown"),c=n.querySelector(".dropdown-selected-value"),s=e.querySelectorAll(".dropdown-item"),d=t.querySelectorAll(".dropdown-item"),a=n.querySelectorAll(".dropdown-item");function l(r,m){o.setAttribute("disabled",r===""?"true":"false"),c.setAttribute("disabled",r===""?"true":"false"),o.innerHTML=i,c.innerHTML=i,h=m,[...d,...a].forEach(p=>{let y=p.dataset.destinationslug===r;p.style.display=y?"flex":"none"})}l("",h),s.forEach(r=>{r.addEventListener("click",function(){l(this.dataset.destinationslug,this.dataset.currency)})})}function I(e,t,o){let i=document.querySelectorAll(`${e} .dropdown-item`),n=i&&Array.from(i).find(c=>c.getAttribute(o)===t);return n&&n.click(),n}function le(){let t=document.querySelector("#edition-dropdown").querySelectorAll(".dropdown-item"),o=document.querySelector("#dates-start-end-group");function i(n,c){let s=o.rangepicker;s.setOptions({minDate:n,maxDate:c}),s.setDates(n,c)}t.forEach(n=>{n.addEventListener("click",function(){i(this.dataset.startdate,this.dataset.enddate)})})}function de(){document.querySelector("#dates-start-end-group").addEventListener("changeDate",()=>{A(),Q()}),document.querySelector("#room-dropdown").querySelectorAll(".dropdown-item").forEach(n=>{n.addEventListener("click",()=>{A();let c=n.getAttribute("data-allow-weekly-booking"),s=$.rangepicker;s.setMinimumDays(c==="Enabled"?7:30),s.validateDateRange()})}),document.querySelector("#Guests").addEventListener("change",()=>{A()})}function ue(){Q(),A()}function Q(){let t=document.querySelector("#dates-start-end-group").rangepicker,o=document.querySelector(".discount-info-blue"),i=document.querySelector(".discount-info-green"),[n,c]=t.getDates(),s=T(n,c);!n||!c||s<=2?(o.style.display="flex",i.style.display="none"):(o.style.display="none",i.style.display="flex")}function A(){let e=document.querySelectorAll(".price-info-card"),o=document.querySelector("#dates-start-end-group").rangepicker,i=document.querySelector("#destination-dropdown .dropdown-selected-value .dropdown-item"),n=document.querySelector("#edition-dropdown .dropdown-selected-value .dropdown-item"),c=document.querySelector("#room-dropdown .dropdown-selected-value .dropdown-item"),s=document.querySelector("#Guests"),d=i?i.dataset.destinationslug:"",a=n?n.dataset.editionslug:"",l=c?c.dataset.roomslug:"",r=c?c.getAttribute("data-allow-weekly-booking")==="Enabled":!1,[m,p]=o.getDates(),y=s?parseInt(s.value):0;if(d&&a&&l&&m&&p&&y>0){let D=V();e.forEach(f=>{f.style.display="flex",me(f,D,a,l,m,p,y,r)});let E={day:"numeric",month:"short",year:"numeric"},v=m.toLocaleDateString("en-GB",{day:"numeric",month:"short"}).replace(",",""),q=p.toLocaleDateString("en-GB",E).replace(",","");document.querySelectorAll(".total-dates").forEach(f=>f.innerHTML=`${v} - ${q}`)}else e.forEach(D=>D.style.display="none")}function me(e,t,o,i,n,c,s,d){let a=T(n,c),l=e.querySelector(".room-price"),r=e.querySelector(".room-price-discount"),m=e.querySelector(".room-price-month-desc"),p=e.querySelector(".total-guests"),y=e.querySelector(".total-totalprice"),D=y.firstElementChild,E=e.querySelector(".room-price-breakdown"),v=e.querySelector(".total-dates"),q=document.querySelector("#form-next-step-btn-step-1"),f=q.querySelector("a"),k=t.find(u=>u.editionSlug===o&&u.roomSlug===i),C=e.querySelectorAll(".price-info-card-title"),R=document.querySelector('[name="Total-Price"]');if(!k){E.innerText="No room price found for the selected season or room.",y.style.display="none",l.style.display="none",r.style.display="none",p.parentElement.style.display="none",v.style.display="none",m.style.display="none",f.style.pointerEvents="none",f.style.backgroundColor="var(--_colors---light-silver)",f.style.opacity=.3,q.setAttribute("disabled",!0),C.forEach(u=>u.style.display="none"),R.value=0;return}y.style.display="block",l.style.display="block",p.parentElement.style.display="flex",v.style.display="block",m.style.display="block",f.style.pointerEvents="auto",f.style.backgroundColor="var(--_colors---primary)",f.style.opacity=1,q.setAttribute("disabled",!1),C.forEach(u=>u.style.display="block");let b=k.basePriceMonth,K=k.discountMonth2,X=k.discountMonth3,S=0,x=[],G=0,Z=u=>u===1?"st":u===2?"nd":u===3?"rd":"th";if(a<1&&d){let u=b/30*7*s;r.style.display="none",l.innerText=`${w(u,h)}`,m.innerText="per week"}else a>=1&&(S+=b*s,x.push(`Month 1: ${w(S,h)}`),r.style.display="none",l.innerText=`${w(S,h)}`,m.innerText="1st month");for(let u=2;u<=a;u++){let g=0;u===2?g=K:u>=3&&(g=X);let P=b*(1-g/100)*s;S+=P,x.push(`Month ${u}: ${w(P,h)}`);let B=u<=3?`${u}${Z(u)} month`:"from 3rd month";g>0&&(r.innerText=`${g.toFixed(1)}% discount - ${B}`,r.style.display="flex"),l.innerHTML=`${w(P,h)}`,m.innerText=B,G=g}let L=(c-n)/(1e3*60*60*24)-a*30;if(L>0){let g=b*(1-G/100)/30*L*s;S+=g,x.push(`${a>=1?"+":""} ${Math.round(L)} days: ${w(g,h)}`)}E.innerHTML=x.join("<br>"),p.innerText=`${s} x Person`,D.innerText=`${w(S,h)}`,R.value=`${w(S,h)}`}});var pe=H(()=>{var ve=ie(Y())});pe();})();
1
+ (()=>{var oe=Object.create;var H=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var I=(e,t)=>()=>(e&&(t=e(e=0)),t);var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ce=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of re(t))!ie.call(e,n)&&n!==o&&H(e,n,{get:()=>t[n],enumerable:!(s=ne(t,n))||s.enumerable});return e};var ae=(e,t,o)=>(o=e!=null?oe(se(e)):{},ce(t||!e||!e.__esModule?H(o,"default",{value:e,enumerable:!0}):o,e));function V(e){let t=document.querySelectorAll(".room-price-data"),o=Array.from(t).map(s=>JSON.parse(s.textContent));return e?o.filter(s=>s.editionSlug===e):o}function $(e,t){return!e||!t?0:Math.floor((t-e)/(1e3*60*60*24*30))}function h(e,t){return new Intl.NumberFormat("de-DE",{style:"currency",currency:t,currencyDisplay:"code"}).format(e)}function U(e,t=null){return isNaN(parseFloat(e))?t:parseFloat(e)}var W=I(()=>{});function z(){document.querySelectorAll("[data-trigger]").forEach(o=>{o.addEventListener("change",()=>t(o)),t(o)});function t(o){let s=o.getAttribute("data-trigger"),n=o.value;document.querySelectorAll(`[data-condition-trigger="${s}"]`).forEach(a=>{let d=a.getAttribute("data-condition-value")===n,i=a.matches("input, select, textarea")?a:a.querySelector("input, select, textarea");a.style.display=d?"block":"none",i&&(i.required=d,d||(i.value=""))})}}function O(){document.querySelectorAll("[data-custom-dropdown]").forEach(e=>{let t=document.createElement("input");t.type="hidden",t.name=e.dataset.name||"custom-dropdown",t.setAttribute("required",e.dataset.required==="true"||!1),t.value="",e.appendChild(t);let o=e.querySelector(".dropdown-selected-value");e.querySelectorAll(".dropdown-item").forEach(n=>{n.addEventListener("click",c=>{c.preventDefault();let a=n.dataset.value,d=n.cloneNode(!0);d.style.padding=0,o.innerHTML="",o.appendChild(d),t.value=a})})})}function _(e,t,o=30){let s=document.querySelector(e),n=document.querySelector(t),c=new DateRangePicker(s,{format:"dd. MM yyyy"}),a=o;return c.setMinimumDays=d=>{a=d},c.validateDateRange=()=>{let[d,i]=c.getDates();d&&i&&Math.floor((i-d)/864e5)<a?(n.setCustomValidity(`You need to choose a minimum of ${a} days.`),c.setDates(d,new Date(d.getTime()+a*24*60*60*1e3))):n.setCustomValidity(""),n.reportValidity()},s.addEventListener("changeDate",c.validateDateRange),{rangepicker:c,datesInput:s,startDateField:n}}function j(){let e=document.querySelectorAll(".form-step"),t=document.querySelectorAll(".form-wizard-step .form-wizard-step-progress"),o=0;function s(i){e.forEach((l,r)=>{l.style.display=r===i?"block":"none"}),t.forEach((l,r)=>{r<i||r===i?l.classList.add("active"):l.classList.remove("active")})}function n(){let i=e[o].querySelectorAll("input, select, textarea"),l=[];return i.forEach(r=>{let m=r.type==="hidden"||r.offsetParent===null;if(r.required&&(!r.value||r.value.trim()==="")){let y=r.dataset.name||r.name||r.placeholder||"Unnamed field";l.push(`${y} is required.`)}if(!m&&r.value&&!r.checkValidity()){let p=r.name||r.placeholder||"Unnamed field";l.push(`${p} is invalid.`)}}),l}function c(i,l){let r=document.querySelector(i);if(!r)return;r.innerHTML="";let m=document.createElement("ul");l.forEach(p=>{let y=document.createElement("li");y.textContent=p,m.appendChild(y)}),r.appendChild(m)}function a(i){let l=document.querySelector(i);l&&(l.innerHTML="")}document.querySelectorAll(".form-next-step-btn").forEach(i=>{i.addEventListener("click",()=>{if(i.getAttribute("disabled")==="true")return;let l=n(),r=`#error-list-step-${o}`;a(r),l.length==0?(o=Math.min(o+1,e.length-1),o===e.length-1&&d(),s(o)):c(r,l)})});function d(){document.querySelectorAll('[id^="review-"]').forEach(l=>{let r=l.dataset.fieldname;try{let m=document.querySelector(`[name="${r}"]`).value;l.innerText=m}catch{}})}document.querySelectorAll(".form-previous-step-btn").forEach(i=>{i.addEventListener("click",()=>{o=Math.max(o-1,0),s(o)})}),s(o)}var J=I(()=>{});function Q(){document.getElementById("close-button").addEventListener("click",function(){let e=document.referrer,t=window.location.hostname,o=null;try{o=e?new URL(e).hostname:null}catch{o=null}window.history.length>1&&o===t?window.history.back():window.location.href="/"})}var Y=I(()=>{});var X=N(()=>{W();J();Y();var g="EUR",R=null;document.addEventListener("DOMContentLoaded",function(){Q(),z(),j(),O(),R=_("#dates-start-end-group","#Start-Date"),de(),ue(),me(),le(),pe()});function le(){let e=new URLSearchParams(window.location.search),t=e.get("destination"),o=e.get("edition"),s=e.get("room"),n=e.get("guests");t&&C("#destination-dropdown",t,"data-destinationslug");let c=o&&C("#edition-dropdown",o,"data-editionslug");if(s&&C("#room-dropdown",s,"data-roomslug"),n){let a=document.getElementById("Guests");a&&(a.value=n)}if(c){let a=c.dataset.startdate,d=c.dataset.enddate,i=R.rangepicker;i.setOptions({minDate:a,maxDate:d}),i.setDates(a,d)}}function de(){let e=document.querySelector("#destination-dropdown"),t=document.querySelector("#edition-dropdown"),o=t.querySelector(".dropdown-selected-value"),s=o.innerHTML,n=document.querySelector("#room-dropdown"),c=n.querySelector(".dropdown-selected-value"),a=e.querySelectorAll(".dropdown-item"),d=t.querySelectorAll(".dropdown-item"),i=n.querySelectorAll(".dropdown-item");function l(r,m){o.setAttribute("disabled",r===""?"true":"false"),c.setAttribute("disabled",r===""?"true":"false"),o.innerHTML=s,c.innerHTML=s,g=m,[...d,...i].forEach(p=>{let y=p.dataset.destinationslug===r;p.style.display=y?"flex":"none"})}l("",g),a.forEach(r=>{r.addEventListener("click",function(){l(this.dataset.destinationslug,this.dataset.currency)})})}function C(e,t,o){let s=document.querySelectorAll(`${e} .dropdown-item`),n=s&&Array.from(s).find(c=>c.getAttribute(o)===t);return n&&n.click(),n}function ue(){let t=document.querySelector("#edition-dropdown").querySelectorAll(".dropdown-item"),o=document.querySelector("#dates-start-end-group");function s(n,c){let a=o.rangepicker;a.setOptions({minDate:n,maxDate:c}),a.setDates(n,c)}t.forEach(n=>{n.addEventListener("click",function(){s(this.dataset.startdate,this.dataset.enddate)})})}function me(){document.querySelector("#dates-start-end-group").addEventListener("changeDate",()=>{P(),K()}),document.querySelector("#room-dropdown").querySelectorAll(".dropdown-item").forEach(n=>{n.addEventListener("click",()=>{P();let c=n.getAttribute("data-allow-weekly-booking"),a=R.rangepicker;a.setMinimumDays(c==="Enabled"?7:30),a.validateDateRange()})}),document.querySelector("#Guests").addEventListener("change",()=>{P()})}function pe(){K(),P()}function K(){let t=document.querySelector("#dates-start-end-group").rangepicker,o=document.querySelector(".discount-info-blue"),s=document.querySelector(".discount-info-green"),[n,c]=t.getDates(),a=$(n,c);!n||!c||a<=2?(o.style.display="flex",s.style.display="none"):(o.style.display="none",s.style.display="flex")}function P(){let e=document.querySelectorAll(".price-info-card"),o=document.querySelector("#dates-start-end-group").rangepicker,s=document.querySelector("#destination-dropdown .dropdown-selected-value .dropdown-item"),n=document.querySelector("#edition-dropdown .dropdown-selected-value .dropdown-item"),c=document.querySelector("#room-dropdown .dropdown-selected-value .dropdown-item"),a=document.querySelector("#Guests"),d=s?s.dataset.destinationslug:"",i=n?n.dataset.editionslug:"",l=c?c.dataset.roomslug:"",r=c?c.getAttribute("data-allow-weekly-booking")==="Enabled":!1,[m,p]=o.getDates(),y=a?parseInt(a.value):0;if(d&&i&&l&&m&&p&&y>0){let D=V();e.forEach(f=>{f.style.display="flex",ye(f,D,i,l,m,p,y,r)});let k={day:"numeric",month:"short",year:"numeric"},b=m.toLocaleDateString("en-GB",{day:"numeric",month:"short"}).replace(",",""),q=p.toLocaleDateString("en-GB",k).replace(",","");document.querySelectorAll(".total-dates").forEach(f=>f.innerHTML=`${b} - ${q}`)}else e.forEach(D=>D.style.display="none")}function ye(e,t,o,s,n,c,a,d){let i=$(n,c),l=e.querySelector(".room-price"),r=e.querySelector(".room-price-discount"),m=e.querySelector(".room-price-month-desc"),p=e.querySelector(".total-guests"),y=e.querySelector(".total-totalprice"),D=y.firstElementChild,k=e.querySelector(".room-price-breakdown"),b=e.querySelector(".total-dates"),q=document.querySelector("#form-next-step-btn-step-1"),f=q.querySelector("a"),E=t.find(u=>u.editionSlug===o&&u.roomSlug===s),G=e.querySelectorAll(".price-info-card-title"),B=document.querySelector('[name="Total-Price"]');if(!E){k.innerText="No room price found for the selected season or room.",y.style.display="none",l.style.display="none",r.style.display="none",p.parentElement.style.display="none",b.style.display="none",m.style.display="none",f.style.pointerEvents="none",f.style.backgroundColor="var(--_colors---light-silver)",f.style.opacity=.3,q.setAttribute("disabled",!0),G.forEach(u=>u.style.display="none"),B.value=0;return}y.style.display="block",l.style.display="block",p.parentElement.style.display="flex",b.style.display="block",m.style.display="block",f.style.pointerEvents="auto",f.style.backgroundColor="var(--_colors---primary)",f.style.opacity=1,q.setAttribute("disabled",!1),G.forEach(u=>u.style.display="block");let L=U(E.basePriceWeek),M=E.basePriceMonth,Z=E.discountMonth2,ee=E.discountMonth3,S=0,x=[],F=0,te=u=>u===1?"st":u===2?"nd":u===3?"rd":"th";if(i<1&&d&&L){let u=L;r.style.display="none",l.innerText=`${h(u,g)}`,m.innerText="per week"}else i>=1&&(S+=M,x.push(`Month 1: ${h(S,g)}`),r.style.display="none",l.innerText=`${h(S,g)}`,m.innerText="1st month");for(let u=2;u<=i;u++){let w=0;u===2?w=Z:u>=3&&(w=ee);let A=M*(1-w/100);S+=A,x.push(`Month ${u}: ${h(A,g)}`);let v=u<=3?`${u}${te(u)} month`:"from 3rd month";w>0&&(r.innerText=`${w.toFixed(1)}% discount - ${v}`,r.style.display="flex"),l.innerHTML=`${h(A,g)}`,m.innerText=v,F=w}let T=(c-n)/(1e3*60*60*24)-i*30;if(T>0){let u=i>=1?M:L,w=i>=1?30:7,v=u*(1-F/100)/w*T;S+=v,x.push(`${i>=1?"+":""} ${Math.round(T)} days: ${h(v,g)}`)}k.innerHTML=x.join("<br>"),p.innerText=`${a} x Person`,D.innerText=`${h(S,g)}`,B.value=`${h(S,g)}`}});var fe=N(()=>{var be=ae(X())});fe();})();
2
2
  //# sourceMappingURL=bundle-book-workation.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../utils/commonUtils.js", "../utils/formUtils.js", "../utils/close-page.js", "../pages/book-workation/book-workation.js", "../pages/book-workation/index.js"],
4
- "sourcesContent": ["\n// Get all room price data - this is done by a collection list element creating:\n// < script type=\"application/json\" class=\"room-price-data\"> \n// {\n// \"roomSlug\": \"\",\n// \"editionSlug\": \"\",\n// \"basePriceWeek\": ,\n// \"basePriceMonth\": ,\n// \"discountMonth2\": ,\n// \"discountMonth3\":\n// }\n// </ script > \nexport function getAllRoomPrices(editionSlugFilter) {\n const priceElements = document.querySelectorAll('.room-price-data');\n const roomPrices = Array.from(priceElements).map(x => JSON.parse(x.textContent));\n if (!editionSlugFilter) {\n \treturn roomPrices;\n }\n return roomPrices.filter((x) => x.editionSlug === editionSlugFilter)\n}\n\n// calculate month difference while 1 month is always 30 days\nexport function getMonthDifference(startDate, endDate) {\n if (!startDate || !endDate) return 0;\n return Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24 * 30)); \n}\n\nexport function formatPrice(price, currency) {\n\t// That\u2019s the locale for German, which uses the formatting style we\u2019re after. \n // We could also use 'fr-FR', 'it-IT', etc. \u2014 most European locales format this way.\n return new Intl.NumberFormat('de-DE', {\n style: 'currency',\n \tcurrency,\n currencyDisplay: 'code'\n }).format(price);\n}\n", "/**\n * Conditional Form Fields Script (Generic & Reusable)\n *\n * This script enables conditional visibility and required-state for form fields\n * based on trigger inputs (like dropdowns or radios).\n *\n * \u2705 How to use:\n * 1. Add `data-trigger=\"yourTriggerName\"` to the input controlling the logic (e.g. <select> or <input>).\n * 2. Add `data-condition-trigger=\"yourTriggerName\"` to any form field container that should be shown conditionally.\n * 3. Add `data-condition-value=\"triggerValue\"` to define when that field should be visible.\n * 4. Inside the conditional container, set form elements to `required` \u2014 the script toggles this automatically.\n *\n * This allows multiple trigger/condition pairs on the same page without extra JS.\n */\nexport function initConditionalFormFields() {\n const triggers = document.querySelectorAll('[data-trigger]');\n\n triggers.forEach((trigger) => {\n trigger.addEventListener('change', () => updateConditionalFields(trigger));\n updateConditionalFields(trigger); // Run on load\n });\n\n function updateConditionalFields(trigger) {\n const triggerName = trigger.getAttribute('data-trigger');\n const triggerValue = trigger.value;\n\n const conditionals = document.querySelectorAll(`[data-condition-trigger=\"${triggerName}\"]`);\n\n conditionals.forEach((field) => {\n const shouldShow = field.getAttribute('data-condition-value') === triggerValue;\n const input = field.matches('input, select, textarea') ? field : field.querySelector('input, select, textarea');\n\n field.style.display = shouldShow ? 'block' : 'none';\n if (input) {\n input.required = shouldShow;\n if (!shouldShow) input.value = '';\n }\n });\n }\n}\n\n/** This script\n * - loops through all custom dropdowns with \"data-custom-dropdown\" attribute\n * - sets the selected value as selected in the dropdown\n * - creates a hidden input for form data\n * - sets the selected value from \"data-value\" to the hidden input\n **/\nexport function initCustomDropdowns() {\n document.querySelectorAll('[data-custom-dropdown]').forEach((dropdown) => {\n // Create the hidden input\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = dropdown.dataset.name || 'custom-dropdown';\n input.setAttribute('required', dropdown.dataset.required === 'true' || false);\n input.value = ''; // Or set a default value if needed\n\n // Append it to the dropdown or its closest form\n dropdown.appendChild(input);\n\n const toggle = dropdown.querySelector('.dropdown-selected-value');\n const links = dropdown.querySelectorAll('.dropdown-item');\n\n links.forEach((link) => {\n link.addEventListener('click', (e) => {\n e.preventDefault();\n const value = link.dataset.value;\n const content = link.cloneNode(true);\n content.style.padding = 0; //reset paddings from dropdown-item\n\n // Update visual\n toggle.innerHTML = '';\n toggle.appendChild(content);\n\n // Set hidden field\n input.value = value;\n });\n });\n });\n}\n\n\n\n// Setting up daterange-pickers\n// Docs: https://mymth.github.io/vanillajs-datepicker/\nexport function initDateRangePickers(groupSelector, startDateSelector, minimumDays = 30) {\n const datesInput = document.querySelector(groupSelector);\n const startDateField = document.querySelector(startDateSelector);\n const rangepicker = new DateRangePicker(datesInput, {\n format: 'dd. MM yyyy',\n });\n\n // Add an event listener to validate the date range\n let currentMinimumDays = minimumDays;\n\n // Expose a method to update minimumDays dynamically\n rangepicker.setMinimumDays = (days) => {\n currentMinimumDays = days;\n };\n\n rangepicker.validateDateRange = () => {\n const [startDate, endDate] = rangepicker.getDates();\n\n if (startDate && endDate) {\n const differenceInDays = Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24));\n if (differenceInDays < currentMinimumDays) {\n startDateField.setCustomValidity(`You need to choose a minimum of ${currentMinimumDays} days.`);\n // Set end date to {{currentMinimumDays}} days after start date\n rangepicker.setDates(startDate, new Date(startDate.getTime() + currentMinimumDays * 24 * 60 * 60 * 1000)); \n } else {\n startDateField.setCustomValidity('');\n }\n } else {\n startDateField.setCustomValidity('');\n }\n // Trigger form validation\n startDateField.reportValidity();\n }\n\n datesInput.addEventListener('changeDate', rangepicker.validateDateRange);\n\n return { rangepicker, datesInput, startDateField };\n}\n\n\n/**\n * This script is responsible for\n * - the navigation of the multi step field\n * - update of the wizard step indicators\n * - form validation of all form elements of the current step\n **/\nexport function initFormWizardSteps() {\n const steps = document.querySelectorAll('.form-step');\n const stepIndicators = document.querySelectorAll(\n '.form-wizard-step .form-wizard-step-progress'\n );\n let currentStep = 0;\n\n function showStep(index) {\n steps.forEach((step, i) => {\n step.style.display = i === index ? 'block' : 'none';\n });\n\n stepIndicators.forEach((indicator, i) => {\n if (i < index || i === index) {\n indicator.classList.add('active');\n } else {\n indicator.classList.remove('active');\n }\n });\n }\n\n function validateCurrentStep() {\n const currentInputs = steps[currentStep].querySelectorAll('input, select, textarea');\n const errors = [];\n\n currentInputs.forEach((input) => {\n const isHidden = input.type === 'hidden' || input.offsetParent === null;\n\n if (input.required) {\n const isEmpty = !input.value || input.value.trim() === '';\n if (isEmpty) {\n const label = input.dataset.name || input.name || input.placeholder || 'Unnamed field';\n errors.push(`${label} is required.`);\n }\n }\n\n // Custom type validation (e.g., email)\n if (!isHidden && input.value && !input.checkValidity()) {\n const label = input.name || input.placeholder || 'Unnamed field';\n errors.push(`${label} is invalid.`);\n }\n });\n return errors;\n }\n\n function showErrors(containerId, errorMessages) {\n const container = document.querySelector(containerId);\n\n if (!container) return;\n\n // Clear any previous errors\n container.innerHTML = '';\n\n // Create <ul> element\n const ul = document.createElement('ul');\n\n // Add each error as <li>\n errorMessages.forEach((msg) => {\n const li = document.createElement('li');\n li.textContent = msg;\n ul.appendChild(li);\n });\n\n // Append the list to the container\n container.appendChild(ul);\n }\n\n function resetErrors(containerId) {\n const container = document.querySelector(containerId);\n if (container) {\n container.innerHTML = '';\n }\n }\n\n document.querySelectorAll('.form-next-step-btn').forEach((btn) => {\n btn.addEventListener('click', () => {\n if (btn.getAttribute('disabled') === 'true') {\n return;\n }\n\n const errors = validateCurrentStep();\n const errorListId = `#error-list-step-${currentStep}`;\n resetErrors(errorListId);\n if (errors.length == 0) {\n currentStep = Math.min(currentStep + 1, steps.length - 1);\n const isLastStep = currentStep === steps.length - 1;\n if (isLastStep) {\n prepareReviewFields(); // this loops through all fields with #review-* and sets the corresponding value\n }\n showStep(currentStep);\n } else {\n showErrors(errorListId, errors);\n }\n });\n });\n\n function prepareReviewFields() {\n const reviewElements = document.querySelectorAll('[id^=\"review-\"]');\n\n // Loop through the matched elements\n reviewElements.forEach((element) => {\n const fieldName = element.dataset.fieldname;\n try {\n const fieldValue = document.querySelector(`[name=\"${fieldName}\"]`).value;\n element.innerText = fieldValue;\n } catch {}\n });\n }\n\n document.querySelectorAll('.form-previous-step-btn').forEach((btn) => {\n btn.addEventListener('click', () => {\n currentStep = Math.max(currentStep - 1, 0);\n showStep(currentStep);\n });\n });\n\n showStep(currentStep); // Init\n}", "\n/**\n * Initializes a X button on the page with ID \"close-button\":\n * When clicked it tries to receive the previous page\n * - If there was a previous page and that page was on the same domain -> navigate there\n * - If there was no previous page or previous page was not on same domain -> navigate home \"/\"\n */\nexport function initCloseButtonClick() {\n document.getElementById(\"close-button\").addEventListener(\"click\", function () {\n const referrer = document.referrer;\n const currentDomain = window.location.hostname;\n\n // Extract the domain from the referrer URL\n let referrerDomain = null;\n try {\n referrerDomain = referrer ? new URL(referrer).hostname : null;\n } catch (e) {\n referrerDomain = null;\n }\n\n if (window.history.length > 1 && referrerDomain === currentDomain) {\n window.history.back();\n } else {\n window.location.href = \"/\";\n }\n });\n}", "\nimport { getAllRoomPrices, getMonthDifference, formatPrice } from \"../../utils/commonUtils\";\nimport { initConditionalFormFields, initFormWizardSteps, initCustomDropdowns, initDateRangePickers } from \"../../utils/formUtils\";\nimport { initCloseButtonClick } from \"../../utils/close-page\";\n\nlet selectedCurrency = \"EUR\"; // default currency\nlet rangePickerElements = null; // global variable to store the range picker instance\n\ndocument.addEventListener('DOMContentLoaded', function () {\n initCloseButtonClick();\n \n //form preparation\n initConditionalFormFields();\n initFormWizardSteps();\n initCustomDropdowns();\n \n //init controls\n rangePickerElements = initDateRangePickers('#dates-start-end-group', '#Start-Date');\n initDestinationDropdown();\n initSeasonDropDown();\n\n initPriceUpdateListeners();\n\n //set inital form values\n initQueryParamFormValues();\n\n //init info/card boxes on the right side of the form\n initCardInfoBoxes();\n});\n\n\n/**\n * This script handles initial setting of form values that come from query parameters\n **/\nfunction initQueryParamFormValues () {\n const urlParams = new URLSearchParams(window.location.search);\n const queryDestination = urlParams.get('destination');\n const queryEdition = urlParams.get('edition');\n const queryRoom = urlParams.get('room');\n const queryGuestsCount = urlParams.get('guests');\n\n queryDestination &&\n selectDropDownValue('#destination-dropdown', queryDestination, 'data-destinationslug');\n const selectedEdition = queryEdition && selectDropDownValue('#edition-dropdown', queryEdition, 'data-editionslug');\n queryRoom && selectDropDownValue('#room-dropdown', queryRoom, 'data-roomslug');\n\n // Guests dropdown is not a custom dropdown\n if (queryGuestsCount) {\n const guestDropdown = document.getElementById('Guests');\n if (guestDropdown) {\n guestDropdown.value = queryGuestsCount;\n }\n }\n\n if (selectedEdition) {\n const seasonStartDate = selectedEdition.dataset.startdate;\n const seasonEndDate = selectedEdition.dataset.enddate; // TODO: receive length of stay to determine end date\n \n const rangepicker = rangePickerElements.rangepicker;\n rangepicker.setOptions({\n minDate: seasonStartDate,\n maxDate: seasonEndDate,\n });\n rangepicker.setDates(seasonStartDate, seasonEndDate);\n }\n}\n\n\n/**\n * This script handles the dependencies of the destination/location dropdown\n * When destination dropdown value changed:\n * - Update Season/Edition dropdown and show only seasons/editions from the specific location\n * - Update Room dropdown and show only rooms from the specific location\n **/\nfunction initDestinationDropdown() {\n const locationDropdown = document.querySelector('#destination-dropdown');\n\n const editionDropdown = document.querySelector('#edition-dropdown');\n const editionToggle = editionDropdown.querySelector('.dropdown-selected-value');\n const editionPlaceholder = editionToggle.innerHTML;\n\n const roomDropdown = document.querySelector('#room-dropdown');\n const roomToggle = roomDropdown.querySelector('.dropdown-selected-value');\n\n const locationDropdownItems = locationDropdown.querySelectorAll('.dropdown-item');\n const editionDropdownItems = editionDropdown.querySelectorAll('.dropdown-item');\n const roomDropdownItems = roomDropdown.querySelectorAll('.dropdown-item');\n\n function onDestinationChange(selectedDestinationSlug, destinationCurrency) {\n editionToggle.setAttribute('disabled', selectedDestinationSlug === '' ? 'true' : 'false');\n roomToggle.setAttribute('disabled', selectedDestinationSlug === '' ? 'true' : 'false');\n\n // Clear selected edition option\n editionToggle.innerHTML = editionPlaceholder;\n roomToggle.innerHTML = editionPlaceholder;\n\n selectedCurrency = destinationCurrency;\n\n [...editionDropdownItems, ...roomDropdownItems].forEach((item) => {\n const visible = item.dataset.destinationslug === selectedDestinationSlug;\n item.style.display = visible ? 'flex' : 'none';\n });\n }\n\n // Initial population\n onDestinationChange('', selectedCurrency);\n\n // Update on change\n locationDropdownItems.forEach((locationItem) => {\n locationItem.addEventListener('click', function () {\n onDestinationChange(this.dataset.destinationslug, this.dataset.currency);\n });\n });\n}\n\n\nfunction selectDropDownValue(selector, value, dataAttribute) {\n const dropdownItems = document.querySelectorAll(`${selector} .dropdown-item`);\n const item =\n dropdownItems &&\n Array.from(dropdownItems).find((item) => item.getAttribute(dataAttribute) === value);\n item && item.click();\n return item;\n}\n\n\n/**\n * This script handles the dependencies of the season dropdown\n * When season dropdown value changed:\n * - Reset the start and end dates\n * - Set minimum start date to season start date\n * - Set maximum end date to season end date\n **/\nfunction initSeasonDropDown() {\n const editionDropdown = document.querySelector('#edition-dropdown');\n const editionDropdownItems = editionDropdown.querySelectorAll('.dropdown-item');\n\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n\n function onSeasonChange(seasonStartDate, seasonEndDate) {\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n\n rangepicker.setOptions({\n minDate: seasonStartDate,\n maxDate: seasonEndDate,\n });\n rangepicker.setDates(seasonStartDate, seasonEndDate);\n }\n\n // Update on change\n editionDropdownItems.forEach((edition) => {\n edition.addEventListener('click', function () {\n onSeasonChange(this.dataset.startdate, this.dataset.enddate);\n });\n });\n}\n\n/**\n * Initializes event listeners for dropdown and date picker changes on the booking page.\n *\n * - Listens for changes in the start/end date input group and updates price and discount info.\n * - Listens for room selection changes, updates price info, and adjusts the date range picker\n * based on the selected room's weekly booking allowance.\n * - Listens for changes in the guest count dropdown and updates price info accordingly.\n */\nfunction initPriceUpdateListeners() {\n // react on change of start / end date\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n datesInputGroup.addEventListener('changeDate', () => {\n updatePriceInfoCard();\n updateDiscountBoxes();\n });\n\n // react on change of room\n const roomDropdown = document.querySelector('#room-dropdown');\n const roomDropdownItems = roomDropdown.querySelectorAll('.dropdown-item');\n roomDropdownItems.forEach((roomItem) => {\n roomItem.addEventListener('click', () => {\n updatePriceInfoCard();\n\n const allowWeeklyBooking = roomItem.getAttribute('data-allow-weekly-booking');\n // change date range picker to the selected room\n const rangepicker = rangePickerElements.rangepicker;\n rangepicker.setMinimumDays(allowWeeklyBooking === 'Enabled' ? 7 : 30);\n rangepicker.validateDateRange();\n });\n });\n\n //react on guest count change\n const guestsDropdown = document.querySelector('#Guests');\n guestsDropdown.addEventListener('change', () => {\n updatePriceInfoCard();\n });\n}\n\n\n/**\n * This script handles visual and textual changes on the content on top of the image next to the form\n * depending on form values.\n **/\nfunction initCardInfoBoxes() {\n\n //initial setup\n updateDiscountBoxes();\n updatePriceInfoCard();\n\n}\n\n\nfunction updateDiscountBoxes() {\n //reset discount infos\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n \n const discountInfoBlue = document.querySelector('.discount-info-blue');\n const discountInfoGreen = document.querySelector('.discount-info-green');\n\n const [startDate, endDate] = rangepicker.getDates();\n // calculate month difference while 1 month is always 30 days\n const monthDifference = getMonthDifference(startDate, endDate);\n \n if ((!startDate || !endDate) || monthDifference <= 2) {\n discountInfoBlue.style.display = 'flex';\n discountInfoGreen.style.display = 'none';\n } else {\n discountInfoBlue.style.display = 'none';\n discountInfoGreen.style.display = 'flex';\n }\n}\n\n\n//determine if we display the price info card or not\n// only show, if \n// - destination is set\n// - edition is set\n// - room is set\n// - dates are set\n// - (guests are always set)\nfunction updatePriceInfoCard() {\n const priceInfoCards = document.querySelectorAll('.price-info-card');\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n const selectedDestinationItem = document.querySelector('#destination-dropdown .dropdown-selected-value .dropdown-item');\n const selectedEditionItem = document.querySelector('#edition-dropdown .dropdown-selected-value .dropdown-item');\n const selectedRoomItem = document.querySelector('#room-dropdown .dropdown-selected-value .dropdown-item');\n const selectedGuestsItem = document.querySelector('#Guests');\n\n const destinationSlug = selectedDestinationItem ? selectedDestinationItem.dataset.destinationslug : '';\n const editionSlug = selectedEditionItem ? selectedEditionItem.dataset.editionslug : '';\n const roomSlug = selectedRoomItem ? selectedRoomItem.dataset.roomslug : '';\n const allowWeeklyBooking = selectedRoomItem ? selectedRoomItem.getAttribute('data-allow-weekly-booking') === 'Enabled' : false;\n const [startDate, endDate] = rangepicker.getDates(); \n const selectedGuestsCount = selectedGuestsItem ? parseInt(selectedGuestsItem.value) : 0;\n\n if (destinationSlug && editionSlug && roomSlug && startDate && endDate && selectedGuestsCount > 0) {\n const editionRoomPrices = getAllRoomPrices();\n priceInfoCards.forEach(priceInfoCard => { \n priceInfoCard.style.display = 'flex';\n updateRoomPriceAndBreakdown(priceInfoCard, editionRoomPrices, editionSlug, roomSlug, startDate, endDate, selectedGuestsCount, allowWeeklyBooking);\n });\n\n // update dates\n const options = { day: 'numeric', month: 'short', year: 'numeric' };\n const formattedStartDate = startDate.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' }).replace(',', '');\n const formattedEndDate = endDate.toLocaleDateString('en-GB', options).replace(',', '');\n document.querySelectorAll('.total-dates').forEach(x => x.innerHTML = `${formattedStartDate} - ${formattedEndDate}`);\n } else {\n priceInfoCards.forEach(x => x.style.display = 'none');\n }\n}\n\n\n// update room price & breakdown\nfunction updateRoomPriceAndBreakdown(priceInfoCard, editionRoomPrices, editionSlug, roomSlug, startDate, endDate, guestsCount, allowWeeklyBooking) {\n const monthDifference = getMonthDifference(startDate, endDate);\n\n const roomPriceElement = priceInfoCard.querySelector('.room-price');\n const discountBox = priceInfoCard.querySelector('.room-price-discount');\n const roomPriceDescription = priceInfoCard.querySelector('.room-price-month-desc');\n const totalGuestsElement = priceInfoCard.querySelector('.total-guests');\n \n const totalPriceElement = priceInfoCard.querySelector('.total-totalprice');\n const totalPriceText = totalPriceElement.firstElementChild;\n const priceBreakdownElement = priceInfoCard.querySelector('.room-price-breakdown');\n const datesElement = priceInfoCard.querySelector('.total-dates');\n\n const nextButton = document.querySelector('#form-next-step-btn-step-1'); // we have this only one time on the page\n const nextButtonAnchor = nextButton.querySelector('a');\n\n const roomPriceInfo = editionRoomPrices.find((x) => x.editionSlug === editionSlug && x.roomSlug === roomSlug);\n const priceInfoCardTitles = priceInfoCard.querySelectorAll('.price-info-card-title');\n\n const hiddenTotalPriceField = document.querySelector(`[name=\"Total-Price\"]`);\n\n if (!roomPriceInfo) {\n priceBreakdownElement.innerText = 'No room price found for the selected season or room.';\n totalPriceElement.style.display = 'none';\n roomPriceElement.style.display = 'none';\n discountBox.style.display = 'none';\n totalGuestsElement.parentElement.style.display = 'none';\n datesElement.style.display = 'none';\n roomPriceDescription.style.display = 'none';\n nextButtonAnchor.style.pointerEvents = 'none';\n nextButtonAnchor.style.backgroundColor = 'var(--_colors---light-silver)';\n nextButtonAnchor.style.opacity = 0.3;\n nextButton.setAttribute('disabled', true);\n priceInfoCardTitles.forEach(x => x.style.display = 'none');\n hiddenTotalPriceField.value = 0;\n return;\n }\n \n //reset visual elements\n totalPriceElement.style.display = 'block';\n roomPriceElement.style.display = 'block';\n totalGuestsElement.parentElement.style.display = 'flex';\n datesElement.style.display = 'block';\n roomPriceDescription.style.display = 'block';\n nextButtonAnchor.style.pointerEvents = 'auto';\n nextButtonAnchor.style.backgroundColor = 'var(--_colors---primary)';\n nextButtonAnchor.style.opacity = 1;\n nextButton.setAttribute('disabled', false);\n priceInfoCardTitles.forEach(x => x.style.display = 'block');\n\n const basePriceMonth = roomPriceInfo.basePriceMonth;\n const discountMonth2 = roomPriceInfo.discountMonth2;\n const discountMonth3 = roomPriceInfo.discountMonth3;\n\n let totalPrice = 0;\n let breakdown = [];\n let remainingDaysDiscount = 0;\n\n const getMonthNumberEnding = (month) => month === 1 ? 'st' : (month === 2 ? 'nd' : (month === 3 ? 'rd' : 'th'));\n\n if (monthDifference < 1 && allowWeeklyBooking) {\n const weeklyPrice = basePriceMonth / 30 * 7 * guestsCount;\n discountBox.style.display = 'none';\n roomPriceElement.innerText = `${formatPrice(weeklyPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = `per week`;\n } else if (monthDifference >= 1) {\n totalPrice += basePriceMonth * guestsCount;\n breakdown.push(`Month 1: ${formatPrice(totalPrice, selectedCurrency)}`);\n discountBox.style.display = 'none';\n roomPriceElement.innerText = `${formatPrice(totalPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = `1st month`;\n }\n\n for (let month = 2; month <= monthDifference; month++) {\n let discount = 0;\n if (month === 2) {\n discount = discountMonth2;\n } else if (month >= 3) {\n discount = discountMonth3;\n }\n\n const monthlyPrice = basePriceMonth * (1 - discount / 100) * guestsCount;\n totalPrice += monthlyPrice;\n breakdown.push(`Month ${month}: ${formatPrice(monthlyPrice, selectedCurrency)}`);\n\n let monthText = month <= 3 \n ? `${month}${getMonthNumberEnding(month)} month`\n : `from 3rd month`;\n\n if (discount > 0) {\n discountBox.innerText = `${discount.toFixed(1)}% discount - ${monthText}`;\n discountBox.style.display = 'flex';\n }\n\n roomPriceElement.innerHTML = `${formatPrice(monthlyPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = monthText;\n remainingDaysDiscount = discount;\n }\n\n const remainingDays = (endDate - startDate) / (1000 * 60 * 60 * 24) - monthDifference * 30;\n if (remainingDays > 0) {\n const dailyRate = basePriceMonth * (1 - remainingDaysDiscount / 100) / 30;\n const remainingPrice = dailyRate * remainingDays * guestsCount;\n totalPrice += remainingPrice;\n breakdown.push(`${monthDifference >= 1 ? '+' : ''} ${Math.round(remainingDays)} days: ${formatPrice(remainingPrice, selectedCurrency)}`);\n }\n\n priceBreakdownElement.innerHTML = breakdown.join('<br>');\n totalGuestsElement.innerText = `${guestsCount} x Person`;\n totalPriceText.innerText = `${formatPrice(totalPrice, selectedCurrency)}`;\n hiddenTotalPriceField.value = `${formatPrice(totalPrice, selectedCurrency)}`; //setting the value in the hidden field for review and sending in form\n}\n", "import \"./book-workation\";"],
5
- "mappings": "+jBAYO,SAASA,EAAiBC,EAAmB,CAClD,IAAMC,EAAgB,SAAS,iBAAiB,kBAAkB,EAC5DC,EAAa,MAAM,KAAKD,CAAa,EAAE,IAAIE,GAAK,KAAK,MAAMA,EAAE,WAAW,CAAC,EAC/E,OAAKH,EAGEE,EAAW,OAAQC,GAAMA,EAAE,cAAgBH,CAAiB,EAF3DE,CAGV,CAGO,SAASE,EAAmBC,EAAWC,EAAS,CACrD,MAAI,CAACD,GAAa,CAACC,EAAgB,EA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AAC,EAAA,SAAAC,GAAO",
6
- "names": ["getAllRoomPrices", "editionSlugFilter", "priceElements", "roomPrices", "x", "getMonthDifference", "startDate", "endDate", "formatPrice", "price", "currency", "init_commonUtils", "__esmMin", "initConditionalFormFields", "trigger", "updateConditionalFields", "triggerName", "triggerValue", "field", "shouldShow", "input", "initCustomDropdowns", "dropdown", "toggle", "link", "e", "value", "content", "initDateRangePickers", "groupSelector", "startDateSelector", "minimumDays", "datesInput", "startDateField", "rangepicker", "currentMinimumDays", "days", "startDate", "endDate", "initFormWizardSteps", "steps", "stepIndicators", "currentStep", "showStep", "index", "step", "i", "indicator", "validateCurrentStep", "currentInputs", "errors", "isHidden", "label", "showErrors", "containerId", "errorMessages", "container", "ul", "msg", "li", "resetErrors", "btn", "errorListId", "prepareReviewFields", "element", "fieldName", "fieldValue", "init_formUtils", "__esmMin", "initCloseButtonClick", "referrer", "currentDomain", "referrerDomain", "init_close_page", "__esmMin", "require_book_workation", "__commonJSMin", "init_commonUtils", "init_formUtils", "init_close_page", "selectedCurrency", "rangePickerElements", "initCloseButtonClick", "initConditionalFormFields", "initFormWizardSteps", "initCustomDropdowns", "initDateRangePickers", "initDestinationDropdown", "initSeasonDropDown", "initPriceUpdateListeners", "initQueryParamFormValues", "initCardInfoBoxes", "urlParams", "queryDestination", "queryEdition", "queryRoom", "queryGuestsCount", "selectDropDownValue", "selectedEdition", "guestDropdown", "seasonStartDate", "seasonEndDate", "rangepicker", "locationDropdown", "editionDropdown", "editionToggle", "editionPlaceholder", "roomDropdown", "roomToggle", "locationDropdownItems", "editionDropdownItems", "roomDropdownItems", "onDestinationChange", "selectedDestinationSlug", "destinationCurrency", "item", "visible", "locationItem", "selector", "value", "dataAttribute", "dropdownItems", "datesInputGroup", "onSeasonChange", "edition", "updatePriceInfoCard", "updateDiscountBoxes", "roomItem", "allowWeeklyBooking", "discountInfoBlue", "discountInfoGreen", "startDate", "endDate", "monthDifference", "getMonthDifference", "priceInfoCards", "selectedDestinationItem", "selectedEditionItem", "selectedRoomItem", "selectedGuestsItem", "destinationSlug", "editionSlug", "roomSlug", "selectedGuestsCount", "editionRoomPrices", "getAllRoomPrices", "priceInfoCard", "updateRoomPriceAndBreakdown", "options", "formattedStartDate", "formattedEndDate", "x", "guestsCount", "roomPriceElement", "discountBox", "roomPriceDescription", "totalGuestsElement", "totalPriceElement", "totalPriceText", "priceBreakdownElement", "datesElement", "nextButton", "nextButtonAnchor", "roomPriceInfo", "priceInfoCardTitles", "hiddenTotalPriceField", "basePriceMonth", "discountMonth2", "discountMonth3", "totalPrice", "breakdown", "remainingDaysDiscount", "getMonthNumberEnding", "month", "weeklyPrice", "formatPrice", "discount", "monthlyPrice", "monthText", "remainingDays", "remainingPrice", "require_book_workation", "__commonJSMin", "import_book_workation"]
4
+ "sourcesContent": ["\n// Get all room price data - this is done by a collection list element creating:\n// < script type=\"application/json\" class=\"room-price-data\"> \n// {\n// \"roomSlug\": \"\",\n// \"editionSlug\": \"\",\n// \"basePriceWeek\": ,\n// \"basePriceMonth\": ,\n// \"discountMonth2\": ,\n// \"discountMonth3\":\n// }\n// </ script > \nexport function getAllRoomPrices(editionSlugFilter) {\n const priceElements = document.querySelectorAll('.room-price-data');\n const roomPrices = Array.from(priceElements).map(x => JSON.parse(x.textContent));\n if (!editionSlugFilter) {\n \treturn roomPrices;\n }\n return roomPrices.filter((x) => x.editionSlug === editionSlugFilter)\n}\n\n// calculate month difference while 1 month is always 30 days\nexport function getMonthDifference(startDate, endDate) {\n if (!startDate || !endDate) return 0;\n return Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24 * 30)); \n}\n\nexport function formatPrice(price, currency) {\n\t// That\u2019s the locale for German, which uses the formatting style we\u2019re after. \n // We could also use 'fr-FR', 'it-IT', etc. \u2014 most European locales format this way.\n return new Intl.NumberFormat('de-DE', {\n style: 'currency',\n \tcurrency,\n currencyDisplay: 'code'\n }).format(price);\n}\n\nexport function parseDecimalFromString(price, defaultValue = null) {\n return !isNaN(parseFloat(price))\n ? parseFloat(price)\n : defaultValue; \n}\n", "/**\n * Conditional Form Fields Script (Generic & Reusable)\n *\n * This script enables conditional visibility and required-state for form fields\n * based on trigger inputs (like dropdowns or radios).\n *\n * \u2705 How to use:\n * 1. Add `data-trigger=\"yourTriggerName\"` to the input controlling the logic (e.g. <select> or <input>).\n * 2. Add `data-condition-trigger=\"yourTriggerName\"` to any form field container that should be shown conditionally.\n * 3. Add `data-condition-value=\"triggerValue\"` to define when that field should be visible.\n * 4. Inside the conditional container, set form elements to `required` \u2014 the script toggles this automatically.\n *\n * This allows multiple trigger/condition pairs on the same page without extra JS.\n */\nexport function initConditionalFormFields() {\n const triggers = document.querySelectorAll('[data-trigger]');\n\n triggers.forEach((trigger) => {\n trigger.addEventListener('change', () => updateConditionalFields(trigger));\n updateConditionalFields(trigger); // Run on load\n });\n\n function updateConditionalFields(trigger) {\n const triggerName = trigger.getAttribute('data-trigger');\n const triggerValue = trigger.value;\n\n const conditionals = document.querySelectorAll(`[data-condition-trigger=\"${triggerName}\"]`);\n\n conditionals.forEach((field) => {\n const shouldShow = field.getAttribute('data-condition-value') === triggerValue;\n const input = field.matches('input, select, textarea') ? field : field.querySelector('input, select, textarea');\n\n field.style.display = shouldShow ? 'block' : 'none';\n if (input) {\n input.required = shouldShow;\n if (!shouldShow) input.value = '';\n }\n });\n }\n}\n\n/** This script\n * - loops through all custom dropdowns with \"data-custom-dropdown\" attribute\n * - sets the selected value as selected in the dropdown\n * - creates a hidden input for form data\n * - sets the selected value from \"data-value\" to the hidden input\n **/\nexport function initCustomDropdowns() {\n document.querySelectorAll('[data-custom-dropdown]').forEach((dropdown) => {\n // Create the hidden input\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = dropdown.dataset.name || 'custom-dropdown';\n input.setAttribute('required', dropdown.dataset.required === 'true' || false);\n input.value = ''; // Or set a default value if needed\n\n // Append it to the dropdown or its closest form\n dropdown.appendChild(input);\n\n const toggle = dropdown.querySelector('.dropdown-selected-value');\n const links = dropdown.querySelectorAll('.dropdown-item');\n\n links.forEach((link) => {\n link.addEventListener('click', (e) => {\n e.preventDefault();\n const value = link.dataset.value;\n const content = link.cloneNode(true);\n content.style.padding = 0; //reset paddings from dropdown-item\n\n // Update visual\n toggle.innerHTML = '';\n toggle.appendChild(content);\n\n // Set hidden field\n input.value = value;\n });\n });\n });\n}\n\n\n\n// Setting up daterange-pickers\n// Docs: https://mymth.github.io/vanillajs-datepicker/\nexport function initDateRangePickers(groupSelector, startDateSelector, minimumDays = 30) {\n const datesInput = document.querySelector(groupSelector);\n const startDateField = document.querySelector(startDateSelector);\n const rangepicker = new DateRangePicker(datesInput, {\n format: 'dd. MM yyyy',\n });\n\n // Add an event listener to validate the date range\n let currentMinimumDays = minimumDays;\n\n // Expose a method to update minimumDays dynamically\n rangepicker.setMinimumDays = (days) => {\n currentMinimumDays = days;\n };\n\n rangepicker.validateDateRange = () => {\n const [startDate, endDate] = rangepicker.getDates();\n\n if (startDate && endDate) {\n const differenceInDays = Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24));\n if (differenceInDays < currentMinimumDays) {\n startDateField.setCustomValidity(`You need to choose a minimum of ${currentMinimumDays} days.`);\n // Set end date to {{currentMinimumDays}} days after start date\n rangepicker.setDates(startDate, new Date(startDate.getTime() + currentMinimumDays * 24 * 60 * 60 * 1000)); \n } else {\n startDateField.setCustomValidity('');\n }\n } else {\n startDateField.setCustomValidity('');\n }\n // Trigger form validation\n startDateField.reportValidity();\n }\n\n datesInput.addEventListener('changeDate', rangepicker.validateDateRange);\n\n return { rangepicker, datesInput, startDateField };\n}\n\n\n/**\n * This script is responsible for\n * - the navigation of the multi step field\n * - update of the wizard step indicators\n * - form validation of all form elements of the current step\n **/\nexport function initFormWizardSteps() {\n const steps = document.querySelectorAll('.form-step');\n const stepIndicators = document.querySelectorAll(\n '.form-wizard-step .form-wizard-step-progress'\n );\n let currentStep = 0;\n\n function showStep(index) {\n steps.forEach((step, i) => {\n step.style.display = i === index ? 'block' : 'none';\n });\n\n stepIndicators.forEach((indicator, i) => {\n if (i < index || i === index) {\n indicator.classList.add('active');\n } else {\n indicator.classList.remove('active');\n }\n });\n }\n\n function validateCurrentStep() {\n const currentInputs = steps[currentStep].querySelectorAll('input, select, textarea');\n const errors = [];\n\n currentInputs.forEach((input) => {\n const isHidden = input.type === 'hidden' || input.offsetParent === null;\n\n if (input.required) {\n const isEmpty = !input.value || input.value.trim() === '';\n if (isEmpty) {\n const label = input.dataset.name || input.name || input.placeholder || 'Unnamed field';\n errors.push(`${label} is required.`);\n }\n }\n\n // Custom type validation (e.g., email)\n if (!isHidden && input.value && !input.checkValidity()) {\n const label = input.name || input.placeholder || 'Unnamed field';\n errors.push(`${label} is invalid.`);\n }\n });\n return errors;\n }\n\n function showErrors(containerId, errorMessages) {\n const container = document.querySelector(containerId);\n\n if (!container) return;\n\n // Clear any previous errors\n container.innerHTML = '';\n\n // Create <ul> element\n const ul = document.createElement('ul');\n\n // Add each error as <li>\n errorMessages.forEach((msg) => {\n const li = document.createElement('li');\n li.textContent = msg;\n ul.appendChild(li);\n });\n\n // Append the list to the container\n container.appendChild(ul);\n }\n\n function resetErrors(containerId) {\n const container = document.querySelector(containerId);\n if (container) {\n container.innerHTML = '';\n }\n }\n\n document.querySelectorAll('.form-next-step-btn').forEach((btn) => {\n btn.addEventListener('click', () => {\n if (btn.getAttribute('disabled') === 'true') {\n return;\n }\n\n const errors = validateCurrentStep();\n const errorListId = `#error-list-step-${currentStep}`;\n resetErrors(errorListId);\n if (errors.length == 0) {\n currentStep = Math.min(currentStep + 1, steps.length - 1);\n const isLastStep = currentStep === steps.length - 1;\n if (isLastStep) {\n prepareReviewFields(); // this loops through all fields with #review-* and sets the corresponding value\n }\n showStep(currentStep);\n } else {\n showErrors(errorListId, errors);\n }\n });\n });\n\n function prepareReviewFields() {\n const reviewElements = document.querySelectorAll('[id^=\"review-\"]');\n\n // Loop through the matched elements\n reviewElements.forEach((element) => {\n const fieldName = element.dataset.fieldname;\n try {\n const fieldValue = document.querySelector(`[name=\"${fieldName}\"]`).value;\n element.innerText = fieldValue;\n } catch {}\n });\n }\n\n document.querySelectorAll('.form-previous-step-btn').forEach((btn) => {\n btn.addEventListener('click', () => {\n currentStep = Math.max(currentStep - 1, 0);\n showStep(currentStep);\n });\n });\n\n showStep(currentStep); // Init\n}", "\n/**\n * Initializes a X button on the page with ID \"close-button\":\n * When clicked it tries to receive the previous page\n * - If there was a previous page and that page was on the same domain -> navigate there\n * - If there was no previous page or previous page was not on same domain -> navigate home \"/\"\n */\nexport function initCloseButtonClick() {\n document.getElementById(\"close-button\").addEventListener(\"click\", function () {\n const referrer = document.referrer;\n const currentDomain = window.location.hostname;\n\n // Extract the domain from the referrer URL\n let referrerDomain = null;\n try {\n referrerDomain = referrer ? new URL(referrer).hostname : null;\n } catch (e) {\n referrerDomain = null;\n }\n\n if (window.history.length > 1 && referrerDomain === currentDomain) {\n window.history.back();\n } else {\n window.location.href = \"/\";\n }\n });\n}", "\nimport { getAllRoomPrices, getMonthDifference, formatPrice, parseDecimalFromString } from \"../../utils/commonUtils\";\nimport { initConditionalFormFields, initFormWizardSteps, initCustomDropdowns, initDateRangePickers } from \"../../utils/formUtils\";\nimport { initCloseButtonClick } from \"../../utils/close-page\";\n\nlet selectedCurrency = \"EUR\"; // default currency\nlet rangePickerElements = null; // global variable to store the range picker instance\n\ndocument.addEventListener('DOMContentLoaded', function () {\n initCloseButtonClick();\n \n //form preparation\n initConditionalFormFields();\n initFormWizardSteps();\n initCustomDropdowns();\n \n //init controls\n rangePickerElements = initDateRangePickers('#dates-start-end-group', '#Start-Date');\n initDestinationDropdown();\n initSeasonDropDown();\n\n initPriceUpdateListeners();\n\n //set inital form values\n initQueryParamFormValues();\n\n //init info/card boxes on the right side of the form\n initCardInfoBoxes();\n});\n\n\n/**\n * This script handles initial setting of form values that come from query parameters\n **/\nfunction initQueryParamFormValues () {\n const urlParams = new URLSearchParams(window.location.search);\n const queryDestination = urlParams.get('destination');\n const queryEdition = urlParams.get('edition');\n const queryRoom = urlParams.get('room');\n const queryGuestsCount = urlParams.get('guests');\n\n queryDestination &&\n selectDropDownValue('#destination-dropdown', queryDestination, 'data-destinationslug');\n const selectedEdition = queryEdition && selectDropDownValue('#edition-dropdown', queryEdition, 'data-editionslug');\n queryRoom && selectDropDownValue('#room-dropdown', queryRoom, 'data-roomslug');\n\n // Guests dropdown is not a custom dropdown\n if (queryGuestsCount) {\n const guestDropdown = document.getElementById('Guests');\n if (guestDropdown) {\n guestDropdown.value = queryGuestsCount;\n }\n }\n\n if (selectedEdition) {\n const seasonStartDate = selectedEdition.dataset.startdate;\n const seasonEndDate = selectedEdition.dataset.enddate; // TODO: receive length of stay to determine end date\n \n const rangepicker = rangePickerElements.rangepicker;\n rangepicker.setOptions({\n minDate: seasonStartDate,\n maxDate: seasonEndDate,\n });\n rangepicker.setDates(seasonStartDate, seasonEndDate);\n }\n}\n\n\n/**\n * This script handles the dependencies of the destination/location dropdown\n * When destination dropdown value changed:\n * - Update Season/Edition dropdown and show only seasons/editions from the specific location\n * - Update Room dropdown and show only rooms from the specific location\n **/\nfunction initDestinationDropdown() {\n const locationDropdown = document.querySelector('#destination-dropdown');\n\n const editionDropdown = document.querySelector('#edition-dropdown');\n const editionToggle = editionDropdown.querySelector('.dropdown-selected-value');\n const editionPlaceholder = editionToggle.innerHTML;\n\n const roomDropdown = document.querySelector('#room-dropdown');\n const roomToggle = roomDropdown.querySelector('.dropdown-selected-value');\n\n const locationDropdownItems = locationDropdown.querySelectorAll('.dropdown-item');\n const editionDropdownItems = editionDropdown.querySelectorAll('.dropdown-item');\n const roomDropdownItems = roomDropdown.querySelectorAll('.dropdown-item');\n\n function onDestinationChange(selectedDestinationSlug, destinationCurrency) {\n editionToggle.setAttribute('disabled', selectedDestinationSlug === '' ? 'true' : 'false');\n roomToggle.setAttribute('disabled', selectedDestinationSlug === '' ? 'true' : 'false');\n\n // Clear selected edition option\n editionToggle.innerHTML = editionPlaceholder;\n roomToggle.innerHTML = editionPlaceholder;\n\n selectedCurrency = destinationCurrency;\n\n [...editionDropdownItems, ...roomDropdownItems].forEach((item) => {\n const visible = item.dataset.destinationslug === selectedDestinationSlug;\n item.style.display = visible ? 'flex' : 'none';\n });\n }\n\n // Initial population\n onDestinationChange('', selectedCurrency);\n\n // Update on change\n locationDropdownItems.forEach((locationItem) => {\n locationItem.addEventListener('click', function () {\n onDestinationChange(this.dataset.destinationslug, this.dataset.currency);\n });\n });\n}\n\n\nfunction selectDropDownValue(selector, value, dataAttribute) {\n const dropdownItems = document.querySelectorAll(`${selector} .dropdown-item`);\n const item =\n dropdownItems &&\n Array.from(dropdownItems).find((item) => item.getAttribute(dataAttribute) === value);\n item && item.click();\n return item;\n}\n\n\n/**\n * This script handles the dependencies of the season dropdown\n * When season dropdown value changed:\n * - Reset the start and end dates\n * - Set minimum start date to season start date\n * - Set maximum end date to season end date\n **/\nfunction initSeasonDropDown() {\n const editionDropdown = document.querySelector('#edition-dropdown');\n const editionDropdownItems = editionDropdown.querySelectorAll('.dropdown-item');\n\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n\n function onSeasonChange(seasonStartDate, seasonEndDate) {\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n\n rangepicker.setOptions({\n minDate: seasonStartDate,\n maxDate: seasonEndDate,\n });\n rangepicker.setDates(seasonStartDate, seasonEndDate);\n }\n\n // Update on change\n editionDropdownItems.forEach((edition) => {\n edition.addEventListener('click', function () {\n onSeasonChange(this.dataset.startdate, this.dataset.enddate);\n });\n });\n}\n\n/**\n * Initializes event listeners for dropdown and date picker changes on the booking page.\n *\n * - Listens for changes in the start/end date input group and updates price and discount info.\n * - Listens for room selection changes, updates price info, and adjusts the date range picker\n * based on the selected room's weekly booking allowance.\n * - Listens for changes in the guest count dropdown and updates price info accordingly.\n */\nfunction initPriceUpdateListeners() {\n // react on change of start / end date\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n datesInputGroup.addEventListener('changeDate', () => {\n updatePriceInfoCard();\n updateDiscountBoxes();\n });\n\n // react on change of room\n const roomDropdown = document.querySelector('#room-dropdown');\n const roomDropdownItems = roomDropdown.querySelectorAll('.dropdown-item');\n roomDropdownItems.forEach((roomItem) => {\n roomItem.addEventListener('click', () => {\n updatePriceInfoCard();\n\n const allowWeeklyBooking = roomItem.getAttribute('data-allow-weekly-booking');\n // change date range picker to the selected room\n const rangepicker = rangePickerElements.rangepicker;\n rangepicker.setMinimumDays(allowWeeklyBooking === 'Enabled' ? 7 : 30);\n rangepicker.validateDateRange();\n });\n });\n\n //react on guest count change\n const guestsDropdown = document.querySelector('#Guests');\n guestsDropdown.addEventListener('change', () => {\n updatePriceInfoCard();\n });\n}\n\n\n/**\n * This script handles visual and textual changes on the content on top of the image next to the form\n * depending on form values.\n **/\nfunction initCardInfoBoxes() {\n updateDiscountBoxes();\n updatePriceInfoCard();\n}\n\n\nfunction updateDiscountBoxes() {\n //reset discount infos\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n \n const discountInfoBlue = document.querySelector('.discount-info-blue');\n const discountInfoGreen = document.querySelector('.discount-info-green');\n\n const [startDate, endDate] = rangepicker.getDates();\n // calculate month difference while 1 month is always 30 days\n const monthDifference = getMonthDifference(startDate, endDate);\n \n if ((!startDate || !endDate) || monthDifference <= 2) {\n discountInfoBlue.style.display = 'flex';\n discountInfoGreen.style.display = 'none';\n } else {\n discountInfoBlue.style.display = 'none';\n discountInfoGreen.style.display = 'flex';\n }\n}\n\n\n//determine if we display the price info card or not\n// only show, if \n// - destination is set\n// - edition is set\n// - room is set\n// - dates are set\n// - (guests are always set)\nfunction updatePriceInfoCard() {\n const priceInfoCards = document.querySelectorAll('.price-info-card');\n const datesInputGroup = document.querySelector('#dates-start-end-group');\n const rangepicker = datesInputGroup.rangepicker; // get the instance of the datepicker\n const selectedDestinationItem = document.querySelector('#destination-dropdown .dropdown-selected-value .dropdown-item');\n const selectedEditionItem = document.querySelector('#edition-dropdown .dropdown-selected-value .dropdown-item');\n const selectedRoomItem = document.querySelector('#room-dropdown .dropdown-selected-value .dropdown-item');\n const selectedGuestsItem = document.querySelector('#Guests');\n\n const destinationSlug = selectedDestinationItem ? selectedDestinationItem.dataset.destinationslug : '';\n const editionSlug = selectedEditionItem ? selectedEditionItem.dataset.editionslug : '';\n const roomSlug = selectedRoomItem ? selectedRoomItem.dataset.roomslug : '';\n const allowWeeklyBooking = selectedRoomItem ? selectedRoomItem.getAttribute('data-allow-weekly-booking') === 'Enabled' : false;\n const [startDate, endDate] = rangepicker.getDates(); \n const selectedGuestsCount = selectedGuestsItem ? parseInt(selectedGuestsItem.value) : 0;\n\n if (destinationSlug && editionSlug && roomSlug && startDate && endDate && selectedGuestsCount > 0) {\n const editionRoomPrices = getAllRoomPrices();\n priceInfoCards.forEach(priceInfoCard => { \n priceInfoCard.style.display = 'flex';\n updateRoomPriceAndBreakdown(priceInfoCard, editionRoomPrices, editionSlug, roomSlug, startDate, endDate, selectedGuestsCount, allowWeeklyBooking);\n });\n\n // update dates\n const options = { day: 'numeric', month: 'short', year: 'numeric' };\n const formattedStartDate = startDate.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' }).replace(',', '');\n const formattedEndDate = endDate.toLocaleDateString('en-GB', options).replace(',', '');\n document.querySelectorAll('.total-dates').forEach(x => x.innerHTML = `${formattedStartDate} - ${formattedEndDate}`);\n } else {\n priceInfoCards.forEach(x => x.style.display = 'none');\n }\n}\n\n\n// update room price & breakdown\nfunction updateRoomPriceAndBreakdown(priceInfoCard, editionRoomPrices, editionSlug, roomSlug, startDate, endDate, guestsCount, allowWeeklyBooking) {\n const monthDifference = getMonthDifference(startDate, endDate);\n\n const roomPriceElement = priceInfoCard.querySelector('.room-price');\n const discountBox = priceInfoCard.querySelector('.room-price-discount');\n const roomPriceDescription = priceInfoCard.querySelector('.room-price-month-desc');\n const totalGuestsElement = priceInfoCard.querySelector('.total-guests');\n \n const totalPriceElement = priceInfoCard.querySelector('.total-totalprice');\n const totalPriceText = totalPriceElement.firstElementChild;\n const priceBreakdownElement = priceInfoCard.querySelector('.room-price-breakdown');\n const datesElement = priceInfoCard.querySelector('.total-dates');\n\n const nextButton = document.querySelector('#form-next-step-btn-step-1'); // we have this only one time on the page\n const nextButtonAnchor = nextButton.querySelector('a');\n\n const roomPriceInfo = editionRoomPrices.find((x) => x.editionSlug === editionSlug && x.roomSlug === roomSlug);\n const priceInfoCardTitles = priceInfoCard.querySelectorAll('.price-info-card-title');\n\n const hiddenTotalPriceField = document.querySelector(`[name=\"Total-Price\"]`);\n\n if (!roomPriceInfo) {\n priceBreakdownElement.innerText = 'No room price found for the selected season or room.';\n totalPriceElement.style.display = 'none';\n roomPriceElement.style.display = 'none';\n discountBox.style.display = 'none';\n totalGuestsElement.parentElement.style.display = 'none';\n datesElement.style.display = 'none';\n roomPriceDescription.style.display = 'none';\n nextButtonAnchor.style.pointerEvents = 'none';\n nextButtonAnchor.style.backgroundColor = 'var(--_colors---light-silver)';\n nextButtonAnchor.style.opacity = 0.3;\n nextButton.setAttribute('disabled', true);\n priceInfoCardTitles.forEach(x => x.style.display = 'none');\n hiddenTotalPriceField.value = 0;\n return;\n }\n \n //reset visual elements\n totalPriceElement.style.display = 'block';\n roomPriceElement.style.display = 'block';\n totalGuestsElement.parentElement.style.display = 'flex';\n datesElement.style.display = 'block';\n roomPriceDescription.style.display = 'block';\n nextButtonAnchor.style.pointerEvents = 'auto';\n nextButtonAnchor.style.backgroundColor = 'var(--_colors---primary)';\n nextButtonAnchor.style.opacity = 1;\n nextButton.setAttribute('disabled', false);\n priceInfoCardTitles.forEach(x => x.style.display = 'block');\n\n const basePriceWeek = parseDecimalFromString(roomPriceInfo.basePriceWeek); // weekly price is string and can be empty\n const basePriceMonth = roomPriceInfo.basePriceMonth;\n const discountMonth2 = roomPriceInfo.discountMonth2;\n const discountMonth3 = roomPriceInfo.discountMonth3;\n\n let totalPrice = 0;\n let breakdown = [];\n let remainingDaysDiscount = 0;\n\n const getMonthNumberEnding = (month) => month === 1 ? 'st' : (month === 2 ? 'nd' : (month === 3 ? 'rd' : 'th'));\n\n if (monthDifference < 1 && allowWeeklyBooking && basePriceWeek) {\n const weeklyPrice = basePriceWeek;\n discountBox.style.display = 'none';\n roomPriceElement.innerText = `${formatPrice(weeklyPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = `per week`;\n } else if (monthDifference >= 1) {\n totalPrice += basePriceMonth;\n breakdown.push(`Month 1: ${formatPrice(totalPrice, selectedCurrency)}`);\n discountBox.style.display = 'none';\n roomPriceElement.innerText = `${formatPrice(totalPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = `1st month`;\n }\n\n for (let month = 2; month <= monthDifference; month++) {\n let discount = 0;\n if (month === 2) {\n discount = discountMonth2;\n } else if (month >= 3) {\n discount = discountMonth3;\n }\n\n const monthlyPrice = basePriceMonth * (1 - discount / 100);\n totalPrice += monthlyPrice;\n breakdown.push(`Month ${month}: ${formatPrice(monthlyPrice, selectedCurrency)}`);\n\n let monthText = month <= 3 \n ? `${month}${getMonthNumberEnding(month)} month`\n : `from 3rd month`;\n\n if (discount > 0) {\n discountBox.innerText = `${discount.toFixed(1)}% discount - ${monthText}`;\n discountBox.style.display = 'flex';\n }\n\n roomPriceElement.innerHTML = `${formatPrice(monthlyPrice, selectedCurrency)}`;\n roomPriceDescription.innerText = monthText;\n remainingDaysDiscount = discount;\n }\n\n const remainingDays = (endDate - startDate) / (1000 * 60 * 60 * 24) - monthDifference * 30;\n if (remainingDays > 0) {\n const basePrice = (monthDifference >= 1) ? basePriceMonth : basePriceWeek;\n const daysDivider = (monthDifference >= 1) ? 30 : 7;\n const dailyRate = basePrice * (1 - remainingDaysDiscount / 100) / daysDivider;\n const remainingPrice = dailyRate * remainingDays;\n totalPrice += remainingPrice;\n breakdown.push(`${monthDifference >= 1 ? '+' : ''} ${Math.round(remainingDays)} days: ${formatPrice(remainingPrice, selectedCurrency)}`);\n }\n\n priceBreakdownElement.innerHTML = breakdown.join('<br>');\n totalGuestsElement.innerText = `${guestsCount} x Person`;\n totalPriceText.innerText = `${formatPrice(totalPrice, selectedCurrency)}`;\n hiddenTotalPriceField.value = `${formatPrice(totalPrice, selectedCurrency)}`; //setting the value in the hidden field for review and sending in form\n}\n", "import \"./book-workation\";"],
5
+ "mappings": "+jBAYO,SAASA,EAAiBC,EAAmB,CAClD,IAAMC,EAAgB,SAAS,iBAAiB,kBAAkB,EAC5DC,EAAa,MAAM,KAAKD,CAAa,EAAE,IAAIE,GAAK,KAAK,MAAMA,EAAE,WAAW,CAAC,EAC/E,OAAKH,EAGEE,EAAW,OAAQC,GAAMA,EAAE,cAAgBH,CAAiB,EAF3DE,CAGV,CAGO,SAASE,EAAmBC,EAAWC,EAAS,CACrD,MAAI,CAACD,GAAa,CAACC,EAAgB,EAC5B,KAAK,OAAOA,EAAUD,IAAc,IAAO,GAAK,GAAK,GAAK,GAAG,CACtE,CAEO,SAASE,EAAYC,EAAOC,EAAU,CAG3C,OAAO,IAAI,KAAK,aAAa,QAAS,CACpC,MAAO,WACR,SAAAA,EACC,gBAAiB,MACnB,CAAC,EAAE,OAAOD,CAAK,CACjB,CAEO,SAASE,EAAuBF,EAAOG,EAAe,KAAM,CACjE,OAAQ,MAAM,WAAWH,CAAK,CAAC,EAE3BG,EADA,WAAWH,CAAK,CAEtB,CAzCA,IAAAI,EAAAC,EAAA,QCcO,SAASC,GAA4B,CACzB,SAAS,iBAAiB,gBAAgB,EAElD,QAASC,GAAY,CAC5BA,EAAQ,iBAAiB,SAAU,IAAMC,EAAwBD,CAAO,CAAC,EACzEC,EAAwBD,CAAO,CACjC,CAAC,EAED,SAASC,EAAwBD,EAAS,CACxC,IAAME,EAAcF,EAAQ,aAAa,cAAc,EACjDG,EAAeH,EAAQ,MAER,SAAS,iBAAiB,4BAA4BE,CAAW,IAAI,EAE7E,QAASE,GAAU,CAC9B,IAAMC,EAAaD,EAAM,aAAa,sBAAsB,IAAMD,EAC5DG,EAAQF,E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EAAiB,UAAY,GAAGwB,EAAYE,EAAcnG,CAAgB,CAAC,GAC3E2E,EAAqB,UAAYyB,EACjCP,EAAwBK,CAC1B,CAEA,IAAMG,GAAiBjD,EAAUD,IAAc,IAAO,GAAK,GAAK,IAAME,EAAkB,GACxF,GAAIgD,EAAgB,EAAG,CACrB,IAAMC,EAAajD,GAAmB,EAAKmC,EAAiBF,EACtDiB,EAAelD,GAAmB,EAAK,GAAK,EAE5CmD,EADYF,GAAa,EAAIT,EAAwB,KAAOU,EAC/BF,EACnCV,GAAca,EACdZ,EAAU,KAAK,GAAGvC,GAAmB,EAAI,IAAM,EAAE,IAAI,KAAK,MAAMgD,CAAa,CAAC,UAAUJ,EAAYO,EAAgBxG,CAAgB,CAAC,EAAE,CACzI,CAEA+E,EAAsB,UAAYa,EAAU,KAAK,MAAM,EACvDhB,EAAmB,UAAY,GAAGJ,CAAW,YAC7CM,EAAe,UAAY,GAAGmB,EAAYN,EAAY3F,CAAgB,CAAC,GACvEqF,EAAsB,MAAQ,GAAGY,EAAYN,EAAY3F,CAAgB,CAAC,EAC5E,IChYA,IAAAyG,GAAAC,EAAA,SAAAC,GAAO",
6
+ "names": ["getAllRoomPrices", "editionSlugFilter", "priceElements", "roomPrices", "x", "getMonthDifference", "startDate", "endDate", "formatPrice", "price", "currency", "parseDecimalFromString", "defaultValue", "init_commonUtils", "__esmMin", "initConditionalFormFields", "trigger", "updateConditionalFields", "triggerName", "triggerValue", "field", "shouldShow", "input", "initCustomDropdowns", "dropdown", "toggle", "link", "e", "value", "content", "initDateRangePickers", "groupSelector", "startDateSelector", "minimumDays", "datesInput", "startDateField", "rangepicker", "currentMinimumDays", "days", "startDate", "endDate", "initFormWizardSteps", "steps", "stepIndicators", "currentStep", "showStep", "index", "step", "i", "indicator", "validateCurrentStep", "currentInputs", "errors", "isHidden", "label", "showErrors", "containerId", "errorMessages", "container", "ul", "msg", "li", "resetErrors", "btn", "errorListId", "prepareReviewFields", "element", "fieldName", "fieldValue", "init_formUtils", "__esmMin", "initCloseButtonClick", "referrer", "currentDomain", "referrerDomain", "init_close_page", "__esmMin", "require_book_workation", "__commonJSMin", "init_commonUtils", "init_formUtils", "init_close_page", "selectedCurrency", "rangePickerElements", "initCloseButtonClick", "initConditionalFormFields", "initFormWizardSteps", "initCustomDropdowns", "initDateRangePickers", "initDestinationDropdown", "initSeasonDropDown", "initPriceUpdateListeners", "initQueryParamFormValues", "initCardInfoBoxes", "urlParams", "queryDestination", "queryEdition", "queryRoom", "queryGuestsCount", "selectDropDownValue", "selectedEdition", "guestDropdown", "seasonStartDate", "seasonEndDate", "rangepicker", "locationDropdown", "editionDropdown", "editionToggle", "editionPlaceholder", "roomDropdown", "roomToggle", "locationDropdownItems", "editionDropdownItems", "roomDropdownItems", "onDestinationChange", "selectedDestinationSlug", "destinationCurrency", "item", "visible", "locationItem", "selector", "value", "dataAttribute", "dropdownItems", "datesInputGroup", "onSeasonChange", "edition", "updatePriceInfoCard", "updateDiscountBoxes", "roomItem", "allowWeeklyBooking", "discountInfoBlue", "discountInfoGreen", "startDate", "endDate", "monthDifference", "getMonthDifference", "priceInfoCards", "selectedDestinationItem", "selectedEditionItem", "selectedRoomItem", "selectedGuestsItem", "destinationSlug", "editionSlug", "roomSlug", "selectedGuestsCount", "editionRoomPrices", "getAllRoomPrices", "priceInfoCard", "updateRoomPriceAndBreakdown", "options", "formattedStartDate", "formattedEndDate", "x", "guestsCount", "roomPriceElement", "discountBox", "roomPriceDescription", "totalGuestsElement", "totalPriceElement", "totalPriceText", "priceBreakdownElement", "datesElement", "nextButton", "nextButtonAnchor", "roomPriceInfo", "priceInfoCardTitles", "hiddenTotalPriceField", "basePriceWeek", "parseDecimalFromString", "basePriceMonth", "discountMonth2", "discountMonth3", "totalPrice", "breakdown", "remainingDaysDiscount", "getMonthNumberEnding", "month", "weeklyPrice", "formatPrice", "discount", "monthlyPrice", "monthText", "remainingDays", "basePrice", "daysDivider", "remainingPrice", "require_book_workation", "__commonJSMin", "import_book_workation"]
7
7
  }
@@ -1,6 +1,6 @@
1
- (()=>{var p=(t,e)=>()=>(t&&(e=t(t=0)),e);var ne=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);function q(t){let e=document.querySelectorAll(`${t} .destination-testimonials-item`),n=document.querySelectorAll(`${t} .dyn-author-image`);if(!e||e.length===0){console.error("No testimonials found");return}let o=0;e.forEach(c=>c.style.display="none"),n.forEach(c=>{c.style.display="none",c.classList.remove("active")});function r(c){e.forEach((d,l)=>{d.style.display=l===c?"block":"none"}),n.forEach((d,l)=>{d.classList.toggle("active",l===c)}),o=c}let s=[...e];s.forEach((c,d)=>{let l=c.querySelector(".testimonial-card-author-image")?.src,u=document.querySelector(`${t} [data-slot="${d+1}"]`);u&&l&&(u.src=l,u.style.display="inline",d===0&&u.classList.add("active"),u.addEventListener("click",()=>{r(d)}))}),r(0);let i=document.getElementById("destination-testimonials-btn-left"),a=document.getElementById("destination-testimonials-btn-right");i&&i.addEventListener("click",()=>{let c=(o-1+s.length)%s.length;r(c)}),a&&a.addEventListener("click",()=>{let c=(o+1)%s.length;r(c)})}var A=p(()=>{});var S,T=p(()=>{S=function(){let t={};function e(r,s,i){let a=document.querySelector(r),c=document.querySelector(`${r}.w-dropdown`),d=a.querySelector(`${r} .w-dropdown-toggle`),l=a.querySelector(`${r} .w-dropdown-list`),u=a.querySelector(`${r} .dropdown-selected-value`),f=a.querySelectorAll(`${r} .dropdown-item`);if(t[r]={container:a,dropdown:c,dropdownToggle:d,dropdownList:l,selectedItemValueContainer:u,collectionItems:f,onChange:s},f.forEach(m=>{m.addEventListener("click",function(w){w.preventDefault();let y=this;n(r,y),s&&s(y),l.classList.remove("w--open"),c.blur()})}),i){let m=o(r,i);m&&setTimeout(()=>{m.click()},200)}}function n(r,s){let i=t[r];if(!i)return;let a=i.selectedItemValueContainer;for(;a.firstChild;)a.removeChild(a.firstChild);let c=s;if(c){let d=c.cloneNode(!0);a.appendChild(d);let l=c.getAttribute("data-value");i.dropdown.setAttribute("data-current-value",l)}else console.error("SelectedItem Element not found.",s)}function o(r,s){let i=t[r];return Array.from(i.collectionItems).find(a=>a.getAttribute("data-value")===s)}return{init:function({selector:r,onChange:s,initialValue:i}){document.addEventListener("DOMContentLoaded",function(){e(r,s,i)})},setValue:function(r,s){let i=o(r,s);i?i.click():s!=null&&console.error(`No item with value '${s}' found in dropdown '${r}'`)},getValue:function(r){return t[r].dropdown.getAttribute("data-current-value")}}}()});var k,D=p(()=>{k=function(){let t=null;function e({selectorId:n,isReverse:o}){if(!document.querySelector(`${n} .swiper-wrapper`))return console.error("Required elements not found"),null;let s=new Swiper(`${n}.swiper`,{spaceBetween:16,loop:!0,slidesPerView:"auto",freeMode:!0,speed:6500,autoplay:{delay:0,disableOnInteraction:!1,reverseDirection:o,pauseOnMouseEnter:!1}});return t=s,s}return{init:function({selectorId:n,isReverse:o}){document.addEventListener("DOMContentLoaded",function(){let r=document.querySelector(`${n} .swiper-wrapper`);r.style.gap="0",r.style.setProperty("transition-timing-function","linear","important"),e({selectorId:n,isReverse:o})})}}}()});var W,R=p(()=>{W=function(){let t,e,n=null,o=null;function r({onItemClick:i}){let a=document.querySelector(o.swiperWrapper),c=document.querySelectorAll(o.swiperSlides);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!a||!e||!n||!c)return console.error("Required elements not found"),null;let d=new Swiper(o.swiper,{direction:"vertical",slidesPerView:"auto",spaceBetween:8,freeMode:!1,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});return t=d,s(),d.on("slideChange",function(){s()}),i&&c.forEach(l=>{l.addEventListener("click",u=>i(u.currentTarget))}),d}function s(){!e||!n||(e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto",n.style.opacity=t.isEnd?"0.5":"1",n.style.pointerEvents=t.isEnd?"none":"auto")}return{init:function({selectors:i,onItemClick:a}){o=i,document.addEventListener("DOMContentLoaded",function(){let c=document.querySelector(o.swiperWrapper);c.style.gap="0",r({onItemClick:a})})}}}()});function b(t){let e=document.querySelectorAll(".room-price-data"),n=Array.from(e).map(o=>JSON.parse(o.textContent));return t?n.filter(o=>o.editionSlug===t):n}function h(t,e){return new Intl.NumberFormat("de-DE",{style:"currency",currency:e,currencyDisplay:"code"}).format(t)}var $=p(()=>{});function E(){let t=CollectionListDropDown.getValue("#workation-season-dropdown"),e=CollectionListDropDown.getValue("#length-stay-dropdown"),n=parseInt(CollectionListDropDown.getValue("#guest-count-dropdown")),o=document.querySelector("#rooms")?.getAttribute("data-currency")??"EUR",r=document.querySelectorAll(".room-list-item"),s=t?b(t):[];r.forEach(i=>{let a=i.getAttribute("data-roomslug"),c=i.getAttribute("data-allow-weekly-booking")==="Enabled",d=s.find(l=>l.roomSlug===a);oe(i,d,e,n,o,c)})}function oe(t,e,n,o,r,s){let i=t.querySelector(".room-item-price-breakdown"),a=t.querySelector(".room-item-price-month"),c=t.querySelector(".room-discount-text"),d=t.querySelector(".room-book-button"),l=t.querySelector(".room-item-price-not-avalable"),u=n&&n.startsWith("week"),f=l.innerText,m="Minimum length of stay for this room is 1 month";if(!e||u&&!s){l.innerText=u&&!s?m:f,l.style.display="flex",i.style.display="none",a.style.display="none",c.parentElement.style.display="none",d.style.opacity="0.5",d.style.pointerEvents="none",d.style.cursor="not-allowed";return}l.style.display="none",a.style.display="block",c.parentElement.style.display="flex",d.style.opacity="1",d.style.pointerEvents="auto",d.style.cursor="pointer";let w=e.basePriceMonth*o,y=e.discountMonth2,x=e.discountMonth3,L=w*(1-y/100),_=w*(1-x/100),ee=w/30*7,g=h(ee,r),B=h(w,r),te=!n||n.endsWith("-1");switch(i.style.display=te?"none":"inline",n){case"week-1":a.innerText=`${g} / week`,c.innerText="Longer stays unlock better discounts!";break;case"week-2":i.innerText=`1st week: ${g}`,a.innerText=`${g} - 2nd week`,c.innerText="Longer stays unlock better discounts!";break;case"week-3":i.innerHTML=`
2
- 1st week: ${g}<br>
3
- 2nd week: ${g}`,a.innerText=`${g} - 3rd week`,c.innerText="Longer stays unlock better discounts!";break;default:case"month-1":a.innerText=`${B} / month`,c.innerText="Longer stays unlock better discounts!";break;case"month-2":i.innerText=`1st month: ${B}`,a.innerText=`${h(L,r)} - 2nd month`,c.parentElement.style.display=y==0?"none":"block",c.innerText=`${y.toFixed(1)}% discount for the 2nd month!`;break;case"month-3":i.innerHTML=`
1
+ (()=>{var p=(t,e)=>()=>(t&&(e=t(t=0)),e);var te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);function q(t){let e=document.querySelectorAll(`${t} .destination-testimonials-item`),n=document.querySelectorAll(`${t} .dyn-author-image`);if(!e||e.length===0){console.error("No testimonials found");return}let o=0;e.forEach(c=>c.style.display="none"),n.forEach(c=>{c.style.display="none",c.classList.remove("active")});function i(c){e.forEach((d,l)=>{d.style.display=l===c?"block":"none"}),n.forEach((d,l)=>{d.classList.toggle("active",l===c)}),o=c}let s=[...e];s.forEach((c,d)=>{let l=c.querySelector(".testimonial-card-author-image")?.src,u=document.querySelector(`${t} [data-slot="${d+1}"]`);u&&l&&(u.src=l,u.style.display="inline",d===0&&u.classList.add("active"),u.addEventListener("click",()=>{i(d)}))}),i(0);let r=document.getElementById("destination-testimonials-btn-left"),a=document.getElementById("destination-testimonials-btn-right");r&&r.addEventListener("click",()=>{let c=(o-1+s.length)%s.length;i(c)}),a&&a.addEventListener("click",()=>{let c=(o+1)%s.length;i(c)})}var A=p(()=>{});var S,T=p(()=>{S=function(){let t={};function e(i,s,r){let a=document.querySelector(i),c=document.querySelector(`${i}.w-dropdown`),d=a.querySelector(`${i} .w-dropdown-toggle`),l=a.querySelector(`${i} .w-dropdown-list`),u=a.querySelector(`${i} .dropdown-selected-value`),f=a.querySelectorAll(`${i} .dropdown-item`);if(t[i]={container:a,dropdown:c,dropdownToggle:d,dropdownList:l,selectedItemValueContainer:u,collectionItems:f,onChange:s},f.forEach(m=>{m.addEventListener("click",function(h){h.preventDefault();let w=this;n(i,w),s&&s(w),l.classList.remove("w--open"),c.blur()})}),r){let m=o(i,r);m&&setTimeout(()=>{m.click()},200)}}function n(i,s){let r=t[i];if(!r)return;let a=r.selectedItemValueContainer;for(;a.firstChild;)a.removeChild(a.firstChild);let c=s;if(c){let d=c.cloneNode(!0);a.appendChild(d);let l=c.getAttribute("data-value");r.dropdown.setAttribute("data-current-value",l)}else console.error("SelectedItem Element not found.",s)}function o(i,s){let r=t[i];return Array.from(r.collectionItems).find(a=>a.getAttribute("data-value")===s)}return{init:function({selector:i,onChange:s,initialValue:r}){document.addEventListener("DOMContentLoaded",function(){e(i,s,r)})},setValue:function(i,s){let r=o(i,s);r?r.click():s!=null&&console.error(`No item with value '${s}' found in dropdown '${i}'`)},getValue:function(i){return t[i].dropdown.getAttribute("data-current-value")}}}()});var k,W=p(()=>{k=function(){let t=null;function e({selectorId:n,isReverse:o}){if(!document.querySelector(`${n} .swiper-wrapper`))return console.error("Required elements not found"),null;let s=new Swiper(`${n}.swiper`,{spaceBetween:16,loop:!0,slidesPerView:"auto",freeMode:!0,speed:6500,autoplay:{delay:0,disableOnInteraction:!1,reverseDirection:o,pauseOnMouseEnter:!1}});return t=s,s}return{init:function({selectorId:n,isReverse:o}){document.addEventListener("DOMContentLoaded",function(){let i=document.querySelector(`${n} .swiper-wrapper`);i.style.gap="0",i.style.setProperty("transition-timing-function","linear","important"),e({selectorId:n,isReverse:o})})}}}()});var D,R=p(()=>{D=function(){let t,e,n=null,o=null;function i({onItemClick:r}){let a=document.querySelector(o.swiperWrapper),c=document.querySelectorAll(o.swiperSlides);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!a||!e||!n||!c)return console.error("Required elements not found"),null;let d=new Swiper(o.swiper,{direction:"vertical",slidesPerView:"auto",spaceBetween:8,freeMode:!1,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});return t=d,s(),d.on("slideChange",function(){s()}),r&&c.forEach(l=>{l.addEventListener("click",u=>r(u.currentTarget))}),d}function s(){!e||!n||(e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto",n.style.opacity=t.isEnd?"0.5":"1",n.style.pointerEvents=t.isEnd?"none":"auto")}return{init:function({selectors:r,onItemClick:a}){o=r,document.addEventListener("DOMContentLoaded",function(){let c=document.querySelector(o.swiperWrapper);c.style.gap="0",i({onItemClick:a})})}}}()});function b(t){let e=document.querySelectorAll(".room-price-data"),n=Array.from(e).map(o=>JSON.parse(o.textContent));return t?n.filter(o=>o.editionSlug===t):n}function g(t,e){return new Intl.NumberFormat("de-DE",{style:"currency",currency:e,currencyDisplay:"code"}).format(t)}var $=p(()=>{});function E(){let t=CollectionListDropDown.getValue("#workation-season-dropdown"),e=CollectionListDropDown.getValue("#length-stay-dropdown"),n=document.querySelector("#rooms")?.getAttribute("data-currency")??"EUR",o=document.querySelectorAll(".room-list-item"),i=t?b(t):[];o.forEach(s=>{let r=s.getAttribute("data-roomslug"),a=s.getAttribute("data-allow-weekly-booking")==="Enabled",c=i.find(d=>d.roomSlug===r);ne(s,c,e,n,a)})}function ne(t,e,n,o,i){let s=t.querySelector(".room-item-price-breakdown"),r=t.querySelector(".room-item-price-month"),a=t.querySelector(".room-discount-text"),c=t.querySelector(".room-book-button"),d=t.querySelector(".room-item-price-not-avalable"),l=n&&n.startsWith("week"),u=d.innerText,f="Minimum length of stay for this room is 1 month",m=parseDecimalFromString(e?.basePriceWeek);if(!e||l&&!i||l&&i&&!m){d.innerText=l&&!i?f:u,d.style.display="flex",s.style.display="none",r.style.display="none",a.parentElement.style.display="none",c.style.opacity="0.5",c.style.pointerEvents="none",c.style.cursor="not-allowed";return}d.style.display="none",r.style.display="block",a.parentElement.style.display="flex",c.style.opacity="1",c.style.pointerEvents="auto",c.style.cursor="pointer";let h=e.basePriceMonth,w=e.discountMonth2,x=e.discountMonth3,L=h*(1-w/100),_=h*(1-x/100),y=m?g(m,o):"N/A",B=g(h,o),ee=!n||n.endsWith("-1");switch(s.style.display=ee?"none":"inline",n){case"week-1":r.innerText=`${y} / week`,a.innerText="Longer stays unlock better discounts!";break;case"week-2":s.innerText=`1st week: ${y}`,r.innerText=`${y} - 2nd week`,a.innerText="Longer stays unlock better discounts!";break;case"week-3":s.innerHTML=`
2
+ 1st week: ${y}<br>
3
+ 2nd week: ${y}`,r.innerText=`${y} - 3rd week`,a.innerText="Longer stays unlock better discounts!";break;default:case"month-1":r.innerText=`${B} / month`,a.innerText="Longer stays unlock better discounts!";break;case"month-2":s.innerText=`1st month: ${B}`,r.innerText=`${g(L,o)} - 2nd month`,a.parentElement.style.display=w==0?"none":"block",a.innerText=`${w.toFixed(1)}% discount for the 2nd month!`;break;case"month-3":s.innerHTML=`
4
4
  1st month: ${B}<br>
5
- 2nd month: ${h(L,r)}`,a.innerText=`${h(_,r)} - 3rd month`,c.parentElement.style.display=x==0?"none":"block",c.innerText=`${x.toFixed(1)}% discount for the 3rd month!`;break}}function C(t){let e=document.querySelectorAll(".dropdown-discount-2-months"),n=document.querySelectorAll(".dropdown-discount-3-months"),o=b(t),r=o.map(i=>i.discountMonth2),s=o.map(i=>i.discountMonth3);e.forEach(i=>{M(i,r)}),n.forEach(i=>{M(i,s)})}function M(t,e){if(!e||e.length===0){t.style.display="none";return}t.style.display="flex";let n=e.every(r=>r===e[0]),o=Math.min(...e);o==0?t.innerText="":t.innerText=`${o.toFixed(1)}% discount`,n||(t.innerText="From "+t.innerText)}function v(){let t=document.querySelectorAll(".room-book-button"),e=document.querySelector("#rooms")?.getAttribute("data-destination-slug");t.forEach(n=>{let o=n.querySelector("a"),r=o.getAttribute("href").split("?")[0],s=n.getAttribute("data-roomslug"),i=CollectionListDropDown.getValue("#workation-season-dropdown"),a=CollectionListDropDown.getValue("#guest-count-dropdown")??1;o.setAttribute("href",`${r}?destination=${encodeURIComponent(e)}&edition=${encodeURIComponent(i)}&room=${encodeURIComponent(s)}&guests=${encodeURIComponent(a)}`)})}function I(){let t=new URLSearchParams(window.location.search).get("edition"),e=document.querySelectorAll("#workation-season-dropdown .dropdown-item"),n=t??(e.length>0?e[0].getAttribute("data-value"):null);CollectionListDropDown.setValue("#workation-season-dropdown",n)}var O=p(()=>{$()});function P(){let t=document.getElementById("map-data").dataset.address;if(!t)return;new google.maps.Geocoder().geocode({address:t},function(n,o){if(o==="OK"){let r=new google.maps.Map(document.getElementById("map"),{zoom:14,center:n[0].geometry.location});new google.maps.Marker({map:r,position:n[0].geometry.location})}else console.error("Geocode failed: "+o)})}var V=p(()=>{});function U(){document.querySelectorAll("#upcoming-workations .swiper-slide").forEach(t=>{let e=t.getAttribute("data-booking-state")?.toLowerCase();e==="closed"?(t.style.opacity="0.5",t.style.pointerEvents="none",t.style.cursor="not-allowed"):e==="available soon"&&(t.style.pointerEvents="none",t.style.cursor="default")})}var F=p(()=>{});var H,N=p(()=>{H=function(){let t,e,n=null,o=null;function r(){let i=document.querySelector(o.refContainer),a=document.querySelector(o.swiperWrapper);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!i||!a||!e||!n)return console.error("Required elements not found"),null;let d=i.getBoundingClientRect().left,l=new Swiper(o.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetBefore:d,slidesOffsetAfter:16,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});return t=l,s(),l.on("slideChange",s),window.addEventListener("resize",()=>{let u=i.getBoundingClientRect().left;l&&l.params&&(l.params.slidesOffsetBefore=u,l.update())}),l}function s(){if(!e||!n)return;e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto";let i=t.maxTranslate();t.translate<=i+5?(n.style.opacity="0.5",n.style.pointerEvents="none"):(n.style.opacity="1",n.style.pointerEvents="auto")}return{init:function(i){o=i,document.addEventListener("DOMContentLoaded",function(){let a=document.querySelector(o.swiperWrapper);a.style.gap="0",r()})}}}()});var z,G=p(()=>{z=function(){let t,e,n=null,o=null;function r(){let i=document.querySelector(o.swiperWrapper);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!i||!e||!n)return console.error("Required elements not found"),null;let a=new Swiper(o.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetAfter:16,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});t=a,s(),a.on("slideChange",function(){s()});function c(){let l=i.getBoundingClientRect().left,u=document.querySelector("#features-cards-section .features-cards-carousel-container");u.style.width=`${window.innerWidth-l}px`,u.style.minWidth=`${window.innerWidth-l}px`,u.style.maxWidth=`${window.innerWidth-l}px`,i.style.width=`${window.innerWidth-l}px`,i.style.minWidth=`${window.innerWidth-l}px`,i.style.maxWidth=`${window.innerWidth-l}px`}return window.addEventListener("resize",c),c(),a}function s(){!e||!n||(e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto",n.style.opacity=t.isEnd?"0.5":"1",n.style.pointerEvents=t.isEnd?"none":"auto")}return{init:function(i){o=i,document.addEventListener("DOMContentLoaded",function(){let a=document.querySelector(o.swiperWrapper);a.style.gap="0",r()})}}}()});function j(){document.querySelectorAll("#edition-cards-section .edition-card-item").forEach(e=>{let n=e.querySelectorAll("a"),o=e.getAttribute("data-editionslug"),r=e.getAttribute("data-bookingstate");n.forEach(s=>{if(r=="Available Soon"){s.setAttribute("href","#"),s.style.cursor="auto";let i=s.querySelector(".edition-card-image");i.style.opacity=.4}else if(o){let i=s.getAttribute("href").split("?")[0];s.setAttribute("href",`${i}?edition=${encodeURIComponent(o)}`)}})})}var K,J=p(()=>{K=function(){let t,e,n=null,o=[],r=null;function s(){let a=document.querySelector(r.refContainer),c=document.querySelector(r.swiperWrapper);if(e=document.querySelector(r.prevButton),n=document.querySelector(r.nextButton),o=Array.from(document.querySelectorAll("#edition-cards-section .swiper .swiper-slide")),!a||!c||!e||!n)return console.error("Required elements not found"),null;let l=a.getBoundingClientRect().left,u=new Swiper(r.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetBefore:l,slidesOffsetAfter:16,navigation:{nextEl:r.nextButton,prevEl:r.prevButton},watchOverflow:!0});return t=u,i(),u.on("slideChange",i),window.addEventListener("resize",()=>{let f=a.getBoundingClientRect().left;u&&u.params&&(u.params.slidesOffsetBefore=f,u.update())}),u}function i(){if(!e||!n)return;e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto";let a=t.maxTranslate();t.translate<=a+5?(n.style.opacity="0.5",n.style.pointerEvents="none"):(n.style.opacity="1",n.style.pointerEvents="auto")}return{init:function(a){r=a,document.addEventListener("DOMContentLoaded",function(){let c=document.querySelector(r.swiperWrapper);c.style.gap="0",s()})},filterSeason(a){if(!t)return;let c=o.filter(d=>a==="all"||a===d.getAttribute("data-season"));t.removeAllSlides(),t.addSlide(0,c),t.slideTo(0,0,!1),i()}}}()});function Q(){let t=document.querySelectorAll(".filter-button"),e=document.querySelectorAll(".filter-list-item");t.forEach(o=>{o.addEventListener("click",function(){t.forEach(s=>s.classList.remove("active")),this.classList.add("active");let r=this.getAttribute("data-season");r==="all"?e.forEach(s=>{s.classList.remove("filtered-out")}):e.forEach(s=>{s.getAttribute("data-season")===r?s.classList.remove("filtered-out"):s.classList.add("filtered-out")})})});let n=document.querySelector('[data-season="all"]');n&&n.click()}var X=p(()=>{});function Y(){function t(e){let n=document.createElement("a");return n.href="#",n.textContent=e?"Read more":"Read less",n.style.display="inline-block",n.style.color="#0a4915",n.style.fontWeight="600",n}document.querySelectorAll("[data-read-more]").forEach(e=>{let n=parseInt(e.getAttribute("data-read-more"),10);if(isNaN(n)||e.scrollHeight<=n)return;e.style.maxHeight=n+"px",e.style.overflow="hidden",e.dataset.readMoreState="collapsed";let o=t(!0);e.insertAdjacentElement("afterend",o),o.addEventListener("click",function(r){r.preventDefault(),e.dataset.readMoreState==="collapsed"?(e.style.maxHeight=e.scrollHeight+"px",e.dataset.readMoreState="expanded",this.textContent="Read less"):(e.style.maxHeight=n+"px",e.dataset.readMoreState="collapsed",this.textContent="Read more")})})}var Z=p(()=>{});var re=ne(()=>{A();T();D();R();O();V();F();N();G();J();X();Z();window.CollectionListDropDown=S;S.init({selector:"#workation-season-dropdown",onChange:t=>{let e=t.getAttribute("data-value");C(e),E(),v()}});S.init({selector:"#length-stay-dropdown",initialValue:"month-3",onChange:()=>E()});S.init({selector:"#guest-count-dropdown",initialValue:"1",onChange:()=>{E(),v()}});k.init({selectorId:"#impressions-cards-slider-1",isReverse:!1});k.init({selectorId:"#impressions-cards-slider-2",isReverse:!0});W.init({selectors:{swiper:"#upcoming-workations .swiper",swiperWrapper:"#upcoming-workations .swiper-wrapper",swiperSlides:"#upcoming-workations .upcoming-workation-card",prevButton:"#upcoming-workations-swiper-prev-btn",nextButton:"#upcoming-workations-swiper-next-btn"},onItemClick:t=>{let e=t.getAttribute("data-edition");window.CollectionListDropDown.setValue("#workation-season-dropdown",e)}});H.init({refContainer:"#activity-cards-swiper-ref-container",swiper:"#activity-cards-section .swiper",swiperWrapper:"#activity-cards-section .swiper-wrapper",prevButton:"#activity-cards-swiper-prev-btn",nextButton:"#activity-cards-swiper-next-btn"});z.init({swiper:"#features-cards-section .swiper",swiperWrapper:"#features-cards-section .swiper-wrapper",prevButton:"#features-cards-btn-left",nextButton:"#features-cards-btn-right"});K.init({refContainer:"#edition-cards-swiper-ref-container",swiper:"#edition-cards-section .swiper",swiperWrapper:"#edition-cards-section .swiper-wrapper",prevButton:"#edition-cards-swiper-prev-btn",nextButton:"#edition-cards-swiper-next-btn"});document.addEventListener("DOMContentLoaded",function(){q("#destination-testimonials-section"),I(),E(),C(),v(),P(),U(),j(),Q(),Y()})});re();})();
5
+ 2nd month: ${g(L,o)}`,r.innerText=`${g(_,o)} - 3rd month`,a.parentElement.style.display=x==0?"none":"block",a.innerText=`${x.toFixed(1)}% discount for the 3rd month!`;break}}function C(t){let e=document.querySelectorAll(".dropdown-discount-2-months"),n=document.querySelectorAll(".dropdown-discount-3-months"),o=b(t),i=o.map(r=>r.discountMonth2),s=o.map(r=>r.discountMonth3);e.forEach(r=>{M(r,i)}),n.forEach(r=>{M(r,s)})}function M(t,e){if(!e||e.length===0){t.style.display="none";return}t.style.display="flex";let n=e.every(i=>i===e[0]),o=Math.min(...e);o==0?t.innerText="":t.innerText=`${o.toFixed(1)}% discount`,n||(t.innerText="From "+t.innerText)}function v(){let t=document.querySelectorAll(".room-book-button"),e=document.querySelector("#rooms")?.getAttribute("data-destination-slug");t.forEach(n=>{let o=n.querySelector("a"),i=o.getAttribute("href").split("?")[0],s=n.getAttribute("data-roomslug"),r=CollectionListDropDown.getValue("#workation-season-dropdown"),a=CollectionListDropDown.getValue("#guest-count-dropdown")??1;o.setAttribute("href",`${i}?destination=${encodeURIComponent(e)}&edition=${encodeURIComponent(r)}&room=${encodeURIComponent(s)}&guests=${encodeURIComponent(a)}`)})}function I(){let t=new URLSearchParams(window.location.search).get("edition"),e=document.querySelectorAll("#workation-season-dropdown .dropdown-item"),n=t??(e.length>0?e[0].getAttribute("data-value"):null);CollectionListDropDown.setValue("#workation-season-dropdown",n)}var O=p(()=>{$()});function P(){let t=document.getElementById("map-data").dataset.address;if(!t)return;new google.maps.Geocoder().geocode({address:t},function(n,o){if(o==="OK"){let i=new google.maps.Map(document.getElementById("map"),{zoom:14,center:n[0].geometry.location});new google.maps.Marker({map:i,position:n[0].geometry.location})}else console.error("Geocode failed: "+o)})}var U=p(()=>{});function V(){document.querySelectorAll("#upcoming-workations .swiper-slide").forEach(t=>{let e=t.getAttribute("data-booking-state")?.toLowerCase();e==="closed"?(t.style.opacity="0.5",t.style.pointerEvents="none",t.style.cursor="not-allowed"):e==="available soon"&&(t.style.pointerEvents="none",t.style.cursor="default")})}var F=p(()=>{});var N,H=p(()=>{N=function(){let t,e,n=null,o=null;function i(){let r=document.querySelector(o.refContainer),a=document.querySelector(o.swiperWrapper);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!r||!a||!e||!n)return console.error("Required elements not found"),null;let d=r.getBoundingClientRect().left,l=new Swiper(o.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetBefore:d,slidesOffsetAfter:16,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});return t=l,s(),l.on("slideChange",s),window.addEventListener("resize",()=>{let u=r.getBoundingClientRect().left;l&&l.params&&(l.params.slidesOffsetBefore=u,l.update())}),l}function s(){if(!e||!n)return;e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto";let r=t.maxTranslate();t.translate<=r+5?(n.style.opacity="0.5",n.style.pointerEvents="none"):(n.style.opacity="1",n.style.pointerEvents="auto")}return{init:function(r){o=r,document.addEventListener("DOMContentLoaded",function(){let a=document.querySelector(o.swiperWrapper);a.style.gap="0",i()})}}}()});var z,G=p(()=>{z=function(){let t,e,n=null,o=null;function i(){let r=document.querySelector(o.swiperWrapper);if(e=document.querySelector(o.prevButton),n=document.querySelector(o.nextButton),!r||!e||!n)return console.error("Required elements not found"),null;let a=new Swiper(o.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetAfter:16,navigation:{nextEl:o.nextButton,prevEl:o.prevButton},watchOverflow:!0});t=a,s(),a.on("slideChange",function(){s()});function c(){let l=r.getBoundingClientRect().left,u=document.querySelector("#features-cards-section .features-cards-carousel-container");u.style.width=`${window.innerWidth-l}px`,u.style.minWidth=`${window.innerWidth-l}px`,u.style.maxWidth=`${window.innerWidth-l}px`,r.style.width=`${window.innerWidth-l}px`,r.style.minWidth=`${window.innerWidth-l}px`,r.style.maxWidth=`${window.innerWidth-l}px`}return window.addEventListener("resize",c),c(),a}function s(){!e||!n||(e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto",n.style.opacity=t.isEnd?"0.5":"1",n.style.pointerEvents=t.isEnd?"none":"auto")}return{init:function(r){o=r,document.addEventListener("DOMContentLoaded",function(){let a=document.querySelector(o.swiperWrapper);a.style.gap="0",i()})}}}()});function j(){document.querySelectorAll("#edition-cards-section .edition-card-item").forEach(e=>{let n=e.querySelectorAll("a"),o=e.getAttribute("data-editionslug"),i=e.getAttribute("data-bookingstate");n.forEach(s=>{if(i=="Available Soon"){s.setAttribute("href","#"),s.style.cursor="auto";let r=s.querySelector(".edition-card-image");r.style.opacity=.4}else if(o){let r=s.getAttribute("href").split("?")[0];s.setAttribute("href",`${r}?edition=${encodeURIComponent(o)}`)}})})}var K,J=p(()=>{K=function(){let t,e,n=null,o=[],i=null;function s(){let a=document.querySelector(i.refContainer),c=document.querySelector(i.swiperWrapper);if(e=document.querySelector(i.prevButton),n=document.querySelector(i.nextButton),o=Array.from(document.querySelectorAll("#edition-cards-section .swiper .swiper-slide")),!a||!c||!e||!n)return console.error("Required elements not found"),null;let l=a.getBoundingClientRect().left,u=new Swiper(i.swiper,{slidesPerView:"auto",spaceBetween:16,freeMode:!1,slidesOffsetBefore:l,slidesOffsetAfter:16,navigation:{nextEl:i.nextButton,prevEl:i.prevButton},watchOverflow:!0});return t=u,r(),u.on("slideChange",r),window.addEventListener("resize",()=>{let f=a.getBoundingClientRect().left;u&&u.params&&(u.params.slidesOffsetBefore=f,u.update())}),u}function r(){if(!e||!n)return;e.style.opacity=t.isBeginning?"0.5":"1",e.style.pointerEvents=t.isBeginning?"none":"auto";let a=t.maxTranslate();t.translate<=a+5?(n.style.opacity="0.5",n.style.pointerEvents="none"):(n.style.opacity="1",n.style.pointerEvents="auto")}return{init:function(a){i=a,document.addEventListener("DOMContentLoaded",function(){let c=document.querySelector(i.swiperWrapper);c.style.gap="0",s()})},filterSeason(a){if(!t)return;let c=o.filter(d=>a==="all"||a===d.getAttribute("data-season"));t.removeAllSlides(),t.addSlide(0,c),t.slideTo(0,0,!1),r()}}}()});function Q(){let t=document.querySelectorAll(".filter-button"),e=document.querySelectorAll(".filter-list-item");t.forEach(o=>{o.addEventListener("click",function(){t.forEach(s=>s.classList.remove("active")),this.classList.add("active");let i=this.getAttribute("data-season");i==="all"?e.forEach(s=>{s.classList.remove("filtered-out")}):e.forEach(s=>{s.getAttribute("data-season")===i?s.classList.remove("filtered-out"):s.classList.add("filtered-out")})})});let n=document.querySelector('[data-season="all"]');n&&n.click()}var X=p(()=>{});function Y(){function t(e){let n=document.createElement("a");return n.href="#",n.textContent=e?"Read more":"Read less",n.style.display="inline-block",n.style.color="#0a4915",n.style.fontWeight="600",n}document.querySelectorAll("[data-read-more]").forEach(e=>{let n=parseInt(e.getAttribute("data-read-more"),10);if(isNaN(n)||e.scrollHeight<=n)return;e.style.maxHeight=n+"px",e.style.overflow="hidden",e.dataset.readMoreState="collapsed";let o=t(!0);e.insertAdjacentElement("afterend",o),o.addEventListener("click",function(i){i.preventDefault(),e.dataset.readMoreState==="collapsed"?(e.style.maxHeight=e.scrollHeight+"px",e.dataset.readMoreState="expanded",this.textContent="Read less"):(e.style.maxHeight=n+"px",e.dataset.readMoreState="collapsed",this.textContent="Read more")})})}var Z=p(()=>{});var oe=te(()=>{A();T();W();R();O();U();F();H();G();J();X();Z();window.CollectionListDropDown=S;S.init({selector:"#workation-season-dropdown",onChange:t=>{let e=t.getAttribute("data-value");C(e),E(),v()}});S.init({selector:"#length-stay-dropdown",initialValue:"month-3",onChange:()=>E()});S.init({selector:"#guest-count-dropdown",initialValue:"1",onChange:()=>{E(),v()}});k.init({selectorId:"#impressions-cards-slider-1",isReverse:!1});k.init({selectorId:"#impressions-cards-slider-2",isReverse:!0});D.init({selectors:{swiper:"#upcoming-workations .swiper",swiperWrapper:"#upcoming-workations .swiper-wrapper",swiperSlides:"#upcoming-workations .upcoming-workation-card",prevButton:"#upcoming-workations-swiper-prev-btn",nextButton:"#upcoming-workations-swiper-next-btn"},onItemClick:t=>{let e=t.getAttribute("data-edition");window.CollectionListDropDown.setValue("#workation-season-dropdown",e)}});N.init({refContainer:"#activity-cards-swiper-ref-container",swiper:"#activity-cards-section .swiper",swiperWrapper:"#activity-cards-section .swiper-wrapper",prevButton:"#activity-cards-swiper-prev-btn",nextButton:"#activity-cards-swiper-next-btn"});z.init({swiper:"#features-cards-section .swiper",swiperWrapper:"#features-cards-section .swiper-wrapper",prevButton:"#features-cards-btn-left",nextButton:"#features-cards-btn-right"});K.init({refContainer:"#edition-cards-swiper-ref-container",swiper:"#edition-cards-section .swiper",swiperWrapper:"#edition-cards-section .swiper-wrapper",prevButton:"#edition-cards-swiper-prev-btn",nextButton:"#edition-cards-swiper-next-btn"});document.addEventListener("DOMContentLoaded",function(){q("#destination-testimonials-section"),I(),E(),C(),v(),P(),V(),j(),Q(),Y()})});oe();})();
6
6
  //# sourceMappingURL=bundle-destination.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../pages/destination/testimonials.js", "../controls/collectionListDropdown.js", "../components/impression-cards-carousel.js", "../components/upcoming-workations-carousel.js", "../utils/commonUtils.js", "../pages/destination/rooms-list.js", "../pages/destination/location-map.js", "../pages/destination/upcoming-workations.js", "../components/activity-cards.js", "../components/feature-slider.js", "../components/upcoming-editions.js", "../components/upcoming-editions-filter.js", "../utils/readMore.js", "../pages/destination/index.js"],
4
- "sourcesContent": ["\nexport function initTestimonials (selectorId) {\n const allTestimonials = document.querySelectorAll(`${selectorId} .destination-testimonials-item`);\n const allAuthorSlots = document.querySelectorAll(`${selectorId} .dyn-author-image`);\n \n if (!allTestimonials || allTestimonials.length === 0) {\n \tconsole.error(\"No testimonials found\");\n\t return;\n }\n\n let currentIndex = 0;\n\n // Hide all testimonials initially\n allTestimonials.forEach((el) => el.style.display = \"none\");\n allAuthorSlots.forEach((slot) => {\n slot.style.display = \"none\";\n slot.classList.remove(\"active\");\n });\n\n // Show initial\n function showTestimonial(index) {\n allTestimonials.forEach((el, i) => {\n el.style.display = i === index ? \"block\" : \"none\";\n });\n allAuthorSlots.forEach((slot, i) => {\n slot.classList.toggle(\"active\", i === index);\n });\n currentIndex = index;\n }\n\n // Inject author images into slots\n const authors = [...allTestimonials];\n authors.forEach((testimonial, index) => {\n const imgUrl = testimonial.querySelector('.testimonial-card-author-image')?.src;\n const slot = document.querySelector(`${selectorId} [data-slot=\"${index+1}\"]`);\n //const testimonialSlug = testimonial.dataset.slug;\n\n if (slot && imgUrl) {\n\t slot.src = imgUrl;\n slot.style.display = \"inline\";\n if (index === 0) slot.classList.add(\"active\");\n\n slot.addEventListener('click', () => {\n showTestimonial(index);\n });\n }\n });\n\n // Initial display\n showTestimonial(0);\n\n // Add navigation button logic\n const prevBtn = document.getElementById('destination-testimonials-btn-left');\n const nextBtn = document.getElementById('destination-testimonials-btn-right');\n\n if (prevBtn) {\n prevBtn.addEventListener('click', () => {\n const newIndex = (currentIndex - 1 + authors.length) % authors.length;\n showTestimonial(newIndex);\n });\n }\n\n if (nextBtn) {\n nextBtn.addEventListener('click', () => {\n const newIndex = (currentIndex + 1) % authors.length;\n showTestimonial(newIndex);\n });\n }\n}", "export const CollectionListDropDown = (function () {\n // Store dropdown instances to access them later\n const dropdowns = {};\n \n function initDropDown(selector, onChange, initialValue) {\n const container = document.querySelector(selector);\n const dropdown = document.querySelector(`${selector}.w-dropdown`);\n const dropdownToggle = container.querySelector(`${selector} .w-dropdown-toggle`); \n const dropdownList = container.querySelector(`${selector} .w-dropdown-list`);\n const selectedItemValueContainer = container.querySelector(`${selector} .dropdown-selected-value`);\n const collectionItems = container.querySelectorAll(`${selector} .dropdown-item`);\n \n // Store this dropdown instance data for later access\n dropdowns[selector] = {\n container,\n dropdown,\n dropdownToggle,\n dropdownList,\n selectedItemValueContainer,\n collectionItems,\n onChange\n };\n \n collectionItems.forEach(item => {\n item.addEventListener('click', function(event) {\n event.preventDefault(); // Prevent default link behavior if using Link Blocks\n const selectedOption = this;\n selectDropDownElement(selector, selectedOption);\n \n onChange && onChange(selectedOption);\n // Close the dropdown\n dropdownList.classList.remove('w--open'); // Close the dropdown\n // Move focus away to reset dropdown behavior\n dropdown.blur();\n });\n });\n \n if (initialValue) {\n const item = getElementByItemValue(selector, initialValue);\n if (item) { \n setTimeout(() => {\n item.click(); // Simulate a click on the matching item to activate filter\n }, 200);\n }\n }\n }\n \n function selectDropDownElement(selector, selectedItem) {\n const dropdown = dropdowns[selector];\n if (!dropdown) return;\n \n const selectedItemValueContainer = dropdown.selectedItemValueContainer;\n \n while (selectedItemValueContainer.firstChild) {\n selectedItemValueContainer.removeChild(selectedItemValueContainer.firstChild);\n }\n \n const sourceElement = selectedItem;\n if (sourceElement) {\n const clonedElement = sourceElement.cloneNode(true);\n selectedItemValueContainer.appendChild(clonedElement);\n const currentValue = sourceElement.getAttribute('data-value');\n dropdown.dropdown.setAttribute('data-current-value', currentValue);\n } else {\n console.error(\"SelectedItem Element not found.\", selectedItem);\n }\n }\n \n function getElementByItemValue(selector, value) {\n const dropdown = dropdowns[selector];\n return Array.from(dropdown.collectionItems).find((x) => {\n return x.getAttribute('data-value') === value;\n });\n }\n \n // Public methods\n return {\n init: function({ selector, onChange, initialValue }) {\n document.addEventListener('DOMContentLoaded', function() {\n initDropDown(selector, onChange, initialValue);\n });\n },\n // Add a new public method to change dropdown value from outside\n setValue: function(selector, value) {\n const item = getElementByItemValue(selector, value);\n if (item) {\n item.click(); // Trigger the click event on the item\n } else if (value !== undefined && value !== null) {\n console.error(`No item with value '${value}' found in dropdown '${selector}'`);\n }\n },\n // Get currently selected dropdown value\n getValue: function(selector) {\n const dropdown = dropdowns[selector];\n return dropdown.dropdown.getAttribute('data-current-value');\n }\n };\n})();", "export const ImpressionCardsCarousel = (function () {\n\tlet swiperInstance = null;\n \n function initSwiper({selectorId, isReverse}) {\n const swiperWrapper = document.querySelector(`${selectorId} .swiper-wrapper`);\n\n if (!swiperWrapper) {\n console.error('Required elements not found');\n return null;\n } \n \n // Initialize Swiper\n const swiper = new Swiper(`${selectorId}.swiper`, {\n spaceBetween: 16,\n loop: true,\n slidesPerView: \"auto\",\n freeMode: true,\n speed: 6500,\n autoplay: {\n delay: 0,\n disableOnInteraction: false,\n reverseDirection: isReverse,\n pauseOnMouseEnter: false\n },\n });\n\n\t\tswiperInstance = swiper;\n\n\t\treturn swiper;\n }\n\n // Public methods\n return {\n init: function({selectorId, isReverse}) {\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(`${selectorId} .swiper-wrapper`);\n swiperWrapper.style.gap = '0';\n swiperWrapper.style.setProperty(\"transition-timing-function\", \"linear\", \"important\");\n \t\n // Initialize swiper\n initSwiper({selectorId, isReverse});\n });\n }\n };\n})();", "\nexport const UpcomingWorkationsCarousel = (function () {\n\tlet swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null; // Declare SELECTORS as null initially\n\n function initSwiper({onItemClick}) {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n const swiperSlides = document.querySelectorAll(SELECTORS.swiperSlides);\n\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!swiperWrapper || !prevButton || !nextButton || !swiperSlides) {\n console.error('Required elements not found');\n return null;\n } \n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n direction: \"vertical\",\n slidesPerView: \"auto\",\n spaceBetween: 8,\n freeMode: false,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\t\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', function () {\n updateButtonsState();\n });\n \n if (onItemClick) {\n swiperSlides.forEach(slide => {\n slide.addEventListener('click', (e) => onItemClick(e.currentTarget));\n });\n }\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n\t\tnextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n }\n\n // Public methods\n return {\n init: function({selectors, onItemClick}) {\n SELECTORS = selectors;\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \t\n // Initialize swiper\n initSwiper({onItemClick});\n });\n }\n };\n})();", "\n// Get all room price data - this is done by a collection list element creating:\n// < script type=\"application/json\" class=\"room-price-data\"> \n// {\n// \"roomSlug\": \"\",\n// \"editionSlug\": \"\",\n// \"basePriceWeek\": ,\n// \"basePriceMonth\": ,\n// \"discountMonth2\": ,\n// \"discountMonth3\":\n// }\n// </ script > \nexport function getAllRoomPrices(editionSlugFilter) {\n const priceElements = document.querySelectorAll('.room-price-data');\n const roomPrices = Array.from(priceElements).map(x => JSON.parse(x.textContent));\n if (!editionSlugFilter) {\n \treturn roomPrices;\n }\n return roomPrices.filter((x) => x.editionSlug === editionSlugFilter)\n}\n\n// calculate month difference while 1 month is always 30 days\nexport function getMonthDifference(startDate, endDate) {\n if (!startDate || !endDate) return 0;\n return Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24 * 30)); \n}\n\nexport function formatPrice(price, currency) {\n\t// That\u2019s the locale for German, which uses the formatting style we\u2019re after. \n // We could also use 'fr-FR', 'it-IT', etc. \u2014 most European locales format this way.\n return new Intl.NumberFormat('de-DE', {\n style: 'currency',\n \tcurrency,\n currencyDisplay: 'code'\n }).format(price);\n}\n", "import { getAllRoomPrices, formatPrice } from \"../../utils/commonUtils\"\n\n// Updates all room prices in the list based on selected values on the dropdowns\nexport function updateRoomPrices() {\n\tconst editionSlug = CollectionListDropDown.getValue(\"#workation-season-dropdown\");\n const lengthOfStay = CollectionListDropDown.getValue(\"#length-stay-dropdown\");\n const guestCount = parseInt(CollectionListDropDown.getValue(\"#guest-count-dropdown\"));\n const currency = document.querySelector(\"#rooms\")?.getAttribute(\"data-currency\") ?? \"EUR\";\n\n // Get all room items\n const allRooms = document.querySelectorAll('.room-list-item');\n \n const roomEditionPrices = editionSlug ? getAllRoomPrices(editionSlug) : []; //if no edition selected, we still want to loop and hide prices\n allRooms.forEach((room) => {\n const roomSlug = room.getAttribute('data-roomslug');\n const allowWeeklyBooking = room.getAttribute('data-allow-weekly-booking') === \"Enabled\";\n const roomEditionPrice = roomEditionPrices.find((x) => x.roomSlug === roomSlug);\n updateRoomPrice(room, roomEditionPrice, lengthOfStay, guestCount, currency, allowWeeklyBooking);\n });\n}\n\n// Updates the price of one room\nfunction updateRoomPrice(room, roomEditionPrice, lengthOfStay, guestCount, currency, allowWeeklyBooking) {\n const priceBreakdownElem = room.querySelector('.room-item-price-breakdown');\n const priceMonthElem = room.querySelector('.room-item-price-month');\n const roomDiscountElem = room.querySelector('.room-discount-text');\n const roomBookButton = room.querySelector('.room-book-button');\n const noPriceAvailable = room.querySelector('.room-item-price-not-avalable');\n const isWeekBooking = lengthOfStay && lengthOfStay.startsWith(\"week\");\n\n const noPriceAvailableText = noPriceAvailable.innerText;\n const weeklyBookingText = \"Minimum length of stay for this room is 1 month\";\n\n // if there is no price set for the room, hide all prices and booking button\n if (!roomEditionPrice || (isWeekBooking && !allowWeeklyBooking)) {\n noPriceAvailable.innerText = (isWeekBooking && !allowWeeklyBooking) ? weeklyBookingText : noPriceAvailableText;\n\t noPriceAvailable.style.display = 'flex';\n priceBreakdownElem.style.display = 'none';\n priceMonthElem.style.display = 'none';\n roomDiscountElem.parentElement.style.display = 'none';\n roomBookButton.style.opacity = \"0.5\";\n roomBookButton.style.pointerEvents = \"none\";\n roomBookButton.style.cursor = \"not-allowed\";\n return;\n }\n \n // reset all elements in case they were hidden before\n noPriceAvailable.style.display = 'none';\n priceMonthElem.style.display = 'block';\n roomDiscountElem.parentElement.style.display = 'flex';\n roomBookButton.style.opacity = \"1\";\n roomBookButton.style.pointerEvents = \"auto\";\n roomBookButton.style.cursor = \"pointer\";\n \n const basePriceMonth = roomEditionPrice.basePriceMonth * guestCount;\n\n const discount2months = roomEditionPrice.discountMonth2;\n const discount3months = roomEditionPrice.discountMonth3;\n const price2Month = basePriceMonth * (1 - discount2months / 100);\n const price3Month = basePriceMonth * (1 - discount3months / 100);\n\n const weeklyPrice = basePriceMonth / 30 * 7;\n const weeklyPriceFormatted = formatPrice(weeklyPrice, currency);\n const basePriceFormatted = formatPrice(basePriceMonth, currency);\n\n // Hide price breakdown if guest stays only 1 month or 1 week (or no length is selected), else show it\n const hidePriceBreakdown = !lengthOfStay || lengthOfStay.endsWith(\"-1\");\n priceBreakdownElem.style.display = hidePriceBreakdown ? 'none' : 'inline';\n\n switch (lengthOfStay) {\n case 'week-1':\n priceMonthElem.innerText = `${weeklyPriceFormatted} / week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n \n case 'week-2':\n priceBreakdownElem.innerText = `1st week: ${weeklyPriceFormatted}`;\n priceMonthElem.innerText = `${weeklyPriceFormatted} - 2nd week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n \n case 'week-3':\n priceBreakdownElem.innerHTML = `\n \t1st week: ${weeklyPriceFormatted}<br>\n 2nd week: ${weeklyPriceFormatted}`;\n priceMonthElem.innerText = `${weeklyPriceFormatted} - 3rd week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n\n default:\n case 'month-1':\n priceMonthElem.innerText = `${basePriceFormatted} / month`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n\n case 'month-2':\n priceBreakdownElem.innerText = `1st month: ${basePriceFormatted}`;\n priceMonthElem.innerText = `${formatPrice(price2Month, currency)} - 2nd month`;\n roomDiscountElem.parentElement.style.display = (discount2months == 0) ? \"none\": \"block\";\n roomDiscountElem.innerText = `${discount2months.toFixed(1)}% discount for the 2nd month!`;\n break;\n\n case 'month-3':\n priceBreakdownElem.innerHTML = `\n \t1st month: ${basePriceFormatted}<br>\n 2nd month: ${formatPrice(price2Month, currency)}`;\n priceMonthElem.innerText = `${formatPrice(price3Month, currency)} - 3rd month`;\n \n roomDiscountElem.parentElement.style.display = (discount3months == 0) ? \"none\": \"block\";\n roomDiscountElem.innerText = `${discount3months.toFixed(1)}% discount for the 3rd month!`;\n break;\n }\n}\n\n// updates the discount elements in the length of stay dropdown\nexport function updateLengthOfStayDropdownDiscounts(editionSlug) {\n const months2discountElems = document.querySelectorAll('.dropdown-discount-2-months');\n const months3discountElems = document.querySelectorAll('.dropdown-discount-3-months');\n \n const roomEditionPrices = getAllRoomPrices(editionSlug);\n const discounts2months = roomEditionPrices.map((x) => x.discountMonth2);\n const discounts3months = roomEditionPrices.map((x) => x.discountMonth3);\n \n //need to be forEach because if an item is selected there are 2 (selected one and in dropdown)\n months2discountElems.forEach((elem) => {\n \tupdateLengthOfStayDropdownDiscount(elem, discounts2months);\n });\n months3discountElems.forEach((elem) => {\n \tupdateLengthOfStayDropdownDiscount(elem, discounts3months);\n });\n}\n\n// updates a single discount element in the length of stay dropdown\nfunction updateLengthOfStayDropdownDiscount(elem, discounts) {\n\tif (!discounts || discounts.length === 0) {\n \telem.style.display = 'none';\n return;\n }\n elem.style.display = 'flex'; // reset previous hide\n\n const allEqual = discounts.every(val => val === discounts[0]);\n const lowestDiscount = Math.min(...discounts);\n if (lowestDiscount == 0) {\n \telem.innerText = ``;\n } else {\n \telem.innerText = `${lowestDiscount.toFixed(1)}% discount`;\n }\n if (!allEqual) {\n elem.innerText = 'From ' + elem.innerText;\n }\n}\n\n// loop through all rooms and update the booking URLs accoring to the filter values\nexport function updateAllRoomBookingButtonsUrls() {\n\tconst allBookingButtons = document.querySelectorAll(\".room-book-button\");\n const destinationSlug = document.querySelector(\"#rooms\")?.getAttribute(\"data-destination-slug\");\n \n allBookingButtons.forEach((bookingButton) => {\n \tconst bookingLinkElem = bookingButton.querySelector(\"a\");\n const baseUrl = bookingLinkElem.getAttribute(\"href\").split(\"?\")[0]; // Remove existing query params\n\n\t\tconst roomSlug = bookingButton.getAttribute(\"data-roomslug\");\n const editionSlug = CollectionListDropDown.getValue(\"#workation-season-dropdown\");\n\t const guestsCount = CollectionListDropDown.getValue(\"#guest-count-dropdown\") ?? 1;\n\n // Update the link's href with the new query parameters\n bookingLinkElem.setAttribute(\"href\", `${baseUrl}` +\n \t`?destination=${encodeURIComponent(destinationSlug)}` +\n \t`&edition=${encodeURIComponent(editionSlug)}` +\n `&room=${encodeURIComponent(roomSlug)}` +\n `&guests=${encodeURIComponent(guestsCount)}`);\n });\n}\n\n// set initial value of the workation season dropdown\nexport function setInitialWorkationSeasonDropdownItem() {\n\tconst editionSlugQueryParam = new URLSearchParams(window.location.search).get(\"edition\");\n\tconst workationSeasonItems = document.querySelectorAll(\"#workation-season-dropdown .dropdown-item\");\n\tconst workationInitialValue = editionSlugQueryParam ?? (workationSeasonItems.length > 0 ? workationSeasonItems[0].getAttribute('data-value') : null);\n\tCollectionListDropDown.setValue(\"#workation-season-dropdown\", workationInitialValue);\n}\n", "export function initLocationMap () {\n const address = document.getElementById(\"map-data\").dataset.address;\n if (!address) return;\n\n // Geocode the address to get coordinates\n const geocoder = new google.maps.Geocoder();\n\n geocoder.geocode({ address: address }, function (results, status) {\n if (status === \"OK\") {\n const map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 14,\n center: results[0].geometry.location,\n });\n\n new google.maps.Marker({\n map: map,\n position: results[0].geometry.location,\n });\n } else {\n console.error(\"Geocode failed: \" + status);\n }\n });\n}", "export function initUpcomingWorkations() {\n //reducing opacity for all CLOSED booking states \n document.querySelectorAll(\"#upcoming-workations .swiper-slide\").forEach(item => {\n let bookingState = item.getAttribute(\"data-booking-state\")?.toLowerCase();\n if (bookingState === \"closed\") {\n item.style.opacity = \"0.5\";\n item.style.pointerEvents = \"none\";\n\t\t\titem.style.cursor = \"not-allowed\";\n } else if (bookingState === \"available soon\") {\n item.style.pointerEvents = \"none\";\n item.style.cursor = \"default\";\n }\n });\n}\n", "export const ActivityCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null;\n\n function initSwiper() {\n const refContainer = document.querySelector(SELECTORS.refContainer); \n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!refContainer || !swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n \n const refRect = refContainer.getBoundingClientRect();\n const offsetBefore = refRect.left;\n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetBefore: offsetBefore,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n swiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', updateButtonsState);\n \n // Add resize event listener separately\n window.addEventListener('resize', () => {\n const newOffsetBefore = refContainer.getBoundingClientRect().left;\n // Check if Swiper instance exists and has a method to update params\n if (swiper && swiper.params) {\n swiper.params.slidesOffsetBefore = newOffsetBefore;\n swiper.update(); // Refresh Swiper\n }\n });\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n if (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n //nextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n ////nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n // Get Swiper's max translate position\n const maxTranslate = swiperInstance.maxTranslate();\n const currentTranslate = swiperInstance.translate;\n\n if (currentTranslate <= maxTranslate + 5) { // buffer of 5 to prevent minor calculation errors.\n nextButton.style.opacity = '0.5';\n nextButton.style.pointerEvents = 'none';\n } else {\n nextButton.style.opacity = '1';\n nextButton.style.pointerEvents = 'auto';\n }\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n\n document.addEventListener('DOMContentLoaded', function() {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n\n // Initialize swiper\n initSwiper();\n });\n }\n };\n})();", "export const FeaturesCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null;\n\n function initSwiper() {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\t\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', function () {\n updateButtonsState();\n });\n \n \n function setWrapperWidth() {\n const wrapperRect = swiperWrapper.getBoundingClientRect();\n \tconst wrapperBefore = wrapperRect.left;\n const carouselContainer = document.querySelector('#features-cards-section .features-cards-carousel-container')\n \n carouselContainer.style.width = `${window.innerWidth - wrapperBefore}px`;\n carouselContainer.style.minWidth = `${window.innerWidth - wrapperBefore}px`;\n carouselContainer.style.maxWidth = `${window.innerWidth - wrapperBefore}px`;\n\n swiperWrapper.style.width = `${window.innerWidth - wrapperBefore}px`;\n swiperWrapper.style.minWidth = `${window.innerWidth - wrapperBefore}px`;\n swiperWrapper.style.maxWidth = `${window.innerWidth - wrapperBefore}px`;\n }\n\n window.addEventListener('resize', setWrapperWidth);\n setWrapperWidth(); \n \n // Add resize event listener separately\n //window.addEventListener('resize', () => {\n // const newOffsetBefore = refContainer.getBoundingClientRect().left;\n // Check if Swiper instance exists and has a method to update params\n // if (swiper && swiper.params) {\n // swiper.params.slidesOffsetBefore = newOffsetBefore;\n // swiper.update(); // Refresh Swiper\n // }\n //});\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n\t\tnextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n \tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\t\tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \n // Initialize swiper\n initSwiper();\n\t\t\t});\n }\n };\n})();\n", "export const EditionCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let allSlides = []; // we need to store them for filtering \n let SELECTORS = null; \n\n function initSwiper() {\n const refContainer = document.querySelector(SELECTORS.refContainer); \n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n allSlides = Array.from(document.querySelectorAll('#edition-cards-section .swiper .swiper-slide'));\n\n if (!refContainer || !swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n \n\t\tconst refRect = refContainer.getBoundingClientRect();\n \tconst offsetBefore = refRect.left;\n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetBefore: offsetBefore,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n \tprevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', updateButtonsState);\n \n // Add resize event listener separately\n window.addEventListener('resize', () => {\n const newOffsetBefore = refContainer.getBoundingClientRect().left;\n\n // Check if Swiper instance exists and has a method to update params\n if (swiper && swiper.params) {\n swiper.params.slidesOffsetBefore = newOffsetBefore;\n swiper.update(); // Refresh Swiper\n }\n });\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n //nextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n //nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n // Get Swiper's max translate position\n const maxTranslate = swiperInstance.maxTranslate();\n const currentTranslate = swiperInstance.translate;\n\n if (currentTranslate <= maxTranslate + 5) { // buffer of 5 to prevent minor calculation errors.\n nextButton.style.opacity = '0.5';\n nextButton.style.pointerEvents = 'none';\n } else {\n nextButton.style.opacity = '1';\n nextButton.style.pointerEvents = 'auto';\n }\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \t\n // Initialize swiper\n initSwiper();\n });\n },\n filterSeason(season) {\n \tif (!swiperInstance) return;\n \n \t// Collect slides to keep\n \tconst slidesToKeep = allSlides.filter(slideEl => \n \t\tseason === 'all' || \n \t\tseason === slideEl.getAttribute('data-season')\n \t);\n \n swiperInstance.removeAllSlides();\n\n // Add filtered slides\n swiperInstance.addSlide(0, slidesToKeep);\n\n // Reset to first slide\n swiperInstance.slideTo(0, 0, false);\n \n updateButtonsState();\n }\n };\n})();\n\n\n// loop through all edition cards and add the edition query param to all URLs\n// because we are linking to a destination page and want to pre-set the edition dropdown \nexport function updateEditionCardLinkUrls() {\n\tconst allEditionCards = document.querySelectorAll(\"#edition-cards-section .edition-card-item\");\n \n allEditionCards.forEach((editionCard) => {\n \tconst editionLinkElems = editionCard.querySelectorAll(\"a\"); // we defined the card multiple times in the collection item\n const editionSlug = editionCard.getAttribute(\"data-editionslug\");\n const bookingState = editionCard.getAttribute(\"data-bookingstate\");\n\n editionLinkElems.forEach((link) => {\n \t// remove link from card and give bg less opacity for booking state \"available soon\"\n \tif (bookingState == \"Available Soon\") {\n \t\tlink.setAttribute(\"href\", \"#\");\n link.style.cursor = \"auto\";\n \n const bgImage = link.querySelector(\".edition-card-image\");\n bgImage.style.opacity = 0.4;\n } else if (editionSlug) {\n const baseUrl = link.getAttribute(\"href\").split(\"?\")[0]; // Remove existing query params\n // Update the link's href with the new query parameter\n link.setAttribute(\"href\", `${baseUrl}?edition=${encodeURIComponent(editionSlug)}`);\n }\n });\n });\n}\n", "export function initUpcomingEditionsFilter() {\n // Set up filter buttons\n const filterButtons = document.querySelectorAll('.filter-button');\n const allItems = document.querySelectorAll('.filter-list-item');\n\n // Add click event to each filter button\n filterButtons.forEach(button => {\n button.addEventListener('click', function() {\n // Remove active class from all buttons\n filterButtons.forEach(btn => btn.classList.remove(\"active\"));\n \n // Add active class to current button\n this.classList.add(\"active\");\n \n // Get the season value from the button's data attribute\n const season = this.getAttribute('data-season');\n \n // If \"All\" is selected, show all items\n if (season === 'all') {\n allItems.forEach(item => {\n item.classList.remove(\"filtered-out\");\n \t});\n } else {\n \t// Filter items based on the selected season\n \tallItems.forEach(item => {\n const itemSeason = item.getAttribute('data-season');\n if (itemSeason === season) {\n item.classList.remove(\"filtered-out\");\n } else {\n item.classList.add(\"filtered-out\");\n }\n });\n }\n });\n });\n \n // Trigger \"All\" filter on page load\n const allButton = document.querySelector('[data-season=\"all\"]');\n if (allButton) {\n allButton.click();\n }\n}", "/**\n * Read-more truncator\n * ---------------------------------\n * 1. Finds every element that has data-read-more=\"123\" (height in px).\n * 2. If the element\u2019s scrollHeight > maxHeight, it:\n * \u2022 sets max-height + overflow: hidden\n * \u2022 appends a toggle link\n * 3. Clicking the link expands/collapses the element and updates the link text.\n *\n * Works for any text-based element (div, p, rich-text, etc.).\n */\nexport function initReadMore () {\n /** Utility to create the toggle link */\n function makeToggleLink(initial) {\n const link = document.createElement('a');\n link.href = '#';\n link.textContent = initial ? 'Read more' : 'Read less';\n link.style.display = 'inline-block';\n link.style.color = '#0a4915';\n link.style.fontWeight = '600';\n return link;\n }\n\n /** Main scan */\n document.querySelectorAll('[data-read-more]').forEach((el) => {\n const maxHeight = parseInt(el.getAttribute('data-read-more'), 10);\n if (isNaN(maxHeight)) return; // skip if attribute malformed\n\n // Already short enough? leave untouched\n if (el.scrollHeight <= maxHeight) return;\n\n // Prepare element: hide overflow & store full height\n el.style.maxHeight = maxHeight + 'px';\n el.style.overflow = 'hidden';\n el.dataset.readMoreState = 'collapsed';\n\n // Insert toggle link after the element\n const toggle = makeToggleLink(true);\n el.insertAdjacentElement('afterend', toggle);\n\n toggle.addEventListener('click', function (e) {\n e.preventDefault();\n const collapsed = el.dataset.readMoreState === 'collapsed';\n\n if (collapsed) {\n el.style.maxHeight = el.scrollHeight + 'px';\n el.dataset.readMoreState = 'expanded';\n this.textContent = 'Read less';\n } else {\n el.style.maxHeight = maxHeight + 'px';\n el.dataset.readMoreState = 'collapsed';\n this.textContent = 'Read more';\n }\n });\n });\n}", "import { initTestimonials } from './testimonials.js';\nimport { CollectionListDropDown } from \"../../controls/collectionListDropdown\"\nimport { ImpressionCardsCarousel } from \"../../components/impression-cards-carousel\";\nimport { UpcomingWorkationsCarousel } from \"../../components/upcoming-workations-carousel\";\nimport { setInitialWorkationSeasonDropdownItem, updateRoomPrices, updateLengthOfStayDropdownDiscounts, updateAllRoomBookingButtonsUrls } from './rooms-list.js';\nimport { initLocationMap } from './location-map.js';\nimport { initUpcomingWorkations } from './upcoming-workations.js';\nimport { ActivityCardsCarousel } from \"../../components/activity-cards\";\nimport { FeaturesCardsCarousel } from \"../../components/feature-slider\";\nimport { EditionCardsCarousel, updateEditionCardLinkUrls } from \"../../components/upcoming-editions\";\nimport { initUpcomingEditionsFilter } from \"../../components/upcoming-editions-filter\";\nimport { initReadMore } from \"../../utils/readMore.js\";\n\n// Make CollectionListDropDown globally accessible for other scripts\nwindow.CollectionListDropDown = CollectionListDropDown;\n\n\n/*****\n***\n*** Dropdown init\n***\n******/\n\n// Initialize the Room Filter Dropdowns\nCollectionListDropDown.init({ \n selector: \"#workation-season-dropdown\", \n onChange: (selectedItem) => {\n // Get the location value from the dropdown\n const editionSlug = selectedItem.getAttribute('data-value');\n updateLengthOfStayDropdownDiscounts(editionSlug);\n updateRoomPrices();\n updateAllRoomBookingButtonsUrls();\n }\n});\n\n// Initialize the Length of stay Dropdown\nCollectionListDropDown.init({ \n selector: \"#length-stay-dropdown\", \n initialValue: 'month-3', \n onChange: () => updateRoomPrices()\n});\n\n// Initialize the Guest Count Dropdown\nCollectionListDropDown.init({ \n selector: \"#guest-count-dropdown\", \n initialValue: '1', \n onChange: () => {\n updateRoomPrices();\n updateAllRoomBookingButtonsUrls();\n }\n});\n\n// Initialize the image carousels\nImpressionCardsCarousel.init({selectorId: '#impressions-cards-slider-1', isReverse: false});\nImpressionCardsCarousel.init({selectorId: '#impressions-cards-slider-2', isReverse: true});\n\n// Initialize the Upcoming Workations Carousel\nUpcomingWorkationsCarousel.init({\n selectors: {\n\t swiper: '#upcoming-workations .swiper',\n swiperWrapper: '#upcoming-workations .swiper-wrapper',\n swiperSlides: '#upcoming-workations .upcoming-workation-card', \n prevButton: '#upcoming-workations-swiper-prev-btn',\n nextButton: '#upcoming-workations-swiper-next-btn'\n },\n onItemClick: (item) => { \n\t\tconst editionSlug = item.getAttribute('data-edition');\n window.CollectionListDropDown.setValue(\"#workation-season-dropdown\", editionSlug);\n }\n});\n\n// Initialize the activity cards carousel\nActivityCardsCarousel.init({\n refContainer: \"#activity-cards-swiper-ref-container\", // this is needed for calculating the left offset\n swiper: '#activity-cards-section .swiper',\n swiperWrapper: '#activity-cards-section .swiper-wrapper', \n prevButton: '#activity-cards-swiper-prev-btn',\n nextButton: '#activity-cards-swiper-next-btn'\n});\n\n// Initialize the feature cards carousel\nFeaturesCardsCarousel.init({\n swiper: '#features-cards-section .swiper',\n swiperWrapper: '#features-cards-section .swiper-wrapper', \n prevButton: '#features-cards-btn-left',\n nextButton: '#features-cards-btn-right'\n});\n\n// Initialize the carousel\nEditionCardsCarousel.init({\n refContainer: \"#edition-cards-swiper-ref-container\", // this is needed for calculating the left offset\n swiper: '#edition-cards-section .swiper',\n swiperWrapper: '#edition-cards-section .swiper-wrapper', \n prevButton: '#edition-cards-swiper-prev-btn',\n nextButton: '#edition-cards-swiper-next-btn'\n});\n\n\n/*****\n***\n*** Initial setup after dom load\n***\n******/\ndocument.addEventListener('DOMContentLoaded', function() {\n initTestimonials('#destination-testimonials-section');\n\n\t// set initial value of the workation season dropdown\n\tsetInitialWorkationSeasonDropdownItem();\n \n\t// initially update room prices and discounts\n\tupdateRoomPrices();\n updateLengthOfStayDropdownDiscounts();\n \n // update initially all booking button URLs of all rooms\n updateAllRoomBookingButtonsUrls();\n\n // init location map\n initLocationMap();\n\n // init upcoming workations\n initUpcomingWorkations();\n\n // update edition card links\n updateEditionCardLinkUrls();\n\n // init upcoming editions filter\n initUpcomingEditionsFilter();\n\n // init read more\n initReadMore();\n});\n\n"],
5
- "mappings": "wGACO,SAASA,EAAkBC,EAAY,CAC5C,IAAMC,EAAkB,SAAS,iBAAiB,GAAGD,CAAU,iCAAiC,EAC1FE,EAAiB,SAAS,iBAAiB,GAAGF,CAAU,oBAAoB,EAElF,GAAI,CAACC,GAAmBA,EAAgB,SAAW,EAAG,CACrD,QAAQ,MAAM,uBAAuB,EACrC,MACD,CAEA,IAAIE,EAAe,EAGnBF,EAAgB,QAASG,GAAOA,EAAG,MAAM,QAAU,MAAM,EACzDF,EAAe,QAASG,GAAS,CAC/BA,EAAK,MAAM,QAAU,OACrBA,EAAK,UAAU,OAAO,QAAQ,CAChC,CAAC,EAGD,SAASC,EAAgBC,EAAO,CAC9BN,EAAg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6BACV,SAAWC,GAAiB,CAE1B,IAAMC,EAAcD,EAAa,aAAa,YAAY,EAC1DE,EAAoCD,CAAW,EAC/CE,EAAiB,EACjBC,EAAgC,CAClC,CACF,CAAC,EAGDL,EAAuB,KAAK,CAC1B,SAAU,wBACV,aAAc,UACd,SAAU,IAAMI,EAAiB,CACnC,CAAC,EAGDJ,EAAuB,KAAK,CAC1B,SAAU,wBACV,aAAc,IACd,SAAU,IAAM,CACdI,EAAiB,EACjBC,EAAgC,CAClC,CACF,CAAC,EAGDC,EAAwB,KAAK,CAAC,WAAY,8BAA+B,UAAW,EAAK,CAAC,EAC1FA,EAAwB,KAAK,CAAC,WAAY,8BAA+B,UAAW,EAAI,CAAC,EAGzFC,EAA2B,KAAK,CAC9B,UAAW,CACV,OAAQ,+BACP,cAAe,uCACf,aAAc,gDACd,WAAY,uCACZ,WAAY,sCACd,EACA,YAAcC,GAAS,CACvB,IAAMN,EAAcM,EAAK,aAAa,cAAc,EAClD,OAAO,uBAAuB,SAAS,6BAA8BN,CAAW,CAClF,CACF,CAAC,EAGDO,EAAsB,KAAK,CACzB,aAAc,uCACd,OAAQ,kCACR,cAAe,0CACf,WAAY,kCACZ,WAAY,iCACd,CAAC,EAGDC,EAAsB,KAAK,CACzB,OAAQ,kCACR,cAAe,0CACf,WAAY,2BACZ,WAAY,2BACd,CAAC,EAGDC,EAAqB,KAAK,CACxB,aAAc,sCACd,OAAQ,iCACR,cAAe,yCACf,WAAY,iCACZ,WAAY,gCACd,CAAC,EAQD,SAAS,iBAAiB,mBAAoB,UAAW,CACvDC,EAAiB,mCAAmC,EAGrDC,EAAsC,EAGtCT,EAAiB,EAChBD,EAAoC,EAGpCE,EAAgC,EAGhCS,EAAgB,EAGhBC,EAAuB,EAGvBC,EAA0B,EAG1BC,EAA2B,EAG3BC,EAAa,CACf,CAAC",
6
- "names": ["initTestimonials", "selectorId", "allTestimonials", "allAuthorSlots", "currentIndex", "el", "slot", "showTestimonial", "index", "i", "authors", "testimonial", "imgUrl", "prevBtn", "nextBtn", "newIndex", "init_testimonials", "__esmMin", "CollectionListDropDown", "init_collectionListDropdown", "__esmMin", "dropdowns", "initDropDown", "selector", "onChange", "initialValue", "container", "dropdown", "dropdownToggle", "dropdownList", "selectedItemValueContainer", "collectionItems", "item", "event", "selectedOption", "selectDropDownElement", "getElementByItemValue", "selectedItem", "sourceElement", "clonedElement", "currentValue", "value", "x", "ImpressionCardsCarousel", "init_impression_cards_carousel", "__esmMin", "swiperInstance", "initSwiper", "selectorId", "isReverse", "swiper", "swiperWrapper", "UpcomingWorkationsCarousel", "init_upcoming_workations_carousel", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "onItemClick", "swiperWrapper", "swiperSlides", "swiper", "updateButtonsState", "slide", "e", "selectors", "getAllRoomPrices", "editionSlugFilter", "priceElements", "roomPrices", "x", "formatPrice", "price", "currency", "init_commonUtils", "__esmMin", "updateRoomPrices", "editionSlug", "lengthOfStay", "guestCount", "currency", "allRooms", "roomEditionPrices", "getAllRoomPrices", "room", "roomSlug", "allowWeeklyBooking", "roomEditionPrice", "x", "updateRoomPrice", "priceBreakdownElem", "priceMonthElem", "roomDiscountElem", "roomBookButton", "noPriceAvailable", "isWeekBooking", "noPriceAvailableText", "weeklyBookingText", "basePriceMonth", "discount2months", "discount3months", "price2Month", "price3Month", "weeklyPrice", "weeklyPriceFormatted", "formatPrice", "basePriceFormatted", "hidePriceBreakdown", "updateLengthOfStayDropdownDiscounts", "months2discountElems", "months3discountElems", "discounts2months", "discounts3months", "elem", "updateLengthOfStayDropdownDiscount", "discounts", "allEqual", "val", "lowestDiscount", "updateAllRoomBookingButtonsUrls", "allBookingButtons", "destinationSlug", "bookingButton", "bookingLinkElem", "baseUrl", "guestsCount", "setInitialWorkationSeasonDropdownItem", "editionSlugQueryParam", "workationSeasonItems", "workationInitialValue", "init_rooms_list", "__esmMin", "init_commonUtils", "initLocationMap", "address", "results", "status", "map", "init_location_map", "__esmMin", "initUpcomingWorkations", "item", "bookingState", "init_upcoming_workations", "__esmMin", "ActivityCardsCarousel", "init_activity_cards", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "refContainer", "swiperWrapper", "offsetBefore", "swiper", "updateButtonsState", "newOffsetBefore", "maxTranslate", "selectors", "FeaturesCardsCarousel", "init_feature_slider", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "swiperWrapper", "swiper", "updateButtonsState", "setWrapperWidth", "wrapperBefore", "carouselContainer", "selectors", "updateEditionCardLinkUrls", "editionCard", "editionLinkElems", "editionSlug", "bookingState", "link", "bgImage", "baseUrl", "EditionCardsCarousel", "init_upcoming_editions", "__esmMin", "swiperInstance", "prevButton", "nextButton", "allSlides", "SELECTORS", "initSwiper", "refContainer", "swiperWrapper", "offsetBefore", "swiper", "updateButtonsState", "newOffsetBefore", "maxTranslate", "selectors", "season", "slidesToKeep", "slideEl", "initUpcomingEditionsFilter", "filterButtons", "allItems", "button", "btn", "season", "item", "allButton", "init_upcoming_editions_filter", "__esmMin", "initReadMore", "makeToggleLink", "initial", "link", "el", "maxHeight", "toggle", "e", "init_readMore", "__esmMin", "require_destination", "__commonJSMin", "init_testimonials", "init_collectionListDropdown", "init_impression_cards_carousel", "init_upcoming_workations_carousel", "init_rooms_list", "init_location_map", "init_upcoming_workations", "init_activity_cards", "init_feature_slider", "init_upcoming_editions", "init_upcoming_editions_filter", "init_readMore", "CollectionListDropDown", "selectedItem", "editionSlug", "updateLengthOfStayDropdownDiscounts", "updateRoomPrices", "updateAllRoomBookingButtonsUrls", "ImpressionCardsCarousel", "UpcomingWorkationsCarousel", "item", "ActivityCardsCarousel", "FeaturesCardsCarousel", "EditionCardsCarousel", "initTestimonials", "setInitialWorkationSeasonDropdownItem", "initLocationMap", "initUpcomingWorkations", "updateEditionCardLinkUrls", "initUpcomingEditionsFilter", "initReadMore"]
4
+ "sourcesContent": ["\nexport function initTestimonials (selectorId) {\n const allTestimonials = document.querySelectorAll(`${selectorId} .destination-testimonials-item`);\n const allAuthorSlots = document.querySelectorAll(`${selectorId} .dyn-author-image`);\n \n if (!allTestimonials || allTestimonials.length === 0) {\n \tconsole.error(\"No testimonials found\");\n\t return;\n }\n\n let currentIndex = 0;\n\n // Hide all testimonials initially\n allTestimonials.forEach((el) => el.style.display = \"none\");\n allAuthorSlots.forEach((slot) => {\n slot.style.display = \"none\";\n slot.classList.remove(\"active\");\n });\n\n // Show initial\n function showTestimonial(index) {\n allTestimonials.forEach((el, i) => {\n el.style.display = i === index ? \"block\" : \"none\";\n });\n allAuthorSlots.forEach((slot, i) => {\n slot.classList.toggle(\"active\", i === index);\n });\n currentIndex = index;\n }\n\n // Inject author images into slots\n const authors = [...allTestimonials];\n authors.forEach((testimonial, index) => {\n const imgUrl = testimonial.querySelector('.testimonial-card-author-image')?.src;\n const slot = document.querySelector(`${selectorId} [data-slot=\"${index+1}\"]`);\n //const testimonialSlug = testimonial.dataset.slug;\n\n if (slot && imgUrl) {\n\t slot.src = imgUrl;\n slot.style.display = \"inline\";\n if (index === 0) slot.classList.add(\"active\");\n\n slot.addEventListener('click', () => {\n showTestimonial(index);\n });\n }\n });\n\n // Initial display\n showTestimonial(0);\n\n // Add navigation button logic\n const prevBtn = document.getElementById('destination-testimonials-btn-left');\n const nextBtn = document.getElementById('destination-testimonials-btn-right');\n\n if (prevBtn) {\n prevBtn.addEventListener('click', () => {\n const newIndex = (currentIndex - 1 + authors.length) % authors.length;\n showTestimonial(newIndex);\n });\n }\n\n if (nextBtn) {\n nextBtn.addEventListener('click', () => {\n const newIndex = (currentIndex + 1) % authors.length;\n showTestimonial(newIndex);\n });\n }\n}", "export const CollectionListDropDown = (function () {\n // Store dropdown instances to access them later\n const dropdowns = {};\n \n function initDropDown(selector, onChange, initialValue) {\n const container = document.querySelector(selector);\n const dropdown = document.querySelector(`${selector}.w-dropdown`);\n const dropdownToggle = container.querySelector(`${selector} .w-dropdown-toggle`); \n const dropdownList = container.querySelector(`${selector} .w-dropdown-list`);\n const selectedItemValueContainer = container.querySelector(`${selector} .dropdown-selected-value`);\n const collectionItems = container.querySelectorAll(`${selector} .dropdown-item`);\n \n // Store this dropdown instance data for later access\n dropdowns[selector] = {\n container,\n dropdown,\n dropdownToggle,\n dropdownList,\n selectedItemValueContainer,\n collectionItems,\n onChange\n };\n \n collectionItems.forEach(item => {\n item.addEventListener('click', function(event) {\n event.preventDefault(); // Prevent default link behavior if using Link Blocks\n const selectedOption = this;\n selectDropDownElement(selector, selectedOption);\n \n onChange && onChange(selectedOption);\n // Close the dropdown\n dropdownList.classList.remove('w--open'); // Close the dropdown\n // Move focus away to reset dropdown behavior\n dropdown.blur();\n });\n });\n \n if (initialValue) {\n const item = getElementByItemValue(selector, initialValue);\n if (item) { \n setTimeout(() => {\n item.click(); // Simulate a click on the matching item to activate filter\n }, 200);\n }\n }\n }\n \n function selectDropDownElement(selector, selectedItem) {\n const dropdown = dropdowns[selector];\n if (!dropdown) return;\n \n const selectedItemValueContainer = dropdown.selectedItemValueContainer;\n \n while (selectedItemValueContainer.firstChild) {\n selectedItemValueContainer.removeChild(selectedItemValueContainer.firstChild);\n }\n \n const sourceElement = selectedItem;\n if (sourceElement) {\n const clonedElement = sourceElement.cloneNode(true);\n selectedItemValueContainer.appendChild(clonedElement);\n const currentValue = sourceElement.getAttribute('data-value');\n dropdown.dropdown.setAttribute('data-current-value', currentValue);\n } else {\n console.error(\"SelectedItem Element not found.\", selectedItem);\n }\n }\n \n function getElementByItemValue(selector, value) {\n const dropdown = dropdowns[selector];\n return Array.from(dropdown.collectionItems).find((x) => {\n return x.getAttribute('data-value') === value;\n });\n }\n \n // Public methods\n return {\n init: function({ selector, onChange, initialValue }) {\n document.addEventListener('DOMContentLoaded', function() {\n initDropDown(selector, onChange, initialValue);\n });\n },\n // Add a new public method to change dropdown value from outside\n setValue: function(selector, value) {\n const item = getElementByItemValue(selector, value);\n if (item) {\n item.click(); // Trigger the click event on the item\n } else if (value !== undefined && value !== null) {\n console.error(`No item with value '${value}' found in dropdown '${selector}'`);\n }\n },\n // Get currently selected dropdown value\n getValue: function(selector) {\n const dropdown = dropdowns[selector];\n return dropdown.dropdown.getAttribute('data-current-value');\n }\n };\n})();", "export const ImpressionCardsCarousel = (function () {\n\tlet swiperInstance = null;\n \n function initSwiper({selectorId, isReverse}) {\n const swiperWrapper = document.querySelector(`${selectorId} .swiper-wrapper`);\n\n if (!swiperWrapper) {\n console.error('Required elements not found');\n return null;\n } \n \n // Initialize Swiper\n const swiper = new Swiper(`${selectorId}.swiper`, {\n spaceBetween: 16,\n loop: true,\n slidesPerView: \"auto\",\n freeMode: true,\n speed: 6500,\n autoplay: {\n delay: 0,\n disableOnInteraction: false,\n reverseDirection: isReverse,\n pauseOnMouseEnter: false\n },\n });\n\n\t\tswiperInstance = swiper;\n\n\t\treturn swiper;\n }\n\n // Public methods\n return {\n init: function({selectorId, isReverse}) {\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(`${selectorId} .swiper-wrapper`);\n swiperWrapper.style.gap = '0';\n swiperWrapper.style.setProperty(\"transition-timing-function\", \"linear\", \"important\");\n \t\n // Initialize swiper\n initSwiper({selectorId, isReverse});\n });\n }\n };\n})();", "\nexport const UpcomingWorkationsCarousel = (function () {\n\tlet swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null; // Declare SELECTORS as null initially\n\n function initSwiper({onItemClick}) {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n const swiperSlides = document.querySelectorAll(SELECTORS.swiperSlides);\n\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!swiperWrapper || !prevButton || !nextButton || !swiperSlides) {\n console.error('Required elements not found');\n return null;\n } \n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n direction: \"vertical\",\n slidesPerView: \"auto\",\n spaceBetween: 8,\n freeMode: false,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\t\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', function () {\n updateButtonsState();\n });\n \n if (onItemClick) {\n swiperSlides.forEach(slide => {\n slide.addEventListener('click', (e) => onItemClick(e.currentTarget));\n });\n }\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n\t\tnextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n }\n\n // Public methods\n return {\n init: function({selectors, onItemClick}) {\n SELECTORS = selectors;\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \t\n // Initialize swiper\n initSwiper({onItemClick});\n });\n }\n };\n})();", "\n// Get all room price data - this is done by a collection list element creating:\n// < script type=\"application/json\" class=\"room-price-data\"> \n// {\n// \"roomSlug\": \"\",\n// \"editionSlug\": \"\",\n// \"basePriceWeek\": ,\n// \"basePriceMonth\": ,\n// \"discountMonth2\": ,\n// \"discountMonth3\":\n// }\n// </ script > \nexport function getAllRoomPrices(editionSlugFilter) {\n const priceElements = document.querySelectorAll('.room-price-data');\n const roomPrices = Array.from(priceElements).map(x => JSON.parse(x.textContent));\n if (!editionSlugFilter) {\n \treturn roomPrices;\n }\n return roomPrices.filter((x) => x.editionSlug === editionSlugFilter)\n}\n\n// calculate month difference while 1 month is always 30 days\nexport function getMonthDifference(startDate, endDate) {\n if (!startDate || !endDate) return 0;\n return Math.floor((endDate - startDate) / (1000 * 60 * 60 * 24 * 30)); \n}\n\nexport function formatPrice(price, currency) {\n\t// That\u2019s the locale for German, which uses the formatting style we\u2019re after. \n // We could also use 'fr-FR', 'it-IT', etc. \u2014 most European locales format this way.\n return new Intl.NumberFormat('de-DE', {\n style: 'currency',\n \tcurrency,\n currencyDisplay: 'code'\n }).format(price);\n}\n\nexport function parseDecimalFromString(price, defaultValue = null) {\n return !isNaN(parseFloat(price))\n ? parseFloat(price)\n : defaultValue; \n}\n", "import { getAllRoomPrices, formatPrice } from \"../../utils/commonUtils\"\n\n// Updates all room prices in the list based on selected values on the dropdowns\nexport function updateRoomPrices() {\n\tconst editionSlug = CollectionListDropDown.getValue(\"#workation-season-dropdown\");\n const lengthOfStay = CollectionListDropDown.getValue(\"#length-stay-dropdown\");\n //const guestCount = parseInt(CollectionListDropDown.getValue(\"#guest-count-dropdown\"));\n const currency = document.querySelector(\"#rooms\")?.getAttribute(\"data-currency\") ?? \"EUR\";\n\n // Get all room items\n const allRooms = document.querySelectorAll('.room-list-item');\n \n const roomEditionPrices = editionSlug ? getAllRoomPrices(editionSlug) : []; //if no edition selected, we still want to loop and hide prices\n allRooms.forEach((room) => {\n const roomSlug = room.getAttribute('data-roomslug');\n const allowWeeklyBooking = room.getAttribute('data-allow-weekly-booking') === \"Enabled\";\n const roomEditionPrice = roomEditionPrices.find((x) => x.roomSlug === roomSlug);\n updateRoomPrice(room, roomEditionPrice, lengthOfStay, currency, allowWeeklyBooking);\n });\n}\n\n// Updates the price of one room\nfunction updateRoomPrice(room, roomEditionPrice, lengthOfStay, currency, allowWeeklyBooking) {\n const priceBreakdownElem = room.querySelector('.room-item-price-breakdown');\n const priceMonthElem = room.querySelector('.room-item-price-month');\n const roomDiscountElem = room.querySelector('.room-discount-text');\n const roomBookButton = room.querySelector('.room-book-button');\n const noPriceAvailable = room.querySelector('.room-item-price-not-avalable');\n const isWeekBooking = lengthOfStay && lengthOfStay.startsWith(\"week\");\n\n const noPriceAvailableText = noPriceAvailable.innerText;\n const weeklyBookingText = \"Minimum length of stay for this room is 1 month\";\n\n const basePriceWeek = parseDecimalFromString(roomEditionPrice?.basePriceWeek);\n\n // if there is no price set for the room, hide all prices and booking button\n if (!roomEditionPrice || (isWeekBooking && !allowWeeklyBooking) || (isWeekBooking && allowWeeklyBooking && !basePriceWeek)) {\n noPriceAvailable.innerText = (isWeekBooking && !allowWeeklyBooking) ? weeklyBookingText : noPriceAvailableText;\n\t noPriceAvailable.style.display = 'flex';\n priceBreakdownElem.style.display = 'none';\n priceMonthElem.style.display = 'none';\n roomDiscountElem.parentElement.style.display = 'none';\n roomBookButton.style.opacity = \"0.5\";\n roomBookButton.style.pointerEvents = \"none\";\n roomBookButton.style.cursor = \"not-allowed\";\n return;\n }\n \n // reset all elements in case they were hidden before\n noPriceAvailable.style.display = 'none';\n priceMonthElem.style.display = 'block';\n roomDiscountElem.parentElement.style.display = 'flex';\n roomBookButton.style.opacity = \"1\";\n roomBookButton.style.pointerEvents = \"auto\";\n roomBookButton.style.cursor = \"pointer\";\n \n const basePriceMonth = roomEditionPrice.basePriceMonth;\n\n const discount2months = roomEditionPrice.discountMonth2;\n const discount3months = roomEditionPrice.discountMonth3;\n const price2Month = basePriceMonth * (1 - discount2months / 100);\n const price3Month = basePriceMonth * (1 - discount3months / 100);\n\n const weeklyPriceFormatted = basePriceWeek ? formatPrice(basePriceWeek, currency) : \"N/A\";\n const basePriceFormatted = formatPrice(basePriceMonth, currency);\n\n // Hide price breakdown if guest stays only 1 month or 1 week (or no length is selected), else show it\n const hidePriceBreakdown = !lengthOfStay || lengthOfStay.endsWith(\"-1\");\n priceBreakdownElem.style.display = hidePriceBreakdown ? 'none' : 'inline';\n\n switch (lengthOfStay) {\n case 'week-1':\n priceMonthElem.innerText = `${weeklyPriceFormatted} / week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n \n case 'week-2':\n priceBreakdownElem.innerText = `1st week: ${weeklyPriceFormatted}`;\n priceMonthElem.innerText = `${weeklyPriceFormatted} - 2nd week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n \n case 'week-3':\n priceBreakdownElem.innerHTML = `\n \t1st week: ${weeklyPriceFormatted}<br>\n 2nd week: ${weeklyPriceFormatted}`;\n priceMonthElem.innerText = `${weeklyPriceFormatted} - 3rd week`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n\n default:\n case 'month-1':\n priceMonthElem.innerText = `${basePriceFormatted} / month`;\n roomDiscountElem.innerText = `Longer stays unlock better discounts!`;\n break;\n\n case 'month-2':\n priceBreakdownElem.innerText = `1st month: ${basePriceFormatted}`;\n priceMonthElem.innerText = `${formatPrice(price2Month, currency)} - 2nd month`;\n roomDiscountElem.parentElement.style.display = (discount2months == 0) ? \"none\": \"block\";\n roomDiscountElem.innerText = `${discount2months.toFixed(1)}% discount for the 2nd month!`;\n break;\n\n case 'month-3':\n priceBreakdownElem.innerHTML = `\n \t1st month: ${basePriceFormatted}<br>\n 2nd month: ${formatPrice(price2Month, currency)}`;\n priceMonthElem.innerText = `${formatPrice(price3Month, currency)} - 3rd month`;\n \n roomDiscountElem.parentElement.style.display = (discount3months == 0) ? \"none\": \"block\";\n roomDiscountElem.innerText = `${discount3months.toFixed(1)}% discount for the 3rd month!`;\n break;\n }\n}\n\n// updates the discount elements in the length of stay dropdown\nexport function updateLengthOfStayDropdownDiscounts(editionSlug) {\n const months2discountElems = document.querySelectorAll('.dropdown-discount-2-months');\n const months3discountElems = document.querySelectorAll('.dropdown-discount-3-months');\n \n const roomEditionPrices = getAllRoomPrices(editionSlug);\n const discounts2months = roomEditionPrices.map((x) => x.discountMonth2);\n const discounts3months = roomEditionPrices.map((x) => x.discountMonth3);\n \n //need to be forEach because if an item is selected there are 2 (selected one and in dropdown)\n months2discountElems.forEach((elem) => {\n \tupdateLengthOfStayDropdownDiscount(elem, discounts2months);\n });\n months3discountElems.forEach((elem) => {\n \tupdateLengthOfStayDropdownDiscount(elem, discounts3months);\n });\n}\n\n// updates a single discount element in the length of stay dropdown\nfunction updateLengthOfStayDropdownDiscount(elem, discounts) {\n\tif (!discounts || discounts.length === 0) {\n \telem.style.display = 'none';\n return;\n }\n elem.style.display = 'flex'; // reset previous hide\n\n const allEqual = discounts.every(val => val === discounts[0]);\n const lowestDiscount = Math.min(...discounts);\n if (lowestDiscount == 0) {\n \telem.innerText = ``;\n } else {\n \telem.innerText = `${lowestDiscount.toFixed(1)}% discount`;\n }\n if (!allEqual) {\n elem.innerText = 'From ' + elem.innerText;\n }\n}\n\n// loop through all rooms and update the booking URLs accoring to the filter values\nexport function updateAllRoomBookingButtonsUrls() {\n\tconst allBookingButtons = document.querySelectorAll(\".room-book-button\");\n const destinationSlug = document.querySelector(\"#rooms\")?.getAttribute(\"data-destination-slug\");\n \n allBookingButtons.forEach((bookingButton) => {\n \tconst bookingLinkElem = bookingButton.querySelector(\"a\");\n const baseUrl = bookingLinkElem.getAttribute(\"href\").split(\"?\")[0]; // Remove existing query params\n\n\t\tconst roomSlug = bookingButton.getAttribute(\"data-roomslug\");\n const editionSlug = CollectionListDropDown.getValue(\"#workation-season-dropdown\");\n\t const guestsCount = CollectionListDropDown.getValue(\"#guest-count-dropdown\") ?? 1;\n\n // Update the link's href with the new query parameters\n bookingLinkElem.setAttribute(\"href\", `${baseUrl}` +\n \t`?destination=${encodeURIComponent(destinationSlug)}` +\n \t`&edition=${encodeURIComponent(editionSlug)}` +\n `&room=${encodeURIComponent(roomSlug)}` +\n `&guests=${encodeURIComponent(guestsCount)}`);\n });\n}\n\n// set initial value of the workation season dropdown\nexport function setInitialWorkationSeasonDropdownItem() {\n\tconst editionSlugQueryParam = new URLSearchParams(window.location.search).get(\"edition\");\n\tconst workationSeasonItems = document.querySelectorAll(\"#workation-season-dropdown .dropdown-item\");\n\tconst workationInitialValue = editionSlugQueryParam ?? (workationSeasonItems.length > 0 ? workationSeasonItems[0].getAttribute('data-value') : null);\n\tCollectionListDropDown.setValue(\"#workation-season-dropdown\", workationInitialValue);\n}\n", "export function initLocationMap () {\n const address = document.getElementById(\"map-data\").dataset.address;\n if (!address) return;\n\n // Geocode the address to get coordinates\n const geocoder = new google.maps.Geocoder();\n\n geocoder.geocode({ address: address }, function (results, status) {\n if (status === \"OK\") {\n const map = new google.maps.Map(document.getElementById(\"map\"), {\n zoom: 14,\n center: results[0].geometry.location,\n });\n\n new google.maps.Marker({\n map: map,\n position: results[0].geometry.location,\n });\n } else {\n console.error(\"Geocode failed: \" + status);\n }\n });\n}", "export function initUpcomingWorkations() {\n //reducing opacity for all CLOSED booking states \n document.querySelectorAll(\"#upcoming-workations .swiper-slide\").forEach(item => {\n let bookingState = item.getAttribute(\"data-booking-state\")?.toLowerCase();\n if (bookingState === \"closed\") {\n item.style.opacity = \"0.5\";\n item.style.pointerEvents = \"none\";\n\t\t\titem.style.cursor = \"not-allowed\";\n } else if (bookingState === \"available soon\") {\n item.style.pointerEvents = \"none\";\n item.style.cursor = \"default\";\n }\n });\n}\n", "export const ActivityCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null;\n\n function initSwiper() {\n const refContainer = document.querySelector(SELECTORS.refContainer); \n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!refContainer || !swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n \n const refRect = refContainer.getBoundingClientRect();\n const offsetBefore = refRect.left;\n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetBefore: offsetBefore,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n swiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', updateButtonsState);\n \n // Add resize event listener separately\n window.addEventListener('resize', () => {\n const newOffsetBefore = refContainer.getBoundingClientRect().left;\n // Check if Swiper instance exists and has a method to update params\n if (swiper && swiper.params) {\n swiper.params.slidesOffsetBefore = newOffsetBefore;\n swiper.update(); // Refresh Swiper\n }\n });\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n if (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n //nextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n ////nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n // Get Swiper's max translate position\n const maxTranslate = swiperInstance.maxTranslate();\n const currentTranslate = swiperInstance.translate;\n\n if (currentTranslate <= maxTranslate + 5) { // buffer of 5 to prevent minor calculation errors.\n nextButton.style.opacity = '0.5';\n nextButton.style.pointerEvents = 'none';\n } else {\n nextButton.style.opacity = '1';\n nextButton.style.pointerEvents = 'auto';\n }\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n\n document.addEventListener('DOMContentLoaded', function() {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n\n // Initialize swiper\n initSwiper();\n });\n }\n };\n})();", "export const FeaturesCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let SELECTORS = null;\n\n function initSwiper() {\n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n\n if (!swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n prevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\t\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', function () {\n updateButtonsState();\n });\n \n \n function setWrapperWidth() {\n const wrapperRect = swiperWrapper.getBoundingClientRect();\n \tconst wrapperBefore = wrapperRect.left;\n const carouselContainer = document.querySelector('#features-cards-section .features-cards-carousel-container')\n \n carouselContainer.style.width = `${window.innerWidth - wrapperBefore}px`;\n carouselContainer.style.minWidth = `${window.innerWidth - wrapperBefore}px`;\n carouselContainer.style.maxWidth = `${window.innerWidth - wrapperBefore}px`;\n\n swiperWrapper.style.width = `${window.innerWidth - wrapperBefore}px`;\n swiperWrapper.style.minWidth = `${window.innerWidth - wrapperBefore}px`;\n swiperWrapper.style.maxWidth = `${window.innerWidth - wrapperBefore}px`;\n }\n\n window.addEventListener('resize', setWrapperWidth);\n setWrapperWidth(); \n \n // Add resize event listener separately\n //window.addEventListener('resize', () => {\n // const newOffsetBefore = refContainer.getBoundingClientRect().left;\n // Check if Swiper instance exists and has a method to update params\n // if (swiper && swiper.params) {\n // swiper.params.slidesOffsetBefore = newOffsetBefore;\n // swiper.update(); // Refresh Swiper\n // }\n //});\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n\t\tnextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n \tdocument.addEventListener('DOMContentLoaded', function() {\n\t\t\t\tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \n // Initialize swiper\n initSwiper();\n\t\t\t});\n }\n };\n})();\n", "export const EditionCardsCarousel = (function () {\n let swiperInstance, prevButton, nextButton = null;\n let allSlides = []; // we need to store them for filtering \n let SELECTORS = null; \n\n function initSwiper() {\n const refContainer = document.querySelector(SELECTORS.refContainer); \n const swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n prevButton = document.querySelector(SELECTORS.prevButton);\n nextButton = document.querySelector(SELECTORS.nextButton);\n allSlides = Array.from(document.querySelectorAll('#edition-cards-section .swiper .swiper-slide'));\n\n if (!refContainer || !swiperWrapper || !prevButton || !nextButton) {\n console.error('Required elements not found');\n return null;\n } \n \n\t\tconst refRect = refContainer.getBoundingClientRect();\n \tconst offsetBefore = refRect.left;\n\n // Initialize Swiper\n const swiper = new Swiper(SELECTORS.swiper, {\n slidesPerView: \"auto\",\n spaceBetween: 16,\n freeMode: false,\n slidesOffsetBefore: offsetBefore,\n slidesOffsetAfter: 16,\n navigation: {\n nextEl: SELECTORS.nextButton,\n \tprevEl: SELECTORS.prevButton,\n },\n watchOverflow: true,\n });\n\n\tswiperInstance = swiper;\n\n // Set initial state of buttons\n updateButtonsState();\n\n // Add event listeners to update button states when slides change\n swiper.on('slideChange', updateButtonsState);\n \n // Add resize event listener separately\n window.addEventListener('resize', () => {\n const newOffsetBefore = refContainer.getBoundingClientRect().left;\n\n // Check if Swiper instance exists and has a method to update params\n if (swiper && swiper.params) {\n swiper.params.slidesOffsetBefore = newOffsetBefore;\n swiper.update(); // Refresh Swiper\n }\n });\n\n return swiper;\n }\n\n // Function to update button states\n function updateButtonsState() {\n \tif (!prevButton || !nextButton) return;\n \n prevButton.style.opacity = swiperInstance.isBeginning ? '0.5' : '1';\n prevButton.style.pointerEvents = swiperInstance.isBeginning ? 'none' : 'auto'; \n\n //nextButton.style.opacity = swiperInstance.isEnd ? '0.5' : '1';\n //nextButton.style.pointerEvents = swiperInstance.isEnd ? 'none' : 'auto';\n // Get Swiper's max translate position\n const maxTranslate = swiperInstance.maxTranslate();\n const currentTranslate = swiperInstance.translate;\n\n if (currentTranslate <= maxTranslate + 5) { // buffer of 5 to prevent minor calculation errors.\n nextButton.style.opacity = '0.5';\n nextButton.style.pointerEvents = 'none';\n } else {\n nextButton.style.opacity = '1';\n nextButton.style.pointerEvents = 'auto';\n }\n }\n\n // Public methods\n return {\n init: function(selectors) {\n SELECTORS = selectors;\n document.addEventListener('DOMContentLoaded', function() {\n \tconst swiperWrapper = document.querySelector(SELECTORS.swiperWrapper);\n swiperWrapper.style.gap = '0';\n \t\n // Initialize swiper\n initSwiper();\n });\n },\n filterSeason(season) {\n \tif (!swiperInstance) return;\n \n \t// Collect slides to keep\n \tconst slidesToKeep = allSlides.filter(slideEl => \n \t\tseason === 'all' || \n \t\tseason === slideEl.getAttribute('data-season')\n \t);\n \n swiperInstance.removeAllSlides();\n\n // Add filtered slides\n swiperInstance.addSlide(0, slidesToKeep);\n\n // Reset to first slide\n swiperInstance.slideTo(0, 0, false);\n \n updateButtonsState();\n }\n };\n})();\n\n\n// loop through all edition cards and add the edition query param to all URLs\n// because we are linking to a destination page and want to pre-set the edition dropdown \nexport function updateEditionCardLinkUrls() {\n\tconst allEditionCards = document.querySelectorAll(\"#edition-cards-section .edition-card-item\");\n \n allEditionCards.forEach((editionCard) => {\n \tconst editionLinkElems = editionCard.querySelectorAll(\"a\"); // we defined the card multiple times in the collection item\n const editionSlug = editionCard.getAttribute(\"data-editionslug\");\n const bookingState = editionCard.getAttribute(\"data-bookingstate\");\n\n editionLinkElems.forEach((link) => {\n \t// remove link from card and give bg less opacity for booking state \"available soon\"\n \tif (bookingState == \"Available Soon\") {\n \t\tlink.setAttribute(\"href\", \"#\");\n link.style.cursor = \"auto\";\n \n const bgImage = link.querySelector(\".edition-card-image\");\n bgImage.style.opacity = 0.4;\n } else if (editionSlug) {\n const baseUrl = link.getAttribute(\"href\").split(\"?\")[0]; // Remove existing query params\n // Update the link's href with the new query parameter\n link.setAttribute(\"href\", `${baseUrl}?edition=${encodeURIComponent(editionSlug)}`);\n }\n });\n });\n}\n", "export function initUpcomingEditionsFilter() {\n // Set up filter buttons\n const filterButtons = document.querySelectorAll('.filter-button');\n const allItems = document.querySelectorAll('.filter-list-item');\n\n // Add click event to each filter button\n filterButtons.forEach(button => {\n button.addEventListener('click', function() {\n // Remove active class from all buttons\n filterButtons.forEach(btn => btn.classList.remove(\"active\"));\n \n // Add active class to current button\n this.classList.add(\"active\");\n \n // Get the season value from the button's data attribute\n const season = this.getAttribute('data-season');\n \n // If \"All\" is selected, show all items\n if (season === 'all') {\n allItems.forEach(item => {\n item.classList.remove(\"filtered-out\");\n \t});\n } else {\n \t// Filter items based on the selected season\n \tallItems.forEach(item => {\n const itemSeason = item.getAttribute('data-season');\n if (itemSeason === season) {\n item.classList.remove(\"filtered-out\");\n } else {\n item.classList.add(\"filtered-out\");\n }\n });\n }\n });\n });\n \n // Trigger \"All\" filter on page load\n const allButton = document.querySelector('[data-season=\"all\"]');\n if (allButton) {\n allButton.click();\n }\n}", "/**\n * Read-more truncator\n * ---------------------------------\n * 1. Finds every element that has data-read-more=\"123\" (height in px).\n * 2. If the element\u2019s scrollHeight > maxHeight, it:\n * \u2022 sets max-height + overflow: hidden\n * \u2022 appends a toggle link\n * 3. Clicking the link expands/collapses the element and updates the link text.\n *\n * Works for any text-based element (div, p, rich-text, etc.).\n */\nexport function initReadMore () {\n /** Utility to create the toggle link */\n function makeToggleLink(initial) {\n const link = document.createElement('a');\n link.href = '#';\n link.textContent = initial ? 'Read more' : 'Read less';\n link.style.display = 'inline-block';\n link.style.color = '#0a4915';\n link.style.fontWeight = '600';\n return link;\n }\n\n /** Main scan */\n document.querySelectorAll('[data-read-more]').forEach((el) => {\n const maxHeight = parseInt(el.getAttribute('data-read-more'), 10);\n if (isNaN(maxHeight)) return; // skip if attribute malformed\n\n // Already short enough? leave untouched\n if (el.scrollHeight <= maxHeight) return;\n\n // Prepare element: hide overflow & store full height\n el.style.maxHeight = maxHeight + 'px';\n el.style.overflow = 'hidden';\n el.dataset.readMoreState = 'collapsed';\n\n // Insert toggle link after the element\n const toggle = makeToggleLink(true);\n el.insertAdjacentElement('afterend', toggle);\n\n toggle.addEventListener('click', function (e) {\n e.preventDefault();\n const collapsed = el.dataset.readMoreState === 'collapsed';\n\n if (collapsed) {\n el.style.maxHeight = el.scrollHeight + 'px';\n el.dataset.readMoreState = 'expanded';\n this.textContent = 'Read less';\n } else {\n el.style.maxHeight = maxHeight + 'px';\n el.dataset.readMoreState = 'collapsed';\n this.textContent = 'Read more';\n }\n });\n });\n}", "import { initTestimonials } from './testimonials.js';\nimport { CollectionListDropDown } from \"../../controls/collectionListDropdown\"\nimport { ImpressionCardsCarousel } from \"../../components/impression-cards-carousel\";\nimport { UpcomingWorkationsCarousel } from \"../../components/upcoming-workations-carousel\";\nimport { setInitialWorkationSeasonDropdownItem, updateRoomPrices, updateLengthOfStayDropdownDiscounts, updateAllRoomBookingButtonsUrls } from './rooms-list.js';\nimport { initLocationMap } from './location-map.js';\nimport { initUpcomingWorkations } from './upcoming-workations.js';\nimport { ActivityCardsCarousel } from \"../../components/activity-cards\";\nimport { FeaturesCardsCarousel } from \"../../components/feature-slider\";\nimport { EditionCardsCarousel, updateEditionCardLinkUrls } from \"../../components/upcoming-editions\";\nimport { initUpcomingEditionsFilter } from \"../../components/upcoming-editions-filter\";\nimport { initReadMore } from \"../../utils/readMore.js\";\n\n// Make CollectionListDropDown globally accessible for other scripts\nwindow.CollectionListDropDown = CollectionListDropDown;\n\n\n/*****\n***\n*** Dropdown init\n***\n******/\n\n// Initialize the Room Filter Dropdowns\nCollectionListDropDown.init({ \n selector: \"#workation-season-dropdown\", \n onChange: (selectedItem) => {\n // Get the location value from the dropdown\n const editionSlug = selectedItem.getAttribute('data-value');\n updateLengthOfStayDropdownDiscounts(editionSlug);\n updateRoomPrices();\n updateAllRoomBookingButtonsUrls();\n }\n});\n\n// Initialize the Length of stay Dropdown\nCollectionListDropDown.init({ \n selector: \"#length-stay-dropdown\", \n initialValue: 'month-3', \n onChange: () => updateRoomPrices()\n});\n\n// Initialize the Guest Count Dropdown\nCollectionListDropDown.init({ \n selector: \"#guest-count-dropdown\", \n initialValue: '1', \n onChange: () => {\n updateRoomPrices();\n updateAllRoomBookingButtonsUrls();\n }\n});\n\n// Initialize the image carousels\nImpressionCardsCarousel.init({selectorId: '#impressions-cards-slider-1', isReverse: false});\nImpressionCardsCarousel.init({selectorId: '#impressions-cards-slider-2', isReverse: true});\n\n// Initialize the Upcoming Workations Carousel\nUpcomingWorkationsCarousel.init({\n selectors: {\n\t swiper: '#upcoming-workations .swiper',\n swiperWrapper: '#upcoming-workations .swiper-wrapper',\n swiperSlides: '#upcoming-workations .upcoming-workation-card', \n prevButton: '#upcoming-workations-swiper-prev-btn',\n nextButton: '#upcoming-workations-swiper-next-btn'\n },\n onItemClick: (item) => { \n\t\tconst editionSlug = item.getAttribute('data-edition');\n window.CollectionListDropDown.setValue(\"#workation-season-dropdown\", editionSlug);\n }\n});\n\n// Initialize the activity cards carousel\nActivityCardsCarousel.init({\n refContainer: \"#activity-cards-swiper-ref-container\", // this is needed for calculating the left offset\n swiper: '#activity-cards-section .swiper',\n swiperWrapper: '#activity-cards-section .swiper-wrapper', \n prevButton: '#activity-cards-swiper-prev-btn',\n nextButton: '#activity-cards-swiper-next-btn'\n});\n\n// Initialize the feature cards carousel\nFeaturesCardsCarousel.init({\n swiper: '#features-cards-section .swiper',\n swiperWrapper: '#features-cards-section .swiper-wrapper', \n prevButton: '#features-cards-btn-left',\n nextButton: '#features-cards-btn-right'\n});\n\n// Initialize the carousel\nEditionCardsCarousel.init({\n refContainer: \"#edition-cards-swiper-ref-container\", // this is needed for calculating the left offset\n swiper: '#edition-cards-section .swiper',\n swiperWrapper: '#edition-cards-section .swiper-wrapper', \n prevButton: '#edition-cards-swiper-prev-btn',\n nextButton: '#edition-cards-swiper-next-btn'\n});\n\n\n/*****\n***\n*** Initial setup after dom load\n***\n******/\ndocument.addEventListener('DOMContentLoaded', function() {\n initTestimonials('#destination-testimonials-section');\n\n\t// set initial value of the workation season dropdown\n\tsetInitialWorkationSeasonDropdownItem();\n \n\t// initially update room prices and discounts\n\tupdateRoomPrices();\n updateLengthOfStayDropdownDiscounts();\n \n // update initially all booking button URLs of all rooms\n updateAllRoomBookingButtonsUrls();\n\n // init location map\n initLocationMap();\n\n // init upcoming workations\n initUpcomingWorkations();\n\n // update edition card links\n updateEditionCardLinkUrls();\n\n // init upcoming editions filter\n initUpcomingEditionsFilter();\n\n // init read more\n initReadMore();\n});\n\n"],
5
+ "mappings": "wGACO,SAASA,EAAkBC,EAAY,CAC5C,IAAMC,EAAkB,SAAS,iBAAiB,GAAGD,CAAU,iCAAiC,EAC1FE,EAAiB,SAAS,iBAAiB,GAAGF,CAAU,oBAAoB,EAElF,GAAI,CAACC,GAAmBA,EAAgB,SAAW,EAAG,CACrD,QAAQ,MAAM,uBAAuB,EACrC,MACD,CAEA,IAAIE,EAAe,EAGnBF,EAAgB,QAASG,GAAOA,EAAG,MAAM,QAAU,MAAM,EACzDF,EAAe,QAASG,GAAS,CAC/BA,EAAK,MAAM,QAAU,OACrBA,EAAK,UAAU,OAAO,QAAQ,CAChC,CAAC,EAGD,SAASC,EAAgBC,EAAO,CAC9BN,EAAgB,QAAQ,CAACG,EAAII,IAAM,CACjCJ,EAAG,MAAM,QAAUI,IAAMD,EAAQ,QAAU,MAC7C,CAAC,EACDL,EAAe,QAAQ,CAACG,EAAMG,IAAM,CAClCH,EAAK,UAAU,OAAO,SAAUG,IAAMD,CAAK,CAC7C,CAAC,EACDJ,EAAeI,CACjB,CAGA,IAAME,EAAU,CAAC,GAAGR,CAAe,EACnCQ,EAAQ,QAAQ,CAACC,EAAaH,IAAU,CACtC,IAAMI,EAASD,EAAY,cAAc,gCAAgC,GAAG,IACtEL,EAAO,SAAS,cAAc,GAAGL,CAAU,gBAAgBO,EAAM,CAAC,IAAI,EAGxEF,GAAQM,IACXN,EAAK,IAAMM,EACVN,EAAK,MAAM,QAAU,SACjBE,IAAU,GAAGF,EAAK,UAAU,IAAI,QAAQ,EAE5CA,EAAK,iBAAiB,QAAS,IAAM,CACnCC,EAAgBC,CAAK,CACvB,CAAC,EAEL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Ac,EAClD,OAAO,uBAAuB,SAAS,6BAA8BN,CAAW,CAClF,CACF,CAAC,EAGDO,EAAsB,KAAK,CACzB,aAAc,uCACd,OAAQ,kCACR,cAAe,0CACf,WAAY,kCACZ,WAAY,iCACd,CAAC,EAGDC,EAAsB,KAAK,CACzB,OAAQ,kCACR,cAAe,0CACf,WAAY,2BACZ,WAAY,2BACd,CAAC,EAGDC,EAAqB,KAAK,CACxB,aAAc,sCACd,OAAQ,iCACR,cAAe,yCACf,WAAY,iCACZ,WAAY,gCACd,CAAC,EAQD,SAAS,iBAAiB,mBAAoB,UAAW,CACvDC,EAAiB,mCAAmC,EAGrDC,EAAsC,EAGtCT,EAAiB,EAChBD,EAAoC,EAGpCE,EAAgC,EAGhCS,EAAgB,EAGhBC,EAAuB,EAGvBC,EAA0B,EAG1BC,EAA2B,EAG3BC,EAAa,CACf,CAAC",
6
+ "names": ["initTestimonials", "selectorId", "allTestimonials", "allAuthorSlots", "currentIndex", "el", "slot", "showTestimonial", "index", "i", "authors", "testimonial", "imgUrl", "prevBtn", "nextBtn", "newIndex", "init_testimonials", "__esmMin", "CollectionListDropDown", "init_collectionListDropdown", "__esmMin", "dropdowns", "initDropDown", "selector", "onChange", "initialValue", "container", "dropdown", "dropdownToggle", "dropdownList", "selectedItemValueContainer", "collectionItems", "item", "event", "selectedOption", "selectDropDownElement", "getElementByItemValue", "selectedItem", "sourceElement", "clonedElement", "currentValue", "value", "x", "ImpressionCardsCarousel", "init_impression_cards_carousel", "__esmMin", "swiperInstance", "initSwiper", "selectorId", "isReverse", "swiper", "swiperWrapper", "UpcomingWorkationsCarousel", "init_upcoming_workations_carousel", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "onItemClick", "swiperWrapper", "swiperSlides", "swiper", "updateButtonsState", "slide", "e", "selectors", "getAllRoomPrices", "editionSlugFilter", "priceElements", "roomPrices", "x", "formatPrice", "price", "currency", "init_commonUtils", "__esmMin", "updateRoomPrices", "editionSlug", "lengthOfStay", "currency", "allRooms", "roomEditionPrices", "getAllRoomPrices", "room", "roomSlug", "allowWeeklyBooking", "roomEditionPrice", "x", "updateRoomPrice", "priceBreakdownElem", "priceMonthElem", "roomDiscountElem", "roomBookButton", "noPriceAvailable", "isWeekBooking", "noPriceAvailableText", "weeklyBookingText", "basePriceWeek", "basePriceMonth", "discount2months", "discount3months", "price2Month", "price3Month", "weeklyPriceFormatted", "formatPrice", "basePriceFormatted", "hidePriceBreakdown", "updateLengthOfStayDropdownDiscounts", "months2discountElems", "months3discountElems", "discounts2months", "discounts3months", "elem", "updateLengthOfStayDropdownDiscount", "discounts", "allEqual", "val", "lowestDiscount", "updateAllRoomBookingButtonsUrls", "allBookingButtons", "destinationSlug", "bookingButton", "bookingLinkElem", "baseUrl", "guestsCount", "setInitialWorkationSeasonDropdownItem", "editionSlugQueryParam", "workationSeasonItems", "workationInitialValue", "init_rooms_list", "__esmMin", "init_commonUtils", "initLocationMap", "address", "results", "status", "map", "init_location_map", "__esmMin", "initUpcomingWorkations", "item", "bookingState", "init_upcoming_workations", "__esmMin", "ActivityCardsCarousel", "init_activity_cards", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "refContainer", "swiperWrapper", "offsetBefore", "swiper", "updateButtonsState", "newOffsetBefore", "maxTranslate", "selectors", "FeaturesCardsCarousel", "init_feature_slider", "__esmMin", "swiperInstance", "prevButton", "nextButton", "SELECTORS", "initSwiper", "swiperWrapper", "swiper", "updateButtonsState", "setWrapperWidth", "wrapperBefore", "carouselContainer", "selectors", "updateEditionCardLinkUrls", "editionCard", "editionLinkElems", "editionSlug", "bookingState", "link", "bgImage", "baseUrl", "EditionCardsCarousel", "init_upcoming_editions", "__esmMin", "swiperInstance", "prevButton", "nextButton", "allSlides", "SELECTORS", "initSwiper", "refContainer", "swiperWrapper", "offsetBefore", "swiper", "updateButtonsState", "newOffsetBefore", "maxTranslate", "selectors", "season", "slidesToKeep", "slideEl", "initUpcomingEditionsFilter", "filterButtons", "allItems", "button", "btn", "season", "item", "allButton", "init_upcoming_editions_filter", "__esmMin", "initReadMore", "makeToggleLink", "initial", "link", "el", "maxHeight", "toggle", "e", "init_readMore", "__esmMin", "require_destination", "__commonJSMin", "init_testimonials", "init_collectionListDropdown", "init_impression_cards_carousel", "init_upcoming_workations_carousel", "init_rooms_list", "init_location_map", "init_upcoming_workations", "init_activity_cards", "init_feature_slider", "init_upcoming_editions", "init_upcoming_editions_filter", "init_readMore", "CollectionListDropDown", "selectedItem", "editionSlug", "updateLengthOfStayDropdownDiscounts", "updateRoomPrices", "updateAllRoomBookingButtonsUrls", "ImpressionCardsCarousel", "UpcomingWorkationsCarousel", "item", "ActivityCardsCarousel", "FeaturesCardsCarousel", "EditionCardsCarousel", "initTestimonials", "setInitialWorkationSeasonDropdownItem", "initLocationMap", "initUpcomingWorkations", "updateEditionCardLinkUrls", "initUpcomingEditionsFilter", "initReadMore"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubs-travel-js",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/mediakular/hubs.travel-js-public#readme",
6
6
  "bugs": {