!function(e){try{const q=new URLSearchParams(location.search),K=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid"],A={};K.forEach(k=>{const v=q.get(k);v&&(A[k]=v)});if(Object.keys(A).length){const s=JSON.stringify(A);try{sessionStorage.setItem("kandua_attr",s)}catch(e2){}try{e.cookie="kandua_attr="+encodeURIComponent(s)+";domain=.kandua.com;path=/;max-age=2592000;SameSite=Lax"}catch(e2){}}}catch(e2){}!function(){const t=e.createElement("link");t.rel="stylesheet",t.href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css",e.head.appendChild(t);const n=e.createElement("script");n.src="https://cdn.jsdelivr.net/npm/flatpickr",e.head.appendChild(n);const o=e.createElement("script");o.src="https://cdn.voiceflow.com/widget-next/bundle.mjs",o.type="text/javascript",o.onload=()=>{let t;const n=(()=>{let t,n,o=0;return{enable:()=>{innerWidth>1024||(t||(t=e.querySelector('meta[name="viewport"]'),t||(t=e.createElement("meta"),t.name="viewport",e.head.appendChild(t)),n=t.getAttribute("content")||"width=device-width, initial-scale=1"),o++,t.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"))},disable:()=>{innerWidth>1024||setTimeout(()=>{o=Math.max(0,o-1),t&&0===o&&null!=n&&t.setAttribute("content",n)},50)},blurActive:()=>{try{e.activeElement?.blur?.()}catch(e){}}}})(),o=(()=>{const t="data-vf-hide-composer";let n,o=!1,a=new Set;const i=()=>{const t=new Set([e]),n=[e],o=new Set(n);for(;n.length;){const e=n.shift();(e instanceof Document||e instanceof ShadowRoot?e.querySelectorAll("*"):[]).forEach(e=>{e&&e.shadowRoot&&!o.has(e.shadowRoot)&&(o.add(e.shadowRoot),t.add(e.shadowRoot),n.push(e.shadowRoot))})}return[...t]},r=n=>{if(!n||!(n instanceof Document||n instanceof ShadowRoot))return;if(n.querySelector(`style[${t}]`))return;const o=e.createElement("style");o.setAttribute(t,"1"),o.textContent=".vfrc-input-container,.vfrc-footer,.vfrc-composer,.vfrc-message-composer,.vfrc-chat-input-container{display:none!important}";try{n.appendChild(o),a.add(n)}catch(e){}},s=e=>{const n=e.querySelector?.(`style[${t}]`);if(n)try{n.remove()}catch(e){}a.delete(e)};return{hide(){o=!0,i().forEach(r),n||(n=new MutationObserver(()=>{o&&i().forEach(r)}),n.observe(e.documentElement,{childList:!0,subtree:!0}))},show(){o=!1,a.forEach(s),a.clear(),n?.disconnect?.(),n=null}}})(),a=(()=>{const e='.vfrc-avatar,[class*="vfrc-avatar"]',t=new WeakMap,n=t=>{t.querySelectorAll(e).forEach(e=>{e.style.display="none",e.style.visibility="hidden",e.style.width="0",e.style.margin="0",e.style.padding="0"})};return{hideFor:o=>{const a=(t=>{let n=t;for(let t=0;t<12&&n;t++){if(n.querySelector?.(e))return n;n=n.parentElement||n.getRootNode&&n.getRootNode().host||null}return null})(o);if(!a)return;if(n(a),t.has(a))return;const i=new MutationObserver(e=>{let t=!1;for(const n of e)n.addedNodes&&n.addedNodes.length&&(t=!0);t&&n(a)});i.observe(a,{childList:!0,subtree:!0}),t.set(a,i),setTimeout(()=>{i.disconnect(),t.delete(a)},1200)}}})(),i=(t,n)=>{const o=[],a=[e],i=new Set(a);for(;a.length;){const e=a.shift();o.push(e),(e instanceof Document||e instanceof ShadowRoot?e.querySelectorAll("*"):[]).forEach(e=>{e&&e.shadowRoot&&!i.has(e.shadowRoot)&&(i.add(e.shadowRoot),a.push(e.shadowRoot))})}o.forEach(o=>{if(!o||!(o instanceof Document||o instanceof ShadowRoot))return;if(o.querySelector(`style[${n}]`))return;const a=e.createElement("style");a.setAttribute(n,"1"),a.textContent=t;try{o.appendChild(a)}catch(e){}})};function r(e){let t=e,n=0;for(;t&&n<20;){const e=(t.className||"")+"";if("listitem"===t.getAttribute?.("role")||/vfrc-.*(message|bubble|response|chat|row)/i.test(e))return t;t=t.parentNode||t.getRootNode&&t.getRootNode().host||null,n++}return null}function s(e){try{if(!e)return;let t=e;for(let e=0;e<15&&t;e++){if((t.className||"").includes("vfrc-system-response")){t.style.display="none",t.style.height="0",t.style.margin="0",t.style.padding="0",t.style.overflow="hidden";break}t=t.parentElement||t.getRootNode&&t.getRootNode().host||null}}catch(e){}}i(".vf-wide-card{width:100%!important;max-width:100%!important;display:block!important}.vf-wide-card>.vf-form-card{width:100%!important;max-width:100%!important}.vf-savefx-success{background:#00bf63!important;transition:background .22s ease,transform .22s ease,opacity .3s ease}.vf-savefx-bounce{transform:translateY(-1px) scale(1.02)}.vf-savefx-hide{opacity:0;transform:translateY(-6px) scale(.98);pointer-events:none;transition:opacity .28s ease,transform .28s ease}","data-vf-styles"),i(".vf-loader-card{padding:16px;border:1px solid #e5e7eb;border-radius:12px;margin:12px 0;background:#f8fafc;width:100%}.vf-loader-wrap{display:flex;align-items:center;gap:14px}.vf-spinner{width:46px;height:46px;border-radius:9999px;border:4px solid #dbeafe;border-top-color:#0551fb;animation:vfSpin 1s linear infinite;flex:0 0 auto}@keyframes vfSpin{to{transform:rotate(360deg)}}.vf-loader-text{display:flex;flex-direction:column}.vf-loader-title{font-weight:800;color:#0f172a;font-size:16px}.vf-loader-sub{color:#334155;font-size:14px;margin-top:2px}.vf-dots{display:inline-flex;gap:4px;margin-top:6px}.vf-dot{width:6px;height:6px;border-radius:9999px;background:#0551fb;opacity:.35;animation:vfBounce 1s ease-in-out infinite}.vf-dot:nth-child(2){animation-delay:.15s}.vf-dot:nth-child(3){animation-delay:.3s}@keyframes vfBounce{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-6px);opacity:1}}","data-vf-loader-styles"),i('[class*="vfrc-message--extension-"]{background:transparent!important;padding:0!important;border-radius:0!important}',"data-vf-unbubble"),i(".vfrc-chat--dialog{flex:1 1 auto!important;min-height:0!important}","data-vf-fill");const l=new Set,d=e=>{try{return"string"==typeof e?.payload?JSON.parse(e.payload):e?.payload||{}}catch(e){return{}}};const c=(()=>{const e=new Map;function t(e,t){if("function"==typeof gtag)try{gtag("event",e,t)}catch(e){}}return{trackEvent:t,trackStart:function(t){e.set(t,Date.now())},trackComplete:function(n,o={}){const a=e.get(n);t(`${n}_complete`,a?{...o,duration_seconds:Math.round((Date.now()-a)/1e3)}:o)},sessions:e}})(),p=(e,t,n,o)=>({name:e,type:"response",match:({trace:t})=>t?.type===e||t?.payload?.name===e,render:({element:e})=>(c.trackStart(t),c.trackEvent(n,o),s(e),()=>{})}),f=(e,t,n)=>({name:e,type:"response",match:({trace:t})=>t?.type===e||t?.payload?.name===e,render:({trace:e,element:o})=>(c.trackComplete(t,n(d(e))),s(o),()=>{})}),P=(e,t)=>({name:e,type:"response",match:({trace:n})=>n?.type===e||n?.payload?.name===e,render:({trace:n,element:o})=>(c.trackEvent(t,{event_category:"funnel",...d(n)}),s(o),()=>{})}),TRK=[P("ext_web_entry","web_entry"),P("ext_chatInitiated","chat_initiated"),P("ext_conversationStarted","conversation_started"),P("ext_mainIntent","main_intent"),P("ext_getGuidance","get_guidance"),p("ext_plumbingDiagnoseStart","plumbing_diagnose","plumbing_diagnose_start",{event_category:"funnel"}),f("ext_plumbingDiagnoseEnd","plumbing_diagnose",e=>({event_category:"funnel",...e})),p("ext_electricianDiagnoseStart","electrician_diagnose","electrician_diagnose_start",{event_category:"funnel"}),f("ext_electricianDiagnoseEnd","electrician_diagnose",e=>({event_category:"funnel",...e})),p("ext_locationStart","location_capture","location_capture_start",{event_category:"funnel"}),f("ext_locationEnd","location_capture",e=>({event_category:"funnel",...e})),P("ext_locationFallback","location_fallback"),p("ext_dateTimeCaptureStart","datetime_capture","datetime_capture_start",{event_category:"funnel"}),f("ext_dateTimeCaptureEnd","datetime_capture",e=>({event_category:"funnel",...e})),P("ext_proCheckAPIFailed","pro_check_api_failed"),P("ext_checkForProsSuccess","check_for_pros_success"),P("ext_pros_found","pros_found"),p("ext_finalDetailsStart","final_details","final_details_start",{event_category:"funnel"}),f("ext_finalDetailsCaptured","final_details",e=>({event_category:"funnel",...e})),P("ext_jobPostSuccess","job_post_success")],y={name:"ext_loading_on_first",type:"response",match:({trace:e})=>"ext_loading_on_first"===e?.type||"ext_loading_on_first"===e?.payload?.name,render:({trace:t,element:i})=>{const s=d(t),c=s.label||"Please wait a moment...",p=Math.max(1e3,Number(s.min_ms||0));o.hide(),n.enable();const f=e.createElement("div");return f.className="vf-anti-zoom vf-wide-card vf-loader-card",f.setAttribute("role","status"),f.setAttribute("aria-live","polite"),f.setAttribute("aria-busy","true"),f.innerHTML=`
Looking for nearby Pros
${c}
`,i.appendChild(f),L(i,f),a.hideFor(f),l.add({node:f,contentEl:i,wrapper:r(i),started:Date.now(),minMs:p}),()=>{}}},w={name:"ext_loading_off_first",type:"response",match:({trace:e})=>"ext_loading_off_first"===e?.type||"ext_loading_off_first"===e?.payload?.name,render:()=>(function(){const e=Date.now();l.forEach(t=>{const{node:a,contentEl:i,started:s,minMs:d}=t,c=Math.max(0,s+d-e);setTimeout(()=>{try{a?.remove()}catch(e){}!function(e){try{if(!e)return;if(0===e.childElementCount&&""===(e.textContent||"").trim()){const t=r(e)||e.parentNode;if(t)try{t.remove()}catch(e){}}}catch(e){}}(i);try{l.delete(t)}catch(e){}0===l.size&&(o.show(),n.disable())},c)})}(),()=>{}),},k=(()=>{function e(e,t){e&&e.classList.add("vf-savefx-hide"),t&&t.classList.add("vf-savefx-hide"),setTimeout(()=>{e&&(e.style.display="none"),t&&(t.style.display="none")},320)}return{celebrate(t,n){t&&(t.classList.add("vf-savefx-success","vf-savefx-bounce"),setTimeout(()=>t.classList.remove("vf-savefx-bounce"),240),setTimeout(()=>e(t,n),1e3))},hideBoth:e}})(),L=(e,t)=>{try{e.style.width=e.style.maxWidth="100%",e.style.alignSelf="stretch"}catch(e){}try{t.style.width=t.style.maxWidth="100%"}catch(e){}let n=e.parentElement;for(let e=0;e<4&&n;e++){try{n.style&&(n.style.width=n.style.maxWidth="100%",n.style.flex="1 1 100%",n.style.alignSelf="stretch")}catch(e){}n=n.parentElement||n.getRootNode&&n.getRootNode().host||null}},S=(e,n)=>{try{t?.setVariable?.(e,n)}catch(e){}},C=({label:t,description:n,htmlField:o,submitText:a="Save",errorText:i="Please fix the error above."})=>{const r=e.createElement("div");if(r.className="vf-wide-card",r.innerHTML=`
${n?`

${n}

`:""}${o}
`,!e.getElementById("vf-anti-zoom-style")){const t=e.createElement("style");t.id="vf-anti-zoom-style",t.textContent="@media(max-width:1024px){.vf-anti-zoom input,.vf-anti-zoom textarea,.vf-anti-zoom select{font-size:16px!important;-webkit-text-size-adjust:100%}}",e.head.appendChild(t)}return r},_={name:"ext_location_picker",type:"response",match:({trace:e})=>"ext_location_picker"===e?.type||"ext_location_picker"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");if(r.className="vf-wide-card",r.innerHTML='
Location confirmed
Where do you need help?
Type your suburb, then pick from the list
Select your suburb from the suggestions below
Selected suburbChange
Getting your location...
Please select your suburb before continuing.
Can\'t find your suburb? Enter it another way
',!e.getElementById("vf-anti-zoom-style")){const st=e.createElement("style");st.id="vf-anti-zoom-style",st.textContent="@media(max-width:1024px){.vf-anti-zoom input,.vf-anti-zoom textarea,.vf-anti-zoom select{font-size:16px!important;-webkit-text-size-adjust:100%}}",e.head.appendChild(st)}i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelector(".vf-loc-input"),d=r.querySelector(".vf-loc-drop"),c=r.querySelector(".vf-loc-helper"),p=r.querySelector(".vf-loc-chip"),f=r.querySelector(".vf-loc-chip-val"),v=r.querySelector(".vf-loc-loading"),h=r.querySelector(".vf-loc-error"),u=r.querySelector(".vf-loc-btn"),m=r.querySelector(".vf-loc-inputwrap"),g=r.querySelector(".vf-loc-main"),x=r.querySelector(".vf-loc-done"),b=r.querySelector(".vf-loc-done-val"),y=r.querySelector(".vf-loc-fallback a"),D=r.querySelector(".vf-loc-change"),F=r.querySelector(".vf-form-card");let w=null,_=null,z=null,E=null;function T(){v.classList.remove("show")}function j(e){h.textContent=e,h.style.display="block",T()}function q(){h.style.display="none"}function A(e){const t=["sublocality_level_1","locality","administrative_area_level_3"];for(const n of t){const t=e.find(e=>e.types.includes(n));if(t)return t.long_name}return""}function G(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{try{const t=e=>e.parentElement||e.getRootNode&&e.getRootNode().host||null,n=e=>{try{const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflowY)&&e.scrollHeight>e.clientHeight+4}catch(e){return!1}};let o=t(u);for(let a=0;a<30&&o&&o!==e.documentElement&&o!==e.body;a++){try{!n(o)&&o.scrollTop&&(o.scrollTop=0)}catch(e){}o=t(o)}let a=null,i=u;for(let e=0;e<30&&i;e++){if(i.classList&&i.classList.contains("vfrc-chat--dialog")){a=i;break}i=t(i)}if(!a||!n(a)){let o=t(u);for(let i=0;i<30&&o&&o!==e.documentElement&&o!==e.body;i++){if(n(o)){a=o;break}o=t(o)}}if(!a||!n(a))return;const r=a.getBoundingClientRect(),s=u.getBoundingClientRect().bottom-r.bottom+24;s>0&&a.scrollTo({top:a.scrollTop+s,behavior:"smooth"})}catch(e){}})})}function H(t){z&&(v.querySelector("span").textContent="Getting location details...",v.classList.add("show"),d.classList.remove("show"),s.classList.remove("open"),z.getDetails({placeId:t.place_id,fields:["address_components","formatted_address","geometry","name"],sessionToken:E},(t,i)=>{if(T(),i===google.maps.places.PlacesServiceStatus.OK&&t){const i={formattedAddress:t.formatted_address,suburb:A(t.address_components||[])||t.name||"",lat:t.geometry.location.lat(),lng:t.geometry.location.lng()};w=i,s.value=t.formatted_address,f.textContent=i.formattedAddress,p.classList.add("show"),m.style.display="none",c.classList.remove("show"),u.disabled=!1,q(),E=new google.maps.places.AutocompleteSessionToken,G()}else j("Could not get location details. Please try another suburb.")}))}function B(t){d.innerHTML="";const V=(t||[]).filter(p2=>(p2.types||[]).some(q2=>["sublocality","sublocality_level_1","locality","neighborhood"].includes(q2)));if(0===V.length)return d.innerHTML='
No suburbs found. Try a different spelling.
',d.classList.add("show"),void s.classList.add("open");V.slice(0,2).forEach(t=>{const n=e.createElement("div");n.className="vf-loc-item",n.innerHTML='',n.querySelector(".vf-loc-item-main").textContent=t.structured_formatting.main_text,n.querySelector(".vf-loc-item-sec").textContent=t.structured_formatting.secondary_text,n.addEventListener("click",()=>H(t)),n.addEventListener("touchstart",()=>{n.style.background="#dbeafe"},{passive:!0}),n.addEventListener("touchend",()=>{n.style.background=""},{passive:!0}),d.appendChild(n)}),d.classList.add("show"),s.classList.add("open")}return D.addEventListener("click",()=>{w=null,p.classList.remove("show"),m.style.display="",u.disabled=!0,q(),s.focus()}),y.addEventListener("click",e=>{e.preventDefault(),t.interact({type:"captured",payload:{locationFallback:!0}}),n.blurActive(),o.show(),n.disable()}),u.onclick=()=>{w?(q(),S("formattedAddress",w.formattedAddress),S("suburb",w.suburb),S("googleLat",w.lat.toString()),S("googleLong",w.lng.toString()),b.textContent=w.formattedAddress,g.style.opacity="0",setTimeout(()=>{g.style.display="none",x.classList.add("show"),F.style.padding="0",F.style.border="none",F.style.background="transparent"},250),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{formattedAddress:w.formattedAddress,suburb:w.suburb,latitude:w.lat,longitude:w.lng,locationConfirmed:!0}})):j("Please select your suburb before continuing.")},async function(){try{await new Promise((t,n)=>{if(window.google&&window.google.maps)return void t();const o=e.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC51PJx9faiS3ptAxYuMfkYKKtTU00Tz-Q&libraries=places",o.onload=()=>t(),o.onerror=()=>n(new Error("Failed to load Google Maps")),e.head.appendChild(o)}),_=new google.maps.places.AutocompleteService;const t=e.createElement("div");t.style.display="none",e.body.appendChild(t),z=new google.maps.places.PlacesService(t),E=new google.maps.places.AutocompleteSessionToken,function(){let t;s.addEventListener("input",()=>{const e=s.value.trim();return clearTimeout(t),0===e.length?(c.classList.remove("show"),d.classList.remove("show"),void s.classList.remove("open")):(c.textContent="Select your suburb from the suggestions below",c.classList.add("show"),void(t=setTimeout(()=>{var t;e.length>=1&&(t=e,_&&_.getPlacePredictions({input:t,componentRestrictions:{country:"za"},types:["(regions)"],sessionToken:E},(e,t)=>{t===google.maps.places.PlacesServiceStatus.OK&&e?B(e):t===google.maps.places.PlacesServiceStatus.ZERO_RESULTS?(d.innerHTML='
No suburbs found. Try a different spelling.
',d.classList.add("show"),s.classList.add("open")):(d.classList.remove("show"),s.classList.remove("open"))}))},300)))}),s.addEventListener("keydown",e=>{" "!==e.key&&32!==e.keyCode||e.stopPropagation()}),e.addEventListener("click",e=>{m.contains(e.target)||(d.classList.remove("show"),s.classList.remove("open"))})}()}catch(e){j("Failed to load location services. Please refresh and try again.")}}(),()=>{o.show(),n.disable()}}},z={name:"calendar-picker",type:"response",match:({trace:e})=>"calendar"===e?.type||"calendar-picker"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");if(r.className="vf-wide-card",r.innerHTML='
Date confirmed
When do you need help?
Pick a day that suits you
Selected date
Please pick a date before confirming.
',!e.getElementById("vf-anti-zoom-style")){const st=e.createElement("style");st.id="vf-anti-zoom-style",st.textContent="@media(max-width:1024px){.vf-anti-zoom input,.vf-anti-zoom textarea,.vf-anti-zoom select{font-size:16px!important;-webkit-text-size-adjust:100%}}",e.head.appendChild(st)}i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelector(".vf-calendar"),h=r.querySelector(".vf-cal2-error"),b=r.querySelector(".vf-cal2-btn"),p=r.querySelector(".vf-cal2-chip"),f=r.querySelector(".vf-cal2-chip-val"),m=r.querySelector(".vf-cal2-main"),x=r.querySelector(".vf-cal2-done"),D=r.querySelector(".vf-cal2-done-val"),F=r.querySelector(".vf-form-card"),W=e2=>{try{const[a2,b2,c2]=e2.split("-").map(Number);return new Date(a2,b2-1,c2).toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return e2}},n1=new Date,n2=new Date(n1.getFullYear(),n1.getMonth(),n1.getDate()),n3=new Date(n2.getFullYear()+1,11,31);let g=null,G="";return flatpickr(s,{inline:!0,appendTo:s,monthSelectorType:"static",minDate:n2,maxDate:n3,showMonths:1,disableMobile:!0,dateFormat:"Y-m-d",defaultDate:null,onChange:(e2,t2)=>{g=t2,t2&&(b.disabled=!1,h.style.display="none",G=W(t2),f.textContent=G,p.classList.add("show"))}}),b.onclick=()=>{g?(h.style.display="none",S("date",g),D.textContent=G,m.style.opacity="0",setTimeout(()=>{m.style.display="none",x.classList.add("show"),F.style.padding="0",F.style.border="none",F.style.background="transparent"},250),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{date:g,urgent:!1}})):h.style.display="block"},()=>{o.show(),n.disable()}}},E={name:"ext_Intent",type:"response",match:({trace:e})=>"ext_Intent"===e?.type||"ext_Intent"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");r.className="vf-wide-card",r.innerHTML='\n
\n \n\n
\n
\n
\n
You selected
\n
\n
\n
\n
\n\n
How can I help you today?
\n\n
\n
\n \n Get a plumber\n \n
\n\n
\n \n Get an electrician\n \n
\n\n
\n Jess\n \n Get guidance\n Ask Jess anything about improving, maintaining and protecting your home\n \n \n
\n
\n\n
We currently only support plumbing and electrical services in Gauteng and Cape Town areas. We\'ll be expanding soon \ud83d\ude80.
\n
\n ',i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelectorAll(".vf-intent-card"),l=r.querySelector(".vf-intent-head"),d=r.querySelector(".vf-intent-options"),c=r.querySelector(".vf-intent-disclaimer"),p=r.querySelector(".vf-intent-selected"),f=r.querySelector(".vf-intent-selected-lead"),v=r.querySelector(".vf-intent-selected-value"),h=r.querySelector(".vf-form-card");return s.forEach(e=>{e.onclick=()=>{const a=e.getAttribute("data-intent"),i=e.getAttribute("data-label"),r=e.querySelector(".vf-intent-lead");s.forEach(e=>{e.style.pointerEvents="none",e.style.opacity="0.4"}),e.classList.add("selected"),e.style.opacity="1",S("mainIntent",a),setTimeout(()=>{l.style.opacity="0",d.style.opacity="0",c.style.opacity="0",setTimeout(()=>{l.style.display="none",d.style.display="none",c.style.display="none",f.innerHTML="",r&&f.appendChild(r.cloneNode(!0)),v.textContent=i,p.style.display="flex",h.style.padding="12px",requestAnimationFrame(()=>{p.style.opacity="0",p.style.transform="translateY(-10px)",requestAnimationFrame(()=>{p.style.transition="all 0.3s ease",p.style.opacity="1",p.style.transform="translateY(0)"})})},300)},400),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{mainIntent:a}})}}),()=>{o.show(),n.disable()}}},M={name:"ext_handover",type:"response",match:({trace:e})=>"ext_handover"===e?.type||"ext_handover"===e?.payload?.name,render:({trace:i,element:r})=>{o.hide(),n.enable();const s=(()=>{try{return"string"==typeof i?.payload?JSON.parse(i.payload):i?.payload||{}}catch(e){return{}}})();const kdV=x2=>{const y2=null==x2?"":String(x2).trim();return y2&&"0"!==y2&&"null"!==y2&&"undefined"!==y2?y2:""};let l=kdV(s.user_id)||kdV(s.userId),d=kdV(s.service)||kdV(s.services)||kdV(s.selected_services),c=kdV(s.location),p=kdV(s.vf_transcript_id)||kdV(s.transcriptId);try{!l&&t?.getVariable&&(l=t.getVariable("user_id")||""),!d&&(d=KD_SEL||""),!d&&t?.getVariable&&(d=t.getVariable("selected_services")||""),!p&&t?.getVariable&&(p=t.getVariable("vf_transcript_id")||"")}catch(e){}try{"function"==typeof gtag&>ag("event","handover_to_pwa",{event_category:"funnel",event_label:"Handover card shown",user_id:l||"unknown",transcript_id:p||"unknown"})}catch(e){}const f=(()=>{let u2=`https://marketplace.kandua.com/?conversation=${encodeURIComponent(l)}&redirect=book&service=${encodeURIComponent(d)}&location=${encodeURIComponent(c)}`;try{let a2=null;try{a2=sessionStorage.getItem("kandua_attr")}catch(e2){}if(!a2){const m2=e.cookie.match(/(?:^|; )kandua_attr=([^;]*)/);m2&&(a2=decodeURIComponent(m2[1]))}if(a2){const o2=JSON.parse(a2);for(const k2 in o2)u2+="&"+encodeURIComponent(k2)+"="+encodeURIComponent(o2[k2])}}catch(e2){}return u2})(),v=e.createElement("div");v.className="vf-wide-card",v.innerHTML=`
Top-rated Pros found near yourated 4.5+
One last step to book
Create your free account and confirm your booking.
Get and approve your quote
Track and manage your job
Pay securely
Vetted Pros only
Please tick the box above to accept our T&C's
Complete booking
Takes under a minute: sign in with your email. Then we'll just need your name and number too.
Your booking has moved to the secure portal \u2014 please complete it there.
`,r.appendChild(v),L(r,v),a.hideFor(v);const h=v.querySelector(".vf-ho2-btn"),u=v.querySelector(".vf-ho2-locked"),tcChk=v.querySelector(".vf-wt-chk"),tcPanel=v.querySelector(".vf-wt-consent"),tcBadge=v.querySelector(".vf-wt-badge"),tcToast=v.querySelector(".vf-wt-toast"),tcLink=v.querySelector(".vf-wt-act a");let tcT=null;tcLink&&tcLink.addEventListener("click",e2=>e2.stopPropagation());const tcSync=()=>{h.classList.toggle("vf-wt-off",!tcChk.checked),h.setAttribute("aria-disabled",tcChk.checked?"false":"true"),tcPanel.classList.toggle("on",tcChk.checked),tcBadge.textContent=tcChk.checked?"Done":"Required",tcChk.checked&&(tcToast.classList.remove("show"),tcPanel.classList.remove("nudge"),clearTimeout(tcT))};tcChk.addEventListener("change",tcSync),tcSync();h.addEventListener("click",ev=>{if(!tcChk.checked){ev.preventDefault(),tcToast.classList.add("show"),tcPanel.classList.remove("nudge");void tcPanel.offsetWidth;tcPanel.classList.add("nudge"),clearTimeout(tcT),tcT=setTimeout(()=>{tcToast.classList.remove("show"),tcPanel.classList.remove("nudge")},3200);return}S("termsAccepted","true");try{"function"==typeof gtag&>ag("event","handover_click",{event_category:"funnel",event_label:"User clicked through to booking portal",user_id:l||"unknown",transcript_id:p||"unknown"})}catch(e){}(()=>{try{o.hide(),n.disable(),n.blurActive(),u.classList.add("show");let e=0;const t=setInterval(()=>{o.hide(),e++,e>20&&clearInterval(t)},500)}catch(e){}})()}),o.hide(),requestAnimationFrame(()=>{try{o.hide()}catch(e){}}),setTimeout(()=>{try{o.hide()}catch(e){}},50);const w=setInterval(()=>{try{o.hide()}catch(e){}},500);return()=>{try{clearInterval(w),clearTimeout(tcT)}catch(e){}o.hide(),n.disable()}}},T={name:"ext_welcome",type:"response",match:({trace:e})=>"ext_welcome"===e?.type||"ext_welcome"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");return r.className="vf-wide-card",r.innerHTML='\n
\n \n\n
\n \n Trusted by 85,000+ households\n
\n\n
Here\'s how I\'ll help you
\n
Three quick steps \u2014 about two minutes.
\n\n
\n
1
\n
\n
Tell me what\'s wrong
\n
I\'ll ask a few quick questions to diagnose the problem, so we match you with the perfect Pro.
\n
\n
\n\n
\n
2
\n
\n
Where and when
\n
Share your location and the day you\'d like the work done.
\n
\n
\n\n
\n
3
\n
\n
Complete your booking
\n
Create your account to complete the booking, then track and manage the whole job securely \u2014 from booking to paid.
\n
\n
\n\n
\n Vetted Pros\n Secure\n No obligation\n
\n\n \n
\n ',i.appendChild(r),L(i,r),a.hideFor(r),r.querySelector(".vf-welcome-btn").addEventListener("click",()=>{n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{started:!0}})}),()=>{o.show(),n.disable()}}};function j({name:t,step:n,label:o}){return{name:t,type:"response",match:({trace:e})=>e?.type===t||e?.payload?.name===t,render:({element:i})=>{const p=['','','',''],u=[3,2.2,2.2,2.5],d=k=>{const c2=k1&&k<=n?k===n?" vf-ps-halo":" vf-ps-pop":"",d2=1===k?0:.1+.5*(k-2)+.35;return``},h=k=>k`:'',v=(n-1)/3*100,w2=13-.26*v,x=.1+.5*(n-2)+.75,m=e.createElement("div");m.className="vf-ps-wrap vf-wide-card",m.innerHTML=`
${d(1)}${h(1)}${d(2)}${h(2)}${d(3)}${h(3)}${d(4)}
${o}Step ${n} of 4
`,i.appendChild(m),L(i,m),a.hideFor(m)}}}const q=j({name:"ext_progress_step1",step:2,label:"Tell us what you need done"}),A=j({name:"ext_progress_step2",step:3,label:"Where and when you need help"}); /* ==================== HOME FITNESS TEST - STORM SEASON CAMPAIGN (v1) ==================== */ let KD_SEL=""; i(".vfrc-message.vfrc-message--extension-FitnessWelcome,.vfrc-message.vfrc-message--extension-FitnessWelcome .vfrc-message__content,.vfrc-message.vfrc-message--extension-FitnessResults,.vfrc-message.vfrc-message--extension-FitnessResults .vfrc-message__content,.vfrc-message.vfrc-message--extension-ext_fitnessWelcome,.vfrc-message.vfrc-message--extension-ext_fitnessWelcome .vfrc-message__content,.vfrc-message.vfrc-message--extension-ext_fitnessResults,.vfrc-message.vfrc-message--extension-ext_fitnessResults .vfrc-message__content{width:100%!important;max-width:100%!important;align-self:stretch!important;padding-left:0!important;padding-right:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}","data-vf-fitness-fullwidth"); const FTRK=[P("extfitnessStarted","fitness_started"),P("ext_fitnessDiagnosticCompleted","fitness_diagnostic_completed"),P("ext_fitnessBookingStart","fitness_booking_start")]; const FW={name:"FitnessWelcome",type:"response",match:({trace:g})=>"ext_fitnessWelcome"===g?.type||"ext_fitnessWelcome"===g?.payload?.name,render:({element:el})=>{ c.trackEvent("fitness_welcome_viewed",{event_category:"funnel"}); const box=e.createElement("div");box.className="vf-wide-card"; box.innerHTML=`
Home truth: unfit homes pick up injuries — small niggles become big ones
Is your home match fit?
Answer 6 quick questions and Jess will score your home's fitness — and spot the small niggles before they become injuries.
Why it matters

When you're unfit, injuries happen — and homes are no different. Small things like a blocked gutter or a dripping tap are quick, affordable fixes when caught early. Left alone, they quietly turn into massive damage — a R500 gutter clean today can prevent a R50,000 ceiling repair tomorrow.

What you'll get
Your home's fitness score out of 100
A personalised training plan to fix the weak spots
Takes about 4 minutes
`; el.appendChild(box);L(el,box);a.hideFor(box);o.hide(); box.querySelector(".jfw-btn").addEventListener("click",()=>{ c.trackEvent("fitness_welcome_cta_click",{event_category:"funnel"}); const card=box.querySelector(".jfw-card");card&&card.classList.add("jfw-exit"); setTimeout(()=>{box.style.overflow="hidden";box.style.maxHeight=box.scrollHeight+"px";box.offsetHeight;box.style.transition="max-height .35s ease,opacity .35s ease";box.style.maxHeight="0";box.style.opacity="0"},350); setTimeout(()=>{try{box.remove()}catch(err){}o.show();t.interact({type:"start_diagnostic",payload:{}})},700); }); return()=>{o.hide()}; }}; const FR={name:"FitnessResults",type:"response",match:({trace:g})=>"ext_fitnessResults"===g?.type||"ext_fitnessResults"===g?.payload?.name,render:({trace:g,element:el})=>{ if(!e.getElementById("vf-inter-font")){const fl=e.createElement("link");fl.id="vf-inter-font";fl.rel="stylesheet";fl.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";e.head.appendChild(fl)} const pl=d(g); const clean=v=>{const s2=String(v==null?"":v).trim();return""===s2||"0"===s2||"null"===s2.toLowerCase()||"undefined"===s2.toLowerCase()?"":s2}; const zoneKey=(()=>{const z3=clean(pl.zone).toLowerCase().replace(/[\s-]+/g,"_");return["match_fit","needs_training","injury_time"].includes(z3)?z3:"needs_training"})(); const findings=clean(pl.findings),svcRaw=clean(pl.services),urgRaw=clean(pl.urgent),ptsRaw=Number(clean(pl.points)); const pts=isNaN(ptsRaw)?8:Math.max(0,ptsRaw); const VALID=["plumber","electrician","handyman","painter"]; const parseList=s2=>s2.split(",").map(x2=>x2.trim().toLowerCase()).filter(x2=>VALID.includes(x2)); let services=[...new Set(parseList(svcRaw))];services.length||(services=["handyman"]); const urgent=new Set(parseList(urgRaw).filter(x2=>services.includes(x2))); const SVC={ plumber:{label:"Plumber",reason:"Tracking down and fixing hidden leaks",icon:''}, electrician:{label:"Electrician",reason:"Surge protection and DB board check",icon:''}, handyman:{label:"Handyman",reason:"Gutter and downpipe clearing before the rains",icon:''}, painter:{label:"Painter",reason:"Damp treatment and exterior waterproofing",icon:''} }; const HEALTH={ plumber:{service:"Leak detection and repairs",id:"eabe5594-2374-46f8-85b2-cda37d74c0d1",summary:"Suspects a leak and requires investigation"}, electrician:{service:"Electrical repairs, fault finding and/or surge protection",id:"1bc17f92-fd47-460a-8b98-9371b9010926",summary:"Requires electrical repairs and/ or surge protection"}, handyman:{service:"general home maintenance",id:"8c5b3671-50e5-4d7a-8f55-156372d8a4e1",summary:"General help required around the home"}, painter:{service:"Exterior painting",id:"724a8c31-6b83-492e-b6a4-4f24317650f9",summary:"Professional exterior painting"} }; const zones={ injury_time:{accent:"#E24B4A",chipBg:"#FCEBEB",chipText:"#791F1F",badge:"Injury Time",headline:"Your home is in injury time",subtext:"Based on your answers, a few things need urgent attention before the season tests them for real:",sub2:"A few things need urgent attention:",pulse:!0}, needs_training:{accent:"#EF9F27",chipBg:"#FAEEDA",chipText:"#633806",badge:"Needs Training",headline:"Your home needs some training",subtext:"Nothing has failed yet, but a few areas are holding your score back:",sub2:"Areas holding your score back:",pulse:!1}, match_fit:{accent:"#639922",chipBg:"#EAF3DE",chipText:"#27500A",badge:"Match Fit",headline:"Your home is match fit",subtext:"Here's what's working in your favour going into the season:",sub2:"What's working in your favour:",pulse:!1} }; const z2=zones[zoneKey],list=findings.split(",").map(f2=>f2.trim()).filter(f2=>f2&&"0"!==f2); let sc=Math.round(100-5.2*pts); "match_fit"===zoneKey?sc=Math.max(80,Math.min(100,sc)):"needs_training"===zoneKey?sc=Math.max(50,Math.min(79,sc)):sc=Math.max(15,Math.min(49,sc)); c.trackEvent("fitness_results_viewed",{event_category:"funnel",zone:zoneKey,score:sc,services:services.join(","),urgent:[...urgent].join(","),findings_count:list.length}); const POS=["gutters recently cleared","stable db board","surge protection installed","no hidden leaks","backup battery maintained","exterior walls sound"], CONCERN=["gutters overdue","occasional db tripping","plug-level surge protection only","meter not checked","backup battery aging","peeling paint"], SERIOUS=["gutters never cleared","db board tripping frequently","warm db board","no surge protection","active water leak","backup battery flat","damp and cracks on walls"]; const classify=f2=>{const lf=f2.toLowerCase(); if(POS.includes(lf))return"pos";if(SERIOUS.includes(lf))return"bad";if(CONCERN.includes(lf))return"warn"; if(/\b(maintained|installed|sound|recently|stable|still|clear|cleared|good)\b/.test(lf)&&!/\b(no|never|not|without)\b/.test(lf))return"pos"; if(/\b(active|never|frequent|frequently|warm|flat|spinning|damp|crack)\b/.test(lf))return"bad"; return"warn"}; const CHIP={pos:{bg:"#EAF3DE",tx:"#27500A",ic:"\u2713 "},warn:{bg:"#FAEEDA",tx:"#633806",ic:""},bad:{bg:"#FCEBEB",tx:"#791F1F",ic:""}}; let chips="";list.forEach((f2,i2)=>{const cl=CHIP[classify(f2)];chips+=`${cl.ic}${f2}`}); const selected=new Set(urgent.size?urgent:[services[0]]); let svcHTML="";services.forEach(k2=>{const s2=SVC[k2],on=selected.has(k2),u2=urgent.has(k2); svcHTML+=``}); const R=48,CIRC=Math.round(2*Math.PI*R*10)/10; const box=e.createElement("div");box.className="vf-wide-card"; box.innerHTML=`
0
OUT OF 100
${z2.badge}
${z2.headline}
${z2.subtext}
${z2.sub2}
${chips}
Your training plan
Pick the services you'd like quotes for. We'll connect you to a vetted Pro for each one.
${svcHTML}
All Kandua Pros are vetted and rated 4.5\u2605 or higher
`; el.appendChild(box);L(el,box);a.hideFor(box);o.hide(); const ring=box.querySelector(".jfr-ring-val"),scoreEl=box.querySelector(".jfr-score"),cta=box.querySelector(".jfr-cta"); const t0=performance.now(),dur=1200; requestAnimationFrame(function tick(now){ const p2=Math.min(1,(now-t0)/dur),ease=1-Math.pow(1-p2,3),val=Math.round(sc*ease); scoreEl.textContent=val;ring.style.strokeDashoffset=CIRC*(1-sc/100*ease); p2<1&&requestAnimationFrame(tick); }); const refresh=()=>{const n2=selected.size; n2?(cta.disabled=!1,cta.textContent=`Get my ${n2} quote${n2>1?"s":""}`):(cta.disabled=!0,cta.textContent="Select a service to continue")}; refresh(); box.querySelectorAll(".jfr-svc").forEach(card=>{ const toggle=()=>{const k2=card.getAttribute("data-svc"),on=selected.has(k2); on?selected.delete(k2):selected.add(k2); card.classList.toggle("on",!on);card.setAttribute("aria-checked",String(!on)); card.querySelector(".jfr-tick").innerHTML=on?"":''; c.trackEvent("fitness_service_toggle",{event_category:"funnel",service:k2,selected:!on,count:selected.size}); refresh()}; card.addEventListener("click",toggle); card.addEventListener("keydown",ev=>{" "!==ev.key&&"Enter"!==ev.key||(ev.preventDefault(),toggle())}) }); let fired=!1; cta.addEventListener("click",()=>{ if(fired||!selected.size)return;fired=!0; const chosen=services.filter(k2=>selected.has(k2)).join(",");KD_SEL=chosen; c.trackEvent("fitness_get_quotes_click",{event_category:"funnel",zone:zoneKey,score:sc,count:selected.size,services:chosen}); VALID.forEach(tr2=>{const sel2=selected.has(tr2),h2=HEALTH[tr2]; S("health_service_"+tr2,sel2?h2.service:""); S("health_id_"+tr2,sel2?h2.id:""); S("health_summary_"+tr2,sel2?h2.summary:"")}); S("selected_services",chosen); box.querySelectorAll(".jfr-svc").forEach(s3=>{s3.style.pointerEvents="none";selected.has(s3.getAttribute("data-svc"))||(s3.style.opacity="0.4")}); k.celebrate(cta); o.show();n.blurActive(); const hp={services:chosen,selected_services:chosen}; VALID.forEach(tr3=>{const sel3=selected.has(tr3),h3=HEALTH[tr3]; hp["health_service_"+tr3]=sel3?h3.service:""; hp["health_id_"+tr3]=sel3?h3.id:""; hp["health_summary_"+tr3]=sel3?h3.summary:""}); setTimeout(()=>{t.interact({type:"book_services",payload:hp})},650); }); return()=>{o.hide()}; }}; /* ==================== END HOME FITNESS TEST ==================== */ t=window.voiceflow.chat,t.load({verify:{projectID:"6a1d7b09a2bdb2f81d8077cd"},url:"https://general-runtime.sanlamstudios.voiceflow.com",versionID:"production",launch:{event:{type:"launch",payload:{event:"homefitness"}}},assistant:{persistence:"memory",extensions:[y,w,q,A,_,z,E,M,T,FW,FR,...TRK,...FTRK]}}).then(()=>{t.open(),e.querySelectorAll(".launch_jess").forEach(e=>e.addEventListener("click",()=>t.open()))})},e.body.appendChild(o)}()}(document);