PageSourceSearch

https://www.exodustravels.com/wp-content/themes/exodus/dist/compon…/index.js?ver=2026.09.22.01

js exodustravels.com collected 2026-09-24 17:57:32 UTC 10,281 bytes, 1 lines download raw bytes

1(()=>{"use strict";const t="ex_data_trip_search",{customElements:e,HTMLElement:n}=window,{stores:i}=window.zustand;e.define("ex-checkbox-accordion-content",class extends n{tripSearchStore=null;markup="";constructor(){super(),this.filterKey=this.getAttribute("key"),this.filterKey&&this.ownerDocument.defaultView?.addEventListener("DOMContentLoaded",()=>{this.tripSearchStore=i[t],this.tripSearchStore.subscribe(this.update.bind(this))})}update(t={}){if(!this.filterKey)return;const{checkboxItems:e}=t,n=e[this.filterKey]?.children??new Map;n.size&&(this.markup=this.getFilterCheckboxesMarkup(n),this.innerHTML=this.markup)}getFilterCheckboxesMarkup(t=new Map){if(!t.size)return"";let e="",n="",i="",c="",a="",o={};return Array.from(t.keys()).forEach(r=>{o=t.get(r)||{};const s=o.isOpen?"true":"false",l=`Expand ${o?.label??""} options`;n=o.hasChildren?`<span data-tracking-value="${o?.label??""}" class="checkbox-accordion__lvl-one-icon checkbox-accordion__child-handle-icon" role="button" tabindex="0" aria-expanded="${s}" aria-label="${l}"></span>`:"",i="",i=o?.children?this.getChildContentMarkup(o?.children??new Map,o?.isOpen??!1):"",c=!0===o.checked?'checked="checked"':"",a=o.isOpen?'active="true"':"",e+=`\n\t\t\t<ex-checkbox-accordion-child\n\t\t\t\tclass="checkbox-accordion__child main-parent ${o?.className??""}"\n\t\t\t\t${a}\n\t\t\t>\n\t\t\t\t<div class="checkbox-accordion__child-handle form-field">\n\t\t\t\t\t<label data-tracking-value="${o?.label??""}" class="checkbox">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tdata-key="${this.filterKey||""}"\n\t\t\t\t\t\t\tdata-tracking-value="${o?.label??""}"\n\t\t\t\t\t\t\ttype="checkbox"\n\t\t\t\t\t\t\tvalue="${o?.value??""}"\n\t\t\t\t\t\t\tdata-has-children="${o?.hasChildren?.toString()??"false"}"\n\t\t\t\t\t\t\t${c}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<span data-tracking-value="${o?.label??""}" class="checkbox-text">${o?.label??""}</span>\n\t\t\t\t\t</label>\n\t\t\t\t\t${n}\n\t\t\t\t</div>\n\t\t\t\t${i}\n\t\t\t</ex-checkbox-accordion-child>\n\t\t\t`}),e}getChildContentMarkup(t=new Map,e=!1){if(!t.size)return"";let n={},i="",c="",a="",o=`<div class="checkbox-accordion__child-content" ${e?'style="height: auto;"':""} ${e?'aria-hidden="false"':'aria-hidden="true"'}>`;const r=e?"0":"-1";return Array.from(t.keys()).forEach(e=>{n=t.get(e)||{},i=!0===n.checked?'checked="checked"':"";const s=n.isOpen?"true":"false",l=`Expand ${n?.label??""} options`;a=n.hasChildren?`<span data-tracking-value="${n?.label??""}" class="checkbox-accordion__lvl-one-icon checkbox-accordion__child-handle-icon" role="button" tabindex="${r}" aria-expanded="${s}" aria-label="${l}"></span>`:"",c=n.children?this.getChildContentMarkup(n.children,n?.isOpen??!1):"",o+=`\n\t\t\t\t<ex-checkbox-accordion-child class="checkbox-accordion__child">\n\t\t\t\t\t<div class="checkbox-accordion__child-handle form-field">\n\t\t\t\t\t\t<label data-tracking-value="${n?.label??""}" class="checkbox">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tdata-key="${this.filterKey||""}"\n\t\t\t\t\t\t\t\tdata-tracking-value="${n?.label??""}"\n\t\t\t\t\t\t\t\ttype="checkbox"\n\t\t\t\t\t\t\t\tvalue="${n?.value??""}"\n\t\t\t\t\t\t\t\tdata-has-children="${n?.hasChildren?.toString()??"false"}"\n\t\t\t\t\t\t\t\t${i}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span data-tracking-value="${n?.label??""}" class="checkbox-text">${n?.label??""}</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t${a}\n\t\t\t\t\t</div>\n\t\t\t\t\t${c}\n\t\t\t\t</ex-checkbox-accordion-child>\n\t\t\t`}),o+="</div>",o}});const{exodus:c}=window,a=(t,e,n)=>{t.preventDefault(),t.stopPropagation(),e&&n&&(e.toggleAttribute("active"),e.hasAttribute("active")?((t,e=300,n=null)=>{t.style.height=`${t.scrollHeight}px`,setTimeout(()=>{t.style.height="auto",n&&n()},e)})(n,600):((t,e=300,n=null)=>{t.style.height=`${t.scrollHeight}px`,t.offsetHeight,t.style.height="0px",setTimeout(()=>{t.style.height=null,n&&n()},e)})(n,600))},o=(t={},e=!0)=>{const{paramKey:n,filterKey:i,value:c,checkboxItems:a,filterIdsForFilterKey:o}=t,l=a[i]?.children??{};if(!(l.size&&Object.keys(o).length&&n&&i&&c))return[];const h=[],d=s(c,l,{}),u=r(d,[],e);return u.length?(u.forEach(t=>{o[t]&&h.push({paramKey:n,filterKey:i,value:t,text:o[t]?.text??""})}),h):h},r=(t={},e=[],n=!1)=>{e.push(t.value),n&&Array.isArray(t.parentIds)&&t.parentIds.length&&t.parentIds.forEach(t=>{e.push(t)});const i=t?.children??{};
1return i.size&&Array.from(i.keys()).forEach(t=>{r(i.get(t),e)}),e},s=(t,e=new Map,n={})=>Object.keys(n).length?n:e.size&&t?(Array.from(e.keys()).every(i=>{if(Object.keys(n).length)return n;const c=e.get(i)?.value??"";return t.toString()===c.toString()?(Object.assign(n,e.get(i)),!1):"object"!=typeof e.get(i).children||!e.get(i).children.size||s(t,e.get(i).children,n)}),n):{},{customElements:l,HTMLElement:h,yieldToMain:d}=window,{stores:u}=window.zustand;l.define("ex-checkbox-accordion-child",class extends h{constructor(){super(),this.tripSearchStore=u[t],this.content=this.querySelector(":scope > .checkbox-accordion__child-content"),this.accordionHandle=this.querySelector(":scope > .checkbox-accordion__child-handle .checkbox-accordion__child-handle-icon"),this.checkboxInputEl=this.querySelector(":scope > .checkbox-accordion__child-handle input"),this.accordionHandle&&this.content&&(this.accordionHandle.addEventListener("click",t=>{a(t,this,this.content);const e=this.hasAttribute("active");this.content?.setAttribute("aria-hidden",e?"false":"true"),this.updateChildAccordionFocusability(),this.announceChildStateChange()}),this.accordionHandle.addEventListener("keydown",t=>this.handleAccordionKeyDown(t)),this.updateChildAccordionFocusability()),this.checkboxInputEl&&this.checkboxInputEl.addEventListener("click",t=>this.handleCheckboxInputClick(t))}async handleCheckboxInputClick(t){await d();const{addFilter:e,updateFilter:n,filterKeys:i,filterIds:c,deleteFilter:a,checkboxItems:r}=this.tripSearchStore.getState(),s=t.target,l=s.getAttribute("data-key");let h=s?.value??"";if("taxonomy"===i[l]?.type&&(h=parseInt(s?.value??"")),!l)return null;let u=[];const b={paramKey:i[l]?.value??"",filterKey:l,value:h||"",checkboxItems:r,filterIdsForFilterKey:c[l]||""};if(s.checked)switch(u=o(b,!1),l){case i.price_range.name:case i.flight_inclusive.name:n(u);break;default:e(u)}else u=o(b),a(u)}handleAccordionKeyDown(t){if("Enter"===t.key||" "===t.key){t.preventDefault(),t.stopPropagation(),a(t,this,this.content);const e=this.hasAttribute("active");this.content?.setAttribute("aria-hidden",e?"false":"true"),this.updateChildAccordionFocusability(),this.announceChildStateChange()}}announceChildStateChange(){const t=this.hasAttribute("active"),e=this.querySelector(".checkbox-text")?.textContent||"Option",n=t?`${e} expanded`:`${e} collapsed`;this.announceToScreenReader(n)}announceToScreenReader(t){let e=document.getElementById("accordion-announcer");e||(e=document.createElement("div"),e.id="accordion-announcer",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.className="sr-only",document.body.appendChild(e)),e.textContent="",setTimeout(()=>{e.textContent=t},100)}updateChildAccordionFocusability(){if(!this.content||!this.accordionHandle)return;const t=this.hasAttribute("active"),e=t?"0":"-1";this.accordionHandle.setAttribute("aria-expanded",t?"true":"false"),this.content.querySelectorAll(":scope > ex-checkbox-accordion-child").forEach(t=>{const n=t.querySelector(":scope > .checkbox-accordion__child-handle .checkbox-accordion__child-handle-icon");n&&n.setAttribute("tabindex",e);const i=t.querySelector(':scope > .checkbox-accordion__child-handle input[type="checkbox"]');i&&i.setAttribute("tabindex",e)})}}),l.define("ex-checkbox-accordion",class extends h{tripSearchStore=null;constructor(){super(),this.filterKey=this.getAttribute("key"),this.content=this.querySelector(".checkbox-accordion__content"),this.accordionHandle=this.querySelector(".checkbox-accordion__handle"),this.accordionHandle&&this.content&&this.filterKey&&(this.ownerDocument.defaultView?.addEventListener("DOMContentLoaded",()=>{this.tripSearchStore=u[t],this.tripSearchStore.subscribe(this.update.bind(this))}),this.accordionHandle.addEventListener("click",t=>{a(t,this,this.content);const e=this.hasAttribute("active");this.accordionHandle?.setAttribute("aria-expanded",e?"true":"false"),this.content?.setAttribute("aria-hidden",e?"false":"true"),this.updateChildFocusability(e),this.announceStateChange(e)}),this.accordionHandle.addEventListener("keydown",t=>this.handleKeyDown(t)))}update(t={}){if(!this.filterKey||!this.content)return;const{checkboxItems:e}=t;Object.keys(e).length&&(e[this.filterKey]?.isOpen?(this.setAttribute("active","true"),this.content.style.height="auto",this.accordionH
1andle?.setAttribute("aria-expanded","true"),this.content?.setAttribute("aria-hidden","false"),this.updateChildFocusability(!0)):(this.removeAttribute("active"),this.content.style.height="0",this.accordionHandle?.setAttribute("aria-expanded","false"),this.content?.setAttribute("aria-hidden","true"),this.updateChildFocusability(!1)))}handleKeyDown(t){if("Enter"===t.key||" "===t.key){t.preventDefault(),t.stopPropagation(),a(t,this,this.content);const e=this.hasAttribute("active");this.accordionHandle?.setAttribute("aria-expanded",e?"true":"false"),this.content?.setAttribute("aria-hidden",e?"false":"true"),this.updateChildFocusability(e),this.announceStateChange(e)}}announceStateChange(t){const e=this.getAttribute("label")||"Section",n=t?`${e} expanded`:`${e} collapsed`;this.announceToScreenReader(n)}announceToScreenReader(t){let e=document.getElementById("accordion-announcer");e||(e=document.createElement("div"),e.id="accordion-announcer",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.className="sr-only",document.body.appendChild(e)),e.textContent="",setTimeout(()=>{e.textContent=t},100)}updateChildFocusability(t){if(!this.content)return;const e=t?"0":"-1";this.content.querySelectorAll(":scope > ex-checkbox-accordion-child").forEach(t=>{const n=t.querySelector(":scope > .checkbox-accordion__child-handle .checkbox-accordion__child-handle-icon");n&&n.setAttribute("tabindex",e);const i=t.querySelector(':scope > .checkbox-accordion__child-handle input[type="checkbox"]');i&&i.setAttribute("tabindex",e)})}})})();

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.