PageSourceSearch

https://modernize.com/wp-content/themes/modernize/public/js/app.738557.js

js modernize.com collected 2026-09-25 14:09:08 UTC 13,109 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[2143],{
1"./styles/app.scss":()=>{},
1"./scripts/app.js":(e,t,o)=>{var n=o("../node_modules/@roots/sage/lib/client/dom-ready.js");var s=o("./scripts/components/modal.js");function a(e,t){e.querySelectorAll("input, button, select").forEach(e=>{e.disabled=t})}function i(){const e=document.querySelector(".header");document.querySelectorAll('[data-scroll-to], [href^="#"]:not([href*=modal]):not(.toc__link)').forEach(function(t){t.addEventListener("click",function(o){const n=t.dataset.scrollTo||t.getAttribute("href");if(!n||"#"===n)return;if("body"===n)return o.preventDefault(),void window.scrollTo({top:0,behavior:"smooth"});const s=document.querySelector(n);s&&(o.preventDefault(),function(t){const o=t.getBoundingClientRect().top+window.scrollY-(e?.offsetHeight||0);window.scrollTo({top:o,behavior:"smooth"})}(s))})})}var r=o("./scripts/section-bridge.js"),c=o("./scripts/components/pin-it.js");const d=".call-tracking-controls:not(.call-tracking-controls--form)",l='.call-link:not([class*="call-link--form"]), .call-button:not([class*="call-link--form"])',u=["useHsEndpoint","showPhoneAssignmentNumber","formatNumberWithBracketsAndDash","phoneNumberContainerSelector","phoneNumberLinksSelector","additionalParams","callback","errorCallback"];let m=null;window.addEventListener("load",function(){const e=document.querySelector('[data-content-banner="inboundcall"], [data-static-ibc="true"], .floating-inbound-button');if(!e)return;if("undefined"==typeof modForm)return;!function(){if(!modForm?.opts?.phoneAssignmentConfig)return void(m=null);const e=modForm.opts.phoneAssignmentConfig;m={},u.forEach(function(t){const o=e[t];m[t]="additionalParams"===t&&o?{...o}:o})}(),modForm.opts.phoneAssignmentConfig||(modForm.opts.phoneAssignmentConfig={});const t=modForm.opts.phoneAssignmentConfig,o=e?.getAttribute("data-service")||window.pageService;modForm.opts.vertical=o,modForm.opts.isPreloaded=!0,modForm.opts.qsParams=modForm.opts.qsParams?modForm.opts.qsParams:["CCID","CLK","QTR"],modForm.opts.quadLinkParams={},modForm.opts.quadLinkData={WebSiteName:"modernize.com",quadlink:"",defaultQuad:"",tagID:""},modForm.opts.landingPage="modernize.com"+window.location.pathname+window.location.search,modForm.opts.landingPageNoQuery=window.location.protocol+"//modernize.com"+window.location.pathname,modForm.opts.websiteName="modernize.com",t.useHsEndpoint=!0,t.showPhoneAssignmentNumber=!0,t.formatNumberWithBracketsAndDash=!0,t.phoneNumberContainerSelector=d,t.phoneNumberLinksSelector=l,t.additionalParams={assignPhoneNumber:!1},t.getPhoneAssignmentDataCallback=function(e){const{status:t,data:o}=e;!function(e=!0){const t=document.querySelector(".header"),o=document.querySelector('[data-top-banner="inboundcall"]');e&&o?(document.body.classList.add("body--has-top-banner"),t&&t.classList.add("header--has-topbanner")):(document.body.classList.remove("body--has-top-banner"),t&&t.classList.remove("header--has-topbanner"));const n=[...document.querySelectorAll(d),...document.querySelectorAll(l)];n.length&&n.forEach(function(t){t.style.display=e?"":"none"}),document.body.setAttribute("data-inbound-call",e?"true":"false")}(!("success"!==t||!o||!o.matches||0===o?.matches?.length)),m&&modForm?.opts?.phoneAssignmentConfig&&(Object.assign(modForm.opts.phoneAssignmentConfig,m),m=null)},modForm.initQSForm(),"function"==typeof modForm.getPhoneAssignmentData&&modForm.getPhoneAssignmentData(modForm.opts.quadLinkParams,!1)}),(0,n.Z)(async()=>{(function(){const e=document.querySelector(".header");if(!e||"true"===e.dataset.headerInitialized)return;const t=document.querySelector(".header__menu-toggle"),o=document.getElementById("header-menu"),n=document.querySelector(".header__menu-wrapper--mobile"),s=document.querySelector(".header__menu-overlay");if(!(t&&o&&n&&s))return;e.dataset.headerInitialized="true";const a=document.querySelector(".header__menu-wrapper--desktop"),i=document.querySelectorAll('[data-action="toggle-menu"]'),r=document.querySelectorAll(".header__navbar-submenu"),c=document.querySelectorAll(".header__navbar-sublist"),d=document.querySelectorAll(".header__navbar-submenu--multiple .header__navbar-subnavbar-link");
1function l(){r.forEach(e=>{e.classList.remove("is-active")}),c.forEach(e=>{e.classList.remove("is-active")}),i.forEach(e=>{e.setAttribute("aria-expanded","false")}),d.forEach(e=>{e.classList.remove("is-active")})}function u(){const e=!("true"===t.getAttribute("aria-expanded"));t.setAttribute("aria-expanded",e),t.classList.toggle("is-active",e),o.setAttribute("aria-hidden",!e),e?(document.body.classList.add("no-scroll","menu-open"),n.classList.add("is-open"),s.classList.add("is-visible")):(document.body.classList.remove("no-scroll","menu-open"),n.classList.remove("is-open"),s.classList.remove("is-visible"),l())}function m(e=!1){e?(a&&(a.classList.add("is-open"),a.querySelectorAll('[data-navbar-level="main"]').forEach(function(e){let t=0;e.style.minHeight="";const o=e.querySelectorAll('[data-navbar-level="submenu"]');o&&(o.forEach(function(e){e.style.display="block",e.scrollHeight>t&&(t=e.scrollHeight),e.style.display=""}),e.style.minHeight=t+20+"px")})),s.classList.add("is-visible")):(a&&a.classList.remove("is-open"),s.classList.remove("is-visible"),l())}function b(e){[{selector:".header__navbar-submenu",triggerClass:"header__navbar-link"},{selector:".header__navbar-sublist",triggerClass:"header__navbar-subnavbar-link"}].forEach(t=>{e.querySelectorAll(t.selector).forEach(e=>{if(e.classList.contains("is-active")){e.classList.remove("is-active");const o=e.previousElementSibling;o&&o.classList.contains(t.triggerClass)&&(o.classList.remove("is-active"),"true"===o.getAttribute("aria-expanded")&&o.setAttribute("aria-expanded","false"))}})})}s.addEventListener("click",function(){n.classList.contains("is-open")?u():a&&a.classList.contains("is-open")&&m(!1)}),t.addEventListener("click",u),o.addEventListener("click",function(e){let t=e.target,o=t.getAttribute("data-action");switch(!o&&t.closest("[data-action]")&&(t=t.closest("[data-action]"),o=t.getAttribute("data-action")),o){case"toggle-menu":e.preventDefault(),function(e){const t=e.closest(".header__navbar-item"),o=t?.querySelector('.header__navbar-submenu[data-navbar-level="main"], .header__navbar-submenu[data-navbar-level="submenu"]');if(!t||!o)return;const n="true"===t.getAttribute("data-submenus"),s="true"===e.getAttribute("aria-expanded");if(window.innerWidth>=1200){if(s)l(),m(!1);else if(l(),e.setAttribute("aria-expanded","true"),o.classList.add("is-active"),m(!0),n){const e=o.querySelector(".header__navbar-sublist"),t=o.querySelector(".header__navbar-subnavbar-link");e&&e.classList.add("is-active"),t&&t.classList.add("is-active")}}else l(),s?(e.setAttribute("aria-expanded","false"),o.classList.remove("is-active")):(e.setAttribute("aria-expanded","true"),o.classList.add("is-active"))}(t);break;case"show-submenu":e.preventDefault(),function(e){const t=e.closest(".header__navbar-subnavbar-item").querySelector(".header__navbar-sublist");if(window.innerWidth>=1200){const o=e.closest(".header__navbar-submenu").querySelectorAll('[data-action="show-submenu"]');
1c.forEach(e=>{e.classList.remove("is-active")}),o.forEach(e=>{e.classList.remove("is-active")}),t.classList.add("is-active"),e.classList.add("is-active")}else t.classList.add("is-active")}(t);break;case"back-to-main":e.preventDefault(),function(e){if(window.innerWidth<1200&&"main-menu"===e.getAttribute("data-back-target")){const t=e.closest(".header__navbar-sublist"),o=e.closest('.header__navbar-submenu[data-navbar-level="submenu"]');if(t)t.classList.remove("is-active");else if(o){o.classList.remove("is-active");const e=o.getAttribute("data-subnavbar-title"),t=document.querySelector(`[data-navbar-type="${e.toLowerCase().replace(/\s+/g,"-")}"]`);t&&t.setAttribute("aria-expanded","false")}}}(t)}}),window.addEventListener("resize",function(){window.innerWidth>=1200?n.classList.contains("is-open")&&(n.classList.remove("is-open"),t.setAttribute("aria-expanded","false"),t.classList.remove("is-active"),o.setAttribute("aria-hidden","true"),document.body.classList.remove("no-scroll","menu-open"),s.classList.remove("is-visible"),b(n)):a&&a.classList.contains("is-open")&&(a.classList.remove("is-open"),s.classList.remove("is-visible"),b(a))}),function(){const e=document.querySelector(".header__search-form"),t=document.querySelector(".header__search-form-input"),o=document.querySelector(".header__search-btn"),n=document.querySelector(".header__search-form-close"),s="header__search-form--active";e&&t&&o&&n&&(o.addEventListener("click",function(o){o.preventDefault(),e.classList.add(s),t.focus()}),n.addEventListener("click",function(t){t.preventDefault(),e.classList.remove(s)}))}()})(),function(){const e=document.getElementById("sticky-banner"),t=document.querySelector(".hero"),o=document.querySelector(".header"),n=t||o;e&&n&&new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?e.classList.remove("sticky-banner--visible"):e.classList.add("sticky-banner--visible")})},{threshold:0}).observe(n)}(),"undefined"!=typeof modForm&&document.querySelectorAll('[data-bind="zip-form-with-modal"]').forEach(e=>{!function(e){const t=e.querySelector('input[name="zip"]');t&&(modForm.initNumericOnlyFields([t]),t.addEventListener("keyup",e=>{"Enter"!==e.key&&modForm.unmarkFieldAsInvalid(t)}),t.addEventListener("change",()=>{modForm.unmarkFieldAsInvalid(t)}),e.addEventListener("submit",o=>{if(o.preventDefault(),!modForm.isFieldValid(t))return void modForm.markFieldAsInvalid(t);a(e,!0);let n="";e.hasAttribute("data-bind-modal")&&""!==e.getAttribute("data-bind-modal")&&(n=e.getAttribute("data-bind-modal")),modForm.isZipCodeValid(t.value,o=>{if(a(e,!1),!o?.success)return modForm.markFieldAsInvalid(t),void t.focus();var i,r;i=o.data?.zip||t.value,r=o.data,window.homeownerFormEntryParams||(window.homeownerFormEntryParams={}),window.homeownerFormEntryParams.zip=i,r&&(window.homeownerFormEntryParams.geoData=r),n&&(0,s.h7)(n),modUtils?.heap&&modUtils.heap("track",["Modernize.com Header | Entered Form From Sticky Zip Box"])})}))}(e)}),(0,s.ZP)(),i(),function(){const e=document.querySelector(".back-to-top"),t=document.querySelector(".hero");e&&t&&window.addEventListener("scroll",function(){t.getBoundingClientRect().bottom<0?e.removeAttribute("hidden"):e.setAttribute("hidden",!0)})}(),function(){const e="filters--open",t="overlay-shown",o=document.querySelector('[data-bind="filters"]');o&&(document.querySelectorAll('[data-bind="filters-toggle"]').forEach(function(n){n.addEventListener("click",function(){const s=o.classList.toggle(e);document.body.classList.toggle(t,s),n?.setAttribute("data-filters-collapsed",!s)})}),window.addEventListener("resize",function(){o.classList.contains(e)&&!window.modUtils.isMobileSized()&&(o.classList.remove(e),document.body.classList.remove(t))}))}(),function(){const e='[data-bind="categories-toggle"]',t=document.querySelector('[data-bind="categories"]');function o(o){t.classList.toggle("categories--hidden",!o),t.setAttribute("aria-hidden",String(!o)),document.body.classList.toggle("overlay-shown",o),document.querySelectorAll(e).forEach(function(e){e.setAttribute("aria-expanded",String(o))})}t&&(document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",function(){o(!("false"===t.getAttribute("aria-hidden")))})}),window.addEventListener("resize",function(){"false"!==t.getAttribute("aria-hidden")||window.modUtils.isMobileSized()||o(!1)}))}(),document.querySelectorAll(".post-card").forEach(function(e){const t=e.querySelector("a");e.addEventListener("click",function(){t.click()})}),function(){const e=document.querySelector(".pro-contact-form__controls"),t=document.querySelector(".pro-contact-form__contact-info");document.querySelectorAll("[data-active-partner]").forEach(o=>{o.addEventListener("click",o=>
1{o.preventDefault(),e&&(e.style.display="none"),t&&t.removeAttribute("hidden")})},{once:!0}),document.addEventListener("modal",function(o){o.detail&&"close"===o.detail.action&&(e&&(e.style.display=""),t&&t.setAttribute("hidden",!0))})}(),(0,r.qh)(),(0,c.Z)()}),window.addEventListener("load",function(){window.IdlizeQueue?.pushTask(()=>{window.Modalytics&&window.Modalytics.initGtm()})})},
1"./scripts/section-bridge.js":(e,t,o)=>{o.d(t,{AZ:()=>s,ZP:()=>c,cH:()=>r,qh:()=>d});const n=".wp-block-group, .wp-block-columns, section",s="section--overlapping";function a(e){const t=e.nextElementSibling;return t?.matches(n)?t:null}function i(e){if(!e||e.offsetHeight<=0)return;const t=e.offsetHeight/2+"px";e.style.setProperty("--section-bridge-offset",t);const o=a(e);o&&o.style.setProperty("--section-bridge-offset",t)}function r(e){if(!e)return;e.style.removeProperty("--section-bridge-offset");const t=a(e);t&&t.style.removeProperty("--section-bridge-offset")}function c(e){i(e);const t=new ResizeObserver(()=>i(e));return t.observe(e),t}function d(e=document){e.querySelectorAll(`.${s}`).forEach(function(e){c(e)})}}
1},e=>{var t=t=>e(e.s=t);e.O(0,[259,7682,7765],()=>(t("./scripts/app.js"),t("./styles/app.scss"))),e.O()}]);

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.