let intervalID;function setMenuThemeColor(dataset){var body=document.querySelector("body");if(dataset.menuColor=="True"){if(!body.classList.contains("menu-theme-white")){body.classList.add("menu-theme-white");body.classList.remove("menu-theme-grey");}}else{if(!body.classList.contains("menu-theme-grey")){body.classList.add("menu-theme-grey");body.classList.remove("menu-theme-white");}}}
function cardsSliderSingleCss(column1,column2){let HeroSingle=document.querySelector(".Hero.active");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column1Pos").classList.add(column1);HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column2Pos").classList.add(column2);}
function AdjustCardPositionBasedOnContentSingle(){contentHeight=document.querySelector(".Hero.active .textPlacement").getBoundingClientRect().height;document.querySelector(".cardsColumnsArea .column1Pos").style.removeProperty("margin-top");document.querySelector(".cardsColumnsArea .column2Pos").style.removeProperty("margin-top");var mediaQueryCompact='screen and (min-width:1440px) and (max-height:899px)';var matchesCompact=window.matchMedia(mediaQueryCompact).matches;var mediaQueryDefault='screen and (min-width:1200px) and (min-height: 900px)';var matchesDefault=window.matchMedia(mediaQueryDefault).matches;var mediaQueryMostCompact='screen and (min-width:1200px) and (max-width:1439px) and (max-height:899px)';var matchesMostCompact=window.matchMedia(mediaQueryMostCompact).matches;var mediaQueryMostCompact2='screen and (min-width:1024px) and (max-width:1199px)';var matchesMostCompact2=window.matchMedia(mediaQueryMostCompact2).matches;let HeroSingle=document.querySelector(".Hero.active");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosFewContent");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosFewContent");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosSomeContentLargeScreen");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosSomeContentLargeScreen");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosBigContentLargeScreen");HeroSingle.nextElementSibling.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosBigContentLargeScreen");if(matchesDefault&&HeroSingle!=undefined){if(window.innerWidth<=1440){if(contentHeight<350){cardsSliderSingleCss("column1PosFewContent","column2PosFewContent");}else if(contentHeight<470){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}else if(contentHeight<570){cardsSliderSingleCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen");}}else{if(contentHeight<350){cardsSliderSingleCss("column1PosFewContent","column2PosFewContent");}else if(contentHeight<450){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}else if(contentHeight<570){cardsSliderSingleCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen");}}}
else if(matchesCompact&&HeroSingle!=undefined){if(window.innerWidth==1440){if(contentHeight<350){cardsSliderSingleCss("column1PosFewContent","column2PosFewContent");}else if(contentHeight<425){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}else if(contentHeight<520){cardsSliderSingleCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen");}}else{if(contentHeight<350){cardsSliderSingleCss("column1PosFewContent","column2PosFewContent");}else if(contentHeight<430){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}else if(contentHeight<530){cardsSliderSingleCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen");}}}
else if(matchesMostCompact&&HeroSingle!=undefined){if(contentHeight<360){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}else if(contentHeight<460){cardsSliderSingleCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen");}}
else if(matchesMostCompact2&&HeroSingle!=undefined){if(contentHeight<350){cardsSliderSingleCss("column1PosFewContent","column2PosFewContent");}else if(contentHeight<450){cardsSliderSingleCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen");}}}
function cardsSliderCss(column1,column2,ind){let HeroHomepageItem=document.querySelector(".HeroHomepageItem");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column1Pos").classList.add(column1);HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column2Pos").classList.add(column2);HeroHomepageItem.parentElement.parentElement.querySelector(".IndProp").classList.add(ind);}
function AdjustCardPositionBasedOnContent(){var biggerElem=document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[0];var biggerContent=0;for(var i=0;i<document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement").length;i++){biggerElem.parentElement.parentElement.style.display="block";biggerContent=biggerElem.getBoundingClientRect().height;document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[i].parentElement.parentElement.style.display="block";if(biggerContent<document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[i].getBoundingClientRect().height){biggerElem.parentElement.parentElement.style.removeProperty("display");biggerElem=document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[i];biggerContent=document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[i].getBoundingClientRect().height;}
document.querySelectorAll(".HeroHomepageItem .Hero .textPlacement")[i].parentElement.parentElement.style.removeProperty("display");}
if(biggerElem!=undefined)
biggerElem.parentElement.parentElement.style.removeProperty("display");document.querySelector(".cardsColumnsArea .column1Pos").style.removeProperty("margin-top");document.querySelector(".cardsColumnsArea .column2Pos").style.removeProperty("margin-top");var mediaQueryCompact='screen and (min-width:1440px) and (max-height:899px)';var matchesCompact=window.matchMedia(mediaQueryCompact).matches;var mediaQueryDefault='screen and (min-width:1200px) and (min-height: 900px)';var matchesDefault=window.matchMedia(mediaQueryDefault).matches;var mediaQueryMostCompact='screen and (min-width:1200px) and (max-width:1439px) and (max-height:899px)';var matchesMostCompact=window.matchMedia(mediaQueryMostCompact).matches;var mediaQueryMostCompact2='screen and (min-width:1024px) and (max-width:1199px)';var matchesMostCompact2=window.matchMedia(mediaQueryMostCompact2).matches;let HeroHomepageItem=document.querySelector(".HeroHomepageItem");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosFewContent");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosFewContent");HeroHomepageItem.parentElement.parentElement.querySelector(".IndProp").classList.remove("IndPropFewContent");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosSomeContentLargeScreen");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosSomeContentLargeScreen");HeroHomepageItem.parentElement.parentElement.querySelector(".IndProp").classList.remove("IndPropSomeContentLargeScreen");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column1Pos").classList.remove("column1PosBigContentLargeScreen");HeroHomepageItem.parentElement.parentElement.nextElementSibling.querySelector(".column2Pos").classList.remove("column2PosBigContentLargeScreen");HeroHomepageItem.parentElement.parentElement.querySelector(".IndProp").classList.remove("IndPropBigContentLargeScreen");if(matchesDefault&&HeroHomepageItem!=undefined){if(window.innerWidth<=1440){if(biggerContent<350){cardsSliderCss("column1PosFewContent","column2PosFewContent","IndPropFewContent");}else if(biggerContent<470){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}else if(biggerContent<570){cardsSliderCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen","IndPropBigContentLargeScreen");}}else{if(biggerContent<350){cardsSliderCss("column1PosFewContent","column2PosFewContent","IndPropFewContent");}else if(biggerContent<450){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}else if(biggerContent<570){cardsSliderCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen","IndPropBigContentLargeScreen");}}}
else if(matchesCompact&&HeroHomepageItem!=undefined){if(window.innerWidth==1440){if(biggerContent<350){cardsSliderCss("column1PosFewContent","column2PosFewContent","IndPropFewContent");}else if(biggerContent<425){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}else if(biggerContent<520){cardsSliderCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen","IndPropBigContentLargeScreen");}}else{if(biggerContent<350){cardsSliderCss("column1PosFewContent","column2PosFewContent","IndPropFewContent");}else if(biggerContent<430){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}else if(biggerContent<530){cardsSliderCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen","IndPropBigContentLargeScreen");}}}
else if(matchesMostCompact&&HeroHomepageItem!=undefined){if(biggerContent<360){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}else if(biggerContent<460){cardsSliderCss("column1PosBigContentLargeScreen","column2PosBigContentLargeScreen","IndPropBigContentLargeScreen");}}
else if(matchesMostCompact2&&HeroHomepageItem!=undefined){if(biggerContent<350){cardsSliderCss("column1PosFewContent","column2PosFewContent","IndPropFewContent");}else if(biggerContent<450){cardsSliderCss("column1PosSomeContentLargeScreen","column2PosSomeContentLargeScreen","IndPropSomeContentLargeScreen");}}}
window.addEventListener("optimizedResize",function(){const slideProp=document.querySelector(".carousel.slide.SlideProp")
if(window.scrollY==0&&slideProp!=null){slideProp.style.removeProperty("height");}
var mediaQueryDefault='screen and (min-width:1200px) and (min-height: 900px)';var matchesDefault=window.matchMedia(mediaQueryDefault).matches;for(var i=0;i<document.querySelectorAll(".textPlacement .btnPlace .button").length;i++){if(matchesDefault){if(!document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.contains("large")){document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.replace("medium","large");}}else{if(document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.contains("large")){document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.replace("large","medium");}}}
if(itemCount!=1){AdjustCardPositionBasedOnContent();}else{AdjustCardPositionBasedOnContentSingle();}});MBCP.DocumentReady(function(){var colorCardAccount="";var slide0=document.getElementById('HeroSlider_0');if(slide0){slide0.classList.add('active');colorCardAccount=slide0.dataset.cardColor;setMenuThemeColor(slide0.dataset);}
var indicator0=document.getElementById('indicator_0');if(indicator0){indicator0.classList.add('active');if(indicator0.classList.contains("isDark")){document.querySelectorAll(".tooltipPopUp button").forEach(item=>{item.classList.add("dark");})}}
var cardsConta=document.querySelectorAll(".cardConta");for(var i=0;i<cardsConta.length;i++){if(colorCardAccount=="d1005d"){cardsConta[i].classList.add("cardSegurancaCerize");cardsConta[i].classList.remove("cardSegurancaPurple");}
if(colorCardAccount=="5c3296"){cardsConta[i].classList.remove("cardSegurancaCerize");cardsConta[i].classList.add("cardSegurancaPurple");}}
if(itemCount!=1){for(var i=0;i<document.querySelectorAll(".carousel-item .disclaimer").length;i++){document.querySelectorAll(".carousel-item .disclaimer")[i].classList.add("fadeInAnimationScroll");}
for(var i=0;i<document.querySelectorAll(".carousel-item .campanhaHero").length;i++){document.querySelectorAll(".carousel-item .campanhaHero")[i].classList.add("fadeInAnimationScroll");}
for(var i=0;i<document.querySelectorAll(".carousel-item .Hero .textPlacement .btnPlace").length;i++){document.querySelectorAll(".carousel-item .Hero .textPlacement .btnPlace")[i].classList.add("fadeInAnimationScroll");}
for(var i=0;i<document.querySelectorAll(".carousel-item .body-copy").length;i++){document.querySelectorAll(".carousel-item .body-copy")[i].classList.add("fadeInAnimationScroll");}
for(var i=0;i<document.querySelectorAll(".carousel-item .subtitle-hero").length;i++){document.querySelectorAll(".carousel-item .subtitle-hero")[i].classList.add("fadeInAnimationScroll");}}
else{if(document.querySelector(".Hero.active .disclaimer")!=null){document.querySelector(".Hero.active .disclaimer").classList.add("fadeInAnimationScroll");}
if(document.querySelector(".Hero.active .campanhaHero")!=null){document.querySelector(".Hero.active .campanhaHero").classList.add("fadeInAnimationScroll");}
if(document.querySelector(".Hero.active .textPlacement .btnPlace")!=null){document.querySelector(".Hero.active .textPlacement .btnPlace").classList.add("fadeInAnimationScroll");}
if(document.querySelector(".Hero.active .body-copy")!=null){document.querySelector(".Hero.active .body-copy").classList.add("fadeInAnimationScroll");}
if(document.querySelector(".Hero.active .subtitle-hero")!=null){document.querySelector(".Hero.active .subtitle-hero").classList.add("fadeInAnimationScroll");}
if(document.querySelector(".Hero.active .title-hero")!=null){document.querySelector(".Hero.active .title-hero").classList.add("fadeInAnimationScroll");}}
var mediaQueryDefault='screen and (min-width:1200px) and (min-height: 900px)';var matchesDefault=window.matchMedia(mediaQueryDefault).matches;for(var i=0;i<document.querySelectorAll(".textPlacement .btnPlace .button").length;i++){if(matchesDefault){if(!document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.contains("large")){document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.replace("medium","large");}}else{if(document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.contains("large")){document.querySelectorAll(".textPlacement .btnPlace .button")[i].classList.replace("large","medium");}}}
if(itemCount!=1){AdjustCardPositionBasedOnContent();}else{AdjustCardPositionBasedOnContentSingle();}
window.addEventListener("scroll",function(){ReadyOnScroll()});if(itemCount!=1){const myCarousel=document.getElementById("carouselHeroHP");const carouselIndicators=myCarousel.querySelectorAll(".carousel-indicators button span");const carousel=new bootstrap.Carousel(myCarousel);let timerSlide;if(timer!=null&&timer>0){timerSlide=timer*10;}else{timerSlide=80;}
document.addEventListener("visibilitychange",()=>{if(document.hidden){carousel._config.pause=true;}else{carousel._config.pause=false;}});fillCarouselIndicator(1);myCarousel.addEventListener("slide.bs.carousel",function(e){let elem=document.querySelector(".animationWhiteTimers");let elemDark=document.querySelector(".animationDarkTimers");if(elem!=null){elem.classList.remove("animationWhiteTimers");}
if(elemDark!=null){elemDark.classList.remove("animationDarkTimers");}
let index=e.to;var element=document.querySelectorAll('.tooltipPopUp button[data-bs-slide-to]');for(var i=0;i<element.length;i++){if(element[i].getAttribute("data-bs-slide-to")==index){setMenuThemeColor(document.querySelectorAll(".HeroHomepageItem")[index].dataset);if(element[i].classList.contains("isDark")){for(var p=0;p<element.length;p++){if(!element[p].classList.contains("dark")){element[p].classList.add("dark");}}}else{for(var t=0;t<element.length;t++){element[t].classList.remove("dark");}}}}
fillCarouselIndicator(++index);});function fillCarouselIndicator(index){let i=0;for(const carouselIndicator of carouselIndicators){carouselIndicator.style.width=0;}
clearInterval(intervalID);carousel._config.pause=true;if(flag==true){carousel._config.pause=false;intervalID=setInterval(function(){i++;myCarousel.querySelector(".carousel-indicators .active span").style.width=i+"%";if(i>=100){carousel.next();flag=true;}},timerSlide);}else{carousel._config.pause=true;clearInterval(intervalID);flag=false;}}}});var lastScrollTop=0;function ReadyOnScroll(){const hero=document.querySelector("[data-alias='hero-sliderHp']");if(hero){const heroIsInViewport=Math.abs(hero.getBoundingClientRect().top)<hero.getBoundingClientRect().height;const mediaQuery='screen and (min-width: 1024px)';const matchesDesktop=window.matchMedia(mediaQuery).matches;if(heroIsInViewport&&matchesDesktop){AnimationHeroSliderScroll();}}}
function toBool(string){if(string==='true'){return true;}else{return false;}}
var target=document.querySelectorAll("#carouselHeroHP .carousel-item")[0];if(typeof window.dataLayer!=='undefined'){TargetDatasetValidate('seen_banner','banner','hero_slider_hp',target);}
else{console.log("dataLayer does not exists")}
document.querySelectorAll("#carouselHeroHP .carousel-item a").forEach((target)=>{target.addEventListener('click',event=>{var link=event.currentTarget;var target=link.closest(".carousel-item");window.dataLayer=window.dataLayer||[];if(typeof window.dataLayer!=='undefined'){TargetDatasetValidate('click_banner','banner','hero_slider_hp',target);}
else{console.log("dataLayer does not exists")}
return true;});});var flag=true;const myCarousel=document.getElementById('carouselHeroHP')
var carouselLength=0
if(myCarousel!=null){carouselLength=myCarousel.getElementsByClassName('carousel-item').length;myCarousel.addEventListener('slide.bs.carousel',event=>{var target=event.relatedTarget;window.dataLayer=window.dataLayer||[];if(typeof window.dataLayer!=='undefined'){TargetDatasetValidate('seen_banner','banner','hero_slider_hp',target);}
else{console.log("dataLayer does not exists")}
if(event.to==0){myCarousel.getElementsByClassName('carousel-control-prev')[0].classList.add("firstorlast");myCarousel.getElementsByClassName('carousel-control-next')[0].classList.remove("firstorlast");}
else if(event.to==(carouselLength-1)){myCarousel.getElementsByClassName('carousel-control-next')[0].classList.add("firstorlast");myCarousel.getElementsByClassName('carousel-control-prev')[0].classList.remove("firstorlast");}
else{myCarousel.getElementsByClassName('carousel-control-prev')[0].classList.remove("firstorlast");myCarousel.getElementsByClassName('carousel-control-next')[0].classList.remove("firstorlast");}
if(target!=undefined&&target.dataset!=undefined)
setMenuThemeColor(target.dataset);var colorCardAccount=(target!=undefined&&target.dataset!=undefined)?target.dataset.cardColor:"";var cardsConta=document.querySelectorAll(".cardConta");for(var i=0;i<cardsConta.length;i++){if(colorCardAccount=="d1005d"&&!cardsConta[i].classList.contains("cardSegurancaCerize")){cardsConta[i].classList.add("cardSegurancaCerize");cardsConta[i].classList.remove("cardSegurancaPurple");}
if(colorCardAccount=="5c3296"&&!cardsConta[i].classList.contains("cardSegurancaPurple")){cardsConta[i].classList.remove("cardSegurancaCerize");cardsConta[i].classList.add("cardSegurancaPurple");}}});}
function TargetDatasetValidate(_event,_item_category,_item_type,_target){let targetTitle,targetButton,targetSlideIndex,targetImage,targetCampaign="";if(_target!=undefined&&_target.dataset!=undefined){targetTitle=_target.dataset.title;targetButton=_target.dataset.button;targetSlideIndex=_target.dataset.slideindex;targetImage=_target.dataset.image;targetCampaign=_target.dataset.campaign;}
dataLayer.push({'event':_event,'screen_name':window.location.pathname+window.location.search,'item_category':_item_category,'item_type':_item_type,'eName':targetTitle,'eLabel':targetButton,'position':targetSlideIndex,'image_url':targetImage,'banner_campaign':targetCampaign});}
function isElementXPercentInViewport(el,percentVisible){let
rect=el.getBoundingClientRect(),windowHeight=(window.innerHeight||document.documentElement.clientHeight);return!(Math.floor(100-(((rect.top>=0?0:rect.top)/ +-rect.height)*100))<percentVisible||Math.floor(100-((rect.bottom-windowHeight)/rect.height)*100)<percentVisible)};mouseoverBTN=function(){var mediaQuery='screen and (min-width: 1024px)';var matchesSmallDesktop=window.matchMedia(mediaQuery).matches;if(matchesSmallDesktop){let elem=document.querySelector(".animationWhiteTimers");let elemDark=document.querySelector(".animationDarkTimers");if(elem!=null){elem.classList.remove("animationWhiteTimers");}
if(elemDark!=null){elemDark.classList.remove("animationDarkTimers");}
let initialScale=3;let scale=initialScale;let reduction=1;let nextSibling=this.parentElement.nextElementSibling;let previousSibling=this.parentElement.previousElementSibling;this.classList.add('scale'+scale);if(nextSibling!=null){while(nextSibling){if(scale>2){scale=scale-reduction;nextSibling.firstElementChild.classList.add('scale'+scale);}
nextSibling=nextSibling.nextElementSibling;}}
scale=initialScale;if(previousSibling!=null){while(previousSibling){if(scale>2){scale=scale-reduction;previousSibling.firstElementChild.classList.add('scale'+scale);}
previousSibling=previousSibling.previousElementSibling;}}}};mouseoutBTN=function(){var mediaQuery='screen and (min-width: 1024px)';var matchesSmallDesktop=window.matchMedia(mediaQuery).matches;if(matchesSmallDesktop){if(this.classList.contains("scale3")){this.classList.remove("scale3");}else if(this.classList.contains("scale2")){this.classList.remove("scale2");}
let nextSibling=this.parentElement.nextElementSibling;let previousSibling=this.parentElement.previousElementSibling;if(nextSibling!=null){while(nextSibling){if(nextSibling.firstElementChild.classList.contains("scale3")){nextSibling.firstElementChild.classList.remove("scale3");}else if(nextSibling.firstElementChild.classList.contains("scale2")){nextSibling.firstElementChild.classList.remove("scale2");}
nextSibling=nextSibling.nextElementSibling;}}
if(previousSibling!=null){while(previousSibling){if(previousSibling.firstElementChild.classList.contains("scale3")){previousSibling.firstElementChild.classList.remove("scale3");}else if(previousSibling.firstElementChild.classList.contains("scale2")){previousSibling.firstElementChild.classList.remove("scale2");}
previousSibling=previousSibling.previousElementSibling;}}}};mouseoverTimerArea=function(){var mediaQuery='screen and (min-width: 1024px)';var matchesSmallDesktop=window.matchMedia(mediaQuery).matches;if(matchesSmallDesktop){document.querySelectorAll(".tooltipPopUp").forEach((item)=>{item.firstElementChild.classList.add("scale");});}};mouseoutTimerArea=function(){var mediaQuery='screen and (min-width: 1024px)';var matchesSmallDesktop=window.matchMedia(mediaQuery).matches;if(matchesSmallDesktop){document.querySelectorAll(".tooltipPopUp").forEach((item)=>{item.firstElementChild.style.transition='all .3s ease-in-out ';item.firstElementChild.classList.remove("scale");});}};function AnimationHeroSliderScroll(){var elemSingle;if(itemCount==1){elemSingle=document.querySelector(".Hero.active");}
var elem;if(document.querySelector(".HeroHomepageItem.active")!=null){elem=document.querySelector(".HeroHomepageItem.active");}else{elem=document.querySelector(".Hero.active");}
var carousel;if(myCarousel!=null){carousel=new bootstrap.Carousel(myCarousel);}
var st=window.scrollY||document.documentElement.scrollTop;var min=0;var max=1;var contentPosition=elem.dataset.contentDataPosition;var showCampaign=elem.dataset.showCamp;var threshold=0.1;var cardsArea=document.querySelector(".cardsColumnsArea");var content;if(contentPosition=="Right"){if(itemCount!=1){content=elem.children[0].children[2].children[0].children[0].children[1];}else{content=elem.children[2].children[0].children[0].children[1];}}else{if(itemCount!=1){content=elem.children[0].children[2].children[0].children[0].children[0];}else{content=elem.children[2].children[0].children[0].children[0];}}
var titleTop,disclaimerTop,buttonTop,campanhaTop,subtitleTop,bodyCopyTop;if(showCampaign=="True"){titleTop=content.querySelector(".title-hero");subtitleTop=content.querySelector(".subtitle.subtitle-hero");bodyCopyTop=content.querySelector(".body-copy");disclaimerTop=content.querySelector(".disclaimer");campanhaTop=content.querySelector(".campanhaHero");buttonTop=content.querySelector(".btnPlace");}else{titleTop=content.querySelector(".title-hero");subtitleTop=content.querySelector(".subtitle.subtitle-hero");bodyCopyTop=content.querySelector(".body-copy");disclaimerTop=content.querySelector(".disclaimer");campanhaTop=null;buttonTop=content.querySelector(".btnPlace");}
var mediaQueryCompact='screen and (min-width:1440px) and (max-height:899px)';var matchesCompact=window.matchMedia(mediaQueryCompact).matches;var mediaQueryDefault='screen and (min-width:1200px) and (min-height: 900px)';var matchesDefault=window.matchMedia(mediaQueryDefault).matches;var mediaQueryMostCompact='screen and (min-width:1200px) and (max-width:1439px) and (max-height:899px)';var matchesMostCompact=window.matchMedia(mediaQueryMostCompact).matches;var mediaQueryMostCompact2='screen and (min-width:1024px) and (max-width:1199px)';var matchesMostCompact2=window.matchMedia(mediaQueryMostCompact2).matches;const cardsTitleTop=titleTop.getBoundingClientRect().top;if(matchesDefault){if(st>lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height>400&&(myCarousel.getBoundingClientRect().height-10)>=400){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height - 10}px`;}else{myCarousel.style.height="400px";}
carousel._config.pause=true;clearInterval(intervalID);flag=false;}else{if(elemSingle.getBoundingClientRect().height>400&&(elemSingle.getBoundingClientRect().height-10)>=400){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height - 10}px`;}else{elemSingle.style.height="400px";}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){if(window.innerWidth<=1440){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-326px";}else{}}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){if(window.innerWidth<=1440){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-260px";}else{}}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}else if(st<lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height<896&&(myCarousel.getBoundingClientRect().height-10)<=896){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height + 10}px`;}else{myCarousel.style.height="896px";}
if(!document.body.classList.contains("with-offset")){myCarousel.style.height="896px";flag=true;bootstrap.Carousel.getInstance(myCarousel).next();lastScrollTop=0;st=0;}}else{if(elemSingle.getBoundingClientRect().height<896&&(elemSingle.getBoundingClientRect().height-10)<=896){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height + 10}px`;}else{elemSingle.style.height="896px";}
if(!document.body.classList.contains("with-offset")){elemSingle.style.height="896px";lastScrollTop=0;st=0;}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){if(window.innerWidth<=1440){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-326px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-326px";}}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){if(window.innerWidth<=1440){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-260px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-260px";}}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}}
if(matchesCompact){if(st>lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height>400&&(myCarousel.getBoundingClientRect().height-10)>=400){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height - 10}px`;}else{myCarousel.style.height="400px";}
carousel._config.pause=true;clearInterval(intervalID);flag=false;}else{if(elemSingle.getBoundingClientRect().height>400&&(elemSingle.getBoundingClientRect().height-10)>=400){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height - 10}px`;}else{elemSingle.style.height="400px";}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-250px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-184px";}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}else if(st<lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height<813&&(myCarousel.getBoundingClientRect().height+10)<=813){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height + 10}px`;}else{myCarousel.style.height="813px";}
if(!document.body.classList.contains("with-offset")){myCarousel.style.height="813px";flag=true;bootstrap.Carousel.getInstance(myCarousel).next();lastScrollTop=0;st=0;}}else{if(elemSingle.getBoundingClientRect().height<813&&(elemSingle.getBoundingClientRect().height+10)<=813){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height + 10}px`;}else{elemSingle.style.height="813px";}
if(!document.body.classList.contains("with-offset")){elemSingle.style.height="813px";lastScrollTop=0;st=0;}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-250px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-184px";}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}}
if(matchesMostCompact){if(st>lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height>400&&(myCarousel.getBoundingClientRect().height-10)>=400){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height - 10}px`;}else{myCarousel.style.height="400px";}
carousel._config.pause=true;clearInterval(intervalID);flag=false;}else{if(elemSingle.getBoundingClientRect().height>400&&(elemSingle.getBoundingClientRect().height-10)>=400){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height - 10}px`;}else{elemSingle.style.height="400px";}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}else if(st<lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height<756&&(myCarousel.getBoundingClientRect().height+10)<=756){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height + 10}px`;}else{myCarousel.style.height="756px";}
if(!document.body.classList.contains("with-offset")){myCarousel.style.height="756px";flag=true;bootstrap.Carousel.getInstance(myCarousel).next();lastScrollTop=0;st=0;}}else{if(elemSingle.getBoundingClientRect().height<756&&(elemSingle.getBoundingClientRect().height+10)<=756){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height + 10}px`;}else{elemSingle.style.height="756px";}
if(!document.body.classList.contains("with-offset")){elemSingle.style.height="756px";lastScrollTop=0;st=0;}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-196px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-100px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-130px";}
else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column1PosBigContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-34px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}}
if(matchesMostCompact2){if(st>lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height>400&&(myCarousel.getBoundingClientRect().height-10)>=400){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height - 10}px`;}else{myCarousel.style.height="400px";}
carousel._config.pause=true;clearInterval(intervalID);flag=false;}else{if(elemSingle.getBoundingClientRect().height>400&&(elemSingle.getBoundingClientRect().height-10)>=400){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height - 10}px`;}else{elemSingle.style.height="400px";}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-184px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-65px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-118px";}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="1px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}else if(st<lastScrollTop){if(itemCount!=1){if(myCarousel.getBoundingClientRect().height<732&&(myCarousel.getBoundingClientRect().height+10)<=732){myCarousel.style.height=`${myCarousel.getBoundingClientRect().height + 10}px`;}else{myCarousel.style.height="732px";}
if(!document.body.classList.contains("with-offset")){myCarousel.style.height="732px";flag=true;bootstrap.Carousel.getInstance(myCarousel).next();lastScrollTop=0;st=0;}}else{if(elemSingle.getBoundingClientRect().height<732&&(elemSingle.getBoundingClientRect().height+10)<=732){elemSingle.style.height=`${elemSingle.getBoundingClientRect().height + 10}px`;}else{elemSingle.style.height="732px";}
if(!document.body.classList.contains("with-offset")){elemSingle.style.height="732px";lastScrollTop=0;st=0;}}
if(window.scrollY>30&&window.scrollY<40){if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosFewContent")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-184px";}else if(document.querySelector(".cardsColumnsArea .column1Pos").classList.contains("column1PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-65px";}else{document.querySelector(".cardsColumnsArea .column1Pos").style.marginTop="-42px";}
if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosFewContent")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="-118px";}else if(document.querySelector(".cardsColumnsArea .column2Pos").classList.contains("column2PosSomeContentLargeScreen")){document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="1px";}else{document.querySelector(".cardsColumnsArea .column2Pos").style.marginTop="24px";}}}}
lastScrollTop=st<=0?0:st;if(document.querySelector(".IndProp")!=null){if(window.scrollY>0){document.querySelector(".IndProp").classList.add("fadeOutAnimationScroll");document.querySelector(".IndProp").classList.remove("fadeInAnimationScroll");}else{document.querySelector(".IndProp").classList.remove("fadeOutAnimationScroll");document.querySelector(".IndProp").classList.add("fadeInAnimationScroll");}}
var marginCard=0;if(matchesDefault){if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosFewContent")){marginCard=326;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosSomeContentLargeScreen")){marginCard=196;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosBigContentLargeScreen")){marginCard=100;}else{marginCard=42;}}else if(matchesCompact){if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosFewContent")){marginCard=250;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosSomeContentLargeScreen")){marginCard=196;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosBigContentLargeScreen")){marginCard=100;}else{marginCard=42;}}else if(matchesMostCompact){if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosSomeContentLargeScreen")){marginCard=196;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosBigContentLargeScreen")){marginCard=100;}else{marginCard=42;}}else if(matchesMostCompact2){if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosFewContent")){marginCard=184;}else if(cardsArea.querySelector(".column1Pos").classList.contains("column1PosSomeContentLargeScreen")){marginCard=65;}else{marginCard=42;}}
if(itemCount!=1){if(document.querySelector(".carousel-item.active .disclaimer")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-disclaimerTop.getBoundingClientRect().top-disclaimerTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .disclaimer").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .disclaimer").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .disclaimer").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}else{document.querySelector(".carousel-item.active .disclaimer").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .disclaimer").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .disclaimer").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}
if(document.querySelector(".carousel-item.active .campanhaHero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-campanhaTop.getBoundingClientRect().top-campanhaTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .campanhaHero").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .campanhaHero").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .campanhaHero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}
else{document.querySelector(".carousel-item.active .campanhaHero").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .campanhaHero").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .campanhaHero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}
if(document.querySelector(".carousel-item.active .Hero .textPlacement .btnPlace")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-buttonTop.getBoundingClientRect().top-buttonTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .Hero .textPlacement .btnPlace").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .Hero .textPlacement .btnPlace").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .Hero .textPlacement .btnPlace").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}
else{document.querySelector(".carousel-item.active .Hero .textPlacement .btnPlace").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .Hero .textPlacement .btnPlace").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .Hero .textPlacement .btnPlace").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}
if(document.querySelector(".carousel-item.active .body-copy")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-bodyCopyTop.getBoundingClientRect().top-bodyCopyTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .body-copy").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .body-copy").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .body-copy").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}
else{document.querySelector(".carousel-item.active .body-copy").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .body-copy").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .body-copy").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}
if(document.querySelector(".carousel-item.active .subtitle-hero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-subtitleTop.getBoundingClientRect().top-subtitleTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .subtitle-hero").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .subtitle-hero").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .subtitle-hero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}
else{document.querySelector(".carousel-item.active .subtitle-hero").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .subtitle-hero").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .subtitle-hero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}
if(document.querySelector(".carousel-item.active .title-hero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-titleTop.getBoundingClientRect().top-titleTop.getBoundingClientRect().height<20){document.querySelector(".carousel-item.active .title-hero").classList.add("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .title-hero").classList.remove("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .title-hero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}
else{document.querySelector(".carousel-item.active .title-hero").classList.remove("fadeOutAnimationScroll");document.querySelector(".carousel-item.active .title-hero").classList.add("fadeInAnimationScroll");document.querySelectorAll(".carousel-item .title-hero").forEach((item)=>{if(!item.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.contains("active")){item.classList.remove("fadeOutAnimationScroll");item.classList.add("fadeInAnimationScroll");}})}}}else{if(document.querySelector(".Hero.active .disclaimer")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-disclaimerTop.getBoundingClientRect().top-disclaimerTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active .disclaimer").classList.add("fadeOutAnimationScroll");document.querySelector(".Hero.active .disclaimer").classList.remove("fadeInAnimationScroll");}else{document.querySelector(".Hero.active .disclaimer").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active .disclaimer").classList.add("fadeInAnimationScroll");}}
if(document.querySelector(".Hero.active .campanhaHero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-campanhaTop.getBoundingClientRect().top-campanhaTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active .campanhaHero").classList.add("fadeOutAnimationScroll");document.querySelector(".Hero.active .campanhaHero").classList.remove("fadeInAnimationScroll");}
else{document.querySelector(".Hero.active .campanhaHero").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active .campanhaHero").classList.add("fadeInAnimationScroll");}}
if(document.querySelector(".Hero.active  .textPlacement .btnPlace")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-buttonTop.getBoundingClientRect().top-buttonTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active  .textPlacement .btnPlace").classList.add("fadeOutAnimationScroll");document.querySelector(".Hero.active .textPlacement .btnPlace").classList.remove("fadeInAnimationScroll");}
else{document.querySelector(".Hero.active  .textPlacement .btnPlace").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active  .textPlacement .btnPlace").classList.add("fadeInAnimationScroll");}}
if(document.querySelector(".Hero.active .body-copy")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-bodyCopyTop.getBoundingClientRect().top-bodyCopyTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active .body-copy").classList.add("fadeOutAnimationScroll");document.querySelector(".Hero.active .body-copy").classList.remove("fadeInAnimationScroll");}
else{document.querySelector(".Hero.active .body-copy").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active .body-copy").classList.add("fadeInAnimationScroll");}}
if(document.querySelector(".Hero.active .subtitle-hero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-subtitleTop.getBoundingClientRect().top-subtitleTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active .subtitle-hero").classList.add("fadeOutAnimationScroll");document.querySelector(".Hero.active .subtitle-hero").classList.remove("fadeInAnimationScroll");}
else{document.querySelector(".Hero.active .subtitle-hero").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active .subtitle-hero").classList.add("fadeInAnimationScroll");}}
if(document.querySelector(".Hero.active .title-hero")!=null){if((cardsArea.getBoundingClientRect().top-marginCard)-titleTop.getBoundingClientRect().top-titleTop.getBoundingClientRect().height<20){document.querySelector(".Hero.active .title-hero").classList.add("fadeOutAnimationScroll");document.querySelector(".Heroactive .title-hero").classList.remove("fadeInAnimationScroll");}
else{document.querySelector(".Hero.active .title-hero").classList.remove("fadeOutAnimationScroll");document.querySelector(".Hero.active .title-hero").classList.add("fadeInAnimationScroll");}}}}
MBCP.AddEvent(".carousel-indicators.IndProp button",'mouseover',mouseoverBTN);MBCP.AddEvent(".carousel-indicators.IndProp button",'mouseout',mouseoutBTN);MBCP.AddEvent(".carousel-indicators.IndProp #timerArea",'mouseover',mouseoverTimerArea);MBCP.AddEvent(".carousel-indicators.IndProp #timerArea",'mouseout',mouseoutTimerArea);;;
let prevSliderID=-1;var alreadyFiltered=false;document.addEventListener("DOMContentLoaded",()=>{let catalogSliderItems=document.querySelectorAll('.cards-carouselCHS');for(var i=0;i<catalogSliderItems.length;i++){MBCP.BuildSwiperCards_CatalogHorizontalSlider(catalogSliderItems[i]);MBCP.BuildSwiperChips_CatalogHorizontalSlider(catalogSliderItems[i]);}});document.querySelectorAll(".chipsAreaCatalogHorizontalSlider .chips-track .buttonGroup button").forEach((target)=>{target.addEventListener('click',event=>{window.dataLayer=window.dataLayer||[];if(typeof window.dataLayer!=='undefined'){dataLayer.push({'event':'custom_event','screen_name':window.location.pathname+window.location.search,'item_category':'filtros_catalog_slider','item_type':target.dataset.type,'eName':target.dataset.name,});}
else{console.log("dataLayer does not exists")}
return true;});});MBCP.BuildSwiperCards_CatalogHorizontalSlider=function(catalogSliderItem){let centerAreaElement=catalogSliderItem.querySelector('.centerCatalogHorizontalSlider');let container=catalogSliderItem.querySelector('.catalogHorizontalSliderCardContainer');let swiperDiv=catalogSliderItem.querySelector("[data-id='"+container.id+"']");let nextKey='.next-'+container.id.substring(0,6);let prevKey='.prev-'+container.id.substring(0,6);var mySwiper=new Swiper(swiperDiv,{slidesPerView:'auto',draggable:true,centeredSlides:false,watchOverflow:true,speed:600,navigation:{prevEl:prevKey,nextEl:nextKey,},breakpoint:{1024:{slidesPerView:1,centeredSlides:true,}},});if(catalogSliderItem.querySelector(".chipsAreaCatalogHorizontalSlider")!==null){let filter=catalogSliderItem.querySelector(".catalogHorizontalSliderChips0").dataset.filter;let filteredSlides=centerAreaElement.querySelectorAll('.filter-'+filter);let allSlides=mySwiper.slides;allSlides.forEach(item=>{if(!item.classList.contains('filter-'+filter)){item.classList.add("hidden-slide");item.classList.remove("swiper-slide");}})
mySwiper.update();}
disableNavigation(mySwiper);centerAreaElement.querySelectorAll('.swiper-slide').forEach(function(slide,index){slide.addEventListener("click",function(){mySwiper.slideTo(slide.ariaLabel.substring(0,slide.ariaLabel.indexOf(' '))-1);disableNavigation(mySwiper);});if(slide.children[0].classList.contains('cardsimulador')){slide.children[0].addEventListener('mouseenter',handleMouseOver);slide.children[0].addEventListener('mouseleave',handleMouseOut);}});}
MBCP.BuildSwiperChips_CatalogHorizontalSlider=function(catalogSliderItem){function accessibilityFix(swiper){let prev=swiper.hostEl.querySelector(".swiper-button-prev");if(prev?.checkVisibility){prev.setAttribute("aria-hidden",!prev.checkVisibility());}
let next=swiper.hostEl.querySelector(".swiper-button-next");if(next?.checkVisibility){next.setAttribute("aria-hidden",!next.checkVisibility());}}
if(catalogSliderItem.querySelector(".chipsAreaCatalogHorizontalSlider")!==null)
catalogSliderItem.querySelector(".catalogHorizontalSliderChips0").classList.add("selected");let chipDiv=catalogSliderItem.querySelector('.chipsAreaCatalogHorizontalSlider');if(chipDiv!=null){let chipSwiperDiv=catalogSliderItem.querySelector("[data-id='"+chipDiv.id+"']");let chipsAreaElement=new Swiper(chipSwiperDiv,{centeredSlides:false,slidesPerView:'auto',freeMode:true,spaceBetween:16,dragable:true,slidesOffsetBefore:24,navigation:{nextEl:'.swiper-button-next.next-arrow.nextCatalogHorizontalSlider',prevEl:'.swiper-button-prev.prev-arrow.prevCatalogHorizontalSlider',},breakpoints:{375:{slidesOffsetBefore:24,slidesOffsetAfter:24,},768:{slidesOffsetBefore:48,slidesOffsetAfter:48,slidesToScroll:1,draggable:true,freemode:true,},991:{slidesToScroll:1,draggable:true,freemode:true,}},on:{afterInit:function(){accessibilityFix(this);},slideChange:function(){accessibilityFix(this);},sliderMove:function(){accessibilityFix(this);},}});chipsAreaElement.slides.forEach(function(slide,index){slide.addEventListener("click",function(){if(window.innerWidth<=991&&catalogSliderItem.querySelector(".chipsAreaCatalogHorizontalSlider")!==null){chipsAreaElement.slideTo(slide.ariaLabel.substring(0,slide.ariaLabel.indexOf(' '))-1);}});});}
if(window.innerWidth<=991&&catalogSliderItem.querySelector(".chipsAreaCatalogHorizontalSlider")!==null){document.querySelector('.swiper-button-next.next-arrow').classList.add("disabled");document.querySelector('.swiper-button-prev.prev-arrow').classList.add("disabled");}}
function disableNavigation(mySwiper){if(window.innerWidth>=1200&&window.innerWidth<=1441){if(mySwiper.slides.length=="2"){if(!mySwiper.slides[0].children[0].classList.contains("big-card")&&!mySwiper.slides[1].children[0].classList.contains("big-card")){mySwiper.navigation.nextEl.classList.add("swiper-button-disabled");mySwiper.navigation.prevEl.classList.add("swiper-button-disabled");}
else{mySwiper.navigation.nextEl.classList.remove("swiper-button-disabled");mySwiper.navigation.prevEl.classList.remove("swiper-button-disabled");mySwiper.navigation.update();}}
else{mySwiper.navigation.nextEl.classList.remove("swiper-button-disabled");mySwiper.navigation.prevEl.classList.remove("swiper-button-disabled");mySwiper.navigation.update();}}}
function filterCardsCatalogHorizontalSlider(e,filter,btn){let buttons=btn.parentElement.parentElement.parentElement.parentElement.querySelectorAll('.buttonGroup .chipStyle');for(let i=0;i<buttons.length;i++){buttons[i].classList.remove('selected');}
btn.classList.add("selected");MBCP.FilterSwiperSliderCards(filter,btn);}
MBCP.FilterSwiperSliderCards=function(filter,btnSelected){btnSelected.closest(".cards-carouselCHS").querySelectorAll(".catalogHorizontalSliderCardContainer").forEach(item=>{let swiperInstance=item.swiper;if(swiperInstance!=undefined){let swiperSlides=swiperInstance.slides;swiperSlides.forEach(slide=>{swiperInstance.removeSlide(slide.index);});swiperInstance.update();}
let allSlides=item.querySelectorAll('.item');allSlides.forEach(item=>{if(!item.classList.contains('filter-'+filter)){item.classList.add("hidden-slide");if(item.classList.contains("swiper-slide")){item.classList.remove("swiper-slide");}
if(item.classList.contains("swiper-slide-active")){item.classList.remove("swiper-slide-active");}
if(item.classList.contains("swiper-slide-prev")){item.classList.remove("swiper-slide-prev");}
if(item.classList.contains("swiper-slide-next")){item.classList.remove("swiper-slide-next");}}
else{if(item.classList.contains("hidden-slide")){item.classList.remove("hidden-slide");if(!item.classList.contains("swiper-slide"))
item.classList.add("swiper-slide");}}});if(swiperInstance!=undefined){swiperInstance.update();swiperInstance.slideTo(0);disableNavigation(swiperInstance);swiperInstance.slides.forEach(function(slide,index){slide.addEventListener("click",function(){swiperInstance.slideTo(slide.ariaLabel.substring(0,slide.ariaLabel.indexOf(' '))-1);disableNavigation(swiperInstance);});});}});}
MBCP.HeroGalleryFilterSwiper=function(widgetZone){let chipSelected=widgetZone.querySelector('.chipStyle.selected')
if(chipSelected==null){chipSelected=widgetZone.querySelector('.chipStyle.catalogHorizontalSliderChips0')}
const filter=chipSelected.dataset.filter;filterCardsCatalogHorizontalSlider(null,filter,chipSelected);}
function isFullyVisible(el){let rect=el.getBoundingClientRect();return(rect.left>=0&&rect.right<=(window.innerWidth||document.documentElement.clientWidth))}
function handleMouseOver(event){let targetDiv=event.currentTarget;if(isFullyVisible(targetDiv)){targetDiv.classList.add('expand');}
else{targetDiv.classList.remove('expand');}}
function handleMouseOut(event){let targetDiv=event.currentTarget;targetDiv.classList.remove('expand');}
function isElementXPercentInViewport(el,percentVisible){let rect=el.getBoundingClientRect(),windowHeight=(window.innerHeight||document.documentElement.clientHeight);return!(Math.floor(100-(((rect.top>=0?0:rect.top)/ +-rect.height)*100))<percentVisible||Math.floor(100-((rect.bottom-windowHeight)/rect.height)*100)<percentVisible)};;;
function simulateCreditSlider(elem,urlSimulator,target){const card=queryAncestor(elem,".card-simulator");const group=card?card.querySelector(".btn-group"):null;const btnselect=group?group.querySelector(".active"):null;if(btnselect!==null){const amount=btnselect.value;if(amount!==null&&amount!=='othervalue'){try{var data={'amount':amount};MBCP.PostWithData(urlSimulator,data,target);}
catch(e){console.log("Send Parameters CL Failed");}}
else if(target!=null&&target!=""){window.open(urlSimulator,'target');}else{window.location.href=urlSimulator;}}
else if(target!=null&&target!=""){window.open(urlSimulator,'target');}else{window.location.href=urlSimulator;}}
function OpcaoBtn_Click(elem){var thisBtn=elem;if(thisBtn.classList.contains("active")){thisBtn.classList.remove('active');}else{thisBtn.classList.add('active');var siblings=Array.from(thisBtn.parentNode.children).filter(function(child){return child!==thisBtn;});siblings.forEach(function(sibling){sibling.classList.remove('active');});}
var btnValue=thisBtn.value;var btnSelectValue=document.querySelector('.btnSelect-value');if(btnSelectValue){btnSelectValue.value=btnValue;}
return false;};;
MBCP.DocumentReady(function(){window.addEventListener("resize",function(){document.querySelectorAll('.widget-articlegrid').forEach(articles=>{if(articles.resizeBlockList){articles.resizeBlockList();}});});const articlesGrids=document.querySelectorAll('.widget-articlegrid');articlesGrids.forEach((article,i)=>{article.resizeBlockList=function(){var article=this;var cardsList=article.querySelector(".cards-blocklist");if(cardsList){cardsList.style=`--transition-time:0!important; --min-height:unset!important;`;article.querySelectorAll(".article-card").forEach(card=>{card.classList.add('active');});cardsList.style=`--transition-time:.35s; --min-height:${cardsList.offsetHeight}px;`;article.querySelectorAll('.article-card:not(:first-child)').forEach(card=>{card.classList.remove('active');});}};article.resizeBlockList();if(articlesGrids[i].classList.contains('grey')){articlesGrids[i].parentElement.parentElement.parentElement.classList.add("articlesGridGrey");}
var cards=article.querySelectorAll('.article-card');if(cards!=null&&cards.length){cards.forEach(card=>{card.addEventListener('mouseenter',function(event){try{Article_MouseOver(event.target);}catch(e){}})});}});const articlesGrids1=document.querySelectorAll('.articles-container');for(var i=0;i<articlesGrids1.length;i++){create_SwiperArticles(articlesGrids1[i])}});function create_SwiperArticles(articleliderItem){let centerAreaElement=articleliderItem.querySelector('.cardsListMob');if(centerAreaElement!=null){centerAreaElement=new Swiper('.cardsListMob',{direction:'horizontal',slidesPerView:1,dragable:true,centeredSlides:true,a11y:false,spaceBetween:24,});}}
function Article_MouseOver(elem){const classList=elem.classList;const parent=elem.parentElement;if(!classList.contains('active')){let articleActive=parent.querySelector('.active');articleActive.classList.remove('active')
elem.classList.add('active');}}
function OpenLink(url,newTab){if(newTab=='_blank'){window.open(url,newTab,'noreferrer');return false;}
else{location.href=url;}};;
let cardsCommunicationLastScroll=0;function isCardsCommunicationInViewport(element){const{top,bottom}=element.getBoundingClientRect();const windowHeight=innerHeight||document.documentElement.clientHeight;return top<=windowHeight&&bottom>=0;}
function cardsCommunicationGetLowestCard(columns){const lowestCards=[];for(let x=0;x<columns.length;x++){lowestCards.push(columns[x].children[columns.length-1]);}
return lowestCards.sort((a,b)=>a.getBoundingClientRect().bottom-b.getBoundingClientRect().bottom)[lowestCards.length-1]}
function handleCardsCommunicationScroll(){if(innerWidth>=768){const cardsCommunicationColumn1=document.getElementsByClassName("card-communication--column-1")[0];const cardsCommunicationColumn2=document.getElementsByClassName("card-communication--column-2")[0];const cardsCommunicationWidgets=document.getElementsByClassName("widget_card_communication");for(let x=0;x<cardsCommunicationWidgets.length;x++){const columns=Array.from(cardsCommunicationWidgets[x].children[1].children);MBCP.setParallaxWidgetMaxHeight(cardsCommunicationWidgets[x],columns,cardsCommunicationLastScroll)}
setCardsCommunicationTransform(cardsCommunicationColumn1);setCardsCommunicationTransform(cardsCommunicationColumn2);}
cardsCommunicationLastScroll=scrollY;}
function setCardsCommunicationTransform(column){const cardsBulletsTitle=document.getElementsByClassName("cards-communication-title-cerize")[0];const cardsBulletsTitleTop=cardsBulletsTitle.getBoundingClientRect().top;const dataFactor=column.getAttribute("data-factor");const newTransform=cardsBulletsTitleTop*dataFactor;column.style.transform=`translateY(${newTransform}px)`;}
function setCardsBulletsMaxHeight(columns){return[parseFloat(columns[0].getBoundingClientRect().bottom.toFixed(2)),parseFloat(columns[1].getBoundingClientRect().bottom.toFixed(2))]}
MBCP.DocumentReady(()=>{addEventListener("scroll",()=>{handleCardsCommunicationScroll();});handleCardsCommunicationScroll()
const cardsCommunicationWidgets=Array.from(document.getElementsByClassName("widget_card_communication"))
for(let[widgetIndex,widget]of cardsCommunicationWidgets.entries()){const section=widget.parentElement.parentElement
const nextSection=section.nextElementSibling;MBCP.removeSpacesBelowParallaxWidgets(section,nextSection);}});;
function getIBannerAppMainElements(){const widget=document.getElementById("widgetAppMillennium");const section=widget.parentElement.parentElement;const nextSection=section.nextElementSibling;return[widget,section,nextSection]}
function thereAreNextSection(nextSection){return!nextSection||nextSection.tagName!=="SECTION"}
MBCP.DocumentReady(function(){let[widget,section,nextSection]=getIBannerAppMainElements();if(thereAreNextSection(nextSection)){nextSection=document.querySelector(".prefooter-borderline")}
const widgetIsTheLastPageElement=nextSection.tagName==="HR";section.style.overflow="clip visible";if(!widgetIsTheLastPageElement){saveNextSectionOriginalPaddingTop(widget,nextSection)}
calculateSpaceInNextSection(widget,nextSection)});function isElementXPercentInViewport(el,percentVisible){let
rect=el.getBoundingClientRect(),windowHeight=(window.innerHeight||document.documentElement.clientHeight);return!(Math.floor(100-(((rect.top>=0?0:rect.top)/ +-rect.height)*100))<percentVisible||Math.floor(100-((rect.bottom-windowHeight)/rect.height)*100)<percentVisible)};function saveNextSectionOriginalPaddingTop(widget,nextSection){const hiddenInput=widget.children[1];if(!hiddenInput.value){const originalPaddingTop=getComputedStyle(nextSection).paddingTop;hiddenInput.value=originalPaddingTop;}}
function getNextSectionOriginalPaddingTop(widget){const hiddenInput=widget.children[1];return hiddenInput.value;}
function formatPixelsToNumber(pixels){return parseInt(pixels.split("px")[0])}
function calculateSpaceInNextSection(widget,nextSection){if(nextSection.tagName==="HR"){let newSpace=innerWidth<576?"383px":"443px";if(innerWidth<576){newSpace="383px";}else if(innerWidth>=576&&innerWidth<768){newSpace="443px";}else{newSpace=0;}
nextSection.style.marginTop=newSpace;}else{const originalPaddingTop=getNextSectionOriginalPaddingTop(widget)?getNextSectionOriginalPaddingTop(widget):"0px"
let newSpace="";if(innerWidth<=576){newSpace=(formatPixelsToNumber(originalPaddingTop)+120)+"px";}else if(innerWidth>576&&innerWidth<768){newSpace=(formatPixelsToNumber(originalPaddingTop)+423)+"px";}else{newSpace=getNextSectionOriginalPaddingTop(widget)}
nextSection.style.paddingTop=newSpace;}}
var lgQuery=window.matchMedia("(min-width: 768px)");addEventListener("scroll",(event)=>{if(lgQuery.matches){var widget=document.querySelector("#widgetAppMillennium");var screenSize=50;var img3=document.querySelector("#widgetAppMillennium .img3");var img4=document.querySelector("#widgetAppMillennium .img4");var text=document.querySelector("#widgetAppMillennium .text");if(text){text.classList.add("out");}
if(widget!=null){if(isElementXPercentInViewport(widget,50)){if(img3){img3.classList.add("in");}
if(img4){img4.classList.add("in");}
if(text){text.classList.add("in");}}else{if(img3){img3.classList.remove("in");}
if(img4){img4.classList.remove("in");}
if(text){text.classList.remove("in");}}}}});var mobileQuery=window.matchMedia("(max-width: 767px)");addEventListener("scroll",(event)=>{if(mobileQuery.matches){var widget=document.querySelector("#widgetAppMillennium");var screenSize=50;var imgMobile=document.querySelector(" #widgetAppMillennium .imgMobile");var text=document.querySelector(" #widgetAppMillennium .text");if(text){text.classList.remove("out");text.classList.remove("in");}
if(widget!==null){if(isElementXPercentInViewport(widget,50)){if(imgMobile)
imgMobile.classList.remove("fadeOut");imgMobile.classList.add("fadeInImg");if(text){text.classList.remove("fadeOut");text.classList.add("fadeInText");}}else{if(imgMobile){imgMobile.classList.remove("fadeInImg");imgMobile.classList.add("fadeOut");}
if(text){text.classList.remove("fadeInText");text.classList.add("fadeOut");}}}}});addEventListener("resize",()=>{let[widget,section,nextSection]=getIBannerAppMainElements();if(thereAreNextSection(nextSection)){nextSection=document.querySelector(".prefooter-borderline")}
calculateSpaceInNextSection(widget,nextSection)});;
const defaultColor="#FFFFFF";const bgNewsDarkKey="bg-news-dark";const bgColorDarkHex="#2E3641";const bgColorDarkGradient="linear-gradient(90deg, #1C2128 0%, #2E3641 100%)";const newsModule=document.querySelector(".widget-news");const bgColor=newsModule.parentElement.parentElement.style.backgroundColor;const newsModuleParent=newsModule.parentElement.parentElement;var lastColorWidget=bgColor!=""?RGBToHex(bgColor).toUpperCase():defaultColor
var bgIsDarkMode=false;var isAlreadyChangeBg=false;MBCP.DocumentReady(function(){if(lastColorWidget==bgColorDarkHex){newsModule.classList.add(bgNewsDarkKey);newsModuleParent.style.background=bgColorDarkGradient;bgIsDarkMode=true;}else{newsModuleParent.style.backgroundColor=lastColorWidget;}});window.onscroll=function(){OnScrollAnimation();};function OnScrollAnimation(){var backgroundColorAnimation=String(document.getElementById("bgcolor-animation-hidden").value).toUpperCase();if(backgroundColorAnimation!="#"){const imageNews=document.getElementById("image-news");if(isInViewportAnimation(imageNews)){if(backgroundColorAnimation!=lastColorWidget){if(bgIsDarkMode){newsModule.classList.remove(bgNewsDarkKey);newsModuleParent.style.removeProperty("background");}else if(backgroundColorAnimation==bgColorDarkHex){newsModule.classList.add(bgNewsDarkKey);newsModuleParent.style.background=bgColorDarkGradient;}
newsModuleParent.style.backgroundColor=backgroundColorAnimation;newsModuleParent.style.transitionDuration='600ms';}
isAlreadyChangeBg=true;}else if(isAlreadyChangeBg){if(backgroundColorAnimation!=lastColorWidget){if(bgIsDarkMode){newsModule.classList.add(bgNewsDarkKey);newsModuleParent.style.background=bgColorDarkGradient;}else if(backgroundColorAnimation==bgColorDarkHex){newsModule.classList.remove(bgNewsDarkKey);newsModuleParent.style.removeProperty("background");}
newsModuleParent.style.backgroundColor=lastColorWidget;newsModuleParent.style.transitionDuration='600ms';}
isAlreadyChangeBg=false;}}}
function isInViewportAnimation(el){const rect=el.getBoundingClientRect();var ret=false;if(rect.bottom>0){ret=rect.top+(rect.height/2)<=(window.innerHeight||document.documentElement.clientHeight);}
return ret;}
function RGBToHex(rgb){let sep=rgb.indexOf(",")>-1?",":" ";rgb=rgb.substr(4).split(")")[0].split(sep);let r=(+rgb[0]).toString(16),g=(+rgb[1]).toString(16),b=(+rgb[2]).toString(16);if(r.length==1)
r="0"+r;if(g.length==1)
g="0"+g;if(b.length==1)
b="0"+b;return"#"+r+g+b;};;
