(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t="email",n="phone",r="name",l={[t]:["email","e-mail","mail","email address"],[n]:["phone","tel","mobile","cell","telephone","phone number"],[r]:["name","full-name","full name","full_name","fullname","first-name","first name","first_name","firstname","last-name","last name","last_name","lastname","given-name","given name","given_name","givenname","family-name","family name","family_name","familyname","fname","lname","first","last","your-name","your name"]};function a(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function i(e){const t=a(e),n=t.lastIndexOf("@");if(-1===n)return t;const r=t.slice(n+1);return["gmail.com","googlemail.com"].includes(r)?`${t.slice(0,n).replace(/\./g,"")}@${r}`:t}function s(e){const t=a(e),n=t.replace(/\D/g,"");return t.startsWith("+")?`+${n}`:n}function o(e){const t=e.filter(e=>{let{type:t}=e;return t===r}).map(e=>{let{value:t}=e;return a(t)}).filter(Boolean);if(!t.length)return;const[n,...l]=1===t.length?t[0].split(" "):t;return{first_name:n,...l?.length>0?{last_name:l.join(" ")}:{}}}function u(e){return e.find(e=>{let{type:n}=e;return n===t})?.value}function m(e){return e.find(e=>{let{type:t}=e;return t===n})?.value}var c,f;c=e.g.jQuery,f=e.g.PUM,c&&f&&f.hooks.addAction("pum.integration.form.success",(c,f)=>{const p=e.g._googlesitekit?.gtagUserData,d=p&&(y=f.formProvider,!g.includes(y))?function(e){if(!(e=e instanceof HTMLFormElement?e:e[0]))return;const c=new FormData(e);return function(e){const t=[["address",o(e)],["email",u(e)],["phone_number",m(e)]].filter(e=>{let[,t]=e;return t});if(0!==t.length)return Object.fromEntries(t)}(Array.from(c.entries()).map(o=>{let[u,m]=o;const c=e.querySelector(`[name='${u}']`),f=c?.type;return"hidden"===f?null:function(e){let{type:o,name:u,value:m,label:c}=e||{};switch(o=a(o),u=a(u),m=a(m),c=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(c),o){case"email":return{type:t,value:i(m)};case"tel":return{type:n,value:s(m)}}return function(e){if(!e)return!1;const t=i(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(m)||l[t].includes(u)||l[t].includes(c)?{type:t,value:i(m)}:l[n].includes(u)||l[n].includes(c)?{type:n,value:s(m)}:l[r].includes(u)||l[r].includes(c)?{type:r,value:a(m)}:function(e){if(!e)return!1;if(!function(e){const t=e.replace(/\D/g,"");return!(t.length<7||t.length<e.length/2)&&/^[\s\-()+.\d]*$/.test(e)}(e))return!1;const t=s(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),r=e.trim().startsWith("+");return!(!n&&!r)}(m)?{type:n,value:s(m)}:null}({type:f,label:(c?.id?e.querySelector(`label[for='${c?.id}']`)?.textContent:null)||c?.closest("label")?.textContent,name:u,value:m})}).filter(Boolean))}(c):void 0;var y;e.g._googlesitekit?.gtagEvent?.("submit_lead_form",d?{user_data:d}:void 0)});const g=["wpforms","contactform7","ninjaforms","mc4wp"]})();