1(function(){"use strict";function a(e){const t=new Error(e);return t.source="ulid",t}const u="0123456789ABCDEFGHJKMNPQRSTVWXYZ",o=u.length,h=Math.pow(2,48)-1,_=10,S=16;function y(e){let t=Math.floor(e()*o);return t===o&&(t=o-1),u.charAt(t)}function C(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>h)throw a("cannot encode time greater than "+h);if(e<0)throw a("time must be positive");if(Number.isInteger(Number(e))===!1)throw a("time must be an integer");let i,n="";for(;t>0;t--)i=e%o,n=u.charAt(i)+n,e=(e-i)/o;return n}function E(e,t){let i="";for(;e>0;e--)i=y(t)+i;return i}function D(e=!1,t){t||(t=typeof window<"u"?window:null);const i=t&&(t.crypto||t.msCrypto);if(i)return()=>{const n=new Uint8Array(1);return i.getRandomValues(n),n[0]/255};try{const n=require("crypto");return()=>n.randomBytes(1).readUInt8()/255}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return()=>Math.random()}throw a("secure crypto unusable, insecure Math.random not allowed")}function I(e){return e||(e=D()),function(i){return isNaN(i)&&(i=Date.now()),C(i,_)+E(S,e)}}const m=I();class b{constructor(){this.trackingServerUrl="https://d86zryi74yrxw.cloudfront.net"}send(t){const i=new Image,n=this.utf8ToBase64(JSON.stringify(t)).replace(/=/g,"");i.src=`${this.trackingServerUrl}?event=${n}`,i.style.display="none",document.body.appendChild(i),setTimeout(()=>document.body.removeChild(i),1e3)}utf8ToBase64(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(n,r){return String.fromCharCode(parseInt("0x"+r))}))}}const d="is_leadgrid_cookie_permit",g=1,A=365;function f(e=d){try{const t=localStorage.getItem(e);if(!t)return N(e)?f(e):null;const i=JSON.parse(t);return i.version!==g||Date.now()>i.exp?(w(e),null):i.value}catch(t){return console.error(t),null}}function k(e,t=d,i=A){try{const n=Date.now(),r={value:e,exp:n+i*24*60*60*1e3,version:g,consentedAt:n};localStorage.setItem(t,JSON.stringify(r)),p(t)}catch(n){console.error(n)}}function w(e=d){localStorage.removeItem(e),p(e)}function N(e){const t=x(e);return t==="true"||t==="1"?(k(!0,e),!0):t==="false"||t==="0"?(k(!1,e),!0):!1}function x(e){const i=document.cookie.split(";").map(n=>n.trim()).find(n=>n.startsWith(e+"="));return i?i.split("=")[1]:null}function p(e){document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}class M{setCookie(t,i,n){const r=n?`; expires=${new Date(Date.now()+n*24*60*60*1e3).toUTCString()}`:"";document.cookie=`${t}=${i}${r}; path=/`}getCookie(t){const n=document.cookie.split(";").map(r=>r.trim()).find(r=>r.startsWith(t+"="));return n?n.split("=")[1]:null}getCookieValue(t,i){const n=this.getCookie(t);if(!n){const r=m();return this.setCookie(t,r,i),r}return n}}class v{constructor(){this.visitorId="",this.sessionId="",this.trackingDataArray=[],this.lastActivityTime=Date.now(),this.sessionTimeoutDuration=30*60*1e3,this.cookieManager=new M,this.beaconSender=new b,this.visitTime=new Date().toISOString(),this.activeTime=0,this.isPageVisible=!0,this.initializeTracking()}initializeTracking(){this.isTrackingPermitted()&&(this.startNewSession(),this.setupEventListeners(),this.setupActiveTimer(),this.extractUtmSource(),this.extractTrackingCodeId())}isTrackingPermitted(){let t="is_leadgrid_cookie_permit",i="opt_in";const n=document.querySelector("#leadgrid-analytics-tracker");if(n){const s=n.getAttribute("data-consent-cookie-name");s&&(t=s);const c=n.getAttribute("data-consent-type");c&&(i=c)}const r=f(t);return i==="opt_out"?r!==!1:r===!0}startNewSession(){this.trackingDataArray=[],this.visitorId=this.cookieManager.getCookieValue("_la_visitor_id",365),this.sessionId=this.cookieManager.getCookieValue("_la_session_id",1/48),this.visitTime=new Date().toISOString(),this.activeTime=0,this.isPageVisible=!0,this.lastActivityTime=Date.now(),this.prepareBaseTrackingData()}prepareBaseTrackingData(){this.trackingData={id:m(),visitor_id:this.visitorId,session_id:this.sessionId,tracking_code_id:"",url:window.location.href,page_title:document.title,action_type:"page_view",visit_time:this.visitTime,exit_time:"",view_duration:0}}setupEventListeners(){document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.isPageVisible=!1:(this.isPageVisible=!0,this.checkSessionTimeout())}),window.addEventListener("beforeunload",()=>{this.sendTrackingData()}),["mousedown","keydown","touchstart","scroll"].forEach(t=>{document.addEventListener(t,()=>{this.checkSessionTimeout()||(this.lastActivityTime=Date.now())},!0)})}checkSessionTimeout(){const t=Date.now()-this.lastActivityTime>=this.sessionTimeoutDuration;return t&&(this.sendTrackingData(),this.startNewSession()),t}setupActiveTimer(){setInterval(()=>{this.isPageVisible&&(this.activeTime+=1e3)},1e3)}extractUtmSource(){const i=new URLSearchParams(window.location.search).get("utm_source");i&&(this.trackingData.utm_source=i)}extractTrackingCodeId(){const t=document.querySelector("#leadgrid-analytics-tracker");if(!t)return;const i=t.getAttribute("src");if(!i)return;const n=i.split("?")[1],s=new URLSearchParams(n).get("id");s&&(this.trackingData.tracking_code_id=s)}addTrackingData(){this.trackingData.exit_time=new Date().toISOString(),this.trackingData.view_duration=this.activeTime,this.trackingDataArray.push(this.trackingData)}
1sendTrackingData(){this.activeTime<1e3||(this.addTrackingData(),this.beaconSender.send(this.trackingDataArray))}}const T="__leadgrid_region_gate__",l="leadgrid:region-gate-resolved",R=5e3;function O(){const e=window,t=e[T];return t?.resolved===!0?Promise.resolve(t.allowed):new Promise(n=>{const r=window.setTimeout(()=>{window.removeEventListener(l,s),n(!1)},R),s=()=>{const c=e[T];window.clearTimeout(r),window.removeEventListener(l,s),n(c?.allowed===!0)};window.addEventListener(l,s)})}document.addEventListener("DOMContentLoaded",()=>{if(!(document.querySelector('script[src*="/cookie/js/leadgrid-cookie-sdk.js"]')!==null)){new v;return}O().then(i=>{i&&new v})})})();
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.