1import{i as h,h as g,e as w,g as b,d as p,f as E,b as L,m as v}from"./personalization.CSBmU0B6.js";import{t as y}from"./track.Dgwea2Vl.js";const z=.5,A="{firstNameOrTeam}, ready to uncover your hidden website visitors at {company}?",M="{firstNameOrTeam}, ready to uncover your hidden website visitors?",T="Ready to uncover your hidden website visitors?";function _(e,t){const o=e.querySelector("[data-personalized-modal-heading]"),n=e.querySelector("[data-personalized-modal-cta]"),r=e.querySelector("[data-personalized-modal-company-logo]");if(o){const a=e.dataset.modalHeadingTemplate||A,i=e.dataset.modalHeadingNoCompanyTemplate||M,d=e.dataset.modalHeadingFallback||T,c=p(a,t),s=p(i,t);o.textContent=c||s||d}if(n&&(n.href=e.dataset.modalCtaHref||E()),r&&t.domain){const a=L(t.domain,{strict:!0});if(a){const i=new Image;i.onload=()=>{r.src=a,e.dataset.hasCompanyLogo="true"},i.src=a}}}const l=new WeakMap;function k(e,t){if(e.dataset.open==="true")return;const o=document.activeElement;o&&o!==document.body&&l.set(e,o),e.dataset.open="true",e.setAttribute("aria-hidden","false");const n=document.body;n.style.overflow==="hidden"||(n.style.overflow="hidden",n.dataset.personalizedModalLocked="true"),v(),e.querySelector("[data-personalized-modal-close]")?.focus()}function u(e){if(e.dataset.open!=="true")return;e.dataset.open="false",e.setAttribute("aria-hidden","true");const t=document.body;t.dataset.personalizedModalLocked==="true"&&(t.style.overflow="",delete t.dataset.personalizedModalLocked);const o=l.get(e);l.delete(e),o&&document.contains(o)&&o.focus()}function D(e,t){if(t.dataset.open!=="true")return;if(e.key==="Escape"){e.preventDefault(),u(t);return}if(e.key!=="Tab")return;const o=Array.from(t.querySelectorAll('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(i=>i.getClientRects().length>0);if(!o.length)return;const n=o[0],r=o[o.length-1],a=document.activeElement;if(!a||!t.contains(a)){e.preventDefault(),n.focus();return}e.shiftKey&&a===n?(e.preventDefault(),r.focus()):!e.shiftKey&&a===r&&(e.preventDefault(),n.focus())}function S(e,t,o){let n=!1;const r=s=>{n||(n=!0,y("personalization_modal_shown",{company:t.company||void 0,domain:t.domain||void 0,trigger:s,page_path:window.location.pathname}),k(e))};let a=!1;const i=()=>{a||(a=!0,requestAnimationFrame(()=>{a=!1;const m=document.documentElement.scrollHeight-window.innerHeight;if(m<=0)return;window.scrollY/m>=z&&r("scroll")}))},d=typeof window.matchMedia=="function"&&window.matchMedia("(pointer: fine) and (hover: hover)").matches,c=s=>{s.relatedTarget||s.toElement||s.clientY>0||r("exit_intent")};window.addEventListener("scroll",i,{passive:!0,signal:o}),d&&document.documentElement.addEventListener("mouseout",c,{signal:o})}function f(){if(!h())return;const e=document.querySelector("[data-personalized-modal]");if(!e||e.dataset.initialized==="true"||!g()||w())return;const t=b();if(!t||!t.email)return;e.dataset.initialized="true",_(e,t);const o=new AbortController,{signal:n}=o;e.querySelectorAll("[data-personalized-modal-close]").forEach(r=>{r.addEventListener("click",a=>{a.preventDefault(),u(e)},{signal:n})}),e.querySelector("[data-personalized-modal-cta]")?.addEventListener("click",()=>{y("personalization_modal_cta_clicked",{company:t.company||void 0,domain:t.domain||void 0,page_path:window.location.pathname})},{signal:n}),document.addEventListener("keydown",r=>D(r,e),{signal:n}),S(e,t,n),document.addEventListener("astro:before-swap",()=>{o.abort(),u(e),delete e.dataset.initialized},{signal:n})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f();document.addEventListener("astro:page-load",f);
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.