1/** 2 * Avanti Comunicação <[email protected]> 3 * martinsfontespaulista 4 * @date Wed Sep 02 2026 15:34:06 GMT-0300 (GMT-03:00) 5 */ 6 7function processOrderFormOffering(e){var a,i;e&&(a=[],e.items.map(function(e,i){var n=e.offerings.find(function(e){return e.name.includes("Embalagem presente")}),t=e.bundleItems.find(function(e){return e.name.includes("Embalagem presente")}),r={id:"",buttonContent:"",bundleData:null!=t&&t.attachments.length?t.attachments[0]:{content:{text:""}}};null!=n&&(r.id=n.id,r.buttonContent=giftCardActionButton(e.id,i,null!=t?"selected":"")),a[i]=r}),i=setInterval(function(){$("tr.product-item").length==e.items.length&&($(".embalagem-presente-wrapper").remove(),$("tr.product-item").each(function(e,i){var n;0<$(this).find("a.add-service").length?$(this).find(".add-service-container").before(a[e].buttonContent):$(this).find(".product-name").append(a[e].buttonContent),giftCardActionButtonEvents($(this),$(this).data("sku")+"-"+e),$(this).next("tr.item-service").length&&($('giftcard__content[data-identifier="'+$(this).data("sku")+"-"+e+'"]').remove(),n=createGiftCardContainer($(this).data("sku")+"-"+e,a[e].bundleData),$(this).next("tr.item-service").find(".bundle-item-name").append(n),validateGiftCardMessage(),giftCardSubmitHandle($(this).data("sku")+"-"+e,a[e].id,e))}),clearInterval(i))},100))}function giftCardActionButton(e,i,n){e=e+"-"+i;return'<div class="embalagem-presente-wrapper" id="fieldset-embalagem-presente-'+e+'">\n <img class="embalagem-presente-img" src="/arquivos/icon-embalagem-de-presente-checkout.png">\n <label class="embalagem-presente-label-'+e+'" for="embalagem-presente-'+e+'" >\n <input type="checkbox" class="embalagem-presente-checkbox '+n+'" name="embalagem-presente-'+e+'">\n Adicionar Embalagem de Presente: Grátis\n </label>\n </div>'}function giftCardActionButtonEvents(e,i){e.on("click",".embalagem-presente-label-"+i,function(){var e=$
7(this).find("input");(e.hasClass("selected")?e.removeClass("selected").parents("tr.product-item").next("tr.item-service").find(".item-link-remove"):e.addClass("selected").parents(".product-name").find("a.add-service")).trigger("click")})}function createGiftCardContainer(e,i){i=i.content.text.split(" - "),i=3===i.length?i:[];return'<div class="giftcard__content '+(i.length?"hidden":"")+'" data-identifier="'+e+'">\n <div class="giftcard__wrapper">\n <input class="giftcard__input giftcard__de" type="text" placeholder="De" maxlength="40" />\n <input class="giftcard__input giftcard__para" type="text" placeholder="Para" maxlength="40" />\n </div>\n <div class="giftcard__wrapper-message">\n <textarea class="giftcard__textarea giftcard__mensagem" placeholder="Escreva uma mensagem de até 150 caracteres" maxlength="150" />\n <input class="button__add" type="submit" value="Adicionar">\n </div>\n </div>\n <div class="giftcard__container-response '+(i.length?"":"hidden")+'" data-identifier="'+e+'">\n <div class="giftcard_response-de"><strong>De: </strong>'+(i.length?i[0].replace("De: ",""):"")+'</div>\n <div class="giftcard_response-para"><strong>Para: </strong>'+(i.length?i[1].replace("Para: ",""):"")+'</div>\n <div class="giftcard_response-mensagem"><strong>Mensagem: </strong>'+(i.length?i[2].replace("Mensagem: ",""):"")+"</div>\n </div>\n "}function validateGiftCardMessage(){$(document).on("keypress",".giftcard__textarea, .giftcard__input",function(e){var i=e.key;/\W|_/.test(i)&&";"!=i&&"."!=i&&" "!=i&&","!=i&&e.preventDefault()}),$(document).on("paste",".giftcard__textarea, .giftcard__input ",function(e){e.preventDefault();var e=(e.originalEvent.clipboardData||window.clipboardData).getData("text"),i=/[^\w\s]/gi,e=(1==i.test(e)&&alert("O texto colado possui caracteres especiais que não são permitidos. Tente um texto sem caracteres especiais."),e.replace(i,""));$(this).val(e)}),$(".giftcard__textarea").on("paste",function(e){var i=$(this);setTimeout(function(){150<i.val().length&&0===$(".alert-caracter").length&&($('<span class="alert-caracter">A mensagem não pode ter mais de 150 caracteres!</span>').insertAfter(".giftcard__wrapper-message"),i.addClass("giftcard__textarea-error"),$(".button__add").prop("disabled",!0))},0)}
7),$(".giftcard__textarea").on("input",function(){var e=$(this);e.val().length<=150?($(".alert-caracter").remove(),e.removeClass("giftcard__textarea-error"),$(".button__add").prop("disabled",!1)):0===$(".alert-caracter").length&&($('<span class="alert-caracter">A mensagem não pode ter mais de 150 caracteres!</span>').insertAfter(".giftcard__wrapper-message"),e.addClass("giftcard__textarea-error"),$(".button__add").prop("disabled",!0))})}function giftCardSubmitHandle(e,t,r){$('.giftcard__content[data-identifier="'+e+'"] .button__add').on("click",function(){var e=$(this).parents(".giftcard__content"),i=e.find(".giftcard__de").val(),n=e.find(".giftcard__para").val(),e=e.find(".giftcard__mensagem").val().replace("-","");vtexjs.checkout.addBundleItemAttachment(r,t,"message",{text:"De: "+i+" - Para: "+n+" - Mensagem: "+e},null,!1)})}function observeShippingPreviewContainer(){var e=document.querySelector("#shipping-preview-container");function i(){var e,i,n,t,r,a="#shipping-preview-container, #shipping-preview-container .srp-result";$(".srp-toggle__wrapper .blue").hasClass("srp-toggle__pickup")?($(a).addClass("pickup"),$(a).removeClass("delivery"),n=$("#shipping-preview-container .srp-address-title").text(),t=vtexjs.checkout.orderForm.shippingData.pickupPoints.find(function(e){return e.friendlyName==n}),r=$("#shipping-preview-container #deliver-at-text .srp-address-title"),t&&(i=t.address,e=t.id,t=t.friendlyName,i=i.street+" "+i.number+"<br />"+i.neighborhood+" - "+i.city+" - "+i.state,0==$("#"+e,r).length)&&r.html('<span class="friendlyName">'+t+'</span><div id="'+e+'" class="address">'+i+"</div>"),0==$(".change",r).length&&r.append('<span class="change" tabindex="-1">QUERO TROCAR DE LOJA</span>')):($(a).addClass("delivery"),$(a).removeClass("pickup"))}e?(new MutationObserver(i).observe(e,{childList:!0,subtree:!0}),i()):setTimeout(observeShippingPreviewContainer,50)}$(document).ready(function(){setInterval(function(){0<$("tr.CustomTax").length&&($(".shp-option-text-price.vtex-omnishipping-1-x-optionPrice").html(""),$("tr.CustomTax td.info").each(function(){"TAX"===$(this).html()&&$(this).html("Tax")}),$("tr.CustomTax td.info").each(function(){"INSURANCE"===$(this).html()&&$(this).html("Insurance")}),$("tr.CustomTax td.info").each(function(){"COURIER SERVICE"===$(this).html()&&$(this).html("Courier")}),$,$(".srp-summary-result").hide(),$(".CustomTax--total").hide())},1e3),setInterval(function(){var e;0<$("tr.CustomTax").length&&($(".shipping-option-info.shipping-option-info span").html(""),$($(".srp-summary-result")[0]).hide(),$("tr.CustomTax td.info").each(function(){"TAX"===$(this).html()&&$(this).html("Tax")}),$("tr.CustomTax td.info").each(function(){"INSURANCE"===$(this).html()&&$(this).html("Insurance")}),$("tr.CustomTax td.info").each(function(){"COURIER SERVICE"===$(this).html()&&$(this).html("Courier")}),(e=document.querySelector("#sla-option-Envio\\ Internacional"))&&(e.innerHTML=e.text.replace(" - Grátis","")),$("#shipping-preview-container > div > div > div.srp-result.lh-copy > div.srp-delivery-select-container.br2.bw1.relative.bg-white.ba.b--light-gray.hover-b--silver.h-100 > div > div > div.srp-delivery-current-many__description.flex.items-center.flex-auto.tl > div.srp-delivery-current-many__price.flex-none.gray.pl4.tc.bl\\}").hide(),$(".CustomTax--total").hide())},1e3),observeShippingPreviewContainer(),createPurchasingPolicy(),handleModalDeliveryPolicy()}),addEventListener("hashchange",function(e){vtexjs.checkout.getOrderForm().then(function(e){handleIternationalZipCode(e)})}),$(window).on("orderFormUpdated.vtex",function(e,i){processOrderFormOffering(i),handleIternationalZipCode(i)});var zipCodeList=[{zipCodeInitial:"23800000",zipCodeEnd:"28999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"90000000",zipCodeEnd:"99999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"88000000",zipCodeEnd:"89999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"06000000",zipCodeEnd:"19999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"80000000",zipCodeEnd:"87999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"29000000",zipCodeEnd:"29999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"32000000",zipCodeEnd:"39999999",freeShippingValue:17990,pricePromoShipping:499},{zipCodeInitial:"01000000",zipCodeEnd:"05999999",freeShippingValue:13990,pricePromoShipping:499},{zipCodeInitial:"08000000",zipCodeEnd:"08499999",freeShippingValue:13990,pricePromoShipping:499},{zipCodeInitial:"20000000",zipCodeEnd:"23799999",freeShippingValue:13990,pricePromoShipping:499},{zipCodeInitial:"30000000",zipCodeEnd:"31999999",freeShippingValue:13990,pricePromoShipping:499}
7,{zipCodeInitial:"69900000",zipCodeEnd:"69999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"57000000",zipCodeEnd:"57999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"68900000",zipCodeEnd:"68999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"69000000",zipCodeEnd:"69899999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"40000000",zipCodeEnd:"48999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"60000000",zipCodeEnd:"63999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"70000000",zipCodeEnd:"73699999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"72800000",zipCodeEnd:"76799999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"65000000",zipCodeEnd:"65999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"78000000",zipCodeEnd:"78899999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"79000000",zipCodeEnd:"79999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"66000000",zipCodeEnd:"68899999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"58000000",zipCodeEnd:"58999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"50000000",zipCodeEnd:"56999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"64000000",zipCodeEnd:"64999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"5900000",zipCodeEnd:"59999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"78900000",zipCodeEnd:"78999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"69300000",zipCodeEnd:"69389999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"49000000",zipCodeEnd:"49999999",freeShippingValue:22990,pricePromoShipping:999},{zipCodeInitial:"77000000",zipCodeEnd:"77995999",freeShippingValue:22990,pricePromoShipping:999}];function numberToReal(e){return(e=e.toFixed(2).split("."))[0]="R$ "+e[0].split(/(?=(?:...)*$)/).join("."),e.join(",")}function barraFrete(i){var n,t,r,a,o,s,l,e;$(".free-shipping").length<=0&&($(".cart-totalizers.pull-right").append('<div class="free-shipping"><div class="free-shipping-content contentShippng"><p class="free-shipping__text">Faltam <span class="free-shipping__value">R$ 0</span> para <strong>frete grátis</strong></p><div class="free-shipping-bar-content"><span class="free-shipping__bar"></span><span class="free-shipping__barActive"></span></div></div></div>'),$(".free-shipping").last().remove()),null!==i.shippingData&&(e=null!==i.shippingData.address&&"BRA"==i.shippingData.address.country&&"pickup-in-point"!=i.shippingData.logisticsInfo[0].selectedDeliveryChannel,null!==i.shippingData.address&&e?(s=i.shippingData.address.postalCode,zipCodeList.forEach(function(e){s>=e.zipCodeInitial&&s<=e.zipCodeEnd&&(n=e.freeShippingValue/100,t=e.pricePromoShipping/100),r=$(".free-shipping"),r.find(".frete-bar .frete-bar-progress"),r=r.find(".free-shipping__text"),l="Discounts"==i.totalizers[1].id?(l=-1*i.totalizers[1].value,i.totalizers[0].value-l):i.totalizers[0].value,a=n-l/100,o=100*l/n/100,parseFloat(a)<=0?r.html('<div class="frase"><p>Você ganhou <strong>frete promocional</strong> de R$ '+t+'.</p></div> <div class="frete-bar"><div class="frete-bar-progress" style="width: '+Math.round(o)+'%;"></div></div>'):r.html('<div class="frase"><p>Compre + '+numberToReal(a)+" para <strong>frete promocional</strong> de <strong>R$ "+t+'</strong></p></div> <div class="frete-bar"><div class="frete-bar-progress" style="width: '+Math.round(o)+'%;"></div></div>'),$(".free-shipping").show()})):e?$(".free-shipping__text").text("Adicione o cep para cálculo de frete"):$(".free-shipping").hide())}function handleIternationalZipCode(e){var e=e.shippingData&&e.shippingData.address&&e.shippingData.address.country&&"BRA"===e.shippingData.address.country,i=$(".srp-toggle__pickup"),n=$("#shipping-option-pickup-in-point"),t=$(".shipping-method-wrapper"),r="active";e?(i.addClass(r),n.addClass(r),t.removeClass("custom")):(i.removeClass(r),n.removeClass(r),t.addClass("custom")),hidePaypalPaymentMethod(e)}function hidePaypalPaymentMethod(e){new URL(window.location.href).hash}
7function createPurchasingPolicy(){var e=$(".clearfix");$(e).prepend('<div class="purchasing-policy-container">\n <div class="purchasing-policy-container__content">\n <span class="purchasing-policy-container__content__text"> <img src="/arquivos/policy-icon.svg"/> Para saber sobre a nossa polÃtica de compra\n <span class="purchasing-policy-container__content__button-open-modal">clique aqui.</span></span>\n </div>\n <div class="purchasing-policy-container__modal-delivery-policy isHidden">\n <div class="purchasing-policy-container__modal-delivery-policy__content">\n <div class="purchasing-policy-container__modal-delivery-policy__content__top">\n <img class="purchasing-policy-container__modal-delivery-policy__content__top__close" src="/arquivos/policy-modal-close.png"/>\n </div>\n <div class="purchasing-policy-container__modal-delivery-policy__content__mid">\n <h2 class="purchasing-policy-container__modal-delivery-policy__content__mid__title">POLÃTICA DE ENTREGA</h2>\n <hr class="purchasing-policy-container__modal-delivery-policy__content__mid__solid">\n </div>\n </div>\n </div>\n </div>')}function handleModalDeliveryPolicy(){$(".purchasing-policy-container__content__button-open-modal").on("click",function(e){$(".purchasing-policy-container__modal-delivery-policy").removeClass("isHidden"),$("body").css("overflow","hidden");var i=window.textoModalPoliticaDeEntrega;0<$(".purchasing-policy-container__modal-delivery-policy__content__mid p").length||$(".purchasing-policy-container__modal-delivery-policy__content__mid").append(i)}),$(".purchasing-policy-container__modal-delivery-policy__content__top__close").on("click",function(){$(".purchasing-policy-container__modal-delivery-policy").addClass("isHidden"),$("body").css("overflow","unset")}),$(".purchasing-policy-container__modal-delivery-policy").on("click",function(){$(".purchasing-policy-container__modal-delivery-policy").addClass("isHidden"),$("body").css("overflow","unset")}),$(".purchasing-policy-container__modal-delivery-policy__content").on("click",function(e){e.stopPropagation()})}function addFieldsShippingInternational(){var e=vtexjs.checkout.orderForm;e&&e.shippingData.hasOwnProperty("address")&&null!=e.shippingData.address&&null!=e.shippingData.address&&e.shippingData.address.hasOwnProperty("country")&&"BRA"!=(e.shippingData.address.country||"")&&($("label[for='ship-receiverName]'").html("Destinatário <small>(Nome Completo)</small>"),0==$("p.ship-receiverEmail").length&&$('<p class="input ship-receiverEmail required text"><label for="ship-receiverEmail">E-mail <small>(do destinatário)</small></label><input autocomplete="on" id="ship-receiverEmail" type="text" name="receiverEmail" maxlength="750" class="input-xlarge" data-hj-whitelist="true" value=""><span class="help"></span></p>').insertAfter("p.ship-receiverName "),0==$("p.ship-receiverDocument").length&&$('<p class="input ship-receiverDocument required text"><label for="ship-receiverDocument">Documento <small>(do destinatário)</small>\n </label><input autocomplete="on" id="ship-receiverDocument" type="text" name="receiverDocument" maxlength="750" class="input-xlarge" data-hj-whitelist="true" value=""><span class="help"></span></p>').insertAfter("p.ship-receiverName "),0==$("p.ship-receiverPhone").length&&$('<p class="input ship-receiverPhone required text"><label for="ship-receiverPhone">Telefone <small>(do destinatário)</small></label><input autocomplete="on" id="ship-receiverPhone" type="text" name="receiverPhone" maxlength="750" class="input-xlarge" data-hj-whitelist="true" value=""><span class="help"></span></p>').insertAfter("p.ship-receiverName "),validateInternationalFields(),addInternationalTextField(e))}function validateInternationalFields(){$(document).on("blur","input#ship-receiverEmail, input#ship-receiverDocument, input#ship-receiverPhone",function(e){var i=$(this).attr("id"),n=$(this).val();"ship-receiverPhone"==i&&n.length<11?($(this).removeClass("success").addClass("error"),$(this).parent().find("span.help").addClass("error").html("Apenas números, DDD + Telefone. <small>ex: <b>11</b>998000000</small>")):($(this).removeClass("error").addClass("success"),$(this).parent().find("span.help").removeClass("error").html(""),$(this).val(n.replace(/^(\d{2})(\d{5})(\d{4}).*/,"($1) $2-$3"))),"ship-receiverEmail"!=i||validateEmail(n)?($(this).removeClass("error").addClass("success"),$(this).parent().find("span.help").removeClass("error").html("")):($(this).removeClass("success").addClass("error"),$(this).parent().find("span.help").addClass("error").html("Digite um e-mail válido."))})}function validateEmail(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function addInternationalTextField(n){$(document).on("click","#btn-go-to-payment",function(e){var i={receiverName:$("input#ship-receiverName").val(),receiver
7Email:$("input#ship-receiverEmail").val(),receiveDocument:$("input#ship-receiverDocument").val(),receiverPhone:$("input#ship-receiverPhone").val()};vtexjs.checkout.getOrderForm().then(function(e){return vtexjs.checkout.sendAttachment("openTextField",{value:JSON.stringify(i)})}).done(function(e){}),$.ajax({type:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},url:"/api/checkout/pub/orderForm/"+n.orderFormId+"/customData/rupturecart",data:JSON.stringify({selectedOptions:n.items}),success:function(e){console.log("Campo enviado!")},error:function(){console.log("Algo inesperado ocorreu!")}})})}function handleShipNumberField(){var e,i;"#/shipping"===window.location.hash&&((e=$("p.input.ship-number")).length&&e.hasClass("hide")&&e.removeClass("hide"),$("#ship-number").attr({required:!0,inputmode:"numeric",pattern:"[0-9]*"}),e.addClass("required"),(i=$("p.input.ship-complement")).length)&&!i.prev().is(e)&&e.insertBefore(i)}function syncShipNumberFromOrderForm(e){var i=$("#ship-number"),e=getOrderFormShipNumber(e);(lastKnownShipNumberValue=e)&&!isMaskedShipNumberValue(e)&&(e=sanitizeShipNumberInputValue(e))&&"0"!==e&&i.val(e)}function validateShipNumberField(e){var i,n,t=$("#ship-number");return!t.length||(i=(t.val()||"").trim(),n=t.hasClass("error")||0<t.parent().find("span.help.error").length,i?(t.removeClass("error").addClass("success"),t.parent().find("span.help").removeClass("error").html(""),!0):!(!e&&!n)&&validateShipNumberOnPayment())}function handleShipNumberOnOrderFormUpdate(e){"#/shipping"===window.location.hash&&(handleShipNumberField(),syncShipNumberFromOrderForm(e),validateShipNumberField(!1))}function validateShipNumberOnPayment(){var e=$("#ship-number");if((e.val()||"").trim())return e.removeClass("error").addClass("success"),e.parent().find("span.help").removeClass("error").html(""),!0;if(isMaskedShipNumberValue(lastKnownShipNumberValue))return e.removeClass("error").addClass("success"),e.parent().find("span.help").removeClass("error").html(""),!0;e.removeClass("success").addClass("error");var i=e.parent().find("span.help"),n=i.filter(function(){return $(this).hasClass("error")&&"Campo obrigatório."===$(this).text().trim()});return n.length?(n.slice(1).remove(),!1):(i.length?(i.first().addClass("error").html("Campo obrigatório."),i.slice(1).remove()):e.after('<span class="help error">Campo obrigatório.</span>'),!!$(".address-list").length)}function shipNumberPaymentClickHandler(e){!e.target.closest("#btn-go-to-payment")||"#/shipping"!==window.location.hash||validateShipNumberOnPayment()||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}function sanitizeShipNumberInputValue(e){return(e||"").replace(/\D/g,"")}$(window).on("orderFormUpdated.vtex",function(e,i){setTimeout(function(){},500);var n=new URL(window.location.href),t=!1,t=null!==vtexjs.checkout.orderForm.clientProfileData&&"cpf"!==vtexjs.checkout.orderForm.clientProfileData.documentType&&null!==vtexjs.checkout.orderForm.clientProfileData.documentType;"#/payment"==n.hash&&!0===t?($(".payment-group-item").hide(),$("#payment-group-PayPalBCDCPaymentGroup").show()):($(".payment-group-item").show(),$("#payment-group-PayPalBCDCPaymentGroup").hide()),"#/payment"==n.hash&&handlePaymentPageShipNumberValidation(i),"#/shipping"==n.hash&&(addFieldsShippingInternational(),initShipNumberFieldValidation())}),$(document).ready(function(){setTimeout(function(){vtexjs.checkout.getOrderForm().then(function(e){handleIternationalZipCode(e)})},3e3)});var lastKnownShipNumberValue="";function getOrderFormShipNumber(e){e=e&&e.shippingData&&e.shippingData.address;return String(e&&e.number||"")}function isMaskedShipNumberValue(e){return/\*/.test(String(e||"").trim())}function isShipNumberAllowedKey(e){return-1!==["Backspace","Tab","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].indexOf(e.key)||!(!e.ctrlKey&&!e.metaKey)||/^[0-9]$/.test(e.key)}function initShipNumberFieldValidation(){handleShipNumberField(),$(document).off("keydown.shipNumber input.shipNumber paste.shipNumber","#ship-number"),$(document).on("keydown.shipNumber","#ship-number",function(e){isShipNumberAllowedKey(e)||e.preventDefault()}),$(document).on("input.shipNumber","#ship-number",function(){var e=sanitizeShipNumberInputValue($(this).val());$(this).val()!==e&&$(this).val(e),e.trim()&&($(this).removeClass("error").addClass("success"),$(this).parent().find("span.help").removeClass("error").html(""))}),$(document).on("paste.shipNumber","#ship-number",function(e){e.preventDefault();e=sanitizeShipNumberInputValue((e.originalEvent||e).clipboardData.getData("text"));$(this).val(e),e.trim()&&($(this).removeClass("error").addClass("success"),$(this).parent().find("span.help").removeClass("error").html(""))}
7),document.removeEventListener("click",shipNumberPaymentClickHandler,!0),document.addEventListener("click",shipNumberPaymentClickHandler,!0),$(window).off("orderFormUpdated.shipNumber").on("orderFormUpdated.shipNumber",function(e,i){handleShipNumberOnOrderFormUpdate(i)})}function isShippingNumberFilled(e){var e=getOrderFormShipNumber(e);return!!(lastKnownShipNumberValue=e)&&(!!isMaskedShipNumberValue(e)||(e=sanitizeShipNumberInputValue(e),Boolean(e)&&"0"!==e))}function getPaymentSubmitButtons(){return $('[id="payment-data-submit"]')}function getVisiblePaymentSubmitButton(){var e=getPaymentSubmitButtons(),i=e.filter(":visible");return(i.length?i:e).last()}function handlePaymentPageShipNumberValidation(e){var i,n,t;"#/payment"===window.location.hash&&(i=getPaymentSubmitButtons()).length&&(n="ship-number-payment-required-message",e=isShippingNumberFilled(e),t=getVisiblePaymentSubmitButton(),e?(i.prop("disabled",!1).removeClass("disabled"),$("."+n).remove()):(i.prop("disabled",!0).addClass("disabled"),0===$("."+n).length&&t.after('<span class="help error '+n+'">O preenchimento do número do endereço é obrigatório.</span>')))}function initPaymentPageShipNumberValidation(){vtexjs.checkout.getOrderForm().then(function(e){handlePaymentPageShipNumberValidation(e)})}$(document).ready(function(){"#/shipping"===window.location.hash&&initShipNumberFieldValidation()}),$(window).on("hashchange",function(){"#/shipping"===window.location.hash&&setTimeout(initShipNumberFieldValidation,100),"#/payment"===window.location.hash&&setTimeout(initPaymentPageShipNumberValidation,100)});var FOREIGN_DOCUMENT_FIELD_SELECTOR="#client-document-type, #client-new-document",FOREIGN_DOCUMENT_BUTTON_SELECTOR="#go-to-shipping, #go-to-payment",foreignDocumentObserver=null,foreignDocumentRefreshTimeout=null;function getForeignDocumentSubmitButtons(){return $(FOREIGN_DOCUMENT_BUTTON_SELECTOR)}function isForeignDocumentModeActive(){var e=$("#has-document-key").is(":visible"),i=$(".other-document").is(":visible");return e||i}function isForeignDocumentFieldFilled(e){e=String($(e).val()||"");return Boolean(e.replace(/\s+/g,""))}function shouldDisableForeignDocumentProgress(){return!(!isForeignDocumentModeActive()||isForeignDocumentFieldFilled("#client-document-type")&&isForeignDocumentFieldFilled("#client-new-document"))}function applyForeignDocumentButtonState(n){var e=getForeignDocumentSubmitButtons();
7e.length&&e.each(function(){var e=$(this),i="true"===e.attr("data-foreign-document-disabled");n?i||(e.data("foreignDocumentNativeDisabled",e.prop("disabled")),e.attr("data-foreign-document-disabled","true").attr("aria-disabled","true").prop("disabled",!0).addClass("disabled")):i&&(i=!0===e.data("foreignDocumentNativeDisabled"),e.removeAttr("data-foreign-document-disabled").prop("disabled",i),i?e.attr("aria-disabled","true").addClass("disabled"):e.removeAttr("aria-disabled").removeClass("disabled"),e.removeData("foreignDocumentNativeDisabled"))})}function refreshForeignDocumentProgressState(){applyForeignDocumentButtonState(shouldDisableForeignDocumentProgress())}function scheduleForeignDocumentRefresh(e){clearTimeout(foreignDocumentRefreshTimeout),foreignDocumentRefreshTimeout=setTimeout(function(){refreshForeignDocumentProgressState()},e||0)}function clearForeignDocumentFields(){$(FOREIGN_DOCUMENT_FIELD_SELECTOR).each(function(){var e=$(this);e.length&&(e.val("").removeClass("error success").trigger("input").trigger("change"),e.parent().find("span.help").removeClass("error").html(""))})}function handleForeignDocumentToggleClick(e){var i="has-document-key"===e.currentTarget.id;i&&clearForeignDocumentFields(),setTimeout(function(){i&&clearForeignDocumentFields(),refreshForeignDocumentProgressState()},0),scheduleForeignDocumentRefresh(120)}function foreignDocumentSubmitClickHandler(e){e.target.closest(FOREIGN_DOCUMENT_BUTTON_SELECTOR)&&shouldDisableForeignDocumentProgress()&&(refreshForeignDocumentProgressState(),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}function initForeignDocumentObserver(){!foreignDocumentObserver&&"undefined"!=typeof MutationObserver&&document.body&&(foreignDocumentObserver=new MutationObserver(function(){scheduleForeignDocumentRefresh(0)})).observe(document.body,{childList:!0,subtree:!0})}function initForeignDocumentValidation(){$(document).off("input.foreignDocument change.foreignDocument keyup.foreignDocument",FOREIGN_DOCUMENT_FIELD_SELECTOR),$(document).on("input.foreignDocument change.foreignDocument keyup.foreignDocument",FOREIGN_DOCUMENT_FIELD_SELECTOR,function(){refreshForeignDocumentProgressState()}),$(document).off("click.foreignDocumentToggle","#no-document-key, #has-document-key"),$(document).on("click.foreignDocumentToggle","#no-document-key, #has-document-key",handleForeignDocumentToggleClick),document.removeEventListener("click",foreignDocumentSubmitClickHandler,!0),document.addEventListener("click",foreignDocumentSubmitClickHandler,!0),$(window).off("orderFormUpdated.foreignDocument").on("orderFormUpdated.foreignDocument",function(){scheduleForeignDocumentRefresh(100)}),initForeignDocumentObserver(),refreshForeignDocumentProgressState()}$(document).ready(function(){"#/payment"===window.location.hash&&initPaymentPageShipNumberValidation()}),$(document).ready(function(){initForeignDocumentValidation()}),$(window).on("hashchange.foreignDocument",function(){setTimeout(initForeignDocumentValidation,100)});var slickLoaded=!1;function calculatePercentageDiscount(e,i){return e&&e!==i?Math.round((e-i)/e*100):0}function initSimilarProducts(e){var t;function r(e){var c,i,n;function r(){var e,i,n,t=$("footer, .footer").first();0===t.length?setTimeout(r,500):(e=$('<div class="shelf-checkout"></div>'),i=$('<div id="similar-products-showcase"><div class="shelf-title">APROVEITE TAMBÃM</div></div>'),n=$('<ul class="shelf-list"></ul>'),e.append(i),e.append(n),t.before(e),n.append(c),$.fn.slick&&n.slick({dots:!0,arrows:!0,infinite:!0,speed:300,slidesToShow:4,slidesToScroll:4,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:480,settings:{slidesToShow:2,slidesToScroll:2,arrows:!1}}]}),$(document).off("click",".shelf-item__btn-buy").on("click",".shelf-item__btn-buy",function(e){e.preventDefault();var i=$(this),e=i.data("item-id");i.data("product-id");e&&(i.prop("disabled",!0).text("Adicionando..."),vtexjs.checkout.addToCart([{id:e,quantity:1,seller:"1"}]).then(function(){i.html('<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path id="Vector" d="M4.99984 3.5C4.99984 2.39688 6.56338 1.5 7.6665 1.5C8.76963 1.5 10.3332 2.39688 10.3332 3.5V4.33333H4.99984V3.5ZM3.49984 4.33333H2.1665C1.33838 4.33333 0.666
7504 5.00521 0.666504 5.83333V13C0.666504 14.6562 1.34359 16 3.6665 16H11.6665C13.3228 16 14.6665 14.6562 14.6665 13V5.83333C14.6665 5.00521 13.9946 4.33333 13.1665 4.33333H11.8332V3.5C11.8332 1.56562 10.2675 0 7.6665 0C5.73213 0 3.49984 1.56562 3.49984 3.5V4.33333ZM4.24984 5.83333C4.44875 5.83333 4.63952 5.91235 4.78017 6.053C4.92082 6.19366 4.99984 6.38442 4.99984 6.58333C4.99984 6.78225 4.92082 6.97301 4.78017 7.11366C4.63952 7.25432 4.44875 7.33333 4.24984 7.33333C4.05093 7.33333 3.86016 7.25432 3.71951 7.11366C3.57886 6.97301 3.49984 6.78225 3.49984 6.58333C3.49984 6.38442 3.57886 6.19366 3.71951 6.053C3.86016 5.91235 4.05093 5.83333 4.24984 5.83333ZM10.3332 6.58333C10.3332 6.38442 10.4122 6.19366 10.5528 6.053C10.6935 5.91235 10.8843 5.83333 11.0832 5.83333C11.2821 5.83333 11.4728 5.91235 11.6135 6.053C11.7542 6.19366 11.8332 6.38442 11.8332 6.58333C11.8332 6.78225 11.7542 6.97301 11.6135 7.11366C11.4728 7.25432 11.2821 7.33333 11.0832 7.33333C10.8843 7.33333 10.6935 7.25432 10.5528 7.11366C10.4122 6.97301 10.3332 6.78225 10.3332 6.58333Z" fill="#1A1818"></path></svg> Adicionado!').prop("disabled",!1),setTimeout(function(){i.html('<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path id="Vector" d="M4.99984 3.5C4.99984 2.39688 6.56338 1.5 7.6665 1.5C8.76963 1.5 10.3332 2.39688 10.3332 3.5V4.33333H4.99984V3.5ZM3.49984 4.33333H2.1665C1.33838 4.33333 0.666504 5.00521 0.666504 5.83333V13C0.666504 14.6562 1.34359 16 3.6665 16H11.6665C13.3228 16 14.6665 14.6562 14.6665 13V5.83333C14.6665 5.00521 13.9946 4.33333 13.1665 4.33333H11.8332V3.5C11.8332 1.56562 10.2675 0 7.6665 0C5.73213 0 3.49984 1.56562 3.49984 3.5V4.33333ZM4.24984 5.83333C4.44875 5.83333 4.63952 5.91235 4.78017 6.053C4.92082 6.19366 4.99984 6.38442 4.99984 6.58333C4.99984 6.78225 4.92082 6.97301 4.78017 7.11366C4.63952 7.25432 4.44875 7.33333 4.24984 7.33333C4.05093 7.33333 3.86016 7.25432 3.71951 7.11366C3.57886 6.97301 3.49984 6.78225 3.49984 6.58333C3.49984 6.38442 3.57886 6.19366 3.71951 6.053C3.86016 5.91235 4.05093 5.83333 4.24984 5.83333ZM10.3332 6.58333C10.3332 6.38442 10.4122 6.19366 10.5528 6.053C10.6935 5.91235 10.8843 5.83333 11.0832 5.83333C11.2821 5.83333 11.4728 5.91235 11.6135 6.053C11.7542 6.19366 11.8332 6.38442 11.8332 6.58333C11.8332 6.78225 11.7542 6.97301 11.6135 7.11366C11.4728 7.25432 11.2821 7.33333 11.0832 7.33333C10.8843 7.33333 10.6935 7.25432 10.5528 7.11366C10.4122 6.97301 10.3332 6.78225 10.3332 6.58333Z" fill="#1A1818"></path></svg> ADICIONAR')},2e3)}).fail(function(){i.html('<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path id="Vector" d="M4.99984 3.5C4.99984 2.39688 6.56338 1.5 7.6665 1.5C8.76963 1.5 10.3332 2.39688 10.3332 3.5V4.33333H4.99984V3.5ZM3.49984 4.33333H2.1665C1.33838 4.33333 0.666504 5.00521 0.666504 5.83333V13C0.666504 14.6562 1.34359 16 3.6665 16H11.6665C13.3228 16 14.6665 14.6562 14.6665 13V5.83333C14.6665 5.00521 13.9946 4.33333 13.1665 4.33333H11.8332V3.5C11.8332 1.56562 10.2675 0 7.6665 0C5.73213 0 3.49984 1.56562 3.49984 3.5V4.33333ZM4.24984 5.83333C4.44875 5.83333 4.63952 5.91235 4.78017 6.053C4.92082 6.19366 4.99984 6.38442 4.99984 6.58333C4.99984 6.78225 4.92082 6.97301 4.78017 7.11366C4.63952 7.25432 4.44875 7.33333 4.24984 7.33333C4.05093 7.33333 3.86016 7.25432 3.71951 7.11366C3.57886 6.97301 3.49984 6.78225 3.49984 6.58333C3.49984 6.38442 3.57886 6.19366 3.71951 6.053C3.86016 5.91235 4.05093 5.83333 4.24984 5.83333ZM10.3332 6.58333C10.3332 6.38442 10.4122 6.19366 10.5528 6.053C10.6935 5.91235 10.8843 5.83333 11.0832 5.83333C11.2821 5.83333 11.4728 5.91235 11.6135 6.053C11.7542 6.19366 11.8332 6.38442 11.8332 6.58333C11.8332 6.78225 11.7542 6.97301 11.6135 7.11366C11.4728 7.25432 11.2821 7.33333 11.0832 7.33333C10.8843 7.33333 10.6935 7.25432 10.5528 7.11366C10.4122 6.97301 10.3332 6.78225 10.3332 6.58333Z" fill="#1A1818"></path></svg> Erro').prop("disabled",!1),setTimeout(function(){i.html('<svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path id="Vector" d="M4.99984 3.5C4.99984 2.39688 6.56338 1.5 7.6665 1.5C8.76963 1.5 10.3332 2.39688 10.3332 3.5V4.33333H4.99984V3.5ZM3.49984 4.33333H2.1665C1.33838 4.33333 0.666
7504 5.00521 0.666504 5.83333V13C0.666504 14.6562 1.34359 16 3.6665 16H11.6665C13.3228 16 14.6665 14.6562 14.6665 13V5.83333C14.6665 5.00521 13.9946 4.33333 13.1665 4.33333H11.8332V3.5C11.8332 1.56562 10.2675 0 7.6665 0C5.73213 0 3.49984 1.56562 3.49984 3.5V4.33333ZM4.24984 5.83333C4.44875 5.83333 4.63952 5.91235 4.78017 6.053C4.92082 6.19366 4.99984 6.38442 4.99984 6.58333C4.99984 6.78225 4.92082 6.97301 4.78017 7.11366C4.63952 7.25432 4.44875 7.33333 4.24984 7.33333C4.05093 7.33333 3.86016 7.25432 3.71951 7.11366C3.57886 6.97301 3.49984 6.78225 3.49984 6.58333C3.49984 6.38442 3.57886 6.19366 3.71951 6.053C3.86016 5.91235 4.05093 5.83333 4.24984 5.83333ZM10.3332 6.58333C10.3332 6.38442 10.4122 6.19366 10.5528 6.053C10.6935 5.91235 10.8843 5.83333 11.0832 5.83333C11.2821 5.83333 11.4728 5.91235 11.6135 6.053C11.7542 6.19366 11.8332 6.38442 11.8332 6.58333C11.8332 6.78225 11.7542 6.97301 11.6135 7.11366C11.4728 7.25432 11.2821 7.33333 11.0832 7.33333C10.8843 7.33333 10.6935 7.25432 10.5528 7.11366C10.4122 6.97301 10.3332 6.78225 10.3332 6.58333Z" fill="#1A1818"></path></svg> ADICIONAR')},2e3)}))}))}e&&e.length&&(0<$(".shelf-checkout").length||(c="",e.forEach(function(e){var i=e.items[0],n=i.sellers[0].commertialOffer,t=n.ListPrice||0,n=n.Price||t||0,r=t?numberToReal(t):"",a=n?numberToReal(n):"",o=calculatePercentageDiscount(t,n),s=i.images&&i.images[0]&&i.images[0].imageUrl?i.images[0].imageUrl:"",l=(e.Autor||[]).map(function(e){return"<li>"+e+"</li>"}).join(""),d=e["Pré venda"]&&"Sim"===e["Pré venda"][0]?'<div class="flag-pre-venda">Pré-venda</div>':"",p=e["Sob encomenda"]&&"Sim"===e["Sob encomenda"][0]?'<div class="flag-request"><span>Sob Encomenda</span></div>':"";c+='\n <li>\n <div class="shelf-item" data-product-id="'+e.productId+'">\n <div class="shelf-item__flags">\n '+(0<o?'<div class="flag-percentage flag-percentage--active">'+o+"%</div>":"")+"\n "+p+"\n "+d+'\n </div>\n <div class="shelf-item__img">\n <div class="shelf-item__img-link" title="'+e.productName+'">\n <div class="shelf-item__image">\n <img src="'+s+'" alt="'+e.productName+'" />\n </div>\n </div>\n </div>\n <div class="shelf-item__info">\n <div title="'+e.productName+'" class="shelf-item__title">'+e.productName+'</div>\n <div class="shelf-item__author">\n <ul>\n '+l+'\n </ul>\n </div>\n <div class="shelf-item__buy-info">\n <div class="shelf-item__price">\n <span class="shelf-item__list-price">'+(t!==n?r:"")+'</span>\n <span class="shelf-item__best-price">'+a+'</span>\n </div>\n </div>\n\n <div class="shelf-item__btns">\n <a href="#" class="shelf-item__btn-buy" data-product-id="'+e.productId+'" data-item-id="'+i.itemId+'" title="'+e.productName+'">\n <svg width="15" height="16" viewBox="0 0 15 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path id="Vector" d="M4.99984 3.5C4.99984 2.39688 6.56338 1.5 7.6665 1.5C8.76963 1.5 10.3332 2.39688 10.3332 3.5V4.33333H4.99984V3.5ZM3.49984 4.33333H2.1665C1.33838 4.33333 0.666504 5.00521 0.666504 5.83333V13C0.666504 14.6562 1.34359 16 3.6665 16H11.6665C13.3228 16 14.6665 14.6562 14.6665 13V5.83333C14.6665 5.00521 13.9946 4.33333 13.1665 4.33333H11.8332V3.5C11.8332 1.56562 10.2675 0 7.6665 0C5.73213 0 3.49984 1.56562 3.49984 3.5V4.33333ZM4.24984 5.83333C4.44875 5.83333 4.63952 5.91235 4.78017 6.053C4.92082 6.19366 4.99984 6.38442 4.99984 6.58333C4.99984 6.78225 4.92082 6.97301 4.78017 7.11366C4.63952 7.25432 4.44875 7.33333 4.24984 7.33333C4.05093 7.33333 3.86016 7.25432 3.71951 7.11366C3.57886 6.97301 3.49984 6.78225 3.49984 6.58333C3.49984 6.38442 3.57886 6.19366 3.71951 6.053C3.86016 5.91235 4.05093 5.83333 4.24984 5.83333ZM10.3332 6.58333C10.3332 6.38442 10.4122 6.19366 10.5528 6.053C10.6935 5.91235 10.8843 5.83333 11.0832 5.83333C11.2821 5.83333 11.4728 5.91235 11.6135 6.053C11.7542 6.19366 11.8332 6.38442 11.8332 6.58333C11.8332 6.78225 11.7542 6.97301 11.6135 7.11366C11.4728 7.25432 11.2821 7.33333 11.0832 7.33333C10.8843 7.33333 10.6935 7.25432 10.5528 7.11366C10.4122 6.97301 10.3332 6.78225 10.3332 6.58333Z" fill="#1A1818"></path>\n </svg>\n ADICIONAR\n </a>\n </div>\n\n </div>\n <div class="loading-ellipsis"><div></div><div></div><div></div><div></div></div>\n </div>\n </li>\n '}),slickLoaded&&$.fn.slick?r():slickLoaded||(e=document.createElement("script"),i=document.createElement("link"),n=document.createElement("link"),e.onload=function(){slickLoaded=!0,r()},i.id="slick-css",i.rel="stylesheet",i.href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css",document.head.appendChild(i),n.id="slick-theme-css",n.rel="stylesheet",n.href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css",document.head.appendChild(n),e.src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js",document.head.appendChild(e))))}$(".shelf-checkout").remove(),e&&e.items&&e.items.length&&(t=[],e.items.forEac
7h(function(e,i){e.productId&&t.push((e=e.productId,$.ajax({url:"/api/catalog_system/pub/products/crossselling/similars/"+e,timeout:5e3}).then(function(e){try{var i;return e&&e.length?(i=e.filter(function(e){e=e.items&&e.items[0];return e&&e.sellers&&e.sellers[0]&&e.sellers[0].commertialOffer&&e.sellers[0].commertialOffer.IsAvailable}).slice(0,12)).length?i:null:null}catch(e){return console.error("Erro ao processar produtos similares:",e),null}}).fail(function(){return null})))}),function i(n){t.length<=n||t[n].then(function(e){e&&e.length?r(e):i(n+1)})}(0))}function onSyneriseLoad(){SR.init({trackerKey:"e28c3bb5-d4d9-4ed9-8d64-c15731f38947"})}$(window).on("orderFormUpdated.vtex",function(e,i){setTimeout(function(){initSimilarProducts(i)},500)}),((e,i,n,t,r)=>{e.SyneriseObjectNamespace=n,e.SR=e.SR||[],e.SR._t=+new Date,e.SR._i=0,e.SR._l=t;var a=i.createElement("script"),r=i.getElementsByTagName("script")[0];a.async=1,a.src="//web.azu.snrbox.com/synerise-javascript-sdk.min.js",r.parentNode.insertBefore(a,r),a.onload=a.onreadystatechange=function(){a.readyState&&!/complete|loaded/.test(a.readyState)||(e[t](),a.onload=null,a.onreadystatechange=null)}})(window,document,"SR","onSyneriseLoad");
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.