if (!window.componentMetaData) { window.componentMetaData = {}; } window.componentMetaData["a4e391fc-483a-4e78-945b-e406f2849129"] = {}; window.componentMetaData["a4e391fc-483a-4e78-945b-e406f2849129"].nodeId = 201; window.componentMetaData["a4e391fc-483a-4e78-945b-e406f2849129"].componentId = 184; window.componentMetaData["a4e391fc-483a-4e78-945b-e406f2849129"].embebed = true; window.componentMetaData["a4e391fc-483a-4e78-945b-e406f2849129"].campaignId = 57; window['uioca4e391fc-483a-4e78-945b-e406f2849129'] = true; var elem = document.createElement('div'); elem.classList.add('wrapper'); elem.classList.add('YTRlMzkxZmMtNDgzYS00ZTc4LTk0NWItZTQwNmYyODQ5MTI5'); elem.style.cssText = "display: flex;flex-flow: row wrap;justify-content: center;align-content: center;align-items:center;width:100%;"; elem.innerHTML = `

¿Qué actitud machista dejó de tener tu pareja/amigo/padre/hermano....? 🤔

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/184/1"]'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.campaign-57'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } else { tempDiv = document.querySelector('script.modulo-184'); if (tempDiv) { tempDiv.parentNode.appendChild(elem); } } } } else { document.querySelector('script.campaign-57').parentNode.appendChild(elem); } window['a4e391fc-483a-4e78-945b-e406f2849129_rlei'] = setInterval(() => { if (window.rleParticipation) { clearInterval(window['a4e391fc-483a-4e78-945b-e406f2849129_rlei']); window.rleParticipation.logEvent('showNode', "{}", 201); } }, 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 === "success184") { document.querySelector('form').innerHTML = '

Recibimos tu respuesta.

¡Gracias por participar!

' } });