PageSourceSearch

https://www.premiergarage.com/dist/sites/pg/js/o4g_2qnA.js

js premiergarage.com collected 2026-09-28 23:46:49 UTC 2,218 bytes, 1 lines download raw bytes

1import u from"./nLbThxuC.js";import{a as n}from"./Cz0CWeBA.js";class I extends u{constructor(e){super(e),this.setupDefaults(),this.setPPCFranchiseId(),this.setLocalizedFranchiseId(),this.idInQueryString||typeof this.localizedFID<"u"&&(this.ppcFID=this.localizedFID,this.setPPCFranchiseIdCookie(this.ppcFID)),this.parsePhoneNumbers(),this.swap()}setupDefaults(){this.phoneElements=this.el instanceof NodeList?this.el:[this.el],this.phoneNumbers=[],this.ppcFID=null,this.localizedFID=null,this.idCookieName="yotrack-fid",this.metadataCookieName="YoTrackMetaDataWidget",this.idInQueryString=!1}parsePhoneNumbers(){Array.from(this.phoneElements).forEach(e=>{let s=e.getAttribute("href");if(s&&s.includes("tel:")&&(s=s.replace("tel:",""),s!=="")){this.addPhoneNumberToList(s);const i=s.replace(/\D/g,"");this.addPhoneNumberToList(i)}})}addPhoneNumberToList(e){this.phoneNumbers.includes(e)||this.phoneNumbers.push(e)}setLocalizedFranchiseId(){const e=document.querySelector("[data-fid]");this.localizedFID=e?e.dataset.fid:void 0}setPPCFranchiseId(){let s=new URL(window.location).searchParams.get("fid");this.isValidFranchiseId(s)?(this.idInQueryString=!0,this.setPPCFranchiseIdCookie(s)):s=this.getFranchiseIdFromCookie(this.idCookieName),this.ppcFID=s}setPPCFranchiseIdCookie(e){n.set(this.idCookieName,e,{expires:14})}getFranchiseIdFromCookie(e){const s=n.get(e);return this.isValidFranchiseId(s)?s:null}isValidFranchiseId(e){return!(typeof e>"u"||e===null||e==="undefined"||e==="")}swap(){if(!this.isValidFranchiseId(this.ppcFID)||this.phoneNumbers.length===0)return;const e=document.querySelector("[data-hfc-yotrack-info]");let s=null;if(e)try{s=JSON.parse(e.dataset.hfcYotrackInfo)}catch(i){console.error("Error parsing YoTrack Info",i)}if(s&&typeof s=="object"){const i=this.phoneNumbers,a=s.id,h=this.metadataCookieName;window.YoTrack&&window.YoTrack(a,(c,r)=>{c?window.YoTrack(a,(o,t)=>{t.swapPhones(i,(d,l)=>{console.log("Error: ",d),console.log("Phone Number: ",l)})}):r.swapPhones(i,(o,t)=>{console.log("Error: ",o),console.log("Phone Number: ",t)}),r.getMetadata((o,t)=>{n.set(h,t,{expires:1}),console.log("Meta-data: ",t)}),r.isSEMSession((o,t)=>{console.log("Is SEM Session: ",t)})})}}}export{I as default};

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.