(()=>{"use strict";var e={};function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 r="email",i="phone",l="name",o={[r]:["email","e-mail","mail","email address"],[i]:["phone","tel","mobile","cell","telephone","phone number"],[l]:["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 u(e){const t=a(e),n=t.lastIndexOf("@");if(-1===n)return t;const r=t.slice(n+1);if(["gmail.com","googlemail.com"].includes(r)){const e=t.slice(0,n).replace(/\./g,"");return"".concat(e,"@").concat(r)}return t}function c(e){const t=a(e),n=t.replace(/\D/g,"");return t.startsWith("+")?"+".concat(n):n}function s(e){const r=e.filter(e=>{let{type:t}=e;return t===l}).map(e=>{let{value:t}=e;return t});if(!r.length)return;const[i,...o]=1===r.length?r[0].split(" "):r;return function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}({first_name:a(i)},(null==o?void 0:o.length)>0?{last_name:a(o.join(" "))}:{})}function f(e){var t;return null===(t=e.find(e=>{let{type:t}=e;return t===r}))||void 0===t?void 0:t.value}function m(e){var t;return null===(t=e.find(e=>{let{type:t}=e;return t===i}))||void 0===t?void 0:t.value}var p,v;p=e.g.jQuery,v=e.g.PUM,p&&v&&v.hooks.addAction("pum.integration.form.success",(t,n)=>{var p,v,y;const g=(null===(p=e.g._googlesitekit)||void 0===p?void 0:p.gtagUserData)&&(b=n.formProvider,!d.includes(b))?function(e){if(!(e=e instanceof HTMLFormElement?e:e[0]))return;const t=new FormData(e);return function(e){const t=[["address",s(e)],["email",f(e)],["phone_number",m(e)]].filter(e=>{let[,t]=e;return t});if(0!==t.length)return Object.fromEntries(t)}(Array.from(t.entries()).map(t=>{var n,s;let[f,m]=t;const p=e.querySelector("[name='".concat(f,"']")),v=null==p?void 0:p.type;return"hidden"===v?null:function(e){let{type:t,name:n,value:s,label:f}=e||{};switch(t=a(t),n=a(n),s=a(s),f=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(f),t){case"email":return{type:r,value:u(s)};case"tel":return{type:i,value:c(s)}}return function(e){if(!e)return!1;const t=u(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(s)?{type:r,value:u(s)}: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=c(e);return/^\+?\d{7,}$/.test(t)}(s)?{type:i,value:c(s)}:o[r].includes(n)||o[r].includes(f)?{type:r,value:u(s)}:o[i].includes(n)||o[i].includes(f)?{type:i,value:c(s)}:o[l].includes(n)||o[l].includes(f)?{type:l,value:a(s)}:null}({type:v,label:(null!=p&&p.id?null===(n=e.querySelector("label[for='".concat(null==p?void 0:p.id,"']")))||void 0===n?void 0:n.textContent:null)||(null==p||null===(s=p.closest("label"))||void 0===s?void 0:s.textContent),name:f,value:m})}).filter(Boolean))}(t):void 0;var b;null===(v=e.g._googlesitekit)||void 0===v||null===(y=v.gtagEvent)||void 0===y||y.call(v,"submit_lead_form",g?{user_data:g}:void 0)});const d=["wpforms","contactform7","ninjaforms","mc4wp"]})();