1import{cd as g,dH as p,bH as v}from"./CELbjR55.js";const L=()=>{const a=g(),{proxy:o}=p(),c=v("prev-route");return{pushEntity:(i,f,n,s)=>{try{if(typeof window>"u")return;let t={};switch(f){case"listing":{const e=i,r=e?.propertyContent?.office?.agents?.find(d=>d?.agentId===s);t={event:"generate_lead",lead_type:n||void 0,lead_phone_wa_type:"Agent",lead_property_type:e?.type?.propertyType||void 0,lead_property_category:e?.type?.propertyCategory||void 0,lead_listing_status:y(e?.details?.isBuy,e?.details?.isSold)||void 0,lead_listing_id:e?.webListingReference||void 0,lead_location:e?.location?.hierarchyKey||void 0,lead_office_id:e?.propertyContent?.office?.officeHRMasterKey||void 0,lead_office_type:e?.propertyContent?.office?.isFranchiseOffice?e?.propertyContent?.office?.isFranchiseOffice?"Franchise":void 0:"Branch",lead_region:e?.propertyContent?.office?.operationalRegionName||void 0,lead_agent_ids:r?.agentHRMasterKey||void 0,lead_user_status:a.isLoggedIn?"Logged-in":"Guest"};break}case"development":{const e=i,r=e?.content?.agents?.find(d=>d?.agentId===s);t={event:"generate_lead",lead_type:n||void 0,lead_phone_wa_type:"Agent",lead_development_id:e?.developmentId||void 0,lead_location:e?.location?.hierarchyKey||void 0,lead_office_id:e?.content?.office?.officeHRMasterKey||void 0,lead_office_type:e?.content?.office?.isFranchiseOffice?e?.content?.office?.isFranchiseOffice?"Franchise":void 0:"Branch",lead_region:e?.content?.office?.operationalRegionName||void 0,lead_agent_ids:r?.agentHRMasterKey||void 0,lead_user_status:a.isLoggedIn?"Logged-in":"Guest"};break}case"developer":{const e=i,r=e?.content?.agents?.find(d=>d?.agentId===s);t={event:"generate_lead",lead_type:n||void 0,lead_phone_wa_type:"Agent",lead_developer_estate_id:e?.developerId||void 0,lead_developer_estate_type:e?.isEstate?e?.isEstate?"Estate":void 0:"Developer",lead_location:e?.location?.hierarchyKey,lead_office_id:e?.content?.office?.officeHRMasterKey||void 0,lead_office_type:e?.content?.office?.isFranchiseOffice?e?.content?.office?.isFranchiseOffice?"Franchise":void 0:"Branch",lead_region:e?.content?.office?.operationalRegionName||void 0,lead_agent_ids:r?.agentHRMasterKey||void 0,lead_user_status:a.isLoggedIn?"Logged-in":"Guest"};break}case"office":{const e=i;t={event:"generate_lead",lead_type:n||void 0,lead_phone_wa_type:"Office",lead_location:e?.location?.hierarchyKey,lead_office_id:e?.hrMasterKey||void 0,lead_office_type:e?.isFranchiseOffice?e?.isFranchiseOffice?"Franchise":void 0:"Branch",lead_region:e?.operationalRegionName||void 0,lead_user_status:a.isLoggedIn?"Logged-in":"Guest"};break}case"agent":{const e=i;t={event:"generate_lead",lead_type:n||void 0,lead_phone_wa_type:"Agent",lead_agent_ids:e?.hrMasterKey||void 0,lead_office_id:e?.office?.hrMasterKey||void 0,lead_office_type:e?.office?.isFranchiseOffice?e?.office?.isFranchiseOffice?"Franchise":void 0:"Branch",lead_region:e?.office?.operationalRegionName||void 0,lead_user_status:a.isLoggedIn?"Logged-in":"Guest"};break}default:break}const _=new Set(["user_id","session_id","page_category"]);t.previous_page=c.value,o.dataLayer.push(t);const l=Object.fromEntries(Object.keys(t).filter(e=>e!=="event"&&!e.startsWith("gtm.")&&!_.has(e)).map(e=>[e,void 0]));o.dataLayer.push({event:"context_cleared",...l})}catch(t){console.error(t)}}}},y=(a,o)=>{if(a===!0)return o?"Sold":"For sale";if(a===!1)return o?"Let":"To rent"};export{L as u};
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.