1(function(){"use strict";const PAGE_ID="3395",PAGE_NAME="Home",PAGE_SLUG="home",PAGE_PATH="home",WEBSITE_ID="13428aa6-f19b-415d-bf72-f73fc1355d1e",WEBSITE_FAVICON="",WEBSITE_BASE_URL="https://bookzoca.com",WEBSITE_TEMPLATE_ID="c2d5ff25-d388-4d41-9e74-43cb039dbe10",WEBSITE_BUSINESS_NAME="Kinkology Locs & Natural Haircare",WEBSITE_SCHEMA_MARKUP=`{"@id":"https://kinkologyhaircare.com#business","geo":{"@type":"GeoCoordinates","latitude":33.831722,"longitude":-84.574554},"url":"https://kinkologyhaircare.com","logo":"https://ik.imagekit.io/vqkmp8kgs/prod/c4a37fc8-1668-4bb7-8490-3908cddee951/logo_1773754483607.webp","name":"Kinkology Locs & Natural Haircare","@type":"LocalBusiness","email":"[email protected]","image":"https://ik.imagekit.io/vqkmp8kgs/prod/c4a37fc8-1668-4bb7-8490-3908cddee951/logo_1773754483607.webp","hasMap":"https://maps.google.com/maps?cid=13408016502466273193","review":[{"@type":"Review","author":{"name":"Fallon Moore- Huff","@type":"Person"},"reviewBody":"Amazing experience from start to finish. I enjoyed my service & style is beautiful. I'll definitely return.","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2026-08-28"},{"@type":"Review","author":{"name":"Mahdee Sabir","@type":"Person"},"reviewBody":"Very professional and friendly","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-12-12"},{"@type":"Review","author":{"name":"Troy Stewart","@type":"Person"},"reviewBody":"Kasia has been my stylist for a little over a year now & she has done an amazing job! She is very gentle and attentive to what my locs need to remain healthy! 10/10, would recommend.","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-11-22"},{"@type":"Review","author":{"name":"Marvetta LB","@type":"Person"},"reviewBody":"An amazing experience with Noelette. Her attention to my loc needs as well as accounting for my \u201Cenergy\u201D which was allllll over, Noelette\u2019s calmness, her music choice, the shops relaxing smells, the steaming aromas and soooo much more were allll much needed. No pressure, no rushing yet respectful of community receiving and providing self care \u{1F9D6}\u{1F3FE}\u200D\u2640\uFE0F. Highly recommend this small Black Business.","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-06-11"},{"@type":"Review","author":{"name":"Jennifer Poitier","@type":"Person"},"reviewBody":"I loved my Hair experience with Noelette . This was my first time there I have mature locks That had not been maintained in over a year. She used the interlocking method for my new growth and then did some lock repair. I am thoroughly satisfied with the services and the Atmosphere was very welcoming And professional","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-05-29"},{"@type":"Review","author":{"name":"Tye Curry","@type":"Person"},"reviewBody":"Noelette, is very informative. She has the most calming demeanor and I highly recommend her! As she was recommended to me.","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-04-08"},{"@type":"Review","author":{"name":"Kia Bourne","@type":"Person"},"reviewBody":"I had a great experience from start to finish with Noelette! I had a full color done on sister locks and it came out better than I hoped! My hair looks and feels the healthiest it has been in years based on the knowledge and guidance Noelette shared with me during my consultation. She is a true professional and master at what she does. I\u2019m so glad I found this
1salon and will be going back every time! To add: Noelette is gracious, patient, and kind and truly listens to what you want with honest feedback. I\u2019m glad to have meet her. It\u2019s refreshing to see the care she puts into her work. I left beyond satisfied with the results \u{1F60A}","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-04-02"},{"@type":"Review","author":{"name":"Lexi Tillman","@type":"Person"},"reviewBody":"i had such a great experience. the shop is a nice and comfortable space and i am in love with my new color!","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-02-26"},{"@type":"Review","author":{"name":"A K","@type":"Person"},"reviewBody":"5 Stars!\\n\\nI became a transfer client after getting loc extensions in November, and Nolette exceeded all my expectations. From the moment I booked with her, I knew I was in excellent hands. Before my appointment, she took the time to personally call me and ask detailed questions about my hair, health, and overall goals. We had an in-depth conversation about my locs, my care routine, and maintenance needs, which immediately made me feel valued and understood.\\n\\nOn the day of my appointment, I was impressed by the warm and inviting atmosphere. The salon\u2019s decor, especially the exquisite artwork on the walls, created a calming and stylish environment. But what stood out most was the level of service. Nolette thoroughly washed my hair, ensuring it was impeccably clean and completely dry. She didn\u2019t simply leave me under the dryer; she stayed attentive throughout, checking in to make sure I was comfortable and didn\u2019t need anything.\\n\\nThe professionalism extended beyond Nolette, too. The other stylists carried themselves with pride and passion for their work. The salon was spotless, organized, and truly reflected a high standard of care.\\n\\nOverall, my experience was phenomenal. Nolette\u2019s expertise, attention to detail, and dedication to her clients made me feel like a priority. She also allowed me to ask a a lot of questions which I appreciate her wanting to educate the client. I highly recommend her services to anyone looking for exceptional loc care!","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2025-01-08"},{"@type":"Review","author":{"name":"T R. Bermudez","@type":"Person"},"reviewBody":"One of the best locticians in Georgia! Skill mastery in extension installation, cutting, loc styling, and overall hair health.\\nPleasant, clean, professional yet fun salon atmosphere; on time and efficient service\u2026you won\u2019t regret your investment!","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2024-08-06"},{"@type":"Review","author":{"name":"Happi Hongla","@type":"Person"},"reviewBody":"I flew into Atlanta & the appointment I had made initially was a dub. I called after looking up Locticians & Noelette welcomed me to her shop whole heartedly. Not only was she a breath of fresh air while conversing but she also provided me with great loc maintenance tips while retwisting my locs. I felt very comfortable from the moment I walked & left feeling like my name, happi !! Thank you again, Noelette !!","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2024-07-17"},{"@type":"Review","author":{"name":"Geoffrey Price","@type":"Person"},"reviewBody":"I've been going here for a couple months now and the service is always great. It's been really easy to book an appointment, and Kasia has been getting me right as I grow out my hair.","itemReviewed":{"@id":"https://kinkologyhaircare.com#business"},"reviewRating":{"@type":"Rating","bestRating":5,"ratingValue":5,"worstRating":1},"datePublished":"2024-04-18"}],"sameAs":["https://www.instagram.com/the_kinkologist"],"address":{"@type":"PostalAddress","postalCode":"30126","addressRegion":"GA","streetAddress":"Phenix Salon Suites, 5015 Floyd Rd SW, Suite #134, Mableton","addressCountry":"US","addressLocality":"Atlanta"},"@context":"https://schema.org","keywords":"Interlock Maintenance ($75 for each hour after 2 hours), Interlock Partial, 12 Week Protocol (Hairloss Program), 12 Week Hair Restoration plan, Crochet (Partial), Crochet Maintenance (ful Head), Retwist Flexi or Rod Set, Rope Twist or Braids (3/4 Locs), Micro Retwist (No Style), Loc Detailed Style (No Retwist), Loc knots, Micro Loc Retwist w/Rope Twist, Micro Retwist w/Basic Style, Micro Retwist w/Detailed Style, Micro Style (No Retwist, No Shampoo), Parti
1al Interlock, Retwist Consultation, Retwist Detailed Style, Retwist Basic, Retwist Perimeter Only (Hairline), Retwist (Pipecleaners), Rope Twist/2 Strand Twist (2 Locs), Hydration Steam Treatment, Sisterlock Install, Sisterlocks: Detailed Style Only, Sisterlocks: Shampoo & Basic Style Only, Sisterlocks: Shampoo & Curls Style Only, Sisterlocks: Shampoo & Detailed Style, Sisterlock Transfer Client Consultation, Sisterlock Style Curls Only, Sisterlock Retie or Interlock, 2 Strand Twist Medium, Comb Coils Micro, Comb Coils Small, Comb Coils Medium/Standard, Color Refresh, Full Head (fantasy colors double process), Highlights Light (Double Process), Retouch Single Process half an ich or less, Retouch Double Process, Micro Starter Locs, Micro Locs (interlock), Wicks, Starter Locs Standard/Medium, Partial Starter loc (back and sides), Full Head Loc Restoration, Loc Re-attachment, Loc Repair (Micro Fix Priced Per Loc), Loc Combining/Marrying (roots only), Shampoo and Blowdry, Detangling Service (Per Hour) , Wash & Go Curl Definition, Deep Conditioner Treatment , Detox Shampoo w/Steam, Protein Treatment, Precision Cut (layers, face Frame. etc.), Women\u2019s Basic Trim, Big Chop, Children Haircuts, Mens Trim (Basic Cut), Men's/Women Clipper Cut, Shaft Trim, Hairloss Consultation , Color Consultation, Micro Loc consultation, Instant Loc Consultation, Loc Cut Consultation, Sisterlock Consultation, Interlocking Maintenance Consultation, Starter Loc Consultation, Loc Extension Consultation, Natural Hair Consultation","telephone":"+16786402887","priceRange":"$$","publicAccess":true,"aggregateRating":{"@type":"AggregateRating","bestRating":5,"ratingCount":12,"ratingValue":5,"reviewCount":12,"worstRating":1,"itemReviewed":{"@id":"https://kinkologyhaircare.com#business"}},"paymentAccepted":"Cash, Credit Card","currenciesAccepted":"USD","openingHoursSpecification":[{"@type":"OpeningHoursSpecification","opens":"00:00","closes":"00:00","dayOfWeek":"https://schema.org/Monday"},{"@type":"OpeningHoursSpecification","opens":"10:00","closes":"18:00","dayOfWeek":"https://schema.org/Tuesday"},{"@type":"OpeningHoursSpecification","opens":"10:00","closes":"18:00","dayOfWeek":"https://schema.org/Wednesday"},{"@type":"OpeningHoursSpecification","opens":"10:00","closes":"18:00","dayOfWeek":"https://schema.org/Thursday"},{"@type":"OpeningHoursSpecification","opens":"10:00","closes":"18:00","dayOfWeek":"https://schema.org/Friday"},{"@type":"OpeningHoursSpecification","opens":"10:00","closes":"15:00","dayOfWeek":"https://schema.org/Saturday"},{"@type":"OpeningHoursSpecification","opens":"00:00","closes":"00:00","dayOfWeek":"https://schema.org/Sunday"}]}`,WEBSITE_TEMPLATE_NAME="Glassy",WEBSITE_METADATA_TITLE="",WEBSITE_METADATA_KEYWORDS="",WEBSITE_LOCATION_ENTITY_ID="c4a37fc8-1668-4bb7-8490-3908cddee951",WEBSITE_METADATA_DESCRIPTION="";window.PAGE_3395={ID:PAGE_ID,NAME:PAGE_NAME,SLUG:PAGE_SLUG,PATH:PAGE_PATH,VARIABLES:{WEBSITE_ID,WEBSITE_FAVICON,WEBSITE_BASE_URL,WEBSITE_TEMPLATE_ID,WEBSITE_BUSINESS_NAME,WEBSITE_SCHEMA_MARKUP,WEBSITE_TEMPLATE_NAME,WEBSITE_METADATA_TITLE,WEBSITE_METADATA_KEYWORDS,WEBSITE_LOCATION_ENTITY_ID,WEBSITE_METADATA_DESCRIPTION},EVENT_HANDLERS:{saveFormState_248161:function(event){try{const formContainer=document.getElementById("modal-booking-form");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.ctaFormFirstName=trimmed,values.ctaFormLastName="")}else values[fieldName]=fieldValue}
1),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}},selectCountry_248161:function(event){event.stopPropagation();const target=event.currentTarget,code=target.getAttribute("data-code"),countryCode=target.getAttribute("data-country-code"),phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),dropdown=document.getElementById("modal-country-dropdown");dropdown&&dropdown.setAttribute("data-current-country-code",countryCode);const codeElement=document.getElementById("modal-country-code"),flagElement=document.getElementById("modal-country-flag");codeElement&&flagElement&&(codeElement.textContent=code,flagElement.src=`https://flagcdn.com/w20/${countryCode.toLowerCase()}.webp`,flagElement.alt=`${countryCode} flag`),dropdown&&(dropdown.style.display="none"),document.querySelectorAll("#modal-country-dropdown button[data-code]").forEach(btn=>{btn===target?btn.classList.add("selected"):btn.classList.remove("selected")});try{const formContainer=document.getElementById("modal-booking-form");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.ctaFormFirstName=trimmed,values.ctaFormLastName="")}else values[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}},handleLogoClick_248161:function(event){const link=event.currentTarget,destinationUrl=link.href||"",pageName=document.title,logoImage=link.querySelector("img"),logoText=link.textContent&&link.textContent.trim();let logoType="image_logo";logoImage&&logoText?logoType="combination_logo":logoText&&!logoImage&&(logoType="text_logo");let destinationType="internal";destinationUrl.includes("mailto:")?destinationType="email":destinationUrl.includes("tel:")?destinationType="phone":destinationUrl.includes("http")&&!destinationUrl.includes(window.location.hostname)&&(destinationType="external"),typeof mixpanel<"u"?window.trackMixpanelEvent("nav-logo-click",{logo_type:logoType,destination_type:destinationType,destination_url:destinationUrl,page_name:pageName}):console.log("Mixpanel is not initialized!")},stopPropagation_248161:function(event){event.stopPropagation()},handleBackButton_248161:function(event){const formContainer=document.getElementById("modal-booking-form");if(!formContainer)return;const previousPage=parseInt(formContainer.getAttribute("data-current-page")||"0")-1;if(previousPage>=0){formContainer.querySelectorAll("[data-form-page]").forEach(page=>{page.classList.add("hidden")});const previousPageElements=formContainer.querySelectorAll(`[data-form-page="${previousPage}"]`);previousPageElements&&(previousPageElements.forEach(page=>{page.classList.remove("hidden")}),formContainer.setAttribute("data-current-page",previousPage.toString()));const lastPage=formContainer?formContainer.querySelectorAll("[data-form-page]").length-1:0,headerBackButton=document.getElementById("modal-back-button-header"),modalTitle=document.getElementById("booking-modal-title");headerBackButton&&(previousPage>=1&&previousPage<lastPage?headerBackButton.style.display="flex":headerBackButton.style.display="none"),modalTitle&&(previousPage===0?modalTitle.style.display="block":modalTitle.style.display="none")}},handleFormSubmit_248161:function(event){const readPackageCartCount=()=>{try{const arr=JSON.parse(localStorage.getItem("packageCart")||"[]");if(Array.isArray(arr)&&arr.length)return arr.length}catch{}try{const s=JSON.parse(localStorage.getItem("serviceCart")),cart=s&&(s.data||s)||{},pkgs=cart.data&&cart.data.packages||cart.packages||[];
1if(Array.isArray(pkgs))return pkgs.length}catch{}return 0},mirrorPackageCartForConfirm=()=>{try{const raw=localStorage.getItem("packageCart"),arr=raw?JSON.parse(raw):[];if(!Array.isArray(arr)||!arr.length)return;const forEc=arr.map(it=>{const price=typeof it.price=="number"?it.price:typeof it.total=="number"?it.total:(Number(it.subtotal)||0)+(Number(it.taxAmount)||0);return Object.assign({},it,{price})}),s=localStorage.getItem("serviceCart");let cart=s?JSON.parse(s):null;(!cart||typeof cart!="object")&&(cart={data:{},expiry:Date.now()+864e5}),(!cart.data||typeof cart.data!="object")&&(cart.data={items:Array.isArray(cart.items)?cart.items:[],amounts:cart.amounts},Array.isArray(cart.memberships)&&(cart.data.memberships=cart.memberships)),Array.isArray(cart.data.items)||(cart.data.items=[]),cart.data.packages=forEc,localStorage.setItem("serviceCart",JSON.stringify(cart))}catch{}},readMembershipCartCount=()=>{try{const arr=JSON.parse(localStorage.getItem("membershipCart")||"[]");if(Array.isArray(arr)&&arr.length)return arr.length}catch{}try{const s=JSON.parse(localStorage.getItem("serviceCart")),cart=s&&(s.data||s)||{},mems=cart.data&&cart.data.memberships||cart.memberships||[];if(Array.isArray(mems))return mems.length}catch{}return 0},mirrorMembershipCartForConfirm=()=>{try{const raw=localStorage.getItem("membershipCart"),arr=raw?JSON.parse(raw):[];if(!Array.isArray(arr)||!arr.length)return;const forEc=arr.map(it=>{const price=typeof it.price=="number"?it.price:typeof it.total=="number"?it.total:(Number(it.subtotal)||0)+(Number(it.taxAmount)||0);return Object.assign({},it,{price})}),s=localStorage.getItem("serviceCart");let cart=s?JSON.parse(s):null;(!cart||typeof cart!="object")&&(cart={data:{},expiry:Date.now()+864e5}),(!cart.data||typeof cart.data!="object")&&(cart.data={items:Array.isArray(cart.items)?cart.items:[],amounts:cart.amounts},Array.isArray(cart.packages)&&(cart.data.packages=cart.packages)),Array.isArray(cart.data.items)||(cart.data.items=[]),cart.data.memberships=forEc,localStorage.setItem("serviceCart",JSON.stringify(cart))}catch{}};let __servicesOverrideUrl=null;try{__servicesOverrideUrl=localStorage.getItem("serviceRedirectOverrideUrl")||null}catch(__overrideErr){console.error("[ServicesRedirectOverride] failed to read override:",__overrideErr)}const VALID_CREATE_FIELDS=["service","serviceId","servicePrice","serviceDuration","price","currency","email","date","services","message"],VALID_UPDATE_FIELDS=[...VALID_CREATE_FIELDS,"category","categoryId","enquiryId","secondStep","firstName","lastName","phoneNumber","countryCode ","customerType"],currentPath=window.location.pathname,baseUrl="https://api.zoca.ai",schedulingEnabled=!1,fingerprint=localStorage.getItem("visitorId");event.preventDefault();const submitBtn=document.getElementById("book-now-button")||event?.submitter||event?.target?.querySelector('button[type="submit"]');if(submitBtn&&submitBtn.disabled){console.log("[FormSubmitLanding] Button already disabled, ignoring submission");return}submitBtn&&(submitBtn.disabled=!0,submitBtn.style.opacity="0.6",submitBtn.style.pointerEvents="none");const reEnableSubmitBtn=()=>{submitBtn&&(submitBtn.disabled=!1,submitBtn.style.opacity="",submitBtn.style.pointerEvents="")},formContainer=document.getElementById("modal-booking-form"),formValidationPage=parseInt(formContainer.getAttribute("data-current-page")||"0"),formValidationPageElement=formContainer.querySelector(`[data-form-page="${formValidationPage}"]`),formValidationPageFields=formValidationPageElement?formValidationPageElement.querySelectorAll("[data-form-field]"):[],allFormFields=document.querySelectorAll("[data-form-field]");allFormFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field");formContainer.querySelectorAll(`[data-form-field="${fieldName}"] + .error-message, [data-form-field="${fieldName}"] ~ .error-message, .error-message[data-field="${fieldName}"]`).forEach(error=>error.remove()),["modal-name-fields-container","phone-input-container"].forEach(containerId=>{const container=field.closest(`#${containerId}, .${containerId}`);if(container){const nextSibling=container.nextSibling;nextSibling&&nextSibling.classList&&nextSibling.classList.contains("error-message")&&nextSibling.remove()}});const phoneContainer=field.closest(".phone-input-container");phoneContainer?(phoneContainer.style.removeProperty("border-color"),phoneContainer.style.removeProperty("border-width"),phoneContainer.style.removeProperty("border-style")):(field.style.removeProperty("border-color"),field.style.removeProperty("border-width"),field.style.removeProperty("border-style"))});const errors={};if(formValidationPageFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),isRequired=field.getAttribute("data-required")==="true",fieldType=field.type,fieldValue=field.value?.trim()||"";if(isRequired)if(fieldType==="radio"){const radioGroupName=field.getAttribute("name");document.querySelector(`input[type="radio"][name="${radioGroupName}"]:checked`)||(errors[fieldName]="This field is required")}else fieldType==="checkbox"?field.checked||(errors[fieldName]=field.hasAttribute("data-consent-key")?"Please tick this box to continue":"This field is required"):fieldValue||(errors[fieldName]="This field is required");if(fieldName==="ctaFormFirstName"&&fieldValue&&(fieldValue.length<2?errors[fieldName]="First name must be at least 2 characters":/^[A-Za-z]+$/.test(fieldValue)||(errors[fieldName]="First name can only contain letters")),fieldType==="email"&&fieldValue&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue)||(errors[fieldName]="Please enter a valid email address")),fieldType==="date"&&fieldValue){const selectedDate=new Date(fieldValue),today=new Date;today.setHours(0,0,0,0),selectedDate.setHours(0,0,0,0),selectedDate<today&&(errors[fieldName]="Please select a date in the future")}if(fieldName==="ctaFormPhone"&&fieldValue)if(window.libphonenumber){console.log("libphonenumber is available for form submit validation");const phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44";let fullPhoneNumber=fieldValue;fieldValue.startsWith("+")||(fullPhoneNumber=countryCode+fieldValue.replace(/\D/g,"")),console.log("Validating phone number:",fullPhoneNumber);const phoneDigits=fieldValue.replace(/\D/g,"");if(countryCode==="+1"||countryCode==="+91")if(phoneDigits.length!==10)errors[fieldName]="Please enter a valid 10-digit phone number";else try{window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCode==="+91"?"IN":"US")||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed for +1 number:",error)}else try{const currentCountryCode=document.querySelector("#modal
1-country-dropdown"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB";window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCodeForLib)||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed, using fallback:",error),phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}else if(/[a-zA-Z]/.test(fieldValue))errors[fieldName]="Phone number cannot contain letters";else{const phoneDigits=fieldValue.replace(/\D/g,""),phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44";countryCode==="+1"||countryCode==="+91"?phoneDigits.length!==10&&(errors[fieldName]="Please enter a valid 10-digit phone number"):phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}),Object.keys(errors).length>0){Object.keys(errors).forEach(fieldName=>{const errorMessage=errors[fieldName],field=formContainer.querySelector(`[data-form-field="${fieldName}"]`);if(!field)return;const existingError=formContainer.querySelector(`[data-form-field="${fieldName}"] + .error-message, [data-form-field="${fieldName}"] ~ .error-message`);if(existingError&&existingError.remove(),errorMessage){const phoneContainer=field.closest(".phone-input-container");phoneContainer?(phoneContainer.style.setProperty("border-color","#FF4444","important"),phoneContainer.style.setProperty("border-width","2px","important"),phoneContainer.style.setProperty("border-style","solid","important")):(field.style.setProperty("border-color","#FF4444","important"),field.style.setProperty("border-width","2px","important"),field.style.setProperty("border-style","solid","important"));const errorElement=document.createElement("div");errorElement.className="error-message",errorElement.style.color="#FF4444",errorElement.style.fontSize="14px",errorElement.style.marginTop="4px",errorElement.style.marginBottom="8px",errorElement.style.display="block",errorElement.style.width="100%",errorElement.style.fontWeight="500",errorElement.style.lineHeight="1.4",errorElement.textContent=errorMessage;const fieldContainer=field.closest('[data-element-type="container"]')||field.parentNode,specialContainers=["modal-name-fields-container","phone-input-container"];let targetContainer=null;for(const containerId of specialContainers){const container=field.closest(`#${containerId}, .${containerId}`);if(container){targetContainer=container;break}}targetContainer?(targetContainer.parentNode.insertBefore(errorElement,targetContainer.nextSibling),errorElement.style.marginTop="8px",errorElement.style.marginBottom="12px"):fieldContainer.appendChild(errorElement)}});const firstErrorField=formContainer.querySelector(`[data-form-field="${Object.keys(errors)[0]}"]`);firstErrorField&&firstErrorField.focus(),reEnableSubmitBtn();return}const formData={},radioGroups={};allFormFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="checkbox"?fieldValue=field.checked:fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&(fieldValue||fieldType==="checkbox"))if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(formData.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),formData.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(formData.ctaFormFirstName=trimmed,formData.ctaFormLastName="")}else formData[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(formData[fieldName]=radioGroups[fieldName])});const firstName=formData.ctaFormFirstName||"";if(firstName){const replaceInTextNodes=node=>{node.nodeType===Node.TEXT_NODE?node.textContent&&node.textContent.includes("{{firstName}}")&&(node.textContent=node.textContent.replace(/\{\{firstName\}\}/g,firstName)):node.nodeType===Node.ELEMENT_NODE&&(node.placeholder&&node.placeholder.includes("{{firstName}}")&&(node.placeholder=node.placeholder.replace(/\{\{firstName\}\}/g,firstName)),node.title&&node.title.includes("{{firstName}}")&&(node.title=node.title.replace(/\{\{firstName\}\}/g,firstName)),node.alt&&node.alt.includes("{{firstName}}")&&(node.alt=node.alt.replace(/\{\{firstName\}\}
1/g,firstName)),Array.from(node.childNodes).forEach(childNode=>{replaceInTextNodes(childNode)}))};Array.from(formContainer.childNodes).forEach(node=>{replaceInTextNodes(node)})}const formCurrentPage=parseInt(formContainer.getAttribute("data-current-page")||"0");if(formCurrentPage===0){const countryCode=formData.ctaFormPhoneCountry||"+1",customerType=schedulingEnabled===!0?null:formData.ctaFormCustomerType==="returning"?"returning":"new",firstName2=formData.ctaFormFirstName||"",lastName=formData.ctaFormLastName||"",phoneNumber=formData.ctaFormPhone?formData.ctaFormPhone.replace(/\D/g,""):"",entityId=formContainer.getAttribute("data-entity-id")||localStorage.getItem("locationEntityId")||window.getWebsiteDetails?.()?.locationEntityId||"";entityId&&localStorage.setItem("locationEntityId",entityId);const urlParams=new URLSearchParams(window.location.search),utmSource=urlParams.get("utm_source")||"",utmMedium=urlParams.get("utm_medium")||"",utmCampaign=urlParams.get("utm_campaign")||"";localStorage.setItem("firstStepSubmitted","true");const getInitialReferrerFromMixpanel=()=>{try{return typeof window<"u"&&window.mixpanel&&(window.mixpanel.get_property("$initial_referring_domain")||window.mixpanel.get_property("$referring_domain"))||""}catch(error){return console.error("Error getting Mixpanel referrer domain:",error),""}},additionalFields=((formData2,prefix,validFields)=>{const additionalFields2={};return Object.keys(formData2).forEach(fieldName=>{const cleanFieldName=fieldName.replace(prefix,""),finalFieldName=cleanFieldName.charAt(0).toLowerCase()+cleanFieldName.slice(1);validFields.includes(finalFieldName)&&(additionalFields2[finalFieldName]=formData2[fieldName])}),additionalFields2})(formData,"ctaForm",VALID_CREATE_FIELDS),consents={};formContainer.querySelectorAll("[data-consent-key]").forEach(consentInput=>{const consentKey=consentInput.getAttribute("data-consent-key");consentKey&&(consents[consentKey]=consentInput.checked===!0)});const hasConsents=Object.keys(consents).length>0,appointmentBox=formContainer.querySelector('[data-form-field="ctaFormAppointmentConfirmation"]'),isMarketingConsentGiven=appointmentBox?appointmentBox.checked===!0:!1,requestBody={countryCode,customerType,entityId,firstName:firstName2,lastName,phoneNumber,query:{utm_campaign:utmCampaign,utm_medium:utmMedium,utm_source:utmSource},referrer:getInitialReferrerFromMixpanel()||"$direct",isMarketingConsentGiven,source:"WEBSITE",utmCampaign,utmMedium,utmSource,...additionalFields,...hasConsents&&{consents},...schedulingEnabled===!0&&{formType:"scheduling_form"}};if(window.trackMixpanelEvent){const buttonText=document.getElementById("book-now-button")?.textContent,appointmentCheckbox=document.querySelector('[data-form-field="ctaFormAppointmentConfirmation"]');let submissionPayload=requestBody;const sourceSection=formContainer.getAttribute("data-source-section")||"header",snippetShown=formContainer.getAttribute("data-snippet-shown"),snippetText=formContainer.getAttribute("data-snippet-text"),snippetTier=formContainer.getAttribute("data-snippet-tier"),snippetSource=formContainer.getAttribute("data-snippet-source"),snippetScore=formContainer.getAttribute("data-snippet-score"),snippetReviewId=formContainer.getAttribute("data-snippet-review-id"),experimentGroup=formContainer.getAttribute("data-experiment-group");window.trackMixpanelEvent("leadform-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,submission_payload:submissionPayload,page_name:"home",source_section:sourceSection,scheduling_active:schedulingEnabled===!0,click_updates_checkbox:schedulingEnabled===!0?appointmentCheckbox?appointmentCheckbox.checked:!1:null,snippet_shown:snippetShown,snippet_text:snippetText,snippet_tier:snippetTier,snippet_source:snippetSource,snippet_score:snippetScore,snippet_review_id:snippetReviewId,experiment_group:experimentGroup})}const headers={"Content-Type":"application/json"};fingerprint&&(headers["x-fingerprint"]=fingerprint),fetch(`${baseUrl}/booking-enquiries`,{method:"POST",headers,body:JSON.stringify(requestBody)}).then(response=>{if(!response.ok){if(window.trackMixpanelEvent){let errorResponse={statusCode:response.status,errorMessage:response.statusText};const buttonText=document.getElementById("book-now-button")?.textContent,sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-error-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,error_response:errorResponse,submission_payload:requestBody,page_name:"home",source_section:sourceSection})}throw new Error(response)}return response.json()}).then(async data=>{console.log("Lead submitted successfully:",data);const enquiryId=data?.data?.enquiry?.id,clientId=data?.data?.client?.id||data?.data?.enquiry?.clientId;enquiryId&&localStorage.setItem("enquiryId",enquiryId),clientId&&localStorage.setItem("clientId",clientId);
1const alphaUserStatus=localStorage.getItem("alphaUserBooked"),storedClientId=localStorage.getItem("clientId"),storedEnquiryId=localStorage.getItem("enquiryId");if(alphaUserStatus==="true"&&storedClientId){localStorage.setItem("rebookDirect","true"),localStorage.setItem("rebookDirectTimestamp",Date.now().toString());const existingCartId=localStorage.getItem("activeSchedulingCartId"),cartBaseUrl=localStorage.getItem("baseUrl")||"https://bookzoca.com";if(existingCartId&&storedEnquiryId&&storedClientId){console.log("[LandingForm-Alpha] PATCHing cart with clientId and enquiryId...");try{const patchHeaders={"Content-Type":"application/json"};fingerprint&&(patchHeaders["x-fingerprint"]=fingerprint);const patchBody={clientId:storedClientId,enquiryId:storedEnquiryId},patchResponse=await fetch(`${cartBaseUrl}/scheduling/carts/${existingCartId}`,{method:"PATCH",headers:patchHeaders,body:JSON.stringify(patchBody)});if(patchResponse.ok){const patchData=await patchResponse.json();console.log("[LandingForm-Alpha] Cart PATCHed successfully:",patchData),patchData?.data&&(localStorage.setItem("activeSchedulingCart",JSON.stringify(patchData.data)),patchData.data.clientId&&localStorage.setItem("clientId",patchData.data.clientId),patchData.data.enquiryId&&localStorage.setItem("enquiryId",patchData.data.enquiryId))}else{const errorText=await patchResponse.text();console.error("[LandingForm-Alpha] Cart PATCH failed:",patchResponse.status,errorText)}}catch(error){console.error("[LandingForm-Alpha] Error PATCHing cart:",error)}}}if(window.trackMixpanelEvent){const buttonText=document.getElementById("book-now-button")?.textContent||"Book Now",sourceSection=formContainer.getAttribute("data-source-section")||"header";let submissionPayload=requestBody;if(window.trackMixpanelEvent("leadform-success-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,submission_payload:submissionPayload,page_name:"home",source_section:sourceSection}),schedulingEnabled===!0){const storedEnquiryId2=localStorage.getItem("enquiryId"),storedClientId2=localStorage.getItem("clientId"),__svcPath=(window.location.pathname||"").replace(/\/+$/,""),__onSpecificServicePage=/^\/services\/.+/.test(__svcPath)&&!/^\/services\/book(\/|$)/.test(__svcPath);if(storedEnquiryId2&&__onSpecificServicePage){let __bannerCartHasItems=!1;try{const s=JSON.parse(localStorage.getItem("serviceCart"));__bannerCartHasItems=((s&&(s.data||s)||{items:[]}).items||[]).length>0}catch{}if(__bannerCartHasItems){localStorage.setItem("rebookDirectTimestamp",Date.now().toString()),syncCartAndBookV4();return}}if(storedEnquiryId2&&storedClientId2){localStorage.setItem("rebookDirectTimestamp",Date.now().toString());let cartHasItems=!1;try{const s=JSON.parse(localStorage.getItem("serviceCart"));cartHasItems=((s&&(s.data||s)||{items:[]}).items||[]).length>0}catch{}const hasProductsOnly=readMembershipCartCount()>0||readPackageCartCount()>0;if(cartHasItems||hasProductsOnly){syncCartAndBookV4();return}window.location.href="/services";return}}}window.trackEvent&&(console.log("window.trackEvent",window.trackEvent),window.trackEvent&&window.trackEvent("lead_event",{form_type:"staticLeadForm",form_step:formCurrentPage,page_name:"home",source_section:"header"}))}).catch(error=>{console.error("Error occurred while submitting lead:",error),reEnableSubmitBtn()})}if(schedulingEnabled===!0){formContainer.querySelectorAll("[data-form-page]").forEach(page=>page.classList.add("hidden"));const modalCloseButton=document.querySelector(".modal-close");modalCloseButton&&(modalCloseButton.style.display="none");const loadingScreen=document.createElement("div");loadingScreen.id="scheduling-redirect-screen",loadingScreen.style.cssText="display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;min-height:200px;",loadingScreen.innerHTML=` 2 <div style="width:48px;height:48px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:24px;"></div> 3 <style>@keyframes spin{to{transform:rotate(360deg);}}</style> 4 `,formContainer.appendChild(loadingScreen),window.addEventListener("pageshow",function onPageShow(e){if(e.persisted){var l=document.getElementById("scheduling-redirect-screen");l&&l.remove();var m=document.getElementById("booking-modal"),o=document.getElementById("booking-modal-overlay");m&&o&&(m.style.opacity="0",o.style.opacity="0",setTimeout(function(){m.style.display="none",o.style.display="none"},300));var f=document.getElementById("modal-booking-form");f&&(f.querySelectorAll("[data-form-page]").forEach(function(p,i){i===0?p.classList.remove("hidden"):p.classList.add("hidden")}),f.setAttribute("data-current-page","0")),reEnableSubmitBtn(),window.removeEventListener("pageshow",onPageShow)}}),console.log("[LandingForm] Scheduling enabled - redirect will happen after API calls complete");return}const nextPage=parseInt(formContainer.getAttribute("data-current-page")||"0")+1;formContainer.querySelectorAll("[data-form-page]").forEach(page=>{page.classList.add("hidden")});const nextPageElements=formContainer.querySelectorAll(`[data-form-page="${nextPage}"]`);
4if(nextPageElements){nextPageElements.forEach(page=>{page.classList.remove("hidden")}),formContainer.setAttribute("data-current-page",nextPage.toString()),reEnableSubmitBtn();const lastPage=formContainer?formContainer.querySelectorAll("[data-form-page]").length-1:0,headerBackButton=document.getElementById("modal-back-button-header"),modalTitle=document.getElementById("booking-modal-title");if(headerBackButton&&(nextPage>=1&&nextPage<lastPage?headerBackButton.style.display="flex":headerBackButton.style.display="none"),modalTitle&&(nextPage===0?modalTitle.style.display="block":modalTitle.style.display="none"),nextPage===lastPage){console.log("Reached final page - sending remaining fields via PUT request");const allFormFields2=formContainer.querySelectorAll("[data-form-field]"),allFormData={},radioGroups2={};allFormFields2.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups2[fieldName]||(radioGroups2[fieldName]=null),field.checked&&(radioGroups2[fieldName]=field.value)):fieldType==="checkbox"?fieldValue=field.checked:fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&(fieldValue||fieldType==="checkbox"))if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(allFormData.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),allFormData.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(allFormData.ctaFormFirstName=trimmed,allFormData.ctaFormLastName="")}else allFormData[fieldName]=fieldValue}),Object.keys(radioGroups2).forEach(fieldName=>{radioGroups2[fieldName]!==null&&(allFormData[fieldName]=radioGroups2[fieldName])});const enquiryId=localStorage.getItem("enquiryId"),putRequestBody={firstName:allFormData.ctaFormFirstName||"",lastName:allFormData.ctaFormLastName||"",phoneNumber:allFormData.ctaFormPhone?allFormData.ctaFormPhone.replace(/\D/g,""):"",countryCode:allFormData.ctaFormPhoneCountry||"+1",customerType:schedulingEnabled===!0?null:allFormData.ctaFormCustomerType==="returning"?"returning":"new",enquiryId,secondStep:!0};if(Object.keys(allFormData).forEach(fieldName=>{const cleanFieldName=fieldName.replace("ctaForm",""),finalFieldName=cleanFieldName.charAt(0).toLowerCase()+cleanFieldName.slice(1);VALID_UPDATE_FIELDS.includes(finalFieldName)&&(putRequestBody[finalFieldName]=allFormData[fieldName])}),putRequestBody.category){const radioButtons=formContainer.querySelectorAll('input[type="radio"]');for(const radio of radioButtons)if(radio.parentElement?.textContent?.trim()===putRequestBody.category){const categoryId=radio.getAttribute("data-category-id");categoryId&&(putRequestBody.categoryId=categoryId,console.log("Found categoryId:",categoryId,"for category:",putRequestBody.category));break}}if(enquiryId&&Object.keys(putRequestBody).length>0){console.log("Sending all fields via PUT request:",putRequestBody);const putHeaders={"Content-Type":"application/json"};fingerprint&&(putHeaders["x-fingerprint"]=fingerprint),fetch(`${baseUrl}/booking-enquiries/${enquiryId}/update-booking-enquiry`,{method:"PUT",headers:putHeaders,body:JSON.stringify(putRequestBody)}).then(response=>{if(!response.ok){if(window.trackMixpanelEvent){let errorResponse={statusCode:response.status,errorMessage:response.statusText};const buttonText=document.getElementById("book-now-button")?.textContent,sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-error-submit",{form_type:"staticLeadForm",form_step:nextPage-1,button_text:buttonText,error_response:errorResponse,submission_payload:putRequestBody,page_name:"home",source_section:sourceSection})}throw new Error(`HTTP error! status: ${response.status}`)}return response.json()}).then(data=>{if(console.log("Booking enquiry updated successfully:",data),window.trackMixpanelEvent){const buttonText=document.getElementById("book-now-button").textContent,sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-success-submit",{form_type:"staticLeadForm",form_step:nextPage-1,button_text:buttonText,submission_payload:putRequestBody,page_name:"home",source_section:sourceSection})}}).catch(error=>{console.error("Error updating booking enquiry:",error)})}const customerNameElement=document.getElementById("modal-success-customer-name"),customerNameFooter=document.getElementById("success-customer-name");customerNameElement&&(customerNameElement.textContent=allFormData.ctaFormFirstName||"",customerNameElement.style.marginLeft="10px"),customerNameFooter&&(customerNameFooter.textContent=allFormData.ctaFormFirstName||"",customerNameFooter.style.marginLeft="10px");const snippetShown=formContainer.getAttribute("data-snippet-shown"),snippetText=formContainer.getAttribute("data-snippet-text"),snippetTier=formContainer.getAttribute("data-snippet-tier"),snippetSource=formContainer.getAttribute("data-snippet-source"),snippetScore=formContainer.getAttribute("data-snippet-score"),snippetReviewId=formContainer.getAttribute("data-snippet-review-id"),experimentGroup=formContainer.getAttribute("data-experiment-group");if(window.trackMixpanelEvent){const buttonText=document.getElementById("book-now-button").textContent,appointmentCheckbox=document.querySelector('[data-form-field="ctaFormAppointmentConfirmation"]'),sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-submit",{form_type:"staticLeadForm",form_step:nextPage-1,button_text:buttonText,submission_payload:putRequestBody,page_name:"home",source_section:sourceSection,scheduling_active:schedulingEnabled===!0,click_updates_checkbox:schedulingEnabled===!0?appointmentCheckbox?appointmentCheckbox.checked:!1:null,snippet_shown:snippetShown,snippet_text:snippetText,snippet_tier:snippetTier,snippet_source:snippetSource,snippet_score:snippetScore,snippet_review_id:snippetReviewId,experiment_group:experimentGroup})}let bookingLink=formContainer.getAttribute("data-booking-link");__servicesOverrideUrl&&(bookingLink=__servicesOverrideUrl);const customerType=allFormData.ctaFormCustomerType;if(bookingLink){const reviewScreen=document.getElementById("modal-review-section");reviewScreen!=null&&(reviewScreen.style.display="none");const earlyBookingButton=document.getElementById("modal-booking-button");earlyBookingButton&&(earlyBookingButton.href=bookingLink,earlyBookingButton.dataset.serviceOverrideBound||(earlyBookingButton.dataset.serviceOverrideBound="true",earlyBookingButton.addEventListener("click",__clickEvt=>{let __clickTarget=null;try{__clickTarget=localStorage.getItem("serviceRedirectOverrideUrl")}catch{}__clickTarget&&__clickTarget.trim()&&(__clickEvt.preventDefault(),window.location.href=__clickTarget.trim())})));const enableRedirect=formContainer.getAttribute("data-thank-you-redirect");if(enableRedirect===!1||enableRedirect==="false"||enableRedirect==="false")return;const redirectDelayAttr=formContainer.getAttribute("data-thank-you-redirect-delay"),redirectDelay=redirectDelayAttr?parseInt(redirectDelayAttr,10):3e3;let finalBookingLink=bookingLink;const appendLead=formContainer.getAttribute("data-append-lead-redirect-url");if(console.log("appendlead: ",appendLead),appendLead==="true")try{const url=new URL(finalBookingLink),fields=JSON.parse(formContainer.getAttribute("data-append-lead-redirect-url-fields")||"[]"),paramMapping=JSON.parse(formContainer.getAttribute("data-append-lead-redirect-url-mapping")||"{}");console.log("fields: ",fields),console.log("params: ",paramMapping),fields.forEach(function(field){const capitalized=field.charAt(0).toUpperCase()+field.slice(1);let value="";if(field==="phone"){const country=allFormData.ctaFormPhoneCountry||allFormData.footerFormPhoneCountry||"",number=(allFormData.ctaFormPhone||allFormData.footerFormPhone||"").replace(/\D/g,"");if(country&&country.trim()&&url.searchParams.set("country_code",country.trim()),number&&number.trim()){const paramKey=paramMapping[field]||field;url.searchParams.set(paramKey,number.trim())}}else value=allFormData["ctaForm"+capitalized]||allFormData["footerForm"+capitalized]||"";if(value&&value.trim()){const paramKey=paramMapping[field]||field;url.searchParams.set(paramKey,value.trim())}}),finalBookingLink=url.toString()}catch(e){console.error("[FormSubmit] Error appending lead params to booking URL:",e)}const modalBookingButton=document.getElementById("modal-booking-button");console.log("modal-booking: ",modalBookingButton),modalBookingButton&&(console.log("-----"),modalBookingButton.href=finalBookingLink),setTimeout(()=>{console.log("updating link: ",finalBookingLink),window.location.href=finalBookingLink},redirectDelay)}else if(customerType!="returning"){const reviewScreen=document.getElementById("modal-review-section");reviewScreen.style.display="none"}}}async function syncCartAndBookV4(){const baseUrl2=localStorage.getItem("baseUrl")||"https://bookzoca.com",fingerprint2=localStorage.getItem("visitorId"),clientId=localStorage.getItem("clientId"),enquiryId=localStorage.getItem("enquiryId"),locationEntityId=localStorage.getItem("locationEntityId"),token=localStorage.getItem("authToken")||localStorage.getItem("token")||localStorage.getItem("jwt"),headers={"Content-Type":"application/json"};token&&(headers.Authorization="Bearer "+token),fingerprint2&&(headers["x-fingerprint"]=fingerprint2);let items=[];try{let localCart={items:[]};try{const s=JSON.parse(localStorage.getItem("serviceCart"));localCart=s&&(s.data||s)||{items:[]}}catch{}items=localCart.items||[];let cartId=localStorage.getItem("activeSchedulingCartId");if(!cartId){const createBody={locationEntityId};clientId&&(createBody.clientId=clientId),enquiryId&&(createBody.enquiryId=enquiryId);const r=await fetch(baseUrl2+"/scheduling/carts/get-or-create",{method:"POST",headers,body:JSON.stringify(createBody)});if(r.ok){const d=await r.json();d&&d.data&&d.data.id&&(cartId=d.data.id,localStorage.setItem("activeSchedulingCartId",cartId),localStorage.setItem("activeSchedulingCart",JSON.stringify(d.data)))}}if(cartId&&items.length){const now=new Date,apiItems=items.map(item=>{const addonMinutes=(item.addons||[]).reduce(function(sum,sel){const snap=item.addonSnapshots&&item.addonSnapshots[sel.addonId||sel.id]||sel||{};return sum+(Number(snap.durationMinutes)||0)},0),dm=(Number(item.serviceDetails&&item.serviceDetails.duration)||Number(item.duration)||60)+addonMinutes,start=new Date(item.createdAt||now).toISOString(),end=new Date(new Date(start).getTime()+dm*60*1e3).toISOString(),isAny=item.isAnyProvider===!0||item.providerId==null,ai={serviceId:item.serviceId,serviceVariationId:item.serviceVariationId||item.id,startTime:start,endTime:end,createdAt:item.createdAt||start};return isAny||(ai.providerId=item.providerId),item.addons&&item.addons.length&&(ai.addons=item.addons),ai});await fetch(baseUrl2+"/scheduling/carts/items",{method:"POST",headers,body:JSON.stringify({cartId,items:apiItems})}).catch(function(){})}}catch{}try{localStorage.setItem("pathRedirectToBooking",window.location.href)}catch{}if(!items.length){const memOnly=readMembershipCartCount(),pkgOnly=readPackageCartCount();if(pkgOnly>0&&memOnly===0){mirrorPackageCartForConfirm(),window.location.href="/services/book/confirm?packagesOnly=true";return}if(memOnly>0){mirrorMembershipCartForConfirm(),pkgOnly>0&&mirrorPackageCartForConfirm(),window.location.href=pkgOnly>0?"/services/book/confirm?packagesOnly=true&membershipsOnly=true":"/services/book/confirm?membershipsOnly=true";return}}mirrorMembershipCartForConfirm(),mirrorPackageCartForConfirm(),window.location.href="/services/book"}},handleGetInTouch_248161:function(event){const btn=event.target.closest("button")||event.target,ctaGlobalCall=btn.getAttribute("data-cta-global-call"),callNowEnabled=btn.getAttribute("data-call-now-enabled"),ctaType=btn.getAttribute("data-cta-type"),callNowPhone=btn.getAttribute("data-call-now-phone"),ctaFallback=btn.getAttribute("data-cta-fallback"),buttonText=btn.querySelector(".website-cta-text")?.textContent||btn.textContent||btn.innerText;if((ctaGlobalCall==="true"&&ctaType==="call"||callNowEnabled==="true")&&callNowPhone){if(typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("book-cta",{cta_section_name:"fab-button",cta_text:buttonText,page_name:document.title,de
4stination_type:"phone",phone_number:callNowPhone}),window.location.href=`tel:${callNowPhone}`,ctaFallback==="true"){let fallbackFired=!1;const onVis=()=>{document.visibilityState==="visible"&&!fallbackFired&&(fallbackFired=!0,document.removeEventListener("visibilitychange",onVis),setTimeout(()=>{const m=document.getElementById("booking-modal"),o=document.getElementById("booking-modal-overlay");m&&o&&(m.style.display="flex",o.style.display="block",setTimeout(()=>{m.style.opacity="1",o.style.opacity="1";const c=m.querySelector("#booking-modal-content")||m.querySelector(".modal-content");c&&(c.style.transform="scale(1)")},10))},500))};document.addEventListener("visibilitychange",onVis)}return}if(typeof window<"u"&&window.mixpanel){const buttonText2=event.target.textContent||event.target.innerText,buttonHref=event.target.getAttribute("href"),pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"fab-button",cta_text:buttonText2,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");const formContainer=document.getElementById("modal-booking-form"),formState=localStorage.getItem("formState"),customerType=formState?JSON.parse(formState).values.ctaFormCustomerType:null;formContainer.setAttribute("data-source-section","fabButton");const bookingLink=formContainer.getAttribute("data-booking-link"),autoRedirect=formContainer.getAttribute("data-auto-redirect");if(bookingLink!=""&&bookingLink&&autoRedirect==="true"&&customerType==="returning"&&!sessionStorage.getItem("autoRedirectUsed")){sessionStorage.setItem("autoRedirectUsed","true"),window.location.href=bookingLink;return}const isAlphaWebsite=(window.getWebsiteDetails?.()||{}).websiteType==="alpha",clientId=localStorage.getItem("clientId"),firstStepSubmitted=localStorage.getItem("firstStepSubmitted"),rebookTimestamp=localStorage.getItem("rebookDirectTimestamp");if(isAlphaWebsite&&clientId&&firstStepSubmitted==="true"&&rebookTimestamp)if(Date.now()-parseInt(rebookTimestamp,10)<6e5){console.log("[GetInTouch] Within 10-min window - redirecting to /services"),window.location.href="/services";return}else console.log("[GetInTouch] 10-min window expired - showing modal"),localStorage.removeItem("rebookDirectTimestamp");try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector(".modal-content").style.transform="scale(1)"},10)),window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title,snippetShown=formContainer.getAttribute("data-snippet-shown"),experimentGroup=formContainer.getAttribute("data-experiment-group");window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"fabButton",snippet_shown:snippetShown,experiment_group:experimentGroup})}},handlePhoneInput_248161:function(event){const input=event.target,currentValue=input.value,hasNonNumeric=/[^0-9+]/.test(currentValue),hasPlusNotAtStart=currentValue.includes("+")&&!currentValue.startsWith("+");if(hasNonNumeric||hasPlusNotAtStart){const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue;return}if(window.libphonenumber)try{const cleanValue=currentValue.replace(/[^\d+]/g,"");if(cleanValue.startsWith("+")){const phoneNumber=window.libphonenumber.parsePhoneNumber(cleanValue);phoneNumber&&phoneNumber.isValid()||(input.value=cleanValue)}else{const phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"}
4)():"+44",currentCountryCode=document.querySelector("#modal-country-dropdown"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB",fullNumber=countryCode+cleanValue,phoneNumber=window.libphonenumber.parsePhoneNumber(fullNumber,countryCodeForLib);phoneNumber&&phoneNumber.isValid()||(cleanValue.length>0?window.libphonenumber.parsePhoneNumberFromString(fullNumber,countryCodeForLib)||(input.value=cleanValue):input.value="")}}catch(error){console.warn("Error formatting phone number:",error);const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue}else{const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue}try{const formContainer=document.getElementById("modal-booking-form");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.ctaFormFirstName=trimmed,values.ctaFormLastName="")}else values[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}},openBookingModal_248161:function(event){const btn=event.target.closest("button")||event.target,ctaGlobalCall=btn.getAttribute("data-cta-global-call"),callNowEnabled=btn.getAttribute("data-call-now-enabled"),ctaType=btn.getAttribute("data-cta-type"),callNowPhone=btn.getAttribute("data-call-now-phone"),ctaFallback=btn.getAttribute("data-cta-fallback"),buttonText=btn.querySelector(".website-cta-text")?.textContent||btn.textContent||btn.innerText;if((ctaGlobalCall==="true"&&ctaType==="call"||callNowEnabled==="true")&&callNowPhone){if(typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("book-cta",{cta_section_name:"header",cta_text:buttonText,page_name:document.title,destination_type:"phone",phone_number:callNowPhone}),window.location.href=`tel:${callNowPhone}`,ctaFallback==="true"){let fallbackFired=!1;const onVis=()=>{document.visibilityState==="visible"&&!fallbackFired&&(fallbackFired=!0,document.removeEventListener("visibilitychange",onVis),setTimeout(()=>{const m=document.getElementById("booking-modal"),o=document.getElementById("booking-modal-overlay");m&&o&&(m.style.display="flex",o.style.display="block",setTimeout(()=>{m.style.opacity="1",o.style.opacity="1";const c=m.querySelector("#booking-modal-content");c&&(c.style.transform="scale(1)")},10))},500))};document.addEventListener("visibilitychange",onVis)}return}if(typeof window<"u"&&window.mixpanel){const buttonText2=event.target.textContent||event.target.innerText,buttonHref=event.target.getAttribute("href"),pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"header",cta_text:buttonText2,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");const mobileMenu=document.getElementById("mobile-menu");if(mobileMenu&&(mobileMenu.style.maxHeight==="100vh"||mobileMenu.style.maxHeight!=="0px")){mobileMenu.style.maxHeight="0px",mobileMenu.setAttribute("inert",""),document.querySelectorAll("#mobile-menu-content a, #mobile-menu-content button").forEach(item=>{item&&(item.style.transform="translateY(-100%)",item.style.opacity="0",item.style.transitionDelay="0s")});const headerOverlay=document.getElementById("header-overlay");headerOverlay&&(headerOverlay.style.opacity="0",headerOverlay.style.pointerEvents="none");const openIcon=document.getElementById("menu-icon-open"),closeIcon=document.getElementById("menu-icon-close");openIcon&&closeIcon&&(openIcon.classList.remove("menu-icon-close"),openIcon.classList.add("menu-icon-open"),closeIcon.classList.remove("menu-icon-open"),closeIcon.classList.add("menu-icon-close"))}const formContainer=document.getElementById("modal-booking-form"),formState=localStorage.getItem("formState"),customerType=formState?JSON.parse(formState).values.ctaFormCustomerType:null;if(window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title,snippetShown=formContainer.getAttribute("data-snippet-shown"),experimentGroup=formContainer.getAttribute("data-experiment-group");window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"header",snippet_shown:snippetShown,experiment_group:experimentGroup})}const bookingLink=formContainer.getAttribute("data-booking-link"),autoRedirect=formContainer.getAttribute("data-auto-redirect");if(bookingLink!=""&&bookingLink&&autoRedirect==="true"&&customerType==="returning"&&!sessionStorage.getItem("autoRedirectUsed")){sessionStorage.setItem("autoRedirectUsed","true"),window.location.href=bookingLink;return}const isAlphaWebsite=(window.getWebsiteDetails?.()||{}
4).websiteType==="alpha",clientId=localStorage.getItem("clientId"),firstStepSubmitted=localStorage.getItem("firstStepSubmitted"),rebookTimestamp=localStorage.getItem("rebookDirectTimestamp");if(isAlphaWebsite&&clientId&&firstStepSubmitted==="true"&&rebookTimestamp)if(Date.now()-parseInt(rebookTimestamp,10)<6e5){console.log("[OpenBookingModal] Within 10-min window - redirecting to /services"),window.location.href="/services";return}else console.log("[OpenBookingModal] 10-min window expired - showing modal"),localStorage.removeItem("rebookDirectTimestamp");try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal");console.log(modal);const overlay=document.getElementById("booking-modal-overlay");console.log(overlay),modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector("#booking-modal-content").style.transform="scale(1)"},10))},toggleMobileMenu_248161:function(event){const element=event.currentTarget,menu=document.getElementById("mobile-menu");let exitMethod="cross_button";if(exitMethod=element.getAttribute("data-exit-method")||"cross_button",menu){const isOpening=menu.style.maxHeight==="0px"||!menu.style.maxHeight,pageName=document.title;if(typeof window<"u"&&window.trackMixpanelEvent&&isOpening){const menuItems2=document.querySelectorAll("#mobile-menu-content a.nav-link");window.trackMixpanelEvent("nav-hamburgermenu-click",{menu_state:"closed",page_name:pageName,menu_items_count:menuItems2.length})}menu.style.maxHeight=isOpening?"100vh":"0px",isOpening?menu.removeAttribute("inert"):menu.setAttribute("inert",""),typeof window<"u"&&window.trackMixpanelEvent&&!isOpening&&window.trackMixpanelEvent("nav-hamburgermenu-close",{page_name:pageName,exit_method:exitMethod}),document.querySelectorAll("#mobile-menu-content a, #mobile-menu-content button").forEach((item,index)=>{item&&(menu.style.maxHeight==="100vh"?(item.style.transform="translateY(0)",item.style.opacity="1",item.style.transitionDelay=`${index*.025}s`):(item.style.transform="translateY(-100%)",item.style.opacity="0",item.style.transitionDelay="0s"))});const overlay=document.getElementById("header-overlay");overlay&&(overlay.style.opacity=menu.style.maxHeight==="100vh"?"1":"0",overlay.style.pointerEvents=menu.style.maxHeight==="100vh"?"auto":"none");const openIcon=document.getElementById("menu-icon-open"),closeIcon=document.getElementById("menu-icon-close");openIcon&&closeIcon&&(menu.style.maxHeight==="100vh"?(openIcon.classList.remove("menu-icon-open"),openIcon.classList.add("menu-icon-close"),closeIcon.classList.remove("menu-icon-close"),closeIcon.classList.add("menu-icon-open")):(openIcon.classList.remove("menu-icon-close"),openIcon.classList.add("menu-icon-open"),closeIcon.classList.remove("menu-icon-open"),closeIcon.classList.add("menu-icon-close")))}},closeBookingModal_248161:function(event){const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.opacity="0",overlay.style.opacity="0",modal.querySelector("#booking-modal-content").style.transform="scale(0.9)",setTimeout(()=>{modal.style.display="none",overlay.style.display="none"},300)),window.trackMixpanelEvent){const formContainer=document.getElementById("modal-booking-form"),formFields=formContainer.querySelectorAll("[data-form-field]"),distinctFormFields=Array.from(formFields).filter((field,index,self)=>index===self.findIndex(t=>t.getAttribute("data-form-field")===field.getAttribute("data-form-field"))),filledFields=Array.from(distinctFormFields).filter(field=>field.value!=="").length,formCompletionPercentage=filledFields/distinctFormFields.length*100;let exit_method="back_button";event.target.id==="close-icon"&&(exit_method="cross_button");const sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-exit",{form_type:"popupLeadForm",form_id:formContainer.getAttribute("data-form-id"),exit_method,form_completion_percentage:formCompletionPercentage,form_exit_time:new Date().toISOString(),fields_completed:filledFields,page_name:document.title,source_section:sourceSection})}},handleBookNowCart_248161:function(event){const readPackageCartCount=()=>{try{const arr=JSON.parse(localStorage.getItem("packageCart")||"[]");if(Array.isArray(arr)&&arr.length)return arr.length}catch{}try{const s=JSON.parse(localStorage.getItem("serviceCart")),cart=s&&(s.data||s)||{},pkgs=cart.data&&cart.data.packages||cart.packages||[];
4if(Array.isArray(pkgs))return pkgs.length}catch{}return 0},mirrorPackageCartForConfirm=()=>{try{const raw=localStorage.getItem("packageCart"),arr=raw?JSON.parse(raw):[];if(!Array.isArray(arr)||!arr.length)return;const forEc=arr.map(it=>{const price=typeof it.price=="number"?it.price:typeof it.total=="number"?it.total:(Number(it.subtotal)||0)+(Number(it.taxAmount)||0);return Object.assign({},it,{price})}),s=localStorage.getItem("serviceCart");let cart=s?JSON.parse(s):null;(!cart||typeof cart!="object")&&(cart={data:{},expiry:Date.now()+864e5}),(!cart.data||typeof cart.data!="object")&&(cart.data={items:Array.isArray(cart.items)?cart.items:[],amounts:cart.amounts},Array.isArray(cart.memberships)&&(cart.data.memberships=cart.memberships)),Array.isArray(cart.data.items)||(cart.data.items=[]),cart.data.packages=forEc,localStorage.setItem("serviceCart",JSON.stringify(cart))}catch{}},readMembershipCartCount=()=>{try{const arr=JSON.parse(localStorage.getItem("membershipCart")||"[]");if(Array.isArray(arr)&&arr.length)return arr.length}catch{}try{const s=JSON.parse(localStorage.getItem("serviceCart")),cart=s&&(s.data||s)||{},mems=cart.data&&cart.data.memberships||cart.memberships||[];if(Array.isArray(mems))return mems.length}catch{}return 0},mirrorMembershipCartForConfirm=()=>{try{const raw=localStorage.getItem("membershipCart"),arr=raw?JSON.parse(raw):[];if(!Array.isArray(arr)||!arr.length)return;const forEc=arr.map(it=>{const price=typeof it.price=="number"?it.price:typeof it.total=="number"?it.total:(Number(it.subtotal)||0)+(Number(it.taxAmount)||0);return Object.assign({},it,{price})}),s=localStorage.getItem("serviceCart");let cart=s?JSON.parse(s):null;(!cart||typeof cart!="object")&&(cart={data:{},expiry:Date.now()+864e5}),(!cart.data||typeof cart.data!="object")&&(cart.data={items:Array.isArray(cart.items)?cart.items:[],amounts:cart.amounts},Array.isArray(cart.packages)&&(cart.data.packages=cart.packages)),Array.isArray(cart.data.items)||(cart.data.items=[]),cart.data.memberships=forEc,localStorage.setItem("serviceCart",JSON.stringify(cart))}catch{}};let items=[];try{const s=JSON.parse(localStorage.getItem("serviceCart")),cart=s&&(s.data||s)||{items:[]};items=cart.data&&cart.data.items||cart.items||[]}catch{}const pkgCount=window.getPackageCartCount&&window.getPackageCartCount()||readPackageCartCount(),hasMembershipInCart=(()=>{try{const arr=JSON.parse(localStorage.getItem("membershipCart")||"[]");if(Array.isArray(arr)&&arr.length)return!0}catch{}try{const s=JSON.parse(localStorage.getItem("serviceCart")),c=s&&(s.data||s)||{},m=c.data&&c.data.memberships||c.memberships||[];return Array.isArray(m)&&m.length>0}catch{}return!1})();if(!items.length&&pkgCount>0&&!hasMembershipInCart){mirrorPackageCartForConfirm(),window.location.href=window.packageOnlyCheckoutUrl&&window.packageOnlyCheckoutUrl()||"/services/book/confirm?packagesOnly=true";return}const memCount=window.getMembershipCartCount&&window.getMembershipCartCount()||readMembershipCartCount();if(!items.length&&memCount>0){const memCheckoutUrl=pkgCount>0?"/services/book/confirm?packagesOnly=true&membershipsOnly=true":window.membershipOnlyCheckoutUrl&&window.membershipOnlyCheckoutUrl()||"/services/book/confirm?membershipsOnly=true";if(!localStorage.getItem("clientId")){try{localStorage.setItem("pathRedirectToBooking",window.location.href)}catch{}const memModal=document.getElementById("booking-modal"),memOverlay=document.getElementById("booking-modal-overlay");if(memModal&&memOverlay){memModal.style.display="flex",memOverlay.style.display="block",setTimeout(()=>{memModal.style.opacity="1",memOverlay.style.opacity="1";const memContent=memModal.querySelector(".modal-content");memContent&&(memContent.style.transform="scale(1)")},10);return}}mirrorMembershipCartForConfirm(),pkgCount>0&&mirrorPackageCartForConfirm(),window.location.href=memCheckoutUrl;return}if(!items.length){alert("No services selected");return}if(localStorage.getItem("clientId")){try{localStorage.setItem("pathRedirectToBooking",window.location.href)}catch{}mirrorMembershipCartForConfirm(),mirrorPackageCartForConfirm(),window.location.href="/services/book";return}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1";const c=modal.querySelector("#booking-modal-content");c&&(c.style.transform="scale(1)")},10))},handleNavItemClick_248161:function(event){event.preventDefault();const link=event.currentTarget,linkText=link.textContent?.trim()||"",destinationUrl=link.href||"",pageName=document.title,isMobile=link.classList.contains("nav-link-mobile"),navContainer=isMobile?document.getElementById("mobile-menu-links"):document.getElementById("desktop-nav-links"),allNavLinks=navContainer?navContainer.querySelectorAll("a.nav-link, a.nav-link-mobile"):[],position=Array.from(allNavLinks).indexOf(link)+1;let destinationType="internal";if(destinationUrl.includes("mailto:")?destinationType="email":destinationUrl.includes("tel:")?destinationType="phone":destinationUrl.includes("http")&&!destinationUrl.includes(window.location.hostname)&&(destinationType="external"),typeof window<"u"&&window.mixpanel?.track&&window.trackMixpanelEvent("nav-item-click",{menu_item_text:linkText,menu_item_position:position,destination_type:destinationType,destination_url:destinationUrl,page_name:pageName,menu_state:isMobile?"open":"desktop"}),isMobile){const menu=document.getElementById("mobile-menu");if(menu){menu.style.maxHeight="0px",menu.setAttribute("inert",""),document.querySelectorAll("#mobile-menu-content a, #mobile-menu-content button").forEach(item=>{item&&(item.style.transform="translateY(-100%)",item.style.opacity="0",item.style.transitionDelay="0s")});const overlay=document.getElementById("header-overlay");overlay&&(overlay.style.opacity="0",overlay.style.pointerEvents="none");const openIcon=document.getElementById("menu-icon-open"),closeIcon=document.getElementById("menu-icon-close");openIcon&&closeIcon&&(openIcon.classList.remove("menu-icon-close"),openIcon.classList.add("menu-icon-open"),closeIcon.classList.remove("menu-icon-open"),closeIcon.classList.add("menu-icon-close"))}}setTimeout(()=>
4{destinationType==="email"||destinationType==="phone"?window.location.href=destinationUrl:destinationType==="external"?window.open(destinationUrl,"_blank"):window.location.href=destinationUrl},100)},handleCountrySearch_248161:function(event){const searchTerm=event.target.value.toLowerCase().trim(),countryButtons=document.querySelectorAll("#modal-country-dropdown button[data-code]");let hasVisibleResults=!1;countryButtons.forEach(button=>{const countryName=button.querySelector('[data-element-name*="Name"]').textContent.toLowerCase(),countryCode=button.getAttribute("data-code").toLowerCase();countryName.includes(searchTerm)||countryCode.includes(searchTerm)?(button.style.display="flex",hasVisibleResults=!0):button.style.display="none"});let noResultsMessage=document.getElementById("modal-country-no-results");if(!hasVisibleResults&&searchTerm){if(!noResultsMessage){noResultsMessage=document.createElement("div"),noResultsMessage.id="modal-country-no-results",noResultsMessage.className="footerForm-country-no-results",noResultsMessage.setAttribute("data-element-name","No Results Message"),noResultsMessage.setAttribute("data-element-type","text"),noResultsMessage.textContent="No countries found";const dropdown=document.getElementById("modal-country-dropdown");dropdown&&dropdown.appendChild(noResultsMessage)}noResultsMessage.style.display="block"}else noResultsMessage&&(noResultsMessage.style.display="none"),searchTerm||countryButtons.forEach(button=>{button.style.display="flex"})},handleOpenReviewCart_248161:function(event){window.openReviewCart&&window.openReviewCart()},handleFieldValidation_248161:function(event){const field=event.target,isRequired=field.getAttribute("data-required")==="true";if(!isRequired){if(window.trackMixpanelEvent){const cleanedFieldName=field.getAttribute("data-form-field").replace("ctaForm",""),formContainer2=document.getElementById("modal-booking-form"),allFields=formContainer2.querySelectorAll("[data-form-field]"),fieldIndex=Array.from(allFields).indexOf(field),sourceSection=formContainer2.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-input-exit",{field_name:cleanedFieldName,field_type:field.type,form_type:"popupLeadForm",field_position:fieldIndex,field_value:field.value,validation_status:"success",page_name:document.title,source_section:sourceSection})}return}const fieldName=field.getAttribute("data-form-field");if(fieldName==="ctaFormPhone"){if(!window.libphonenumber)return;const value=field.value.trim();if(!value)return;try{const cleanValue=value.replace(/[^\d+]/g,"");if(cleanValue.startsWith("+")){const phoneNumber=window.libphonenumber.parsePhoneNumber(cleanValue);phoneNumber&&phoneNumber.isValid()}else{const phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44",currentCountryCode=document.querySelector("#modal-country-dropdown"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB",fullNumber=countryCode+cleanValue,phoneNumber=window.libphonenumber.parsePhoneNumber(fullNumber,countryCodeForLib);phoneNumber&&phoneNumber.isValid()}}catch(error){console.warn("Error formatting phone number on blur:",error)}}const errors={},fieldValue=field.value?.trim()||"";if(isRequired&&!fieldValue&&(errors[fieldName]="This field is required"),fieldName==="ctaFormFirstName"&&fieldValue&&(fieldValue.length<2?errors[fieldName]="First name must be at least 2 characters":/^[A-Za-z]+$/.test(fieldValue)||(errors[fieldName]="First name can only contain letters")),field.type==="email"&&fieldValue&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue)||(errors[fieldName]="Please enter a valid email address")),field.type==="date"&&fieldValue){const selectedDate=new Date(fieldValue),today=new Date;today.setHours(0,0,0,0),selectedDate.setHours(0,0,0,0),selectedDate<today&&(errors[fieldName]="Please select a date in the future")}else if(fieldName==="ctaFormPhone"&&fieldValue)if(window.libphonenumber){console.log("libphonenumber is available");const phoneCountryField=document.querySelector('[data-form-field="ctaFormPhoneCountry"]');console.log(phoneCountryField);const countryCode=phoneCountryField?.textContent||"+44";let fullPhoneNumber=fieldValue;fieldValue.startsWith("+")||(fullPhoneNumber=countryCode+fieldValue.replace(/\D/g,"")),console.log(fullPhoneNumber);const phoneDigits=fieldValue.replace(/\D/g,"");if(countryCode==="+1"||countryCode==="+91")if(phoneDigits.length!==10)errors[fieldName]="Please enter a valid 10-digit phone number";else try{window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCode==="+91"?"IN":"US")||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed for +1 number:",error)}else try{const currentCountryCode=document.querySelector("#modal
4-country-dropdown"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB";window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCodeForLib)||(errors[fieldName]="Please enter a valid phone number")}catch{phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}else if(/[a-zA-Z]/.test(fieldValue))errors[fieldName]="Phone number cannot contain letters";else{const phoneDigits=fieldValue.replace(/\D/g,""),countryCode=document.querySelector('[data-form-field="ctaFormPhoneCountry"]')?.textContent||"+44";countryCode==="+1"||countryCode==="+91"?phoneDigits.length!==10&&(errors[fieldName]="Please enter a valid 10-digit phone number"):phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}const errorMessage=errors[fieldName]||null,formContainer=document.getElementById("modal-booking-form");if(formContainer&&(formContainer.querySelectorAll(`[data-form-field="${fieldName}"] + .error-message, [data-form-field="${fieldName}"] ~ .error-message, .error-message[data-field="${fieldName}"]`).forEach(error=>error.remove()),["modal-name-fields-container","phone-input-container"].forEach(containerId=>{const container=field.closest(`#${containerId}, .${containerId}`);if(container){const nextSibling=container.nextSibling;nextSibling&&nextSibling.classList&&nextSibling.classList.contains("error-message")&&nextSibling.remove()}})),errorMessage){const phoneContainer=field.closest(".phone-input-container");phoneContainer?(phoneContainer.style.setProperty("border-color","#FF4444","important"),phoneContainer.style.setProperty("border-width","2px","important"),phoneContainer.style.setProperty("border-style","solid","important")):(field.style.setProperty("border-color","#FF4444","important"),field.style.setProperty("border-width","2px","important"),field.style.setProperty("border-style","solid","important"));const errorElement=document.createElement("div");errorElement.className="error-message",errorElement.style.color="#FF4444",errorElement.style.fontSize="14px",errorElement.style.marginTop="4px",errorElement.style.marginBottom="8px",errorElement.style.display="block",errorElement.style.width="100%",errorElement.style.fontWeight="500",errorElement.style.lineHeight="1.4",errorElement.textContent=errorMessage;const fieldContainer=field.closest('[data-element-type="container"]')||field.parentNode,specialContainers=["modal-name-fields-container","phone-input-container"];let targetContainer=null;for(const containerId of specialContainers){const container=field.closest(`#${containerId}, .${containerId}`);if(container){targetContainer=container;break}}targetContainer?(targetContainer.parentNode.insertBefore(errorElement,targetContainer.nextSibling),errorElement.style.marginTop="8px",errorElement.style.marginBottom="12px"):fieldContainer.appendChild(errorElement)}else{const phoneContainer=field.closest(".phone-input-container");phoneContainer?(phoneContainer.style.removeProperty("border-color"),phoneContainer.style.removeProperty("border-width"),phoneContainer.style.removeProperty("border-style")):(field.style.removeProperty("border-color"),field.style.removeProperty("border-width"),field.style.removeProperty("border-style"));const formContainer2=document.getElementById("modal-booking-form");formContainer2&&(formContainer2.querySelectorAll(`[data-form-field="${fieldName}"] + .error-message, [data-form-field="${fieldName}"] ~ .error-message, .error-message[data-field="${fieldName}"]`).forEach(error=>error.remove()),["modal-name-fields-container","phone-input-container"].forEach(containerId=>{const container=field.closest(`#${containerId}, .${containerId}`);if(container){const nextSibling=container.nextSibling;nextSibling&&nextSibling.classList&&nextSibling.classList.contains("error-message")&&nextSibling.remove()}}))}if(window.trackMixpanelEvent){const cleanedFieldName=field.getAttribute("data-form-field").replace("ctaForm",""),formContainer2=document.getElementById("modal-booking-form"),allFields=formContainer2.querySelectorAll("[data-form-field]"),fieldIndex=Array.from(allFields).indexOf(field),sourceSection=formContainer2.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-input-exit",{field_name:cleanedFieldName,field_type:field.type,form_type:"popupLeadForm",field_position:fieldIndex,field_value:fieldValue,validation_status:errors[fieldName]?"failed":"success",page_name:document.title,source_section:sourceSection})}},toggleCountryDropdown_248161:function(event){event.stopPropagation();const dropdown=document.getElementById("modal-country-dropdown"),isVisible=dropdown.style.display==="block";if(console.log(window.populateCountryOptions),window.populateCountryOptions&&(console.log("Calling populateCountryOptions"),window.populateCountryOptions("modal-country-dropdown")),dropdown.style.display=isVisible?"n
4one":"block",!isVisible){const searchInput=document.getElementById("modal-country-search-input");searchInput&&(searchInput.value="")}if(!isVisible){const handleClickOutside=e=>{document.getElementById("modal-country-code-container").contains(e.target)||(dropdown.style.display="none",document.removeEventListener("click",handleClickOutside))};setTimeout(()=>document.addEventListener("click",handleClickOutside),0)}},handleRadioGroupSelect_248161:function(event){const selectedRadio=event.target.querySelector('input[type="radio"]');if(!selectedRadio)return;const radioGroupName=selectedRadio.getAttribute("name");if(!radioGroupName)return;const radioGroup=document.querySelectorAll(`input[type="radio"][name="${radioGroupName}"]`);let previouslySelectedRadio=null,previousValue="";radioGroup.forEach(radio=>{radio.checked&&radio!==selectedRadio&&(previouslySelectedRadio=radio,previousValue=radio.value)});const defaultStyles={backgroundColor:"#fafafa",color:"#1a1a1a",borderColor:"#1a1a1a"},selectedStyles={backgroundColor:"#1a1a1a",color:"white",borderColor:"#1a1a1a"};radioGroup.forEach(radio=>{const parentLabel=radio.closest("label");parentLabel&&Object.assign(parentLabel.style,defaultStyles),radio.checked=!1}),selectedRadio.checked=!0;const selectedParentLabel=selectedRadio.closest("label");selectedParentLabel&&Object.assign(selectedParentLabel.style,selectedStyles);try{const formContainer=document.getElementById("modal-booking-form");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="ctaFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.ctaFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.ctaFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.ctaFormFirstName=trimmed,values.ctaFormLastName="")}else values[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}if(window.trackMixpanelEvent){const formContainer=document.getElementById("modal-booking-form"),cleanedFieldName=selectedRadio.getAttribute("data-form-field").replace("ctaForm",""),sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-radio-click",{field_name:cleanedFieldName,field_type:selectedRadio.type,form_type:"popupLeadForm",form_id:formContainer.getAttribute("data-form-id"),selection_action:"radioClick",selection_value:selectedRadio.value,previous_selection:previousValue||"",field_position:Array.from(formContainer.querySelectorAll("[data-form-field]")).indexOf(selectedRadio),page_name:document.title,source_section:sourceSection})}},handleModalBackdropClick_248161:function(event){if(event.target.id==="booking-modal"){const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.opacity="0",overlay.style.opacity="0",modal.querySelector("#booking-modal-content").style.transform="scale(0.9)",setTimeout(()=>{modal.style.display="none",overlay.style.display="none"},300)),window.trackMixpanelEvent){const formContainer=document.getElementById("modal-booking-form"),formFields=formContainer.querySelectorAll("[data-form-field]"),distinctFormFields=Array.from(formFields).filter((field,index,self)=>index===self.findIndex(t=>t.getAttribute("data-form-field")===field.getAttribute("data-form-field"))),filledFields=Array.from(distinctFormFields).filter(field=>field.value!=="").length,formCompletionPercentage=filledFields/distinctFormFields.length*100;let exit_method="outside_click";const sourceSection=formContainer.getAttribute("data-source-section")||"header";window.trackMixpanelEvent("leadform-exit",{form_type:"popupLeadForm",form_id:formContainer.getAttribute("data-form-id"),exit_method,form_completion_percentage:formCompletionPercentage,form_exit_time:new Date().toISOString(),fields_completed:filledFields,page_name:document.title,source_section:sourceSection})}}},handleBookfromStickyOffer_248161:function(event){if(typeof window<"u"&&window.mixpanel){const buttonText=event.target.textContent||event.target.innerText,buttonHref=event.target.getAttribute("href"),pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"offer_sticky_bar",cta_text:buttonText,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");const formContainer=document.getElementById("modal-booking-form"),formState=localStorage.getItem("formState"),customerType=formState?JSON.parse(formState).values.ctaFormCustomerType:null;formContainer.setAttribute("data-source-section","offerStickyBar");const bookingLink=formContainer.getAttribute("data-booking-link"),autoRedirect=formContainer.getAttribute("data-auto-redirect");if(bookingLink!=""&&bookingLink&&autoRedirect==="true"&&customerType==="returning"&&!sessionStorage.getItem("autoRedirectUsed")){sessionStorage.setItem("autoRedirectUsed","true"),window.location.href=bookingLink;return}try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector(".modal-content").style.transform="scale(1)"},10)),window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title,snippetShown=formContainer.getAttribute("data-snippet-shown"),experimentGroup=formContainer.getAttribute("data-experiment-group");window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"offerStickyBar",snippet_shown:snippetShown,experiment_group:experimentGroup})}},handleGetInTouch_248162:function(event){const btn=event.target.closest("button")||event.target,ctaGlobalCall=btn.getAttribute("data-cta-global-call"),callNowEnabled=btn.getAttribute("data-call-now-enabled"),ctaType=btn.getAttribute("data-cta-type"),callNowPhone=btn.getAttribute("data-call-now-phone"),ctaFallback=btn.getAttribute("data-cta-fallback"),buttonText=btn.querySelector(".website-cta-text")?.textContent||btn.textContent||btn.innerText,ctaRedirectEnabled=btn.getAttribute("data-cta-redirect-enabled"),ctaRedirectUrl=btn.getAttribute("data-cta-redirect-url");if(ctaRedirectEnabled==="true"&&ctaRedirectUrl){typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("book-cta",{cta_section_name:"banner",cta_text:buttonText,page_name:document.title,de
4stination_type:"external",external_url:ctaRedirectUrl}),window.open(ctaRedirectUrl,"_blank","noopener,noreferrer");return}if((ctaGlobalCall==="true"&&ctaType==="call"||callNowEnabled==="true")&&callNowPhone){if(typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("book-cta",{cta_section_name:"banner",cta_text:buttonText,page_name:document.title,destination_type:"phone",phone_number:callNowPhone}),window.location.href=`tel:${callNowPhone}`,ctaFallback==="true"){let fallbackFired=!1;const onVis=()=>{document.visibilityState==="visible"&&!fallbackFired&&(fallbackFired=!0,document.removeEventListener("visibilitychange",onVis),setTimeout(()=>{const fallbackModal=document.getElementById("booking-modal"),fallbackOverlay=document.getElementById("booking-modal-overlay");fallbackModal&&fallbackOverlay&&(fallbackModal.style.display="flex",fallbackOverlay.style.display="block",setTimeout(()=>{fallbackModal.style.opacity="1",fallbackOverlay.style.opacity="1";const content=fallbackModal.querySelector("#booking-modal-content");content&&(content.style.transform="scale(1)")},10))},500))};document.addEventListener("visibilitychange",onVis)}return}if(typeof window<"u"&&window.mixpanel){const buttonText2=event.target.textContent||event.target.innerText,buttonHref=event.target.getAttribute("href"),pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"banner",cta_text:buttonText2,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");const formContainer=document.getElementById("modal-booking-form"),formState=localStorage.getItem("formState"),customerType=formState?JSON.parse(formState).values.ctaFormCustomerType:null;formContainer.setAttribute("data-source-section","banner");const bookingLink=formContainer.getAttribute("data-booking-link"),autoRedirect=formContainer.getAttribute("data-auto-redirect");if(bookingLink!=""&&bookingLink&&autoRedirect==="true"&&customerType==="returning"){window.location.href=bookingLink;return}const isAlphaWebsite=(window.getWebsiteDetails?.()||{}).websiteType==="alpha",clientId=localStorage.getItem("clientId"),firstStepSubmitted=localStorage.getItem("firstStepSubmitted"),rebookTimestamp=localStorage.getItem("rebookDirectTimestamp");if(isAlphaWebsite&&clientId&&firstStepSubmitted==="true"&&rebookTimestamp)if(Date.now()-parseInt(rebookTimestamp,10)<6e5){console.log("[GetInTouchBanner] Within 10-min window - redirecting to /services"),window.location.href="/services";return}else console.log("[GetInTouchBanner] 10-min window expired - showing modal"),localStorage.removeItem("rebookDirectTimestamp");try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector("#booking-modal-content").style.transform="scale(1)"},10)),formContainer){const firstInput=formContainer.querySelector('input[type="text"], input[type="tel"], input[type="email"], textarea, select');firstInput&&firstInput.focus()}if(window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title;window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"banner"})}},handleAnnouncementClick_248163:function(event){if(typeof window<"u"&&window.trackMixpanelEvent){const buttonText=event.target.textContent||event.target.innerText,buttonHref=event.target.getAttribute("href"),pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"marquee",cta_text:buttonText,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");const formContainer=document.getElementById("modal-booking-form"),formState=localStorage.getItem("formState"),customerType=formState?JSON.parse(formState).values.ctaFormCustomerType:null;formContainer.setAttribute("data-source-section","marquee");const bookingLink=formContainer.getAttribute("data-booking-link"),autoRedirect=formContainer.getAttribute("data-auto-redirect");if(bookingLink!=""&&bookingLink&&autoRedirect==="true"&&customerType==="returning"){window.location.href=bookingLink;return}const isAlphaWebsite=(window.getWebsiteDetails?.()||{}
4).websiteType==="alpha",clientId=localStorage.getItem("clientId"),firstStepSubmitted=localStorage.getItem("firstStepSubmitted"),rebookTimestamp=localStorage.getItem("rebookDirectTimestamp");if(isAlphaWebsite&&clientId&&firstStepSubmitted==="true"&&rebookTimestamp)if(Date.now()-parseInt(rebookTimestamp,10)<6e5){console.log("[AnnouncementClick] Within 10-min window - redirecting to /services"),window.location.href="/services";return}else console.log("[AnnouncementClick] 10-min window expired - showing modal"),localStorage.removeItem("rebookDirectTimestamp");try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");if(modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector("#booking-modal-content").style.transform="scale(1)"},10)),window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title;window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"marquee"})}},handleAnnouncementClickKeyDown_248163:function(event){event.target===event.currentTarget&&(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.currentTarget.click())},handleViewAllClick_248164:function(event){event.preventDefault();const destinationUrl=event.currentTarget.getAttribute("href"),pageName=document.title,sectionElement=event.currentTarget.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section";typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewall",{section_name:sectionName,page_name:pageName,destination_page:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleServiceExpand_248164:function(event){event.preventDefault(),event.stopPropagation();const moreTextElement=event.currentTarget;if(!moreTextElement.textContent)return;const serviceCard=moreTextElement.closest(".carousel-card"),expandedTextElement=serviceCard.querySelector('[data-element-name*="Expanded Text"]');if(!expandedTextElement)return;const allCards=document.querySelectorAll(".services-section .carousel-card"),isCurrentlyExpanded=!expandedTextElement.classList.contains("hidden"),serviceTitle=serviceCard.querySelector(".carousel-card-title")?.textContent||"",serviceDescription=serviceCard.querySelector(".carousel-card-text")?.textContent||"",pageName=document.title,sectionElement=serviceCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section";requestAnimationFrame(()=>{const updates=[];if(allCards.forEach(card=>{const otherExpandedText=card.querySelector('[data-element-name*="Expanded Text"]'),otherMoreText=card.querySelector(".more-text");card===serviceCard?updates.push({expandedText:expandedTextElement,moreText:moreTextElement,action:isCurrentlyExpanded?"collapse":"expand"}):otherExpandedText&&!otherExpandedText.classList.contains("hidden")&&updates.push({expandedText:otherExpandedText,moreText:otherMoreText,action:"collapse"})}),updates.forEach(update=>{update.action==="collapse"?(update.expandedText.classList.add("hidden"),update.moreText&&(update.moreText.textContent="...more")):(update.expandedText.classList.remove("hidden"),update.moreText&&(update.moreText.textContent="...less"))}),typeof window<"u"&&window.mixpanel)if(isCurrentlyExpanded){const readDuration=serviceCard._readMoreStartTime?Date.now()-serviceCard._readMoreStartTime:0;window.trackMixpanelEvent("section-readless",{section_name:sectionName,content_read_duration:read
4Duration,page_name:pageName,content:serviceDescription}),delete serviceCard._readMoreStartTime}else serviceCard._readMoreStartTime=Date.now(),window.trackMixpanelEvent("section-readmore",{section_name:sectionName,content_length:serviceDescription.length,page_name:pageName,content:serviceDescription});setTimeout(()=>{const section=serviceCard.closest(".services-section");if(!section)return;const wrappers=section.querySelectorAll(".service-card-wrapper");if(!wrappers.length)return;wrappers.forEach(wrapper=>{wrapper.style.minHeight=""});let tallest=0;wrappers.forEach(wrapper=>{const height=wrapper.getBoundingClientRect().height;height>tallest&&(tallest=height)}),tallest>0&&wrappers.forEach(wrapper=>{wrapper.style.minHeight=tallest+"px"});const carousel=section.querySelector(".main-carousel");if(carousel&&window.Flickity&&carousel.classList.contains("flickity-enabled")){const flkty=window.Flickity.data(carousel);flkty&&flkty.resize()}},100)})},handleServiceImageClick_248164:function(event){if(event.target.closest("button")||event.target.closest(".more-text"))return;const serviceCard=event.currentTarget.closest(".carousel-card"),pageName=document.title,sectionElement=serviceCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section",serviceTitle=serviceCard.querySelector(".carousel-card-title")?.textContent||"",serviceId=serviceCard.id,serviceImage=serviceCard.querySelector(".carousel-card-image"),hasThumbnail=serviceImage&&serviceImage.src&&!serviceImage.src.includes("placeholder"),serviceUrl=serviceCard.querySelector(".service-button")?.href||"",allCards=serviceCard.parentElement.querySelectorAll(".carousel-card"),position=Array.from(allCards).indexOf(serviceCard)+1;typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewservice",{section_name:sectionName,service_id:serviceId,service_name:serviceTitle,service_position:position,page_name:pageName,service_thumbnail_present:hasThumbnail,click_type:"card",destination_url:serviceUrl||""}),serviceUrl&&setTimeout(()=>{window.location.href=serviceUrl},100)},handleServiceButtonClick_248164:function(event){event.preventDefault(),event.stopPropagation();const button=event.currentTarget,serviceCard=button.closest(".carousel-card"),destinationUrl=button.getAttribute("href"),pageName=document.title,sectionElement=serviceCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section",serviceTitle=serviceCard.querySelector(".carousel-card-title")?.textContent||"",serviceId=serviceCard.id,serviceImage=serviceCard.querySelector(".carousel-card-image"),hasThumbnail=serviceImage&&serviceImage.src&&!serviceImage.src.includes("placeholder"),allCards=serviceCard.parentElement.querySelectorAll(".carousel-card"),position=Array.from(allCards).indexOf(serviceCard)+1;typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewservice",{section_name:sectionName,service_id:serviceId,service_name:serviceTitle,service_position:position,page_name:pageName,service_thumbnail_present:hasThumbnail,click_type:"button",destination_url:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleServiceExpandKeyDown_248164:function(event){event.target===event.currentTarget&&(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.currentTarget.click())},handleServiceImageClickKeyDown_248164:function(event){event.target===event.currentTarget&&event.key==="Enter"&&(event.preventDefault(),event.currentTarget.click())},handleGetInTouch_740294:function(event){const externalUrl=event.target.getAttribute("data-external-url"),shouldRedirect=event.target.getAttribute("data-external-redirection");if(typeof window<"u"&&window.mixpanel){const buttonText=event.target.textContent||event.target.innerText,buttonHref=shouldRedirect&&externalUrl?externalUrl:null,pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"split-card-offer-section",cta_text:buttonText,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");if(shouldRedirect==="true"&&externalUrl){window.location.href=externalUrl;return}try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector("#booking-modal-content").style.transform="scale(1)"},10));const formContainer=document.getElementById("modal-booking-form");if(formContainer.setAttribute("data-source-section","splitCardOfferSection"),formContainer){const firstInput=formContainer.querySelector('input[type="text"], input[type="tel"], input[type="email"], textarea, select');firstInput&&firstInput.focus()}if(window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title;window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"splitCardOfferSection"})}},handleToggleOfferVideoMute_740294:function(event){const button=event.currentTarget,wrapper=button.closest(".offer-card-image-video"),video=wrapper?wrapper.querySelector("video"):null;video&&(video.muted=!video.muted,button.classList.toggle("is-muted",video.muted),button.setAttribute("aria-pressed",video.muted?"true":"false"),button.setAttribute("aria-label",video.muted?"Unmute video":"Mute video"))},handleGetInTouch_248211:function(event){const externalUrl=event.target.getAttribute("data-external-url"),shouldRedirect=event.target.getAttribute("data-external-redirection");if(typeof window<"u"&&window.mixpanel){const buttonText=event.target.textContent||event.target.innerText,buttonHref=shouldRedirect&&externalUrl?externalUrl:null,pageName=document.title;let destinationType="internal";buttonHref&&(buttonHref.includes("mailto:")?destinationType="email":buttonHref.includes("tel:")?destinationType="phone":buttonHref.includes("http")&&!buttonHref.includes(window.location.hostname)&&(destinationType="external")),window.trackMixpanelEvent("book-cta",{cta_section_name:"split-card-offer-section",cta_text:buttonText,page_name:pageName,destination_type:destinationType})}else console.log("Mixpanel not found");if(shouldRedirect==="true"&&externalUrl){window.location.href=externalUrl;return}try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true")return}catch{}try{const __markersRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__markersRaw&&JSON.parse(__markersRaw).lead_form_bypass==="true"){const __bypassUrl=(document.querySelector('form[data-referenced-layout="footer_form"][data-booking-link]')||document.querySelector("form[data-booking-link]"))?.getAttribute("data-booking-link")?.trim();if(__bypassUrl){window.location.href=__bypassUrl;return}}}catch{}const modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(()=>{modal.style.opacity="1",overlay.style.opacity="1",modal.querySelector("#booking-modal-content").style.transform="scale(1)"},10));const formContainer=document.getElementById("modal-booking-form");if(formContainer.setAttribute("data-source-section","splitCardOfferSection"),formContainer){const firstInput=formContainer.querySelector('input[type="text"], input[type="tel"], input[type="email"], textarea, select');firstInput&&firstInput.focus()}if(window.trackMixpanelEvent){const formId=formContainer.getAttribute("data-form-id"),pageName=document.title;window.trackMixpanelEvent("leadform-view",{form_type:"popupLeadForm",form_id:formId,page_name:pageName,form_entry_time:new Date().toISOString(),source_section:"splitCardOfferSection"})}},handleToggleOfferVideoMute_248211:function(event){const button=event.currentTarget,wrapper=button.closest(".offer-card-image-video"),video=wrapper?wrapper.querySelector("video"):null;video&&(video.muted=!video.muted,button.classList.toggle("is-muted",video.muted),button.setAttribute("aria-pressed",video.muted?"true":"false"),button.setAttribute("aria-label",video.muted?"Unmute video":"Mute video"))},handleImageClick_248165:function(event){const image=event.currentTarget,pageName=document.title,sectionElement=image.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Gallery Section",imageId=image.id,imageAlt=image.alt||"",imageSize={
4width:image.naturalWidth||0,height:image.naturalHeight||0},allImages=sectionElement.querySelectorAll(".gallery-image"),position=Array.from(allImages).indexOf(image)+1;typeof window<"u"&&window.trackMixpanelEvent&&window.trackMixpanelEvent("section-image-click",{section_name:sectionName,image_id:imageId,image_position:position,image_size:`${imageSize.width}x${imageSize.height}`,image_alt_text:imageAlt,page_name:pageName})},handleViewAllClick_248165:function(event){event.preventDefault();const destinationUrl=event.currentTarget.getAttribute("href"),pageName=document.title,sectionElement=event.currentTarget.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Gallery Section";typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewall",{section_name:sectionName,page_name:pageName,destination_page:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleImageClickKeyDown_248165:function(event){event.target===event.currentTarget&&(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.currentTarget.click())},handleViewAllClick_248166:function(event){event.preventDefault();const destinationUrl=event.currentTarget.getAttribute("href"),pageName=document.title,sectionElement=event.currentTarget.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Testimonials Section";typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewall",{section_name:sectionName,page_name:pageName,destination_page:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleTestimonialExpand_248166:function(event){const moreTextElement=event.currentTarget;if(!moreTextElement.textContent)return;const testimonialCard=moreTextElement.closest(".testimonial-card"),expandedTextElement=testimonialCard.querySelector('[data-element-name*="Expanded Text"]');if(!expandedTextElement)return;const wasExpanded=!expandedTextElement.classList.contains("hidden"),authorName=testimonialCard.querySelector(".author-name")?.textContent||"",testimonialText=testimonialCard.querySelector(".testimonial-text")?.textContent||"",expandedText=expandedTextElement.textContent||"",fullTestimonialContent=testimonialText+" "+expandedText,pageName=document.title,sectionElement=testimonialCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Testimonials Section",equalizeOddEvenCardHeights=()=>{const allCards2=document.querySelectorAll(".testimonial-card");if(!allCards2.length)return;const oddCards=[],evenCards=[];allCards2.forEach(card=>{const match=card.id.match(/^testimonial-card-(\d+)_/);if(match){const groupNumber=parseInt(match[1],10);groupNumber===1?oddCards.push(card):groupNumber===2&&evenCards.push(card)}});const equalizeGroupHeight=cards=>{cards.length!==0&&requestAnimationFrame(()=>{cards.forEach(card=>{card.style.removeProperty("height"),card.style.removeProperty("min-height")}),requestAnimationFrame(()=>{setTimeout(()=>{let targetHeight=0,hasExpandedCard=!1;cards.forEach(card=>{const expandedText2=card.querySelector(".expanded-text");expandedText2&&!expandedText2.classList.contains("hidden")&&(hasExpandedCard=!0,targetHeight=Math.max(targetHeight,card.getBoundingClientRect().height))}),hasExpandedCard&&targetHeight>0?cards.forEach(card=>{card.style.setProperty("height",`${targetHeight}px`,"important"),card.style.setProperty("min-height",`${targetHeight}px`,"important")}):cards.forEach(card=>{card.style.removeProperty("height"),card.style.removeProperty("min-height")})},10)})})};equalizeGroupHeight(oddCards),equalizeGroupHeight(evenCards),setTimeout(()=>{const carousel=document.querySelector(".testimonials-carousel");if(carousel&&window.Flickity&&carousel.classList.contains("flickity-enabled")){const flkty=window.Flickity.data(carousel),viewport=carousel.querySelector(".flickity-viewport"),selectedCell=carousel.querySelector(".is-selected");flkty&&viewport&&selectedCell&&(viewport.style.height=selectedCell.offsetHeight+"px",flkty.resize(),flkty.reloadCells(),flkty.select(flkty.selectedIndex))}},500)};if(document.querySelectorAll(".testimonial-card").forEach(card=>{const expandedText2=card.querySelector('[data-element-name*="Expanded Text"]'),moreText=card.querySelector(".more-text");expandedText2&&moreText.textContent.trim()!==""&&(expandedText2.classList.add("hidden"),moreText.textContent="...more")}),!wasExpanded)expandedTextElement.classList.remove("hidden"),moreTextElement.textContent="...less",typeof window<"u"&&window.mixpanel&&(testimonialCard._readMoreStartTime=Date.now(),window.trackMixpanelEvent("section-readmore",{section_name:sectionName,content_length:fullTestimonialContent.length,page_name:pageName,author_name:authorName,content:fullTestimonialContent}));else if(typeof window<"u"&&window.mixpanel){const readDuration=testimonialCard._readMoreStartTime?Date.now()-testimonialCard._readMoreStartTime:0;window.trackMixpanelEvent("section-readless",{section_name:sectionName,content_read_duration:read
4Duration,page_name:pageName,author_name:authorName,content:fullTestimonialContent}),delete testimonialCard._readMoreStartTime}requestAnimationFrame(()=>{equalizeOddEvenCardHeights(),setTimeout(()=>{const carousel=testimonialCard.closest(".testimonials-carousel");if(carousel&&window.Flickity&&carousel.classList.contains("flickity-enabled")){const flkty=window.Flickity.data(carousel),viewport=carousel.querySelector(".flickity-viewport"),selectedCell=carousel.querySelector(".is-selected");flkty&&viewport&&selectedCell&&(viewport.style.height=selectedCell.offsetHeight+"px",flkty.resize(),flkty.reloadCells(),flkty.select(flkty.selectedIndex))}},100)})},handleTestimonialExpandKeyDown_248166:function(event){event.target===event.currentTarget&&(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.currentTarget.click())},handleReadMore_248167:function(event){const expandedText=event.target.parentElement.querySelector("[data-expanded]"),moreTextSpan=event.target,pageName=document.title,sectionElement=event.target.closest("section"),sectionName=sectionElement?.getAttribute("data-element-name")||sectionElement?.id||"About Section",fullContent=event.target.parentElement.textContent||"";expandedText.classList.contains("hidden")?(expandedText.classList.remove("hidden"),moreTextSpan.textContent="less",typeof window<"u"&&window.mixpanel&&(window.aboutReadMoreStartTime=Date.now(),window.trackMixpanelEvent("section-readmore",{section_name:sectionName,content_length:fullContent.length,page_name:pageName,content:fullContent}))):(expandedText.classList.add("hidden"),moreTextSpan.textContent="...more",typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-readless",{section_name:sectionName,content_read_duration:Date.now()-(window.aboutReadMoreStartTime||Date.now()),page_name:pageName,content:fullContent}))},handleReadMoreKeyDown_248167:function(event){event.target===event.currentTarget&&(event.key==="Enter"||event.key===" ")&&(event.preventDefault(),event.currentTarget.click())},handleToggleAboutVideoMute_248167:function(event){const button=event.currentTarget,container=document.getElementById("about-image-container"),video=container?container.querySelector("video"):null;video&&(video.muted=!video.muted,button.classList.toggle("is-muted",video.muted),button.setAttribute("aria-pressed",video.muted?"true":"false"),button.setAttribute("aria-label",video.muted?"Unmute video":"Mute video"))},toggleAccordion_248168:function(event){const hideWhenCollapsed=panel=>{if(panel.hidden)return;const token=String((parseInt(panel.dataset.collapseToken,10)||0)+1);panel.dataset.collapseToken=token;const finish=()=>{panel.removeEventListener("transitionend",onEnd),panel.dataset.collapseToken===token&&(panel.hidden=!0)},onEnd=event2=>{event2.target===panel&&event2.propertyName==="max-height"&&finish()};panel.addEventListener("transitionend",onEnd),setTimeout(finish,400)},faqId=event.currentTarget.id.split(/faq-button-/)[1],content=document.getElementById(`faq-content-${faqId}`),icon=document.getElementById(`faq-icon-${faqId}`);if(content&&icon){const isOpen=parseInt(content.style.maxHeight)>0,pageName=document.title,sectionElement=event.currentTarget.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"FAQ Section";if(isOpen&&typeof window<"u"&&window.trackMixpanelEvent){const expandTime=window[`faqExpandTime_${faqId}`]||Date.now(),duration=Date.now()-expandTime;window.trackMixpanelEvent("section-collapse",{section_name:sectionName,content_read_duration:duration,page_name:pageName})}const allContents=document.querySelectorAll("[id^=faq-content-]"),allIcons=document.querySelectorAll("[id^=faq-icon-]");if(allContents.forEach((item,index)=>{const itemId=index+1;if(parseInt(item.style.maxHeight)>0&&itemId!==parseInt(faqId)&&typeof window<"u"&&window.trackMixpanelEvent){const expandTime=window[`faqExpandTime_${itemId}`]||Date.now(),duration=Date.now()-expandTime;window.trackMixpanelEvent("section-collapse",{section_name:sectionName,content_read_duration:duration,page_name:pageName})}item.style.maxHeight=0,item.style.opacity=0,document.getElementById(item.id.replace("faq-content-","faq-button-"))?.setAttribute("aria-expanded","fal
4se"),hideWhenCollapsed(item)}),allIcons.forEach(item=>{item.style.transform="rotate(0deg)"}),!isOpen&&(content.hidden=!1,content.dataset.collapseToken=String((parseInt(content.dataset.collapseToken,10)||0)+1),content.style.maxHeight=`${content.scrollHeight}px`,content.style.opacity=1,event.currentTarget.setAttribute("aria-expanded","true"),icon.style.transform="rotate(45deg)",typeof window<"u"&&window.trackMixpanelEvent)){const contentText=content.querySelector(".accordion-answer")?.textContent||"";window.trackMixpanelEvent("section-expand",{section_name:sectionName,content_size:contentText.length,page_name:pageName}),window[`faqExpandTime_${faqId}`]=Date.now()}}},handleViewAllClick_687729:function(event){event.preventDefault();const destinationUrl=event.currentTarget.getAttribute("href"),pageName=document.title,sectionElement=event.currentTarget.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section";typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewall",{section_name:sectionName,page_name:pageName,destination_page:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleServiceImageClick_687729:function(event){if(event.target.closest("button")||event.target.closest(".more-text"))return;const serviceCard=event.currentTarget.closest(".carousel-card"),pageName=document.title,sectionElement=serviceCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section",serviceTitle=serviceCard.querySelector(".carousel-card-title")?.textContent||"",serviceId=serviceCard.id,serviceImage=serviceCard.querySelector(".carousel-card-image"),hasThumbnail=serviceImage&&serviceImage.src&&!serviceImage.src.includes("placeholder"),serviceUrl=serviceCard.querySelector(".service-button")?.href||"",allCards=serviceCard.parentElement.querySelectorAll(".carousel-card"),position=Array.from(allCards).indexOf(serviceCard)+1;typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewservice",{section_name:sectionName,service_id:serviceId,service_name:serviceTitle,service_position:position,page_name:pageName,service_thumbnail_present:hasThumbnail,click_type:"card",destination_url:serviceUrl||""}),serviceUrl&&setTimeout(()=>{window.location.href=serviceUrl},100)},handleServiceButtonClick_687729:function(event){event.preventDefault(),event.stopPropagation();const button=event.currentTarget,serviceCard=button.closest(".carousel-card"),destinationUrl=button.getAttribute("href"),pageName=document.title,sectionElement=serviceCard.closest("section"),sectionName=sectionElement?.getAttribute("data-section-name")||sectionElement?.id||"Services Section",serviceTitle=serviceCard.querySelector(".carousel-card-title")?.textContent||"",serviceId=serviceCard.id,serviceImage=serviceCard.querySelector(".carousel-card-image"),hasThumbnail=serviceImage&&serviceImage.src&&!serviceImage.src.includes("placeholder"),allCards=serviceCard.parentElement.querySelectorAll(".carousel-card"),position=Array.from(allCards).indexOf(serviceCard)+1;typeof window<"u"&&window.mixpanel&&window.trackMixpanelEvent("section-viewservice",{section_name:sectionName,service_id:serviceId,service_name:serviceTitle,service_position:position,page_name:pageName,service_thumbnail_present:hasThumbnail,click_type:"button",destination_url:destinationUrl||""}),destinationUrl&&setTimeout(()=>{window.location.href=destinationUrl},100)},handleServiceImageClickKeyDown_687729:function(event){event.target===event.currentTarget&&event.key==="Enter"&&(event.preventDefault(),event.currentTarget.click())},saveFormState_248169:function(event){try{const formContainer=document.getElementById("footer-form-container");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="footerFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.footerFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.footerFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.footerFormFirstName=trimmed,values.footerFormLastName="")}else values[fieldName]=fieldValue}
4),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}},handleFormSubmit_248169:function(event){try{const __blockRaw=document.querySelector("[data-global-visibility-markers]")?.getAttribute("data-global-visibility-markers");if(__blockRaw&&JSON.parse(__blockRaw).block_lead_form==="true"){event?.preventDefault?.();return}}catch{}const VALID_CREATE_FIELDS=["service","serviceId","servicePrice","serviceDuration","price","currency","email","date","services","message"],VALID_UPDATE_FIELDS=[...VALID_CREATE_FIELDS,"category","categoryId","enquiryId","secondStep"],baseUrl="https://api.zoca.ai",schedulingEnabled=!1,fingerprint=localStorage.getItem("visitorId");event.preventDefault();const submitBtn=document.getElementById("footer-submit-button")||event?.submitter||event?.target?.querySelector('button[type="submit"]');if(submitBtn&&submitBtn.disabled){console.log("[FormSubmitFooter] Button already disabled, ignoring submission");return}submitBtn&&(submitBtn.disabled=!0,submitBtn.style.opacity="0.6",submitBtn.style.pointerEvents="none");const reEnableSubmitBtn=()=>{submitBtn&&(submitBtn.disabled=!1,submitBtn.style.opacity="",submitBtn.style.pointerEvents="")},formContainer=document.getElementById("footer-form-container"),formValidationPage=parseInt(formContainer.getAttribute("data-current-page")||"0"),formValidationPageElement=formContainer.querySelector(`[data-form-page="${formValidationPage}"]`),formValidationPageFields=formValidationPageElement?formValidationPageElement.querySelectorAll("[data-form-field]"):[];formContainer.querySelectorAll("[data-form-field]").forEach(field=>{const existingError=field.parentNode.querySelector(".error-message");existingError&&existingError.remove(),field.style.borderColor="",field.style.borderWidth=""});const errors={};if(formValidationPageFields.forEach((field,index)=>{const fieldName=field.getAttribute("data-form-field"),isRequired=field.getAttribute("data-required")==="true",fieldType=field.type,fieldValue=field.value?.trim()||"";if(isRequired)if(fieldType==="radio"){const radioGroupName=field.getAttribute("name");formContainer.querySelector(`input[type="radio"][name="${radioGroupName}"]:checked`)||(errors[fieldName]="This field is required")}else fieldType==="checkbox"?field.checked||(errors[fieldName]=field.hasAttribute("data-consent-key")?"Please tick this box to continue":"This field is required"):fieldValue||(errors[fieldName]="This field is required");if(fieldName==="footerFormFirstName"&&fieldValue&&(fieldValue.length<2&&(errors[fieldName]="First name must be at least 2 characters"),/^[a-zA-Z\s]+$/.test(fieldValue)||(errors[fieldName]="First name can only contain letters")),fieldName==="footerFormLastName"&&fieldValue&&(fieldValue.length<2&&(errors[fieldName]="Last name must be at least 2 characters"),/^[a-zA-Z\s]+$/.test(fieldValue)||(errors[fieldName]="Last name can only contain letters")),fieldType==="email"&&fieldValue&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue)||(errors[fieldName]="Please enter a valid email address")),fieldType==="date"&&fieldValue){const selectedDate=new Date(fieldValue),today=new Date;today.setHours(0,0,0,0),selectedDate.setHours(0,0,0,0),selectedDate<today&&(errors[fieldName]="Please select a date in the future")}if(fieldName==="footerFormPhone"&&fieldValue)if(window.libphonenumber){console.log("libphonenumber is available for form submit validation");const phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44";let fullPhoneNumber=fieldValue;fieldValue.startsWith("+")||(fullPhoneNumber=countryCode+fieldValue.replace(/\D/g,"")),console.log("Validating phone number:",fullPhoneNumber);const phoneDigits=fieldValue.replace(/\D/g,"");if(countryCode==="+1"||countryCode==="+91")if(phoneDigits.length!==10)errors[fieldName]="Please enter a valid 10-digit phone number";else try{window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCode==="+91"?"IN":"US")||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed for +1 number:",error)}else try{const currentCountryCode=document.querySelector("[data-current-country-code]"),countryCodeForLib=currentCountryCode?
4currentCountryCode.getAttribute("data-current-country-code"):"GB";window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCodeForLib)||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed, using fallback:",error),phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}else if(/[a-zA-Z]/.test(fieldValue))errors[fieldName]="Phone number cannot contain letters";else{const phoneDigits=fieldValue.replace(/\D/g,""),phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44";countryCode==="+1"||countryCode==="+91"?phoneDigits.length!==10&&(errors[fieldName]="Please enter a valid 10-digit phone number"):phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}),Object.keys(errors).length>0){Object.keys(errors).forEach(fieldName=>{const errorMessage=errors[fieldName],field=formContainer.querySelector(`[data-form-field="${fieldName}"]`);if(!field)return;const existingError=field.parentNode.querySelector(".error-message");if(existingError&&existingError.remove(),errorMessage){field.style.borderColor="#FF4444",field.style.borderWidth="2px";const errorElement=document.createElement("div");errorElement.className="error-message",errorElement.style.color="#FF4444",errorElement.style.fontSize="14px",errorElement.style.marginTop="4px",errorElement.textContent=errorMessage,field.parentNode.appendChild(errorElement)}});const firstErrorField=formContainer.querySelector(`[data-form-field="${Object.keys(errors)[0]}"]`);firstErrorField&&firstErrorField.focus(),reEnableSubmitBtn();return}const formFields=formContainer.querySelectorAll("[data-form-field]"),formData={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="footerFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(formData.footerFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),formData.footerFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(formData.footerFormFirstName=trimmed,formData.footerFormLastName="")}else formData[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(formData[fieldName]=radioGroups[fieldName])});const firstName=formData.footerFormFirstName||"";if(firstName){const replaceInTextNodes=node=>{node.nodeType===Node.TEXT_NODE?node.textContent&&node.textContent.includes("{{firstName}}")&&(node.textContent=node.textContent.replace(/\{\{firstName\}\}/g,firstName)):node.nodeType===Node.ELEMENT_NODE&&(node.placeholder&&node.placeholder.includes("{{firstName}}")&&(node.placeholder=node.placeholder.replace(/\{\{firstName\}\}/g,firstName)),node.title&&node.title.includes("{{firstName}}")&&(node.title=node.title.replace(/\{\{firstName\}\}/g,firstName)),node.alt&&node.alt.includes("{{firstName}}")&&(node.alt=node.alt.replace(/\{\{firstName\}\}/g,firstName)),Array.from(node.childNodes).forEach(childNode=>{replaceInTextNodes(childNode)}))};Array.from(formContainer.childNodes).forEach(node=>{console.log("Checking All nodes"),replaceInTextNodes(node)})}const formCurrentPage=parseInt(formContainer.getAttribute("data-current-page")||"0");if(formCurrentPage===0){const countryCode=formData.footerFormPhoneCountry||"+1",customerType=schedulingEnabled===!0?null:formData.footerFormCustomerType==="returning"?"returning":"new",firstName2=formData.footerFormFirstName||"",lastName=formData.footerFormLastName||"",phoneNumber=formData.footerFormPhone?formData.footerFormPhone.replace(/\D/g,""):"",urlParam
4s=new URLSearchParams(window.location.search),utmSource=urlParams.get("utm_source")||"",utmMedium=urlParams.get("utm_medium")||"",utmCampaign=urlParams.get("utm_campaign")||"",entityId=formContainer.getAttribute("data-entity-id");localStorage.setItem("firstStepSubmitted","true");const getInitialReferrerFromMixpanel=()=>{try{return typeof window<"u"&&window.mixpanel&&(window.mixpanel.get_property("$initial_referring_domain")||window.mixpanel.get_property("$referring_domain"))||""}catch(error){return console.error("Error getting Mixpanel referrer domain:",error),""}},additionalFields=((formData2,prefix,validFields)=>{const additionalFields2={};return Object.keys(formData2).forEach(fieldName=>{const cleanFieldName=fieldName.replace(prefix,""),finalFieldName=cleanFieldName.charAt(0).toLowerCase()+cleanFieldName.slice(1);validFields.includes(finalFieldName)&&(additionalFields2[finalFieldName]=formData2[fieldName])}),additionalFields2})(formData,"footerForm",VALID_CREATE_FIELDS),consents={};formContainer.querySelectorAll("[data-consent-key]").forEach(consentInput=>{const consentKey=consentInput.getAttribute("data-consent-key");consentKey&&(consents[consentKey]=consentInput.checked===!0)});const hasConsents=Object.keys(consents).length>0,appointmentBox=formContainer.querySelector('[data-form-field="footerFormAppointmentConfirmation"]'),isMarketingConsentGiven=appointmentBox?appointmentBox.checked===!0:!1,requestBody={countryCode,customerType,entityId,firstName:firstName2,lastName,phoneNumber,query:{utm_campaign:utmCampaign,utm_medium:utmMedium,utm_source:utmSource},referrer:getInitialReferrerFromMixpanel()||"$direct",source:"WEBSITE",utmCampaign,utmMedium,utmSource,...additionalFields,...hasConsents&&{consents,isMarketingConsentGiven},...schedulingEnabled===!0&&{formType:"scheduling_form"}};if(window.trackMixpanelEvent){const buttonText=document.getElementById("footer-submit-button")?.textContent,footerCheckbox=document.querySelector('[data-form-field="footerFormAppointmentConfirmation"]');window.trackMixpanelEvent("leadform-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,submission_payload:requestBody,page_name:"home",source_section:"contact",scheduling_active:schedulingEnabled===!0,checked:schedulingEnabled===!0?footerCheckbox?footerCheckbox.checked:!1:null})}const headers={"Content-Type":"application/json"};fingerprint&&(headers["x-fingerprint"]=fingerprint),fetch(`${baseUrl}/booking-enquiries`,{method:"POST",headers,body:JSON.stringify(requestBody)}).then(response=>{if(!response.ok){if(window.trackMixpanelEvent){const buttonText=document.getElementById("footer-submit-button")?.textContent,errorResponse={statusCode:response.status,errorMessage:response.statusText};window.trackMixpanelEvent("leadform-error-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,error_response:errorResponse,submission_payload:requestBody,page_name:"home",source_section:"contact"})}throw new Error(`HTTP error! status: ${response.status}`)}return response.json()}).then(async data=>{console.log("Lead submitted successfully:",data);const enquiryId=data?.data?.enquiry?.id,clientId=data?.data?.client?.id||data?.data?.enquiry?.clientId;enquiryId&&localStorage.setItem("enquiryId",enquiryId),clientId&&localStorage.setItem("clientId",clientId);const alphaUserStatus=localStorage.getItem("alphaUserBooked"),storedClientId=localStorage.getItem("clientId"),storedEnquiryId=localStorage.getItem("enquiryId");if(alphaUserStatus==="true"&&storedClientId){localStorage.setItem("rebookDirect","true"),localStorage.setItem("rebookDirectTimestamp",Date.now().toString());const existingCartId=localStorage.getItem("activeSchedulingCartId"),cartBaseUrl=localStorage.getItem("baseUrl")||"https://bookzoca.com";if(existingCartId&&storedEnquiryId&&storedClientId){console.log("[FooterForm-Alpha] PATCHing cart with clientId and enquiryId...");try{const patchHeaders={"Content-Type":"application/json"};fingerprint&&(patchHeaders["x-fingerprint"]=fingerprint);const patchBody={clientId:storedClientId,enquiryId:storedEnquiryId},patchResponse=await fetch(`${cartBaseUrl}/scheduling/carts/${existingCartId}`,{method:"PATCH",headers:patchHeaders,body:JSON.stringify(patchBody)});if(patchResponse.ok){const patchData=await patchResponse.json();console.log("[FooterForm-Alpha] Cart PATCHed successfully:",patchData),patchData?.data&&(localStorage.setItem("activeSchedulingCart",JSON.stringify(patchData.data)),patchData.data.clientId&&localStorage.setItem("clientId",patchData.data.clientId),patchData.data.enquiryId&&localStorage.setItem("enquiryId",patchData.data.enquiryId))}else{const errorText=await patchResponse.text();console.error("[FooterForm-Alpha] Cart PATCH failed:",patchResponse.status,errorText)}}catch(error){console.error("[FooterForm-Alpha] Error PATCHing cart:",error)}}}if(window.trackMixpanelEvent){const buttonText=document.getElementById("footer-submit-button")?.textContent;if(window.trackMixpanelEvent("leadform-success-submit",{form_type:"staticLeadForm",form_step:formCurrentPage,button_text:buttonText,submission_payload:requestBody,page_name:"home",source_section:"contact"}),schedulingEnabled===!0){const storedEnquiryId2=localStorage.getItem("enquiryId"),storedClientId2=localStorage.getItem("clientId");if(storedEnquiryId2&&storedClientId2){localStorage.setItem("rebookDirectTimestamp",Date.now().toString()),window.location.href="/services";return}}}}).catch(error=>{console.error("Error submitting lead:",error),reEnableSubmitBtn()})}if(schedulingEnabled===!0){formContainer.querySelectorAll("[data-form-page]").forEach(page=>page.classList.add("hidden"));const footerWrapper=document.getElementById("footer-form-container-wrapper");if(footerWrapper){footerWrapper.style.display="none";const modalCloseButton=footerWrapper.querySelector(".modal-close");modalCloseButton&&(modalCloseButton.style.display="none")}const loadingScreen=document.createElement("div");loadingScreen.id="scheduling-redirect-screen",loadingScreen.style.cssText="display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center;min-height:400px;",loadingScreen.innerHTML=` 5 <div style="width:48px;height:48px;border:4px solid #e5e7eb;border-top-color:#3b82f6;border-radius:50%;animation:spin 1s linear infinite;margin-bottom:24px;"></div> 6 <style>@keyframes spin{to{transform:rotate(360deg);}}</style> 7 `,formContainer.appendChild(loadingScreen),window.addEventListener("pageshow",function onPageShow(e){if(e.persisted){var l=document.getElementById("scheduling-redirect-screen");l&&l.remove();var fw=document.getElementById("footer-form-container-wrapper");fw&&(fw.style.display="");var ff=document.getElementById("footer-form-container");ff&&(ff.querySelectorAll("[data-form-page]").forEach(function(p,i){i===0?p.classList.remove("hidden"):p.classList.add("hidden")}),ff.setAttribute("data-current-page","0")),reEnableSubmitBtn(),window.removeEventListener("pageshow",onPageShow)}}),console.log("[FooterForm] Scheduling enabled - redirect will happen after API calls complete");return}const nextPage=formCurrentPage+1;formContainer.querySelectorAll("[data-form-page]").forEach(page=>{page.classList.add("hidden")});const nextPageElements=formContainer.querySelectorAll(`[data-form-page="${nextPage}"]`);
7if(nextPageElements){nextPageElements.forEach(page=>{page.classList.remove("hidden")}),formContainer.setAttribute("data-current-page",nextPage.toString()),reEnableSubmitBtn();const lastPage=formContainer?formContainer.querySelectorAll("[data-form-page]").length-1:0;if(nextPage===lastPage){console.log("Reached final page - sending remaining fields via PUT request");const allFormFields2=formContainer.querySelectorAll("[data-form-field]"),allFormData={},radioGroups2={};allFormFields2.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups2[fieldName]||(radioGroups2[fieldName]=null),field.checked&&(radioGroups2[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="footerFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(allFormData.footerFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),allFormData.footerFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(allFormData.footerFormFirstName=trimmed,allFormData.footerFormLastName="")}else allFormData[fieldName]=fieldValue}),Object.keys(radioGroups2).forEach(fieldName=>{radioGroups2[fieldName]!==null&&(allFormData[fieldName]=radioGroups2[fieldName])});const putRequestBody={firstName:allFormData.footerFormFirstName||"",lastName:allFormData.footerFormLastName||"",phoneNumber:allFormData.footerFormPhone?allFormData.footerFormPhone.replace(/\D/g,""):"",countryCode:allFormData.footerFormPhoneCountry||"+1",customerType:schedulingEnabled===!0?null:allFormData.footerFormCustomerType==="returning"?"returning":"new"};Object.keys(allFormData).forEach(fieldName=>{const cleanFieldName=fieldName.replace("footerForm",""),finalFieldName=cleanFieldName.charAt(0).toLowerCase()+cleanFieldName.slice(1);console.log("finalFieldName",finalFieldName),VALID_UPDATE_FIELDS.includes(finalFieldName)&&(putRequestBody[finalFieldName]=allFormData[fieldName])});const enquiryId=localStorage.getItem("enquiryId");if(putRequestBody.category){const radioButtons=formContainer.querySelectorAll('input[type="radio"]');for(const radio of radioButtons)if(radio.parentElement?.textContent?.trim()===putRequestBody.category){const categoryId=radio.getAttribute("data-category-id");categoryId&&(putRequestBody.categoryId=categoryId,console.log("Found categoryId:",categoryId,"for category:",putRequestBody.category));break}}if(putRequestBody.secondStep=!0,putRequestBody.enquiryId=enquiryId,enquiryId&&Object.keys(putRequestBody).length>0){console.log("Sending all fields via PUT request:",putRequestBody);const putHeaders={"Content-Type":"application/json"};fingerprint&&(putHeaders["x-fingerprint"]=fingerprint),fetch(`${baseUrl}/booking-enquiries/${enquiryId}/update-booking-enquiry`,{method:"PUT",headers:putHeaders,body:JSON.stringify(putRequestBody)}).then(response=>{if(!response.ok)throw new Error(`HTTP error! status: ${response.status}`);return response.json()}).then(data=>{console.log("Booking enquiry updated successfully:",data)}).catch(error=>{console.error("Error updating booking enquiry:",error)})}const customerNameElement=document.getElementById("success-customer-name"),customerNameFooter=document.getElementById("modal-success-customer-name");customerNameElement&&(customerNameElement.textContent=formData.footerFormFirstName||"",customerNameElement.style.marginLeft="10px",customerNameFooter.textContent=formData.footerFormFirstName||"",customerNameFooter.style.marginLeft="10px");const bookingLink=formContainer.getAttribute("data-booking-link"),customerType=allFormData.footerFormCustomerType;if(bookingLink){const reviewScreen=document.getElementById("footer-review-section");reviewScreen&&(reviewScreen.style.display="none");const enableRedirect=formContainer.getAttribute("data-thank-you-redirect");if(enableRedirect===!1||enableRedirect==="false"||enableRedirect==="false")return;const redirectDelayAttr=formContainer.getAttribute("data-thank-you-redirect-delay"),redirectDelay=redirectDelayAttr?parseInt(redirectDelayAttr,10):3e3;let finalBookingLink=bookingLink;if(formContainer.getAttribute("data-append-lead-redirect-url")==="true")try{const url=new URL(finalBookingLink),fields=JSON.parse(formContainer.getAttribute("data-append-lead-redirect-url-fields")||"[]"),paramMapping=JSON.parse(formContainer.getAttribute("data-append-lead-redirect-url-mapping")||"{}");fields.forEach(function(field){const capitalized=field.charAt(0).toUpperCase()+field.slice(1);let value="";if(field==="phone"){const country=allFormData.ctaFormPhoneCountry||allFormData.footerFormPhoneCountry||"",number=(allFormData.ctaFormPhone||allFormData.footerFormPhone||"").replace(/\D/g,"");if(country&&country.trim()&&url.searchParams.set("country_code",country.trim()),number&&number.trim()){const paramKey=paramMapping[field]||field;url.searchParams.set(paramKey,number.trim())}}else value=allFormData["ctaForm"+capitalized]||allFormData["footerForm"+capitalized]||"";if(value&&value.trim()){const paramKey=paramMapping[field]||field;url.searchParams.set(paramKey,value.trim())}}),finalBookingLink=url.toString()}catch(e){console.error("[FormSubmit] Error appending lead params to booking URL:",e)}const footerBookingButton=document.getElementById("footer-booking-button");footerBookingButton&&(footerBookingButton.href=finalBookingLink),setTimeout(()=>{window.location.href=finalBookingLink},redirectDelay)}else if(customerType!="returning"){const reviewScreen=document.getElementById("footer-review-section");reviewScreen.style.display="none"}}}},handlePhoneClick_248169:function(event){const businessPhone=event.currentTarget.textContent;typeof window<"u"&&window.trackEvent&&typeof window.trackEvent=="function"&&window.trackEvent("phone_click",{phoneNumber:businessPhone,click_location:"contact_section",timestamp:new Date().toISOString()})},handlePhoneInput_248169:function(event){const input=event.target,currentValue=input.value,hasNonNumeric=/[^0-9+]/.test(currentValue),hasPlusNotAtStart=currentValue.includes("+")&&!currentValue.startsWith("+");if(hasNonNumeric||hasPlusNotAtStart){const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue;return}if(window.libphonenumber)try{const cleanValue=currentValue.replace(/[^\d+]/g,"");if(cleanValue.startsWith("+")){const phoneNumber=window.libphonenumber.parsePhoneNumber(cleanValue);phoneNumber&&phoneNumber.isValid()||(input.value=cleanValue)}else{const phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44",currentCountryCode=document.querySelector("[data-current-country-code]"),countryCodeForLib=currentCountryCode?
7currentCountryCode.getAttribute("data-current-country-code"):"GB",fullNumber=countryCode+cleanValue,phoneNumber=window.libphonenumber.parsePhoneNumber(fullNumber,countryCodeForLib);phoneNumber&&phoneNumber.isValid()||(cleanValue.length>0?window.libphonenumber.parsePhoneNumberFromString(fullNumber,countryCodeForLib)||(input.value=cleanValue):input.value="")}}catch(error){console.warn("Error formatting phone number:",error);const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue}else{const cleanValue=currentValue.replace(/[^0-9+]/g,"").replace(/(?!^)\+/g,"");input.value=cleanValue}},handleAddressClick_248169:function(event){const businessAddress=event.currentTarget.textContent;typeof window<"u"&&window.trackEvent&&typeof window.trackEvent=="function"&&window.trackEvent("address_click",{address:businessAddress,click_location:"contact_section",timestamp:new Date().toISOString()})},handleCountrySearch_248169:function(event){const searchTerm=event.target.value.toLowerCase().trim(),countryButtons=document.querySelectorAll("#footer-country-code-dropdown .footerForm-country-option");let hasVisibleResults=!1;countryButtons.forEach(button=>{const countryName=button.querySelector('[data-element-name*="Name"]').textContent.toLowerCase(),countryCode=button.querySelector(".footerForm-country-code").textContent.toLowerCase();countryName.includes(searchTerm)||countryCode.includes(searchTerm)?(button.style.display="flex",hasVisibleResults=!0):button.style.display="none"});let noResultsMessage=document.getElementById("footer-country-no-results");if(!hasVisibleResults&&searchTerm){if(!noResultsMessage){noResultsMessage=document.createElement("div"),noResultsMessage.id="footer-country-no-results",noResultsMessage.className="footerForm-country-no-results",noResultsMessage.setAttribute("data-element-name","No Results Message"),noResultsMessage.setAttribute("data-element-type","text"),noResultsMessage.textContent="No countries found";const dropdown=document.getElementById("footer-country-code-dropdown");dropdown&&dropdown.appendChild(noResultsMessage)}noResultsMessage.style.display="block"}else noResultsMessage&&(noResultsMessage.style.display="none"),searchTerm||countryButtons.forEach(button=>{button.style.display="flex"})},handleCountrySelect_248169:function(event){const button=event.currentTarget,code=button.getAttribute("data-code"),countryCode=button.getAttribute("data-country-code"),phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]');console.log(countryCode),console.log(button);const currentCountryCode=document.querySelector("[data-current-country-code]");currentCountryCode.setAttribute("data-current-country-code",countryCode),console.log("currentCountryCode",currentCountryCode),console.log("phoneCountryField",phoneCountryField.textContent);const flagIcon=document.getElementById("footer-country-code-flag");phoneCountryField&&(phoneCountryField.textContent=code,console.log("AFter phoneCountryField",phoneCountryField.textContent),flagIcon&&(flagIcon.src=`https://flagcdn.com/w20/${countryCode.toLowerCase()}.webp`,flagIcon.alt=`${countryCode} flag`));const dropdown=document.getElementById("footer-country-code-dropdown");dropdown&&(dropdown.style.display="none"),document.querySelectorAll("#footer-country-code-dropdown button").forEach(btn=>{btn===button?btn.classList.add("selected"):btn.classList.remove("selected")});try{const formContainer=document.getElementById("footer-form-container");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="footerFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.footerFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.footerFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.footerFormFirstName=trimmed,values.footerFormLastName="")}else values[fieldName]=fieldValue}
7),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}},handleFieldValidation_248169:function(event){const field=event.target,isRequired=field.getAttribute("data-required")==="true";if(!isRequired){if(window.trackMixpanelEvent){const cleanedFieldName=field.getAttribute("data-form-field").replace("footerForm",""),allFields=document.getElementById("footer-form-container").querySelectorAll("[data-form-field]"),fieldIndex=Array.from(allFields).indexOf(field);window.trackMixpanelEvent("leadform-input-exit",{field_name:cleanedFieldName,field_type:field.type,form_type:"staticLeadForm",field_position:fieldIndex,field_value:field.value,validation_status:"success",page_name:document.title,source_section:"contact"})}return}const fieldName=field.getAttribute("data-form-field");if(fieldName==="footerFormPhone"){if(!window.libphonenumber)return;const value=field.value.trim();if(!value)return;try{const cleanValue=value.replace(/[^\d+]/g,"");if(cleanValue.startsWith("+")){const phoneNumber=window.libphonenumber.parsePhoneNumber(cleanValue);phoneNumber&&phoneNumber.isValid()}else{const phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]'),countryCode=phoneCountryField?(()=>{const countryCodeMatch=(phoneCountryField.textContent||"").match(/\+[\d]+/);return countryCodeMatch?countryCodeMatch[0]:"+44"})():"+44",currentCountryCode=document.querySelector("[data-current-country-code]"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB",fullNumber=countryCode+cleanValue,phoneNumber=window.libphonenumber.parsePhoneNumber(fullNumber,countryCodeForLib);phoneNumber&&phoneNumber.isValid()}}catch(error){console.warn("Error formatting phone number on blur:",error)}}const errors={},fieldValue=field.value?.trim()||"";if(isRequired&&!fieldValue&&(errors[fieldName]="This field is required"),fieldName==="footerFormFirstName"&&fieldValue&&(fieldValue.length<2?errors[fieldName]="First name must be at least 2 characters":/^[A-Za-z]+$/.test(fieldValue)||(errors[fieldName]="First name can only contain letters")),field.type==="email"&&fieldValue&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(fieldValue)||(errors[fieldName]="Please enter a valid email address")),field.type==="date"&&fieldValue){const selectedDate=new Date(fieldValue),today=new Date;today.setHours(0,0,0,0),selectedDate.setHours(0,0,0,0),selectedDate<today&&(errors[fieldName]="Please select a date in the future")}else if(fieldName==="footerFormPhone"&&fieldValue)if(window.libphonenumber){console.log("libphonenumber is available");const phoneCountryField=document.querySelector('[data-form-field="footerFormPhoneCountry"]');console.log(phoneCountryField);const countryCode=phoneCountryField?.textContent||"+44";let fullPhoneNumber=fieldValue;!fieldValue.startsWith("+")&&!fieldValue.startsWith(countryCode)&&(fullPhoneNumber=countryCode+fieldValue.replace(/\D/g,"")),console.log(fullPhoneNumber);const phoneDigits=fieldValue.replace(/\D/g,"");if(countryCode==="+1"||countryCode==="+91")if(phoneDigits.length!==10)errors[fieldName]="Please enter a valid 10-digit phone number";else try{window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCode==="+91"?"IN":"US")||(errors[fieldName]="Please enter a valid phone number")}catch(error){console.warn("libphonenumber validation failed for +1 number:",error)}else try{const currentCountryCode=document.querySelector("[data-current-country-code]"),countryCodeForLib=currentCountryCode?currentCountryCode.getAttribute("data-current-country-code"):"GB";window.libphonenumber.isValidPhoneNumber(fullPhoneNumber,countryCodeForLib)||(errors[fieldName]="Please enter a valid phone number")}catch{phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}}else if(/[a-zA-Z]/.test(fieldValue))errors[fieldName]="Phone number cannot contain letters";else{const phoneDigits=fieldValue.replace(/\D/g,""),countryCode=document.querySelector('[data-form-field="footerFormPhoneCountry"]')?.textContent||"+44";countryCode==="+1"||countryCode==="+91"?phoneDigits.length!==10&&(errors[fieldName]="Please enter a valid 10-digit phone number"):phoneDigits.length<10&&(errors[fieldName]="Phone number must be at least 10 digits")}const errorMessage=errors[fieldName]||null,existingError=field.parentNode.querySelector(".error-message");if(existingError&&existingError.remove(),errorMessage){field.style.borderColor="#FF4444",field.style.borderWidth="2px";const errorElement=document.createElement("div");errorElement.className="error-message",errorElement.style.color="#FF4444",errorElement.style.fontSize="14px",errorElement.style.marginTop="4px",errorElement.textContent=errorMessage,field.parentNode.appendChild(errorElement)}else field.style.borderColor="",field.style.borderWidth="";if(window.trackMixpanelEvent){const cleanedFieldName=field.getAttribute("data-form-field").replace("footerForm",""),allFields=document.getElementById("footer-form-container").querySelectorAll("[data-form-field]"),fieldIndex=Array.from(allFields).indexOf(field);window.trackMixpanelEvent("leadform-input-exit",{field_name:cleanedFieldName,field_type:field.type,form_type:"staticLeadForm",field_position:fieldIndex,field_value:fieldValue,validation_status:errors[fieldName]?"failed":"success",page_name:document.title,source_section:"contact"})}},handleCountryFlagError_248169:function(event){},handleRadioGroupSelect_248169:function(event){const selectedRadio=event.target.querySelector('input[type="radio"]');if(!selectedRadio)return;const radioGroupName=selectedRadio.getAttribute("name");if(!radioGroupName)return;const radioGroup=document.querySelectorAll(`input[type="radio"][name="${radioGroupName}"]`);let previouslySelectedRadio=null,previousValue="";radioGroup.forEach(radio=>{radio.checked&&radio!==selectedRadio&&(previouslySelectedRadio=radio,previousValue=radio.value)});const defaultStyles={backgroundColor:"#fafafa",color:"#1a1a1a",borderColor:"#1a1a1a"},selectedStyles={backgroundColor:"#1a1a1a",color:"white",borderColor:"#1a1a1a"};radioGroup.forEach(radio=>{const parentLabel=radio.closest("label");parentLabel&&Object.assign(parentLabel.style,defaultStyles),radio.checked=!1}
7),selectedRadio.checked=!0;const selectedParentLabel=selectedRadio.closest("label");selectedParentLabel&&Object.assign(selectedParentLabel.style,selectedStyles);try{const formContainer=document.getElementById("footer-form-container");if(!formContainer)return;const formFields=formContainer.querySelectorAll("[data-form-field]"),values={},radioGroups={};formFields.forEach(field=>{const fieldName=field.getAttribute("data-form-field"),fieldType=field.type,tagName=field.tagName.toLowerCase();let fieldValue="";if(fieldType==="radio"?field.getAttribute("name")&&(radioGroups[fieldName]||(radioGroups[fieldName]=null),field.checked&&(radioGroups[fieldName]=field.value)):fieldType==="select"?fieldValue=field.value||"":tagName==="span"?fieldValue=field.textContent||"":fieldValue=field.value||"",fieldType!=="radio"&&fieldValue)if(fieldName==="footerFormName"){const trimmed=fieldValue.trim(),lastSpaceIndex=trimmed.lastIndexOf(" ");lastSpaceIndex>0?(values.footerFormFirstName=trimmed.substring(0,lastSpaceIndex).trim(),values.footerFormLastName=trimmed.substring(lastSpaceIndex+1).trim()):(values.footerFormFirstName=trimmed,values.footerFormLastName="")}else values[fieldName]=fieldValue}),Object.keys(radioGroups).forEach(fieldName=>{radioGroups[fieldName]!==null&&(values[fieldName]=radioGroups[fieldName])});const formState={values,errors:{}};localStorage.setItem("formState",JSON.stringify(formState))}catch(error){console.error("Error saving form state:",error)}if(window.trackMixpanelEvent){const formContainer=document.getElementById("footer-form-container"),cleanedFieldName=selectedRadio.getAttribute("data-form-field").replace("footerForm","");window.trackMixpanelEvent("leadform-radio-click",{field_name:cleanedFieldName,field_type:selectedRadio.type,form_type:"staticLeadForm",form_id:formContainer.getAttribute("data-form-id"),selection_action:"radioClick",selection_value:selectedRadio.value,previous_selection:previousValue||"",field_position:Array.from(formContainer.querySelectorAll("[data-form-field]")).indexOf(selectedRadio),page_name:document.title,source_section:"contact"})}},handleCountryCodeToggle_248169:function(event){event.preventDefault(),console.log("handleCountryCodeToggle");const dropdown=document.getElementById("footer-country-code-dropdown");if(window.populateCountryOptions("footer-country-code-dropdown"),dropdown){const currentDisplay=dropdown.style.display;if(currentDisplay==="none"||currentDisplay===""){dropdown.style.display="block";const searchInput=document.getElementById("footer-country-search-input");searchInput&&(searchInput.value="");const handleClickOutside=e=>{document.getElementById("footer-country-code-container").contains(e.target)||(dropdown.style.display="none",document.removeEventListener("click",handleClickOutside))};setTimeout(()=>document.addEventListener("click",handleClickOutside),0)}else dropdown.style.display="none"}},handleQuickLinkClick_248171:function(event){const link=event.currentTarget,linkText=link.textContent||"",destinationUrl=link.href||"",pageName=document.title,quickLinksList=link.closest("#quick-links-list"),allQuickLinks=quickLinksList?quickLinksList.querySelectorAll("a.footer-link"):[],position=Array.from(allQuickLinks).indexOf(link)+1;let destinationType="internal";destinationUrl.includes("mailto:")?destinationType="email":destinationUrl.includes("tel:")?destinationType="phone":destinationUrl.includes("http")&&!destinationUrl.includes(window.location.hostname)&&(destinationType="external"),typeof window<"u"&&window.mixpanel?destinationType==="internal"?(event.preventDefault(),window.trackMixpanelEvent("footer-quicklink-click",{link_text:linkText,link_position:position,destination_type:destinationType,destination_url:destinationUrl,page_name:pageName}),setTimeout(()=>{destinationUrl.includes("#")&&destinationUrl.split("#")[0]===window.location.href.split("#")[0]?window.location.hash=destinationUrl.split("#")[1]:window.location.href=destinationUrl},50)):window.trackMixpanelEvent("footer-quicklink-click",{...websiteDetails,link_text:linkText,link_position:position,destination_type:destinationType,destination_url:destinationUrl,page_name:pageName}):console.log("Mixpanel not found")},handleServiceLinkClick_248171:function(event){const link=event.currentTarget,linkText=link.textContent||"",destinationUrl=link.href||"",pageName=document.title,servicesList=link.closest("#services-list"),allServiceLinks=servicesList?servicesList.querySelectorAll("a.footer-link"):[],position=Array.from(allServiceLinks).indexOf(link)+1;typeof window<"u"&&window.mixpanel&&(event.preventDefault(),window.trackMixpanelEvent("footer-servicelink-click",{service_name:linkText,service_link_position:position,page_name:pageName}),setTimeout(()=>{window.location.href=destinationUrl},50))}}},window.PRISM_DEBUG&&console.log("Page script loaded:",PAGE_ID,"("+(PAGE_NAME||PAGE_SLUG)+")"),window.PRISM_LIFECYCLE=window.PRISM_LIFECYCLE||{handlers:[],domReady:!1,inlineScriptsReady:!1},window.PRISM_LIFECYCLE.handlers.push({id:PAGE_ID,priority:10,dependencies:["dom","inlineScripts"],executed:!1,init:function(){window.PRISM_DEBUG&&console.log("Executing globalJs for page:",PAGE_ID);try{let I=function(){let e=0;const t=()=>{e++;let o=document.getElementById("footer-appointment-section"),n=document.querySelector('[data-form-field="footerFormFirstName"]')||document.querySelector('[data-form-field="ctaFormFirstName"]');
7o&&n&&!a&&(n.offsetParent!==null||n.offsetWidth>0)?setTimeout(F,100):(!b&&document.querySelector("[data-form-field]")&&c(),e<100&&!b&&setTimeout(t,100))};t()};const originalAddEventListener=document.addEventListener.bind(document);document.addEventListener=function(event,handler,options){event==="DOMContentLoaded"?(window.PRISM_DEBUG&&console.log("[PRISM] Running DOMContentLoaded handler immediately"),typeof handler=="function"&&handler()):originalAddEventListener(event,handler,options)},function(){const e=()=>{const c2=document.querySelectorAll(".services-section .main-carousel");c2.length!==0&&c2.forEach(carousel=>{const w=carousel.querySelectorAll(".service-card-wrapper");if(w.length===0)return;w.forEach(x=>{x.style.transition="none",x.style.minHeight=""});let t=0;if(w.forEach(x=>{const h=x.getBoundingClientRect().height;h>t&&(t=h)}),t>0&&w.forEach(x=>{x.style.minHeight=t+"px"}),window.Flickity&&carousel.classList.contains("flickity-enabled")){const f=window.Flickity.data(carousel);f&&f.resize()}})};if(typeof window<"u"){window.equalizeServiceCardHeights=e,document.addEventListener("services-flickity-ready",()=>{e()});const t=()=>{const t2=document.querySelector(".services-section .main-carousel");t2&&window.Flickity&&window.Flickity.data(t2)&&!t2.dataset.heightsEqualized&&(t2.dataset.heightsEqualized="true",e())},o=setInterval(()=>{t(),setTimeout(()=>clearInterval(o),1e3)},100);let n;window.addEventListener("resize",()=>{clearTimeout(n),n=setTimeout(e,250)})}}();let a=!1,b=!1;const c=()=>{if(b)console.log("Form state already restored, skipping...");else try{console.log("restoreFormState - Starting restoration");let e=localStorage.getItem("formState");if(!e)return console.log("No form state found in localStorage"),void(b=!0);let t=JSON.parse(e);if(console.log("formData",t),t.values.firstName){let e2=document.querySelector('[data-form-field="footerFormFirstName"]'),o=document.querySelector('[data-form-field="ctaFormFirstName"]');console.log("footerFirstName",e2),console.log("ctaFirstName",o),e2&&(e2.value=t.values.firstName),o&&(o.value=t.values.firstName)}if(t.values.lastName){let e2=document.querySelector('[data-form-field="footerFormLastName"]'),o=document.querySelector('[data-form-field="ctaFormLastName"]');e2&&(e2.value=t.values.lastName),o&&(o.value=t.values.lastName)}if(t.values.phone){let e2=document.querySelector('[data-form-field="footerFormPhone"]'),o=document.querySelector('[data-form-field="ctaFormPhone"]');e2&&(e2.value=t.values.phone),o&&(o.value=t.values.phone)}if(t.values.phoneCountry){let e2=document.querySelector('[data-form-field="footerFormPhoneCountry"]'),o=document.querySelector('[data-form-field="ctaFormPhoneCountry"]'),n=typeof t.values.phoneCountry=="object"?t.values.phoneCountry.dialCode:t.values.phoneCountry;e2&&(e2.textContent=n),o&&(o.textContent=n);let r=document.getElementById("footer-country-code-flag"),a2=document.getElementById("modal-country-flag"),l=`https://flagcdn.com/w20/${typeof t.values.phoneCountry=="object"&&t.values.phoneCountry.code?t.values.phoneCountry.code.toLowerCase():"us"}.webp`;r&&(r.src=l),a2&&(a2.src=l)}t.values.customerType&&setTimeout(()=>{if(t.values.customerType==="returning"||t.values.ctaFormCustomerType==="returning"||t.values.footerFormCustomerType==="returning"){let e2=document.querySelector('[data-form-field="footerFormCustomerType"][value="returning"]'),t2=document.querySelector('[data-form-field="footerFormCustomerType"][value="new"]');e2&&(e2.checked=!0,e2.setAttribute("checked","checked")),t2&&(t2.checked=!1);let o=document.querySelector('[data-form-field="ctaFormCustomerType"][value="returning"]'),n=document.querySelector('[data-form-field="ctaFormCustomerType"][value="new"]');o&&(o.checked=!0,o.setAttribute("checked","checked")),n&&(n.checked=!1);let r=document.querySelectorAll('[data-element-name="Yes Button"]'),a2=document.querySelectorAll('[data-element-name="No Button"]');r.forEach(e3=>{e3.style.backgroundColor="#1a1a1a",e3.style.color="white",e3.style.borderColor="#1a1a1a"}),a2.forEach(e3=>{e3.style.backgroundColor="#fafafa",e3.style.color="#1a1a1a",e3.style.borderColor="#1a1a1a"})}else{let e2=document.querySelector('[data-form-field="footerFormCustomerType"][value="new"]'),t2=document.querySelector('[data-form-field="footerFormCustomerType"][value="returning"]');e2&&(e2.checked=!0,e2.setAttribute("checked","checked")),t2&&(t2.checked=!1);let o=document.querySelector('[data-form-field="ctaFormCustomerType"][value="new"]'),n=document.querySelector('[data-form-field="ctaFormCustomerType"][value="returning"]');o&&(o.checked=!0,o.setAttribute("checked","checked")),n&&(n.checked=!1);let r=document.querySelectorAll('[data-element-name="Yes Button"]'),a2=document.querySelectorAll('[data-element-name="No Button"]');r.forEach(e3=>{e3.style.backgroundColor="#1a1a1a",e3.style.color="white",e3.style.borderColor="#1a1a1a"}),a2.forEach(e3=>{e3.style.backgroundColor="#fafafa",e3.style.color="#1a1a1a",e3.style.borderColor="#1a1a1a"})}},50),b=!0,console.log("restoreFormState - Restoration completed (will not run again)")}catch(e){console.error("Error restoring form state:",e),b=!0}},F=()=>{a||(document.getElementById("footer-appointment-section")?(a=!0,console.log("Initializing component"),requestAnimationFrame(()=>{let e=document.getElementById("footer-country-uk");e&&e.classList.add("selected"),c()})):console.log("Form section not found, skipping initialization"))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",function(){setTimeout(I,300)}):document.readyState==="interactive"?setTimeout(I,300):setTimeout(I,100),window.addEventListener("load",function(){a||setTimeout(I,500),b||setTimeout(c,200)}),window.addEventListener("readers",function(){b||c()}),window.restoreFormState=c,window.resetFormStateRestoration=()=>{b=!1,console.log("Form state restoration reset - can restore again")},function(){function e(){document.body.addEventListener("click",function(e2){const t=document.getElementById("mobile-menu-content");t&&t.contains(e2.target)&&e2.target.closest("a, button")&&function(){const e3=document.getElementById("mobile-menu");if(e3){e3.style.maxHeight="0px",document.querySelectorAll("#mobile-menu-content a, #mobile-menu-content button").forEach(e4=>{e4&&(e4.style.transform="translateY(-100%)",e4.style.opacity="0",e4.style.transitionDelay="0s")});const t2=document.getElementById("header-overlay");t2&&(t2.style.opacity="0",t2.style.pointerEvents="none");const o=document.getElementById("menu-icon-open"),n=document.getElementById("menu-icon-close");o&&n&&(o.classList.remove("menu-icon-close"),o.classList.add("menu-icon-open"),n.classList.remove("menu-icon-open"),n.classList.add("menu-icon-close"))}else console.log("[Mobile Menu] Menu element not found")}()},!0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}(),function(){let e=!1,t=null;const n=new WeakSet;function i(e2){if(!n.has(e2)){n.add(e2);try{let t2=function(){l?(a2.forEach((e3,t3)=>{t3>=5&&(e3.style.display="none")}),c2&&(c2.textContent="View More"),l=!1):(a2.forEach(e3=>{e3.style.display="block"}),c2&&(c2.textContent="View Less"),l=!0),l||e2.scrollIntoView({behavior:"smooth",block:"start"})};const i2=e2.querySelector("#faq-accordion"),o2=e2.querySelector(".faq-container, .section-container");if(!i2||!o2)return;const a2=i2.querySelectorAll('[id^="faq-item-"]');if(a2.length<=5)return void n.add(e2);let l=!1,r=null,c2=null;(function(){const t3=o2.querySelector(".view-all-container");if(t3)return r=t3,void(c2=t3.querySelector(".view-all-button"));const n2=e2.id||`faq-section-${Date.now()}`,i3=`${n2}-view-all-container`,a3=`${n2}-view-all-button`;r=document.createElement("div"),r.id=i3,r.className="view-all-container",r.setAttribute("data-element-name","FAQ View All Container"),r.setAttribute("data-element-type","container"),c2=document.createElement("a"),c2.id=a3,c2.className="view-all-button",c2.href="#",c2.setAttribute("data-element-name","FAQ View All Button"),c2.setAttribute("data-element-type","button"),c2.textContent="View More",r.style.cssText=` 8 display: flex !important; 9 justify-content: center; 10 align-items: center; 11 padding-top: var(--space-8); 12 margin-top: var(--space-4); 13 width: 100%; 14 `,c2.style.cssText=` 15 text-decoration: none; 16 text-align: center; 17 `,r.appendChild(c2),o2.appendChild(r)})(),c2&&c2.addEventListener("click",function(e3){e3.preventDefault(),t2()}),a2.forEach((e3,t3)=>{t3>=5&&(e3.style.display="none")}),c2&&(c2.textContent="View More"),l=!1}catch(s){console.error("Error initializing FAQ section:",s)}}}window.initFAQViewMore=function(){document.querySelectorAll(".faq-section").forEach(e2=>{i(e2)}),t||(t=new MutationObserver(e2=>{e2.forEach(e3=>
17{e3.type==="childList"&&e3.addedNodes.forEach(e4=>{e4.nodeType===1&&(e4.matches&&e4.matches(".faq-section")&&i(e4),e4.querySelectorAll)&&e4.querySelectorAll(".faq-section").forEach(e5=>{i(e5)})})})}),t.observe(document.body,{childList:!0,subtree:!0}))};const o=()=>{e||(window.initFAQViewMore(),e=!0)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",o):setTimeout(o,100),window.addEventListener("load",()=>{setTimeout(o,200)}),document.addEventListener("astro:page-load",()=>{setTimeout(o,100)}),o(),window.faqDebug=function(){const e2=document.querySelectorAll(".faq-section"),i2={totalFAQSections:e2.length,initializedSections:n.size,uninitializedSections:e2.length-n.size,observerActive:t!==null};return i2.uninitializedSections>0&&window.initFAQViewMore(),i2}}();const replaceDatePlaceholders=e=>{if(!e)return e;const a2=new Date,t=(e2,t2)=>a2.toLocaleString("en-US",{[e2]:t2}),l=e2=>e2.charAt(0).toUpperCase()+e2.slice(1),n={"{year}":a2.getFullYear(),"{Year}":a2.getFullYear(),"{YEAR}":a2.getFullYear(),"{month}":t("month","long"),"{Month}":l(t("month","long")),"{MONTH}":t("month","long").toUpperCase(),"{day}":t("weekday","long"),"{Day}":l(t("weekday","long")),"{DAY}":t("weekday","long").toUpperCase()};return e.replace(/\{(year|Year|YEAR|month|Month|MONTH|day|Day|DAY)\}/g,e2=>n[e2]||e2)},replaceMarqueeDatePlaceholders=()=>{document.querySelectorAll(".marquee-text").forEach(e=>{const a2=e.innerHTML,t=replaceDatePlaceholders(a2);a2!==t&&(e.innerHTML=t,e.hasAttribute("data-variable-text-value")&&e.setAttribute("data-variable-text-value",t))})},initializeDateReplacement=()=>{replaceMarqueeDatePlaceholders()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initializeDateReplacement):initializeDateReplacement(),window.addEventListener("load",initializeDateReplacement),document.addEventListener("astro:page-load",initializeDateReplacement),window.replaceMarqueeDatePlaceholders=replaceMarqueeDatePlaceholders,function(){function t(){const t2=window.location.search;if(!t2)return;const e=location.host,n=new URLSearchParams(t2);document.querySelectorAll("a[href], [data-href]").forEach(t3=>{let r=t3.getAttribute("href")||t3.getAttribute("data-href");if(!r||r.startsWith("#"))return;try{if(new URL(r,location.origin).host!==e)return}catch{return}const a2=r.indexOf("#"),o=a2!==-1?r.substring(a2):"",i=a2!==-1?r.substring(0,a2):r,d=new URL(i,location.origin),s=new URLSearchParams(d.search);n.forEach((t4,e2)=>{s.set(e2,t4)});const c2=d.pathname,h=s.toString(),u=c2+(h?"?"+h:"")+o;t3.setAttribute("href",u),t3.setAttribute("data-href",u)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t(),window.addEventListener("load",t),document.addEventListener("astro:page-load",t),window.addEventListener("popstate",t)}(),function fetchServiceProviders(retries=3,initialDelay=!0){if(initialDelay){setTimeout(()=>fetchServiceProviders(retries,!1),5);return}const websiteDetails2=window.getWebsiteDetails?.();websiteDetails2?.locationEntityId&&(localStorage.setItem("locationEntityId",websiteDetails2.locationEntityId),localStorage.setItem("websiteId",websiteDetails2.websiteId));let entityId=websiteDetails2?.locationEntityId||localStorage.getItem("locationEntityId")||document.querySelector("form[data-entity-id]")?.getAttribute("data-entity-id")||null;if(!entityId){retries>0?setTimeout(()=>fetchServiceProviders(retries-1),300):console.warn("locationEntityId not available after retries");return}localStorage.setItem("locationEntityId",entityId);const API_BASE=localStorage.getItem("baseUrl")||"https://bookzoca.com",fingerprint=localStorage.getItem("visitorId");fetch(`${API_BASE}/entities/${entityId}/service-providers`,{method:"GET",headers:{Accept:"application/json","x-fingerprint":fingerprint}}).then(response=>{if(!response.ok)throw new Error(`HTTP error ${response.status}`);return response.json()}).then(data=>{console.log("Service providers fetched:",data),data?.data?.providers&&localStorage.setItem("serviceProviders",JSON.stringify(data.data.providers))}).catch(error=>{console.error("Error fetching service providers:",error)})}(),function(){function check(){var btn=document.querySelector('[data-cta-popup-enabled="true"]');if(btn){var entityId=localStorage.getItem("locationEntityId")||"default",storageKey="cta_popup_dismissed_"+entityId;localStorage.getItem(storageKey)||setTimeout(function(){if(!localStorage.getItem(storageKey)){var modal=document.getElementById("booking-modal"),overlay=document.getElementById("booking-modal-overlay");modal&&overlay&&(modal.style.display="flex",overlay.style.display="block",setTimeout(function(){modal.style.opacity="1",overlay.style.opacity="1";var content=modal.querySelector("#booking-modal-content")||modal.querySelector(".modal-content");content&&(content.style.transform="scale(1)")},10),localStorage.setItem(storageKey,"true"))}},1e4)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",check):check()}
17(),function(){function init(){var attempts=0,maxAttempts=40,timer=setInterval(function(){attempts++;var trigger=document.getElementById("offer-popup-trigger-button");trigger?(clearInterval(timer),console.log("[OfferPopup] trigger present - auto-opening on load"),setTimeout(function(){console.log("[OfferPopup] auto-opening via trigger"),trigger.click()},800)):attempts>=maxAttempts&&(clearInterval(timer),console.log("[OfferPopup] trigger not present - popup not on this page"))},150)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()}(),function(){"use strict";var CART_KEY="serviceCart",ICON_CART='<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path></svg>',ICON_X='<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',ICON_USER='<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>',ICON_TRASH='<svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',ICON_CHECK='<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>';function getCart(){try{var s=localStorage.getItem(CART_KEY);if(!s)return{items:[]};var d=JSON.parse(s);return d.expiry&&d.expiry<new Date().getTime()?(localStorage.removeItem(CART_KEY),{items:[]}):d.data||d||{items:[]}}catch{return{items:[]}}}function saveCart(cart){try{var ex=new Date;ex.setDate(ex.getDate()+30),localStorage.setItem(CART_KEY,JSON.stringify({data:cart,expiry:ex.getTime()}))}catch{}}function sym(c2){return c2==="USD"?"$":c2||"$"}function readProductLines(key,idField,mirrorField){var lines=[];try{var parsed=JSON.parse(localStorage.getItem(key)||"[]");Array.isArray(parsed)&&(lines=parsed)}catch{}if(!lines.length){var mirror=getCart()[mirrorField];Array.isArray(mirror)&&(lines=mirror)}return lines.filter(function(l){return!!l&&typeof l=="object"&&!!l[idField]})}function readPackages(){return readProductLines("packageCart","packageTemplateId","packages")}function readMemberships(){return readProductLines("membershipCart","membershipTemplateId","memberships")}function productAmount(l){return typeof l.subtotal=="number"?l.subtotal:Number(l.total)||Number(l.price)||0}function productSubtotal(lines){return lines.reduce(function(s,l){return s+productAmount(l)},0)}function barLabel(items,pkgs,mems){var merged=items.length+pkgs.length+mems.length,kinds=(items.length?1:0)+(pkgs.length?1:0)+(mems.length?1:0);return merged===1?items.length?items[0].serviceDetails&&items[0].serviceDetails.name||items[0].serviceName||"1 Service selected":pkgs.length?pkgs[0].name||"1 Package selected":mems[0].name||"1 Membership selected":kinds>1?merged+" items selected":pkgs.length?pkgs.length+" Packages selected":mems.length?mems.length+" Memberships selected":items.length+" Services selected"}function writeProductLines(kind,lines){var key=kind==="package"?"packageCart":"membershipCart",mirrorField=kind==="package"?"packages":"memberships";try{lines.length?localStorage.setItem(key,JSON.stringify(lines)):localStorage.removeItem(key)}catch{}try{var raw=localStorage.getItem(CART_KEY);if(raw){var d=JSON.parse(raw),c2=d&&d.data&&typeof d.data=="object"?d.data:d;c2&&c2[mirrorField]&&(lines.length?c2[mirrorField]=lines.map(function(l){var price=typeof l.price=="number"?l.price:typeof l.total=="number"?l.total:(Number(l.subtotal)||0)+(Number(l.taxAmount)||0);return Object.assign({},l,{price})}):delete c2[mirrorField],localStorage.setItem(CART_KEY,JSON.stringify(d)))}}catch{}try{window.dispatchEvent(new CustomEvent(kind==="package"?"packageCartUpdated":"membershipCart
17Updated"))}catch{}}function fmtBar(m){if(m=Number(m)||0,!m)return"";if(m<60)return m+" min";var h=Math.floor(m/60),mm=m%60;return mm===0?h+" hr":h+" hr "+mm+" min"}function fmtPop(m){if(m=Number(m)||0,!m)return"";if(m<60)return m+" min";var h=Math.floor(m/60),mm=m%60;return mm===0?h+"h":h+"h "+mm+" min"}function esc(s){var d=document.createElement("div");return d.textContent=s==null?"":String(s),d.innerHTML}function addonSurchargeAmount(a2){if(!a2)return 0;var d=a2.surchargeDollars;return d!=null&&d!==""&&!isNaN(Number(d))?Number(d):(Number(a2.surchargeCents)||0)/100}function addonSnapshotOf(item,sel){var id=sel&&(sel.addonId||sel.id);return item.addonSnapshots&&item.addonSnapshots[id]||sel||{}}function addonIsRequired(snap){return snap?snap.addonGroupIsRequired===!0?!0:!!snap.addonGroupId&&Number(snap.addonGroupMinSelection)>=1:!1}function addonLocked(item,sel){var snap=addonSnapshotOf(item,sel);if(!addonIsRequired(snap))return!1;var min=Number(snap.addonGroupMinSelection);min>=1||(min=1);var groupId=snap.addonGroupId,picked=(item.addons||[]).filter(function(s){return addonSnapshotOf(item,s).addonGroupId===groupId}).length;return picked<=min}function addonExtras(item){var dollars=0,mins=0;return(item.addons||[]).forEach(function(sel){var snap=addonSnapshotOf(item,sel);dollars+=addonSurchargeAmount(snap),mins+=Number(snap.durationMinutes)||0}),{dollars,mins}}function totals(items){var total=0,mins=0,symbol="$";items.amounts;var covSet=window.packagesRuntime&&window.packagesRuntime.getEffectiveCoverage&&window.packagesRuntime.getEffectiveCoverage()||null,isCov=function(i){var sd=i.serviceDetails||{};return!!covSet&&covSet.has(i.serviceVariationId||sd.serviceVariationId||"")};return items.forEach(function(i){var sd=i.serviceDetails||{};isCov(i)||(total+=Number(sd.originalPrice)||Number(sd.price)||0),mins+=Number(sd.duration)||0;var ax=addonExtras(i);total+=ax.dollars,mins+=ax.mins,sd.currency&&(symbol=sym(sd.currency))}),{count:items.length,total,mins,symbol}}function injectBarStyles(){if(!document.getElementById("bcr-bar-styles")){var st=document.createElement("style");st.id="bcr-bar-styles",st.textContent="#booking-cart-review-button svg{flex:0 0 auto;}@media (max-width:600px){#booking-cart-review-text{display:none;}#booking-cart-review-button{width:52px!important;height:52px!important;padding:0!important;border-radius:50%!important;justify-content:center!important;align-items:center!important;flex:0 0 auto!important;}}",document.head.appendChild(st)}}function markButtons(){var inCart={};(getCart().items||[]).forEach(function(i){inCart[i.serviceId]=1}),document.querySelectorAll("[data-service-id]").forEach(function(b2){if(b2.getAttribute("data-scheduling-enable")==="true"){var id=b2.getAttribute("data-service-id");!id||id.indexOf("$")!==-1||(b2.dataset.originalText||(b2.dataset.originalText=(b2.textContent||"Add Service").trim()),inCart[id]?(b2.classList.add("active"),b2.textContent="Remove",b2.dataset.action="remove"):(b2.classList.remove("active"),b2.textContent=b2.dataset.originalText,b2.dataset.action="add"))}})}function renderCartBar(){injectBarStyles(),markButtons();var cart=getCart(),c2=document.getElementById("booking-cart-container");if(c2){var items=cart.items||[],nameEl=document.getElementById("booking-cart-service-name"),metaEl=document.getElementById("booking-cart-service-meta"),reviewBtn=document.getElementById("booking-cart-review-button");reviewBtn&&!reviewBtn.getAttribute("data-iconized")&&(reviewBtn.innerHTML=ICON_CART+'<span id="booking-cart-review-text">Review Cart</span>',reviewBtn.setAttribute("data-iconized","1"));var pkgs=readPackages(),mems=readMemberships();if(!items.length&&!pkgs.length&&!mems.length){c2.style.display="none",closeReview();return}c2.style.display="block";var t=totals(items),symbol=items.length?t.symbol:sym((pkgs[0]||mems[0]).currency),total=t.total+productSubtotal(pkgs)+productSubtotal(mems);if(nameEl&&(nameEl.textContent=barLabel(items,pkgs,mems)),metaEl){var segs=[];total>0&&segs.push(symbol+total.toFixed(2));var d=fmtBar(t.mins);d&&segs.push(d),metaEl.textContent=segs.join(" | ")}document.getElementById("bcr-overlay")&&renderReviewList()}}function getActiveCartId(){try{return localStorage.getItem("activeSchedulingCartId")||null}catch{return null}}function apiRemoveItem(itemId){var cartId=getActiveCartId();if(!(!cartId||!itemId)){var base=localStorage.getItem("baseUrl")||"https://bookzoca.com",token=localStorage.getItem("authToken")||localStorage.getItem("token")||localStorage.getItem("jwt"),fp=localStorage.getItem("visitorId"),headers={};token&&(headers.Authorization="Bearer "+token),fp&&(headers["x-fingerprint"]=fp);try{fetch(base+"/scheduling/carts/"+cartId+"/items/"+itemId,{method:"DELETE",headers}).catch(function(){})}catch{}}}function apiClearCart(){var cartId=getActiveCartId();if(cartId){var base=localStorage.getItem("baseUrl")||"https://bookzoca.com",token=localStorage.getItem("authToken")||localStorage.getItem("token")||localStorage.getItem("jwt"),fp=localStorage.getItem("visitorId"),headers={};token&&(headers.Authorization="Bearer "+token),fp&&(headers["x-fingerprint"]=fp);try{fetch(base+"/scheduling/carts/clear/"+cartId,{method:"POST",headers}).catch(function(){})}catch{}}}function removeItem(serviceId){var cart=getCart();try{var __m=(cart.items||[]).filter(function(i){return String(i.serviceId)===String(serviceId)});__m[0]&&apiRemoveItem(__m[0].id||__m[0].serviceVariationId||__m[0].serviceId)}catch{}cart.items=(cart.items||[]).filter(function(i){return String(i.serviceId)!==String(serviceId)}),delete cart.amounts,saveCart(cart);try{var off=JSON.parse(localStorage.getItem("serviceOffers")||"{}");Object.keys(off).forEach(function(k){})}catch{}document.querySelectorAll('[data-service-id="'+serviceId+'"].active').forEach(function(b2){b2.classList.remove("active"),b2.textContent=b2.dataset.originalText||"Add Service",b2.dataset.action="add"}),window.dispatchEvent(new CustomEvent("serviceCartUpdated",{detail:{action:"remove",serviceId}})),renderCartBar()}function clearAll(){apiClearCart();try{localStorage.removeItem(CART_KEY),localStorage.removeItem("serviceOffers")}catch{}document.querySelectorAll("[data-service-id].active").forEach(function(b2){b2.classList.remove("active"),b2.textContent=b2.dataset.originalText||"Add Service",b2.dataset.action="add"}),writeProductLines("package",[]),writeProductLines("membership",[]),window.dispatchEvent(new CustomEvent("serviceCartUpdated",{detail:{action:"clear"}})),closeReview(),renderCartBar()}window.cartClearAll=clearAll;function closeReview(){var o=document.getElementById("bcr-overlay");o&&o.remove()}function injectReviewStyles(){if(!document.getElementById("bcr-styles")){var st=document.createElement("style");st.id="bcr-styles",st.textContent="#bcr-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:100000;display:flex;align-items:center;justify-content:center;padding:16px;}.bcr-modal{background:#fff;width:100%;max-width:460px;border-radius:20px;padding:24px;max-height:85vh;overflow-y:auto;position:relative;box-shadow:0 16px 56px rgba(0,0,0,.28);}.bcr-head{display:flex;align-items:flex-start;justify-content:space-between;}.bcr-title{font-size:22px;font-weight:700;color:#111;margin:0;}.bcr-sub{font-size:14px;
17color:#777;margin:2px 0 12px;}.bcr-close{background:none;border:none;cursor:pointer;color:#666;padding:4px;line-height:0;}.bcr-item{display:flex;align-items:flex-start;gap:14px;padding:16px 0;border-bottom:1px solid #f0f0f0;}.bcr-remove{flex:0 0 30px;width:30px;height:30px;border-radius:50%;border:1px solid #ddd;background:#fff;color:#888;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;}.bcr-remove:hover{border-color:#e11;color:#e11;}.bcr-info{flex:1;min-width:0;}.bcr-name{font-size:16px;font-weight:600;color:#111;}.bcr-provider{display:flex;align-items:center;gap:5px;color:#777;font-size:13px;margin-top:5px;}.bcr-addons{margin-top:8px;display:flex;flex-direction:column;gap:6px;}.bcr-addon{position:relative;display:flex;align-items:center;gap:6px;padding-left:16px;min-width:0;}.bcr-addon:before{content:'';position:absolute;left:3px;top:-2px;bottom:50%;width:8px;border-left:1.5px solid #d9d9d9;border-bottom:1.5px solid #d9d9d9;border-bottom-left-radius:5px;}.bcr-addon-name{font-size:12px;color:#444;font-weight:500;flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.bcr-addon-meta{font-size:11px;color:#1a7f46;font-weight:600;white-space:nowrap;flex:0 0 auto;}.bcr-addon-required{flex:0 0 auto;font-size:9px;line-height:1.5;font-weight:600;letter-spacing:.2px;color:#8a6d1f;background:#fbf3d9;border:1px solid #f0e2b0;padding:0 5px;border-radius:999px;white-space:nowrap;}.bcr-addon-required + .bcr-addon-remove{margin-left:6px;}.bcr-addon-remove--locked{opacity:.4;cursor:not-allowed;}.bcr-addon-remove--locked:hover{border-color:#e0e0e0;color:#999;}.bcr-addon-remove{flex:0 0 18px;width:18px;height:18px;border-radius:50%;border:1px solid #e0e0e0;background:#fff;color:#999;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:all .15s;}.bcr-addon-remove:hover{border-color:#e11;color:#e11;}.bcr-addon-remove svg{width:11px;height:11px;}.bcr-right{text-align:right;white-space:nowrap;}.bcr-price{font-size:16px;font-weight:700;color:#111;}.bcr-price-orig{font-size:13px;color:#999;text-decoration:line-through;margin-right:6px;font-weight:400;}.bcr-dur{font-size:13px;color:#888;margin-top:5px;}.bcr-clear{display:flex;align-items:center;gap:8px;color:#e11;font-size:15px;font-weight:600;background:none;border:none;cursor:pointer;padding:16px 0;}.bcr-totals{border-top:1px solid #eee;padding-top:16px;margin-top:4px;}.bcr-trow{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;}.bcr-tlabel{font-size:16px;font-weight:700;color:#111;}.bcr-tval{font-size:16px;font-weight:700;color:#111;}.bcr-tlabel-sub{font-size:14px;color:#888;font-weight:400;}.bcr-tval-sub{font-size:14px;color:#888;font-weight:400;}.bcr-done{width:100%;margin-top:18px;padding:15px;background:#15192e;color:#fff;border:none;border-radius:14px;font-size:16px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;}.bcr-addmore{width:100%;margin-top:18px;padding:14px;background:#fff;color:#15192e;border:1.5px solid #15192e;border-radius:14px;font-size:15px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;}.bcr-addmore:hover{background:#f4f5f8;}.bcr-done:hover{background:#0d1020;}",document.head.appendChild(st)}}function addonRowsHtml(it){var addons=it.addons||[];if(!addons.length)return"";var symbol=sym((it.serviceDetails||{}).currency),rows=addons.map(function(sel){var snap=addonSnapshotOf(it,sel),aname=snap.name||"Add-on",amount=addonSurchargeAmount(snap),mins=Number(snap.durationMinutes)||0,required=addonLocked(it,sel),meta=[];amount>0&&meta.push("+"+symbol+amount.toFixed(2)),mins>0&&meta.push("+"+fmtPop(mins));var btn=required?'<button type="button" class="bcr-addon-remove bcr-addon-remove--locked" disabled aria-disabled="true" aria-label="Required add-on, cannot be removed" title="Required for this service. Remove the service to drop it.">'+ICON_X+"</button>":'<button type="button" class="bcr-addon-remove" data-remove-addon="'+esc(sel.addonId||sel.id)+'" data-remove-addon-service="'+esc(it.serviceId)+'" aria-label="Remove add-on">'+ICON_X+"</button>";return'<div class="bcr-addon"><span class="bcr-addon-name">'+esc(aname)+'</span><span class="bcr-addon-meta">'+esc(meta.join(" \xB7 "))+"</span>"+(required?'<span class="bcr-addon-required">Required</span>':"")+btn+"</div>"}).join("");return'<div class="bcr-addons">'+rows+"</div>"}function productRowsHtml(lines,kind,idField,label){return lines.map(function(l){return'<div class="bcr-item"><button type="button" class="bcr-remove" data-remove-product="'+esc(kind)+'" data-remove-product-id="'+esc(l[idField])+'" aria-label="Remove">'+ICON_X+'</button><div class="bcr-info"><div class="bcr-name">'+esc(l.name||label)+'</div><div class="bcr-provider"><span>'+esc(label)+'</span></div></div><div class="bcr-right"><span class="bcr-price">'+sym(l.currency)+productAmount(l).toFixed(2)+"</span></div></div>"}).join("")}function listHtml(){var items=getCart().items||[];return serviceRowsHtml(items)+productRowsHtml(readPackages(),"package","packageTemplateId","Package")+productRowsHtml(readMemberships(),"membership","membershipTemplateId","Membership")}function serviceRowsHtml(items){return items.map(function(it){var sd=it.serviceDetails||{},name=sd.name||it.serviceName||"Service",provider=it.isAnyProvider?"":it.providerName||"",symbol=sym(sd.currency),full=Number(sd.originalPrice)||Number(sd.price)||0,dur=fmtPop(Number(sd.duration)||0),priceHtml='<span class="bcr-price">'+symbol+full.toFixed(2)+"</span>";return'<div class="bcr-item"><button type="button" class="bcr-remove" data-remove="'+esc(it.serviceId)+'" aria-label="Remove">'+ICON_X+'</button><div class="bcr-info"><div class="bcr-name">'+esc(name)+"</div>"+(provider?'<div class="bcr-provider">'+ICON_USER+"<span>"+esc(provider)+"</span></div>":"")+addonRowsHtml(it)+'</div><div class="bcr-right">'+priceHtml+'<div class="bcr-dur">'+esc(dur)+"</div></div></div>"}).join("")}function renderReviewList(){var overlay=document.getElementById("bcr-overlay");if(overlay){var items=getCart().items||[],pkgs=readPackages(),mems=readMemberships(),merged=items.length+pkgs.length+mems.length;if(!merged){closeReview();return}
17var t=totals(items),symbol=items.length?t.symbol:sym((pkgs[0]||mems[0]).currency),total=t.total+productSubtotal(pkgs)+productSubtotal(mems);overlay.querySelector(".bcr-sub").textContent=pkgs.length||mems.length?merged===1?"1 item selected":merged+" items selected":t.count===1?"1 service selected":t.count+" services selected",overlay.querySelector("#bcr-list").innerHTML=listHtml(),overlay.querySelector("#bcr-total").textContent=symbol+total.toFixed(2);var durEl=overlay.querySelector("#bcr-duration");durEl.textContent=fmtPop(t.mins),durEl.parentNode&&(durEl.parentNode.style.display=t.mins?"":"none"),overlay.querySelectorAll("[data-remove]").forEach(function(b2){b2.addEventListener("click",function(){removeItem(b2.getAttribute("data-remove"))})}),overlay.querySelectorAll("[data-remove-product]").forEach(function(b2){b2.addEventListener("click",function(){removeProduct(b2.getAttribute("data-remove-product"),b2.getAttribute("data-remove-product-id"))})}),overlay.querySelectorAll("[data-remove-addon]").forEach(function(b2){b2.addEventListener("click",function(){removeAddon(b2.getAttribute("data-remove-addon-service"),b2.getAttribute("data-remove-addon"))})})}}function apiSyncItemAddons(item,done){var cartId=getActiveCartId(),variationId=item&&(item.serviceVariationId||item.id);if(!(!cartId||!item||!item.serviceId||!variationId)){var base=localStorage.getItem("baseUrl")||"https://bookzoca.com",token=localStorage.getItem("authToken")||localStorage.getItem("token")||localStorage.getItem("jwt"),fp=localStorage.getItem("visitorId"),headers={"Content-Type":"application/json"};token&&(headers.Authorization="Bearer "+token),fp&&(headers["x-fingerprint"]=fp);var kept=(item.addons||[]).map(function(sel){return{addonId:sel.addonId||sel.id,addonGroupId:sel.addonGroupId||null}}),mins=(Number((item.serviceDetails||{}).duration)||60)+addonExtras(item).mins,startTime=new Date(item.createdAt||new Date).toISOString(),payloadItem={serviceId:item.serviceId,serviceVariationId:variationId,startTime,endTime:new Date(new Date(startTime).getTime()+mins*60*1e3).toISOString(),createdAt:item.createdAt||startTime,addons:kept};item.isAnyProvider===!0||item.providerId==null||(payloadItem.providerId=item.providerId);try{fetch(base+"/scheduling/carts/items",{method:"POST",headers,body:JSON.stringify({cartId,items:[payloadItem]})}).then(function(r){return r.ok?r.json():null}).then(function(j){var d=j&&(j.data||j);!d||!d.items||(saveCart({items:d.items,amounts:d.amounts||{}}),typeof done=="function"&&done())}).catch(function(){})}catch{}}}function removeProduct(kind,id){var idField=kind==="package"?"packageTemplateId":"membershipTemplateId",lines=(kind==="package"?readPackages():readMemberships()).filter(function(l){return String(l[idField])!==String(id)});writeProductLines(kind,lines),renderCartBar(),renderReviewList()}function removeAddon(serviceId,addonId){var cart=getCart(),locked=!1;if((cart.items||[]).forEach(function(i){String(i.serviceId)===String(serviceId)&&(i.addons||[]).forEach(function(sel){String(sel.addonId||sel.id)===String(addonId)&&addonLocked(i,sel)&&(locked=!0)})}),!locked){var touched=[];(cart.items||[]).forEach(function(i){String(i.serviceId)===String(serviceId)&&(i.addons=(i.addons||[]).filter(function(sel){return String(sel.addonId||sel.id)!==String(addonId)}),i.addonSnapshots&&delete i.addonSnapshots[addonId],i.addons.length||(i.addons=void 0,i.addonSnapshots=void 0),touched.push(i))}),delete cart.amounts,saveCart(cart),window.dispatchEvent(new CustomEvent("serviceCartUpdated",{detail:{action:"remove-addon",serviceId,addonId}})),renderCartBar(),renderReviewList(),touched.forEach(function(i){apiSyncItemAddons(i,function(){renderCartBar(),renderReviewList()})})}}window.openReviewCart=function(){var items=getCart().items||[];if(!(!items.length&&!readPackages().length&&!readMemberships().length)){injectReviewStyles();var existing=document.getElementById("bcr-overlay");existing&&existing.remove();var overlay=document.createElement("div");overlay.id="bcr-overlay",overlay.innerHTML='<div class="bcr-modal" role="dialog" aria-modal="true"><div class="bcr-head"><div><h2 class="bcr-title">Review Cart</h2><p class="bcr-sub"></p></div><button type="button" class="bcr-close" aria-label="Close">
17'+ICON_X+'</button></div><div id="bcr-list"></div><button type="button" class="bcr-clear">'+ICON_TRASH+'<span>Clear All</span></button><div class="bcr-totals"><div class="bcr-trow"><span class="bcr-tlabel">Estimated Total</span><span class="bcr-tval" id="bcr-total"></span></div><div class="bcr-trow"><span class="bcr-tlabel-sub">Estimated Duration</span><span class="bcr-tval-sub" id="bcr-duration"></span></div></div><button type="button" class="bcr-addmore"><svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg><span>Add more services</span></button><button type="button" class="bcr-done">'+ICON_CHECK+"<span>Done</span></button></div>",document.body.appendChild(overlay),renderReviewList(),overlay.querySelector(".bcr-close").addEventListener("click",closeReview),overlay.querySelector(".bcr-done").addEventListener("click",closeReview);var __bcrAddMore=overlay.querySelector(".bcr-addmore");if(__bcrAddMore){var __bcrPath=(window.location.pathname||"").replace(/\/+$/,"");__bcrPath==="/services"?__bcrAddMore.style.display="none":__bcrAddMore.addEventListener("click",function(){window.location.href="/services"})}overlay.querySelector(".bcr-clear").addEventListener("click",clearAll),overlay.addEventListener("click",function(e){e.target===overlay&&closeReview()})}},window.updateCartUI=window.updateCartUI||renderCartBar,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",renderCartBar):renderCartBar(),window.addEventListener("serviceCartUpdated",renderCartBar),window.addEventListener("packageCartUpdated",renderCartBar),window.addEventListener("membershipCartUpdated",renderCartBar),window.addEventListener("storage",function(e){(!e||e.key==null||e.key==="serviceCart"||e.key==="packageCart"||e.key==="membershipCart")&&renderCartBar()})}(),function(){var C="locationEntityId";function r(){try{if(typeof window.getWebsiteDetails=="function"){var d=window.getWebsiteDetails();if(d&&d.locationEntityId)return String(d.locationEntityId).trim()}}catch{}try{var l=localStorage.getItem("locationEntityId");if(l)return String(l).trim()}catch{}try{var f=document.querySelector("form[data-entity-id]");if(f){var fa=f.getAttribute("data-entity-id");if(fa)return String(fa).trim()}}catch{}return""}function c2(){var m=document.cookie.match(/(?:^|;\s*)locationEntityId=([^;]+)/);return m?decodeURIComponent(m[1]):""}function s(){var id=r();return id?(c2()!==id&&(document.cookie=C+"="+encodeURIComponent(id)+"; path=/; max-age=31536000; SameSite=Lax"),!0):!1}var n=0;function a2(){s()||++n>=3||setTimeout(a2,500)}setTimeout(a2,500)}(),function(){var l="zocaNavDropdownBuilt";function p(e){var t=e.getAttribute("data-nested-links");if(!t||t.charAt(0)==="$")return[];try{var n=JSON.parse(t);return Array.isArray(n)?n.filter(function(o){return o&&typeof o.name=="string"&&typeof o.href=="string"}):[]}catch{return[]}}function s(e){e&&e.zocaCloseTimer&&(clearTimeout(e.zocaCloseTimer),e.zocaCloseTimer=null),document.querySelectorAll(".nav-dropdown-panel.is-open").forEach(function(t){t!==e&&(t.classList.remove("is-open"),t.zocaOwner&&t.zocaOwner.setAttribute("aria-expanded","false"))})}function m(e,t){var n=document.createElement("div");return n.className="nav-dropdown-panel",n.id=(e.id||"nav-link")+"-dropdown",n.setAttribute("role","menu"),n.setAttribute("aria-label",(e.textContent||"").trim()),t.forEach(function(o){var r=document.createElement("a");r.className="nav-dropdown-link",r.href=o.href,r.textContent=o.name,r.setAttribute("role","menuitem"),r.title=o.name,n.appendChild(r)}),n.zocaOwner=e,n}function w(e){if(!e.querySelector(".nav-dropdown-caret")){var t=document.createElement("span");t.className="nav-dropdown-caret",t.setAttribute("aria-hidden","true"),e.appendChild(t)}}function h(e,t){var n=e.getBoundingClientRect(),o=t.offsetParent,r=0,a2=0;if(o&&o.getBoundingClientRect){var i=o.getBoundingClientRect();r=i.left,a2=i.top}else o===null&&(r=-(window.scrollX||0),a2=-(window.scrollY||0));var c2=n.left-r;t.style.left=c2+"px",t.style.top=n.bottom-a2+"px";var d=t.getBoundingClientRect(),v=d.right-document.documentElement.clientWidth;v>0&&(t.style.left=Math.max(c2-v-8,8-r)+"px")}function b2(e){if(e.dataset[l]==="true")return;var t=p(e);if(t.length===0)return;e.dataset[l]="true";var n=m(e,t);
17e.classList.add("has-nav-dropdown"),e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),w(e);var o=e.closest("#desktop-nav")||e.parentNode;o&&o.appendChild(n);function r(){s(n),n.classList.add("is-open"),e.setAttribute("aria-expanded","true"),h(e,n)}function a2(){n.classList.remove("is-open"),e.setAttribute("aria-expanded","false")}function i(){n.zocaCloseTimer&&(clearTimeout(n.zocaCloseTimer),n.zocaCloseTimer=null)}function c2(){i(),n.zocaCloseTimer=setTimeout(a2,180)}e.addEventListener("mouseenter",function(){i(),r()}),e.addEventListener("mouseleave",c2),n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",c2),e.addEventListener("focus",r),e.addEventListener("keydown",function(d){d.key==="Escape"&&a2()}),e.addEventListener("click",function(d){matchMedia("(hover: none)").matches&&(n.classList.contains("is-open")||(d.preventDefault(),d.stopPropagation(),r()))},!0)}function f(){document.querySelectorAll("a.nav-link-desktop[data-nested-links]").forEach(b2)}function L(){window.zocaNavDropdownBound||(window.zocaNavDropdownBound=!0,document.addEventListener("click",function(e){e.target.closest(".nav-dropdown-panel, .has-nav-dropdown")||s(null)}),document.addEventListener("keydown",function(e){e.key==="Escape"&&s(null)}),window.addEventListener("resize",function(){s(null)}),window.addEventListener("scroll",function(e){var t=e.target;t&&t.closest&&t.closest(".nav-dropdown-panel")||s(null)},!0))}function u(){f(),L(),window.zocaNavDropdownObserver||(window.zocaNavDropdownObserver=new MutationObserver(function(){f()}),window.zocaNavDropdownObserver.observe(document.body,{childList:!0,subtree:!0}))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",u):u(),window.addEventListener("load",function(){setTimeout(u,200)}),document.addEventListener("astro:page-load",function(){setTimeout(u,100)})}(),function(){var KINDS=[{key:"packageCart",mirror:"packages",idField:"packageTemplateId",event:"packageCartUpdated",btn:"button[data-package-cta-add-text]",card:"[data-package-card]",idAttr:"data-package-id",stateAttr:"data-package-in-cart",addAttr:"data-package-cta-add-text",removeAttr:"data-package-cta-remove-text"},{key:"membershipCart",mirror:"memberships",idField:"membershipTemplateId",event:"membershipCartUpdated",btn:"button[data-membership-cta-add-text]",card:"[data-membership-card]",idAttr:"data-membership-id",stateAttr:"data-membership-in-cart",addAttr:"data-membership-cta-add-text",removeAttr:"data-membership-cta-remove-text"}];function inCartIds(kind){var lines=[];try{var own=JSON.parse(localStorage.getItem(kind.key)||"[]");Array.isArray(own)&&(lines=own)}catch{}if(!lines.length)try{var stored=JSON.parse(localStorage.getItem("serviceCart")||"null"),data=stored&&stored.data&&typeof stored.data=="object"?stored.data:stored;data&&Array.isArray(data[kind.mirror])&&(lines=data[kind.mirror])}catch{}var ids={};return lines.forEach(function(l){l&&l[kind.idField]&&(ids[l[kind.idField]]=!0)}),ids}function syncKind(kind){var btns=document.querySelectorAll(kind.btn);if(btns.length)for(var ids=inCartIds(kind),i=0;i<btns.length;i++){var btn=btns[i],card=btn.closest(kind.card),id=card&&card.getAttribute(kind.idAttr)||btn.getAttribute(kind.idAttr);if(id){var on=!!ids[id],addText=btn.getAttribute(kind.addAttr)||"",removeText=btn.getAttribute(kind.removeAttr)||"",label=on&&removeText||addText;label&&btn.textContent!==label&&(btn.textContent=label),btn.setAttribute(kind.stateAttr,on?"true":"false"),btn.setAttribute("aria-pressed",on?"true":"false")}}}function syncHomeCatalogueCtas(){KINDS.forEach(syncKind)}window.syncHomeCatalogueCtas=syncHomeCatalogueCtas,document.readyState==="loading"?document.addEventListener("DOMContentLoaded",syncHomeCatalogueCtas):syncHomeCatalogueCtas(),KINDS.forEach(function(kind){window.addEventListener(kind.event,function(){syncKind(kind)})}),window.addEventListener("pageshow",syncHomeCatalogueCtas),window.addEventListener("storage",function(e){(!e||e.key==null||e.key==="packageCart"||e.key==="membershipCart"||e.key==="serviceCart")&&syncHomeCatalogueCtas()}),document.addEventListener("astro:page-load",syncHomeCatalogueCtas)}(),window.getWebsiteDetails=function(){return{locationEntityId:"c4a37fc8-1668-4bb7-8490-3908cddee951",websiteId:"13428aa6-f19b-415d-bf72-f73fc1355d1e",templateId:"c2d5ff25-d388-4d41-9e74-43cb039dbe10",templateName:"Glassy",businessName:"Kinkology Locs & Natural Haircare",favicon:null,metadata:{title:"",description:"",keywords:""},schemaMarkup:{"@id":"https://kinkologyhaircare.com#business",geo:{"@type":"GeoCoordinates",latitude:33.831722,longitude:-84.574554},url:"https://kinkologyhaircare.com",logo:"https://ik.imagekit.io/vqkmp8kgs/prod/c4a37fc8-1668-4bb7-8490-3908cddee951/logo_1773754483607.webp",name:"Kinkology Locs & Natural Haircare","@type":"LocalBusiness",email:"[email protected]",image:"https://ik.imagekit.io/vqkmp8kgs/prod/c4a37fc8-1668-4bb7-8490-3908cddee951/logo_1773754483607.webp",hasMap:"https://maps.google.com/maps?cid=13408016502466273193",review:[{"@type":"Review",author:{name:"Fallon Moore- Huff","@type":"Person"},reviewBody:"Amazing experience from start to finish. I enjoyed my service & style is beautiful. I'll definitely return.",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}
17,reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2026-08-28"},{"@type":"Review",author:{name:"Mahdee Sabir","@type":"Person"},reviewBody:"Very professional and friendly",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-12-12"},{"@type":"Review",author:{name:"Troy Stewart","@type":"Person"},reviewBody:"Kasia has been my stylist for a little over a year now & she has done an amazing job! She is very gentle and attentive to what my locs need to remain healthy! 10/10, would recommend.",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-11-22"},{"@type":"Review",author:{name:"Marvetta LB","@type":"Person"},reviewBody:"An amazing experience with Noelette. Her attention to my loc needs as well as accounting for my \u201Cenergy\u201D which was allllll over, Noelette\u2019s calmness, her music choice, the shops relaxing smells, the steaming aromas and soooo much more were allll much needed. No pressure, no rushing yet respectful of community receiving and providing self care \u{1F9D6}\u{1F3FE}\u200D\u2640\uFE0F. Highly recommend this small Black Business.",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}
17,reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-06-11"},{"@type":"Review",author:{name:"Jennifer Poitier","@type":"Person"},reviewBody:"I loved my Hair experience with Noelette . This was my first time there I have mature locks That had not been maintained in over a year. She used the interlocking method for my new growth and then did some lock repair. I am thoroughly satisfied with the services and the Atmosphere was very welcoming And professional",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-05-29"},{"@type":"Review",author:{name:"Tye Curry","@type":"Person"},reviewBody:"Noelette, is very informative. She has the most calming demeanor and I highly recommend her! As she was recommended to me.",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-04-08"},{"@type":"Review",author:{name:"Kia Bourne","@type":"Person"},reviewBody:"I had a great experience from start to finish with Noelette! I had a full color done on sister locks and it came out better than I hoped! My hair looks and feels the healthiest it has been in years based on the knowledge and guidance Noelette shared with me during my consultation. She is a true professional and master at what she does. I\u2019m so glad I found this salon and will be going back every time! To add: Noelette is gracious, patient, and kind and truly listens to what you want with honest feedback. I\u2019m glad to have meet her. It\u2019s refreshing to see the care she puts into her work. I left beyond satisfied with the results \u{1F60A}",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}
17,reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-04-02"},{"@type":"Review",author:{name:"Lexi Tillman","@type":"Person"},reviewBody:"i had such a great experience. the shop is a nice and comfortable space and i am in love with my new color!",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-02-26"},{"@type":"Review",author:{name:"A K","@type":"Person"},reviewBody:`5 Stars! 18 19I became a transfer client after getting loc extensions in November, and Nolette exceeded all my expectations. From the moment I booked with her, I knew I was in excellent hands. Before my appointment, she took the time to personally call me and ask detailed questions about my hair, health, and overall goals. We had an in-depth conversation about my locs, my care routine, and maintenance needs, which immediately made me feel valued and understood. 20 21On the day of my appointment, I was impressed by the warm and inviting atmosphere. The salon\u2019s decor, especially the exquisite artwork on the walls, created a calming and stylish environment. But what stood out most was the level of service. Nolette thoroughly washed my hair, ensuring it was impeccably clean and completely dry. She didn\u2019t simply leave me under the dryer; she stayed attentive throughout, checking in to make sure I was comfortable and didn\u2019t need anything. 22 23The professionalism extended beyond Nolette, too. The other stylists carried themselves with pride and passion for their work. The salon was spotless, organized, and truly reflected a high standard of care. 24 25Overall, my experience was phenomenal. Nolette\u2019s expertise, attention to detail, and dedication to her clients made me feel like a priority. She also allowed me to ask a a lot of questions which I appreciate her wanting to educate the client. I highly recommend her services to anyone looking for exceptional loc care!`,itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}
25,reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2025-01-08"},{"@type":"Review",author:{name:"T R. Bermudez","@type":"Person"},reviewBody:`One of the best locticians in Georgia! Skill mastery in extension installation, cutting, loc styling, and overall hair health. 26Pleasant, clean, professional yet fun salon atmosphere; on time and efficient service\u2026you won\u2019t regret your investment!`,itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2024-08-06"},{"@type":"Review",author:{name:"Happi Hongla","@type":"Person"},reviewBody:"I flew into Atlanta & the appointment I had made initially was a dub. I called after looking up Locticians & Noelette welcomed me to her shop whole heartedly. Not only was she a breath of fresh air while conversing but she also provided me with great loc maintenance tips while retwisting my locs. I felt very comfortable from the moment I walked & left feeling like my name, happi !! Thank you again, Noelette !!",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}
26,reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2024-07-17"},{"@type":"Review",author:{name:"Geoffrey Price","@type":"Person"},reviewBody:"I've been going here for a couple months now and the service is always great. It's been really easy to book an appointment, and Kasia has been getting me right as I grow out my hair.",itemReviewed:{"@id":"https://kinkologyhaircare.com#business"},reviewRating:{"@type":"Rating",bestRating:5,ratingValue:5,worstRating:1},datePublished:"2024-04-18"}],sameAs:["https://www.instagram.com/the_kinkologist"],address:{"@type":"PostalAddress",postalCode:"30126",addressRegion:"GA",streetAddress:"Phenix Salon Suites, 5015 Floyd Rd SW, Suite #134, Mableton",addressCountry:"US",addressLocality:"Atlanta"},"@context":"https://schema.org",keywords:"Interlock Maintenance ($75 for each hour after 2 hours), Interlock Partial, 12 Week Protocol (Hairloss Program), 12 Week Hair Restoration plan, Crochet (Partial), Crochet Maintenance (ful Head), Retwist Flexi or Rod Set, Rope Twist or Braids (3/4 Locs), Micro Retwist (No Style), Loc Detailed Style (No Retwist), Loc knots, Micro Loc Retwist w/Rope Twist, Micro Retwist w/Basic Style, Micro Retwist w/Detailed Style, Micro Style (No Retwist, No Shampoo), Partial Interlock, Retwist Consultation, Retwist Detailed Style, Retwist Basic, Retwist Perimeter Only (Hairline), Retwist (Pipecleaners), Rope Twist/2 Strand Twist (2 Locs), Hydration Steam Treatment, Sisterlock Install, Sisterlocks: Detailed Style Only, Sisterlocks: Shampoo & Basic Style Only, Sisterlocks: Shampoo & Curls Style Only, Sisterlocks: Shampoo & Detailed Style, Sisterlock Transfer Client Consultation, Sisterlock Style Curls Only, Sisterlock Retie or Interlock, 2 Strand Twist Medium, C
26omb Coils Micro, Comb Coils Small, Comb Coils Medium/Standard, Color Refresh, Full Head (fantasy colors double process), Highlights Light (Double Process), Retouch Single Process half an ich or less, Retouch Double Process, Micro Starter Locs, Micro Locs (interlock), Wicks, Starter Locs Standard/Medium, Partial Starter loc (back and sides), Full Head Loc Restoration, Loc Re-attachment, Loc Repair (Micro Fix Priced Per Loc), Loc Combining/Marrying (roots only), Shampoo and Blowdry, Detangling Service (Per Hour) , Wash & Go Curl Definition, Deep Conditioner Treatment , Detox Shampoo w/Steam, Protein Treatment, Precision Cut (layers, face Frame. etc.), Women\u2019s Basic Trim, Big Chop, Children Haircuts, Mens Trim (Basic Cut), Men's/Women Clipper Cut, Shaft Trim, Hairloss Consultation , Color Consultation, Micro Loc consultation, Instant Loc Consultation, Loc Cut Consultation, Sisterlock Consultation, Interlocking Maintenance Consultation, Starter Loc Consultation, Loc Extension Consultation, Natural Hair Consultation",telephone:"+16786402887",priceRange:"$$",publicAccess:!0,aggregateRating:{"@type":"AggregateRating",bestRating:5,ratingCount:12,ratingValue:5,reviewCount:12,worstRating:1,itemReviewed:{"@id":"https://kinkologyhaircare.com#business"}},paymentAccepted:"Cash, Credit Card",currenciesAccepted:"USD",openingHoursSpecification:[{"@type":"OpeningHoursSpecification",opens:"00:00",closes:"00:00",dayOfWeek:"https://schema.org/Monday"},{"@type":"OpeningHoursSpecification",opens:"10:00",closes:"18:00",dayOfWeek:"https://schema.org/Tuesday"},{"@type":"OpeningHoursSpecification",opens:"10:00",closes:"18:00",dayOfWeek:"https://schema.org/Wednesday"},{"@type":"OpeningHoursSpecification",opens:"10:00",closes:"18:00",dayOfWeek:"https://schema.org/Thursday"},{"@type":"OpeningHoursSpecification",opens:"10:00",closes:"18:00",dayOfWeek:"https://schema.org/Friday"},{"@type":"OpeningHoursSpecification",opens:"10:00",closes:"15:00",dayOfWeek:"https://schema.org/Saturday"},{"@type":"OpeningHoursSpecification",opens:"00:00",closes:"00:00",dayOfWeek:"https://schema.org/Sunday"}]},websiteType:"",baseUrl:"https://bookzoca.com"}},window.getWebsiteDetail=function(key){return window.getWebsiteDetails()[key]},window.isWebsiteDetailsLoaded=function(){return typeof window.getWebsiteDetails=="function"},window.LeafletMapData={latitude:33.831722,longitude:-84.574554,bizName:"Kinkology Locs & Natural Haircare",mapsLink:"https://maps.google.com/maps?cid=13408016502466273193",placeId:"ChIJm5vQIczj9IgRqd8TZPjXEro",address:"Phenix Salon Suites, 5015 Floyd Rd SW, Suite #134, Mableton"},document.addEventListener=originalAddEventListener}catch(error){console.error("Error executing globalJs for page:",PAGE_ID,error)}}}),typeof window.onPageScriptLoaded=="function"&&window.onPageScriptLoaded(PAGE_ID),window.PRISM_LIFECYCLE&&window.PRISM_LIFECYCLE.executeReady&&window.PRISM_LIFECYCLE.executeReady()})();
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.