Skip to Content

JavaScript File

URL: https://static.tildacdn.com/js/tilda-menu-1.0.min.js
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Tue, 21 Feb 2023 14:14:22 GMT
Download Time: Less than a second
Cookies: None
Size: 12 KB
HTTP Headers:  9 headers
Links In:  1 pages
OK Issues: No issues found

1function t_menu__highlightActiveLinks(e){var t=window.location.href,n,r=window.location.pathname;"/"===t[t.length-1]&&(n=t.slice(0,-1)),"/"===r[r.length-1]&&(r=r.slice(0,-1)),"/"===r[0]&&(r=r.slice(1)),""===r&&(r="/");var o=document.querySelectorAll(e);Array.prototype.forEach.call(o,(function(e){var o=e.getAttribute("href");if(o){var i=e.href;i!==t&&i!==r&&o!==t&&o!==r&&n!==t&&n!==r||e.classList.add("t-active")}

2}

3))}

4function t_menu__findAnchorLinks(e,t){var n=document.getElementById("rec"+e),r=t+'[href*="#"]:not(.tooltipstered)',o=n?n.querySelectorAll(r):[];o.length&&t_menu__updateActiveLinks(o,t)}

5function t_menu__updateActiveLinks(e,t){var n=t.slice(2);n=".t"+(n=parseInt(n,10)),e=Array.prototype.slice.call(e);var r=null,o=[],i={}

6;(e=e.reverse()).forEach((function(e){var t=t_menu__getSectionByHref(e);t&&t.id&&(o.push(t),i[t.id]=e)}

7)),t_menu__updateSectionsOffsets(o),o.sort((function(e,t){var n=parseInt(e.getAttribute("data-offset-top"),10)||0,r;return(parseInt(t.getAttribute("data-offset-top"),10)||0)-n}

8)),window.addEventListener("resize",t_throttle((function(){t_menu__updateSectionsOffsets(o)}

9),200));var a=document.querySelectorAll(n);Array.prototype.forEach.call(a,(function(e){e.addEventListener("displayChanged",(function(){t_menu__updateSectionsOffsets(o)}

10))}

11)),setInterval((function(){t_menu__updateSectionsOffsets(o)}

12),5e3),t_menu__highlightNavLinks(e,o,i,r),e.forEach((function(t,n){t.addEventListener("click",(function(){var o=t_menu__getSectionByHref(t);!t.classList.contains("tooltipstered")&&o&&o.id&&(e.forEach((function(e,t){t===n?e.classList.add("t-active"):e.classList.remove("t-active")}

13)),r=o.id)}

14))}

15)),window.addEventListener("scroll",t_throttle((function(){r=t_menu__highlightNavLinks(e,o,i,r)}

16),100))}

17function t_menu__updateSectionsOffsets(e){e.forEach((function(e){var t=e.getBoundingClientRect().top+window.pageYOffset;e.setAttribute("data-offset-top",t.toString())}

18))}

19function t_menu__getSectionByHref(e){if(e){var t=e.getAttribute("href"),n=t?t.replace(/\s+/g,""):"";if(0===n.indexOf("/")&&(n=n.slice(1)),t&&e.matches('[href*="#rec"]'))return n=n.replace(/.*#/,""),document.getElementById(n);var r=t?t.trim():"",o=-1!==r.indexOf("#")&&r.indexOf("#");"number"==typeof o?r=r.slice(o+1):"number"==typeof(o=-1!==r.indexOf("/")&&r.indexOf("/"))&&(r=r.slice(o+1));var i='.r[data-record-type="215"] a[name="'+r+'"]';return document.querySelector(i)?document.querySelector(i).closest(".r"):null}

20}

21function t_menu__highlightNavLinks(e,t,n,r){if(document.documentElement.classList.contains("t-body_scroll-locked"))return null;var o=window.pageYOffset,i=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),a=r,l=t.length?t[t.length-1]:null,s=l&&parseInt(l.getAttribute("data-offset-top"),10)||0;if(t.length&&null===r&&s>o+300)return e.forEach((function(e){e.classList.remove("t-active")}

22)),null;for(var u=0;u<t.length;u++){var c=parseInt(t[u].getAttribute("data-offset-top"),10),d=t[u].id?n[t[u].id]:null;if(o+300>=c||0===u&&o>=i-window.innerHeight){null===r&&d&&!d.classList.contains("t-active")?(e.forEach((function(e){e.classList.remove("t-active")}

23)),d&&d.classList.add("t-active"),a=null):null!==r&&t[u].id&&r===t[u].id&&(a=null);break}

24}

25return a}

26function t_menu__setBGcolor(e,t){var n=document.querySelectorAll(t);Array.prototype.forEach.call(n,(function(e){window.innerWidth>980?"yes"===e.getAttribute("data-bgcolor-setbyscript")&&(e.style.backgroundColor=e.getAttribute("data-bgcolor-rgba")):(e.style.backgroundColor=e.getAttribute("data-bgcolor-hex"),e.setAttribute("data-bgcolor-setbyscript","yes"),e.style.transform&&(e.style.transform=""),e.style.opacity&&(e.style.opacity=""))}

27))}

28function t_menu__showFixedMenu(e,t){var n,r=[".t280",".t282",".t450",".t451",".t466",".t453"].some((function(e){return e===t}

29));if(!(window.innerWidth<=980)||r){var o=document.getElementById("rec"+e);if(!o)return!1;var i=o.querySelectorAll(t);Array.prototype.forEach.call(i,(function(e){var t=e.getAttribute("data-appearoffset");if(t){-1!==t.indexOf("vh")&&(t=Math.floor(window.innerHeight*(parseInt(t)/100))),t=parseInt(t,10);var n=e.clientHeight;"number"==typeof t&&window.pageYOffset>=t?e.style.transform==="translateY(-"+n+"px)"&&t_menu__slideElement(e,n,"toBottom"):"translateY(0px)"===e.style.transform?t_menu__slideElement(e,n,"toTop"):(e.style.transform="translateY(-"+n+"px)",e.style.opacity="0")}

30}

31))}

32}

33function t_menu__changeBgOpacity(e,t){var n,r=["t280","t282","t451","t466"].some((function(e){return-1!==t.indexOf(e)}

34));if(!(window.innerWidth<=980)||r){var o=document.getElementById("rec"+e);if(!o)return!1;var i=o.querySelectorAll(t);Array.prototype.forEach.call(i,(function(e){var t=e.getAttribute("data-bgcolor-rgba"),n=e.getAttribute("data-bgcolor-rgba-afterscroll"),r=e.getAttribute("data-bgopacity"),o=e.getAttribute("data-bgopacity-two"),i=e.getAttribute("data-menushadow")||"0",a="100"===i?i:"0."+i;e.style.backgroundColor=window.pageYOffset>20?n:t,window.pageYOffset>20&&"0"===o||window.pageYOffset<=20&&"0.0"===r||" "===i?e.style.boxShadow="none":e.style.boxShadow="0px 1px 3px rgba(0,0,0,"+a+")"}

35))}

36}

37function t_menu__createMobileMenu(e,t){var n=document.getElementById("rec"+e);if(n){var r=n.querySelector(t),o=r?r.getAttribute("data-mobile-burgerhook"):"",i=n.querySelector(t+"__mobile"),a=i||n.querySelector(".tmenu-mobile"),l=i?t.slice(1)+"_opened":"tmenu-mobile_opened",s="t-menuburger-opened";if(a)if(r&&r.classList.contains(t.slice(1)+"__mobile_burgerhook")&&o){if(a.querySelector(".tmenu-mobile__burger"))var u=a.querySelector(".tmenu-mobile__burger");else if(a.querySelector(".t-menuburger"))var u=a.querySelector(".t-menuburger");if(u){var c=u.parentElement,d=document.createElement("a");d.href=o,c&&(d.appendChild(u),c.appendChild(d))}

38}

39else{var u=a.querySelector(".t-menuburger");a.addEventListener("click",(function(n){if(!n.target.closest("a")){if(a.classList.contains(l))t_menu__FadeOut(r,300),a.classList.remove(l),u.classList.remove(s);else if(t_menu__fadeIn(r,300,(function(){r.style.transform&&(r.style.transform=""),r.style.opacity&&(r.style.opacity="")}

40)),a.classList.add(l),u.classList.add(s),r.classList.contains("tmenu-mobile__menucontent_fixed")){var o=getComputedStyle(a).height;r.style.top=o}

...

</html>