if (!window.componentMetaData) { window.componentMetaData = {}; } window.componentMetaData["7406dab1-5e28-4534-bcb5-ab530a971368"] = {}; window.componentMetaData["7406dab1-5e28-4534-bcb5-ab530a971368"].nodeId = 248; window.componentMetaData["7406dab1-5e28-4534-bcb5-ab530a971368"].componentId = 207; window.componentMetaData["7406dab1-5e28-4534-bcb5-ab530a971368"].embebed = true; window.componentMetaData["7406dab1-5e28-4534-bcb5-ab530a971368"].campaignId = 81; window['uioc7406dab1-5e28-4534-bcb5-ab530a971368'] = true; var elem = document.createElement('div'); elem.classList.add('wrapper'); elem.classList.add('NzQwNmRhYjEtNWUyOC00NTM0LWJjYjUtYWI1MzBhOTcxMzY4'); elem.style.cssText = "display: flex;flex-flow: row wrap;justify-content: center;align-content: center;align-items:center;width:100%;"; elem.innerHTML = `

🤬📲 ¿En qué medida creés que las peleas por chat o redes sociales despiertan furia? ¿Cómo creés que podríamos manejarlo?

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/207/1"]'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.campaign-81'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.modulo-207'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } } } } else { document.querySelector('script.campaign-81').parentNode.appendChild(elem); } window['7406dab1-5e28-4534-bcb5-ab530a971368_rlei'] = setInterval(() => { if (window.rleParticipation) { clearInterval(window['7406dab1-5e28-4534-bcb5-ab530a971368_rlei']); window.rleParticipation.logEvent('showNode', "{}", 248); } }, 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 === "success207") { document.querySelector('form').innerHTML = '

Recibimos tu respuesta.

¡Gracias por participar!

' } });