1const HEADER=document.getElementsByClassName("site-header")[0],CARDS=document.getElementById("cards-wrap"),WRAP=document.getElementById("side-scroll-wrap"),OPTIONS=document.getElementById("hs_cos_wrapper_plan-options"),TABLES=document.getElementById("tables-wrap"),STICKY_BACKGROUND=document.getElementById("sticky-background"),MONTH_YEAR_BUTTONS=document.querySelectorAll("#hs_cos_wrapper_month-year .button"),YEAR_BUTTON=MONTH_YEAR_BUTTONS[0],MONTH_BUTTON=MONTH_YEAR_BUTTONS[1],PRICES_PRO=document.getElementsByClassName("price-pro"),PRICES_BUS=document.getElementsByClassName("price-bus"),DEFAULT_TOP_PADDING="16px",BOTTOM_DIST_TO_HIDE_OPTIONS=154,HEADER_HEIGHT=87,PRO_PRICE_MONTHLY=10,BUS_PRICE_MONTHLY=20,YEARLY_DISCOUNT=.2,PRO_PRICE_YEARLY=8,BUS_PRICE_YEARLY=16;function updatePrices(priceList,newPrice){for(let i=0;i<priceList.length;i++)priceList[i].innerText=newPrice}function setDefaultButton(){YEAR_BUTTON.click()}window.addEventListener("scroll",function(){STICKY_BACKGROUND.style.setProperty("top",OPTIONS.getBoundingClientRect().top+"px"),WRAP.getBoundingClientRect().top<=80?(HEADER.style.setProperty("top",WRAP.getBoundingClientRect().top-80+"px"),STICKY_BACKGROUND.classList.remove("hidden"),WRAP.getBoundingClientRect().bottom<=154?(OPTIONS.style.setProperty("top",WRAP.getBoundingClientRect().bottom-154+"px"),STICKY_BACKGROUND.style.setProperty("top",OPTIONS.getBoundingClientRect().top+"px"),WRAP.getBoundingClientRect().bottom<=87&&(WRAP.getBoundingClientRect().bottom<=0?HEADER.style.setProperty("top",0):HEADER.style.setProperty("top","-"+WRAP.getBoundingClientRect().bottom+"px"))):OPTIONS.style.setProperty("top",0)):(HEADER.style.setProperty("top","0px"),STICKY_BACKGROUND.classList.add("hidden")),WRAP.getBoundingClientRect().top<=0?(OPTIONS.classList.add("sticky-options"),OPTIONS.style.setProperty("width",TABLES.getBoundingClientRect().width+"px"),TABLES.style.setProperty("padding-top",OPTIONS.getBoundingClientRect().height+"px")):(OPTIONS.classList.remove("sticky-options"),TABLES.style.setProperty("padding-top","16px"))}),WRAP.addEventListener("scroll",function(){OPTIONS.style.setProperty("left",TABLES.getBoundingClientRect().x+"px")}),YEAR_BUTTON.addEventListener("click",function(){updatePrices(PRICES_PRO,8),updatePrices(PRICES_BUS,16),YEAR_BUTTON.classList.add("selected"),MONTH_BUTTON.classList.remove("selected")}),MONTH_BUTTON.addEventListener("click",function(){updatePrices(PRICES_PRO,10),updatePrices(PRICES_BUS,20),MONTH_BUTTON.classList.add("selected"),YEAR_BUTTON.classList.remove("selected")}),"loading"!=document.readyState?setDefaultButton():document.addEventListener("DOMContentLoaded",setDefaultButton);let startX,scrollLeft,startDraggingX,stopDraggingX,mouseDown=!1,lastScrollDistance=0,timeSinceLastScrool=Date.now(),startDragging=function(e){mouseDown=!0,startX=e.pageX-CARDS.offsetLeft,startDraggingX=startX,scrollLeft=CARDS.scrollLeft},stopDragging=function(event){stopDraggingX=event.pageX-CARDS.offsetLeft,lastScrollDistance=Math.abs(startDraggingX-stopDraggingX),mouseDown=!1};CARDS.addEventListener("mousemove",e=>{if(e.preventDefault(),!mouseDown)return;const scroll=e.pageX-CARDS.offsetLeft-startX;CARDS.scrollLeft=scrollLeft-scroll}),CARDS.addEventListener("mousedown",startDragging,!1),CARDS.addEventListener("mouseup",stopDragging,!1),CARDS.addEventListener("mouseleave",stopDragging,!1);const SELECTED_CLASS_NAME="selected",OPTION_CARDS=CARDS.children,OPTION_DOTS=document.querySelector(".option-dots-wrap").children,X_SCROLL_DISTANCE_PER_CARD=276,TRY_NOW_BUTTON=document.createElement("a"),SELECT_ELEMENT=document.createElement("select"),NUM_OPTIONS=4,PLAN_OPTIONS_DIV=document.querySelector("#hs_cos_wrapper_plan-options"),TRY_BUTTON_TEXT="Try it now",TABLE_ROWS=document.querySelectorAll(".tables-wrap .table-module-body-row");let selectedPlan=PLAN_OPTIONS_DIV.children[2],selectedPlanNumber=2,selectedPlanButtonsWrap=selectedPlan.querySelector(".buttons-wrap"),selectedPlanButton=selectedPlan.querySelector(".button");function addPlanOption(value,text,defaultOption=!1){const SELECT_OPTION=document.createElement("option");SELECT_OPTION.defaultSelected=defaultOption,SELECT_OPTION.disabled=defaultOption,SELECT_OPTION.value=value,SELECT_OPTION.innerText=text,SELECT_ELEMENT.append(SELECT_OPTION)}function updateTableColumnVisibility(plan=2){for(let i=0;i<TABLE_ROWS.length;i++){let row=TABLE_ROWS[i];for(let j=1;j<row.children.length;j++){let column=row.children[j];j!=plan?column.classList.add("hide-on-tablet-and-mobile"):column.classList.remove("hide-on-tablet-and-mobile")}}}function setSelectedPlan(plan=2,dropdownChange=!1){if(lastScrollDistance<5||dropdownChange){selectedPlan.classList.remove("selected"),OPTION_CARDS[selectedPlanNumber-1].classList.remove("selected"),OPTION_DOTS[selectedPlanNumber-1].classList.remove("selected"),selectedPlanNumber=plan;let card=OPTION_CARDS[selectedPlanNumber-1];selectedPlan=PLAN_OPTIONS_DIV.children[plan],selectedPlan.classList.add("selected"),card.classList.add("selected"),CARDS.scrollTo({left:276*(selectedPlanNumber-1)-window.innerWidth/2+200,behavior:"smooth"}),OPTION_DOTS[selectedPlanNumber-1].classList.add("selected"),SELECT_ELEMENT.value=0,selectedPlanButtonsWrap=selectedPlan.querySelector(".buttons-wrap"),selectedPlanButton=selectedPlan.querySelector(".button"),TRY_NOW_BUTTON.href=selectedPlanButton.href,selectedPlanButtonsWrap.append(TRY_NOW_BUTTON),selectedPlanButtonsWrap.append(SELECT_ELEMENT),updateTableColumnVisibility(plan)}else lastScrollDistance=0}TRY_NOW_BUTTON.classList.add("button"),TRY_NOW_BUTTON.classList.add("primary"),TRY_NOW_BUTTON.classList.add("small"),TRY_NOW_BUTTON.classList.add("try-now-button"),TRY_NOW_BUTTON.innerText="Try it now",SELECT_ELEMENT.classList.add("plan-options-selector"),addPlanOption(0,"View a Different Plan",!0),addPlanOption(1,"Free"),addPlanOption(2,"Business"),addPlanOption(3,"
1Enterprise"),SELECT_ELEMENT.onchange=()=>{setSelectedPlan(SELECT_ELEMENT.value,!0)};for(let i=0;i<OPTION_CARDS.length;i++)OPTION_CARDS[i].onclick=()=>{setSelectedPlan(i+1)},OPTION_DOTS[i].onclick=()=>{setSelectedPlan(i+1)};"loading"!=document.readyState?setSelectedPlan():document.addEventListener("DOMContentLoaded",setSelectedPlan); 2//# sourceURL=https://9035810.fs1.hubspotusercontent-na1.net/hubfs/9035810/hub_generated/template_assets/1/145808171704/1790762580305/template_pricing.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.