1import{s as f}from"./turnstile.2y-TapBS.js";const g=document.querySelectorAll("[data-contact-form-button]");g.forEach(e=>{e.addEventListener("click",()=>h())});const y="https://arcticleaf-contact-form.arcticleaf.workers.dev";let a=null;f("#cf-turnstile-contact","0x4AAAAAADn4J_IvEibj9lsV").then(e=>{a=e}).catch(e=>console.error("Turnstile setup failed:",e));async function h(){const e=document.getElementById("input-submit");e&&(e.disabled=!0);const r=document.getElementById("full-name").value,s=document.getElementById("comp-name").value,n=document.getElementById("input-email").value,u=document.getElementById("input-number").value,d=document.getElementById("web-url").value,o=document.getElementById("message").value,l=Array.from(document.querySelectorAll('input[name="interest"]:checked')).map(t=>t.value).join(", "),m=l?[o.trim(),`Interested in: ${l}`].filter(Boolean).join(` 2 3`):o;if(!r||!s||!n){alert("Please fill out all required fields"),e&&(e.disabled=!1);return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)){alert("Please enter a valid email address"),e&&(e.disabled=!1);return}if(!a){alert("Bot protection is still loading. Please wait a moment and try again."),e&&(e.disabled=!1);return}let i;try{i=await a()}catch(t){console.error("Turnstile verification error:",t),alert("We couldn't verify that you're human. Please refresh the page and try again."),e&&(e.disabled=!1);return}try{const t=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"contact",turnstileToken:i,fields:{fullName:r,company:s,workEmail:n,phone:u,website:d,message:m},context:{pageUri:document.getElementById("pageUrl").innerHTML,pageName:document.getElementById("pageName").innerHTML}})}),c=await t.json().catch(()=>({}));!t.ok||!c.success?(console.error("Form submission failed:",t.status,c),alert("There was an error submitting your form. Please try again later."),e&&(e.disabled=!1)):(function(){dataLayer.push(arguments)}("event","conversion",{send_to:"AW-733618706/a1JUCI3h7aQBEJLE6N0C"}),window.location.href=document.getElementById("redirectUrl").innerHTML)}catch(t){alert("There was an error submitting the form"),console.error("Error:",t),e&&(e.disabled=!1)}}
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.