PageSourceSearch

https://www.eharmony.com/wp-content/themes/eharmony-theme/assets/dist/js/theme.js?ver=2.4.7

js eharmony.com collected 2026-09-24 08:48:09 UTC 9,394 bytes, 2 lines download raw bytes

1(function(){var e=class{mastheadWrapper;fixedNavigation;constructor(){this.mastheadWrapper=document.querySelector(`.masthead`),this.fixedNavigation=document.querySelector(`.fixed-navigation`),!(!this.mastheadWrapper||!this.fixedNavigation)&&new IntersectionObserver(this.observerCallback,{root:null,rootMargin:`0px`}).observe(this.mastheadWrapper)}observerCallback=e=>{e.forEach(e=>{e.isIntersecting?(this.fixedNavigation.classList.remove(`visible`),this.fixedNavigation.setAttribute(`aria-hidden`,`true`),this.fixedNavigation.setAttribute(`inert`,`true`)):(this.fixedNavigation.classList.add(`visible`),this.fixedNavigation.setAttribute(`aria-hidden`,`false`),this.fixedNavigation.removeAttribute(`inert`))})}},t=class{navigationMobile;navigationMobilDesktop;burger;logo;constructor(){this.navigationMobile=document.querySelector(`nav.mobile`),this.navigationMobilDesktop=document.querySelector(`nav.mobile-desktop`),this.burger=document.querySelector(`#burger`),this.logo=document.querySelector(`.sticky-navigation a:has(.logo)`),document.querySelectorAll(`.toggle-navigation`).forEach(e=>{e.addEventListener(`click`,this.toggleNavigation)}),window.addEventListener(`resize`,this.updateAlly),this.updateAlly()}toggleNavigation=()=>{document.body.classList.toggle(`navigation-is-open`),this.updateAlly()};updateAlly=()=>{this.navigationMobile&&(this.navigationMobile.inert=!document.body.classList.contains(`navigation-is-open`)),this.navigationMobilDesktop&&(this.navigationMobilDesktop.inert=!document.body.classList.contains(`navigation-is-open`)&&window.getComputedStyle(this.burger).display!==`none`),this.logo&&(this.logo.inert=window.getComputedStyle(this.burger).display!==`none`)}},n=class{constructor(e){this.buttonPrev=e.config.target.querySelector(`.button-prev`),this.buttonNext=e.config.target.querySelector(`.button-next`),this.buttonPrev&&this.buttonNext&&(this.buttonPrev.addEventListener(`click`,()=>e.prevItem()),this.buttonNext.addEventListener(`click`,()=>e.nextItem()))}updateNavigation(e,t){this.buttonPrev&&this.buttonNext&&(this.buttonPrev.disabled=!e,this.buttonNext.disabled=!t)}},r=class{constructor(e){this.slider=e,this.paginationContainer=this.slider.config.target.querySelector(`.scroll-slider-pagination`),this.paginationContainer!==null&&window.addEventListener(`resize`,()=>this.handleResize(),{passive:!0})}renderPagination(){if(this.paginationContainer===null)return;this.paginationContainer.innerHTML=``,this.numBullets=this.calculateTotalBullets();let e;for(let t=0;t<this.numBullets;t++)e=document.createElement(`button`),e.classList.add(`bullet`),e.setAttribute(`aria-label`,`Slide ${t+1}`),e.addEventListener(`click`,()=>{this.slider.currentItem=t,this.slider.scrollToCurrentItem()}),this.paginationContainer.appendChild(e);this.paginationItems=this.paginationContainer.querySelectorAll(`.bullet`)}calculateTotalBullets(){let e=this.slider.totalItems-(this.slider.itemsPerView-1);return this.slider.config.itemsPerView===-1?e-Math.floor(this.slider.wrapper.offsetWidth/this.slider.itemSize):e}updatePagination(e){var t;(t=this.paginationItems)==null||t.forEach((t,n)=>{n===e?t.classList.add(`active`):t.classList.remove(`active`)})}handleResize(){if(this.paginationContainer===null)return;let e=this.calculateTotalBullets();this.numBullets!==e&&(this.numBullets=e,this.renderPagination())}},i=class{constructor(e){this.slider=e,this.breakpointKeys=Object.keys(this.slider.config.breakpoints).sort((e,t)=>parseInt(e,10)-parseInt(t,10)),window.addEventListener(`resize`,()=>this.handleBreakpoints(),{passive:!0}),this.handleBreakpoints()}getCurrentBreakpoint(){let e=window.innerWidth,t=``;for(let n=this.breakpointKeys.length-1;n>=0;--n)if(parseInt(this.breakpointKeys[n],10)<=e){t=this.breakpointKeys[n];break}return this.slider.config.breakpoints?this.slider.config.breakpoints[t]:void 0}handleBreakpoints(){let e=this.getCurrentBreakpoint(),t=Math.abs(e===void 0?this.slider.config.itemsPerView:e.itemsPerView);this.slider.itemsPerView!==t&&(this.slider.itemsPerView=t,this.slider.pagination.renderPagination())}},a=class{constructor(e){this.config=e,this.overflow=!1,this.currentItem=0,this.isScrolling=0,this.itemsPerVie
1w=Math.abs(this.config.itemsPerView),this.container=this.config.target.querySelector(`.scroll-slider`),this.wrapper=this.container.querySelector(`.scroll-slider-wrapper`),this.items=this.container.querySelectorAll(`.scroll-slider-wrapper > *`),this.totalItems=this.items.length,this.itemSize=this.items[0].offsetWidth+this.getRowGap(),this.navigation=new n(this),this.pagination=new r(this),this.pagination.renderPagination(),this.config.loop&&this.navigation.updateNavigation(!0,!0),this.config.breakpoints&&new i(this),this.wrapper.addEventListener(`scroll`,()=>this.handleScroll(),{passive:!0}),window.addEventListener(`resize`,()=>this.handleResize(),{passive:!0}),this.handleResize()}getRowGap(){let e=getComputedStyle(this.wrapper).rowGap;return e===`normal`?0:parseInt(e)}scrollToCurrentItem(e=`smooth`){this.pagination.updatePagination(this.currentItem),this.wrapper.scrollTo({left:this.items[this.currentItem].offsetLeft,top:0,behavior:e})}prevItem(){this.currentItem--,this.currentItem<0&&(this.currentItem=this.config.loop?this.totalItems-1:0),this.scrollToCurrentItem()}nextItem(){this.currentItem++;let e=this.totalItems-(this.itemsPerView-1)-1;this.currentItem>e&&(this.currentItem=this.config.loop?0:e),this.scrollToCurrentItem()}handleScroll(){if(!this.config.loop){let e=!this.isScrollStart(),t=!this.isScrollEnd();this.navigation.updateNavigation(e,t)}window.clearTimeout(this.isScrolling),this.isScrolling=window.setTimeout(()=>{this.currentItem=this.calculateCurrentItem(),this.pagination.updatePagination(this.currentItem)},66)}isScrollStart(){return this.wrapper.scrollLeft===0}isScrollEnd(){return Math.round(this.wrapper.scrollLeft)>=Math.round(this.wrapper.scrollWidth-this.wrapper.clientWidth)}calculateCurrentItem(){return Math.round(this.wrapper.scrollLeft/this.itemSize)}handleResize(){this.overflow=this.wrapper.scrollWidth>this.wrapper.clientWidth,this.itemSize=this.items[0].offsetWidth+this.getRowGap(),this.overflow?this.container.classList.add(`scroll-enabled`):(this.container.classList.remove(`scroll-enabled`),this.currentItem=0,this.scrollToCurrentItem(`auto`)),this.handleScroll()}},o=class extends a{constructor(e){super({target:e,itemsPerView:-1}),this.overflow&&this.items.forEach((e,t)=>{(e.classList.contains(`current-menu-item`)||e.classList.contains(`current-menu-parent`))&&(this.currentItem=t,this.scrollToCurrentItem(`auto`))}),this.wrapper.addEventListener(`touchmove`,()=>{this.container.classList.add(`has-interaction`)},{passive:!0,once:!0})}},s=class{constructor(){document.querySelectorAll(`.wp-block-image`).forEach(e=>{e.parentElement?.classList.contains(`wp-block-column`)&&e.parentElement.classList.add(`wp-block-column--has-image`)})}},c=class{showTooltipIcons;constructor(e){this.showTooltipIcons=e,this.showTooltipIcons.forEach(e=>e.addEventListener(`click`,this.updateTooltips))}updateTooltips=e=>{e.stopPropagation(),e.preventDefault();let t=e.currentTarget;t.classList.contains(`active`)?(document.body.removeEventListener(`click`,this.hideAllTooltips),t.classList.remove(`active`)):(document.body.addEventListener(`click`,this.hideAllTooltips),this.hideAllTooltips(),t.classList.add(`active`))};hideAllTooltips=()=>{this.showTooltipIcons.forEach(e=>e.classList.remove(`active`))}},l=class{constructor(){let e=document.querySelectorAll(`.wp-block-table`);if(e.length===0)return;let t=new ResizeObserver(this.onTableResize);e.forEach(e=>{t.observe(e)})}onTableResize=e=>{requestAnimationFrame(()=>{e.forEach(e=>{let t=e.target;t.scrollWidth>t.clientWidth?t.classList.add(`scroll-enabled`):t.classList.remove(`scroll-enabled`)})})}},u=class{details;tabButtonForFootnotes;constructor(){this.details=document.querySelector(`.widget__footnotes details`),this.findTabButtonForFootnotes(),document.querySelectorAll(`a[rel="footnote"]`).forEach(e=>{e.addEventListener(`click`,()=>this.handleFootnoteClick())})}handleFootnoteClick(){this.updateDetails(),this.updateTabs()}findTabButtonForFootnotes(){document.querySelector(`.widget .wp-block-tabs:has(.wp-block-psg-footnotes)`)&&document.querySelectorAll(`.widget .wp-block-tabs .wp-block-tab-panel`).forEach((e,t)=>{e.querySelector(`.wp-block-psg-footnotes`)&&(this.tabButtonForFootnotes=document.querySelector(`.widget .wp-block-tabs .wp-block-tab-list button:nth-child(${t+1})`))})}updateDetails(){this.details!==null&&this.details.setAttribute(`open`,``)}updateTabs(){this.tabButtonForFootnotes!==null&&this.tabButtonForFootnotes.click()}};new e,new t,new s,new l;var d=document.querySelectorAll(`.slider.adviser`);
1d.forEach(e=>{new a({target:e,itemsPerView:1,loop:!0})}),d=document.querySelectorAll(`.slider.tips`),d.forEach(e=>{new a({target:e,itemsPerView:-1})}),d=document.querySelectorAll(`.studies-slider`),d.forEach(e=>{new a({target:e,itemsPerView:1,loop:!0})}),d=document.querySelectorAll(`.slider.local-dating`),d.forEach(e=>{new a({target:e,itemsPerView:-1})}),d=document.querySelectorAll(`.slider.story`),d.forEach(e=>{new a({target:e,itemsPerView:1,loop:!0})}),d=document.querySelectorAll(`.current-menu-item .sub-menu-wrapper, .current-menu-parent .sub-menu-wrapper`),d.forEach(e=>{new o(e)}),d=document.querySelectorAll(`.show-tooltip`),d.length&&new c(d),new u;})();
2//# sourceMappingURL=theme.js.map

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.