PageSourceSearch

https://pages.kaydoh.com/12931/p/2734/0mIHoKAWz?utm_source=lp-template-made-for-success

html kaydoh.com collected 2026-10-08 20:38:08 UTC 137,659 bytes, 2,229 lines download raw bytes

1<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta property="fb:app_id" content="490582354812823"><meta property="og:url" content="https://pages.kaydoh.com/12931/p/2734/0mIHoKAWz"><meta property="og:type" content="website"><meta property="og:title" content="Listing Presentation for CLIENT_NAME"><meta property="og:description" content="I've helped countless families in a short period of time to achieve their ultimate American dream! Owning their own home and building wealth in real estate. I've worked with singles, newlyweds, families with children, senior citizens, you name it, I've worked with people like YOU and und"><meta property="og:image" content="https://cdn.kaydoh.com/cover-2734-1789022493867.jpeg?1790372204124"><meta property="og:image:type" content="image/jpeg"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta property="og:updated_time" content="1790372205145"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta content="I've helped countless families in a short period of time to achieve their ultimate American dream! Owning their own home and building wealth in real estate. I've worked with singles, newlyweds, families with children, senior citizens, you name it, I've worked with people like YOU and und" name="description"><meta name="robots" content="noindex"><title>Listing Presentation for CLIENT_NAME</title><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous"><link media="screen" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"><link rel="preconnect" href="https://gallery-widgets.s3.us-west-2.amazonaws.com"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/default-skin/default-skin.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"><link rel="preconnect" href="https://maps.gstatic.com"><link rel="shortcut icon" href="" type="image/x-icon"><link href="https://pages.kaydoh.com/css/handouts.css" rel="stylesheet" type="text/css"><link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet"><link rel="stylesheet" href="https://pages.kaydoh.com/css/index.css"><link rel="stylesheet" href="https://pages.kaydoh.com/theme/glacier/css/main.css"><link rel="stylesheet" href="https://pages.kaydoh.com/theme/glacier/css/gallery.css"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&amp;family=EB+Garamond:ital,wght@0,400..800;
11,400..800&amp;display=swap" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Material+Icons" rel="stylesheet"><link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet"><link rel="preconnect" href="https://rsms.me/"><link rel="stylesheet" href="https://rsms.me/inter/inter.css">
1<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
1<script>window.kaydohBootstrap = window.bootstrap;</script>
1<script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/5.2.0/lazysizes.min.js" async> </script>
1<script>window.google_recaptha_site_key='6LeT1_4UAAAAAH-X0O-lyaJtrEty0746aVv1Trl9';</script>
1<script>window.post_hog_api_key='phc_9o4TkvXCukoDxSXr4zJ8qzvJP0EOt5GAeukdoWaxxrg';</script>
1<script>window.kaydoh_gwid='2734'; window.kaydoh_uid='12931';</script>
1<script>window.kaydoh_visit_token='1791492488323.6e01275192eb3f7980ff4f20036c1c209070d6a9fbfb6b432df70e8b71b4f3d3'; window.kaydoh_services_url='https://services.kaydoh.com';</script>
1<script>window.kaydoh_share_code='';</script>
1<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js"></script>
vendor: 69 bytes, line 1
1<script async defer src="https://www.googletagmanager.com/gtag/js?id=
1G-JLXRKQ0PWN
vendor: 11 bytes, line 1
1"></script>
1<script>
vendor: 127 bytes, lines 1-4
1window.dataLayer = window.dataLayer || [];
2function gtag(){dataLayer.push(arguments);}
3gtag('js', new Date());
4gtag('config', '
4G-JLXRKQ0PWN
vendor: 4 bytes, line 4
4');
5</script>
5<style>* {
6    font-family: "Inter" , sans-serif;
7    font-feature-settings:
8        'liga' 1,
9        'calt' 1,
10        'cpsp' 1,
11        'cv11' 1;
12    -webkit-box-sizing: border-box;
13    -moz-box-sizing: border-box;
14    box-sizing: border-box;
15    scroll-behavior: smooth;
16}      
17
18.scheduleTourBtn, .featScheduleTourBtn {
19    color: #fff;
20    font-size: 2rem;
21    margin-bottom: 16px;
22    padding: 10px 20px;
23    border-radius: .25rem;
24    background-color: #D4AD3E;
25    border: 2px solid #D4AD3E;
26    -webkit-transition: 0.3s ease-in-out;
27    transition: 0.2s ease-in-out;
28}
29
30.scheduleTourBtn:hover, .featScheduleTourBtn:hover {
31    color: #D4AD3E;
32    background-color: transparent;
33    border: 2px solid #D4AD3E;
34}
35
36.bottom-arrow i {
37    display: block;
38    margin: auto;
39    font-size: 3.5rem;
40    margin: 0;
41    color: #D4AD3E !important;
42    text-align: center;
43}
44
45.spinner {
46    border-top: 16px solid #D4AD3E !important;
47}
48
49.kaydoh-btn-solid {
50    color: #fff;
51    background-color: #D4AD3E;
52    border: 2px solid #D4AD3E !important;
53}
54
55.kaydoh-btn-solid:hover {
56    color: #D4AD3E !important;
57    background-color: transparent;
58    border: 2px solid #D4AD3E !important;
59}
60
61.btn-primary {
62    background-color: #D4AD3E !important;
63    border-color: #D4AD3E !important;
64    color: #fff !important;
65}
66
67.btn-primary:hover {
68    background-color: transparent !important;
69    border-color: #D4AD3E !important;
70    color: #D4AD3E !important;
71}</style></head><body><div id="bodyStartTrackerScripts"></div><!-- Navbar -->
72<nav class="navbar navbar-expand-lg navbar-light">
73<div class="container-fluid"><a class="navbar-brand d-flex" href=""><img class="lazyload" data-src="" alt=""></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
74<span class="navbar-toggler-icon"></span>
75</button>
76<div class="collapse navbar-collapse" id="navbarNavDropdown">
77<ul class="navbar-nav ms-auto"><li class="nav-item"><a class="nav-link" id="callBtnLink"><i class="fa fa-phone"></i>&nbsp;Call</a></a></li></ul>
78</div>
79</div>
80</nav>
81<!-- Main content --><div class="banner" id="banner" style="background-image: url('https://images.unsplash.com/photo-1605276374104-dee2a0ed3cd6?crop=entropy&amp;cs=srgb&amp;fm=jpg&amp;ixid=M3wxNjAxNDR8MHwxfHNlYXJjaHwxMnx8aG9tZXN8ZW58MXx8fHwxNzY5ODAwNDYxfDA&amp;ixlib=rb-4.1.0&amp;q=85')"><div class="content-box"><div class="banner-heading text-center d-flex flex-column align-items-center"><h1 class="main-h" id="portMainHeading">CLIENT_NAME</h1><h2 class="sub-h" id="portSubHeading">Specially made for you</h2><div class="d-flex mt-4 btn-row"><a class="kaydoh-btn-solid me-4" href="tel:18885293645">Call</a><a class="kaydoh-btn" data-toggle="modal" data-source-detail="Schedule a Meeting" data-source="secondary_button" data-target="#contactsFormModel" data-action="unlock">Schedule a Meeting</a></div></div><div class="banner-video text-center py-4"><div class="m-auto ratio ratio-16x9 hero-v-frame"><iframe class="embed-responsive-item" src="https://video.kaydoh.com/play/5L3gj8JmVy8?thm=D4AD3E&amp;sid=page_2734" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe></div></div></div></div><div class="sub-body handout-section"><div class="handoutRow" id="handoutRow"></div><div class="modal" id="handoutPassword" tabindex="-1" aria-labelledby="handoutPassword" aria-modal="true"><div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content rounded" style="min-width: fit-content; border-radius: 6px !important;"><div class="modal-body p-4"><p class="text-center text-dark mb-2"><i class="fa fa-lock" aria-hidden="true" style="font-size:4.5rem"></i></p><p class="text-dark mb-4 text-center" style="font-size: 20px;">To unlock this tile, please provide the password given to you.</p><div><input id="index" hidden><input id="landingHandoutId" hidden><div class="input-box container"><div class="row"><input class="password-input-lock col-md-8" id="handoutPasswordInput" name="password" required type="password" placeholder="Your password here!"><button class="handout-password-submit-btn col" id="unlockHandout" type="submit" onclick="onUnlockHandout()">Unlock</button></div></div><div class="alert alert-danger w-100 mt-2 mb-0" id="passwordInCorrect" style="display: none" role="alert"><i class="mdi mdi-close-circle">&nbsp;</i><span>Incorrect password! Please try again with a correct password!</span></div></div></div></div></div></div></div>
81<script>const handoutsAnimate = {"class":"zoomIn","type":"REVEAL","enabled":true};
82const handoutsAnimation = handoutsAnimate && handoutsAnimate != "undefined" ? handoutsAnimate.class : "";
83
84const userThemeColor = "#D4AD3E";
85
86//- Render Handouts - HTML
87function renderHandouts(passwordEnabled) {
88    const gallerywidgetId = "2734";
89    const userId = "12931";
90    $.ajax({
91        url: isPreviewMode ? `/handouts/preview/${gallerywidgetId}` : `/handouts/${gallerywidgetId}`,
92        type: "GET",
93        success: function(response) {
94            const handouts = response.data;
95
96            //- Render handouts
97            $("#handoutRow").html("");
98            handouts.forEach((handout, index) => {
99                $("#handoutRow").append(buildHandoutBox(handout, passwordEnabled, index));
100            })
101
102            //- After populating HTML animate handouts
103            if (handoutsAnimate) {
104                initAnimationHandouts(`animate__${handoutsAnimation}`);
105            }
106            $(".handoutBox .body-container").on('click', function(e) {
107                if ($(this).siblings(".handoutCardFooter").find(".dwnd-btn")[0]) {
108                    $(this).siblings(".handoutCardFooter").find(".dwnd-btn")[0].click();
109                }
110            });
111        }
112    })
113}
114
115//- Build HTML for button
116function buildButtonHTML(type, handout) {
117    let isHandoutPDF, isHandoutEform, isHandoutImage, isHandoutGallery, isHandoutVideo, btnClassType;
118    const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/igm;
119    const MOBILE_REGEX = /^(\+1)?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/igm;
120
121    if (type == 'primary') {
122        isHandoutPDF = handout.url.match(/\.(pdf|PDF)$/) != null;
123        isHandoutEform = handout.url == 'kaydoh-eform';
124        isHandoutImage = handout.url.match(/\.(jpeg|jpg|gif|png)$/) != null;
125        isHandoutGallery = (handout.settings.gallery && handout.settings.gallery.length > 0 && handout.url == 'gallery') ? true : false;
126        isHandoutEmbedWebsite = /altos.re\/r\/*/i.test(handout.url);
127        isHandoutVideo = /youtube.com\/embed|player.vimeo|indd.adobe.com|issuu.com|aryeo.com|joomag.com|joom.ag|embed.animoto|fb.watch|canva.com\/design\/.*\/view\?embed|canva.com\/design\/.*\/watch\?embed|tiktok\.com|player.pitchhub|loom.com\/embed|wistia.net\/embed|matterport.com\/show|bbemaildelivery|docs.google.com\/presentation\/d\/e|drive.google.com\/file\/d|vid.us|online.visual-paradigm.com|client.listinglight.io\/videos|\.mp4|\.mov\b$|\.mpeg|\.avi|app.heygen.com/i.test(handout.url);
128        isHandoutKaydohVideo = /video.kaydoh.com|video-staging.kaydoh.com/i.test(handout.url);
129        isKaydohUrl = /^https?:\/\/(www\.)?kaydoh\.com(\/[^\s]*)?$/i.test(handout.url);
130        isEmail =  EMAIL_REGEX.test(handout.url);
131        isPhone =  MOBILE_REGEX.test(handout.url);
132
133        btnClassType = "dwnd-btn mt-2 mb-3";
134    } else {
135        isHandoutPDF = handout.secondaryUrl.match(/\.(pdf|PDF)$/) != null;
136        isHandoutEform = handout.secondaryUrl == 'kaydoh-eform';
137        isHandoutImage = handout.secondaryUrl.match(/\.(jpeg|jpg|gif|png)$/) != null;
138        isHandoutGallery = (handout.secondarySettings.gallery && handout.secondarySettings.gallery.length > 0 && handout.secondaryUrl == 'gallery') ? true : false;
139        isHandoutEmbedWebsite = /altos.re\/r\/*/i.test(handout.url);
140        isHandoutVideo = /altos.re\/r\/*|youtube.com\/embed|player.vimeo|indd.adobe.com|issuu.com|aryeo.com|joomag.com|joom.ag|embed.animoto|fb.watch|canva.com\/design\/.*\/view\?embed|canva.com\/design\/.*\/watch\?embed|tiktok\.com|player.pitchhub|loom.com\/embed|wistia.net\/embed|matterport.com\/show|bbemaildelivery|docs.google.com\/presentation\/d\/e|drive.google.com\/file\/d|vid.us|online.visual-paradigm.com|client.listinglight.io\/videos|\.mp4|\.mov\b$|\.mpeg|\.avi|app.heygen.com/i.test(handout.secondaryUrl);
141        isHandoutKaydohVideo = /video.kaydoh.com|video-staging.kaydoh.com/i.test(handout.secondaryUrl);
142        isKaydohUrl = /^https?:\/\/(www\.)?kaydoh\.com(\/[^\s]*)?$/i.test(handout.secondaryUrl);
143        isEmail =  EMAIL_REGEX.test(handout.secondaryUrl);
144        isPhone =  MOBILE_REGEX.test(handout.secondaryUrl);
145
146        btnClassType = "dwnd-btn-secondary mt-2 mb-3 ms-2";
147    }
148
149    // page_* content-analytics attributes (KAYD-5780) — mirror HVE's handout_opened properties
150    // (handoutId/Title/Type/ThumbnailUrl). Read by tail.pug's #videoModal handler for the modal
151    // types, and by page-analytics.js's delegated handler for every other tile. Applied to ALL
152    // branches (KAYD-5881/5883): external links, e-forms, downloads, schedule, email and ph
152one
153    // previously carried none, so those tiles never reported an open.
154    const hDest = ((type == 'primary') ? handout.url : handout.secondaryUrl) || '';
155    const hAttrs = `data-handout-id="${handout.id}" data-handout-title="${(handout.title || '').replace(/"/g, '&quot;')}" data-handout-thumbnail="${handout.coverImageUrl || ''}" data-handout-url="${String(hDest).replace(/"/g, '&quot;')}"`;
156    // Shape of the video this tile opens (KAYD-5674), decided server-side in
157    // services/landing-page-handouts.js. js/video-orientation.js reads it when the
158    // modal opens, so a reel tile gets a portrait frame instead of a pillarboxed one.
159    // Kaydoh-hosted videos report 'landscape' here and are corrected by the player.
160    const hOrientation = (type == 'primary')
161        ? handout.orientation
162        : handout.secondaryOrientation;
163    const oAttr = `data-orientation="${hOrientation || 'landscape'}"`;
164    if (isHandoutVideo) {
165        buttonHTML = `<button type="button" class="${btnClassType}" data-toggle="modal" data-src="${(type == 'primary') ? handout.url : handout.secondaryUrl}" data-target="#videoModal" ${hAttrs} ${oAttr} data-handout-type="video" onclick="toggleModalHeight('auto')">
166            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
167                </button>`
168    } else if (isHandoutKaydohVideo) {
169        const colorCode = userThemeColor.replace('#', '');
170        buttonHTML = `<button type="button" class="${btnClassType}" data-toggle="modal" data-src="${(type == 'primary') ? handout.url : handout.secondaryUrl}?thm=${colorCode}" data-target="#videoModal" ${hAttrs} ${oAttr} data-handout-type="kaydoh_video" onclick="toggleModalHeight('auto')">
171            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
172                </button>`
173    } else if (isHandoutEmbedWebsite) {
174        buttonHTML = `<button type="button" class="${btnClassType}" data-toggle="modal" data-src="${(type == 'primary') ? handout.url : handout.secondaryUrl}" data-target="#videoModal" ${hAttrs} data-handout-type="website" onclick="toggleModalHeight('90vh')">
175            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
176                </button>`
177    } else if (isHandoutImage) {
178        buttonHTML = `<button type="button" id="openPsGallery" class="${btnClassType}" ${hAttrs} data-handout-type="image" onclick='openGalleryViewer(${JSON.stringify([{ url: (type == 'primary') ? handout.url : handout.secondaryUrl }])})'>
179            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
180                </button>`;
181    } else if (isHandoutGallery) {
182        buttonHTML = `<button type="button" id="openPsGallery" class="${btnClassType}" ${hAttrs} data-handout-type="gallery" onclick='openGalleryViewer(${JSON.stringify((type == 'primary') ? handout.settings.gallery : handout.secondarySettings.gallery)})'>
183            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
184                </button>`
185    } else if (isHandoutPDF) {
186        buttonHTML = `<button type="button" class="${btnClassType}" ${hAttrs} data-handout-type="pdf" onclick='openPdfHandout("${(type == 'primary') ? handout.url : handout.secondaryUrl}", this)'>
187            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
188                </button>`
189    } else if (isHandoutEform) {
190        buttonHTML = `<button type="button" class="${btnClassType}" ${hAttrs} data-handout-type="eform" data-id=${handout.settings.order} data-hid=${handout.id} data-htitle="${handout.title}" data-hurl="${(type == 'primary') ? handout.url : handout.secondaryUrl}" data-source="handout" data-source-detail="${handout.title}" data-bs-toggle="modal" data-bs-target="#contactsFormModel">
191            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
192                </button>`
193    } else if (isEmail) {
194        buttonHTML = `<a href="mailto:${(type == 'primary') ? handout.url : handout.secondaryUrl}" class="${btnClassType}" ${hAttrs} data-handout-type="email">
195            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySett
195ings.buttonLabel}
196                    </a>`
197    } else if (isPhone) {
198        buttonHTML = `<a href="tel:${(type == 'primary') ? handout.url : handout.secondaryUrl}" class="${btnClassType}" ${hAttrs} data-handout-type="phone">
199            ${(type == 'primary') ? handout.settings.buttonLabel : handout.secondarySettings.buttonLabel}
200                    </a>`
201    } else {
202        const settings = (type == 'primary') ? handout.settings : handout.secondarySettings;
203        const openInNewTab = handout.openInNewTab ? handout.openInNewTab : { primary: true, secondary: true };
204        const openInNewTabPrimary = openInNewTab.primary ? 'target="_blank"' : '';
205        const openInNewTabSecondary = openInNewTab.secondary ? 'target="_blank"' : '';
206
207        if (settings.buttonLabel === "schedule" || settings.buttonLabel === "book now") {
208            buttonHTML = `<button type="button" class="${btnClassType}" ${hAttrs} data-handout-type="schedule" onclick="scheduleHandoutTour('${(type == 'primary') ? handout.url : handout.secondaryUrl}')">
209                ${settings.buttonLabel}
210            </button>`;
211        } else if (settings.buttonLabel === "download") {
212            buttonHTML = `<a download="" href="${(type == 'primary') ? handout.url : handout.secondaryUrl}" target="_blank" class="${btnClassType}" ${hAttrs} data-handout-type="download">
213                ${settings.buttonLabel}
214            </a>`
215        } else {
216            buttonHTML = `<a 
217                href="${(type == 'primary') ? handout.url : handout.secondaryUrl}" 
218                ${(type == 'primary') ? openInNewTabPrimary : openInNewTabSecondary}
219                class="${btnClassType}"
220                ${hAttrs} data-handout-type="link"
221            >
222                ${settings.buttonLabel}
223            </a>`
224        }
225    }
226    return buttonHTML;
227}
228
229function toggleModalHeight(height = "90vh") {
230    $("#videoFrameContainer").css("height", height);
231}
232
233//- Populate HTML for Handout
234function buildHandoutBox(handout, passwordEnabled, index) {
235    let handoutHTML = "";
236
237    if ((handout.viewType === "ANONYMOUS") || (handout.viewType === "REGISTERED" && document.cookie.includes(contactQuestionnaireCookie+"="))) {
238        let buttonHTMLPrimary = (!passwordEnabled) ? buildButtonHTML('primary', handout) : "";
239        let buttonHTMLSecondary = 
240            (!passwordEnabled && handout.secondaryUrl && handout.secondaryUrl != "" && handout.secondaryUrl != "undefined") 
241                ? buildButtonHTML('secondary', handout) 
242                : "";
243
244        handoutHTML = 
245            `<div class="handoutBox handout-${index} ${(handoutsAnimate && handoutsAnimate.enabled && handoutsAnimation != "" && handoutsAnimation != "none") ? 'animate__animated' : ''}" data-handout-id="${handout.id}" data-handout-url="${String(handout.url || '').replace(/"/g, '&quot;')}">
246                <div class="card">
247                    <div class="body-container">
248                        <img src="${handout.coverImageUrl}" class="card-img-top" alt="filePreview"/>
249                        <div class="card-body text-left">
250                            <h5 class="card-title handout-title mb-3" style="margin-top: 0">
251                                ${handout.title}
252                            </h5>
253                            <p class="card-text">
254                                ${handout.description}
255                            </p>
256                        </div>
257                    </div>
258
259                    <div class="handoutCardFooter text-center">
260                        ${buttonHTMLPrimary}
261                        ${handout.secondaryUrl && handout.secondaryUrl != "" && handout.secondaryUrl != "undefined" 
262                            ? buttonHTMLSecondary : 
263                            ''}
264                    </div>
265                </div>
266            </div>`;
267    } else {
268        handoutHTML = 
269            `<div class="handoutBox handout-${index} ${(handoutsAnimate && handoutsAnimate.enabled && handoutsAnimation != "" && handoutsAnimation != "none") ? 'animate__animated' : ''}" data-handout-id="${handout.id}" data-handout-url="${String(handout.url || '').replace(/"/g, '&quot;')}">
270                <div class="card">
271                    <div 
272                        data-index=${index} 
273                        data-id=${handout.settings.order} 
274                        data-lhid=${handout.lhId} 
275                        data-hid=${handout.id} 
276                        data-htitle="${handout.title}" 
277                        data-target=${handout.viewType == "REGIST
277ERED" ? "#contactsFormModel" : "#handoutPassword"} 
278                        data-source="handout" 
279                        data-source-detail="${handout.title}"
280                        class="lock-overlay" 
281                        data-toggle="modal"
282                        data-action="unlock"
283                        style="border-radius: 0.375rem !important;"
284                    >
285                        <div>
286                            <i class="fa fa-lock locked-icon" aria-hidden="true"></i>
287                            <i class="fa fa-unlock unlocked-icon" aria-hidden="true"></i>
288                            <p>click to unlock</p>
289                        </div>
290                    </div>
291
292                    <div class="body-container">
293                        <img src="${handout.coverImageUrl}" class="card-img-top" alt="filePreview"/>
294                        <div class="card-body text-left">
295                            <h5 class="card-title handout-title mb-3" style="margin-top: 0">
296                                ${handout.title}
297                            </h5>
298                            <p class="card-text">
299                                ${handout.description}
300                            </p>
301                        </div>
302                        <div class="handoutCardFooter-clone text-center mt-2 mb-3">
303                            <button type="button" class="dwnd-btn">
304                                ${handout.settings.buttonLabel}
305                            </button>
306                            ${(handout.secondaryUrl && handout.secondaryUrl != "" && handout.secondaryUrl != "undefined") 
307                                ? `<button type="button" class="dwnd-btn-secondary">
308                                    ${handout.secondarySettings.buttonLabel}
309                                </button>` 
310                                : ''}
311                        </div>
312                    </div>
313                    <div class="handoutCardFooter text-center"></div>
314                </div>
315            </div>`;
316    }
317    return handoutHTML;        
318}
319
320function onUnlockHandout() {
321    $("#loadingSpinner").show();
322
323    const index = $("#index").val();
324    const password = $("#handoutPasswordInput").val();
325    const landingHandoutId = $("#landingHandoutId").val();
326
327    passwordUnlockHandout(
328        landingHandoutId, 
329        password, 
330        (data) => {
331            const primaryButton = buildButtonHTML('primary', data);
332            const secondaryButton = (data.secondaryUrl && data.secondaryUrl != "" && data.secondaryUrl != "undefined") 
333                ? buildButtonHTML('secondary', data)
334                : "";
335
336            $(`.handout-${index} .lock-overlay`).hide();
337            $(`.handout-${index} .handoutCardFooter-clone`).hide();
338            $(`.handout-${index} .handoutCardFooter`).append(primaryButton);
339            $(`.handout-${index} .handoutCardFooter`).append(secondaryButton);
340
341            $("#loadingSpinner").hide();
342        }
343    )
344}
345
346// Check if element is scrolled into view
347function isScrolledIntoView(elem) {
348    const docViewTop = $(window).scrollTop();
349    const docViewBottom = docViewTop + $(window).height();
350
351    const elemTop = $(elem).offset().top;
352    const elemBottom = elemTop + $(elem).height();
353
354    return elemTop <= docViewBottom;
355}
356
357//- Animation
358function initAnimationHandouts(animationClass) {
359    $(window).on('scroll', function() {
360        if (isScrolledIntoView("#handoutRow")) {
361            $("#handoutRow .animate__animated").each(function (index) {
362                const elem = $(this);
363                setTimeout(function () {
364                    elem.addClass(animationClass);
365                    elem.css('opacity', '100%')
366                }, index * 300);
367            });
368        }
369    });
370    //- Animate on Load if contents ar eon viewport
371    if (isScrolledIntoView("#handoutRow")) {
372        $("#handoutRow .animate__animated").each(function (index) {
373            const elem = $(this);
374            setTimeout(function () {
375                elem.addClass(animationClass);
376                elem.css('opacity', '100%')
377            }, index * 300);
378        });
379    }
380}
381
382//- Handouts with Gallery View Toggle
383function openGalleryViewer(imageUrls) {
384    var pswpElement = document.querySelectorAll('.pswp')[0];
385    var items = [];
386
387    imageUrls.forEach((img) => {
388        items.push(
389            {
390                src: img.url,
391                w: 0,
392                h: 0
393            }
394        )
395    })
396
397    var options = {
398        history: false,
399        focus: false,
400        showAnimationDuration: 0,
401        hideAnimationDuration: 0  
402    };
403
404    var handoutGallery = new PhotoSwipe( pswpElement, PhotoSwipeUI_Default, items, options);
405
406    handoutGallery.listen("gettingData", function (index, item) {
407        if (item.w < 1 || item.h < 1) {
408            var hImage = new Image();
409            hImage.onload = function () {
410                item.w = this.width;
411                item.h = this.height;
412                handoutGallery.invalidateCurrItems();
413                handoutGallery.updateSize(true);
414
415            };
416            hImage.src = item.src; // let's download image
417        }
418    });
419
420    handoutGallery.init();
421
422}
423
424//- Toggle PDF view for Handouts With PDFs. Uses the self-rendered pdf.js viewer
425//- (KAYD-5760, fullscreen overlay) for page-depth tracking; new-tab if it isn't loaded.
426function openPdfHandout(pdfUrl, btn) {
427    if (window.KaydohPdfViewer) {
428        var meta = btn ? {
429            handoutId: btn.getAttribute("data-handout-id"),
430            handoutTitle: btn.getAttribute("data-handout-title"),
431            handoutThumbnailUrl: btn.getAttribute("data-handout-thumbnail"),
432            handoutType: "pdf"
433        } : {};
434        window.KaydohPdfViewer.open(pdfUrl, meta);
435    } else {
436        window.open(pdfUrl, "_blank");
437    }
438}
439
440</script>
440<style type="text/css">.handout-title {
441    color: #D4AD3E !important;
442}
443
444.handoutBox {
445    border-radius: 0.375rem !important;
446    border: 2px solid transparent;
447    transition: transform 0.3s ease-in-out, border-color 0.2s ease-in-out !important;
448}
449
450.handoutBox:hover {
451    border-color: #D4AD3E;
452    transform: scale(1.05);
453}
454
455.dwnd-btn, .dwnd-btn-secondary, .dwnd-btn-secondary-dis {
456    color: #D4AD3E;
457    border: 2px solid #D4AD3E;
458    background-color: transparent;
459    transition: all .05s ease-in-out;
460}
461
462.dwnd-btn:hover, .dwnd-btn-secondary:hover, .dwnd-btn-secondary-dis:hover {
463    color: #fff;
464    background-color: #D4AD3E;
465}</style><div class="body-content" id="bodyContent"><!-- Property Details -->
466<div class="sub-body propDetails-section">
467<div class="prop-details text-center scroll-animation-0"></div><div class="overview-txt-cont">
468<div class="paragraph-txt" id="propertyDescription"><div class="ql-editor"><p><strong>I've helped countless families in a short period of time to achieve their ultimate American dream! Owning their own home and building wealth in real estate. I've worked with singles, newlyweds, families with children, senior citizens, you name it, I've worked with people like YOU and understand your needs and wants when it comes to real estate. It doesn't matter what situation you are in, I've got the experience and solution for you.</strong></p><p><br></p><p><strong>How I can help you build your real estate wealth</strong></p><p><br></p><p><strong>✔️ Being your top negotiator in getting the best price for your home (buy or sell)</strong></p><p><strong>✔️ Leveraging my large network of vendors to keep your remodeling cost down.</strong></p><p><strong>✔️ Being your local neighborhood market expert</strong></p><p><strong>✔️ Being on top of latest real estate developments that can benefit you and your family</strong></p><p><strong>✔️ Being your friend, confidant, trustworthy real estate advisor</strong></p><p><br></p><p><strong>My Values</strong></p><p><strong>► Integrity - do the right things</strong></p><p><strong>► Communication - Meeting your needs above all else</strong></p><p><strong>► H2H model - Human’s connection is the ultimate model</strong></p><p><strong>► Passion - Essential virtue to be your best at anything</strong></p><p><strong>► A successful closing, is successful if you are happy during and after.</strong></p><p><br></p><p><strong>👉 I'm ready to help you today, send me a message for more info.</strong></p></div></div><button class="btn btn-link w-100 p-2 text-decoration-none" id="readMoreLess">Read More&nbsp;<span class="fa fa-angle-down" aria-hidden="true"></span></button></div>
469</div><div class="sub-body info-section"><h5 class="title-txt text-center fw-bold">LET'S CONNECT</h5><div class="row row-flex justify-content-center" id="teamMembersContainer"><div class="col-lg-6 scroll-animation-2 py-2 contact-form" id="contactForm"><div class="form-content animate__animated border rounded-lg p-4"><form onsubmit="onContact(2734); return false;"><div class="input-group mb-4"><input class="form-control" type="name" id="yourName" placeholder="Name*"></div><div class="input-group" style="position:absolute; left:-9999px;"><input type="text" name="yourJobTitle" id="yourJobTitle" value=""></div><div class="row"><div class="col-md-6"><div class="input-group mb-4"><input class="form-control" type="email" id="emailAddress" placeholder="Email*"></div></div><div class="col-md-6"><div class="input-group mb-4"><input class="form-control" type="tel" id="phoneNumber" placeholder="Phone Number"></div></div></div><div class="row"><div class="col-md-12"><div class="input-group mb-4"><textarea class="form-control" id="message" rows="3">I would like more information.</textarea></div></div></div><div class="form-check animate__animated mb-4"><input class="form-check-input" type="checkbox" value="" id="contactFormConsent"><label class="form-check-label font-weight-normal ms-2" for="flexCheckDefault" style="letter-spacing: 0.02em;"><p>Click here to consent to our <a href="https://www.kaydoh.com/terms-and-conditions/" target="_blank" style="background-color: rgb(255, 255, 255);">terms / conditions</a>, agree Kaydoh may receive/process your personal data and use that data to communicate by calling or texting you about Kaydoh products and services.
470<a href="#" onclick="showDnc();">Opt out here</a> This site is protected by reCAPTCHA and the Google&nbsp;<a href="https://policies.google.com/privacy" target="_blank">Privacy Policy</a>&nbsp;and&nbsp;<a href="https://policies.google.com/terms" target="_blank">Terms of Service</a> apply.</label></div><button class="kaydoh-btn-solid d-block mx-auto px-4 py-2" type="submit">Submit</button></form></div></div></div><hr class="separator-line"></div><div id="reviewsSectionAssignedUser" class="sub-body review-section">
471</div>
472<div id="reviewsSectionMembers" class="sub-body review-section">
473</div>
474<!-- Root element of PhotoSwipe. Gallery Image Viewer. -->
475<div id="pswpGallery" class="pswp"  tabindex="-1" role="dialog" aria-hidden="true" >
476<div class="pswp__bg"></div><div class="pswp__scroll-wrap">
477<div class="pswp__container">
478<div class="pswp__item"></div>
479<div class="pswp__item"></div>
480<div class="pswp__item"></div>
481</div>
482<div class="pswp__ui pswp__ui--hidden">
483<div class="pswp__top-bar">
484<div class="pswp__counter"></div>
485<button  class="pswp__button pswp__button--close" title="Close (Esc)"></button>
486<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
487<!--  CUSTOM BUTTON ADDED -->
488<div class="pswp__button clickableElement"><a id="callAgent" href="tel:4088393408"><i class="fa fa-phone"></i>&nbsp; Call</a></div>
489<div id="chatOpen" class="pswp__button clickableElement">
490<a href="" class="chatBtnLink"><i class="fa fa-comments"></i>&nbsp; Live Chat</a>
491</div>
492<!--  CUSTOM BUTTON END -->
493<div class="pswp__preloader">
494<div class="pswp__preloader__icn">
495<div class="pswp__preloader__cut">
496<div class="pswp__preloader__donut"></div>
497</div>
498</div>
499</div>
500</div>
501<div class="pswp__loading-indicator">
502<div class="pswp__loading-indicator__line"></div>
503</div>
504<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap" >
505<div class="pswp__share-tooltip">
506<a href="#" class="pswp__share--facebook"></a>
507<a href="#" class="pswp__share--twitter"></a>
508</div>
509</div>
510<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)" ></button>
511<button class="pswp__button pswp__button--arrow--right"  title="Next (arrow right)" ></button>
512<div class="pswp__caption">
513<div class="pswp__caption__center"></div>
514</div>
515</div>
516</div>
517</div><style>.footer .card {
518    padding: 2rem 4rem;
519}
520
521@media screen and (max-width: 476px) {
522    .footer .card {
523        padding: 1rem 1rem 4rem;
524    }
525}
526</style><footer class="footer bg-dark p-0"><div class="card bg-dark"><div class="p-0"><div class="text-secondary font-13"><span class="text-secondary">All information listed is deemed accurate and reliable, but not guaranteed and should be independently verified. Price and specifications are subject to change without notice. Our site provides this 
526service without representations or warranties of any kind either expressed or implied. By using this website, you consent to our&nbsp;</span><a class="text-secondary" href="https://www.kaydoh.com/terms-and-conditions/" target="_blank"> <u>Terms & Conditions</u></a><span class="text-secondary">&nbsp;, agree Kaydoh and subscribers to Kaydoh's service may receive/process your personal data and use that data to communicate by calling or texting you about Kaydoh and subscriber products and services.&nbsp;</span><br><a class="text-secondary" href="#" onclick="showDnc();"> <u class="text-secondary">Opt out here&nbsp;</u></a><a class="text-secondary" href="https://www.kaydoh.com/accessibility/" target="_blank"> <u class="text-secondary">| Accessbility Statement</u></a></div><div class="text-right font-13 text-secondary"><a class="text-secondary" href="https://kaydoh.com" target="_blank">Powered by Kaydoh, Inc ©<span>2026</span></a></div></div></div></footer></div><style>#contactQuestionnaireForm .input-group {
527    margin-bottom: 20px; 
528}
529
530#contactsFormModel form label.col-form-label, .contact-us-title-text {
531    font-size: 16px;
532    font-weight: 400;
533    letter-spacing: 1px;
534    color: #212529;
535}</style><div class="modal" id="contactsFormModel" tabindex="-1" aria-labelledby="contactsFormModel" aria-hidden="true"><div class="modal-dialog modal-dialog-centered"><div class="modal-content"><div class="modal-body p-4"><form id="contactQuestionnaireForm"><p class="contact-us-title-text"></p><input type="text" name="handoutId" hidden disabled><input type="text" name="source" hidden disabled><input type="text" name="source-detail" hidden disabled><div class="required mb-3"><label class="form-label" for="recipient-name"><span>Name</span><span style="color:red;">*</span></label><input class="form-control" name="name" required type="text" placeholder="Your name here!"></div><div class="required mb-3"><label class="form-label" for="message-text"><span>Email</span><span style="color:red;">*</span></label><input class="form-control" name="email" required type="email" placeholder="Enter your email here!"></div><div class="mb-3" style="position:absolute; left:-9999px;"><input type="text" name="yourJobTitle" id="yourJobTitle" value=""></div><div id="customQuestonnaires"></div><div class="form-check d-flex justify-content-between align-items-start"><input class="form-check-input contactFormConsent" required type="checkbox" value=""><label class="form-check-label ms-2 text-body-secondary" style="font-size: .80em;" for="flexCheckDefault"><p>Click here to consent to our <a href="https://www.kaydoh.com/terms-and-conditions/" target="_blank" style="background-color: rgb(255, 255, 255);">terms / conditions</a>, agree Kaydoh may receive/process your personal data and use that data to communicate by calling or texting you about Kaydoh products and services.
536<a href="#" onclick="showDnc();">Opt out here</a> This site is protected by reCAPTCHA and the Google&nbsp;<a href="https://policies.google.com/privacy" target="_blank">Privacy Policy</a>&nbsp;and&nbsp;<a href="https://policies.google.com/terms" target="_blank">Terms of Service</a> apply.</label></div><div class="mt-4 w-100"><button class="btn btn-primary m-0 rounded-0 w-100 mb-2" id="contactFormSubmitBtn" type="submit">Submit</button><button class="btn btn-outline-secondary m-0 rounded-0 w-100" id="contactsFormCancelBtn" type="button" data-bs-dismiss="modal" aria-label="Close">Cancel</button><p class="text-center mt-3 mb-0" id="cardSkipSaveRow" style="display: none;">Just want the contact? Click here to&nbsp;<button class="btn btn-link p-0 align-baseline" id="cardSkipSaveBtn" type="button">Skip &amp; Save</button> contact</p></div></form></div></div></div></div>
536<script>//- This modal is shared by every theme and is opened by handout unlocks, portfolio
537//- buttons, the exit popup and the Kaydoh Card CTAs. Nothing used to reset it
538//- between opens, so an unlock label leaked into the next flow. Reset first, then
539//- let the trigger opt in to what it needs.
540function resetContactFormState() {
541    //- The default submit label, captured before anything rewrites it.
542    const contactFormDefaultSubmitLabel = $("#contactFormSubmitBtn").html();
543    $("#contactFormSubmitBtn").html(contactFormDefaultSubmitLabel);
544    window.kaydohCardConnectFlow = false;
545    $("#cardSkipSaveRow").hide();
546}
547
548function initQuestionnaireForm(formModal) {
549    $("#contactsFormModel").on('show.bs.modal', function(e) {
550        fetchQuestionnaires();
551        resetContactFormState();
552
553        let element = $(e.relatedTarget);
554        const action = element.data('action');
555
556        if (action === "unlock") {
557            $("#contactFormSubmitBtn").html('Submit')
558        }
559
560        //- KAYD-5148: the card's Connect screen must not force the visitor to fill
561        //- anything in, so it offers a way straight through to the Save screen.
562        if (action === "ebizcard-connect") {
563            window.kaydohCardConnectFlow = true;
564            $("#cardSkipSaveRow").show();
565        }
566    });
567
568    $("#contactsFormCancelBtn").on("click", function () {
569        //- click outside of the modal
570        $("#contactsFormModel").click();
571        $("#contactsFormModel").trigger("click");
572    });
573    
574    $("#contactQuestionnaireForm").on("submit", onContactQuestionnaireForm);
575
576    $("#contactsFormModel").on("shown.bs.modal", function (e) {
577        const targetElem = $(e.relatedTarget);
578        let handoutId = targetElem.data('hid')
579        const source = targetElem.data('source');
580        const sourceDetail = targetElem.data('source-detail');
581        $("#contactQuestionnaireForm").find("input[name='handoutId']").val(handoutId)
582
583        if (source && source !== "") {
584            $("#contactQuestionnaireForm").find("input[name='source']").val(source)
585        }
586        if (sourceDetail && sourceDetail !== "") {
587            $("#contactQuestionnaireForm").find("input[name='source-detail']").val(sourceDetail)
588        }
589    })
590}
591
592//- Fetch Questionnaire - GET
593function fetchQuestionnaires() {
594    const gallerywidgetId = "2734";
595    const userId = "12931";
596    
597    $.ajax({
598        url: isPreviewMode ? `/questionnaire/preview/${gallerywidgetId}` : `/questionnaire/${gallerywidgetId}`,
599        type: "GET",
600        success: function (response){
601            const questionnaireData = response.questionnaire;
602            const questionnaireTitle = response.eFormTitle
603            const questions = questionnaireData ? questionnaireData.questions : [];
604            
605            $("#customQuestonnaires").html("");
606            $("#contactQuestionnaireForm").find(".contact-us-title-text").text(questionnaireTitle);
607
608            questions.forEach(elem => {
609                const html = populateQuestionnaireHTML(elem);
610                $("#customQuestonnaires").append(html);
611            });
612            initMobileFields();
613        },
614        error: function (error){
615            console.log(error);
616        }
617    })
618}
619
620function initMobileFields() {
621    let mobileNum = getURLParam("m");
622    const inputs = document.querySelectorAll(".mobile-input-dropdown");
623    inputs.forEach(input => {
624        const iti = window.intlTelInput(input, {
625            onlyCountries: ['us', 'ca'],
626            separateDialCode: true
627        });
628        if (mobileNum && mobileNum !== "") {
629            mobileNum = mobileNum.trim();
630            iti.setNumber(mobileNum);
631        }
632    })
633}
634
635//- Generate Questionnaire - HTML
636function populateQuestionnaireHTML(question) {
637    const questionType = question.type;
638    let qHTML = "";
639
640    //- Option Generator
641    const optionsGenerator = (ques) => {
642        let optionsHTML = ``;
643        ques.options.forEach(opt => {
644            optionsHTML += (ques.type == 'radio') ? 
645                                `<div class="form-check">
646                                    <input 
647                                        ${ques.isRequired ? "required" : ""} 
648                                        type="radio" 
649                                        name="question-${ques.id}" 
650                                        value="${opt.title}"/>
651                                    <label class="form-check-label">${opt.title}</label>
652                                </div>\n`
653                            :   (ques.type == 'checkbox') ? 
654                                `<div class="form-check checkbox-option" ${ques.isRequired ? "required" : ""}>
655                                    <input
656                                        type="checkbox" 
657                                        name="question-${ques.id}" 
658                                        value="${opt.title}"/>
659                                    <label class="form-check-label">${opt.title}</label>
660                                </div>\n`
661                            : `<option value="${opt.title}">
662                                    ${opt.title}
663                                </option>\n`;
664        }); 
665        return optionsHTML;
666    }
667
668    if (questionType == 'mobile') {
669        qHTML = `<div class="mb-3">
670                    <label for="recipient-name" class=${question.isRequired ? "col-form-label  required" : "col-form-label"}>
671                        ${question.title}
672                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
673                    </label>
674                    <input 
675                        ${question.isRequired ? "required" : ""} 
676                        type="tel"
677                        class="form-control mobile-input-dropdown" 
678                        placeholder="Your answer here!" 
679                        name="question-${question.id}"/>
680                </div>\n`;
681    }
682    if (questionType == 'oneline') {
683        qHTML = `<div class="mb-3">
684                    <label for="recipient-name" class=${question.isRequired ? "col-form-label required" : "col-form-label"}>
685                        ${question.title}
686                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
687                    </label>
688                    <input 
689                        ${question.isRequired ? "required" : ""} 
690                        type="text"
691                        class="form-control" 
692                        placeholder="Your answer here!" 
693                        name="question-${question.id}"/>
694                </div>\n`;
695    }
696    if (questionType == 'multiline') {
697        qHTML = `<div class="mb-3">
698                    <label for="recipient-name" class=${question.isRequired ? 'col-form-label required' : 'col-form-label'}>
699                        ${question.title}
700                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
701                    </label>
702                    <textarea 
703                        ${question.isRequired ? "required" : ""}
704                        class="form-control"
705                        name="question-${question.id}"  
706                        placeholder="Your answer here!">
707                    </textarea>
708                </div>\n`;
709    }
710    if (questionType == 'radio') {
711        qHTML = `<div class="mb-3">
712                    <label for="recipient-name" class=${question.isRequired ? "col-form-label required" : "col-form-label"}>
713                        ${question.title}
714                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
715                    </label>
716                    ${optionsGenerator(question)}
717                </div>\n`;
718    }
719    if (questionType == 'checkbox') {
720        qHTML = `<div class="mb-3" ${question.isRequired ? 'required' : ''}>
721                    <label for="recipient-name" class=${question.isRequired ? "col-form-label required" : "col-form-label"}>
722                        ${question.title}
723                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
724                    </label>
725                    ${optionsGenerator(question)}
726                </div>\n`;
727    }
728    if (questionType == 'dropdown') {
729        qHTML = `<div class="mb-3">
730                    <label for="recipient-name" class=${question.isRequired ? "col-form-label required" : "col-form-label"}>
731                        ${question.title}
732                        ${question.isRequired ? "<span class='text-danger'>*</span>" : ""}
733                    </label>
734                    <select
735                        ${question.isRequired ? "required" : ""} 
736                        class="form-control" 
737                        name="question-${question.id}">
738                        ${optionsGenerator(question)}
739                    </select>
740                </div>\n`;
741    }
742    
743    return qHTML;
744}
745
746function onContactQuestionnaireForm(event){
747    $("#loadingSpinner").show();
748    if(this.checkValidity()){
749        var form = $(this);
750        const handoutId = form.find("input[name='handoutId']") ? form.find("input[name='handoutId']").val() : ""
751        
752        const payload = {
753            name: form.find("input[name='name']").val(),
754            yourJobTitle: form.find("input[name='yourJobTitle']").val(),
755            email: form.find("input[name='email']").val(),
756            mobile: form.find("input.mobile-input-dropdown").val(),
757            contactFormConsent: form.find(".contactFormConsent").prop("checked")
758        }
759
760        let formHasError = false;
761        const questionnaire = {};
762        form.find("input,select,textarea")
763            .each(function(index, element) {
764                var qEle = $(element);
765                if(qEle.attr("name") && qEle.attr("name").startsWith("question-")){
766                    if(qEle.attr("type") === "text"){
767                        questionnaire[qEle.attr("name")] = qEle.val();
768                    } else if (qEle.attr("type") === "tel"){
769                        questionnaire[qEle.attr("name")] = qEle.val();
770                    } else if(qEle.attr("type") === "radio" && qEle.prop("checked") === true) {
771                        questionnaire[qEle.attr("name")] = qEle.val();
772                    } else if(qEle.attr("type") === "checkbox") {
773                        const checkedArray = $.map($(`input[type="checkbox"][name="${qEle.attr("name")}"]:checked`), function(c) { return c.value; });
774                        if (checkedArray.length <= 0) {
775                            formHasError = true;
776                            return;
777                        } else {
778                            questionnaire[qEle.attr("name")] = checkedArray.join(" | ");
779                        }
780                    } else if(element.nodeName === "SELECT") {
781                        questionnaire[qEle.attr("name")] = qEle.val();
782                    } else if(element.nodeName === "TEXTAREA") {
783                        questionnaire[qEle.attr("name")] = element.value;
784                    }
785                }
786            });
787            
788        let cookieExpiration;
789        if (false) { // Set for 1 hour
790            cookieExpiration = (new Date(new Date().getTime()+(60*60*1000))).toUTCString();
791        } else { // Set for 24 hours
792            cookieExpiration = (new Date(new Date().getTime()+(24*60*60*1000))).toUTCString();
793        }
794
795        if (!formHasError) {
796            onContactForm(payload, 2734, event, false, questionnaire, function(contact) {
797                document.cookie = contactQuestionnaireCookie + "="+contact.id+";expires="+(cookieExpiration);
798                onContactQuestionnaireSuccess(contact.id);
799                //- KAYD-5926: close through the instance itself; the Cancel button's
800                //- data-bs-dismiss can't reach a modal built by a different Bootstrap.
801                if (window.contactsFormModal) {
802                    window.contactsFormModal.hide();
803                } else {
804                    $("#contactsFormCancelBtn").trigger("click");
805                }
806            }, handoutId, cookieExpiration);
807        } else {
808            $("#loadingSpinner").hide();
809            alert("Please answer all required questions.");
810        }
811    }
812    return false;
813}
814
815function onContactQuestionnaireSuccess(contactId){
816    releaseLocks();
817    if (true) renderHandouts(false);
818
819    //- KAYD-5148: on a Kaydoh Card, Connect hands the visitor on to the Save
820    //- screen so they leave with the contact. Only the card defines this.
821    if (window.kaydohCardConnectFlow && typeof window.kaydohCardAfterConnect === 'function') {
822        window.kaydohCardAfterConnect();
823    }
824
825    if (getURLParam("freg") === 'true') {
826        window.location.reload();
827    }
828}</script>
828<div id="bodyEndTrackerScripts"></div><div class="unlock-page-overlay align-items-center justify-content-center" id="unlockPageOverlay" style="display: none;"><div class="overlay-container"><p class="text-center text-white mb-2"><i class="fa fa-lock" aria-hidden="true" style="font-size:6rem"></i></p><h5 class="text-white text-center mb-4">To unlock this website, please provide the password given to you.</h5><div class="input-box w-100"><input class="password-input" id="passwordInput" type="password" placeholder="Type your password here!"><button class="password-submit-btn ms-2" id="unlockLandingPage" type="button">Unlock</button></div><div class="alert alert-danger w-100 mt-2 mb-0" id="passwordIncorrectError" style="display: none" role="alert"><i class="mdi mdi-close-circle">&nbsp;</i><span>Incorrect password! Please try again with a correct password! </span></div></div></div><div class="loading-spinner" id="loadingSpinner"><div class="spin"><div class="spinner" role="status"></div></div></div><div class="modal" id="videoModal" tabindex="-9999" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"><div class="modal-dialog video-modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="video-modal-body"><div id="tiktokContainer"></div><div class="ratio ratio-16x9" id="videoFrameContainer"><iframe class="embed-responsive-item" src="" id="videoFrame" allowfullscreen="true" allowscriptaccess="always" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" frameborder="0"></iframe></div></div></div></div></div><div class="modal" id="dnc-form" tabindex="-9999" role="dialog" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"><div class="modal-header">
829<h5 class="modal-title">Do Not Contact - Opt Out Form</h5>
830</div><div class="modal-body p-4"><div class="m-3">Fill out your information below to opt out of Kaydoh services and to not be contacted by Kaydoh.</div><form class="mt-4" id="dncForm"><div class="row m-2"><div class="col-md-10"><input class="form-control firstName" type="name" placeholder="First Name"></div></div><div class="row m-2"><div class="col-md-10"><input class="form-control lastName" type="name" placeholder="Last Name"></div></div><div class="row m-2"><div class="col-md-10"><input class="form-control email" type="email" placeholder="Email"></div></div><div class="row m-2"><div class="col-md-10"><input class="form-control mobile" type="tel" placeholder="Phone Number" maxlength="14"></div></div><button class="btn btn-primary d-block mx-auto px-4 py-2 mt-4" type="button" onclick="createDnc(); return false;">Submit</button></form></div></div></div></div><div class="modal fade" id="progress-modal" tabindex="-9999" role="dialog" aria-hidden="true"><div class="modal-dialog modal-sm"><div class="modal-content"><div class="modal-body p-4"><div class="text-center"><div style="display: block;"><div class="spinner" role="status"></div></div></div></div></div></div></div><div class="fixed-top px-4" id="popupAlert" style="z-index: 2000; top: 18px; bottom: auto; left: 0; transform: translate(calc(50vw - 50%)); display: none;"><div class="alert m-auto alert-danger" style="max-width: 600px; padding: 18px" role="alert"><div class="d-flex align-items-center justify-content-between"><div class="d-flex align-items-center"><i class="mdi mdi-information font-16 me-1" id="alertIcon"></i><h4 class="m-0 font-16" id="popupMainTitle">Error</h4></div><button class="close alert-close" type="button"><span aria-hidden="true">&times;</span></button></div><div class="py-2"><h4 class="mb-1 font-20" id="popupAlertTitle">Popup Title</h4><p class="font-16" id="popupAlertMsg">Popup Message</p><div class="progress mt-2" style="height: 5px; margin: -28px -18px; background-color: transparent;"><span class="bg-danger progress-bar" style="width: 0%; transition: width 8s ease-in-out;"></span></div></div></div></div>
830<script src="https://pages.kaydoh.com/js/common.js"></script>
830<script async defer src="https://pages.kaydoh.com/js/common-defer.js"></script>
830<script src="https://pages.kaydoh.com/js/page-analytics.js"></script>
830<script src="https://pages.kaydoh.com/js/video-orientation.js"></script>
830<script async defer src="https://pages.kaydoh.com/theme/glacier/js/main.js"></script>
830<script>var agentName = 'Hoang  Dam', companyName = 'Hoang  Dam';</script>
830<style type="text/css">.logo-container {
831    width: 70px;
832    object-fit: contain;
833}
834.logo-container img.review-logo {
835    width: 100%;
836    height: 100%;
837    object-fit: contain;
838}
839
840.profile-card .profile-img {
841    width: 100%;
842    height: auto;
843    object-fit: cover;
844    aspect-ratio: 1/1;
845}
846
847.profile-card img.card-company {
848    height: auto;
849    width: 65%;
850    object-fit: contain;
851}
852
853.profile-card p.line-clamp-2 {
854    overflow: hidden;  
855}
856
857.profile-card p.line-clamp-2 {
858    display: -webkit-box;
859    -webkit-line-clamp: 4;
860    -webkit-box-orient: vertical;  
861}
862
863.profile-card .social-icons {
864    display: flex;
865    align-items: center;
866    justify-content: center;
867}
868
869.profile-card .social-icons a {
870    margin: 0 6px;
871    color: #6c757d;
872    font-size: 20px;
873}
874
875.profile-card .social-icons .link-container {
876    border-radius: 100%;
877    width: 40px;
878    height: 40px;
879    border: 1.5px solid #6c757d;
880    display: flex;
881    align-items: center;
882    justify-content: center;
883}
884
885.profile-card .social-icons .link-container:hover > a{
886    color: #fff;
887}
888
889.profile-card .social-icons .link-container:hover {
890    background-color: #1f2121;
891}
892
893.profile-card .logo-social-container{
894    display: flex !important;
895}
896
897.profile-card .logo-social-container-sm {
898    display: none !important;
899}
900
901@media screen and (max-width: 767px) {
902    .profile-card .card-company-container {
903        text-align: center !important;
904    }
905    .profile-card .logo-social-container {
906        display: none !important;
907    }
908
909    .profile-card .logo-social-container-sm {
910        display: flex !important;
911        gap: 1rem;
912    }
913
914}
915@media screen and (max-width: 476px) {
916    .profile-card .card-company-container {
917        text-align: center !important;
918    }
919
920    .profile-card .profile-general-info .texts {
921        margin: 16px 0 0;
922    }
923
924    div.overlay-container .input-box {
925        display: block;
926    }
927
928    div.overlay-container input {
929        width: 100%;
930    }
931
932    div.overlay-container button {
933        margin: 16px 0 0 !important;
934        width: 100%;
935    }
936
937    .testimonials-title:after {
938        right: 0%;
939        font-size: 1rem;
940        line-height: 1.4rem;
941        padding: 0;
942    }
943}
944</style>
944<script>const defaultProfileEnabled = true;
945const testimonialsEnabled = true;
946
947// Constants
948const API_ENDPOINTS = {
949    USER: '/team/:userId/user',
950    MEMBERS: '/team/:userId/:gallerywidgetId/members'
951};
952
953const handleApiError = (error, context) => {
954    console.error(`Error in ${context}:`, error);
955    // You could add user-facing error handling here
956};
957
958// Initialize team members
959function initTeamMembers() {
960    try {
961        $("#reviewLink").hide();
962        if (defaultProfileEnabled) {
963            fetchAssignedUser();
964        }
965        fetchProfileCards();
966    } catch (error) {
967        handleApiError(error, 'initTeamMembers');
968    }
969}
970
971// Fetch assigned user
972async function fetchAssignedUser() {
973    const userId = "12931";
974    if (!userId) return;
975
976    try {
977        const response = await $.ajax({
978            url: API_ENDPOINTS.USER.replace(':userId', userId) + `?preview=${isPreviewMode}`,
979            type: "GET"
980        });
981
982        const user = response.data;
983        const userHTML = populateProfileCard(user);
984        $("#teamMembersContainer").prepend(userHTML);
985
986        // Handle testimonials
987        if (user?.testimonialJson && testimonialsEnabled) {
988            appendTestimonials(user, "#reviewsSectionAssignedUser");
989            $("#reviewLink").show();
990        }
991
992        // Handle business number
993        handleBusinessNumber(user.businessNumber);
994    } catch (error) {
995        handleApiError(error, 'fetchAssignedUser');
996    }
997}
998
999// Fetch profile cards
1000async function fetchProfileCards() {
1001    const gallerywidgetId = "2734";
1002    const userId = "12931";
1003    if (!gallerywidgetId) return;
1004
1005    try {
1006        const response = await $.ajax({
1007            url: API_ENDPOINTS.MEMBERS
1008                .replace(':userId', userId)
1009                .replace(':gallerywidgetId', gallerywidgetId) + `?preview=${isPreviewMode}`,
1010            type: "GET"
1011        });
1012
1013        const members = response.data;
1014
1015        if (members?.length > 0) {
1016            members.forEach(member => {
1017                console.log("member", member); 
1018                const html = populateProfileCard(member);
1019                $("#teamMembersContainer > .contact-form").before(html);
1020                //- Check if testimonials are enabled for the member
1021                const memberTestimonialsEnabled = member?.testimonialsEnabled;
1022                if (member?.testimonialJson && memberTestimonialsEnabled) {
1023                    appendTestimonials(member, "#reviewsSectionMembers");
1024                    $("#reviewLink").show();
1025                }
1026            });
1027
1028            if (!defaultProfileEnabled) {
1029                handleBusinessNumber(members[0].businessNumber);
1030            }
1031        } else {
1032            handleBusinessNumber("+14088393408");
1033        }
1034    } catch (error) {
1035        handleApiError(error, 'fetchProfileCards');
1036    }
1037}
1038
1039// Handle business number
1040function handleBusinessNumber(businessNumber) {
1041    if (businessNumber && businessNumber !== "" && businessNumber !== "+1") {
1042        $("#callBtnLink")
1043            .attr('href', `tel:${businessNumber.replace('+1', '')}`)
1044            .show();
1045    } else {
1046        $("#callBtnLink").hide();
1047    }
1048}
1049
1050// Append testimonials
1051function appendTestimonials(user, containerId) {
1052    const { testimonialJson } = user;
1053    if (!testimonialJson) return;
1054
1055    const hasReviews = testimonialJson.googleReviewsData || 
1056        testimonialJson.zillowReviewsData || 
1057        (testimonialJson.custom && testimonialJson.custom.length > 0);
1058
1059    if (hasReviews) {
1060        $(containerId).append(
1061            `<p class="d-flex align-items-center justify-content-start">
1062                <span class='material-symbols-outlined' style='font-size: 1.5rem;'>view_cozy</span>
1063                <span class="fs-4 fw-semibold text-body-secondary ms-2">${user.firstName} ${user.lastName}'s Testimonials</span>
1064            </p>`
1065        );
1066    }
1067
1068    if (testimonialJson.googleReviewsData) {
1069        $(containerId).append(
1070            populateTestimonials(testimonialJson.googleReviewsData, "Google")
1071        );
1072    }
1073
1074    if (testimonialJson.zillowReviewsData) {
1075        $(containerId).append(
1076            populateTestimonials(testimonialJson.zillowReviewsData, "Zillow")
1077        );
1078    }
1079
1080    if (testimonialJson.custom) {
1081        $(containerId).append(
1082            populateTestimonials(testimonialJson.custom, "Custom")
1083        );
1084    }
1085}
1086
1087// Populate and Generate Profile Card - HTML
1088function populateProfileCard(profile) {
1089    const generateRating = (provider, name) => {
1090        return `<div class="agent-rating d-flex align-items-center justify-content-start py-1">
1091            <div class="logo-container me-4">
1092                <img class="review-logo" src="https://assets.kaydoh.com/images/${name.toLowerCase()}_logo.png" alt="${name}" />
1093            </div>
1094            <div class="d-flex align-items-center gap-2">
1095                <div class="rating-cont-google">
1096                    <div class="star-rating d-flex align-items-center">
1097                        <div class="back-stars">
1098                            <i class="fa fa-star" aria-hidden="true"></i>
1099                            <i class="fa fa-star" aria-hidden="true"></i>
1100                            <i class="fa fa-star" aria-hidden="true"></i>
1101                            <i class="fa fa-star" aria-hidden="true"></i>
1102                            <i class="fa fa-star" aria-hidden="true"></i>
1103                            <div class="front-stars" style="width: ${parseFloat((provider.rating * 100) / 5)}%">
1104                                <i class="fa fa-star" aria-hidden="true"></i>
1105                                <i class="fa fa-star" aria-hidden="true"></i>
1106                                <i class="fa fa-star" aria-hidden="true"></i>
1107                                <i class="fa fa-star" aria-hidden="true"></i>
1108                                <i class="fa fa-star" aria-hidden="true"></i>
1109                            </div>
1110                        </div>
1111                    </div>
1112                </div>
1113                <div>
1114                    <a class="break-txt fs-6 text-decoration-none" href="${provider.profileUrl}" target="_blank">
1115                        (${provider.reviewCount}) Reviews
1116                    </a>
1117                </div>
1118            </div>
1119                </div>`;
1120    }
1121
1122    const generateSocialMedia = (url, name) => {
1123        const socialMediaIcons = {
1124            facebook: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-facebook-icon lucide-facebook"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/></svg>`,
1125            instagram: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-instagram-icon lucide-instagram"><rect width="20" height="20" x="2" y="2" rx="5" ry="5"/><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/><line x1="17.5" x2="17.51" y1="6.5" y2="6.5"/></svg>`,
1126            twitter: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-twitter-icon lucide-twitter"><path d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z"/></svg>`,
1127            linkedin: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-linkedin-icon lucide-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/><rect width="4" height="12" x="2" y="9"/><circle cx="4" cy="4" r="2"/></svg>`,
1128            youtube: `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-youtube-icon lucide-youtube"><path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.5
11285 0 0 1-16.2 0A2 2 0 0 1 2.5 17"/><path d="m10 15 5-3-5-3z"/></svg>`,
1129        };
1130        return (url) ? `<div class="link-container facebook mx-1">
1131            <a class="text-facebook" href="${url}" target="_blank">
1132                ${name == "tiktok" 
1133                    ? `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-tiktok" viewBox="0 0 16 16">
1134                        <path d="M9 0h1.98c.144.715.54 1.617 1.235 2.512C12.895 3.389 13.797 4 15 4v2c-1.753 0-3.07-.814-4-1.829V11a5 5 0 1 1-5-5v2a3 3 0 1 0 3 3z"/>
1135                            </svg>` 
1136                    : `${socialMediaIcons[name]}`}
1137            </a>
1138                </div>` : "";
1139    }
1140
1141    return `<div class="col-lg-6 profile-card-column py-2">
1142        <div class="card border profile-card h-100 rounded-lg">
1143            <div class="card-body d-flex flex-column h-100 justify-content-between">
1144                <div class="row profile-general-info">
1145                    <div class="col-md-5 image">
1146                        <img class="profile-img mb-4" alt="profileImage" src="${(profile.profileImageUrl && profile.profileImageUrl !== "") ? profile.profileImageUrl : '/images/default_profile.png'}"/>
1147
1148                        <div class="row justify-content-end align-items-center logo-social-container" style="gap: 2rem;">
1149                            <div class="col-md-12">
1150                                ${(profile.socialMediaJson ? 
1151                                    `<div class="m-0 text-center social-icons">
1152                                        ${generateSocialMedia(profile.socialMediaJson.facebook, "facebook")}
1153                                        ${generateSocialMedia(profile.socialMediaJson.linkedin, "linkedin")}
1154                                        ${generateSocialMedia(profile.socialMediaJson.twitter, "twitter")}
1155                                        ${generateSocialMedia(profile.socialMediaJson.instagram, "instagram")}
1156                                        ${generateSocialMedia(profile.socialMediaJson.youtube, "youtube")}
1157                                        ${generateSocialMedia(profile.socialMediaJson.tiktok, "tiktok")}
1158                                    </div>` : "")}
1159                            </div>
1160
1161                            ${(profile.profileCompanyLogoUrl && profile.profileCompanyLogoUrl !== "" ? 
1162                                `<div class="col-md-12 text-center card-company-container">
1163                                    <img class="card-company" src="${profile.profileCompanyLogoUrl}"/>
1164                                </div>` : "")}
1165                        </div>
1166                    </div>
1167                    <div class="col-md-7 texts d-flex flex-column justify-content-between">
1168                        <div>
1169                            <h3 class="mb-2 mt-0 full-name">
1170                                ${profile.firstName + ' ' + profile.lastName}
1171                            </h3>
1172                            ${(profile.profileCompanyName && profile.profileCompanyName !== "") ?
1173                                `<p class="mb-2 company-name">
1174                                    ${profile.profileCompanyName}
1175                                </p>` : ""}
1176                            ${(profile.webSignature && profile.webSignature !== "") ? 
1177                                `<p class="mb-2 signature-text signatureText line-clamp-2 text-body-secondary">
1178                                    ${profile.webSignature ? profile.webSignature.replace(new RegExp("\n", 'g'), "<BR>") : ""}
1179                                </p>` : ""}
1180
1181                            ${(() => {
1182                                const hasGoogle = profile.testimonialJson && profile.testimonialJson.googleReviewsData;
1183                                const hasZillow = profile.testimonialJson && profile.testimonialJson.zillowReviewsData;
1184                                if (!hasGoogle && !hasZillow) return "";
1185
1186                                let ratingsHtml = "";
1187                                if (hasGoogle) {
1188                                    ratingsHtml += generateRating(profile.testimonialJson.googleReviewsData, "Google");
1189                                }
1190                                if (hasZillow) {
1191                                    ratingsHtml += generateRating(profile.testimonialJson.zillowReviewsData, "Zillow");
1192                                }
1193
1194                                return `
1195                                    <hr/>
1196                                    <div class="mt-2 star-ratings">
1197                                        ${ratingsHtml}
1198                                    </div>
1199                                    <hr/>
1200                                `;
1201                            })()}
1202
1203                            ${(profile.businessNumber && profile.businessNumber !== "" && profile.businessNumber != "+1") ?
1204                                `<p class="mb-2 mobile-number d-flex align-items-center justify-content-start">
1205                                    <span class="material-symbols-outlined font-18">call</span>&nbsp;
1206                                    ${formatPhoneNumber(profile.businessNumber.replace('+1', ''))}
1207                                </p>` : ""}
1208
1209                            ${(profile.email && profile.email !== "") ?
1210                                `<p class="mb-2 email d-flex align-items-center justify-content-start">
1211                                    <span class="material-symbols-outlined font-18">alternate_email</span>&nbsp; 
1212                                    <a class="ms-1 break-txt" href="mailto:${profile.email}">
1213                                        ${profile.email}
1214                                    </a>
1215                                </p>` : ""}
1216
1217                            ${(profile.personalWebsite && profile.personalWebsite !== "") ?
1218                                `<p class="mb-2 webisite d-flex align-items-center justify-content-start">
1219                                    <span class="material-symbols-outlined font-18">language</span>&nbsp;
1220                                    <a class="ms-1 break-txt" target="_blank" href="${profile.personalWebsite}">
1221                                        ${profile.personalWebsite}
1222                                    </a>
1223                                </p>` : ""}
1224
1225                        </div>
1226
1227                        ${(profile.businessNumber && profile.businessNumber !== "" && profile.businessNumber != "+1") ? 
1228                            `<div class="row justify-content-center">
1229                                <div class="col-md-12">
1230                                    <a class="kaydoh-btn-solid btn-block d-flex align-items-center justify-content-center" id="callBtn" href="tel:${formatPhoneNumber(profile.businessNumber.replace('+1', ''))}">
1231                                        <span class="material-symbols-outlined font-18 me-1">call</span>
1232                                        <span>Call</span>
1233                                    </a>
1234                                </div>
1235                            </div>` : ""}
1236
1237                        <div class="row justify-content-end align-items-center logo-social-container-sm mt-4" style="gap: 2rem;">
1238                            <div class="col-md-12">
1239                                ${(profile.socialMediaJson ? 
1240                                    `<div class="m-0 text-center social-icons">
1241                                        ${generateSocialMedia(profile.socialMediaJson.facebook, "facebook")}
1242                                        ${generateSocialMedia(profile.socialMediaJson.linkedin, "linkedin")}
1243                                        ${generateSocialMedia(profile.socialMediaJson.twitter, "twitter")}
1244                                        ${generateSocialMedia(profile.socialMediaJson.instagram, "instagram")}
1245                                        ${generateSocialMedia(profile.socialMediaJson.youtube, "youtube")}
1246                                        ${generateSocialMedia(profile.socialMediaJson.tiktok, "tiktok")}
1247                                    </div>` : "")}
1248                            </div>
1249
1250                            ${(profile.profileCompanyLogoUrl && profile.profileCompanyLogoUrl !== "" ? 
1251                                `<div class="col-md-8 text-center card-company-container">
1252                                    <img class="card-company" src="${profile.profileCompanyLogoUrl}"/>
1253                                </div>` : "")}
1254                        </div>
1255                    </div>
1256                </div>  
1257            </div>
1258        </div>
1259            </div>`;
1260}
1261
1262//- Generate Testimonial - HTML
1263function populateTestimonials(data, type) {
1264    //- Generate review html
1265    const testimonialHTML = (reviews) => {
1266        let reviewHTML = "";
1267        reviews.forEach((review, index) => {
1268            let rew;
1269            switch (type) {
1270                case 'Google':
1271                    rew = review;
1272                    break;
1273                case 'Zillow':
1274                    rew = {
1275                        author_name: (review.ReviewerFullName && review.ReviewerFullName !== "") ? review.ReviewerFullName : review.ReviewerScreenName,
1276                        author_url: review.reviewerLink,
1277                        text: review.Description
1278                    };
1279                    break;
1280                default:
1281                    rew = {
1282                        author_name: review.reviewer,
1283                        profile_photo_url: review.profilePicture,
1284                        text: review.text
1285                    };
1286            }
1287            reviewHTML += `<div class="col-lg-4 pb-4">
1288                <div class="card">
1289                    <div class="card-body">
1290                        ${rew.profile_photo_url ? 
1291                            `<img class="d-block img-thumbnail mb-4 border-0" style="width: 100px; height: 100px; border-radius: 50%; object-fit: cover;" src="${rew.profile_photo_url}" alt=${rew.author_name}/>`
1292                            : ""}
1293                        <div class="accordion" id="accordionExample">
1294                            <p class="fs-5 mb-2">
1295                                ${rew.author_url ? 
1296                                    `<a class="text-decoration-none fs-5" href="${rew.author_url}" target="_blank">${rew.author_name}</a>` 
1297                                    : rew.author_name}                                    
1298                            </p>
1299                            <p class="card-text">
1300                                ${rew.text ? 
1301                                    `<span>${rew.text.substring(0, 200)}</span>
1302                                    <span id=${'collapse' + index} class="collapse hide" aria-labelledby="headingOne" data-parent="#accordionExample">${rew.text.substring(200)}</span>`
1303                                    : ""}
1304                            </p>
1305                            <a class="text-decoration-none fs-6 d-flex align-items-center justify-content-start" type="button" data-toggle="collapse" data-target=${'#collapse'+ index}  aria-expanded="false"  aria-controls="collapseOne">
1306                                <span class="fs-6 me-1">Read More</span>
1307                                <span class="material-symbols-outlined">chevron_right</span>
1308                            </a>
1309                        </div>
1310                    </div>
1311                </div>
1312                    </div>\n`;
1313        });
1314        return reviewHTML;
1315    };
1316
1317    return `<div class="row pb-4">
1318        <div class="col-md-6">
1319            <span>${type != "Custom" ? "Reviews - " + type : "Other Reviews"}</span>
1320            ${(type == 'Zillow') ? 
1321                `<br/>
1322                <span style="font-size: 0.8em">
1323                    <a href="${data.profileUrl}" target="_blank" rel="nofollow">See all reviews on Zillow</a>
1324                </span>` : ""}
1325        </div>
1326        ${(type == 'Zillow') ? 
1327            `<div class="col-md-6 text-right">
1328                <a href="${data.profileUrl}" target="_blank" rel="nofollow">
1329                    <img src="https://www.zillowstatic.com/vstatic/80d5e73/static/logos/Zillowlogo_200x50.gif" width="200" height="50" alt="Zillow Real Estate Search">
1330                </a>
1331            </div>` : ""}
1332            </div>
1333            <div id="reviewRow" class="row">
1334                ${testimonialHTML(data.reviews)}
1335            </div>
1336            <div class="col-md-12 pb-4 text-right">
1337                ${(type == 'Zillow') ? 
1338                    `<span>© Zillow, Inc. 2006 - ${(new Date()).getFullYear()}</span>
1339                    <p>
1340                        <span>Use is subject to</span>
1341                        <a style="text-decoration: none;" target="_blank" href="https://zillow.com/corp/Terms.htm" rel="nofollow">Terms of Use.</a>
1342                        <a style=" text-decoration: none;" target="_blank" href="https://www.zillow.com/zestimate/ " rel="nofollow">What's a Zestimate?</a>
1343                    </p>` : 
1344                (type == "Google") ? 
1345                    `<span>© Google, Inc. ${(new Date()).getFullYear()}</span>` : ""}
1346            </div>
1347            <hr/>`;
1348}</script>
1348<div id="fb-root">   </div></body>
1348<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&amp;version=v4.0"></script>
vendor: 72 bytes, line 1348
1348<script async defer src="https://www.google.com/recaptcha/api.js?render=
13486LeT1_4UAAAAAH-X0O-lyaJtrEty0746aVv1Trl9
vendor: 11 bytes, line 1348
1348"></script>
1348<script src="https://pages.kaydoh.com/js/visit-beacon.js"></script>
1348<script src="https://pages.kaydoh.com/js/pdfobject.min.js"></script>
1348<script src="https://pages.kaydoh.com/js/vendor/pdfjs/pdf.min.js"></script>
1348<script>window.__kaydohPdfWorker = "https://pages.kaydoh.com/js/vendor/pdfjs/pdf.worker.min.js";</script>
1348<script src="https://pages.kaydoh.com/js/pdf-viewer.js"></script>
1348<script src="https://pages.kaydoh.com/js/intlTelInput.min.js"></script>
1348<link href="https://pages.kaydoh.com/css/intlTelInput.min.css" rel="stylesheet"><link href="https://assets.calendly.com/assets/external/widget.css" rel="stylesheet">
1348<script src="https://assets.calendly.com/assets/external/widget.js" type="text/javascript"></script>
1348<div class="chat-window" id="chatWindow"><div class="chat-container"><div class="chat-loading" id="chatLoading" style="display: none;"><div class="spin"><div class="chat-spinner" role="status"></div></div></div><div class="chat-widget"><input type="hidden" id="chatClientId" value="12316"><div class="chat-header"><div class="status"><span class="name">John Doe</span><span class="active">active</span></div></div><div class="chat-body"><p class="greeting-message">Hi there 👋, I’m here to chat! Are you looking to buy or sell a home?</p><div class="chat-buttons" id="chatButtons"><button class="chat-button" type="phone-capture">Kaydoh, please call me!</button><button class="chat-button" type="email-capture">Kaydoh, schedule a call with me</button><button class="chat-button" type="email-capture">Learn More</button></div><div class="lead-form" id="leadForm" style="display: none;"><input hidden id="formMessageType" value="phone-capture"><input hidden id="formButtonLabel" value="Kaydoh, please call me!"><p class="details-message">Please provide your details to get started.</p><div class="details-form" id="detailsForm"><input class="form-input" type="text" placeholder="Name"><input class="form-input" type="email" placeholder="Email"><input class="form-input" type="tel" placeholder="Phone Number"><textarea class="form-input" placeholder="Message" rows="4"></textarea></div><button class="submit-button" onclick="submitForm()">Submit</button></div><div class="thank-you-message" id="thankYouMessage" style="display: none;"><p class="thank-you-text">Thank you for your message! We will get back to you soon.</p></div></div><div class="chat-footer">I agree to Kaydoh's <a href="https://www.kaydoh.com/terms-and-conditions/" target="_blank">Terms</a>&nbsp;and consent to Kaydoh and its subscribers collecting and processing my information to contact me via call, text, or artificial/prerecorded voice message about their products and services. Message/data rates may apply.<a href="#" onclick="showDnc();">Opt out here</a></div></div></div></div><button class="chat-icon-toggle" onclick="toggleWidget()"><svg class="chat-icon-svg" width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
1349<path class="svg-path-chat" d="M27.9999 56C12.5359 56 -9.34526e-05 43.464 -9.27767e-05 28C-9.21007e-05 12.536 12.5359 -1.89987e-06 27.9999 -1.22392e-06C43.4639 -5.4797e-07 55.9999 12.536 55.9999 28C55.9999 36.6099 56.0001 48.5 55.9999 56C48.9999 56 34.854 56 27.9999 56Z"/>
1350<path d="M27.9999 42.25C20.1299 42.25 13.7499 35.8701 13.7499 28C13.7499 20.1299 20.1299 13.75 27.9999 13.75C35.87 13.75 42.2499 20.1299 42.2499 28L42.2499 42.25L42.2292 42.25L42.2045 42.25L42.1797 42.25L42.1548 42.25L42.1299 42.25L42.1049 42.25L42.0798 42.25L42.0546 42.25L42.0294 42.25L42.0041 42.25L41.9787 42.25L41.9532 42.25L41.9277 42.25L41.9021 42.25L41.8764 42.25L41.8507 42.25L41.8249 42.25L41.799 42.25L41.773 42.25L41.747 42.25L41.7209 42.25L41.6947 42.25L41.6685 42.25L41.6422 42.25L41.6158 42.25L41.5894 42.25L41.5629 42.25L41.5363 42.25L41.5097 42.25L41.483 42.25L41.4562 42.25L41.4294 42.25L41.4024 42.25L41.3755 42.25L41.3484 42.25L41.3213 42.25L41.2942 42.25L41.267 42.25L41.2397 42.25L41.2123 42.25L41.1849 42.25L41.1574 42.25L41.1299 42.25L41.1023 42.25L41.0746 42.25L41.0469 42.25L41.0191 42.25L40.9912 42.25L40.9633 42.25L40.9354 42.25L40.9074 42.25L40.8793 42.25L40.8511 42.25L40.8229 42.25L40.7947 42.25L40.7664 42.25L40.738 42.25L40.7095 42.25L40.6811 42.25L40.6525 42.25L40.6239 42.25L40.5953 42.25L40.5666 42.25L40.5378 42.25L40.509 42.25L40.4801 42.25L40.4512 42.25L40.4222 42.25L40.3932 42.25L40.3641 42.25L40.3349 42.25L40.3058 42.25L40.2765 42.25L40.2472 42.25L40.2179 42.25L40.1885 42.25L40.159 42.25L40.1295 42.25L40.1 42.25L40.0704 42.25L40.0408 42.25L40.0111 42.25L39.9813 42.25L39.9516 42.25L39.9217 42.25L39.8918 42.25L39.8619 42.25L39.8319 42.25L39.8019 42.25L39.7718 42.25L39.7417 42.25L39.7116 42.25L39.6814 42.25L39.6511 42.25L39.6208 42.25L39.5905 42.25L39.5601 42.25L39.5297 42.25L39.4992 42.25L39.4687 42.25L39.4382 42.25L39.4076 42.25L39.377 42.25L39.3463 42.25L39.3156 42.25L39.2848 42.25L39.254 42.25L39.2232 42.25L39.1923 42.25L39.1614 42.25L39.1305 42.25L39.0995 42.25L39.0685 42.25L39.0374 42.25L39.0063 42.25L38.9752 42.25L38.944 42.25L38.9128 42.25L38.8816 42.25L38.8503 42.25L38.819 42.25L38.7876 42.25L38.7562 42.25L38.7248 42.25L38.6934 42.25L38.6619 42.25L38.6304 42.25L38.5988 42.25L38.5672 42.25L38.5356 42.25L38.504 42.25L38.4723 42.25L38.4406 42.25L38.4088 42.25L38.3771 42.25L38.3453 42.25L38.3135 42.25L38.2816 42.25L38.2497 42.25L38.2178 42.25L38.1858 42.25L38.1539 42.25L38.1219 42.25L38.0899 42.25L38.0578 42.25L38.0257 42.25L37.9936 42.25L37.9615 42.25L37.9293 42.25L37.8972 42.25L37.8649 42.25L37.8327 42.25L37.8005 42.25L37.7682 42.25L37.7359 42.25L37.7036 42.25L37.6712 42.25L37.6388 42.25L37.6065 42.25L37.574 42.25L37.5416 42.25L37.5092 42.25L37.4767 42.25L37.4442 42.25L37.4117 42.25L37.3791 42.25L37.3466 42.25L37.314 42.25L37.2814 42.25L37.2488 42.25L37.2162 42.25L37.1835 42.25L37.1509 42.25L37.1182 42.25L37.0855 42.25L37.0528 42.25L37.0201 42.25L36.9873 42.25L36.9546 42.25L36.9218 42.25L36.889 42.25L36.8562 42.25L36.8234 42.25L36.7906 42.25L36.7577 42.25L36.7249 42.25L36.692 42.25L36.6592 42.25L36.6263 42.25L36.5934 42.25L36.5605 42.25L36.5275 42.25L36.4946 42.25L36.4617 42.25L36.4287 42.25L36.3958 42.25L36.3628 42.25L36.3298 42.25L36.2968 42.25L36.2638 42.25L36.2308 42.25L36.1978 42.25L36.1648 42.25L36.1318 42.25L36.0988 42.25L36.0657 42.25L36.0327 42.25L35.9997 42.25L35.9666 42.25L35.9336 42.25L35.9005 42.25L35.8675 42.25L35.8344 42.25L35.8013 42.25L35.7683 42.25L35.7352 42.25L35.7021 42.25L35.6691 42.25L35.636 42.25L35.6029 42.25L35.5698 42.25L35.5368 42.25L35.5037 42.25L35.4706 42.25L35.4375 42.25L35.4045 42.25L35.3714 42.25L35.3383 42.25L35.3053 42.25L35.2722 42.25L35.2391 42.25L35.2061 42.25L35.173 42.25L35.14 42.25L35.1069 42.25L35.0739 42.25L35.0409 42.25L35.0078 42.25L34.9748 42.25L34.9418 42.25L34.9088 42.25L34.8758 42.25L34.8428 42.25L34.8098 42.25L34.7768 42.25L34.7438 42.25L34.7109 42.25L34.6779 42.25L34.645 42.25L34.612 42.25L34.5791 42.25L34.5462 42.25L34.5133 42.25L34.4804 42.25L34.4475 42.25L34.4146 42.25L34.3817 42.25L34.3489 42.25L34.3161 42.25L34.2832 42.25L34.2504 42.25L34.2176 42.25L34.1848 42.25L34.1521 42.25L34.1193 42.25L34.0866 42.25L34.0539 42.25L34.0212 42.25L33.9885 42.25L33.9558 42.25L33.9231 42.25L33.8905 42.25L33.8579 42.25L33.8253 42.25L33.7927 42.25L33.7601 42.25L33.7275 42.25L33.695 42.25L33.6625 42.25L33.63 42.25L33.5975 42.25L33.5651 42.25L33.5327 42.25L33.5003 42.25L33.4679 42.25L33.4355 42.25L33.4032 42.25L33.3708 42.25L33.3385 42.25L33.3063 42.25L33.274 42.25L33.2418 42.25L33.2096 42.25L33.1774 42.25L33.1453 42.25L33.1131 42.25L33.081 42.25L33.049 42.25L33.0169 42.25L32.9849 42.25L32.9529 42.25L32.9209 42.25L32.889 42.25L32.8571 42.25L32.8252 42.25L32.7934 42.25L32.7615 42.25L32.7297 42.25L32.698 42.25L32.6662 42.25L32.6345 42.25L32.6029 42.25L32.5712 42.25L32.5396 42.25L32.508 42.25L32.4765 42.25L32.445 42.25L32.4135 42.25L32.3821 42.25L32.3507 42.25L32.3193 42.25L32.2879 42.25L32.2566 42.25L32.2254 42.25L32.1941 42.25L32.1629 42.25L32.1318 42.25L32.1006 42.25L32.0695 42.25L32.0385 42.25L32.0075 42.25L31.9765 42.25L31.9455 42.25L31.9146 42.25L31.8838 42.25L31.8529 42.25L31.8222 42.25L31.7914 42.25L31.7607 42.25L31.73 42.25L31.6994 42.25L31.6688 42.25L31.6383 42.25L31.6078 42.25L31.5774 42.25L31.5469 42.25L31.5166 42.25L31.4862 42.25L31.456 42.25L31.4257 42.25L31.3955 42.25L31.3654 42.25L31.3353 42.25L31.3052 42.25L31.2752 42.25L31.2452 42.25L31.2153 42.25L31.1854 42.25L31.1556 42.25L31.1258 42.25L31.0961 42.25L31.0664 42.25L31.0368 42.25L31.00
135072 42.25L30.9777 42.25L30.9482 42.25L30.9188 42.25L30.8894 42.25L30.86 42.25L30.8308 42.25L30.8015 42.25L30.7723 42.25L30.7432 42.25L30.7141 42.25L30.6851 42.25L30.6561 42.25L30.6272 42.25L30.5984 42.25L30.5696 42.25L30.5408 42.25L30.5121 42.25L30.4835 42.25L30.4549 42.25L30.4263 42.25L30.3979 42.25L30.3694 42.25L30.3411 42.25L30.3128 42.25L30.2845 42.25L30.2563 42.25L30.2282 42.25L30.2001 42.25L30.1721 42.25L30.1442 42.25L30.1163 42.25L30.0884 42.25L30.0607 42.25L30.0329 42.25L30.0053 42.25L29.9777 42.25L29.9502 42.25L29.9227 42.25L29.8953 42.25L29.8679 42.25L29.8407 42.25L29.8134 42.25L29.7863 42.25L29.7592 42.25L29.7322 42.25L29.7052 42.25L29.6783 42.25L29.6515 42.25L29.6247 42.25L29.598 42.25L29.5714 42.25L29.5449 42.25L29.5184 42.25L29.4919 42.25L29.4656 42.25L29.4393 42.25L29.4131 42.25L29.3869 42.25L29.3608 42.25L29.3348 42.25L29.3089 42.25L29.283 42.25L29.2572 42.25L29.2315 42.25L29.2058 42.25L29.1802 42.25L29.1547 42.25L29.1292 42.25L29.1039 42.25L29.0786 42.25L29.0534 42.25L29.0282 42.25L29.0031 42.25L28.9781 42.25L28.9532 42.25L28.9283 42.25L28.9036 42.25L28.8789 42.25L28.8542 42.25L28.8297 42.25L28.8052 42.25L28.7808 42.25L28.7565 42.25L28.7323 42.25L28.7081 42.25L28.684 42.25L28.66 42.25L28.6361 42.25L28.6123 42.25L28.5885 42.25L28.5648 42.25L28.5412 42.25L28.5177 42.25L28.4943 42.25L28.4709 42.25L28.4476 42.25L28.4244 42.25L28.4013 42.25L28.3783 42.25L28.3554 42.25L28.3325 42.25L28.3097 42.25L28.287 42.25L28.2644 42.25L28.2419 42.25L28.2195 42.25L28.1971 42.25L28.1749 42.25L28.1527 42.25L28.1306 42.25L28.1086 42.25L28.0867 42.25L28.0649 42.25L28.0431 42.25L28.0215 42.25L27.9999 42.25Z" stroke="white" stroke-width="1.5"/>
1351<path d="M23 32C24.1513 33.8233 26.1842 35.0343 28.5 35.0343C30.8158 35.0343 32.8487 33.8233 34 32" stroke="white" stroke-width="1.5"/>
1352</svg></button><style>.chat-window {
1353    position: fixed;
1354    bottom: 110px;
1355    right: 30px;
1356    width: 350px;
1357    display: none;
1358    z-index: 1000;
1359}
1360
1361.chat-widget {
1362    background: #fff;
1363    overflow: hidden;
1364    border-radius: 12px;
1365    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
1366}
1367
1368.chat-header {
1369    display: flex;
1370    align-items: center;
1371    padding: 12px;
1372    background-color: #000;
1373    color: #fff;
1374}
1375
1376.chat-header img {
1377    width: 36px;
1378    height: 36px;
1379    border-radius: 50%;
1380    margin-right: 10px;
1381}
1382
1383.status {
1384    display: flex;
1385    flex-direction: column;
1386}
1387
1388.status .name {
1389    font-weight: bold;
1390    font-size: 16px;
1391}
1392
1393.status .active {
1394    font-size: 12px;
1395    color:#f3f3f3;
1396}
1397
1398.chat-body {
1399    padding: 16px;
1400}
1401
1402.chat-body p.greetings-message {
1403    margin: 0 0 10px;
1404    font-size: 16px;
1405}
1406
1407.chat-button {
1408    display: block;
1409    width: 100%;
1410    margin: 6px 0;
1411    padding: 10px;
1412    border: 1px solid;
1413    border-radius: 6px;
1414    cursor: pointer;
1415    font-size: 16px !important;
1416    transition: background-color 0.2s;
1417    text-align: left;
1418    font-weight: 600 !important;
1419    text-decoration: none !important;
1420    text-transform: capitalize !important;
1421}
1422
1423.chat-footer {
1424    font-size: 11px;
1425    padding: 12px;
1426    background-color: #fafafa;
1427    color: #666;
1428    border-top: 1px solid #eee;
1429}
1430
1431.chat-footer a {
1432    color: #0073e6;
1433    text-decoration: none;
1434}
1435
1436.lead-form {
1437    display: flex;
1438    flex-direction: column;
1439    padding: 16px;
1440    background-color: #f9f9f9;
1441    border-radius: 12px;
1442    margin: 10px 0;
1443}
1444
1445.deatils-form p.details-message {
1446    margin: 0 0 8px;
1447    font-size: 16px;
1448}
1449
1450.details-form input {
1451    width: 100%;
1452    margin: 6px 0;
1453    padding: 10px;
1454    border: 1px solid #ccc !important;
1455    border-radius: 6px !important;
1456    font-size: 14px;
1457}
1458
1459.details-form textarea {
1460    width: 100%;
1461    margin: 6px 0;
1462    padding: 10px;
1463    border: 1px solid #ccc !important;
1464    border-radius: 6px !important;
1465    font-size: 14px;
1466}
1467
1468.lead-form button.submit-button {
1469    width: 100%;
1470    border: 1px solid;
1471    padding: 10px;
1472    border-radius: 6px;
1473    cursor: pointer;
1474    font-size: 14px;
1475    transition: background-color 0.2s;
1476}
1477
1478.chat-icon-toggle {
1479    position: fixed;
1480    bottom: 30px;
1481    right: 30px;
1482    width: 64px;
1483    height: 64px;
1484    padding: 0;
1485    border-radius: 50% 50% 0 50%;
1486    border: 1px solid;
1487    cursor: pointer;
1488    z-index: 1001;
1489}
1490
1491.chat-loading {
1492    position: absolute;
1493    top: 50%;
1494    left: 50%;
1495    transform: translate(-50%, -50%);
1496    display: flex;
1497    align-items: center;
1498    justify-content: center;
1499    width: 100%;
1500    height: 100%;
1501    background-color: rgba(255, 255, 255, 0.8);
1502    border-radius: 12px;
1503}
1504
1505.chat-spinner {
1506    width: 64px;
1507    height: 64px;
1508    border-radius: 50%;
1509    animation: spin 2s linear infinite;
1510    border-top-width: 8px;
1511    border-width: 8px;
1512    border-style: solid;
1513    border-color:#d6d6d6;
1514}
1515
1516div.thank-you-message {
1517    border: 1px solid #009808;
1518    background-color:rgba(0, 152, 8, 0.35);
1519    padding: 16px;
1520    border-radius: 12px;
1521    margin: 24px 0 12px 0;
1522}
1523
1524p.thank-you-text {
1525    margin: 0;
1526    font-size: 16px;
1527    color: #009808;
1528}
1529</style>
1529<script>function initChatWidget() {
1530    fetchChatButtons();
1531}
1532
1533//- Fetch Chat Buttons - GET /chat-buttons
1534function fetchChatButtons() {
1535    const chatButtons = document.querySelector('.chat-buttons');
1536
1537    fetch('/chat-client/' + 2734)
1538        .then(response => response.json())
1539        .then(res => {
1540            if (res && res.status == 'success') {
1541                const data = res.data;
1542
1543                const greetingMessage = document.querySelector('.greeting-message');
1544                greetingMessage.innerHTML = data.greeting;
1545                //- set Toggle button color
1546                const chatButton = document.querySelector('.chat-icon-toggle');
1547                chatButton.style.backgroundColor = data.themeColor;
1548                chatButton.style.borderColor = data.themeColor;
1549                chatButton.style.color = data.themeColor;
1550
1551                //- set header and loading spinner color
1552                const header = document.querySelector('.chat-header');
1553                header.style.backgroundColor = data.themeColor;
1554                const loadingSpinner = document.querySelector('.chat-spinner');
1555                loadingSpinner.style.borderTopColor = data.themeColor;
1556
1557                //- Set Form button color
1558                const formButton = document.querySelector('.lead-form .submit-button');
1559                formButton.style.backgroundColor = data.themeColor;
1560                formButton.style.color = '#fff';
1561                formButton.style.borderColor = data.themeColor;
1562                formButton.style.transition = 'background-color 0.2s';
1563
1564                //- Render Chat Buttons
1565                const defaultOptions = data.defaultOptions;
1566                renderChatButtons(defaultOptions, { themeColor: data.themeColor, secondaryColor: data.secondaryColor });
1567
1568                //- Render Profile data
1569                const profile = data.profile;
1570                renderProfileData(profile);
1571
1572                //- Open Chat widget with delay
1573                const delay = data.delayInSeconds ? data.delayInSeconds * 1000 : 15000;
1574                setTimeout(() => {
1575                    toggleWidget();
1576                }, delay);
1577
1578            } else {
1579                chatButtons.innerHTML = '<p>No chat options available.</p>';
1580            }
1581        })
1582        .catch(error => {
1583            console.error('Error fetching chat buttons:', error);
1584            chatButtons.innerHTML = '<p>Error loading chat options.</p>';
1585        });
1586}
1587
1588function toggleWidget() {
1589    const chatButton = document.querySelector('.chat-icon-toggle');
1590    const widget = document.getElementById('chatWindow');
1591
1592    widget.style.display = widget.style.display === 'none' || widget.style.display === '' ? 'block' : 'none';
1593    chatButton.innerHTML = widget.style.display === 'block' ? toggleChatIcon(false) : toggleChatIcon(true);
1594}
1595
1596function toggleChatIcon(isOpen) {
1597    if (isOpen) {
1598        return "<svg class=\"chat-icon-svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n" +
1599            "    <path class=\"svg-path-chat\" d=\"M27.9999 56C12.5359 56 -9.34526e-05 43.464 -9.27767e-05 28C-9.21007e-05 12.536 12.5359 -1.89987e-06 27.9999 -1.22392e-06C43.4639 -5.4797e-07 55.9999 12.536 55.9999 28C55.9999 36.6099 56.0001 48.5 55.9999 56C48.9999 56 34.854 56 27.9999 56Z\"/>\n" +
1600            "    <path d=\"M27.9999 42.25C20.1299 42.25 13.7499 35.8701 13.7499 28C13.7499 20.1299 20.1299 13.75 27.9999 13.75C35.87 13.75 42.2499 20.1299 42.2499 28L42.2499 42.25L42.2292 42.25L42.2045 42.25L42.1797 42.25L42.1548 42.25L42.1299 42.25L42.1049 42.25L42.0798 42.25L42.0546 42.25L42.0294 42.25L42.0041 42.25L41.9787 42.25L41.9532 42.25L41.9277 42.25L41.9021 42.25L41.8764 42.25L41.8507 42.25L41.8249 42.25L41.799 42.25L41.773 42.25L41.747 42.25L41.7209 42.25L41.6947 42.25L41.6685 42.25L41.6422 42.25L41.6158 42.25L41.5894 42.25L41.5629 42.25L41.5363 42.25L41.5097 42.25L41.483 42.25L41.4562 42.25L41.4294 42.25L41.4024 42.25L41.3755 42.25L41.3484 42.25L41.3213 42.25L41.2942 42.25L41.267 42.25L41.2397 42.25L41.2123 42.25L41.1849 42.25L41.1574 42.25L41.1299 42.25L41.1023 42.25L41.0746 42.25L41.0469 42.25L41.0191 42.25L40.9912 42.25L40.9633 42.25L40.9354 42.25L40.9074 42.25L40.8793 42.25L40.8511 42.25L40.8229 42.25L40.7947 42.25L40.7664 42.25L40.738 42.25L40.7095 42.25L40.6811 42.25L40.6525 42.25L40.6239 42.25L40.5953 42.25L40.5666 42.25L40.5378 42.25L40.509 42.25L40.4801 42.25L40.4512 42.25L40.4222 42.25L40.3932 42.25L40.3641 42.25L40.3349 42.25L40.3058 42.25L40.2765 42.25L40.2472 42.25L40.2179 42.25L40.1885 42.25L40.159 42.25L40.1295 42.25L40.1 42.25L40.0704 42.25L40.0408 42.25L40.0111 42.25L39.9813 42.25L39.9516 42.25L39.9217 42.25L39.8918 42.25L39.8619 42.25L39.8319 42.25L39.8019 42.25L39.7718 42.25L39.7417 42.25L39.7116 42.25L39.6814 42.25L39.6511 42.25L39.6208 42.25L39.5905 42.25L39.5601 42.25L39.5297 42.25L39.4992 42.25L39.4687 42.25L39.4382 42.25L39.4076 42.25L39.377 42.25L39.3463 42.25L39.3156 42.25L39.2848 42.25L39.254 42.25L39.2232 42.25L39.1923 42.25L39.1614 42.25L39.1305 42.25L39.0995 42.25L39.0685 42.25L39.0374 42.25L39.0063 42.25L38.9752 42.25L38.944 42.25L38.9128 42.25L38.8816 42.25L38.8503 42.25L38.819 42.25L38.7876 42.25L38.7562 42.25L38.7248 42.25L38.6934 42.25L38.6619 42.25L38.6304 42.25L38.5988 42.25L38.5672 42.25L38.5356 42.25L38.504 42.25L38.4723 42.25L38.4406 42.25L38.4088 42.25L38.3771 42.25L38.3453 42.25L38.3135 42.25L38.2816 42.25L38.2497 42.25L38.2178 42.25L38.1858 42.25L38.1539 42.25L38.1219 42.25L38.0899 42.25L38.0578 42.25L38.0257 42.25L37.9936 42.25L37.9615 42.25L37.9293 42.25L37.8972 42.25L37.8649 42.25L37.8327 42.25L37.8005 42.25L37.7682 42.25L37.7359 42.25L37.7036 42.25L37.6712 42.25L37.6388 42.25L37.6065 42.25L37.574 42.25L37.5416 42.25L37.5092 42.25L37.4767 42.25L37.4442 42.25L37.4117 42.25L37.3791 42.25L37.3466 42.25L37.314 42.25L37.2814 42.25L37.2488 42.25L37.2162 42.25L37.1835 42.25L37.1509 42.25L37.1182 42.25L37.0855 42.25L37.0528 42.25L37.0201 42.25L36.9873 42.25L36.9546 42.25L36.9218 42.25L36.889 42.25L36.8562 42.25L36.8234 42.25L36.7906 42.25L36.7577 42.25L36.7249 42.25L36.692 42.25L36.6592 42.25L36.6263 42.25L36.5934 42.25L36.5605 42.25L36.5275 42.25L36.4946 42.25L36.4617 42.25L36.4287 42.25L36.3958 42.25L36.3628 42.25L36.3298 42.25L36.2968 42.25L36.2638 42.25L36.2308 42.25L36.1978 42.25L36.1648 42.25L36.1318 42.25L36.0988 42.25L36.0657 42.25L36.0327 42.25L35.9997 42.25L35.9666 42.25L35.9336 42.25L35.9005 42.25L35.8675 42.25L35.8344 42.25L35.8013 42.25L35.7683 42.25L35.7352 42.25L35.7021 42.25L35.6691 42.25L35.636 42.25L35.6029 42.25L35.5698 42.25L35.5368 42.25L35.5037 42.25L35.4706 42.25L35.4375 42.25L35.4045 42.25L35.3714 42.25L35.3383 42.25L35.3053 42.25L35.2722 42.25L35.2391 42.25L35.2061 42.25L35.173 42.25L35.14 42.25L35.1069 42.25L35.0739 42.25L35.0409 42.25L35.0078 42.25L34.9748 42.25L34.9418 42.25L34.9088 42.25L34.8758 42.25L34.8428 42.25L34.8098 42.25L34.7768 42.25L34.7438 42.25L34.7109 42.25L34.6779 42.25L34.645 42.25L34.612 42.25L34.5791 42.25L34.5462 42.25L34.5133 42.25L34.4804 42.25L34.4475 42.25L34.4146 42.25L34.3817 42.25L34.3489 42.25L34.3161 42.25L34.2832 42.25L34.2504 42.25L34.2176 42.25L34.1848 42.25L34.1521 42.25L34.1193 42.25L34.0866 42.25L34.0539 42.25L34.0212 42.25L33.9885 42.25L33.9558 42.25L33.9231 42.25L33.8905 42.25L33.8579 42.25L33.8253 42.25L33.7927 42.25L33.7601 42.25L33.7275 42.25L33.695 42.25L33.6625 42.25L33.63 42.25L33.5975 42.25L33.5651 42.25L33.5327 42.25L33.5003 42.25L33.4679 42.25L33.4355 42.25L33.4032 42.25L33.3708 42.25L33.3385 42.25L33.3063 42.25L33.274 42.25L33.2418 42.25L33.2096 42.25L33.1774 42.25L33.1453 42.25L33.1131 42.25L33.081 42.25L33.049 42.25L33.0169 42.25L32.9849 42.25L32.9529 42.25L32.9209 42.25L32.889 42.25L32.8571 42.25L32.8252 42.25L32.7934 42.25L32.7615 42.25L32.7297 42.25L32.698 42.25L32.6662 42.25L32.6345 42.25L32.6029 42.25L32.5712 42.25L32.5396 42.25L32.508 42.25L32.4765 42.25L32.445 42.25L32.4135 42.25L32.3821 42.25L32.3507 42.25L32.3193 42.25L32.2879 42.25L32.2566 42.25L32.2254 42.25L32.1941 42.25L32.1629 42.25L32.1318 42.25L32.1006 42.25L32.0695 42.25L32.0385 42.25L32.0075 42.25L31.9765 42.25L31.9455 42.25L31.9146 42.25L31.8838 42.25L31.8529 42.25L31.8222 42.25L31.7914 42.25L31.7607 42.25L31.73 42.25L31.6994 42.25L31.6688 42.25L31.6383 42.25L31.6078 42.25L31.5774 42.25L31.5469 42.25L31.5166 42.25L31.4862 42.25L31.456 42.25L31.4257 42.25L31.3955 42.25L31.3654 42.25L31.3353 42.25L31.3052 42.25L31.2752 42.25L31.2452 42.25L31.2153 42.25L31.1854 42.25L31.1556 42.25L31.1258 42.25L31.0961 42.25L31.0664 42.25L31.0368 42.25L31.00
160072 42.25L30.9777 42.25L30.9482 42.25L30.9188 42.25L30.8894 42.25L30.86 42.25L30.8308 42.25L30.8015 42.25L30.7723 42.25L30.7432 42.25L30.7141 42.25L30.6851 42.25L30.6561 42.25L30.6272 42.25L30.5984 42.25L30.5696 42.25L30.5408 42.25L30.5121 42.25L30.4835 42.25L30.4549 42.25L30.4263 42.25L30.3979 42.25L30.3694 42.25L30.3411 42.25L30.3128 42.25L30.2845 42.25L30.2563 42.25L30.2282 42.25L30.2001 42.25L30.1721 42.25L30.1442 42.25L30.1163 42.25L30.0884 42.25L30.0607 42.25L30.0329 42.25L30.0053 42.25L29.9777 42.25L29.9502 42.25L29.9227 42.25L29.8953 42.25L29.8679 42.25L29.8407 42.25L29.8134 42.25L29.7863 42.25L29.7592 42.25L29.7322 42.25L29.7052 42.25L29.6783 42.25L29.6515 42.25L29.6247 42.25L29.598 42.25L29.5714 42.25L29.5449 42.25L29.5184 42.25L29.4919 42.25L29.4656 42.25L29.4393 42.25L29.4131 42.25L29.3869 42.25L29.3608 42.25L29.3348 42.25L29.3089 42.25L29.283 42.25L29.2572 42.25L29.2315 42.25L29.2058 42.25L29.1802 42.25L29.1547 42.25L29.1292 42.25L29.1039 42.25L29.0786 42.25L29.0534 42.25L29.0282 42.25L29.0031 42.25L28.9781 42.25L28.9532 42.25L28.9283 42.25L28.9036 42.25L28.8789 42.25L28.8542 42.25L28.8297 42.25L28.8052 42.25L28.7808 42.25L28.7565 42.25L28.7323 42.25L28.7081 42.25L28.684 42.25L28.66 42.25L28.6361 42.25L28.6123 42.25L28.5885 42.25L28.5648 42.25L28.5412 42.25L28.5177 42.25L28.4943 42.25L28.4709 42.25L28.4476 42.25L28.4244 42.25L28.4013 42.25L28.3783 42.25L28.3554 42.25L28.3325 42.25L28.3097 42.25L28.287 42.25L28.2644 42.25L28.2419 42.25L28.2195 42.25L28.1971 42.25L28.1749 42.25L28.1527 42.25L28.1306 42.25L28.1086 42.25L28.0867 42.25L28.0649 42.25L28.0431 42.25L28.0215 42.25L27.9999 42.25Z\" stroke=\"white\" stroke-width=\"1.5\"/>\n" +
1601            "    <path d=\"M23 32C24.1513 33.8233 26.1842 35.0343 28.5 35.0343C30.8158 35.0343 32.8487 33.8233 34 32\" stroke=\"white\" stroke-width=\"1.5\"/>\n" +
1602            "</svg>"
1603    } else {
1604        return "<svg class=\"chat-icon-svg\" width=\"56\" height=\"56\" viewBox=\"0 0 56 56\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n" +
1605            "<path class=\"svg-path-chat\" d=\"M56 28.0001C56 43.464 43.464 56.0001 28 56.0001C12.536 56.0001 0 43.464 0 28.0001C0 12.5361 12.536 7.17124e-05 28 7.17124e-05C36.6099 7.17124e-05 48.5 -0.000128508 56 4.54864e-05C56 7.00005 56 21.146 56 28.0001Z\"/>\n" +
1606            "<line x1=\"34.6893\" y1=\"21.7071\" x2=\"20.7071\" y2=\"35.6893\" stroke=\"white\" stroke-width=\"2\"/>\n" +
1607            "<line x1=\"35.0229\" y1=\"35.6894\" x2=\"21.0407\" y2=\"21.7072\" stroke=\"white\" stroke-width=\"2\"/>\n" +
1608            "</svg>\n";
1609    }
1610}
1611
1612function showDeatilsForm(messageType, others, buttonLabel) {
1613    const leadForm = document.getElementById('leadForm');
1614    const detailsForm = document.getElementById('detailsForm');
1615    const formMessageType = document.getElementById('formMessageType');
1616    const formButtonLabel = document.getElementById('formButtonLabel');
1617    formMessageType.value = messageType;
1618    formButtonLabel.value = buttonLabel;
1619
1620    //- Show Form
1621    leadForm.style.display = 'block';
1622
1623    if (messageType == 'phone-capture') {
1624        detailsForm.innerHTML = `
1625            <input type="text" id="chatFormName" placeholder="Name *">
1626            <input type="tel" id="chatFormPhoneNumber" placeholder="Phone Number *">
1627            <textarea id="chatFormMessage" placeholder="Message"></textarea>
1628        `;
1629    } else if (messageType == 'default') {
1630        detailsForm.innerHTML = `
1631            <input type="text" id="chatFormName" placeholder="Name *">
1632            <input type="tel" id="chatFormEmailAddress" placeholder="Email Address *">
1633            <textarea id="chatFormMessage" placeholder="Message"></textarea>
1634        `;
1635    }
1636}
1637
1638function renderChatButtons(data, style) {
1639    const chatButtons = document.querySelector('.chat-buttons');
1640    chatButtons.innerHTML = '';
1641
1642    data.forEach(button => {
1643        let buttonHTML = "";
1644        if (button.messageType == 'redirect') {
1645            buttonHTML = `
1646                <a class="chat-button" href="${button.others}" target="_blank">
1647                    ${button.message}
1648                </a>
1649            `;
1650        } else {
1651            buttonHTML = `
1652                <button class="chat-button" onclick="showDeatilsForm('${button.messageType}', '${button.others}', '${button.message}')">
1653                    ${button.message}
1654                </button>
1655            `;
1656        }
1657
1658        //- set hover style
1659        buttonHTML += `
1660            <style>
1661                .chat-button {
1662                    background-color: transparent;
1663                    border-color: ${style.themeColor};
1664                    color: ${style.themeColor};
1665                }
1666                .chat-button:hover {
1667                    background-color: ${style.themeColor};
1668                    color: #fff;
1669                }
1670            </style>
1671        `;
1672
1673        //- Append button to chat buttons container
1674        chatButtons.innerHTML += buttonHTML;
1675    });
1676}
1677
1678function renderProfileData(profile) {
1679    const chatHeader = document.querySelector('#chatWindow .chat-header');
1680
1681    chatHeader.innerHTML = `
1682        <img src="${profile.profileImage}" alt="Profile Image">
1683        <div class="status">
1684            <div class="name">${profile.name}</div>
1685            <div class="active">Active</div>
1686        </div>
1687    `;
1688}
1689
1690function submitForm() {
1691    toggleLoading(true);
1692    const messageType = document.getElementById("formMessageType").value;
1693    const buttonLabel = document.getElementById("formButtonLabel").value;
1694    const name = document.getElementById('chatFormName').value;
1695    const message = document.getElementById('chatFormMessage').value;
1696
1697    //- Get additional fields based on message type
1698    let email = '';
1699    let phoneNumber = '';
1700    if (messageType === 'phone-capture') {
1701        phoneNumber = document.getElementById('chatFormPhoneNumber').value;
1702    } else if (messageType === 'default') {
1703        email = document.getElementById('chatFormEmailAddress').value;
1704    }
1705
1706    //- Validate form data
1707    if (!name || (messageType === 'phone-capture' && !phoneNumber) || (messageType === 'default' && !email)) {
1708        alert('Please fill in all required fields.');
1709        return;
1710    }
1711    //- Submit form data
1712    console.log('Form submitted:', { name, email, phoneNumber, message });
1713
1714    fetch('/chat-client', {
1715        method: 'POST',
1716        headers: {
1717            "Content-Type": "application/json",
1718        },
1719        body: JSON.stringify({ 
1720            name, 
1721            email, 
1722            phoneNumber, 
1723            message,
1724            chatClientId: document.getElementById('chatClientId').value,
1725            gwid: 2734,
1726            messageType,
1727            buttonLabel,
1728        })
1729    })
1730        .then(response => response.json())
1731        .then(res => {
1732            console.log('Form submission response:', res);
1733            //- Hide loading spinner
1734            toggleLoading(false);
1735            if (res && res.status == 'success') {
1736                document.getElementById('leadForm').style.display = 'none';
1737                //- Show Thank you message
1738                const thankyoumsg = document.getElementById('thankYouMessage');
1739                thankyoumsg.innerHTML = `
1740                    <p>Thank you for your message!</p>
1741                    <p>We will get back to you soon.</p>
1742                `;
1743                thankyoumsg.style.display = 'block';
1744            }
1745        })
1746        .catch(error => {
1747            console.error('Error submitting form:', error);
1748            toggleLoading(false);
1749        });
1750}
1751
1752//- Toggle Loading
1753function toggleLoading(isLoading) {
1754    const loadingSpinner = document.getElementById('chatLoading');
1755    loadingSpinner.style.display = isLoading ? 'flex' : 'none';
1756}</script>
1756<script>$(".scheduleTourBtn").click( function scheduleTour(){
1757    var url = "https://calendly.com/myhdrealestate/15min";
1758    if(url.indexOf("calendly.com/")>0){
1759        Calendly.initPopupWidget({url: url});
1760    } 
1761    else if(url.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)){
1762        window.location.href = `mailto:${url}`
1763    }else {
1764        window.open(url, "_blank");
1765    }
1766    return false;
1767});
1768</script>
1768<script>const detailJson = {"propertyAddress":null,"price":null,"bedRooms":null,"bathRooms":null,"areaInSqFt":null,"lotInSqFt":null,"listingAgentInfo":"","showGreatSchoolInfo":false,"enableExitPage":false,"enableSeoIndex":false,"propertyGeolocation":null,"propertyState":null,"propertyCity":null,"business":{"name":"","googlePlaceId":"","rating":"","userRatingsTotal":"","address":"","phone":"","website":"","hours":{"monday":{"open":"","close":""},"tuesday":{"open":"","close":""},"wednesday":{"open":"","close":""},"thursday":{"open":"","close":""},"friday":{"open":"","close":""},"saturday":{"open":"","close":""},"sunday":{"open":"","close":""}},"couponCode":"","couponDescription":"","onlineOrderLink":"","businessTestimonialsEnabled":true},"scheduleTour":{"enabled":false,"buttonLabel":"Schedule Tour","url":"https://calendly.com/myhdrealestate/15min"},"coverTitle":"","portfolioCover":{"recepientName":"","mainHeading":"CLIENT_NAME","subHeading":"Specially made for you","buttonOne":{"label":"Call","type":"phone","url":"18885293645"},"buttonTwo":{"label":"Schedule a Meeting","type":"kaydoh-eform","url":"kaydoh-eform"},"hideSecondPage":false},"fontFamily":"Inter","quesUnlockButtonLabel":"Submit","animate":{"class":"fadeInLeftBig","sections":{"handouts":true}},"defaultProfileEnabled":true,"testimonialsEnabled":true,"leadAlertMobileEnabled":false,"leadAlertEmailEnabled":false,"questionnaireDefault":{"name":{"label":"Name","enabled":true,"isRequired":true},"email":{"label":"Email","enabled":true,"isRequired":true}},"instantEformLock":false,"zoomSettings":{"enabled":false,"webinarId":"","topic":""},"hideLetsConnectSection":false,"amenities":[],"eFormTitle":"Your information is required."};
1769const isChatWidgetEnabled = true;
1770const isPreviewMode = false;
1771window.dataLayer = window.dataLayer || [];
1772var contactsFormModal = null;
1773
1774var joinMeeting = false;
1775var isDeviceSupported = false;
1776const contactQuestionnaireCookie = "contact-questionnaire-2734";
1777
1778function fetchCompany() {
1779    const companyData = {"id":12375,"firstName":"Hoang","lastName":" Dam","companyCode":"dummy","mobile":"408.799.4043","refFacebookPsId":"-","CMA_API_KEY":"","botName":"dummy","botNumber":"+1 000-000-0000","botSmsGateway":"TWILIO","created_at":"2021-09-30T18:32:45.396Z","updated_at":"2025-09-30T18:39:26.826Z","FK_OWNER_USER_ID":12931,"CRM_DETAILS":"","settings":null,"isExportEligible":false,"timezone":"America/Los_angeles","followUpDelay":10,"responseTime":60,"logoUrl":"https://gallery-widgets.s3.us-west-2.amazonaws.com/logo-12375.png","isGalleryWidgetEnabled":true,"logoActionUrl":"https://www.homesnap.com/Hoang-Dam/gmb2","address":" 3005 Silver Creek Rd Unit #214 San Jose, CA 95121","isCmaEnabled":false,"allowedNoOfLandingPages":20,"landingPageSubscriptionStarts":"2025-09-30T18:38:46.000Z","landingPageSubscriptionEnds":"2026-09-30T18:38:46.000Z","STRIPE_CUSTOMER_ID":"cus_KK8QBbm3WjiZ5V","STRIPE_SUBSCRIPTION_ID":"sub_1JfU9aCRACYtn2vrQo2GQqSd","isRinglessVoicemailEnabled":true,"IS_STANDALONE_CHAT_ENABLED":true,"LANDING_PAGE_SUBSCRIPTION_PLAN":"pilot","pricePlanCategory":"pilot","teamMobiles":"+14087994043","teamEmails":"[email protected]","noOfNotificationContactsAllowed":"2","companyName":"","disclaimerText":"<p><br></p>","COMPANY_TYPE":"BUSINESS","FK_VENDOR_COMPANY_ID":null,"website":"https://www.homesnap.com/Hoang-Dam/gmb2","AFF_CODE":null,"FIRST_PAYMENT_DATE":null,"ACTIVATION_DATE":null,"optInText":"<p>Click here to consent to our <a href=\"https://www.kaydoh.com/terms-and-conditions/\" target=\"_blank\" style=\"background-color: rgb(255, 255, 255);\">terms / conditions</a>, agree Kaydoh may receive/process your personal data and use that data to communicate by calling or texting you about Kaydoh products and services.","faviconUrl":null,"crmDetails":null,"cmaApiKey":null};
1780    const userData = {"id":12931,"mobile_number":"+14088393408","first_name":null,"last_name":null,"cma_address":null,"employer_firstName":"Hoang","employer_lastName":" Dam","employer_id":"dummy","employer_mobile":"408.799.4043","employer_fb_psid":"-","cma_api_key":null,"bot_name":"dummy","bot_number":"+1 000-000-0000","cma_pdf_url":null,"fb_notifyLeadCaptureModuleID":null,"lead_type":null,"cycle_count":null,"current_seller_question":null,"preliminary_questions_done":false,"consent_given":false,"on_hold":false,"is_buyer_pq_funnel_done":false,"is_seller_pq_funnel_done":false,"buyer_pq":[[{"type":"yes
1780orno","question":"Sure {{first_name}}, but quick question are you pre-approved?\n\nReply YES or NO\n\nText STOP to cancel","next_sequence_id":-1,"next_sequence_id_2":-1,"label":"Pre-Approved"},{"type":"statement","question":"{{prefix}}\n\nWhat's your price range?\n\nText STOP to cancel","next_sequence_id":4,"label":"Price Range","prefix":{"yes":"Good job getting pre-approved!","no":"No problem, we can help with that."}}],[{"type":"statement","question":"Great, before I run you a report.\n\nHow soon do you want to move?\n\nText STOP to cancel","next_sequence_id":4,"label":"Timeline"}],[{"type":"statement","question":"Quick question before I run you a report 😊\n\nWhat would make you move?\n\nText STOP to cancel","next_sequence_id":4,"label":"Move Trigger"}]],"seller_pq":[{"question":"Got it, why are you interested in selling?\n\n1. Upgrade\n2. Relocation\n3. Retiring\n4. Other\n5. Just curious\n\nReply with the #(1,2,..5)\n\nText STOP to cancel","connection":{"5":"go:2","default":"next"},"type":"options","options":{"1":"Upgrade","2":"Relocation","3":"Retiring","4":"Other reasons","5":"Just curious"},"label":"Motivation"},{"question":"Sure, we can help with that. How soon do you want to sell?\n\n1. ASAP\n2. Next 3 mo\n3. Next 12 mo\n4. Just curious\n\nReply with the #(1,2,..4)\n\nText STOP to cancel","connection":{"3":"go:2","4":"go:2","default":12},"type":"options","options":{"1":"I want to sell my home now","2":"In the next 3 months","3":"In the next 12 months","4":"Just curious"},"label":"Timeline"},{"question":"No worries :-)\n\nWould you like up to 1 text per month about the housing market that may affect your house value?\n\nReply YES or NO\n\nText STOP to cancel","connection":{"default":"12"},"type":"options","label":"Alert opt-in"}],"inquiry":null,"cma_sent":false,"current_seq_id":0,"next_seq_id":-404,"lead_notification":null,"lead_question_timestamp":null,"created_at":"2021-09-30T18:32:45.426Z","updated_at":"2023-02-14T04:31:42.917Z","captureType":"bounce","cma_receive_count":null,"capture_type_updated_at":"2021-09-30T18:32:45.407Z","employer_desc_1":"","employer_desc_2":"","employer_desc_3":"","report_type":null,"mls_number":null,"is_mls_number":false,"userType":"OWNER","FK_COMPANY_ID":12375,"is_subscribe":true,"member_first_name":"Hoang","member_last_name":" Dam","email":"[email protected]","driftSettings":null,"password":"$2b$10$.RrSD0QrUlz9y2.Rbpe36O7Ol4nVKmxCx7zYU4nydBbDzX7nYyOK.","memberAddress":null,"profileImageUrl":"https://gallery-widgets.s3.us-west-2.amazonaws.com/profile-12931.png","licenseNumber":"","businessNumber":"+14088393408","isLeadNotificationEnabled":false,"showAllLeads":false,"activationCode":"DysfbjceTR7rPUqBDpu71g25OtdDiUFA6QmWnqdZPNFpcD9RWB","passwordResetCode":"false","defaultLandingPageTheme":"GLACIER","ringlessVoiceMailSettings":null,"STRIPE_CUSTOMER_ID":null,"settings":"{\"socialMediaSignature\":\"𝗜'𝗺 𝗿𝗲𝗮𝗱𝘆 𝘁𝗼 𝘄𝗼𝗿𝗸 𝘄𝗶𝘁𝗵 𝘆𝗼𝘂, 𝘀𝗲𝗻𝗱 𝗺𝗲 𝗮 𝗺𝗲𝘀𝘀𝗮𝗴𝗲 ⤵️\\n📧 [email protected]\\nCall or Text:  888.529.3645\\n.\\n#realestate #localrealtor\",\"socialMediaProfiles\":{\"facebook\":\"https://www.facebook.com/H.DFitRealtor/\",\"linkedin\":\"https://www.linkedin.com/in/hdfitrealtor/\",\"twitter\":\"\",\"instagram\":\"\",\"youtube\":\"\"},\"calendarLink\":\"https://calendly.com/myhdrealestate/15min\",\"testimonials\":{\"zillowScreenName\":\"\",\"googlePlaceId\":\"ChIJj15Vc-ozjoARwYWXD3JoQAo\",\"googlePlaceName\":\"Hoang Dam - Your Partner In The Real Estate Business., Silver Creek Road, San Jose, CA, USA\",\"custom\":[{\"reviewer\":\"Paul Luu\",\"text\":\"My wife and I absolutely loved our experience working with Hoang Dam! To say he is a hard worker is an understatement. Hard work is a lifestyle with this young man. He is motivated, enthusiastic, he h\\nas a great attitude and did a wonderful job in representing us as his clients. Working with Hoang gave us a lot of peace and confidence. It eliminated a lot of stress because we knew Hoang was \\\"on it\\\". To go along with his high level work habits is his great attitude. Hoang has a great positive, never give up attitude that is very infectious. We are truly confident that we will be working with him again in the future!\"},{\"reviewer\":\"Amjad M\",\"text\":\"I worked with Hoang last year, to buy a property. Whole transaction went very smooth. Hoang was very professional and helpful. He went above and beyond to help me.\"},{\"reviewer\":\"Allen Nobida, Technical Support at Blend\",\"text\":\"We met (well, spoke) Hoang on October 31st. We got the keys to our new house on January 16th. Every single day in between Hoang was with us answering any questions and guiding us through the entire process. Advising as both an Agent and as a friend, he made the entire process incredibly easy and comfortable.\\n\"}]}}","publicEmail":"[email protected]","personalWebsite":"","webSignature":"","DELETED_FLAG":false,"themeColor":"#D4AD3E","optInText":"<p>Click here to consent to our <a href=\"https://www.kaydoh.com/terms-and-conditions/\" target=\"_blank\" style=\"background-color: rgb(255, 255, 255);\">terms / conditions</a>, agree Kaydoh may receive/process your personal data and use that data to communicate by calling or texting you about Kaydoh products and services.","leadEmail":null,"IS_BETA_USER":false};
1781
1782    if (!companyData || !userData) {
1783        console.error("Company or user data is missing.");
1784        return;
1785    }
1786
1787    const updateLogo = (logoUrl) => {
1788        if (logoUrl && logoUrl !== "") {
1789            $(".navbar-brand img").attr("src", logoUrl);
1790        }
1791    };
1792
1793    $.ajax({
1794        url: `/team/${companyData.id}/company?preview=${isPreviewMode}`,
1795        type: 'GET',
1796        success: function (result) {
1797            const company = result.data;
1798            if (company) {
1799                $.ajax({
1800                    url: `/team/${userData.id}/user?preview=${isPreviewMode}`,
1801                    type: "GET",
1802                    success: function(response) {
1803                        const user = response.data;
1804                        updateLogo(detailJson.customLogo || user?.profileCompanyLogoUrl || company.logoUrl);
1805                    },
1806                    error: function() {
1807                        updateLogo(detailJson.customLogo || company.logoUrl);
1808                    }
1809                });
1810            }
1811        },
1812        error: function (error) {
1813            console.error("Error fetching company data:", error);
1814        }
1815    });    
1816}
1817
1818function scheduleHandoutTour(url){
1819    if(url.indexOf("calendly.com/")>0){
1820        Calendly.initPopupWidget({url: url});
1821    } else {
1822        window.open(url, "_blank");
1823    }
1824    return false;
1825}
1826
1827function downlaodGalleryImage() {
1828    const imageElement = document.querySelector('#pswpGallery img.pswp__img');
1829    const dataURI = imageElement.src;
1830
1831    const downloadLink = document.createElement('a');
1832    downloadLink.download = 'my-image.png';
1833    downloadLink.href = dataURI;
1834    downloadLink.target = "_blank";
1835    downloadLink.click();
1836}
1837
1838//- Load TikTok Script to support TikTok Videos
1839function loadScript(url) {
1840    return new Promise((resolve, reject) => {
1841        if (document.getElementById('tiktok-script')) {
1842            resolve("loaded");
1843        }
1844
1845        const script = document.createElement("script");
1846        script.async = true;
1847        script.src = url;
1848        script.setAttribute('id', 'tiktok-script');
1849        script.onload = () => {
1850            resolve("loaded");
1851        };
1852        script.onerror = () => {
1853            reject("error");
1854        };
1855        document.head.appendChild(script);
1856    });
1857}       
1858
1859$(window).on("resize", function() {
1860    let propertyDescriptionHeight = $("#propertyDescription").height();
1861    let currentDescriptionChildrenHeight = 0;
1862    $("#propertyDescription").children().each(function(){
1863        currentDescriptionChildrenHeight = currentDescriptionChildrenHeight + $(this).outerHeight(true);
1864    });
1865    if (propertyDescriptionHeight < currentDescriptionChildrenHeight) {
1866        $("#readMoreLess").show();
1867    } else {
1868        $("#readMoreLess").hide();
1869    }
1870}).trigger("resize");
1871
1872//- For Main description
1873$("#readMoreLess").on("click", function() {
1874    let containerHeight = $("#propertyDescription").height();
1875    let childrenHeight = 0;
1876    $("#propertyDescription").children().each(function(){
1877        childrenHeight = childrenHeight + $(this).outerHeight(true);
1878    });
1879    if (containerHeight < childrenHeight) {
1880        $("#propertyDescription").css("max-height", childrenHeight + "px")
1881        $("#readMoreLess .fa-angle-down").css({'transform' : 'rotate('+ 180 +'deg)'})
1882    } else if (containerHeight === childrenHeight) {
1883        $("#propertyDescription").css("max-height", "350px")
1884        $("#readMoreLess .fa-angle-down").css({'transform' : 'rotate('+ -360 +'deg)'})
1885        document.getElementById("propertyDescription").scrollIntoView();
1886    }
1887})
1888
1889//- For Feature description
1890$("#readMoreLessFeat").on("click", function() {
1891    let containerHeight = $(".feature.paragraph-txt").height();
1892    let childrenHeight = 0;
1893    $(".feature.paragraph-txt").children().each(function(){
1894        childrenHeight = childrenHeight + $(this).outerHeight(true);
1895    });
1896    if (containerHeight < childrenHeight) {
1897        $(".feature.paragraph-txt").css("max-height", childrenHeight + "px")
1898        $("#readMoreLess .fa-angle-down").css({'transform' : 'rotate('+ 180 +'deg)'})
1899    } else if (containerHeight === childrenHeight) {
1900        $(".feature.paragraph-txt").css("max-height", "350px")
1901        $("#readMoreLess .fa-angle-down").css({'transform' : 'rotate('+ -360 +'deg)'})
1902        document.getElementByClassName(".feature.paragraph-txt").scrollIntoView();
1903    }
1904})
1905
1906//- Document Ready
1907$(document).ready(function () {
1908    getTrackerScripts();
1909    fetchCompany();
1910
1911    rebuildHeading($("#portMainHeading").text(), "portMainHeading");
1912    rebuildHeading($("#portSubHeading").text(), "portSubHeading");
1913    
1914    //- Fetch Questionnaires
1915    const modalEl = document.getElementById('contactsFormModel');
1916    //- KAYD-5926: build it with Bootstrap 5 so data-bs-dismiss can close it (see head.pug).
1917    contactsFormModal = new (window.kaydohBootstrap || bootstrap).Modal(modalEl, { backdrop: 'static', keyboard: false });
1918    initQuestionnaireForm(contactsFormModal);
1919    //- Append mobile number taken from url param
1920    appendMobileNumber();
1921
1922    //- Fetch Team Members & Testimonials
1923    initTeamMembers();
1924
1925    //- Init Chat Widget
1926    if (isChatWidgetEnabled) {
1927        initChatWidget();
1928    }
1929
1930    const fregParam = getURLParam("freg");
1931    const freg = fregParam == 'true' ? true : false;
1932    const eFormLock = (fregParam == null) ? false : freg;
1933
1934    //- Fetch handouts
1935    if (true) {
1936        if (false) {
1937            renderHandouts(false);
1938        } else {
1939            if (document.cookie.includes(contactQuestionnaireCookie+"=")) {
1940                renderHandouts(false);
1941            } else {
1942                renderHandouts(eFormLock)
1943            }
1944        }
1945    }
1946
1947    $("#unlockPageOverlay").hide();
1948    if((false)) {
1949        $("#unlockPageOverlay").show();
1950    } else {
1951        $("#unlockPageOverlay").remove();
1952        
1953        // Function to show contact form
1954        function showContactForm() {
1955            if (eFormLock && !document.cookie.includes(contactQuestionnaireCookie+"=")) {
1956                if (modalEl && typeof bootstrap !== 'undefined' && bootstrap.Modal) {
1957                    contactsFormModal.show();
1958                }
1959                //- Hide the cancel button on contact form
1960                $("#contactsFormCancelBtn").hide();
1961            } else {
1962                $("#contactsFormCancelBtn").show();
1963            }
1964        }
1965
1966        // Also show on initial load
1967        showContactForm();
1968    }
1969
1970    //- Release locks if cookie is available
1971    releaseLocks();
1972
1973    //- Clear questionnaire cookie if Preview Mode
1974    if (isPreviewMode) {
1975        const galleryWidgetId = "2734";
1976        const userId = "12931";
1977        const path = `/preview/${userId}/p/${galleryWidgetId}`
1978
1979        document.cookie = contactQuestionnaireCookie + "=Path=" + path + ";Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
1980    }
1981
1982    const isInAppBrowser = () => {
1983        let agent = navigator.userAgent || navigator.vendor || window.opera;
1984        return (agent.indexOf("FBAN") > -1) || (agent.indexOf("FBAV") > -1) || (agent.indexOf("FB_IAB") > -1) || (agent.indexOf("LinkedInApp") > -1);
1985    }
1986
1987    //- Description collapse Setup
1988    let containerHeight = $("#propertyDescription").height();
1989    let childrenHeight = 0;
1990    $("#propertyDescription").children().each(function(){
1991        childrenHeight = childrenHeight + $(this).outerHeight(true);
1992    });
1993
1994    if (containerHeight < childrenHeight) {
1995        $("#readMoreLess").show();
1996    } else {
1997        $("#readMoreLess").hide();
1998    }         
1999
2000    $("#videoModal").on("shown.bs.modal", function (e) {
2001        let btnElem = $(e.relatedTarget);
2002        let src = btnElem.data('src');
2003        let videoSrc = "";
2004
2005        $("#videoFrame").show();
2006        $("#videoFrameContainer").show();
2007
2008        // KAYD-5674: TikTok links saved from now on are stored as
2009        // tiktok.com/embed/v2/<id>, which is a normal iframe — it takes the else
2010        // branch below and so gets the portrait modal sizing like everything else.
2011        // This blockquote path is only for tiles saved before that, whose raw share
2012        // link an iframe can't load; it renders outside #videoFrameContainer, so
2013        // those stay landscape-framed until they're re-saved.
2014        if (src.indexOf("tiktok") !== -1 && src.indexOf("/embed") === -1) {
2015            $.ajax({
2016                url: "https://www.tiktok.com/oembed?url=" + src.trim(),
2017                type: 'GET',
2018                success: function (result) {
2019                    let cleanHtml = result.html.replaceAll("\\", "").replaceAll('
2019<script async src="https://www.tiktok.com/embed.js"><\/script>', "")                            
2020                    $("#videoFrameContainer").hide();
2021                    $("#videoFrame").hide();
2022                    
2023                    //Load tiktok script
2024                    loadScript("https://www.tiktok.com/embed.js").then(status => {
2025                        if (status === "loaded") {
2026                            $("#tiktokContainer").show();
2027                            $("#tiktokContainer").append(cleanHtml);
2028                        }
2029                    });
2030                }
2031            });
2032        } else if (src.indexOf("facebook") !== -1 || src.indexOf("fb.watch") !== -1) {
2033            let encodedUrl = encodeURIComponent(src);
2034            videoSrc = `https://www.facebook.com/plugins/video.php?href=${encodedUrl.trim()}&show_text=false&t=0`;
2035        } else {
2036            videoSrc = src;
2037            // Scope Mux Data views to this landing page (KAYD-5780) — mirrors HVE's
2038            // sid=hve_<id>. Only Kaydoh play URLs carry it so other embeds are untouched.
2039            if (window.kaydoh_gwid && /video(-staging)?\.kaydoh\.com\/play\//i.test(videoSrc)) {
2040                videoSrc += (videoSrc.indexOf('?') === -1 ? '?' : '&') + 'sid=page_' + window.kaydoh_gwid;
2041                // Suppress Mux for internal previews (dashboard / mobile app) — forward na=1 to
2042                // the player. QR / email / social / organic keep recording.
2043                try {
2044                    var _utm = new URLSearchParams(window.location.search).get('utm_source');
2045                    if (_utm === 'dashboard' || _utm === 'mobile_app') videoSrc += '&na=1';
2046                } catch (e) {}
2047            }
2048        }
2049
2050        $("#videoFrame").attr(
2051            "src",
2052            videoSrc
2053        );
2054
2055        // Content engagement (KAYD-5780) — deliberate open + dwell (fired on close below).
2056        // Same properties HVE sends for handout_opened (attrs set in handouts.pug).
2057        window.__kaydohContentOpenAt = Date.now();
2058        window.__kaydohContentMeta = {
2059            handoutId: btnElem.attr('data-handout-id') || null,
2060            handoutTitle: btnElem.attr('data-handout-title') || (btnElem.text() || '').trim() || null,
2061            handoutType: btnElem.attr('data-handout-type') || null,
2062            handoutUrl: btnElem.attr('data-handout-url') || null,
2063            handoutThumbnailUrl: btnElem.attr('data-handout-thumbnail') || null,
2064        };
2065        if (window.kaydohCapture) {
2066            window.kaydohCapture('page_content_opened', window.__kaydohContentMeta);
2067        }
2068    });
2069
2070    // stop playing the youtube video when I close the modal
2071    $("#videoModal").on("hide.bs.modal", function (e) {
2072        $("#videoFrame").attr("src", "");
2073        $("#tiktokContainer").html("");
2074        $("#tiktokContainer").hide();
2075
2076        // Content dwell (KAYD-5780) — how long the content modal was open.
2077        if (window.kaydohCapture && window.__kaydohContentOpenAt) {
2078            var meta = window.__kaydohContentMeta || {};
2079            window.kaydohCapture('page_content_dwell', {
2080                handoutId: meta.handoutId || null,
2081                handoutTitle: meta.handoutTitle || null,
2082                handoutType: meta.handoutType || null,
2083                handoutUrl: meta.handoutUrl || null,
2084                handoutThumbnailUrl: meta.handoutThumbnailUrl || null,
2085                dwell_ms: Date.now() - window.__kaydohContentOpenAt,
2086            });
2087            window.__kaydohContentOpenAt = null;
2088        }
2089    });
2090
2091    $("#unlockLandingPage").on('click', function() {
2092        unlockLandingPage();
2093    })
2094
2095    $('#passwordInput').keypress(function (e) {
2096        if (e.key == "Enter") {
2097            $('#unlockLandingPage').click();
2098            return false;  
2099        }
2100    });
2101
2102    //- Handout Password Unlock
2103    $("#handoutPassword").on('show.bs.modal', function(e) {
2104        const element = $(e.relatedTarget);
2105        const landingHandoutId = element.data('lhid');
2106        const index = element.data('index');
2107        const modal = $(this); 
2108
2109        modal.find("#landingHandoutId").val(landingHandoutId);
2110        modal.find("#index").val(index);
2111        modal.find("#handoutPasswordInput").val("");
2112    });
2113
2114    //- Set Animation
2115    const animations = detailJson.animations ? detailJson.animations : null;
2116
2117    if (animations) {
2118        applyAnimations(animations);
2119    }
2120
2121});
2122
2123function getURLParam(name, url = window.location.href) {
2124    name = name.replace(/[\[\]]/g, '\\$&');
2125    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)', "i"),
2126        results = regex.exec(url);
2127    if (!results) return null;
2128    if (!results[2]) return '';
2129    return decodeURIComponent(results[2].replace(/\+/g, ' '));
2130}
2131
2132function rebuildHeading(str, id){
2133    let queryString = window.location.href
2134    let foundMain = [],
2135        rxp = /{([^}]+)}/g,
2136        curMatch,
2137        resultStr = str;
2138
2139    while( curMatch = rxp.exec(str) ) {
2140        foundMain.push(curMatch[1]);
2141    }
2142
2143    if (foundMain.length != 0) {
2144        foundMain.forEach(elem => {
2145            let paramValue = getURLParam(elem, queryString)
2146            if (paramValue && paramValue != '') {
2147                resultStr = resultStr.replace(`{${elem}}`, paramValue)
2148            } else {
2149                resultStr = resultStr.replace(`{${elem}}`, "")
2150            }
2151        })
2152    }
2153
2154    $("#" + id).text(resultStr)
2155}
2156
2157//- Append mobile number taken from url param
2158function appendMobileNumber() {
2159    let mobileNumber = getURLParam("m");
2160    if (mobileNumber && mobileNumber != '') {
2161        $("input[type='tel']").val(mobileNumber);
2162    }
2163}
2164
2165function releaseLocks(){
2166    if(document.cookie.includes(contactQuestionnaireCookie+"=")){
2167        $(".lock-overlay,.unlock-row,#lockAlert").remove();
2168    }
2169}
2170function unlockLandingPage() {
2171    console.log("Unlocking landing page...");
2172    if (true) {
2173        onUnlock(2734, $("#passwordInput").val(), (boolean) => renderHandouts(boolean))
2174    } else {
2175        onUnlock(2734, $("#passwordInput").val(), (boolean) => boolean)
2176    }
2177}
2178
2179function getTrackerScripts() {
2180    console.log("Getting tracker scripts...");
2181    const userId = "12931";
2182    $.ajax({
2183        url: `/misc/scripts/${userId}?preview=${isPreviewMode}`,
2184        type: 'GET',
2185        success: function (result) {
2186            const trackerScripts = result.data;
2187            let headTrackerScripts = "", bodyStartTrackerScripts = "", bodyEndTrackerScripts = "";
2188
2189            trackerScripts.forEach(function(trackerScript) {
2190                headTrackerScripts += (trackerScript.headScript ? trackerScript.headScript : "");
2191                bodyStartTrackerScripts += (trackerScript.bodyStartScript ? trackerScript.bodyStartScript : "");
2192                bodyEndTrackerScripts += (trackerScript.bodyEndScript ? trackerScript.bodyEndScript : "");
2193            });
2194            $("head").append(headTrackerScripts);
2195            $("#bodyStartTrackerScripts").html(bodyStartTrackerScripts);
2196            $("#bodyEndTrackerScripts").html(bodyEndTrackerScripts);
2197        },
2198        error: function (error) {
2199            console.log(error);
2200        }
2201    });
2202}
2203
2204function joinZoom(){
2205    var contactId = document.cookie.split(";").filter(function(x){return x.trim().startsWith(contactQuestionnaireCookie);})[0].split("=")[1];
2206        $.getJSON("/zoom/landing-page/2734/"+contactId, function(res) {
2207            ZoomMtg.init({
2208                debug: true,
2209                leaveUrl: "https://pages.kaydoh.com/12931/p/2734/0mIHoKAWz",
2210                isSupportAV: true,
2211                success: function() {
2212                    ZoomMtg.join({
2213                        signature: res.zoomSignature,
2214                        meetingNumber: res.zoomMeetingId,
2215                        userName: res.userName,
2216                        apiKey: res.zoomApiKey,
2217                        userEmail: res.email,
2218                        passWord: res.passCode,
2219                        success: (success) => {
2220                            console.log(success)
2221                        },
2222                        error: (error) => {
2223                            console.log(error)
2224                        }
2225                    });
2226                }
2227            });
2228        });
2229}</script>
2229</html>

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.