1(()=>{var e,t,n={420:()=>{window.wteL10n=window.wteL10n||{},window.wteL10n.api=window.wteapi=window.WTEApi=class{constructor(){}static async get(e,t={},n={}){let a={packages:this.getPackages,categories:this.getPackageCategories,trip:this.getTrip};return wteL10n.locale&&(t.lang=wteL10n.locale),this[e]||(this[e]="trip"==e?await a[e](t,n):lodash.keyBy(await a[e](t,n),"id")),this[e]}static async getTrip(e,t){const n=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}trip/${e.id}?context=${e.context||"view"}`,t);return await n.json()}static async getPackageCategories(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}package-categories?per_page=100`);return await t.json()}static async getPackages(e,t){var n;const a=Object.entries(e).map((([e,t])=>`${e}=${t}`)).join("&"),r=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages/${null!==(n=e.id)&&void 0!==n?n:`?${a}`}`,t);return await r.json()}static async addNewPackage(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wteL10n.wpapi.nonce},body:JSON.stringify({title:"Untitled Package",status:"publish",post_type:"trip-packages",...e})});return await t.json()}static async removePackage(e){const t=await fetch(`${wteL10n.wpapi.root+wteL10n.wpapi.versionString}packages/${e.id}`,{method:"DELETE",headers:{"Content-Type":"application/json","X-WP-Nonce":wteL10n.wpapi.nonce}});return await t.json()}}},773:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var a=n(7723);function r(){const e=document.querySelectorAll('form[name="wte_enquiry_contact_form"]');function t(e,t=400){if("true"===e.dataset.animating)return;e.dataset.animating="true";const n=parseFloat(window.getComputedStyle(e).opacity)||0;e.style.display="flex";let a=null;requestAnimationFrame((function r(i){a||(a=i);const o=i-a,s=n+(1-n)*Math.min(o/t,1);e.style.opacity=s,o<t?requestAnimationFrame(r):e.dataset.animating="false"}))}e.length&&("undefined"!=typeof jQuery&&"function"==typeof jQuery.fn.parsley&&e.forEach((function(e){jQuery(e).parsley()})),e.forEach((function(e){"true"!==e.dataset.enquiryBound&&(e.dataset.enquiryBound="true",e.addEventListener("submit",(function(n){n.preventDefault();const r=e.querySelector('[type="submit"]')||e.querySelector(".enquiry-submit")||e.querySelector("#enquiry_submit_button"),i=e.querySelector(".success-msg"),o=e.querySelector(".failed-msg"),s=()=>{r&&(r.classList.remove("btn-loading"),r.disabled=!1)};if("undefined"!=typeof jQuery&&"function"==typeof jQuery.fn.parsley&&!jQuery(e).parsley().isValid())return;if(e.isSubmitted)return;e.isSubmitted=!0,r&&(r.classList.add("btn-loading"),r.disabled=!0),i&&(i.textContent=""),o&&(o.textContent="");const c=new FormData(e),l=wteL10n?.wpxhr?.root||WTEAjaxData?.ajaxurl||"";if(!l)return console.error("API URL not configured"),e.isSubmitted=!1,o&&(o.textContent=(0,a.__)("Configuration error. Please contact support.","wp-travel-engine"),o.style.display="flex",t(o)),void s();fetch(l,{method:"POST",body:c}).then((function(e){if(!e.ok)throw new Error(e.statusText||(0,a.__)("An error occurred. Please try again.","wp-travel-engine"));return e.json()})).then((function(n){if(n.success){const r=n.data?.message||(0,a.__)("Enquiry sent successfully.","wp-travel-engine");i&&(i.textContent=r,i.style.display="flex",t(i),s(),e.reset(),"undefined"!=typeof jQuery&&"function"==typeof jQuery.fn.parsley&&jQuery(e).parsley().reset(),setTimeout((function(){!function(e,t,n=400){let a=null;requestAnimationFrame((function r(i){a||(a=i);const o=i-a;e.style.opacity=Math.max(1-o/n,0),o<n?requestAnimationFrame(r):(e.style.display="none","function"==typeof t&&t())}))}(i,(function(){n.data.redirect&&(window.location.href=n.data.redirect)}))}),2e3))}else{const e=n.data?.message||(0,a.__)("Failed to send enquiry. Please try again later.","wp-travel-engine");o&&(o.textContent=e,t(o)),s()}})).catch((function(e){console.error("Enquiry form submission error:",e),s(),o&&(o.textContent=(0,a.__)("An error occurred. Please try again.","wp-travel-engine"),o.style.display="flex",t(o))})).finally((function(){e.isSubmitted=!1}))}
1)))})),document.querySelectorAll(".wte-send-enquiry-message, #wte-send-enquiry-message").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();let t=this.closest(".wte_enquiry_contact_form-wrap");t||(t=document.getElementById("wte_enquiry_form_scroll_wrapper")),t||(t=document.querySelector(".wte_enquiry_contact_form-wrap")),t&&t.scrollIntoView({behavior:"smooth",block:"center"})}))})))}},1778:(e,t,n)=>{"use strict";function a(){}n.d(t,{A:()=>r}),a.hasClass=function(e,t){return e.classList?e.classList.contains(t):!!e.getAttribute("class").match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},a.addClass=function(e,t){var n=t.split(" ");e.classList?e.classList.add(n[0]):a.hasClass(e,n[0])||e.setAttribute("class",e.getAttribute("class")+" "+n[0]),n.length>1&&a.addClass(e,n.slice(1).join(" "))},a.removeClass=function(e,t){var n=t.split(" ");if(e.classList)e.classList.remove(n[0]);else if(a.hasClass(e,n[0])){var r=new RegExp("(\\s|^)"+n[0]+"(\\s|$)");e.setAttribute("class",e.getAttribute("class").replace(r," "))}n.length>1&&a.removeClass(e,n.slice(1).join(" "))},a.toggleClass=function(e,t,n){n?a.addClass(e,t):a.removeClass(e,t)},a.setAttributes=function(e,t){for(var n in t)e?.setAttribute&&e.setAttribute(n,t[n])},a.getChildrenByClassName=function(e,t){e.children;for(var n=[],r=0;r<e.children.length;r++)a.hasClass(e.children[r],t)&&n.push(e.children[r]);return n},a.getIndexInArray=function(e,t){return Array.prototype.indexOf.call(e,t)},a.on=function(e,t,n){document.addEventListener(e,(function(e){for(var a=e.target;a&&a!=this;a=a.parentNode)if(a.matches(t)){n.call(a,e);break}}),!1)};const r=a},3051:(e,t,n)=>{"use strict";n.r(t),n.d(t,{autoResizeTextarea:()=>a,default:()=>r});const a=e=>{e.style.height="54px",e.style.height=e.scrollHeight+"px"},r=()=>{const e="data-wpte-ui-init",t=(e,t)=>{e.value||"date"===e.type?t.classList.add("focus"):t.classList.remove("focus")},n=n=>{if(n.hasAttribute(e))return;const r=n.querySelector('input:not([type="hidden"])')||n.querySelector("select")||n.querySelector("textarea");r&&(n.setAttribute(e,"true"),t(r,n),"TEXTAREA"===r.tagName&&a(r))};document.addEventListener("focusin",(e=>{const t=e.target.closest(".wpte-material-ui-input-control");t&&t.classList.add("focus")})),document.addEventListener("focusout",(e=>{const n=e.target.closest(".wpte-material-ui-input-control");n&&t(e.target,n)})),document.addEventListener("change",(e=>{const n=e.target.closest(".wpte-material-ui-input-control");n&&t(e.target,n)})),document.addEventListener("input",(e=>{"TEXTAREA"===e.target.tagName&&a(e.target)}));const r=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(e.matches?.(".wpte-material-ui-input-control")&&n(e),e.querySelectorAll?.(".wpte-material-ui-input-control").forEach(n))}))}))}));document.querySelectorAll(".wpte-material-ui-input-control").forEach(n),r.observe(document.body,{childList:!0,subtree:!0})}},4126:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});const a=function(e){const t=e.querySelectorAll(".tab-anchor-wrapper");t&&Array.from(t).forEach((function(n){n.querySelector(".nb-tab-trigger").addEventListener("click",(function(a){a.preventDefault(),Array.from(t).forEach((e=>{e.classList.remove("nav-tab-active");let t=e.querySelector(".nb-tab-trigger");t.classList.remove("nav-tab-active");let n=document.getElementById(`nb-${t.dataset.configuration}-configurations`);n&&(n.style.display="none")}));let r=this.dataset.target,i=null;i=r?document.getElementById(r):document.getElementById(`nb-${this.dataset.configuration}-configurations`),n.classList.toggle("nav-tab-active"),this.classList.toggle("nav-tab-active"),"block"===i.style.display?i.style.display="none":i.style.display="block",(e.classList.contains("in-mobile")||e.classList.contains("wpte-tabs-sticky"))&&i.scrollIntoView({behavior:"smooth"})}))})),window.addEventListener("scroll",(function(){var e=document.querySelectorAll(".wpte-tabs-container.wpte-tabs-sticky .tab-content .nb-configurations"),t={},n=0;Array.prototype.forEach.call(e,(function(e){t[e.id]=e.offsetTop}));var a=document.documentElement.scrollTop||document.body.scrollTop;for(n in t)if(t[n]<=a+100){const e=n.split("");var r=document.querySelector('[data-configuration="'+e[3]+'"]');document.querySelector(".nav-tab-active").classList.remove("nav-tab-active"),r.classList.add("nav-tab-active")}document.querySelector(".wpte-tabs-container"),a=document.documentElement.scrollTop||document.body.scrollTop}))}},7723:e=>{"use strict";e.exports=window.wp.i18n}},a={};function r(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return n[e](i,i.exports,r),i.exports}r.m=n,r.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>{if(702===e)return"chunks/702.js"},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="wp-travel-engine:",r.l=(n,a,i,o)=>{if(e[n])e[n].push(a);else{var s,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),d=0;d<l.length;d++){var u=l[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+i){s=u;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack",t+i),s.src=n),e[n]=[a];var p=(t,a)=>{s.onerror=s.onload=null,clearTimeout(m);var r=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),r&&r.forEach((e=>e(a))),t)return t(a)},m=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{var e={458:0,978:0};r.f.j=(t,n)=>{var a=r.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise(((n,r)=>a=e[t]=[n,r]));n.push(a[2]=i);var o=r.p+r.u(t),s=new Error;r.l(o,(n=>{if(r.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,a[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var a,i,[o,s,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(a in s)r.o(s,a)&&(r.m[a]=s[a]);c&&c(r)}for(t&&t(n);l<o.length;l++)i=o[l],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunkwp_travel_engine=globalThis.webpackChunkwp_travel_engine||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};r.r(e),r.d(e,{calculateGrandTotal:()=>s,getTripEndDatetime:()=>h,numberFormat:()=>c,phpToMomentDF:()=>p,priceFormat:()=>u,wteGetFormatedPrice:()=>n,wteGetFormatedPriceWithCurrencyCode:()=>a,wteGetFormatedPriceWithCurrencyCodeSymbol:()=>i,wteGetFormatedPriceWithCurrencySymbol:()=>o});var t=r(1778);function n(e,t,n){return e=e||0,t=t||!0,n=n||0,"undefined"!=typeof WTE_CC_convData&&WTE_CC_convData.rate&&(e*=parseFloat(WTE_CC_convData.rate)),0==t?e:(e=(e=(e=parseFloat(e)).toFixed(n)).replace(".00",""),e=addCommas(e))}function a(e,t,n,a){return wteL10n.priceFormat(e).format(!0,!!n)}function i(e,t,n,a,r){return wteL10n.priceFormat(e).format(!1,!!a)}function o(e,t,n,a){return wteL10n.priceFormat(e).format(!1,!!n)}function s(){return parseFloat(window.wte.trip.travellersCost)+parseFloat(window.wte.trip.extraServicesCost)}function c(e,t=2,n=".",a=",",r=!0,i=!1){try{t=Math.abs(t),t=isNaN(t)?2:t;const o=e<0?"-":"";if(r){const t=Math.abs(Number(e)||0),{integerPart:r,decimalPart:i}=l(t.toString());let s="";if(i){const e=i.replace(/0+$/,"");e&&(s=n+e)}return o+d(r,a)+s}{let r=Math.abs(Number(e)||0);if(i)r=parseFloat(r.toFixed(t));else{const e=Math.pow(10,t);r=Math.floor(r*e)/e}const{integerPart:s,decimalPart:c}=l(r.toString()),u=d(s,a);let p=function(e,t,n){return t>0&&e?n+e.padEnd(t,"0").substr(0,t):t>0?n+"0".repeat(t):""}(c,t,n);return p&&(p=p.replace(/0+$/,""),p===n&&(p="")),o+u+p}}catch(e){console.log(e)}}function l(e){const t=e.split(".");return{integerPart:t[0],decimalPart:t[1]||""}}function d(e,t){const n=e,a=n.length>3?n.length%3:0;return(a?n.substr(0,a)+t:"")+n.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+t)}
1function u(e,t,n,a="%CURRENCY_SYMBOL%%FORMATED_AMOUNT%",r=2,i=".",o=",",s=!1,l=!1){e<0&&(a.includes("%AMOUNT%")||a.includes("%FORMATED_AMOUNT%"))&&(e=Math.abs(e),a="-"+a);let d=!0;isNaN(r)||(d=!1),["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","VND","VUV","XAF","XOF","XPF"].includes(t)&&(r=0,d=!1,l=!0);let u={"%CURRENCY_CODE%":s?t:`<span class="wpte-currency-code currency">${t}</span>`,"%CURRENCY_SYMBOL%":s?n:`<span class="wpte-currency-code currency">${n}</span>`,"%AMOUNT%":s?e:`<strong class="wpte-price amount">${e}</strong>`,"%FORMATED_AMOUNT%":s?c(e,r,i,o,d,l):`<strong class="wpte-price amount">${c(e,r,i,o,d,l)}</strong>`};return a.split(/(%\w+%)/g).reduce(((e="",t)=>{const n=u[t];return n||0===n?e+n:e+t}))}function p(e){let t={d:"DD",D:"ddd",j:"D",l:"dddd",w:"d",F:"MMMM",M:"MMM",m:"MM",n:"M",S:"o",jS:"Do",Y:"YYYY",y:"YY",g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss"};return e.match(/(\\?\\?[\w\W])/g)?.map((e=>t[e]||e)).join("")}r(420);const m={day:"days",days:"days",night:"days",nights:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes"};function h(e,t=wteL10n?.tripDurationStr,n=""){const a=moment(e);for(const[,e,n]of(t||"").matchAll(/(\d+)\s+(\w+)/g))a.add(+e,m[n.toLowerCase()]||"days");const r=-1!==e.indexOf("T")||/hours?|minutes?/i.test(t||""),i=n||p(wteL10n.format.datetime.date)+(r?" [at] "+p(wteL10n.format.datetime.time):"");return a.format(i)}window.wteL10n.util=window.wteutil=t.A,window.wteL10n.ui=window.wteui=window.wteL10n.ui||{},window.wteL10n.ui.Accordion=window.wteui.Accordion=class{constructor(e){this.element=e,t.A.addClass(this.element,"wte-accordion-initialized"),this.items=t.A.getChildrenByClassName(this.element,"wte-accordion-item"),this.version=this.element.getAttribute("data-version")?"-"+this.element.getAttribute("data-version"):"",this.showClass="wte-accordion-open",this.animateHeight="on"==this.element.getAttribute("data-animation"),this.multiItems=!("off"==this.element.getAttribute("data-multi-items")),this.deepLinkOn="on"==this.element.getAttribute("data-deep-link"),this.initAccordion()}initAccordion(){for(var e=0;e<this.items.length;e++){var n=this.items[e].getElementsByClassName("wte-accordion-button")[0];if(n){var a=this.items[e].getElementsByClassName("wte-accordion-collapse")[0],r=t.A.hasClass(this.items[e],this.showClass)?"true":"false";t.A.setAttributes(n,{"aria-expanded":r,"aria-controls":"accordion-content-"+e,id:"accordion-header-"+e}),t.A.addClass(n,"wte-accordion-trigger"),t.A.setAttributes(a,{"aria-labelledby":"accordion-header-"+e,id:"accordion-content-"+e})}}this.initAccordionEvents(),this.initDeepLink()}initAccordionEvents(){var e=this;this.element.addEventListener("click",(function(n){var a=n.target.closest(".wte-accordion-trigger");a&&t.A.getIndexInArray(e.items,a.closest(".wte-accordion-item"))>=0&&e.triggerAccordion(a)}))}triggerAccordion(e){var t="true"===e.getAttribute("aria-expanded");this.animateAccordion(e,t,!1),!t&&this.deepLinkOn&&history.replaceState(null,"","#"+e.getAttribute("aria-controls"))}animateAccordion(e,n,a){var r=e.closest(".wte-accordion-item"),i=r.getElementsByClassName("wte-accordion-collapse")[0],o=n?"false":"true";t.A.toggleClass(r,this.showClass,!n),e.setAttribute("aria-expanded",o),i&&this.resetContentVisibility(r,i,n),(!this.multiItems&&!n||a)&&this.closeSiblings(r)}resetContentVisibility(e,n,a){t.A.toggleClass(e,this.showClass,!a),n.removeAttribute("style"),a&&!this.multiItems&&this.moveContent()}closeSiblings(e){for(var n=t.A.getIndexInArray(this.items,e),a=0;a<this.items.length;a++)if(t.A.hasClass(this.items[a],this.showClass)&&a!=n)return this.animateAccordion(this.items[a].getElementsByClassName("wte-accordion-trigger")[0],!0,!1),!1}moveContent(){var e=this.element.getElementsByClassName(this.showClass);if(0!=e.length){var t=e[0].getBoundingClientRect();if(t.top<0||t.top>window.innerHeight){var n=window.scrollY||document.documentElement.scrollTop;window.scrollTo(0,t.top+n)}}}initDeepLink(){if(this.deepLinkOn){var e=window.location.hash.substr(1);if(e&&""!=e){var t=this.element.querySelector('.wte-accordion-trigger[aria-controls="'+e+'"]');t&&"true"!==t.getAttribute("aria-expanded")&&(this.animateAccordion(t,!1,!0),setTimeout((function(){t.scrollIntoView(!0)})))}}}},window.wteL10n.helpers=window.wtehelpers=e,window.addCommas||(window.addCommas=e=>{for(var t=(e+="").split("."),n=t[0],a=t.length>1?"."+t[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+WPTE_Price_Separator+"$2");return n+a}),window.wteGetFormatedPrice=n,window.wteGetFormatedPriceWithCurrencyCode=
1a,window.wteGetFormatedPriceWithCurrencyCodeSymbol=i,window.wteGetFormatedPriceWithCurrencySymbol=o,window.calculateGrandTotal=s;const f=function(e){const{currency:t,baseCurrency:n,currencySymbol:a,format:{number:r,price:i}}=wteL10n;let o={"%CURRENCY_CODE%":`${t}`,"%CURRENCY_SYMBOL%":`${a}`,"%AMOUNT%":""+(e*=+{[n]:1}[t]),"%FORMATED_AMOUNT%":`${c(e,+r.decimal,r.decimalSeparator,r.thousansSeparator,!0,format.enableRound)}`};return i.split(/(%\w+%)/g).reduce(((e="",t)=>o[t]?e+o[t]:e+t))};t.A.on("click",".wte-popper button",(function(e){let n=this.closest(".wte-popper");n&&t.A.toggleClass(n,"active",!t.A.hasClass(n,"active"))}));const w=function(e){if(!t.A.hasClass(e,"wte-price-field")){let t=e.parentElement,n=document.createElement("input");n.type="hidden",n.name=e.name,n.value=e.value,e.name="",e.value=f(e.value),t.appendChild(n),e.addEventListener("focus",(function(){e.value=n.value})),e.addEventListener("blur",(function(){n.value=e.value,e.value=f(e.value)})),e.classList.add("wte-price-field")}};function y(e){var t=wteL10n.version,n=document.querySelectorAll("[class*=_wte_update_notice_], [data-wte-update]");if(n)for(var a in n){var r=n[a];if(r.classList)if(r.classList.contains(`_wte_update_notice_${t}`))r.classList.remove(`_wte_update_notice_${t}`);else{var i=new RegExp(`^(wte_(new|updated|note)_${t})$`);if(r.dataset.wteUpdate.match(i)){var o=r.dataset.wteUpdate;r.classList.add(o),r.removeAttribute("data-wte-update")}}}}window.wteL10n.ui.priceField=w,document.addEventListener("wteEditPackageRender",(function(){document.querySelectorAll('[data-wte-field-type="price"]')?.forEach((function(e){w(e)}))})),t.A.on("change","[data-toggle-target]",(function(e){let t=document.querySelector(this.dataset.toggleTarget);t&&(this.checked?t.style.removeProperty("display"):t.style.display="none")})),t.A.on("click",".wpte-edit-booking-detail",(function(e){e.preventDefault(),this.closest(".wpte-block").querySelectorAll("select, input").forEach((function(e){e.dataset.attribName&&(e.name=e.dataset.attribName),e.dataset.attribValue&&(e.value=e.dataset.attribValue),e.dataset.attribType&&(e.type=e.dataset.attribType),e.disabled&&(e.disabled=!1),e.type&&(e.readOnly=!1)})),this.closest(".wpte-block").querySelectorAll(".show_on_edit").forEach((function(){this.style.removeProperty("display")}))})),t.A.on("click",".wpte-edit-additional-note",(function(e){e.preventDefault(),this.closest(".wpte-block").querySelectorAll("select, input").forEach((function(e){e.dataset.attribName&&(e.name=e.dataset.attribName),e.dataset.attribValue&&(e.value=e.dataset.attribValue),e.dataset.attribType&&(e.type=e.dataset.attribType),e.disabled&&(e.disabled=!1),e.type&&(e.readOnly=!1)})),this.closest(".wpte-block").querySelectorAll(".show_on_edit").forEach((function(){this.style.removeProperty("display")}))})),t.A.on("click",".wte-email-template-updater",(function(e){e.preventDefault();var t=document.getElementById(this.dataset.target);t&&t.submit()})),document.addEventListener("wteSettingsTabContentLoaded",y),document.addEventListener("DOMContentLoaded",(e=>{y();var n=document.querySelectorAll(".wte-code");n&&n.forEach((function(e){e.dataset.height&&(e.style.height=e.dataset.height+"px"),hljs&&hljs.highlightBlock(e)})),t.A.on("click",".wte-onclick-toggler",(function(e){if(e.preventDefault(),this.dataset.target){var t=document.querySelector(this.dataset.target);t&&(Array.from(t.classList).includes("visible")?(t.classList.remove("visible"),t.style.display="none"):(t.style.removeProperty("display"),t.classList.add("visible")))}}))})),window.wteL10n=window.wteL10n||{};const g=function(e){this._value=e,this._getPriceFormat=function(){return wteL10n.format.price},this.get=function(){return this._value},this.format=function(e=!1,t=!0){const{currency:n,baseCurrency:a,currencySymbol:r,baseCurrencySymbol:i,format:{number:o,price:s,enableRound:c}}=wteL10n;let l={[a]:1};if("undefined"!=typeof wteCc&&wteCc?.code&&t)for(let e in wteCc.code)l={...l,[wteCc.code[e]]:wteCc.rate[e]};let d=+this._value*(t?+l[n]:1),u=+o.decimal;return wtehelpers.priceFormat(d,t?n:a,t?r:i,s,u,o.decimalSeparator,o.thousandSeparator,e,c)}};window.wteL10n.priceFormat=window.wteL10n.priceFormat||function(e){return new g(e)};const v=function(e){this._time=e,this.get=function(){return this._time},this.set=function(e){this._time=e},this._getTimeFormat=function(){return wteL10n.helpers.phpToMomentDF(wteL10n.format.datetime.date)},this.format=function(e=null,t=!1){if(wteL10n.format.datetime.timezone,!this._time)return this._time;if(e)return moment(this._time).format(e);let n=moment(this._time).format(this._getTimeFormat());return n+=t?" at "+moment(this._time).format(p(wteL10n.format.datetime.time)):"",n},this.getDatewithOffset=function(e){if(this._time){let t=moment(this._time).utc().format("YYYY-MM-DDTHH:mm:ss")+e;return new Date(t)}}};window.wteL10n.dateFormat=window.wteL10n.dateFormat||function(e){return new v(e)},window.wteL10n.getTripEndDatetime=window.wteL10n.getTripEndDatetime||h})(),(()=>{"use strict";function e(e){if(!e||"true"===e.dataset.mapLoaded)return!1;const t=e.dataset.iframe;if(!t)return!1;try{const n=JSON.parse(t),a=document.createElement("div");a.innerHTML=n.trim();const r=a.querySelector("iframe");
1if(!r)return console.warn("WTE Map: No iframe found in encoded data"),!1;const i=document.createElement("iframe");for(const e of r.attributes)i.setAttribute(e.name,e.value);i.getAttribute("width")||i.setAttribute("width","100%"),i.getAttribute("height")||i.setAttribute("height","450"),i.style.border="0",i.setAttribute("loading","lazy"),i.setAttribute("allowfullscreen",""),i.setAttribute("referrerpolicy","no-referrer-when-downgrade");const o=e.querySelector(".wte-map-placeholder-inner");o&&(o.style.display="none");const s=e.querySelector("noscript");return s&&s.remove(),e.appendChild(i),e.dataset.mapLoaded="true",e.classList.add("wte-map-loaded"),e.style.cursor="default",e.dispatchEvent(new CustomEvent("wte:map-loaded",{bubbles:!0,detail:{container:e,iframe:i}})),!0}catch(e){return console.error("WTE Map: Error loading map iframe:",e),!1}}const{default:t}=r(3051),n=r(773).A;function a(e){for(var t=(e+="").split("."),n=t[0],a=t.length>1?"."+t[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1"+WPTE_Price_Separator+"$2");return n+a}jQuery((function(t){!function(){if(window.wteL10n&&!1===window.wteL10n.lazyLoadEnabled)return void document.querySelectorAll('.wte-map-placeholder[data-map-loaded="false"]').forEach(e);const t=document.querySelectorAll('.wte-map-placeholder[data-map-loaded="false"]');0!==t.length&&("IntersectionObserver"in window?(window.wteMapObserver||(window.wteMapObserver=new IntersectionObserver(((t,n)=>{t.forEach((t=>{if(t.isIntersecting){const a=t.target;e(a),n.unobserve(a)}}))}),{rootMargin:"100px",threshold:0})),t.forEach((e=>{"true"!==e.dataset.observerAttached&&(window.wteMapObserver.observe(e),e.dataset.observerAttached="true")}))):t.forEach(e))}();const i=()=>{const e=document.querySelectorAll(".tippy-exist");e.length&&e.forEach((e=>{let t={};try{t=JSON.parse(e.dataset?.options||"{}")}catch(e){console.error("Error loading tippy:",e.message)}tippy(e,{content:e=>e.getAttribute("data-content"),allowHTML:!0,...t})}))};if(document.addEventListener("tripfetched",(function(e){i()})),i(),!wte.single_showtabs){t(".tab-inner-wrapper .tab-anchor-wrapper:first-child").addClass("nav-tab-active");const e=document.getElementById("tabs-container");e&&new(0,r(4126).A)(e),t(".tab_content").hide(),t(".tab_content:first").show(),t("ul.tabs li").click((function(){t(".tab_content").hide();var e=t(this).attr("rel");t("#"+e).fadeIn(),t("ul.tabs li").removeClass("active"),t(this).addClass("active"),t(".tab_drawer_heading").removeClass("d_active"),t(".tab_drawer_heading[rel^='"+e+"']").addClass("d_active")})),t(".tab_drawer_heading").click((function(){t(".tab_content").hide();var e=t(this).attr("rel");t("#"+e).fadeIn(),t(".tab_drawer_heading").removeClass("d_active"),t(this).addClass("d_active"),t("ul.tabs li").removeClass("active"),t("ul.tabs li[rel^='"+e+"']").addClass("active")})),t("ul.tabs li").last().addClass("tab_last")}t((function(){var e=t(".payment-check");!1===e.is(":checked")&&e.is(":visible")&&(e.filter("[value=paypal]").prop("checked",!0),t(".stripe-button").removeClass("active"),t(".stripe-button-el").hide(),t("#wp-travel-engine-order-form").attr("action",WP_OBJ.link.paypal_link))})),t("body").on("click",".paypal-form",(function(e){var n=t(".stripe_checkout_app").attr("src");t(".stripe_checkout_app").attr("src",""),t(".stripe_checkout_app").attr("src",n),t("#wp-travel-engine-order-form").submit()})),t("body").on("click",".payment-check",(function(e){t(this).is(":checked")&&("stripe"==t(this).attr("value")&&(t("#wp-travel-engine-order-form").attr("action",WP_OBJ.link.form_link),t(".paypal-form").hide(),t(".stripe-form").fadeIn("slow"),t(".stripe-button").addClass("active"),t(".stripe-button-el").show()),"paypal"==t(this).attr("value")&&(t("#wp-travel-engine-order-form").attr("action",WP_OBJ.link.paypal_link),t(".stripe-button").removeClass("active"),t(".stripe-button-el").hide(),t(".paypal-form").fadeIn("slow")))})),t("body").on("click",".check-availability",(function(e){e.preventDefault(),t(".date-time-wrapper").fadeIn("slow")})),t("body").on("click",".check-availability",(function(e){e.preventDefault(),t(".wp-travel-engine-price-datetime").focus()})),t("body").on("click",".wp-travel-engine-cart",(function(e){e.preventDefault(),trip_id=t(this).attr("data-id"),nonce=t(this).attr("data-nonce"),jQuery.ajax({type:"post",dataType:"json",url:WTEAjaxData.ajaxurl,data:{action:"wp_add_trip_cart",trip_id,nonce},success:function(e){"already"===e.type?(t(".wp-cart-message-"+trip_id).css("color","orange"),t(".wp-cart-message-"+trip_id).html(e.message).fadeIn("slow").delay(3e3).fadeOut("slow")):"success"===e.type?(t(".wp-cart-message-"+trip_id).css("color","green"),t(".wp-cart-message-"+trip_id).html(e.message).fadeIn("slow").delay(3e3).fadeOut("slow")):(t(".wp-cart-message-"+trip_id).css("color","red"),t(".wp-cart-message-"+trip_id).html(e.message).fadeIn("slow").delay(3e3).fadeOut("slow")),t(".wte-update-cart-button-wrapper:visible").length<1&&t(".wte-update-cart-button-wrapper").css("display","block")}})})),t("#price-loading").fadeOut(2e3),t(".price-holder").fadeIn(2e3),t("body").on("change",".travelers-number",(function(e){$val=t(this).val(),$new_val=t(this).parent().parent().siblings(".trip-price-holder").children(".cart-price-holder").text().replace(/,/g,""),$total=$val*$new_val,$total=a($total),t(this).parent().parent().siblings(".cart-trip-total-price").children(".cart-trip-total-price-holder").text($total),$sum=0,t(".cart-trip-total-price-holder").each((function(e){$tcost=t(this).text().replace(/,/g,""),$sum=parseInt($sum)+parseInt($tcost)})),$sum=a($sum),t(".total-trip-price").text($sum),$value=0,$val1=parseInt(t("span.travelers-number").text()),t("input.travelers-number").each((function(e){""!==t(this).val()&&($value=parseInt($value)+parseInt(t(this).val()))})),$travelers=parseInt($value)+parseInt($val1),t(".total-trip-travelers").text($travelers)})),t("#wp-travel-engine-cart-form").on("submit",(function(e){e.preventDefault();var n=t("#wp-travel-engine-cart-form").serialize(),a=t("#update_cart_action_nonce").val();jQuery.ajax({type:"post",url:WTEAjaxData.ajaxurl,data:{action:"wte_update_cart",nonce:a,data2:n},success:function(){t(".wte-update-cart-msg").text(WPMSG_OBJ.ajax.success),t(".wte-update-cart-msg").css("color","green").fadeIn("slow").delay(3e3).fadeOut("slow")}})})),t("#wte_payment_options").on("change",(function(e){var n=t("#wte_payment_options :selected").val();e.preventDefault(),""!=n&&t("#price-loader").fadeIn("slow").delay("3000").fadeOut("3000")})),n(),t("#wp-travel-engine-order-form").submit((function(e){if("Himalayan-Bank"!=t("#wte_payment_options :selected").val()){var n=t(this),a=n.find("input[name=amount]").val();!isNaN(a)&&a.length>0&&(options_val=a,t("<input>").attr({type:"hidden",id:"amount",name:"amount",value:options_val}).appendTo(n))}})),t("#wte_payment_options").on("change",(function(e){var n=t("#wte_payment_options :selected").val();if(e.preventDefault(),""==n||"Test Payment"==n)return t("#wte-checkout-payment-fields").html(""),t("#wp-travel-engine-order-form").attr("action",Url.normalurl),t(".wp-travel-engine-billing-details-wrapper").html(response.data),t(".stripe-button:visible").remove(),t(".stripe-button-el").remove(),t(".wp-travel-engine-submit").show(),void t(".wte-authorize-net-wrap").remove();"PayPal"==n&&jQuery.ajax({type:"post",url:WTEAjaxData.ajaxurl,data:{action:"wte_payment_gateway",val:n,_nonce:WTEAjaxData.nonce},success:function(e){"PayPal"==n&&(t("#wp-travel-engine-order-form").attr("action",Url.paypalurl),t(".wp-travel-engine-billing-details-wrapper").html(e.data),t("#wte-checkout-payment-fields").html(e.data),t(".stripe-button:visible").remove(),t(".stripe-button-el").remove(),t(".wp-travel-engine-submit").show(),t(".wte-authorize-net-wrap").remove()),"Test Payment"==n&&(t("#wp-travel-engine-order-form").attr("action",Url.normalurl),t(".wp-travel-engine-billing-details-wrapper").html(e.data),t(".stripe-button:visible").remove(),t(".stripe-button-el").remove(),t(".wp-travel-engine-submit").show(),t(".wte-authorize-net-wrap").remove())}})})),t("body").on("keyup","#cost_includes",(function(e){t("#include-result").val(t("#cost_includes").val()),t("#include-result").val("<li>"+t("#include-result").val().replace(/\n/g,"</li><li>")+"</li>")})),t("body").on("keyup","#cost_excludes",(function(e){t("#exclude-result").val(t("#cost_excludes").val()),t("#exclude-result").val("<li>"+t("#exclude-result").val().replace(/\n/g,"</li><li>")+"</li>")})),t("body").on("keyup",".itinerary-content",(function(e){t(this).siblings(".itinerary-content-inner").val(t(this).val()),t(this).siblings(".itinerary-content-inner").val("<p>"+t(this).val().replace(/\n/g,"</p><p>")+"</p>")})),t(document).on("click",".expand-all-itinerary",(function(e){e.preventDefault(),t(".itinerary-row").children(".itinerary-content").slideToggle(350),t(this).children("svg").hasClass("fa-toggle-on")?t(this).children("svg").addClass("fa-toggle-off"):t(this).children("svg").addClass("fa-toggle-on"),t(".itinerary-row").children(".itinerary-content").toggleClass("show"),t(".itinerary-row").find(".dashicons.dashicons-arrow-down.custom-toggle-tabs").toggleClass("open")})),t(document).on("click",".less-no",(function(e){$val=t(this).next("input").val(),0!=$val&&($val=parseInt($val)-1,t(this).next("input").val($val))})),t(document).on("click",".more-no",(function(e){if($val=t(this).prev("input").val(),""==$val)return $val=1,void t(this).prev("input").val($val);$val=parseInt($val)+1,t(this).prev("input").val($val)})),document.getElementById("wp-travel-engine-new-checkout-form")&&"function"==typeof jQuery.fn.parsley&&(t("#wp-travel-engine-new-checkout-form").parsley(),t("form.wpte-lrf-form").parsley()),t("#wte-send-enquiry-message").click((function(e){e.preventDefault(),document.getElementById("wte_enquiry_form_scroll_wrapper").scrollIntoView({behavior:"smooth",block:"center"})}));const o=document.getElementById("wte_enquiry_contact_form");o&&"function"==typeof jQuery.fn.parsley&&t(o).parsley(),t(".wte-ordering").on("change","select.orderby",(function(){t(this).closest("form").submit()}));var s=document.querySelectorAll(".wpte-enhanced-select");function c(e,t){null!=e&&null!=t&&e.contentWindow.postMessage(JSON.stringify(t),"*")}function l(e,t){var n,a,r,i,o;if(a=(n=e.find(".slick-current")).attr("class").split(" ")[1],i=n.find("iframe").get(0),r=n.data("video-start"),"vimeo"===a)switch(t){case"play":null!=r&&r>0&&!n.hasClass("started")&&(n.addClass("started"),c(i,{method:"setCurrentTime",value:r})),c(i,{method:"play",value:1});break;case"pause":c(i,{method:"pause",value:1})}else if("youtube"===a)switch(t){case"play":c(i,{event:"command"}),c(i,{event:"command",func:"playVideo"});break;case"pause":c(i,{event:"command",func:"pauseVideo"})}else"video"===a&&null!=(o=n.children("video").get(0))&&("play"===t?o.play():o.pause())}
1s&&s.forEach((function(e){t(e).select2({closeOnSelect:!1,allowClear:!1})})),document.querySelectorAll(".wte-trip-vidgal-popup-trigger").forEach((function(e){e.addEventListener("click",(function(e){var t;e.preventDefault();const n=JSON.parse(null!==(t=this.getAttribute("data-items"))&&void 0!==t?t:[]);jQuery?.fancybox.open(n,{buttons:["zoom","slideShow","fullScreen","close"]})}))}));var d=t(".main-slider");d.slick&&(d.on("beforeChange",(function(e,n){l(n=t(n.$slider),"pause")})),d.on("afterChange",(function(e,n){l(n=t(n.$slider),"play")})),d.slick({lazyLoad:"progressive",slidesToShow:1,slidesToScroll:1,arrows:!1,dots:!1,fade:!0,asNavFor:".slider-nav",cssEase:"cubic-bezier(0.87, 0.03, 0.41, 0.9)"}),t(".slider-nav").slick({slidesToShow:3,slidesToScroll:1,asNavFor:".main-slider",dots:!1,arrows:!0,focusOnSelect:!0}))})),function(){t();var e=document.querySelectorAll(".wpte-bf-toggle-wrap");function n(e,t){return function n(a){var r=e.querySelector(".wpte-bf-toggle-content");e.className.indexOf("wpte-bf-active")>-1?function(e,t){var n=1;!function a(){if((n-=.05)<=0)return e.style.removeProperty("opacity"),e.style.display="none",void t();e.style.opacity=n,requestAnimationFrame(a)}()}(r,(function(){document.removeEventListener("click",n),e.classList.remove("wpte-bf-active"),t()})):(e.className.indexOf("wpte-bf-active")<0?e.classList.add("wpte-bf-active"):e.classList.remove("wpte-bf-active"),t())}}e&&e.forEach((function(e){var t=e.querySelector(".wpte-bf-toggle-title"),a=(e.querySelector(".wpte-bf-toggle-content"),e.querySelector(".wpte-bf-toggle-close"));a&&a.addEventListener("click",(function(t){t.preventDefault(),n(e)})),t&&t.addEventListener("click",(function(a){document.addEventListener("click",n(e,(function(){var n=t.querySelector(".wtebf-toggle-title"),a=t.querySelector(".wtebf-toggle-title-active");a&&(a.style.display=e.className.indexOf("wpte-bf-active")>-1?"block":"none"),n&&(n.style.display=e.className.indexOf("wpte-bf-active")<0?"block":"none")})))}))}));var a=document.getElementById("wpte_price-toggle-btn-mb");if(a){var r=document.getElementById("wpte_price-toggle-btn-mb-layout-3"),i=a.closest(".wpte-booking-area, .wp-block-wptravelenginetripblocks-booking"),o=i?.querySelector(".wpte-bf-price-wrap"),s=i.querySelector(".wp-block-wptravelenginetripblocks-trip-pricing");function w(){i?.classList.remove("show"),a?.classList.remove("active")}a.onclick=function(){this.classList.toggle("active"),i?.classList.toggle("show"),o?.classList.toggle("show"),o?.style.maxHeight?(o.style.maxHeight=null,s.style.maxHeight=null):(o.style.maxHeight=o.scrollHeight+"px",s.style.maxHeight=s.scrollHeight+"px")};var c=document.getElementById("open-booking-modal");if(i&&(r&&r.addEventListener("click",(function(){w()})),c?.addEventListener("click",(function(){w()}))),i&&i.matches(".wpte-form-layout-2")&&window.matchMedia("(max-width: 1024px)").matches){var l=i.clientHeight;document.body.style.padding=`0 0 ${l}px`}}let d=document.querySelector(".advanced-search-wrapper");if(d){let y=d.querySelector(".sidebar"),g=document.getElementById("wte-filterbar-toggle-btn");g?.addEventListener("click",(()=>{d.classList.add("open"),document.body.classList.add("advance-search-open")})),d?.addEventListener("click",(e=>{y.contains(e.target)||(d.classList.remove("open"),document.body.classList.remove("advance-search-open"))}))}var u=function(e,t=null){var n=e.querySelector(".itinerary-content"),a=e.querySelector(".accordion-tabs-toggle"),r=null===t?!a.classList.contains("active"):t,i=n.scrollHeight+.9;n.classList.toggle("show",r),n.style.maxHeight=r?i+"px":"0px",a.classList.toggle("active",r)},p=document.querySelector(".wte-trip-itinerary-v2");if(p){var m=document.getElementById("itinerary-toggle-button"),h=p.querySelectorAll(".itinerary-row");m&&m.addEventListener("change",(function(){h&&h.forEach((e=>{u(e,this.checked)}))})),h&&h.forEach((function(e){!function(e){var t=e.querySelector(".itinerary-content"),n=t.getBoundingClientRect().height;t.classList.contains("show")?t.style.maxHeight=n+"px":t.style.maxHeight="0px"}(e),e.onclick=function(e){return function(t){t.target.closest(".wte-itinerary-head-wrap")&&u(e)}}(e)}))}let f=document.querySelectorAll(".itinerary-sleep-mode");f&&f.forEach((function(e){e.addEventListener("click",(function(e){let t=e.target.closest(".itinerary-content").querySelector(".content-additional-sleep-mode");t.style.display="flex"==t.style.display?"none":"flex"}))})),window.addEventListener("scroll",(()=>{const e=document.querySelector(".wpte_has-sticky-booking-widget");if(e){const t=e.querySelector(".wpte-booking-area-wrapper");if(t){const e=t.parentNode;let n=e.offsetTop;if(e.children.length>1)for(const t of e.children)n+=t.scrollHeight;window.scrollY>n?t.classList.add("is-sticky"):t.classList.remove("is-sticky")}}}))}()})(),document.getElementById("wp-travel-engine-new-checkout-form")&&new class{constructor(e){this.checkoutForm=e,this.defaultPaymentMethods=["booking_only"],this.initialize()}initialize(){this.paymentMethods=this.checkoutForm.querySelectorAll("[name=wpte_checkout_paymnet_method]"),this.paymentModes=this.checkoutForm.querySelectorAll("[name=wp_travel_engine_payment_mode]"),this.selectedPaymentMethod=this.paymentMethods?.[0]?.value,this.handlePaymentModeChange.bind(this),this.submitButton=this.checkoutForm.querySelector("[type=submit]"),this.addEventListener(this.paymentMethods,"change",this.handlePaymentMethodChange),this.addEventListener(this.paymentModes,"change",this.handlePaymentModeChange),window.addEventListener("load",this.updateButtonLabel.bind(this)),window.addEventListener("load",(()=>{if("createEvent"in document){let e=new Event("change"),t=this.checkoutForm.querySelector("[name=wpte_checkout_paymnet_method]:checked");t&&t.dispatchEvent(e);let n=this.checkoutForm.querySelector("[name=wp_travel_engine_payment_mode]:checked");n&&n.dispatchEvent(e)}})),this.submitButton.disabled=!1}
1disablePartialPayment(){this.checkoutForm.querySelector(".wpte-bf_downpayment-options")}addEventListener(e,t,n){e.forEach((e=>{e.addEventListener(t,n.bind(this))}))}priceFormat(e){return wteL10n.priceFormat(e)}getButtonLabel(){this.defaultBtnLabel||(this.defaultBtnLabel=this.submitButton?.value||"Book Now",this.customBtnLabel=this.submitButton.dataset.checkoutLabel||"Pay %s");const e=this.getPaymentMethod();return["booking_only","direct_bank_transfer","check_payments"].includes(e)?this.defaultBtnLabel:this.customBtnLabel.replace("%s",this.priceFormat(this.getTotalByMode()).format(!0))}updateButtonLabel(){this.submitButton&&(this.submitButton.value=this.getButtonLabel())}getTotalByMode(e=null){e||(e=this.getPaymentMode());const t={partial:window?.wptravelengineCart?.cart_totals?.cart_total_partial||0,full_payment:window?.wptravelengineCart?.cart_totals?.total||0,remaining_payment:wte.payments.total-wte.payments.total_partial};return t?.[e]||t.full_payment}getPaymentMode(){if("booking_only"==this.getPaymentMethod())return"full_payment";const e=this.checkoutForm.querySelectorAll("[name=wp_travel_engine_payment_mode]");if(e){let t=Array.from(e).find((e=>e.checked));return t||(t=e[0]),t?t.value:"full_payment"}return"full_payment"}getPaymentMethod(){return this.checkoutForm.querySelector("[name=wpte_checkout_paymnet_method]:checked")?.value||"booking_only"}handlePaymentMethodChange(e){e.target.checked&&(this.selectedPaymentMethod=e.target.value);const t=this.checkoutForm.querySelectorAll(".wpte-checkout-payment-info");t&&t.forEach((function(e){e.classList.add("hidden"),e.parentElement.classList.remove("wpte-active-payment-method")})),e.target.parentElement.classList.add("wpte-active-payment-method");var n=document.getElementById(e.target.dataset.targetInfo);n&&!n.classList.remove("hidden",!1)&&n.style.removeProperty("display");const a=this.defaultPaymentMethods.includes(this.selectedPaymentMethod);this.togglePaymentOptions(a),a&&document.getElementById("wp_travel_engine_payment_mode-full")&&(document.getElementById("wp_travel_engine_payment_mode-full").checked=!0),this.handlePaymentModeChange();const r=document.getElementById("wp_travel_engine_payment_mode-full")?.checked;this.toggleInfoTable(a||r),this.updateButtonLabel()}toggleInfoTable(e){const t=document.querySelector(".wpte-bf-extra-info-table"),n=this.getPaymentMode();if(t){t.classList.toggle("hidden",e);const a=t.classList.contains("hidden");t&&a&&"partial"==n&&t.classList.remove("hidden"),"full_payment"==n&&t.classList.add("hidden")}}togglePaymentOptions(e){let t=this.checkoutForm.querySelector(".wpte-bf_downpayment-options");t&&t.classList.toggle("hidden",e)}async handlePaymentModeChange(){const e=await fetch(`${wteL10n.wpxhr.root}?action=wptravelengine_cart&_nonce=${wteL10n.wpxhr.nonce}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cart_action:"update_payment_type",data:{payment_type:this.getPaymentMode(),payment_gateway:this.getPaymentMethod()}})}
1),t=await e.json();var n;t.success&&null!==(n=t.data.fragments)&&void 0!==n&&n&&Object.entries(t.data.fragments).forEach((([e,t])=>{const n=document.querySelector(e);n&&(n.innerHTML=t)})),this.updateButtonLabel()}}(document.getElementById("wp-travel-engine-new-checkout-form")),function(){(async()=>{if(document.getElementById("wte-checkout-coupon")){const{default:e}=await r.e(702).then(r.bind(r,702));new e(document.getElementById("wte-checkout-coupon")||null)}})();const e=document.querySelectorAll(".wpte-pay-btn");e&&Array.from(e).forEach((e=>{e.addEventListener("click",(async function(e){var t;e.preventDefault();const n=e.target.dataset.xhrUrl,a=null!==(t=e.target.dataset.nonce)&&void 0!==t?t:"";if(n){const t=await fetch(`${n}?action=wte_add_trip_to_cart&cart_version=2.0&_nonce=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({booking_id:e.target.dataset.bookingId})}),r=await t.json();r.success&&r.data.redirect?window.location.href=r.data.redirect:window.location.reload()}}))}))}(),Array.from(document.querySelectorAll("div.wte-filterby-dropdown")).filter((e=>e.querySelector(".wte-ordering"))).forEach((e=>{e.addEventListener("click",(({target:e})=>{const t=e.parentElement.querySelector(".wpte__select-field")||e.closest(".wpte__select-field");t&&(t.classList.toggle("options-open"),t.querySelector(".wpte__select-options").addEventListener("click",(({target:e})=>{const t=e.closest("li[data-value]");if(!t)return;const n=new URL(window.location.href);n.searchParams.set("wte_orderby",t.dataset.value),window.location.href=n.toString()})))}))}))})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.