{"version":3,"file":"AuditRedirect.CDr_D6DP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/nGkrpqYaGbrStq8lGarG/z3buQCcVBofhUkuiDref/AuditRedirect.js"],"sourcesContent":["import*as React from\"react\";// Redirects to the thank-you page once the form shows its success state.\n// Fires only AFTER Framer confirms the submission succeeded.\nexport function withAuditRedirect(Component){return /*#__PURE__*/React.forwardRef(function WithAuditRedirect(props,ref){React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;let observer=null;let redirectTimeout=null;let didScheduleRedirect=false;const disconnectObserver=()=>{if(observer){observer.disconnect();observer=null;}};const onMutation=()=>{if(didScheduleRedirect||typeof document===\"undefined\")return;const btns=document.querySelectorAll('button[type=\"submit\"]');for(const b of Array.from(btns)){if(b.textContent&&b.textContent.includes(\"Request received\")){didScheduleRedirect=true;disconnectObserver();redirectTimeout=window.setTimeout(()=>{disconnectObserver();window.location.href=\"/audit-confirmed-k7x2\";},700);return;}}};const startObserving=()=>{if(didScheduleRedirect||typeof document===\"undefined\"||typeof MutationObserver===\"undefined\"){return;}const observerTarget=document.documentElement;if(!observerTarget||typeof observerTarget.nodeType!==\"number\")return;try{observer=new MutationObserver(onMutation);observer.observe(observerTarget,{subtree:true,childList:true,characterData:true});onMutation();}catch{disconnectObserver();}};if(document.readyState===\"loading\"||!document.documentElement){document.addEventListener(\"DOMContentLoaded\",startObserving,{once:true});}else{startObserving();}return()=>{document.removeEventListener(\"DOMContentLoaded\",startObserving);disconnectObserver();if(redirectTimeout!==null){window.clearTimeout(redirectTimeout);redirectTimeout=null;}};},[]);return /*#__PURE__*/React.createElement(Component,{...props,ref});});}export function withHomeFAQSchema(Component){return /*#__PURE__*/React.forwardRef(function WithHomeFAQSchema(props,ref){React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const scriptId=\"kairo-home-faq-schema\";const existing=document.getElementById(scriptId);if(existing)existing.remove();const isHomePage=window.location.pathname===\"/\";if(!isHomePage)return;const schema={\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"FAQPage\",mainEntity:[{\"@type\":\"Question\",name:\"What Actually Happens On The Audit?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"We go through your account and show you where it’s leaking revenue. Wasted spend, structural issues, tracking gaps. You leave with a 90-day actionable roadmap.\"}},{\"@type\":\"Question\",name:\"How Does Your Pricing Work?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"The audit is free. If we work together, it’s a fixed monthly retainer. Set based on your account, same every month. No percentage of ad spend. No performance bonuses with small print. No surprise invoices.\"}},{\"@type\":\"Question\",name:\"How Are We Different From Other Agencies?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"Most agencies use the same textbook strategies: tweaking bids, adding negatives, or rotating creatives. We rebuild the account as a system so spend compounds instead of competing with itself. If your current agency is already doing that, we’ll tell you on the call.\"}},{\"@type\":\"Question\",name:\"What If We’re Not A Good Fit?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"We’ll say so on the call. You still walk away with your Google Ads roadmap.\"}}]},{\"@type\":\"Organization\",name:\"Kairo Agency\",logo:\"https://framerusercontent.com/images/33VBdNCucep1c98ciCIdZm5e6M.png\"}]};const script=document.createElement(\"script\");script.id=scriptId;script.type=\"application/ld+json\";script.text=JSON.stringify(schema);document.head.appendChild(script);return()=>{const previous=document.getElementById(scriptId);if(previous)previous.remove();};});return /*#__PURE__*/React.createElement(Component,{...props,ref});});}export function withArticleSchema(Component){return /*#__PURE__*/React.forwardRef(function WithArticleSchema(props,ref){React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const scriptId=\"kairo-article-schema\";const existing=document.getElementById(scriptId);if(existing)existing.remove();const headline=document.title?.trim()||document.querySelector(\"h1\")?.textContent?.trim()||\"Article\";const description=document.querySelector('meta[name=\"description\"]')?.getAttribute(\"content\")?.trim()||\"\";const dateTextCandidates=[document.querySelector(\"article time\")?.textContent,document.querySelector(\"time\")?.textContent,document.querySelector('[class*=\"date\" i]')?.textContent,document.querySelector(\"[data-date]\")?.getAttribute(\"data-date\")];const rawDateText=dateTextCandidates.find(v=>Boolean(v))?.trim()||\"\";const parsedDate=rawDateText?new Date(rawDateText):null;const datePublished=parsedDate&&!Number.isNaN(parsedDate.getTime())?parsedDate.toISOString():undefined;const authorTextCandidates=[document.querySelector('[rel=\"author\"]')?.textContent,document.querySelector('[class*=\"author\" i]')?.textContent,document.querySelector(\"[data-author]\")?.getAttribute(\"data-author\")];const authorName=authorTextCandidates.find(v=>Boolean(v))?.trim()||\"Adam Ramlakhan\";const image=document.querySelector('meta[property=\"og:image\"]')?.getAttribute(\"content\")?.trim()||document.querySelector('meta[name=\"twitter:image\"]')?.getAttribute(\"content\")?.trim()||undefined;const schema={\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",headline,description,...datePublished?{datePublished}:{},author:{\"@type\":\"Person\",name:authorName},...image?{image}:{},mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":window.location.href},publisher:{\"@type\":\"Organization\",name:\"Kairo Agency\",logo:{\"@type\":\"ImageObject\",url:\"https://framerusercontent.com/images/33VBdNCucep1c98ciCIdZm5e6M.png\"}}};const script=document.createElement(\"script\");script.id=scriptId;script.type=\"application/ld+json\";script.text=JSON.stringify(schema);document.head.appendChild(script);return()=>{const previous=document.getElementById(scriptId);if(previous)previous.remove();};});return /*#__PURE__*/React.createElement(Component,{...props,ref});});}// Routes the /home-v2 application according to the two minimum-fit answers.\n// The redirect only runs after Framer confirms that the form submission succeeded.\nexport function withQualificationRedirect(Component){return /*#__PURE__*/React.forwardRef(function WithQualificationRedirect(props,ref){const qualifiedRef=React.useRef(false);React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const form=document.querySelector('[data-framer-name=\"Qualification Application\"] form, form[data-framer-name=\"Qualification Application\"], #apply form');if(!form)return;let observer=null;let redirectTimeout=null;let didScheduleRedirect=false;const captureQualification=()=>{const data=new FormData(form);const revenue=String(data.get(\"Monthly revenue\")||\"\");const spend=String(data.get(\"Monthly Google Ads spend\")||\"\");qualifiedRef.current=revenue!==\"Under $50k/month\"&&spend!==\"Under $5k/month\"&&Boolean(revenue)&&Boolean(spend);};const onMutation=()=>{if(didScheduleRedirect)return;const submitButton=form.querySelector('button[type=\"submit\"]');if(!submitButton?.textContent?.includes(\"Request received\"))return;didScheduleRedirect=true;observer?.disconnect();const destination=qualifiedRef.current?\"/audit-confirmed-k7x2?qualified=1\":\"/audit-not-a-fit-yet\";redirectTimeout=window.setTimeout(()=>{window.location.href=destination;},700);};form.addEventListener(\"submit\",captureQualification);if(typeof MutationObserver!==\"undefined\"&&typeof form.nodeType===\"number\"){try{observer=new MutationObserver(onMutation);observer.observe(form,{subtree:true,childList:true,characterData:true});}catch{observer?.disconnect();observer=null;}}return()=>{form.removeEventListener(\"submit\",captureQualification);observer?.disconnect();if(redirectTimeout!==null)window.clearTimeout(redirectTimeout);};},[]);return /*#__PURE__*/React.createElement(Component,{...props,ref});});}// Adds structured data that mirrors the visible FAQ on the Google Ads audit page.\nexport function withAuditLandingSchema(Component){return /*#__PURE__*/React.forwardRef(function WithAuditLandingSchema(props,ref){React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const scriptId=\"kairo-google-ads-audit-schema\";const existing=document.getElementById(scriptId);if(existing)existing.remove();if(window.location.pathname!==\"/\")return;const schema={\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"FAQPage\",mainEntity:[{\"@type\":\"Question\",name:\"What’s the catch with a free audit?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"There isn’t one. The audit is how we meet brands we might work with. If we’re a fit, we’ll tell you what working together looks like. If not, you still keep the plan.\"}},{\"@type\":\"Question\",name:\"Do I need to give you account access?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"Yes—read-only Google Ads access is needed for the account-level audit. If you qualify, we’ll send simple instructions after you book. You can revoke access at any time.\"}},{\"@type\":\"Question\",name:\"Will you just tell me to spend more?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"No — often the opposite. We audit for profit, not budget. Several clients ended up spending less after their rebuild.\"}},{\"@type\":\"Question\",name:\"What happens after the audit call?\",acceptedAnswer:{\"@type\":\"Answer\",text:\"You keep the written action plan either way. If you want us to implement it, we’ll map out what that looks like on the call — no pressure, no follow-up sequence.\"}}]},{\"@type\":\"Service\",name:\"Revenue Leak Audit\",serviceType:\"Google Ads audit for ecommerce brands\",provider:{\"@type\":\"Organization\",name:\"Kairo Agency\",url:\"https://kairo.agency\",logo:\"https://framerusercontent.com/images/qDdKSZrVuz64ET1S986yq3lVCM.png\"}}]};const script=document.createElement(\"script\");script.id=scriptId;script.type=\"application/ld+json\";script.text=JSON.stringify(schema);document.head.appendChild(script);return()=>{const previous=document.getElementById(scriptId);if(previous)previous.remove();};},[]);return /*#__PURE__*/React.createElement(Component,{...props,ref});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withAuditLandingSchema\":{\"type\":\"reactHoc\",\"name\":\"withAuditLandingSchema\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withArticleSchema\":{\"type\":\"reactHoc\",\"name\":\"withArticleSchema\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHomeFAQSchema\":{\"type\":\"reactHoc\",\"name\":\"withHomeFAQSchema\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withAuditRedirect\":{\"type\":\"reactHoc\",\"name\":\"withAuditRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withQualificationRedirect\":{\"type\":\"reactHoc\",\"name\":\"withQualificationRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AuditRedirect.map"],"mappings":"gIAEulH,SAAgB,EAAkB,EAAU,CAAC,OAAoB,EAAiB,SAA2B,EAAM,EAAI,CAAkgE,OAAjgE,MAAoB,CAAC,GAAU,IAAS,QAAa,OAAO,SAAW,IAAY,OAAO,IAAM,EAAS,uBAA6B,EAAS,SAAS,eAAe,C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