hubs-travel-js 0.0.26 → 0.0.28

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 g="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,g=m,[...d,...a].forEach(p=>{let y=p.dataset.destinationslug===r;p.style.display=y?"flex":"none"})}l("",g),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 v={day:"numeric",month:"short",year:"numeric"},k=m.toLocaleDateString("en-GB",{day:"numeric",month:"short"}).replace(",",""),q=p.toLocaleDateString("en-GB",v).replace(",","");document.querySelectorAll(".total-dates").forEach(f=>f.innerHTML=`${k} - ${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,v=e.querySelector(".room-price-breakdown"),k=e.querySelector(".total-dates"),q=document.querySelector("#form-next-step-btn-step-1"),f=q.querySelector("a"),b=t.find(u=>u.editionSlug===o&&u.roomSlug===i),C=e.querySelectorAll(".price-info-card-title"),R=document.querySelector('[name="Total-Price"]');if(!b){v.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",k.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",k.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 E=b.basePrice,K=b.discountMonth2,X=b.discountMonth3,S=0,x=[],G=0,Z=u=>u===1?"st":u===2?"nd":u===3?"rd":"th";if(a<1&&d){let u=E/30*7*s;r.style.display="none",l.innerText=`${w(u,g)}`,m.innerText="per week"}else a>=1&&(S+=E*s,x.push(`Month 1: ${w(E,g)}`),r.style.display="none",l.innerText=`${w(S,g)}`,m.innerText="1st month");for(let u=2;u<=a;u++){let h=0;u===2?h=K:u>=3&&(h=X);let P=E*(1-h/100)*s;S+=P,x.push(`Month ${u}: ${w(P,g)}`);let B=u<=3?`${u}${Z(u)} month`:"from 3rd month";h>0&&(r.innerText=`${h.toFixed(1)}% discount - ${B}`,r.style.display="flex"),l.innerHTML=`${w(P,g)}`,m.innerText=B,G=h}let L=(c-n)/(1e3*60*60*24)-a*30;if(L>0){let h=E*(1-G/100)/30*L*s;S+=h,x.push(`${a>=1?"+":""} ${Math.round(L)} days: ${w(h,g)}`)}v.innerHTML=x.join("<br>"),p.innerText=`${s} x Person`,D.innerText=`${w(S,g)}`,R.value=`${w(S,g)}`}});var pe=H(()=>{var ve=ie(Y())});pe();})();
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 g="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,g=m,[...d,...a].forEach(p=>{let y=p.dataset.destinationslug===r;p.style.display=y?"flex":"none"})}l("",g),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.basePrice,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,g)}`,m.innerText="per week"}else a>=1&&(S+=b*s,x.push(`Month 1: ${w(S,g)}`),r.style.display="none",l.innerText=`${w(S,g)}`,m.innerText="1st month");for(let u=2;u<=a;u++){let h=0;u===2?h=K:u>=3&&(h=X);let P=b*(1-h/100)*s;S+=P,x.push(`Month ${u}: ${w(P,g)}`);let B=u<=3?`${u}${Z(u)} month`:"from 3rd month";h>0&&(r.innerText=`${h.toFixed(1)}% discount - ${B}`,r.style.display="flex"),l.innerHTML=`${w(P,g)}`,m.innerText=B,G=h}let L=(c-n)/(1e3*60*60*24)-a*30;if(L>0){let h=b*(1-G/100)/30*L*s;S+=h,x.push(`${a>=1?"+":""} ${Math.round(L)} days: ${w(h,g)}`)}E.innerHTML=x.join("<br>"),p.innerText=`${s} x Person`,D.innerText=`${w(S,g)}`,R.value=`${w(S,g)}`}});var pe=H(()=>{var ve=ie(Y())});pe();})();
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// \"basePrice\": ,\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 \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 basePrice = roomPriceInfo.basePrice;\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 = basePrice / 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 += basePrice * guestsCount;\n breakdown.push(`Month 1: ${formatPrice(basePrice, 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 = basePrice * (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 = basePrice * (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": "+jBAWO,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,a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,EAAqB,UAAY,aAGnC,QAASkB,EAAQ,EAAGA,GAASxC,EAAiBwC,IAAS,CACrD,IAAIG,EAAW,EACXH,IAAU,EACZG,EAAWT,EACFM,GAAS,IAClBG,EAAWR,GAGb,IAAMS,EAAeX,GAAa,EAAIU,EAAW,KAAOxB,EACxDiB,GAAcQ,EACdP,EAAU,KAAK,SAASG,CAAK,KAAKE,EAAYE,EAAcjG,CAAgB,CAAC,EAAE,EAE/E,IAAIkG,EAAYL,GAAS,EACnB,GAAGA,CAAK,GAAGD,EAAqBC,CAAK,CAAC,SACtC,iBAEFG,EAAW,IACbtB,EAAY,UAAY,GAAGsB,EAAS,QAAQ,CAAC,CAAC,gBAAgBE,CAAS,GACvExB,EAAY,MAAM,QAAU,QAG9BD,EAAiB,UAAY,GAAGsB,EAAYE,EAAcjG,CAAgB,CAAC,GAC3E2E,EAAqB,UAAYuB,EACjCP,EAAwBK,CAC1B,CAEA,IAAMG,GAAiB/C,EAAUD,IAAc,IAAO,GAAK,GAAK,IAAME,EAAkB,GACxF,GAAI8C,EAAgB,EAAG,CAErB,IAAMC,EADYd,GAAa,EAAIK,EAAwB,KAAO,GAC/BQ,EAAgB3B,EACnDiB,GAAcW,EACdV,EAAU,KAAK,GAAGrC,GAAmB,EAAI,IAAM,EAAE,IAAI,KAAK,MAAM8C,CAAa,CAAC,UAAUJ,EAAYK,EAAgBpG,CAAgB,CAAC,EAAE,CACzI,CAEA+E,EAAsB,UAAYW,EAAU,KAAK,MAAM,EACvDd,EAAmB,UAAY,GAAGJ,CAAW,YAC7CM,EAAe,UAAY,GAAGiB,EAAYN,EAAYzF,CAAgB,CAAC,GACvEqF,EAAsB,MAAQ,GAAGU,EAAYN,EAAYzF,CAAgB,CAAC,EAC5E,IChYA,IAAAqG,GAAAC,EAAA,SAAAC,GAAO",
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// \"basePrice\": ,\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 basePrice = roomPriceInfo.basePrice;\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 = basePrice / 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 += basePrice * 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 = basePrice * (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 = basePrice * (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": "+jBAWO,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,CAlCA,IAAAE,EAAAC,EAAA,QCcO,SAASC,GAA4B,CACzB,SAAS,iBAAiB,gBAAgB,EAElD,QAASC,GAAY,CAC5BA,E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DiB,GAAcQ,EACdP,EAAU,KAAK,SAASG,CAAK,KAAKE,EAAYE,EAAcjG,CAAgB,CAAC,EAAE,EAE/E,IAAIkG,EAAYL,GAAS,EACnB,GAAGA,CAAK,GAAGD,EAAqBC,CAAK,CAAC,SACtC,iBAEFG,EAAW,IACbtB,EAAY,UAAY,GAAGsB,EAAS,QAAQ,CAAC,CAAC,gBAAgBE,CAAS,GACvExB,EAAY,MAAM,QAAU,QAG9BD,EAAiB,UAAY,GAAGsB,EAAYE,EAAcjG,CAAgB,CAAC,GAC3E2E,EAAqB,UAAYuB,EACjCP,EAAwBK,CAC1B,CAEA,IAAMG,GAAiB/C,EAAUD,IAAc,IAAO,GAAK,GAAK,IAAME,EAAkB,GACxF,GAAI8C,EAAgB,EAAG,CAErB,IAAMC,EADYd,GAAa,EAAIK,EAAwB,KAAO,GAC/BQ,EAAgB3B,EACnDiB,GAAcW,EACdV,EAAU,KAAK,GAAGrC,GAAmB,EAAI,IAAM,EAAE,IAAI,KAAK,MAAM8C,CAAa,CAAC,UAAUJ,EAAYK,EAAgBpG,CAAgB,CAAC,EAAE,CACzI,CAEA+E,EAAsB,UAAYW,EAAU,KAAK,MAAM,EACvDd,EAAmB,UAAY,GAAGJ,CAAW,YAC7CM,EAAe,UAAY,GAAGiB,EAAYN,EAAYzF,CAAgB,CAAC,GACvEqF,EAAsB,MAAQ,GAAGU,EAAYN,EAAYzF,CAAgB,CAAC,EAC5E,IChYA,IAAAqG,GAAAC,EAAA,SAAAC,GAAO",
6
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", "basePrice", "discountMonth2", "discountMonth3", "totalPrice", "breakdown", "remainingDaysDiscount", "getMonthNumberEnding", "month", "weeklyPrice", "formatPrice", "discount", "monthlyPrice", "monthText", "remainingDays", "remainingPrice", "require_book_workation", "__commonJSMin", "import_book_workation"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../utils/formUtils.js", "../pages/contact/contact-form.js", "../pages/contact/index.js"],
4
- "sourcesContent": ["/**\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 \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}", "import { initConditionalFormFields } from \"../../utils/formUtils\" \n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n initConditionalFormFields();\n});", "import \"./contact-form\""],
4
+ "sourcesContent": ["/**\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}", "import { initConditionalFormFields } from \"../../utils/formUtils\" \n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n initConditionalFormFields();\n});", "import \"./contact-form\""],
5
5
  "mappings": "kjBAcO,SAASA,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,EAAM,QAAQ,yBAAyB,EAAIA,EAAQA,EAAM,cAAc,yBAAyB,EAE9GA,EAAM,MAAM,QAAUC,EAAa,QAAU,OACzCC,IACFA,EAAM,SAAWD,EACZA,IAAYC,EAAM,MAAQ,IAEnC,CAAC,CACH,CACF,CAvCA,IAAAC,EAAAC,EAAA,QCAA,IAAAC,EAAAC,EAAA,KAAAC,IAEA,SAAS,iBAAiB,mBAAoB,UAAY,CACxDC,EAA0B,CAC5B,CAAC,ICJD,IAAAC,EAAAC,EAAA,SAAAC,EAAO",
6
6
  "names": ["initConditionalFormFields", "trigger", "updateConditionalFields", "triggerName", "triggerValue", "field", "shouldShow", "input", "init_formUtils", "__esmMin", "require_contact_form", "__commonJSMin", "init_formUtils", "initConditionalFormFields", "require_contact", "__commonJSMin", "import_contact_form"]
7
7
  }
@@ -1,2 +1,2 @@
1
- (()=>{var l=(t,e)=>()=>(t&&(e=t(t=0)),e);var u=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);function i(){let t=document.querySelectorAll("[data-target-destination]"),e=document.querySelectorAll("[data-faq-destination]");function r(n){e.forEach(a=>{let o=a.getAttribute("data-faq-destination")===n;a.style.display=o?"block":"none"})}t.forEach(n=>{n.addEventListener("click",()=>{let a=n.getAttribute("data-target-destination");t.forEach(d=>{let c=d.querySelector("a");c&&c.classList.remove("active")});let o=n.querySelector("a");o&&o.classList.add("active"),r(a)})}),t.length>0&&t[0].click()}var s=l(()=>{});var f=u(()=>{s();document.addEventListener("DOMContentLoaded",function(){i()})});f();})();
1
+ (()=>{var y=(t,e)=>()=>(t&&(e=t(t=0)),e);var h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);function r(){let t=document.querySelectorAll("[data-target-destination]"),e=document.querySelectorAll("[data-faq-destination]");function f(a){e.forEach(i=>{let c=i.getAttribute("data-faq-destination")===a;i.style.display=c?"block":"none"})}t.forEach(a=>{a.addEventListener("click",()=>{let i=a.getAttribute("data-target-destination");t.forEach(o=>{let s=o.querySelector("a");s&&s.classList.remove("active")});let c=a.querySelector("a");c&&c.classList.add("active"),f(i),document.querySelectorAll(".faq-list-wrapper").forEach(o=>{let s=Array.from(o.children).filter(l=>l.hasAttribute("data-faq-destination")),u=s.length>0&&s.every(l=>l.style.display==="none"),n=o.querySelector(".no-faqs-message");n||(n=document.createElement("div"),n.className="no-faqs-message",n.textContent="No FAQs available for this destination.",n.style.display="none",o.appendChild(n)),n.style.display=u?"block":"none"})})}),t.length>0&&t[0].click()}var d=y(()=>{});var q=h(()=>{d();document.addEventListener("DOMContentLoaded",function(){r()})});q();})();
2
2
  //# sourceMappingURL=bundle-faqs.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../pages/faqs/faq-tabs.js", "../pages/faqs/index.js"],
4
- "sourcesContent": ["export function initFaqTabs () {\n const tabs = document.querySelectorAll(\"[data-target-destination]\");\n const faqs = document.querySelectorAll(\"[data-faq-destination]\");\n\n function showFAQsFor(destinationId) {\n faqs.forEach(faq => {\n const matchesDestination = faq.getAttribute(\"data-faq-destination\") === destinationId;\n faq.style.display = matchesDestination ? \"block\" : \"none\";\n });\n }\n\n tabs.forEach(tab => {\n tab.addEventListener(\"click\", () => {\n const selectedId = tab.getAttribute(\"data-target-destination\");\n\n // UI update for active tab (on anchor child)\n tabs.forEach(t => {\n const anchor = t.querySelector(\"a\");\n if (anchor) anchor.classList.remove(\"active\");\n });\n\n const currentAnchor = tab.querySelector(\"a\");\n if (currentAnchor) currentAnchor.classList.add(\"active\");\n\n showFAQsFor(selectedId);\n });\n });\n\n //Trigger first tab\n if (tabs.length > 0) {\n tabs[0].click();\n }\n}", "import { initFaqTabs } from \"./faq-tabs.js\";\n\ndocument.addEventListener('DOMContentLoaded', function() {\n initFaqTabs();\n});"],
5
- "mappings": "uGAAO,SAASA,GAAe,CAC7B,IAAMC,EAAO,SAAS,iBAAiB,2BAA2B,EAC5DC,EAAO,SAAS,iBAAiB,wBAAwB,EAE/D,SAASC,EAAYC,EAAe,CAClCF,EAAK,QAAQG,GAAO,CAClB,IAAMC,EAAqBD,EAAI,aAAa,sBAAsB,IAAMD,EACxEC,EAAI,MAAM,QAAUC,EAAqB,QAAU,MACrD,CAAC,CACH,CAEAL,EAAK,QAAQM,GAAO,CAClBA,EAAI,iBAAiB,QAAS,IAAM,CAClC,IAAMC,EAAaD,EAAI,aAAa,yBAAyB,EAG7DN,EAAK,QAAQQ,GAAK,CAChB,IAAMC,EAASD,EAAE,cAAc,GAAG,EAC9BC,GAAQA,EAAO,UAAU,OAAO,QAAQ,CAC9C,CAAC,EAED,IAAMC,EAAgBJ,EAAI,cAAc,GAAG,EACvCI,GAAeA,EAAc,UAAU,IAAI,QAAQ,EAEvDR,EAAYK,CAAU,CACxB,CAAC,CACH,CAAC,EAGGP,EAAK,OAAS,GAChBA,EAAK,CAAC,EAAE,MAAM,CAElB,CAhCA,IAAAW,EAAAC,EAAA,QCAA,IAAAC,EAAAC,EAAA,KAAAC,IAEA,SAAS,iBAAiB,mBAAoB,UAAW,CACvDC,EAAY,CACd,CAAC",
6
- "names": ["initFaqTabs", "tabs", "faqs", "showFAQsFor", "destinationId", "faq", "matchesDestination", "tab", "selectedId", "t", "anchor", "currentAnchor", "init_faq_tabs", "__esmMin", "require_faqs", "__commonJSMin", "init_faq_tabs", "initFaqTabs"]
4
+ "sourcesContent": ["export function initFaqTabs () {\n const tabs = document.querySelectorAll(\"[data-target-destination]\");\n const faqs = document.querySelectorAll(\"[data-faq-destination]\");\n\n function showFAQsFor(destinationId) {\n faqs.forEach(faq => {\n const matchesDestination = faq.getAttribute(\"data-faq-destination\") === destinationId;\n faq.style.display = matchesDestination ? \"block\" : \"none\";\n });\n }\n\n tabs.forEach(tab => {\n tab.addEventListener(\"click\", () => {\n const selectedId = tab.getAttribute(\"data-target-destination\");\n\n // UI update for active tab (on anchor child)\n tabs.forEach(t => {\n const anchor = t.querySelector(\"a\");\n if (anchor) anchor.classList.remove(\"active\");\n });\n\n const currentAnchor = tab.querySelector(\"a\");\n if (currentAnchor) currentAnchor.classList.add(\"active\");\n\n showFAQsFor(selectedId);\n\n // Show/hide \"no FAQs\" message if all children are hidden\n document.querySelectorAll('.faq-list-wrapper').forEach(wrapper => {\n const children = Array.from(wrapper.children).filter(child => child.hasAttribute('data-faq-destination'));\n const allHidden = children.length > 0 && children.every(child => child.style.display === 'none');\n let noFaqMsg = wrapper.querySelector('.no-faqs-message');\n if (!noFaqMsg) {\n noFaqMsg = document.createElement('div');\n noFaqMsg.className = 'no-faqs-message';\n noFaqMsg.textContent = 'No FAQs available for this destination.';\n noFaqMsg.style.display = 'none';\n wrapper.appendChild(noFaqMsg);\n }\n noFaqMsg.style.display = allHidden ? 'block' : 'none';\n });\n });\n });\n\n //Trigger first tab\n if (tabs.length > 0) {\n tabs[0].click();\n }\n}", "import { initFaqTabs } from \"./faq-tabs.js\";\n\ndocument.addEventListener('DOMContentLoaded', function() {\n initFaqTabs();\n});"],
5
+ "mappings": "uGAAO,SAASA,GAAe,CAC7B,IAAMC,EAAO,SAAS,iBAAiB,2BAA2B,EAC5DC,EAAO,SAAS,iBAAiB,wBAAwB,EAE/D,SAASC,EAAYC,EAAe,CAClCF,EAAK,QAAQG,GAAO,CAClB,IAAMC,EAAqBD,EAAI,aAAa,sBAAsB,IAAMD,EACxEC,EAAI,MAAM,QAAUC,EAAqB,QAAU,MACrD,CAAC,CACH,CAEAL,EAAK,QAAQM,GAAO,CAClBA,EAAI,iBAAiB,QAAS,IAAM,CAClC,IAAMC,EAAaD,EAAI,aAAa,yBAAyB,EAG7DN,EAAK,QAAQQ,GAAK,CAChB,IAAMC,EAASD,EAAE,cAAc,GAAG,EAC9BC,GAAQA,EAAO,UAAU,OAAO,QAAQ,CAC9C,CAAC,EAED,IAAMC,EAAgBJ,EAAI,cAAc,GAAG,EACvCI,GAAeA,EAAc,UAAU,IAAI,QAAQ,EAEvDR,EAAYK,CAAU,EAGtB,SAAS,iBAAiB,mBAAmB,EAAE,QAAQI,GAAW,CAChE,IAAMC,EAAW,MAAM,KAAKD,EAAQ,QAAQ,EAAE,OAAOE,GAASA,EAAM,aAAa,sBAAsB,CAAC,EAClGC,EAAYF,EAAS,OAAS,GAAKA,EAAS,MAAMC,GAASA,EAAM,MAAM,UAAY,MAAM,EAC3FE,EAAWJ,EAAQ,cAAc,kBAAkB,EAClDI,IACHA,EAAW,SAAS,cAAc,KAAK,EACvCA,EAAS,UAAY,kBACrBA,EAAS,YAAc,0CACvBA,EAAS,MAAM,QAAU,OACzBJ,EAAQ,YAAYI,CAAQ,GAE9BA,EAAS,MAAM,QAAUD,EAAY,QAAU,MACjD,CAAC,CACH,CAAC,CACH,CAAC,EAGGd,EAAK,OAAS,GAChBA,EAAK,CAAC,EAAE,MAAM,CAElB,CA/CA,IAAAgB,EAAAC,EAAA,QCAA,IAAAC,EAAAC,EAAA,KAAAC,IAEA,SAAS,iBAAiB,mBAAoB,UAAW,CACvDC,EAAY,CACd,CAAC",
6
+ "names": ["initFaqTabs", "tabs", "faqs", "showFAQsFor", "destinationId", "faq", "matchesDestination", "tab", "selectedId", "t", "anchor", "currentAnchor", "wrapper", "children", "child", "allHidden", "noFaqMsg", "init_faq_tabs", "__esmMin", "require_faqs", "__commonJSMin", "init_faq_tabs", "initFaqTabs"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../utils/formUtils.js", "../utils/close-page.js", "../pages/request-quote/index.js"],
4
- "sourcesContent": ["/**\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 \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}", "import { initConditionalFormFields, initFormWizardSteps, initCustomDropdowns, initDateRangePickers } from \"../../utils/formUtils\" \nimport { initCloseButtonClick } from \"../../utils/close-page\";\n\ndocument.addEventListener('DOMContentLoaded', function () {\n initCloseButtonClick();\n initConditionalFormFields();\n initFormWizardSteps();\n initCustomDropdowns();\n initDateRangePickers('#dates-start-end-group', '#Estimated-Start-Date');\n});"],
5
- "mappings": "uGAcO,SAASA,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,EAAM,QAAQ,yBAAyB,EAAIA,EAAQA,EAAM,cAAc,yBAAyB,EAE9GA,EAAM,MAAM,QAAUC,EAAa,QAAU,OACzCC,IACFA,EAAM,SAAWD,EACZA,IAAYC,EAAM,MAAQ,IAEnC,CAAC,CACH,CACF,CAQO,SAASC,GAAsB,CACpC,SAAS,iBAAiB,wBAAwB,EAAE,QAASC,GAAa,CAExE,IAAMF,EAAQ,SAAS,cAAc,OAAO,EAC5CA,EAAM,KAAO,SACbA,EAAM,KAAOE,EAAS,QAAQ,MAAQ,kBACtCF,EA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E,EAAAC,EAAA,QCAA,IAAAC,EAAAC,EAAA,KAAAC,IACAC,IAEA,SAAS,iBAAiB,mBAAoB,UAAY,CACxDC,EAAqB,EACrBC,EAA0B,EAC1BC,EAAoB,EACpBC,EAAoB,EACpBC,EAAqB,yBAA0B,uBAAuB,CACxE,CAAC",
4
+ "sourcesContent": ["/**\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}", "import { initConditionalFormFields, initFormWizardSteps, initCustomDropdowns, initDateRangePickers } from \"../../utils/formUtils\" \nimport { initCloseButtonClick } from \"../../utils/close-page\";\n\ndocument.addEventListener('DOMContentLoaded', function () {\n initCloseButtonClick();\n initConditionalFormFields();\n initFormWizardSteps();\n initCustomDropdowns();\n initDateRangePickers('#dates-start-end-group', '#Estimated-Start-Date');\n});"],
5
+ "mappings": "uGAcO,SAASA,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,EAAc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AiB,QAAS,IAAM,CAClCnB,EAAc,KAAK,IAAIA,EAAc,EAAG,CAAC,EACzCC,EAASD,CAAW,CACtB,CAAC,CACH,CAAC,EAEDC,EAASD,CAAW,CACtB,CAvPA,IAAAyB,EAAAC,EAAA,QCOO,SAASC,GAAuB,CACrC,SAAS,eAAe,cAAc,EAAE,iBAAiB,QAAS,UAAY,CAC5E,IAAMC,EAAW,SAAS,SACpBC,EAAgB,OAAO,SAAS,SAGlCC,EAAiB,KACrB,GAAI,CACFA,EAAiBF,EAAW,IAAI,IAAIA,CAAQ,EAAE,SAAW,IAC3D,MAAY,CACVE,EAAiB,IACnB,CAEI,OAAO,QAAQ,OAAS,GAAKA,IAAmBD,EAClD,OAAO,QAAQ,KAAK,EAEpB,OAAO,SAAS,KAAO,GAE3B,CAAC,CACH,CA1BA,IAAAE,EAAAC,EAAA,QCAA,IAAAC,EAAAC,EAAA,KAAAC,IACAC,IAEA,SAAS,iBAAiB,mBAAoB,UAAY,CACxDC,EAAqB,EACrBC,EAA0B,EAC1BC,EAAoB,EACpBC,EAAoB,EACpBC,EAAqB,yBAA0B,uBAAuB,CACxE,CAAC",
6
6
  "names": ["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_request_quote", "__commonJSMin", "init_formUtils", "init_close_page", "initCloseButtonClick", "initConditionalFormFields", "initFormWizardSteps", "initCustomDropdowns", "initDateRangePickers"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubs-travel-js",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/mediakular/hubs.travel-js-public#readme",
6
6
  "bugs": {