(()=>{"use strict";(()=>{function e(e,t){"true"===e.getAttribute("aria-expanded")?(e.setAttribute("aria-expanded","false"),t.setAttribute("hidden","")):(e.setAttribute("aria-expanded","true"),t.removeAttribute("hidden")),function(e){const t=e.closest("[data-category-id]");if(!t)return;const a=t.dataset.categoryId,o=t.closest(".wpte-faq-section"),r=o?o.querySelector(`.wpte-faq-expand-all[data-category="${a}"]`):document.querySelector(`.wpte-faq-expand-all[data-category="${a}"]`);if(!r)return;const n=r.querySelector('input[type="checkbox"]'),s=t.querySelectorAll(".wpte-faq-question"),c=Array.from(s).filter((e=>"true"===e.getAttribute("aria-expanded")));n.checked=c.length===s.length}(e)}!function(){const t=document.querySelectorAll(".wpte-faq-section");t.length&&t.forEach((t=>{t.querySelectorAll(".wpte-faq-item").forEach((t=>{const a=t.querySelector(".wpte-faq-question"),o=t.querySelector(".wpte-faq-answer");a&&o&&(a.addEventListener("click",(function(t){t.preventDefault(),e(a,o)})),a.addEventListener("keydown",(function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e(a,o))})))})),t.querySelectorAll(".wpte-faq-expand-all").forEach((e=>{const a=e.querySelector('input[type="checkbox"]'),o=e.dataset.category;a&&o&&a.addEventListener("change",(function(){const e=t.querySelector(`[data-category-id="${o}"]`);e&&e.querySelectorAll(".wpte-faq-item").forEach((e=>{const t=e.querySelector(".wpte-faq-question"),o=e.querySelector(".wpte-faq-answer");t&&o&&(a.checked?(t.setAttribute("aria-expanded","true"),o.removeAttribute("hidden")):(t.setAttribute("aria-expanded","false"),o.setAttribute("hidden","")))}))}))}))}))}(),jQuery(".accordion-tabs-toggle").next().hasClass("show"),jQuery(".accordion-tabs-toggle").next().removeClass("show"),jQuery(".accordion-tabs-toggle").next().slideUp(350),jQuery(document).on("click",".faq-row .accordion-tabs-toggle",(function(){var e=jQuery(this);e.siblings(".faq-content").toggleClass("show"),e.toggleClass("active"),e.siblings(".faq-content").slideToggle(350),e.find(".dashicons.dashicons-arrow-down.custom-toggle-tabs").toggleClass("open")})),jQuery(document).on("click",".expand-all-faq",(function(e){e.preventDefault(),jQuery(this).children("svg").hasClass("fa-toggle-off")&&jQuery(this).children("svg").toggleClass("fa-toggle-on"),jQuery(this).children("svg").hasClass("fa-toggle-on")&&jQuery(this).children("svg").toggleClass("fa-toggle-off"),jQuery(".faq-row .accordion-tabs-toggle").toggleClass("active"),jQuery(".faq-row").children(".faq-content").toggleClass("show"),jQuery(".faq-row").children(".faq-content").slideToggle(350),jQuery(".faq-row").find(".dashicons.dashicons-arrow-down.custom-toggle-tabs").toggleClass("open")})),jQuery(".wp-travel-engine-faq-tab-header input.checkbox").on("change",(function(){jQuery(this).is(":checked")?(jQuery(this).closest(".wp-travel-engine-faq-tab-header").siblings(".wp-travel-engine-faq-tab-content").children().addClass("row-active"),jQuery(".row-active").find(".accordion-tabs-toggle .rotator").addClass("open"),jQuery(".row-active").find(".accordion-tabs-toggle").addClass("active"),jQuery(".row-active").find(".faq-content").slideDown(),jQuery(".row-active").find(".faq-content").addClass("show")):(jQuery(this).closest(".wp-travel-engine-faq-tab-header").siblings(".wp-travel-engine-faq-tab-content").children().removeClass("row-active"),jQuery(".faq-row").find(".accordion-tabs-toggle .rotator").removeClass("open"),jQuery(".faq-row").find(".accordion-tabs-toggle").removeClass("active"),jQuery(".faq-row").find(".faq-content").slideUp(),jQuery(".faq-row").find(".faq-content").removeClass("show"))}))})()})();