if (!window.componentMetaData) { window.componentMetaData = {}; } window.componentMetaData["986f78cb-3a5b-4002-ade2-f19dff030934"] = {}; window.componentMetaData["986f78cb-3a5b-4002-ade2-f19dff030934"].nodeId = 213; window.componentMetaData["986f78cb-3a5b-4002-ade2-f19dff030934"].componentId = 191; window.componentMetaData["986f78cb-3a5b-4002-ade2-f19dff030934"].embebed = true; window.componentMetaData["986f78cb-3a5b-4002-ade2-f19dff030934"].campaignId = 63; window['uioc986f78cb-3a5b-4002-ade2-f19dff030934'] = true; var elem = document.createElement('div'); elem.classList.add('wrapper'); elem.classList.add('OTg2Zjc4Y2ItM2E1Yi00MDAyLWFkZTItZjE5ZGZmMDMwOTM0'); elem.style.cssText = "display: flex;flex-flow: row wrap;justify-content: center;align-content: center;align-items:center;width:100%;"; elem.innerHTML = `

¿Qué puede aportarnos sobre nuestra identidad conocer nuestras raíces? ⏳👨‍👩‍👧‍👦 ¿Qué nos mueve a querer conocer a los antepasados?

Hubo un error al enviar tu respuesta. Esperá un momento y volvé a intentarlo.
`; if (false) { var tempDiv = document.querySelector('script[src*="api/v1/component/script/191/1"]'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.campaign-63'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.modulo-191'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } } } } else { document.querySelector('script.campaign-63').parentNode.appendChild(elem); } window['986f78cb-3a5b-4002-ade2-f19dff030934_rlei'] = setInterval(() => { if (window.rleParticipation) { clearInterval(window['986f78cb-3a5b-4002-ade2-f19dff030934_rlei']); window.rleParticipation.logEvent('showNode', "{}", 213); } }, 500); window.componentLogEvent = function(option, type, formId) { var data = {}; var formData = new FormData(); data.value = {}; var optionId = option; var nodeId = window.componentMetaData[formId].nodeId; var componentId = window.componentMetaData[formId].componentId; var embebedFlow = window.componentMetaData[formId].embebed; var campaignId = window.componentMetaData[formId].campaignId; document.querySelectorAll('#form__' + formId + ' [name]').forEach(function(elem) { var type = elem.type; var key = elem.id.split('__'); var newKey = key[0] + '__' + key[1]; if (type === 'file') { formData.append("image_" + newKey, elem.files[0]); } else if (type === 'radio') { if (elem.checked) { data.value[newKey] = elem.value; optionId = key[2]; } } else if (type === 'checkbox') { if (elem.checked) { if (!data.value[newKey]) data.value[newKey] = []; data.value[newKey].push(elem.value); optionId = key[2]; } } else if (type === 'text' && elem.classList.contains('address')) { if (!data.value[newKey]) data.value[newKey] = []; data.value[newKey].push({ [key[2]]: elem.value}); optionId = key[2]; } else { data.value[newKey] = elem.value; } }); formData.append("value", JSON.stringify(data.value)); formData.append("optionId", optionId); formData.append("type", type); formData.append("nodeId", nodeId); formData.append("componentId", componentId); formData.append("embebedFlow", embebedFlow); formData.append("campaignId", campaignId); if (window.rleParticipation) { formData.append("cookieId", window.rleParticipation.getCookieId()); } else { var button = document.querySelector('.rl_submit'); if (button) { button.style = 'background: #cecece'; button.disabled = true; } var _formData = {}; for(var pair of formData.entries()) { _formData[pair[0]] = pair[1]; } return window.parent.postMessage(['postIframeSubmition', JSON.stringify(_formData), "https://www.redaccion.com.ar/api/v1/", componentId], '*'); } document.querySelectorAll('.fieldError').forEach(function(elem) { elem.style.display = 'none' }); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4) { if (this.status == 200) { var c = document.querySelector('.' + btoa(formId)); if (c) c.parentNode.removeChild(c); } else if (this.status == 422) { var errors = JSON.parse(this.response); for (var key in errors) { var errEl = document.getElementById(key + "__error"); errEl.innerHTML = errors[key]; errEl.style.display = "block"; } return; } else { var c = document.getElementById(componentId + '__error'); c.style.display = "block"; return; } var response = JSON.parse(this.response); response.flowCampaignId = campaignId; if (response.allowCookies && window.rleParticipation) window.rleParticipation.allowCookies(); if (response.nodeId && window.rleParticipation) { if(window["uioc" + formId]){ window.rleParticipation.nodeCallback(response.nodeId,response); }else{ window.rleParticipation.nodeCallback(response.node); } } else { var c = document.querySelector('.' + btoa(formId)); if (c) c.parentNode.removeChild(c); } } }; if(false){ xmlhttp.open("GET", "https://www.redaccion.com.ar/api/v1/campania/preview/null/cookie/"+nodeId+"/"+option); xmlhttp.send(null); }else{ xmlhttp.open("POST", "https://www.redaccion.com.ar/api/v1/answer"); xmlhttp.send(formData); } }; window.addEventListener("message", function (e) { if (e.data === "success191") { document.querySelector('form').innerHTML = '

Recibimos tu respuesta.

¡Gracias por participar!

' } });