1"use strict";(self.webpackChunkLaerdal=self.webpackChunkLaerdal||[]).push([[3003],{9211:function(t,i,s){s.r(i);var e=s(63103),n=s(56963),a=s(78658),o=s(65311),l=s.n(o),c=s(65539),r=s(5921);s(76275);class h extends e.Z{constructor(){super(),this.defaultOptions={containerSelector:"[data-page-section-nav-container]",linksListSelector:"[data-page-section-nav-link-list]",linkSelector:"[data-page-section-nav-link]",activeNavigationItem:"[data-tab-trigger].c-navbar__item.is-active",linkSelectorAttr:"data-page-section-nav-link",sectionHeadingSelector:"[data-nav-section-heading]",sectionHeadingAttr:"nav-section-heading",accordionToggleSelector:"[data-accordion-toggle]",blockParentSelector:".block",carouselSelector:".c-carousel",targetSectionIndexAttr:"data-target-section-idx",sectionIndexAttr:"data-section-idx",visibleClass:"c-page-section-nav--visible",linkItemClass:"c-page-section-nav__item",linkClass:"c-page-section-nav__link",linkActiveClass:"is-active",animateDuration:500,animateEasing:"easeInOutQuad",scrollOffsetBias:100},this.state={currentSection:0,containerScrollLeft:0}}initChildren(){this.$body=l()("body"),this.$container=this.$el.find(this.options.containerSelector),this.$linksList=this.$el.find(this.options.linksListSelector),this._isTabsViewPresent()?c.Z.on("tabsLoaded",this._onTabsLoaded.bind(this)):this._onTabsLoaded()}_isTabsViewPresent(){return l()(".js-tabs-header").length>0}_onTabsLoaded(){const t=this;"#overview"===this.$body.find(this.options.activeNavigationItem).attr("data-tab-trigger")&&(this.$sectionHeadings=this.$body.find(this.options.sectionHeadingSelector).filter((function(){return 0===l()(this).closest(t.options.blockParentSelector).parents(t.options.carouselSelector).length})),0!==this.$sectionHeadings.length?(this.$linksList.html(this._buildNavHTML()),this.$el.addClass(this.options.visibleClass),this.$links=this.$linksList.find(this.options.linkSelector),this.$activeLink=this.$links.filter(this.options.linkActiveClass),this.addListeners(),c.Z.emit("active.PageSectionNavView")):this.$el.remove())}addListeners(){void 0!==this.$links&&this.$links.on("click",this._handleLinkClick.bind(this)),void 0!==this.$container&&this.$container.on("scroll",this._handleContainerScroll.bind(this)),this.$sectionHeadings&&this.$sectionHeadings.each(((t,i)=>{const s=l()(i),e=s.closest(this.options.blockParentSelector);s.attr(this.options.sectionIndexAttr,t),e.waypoint({offset:this.options.scrollOffsetBias,handler:t=>{if(this.state.currentSection=parseInt(s.attr(this.options.sectionIndexAttr),10),"up"===t&&this.state.currentSection>0)this.state.currentSection--;else if("up"===t&&0===this.state.currentSection)return void this.$links.removeClass(this.options.linkActiveClass);this._updateActiveLink()}})})),l()("html").hasClass("lt-ie9")||(this.accordionItemView=(0,a.default)(),this.accordionItemView.init(this.$container,{disableAtBreakpoint:r.Z.large}))}_buildNavHTML(){return`${this.$sectionHeadings.map(((t,i)=>`<li class="${this.options.linkItemClass}">\n <span class="${this.options.linkClass}"\n ${this.options.targetSectionIndexAttr}="${t}"\n ${this.options.linkSelectorAttr}\n data-gtm data-gtm-category="Navigation" data-gtm-action="Sticky" data-gtm-label="${l()(i).data(this.options.sectionHeadingAttr)}">\n ${l()(i).data(this.options.sectionHeadingAttr)}\n\n </span>\n </li>`)).get().join("")}`}_updateActiveLink(){this.$activeLink=this.$links.removeClass(this.options.linkActiveClass).filter(`[${this.options.targetSectionIndexAttr}=${this.state.currentSection}]`).addClass(this.options.linkActiveClass)}_handleContainerScroll(){this.state.containerScrollLeft=this.$container.scrollLeft()}_handleLinkClick(t){t.preventDefault();const i=l()(t.target),s=this.$sectionHeadings.eq(parseInt(i.attr(this.options.targetSectionIndexAttr),10)).closest(this.options.blockParentSelector);(0,n.Z)(this.$body,"scroll",{offset:s.offset().top-this.options.scrollOffsetBias,duration:this.options.animateDuration,easing:this.options.animateEasing}),this.$el.find(this.options.accordionToggleSelector).trigger("click")}}i.default=()=>new h}}]);
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.