function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now960){target=targetOffset-200}else{target=targetOffset-100} var documentHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(targetOffset>window.pageYOffset||documentHeight-inputsBottombodyHeight){setTimeout(function(){var tildaLabel=document.querySelector('.t-tildalabel');if(!tildaLabel)return;t718__fadeOut(tildaLabel)},50)}},300)}else{t718_scrollToTop(target)} var successUrl=form.getAttribute('data-success-url');if(successUrl){t_forms__handleRedirect(form,successUrl,successBox)}} function t718_scrollToTop(target){if(target===window.pageYOffset){return!1} var duration=400;var difference=window.pageYOffset;var cashedDiff=window.pageYOffset;var step=(Math.abs(window.pageYOffset-target)*10)/duration;var scrollInterval=setInterval(function(){if(cashedDiff>target){difference-=step}else{difference+=step} window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if(cashedDiff>target&&window.pageYOffset<=target){document.body.removeAttribute('data-scrollable');clearInterval(scrollInterval)}else if(cashedDiff<=target&&window.pageYOffset>=target){document.body.removeAttribute('data-scrollable');window.scrollTo(0,target);clearInterval(scrollInterval)}},10);var scrollTimeout=setTimeout(function(){clearInterval(scrollInterval);document.body.removeAttribute('data-scrollable');clearTimeout(scrollTimeout)},duration*2)} function t718__fadeOut(element){if(element.style.display==='none')return;var opacity=1;var timer=setInterval(function(){element.style.opacity=opacity;opacity-=0.1;if(opacity<=0.1){clearInterval(timer);element.style.display='none';element.style.opacity=null}},50)} function t570_init(recid){if(window.innerWidth>750){t570_setMapHeight(recid);window.onload=function(){t570_setMapHeight(recid)};window.addEventListener('resize',function(){t570_setMapHeight(recid)})}} function t570_setMapHeight(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var isScaled=rec.classList.contains('t-record_scaled');var mapElement=rec.querySelector('.t-map');var textElement=rec.querySelector('.t570__col_text');if(!mapElement||!textElement)return;var paddingTop=parseInt(textElement.style.paddingTop,10)||0;var paddingBottom=parseInt(textElement.style.paddingBottom,10)||0;var textHeight=textElement.clientHeight-(paddingTop+paddingBottom);var heightValue=textHeight+'px';mapElement.style.height=isScaled?'calc('+heightValue+' * var(--t-zoom, 1))':heightValue;var event=document.createEvent('HTMLEvents');event.initEvent('sizechange',!0,!1);mapElement.dispatchEvent(event)} function t433_init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var separateMap=document.querySelector('#separateMap'+recid);if(separateMap)separateMap.style.height='auto';t433_setMapHeight(recid);var mapWrapper=rec.querySelector('.t433');if(!mapWrapper)return;mapWrapper.addEventListener('displayChanged',function(){t433_setMapHeight(recid)});window.addEventListener('resize',t_throttle(function(){t433_setMapHeight(recid)}))} function t433_setMapHeight(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var isScaled=rec.classList.contains('t-record_scaled');var mapElement=rec.querySelector('.t-map');var textElement=rec.querySelector('.t433__col_text');if(!mapElement||!textElement)return;var paddingTop=parseInt(textElement.style.paddingTop,10)||0;var paddingBottom=parseInt(textElement.style.paddingBottom,10)||0;var textHeight=textElement.clientHeight-(paddingTop+paddingBottom);var heightValue=textHeight+'px';mapElement.style.height=isScaled?'calc('+heightValue+' * var(--t-zoom, 1))':heightValue;var event=document.createEvent('HTMLEvents');event.initEvent('sizechange',!0,!1);mapElement.dispatchEvent(event)} function t554__init(recid){var rec=document.querySelector('#rec'+recid);if(!rec)return;var wrapperBlock=rec.querySelector('.t554');var mapElement=rec.querySelector('.t554_map');var card=rec.querySelector('.t554__card');var generalWrapper=rec.querySelector('.t554__general-wrapper');if(!wrapperBlock||!mapElement||!card||!generalWrapper)return;t554__calcHeight(mapElement,card,generalWrapper);wrapperBlock.addEventListener('displayChanged',function(){t554__calcHeight(mapElement,card,generalWrapper)})} function t554__calcHeight(mapElement,card,generalWrapper){generalWrapper.style.paddingBottom=null;var paddingTop=parseInt(mapElement.style.paddingTop,10)||0;var paddingBottom=parseInt(mapElement.style.paddingBottom,10)||0;var mapHeight=mapElement.clientHeight-(paddingTop+paddingBottom);var cardHeight=parseInt(card.offsetHeight,10);var cardTop=parseInt((card.style.top||'').replace('px',''),10);if(generalWrapper&&mapHeight960&&generalWrapper.classList.contains('t554__general-wrapper_padding')){var mapPaddingBottom=cardHeight+cardTop-mapHeight;generalWrapper.style.paddingBottom=mapPaddingBottom+'px'}}