function initGclid() { let input = document.getElementById("clid"); let gclid = getGclid(); if (!gclid) return; if (!input) { input = createField("clid"); } window.sessionStorage.setItem("gclid", gclid); input.value = gclid; return gclid; } function createField(name) { const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); const input = document.createElement("input"); input.type = "hidden"; input.name = name; input.id = name; form.appendChild(input); return input; } function getGclid() { return ( Cookies.get("gclid") || Cookies.get("gh_gclid") || window.sessionStorage.getItem("gclid") || null ); } window.addEventListener("DOMContentLoaded", initDOMLoadedScrpts); window.addEventListener("load", initLoadScrpts); function initLoadScrpts() { initChatbot(); } function initDOMLoadedScrpts() { initWoWJs(); initGclid(); getProspeccaoSaller(); } initFormScripts(); function initFormScripts() { const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); const formBtn = document.getElementById("enviar"); console.log("Form exibido: ", form); if (!form && !formBtn) return; form.addEventListener("submit", (event) => { handleSubmit(event, form, formBtn); }); initValidatePhone(); initValidateCheck(); initValidateEmail(); initValidadeCNPJ(); addMaxLegnthInputs(); initGetUTMS(); initUserId(); laziloadImgs(); // initCriptoEmail(); } function handleSubmit(event, form, btn) { event.preventDefault(); // const teste = new FormData(form); // console.log(Object.fromEntries(teste)); const inputHp = document.getElementById("userCode"); if (inputHp) handlerHP(inputHp); initPushToDataLayer(); form.submit(); btn.innerText = "Enviando..."; btn.disabled = true; } function handleSubmit2(token) { if (!token) return; const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); const btn = form.querySelector("#enviar"); const re = document.querySelector(".g-recaptcha"); btn.removeAttribute("style"); btn.removeAttribute("disabled"); re.remove(); btn.focus(); } function handlerHP(input) { const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); if (!form || !input) return false; let actionPath = form.action; let response; if (actionPath && input.value) { actionPath = actionPath.replace("cloud.", ""); response = false; } else { actionPath = actionPath.replace( "https://conteudo.", "https://cloud.conteudo." ); response = true; } form.action = actionPath; return response; } initReScript(); function initReScript() { const re = document.querySelectorAll(".g-recaptcha"); if (re && re.length > 0) { re.forEach((cap) => { cap.setAttribute("data-callback", "handleSubmit2"); createStyles(); const form = cap.parentNode; const btn = form.querySelector("#enviar"); btn.disabled = true; btn.style.display = "none"; }); } } function createStyles() { const head = document.head || document.getElementsByTagName("head")[0]; if (!head) return; const styleEl = document.createElement("style"); const css = ".g-recaptcha{display: flex; align-items: center; justify-content: center;margin: 0.625rem auto}"; styleEl.type = "text/css"; if (styleEl.styleSheet) { styleEl.styleSheet.cssText = css; } else { styleEl.innerText = css; } head.appendChild(styleEl); } // (() => { // const form = document.querySelectorAll("form") || null; // if (!form || form.length < 1) return; // form.forEach((form) => { // const field = document.createElement("input"); // field.type = "hidden"; // field.id = "nwTl"; // field.name = "nwTlv"; // field.value = new Date().getTime(); // form.appendChild(field); // }); // })(); /*! WOW wow.js - v1.2.1 - 2016-09-05 * https://wowjs.uk * Copyright (c) 2016 Thomas Grainger; Licensed MIT */ !(function (a, b) { if ("function" == typeof define && define.amd) define(["module", "exports"], b); else if ("undefined" != typeof exports) b(module, exports); else { var c = { exports: {} }; b(c, c.exports), (a.WOW = c.exports); } })(this, function (a, b) { "use strict"; function c(a, b) { if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function"); } function d(a, b) { return b.indexOf(a) >= 0; } function e(a, b) { for (var c in b) if (null == a[c]) { var d = b[c]; a[c] = d; } return a; } function f(a) { return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( a ); } function g(a) { var b = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1], c = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2], d = arguments.length <= 3 || void 0 === arguments[3] ? null : arguments[3], e = void 0; return ( null != document.createEvent ? ((e = document.createEvent("CustomEvent")), e.initCustomEvent(a, b, c, d)) : null != document.createEventObject ? ((e = document.createEventObject()), (e.eventType = a)) : (e.eventName = a), e ); } function h(a, b) { null != a.dispatchEvent ? a.dispatchEvent(b) : b in (null != a) ? a[b]() : "on" + b in (null != a) && a["on" + b](); } function i(a, b, c) { null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : (a[b] = c); } function j(a, b, c) { null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b]; } function k() { return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight; } Object.defineProperty(b, "__esModule", { value: !0 }); var l, m, n = (function () { function a(a, b) { for (var c = 0; c < b.length; c++) { var d = b[c]; (d.enumerable = d.enumerable || !1), (d.configurable = !0), "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d); } } return function (b, c, d) { return c && a(b.prototype, c), d && a(b, d), b; }; })(), o = window.WeakMap || window.MozWeakMap || (function () { function a() { c(this, a), (this.keys = []), (this.values = []); } return ( n(a, [ { key: "get", value: function (a) { for (var b = 0; b < this.keys.length; b++) { var c = this.keys[b]; if (c === a) return this.values[b]; } }, }, { key: "set", value: function (a, b) { for (var c = 0; c < this.keys.length; c++) { var d = this.keys[c]; if (d === a) return (this.values[c] = b), this; } return this.keys.push(a), this.values.push(b), this; }, }, ]), a ); })(), p = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver || ((m = l = (function () { function a() { c(this, a), "undefined" != typeof console && null !== console && (console.warn( "MutationObserver is not supported by your browser." ), console.warn( "WOW.js cannot detect dom mutations, please call .sync() after loading new content." )); } return n(a, [{ key: "observe", value: function () { } }]), a; })()), (l.notSupported = !0), m), q = window.getComputedStyle || function (a) { var b = /(\-([a-z]){1})/g; return { getPropertyValue: function (c) { "float" === c && (c = "styleFloat"), b.test(c) && c.replace(b, function (a, b) { return b.toUpperCase(); }); var d = a.currentStyle; return (null != d ? d[c] : void 0) || null; }, }; }, r = (function () { function a() { var b = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]; c(this, a), (this.defaults = { boxClass: "wow", animateClass: "animated", offset: 0, mobile: !0, live: !0, callback: null, scrollContainer: null, }), (this.animate = (function () { return "requestAnimationFrame" in window ? function (a) { return window.requestAnimationFrame(a); } : function (a) { return a(); }; })()), (this.vendors = ["moz", "webkit"]), (this.start = this.start.bind(this)), (this.resetAnimation = this.resetAnimation.bind(this)), (this.scrollHandler = this.scrollHandler.bind(this)), (this.scrollCallback = this.scrollCallback.bind(this)), (this.scrolled = !0), (this.config = e(b, this.defaults)), null != b.scrollContainer && (this.config.scrollContainer = document.querySelector( b.scrollContainer )), (this.animationNameCache = new o()), (this.wowEvent = g(this.config.boxClass)); } return ( n(a, [ { key: "init", value: function () { (this.element = window.document.documentElement), d(document.readyState, ["interactive", "complete"]) ? this.start() : i(document, "DOMContentLoaded", this.start), (this.finished = []); }, }, { key: "start", value: function () { var a = this; if ( ((this.stopped = !1), (this.boxes = [].slice.call( this.element.querySelectorAll("." + this.config.boxClass) )), (this.all = this.boxes.slice(0)), this.boxes.length) ) if (this.disabled()) this.resetStyle(); else for (var b = 0; b < this.boxes.length; b++) { var c = this.boxes[b]; this.applyStyle(c, !0); } if ( (this.disabled() || (i( this.config.scrollContainer || window, "scroll", this.scrollHandler ), i(window, "resize", this.scrollHandler), (this.interval = setInterval(this.scrollCallback, 50))), this.config.live) ) { var d = new p(function (b) { for (var c = 0; c < b.length; c++) for (var d = b[c], e = 0; e < d.addedNodes.length; e++) { var f = d.addedNodes[e]; a.doSync(f); } }); d.observe(document.body, { childList: !0, subtree: !0 }); } }, }, { key: "stop", value: function () { (this.stopped = !0), j( this.config.scrollContainer || window, "scroll", this.scrollHandler ), j(window, "resize", this.scrollHandler), null != this.interval && clearInterval(this.interval); }, }, { key: "sync", value: function () { p.notSupported && this.doSync(this.element); }, }, { key: "doSync", value: function (a) { if ( (("undefined" != typeof a && null !== a) || (a = this.element), 1 === a.nodeType) ) { a = a.parentNode || a; for ( var b = a.querySelectorAll("." + this.config.boxClass), c = 0; c < b.length; c++ ) { var e = b[c]; d(e, this.all) || (this.boxes.push(e), this.all.push(e), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(e, !0), (this.scrolled = !0)); } } }, }, { key: "show", value: function (a) { return ( this.applyStyle(a), (a.className = a.className + " " + this.config.animateClass), null != this.config.callback && this.config.callback(a), h(a, this.wowEvent), i(a, "animationend", this.resetAnimation), i(a, "oanimationend", this.resetAnimation), i(a, "webkitAnimationEnd", this.resetAnimation), i(a, "MSAnimationEnd", this.resetAnimation), a ); }, }, { key: "applyStyle", value: function (a, b) { var c = this, d = a.getAttribute("data-wow-duration"), e = a.getAttribute("data-wow-delay"), f = a.getAttribute("data-wow-iteration"); return this.animate(function () { return c.customStyle(a, b, d, e, f); }); }, }, { key: "resetStyle", value: function () { for (var a = 0; a < this.boxes.length; a++) { var b = this.boxes[a]; b.style.visibility = "visible"; } }, }, { key: "resetAnimation", value: function (a) { if (a.type.toLowerCase().indexOf("animationend") >= 0) { var b = a.target || a.srcElement; b.className = b.className .replace(this.config.animateClass, "") .trim(); } }, }, { key: "customStyle", value: function (a, b, c, d, e) { return ( b && this.cacheAnimationName(a), (a.style.visibility = b ? "hidden" : "visible"), c && this.vendorSet(a.style, { animationDuration: c }), d && this.vendorSet(a.style, { animationDelay: d }), e && this.vendorSet(a.style, { animationIterationCount: e }), this.vendorSet(a.style, { animationName: b ? "none" : this.cachedAnimationName(a), }), a ); }, }, { key: "vendorSet", value: function (a, b) { for (var c in b) if (b.hasOwnProperty(c)) { var d = b[c]; a["" + c] = d; for (var e = 0; e < this.vendors.length; e++) { var f = this.vendors[e]; a["" + f + c.charAt(0).toUpperCase() + c.substr(1)] = d; } } }, }, { key: "vendorCSS", value: function (a, b) { for ( var c = q(a), d = c.getPropertyCSSValue(b), e = 0; e < this.vendors.length; e++ ) { var f = this.vendors[e]; d = d || c.getPropertyCSSValue("-" + f + "-" + b); } return d; }, }, { key: "animationName", value: function (a) { var b = void 0; try { b = this.vendorCSS(a, "animation-name").cssText; } catch (c) { b = q(a).getPropertyValue("animation-name"); } return "none" === b ? "" : b; }, }, { key: "cacheAnimationName", value: function (a) { return this.animationNameCache.set(a, this.animationName(a)); }, }, { key: "cachedAnimationName", value: function (a) { return this.animationNameCache.get(a); }, }, { key: "scrollHandler", value: function () { this.scrolled = !0; }, }, { key: "scrollCallback", value: function () { if (this.scrolled) { this.scrolled = !1; for (var a = [], b = 0; b < this.boxes.length; b++) { var c = this.boxes[b]; if (c) { if (this.isVisible(c)) { this.show(c); continue; } a.push(c); } } (this.boxes = a), this.boxes.length || this.config.live || this.stop(); } }, }, { key: "offsetTop", value: function (a) { for (; void 0 === a.offsetTop;) a = a.parentNode; for (var b = a.offsetTop; a.offsetParent;) (a = a.offsetParent), (b += a.offsetTop); return b; }, }, { key: "isVisible", value: function (a) { var b = a.getAttribute("data-wow-offset") || this.config.offset, c = (this.config.scrollContainer && this.config.scrollContainer.scrollTop) || window.pageYOffset, d = c + Math.min(this.element.clientHeight, k()) - b, e = this.offsetTop(a), f = e + a.clientHeight; return d >= e && f >= c; }, }, { key: "disabled", value: function () { return !this.config.mobile && f(navigator.userAgent); }, }, ]), a ); })(); (b["default"] = r), (a.exports = b["default"]); }); function initWoWJs() { const wowItens = document.querySelectorAll(".wow"); if (wowItens.length < 1) return; new WOW().init(); } function initChatbot() { const urlIsValid = validateURL(location.pathname); if (urlIsValid) { getChatbotLib(); } } function validateURL(urlAtual) { const urlValids = [ "/lp-prospeccao-ontarget-decisor", "/prospeccao-geracao-de-leads-b2b", "/lp-prospeccao-bottom-up", "/lp-due-diligence", "/lp-sistema-de-compliance", "/lp-gestao-de-riscos", "/lp-background-check", ]; let isValid = false; urlValids.forEach((url) => { const regex = new RegExp(url); if (regex.test(urlAtual)) isValid = true; }); return isValid; } function getChatbotLib() { const js = document.createElement("script"); js.type = "text/javascript"; js.async = 1; js.src = "https://go.botmaker.com/rest/webchat/p/NIF3UFAZ0Q/init.js"; document.body.appendChild(js); } function initValidateCheck() { const inputConteudo = document.querySelector("#check_conteudo"); const valueConteudo = document.querySelector("#recebe_conteudo"); if (inputConteudo && valueConteudo) { inputConteudo.addEventListener("click", () => { if (inputConteudo.checked) { valueConteudo.value = "Sim"; } else { valueConteudo.value = "Não"; } }); } const inputEvento = document.querySelector("#check_evento"); const valueEvento = document.querySelector("#recebe_evento"); if (inputEvento && valueEvento) { inputEvento.addEventListener("click", () => { if (inputEvento.checked) { valueEvento.value = "Sim"; } else { valueEvento.value = "Não"; } }); } } function initValidadeCNPJ() { const input = document.getElementById("cnpj"); if (!input) return; input.addEventListener("input", ({ target }) => { target.value = cnpjMask(target.value); }); input.addEventListener("change", ({ target }) => { const cnpj = target.value.replace(/[^\d]+/g, ""); const isValid = validarCNPJ(cnpj); if (!isValid) { alert("CNPJ Inválido!"); target.value = ""; target.focus(); } }); function cnpjMask(inputValue) { if (!inputValue) return ""; let mask = inputValue; mask = mask.replace(/\D/g, ""); mask = mask.replace(/^(\d{2})(\d)/, "$1.$2"); mask = mask.replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3"); mask = mask.replace(/\.(\d{3})(\d)/, ".$1/$2"); mask = mask.replace(/(\d{4})(\d)/, "$1-$2"); return mask; } function validarCNPJ(inputValue) { let cnpj = inputValue; if (cnpj == "" || cnpj.length != 14) return false; if ( cnpj == "00000000000000" || cnpj == "11111111111111" || cnpj == "22222222222222" || cnpj == "33333333333333" || cnpj == "44444444444444" || cnpj == "55555555555555" || cnpj == "66666666666666" || cnpj == "77777777777777" || cnpj == "88888888888888" || cnpj == "99999999999999" ) return false; // Valida DVs let tamanho = cnpj.length - 2; let numeros = cnpj.substring(0, tamanho); let digitos = cnpj.substring(tamanho); let soma = 0; let pos = tamanho - 7; for (let i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) pos = 9; } let resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11); if (resultado != digitos.charAt(0)) return false; tamanho = tamanho + 1; numeros = cnpj.substring(0, tamanho); soma = 0; pos = tamanho - 7; for (let i = tamanho; i >= 1; i--) { soma += numeros.charAt(tamanho - i) * pos--; if (pos < 2) pos = 9; } resultado = soma % 11 < 2 ? 0 : 11 - (soma % 11); if (resultado != digitos.charAt(1)) return false; // If CNPJ is valid return true; } } function initValidateEmail() { const emailInputs = document.querySelectorAll('input[type="email"]'); if (emailInputs.length < 1) return; enableEmailBlock(); emailInputs.forEach((input) => { const maxLengthIsSet = input.getAttribute("maxlength"); if (!maxLengthIsSet) { input.setAttribute("maxlength", "254"); } handleInputEvent(input); }); } function handleInputEvent(el) { const wrapper = el.parentNode; const error = wrapper.querySelector(".text--error"); el.addEventListener("change", ({ target }) => { const enableBlocker = window.sessionStorage.getItem('emlblck') || false; if (enableBlocker) { const isCorporative = window.emailBlocker.handleBlocker(target); if (isCorporative) initCriptoEmail(); } else { initCriptoEmail(); } return target; }); el.addEventListener('input', ({ target }) => { target.setCustomValidity(""); if (wrapper && wrapper.classList.contains("invalid")) { wrapper.classList.remove("invalid"); if (error) error.innerText = ""; return el; } }); } function enableEmailBlock() { window.emailBlocker = { init: () => { window.sessionStorage.setItem('emlblck', true); return console.log('bloqueador de emails ativo.....'); }, handleBlocker: (input) => { if (!input || input.value === '') return true; const regex = /\b(gmail|icloud|outlook|hotmail|live|yahoo|oul|bol)\b/; if (regex.test(input.value)) { input.value = input.value.split("@")[0] + "@"; input.setCustomValidity("Somente email corporativos são válidos"); input.reportValidity(); return false; } return true; } } } function laziloadImgs() { const dataLazy = document.querySelectorAll(".lozad"); if (dataLazy.length < 1) return; const lozadLib = document.createElement("script"); lozadLib.type = "text/javascript"; lozadLib.src = "https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"; document.body.appendChild(lozadLib); window.addEventListener("load", initLazyloading); } function initLazyloading() { const observer = lozad(); observer.observe(); window.removeEventListener("load", initLazyloading); } function addMaxLegnthInputs() { const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); const inputs = form.querySelectorAll("input"); if (!form && inputs.length < 1) return; inputs.forEach((input) => { const type = input.getAttribute("type"); let limit = 255; if (type != "text" && type != "email") return; if (type === "email") limit = 254; input.maxLength = limit; }); } const getSearchData = (key) => new URLSearchParams(window.location.search).get(key) || null; const getIsValid = (srd, slug) => srd && slug ? true : false; function getProspeccaoSaller() { const sdr = getSearchData('poc') || null; const slug = document.getElementById('slug') || null; if (!getIsValid(sdr, slug)) return; return slug.value = `${slug.value.trim()}-${sdr.trim().toLocaleLowerCase().replaceAll(/%20| /g, "-")}`; } function initPushToDataLayer() { userIdToDataLayer(); passSTLDataToDataLayer(); } function userIdToDataLayer() { window.dataLayer = window.dataLayer || []; dataLayer.push({ event: "submitForm", user_id: Cookies.get("_neouid"), }); } function passSTLDataToDataLayer() { window.dataLayer = window.dataLayer || []; const dados = { pagePath: window.location.pathname, userId: Cookies.get("_neouid"), formStatus: "Success", formName: "conversion-form", lastPosts: localStorage.getItem('post_details') || null, }; window.dataLayer.push({ event: "form_stl", evt_category: "Envio_formulario", evt_action: "Materiais_Educativos", evt_label: dados.pagePath, n_user_id: dados.userId, n_status: dados.formStatus, n_form_name: dados.formName, last_posts: dados.lastPosts, }); } function initValidatePhone() { const inputsTel = document.querySelectorAll('input[type="tel"]'); const eventsTypes = ["change", "input"]; if (inputsTel.length < 1) return; eventsTypes.forEach((type) => { inputsTel.forEach((el) => { el.addEventListener(type, (event) => { event.preventDefault(); event.target.setCustomValidity(""); maskPhone(event.currentTarget); }); }); }); inputsTel.forEach((input) => { input.maxLength = 50; input.addEventListener("blur", ({ target }) => { const regex = /^\(?(\d{2})\)?[- ]?(\d{5})[- ]?(\d{4})$/g; if (!regex.test(target.value)) { target.setCustomValidity( "Parece estar faltando alguma coisa. Por favor, verifique o número digitado e tente novamente." ); } else { target.setCustomValidity(""); } }); }); function maskPhone(input) { setTimeout(function () { let value = mphone(input.value); if (value != input.value) { input.value = value; } }, 1); } function mphone(value) { let result = value.replace(/\D/g, ""); result = result.replace(/^0/, ""); if (result.length > 10) { result = result.replace(/^(\d\d)(\d{5})(\d{4}).*/, "($1) $2-$3"); } else if (result.length > 5) { result = result.replace(/^(\d\d)(\d{4})(\d{0,4}).*/, "($1) $2-$3"); } else if (result.length > 2) { result = result.replace(/^(\d\d)(\d{0,5})/, "($1) $2"); } else { result = result.replace(/^(\d*)/, "($1"); } return result; } } function initCriptoEmail() { let value; const enabledCrypto = !!crypto && !!crypto.subtle; const inputResult = document.getElementById("emailId"); const input = document.getElementById("email") || document.querySelector('input[type="email"]'); value = input.value; if (!input || !value || !inputResult || !enabledCrypto) return; const pass = "neo_id"; const encoder = new TextEncoder(); const result = encoder.encode(value.toLowerCase() + pass); try { crypto.subtle.digest("SHA-256", result).then((res) => { let cryptoResult = Array.from(new Uint8Array(res)); cryptoResult = cryptoResult .map((byte) => byte.toString(16).padStart(2, "0")) .join(""); inputResult.value = cryptoResult; const config = { expires: 1 / 48, secure: true, path: "/", }; Cookies.set("_cynur", cryptoResult, config); }); } catch (error) { console.log("error", error); return ""; } } function initUserId() { let userIdField = document.getElementById("necessidade_foco"); if (!userIdField) { userIdField = createUserIdField(); } userIdField.value = takeUserId(); } function createUserIdField() { const form = document.getElementById("conversion-form") || document.getElementById("blogForm-conversion"); if (!form) return; const userIdField = document.createElement("input"); userIdField.type = "hidden"; userIdField.id = "necessidade_foco"; userIdField.name = "necessidade_foco"; form.appendChild(userIdField); return userIdField; } function takeUserId() { const cookieName = "_neouid"; let user_Id = Cookies.get(cookieName); if (!user_Id) { user_Id = createUserId(cookieName); } return user_Id; } function createUserId(name) { const newId = "neo_" + numberRandow(9) + "." + numberRandow(10); const config = { expires: 365, secure: true, path: "/", }; Cookies.set(name, newId, config); return newId; } function numberRandow(limite) { const array = []; for (let i = 0; i < limite; i++) { array[i] = Math.floor(Math.random() * 10); } return array.join(""); } function initGetUTMS() { const utm = { utm_source: document.querySelector('input[name="utm_source"]'), utm_medium: document.querySelector('input[name="utm_medium"]'), utm_campaign: document.querySelector('input[name="utm_campaign"]'), utm_term: document.querySelector('input[name="utm_term"]'), utm_content: document.querySelector('input[name="utm_content"]'), }; let searchParamters = new URLSearchParams(window.location.search); for (const [key, value] of searchParamters.entries()) { if (utm[key]) { utm[key].value = value; } } }