1(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[8130,9895],{20446:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>p});var i=o(19446),l=o(45204),n=o(36188),r=o(24329),s=o(38373),c=o(98684),a=o(21464),h=o(35879),d=o(61842),u=o.n(d);const f='[data-module="AnchorNavigation"]';class p{static setup(t=f){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{new p(t),t.dataset.moduleInitialized="true"})}constructor(t){this.element=t,this.sections=Array.from(document.querySelectorAll("div:not(.nx-tabs__item) > [data-anchor-text]")),this.scrollDirection=new h.default(t),this.scrollBody$=(0,i.R)(window,"scroll"),this.clickBody$=(0,i.R)(document,"click"),this.windowLoad$=(0,i.R)(window,"load"),this.windowPopstate$=(0,i.R)(window,"popstate"),this.init()}init(){var t;return this.buildNavigation(this.sections)?(this.element.removeAttribute("hidden"),(0,a.aO)(this.element.querySelector(".nx-scroll-wrapper__inner")),this.subscribeToScrollOnBody(),this.scrollToAnchorSectionOnLoad()||this.windowLoad$.pipe().subscribe(()=>this.scrollToAnchorSectionOnLoad()),this.clickNav$.subscribe(({target:t})=>this.scrollToActiveSection(t)),this.windowPopstate$.pipe().subscribe(()=>this.scrollToAnchorSectionOnLoad()),this.clickBody$.subscribe(t=>this.onDefaultAnchorClick(t)),this.isMainNavigationBurgerType()&&(null===(t=this.element.querySelector(".nx-anchor-navigation"))||void 0===t||t.classList.add("nx-anchor-navigation--navigation-type-burger")),this.correctPositionOnScrollEnd(),this):(this.element.remove(),this)}correctPositionOnScrollEnd(){let t=!0;window.addEventListener("scrollend",()=>{this.isScrollingToAnchor&&(t?(this.scrollToSection(this.isScrollingToAnchor),t=!1):(this.scrollToSection(this.isScrollingToAnchor),this.isScrollingToAnchor=null,t=!0))})}isMainNavigationBurgerType(){return null!==document.body.querySelector("header.nx-mob-burger-nav--activated")}buildNavigation(t){const e=this.element.querySelector(".nx-scroll-wrapper__inner"),o=t.map((t,e)=>{const o=t.getAttribute("data-anchor-id"),i=t.getAttribute("data-anchor-text");if(i&&""!==i&&o)return t.setAttribute("data-anchor-content",""),`<a class="nx-anchor-link nx-font-heading-6" data-href="${o}" title="${i}" tabindex="0">${i}</a>`}).join("");return o?(e.innerHTML=o,this.initAnchorLinks(),this.clickNav$=(0,i.R)(e,"click").pipe((0,l.p)(({target:t})=>"A"===t.tagName)),this):null}subscribeToScrollOnBody(){return this.scrollBody$.pipe((0,n.Z)(null),(0,r.Q)(this.clickNav$)).subscribe(()=>this.setStickyNavigation()),this}initAnchorLinks(){this.navLinks=Array.from(this.element.querySelectorAll(".nx-anchor-link")),this.triggerClickOnEnterForNavLinks()}triggerClickOnEnterForNavLinks(){this.navLinks.forEach(t=>{t.addEventListener("keypress",e=>{"Enter"===e.key&&t.click()})})}getAnchorSections(){return Array.from(document.querySelectorAll("[data-anchor-content]"))}onDefaultAnchorClick(t){const e="A"===t.target.tagName?t.target:t.target.closest("a"),o=!!e&&e.getAttribute("href");o&&(0,a.IK)(o)&&(t.preventDefault(),this.scrollToActiveSection(e))}isOnTopViewport(t,e=0){const o=t.getBoundingClientRect(),i=document.documentElement.offsetHeight;return Math.floor(o.top)<=e&&Math.floor(o.top)<i&&Math.floor(o.bottom)>e}getActiveSection(){return Array.from(this.navLinks).filter(t=>{let{href:e}=t.dataset,o=document.getElementById(e);return this.isOnTopViewport(o,this.getCorrectionOnScroll())})[0]}setActiveSection(){const t=this.getActiveSection();return(0,c.vg)(this.navLinks,"nx-active"),t&&(this.scrollToHorizontal(this.element.querySelector(".nx-scroll-wrapper__inner"),t),t.classList.add("nx-active")),t}getCorrectionOnScroll(){const t=(0,c.UI)(this.element);return this.scrollDirection.scrollingFlag?t+this.getBreadcrumbHeight():(0,c.UI)(this.element)}getBreadcrumbHeight(){let t=document.querySelector(".nx-breadcrumb");return t?(0,c.UI)(t):0}scrollToActiveSection(t){const e=document.getElementById(t.dataset.href)||document.querySelector(t.getAttribute("href"));Math.round(e.getBoundingClientRect().top)!==this.getCorrectionOnScroll()?(0,i.R)(e,"niveax:animationend").pipe((0,s.$)()).subscribe(()=>this.subscribeToScrollOnBody()):this.subscribeToScrollOnBody();
1const o=e.closest(".nx-tab-container-item");return o&&e.closest(".nx-tabs-container").dispatchEvent(new CustomEvent("niveax:openTab",{detail:{tabNode:o}})),this.scrollToSection(e),this.subscribeToScrollOnBody(),this.scrollToHorizontal(this.element.querySelector(".nx-scroll-wrapper__inner"),t),this.setKeyboardFocusToActiveSection(e),this}setKeyboardFocusToActiveSection(t){t.setAttribute("tabindex","-1"),t.focus()}scrollToSection(t){this.isScrollingToAnchor=t;const e=t.getBoundingClientRect().top;let o=this.getScrollOffset();requestAnimationFrame(()=>{window.scrollBy({top:e-o,left:0,behavior:"smooth"})})}getScrollOffset(){let t=0,e=document.querySelector(".nx-breadcrumb");if(e&&("fixed"===getComputedStyle(e).position||"sticky"===getComputedStyle(e).position)){const o=getComputedStyle(e).maxHeight;"0"!==o&&"0px"!==o&&"none"!==o&&(t+=(0,c.UI)(e))}let o=document.querySelector(".nx-mob-burger-nav__wrapper");o&&"none"!==getComputedStyle(o).display&&(t+=(0,c.UI)(o));let i=this.element.querySelector(".nx-anchor-navigation");return!i||"fixed"!==getComputedStyle(i).position&&"sticky"!==getComputedStyle(i).position||(t+=(0,c.UI)(i)),t}isStickyNavigation(){const t=this.element.getBoundingClientRect().top,e=(0,a.Gw)(this.getAnchorSections()).getBoundingClientRect().bottom;return t<=this.getBreadcrumbHeight()&&e>0}setStickyNavigation(){return this.isStickyNavigation()?(this.element.querySelector(".nx-anchor-navigation").classList.add("nx-anchor-navigation--sticky"),this.setActiveSection()):(this.element.querySelector(".nx-anchor-navigation").classList.remove("nx-anchor-navigation--sticky"),(0,c.vg)(this.navLinks,"nx-active")),this}scrollToHorizontal(t,e){(0,a.un)()&&u().polyfill(),t.scrollTo({top:0,left:e.offsetLeft-20,behavior:"smooth"})}scrollToAnchorSectionOnLoad(){const t=window.location.hash.substring(1),e=document.getElementById(`${t}`);return!(!t||-1!==t.indexOf("layer")||!e)&&(this.scrollToSection(e),!0)}}p.setup(f)},35879:(t,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>i});class i{constructor(t,e="nx-motion-scrolling--up",o="nx-motion-scrolling--down"){this.element=t,this.scrollingUpClass=e,this.scrollingDownClass=o,this.scrollingFlag,this.init()}init(){NiveaX.addToEventStore("scroll",t=>this.scroll(t),window)}scroll(t){this.toggleScrollClasses(this.lastPageYOffset),this.lastPageYOffset=pageYOffset}toggleScrollClasses(t){Math.abs(pageYOffset-t)<40||window.scrollY<0||(pageYOffset<t?(this.element.classList.add(this.scrollingUpClass),this.element.classList.remove(this.scrollingDownClass),this.scrollingFlag=!0):pageYOffset>t&&(this.element.classList.add(this.scrollingDownClass),this.element.classList.remove(this.scrollingUpClass),this.scrollingFlag=!1))}}},61842:t=>{!function(){"use strict";t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var o,i=t.HTMLElement||t.Element,l={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||s,scrollIntoView:i.prototype.scrollIntoView},n=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,r=(o=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(o)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?f.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):l.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?l.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):f.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var t=arguments[0].left,e=arguments[0].top;f.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");l.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):l.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var o=function(t){for(;t!==e.body&&!1===d(t);)t=t.parentNode||t.host;return t}(this),i=o.getBoundingClientRect(),n=this.getBoundingClientRect();o!==e.body?(f.call(this,o,o.scrollLeft+n.left-i.left,o.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(o).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else l.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(t,e){this.scrollLeft=t,this.scrollTop=e}function c(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;
vendor: 1,003 bytes, lines 1-2
1if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function a(t,e){return"Y"===e?t.clientHeight+r<t.scrollHeight:"X"===e?t.clientWidth+r<t.scrollWidth:void 0}function h(e,o){var i=t.getComputedStyle(e,null)["overflow"+o];return"auto"===i||"scroll"===i}function d(t){var e=a(t,"Y")&&h(t,"Y"),o=a(t,"X")&&h(t,"X");return e||o}function u(e){var o,i,l,r,s=(n()-e.startTime)/468;r=s=s>1?1:s,o=.5*(1-Math.cos(Math.PI*r)),i=e.startX+(e.x-e.startX)*o,l=e.startY+(e.y-e.startY)*o,e.method.call(e.scrollable,i,l),i===e.x&&l===e.y||t.requestAnimationFrame(u.bind(t,e))}function f(o,i,r){var c,a,h,d,f=n();o===e.body?(c=t,a=t.scrollX||t.pageXOffset,h=t.scrollY||t.pageYOffset,d=l.scroll):(c=o,a=o.scrollLeft,h=o.scrollTop,d=s),u({scrollable:c,method:d,startTime:f,startX:a,startY:h,x:i,y:r})}}}}()}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/AnchorNavigation.f054a121.js.fdb9ff42.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.