PageSourceSearch

https://secnova.ai/_astro/ContactForm.astro_astro_type_script_index_0_lang.Dok7s_DP.js

js secnova.ai collected 2026-10-05 12:37:13 UTC 3,567 bytes, 1 lines download raw bytes

1import{p as d,r as h}from"./client.DIN-G-OK.js";import{t as p,a as y}from"./translations.D-EaZVtC.js";import{s as v}from"./contact.BJgPj-4-.js";import"./partner-verification.CFNR6lmE.js";const m="secnova:contact-us-form:draft",g=()=>document.documentElement.lang||localStorage.getItem("language")||"en",f=e=>p(y,g(),`aiSocMSSPs.contact.validation.${e}`),i=e=>{e.setCustomValidity("");const t=e instanceof HTMLInputElement&&e.type==="checkbox"?!e.checked:e.value.trim()==="";return e.required&&t?(e.setCustomValidity(f("required")),!1):e instanceof HTMLInputElement&&e.type==="email"&&e.validity.typeMismatch?(e.setCustomValidity(f("invalidEmail")),!1):!0},S=e=>(Array.from(e.querySelectorAll("[name]")).forEach(i),e.reportValidity()),u=e=>{const a={};e.querySelectorAll("[name]").forEach(t=>{if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){a[t.name]=t.checked;return}a[t.name]=t.value});try{window.sessionStorage.setItem(m,JSON.stringify(a))}catch{}},b=e=>{let a=null;try{const t=window.sessionStorage.getItem(m);a=t?JSON.parse(t):null}catch{return}a&&e.querySelectorAll("[name]").forEach(t=>{const n=a[t.name];if(n!==void 0){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){t.checked=n===!0;return}typeof n=="string"&&(t.value=n)}})},E=()=>{try{window.sessionStorage.removeItem(m)}catch{}},w=()=>{const e=new URLSearchParams(window.location.search).get("help"),a=document.querySelector("#help-type");if(!e||!a)return;Array.from(a.options).some(n=>n.value===e)&&(a.value=e,a.dispatchEvent(new Event("change",{bubbles:!0})))},L=()=>{const e=document.querySelector("#contact-us-form");!e||e.dataset.redirectBound==="true"||(e.dataset.redirectBound="true",e.addEventListener("input",a=>{const t=a.target;(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&i(t),u(e)}),e.addEventListener("change",a=>{const t=a.target;(t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement)&&i(t),u(e)}),e.querySelector("[data-privacy-policy-link]")?.addEventListener("click",()=>{u(e)}),e.addEventListener("submit",async a=>{if(a.preventDefault(),!S(e))return;const n={form_id:"contact-us-form",lead_type:e.querySelector("#help-type")?.value||"contact",source_page:window.location.pathname};d("form_submit_attempt",n);const s=e.querySelector('[type="submit"]'),o=e.querySelector("#contact-form-status");o&&(o.textContent="",o.removeAttribute("data-state")),s&&(s.disabled=!0,s.setAttribute("aria-busy","true"),s.classList.add("is-loading"));const r=c=>e.querySelector(c)?.value.trim()||"";try{await v({first_name:r("#first-name"),last_name:r("#last-name"),email:r("#email"),company_name:r("#company"),region:r("#country-region"),job_title:r("#job-title"),message:r("#message"),help_type:r("#help-type"),marketing_consent:e.querySelector("#marketing-consent")?.checked===!0,website:r("#contact-website")}),h(n),E(),window.location.assign("/contact-us/thank-you/")}catch(c){console.error("Contact request error:",c),d("form_submit_error",{...n,form_type:"contact"}),o&&(o.dataset.state="error",o.textContent=p(y,g(),"aiSocMSSPs.contact.submitError")),s&&(s.disabled=!1,s.removeAttribute("aria-busy"),s.classList.remove("is-loading"))}}))},l=()=>{const e=document.querySelector("#contact-us-form");e&&(b(e),w(),L())};l();document.addEventListener("astro:page-load",l);window.addEventListener("pageshow",l);window.addEventListener("languageChange",()=>{document.querySelectorAll("#contact-us-form [name]").forEach(e=>{e.validationMessage&&i(e)})});

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.