const objCities = { template: `
` , props:{ userId:{ type:String, required:true }, searchString:{ type:String, required: true } }, async created() { this.$nextTick(() => { if (this.userId) { this.$root.propertySearch(this.userId, this.searchString); } }); }, computed: { fetchedProperties() { return this.$root.propertiesByCity; }, } } app.component('cities', objCities); const objCity = { template: `

LPT Realty Agents in {{ this.$root.capitalizeFirstLetter(this.$route.params.searchString) }}

Showing page {{ page }} of {{ totalPages }}

No agents found.

What Sets LPT Realty Above the Rest

Whether you're trying to buy your dream home or selling your current one, LPT Realty's number one priority is to help find you the best deal possible while providing exceptional customer service. LPT Realty agents are armed with best in class technology and marketing tools to help you make informed decisions about buying or selling your home, and are there for you every step of the way.

` , data() { return { limit: 15, skip: 0, page: 1 } }, props: { searchString: String }, async created() { window.scrollTo(0, 0); if(!this.$root.isNumeric(this.$route.params.searchString)){ await this.$root.getAgentsByCitySearch(this.$route.params.searchString); } else { this.goToPage('') // route to 404 } }, methods:{ goToPage(path) { // KEEP IN MIND: this function is duplicated above the Vue.app create (for base JS map click event) let baseUrl = window.location.origin let currentpath = window.location.pathname let url = `${baseUrl}${currentpath}#/${path}` if (this.$route.query.ca) { url += `?ca=${this.$route.query.ca}` } window.location.href = url // window.location.reload(true) }, handleNext() { this.page = this.page += 1; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) }, handlePrevious() { if (this.page > 0) { this.page = this.page - 1; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) } }, }, computed: { roundedPages() { if(this.$root.agentsFetched){ return Math.floor(this.$root.agents.length / this.limit) } else { return 0 } }, fullPages() { return this.roundedPages * this.limit; }, remainder() { return this.$root.agentsToPaginate - this.fullPages; }, totalPages() { return this.roundedPages } } } app.component('city', objCity); const objHome = { template: `

{{ title }}

Use the search to find a dedicated LPT Realty agent in your area.

LPT Realty Agent Results

Showing page {{ page }} of {{ totalPages }}

No agents found.

What Sets LPT Realty Above the Rest

Whether you're trying to buy your dream home or selling your current one, LPT Realty's number one priority is to help find you the best deal possible while providing exceptional customer service. LPT Realty agents are armed with best in class technology and marketing tools to help you make informed decisions about buying or selling your home, and are there for you every step of the way.

The LPT Realty Difference

{{ item.title }}

{{ item.paragraph }}

No properties to display

Cities

` , data() { return { title: 'Find Your Local Neighborhood Expert', limit: 15, skip: 0, page: 1, displayUrl:'', searchString: '', differences: [ { title: 'Exceptional Customer Service', img: '/assets/images/support.svg', paragraph: 'Our dedicated LPT Realty agents are available around the clock and happy to answer any questions you might have' }, { title: 'Latest Technology Tools', img: '/assets/images/technology.svg', paragraph: 'LPT Realty agents are armed with state of the art technology designed to give you a seamless customer experience' }, { title: 'Best In Class Marketing', img: '/assets/images/marketing.svg', paragraph: 'All LPT Realty agents have access to a proven marketing system including print materials and a branded website for all listings' } ] } }, async created() { if (!this.$route.matched[0].name || this.$route.matched[0].name == '404-regex') { this.$root.goToPage('') // route to 404 } else { await this.$root.initiateCookie() this.$root.scrollToElementById('lptagentdirectory') // scroll to top this.$root.insertLeadAction(2) } }, computed: { fetchedAgents() { return this.$root.agents }, filteredCities() { let cities = this.$root.properties.map(address => { let parts = address.city.split(" "); let city = ""; let first = true; for(let part of parts){ if(!first) city += " "; else first = false; city += part.substring(0, 1).toUpperCase() + part.toLowerCase().substring(1, part.length); } return city; }); let uniqueCities = cities.filter((item, pos) => { return cities.indexOf(item) == pos }); return uniqueCities.sort(); }, roundedPages() { if(this.$root.agentsFetched){ return Math.ceil(this.$root.agents.length / this.limit) } else { return 0 } }, fullPages() { return this.roundedPages * this.limit; }, remainder() { return this.$root.agentsToPaginate - this.fullPages; }, totalPages() { return this.roundedPages } }, watch: { searchString(newValue, oldValue) { if (newValue.length == 0) { // this.$root.getAllAgents(0,12); this.$root.agentsFetched = false; this.$root.pagedAgents.length = 0; } } }, methods: { handleNext() { this.page++; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) }, handlePrevious() { if (this.page > 0) { this.page--; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) } }, async startSearch() { let parsedSearchString = this.searchString.trim() parsedSearchString = parsedSearchString.replaceAll(/[^A-Za-z0-9\s]/g, '') parsedSearchString = parsedSearchString.replaceAll(/\s+/g, '+'); await this.$root.getAgentsBySearchString(parsedSearchString); this.page = 1 }, startCitySearch(city) { let parsedSearchString = city.trim() let path = `${this.$root.user.userId}/search/${parsedSearchString}` this.$root.goToPage(path, true) } } } app.component('home', objHome); const objNotFound = { template: `

404

Sorry, the page you are looking for does not exist

` , } app.component('notfound', objNotFound); const objPrivacy = { template: `

Privacy Policy/Terms and Conditions

Information Collected

“Personal Information” includes, but not limited to:

“Usage Information” is any information that does not reveal your specific identity. This information includes, but not limited to:

Our Communication With You (Telephone Consumer Protection Act Consent)

By submitting your Personal Information, you are providing your express written consent to receive communications from us. Communications from us include, but not limited to:

We may use an automatic telephone dialing system (“Dialer”), which may employ an artificial or pre-recorded voice (“Auto Voicemail”), auto text messages (“RoboTexts”), or artificial or prerecorded voices (“Prerecorded Messages”). Your carrier’s standard rates and charges may apply. How often we send you communications may vary. Communications with you may be on a recorded line. By submitting your Personal Information, you represent and warrant that you are at least 18 years of age, you have not registered on a national or statewide Do Not Call list, you are the account holder for the email addresses and phone numbers you provided, and the email addresses and phone numbers you provided are accurate.

Disclosure of Information

We may disclose Personal and Usage Information:

How Information is Collected

We collect Personal and Usage Information from the following sources:

Security

We seek to use reasonable organizational, technical and administrative measures to protect Personal Information with our organization. While we use said measures to protect your confidential information and provide suitable security, please be aware that no security measures are perfect or impenetrable. We do not and cannot guarantee or warrant that any information transmitted through the Internet is secure, or that such transmissions are free from delay, interruption, interception or error.

Opt-Out

You may Opt-Out from receiving (i) marketing related emails from us; (ii) our sharing of your Personal Information with our affiliates for their direct marketing purposes; or (iii) our sharing of your Personal Information with our third-party business partners for their direct marketing purposes. To Opt-Out, please contact us at help@lpt.com. We will comply with your request(s) as soon as reasonably practicable.

Retention Period

We retain Personal Information and Usage Information for as long as needed, in our sole discretion, and in accordance with applicable law.

Third Party Services

This Privacy Policy does not address, and we are not responsible for, the privacy, information or other practices of any third parties.

Transfer of Information

We reserve the right to transfer your Personal Information, as well as any information about or from you, in connection with the merger, sale or other disposition of all or part of our business and/or assets. We cannot make any representations regarding the use or transfer of your information that we may have in the event of our bankruptcy, reorganization, insolvency, receivership, or an assignment for the benefit of creditors. You expressly agree and consent to the use and/or transfer of your information in connection with a sale or transfer of some or all of our assets. We are not responsible for any breach of security by any third parties or for any actions of any third parties that receive any of the information that is disclosed to us.

Use of Services by Minors

Our Services are not directed to individuals under the age of 18. We do not knowingly collect or solicit Personal from individuals under the age of 18. Please email us at help@lpt.com if you believe we collected Personal Information from an individual under the age of 18.

Your Consent to Future Changes

We may change the website, Terms of Use, and this Privacy Policy at any time. If we change this Privacy Policy, the changes will become effective immediately on posting the updated or revised Privacy Policy on this web page.

Contacting Us

If you have questions about this Privacy Policy, please contact us at help@lpt.com.

` , async created() { window.scrollTo(0, 0); } } app.component('privacy', objPrivacy); const objZip = { template: `

LPT Realty Agents in the {{this.$route.params.searchString}} area

Showing page {{ page }} of {{ totalPages }}

No agents found.

What Sets LPT Realty Above the Rest

Whether you're trying to buy your dream home or selling your current one, LPT Realty's number one priority is to help find you the best deal possible while providing exceptional customer service. LPT Realty agents are armed with best in class technology and marketing tools to help you make informed decisions about buying or selling your home, and are there for you every step of the way.

` , data() { return { limit: 15, skip: 0, page: 1 } }, props: { searchString: String }, async created() { window.scrollTo(0, 0); if(this.$root.isNumeric(this.$route.params.searchString)){ await this.$root.getAgentsBySearchString(this.$route.params.searchString); } else { this.$root.goToPage('') // route to 404 } }, methods:{ handleNext() { this.page = this.page += 1; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) }, handlePrevious() { if (this.page > 0) { this.page = this.page - 1; this.$root.pagedAgents = this.$root.pagination(this.$root.agents, this.page) } }, }, computed: { roundedPages() { if(this.$root.agentsFetched){ return Math.floor(this.$root.agents.length / this.limit) } else { return 0 } }, fullPages() { return this.roundedPages * this.limit; }, remainder() { return this.$root.agentsToPaginate - this.fullPages; }, totalPages() { return this.roundedPages } } } app.component('zip', objZip); const objAgentCard = { template: `
` , data() { return { } }, props: { linkTo: String, agent: { userFirstName: String, userLastName: String, userEmail: String, userPhone: String, userLogo: String, userPhoto: String, brokerageName: String, userTitle: String } }, computed: { formattedPhone() { const number = this.agent.userPhone; if (!number) { return 'Unknown' } else { const numToString = number.toString(); if (numToString.length === 10) { const areaCode = numToString.substring(0,3); const firstDigits = numToString.substring(3,6); const restDigits = numToString.substring(6,numToString.length); return `(${areaCode}) ${firstDigits}-${restDigits}`; } else { return 'Invalid phone provided'; } } } } } app.component('agent-card', objAgentCard); const objAgentDetail = { template: `

No properties to display

Cities

` , data() { return { } }, props: { userId: [String, Number] }, async created() { window.scrollTo(0, 0); await this.$root.getAgentById(this.userId); await this.$root.getAllProperties(this.userId); }, computed: { filteredCities() { let cities = this.$root.properties.map(address => { let parts = address.city.split(" "); let city = ""; let first = true; for(let part of parts){ if(!first) city += " "; else first = false; city += part.substring(0, 1).toUpperCase() + part.toLowerCase().substring(1, part.length); } return city; }); let uniqueCities = cities.filter((item, pos) => { return cities.indexOf(item) == pos }); return uniqueCities.sort(); }, }, methods: { startSearch(city) { let parsedSearchString = city.trim() // parsedSearchString = parsedSearchString.replaceAll(/[^A-Za-z0-9\s]/g, '') // parsedSearchString = parsedSearchString.replaceAll(/\s+/g, '+') let path = `${this.$root.user.userId}/search/${parsedSearchString}` // console.log(parsedSearchString) console.log(path); this.$root.goToPage(path) } } } app.component('agent-detail', objAgentDetail); const objAgentForm = { template: `

{{ fullName }}

{{ user.brokerageName }}

{{ user.userTitle }}

Request Home Buyer Consultation with {{ user.userFirstName }}

{{ message }}
` , props: { user: Object }, data() { return { form: { firstname: '', lastname: '', phone: '', email: '' }, submittingForm: false, showingMessage: false, messageColor: { 'text-danger': true }, message: '' } }, computed: { fullName() { return `${this.user.userFirstName} ${this.user.userLastName}` }, formattedPhone() { const number = this.user.userPhone; if (!number) { return 'Unknown' } else { const numToString = number.toString(); if (numToString.length === 10) { const areaCode = numToString.substring(0,3); const firstDigits = numToString.substring(3,6); const restDigits = numToString.substring(6,numToString.length); return `(${areaCode}) ${firstDigits}-${restDigits}`; } else { return 'Invalid phone provided'; } } }, }, methods: { async submitContact(event) { event.preventDefault() if (this.validateForm()) { this.submittingForm = true const response = await fetch(`/api/backend.cfc?method=contactAgent&userId=${this.user.userId}`, { method: 'POST', body: JSON.stringify(this.form) }) let data = await response.json() if (data.success === true) { this.messageColor = { 'text-success': true } this.submittingForm = false this.message = 'Thank you! Your information has been received.' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 5000) let firstName = this.form.firstname let lastName = this.form.lastname let phone = this.form.phone let email = this.form.email this.clearForm() this.$root.submitForm(firstName, lastName, phone, email, this.user.userId) }else { this.messageColor = { 'text-danger': true } this.submittingForm = false this.message = 'Failed to send communincation please try again.' this.showingMessage = true setTimeout(() => { this.showingMessage = false }, 5000) } } }, validateForm() { if ( this.form.firstname !== '' && this.form.lastname !== '' && this.form.phone !== '' && this.form.email !== '' ) { return true } else return false }, clearForm() { this.form.firstname = '' this.form.lastname = '' this.form.phone = '' this.form.email = '' } } } app.component('agent-form', objAgentForm); const objFooterMain = { template: ` ` , } app.component('footer-main', objFooterMain); const objGlobalMap = { template: `
` , props: { properties: { type: Array, required: true, default: [] }, property: { type: Object, required: false, default: {} }, width: { type: String, required: false, default: '100%' }, height: { type: String, required: false, default: '350px' }, showAllProperties: { type: Boolean, required: false, default: false }, user: { type: Object, required: false, default: {} } }, data() { return { accessToken: this.$root.MAPBOX_ACCESS_TOKEN, propertyLng: 0, propertyLat: 0 }; }, computed: { map: function(){ return new mapboxgl.Map({ container: 'mapContainer', // container ID style: 'mapbox://styles/mapbox/light-v9', // style URL center: [this.propertyLng,this.propertyLat], // starting position [lng, lat] zoom: 10 // starting zoom }); }, nav: function() { return new mapboxgl.NavigationControl(); }, popup: function() { return new mapboxgl.Popup({ closeButton: true, closeOnClick: false }); }, renderMap: function() { return this.createMap(this.map, this.nav, this.popup) }, isSubdomain(){ let domainsplit = window.location.href.split('.'); if(domainsplit.length == 3 && domainsplit[0] != 'www'){ return true } else{ return false } } }, methods: { createMap(map, nav, popup) { let layer = { id: '', // set dynamically below type: 'symbol', source: { type: 'geojson', data: { type: 'FeatureCollection', features: [] } }, layout: { 'icon-image': '', // set dynamically below 'icon-allow-overlap': true, 'icon-size': 0.5 }, paint: { 'icon-color': '#1469ab' } } let homeLayer = JSON.parse(JSON.stringify(layer)) // deep clone homeLayer.id = 'home' homeLayer.layout['icon-image'] = 'listedHomeMarker' let pointsLayer = JSON.parse(JSON.stringify(layer)) // deep clone pointsLayer.id = 'points' pointsLayer.layout['icon-image'] = 'listedMarker' for (var i = 0; i < this.properties.length; i++) { let path = ''; if(this.isSubdomain){ path = `property/${this.properties[i].propertyId}`; } else { path = `${this.properties[i].userId}/property/${this.properties[i].propertyId}`; } let htmlTemplate = `
' : 'style="display: block; width: fit-content; color: bold; font-weight: bold; border-bottom: blue solid 1px;">'}${this.properties[i].soldDate || !this.properties[i].isActive ? 'Sold' : 'For Sale'} $${this.$root.numberWithCommas(this.properties[i].price)}
${this.properties[i].bedrooms} Bed, ${this.properties[i].bathrooms} Bath
${this.properties[i].sqft} ft²
${this.properties[i].address}
` let feature = { type: 'Feature', properties: { description: htmlTemplate, url: `${this.$root.localUrlHrefBase}#/${this.user.userId}/property/${this.properties[i].propertyId}`, icon: '' // set dynamically below }, geometry: { type: 'Point', coordinates: [parseFloat(this.properties[i].lng), parseFloat(this.properties[i].lat)] } } if (!this.showAllProperties) { if (this.properties[i].propertyId == this.property.propertyId) { feature.properties.icon = 'listedHomeMarker' homeLayer.source.data.features.push(feature) } else { feature.properties.icon = 'listedMarker' pointsLayer.source.data.features.push(feature) } } else { if (this.properties[i].soldDate == '' && this.properties[i].isActive) { feature.properties.icon = 'listedHomeMarker' homeLayer.source.data.features.push(feature) } else { feature.properties.icon = 'listedMarker' pointsLayer.source.data.features.push(feature) } } } let showAllProperties = this.showAllProperties map.on('load', function() { map.addControl(nav, "top-left"); map.loadImage('./assets/images/sold-house2.png', (error, image) => { if (error) throw error; map.addImage('listedMarker', image); map.addLayer(pointsLayer); }); map.loadImage('./assets/images/sale-house.png', (error, image) => { if (error) throw error; // Add the loaded image to the style's sprite with the ID 'kitten'. map.addImage('listedHomeMarker', image); map.addLayer(homeLayer); }); map.on('mouseenter', 'points', (e) => { map.getCanvas().style.cursor = 'pointer' var features = map.queryRenderedFeatures(e.point, { layers: ['points'] }) if (!features.length) { return } var coordinates = e.features[0].geometry.coordinates.slice(); var description = e.features[0].properties.description; while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) { coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360; } popup.setLngLat(coordinates) .setHTML(description) .addTo(map); }); map.on('mouseleave', 'points', function() { map.getCanvas().style.cursor = '' }); if (showAllProperties) { map.on('mouseenter', 'home', (e) => { map.getCanvas().style.cursor = 'pointer' var features = map.queryRenderedFeatures(e.point, { layers: ['home'] }) if (!features.length) { return } var coordinates = e.features[0].geometry.coordinates.slice(); var description = e.features[0].properties.description; while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) { coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360; } popup.setLngLat(coordinates) .setHTML(description) .addTo(map); }); map.on('mouseleave', 'home', function() { map.getCanvas().style.cursor = '' }); } }); } }, created() { if (!this.property.propertyId) { this.propertyLng = this.properties[0] && this.properties[0].lng ? this.properties[0].lng : 0 this.propertyLat = this.properties[0] && this.properties[0].lat ? this.properties[0].lat : 0 } else { this.propertyLng = this.property.lng ? this.property.lng : 0 this.propertyLat = this.property.lat ? this.property.lat : 0 } }, mounted() { mapboxgl.accessToken = this.accessToken this.renderMap } } app.component('global-map', objGlobalMap); const objGuiModal = { template: `