PageSourceSearch

https://zapsign.com.br/hubfs/hub_generated/module_assets/1/200855522345/1789602517297/module_zs_plans.min.js

js zapsign.com.br collected 2026-09-26 03:00:24 UTC 12,830 bytes, 2 lines download raw bytes

1var module_196476516480=function(){function enhanceEquipeCertCTA(card){card.closest(".cert_cta_enabled")&&card.classList.contains("has_cert_offer")&&card.querySelectorAll(".plan_ctas a.plan_cta_button").forEach(button=>{const label=button.firstElementChild;if(!label||!["Equipe","Equipes"].includes(label.getAttribute("data-plan"))||label.querySelector(".cert-cta-reward"))return;const action=document.createElement("span");action.className="cert-cta-action",action.textContent=label.textContent.trim();const reward=document.createElement("span");reward.className="cert-cta-reward",reward.textContent="Ganhe 1 certificado digital",label.classList.add("cert-cta-copy"),label.replaceChildren(action,document.createTextNode(" "),reward)})}document.addEventListener("DOMContentLoaded",async()=>{let planPeriod=null,docsQuantity=20,plansDataBase=null,isUnlimited=!1;const periodMenu=document.querySelectorAll(".menu_period_item_container li"),docsMenu=document.querySelectorAll(".menu_docs_item_container li"),planCardItem=document.querySelectorAll(".plan_card_item"),planPrice=document.querySelectorAll(".plan_price"),plansRoot=document.querySelector(".zs_plans");if(!plansRoot)return;const planJson=plansRoot.getAttribute("data-plan-json"),cardDocsNumber=document.querySelectorAll(".docs_number"),anualOptions=(await async function(url){try{const embeddedCatalog=plansRoot.getAttribute("data-plan-catalog");let data;if(embeddedCatalog)data=JSON.parse(embeddedCatalog);else{const response=await fetch(url);if(!response.ok)throw new Error(`Erro ao carregar dados: ${response.status}`);data=await response.json()}return plansDataBase=data,planPeriod=plansDataBase.Team?"Annual upfront":plansDataBase.Equipo?"Anual a la vista":"Anual à vista",planPeriod=plansRoot.getAttribute("data-default-period")||planPeriod,docsQuantity=Number(plansRoot.getAttribute("data-default-docs"))||docsQuantity,updatePlanCardItem(),!0}catch(error){console.error("Erro ao carregar dados dos planos:",error)}}(planJson),["Annual upfront","Anual a la vista","Anual à vista"]);function updatePlanCardItem(){planCardItem.forEach(item=>{item.classList.remove("is_hidden","card_update_width")}),planCardItem.forEach(item=>{if(item.classList.contains("plan_card_enterprise"))return;const planName=item.querySelector(".plan_name").textContent.trim(),planPriceValue=item.querySelector(".plan_price_value"),planPriceSupportText=item.querySelector(".plan_price_support_text"),planOldPrice=item.querySelector(".price_monthly .old_price"),planNewPrice=item.querySelector(".price_monthly .new_price");if(isUnlimited&&200===docsQuantity&&"Equipe"===planName&&(planCardItem.forEach(card=>{card.classList.contains("plan_card_enterprise")||card.classList.add("card_update_width")}),item.classList.add("is_hidden")),isUnlimited||200!==docsQuantity||"Profissional"!==planName||(planCardItem.forEach(card=>{card.classList.contains("plan_card_enterprise")||card.classList.add("card_update_width")}),item.classList.add("is_hidden")),"Individual"!==planName){const ctaData=function(planName,planPeriod,docsQuantity){if(!plansDataBase)return console.error("Dados dos planos não encontrados"),null;if(!plansDataBase[planName])return console.error(`Plano "${planName}" não encontrado nos dados`),null;if(!plansDataBase[planName][planPeriod])return console.error(`Período "${planPeriod}" não encontrado para o plano "${planName}"`),null;if(!plansDataBase[planName][planPeriod][docsQuantity])return console.error(`Quantidade de documentos "${docsQuantity}" não encontrada para o plano "${planName}" e período "${planPeriod}"`),null;const ctaHyperlink=plansDataBase[planName][planPeriod][docsQuantity];return ctaHyperlink}(planName,planPeriod,docsQuantity);ctaData&&(planPriceValue.textContent=ctaData.main_price,planPriceSupportText.textContent=ctaData.support_text,planOldPrice.textContent=ctaData.old_price,planNewPrice.textContent=ctaData.new_price,displayPlanCTAButtons(item,planName))}else planPriceValue.textContent="Gratuito",planPriceSupportText.textContent="",planOldPrice.textContent="",planNewPrice.textContent="para sempre"})}function updateCardDocsNumber(){cardDocsNumber.forEach(item=>
1{item.classList.contains("pro_docs_number")&&200==docsQuantity?item.textContent="Ilimitados":item.textContent=docsQuantity})}function displayPlanCTAButtons(item,planName){enhanceEquipeCertCTA(item);item.querySelectorAll(".plan_cta_button").forEach(button=>{const CTA_dataPeriod=button.children[0].getAttribute("data-period"),CTA_dataDocs=parseInt(button.children[0].getAttribute("data-docs"));if(button.children[0].getAttribute("data-plan")===planName&&CTA_dataPeriod===planPeriod&&CTA_dataDocs===docsQuantity){const activeCTAButton=item.querySelector(".plan_cta_button.active_plan");activeCTAButton?.classList.remove("active_plan"),button.classList.add("active_plan")}})}periodMenu[2].classList.add("active_item"),docsMenu[0].classList.add("active_item"),planPrice[1].classList.add("plan_discount"),periodMenu.forEach(item=>{item.addEventListener("click",()=>{const currentActiveItem=document.querySelector(".menu_period_item_container .active_item");currentActiveItem&&currentActiveItem!==item&&(currentActiveItem.classList.remove("active_item"),item.classList.add("active_item"),planPeriod=item.getAttribute("data-period").trim(),updatePlanCardItem(),planPrice[1]&&anualOptions.some(option=>planPeriod.includes(option))?planPrice[1].classList.add("plan_discount"):planPrice[1].classList.remove("plan_discount"))})}),docsMenu.forEach(item=>{item.addEventListener("click",()=>{const currentActiveItem=document.querySelector(".menu_docs_item_container .active_item");currentActiveItem&&currentActiveItem!==item&&(currentActiveItem.classList.remove("active_item"),item.classList.add("active_item"),docsQuantity=item.getAttribute("data-docs"),"Ilimitado"===docsQuantity?(docsQuantity=200,isUnlimited=!0):(docsQuantity=parseInt(docsQuantity),isUnlimited=!1),updatePlanCardItem(),updateCardDocsNumber())})});const selectButton=document.querySelector(".dropdown-button"),selectList=document.querySelector(".dropdown-list"),selectItems=selectList.querySelectorAll("li");selectButton.addEventListener("click",()=>{selectList.classList.toggle("dropdown-list-hidden")}),selectItems.forEach(item=>{item.addEventListener("click",()=>{selectButton.textContent=item.textContent,selectList.classList.add("dropdown-list-hidden"),selectItems.forEach(i=>i.classList.remove("active")),item.classList.add("active"),docsQuantity=item.getAttribute("data-docs"),"Ilimitado"===docsQuantity?(docsQuantity=200,isUnlimited=!0):(docsQuantity=parseInt(docsQuantity),isUnlimited=!1),updateCardDocsNumber(),updatePlanCardItem()})});const ctaObserver=new MutationObserver(records=>{records.some(record=>Array.from(record.addedNodes).some(node=>1===node.nodeType&&(node.matches(".cta_button, .plan_cta_button")||node.querySelector(".cta_button, .plan_cta_button"))))&&planCardItem.forEach(item=>{if(item.classList.contains("plan_card_enterprise"))return;const planName=item.querySelector(".plan_name").textContent.trim();"Individual"!==planName&&displayPlanCTAButtons(item,planName)})});plansRoot.querySelectorAll(".plan_ctas").forEach(slot=>{ctaObserver.observe(slot,{childList:!0,subtree:!0})}),function(){const root=document.querySelector(".zs_plans");if(!root)return;root.querySelectorAll(".plan_card_item").forEach(card=>{if(card.classList.contains("plan_card_enterprise"))return;const name=(card.querySelector(".plan_name")?.textContent||"").trim();if("Equipe"!==name&&"Equipes"!==name)return;card.classList.add("has_cert_offer");const existing=card.querySelector(".plan_cert_offer");if(existing)return placeCertOfferAfterPrice(card,existing),void(existing.querySelector(".plan_cert_offer_tooltip_link")||(existing.innerHTML=certOfferInnerMarkup()));const offer=document.createElement("div");offer.className="plan_cert_offer",offer.innerHTML=certOfferInnerMarkup(),placeCertOfferAfterPrice(card,offer)})}(),planCardItem.forEach(enhanceEquipeCertCTA),function(){const root=document.querySelector(".zs_plans");if(!root)return;root.querySelectorAll(".plan_cert_offer").forEach((offer,index)=>{const help=offer.querySelector(".plan_cert_offer_help"),tooltip=offer.querySelector(".plan_cert_offer_tooltip");if(!help||!tooltip||"true"===help.dataset.bound)return;help.dataset.bound="true",tooltip.id=tooltip.id||`cert-offer-details-${index}`,help.setAttribute("aria-controls",tooltip.id);let closeTimer=null,pinned=!1,positionFrame=null;const position=()=>{offer.classList.remove("opens-above"),offer.style.setProperty("--cert-popover-right","0px"),tooltip.style.maxHeight="";const anchor=offer.getBoundingClientRect(),panel=tooltip.getBoundingClientRect(),header=document.querySelector("header"),headerBottom=header?Math.max(16,header.getBoundingClientRect().bottom):16,above=anchor.top-headerBottom-8,below=window.innerHeight-anchor.bottom-24,opensAbove=below<panel.height&&above>below;offer.classList.toggle("opens-above",opensAbove),tooltip.style.maxHeight=`${Math.max(100,opensAbove?above:below)}px`;const shift=panel.left<16?panel.left-16:Math.max(0,panel.right-window.innerWidth+16);offer.style.setProperty("--cert-popover-right",`${shift}px`)},cancelClose=()=>{clearTimeout(closeTimer),closeTimer=null},open=()=>{cancelClose(),position(),offer.classList.add("is-open"),help.setAttribute("aria-expanded","true"),schedulePosition()},close=()=>{cancelClose(),pinned=!1,offer.classList.remove("is-open"),help.setAttribute("aria-expanded","fal
1se")},scheduleClose=()=>{cancelClose(),pinned||tooltip.contains(document.activeElement)||(closeTimer=setTimeout(close,180))};function schedulePosition(){offer.classList.contains("is-open")&&null===positionFrame&&(positionFrame=requestAnimationFrame(()=>{positionFrame=null,offer.classList.contains("is-open")&&position()}))}window.matchMedia("(hover: hover) and (pointer: fine)").matches&&(help.addEventListener("mouseenter",open),offer.addEventListener("mouseleave",scheduleClose),tooltip.addEventListener("mouseenter",cancelClose)),help.addEventListener("click",event=>{event.preventDefault(),pinned?close():(pinned=!0,open())}),offer.addEventListener("keydown",event=>{"Escape"===event.key&&(tooltip.contains(document.activeElement)&&help.focus(),close())}),offer.addEventListener("focusout",event=>{offer.contains(event.relatedTarget)||close()}),document.addEventListener("click",event=>{offer.contains(event.target)||close()}),window.addEventListener("resize",schedulePosition),window.addEventListener("scroll",schedulePosition,{passive:!0})})}()});const certOfferHelpIcon='<svg class="plan_cert_offer_help_icon" width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9.09 9.5C9.3251 8.83167 9.78915 8.26811 10.4 7.90913C11.0108 7.55016 11.7289 7.41894 12.4272 7.53871C13.1255 7.65849 13.7588 8.02152 14.2151 8.56353C14.6713 9.10553 14.9211 9.79152 14.92 10.5C14.92 12.5 11.92 13.5 11.92 13.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 17.5H12.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';function certOfferInnerMarkup(){return'<div class="plan_cert_offer_content"><p class="plan_cert_offer_title">1 certificado <strong>gratuito</strong></p><p class="plan_cert_offer_value"><s aria-label="Preço de tabela: de 160 a 260 reais">R$ 160 a R$ 260</s><span>por <strong>R$ 0</strong></span></p></div><button type="button" class="plan_cert_offer_help" aria-expanded="false" aria-label="Saiba mais sobre o certificado incluso">'+certOfferHelpIcon+'</button><div class="plan_cert_offer_tooltip" role="region" aria-label="Sobre o certificado gratuito"><p class="plan_cert_offer_tooltip_title">Seu certificado digital</p><p>Escolha e-CPF ou e-CNPJ, A1 ou A3, com validade de 1 ano.</p><div class="plan_cert_offer_redemption"><p class="plan_cert_offer_tooltip_label">Como resgatar</p><p>O cupom chega por e-mail em até 24h após o pagamento. Você tem 30 dias para resgatar.</p></div><p class="plan_cert_offer_tooltip_note">Preço avulso de tabela: R$ 160 a R$ 260.</p><p class="plan_cert_offer_tooltip_link"><a href="/juridico/regulamento-promocao-certificado-digital-gratis-plano-equipe">Ver condições da oferta <span aria-hidden="true">→</span></a></p></div>'}function placeCertOfferAfterPrice(card,offer){const price=card.querySelector(".plan_price"),benefits=card.querySelector(".plan_benefits");price?price.after(offer):benefits&&benefits.before(offer)}}();
2//# sourceURL=https://21139751.fs1.hubspotusercontent-na1.net/hubfs/21139751/hub_generated/module_assets/1/200855522345/1789602517297/module_zs_plans.js

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.