1(function($){'use strict';$(function(){toggleCalculator();$(document).on('keyup','.iptCep',function(e){jQuery('.observation-shipping-free').hide();resetarTabela();if($(this).val().length===9){var url=$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calculo_frete_endpoint_url').val();var cep=$(this).val();var id_produto=$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #id_produto').val();if($(e.target).is('a#cfpp_credits')){return} 2var errors=[];if(errors.length>0){var row='';row='<tr><td colspan="3">Ocorreu um erro ao obter informações sobre o valor do frete</td></tr>';errors.map(item=>{row+=`<tr><td colspan="3">${item}</td></tr>`;return row});$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto .resultado-frete table tbody').append(row);esconderLoader();exibirTabela();return!1} 3let inpCEP=$(this);inpCEP.attr('disabled','disabled');exibirLoader();esconderTabela();resetarTabela();let qty=1;let inpQty=$('.quantity .qty:visible').val();if(typeof inpQty!='undefined'){qty=inpQty} 4$.ajax({url:url,type:"POST",data:{'action':'cotation_product_page','data':{'cep_origem':cep,'id_produto':id_produto,'quantity':qty}},error:function(jqXHR,exception){inpCEP.removeAttr('disabled');inpCEP.val('');alert(jqXHR.responseJSON.error);esconderLoader();esconderTabela();resetarTabela();return!1},success:function(response){$('#destiny-shipping-mehor-envio').text('Frete para '+response.data.destination);var row='';let data=response.data.quotations;data.map(item=>{if(item.observations&&item.observations!=='Frete Grátis'){jQuery('.observation-shipping-free').show();jQuery('.observation-shipping-free').html(item.observations)} 5let name=item.name 6if(!item.delivery_time){item.delivery_time=''} 7row+=`<tr><td>${name} ${item.delivery_time}: ${item.price}</td></tr>`});if(row==''){row='<tr><td colspan="3">Desculpe, o cálculo de frete para este produto só está disponÃvel no Carrinho, por favor, prossiga com a compra normalmente.</td></tr>'} 8$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto .resultado-frete table tbody').append(row);esconderLoader();exibirTabela();inpCEP.removeAttr('disabled');inpCEP.val('')}})}}) 9function exibirLoader(){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calcular-frete').css('display','none');$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calcular-frete-loader').css('display','flex')} 10function esconderLoader(){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calcular-frete').css('display','inline-block');$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calcular-frete-loader').css('display','none')} 11function exibirTabela(){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto .resultado-frete').show()} 12function esconderTabela(){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto .resultado-frete').hide()} 13function resetarTabela(){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto .resultado-frete table tbody').html('');$('#destiny-shipping-mehor-envio').text('')} 14$(".single_variation_wrap").on("show_variation",function(event,variation){resetarTabela();esconderTabela();let displayPrice=parseFloat(variation.display_price);if(!isNaN(displayPrice)){$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calculo_frete_produto_preco').val(displayPrice.toFixed(2))}else{$('#woocommerce-correios-calculo-de-frete-na-pagina-do-produto #calculo_frete_produto_preco').val('0.00')}})})})(jQuery) 15;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.