!function ($) { "use strict"; let chatbotContainerContent = '' + '
' + '
' + 'Asistente\u0020virtual\u0020para\u0020personas\u0020cuidadoras\u0020no\u0020profesionales' + '' + '
' + '' + '
'; var chatbotContainer = document.getElementById("fptChatBot"); chatbotContainer.classList.add("floating-chat"); chatbotContainer.style.background = "#ED7004"; chatbotContainer.innerHTML = chatbotContainerContent; var App = function () { } App.prototype.init = function () { function LoadCssFile(cssPath) { var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = cssPath; var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h); } var cb = function() { LoadCssFile('https\u003A\/\/chatbot.peretarres.org/legacy/css/chatbot-embed.css'); }; var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; if (raf) raf(cb); else window.addEventListener("load", cb); var chatbotTitle = document.getElementById("cbTitle"); chatbotTitle.style.color = "#FFFFFF"; setTimeout(function() { chatbotContainer.classList.add("enter"); }, 1000); chatbotContainer.addEventListener("click", openElement); var chat = document.getElementById("cbChat"); var headerButton = document.getElementById("cbHeaderButton"); function openElement() { chatbotContainer.classList.add("expand"); chat.classList.add("enter"); headerButton.addEventListener("click", closeElement); } function closeElement() { chat.visibility = "hidden"; setTimeout(function() { chatbotContainer.classList.remove("expand"); chat.classList.remove("enter"); chat.visibility = "visible"; }, 500); } } $.App = new App, $.App.Constructor = App; }(window.jQuery), function ($) { "use strict"; $.App.init(); }(window.jQuery);