2 lines
35 KiB
JavaScript
2 lines
35 KiB
JavaScript
function t_animate__init(){t_animate__checkAnimationAvailability()&&(t_animate__generateStyles(),t_animate__wrapTextWithOpacity(),t_animate__addNoHoverClassToBtns(),t_animate__preventHorizontalScroll(),document.documentElement.clientWidth>=1200&&t_animate__parseNumberText(),setTimeout((function(){t_animate__startAnimation()}),1500))}function t_animate__checkMobile(t){return t.filter((function(t){var e=t.closest(".t396__elem, .t396__group"),a,n;return!(!e||"y"!==e.getAttribute("data-animate-mobile"))||(t.classList.contains("r")?Array.prototype.forEach.call(t.querySelectorAll(".t-animate"),(function(t){t_animate__removeAnimationClass(t,"")})):t_animate__removeAnimationClass(t,""),!1)}))}function t_animate__removeAnimationClass(t,e){if(t){var a="t-animate";t.classList.remove(a),e&&("string"==typeof e&&(e=[e]),e.forEach((function(e){var n=a+"_"+e;t.classList.remove(n)})))}}function t_animate__preventHorizontalScroll(){var t,e=Array.from(document.querySelectorAll('[data-animate-style="fadeinleft"]')).filter((function(t){return!t.closest(".t396__artboard, .t-cover")&&t.getBoundingClientRect().right>window.innerWidth}));!e.length||window.innerWidth<980||e.forEach((function(t){var e;t.closest(".r").classList.add("t-animate__overflow-x-hidden")}))}function t_animate__checkAnimationAvailability(){var t=document.querySelector(".t-records"),e=t?t.getAttribute("data-blocks-animationoff"):null,a=t?t.getAttribute("data-tilda-mode"):null;if(/Bot/i.test(navigator.userAgent)||"yes"===e||t_animate__checkIE()||"edit"===a){var n=document.querySelectorAll(".t-animate");return Array.prototype.forEach.call(n,(function(t){t_animate__removeAnimationClass(t,"")})),!1}return!0}function t_animate__generateStyles(){var t;if(!!document.querySelector(".t396")){for(var e=t_animate__getBreakpointsArr(),a='.t396 .t-animate[data-animate-style="fadein"],.t396 .t-animate[data-animate-style="fadeinup"],.t396 .t-animate[data-animate-style="fadeindown"],.t396 .t-animate[data-animate-style="fadeinleft"],.t396 .t-animate[data-animate-style="fadeinright"],.t396 .t-animate[data-animate-style="zoomin"],.t396 .t-animate[data-animate-style="zoomout"] {opacity: 0;-webkit-transition-property: opacity, transform;transition-property: opacity, transform;-webkit-transition-duration: 1s;transition-duration: 1s;-webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);-webkit-backface-visibility: hidden;backface-visibility: hidden;}',n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+".t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadein"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="fadeinup"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="fadeindown"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="fadeinleft"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="fadeinright"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="zoomin"],.t396 .t-animate[data-animate-style-res-'+i.minRes+'="zoomout"] {opacity: 0;-webkit-transition-property: opacity, transform;transition-property: opacity, transform;-webkit-transition-duration: 1s;transition-duration: 1s;-webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);-webkit-backface-visibility: hidden;backface-visibility: hidden;}}')}a+='.t396 .t-title.t-animate {-webkit-transition-duration: 1.2s;transition-duration: 1.2s;}.t396 .t-descr.t-animate,.t396 .t-uptitle.t-animate,.t396 .t-subtitle.t-animate,.t396 .t-text.t-animate {-webkit-transition-duration: 0.7s;transition-duration: 0.7s;}.t396 .t-item.t-animate {-webkit-transition-duration: 0.5s;transition-duration: 0.5s;}.t396 .t-animate[data-animate-style="fadein"] {opacity: 0;transform: none;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadein"] {opacity: 0;transform: none;}}')}a+='.t396 .t-animate_started[data-animate-style="fadein"] {opacity: 1;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="fadein"] {opacity: 1;}}')}a+='.t396 .t-animate[data-animate-style="fadeinup"] {-webkit-transform: translate(0, 100px);transform: translate(0, 100px);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadeinup"] {-webkit-transform: translate(0, 100px);transform: translate(0, 100px);}}')}a+='.t396 .t-animate_started[data-animate-style="fadeinup"] {opacity: 1;-webkit-transform: none;transform: none;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="fadeinup"] {opacity: 1;-webkit-transform: none;transform: none;}}')}a+='.t396 .t-animate[data-animate-style="fadeindown"] {-webkit-transform: translate(0, -100px);transform: translate(0, -100px);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadeindown"] {-webkit-transform: translate(0, -100px);transform: translate(0, -100px);}}')}a+='.t396 .t-animate_started[data-animate-style="fadeindown"] {opacity: 1;-webkit-transform: none;transform: none;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="fadeindown"] {opacity: 1;-webkit-transform: none;transform: none;}}')}a+='.t396 .t-animate[data-animate-style="fadeinleft"] {-webkit-transform: translate(100px, 0);transform: translate(100px, 0);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadeinleft"] {-webkit-transform: translate(100px, 0);transform: translate(100px, 0);}}')}a+='.t396 .t-animate_started[data-animate-style="fadeinleft"] {opacity: 1;-webkit-transform: none;transform: none;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="fadeinleft"] {opacity: 1;-webkit-transform: none;transform: none;}}')}a+='.t396 .t-animate[data-animate-style="fadeinright"] {-webkit-transform: translate(-100px, 0);transform: translate(-100px, 0);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="fadeinright"] {-webkit-transform: translate(-100px, 0);transform: translate(-100px, 0);}}')}a+='.t396 .t-animate_started[data-animate-style="fadeinright"] {opacity: 1;-webkit-transform: none;transform: none;}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="fadeinright"] {opacity: 1;-webkit-transform: none;transform: none;}}')}a+='.t396 .t-animate[data-animate-style="zoomin"] {-webkit-transform: scale(0.9);transform: scale(0.9);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="zoomin"] {-webkit-transform: scale(0.9);transform: scale(0.9);}}')}a+='.t396 .t-animate_started[data-animate-style="zoomin"] {opacity: 1;-webkit-transform: scale(1);transform: scale(1);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="zoomin"] {opacity: 1;-webkit-transform: scale(1);transform: scale(1);}}')}a+='.t396 .t-animate[data-animate-style="zoomout"] {-webkit-transform: scale(1.2);transform: scale(1.2);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate[data-animate-style-res-"+i.minRes+'="zoomout"] {-webkit-transform: scale(1.2);transform: scale(1.2);}}')}a+='.t396 .t-animate_started[data-animate-style="zoomout"] {opacity: 1;-webkit-transform: scale(1);transform: scale(1);}';for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="zoomout"] {opacity: 1;-webkit-transform: scale(1);transform: scale(1);}}')}a+=".t396 .t-animate_started[data-animate-distance],.t396 .t-animate_started[data-animate-scale]{-webkit-transform: none !important;transform: none !important;}";for(var n=0;n<e.length;n++){var i;(i=t_animate__getMediaQuery(e,n)).isContinue||(a+=i.text+"#allrecords .t396 .t-animate_started[data-animate-distance-res-"+i.minRes+"],#allrecords .t396 .t-animate_started[data-animate-style-res-"+i.minRes+'="zoomout"] {-webkit-transform: none !important;transform: none !important;}}')}var r=document.createElement("style"),o=document.head||document.querySelector("head");r.textContent=a,o.appendChild(r)}}function t_animate__getBreakpointsArr(){var t=[],e=Array.prototype.slice.call(document.querySelectorAll('.r[data-record-type="396"]:not(.t397__off, .t395__off, .t400__off) .t396__artboard, .r[data-parenttplid="396"]:not(.t397__off, .t395__off, .t400__off) .t396__artboard'));return Array.prototype.forEach.call(e,(function(e){if(e.classList.contains("t396__artboard")){var a=e.getAttribute("data-artboard-screens"),n=(a=(a=a?a.split(","):[1200,960,640,480,320]).map((function(t){return parseInt(t,10)}))).filter((function(e){return-1===t.indexOf(e)}));t=t.concat(n)}})),t=t_animate__sortArr(t)}function t_animate__getMediaQuery(t,e){var a="",n=!1,i=t[e+1],r=t[e]-1,o=e===t.length-1,s=e===t.length-2;return o?n=!0:a+=s?"@media screen and (max-width: "+r+"px) {":"@media screen and (min-width: "+i+"px) and (max-width: "+r+"px) {",{text:a,isContinue:n,minRes:i}}function t_animate__sortArr(t){return t.sort((function(t,e){return e-t}))}function t_animate__startAnimation(){var t=document.querySelectorAll(".r"),e=Array.prototype.filter.call(t,(function(t){return t.querySelector(".t-animate[data-animate-group=yes]")})),a=Array.prototype.filter.call(t,(function(t){return t.querySelector('.t-animate[data-animate-chain="yes"]')})),n=document.querySelectorAll(".t-animate");if(n=Array.prototype.filter.call(n,(function(t){return!("yes"===t.getAttribute("data-animate-group")||"yes"===t.getAttribute("data-animate-chain")||t.getAttribute("observer-ready"))})),window.innerWidth<1200&&(e=t_animate__checkMobile(e),a=t_animate__checkMobile(a),n=t_animate__checkMobile(n)),e.length||n.length||a.length){t_animate__setAnimationState(e,a,n),e=t_animate__hasWaitAnimation(e),n=t_animate__hasWaitAnimation(n),a=t_animate__hasWaitAnimation(a);var i="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)[4-9]/i.test(navigator.userAgent);if("IntersectionObserver"in window&&!i){if(e.length){var r=[];e.forEach((function(t){var e=t.querySelector(".t-animate"),a,n;if("fadeindown"===e.getAttribute("data-animate-style")&&e.closest(".t-cover")){var i=t.querySelector(".t-animate:not(:first-child)");i&&(e=i)}r.push(e)})),r.forEach((function(t){var e={rootMargin:t.offsetHeight/5*-1+"px 0px"},a;new IntersectionObserver((function(t,e){t.forEach((function(t){if(t.isIntersecting){var a=t.target;e.unobserve(a);var n=a.closest(".r").querySelectorAll(".t-animate");n=Array.prototype.filter.call(n,(function(t){return!(t.classList.contains("t-animate__btn-wait-chain")||"yes"===t.getAttribute("data-animate-chain"))})),t_animate__makeSectionButtonWait(a),t_animate__saveSectionHeaderStartTime(a),Array.prototype.forEach.call(n,(function(t){t.classList.remove("t-animate_wait"),t_animate__removeNoHoverClassFromBtns(t),t_animate__setStartAnimationClass(t,!1)}))}}))}),e).observe(t)}))}var o;if(n.length&&n.forEach((function(t){var e={},a=t_animate__getAttrByResBase(t,"trigger-offset");a&&(e.rootMargin="0px 0px "+-1*a.replace("px","")+"px 0px");var n=new IntersectionObserver((function(t,e){t.forEach((function(t){var a=t.target;if(!a.demandTransform&&a.style.transform)a.demandTransform=a.style.transform,a.style.transform="unset";else{var n=window.getComputedStyle(a).transform;a.style.transform||"none"===n||(a.demandTransform=n,a.style.transform="unset")}if(t.isIntersecting){a.closest(".t1093")||e.unobserve(a);var i=a.style.transitionDelay||"0ms";i=-1!==i.indexOf("ms")?parseInt(i)+250:1e3*parseFloat(i)+250;var r=function t(){a.classList.remove("t-animate_wait"),t_animate__removeNoHoverClassFromBtns(a),t_animate__setStartAnimationClass(a,!0),"animatednumber"===t_animate__getAttrByResBase(a,"style")&&t_animate__animateNumbers(a)};a.demandTransform&&-1!==a.demandTransform.indexOf("matrix")&&(a.style.transform=""),a.demandTransform&&"unset"===a.style.transform&&(a.style.transform=a.demandTransform,delete a.demandTransform),setTimeout((function(){r()}),i)}}))}),e);t.dataset.observerReady=!0,n.observe(t)})),a.length)(o=function t(){t_animate__getChainOffsets(a)})(),window.addEventListener("resize",t_throttle((function(){o()}))),setInterval(o,5e3),window.addEventListener("scroll",t_throttle((function(){var t,e=window.pageYOffset+window.innerHeight;t_animate__animateChainsBlocks(a,e)})))}else{var o;(o=function t(){t_animate__getGroupsOffsets(e),t_animate__getChainOffsets(a),t_animate__getElemsOffsets(n)})(),window.addEventListener("resize",t_throttle(o)),setInterval(o,5e3),window.addEventListener("scroll",t_throttle((function(){var t=t_animate__deleteAnimatedEls(e,n);n=t[0];var i=t_animate__animateOnScroll(e=t[1],a,n);i&&i.length&&(e=i[0],a=i[1],n=i[2])})))}Array.prototype.forEach.call(t,(function(t){var e=t.querySelector(".t-popup");e&&e.addEventListener("scroll",t_throttle((function(){var t=window.pageYOffset+window.innerHeight;if(e.classList.contains("t-animate")&&"yes"===e.getAttribute("data-animate-chain")||e.querySelector(".t-animate[data-animate-chain=yes]")){var a=[e];t_animate__setAnimationStateChains(a),t_animate__getChainOffsets(a=Array.prototype.filter.call(a,(function(t){return t.querySelector(".t-animate_wait")}))),t_animate__animateChainsBlocks(a,t)}})))}))}}function t_animate__animateOnScroll(t,e,a){if(t.length||e.length||a.length){var n=window.pageYOffset,i=n+window.innerHeight,r,o,s;return[t_animate__animateGroups(t,i,n),t_animate__animateChainsBlocks(e,i,n),t_animate__animateElems(a,i,n)]}}function t_animate__animateGroups(t,e){return t.forEach((function(t){if(t.curTopOffset<e){var a=t.querySelectorAll(".t-animate");a=Array.prototype.filter.call(a,(function(t){return!(t.classList.contains("t-animate__btn-wait-chain")||"yes"===t.getAttribute("data-animate-chain"))})),t_animate__makeSectionButtonWait(t),t_animate__saveSectionHeaderStartTime(t),Array.prototype.forEach.call(a,(function(t){t.classList.remove("t-animate_wait"),t_animate__removeNoHoverClassFromBtns(t),t_animate__setStartAnimationClass(t,!1)}))}})),t}function t_animate__animateChainsBlocks(t,e){return t.forEach((function(t){t.itemsOffsets[0]<e&&t.querySelectorAll(".t-animate_wait").length&&(t_animate__animateChainItemsOnScroll(t,e),t.itemsOffsets.length&&t_animate__checkSectionButtonAnimation__outOfTurn(t))})),t}function t_animate__animateElems(t,e,a){return Array.prototype.filter.call(t,(function(t){var n=t_animate__detectElemTriggerOffset(t,e);return t.curTopOffset<n?(t.classList.remove("t-animate_wait"),t_animate__removeNoHoverClassFromBtns(t),t_animate__setStartAnimationClass(t,!1),"animatednumber"===t_animate__getAttrByResBase(t,"style")&&t_animate__animateNumbers(t),!0):!(t.curTopOffset<a)&&void 0})),t}function t_animate__deleteAnimatedEls(t,e){var a=window.pageYOffset,n=[],i=[];return t.forEach((function(t){if(t.curTopOffset<=a){var e=t.querySelectorAll(".t-animate");Array.prototype.forEach.call(e,(function(t){t_animate__removeAnimationClass(t,["wait","no-hover"])}))}else n.push(t)})),e.forEach((function(t){t.curTopOffset<=a?(t_animate__removeAnimationClass(t,["wait","no-hover"]),t_animate__setStartAnimationClass(t,!1)):i.push(t)})),[i,n]}function t_animate__animateChainItemsOnScroll(t,e){var a=t.querySelectorAll(".t-animate_wait[data-animate-chain=yes]");a=Array.prototype.slice.call(a);var n=0,i=0,r=t.itemsOffsets[0],o=.16,s=t_animate__getDelayFromPreviousScrollEvent(t,o),l=t_animate__getSectionHeadDealy(t);a.length&&a[0].classList.add("t-animate__chain_first-in-row");for(var m=0;m<a.length;m++){var c=a[m],_=t.itemsOffsets[m];if(!(_<e))break;_!==r&&(c.classList.add("t-animate__chain_first-in-row"),n=++i,r=_);var f=n*o+s+l;c.style.transitionDelay=f+"s",c.classList.remove("t-animate_wait"),t_animate__setStartAnimationClass(c,!1),c.setAttribute("data-animate-start-time",Date.now()+1e3*f),c[0]===a[a.length-1]&&t_animate__checkSectionButtonAnimation(t,f),+_==+r&&n++,a.splice(m,1),t.itemsOffsets.splice(m,1),m--}t_animate__catchTransitionEndEvent(t)}function t_animate__getSectionHeadDealy(t){var e=t.querySelector(".t-section__title.t-animate"),a=t.querySelector(".t-section__descr.t-animate"),n=0;if(e){var i=e.getAttribute("data-animate-start-time")||0;if(Date.now()-i<=160)return n=.16}if(a){var r=a.getAttribute("data-animate-start-time")||0;if(Date.now()-r<=160)return n=.16}return n}function t_animate__getDelayFromPreviousScrollEvent(t,e){var a=!t.querySelectorAll(".t-animate_started").length,n=t.querySelectorAll(".t-animate__chain_first-in-row.t-animate_started");if(n=Array.prototype.filter.call(n,(function(t){return!t.classList.contains("t-animate__chain_showed")})),a||!n.length)return 0;if(n.length){var i,r,o=(n[n.length-1].getAttribute("data-animate-start-time")||0)-Date.now();return o<=0?e:o/1e3+e}}function t_animate__setStartAnimationClass(t,e){if(t){if(e){var a="t-animate-for-wrapper",n=t.closest("."+a);n&&n.classList.remove(a)}var i;if(t.classList.add("t-animate_started"),"fadeinleft"===t.getAttribute("data-animate-style")){var r=t.closest(".t-animate__overflow-x-hidden");r&&!r.querySelector('[data-animate-style="fadeinleft"]:not(.t-animate_started)')&&r.classList.remove("t-animate__overflow-x-hidden")}}}function t_animate__catchTransitionEndEvent(t){var e=t.querySelectorAll(".t-animate__chain_first-in-row.t-animate_started");e=Array.prototype.filter.call(e,(function(t){return!t.classList.contains("t-animate__chain_showed")})),Array.prototype.forEach.call(e,(function(t){var e;["transitionend","webkitTransitionEnd","oTransitionEnd","otransitionend","MSTransitionEnd"].forEach((function(e){t.addEventListener(e,(function(){t_animate__addEventOnAnimateChain(t)})),t.removeEventListener(e,(function(){t_animate__addEventOnAnimateChain(t)}))}))}))}function t_animate__parseNumberText(){var t=window.pageYOffset,e=document.querySelectorAll(".t-animate[data-animate-style='animatednumber']");Array.prototype.forEach.call(e,(function(e){var a,n="",i=e.querySelectorAll("span");if(Array.prototype.forEach.call(i,(function(t){n+=t.getAttribute("style")||"",t.removeAttribute("style"),t.removeAttribute("data-redactor-style")})),e.querySelectorAll('div[data-customstyle="yes"]').length){var r=e.querySelector('div[data-customstyle="yes"]');a=r?r.innerHTML:"";var o=e.getAttribute("style")||"",s=e.querySelector("div[data-customstyle]"),l=s?s.getAttribute("style"):"";l&&(o+=l),e.setAttribute("style",o)}else a=e.innerHTML;if(n=n.split(";").filter((function(t,e){return n.split(";").indexOf(t)===e})).join(";"),!(e.getBoundingClientRect().top+window.pageYOffset<t-500)&&a.length){var m=a.replace(/<br>/g," ").replace(/[^\d., ]+/g,"").replace(/ (\.|,)/g,"").replace(/(\d)(?=\d) /g,"$1").trim(),c=m;if(-1===a.indexOf(m)&&(c=m=m.split(" ")[0]),""!==m){e.setAttribute("data-animate-number-count",a),t_animate__changeNumberOnZero(e,a.replace(c,"num"));var _=e.querySelectorAll("span");_=Array.prototype.filter.call(_,(function(t){return!t.classList.contains(".t-animate__number")})),Array.prototype.forEach.call(_,(function(t){t.setAttribute("style",n)}))}}}))}function t_animate__changeNumberOnZero(t,e){t.innerHTML=e.replace(/num/g,'<span class="t-animate__number">0</span>')}function t_animate__animateNumbers(t){if(!t)return!1;var e=t.getAttribute("data-animate-number-count"),a=[],n=t.querySelectorAll("span");(n=Array.prototype.filter.call(n,(function(t){return!t.classList.contains(".t-animate__number")}))).length&&(a=n[0].getAttribute("style")||"");var i=[],r=null;if(e){r=e.match(/\d+\.\d+|\d+,\d+/g);var o=e.match(/\d+/g),s,l;e.replace(/(\d)(?= \d) /g,"$1").split(" ").forEach((function(t){isNaN(parseInt(t.replace(/[^\d., ]+/g,""),10))||i.push(t.replace(/[^\d., ]+/g,""))}))}var m=0,c=!1,_=!1;t.removeAttribute("data-animate-number-count"),null!==r&&(_=-1!==r[0].indexOf(",")),i.forEach((function(t,e){var a;null!==r&&(-1!==t.indexOf(",")&&(a=t.split(",")),-1!==t.indexOf(".")&&(a=t.split(".")),-1===t.indexOf(",")&&-1===t.indexOf(".")||(m=a[1].length,i[e]=+a.join("."),c=!0))}));var f=t.querySelector(".t-animate__number");if(i[0]){var d=Number(i[0])||0,u=0,y=Math.pow(10,m);c&&(d*=y,u*=y);var p=12,h=0,g=setInterval((function(){if(u+=d/108,h=c?(Math.round(u)/y).toFixed(m)+"":Math.floor(u)+"",o.length>1&&(h=h.replace(/(\d)(?=(\d{3})+([^\d]|$))/g,"$1 ")),_&&(h=h.replace(/\./g,",")),f&&(f.textContent=h),u>=d){clearInterval(g),t.innerHTML=e;var n=t.querySelectorAll("span");Array.prototype.forEach.call(n,(function(t){t.setAttribute("style",a)}))}}),p)}}function t_animate__setAnimationState(t,e,a){var n=window.pageYOffset,i=n+window.innerHeight;t_animate__setGroupsBlocksState(t,n,i),e.forEach((function(t){t_animate__assignChainDelay(t,i,n),t_animate__checkSectionButtonAnimation__outOfTurn(t)})),t_animate__setAnimELemsState(a,n,i),window.addEventListener("resize",t_throttle(t_animate__removeInlineAnimStyles))}function t_animate__setAnimELemsState(t,e,a){t.forEach((function(t){var n=t.getBoundingClientRect().top+window.pageYOffset;if(n<e-500)return t_animate__removeAnimationClass(t,"no-hover"),"animatednumber"===t_animate__getAttrByResBase(t,"style")&&t_animate__animateNumbers(t),!0;var i=t_animate__detectElemTriggerOffset(t,a);t_animate__setCustomAnimSettings(t,n,a),n<i&&!t.closest(".t1093")&&(t_animate__removeNoHoverClassFromBtns(t),t_animate__setStartAnimationClass(t,!0),"animatednumber"===t_animate__getAttrByResBase(t,"style")&&t_animate__animateNumbers(t)),(n>=i||t.closest(".t1093"))&&t.classList.add("t-animate_wait")}))}function t_animate__setGroupsBlocksState(t,e,a){t.forEach((function(t){var n=t.querySelectorAll(".t-animate");n=Array.prototype.filter.call(n,(function(t){return!("yes"===t.getAttribute("data-animate-chain"))}));var i=t.getBoundingClientRect().top+window.pageYOffset;t_animate__removeAnimFromHiddenSlides(t);var r=t_animate__assignSectionDelay(t);t_animate__assignGroupDelay(t,r),Array.prototype.forEach.call(n,(function(n){var r=n.closest(".t397__off")||n.closest(".t395__off")||n.closest(".t400__off");if(n.classList.contains("t-animate_no-hover")&&r&&n.classList.remove("t-animate_no-hover"),i<=e-100)return t_animate__saveSectionHeaderStartTime(t),t_animate__removeAnimationClass(n,"no-hover"),n.style.transitionDelay="",!0;i<a&&i>e-100&&(t_animate__makeSectionButtonWait(t),n.classList.contains(".t-animate__btn-wait-chain")||(t_animate__removeNoHoverClassFromBtns(n),r?n.classList.add("t-animate_wait"):t_animate__setStartAnimationClass(n,!1))),i>=a&&n.classList.add("t-animate_wait")}))}))}function t_animate__setAnimationStateChains(t){if(!t||!t.length)return!1;var e=window.pageYOffset,a=e+window.innerHeight;Array.prototype.forEach.call(t,(function(t){t_animate__assignChainDelay(t,a,e),t_animate__checkSectionButtonAnimation__outOfTurn(t)}))}function t_animate__assignSectionDelay(t){var e=0,a=t.querySelectorAll(".t-section__title.t-animate"),n=t.querySelectorAll(".t-section__descr.t-animate");return a.length&&(e=.16),n.length&&(Array.prototype.forEach.call(n,(function(t){t.style.transitionDelay=e+"s"})),e+=.16),e}function t_animate__assignGroupDelay(t,e){var a=0;if(t.querySelectorAll("[data-animate-order]").length)t_animate__assignOrderedElemsDelay(t,e);else{var n=t.querySelectorAll(".t-img.t-animate"),i=t.querySelectorAll(".t-uptitle.t-animate"),r=t.querySelectorAll(".t-title.t-animate");r=Array.prototype.filter.call(r,(function(t){return!t.classList.contains("t-section__title")}));var o=t.querySelectorAll(".t-descr.t-animate");o=Array.prototype.filter.call(o,(function(t){return!t.classList.contains("t-section__descr")}));var s=t.querySelectorAll(".t-btn.t-animate, .t-btnwrapper.t-animate");s=Array.prototype.filter.call(s,(function(t){return!t.closest(".t-section__bottomwrapper")}));var l=t.querySelectorAll(".t-timer.t-animate"),m=t.querySelectorAll("form.t-animate");n.length&&(a=.5),r.length&&Array.prototype.forEach.call(r,(function(t){t.style.transitionDelay=a+"s"})),r.length&&(a+=.3),o.length&&Array.prototype.forEach.call(o,(function(t){t.style.transitionDelay=a+"s"})),o.length&&(a+=.3),i.length&&Array.prototype.forEach.call(i,(function(t){t.style.transitionDelay=a+"s"})),i.length&&(a+=.3),(i.length||r.length||o.length)&&(a+=.2),l.length&&Array.prototype.forEach.call(l,(function(t){t.style.transitionDelay=a+"s"})),l.length&&(a+=.5),s.length&&(s[0].style.transitionDelay=a+"s"),2===s.length&&(a+=.4),2===s.length&&(s[1].style.transitionDelay=a+"s"),0!==m.length&&Array.prototype.forEach.call(m,(function(t){t.style.transitionDelay=a+"s"}))}}function t_animate__assignOrderedElemsDelay(t,e){var a=0;e&&(a=e);var n=t.querySelectorAll('.t-animate[data-animate-order="1"]'),i=t.querySelectorAll('.t-animate[data-animate-order="2"]'),r=t.querySelectorAll('.t-animate[data-animate-order="3"]'),o=t.querySelectorAll('.t-animate[data-animate-order="4"]'),s=t.querySelectorAll('.t-animate[data-animate-order="5"]'),l=t.querySelectorAll('.t-animate[data-animate-order="6"]'),m=t.querySelectorAll('.t-animate[data-animate-order="7"]'),c=t.querySelectorAll('.t-animate[data-animate-order="8"]'),_=t.querySelectorAll('.t-animate[data-animate-order="9"]');n.length&&Array.prototype.forEach.call(n,(function(t){t.style.transitionDelay=a+"s"})),n.length&&i.length&&(a+=1*t_animate__getAttrByResBase(i[0],"delay"),Array.prototype.forEach.call(i,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length)&&r.length&&(a+=1*t_animate__getAttrByResBase(r[0],"delay"),Array.prototype.forEach.call(r,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length)&&o.length&&(a+=1*t_animate__getAttrByResBase(o[0],"delay"),Array.prototype.forEach.call(o,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length||o.length)&&s.length&&(a+=1*t_animate__getAttrByResBase(s[0],"delay"),Array.prototype.forEach.call(s,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length||o.length||s.length)&&l.length&&(a+=1*t_animate__getAttrByResBase(l[0],"delay"),Array.prototype.forEach.call(l,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length||o.length||s.length||l.length)&&m.length&&(a+=1*t_animate__getAttrByResBase(m[0],"delay"),Array.prototype.forEach.call(m,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length||o.length||s.length||l.length||m.length)&&c.length&&(a+=1*t_animate__getAttrByResBase(c[0],"delay"),Array.prototype.forEach.call(c,(function(t){t.style.transitionDelay=a+"s"}))),(n.length||i.length||r.length||o.length||s.length||l.length||m.length||c.length)&&_.length&&(a+=1*t_animate__getAttrByResBase(_[0],"delay"),Array.prototype.forEach.call(_,(function(t){t.style.transitionDelay=a+"s"})))}function t_animate__assignChainDelay(t,e,a){var n=t.querySelectorAll(".t-animate[data-animate-chain=yes]"),i=0;if(n.length){var r=n[0],o=r.getBoundingClientRect().top+window.pageYOffset;r.classList.add("t-animate__chain_first-in-row");var s=t_animate__getCurBlockSectionHeadDelay(t);Array.prototype.forEach.call(n,(function(l){var m=l.getBoundingClientRect().top+window.pageYOffset;if(m<a)return t_animate__removeAnimationClass(l,""),!0;if(m<e){m!==o&&(l.classList.add("t-animate__chain_first-in-row"),o=m);var c=.16*i+s,_;l.style.transitionDelay=c+"s",t_animate__setStartAnimationClass(l,!1),l.setAttribute("data-animate-start-time",Date.now()+1e3*c),r===n[n.length-1]&&t_animate__checkSectionButtonAnimation(t,c),i++,["transitionend","webkitTransitionEnd","oTransitionEnd","otransitionend","MSTransitionEnd"].forEach((function(t){l.addEventListener(t,(function(){t_animate__addEventOnAnimateChain(l)})),l.removeEventListener(t,(function(){t_animate__addEventOnAnimateChain(l)}))}))}else l.classList.add("t-animate_wait")}))}}function t_animate__getAttrByResBase(t,e){var a,n=t.closest(".t396__artboard");if(!n)return t.getAttribute("data-animate-"+e);var i,r="ab"+n.getAttribute("data-artboard-recid"),o,s,l;void 0!==window.tn[r]?(o=window.tn[r].curResolution,s=window.tn[r].curResolution_max,l=window.tn[r].screens.slice()):(o=window.tn.curResolution,s=1200,l=[320,480,640,960,1200]);var m=t.closest(".t396__elem, .t396__group"),c=m&&m.getAttribute("data-animate-mobile");if(o===s)a=t.getAttribute("data-animate-"+e);else{if("y"!==c&&o<1200)return t.style.transition="none",null;a=t.getAttribute("data-animate-"+e+"-res-"+o)}if(!a&&""!==a)for(var _=0;_<l.length;_++){var f=l[_];if(!(f<=o)&&(a=f===s?t.getAttribute("data-animate-"+e):t.getAttribute("data-animate-"+e+"-res-"+f)))break}return a}function t_animate__hasWaitAnimation(t){return t.filter((function(t){return t.classList.contains("t-animate_wait")||t.querySelector(".t-animate_wait")}))}function t_animate__addEventOnAnimateChain(t){t.classList.add("t-animate__chain_showed")}function t_animate__setCustomAnimSettings(t,e,a){var n=t_animate__getAttrByResBase(t,"style"),i=t_animate__getAttrByResBase(t,"distance");if(i&&""!==i){switch(i=i.replace("px",""),t.style.transitionDuration="0s",t.style.transitionDelay="0s",n){case"fadeinup":t.style.transform="translate3d(0,"+i+"px,0)";break;case"fadeindown":t.style.transform="translate3d(0,-"+i+"px,0)";break;case"fadeinleft":t.style.transform="translate3d("+i+"px,0,0)";break;case"fadeinright":t.style.transform="translate3d(-"+i+"px,0,0)"}t_animate__forceElemInViewPortRepaint(t,e,a),t.style.transitionDuration="",t.style.transitionDelay=""}var r=t_animate__getAttrByResBase(t,"scale");r&&(t.style.transitionDuration="0s",t.style.transitionDelay="0s",t.style.transform="scale("+r+")",t_animate__forceElemInViewPortRepaint(t,e,a),t.style.transitionDuration="",t.style.transitionDelay="");var o=t_animate__getAttrByResBase(t,"delay");o&&(t.style.transitionDelay=o+"s");var s=t_animate__getAttrByResBase(t,"duration");s&&(t.style.transitionDuration=s+"s")}function t_animate__removeInlineAnimStyles(){if(window.innerWidth<980){var t=document.querySelectorAll(".t396__elem.t-animate:not(.t-animate_wait)");Array.prototype.forEach.call(t,(function(t){t.style.transform="",t.style.transitionDuration="",t.style.transitionDelay=""}))}}function t_animate__forceElemInViewPortRepaint(t,e,a){t&&e<a+500&&t.offsetHeight}function t_animate__detectElemTriggerOffset(t,e){var a=t_animate__getAttrByResBase(t,"trigger-offset"),n=e;return a&&(n=e-1*(a=a.replace("px",""))),n}function t_animate__saveSectionHeaderStartTime(t){var e=t.querySelectorAll(".t-section__title.t-animate"),a=t.querySelectorAll(".t-section__descr.t-animate");e.length&&Array.prototype.forEach.call(e,(function(t){t.setAttribute("data-animate-start-time",Date.now())})),a.length&&Array.prototype.forEach.call(a,(function(t){t.setAttribute("data-animate-start-time",Date.now()+160)}))}function t_animate__getCurBlockSectionHeadDelay(t){var e=0;return t.querySelectorAll(".t-section__title.t-animate").length&&(e+=.16),t.querySelectorAll(".t-section__descr.t-animate").length&&(e+=.16),e}function t_animate__makeSectionButtonWait(t){var e=t.querySelectorAll(".t-animate[data-animate-chain=yes]").length,a=t.querySelectorAll(".t-section__bottomwrapper .t-btn.t-animate");e.length&&a.length&&Array.prototype.forEach.call(a,(function(t){t.classList.add("t-animate__btn-wait-chain")}))}function t_animate__checkSectionButtonAnimation(t,e){var a=t.querySelectorAll(".t-animate__btn-wait-chain");a.length&&Array.prototype.forEach.call(a,(function(t){t.style.transitionDelay=e+.16+"s",t_animate__removeNoHoverClassFromBtns(t),t.classList.remove("t-animate__btn-wait-chain"),t_animate__setStartAnimationClass(t,!1)}))}function t_animate__checkSectionButtonAnimation__outOfTurn(t){var e=t.querySelectorAll(".t-animate[data-animate-chain=yes]"),a;(e=Array.prototype.filter.call(e,(function(t){return!t.classList.contains("t-animate_started")}))).length||t_animate__checkSectionButtonAnimation(t,.16)}function t_animate__addNoHoverClassToBtns(){var t=document.querySelectorAll(".t-btn.t-animate");Array.prototype.forEach.call(t,(function(t){t.classList.add("t-animate_no-hover")}))}function t_animate__removeNoHoverClassFromBtns(t){if(!t)return!1;var e=t.classList.contains("t-btn")?t:null;e&&(e.ontransitionend=function(t){"opacity"!==t.propertyName&&"transform"!==t.propertyName||(e.classList.remove("t-animate_no-hover"),e.style.transitionDelay="",e.style.transitionDuration="",this.ontransitionend=null)})}function t_animate__getGroupsOffsets(t){t.forEach((function(t){var e=t.querySelector(".t-animate");if(e){t.curTopOffset=e.getBoundingClientRect().top+window.pageYOffset;var a=t_animation__getZoom(t);window.isOnlyScalable||(t.curTopOffset*=a)}}))}function t_animation__getZoom(t){if(void 0!==t.scaleFactor)return t.scaleFactor;var e=t.closest(".t396__artboard");if(!e)return 1;var a=document.querySelector('script[src*="tilda-blocks-2.7"]');return e.classList.contains("t396__artboard_scale")||!a&&"undefined"!=typeof t396_ab__getFieldValue&&"window"===t396_ab__getFieldValue(e,"upscale")?window.tn_scale_factor:1}function t_animate__getChainOffsets(t){t.forEach((function(t){var e=t.querySelectorAll(".t-animate_wait[data-animate-chain=yes]");t.itemsOffsets=[],Array.prototype.forEach.call(e,(function(e,a){t.itemsOffsets[a]=e.getBoundingClientRect().top+window.pageYOffset}))}))}function t_animate__getElemsOffsets(t){t.forEach((function(t){t.curTopOffset=window.pageYOffset+t.getBoundingClientRect().top;var e=t_animation__getZoom(t);window.isOnlyScalable||(t.curTopOffset*=e)}))}function t_animate__removeAnimFromHiddenSlides(t){var e;if(t.querySelectorAll(".t-slides").length){var a=t.querySelectorAll(".t-slides__item");a=Array.prototype.filter.call(a,(function(t){return!t.classList.contains("t-slides__item_active")}));var n=[];a.forEach((function(t){var e=t.querySelector(".t-animate");e&&n.push(e)})),n.forEach((function(t){t_animate__removeAnimationClass(t,"no-hover")}))}}function t_animate__wrapTextWithOpacity(){var t=document.querySelectorAll(".t-title.t-animate, .t-descr.t-animate, .t-uptitle.t-animate, .t-text.t-animate");Array.prototype.forEach.call(t,(function(t){var e=t.getAttribute("style");if(e&&-1!==e.indexOf("opacity")){var a=t.style.opacity;if(a&&a>0){t.style.opacity="";var n=document.createElement("div");n.style.opacity=a;var i=t.childNodes;Array.prototype.forEach.call(i,(function(t){var e=t.cloneNode(!0);n.appendChild(e)})),t.innerHTML="",t.appendChild(n)}}}))}function t_animate__checkIE(){var t=window.navigator.userAgent,e=t.indexOf("MSIE"),a="",n=!1;return e>0&&(8!==(a=parseInt(t.substring(e+5,t.indexOf(".",e))))&&9!==a||(n=!0)),n}"loading"!==document.readyState?t_animate__init():document.addEventListener("DOMContentLoaded",t_animate__init);
|