{"Version":"1.0.0.0","StatusCode":200,"Message":"Requisição efetuada com suceesso.","Content":"addScript('https://code.jquery.com/jquery-3.5.1.min.js');\n\nsetTimeout(function () {\n    addScript('https://igorescobar.github.io/jQuery-Mask-Plugin/js/jquery.mask.min.js');\n}, 500);\naddScript('https://unpkg.com/axios/dist/axios.min.js');\nsetTimeout(function () {\n    var htmlLoad = '<style type=\"text/css\">' +\n        '\t\t#generation_1506220 .type input {' +\n        '\t\t\tcursor: pointer !important;' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 .type:hover {' +\n        '\t\t\tborder-color: rgba(32, 39, 97, 1);' +\n        '\t\t\ttransition: all .2s ease-in-out;' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 .type.active {' +\n        '\t\t\tborder-color: rgba(32, 39, 97, 1) !important' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 input {' +\n        '\t\t\toutline: none !important;' +\n        '\t\t\ttransition: all .4s ease-in-out;' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 input:focus {' +\n        '\t\t\tborder-color: rgb(45, 51, 100) !important;' +\n        '\t\t\tbox-shadow: 1px 5px 20px rgba(000, 000, 000, .1)' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 button:hover {' +\n        '\t\t\tbackground-color: rgb(45, 51, 100) !important;' +\n        '\t\t\tcolor: #ffffff !important;' +\n        '\t\t\ttransition: all .2s ease-in-out;' +\n        '\t\t}' +\n        '' +\n        '\t\t#generation_1506220 button:hover span {' +\n        '\t\t\tcolor: #ffffff !important;' +\n        '\t\t}' +\n        '       @media all and(max - width: 500px) {'+\n        '           h1 {'+\n        '           line - height: 2.5rem!important;'+\n        '           font - size: 2rem!important;'+\n        '           }'+\n        '       }'+\n        '\t</style>' +\n        '\t<section id=\"generation_1506220\" style=\"text-align: center;width: 100%;max-width: 700px;margin: 0 auto;\">' +\n        '\t\t<div class=\"content-first\">' +\n        '\t\t\t<header style=\"font-weight: bold;font-family: sans-serif;color:rgb(45, 51, 100);margin-bottom: 4rem\">' +\n        '\t\t\t\t<h1 style=\"font-size: 3.5rem;line-height: 7rem\">' +\n        '\t\t\t\t\t' +\n        '\t\t\t\t\t<div class=\"line\"' +\n        '\t\t\t\t\t\tstyle=\"width: 200px;background-color: #FEC171;display: block;height: 2px;margin: 0px auto\">' +\n        '\t\t\t\t\t</div>' +\n        '\t\t\t\t</h1>' +\n        '\t\t\t\t<p style=\"font-size: 1rem;margin-top: -1rem\">' +\n        '\t\t\t\t\t' +\n        '\t\t\t\t</p>' +\n        '\t\t\t</header>' +\n        '\t\t\t<div class=\"generation__form\" style=\"text-align: center\">' +\n        '\t\t\t\t<form id=\"form\">' +\n        '\t\t\t\t\t<div class=\"selects\" style=\"display: block;margin: 0 auto;text-align: center\">' +\n        '\t\t\t\t\t\t<ul' +\n        '\t\t\t\t\t\t\tstyle=\"list-style: none;display: flex;align-items: center;justify-content: center;padding: 0px;margin: 0px;flex-wrap: wrap\">' +\n        '\t\t\t\t\t\t\t<li>' +\n        '\t\t\t\t\t\t\t\t<div class=\"type\" data-type=\"residencial\"' +\n        '\t\t\t\t\t\t\t\t\tstyle=\"position: relative;border:2px solid rgba(32, 39, 97,0);margin: .5rem .5rem .5rem 0rem;box-shadow: 8px 5px 15px rgba(000,000,000,.2);border-radius: 8px;padding: .3rem 1.5rem;\">' +\n        '\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"residencial\"' +\n        '\t\t\t\t\t\t\t\t\t\tstyle=\"opacity: 0;position: absolute;top:0;width: 100%;height:100%;left: 0;\"' +\n        '\t\t\t\t\t\t\t\t\t\tvalue=\"PF\" name=\"tipoLead\">' +\n        '\t\t\t\t\t\t\t\t\t<div>' +\n        '\t\t\t\t\t\t\t\t\t\t<img src=\"https://arquivos-groner.s3.us-east-2.amazonaws.com/safeleadsfiles/tutorial/residencial_9421.svg\" style=\"height:60px;margin-top: .5rem\">' +\n        '\t\t\t\t\t\t\t\t\t\t<span' +\n        '\t\t\t\t\t\t\t\t\t\t\tstyle=\"display: block;font-weight: bold;color:rgb(45, 51, 100);font-size: 1rem;margin:.5rem;font-family: sans-serif;\">' +\n        '\t\t\t\t\t\t\t\t\t\t\tResidêncial' +\n        '\t\t\t\t\t\t\t\t\t\t</span>' +\n        '\t\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t</li>' +\n        '\t\t\t\t\t\t\t<li>' +\n        '\t\t\t\t\t\t\t\t<div class=\"type\" data-type=\"comercial\"' +\n        '\t\t\t\t\t\t\t\t\tstyle=\"position: relative;border:2px solid rgba(32, 39, 97,0);margin: .5rem;box-shadow: 8px 5px 15px rgba(000,000,000,.2);border-radius: 8px;padding: .3rem 1.5rem;\">' +\n        '\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"comercial\"' +\n        '\t\t\t\t\t\t\t\t\t\tstyle=\"opacity: 0;position: absolute;top:0;width: 100%;height:100%;left: 0;\"' +\n        '\t\t\t\t\t\t\t\t\t\tvalue=\"PJ\" name=\"tipoLead\">' +\n        '\t\t\t\t\t\t\t\t\t<div>' +\n        '\t\t\t\t\t\t\t\t\t\t<img src=\"https://arquivos-groner.s3.us-east-2.amazonaws.com/safeleadsfiles/tutorial/comercial_d48c.svg\" style=\"height:60px;margin-top: .5rem\">' +\n        '\t\t\t\t\t\t\t\t\t\t<span' +\n        '\t\t\t\t\t\t\t\t\t\t\tstyle=\"display: block;font-weight: bold;color:rgb(45, 51, 100);font-size: 1rem;margin:.5rem;font-family: sans-serif;\">' +\n        '\t\t\t\t\t\t\t\t\t\t\tComercial' +\n        '\t\t\t\t\t\t\t\t\t\t</span>' +\n        '\t\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t</li>' +\n        '\t\t\t\t\t\t\t<li>' +\n        '\t\t\t\t\t\t\t\t<div class=\"type\" data-type=\"industrial\"' +\n        '\t\t\t\t\t\t\t\t\tstyle=\"position: relative;border:2px solid rgba(32, 39, 97,0);margin: .5rem;box-shadow: 8px 5px 15px rgba(000,000,000,.2);border-radius: 8px;padding: .3rem 1.5rem;\">' +\n        '\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"industrial\"' +\n        '\t\t\t\t\t\t\t\t\t\tstyle=\"opacity: 0;position: absolute;top:0;width: 100%;height:100%;left: 0;\"' +\n        '\t\t\t\t\t\t\t\t\t\tvalue=\"PJ\" name=\"tipoLead\">' +\n        '\t\t\t\t\t\t\t\t\t<div>' +\n        '\t\t\t\t\t\t\t\t\t\t<img src=\"https://arquivos-groner.s3.us-east-2.amazonaws.com/safeleadsfiles/tutorial/industrial_68bb.svg\" style=\"height:60px;margin-top: .5rem\">' +\n        '\t\t\t\t\t\t\t\t\t\t<span' +\n        '\t\t\t\t\t\t\t\t\t\t\tstyle=\"display: block;font-weight: bold;color:rgb(45, 51, 100);font-size: 1rem;margin:.5rem;font-family: sans-serif;\">' +\n        '\t\t\t\t\t\t\t\t\t\t\tIndustrial' +\n        '\t\t\t\t\t\t\t\t\t\t</span>' +\n        '\t\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t</li>' +\n        '\t\t\t\t\t\t\t<li>' +\n        '\t\t\t\t\t\t\t\t<div class=\"type\" data-type=\"rural\"' +\n        '\t\t\t\t\t\t\t\t\tstyle=\"position: relative;border:2px solid rgba(32, 39, 97,0);margin: .5rem 0rem .5rem .5rem;box-shadow: 8px 5px 15px rgba(000,000,000,.2);border-radius: 8px;padding: .3rem 1.5rem;\">' +\n        '\t\t\t\t\t\t\t\t\t<input type=\"radio\" class=\"rural\"' +\n        '\t\t\t\t\t\t\t\t\t\tstyle=\"opacity: 0;position: absolute;top:0;width: 100%;height:100%;left: 0;\"' +\n        '\t\t\t\t\t\t\t\t\t\tvalue=\"PJ\" name=\"tipoLead\">' +\n        '\t\t\t\t\t\t\t\t\t<div>' +\n        '\t\t\t\t\t\t\t\t\t\t<img src=\"https://arquivos-groner.s3.us-east-2.amazonaws.com/safeleadsfiles/tutorial/rural_896a.svg\" style=\"height:60px;margin-top: .5rem\">' +\n        '\t\t\t\t\t\t\t\t\t\t<span' +\n        '\t\t\t\t\t\t\t\t\t\t\tstyle=\"display: block;font-weight: bold;color:rgb(45, 51, 100);font-size: 1rem;margin:.5rem;font-family: sans-serif;\">' +\n        '\t\t\t\t\t\t\t\t\t\t\tRural' +\n        '\t\t\t\t\t\t\t\t\t\t</span>' +\n        '\t\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t\t</li>' +\n        '\t\t\t\t\t\t</ul>' +\n        '\t\t\t\t\t</div>' +\n        '\t\t\t\t\t<div class=\"content-input\"' +\n        '\t\t\t\t\t\tstyle=\"display: flex;justify-content: space-between;flex-wrap: wrap;width: 88%;margin: 0 auto;margin-top: 1.5rem;\">' +\n        '\t\t\t\t\t\t<div style=\"width: 48%;margin-top: 1rem\">' +\n        '\t\t\t\t\t\t\t<input class=\"custom\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width:90%;border-radius: 12px;padding: .8rem;font-size: 1rem\"' +\n        '\t\t\t\t\t\t\t\tname=\"nome\" required=\"Nome Obrigatorio\" placeholder=\"Seu nome*\" type=\"text\"></input>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<div style=\"width: 48%;margin-top: 1rem\">' +\n        '\t\t\t\t\t\t\t<input class=\"custom\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width:90%;border-radius: 12px;padding: .8rem;font-size: 1rem\"' +\n        '\t\t\t\t\t\t\t\tname=\"celular\" required=\"Telefone Obrigatorio\" placeholder=\"Seu telefone*\"' +\n        '\t\t\t\t\t\t\t\ttype=\"text\"></input>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<div style=\"width: 95%;margin-top: 1rem;margin-left: 1rem;\">' +\n        '\t\t\t\t\t\t\t<input class=\"custom\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width:100%;border-radius: 12px;padding: .8rem;font-size: 1rem\"' +\n        '\t\t\t\t\t\t\t\tname=\"email\" required=\"E-mail Obrigatorio\" placeholder=\"Seu e-mail*\"' +\n        '\t\t\t\t\t\t\t\ttype=\"text\"></input>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<!-- ================ Endereço ======================= -->' +\n        '' +\n        '\t\t\t\t\t\t<div style=\"width: 48%;margin-top: 1rem\">' +\n        '\t\t\t\t\t\t\t<input class=\"custom\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width:90%;border-radius: 12px;padding: .8rem;font-size: 1rem\"' +\n        '\t\t\t\t\t\t\t\tname=\"endereco_cidade\" required=\"Cidade Obrigatorio\" id=\"cidade\" placeholder=\"Cidade*\"' +\n        '\t\t\t\t\t\t\t\ttype=\"text\"></input>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<div style=\"width: 48%;margin-top: 1rem\">' +\n        '\t\t\t\t\t\t\t<input class=\"custom\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width:90%;border-radius: 12px;padding: .8rem;font-size: 1rem\"' +\n        '\t\t\t\t\t\t\t\tname=\"endereco_uf\" required=\"UF Obrigatorio\" id=\"uf\" placeholder=\"UF*\"' +\n        '\t\t\t\t\t\t\t\ttype=\"text\"></input>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<!-- Consumo -->' +\n        '\t\t\t\t\t\t<hr style=\"width: 100%;margin-top: 1.5rem;opacity: .2\" />' +\n        '\t\t\t\t\t\t<div style=\"width: 100%;margin-top: 1rem\">' +\n        '\t\t\t\t\t\t\t<input type=\"text\" name=\"kwh\" placeholder=\"Consumo kWh*\" value=\"\"' +\n        '\t\t\t\t\t\t\t\trequired=\"Consumo é Obrigatorio\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-color: rgba(000,000,000,.1);width: 95%;border-radius: 12px;padding: .8rem;font-size: 1rem\">' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t\t<div style=\"text-align: center;width: 100%;margin: 2rem 0px\">' +\n        '\t\t\t\t\t\t\t<button type=\"submit\"' +\n        '\t\t\t\t\t\t\t\tstyle=\"border-radius: 10px;cursor:pointer;border: 2px solid rgb(45, 51, 100);color:rgb(45, 51, 100);font-size: 1rem;font-weight: bold;padding: .7rem;width: 200px;background-color: transparent;margin: 0 auto;display: block;\">' +\n        '\t\t\t\t\t\t\t\t<span style=\"color:rgb(45, 51, 100)\">' +\n        '\t\t\t\t\t\t\t\t\tRealizar Simulação' +\n        '\t\t\t\t\t\t\t\t</span>' +\n        '\t\t\t\t\t\t\t</button>' +\n        '\t\t\t\t\t\t</div>' +\n        '\t\t\t\t\t</div>' +\n        '\t\t\t\t</form>' +\n        '\t\t\t</div>' +\n        '\t\t</div>' +\n        '\t\t<div class=\"content-success\" style=\"display: none\">' +\n        '\t\t\t<h1 style=\"font-size: 2.5rem;line-height: 7rem;color:#30B08F;font-family: sans-serif;\">' +\n        '\t\t\t\tSimulação enviada com sucesso!' +\n        '\t\t\t</h1>' +\n        '\t\t\t<span id=\"back\"' +\n        '\t\t\t\tstyle=\"cursor: pointer;font-family: sans-serif;margin-top: -1rem;display: block;font-size: 1.23rem\">' +\n        '\t\t\t\tVoltar para simulação' +\n        '\t\t\t</span>' +\n        '\t\t</div>';\n\n    if (!$) {\n        $ = jQuery;\n    }\n    $('#form-safe').html(htmlLoad);\n\n    var frm = $('#generation_1506220 #form');\n    $('#back').on('click', function (e) {\n        $('#generation_1506220 .content-first').fadeIn(),\n            $('#generation_1506220 .content-success').fadeOut();\n\n        $('#generation_1506220 input[name=nome]').val(\"\")\n        $('#generation_1506220 input[name=celular]').val(\"\")\n        $('#generation_1506220 input[name=email]').val(\"\")\n        $('#generation_1506220 input[name=tipoLead]').val(\"\")\n        $('#generation_1506220 input[name=kwh]').val(\"\")\n        $(\"#generation_1506220 #tipoEstrutura option\").text(\"\")\n        $('#generation_1506220 input[name=endereco_cep]').val()\n        $('#generation_1506220 input[name=endereco_logradouro]').val(\"\")\n        $('#generation_1506220 input[name=endereco_bairro]').val(\"\")\n        $('#generation_1506220 input[name=endereco_cidade]').val(\"\")\n        $('#generation_1506220 input[name=endereco_numero]').val(\"\")\n        $('#generation_1506220 input[name=endereco_uf]').val(\"\")\n    })\n\n\n    frm.submit(function (e) {\n        e.preventDefault();\n\n        let obj = {\n            nome: $('#generation_1506220 input[name=nome]').val(),\n            celular: $('#generation_1506220 input[name=celular]').val(),\n            email: $('#generation_1506220 input[name=email]').val(),\n            tipoLead: $('#generation_1506220 input[name=tipoLead]:checked').val(),\n            kwh: $('#generation_1506220 input[name=kwh]').val(),\n            //Endereço\n            endereco: {\n                CEP: $('#generation_1506220 input[name=endereco_cep]').val(),\n                logradouro: $('#generation_1506220 input[name=endereco_logradouro]').val(),\n                bairro: $('#generation_1506220 input[name=endereco_bairro]').val(),\n                cidade: $('#generation_1506220 input[name=endereco_cidade]').val(),\n                numero: $('#generation_1506220 input[name=endereco_numero]').val(),\n                UF: $('#generation_1506220 input[name=endereco_uf]').val(),\n            }\n        }\n\n        axios.post('https://solaresenergiasolar.api.safeleads.app/api/Simulador/Externo?configId=32', obj)\n            .then(function (response) {\n                $('#generation_1506220 .content-first').fadeOut(),\n                    $('#generation_1506220 .content-success').fadeIn();\n\n                setTimeout(() => {\n                    var urlRedirect = '';\n                    if (urlRedirect) {\n                        window.location.replace(urlRedirect);\n                    }\n                }, 3000);\n            })\n            .catch(function (error) {\n                console.log(error);\n            });\n\n    });\n\n    let type = $('.type');\n    type.hover(function (e) {\n        $(this).css({ 'border-color': 'rgba(32, 39, 97,1)' })\n    }, function (e) {\n        $(this).css({ 'border-color': 'rgba(32, 39, 97,0)' })\n    })\n\n    type.on('click', function (e) {\n        type.removeClass('active');\n        $(this).addClass('active')\n    })\n\n\n    //Mascaras\n    $(\"#cep\").mask(\"99.999-999\");\n\n    $(\"#cep\").on('blur', function () {\n        // Remove tudo o que não é número para fazer a pesquisa\n        var cep = this.value.replace(/[^0-9]/g, \"\");\n        // Validação do CEP; caso o CEP não possua 8 números, então cancela\n        // a consulta\n        if (cep.length !== 8) {\n            return false;\n        }\n\n        // A url de pesquisa consiste no endereço do webservice + o cep que\n        // o usuário informou + o tipo de retorno desejado (entre \"json\",\n        // \"jsonp\", \"xml\", \"piped\" ou \"querty\")\n        var url = \"https://opencep.com/v1/\" + cep + \".json\";\n\n        // Faz a pesquisa do CEP, tratando o retorno com try/catch para que\n        // caso ocorra algum erro (o cep pode não existir, por exemplo) a\n        // usabilidade não seja afetada, assim o usuário pode continuar//\n        // preenchendo os campos normalmente\n        $.getJSON(url, function (dadosRetorno) {\n            try {\n                // Preenche os campos de acordo com o retorno da pesquisa\n                $(\"#logradouro\").val(dadosRetorno.logradouro);\n                $(\"#bairro\").val(dadosRetorno.bairro);\n                $(\"#cidade\").val(dadosRetorno.localidade);\n                $(\"#uf\").val(dadosRetorno.uf);\n            } catch (ex) {\n                //Mensagem de Erro\n            }\n\n        });\n\n    });\n\n}, 1000);\nfunction addScript(src) {\n    if (!isLoadedScript(src)) {\n        var s = document.createElement('script');\n        s.setAttribute('src', src);\n        document.body.appendChild(s);\n    }\n}\n\nfunction isLoadedScript(src) {\n    return document.querySelectorAll('[src=\"' + src + '\"]').length > 0;\n}"}