PageSourceSearch

https://ascentae.com/wp-content/swis/cache/js/themes/bricks-child/…-products-17800615970.min.js?ver=1780061597

js ascentae.com collected 2026-10-08 21:13:58 UTC 8,168 bytes, 62 lines download raw bytes

1(function(){function initMaxhubTabs(){var tabGroups=document.querySelectorAll("[data-dp-maxhub-tabs]");var desktopQuery=window.matchMedia?window.matchMedia("(min-width: 900px)"):null;var motionQuery=window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null;var isGsapReady=typeof window.gsap!=="undefined";Array.prototype.forEach.call(tabGroups,function(tabGroup){var tabs;var panels;var notes;var resizeTimeout;if(tabGroup.getAttribute("data-dp-maxhub-tabs-initialized")==="true"){return}
2tabs=Array.prototype.slice.call(tabGroup.querySelectorAll("[data-dp-maxhub-tab]"));panels=Array.prototype.slice.call(tabGroup.querySelectorAll("[data-dp-maxhub-panel]"));notes=Array.prototype.slice.call(tabGroup.querySelectorAll("[data-dp-maxhub-note]"));if(!tabs.length||tabs.length!==panels.length){return}
3function destroyBenefitsAnimation(panel){if(!panel||typeof panel._dpMaxhubBenefitsCleanup!=="function"){return}
4panel._dpMaxhubBenefitsCleanup();panel._dpMaxhubBenefitsCleanup=null}
5function setupBenefitsAnimation(panel){var scroller;var track;var sectionRoot;var progress=0;var touchY=null;var isLocked=!1;var lockedScrollTop=null;var savedBodyStyles={current:null};if(!panel||panel.hidden){return}
6destroyBenefitsAnimation(panel);if((motionQuery&&motionQuery.matches)||(desktopQuery&&!desktopQuery.matches)){return}
7scroller=panel.querySelector("[data-dp-maxhub-scroller]");track=panel.querySelector("[data-dp-maxhub-scroller-track]");sectionRoot=panel.querySelector(".dp_maxhubProducts__benefitsWrap")||scroller;if(!scroller||!track){return}
8function getScrollDistance(){return Math.max(0,track.scrollWidth-scroller.clientWidth)}
9function getViewportCenter(){return window.innerHeight/2}
10function getSectionCenter(){var rect=sectionRoot.getBoundingClientRect();return rect.top+(rect.height/2)}
11function setLockedScrollTop(){var rect=sectionRoot.getBoundingClientRect();lockedScrollTop=Math.round(window.pageYOffset+rect.top+(rect.height/2)-getViewportCenter())}
12function alignSectionToCenter(){if(lockedScrollTop===null){return}
13window.scrollTo(0,lockedScrollTop)}
14function freezePageScroll(){if(savedBodyStyles.current){return}
15savedBodyStyles.current={bodyOverflow:document.body.style.overflow,bodyPosition:document.body.style.position,bodyTop:document.body.style.top,bodyWidth:document.body.style.width,bodyLeft:document.body.style.left,bodyRight:document.body.style.right,htmlOverflow:document.documentElement.style.overflow};document.documentElement.style.overflow="hidden";document.body.style.overflow="hidden";document.body.style.position="fixed";document.body.style.top=String(lockedScrollTop*-1)+"px";document.body.style.left="0";document.body.style.right="0";document.body.style.width="100%"}
16function unfreezePageScroll(){if(!savedBodyStyles.current){return}
17document.documentElement.style.overflow=savedBodyStyles.current.htmlOverflow;document.body.style.overflow=savedBodyStyles.current.bodyOverflow;document.body.style.position=savedBodyStyles.current.bodyPosition;document.body.style.top=savedBodyStyles.current.bodyTop;document.body.style.width=savedBodyStyles.current.bodyWidth;document.body.style.left=savedBodyStyles.current.bodyLeft;document.body.style.right=savedBodyStyles.current.bodyRight;savedBodyStyles.current=null;if(lockedScrollTop!==null){window.scrollTo(0,lockedScrollTop)}}
18function clampProgress(nextProgress){var maxProgress=getScrollDistance();if(nextProgress<0){return 0}
19if(nextProgress>maxProgress){return maxProgress}
20return nextProgress}
21function render(){if(!isGsapReady||(motionQuery&&motionQuery.matches)||(desktopQuery&&!desktopQuery.matches)){if(isGsapReady){window.gsap.set(track,{clearProps:"transform"})}
22return}
23window.gsap.set(track,{x:progress*-1,y:0})}
24function unlock(){isLocked=!1;unfreezePageScroll();lockedScrollTop=null}
25function reset(){progress=0;touchY=null;unlock();if(isGsapReady){window.gsap.set(track,{clearProps:"transform"})}}
26function updateProgress(delta){var nextProgress=clampProgress(progress+delta);var changed=nextProgress!==progress;progress=nextProgress;render();return changed}
27function getScrollStep(delta){var magnitude=Math.min(Math.abs(delta),36);var direction=delta<0?-1:1;return magnitude*0.55*direction}
28function canLock(delta){var maxProgress=getScrollDistance();var distanceFromCenter=Math.abs(getSectionCenter()-getViewportCenter());var threshold=Math.min(120,window.innerHeight*0.14);if(!maxProgress||distanceFromCenter>threshold){return!1}
29if(delta>0){return progress<maxProgress}
30if(delta<0){return progress>0}
31return!1}
32function unlockIfAtBoundary(delta){var maxProgress=getScrollDistance();if((delta>0&&progress>=maxProgress)||(delta<0&&progress<=0)){unlock()}}
33function handleWheel(event){var delta=event.deltaY;var scrollStep;if(!delta){return}
34if(!isLocked&&!canLock(delta)){return}
35if(!isLocked){event.preventDefault();isLocked=!0;setLockedScrollTop();alignSectionToCenter();freezePageScroll()}
36alignSectionToCenter();scrollStep=getScrollStep(delta);if(!updateProgress(scrollStep)){unlockIfAtBoundary(delta);return}
37event.preventDefault();unlockIfAtBoundary(delta)}
38function handleTouchStart(event){if(!event.touches||!event.touches.length){return}
39touchY=event.touches[0].clientY}
40function handleTouchMove(event){var currentY;var delta;var scrollStep;if(!event.touches||!event.touches.length||touchY===null){return}
41currentY=event.touches[0].clientY;delta=touchY-currentY;if(!delta){return}
42if(!isLocked&&!canLock(delta)){touchY=currentY;return}
43if(!isLocked){event.preventDefault();isLocked=!0;setLockedScrollTop();alignSectionToCenter();freezePageScroll()}
44alignSectionToCenter();scrollStep=getScrollStep(delta);if(!updateProgress(scrollStep)){unlockIfAtBoundary(delta);touchY=currentY;return}
45event.preventDefault();touchY=currentY;unlockIfAtBoundary(delta)}
46function handleTouchEnd(){touchY=null}
47function handleResize(){if((motionQuery&&motionQuery.matches)||(desktopQuery&&!desktopQuery.matches)){reset();return}
48progress=clampProgress(progress);render()}
49if(!getScrollDistance()){return}
50render();window.addEventListener("wheel",handleWheel,{passive:!1});window.addEventListener("touchstart",handleTouchStart,{passive:!0});window.addEventListener("touchmove",handleTouchMove,{passive:!1});window.addEventListener("touchend",handleTouchEnd);window.addEventListener("resize",handleResize);panel._dpMaxhubBenefitsCleanup=function(){window.removeEventListener("wheel",handleWheel);window.removeEventListener("touchstart",handleTouchStart);window.removeEventListener("touchmove",handleTouchMove);window.removeEventListener("touchend",handleTouchEnd);window.removeEventListener("resize",handleResize);reset()}}
51function syncBenefitsAnimations(){panels.forEach(function(panel){if(panel.hidden){destroyBenefitsAnimation(panel);return}
52setupBenefitsAnimation(panel)})}
53function queueBenefitsSync(){window.clearTimeout(resizeTimeout);resizeTimeout=window.setTimeout(syncBenefitsAnimations,80)}
54function activateTab(nextTab,setFocus){tabs.forEach(function(tab,index){var isActive=tab===nextTab;var panel=panels[index];var note=notes[index];tab.setAttribute("aria-selected",isActive?"true":"false");tab.setAttribute("tabindex",isActive?"0":"-1");if(panel){panel.hidden=!isActive;panel.setAttribute("aria-hidden",isActive?"false":"true")}
55if(note){note.hidden=!isActive;note.setAttribute("aria-hidden",isActive?"false":"true")}});if(setFocus){nextTab.focus()}
56queueBenefitsSync()}
57tabs.forEach(function(tab,index){tab.addEventListener("click",function(){activateTab(tab,!1)});tab.addEventListener("keydown",function(event){var nextIndex=index;if(event.key==="ArrowRight"||event.key==="ArrowDown"){nextIndex=(index+1)%tabs.length}
58if(event.key==="ArrowLeft"||event.key==="ArrowUp"){nextIndex=(index-1+tabs.length)%tabs.length}
59if(event.key==="Home"){nextIndex=0}
60if(event.key==="End"){nextIndex=tabs.length-1}
61if(nextIndex!==index){event.preventDefault();activateTab(tabs[nextIndex],!0)}})});activateTab(tabs[0],!1);window.addEventListener("resize",queueBenefitsSync);tabGroup.setAttribute("data-dp-maxhub-tabs-initialized","true")})}
62if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",initMaxhubTabs)}else{initMaxhubTabs()}}())

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.