1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[9837,9872],{19363:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});var i=s(59492),n=s(21464);class r{static startAnimation(){r.isAnimating=!0,(0,n.Ys)(()=>r.isAnimating=!1,600)}constructor(t,e,s){this.tmp={},this.element=t,this.list=this.element.querySelector("ul"),this.scrollbar=this.element.querySelector(".nx-mob-nav__scrollbar"),this.rootAngle=e,this.foldAngle=s,this.currentY=0,this.endY=0,this.rect=this.element.getBoundingClientRect(),this.element.cnList=this,document.documentElement.addEventListener("niveax:navigation:leftaligned",t=>{this.leftAligned=t.detail.leftAligned})}setup(){const t=this.element.classList.contains("nx-mob-nav__level--1"),e=t?1.85:1;return this.deltaY=this.element.clientHeight/1.2-this.list.offsetHeight*e,this.setupScrollbar(t),this.setupItems(),this.deltaY>0||this.allowTranstion(),this}setupItems(){return this.items?this.items.forEach(t=>t.fadeLink(this.rect).setup()):this.items=Array.from(this.list.getElementsByTagName("li")).map(t=>new i.default(t,1.125*this.element.clientWidth,this.rootAngle,this.foldAngle).fadeLink(this.rect).setup()),this}setupScrollbar(t=!1){var e,s=t?.5*this.element.clientHeight:this.element.clientHeight;return this.scrollbarRatio=s/this.list.offsetHeight,this.deltaY>0?(this.scrollbar.hidden=!0,this):(e=90*this.scrollbarRatio,this.scrollbar.style.backgroundImage=`linear-gradient(${0+e/2}deg, transparent 50%, var(--MobileNavScrollbarColor, var(--BaseFontColor)) 50%),linear-gradient(${180-e/2}deg, transparent 50%, var(--MobileNavScrollbarColor, var(--BaseFontColor)) 50%)`,this.moveScrollbar(0),t&&this.showScrollbar(),this)}startTranslation(){var t,e,s;return i=>{t=i.touches,e=i.currentTarget.getBoundingClientRect(),s=this.localToGlobal(t[0].clientX,t[0].clientY,e.left,e.top),this.tmp.onTouchMove=this.translate(s),this.element.addEventListener("touchmove",this.tmp.onTouchMove,!1)}}translate(t){var e,s,i,n;return r=>{e=r.touches,s=r.currentTarget.getBoundingClientRect(),i=this.localToGlobal(e[0].clientX,e[0].clientY,s.left,s.top),n=this.endY+(i.y-t.y),this.currentY=this.tmp.lastCurrentY=Math.max(Math.min(n,0),this.deltaY),this.moveNavItems(this.currentY).moveScrollbar(this.currentY)}}moveNavItems(t){return this.items.forEach(e=>e.move(t).fadeLink(this.rect,t)),this}translateToLastPosition(){return this.currentY=this.tmp.lastCurrentY,this.moveNavItems(this.currentY).moveScrollbar(this.currentY),this}allowTranstion(){return this.tmp.onTouchStart=this.startTranslation(),this.tmp.onTouchEnd=this.endTranslation(),this.element.addEventListener("touchstart",this.tmp.onTouchStart,!1),this.element.addEventListener("touchend",this.tmp.onTouchEnd,!1),this}preventTransition(){return this.element.removeEventListener("touchstart",this.tmp.onTouchStart,!1),this.element.removeEventListener("touchmove",this.tmp.onTouchMove,!1),this.element.removeEventListener("touchend",this.tmp.onTouchEnd,!1),this.tmp.onTouchMove=this.tmp.onTouchStart=this.tmp.onTouchEnd=null,this}endTranslation(){var t,e;return s=>{t=s.changedTouches,e=this.element.getBoundingClientRect(),this.localToGlobal(t[0].clientX,t[0].clientY,e.left,e.top),this.endY=this.currentY,this.element.removeEventListener("touchmove",this.tmp.onTouchMove,!1),this.tmp.onTouchMove=null}}localToGlobal(t,e,s,i){return{x:t-s,y:e-i}}reset(){return this.element.classList.remove("nx-mob-nav__level--show"),this.resetTranslation(!1,-1),this.items.forEach(t=>t.reset()),this}resetTranslation(t,e){return this.currentY=this.endY=this.tmp.lastCurrentY||0,setTimeout(()=>{this.moveScrollbar(this.currentY),t&&this.items.forEach(t=>t.fadeLink(this.rect))},e),this}resetLastCurrentY(){return this.tmp.lastCurrentY=null,this}open(t){return this.items.forEach((e,s)=>{s<t?e.translate(270).fadeOut():s>t?e.translate(90).fadeOut():e.translate(238).open()}),this}close(t){return this.items.forEach((e,s)=>{e.translate(e.angle),s!=t?e.fadeIn():e.close()}),this}startMotion(){return this.element.classList.add("nx-mob-nav__level--apply-fold-motion"),this}stopMotion(){return setTimeout(()=>this.element.classList.remove("nx-mob-nav__level--apply-fold-motion"),600),this}
1fold(){return this.items.forEach(t=>t.translate(t.foldAngle).fadeOut()),this}unfold(){return this.items.forEach(t=>t.translate(t.angle).fadeIn()),this}show(){return r.startAnimation(),this.element.classList.add("nx-mob-nav__level--show"),this}hide(){return r.startAnimation(),(0,n.Ys)(()=>{this.element.classList.remove("nx-mob-nav__level--show")},600),this}moveScrollbar(t){var e,s,i=this.scrollbar.clientWidth/2*Math.sin(Math.PI/180);return s=(e=(90-90*this.scrollbarRatio)/2)+(-t/this.deltaY*(i*e)||0)+20,this.leftAligned&&(s=-s-180),this.scrollbar.style.transform=`translateY(-50%) rotate(${s}deg)`,this}showScrollbar(){return this.scrollbar.classList.add("nx-mob-nav__scrollbar--show"),this}hideScrollbar(){return this.scrollbar.classList.remove("nx-mob-nav__scrollbar--show"),this}}r.isAnimating=!1;const l=r},59492:(t,e,s)=>{s.r(e),s.d(e,{default:()=>i});class i{constructor(t,e,s,i){this.element=t,this.link=Array.from(this.element.getElementsByTagName("a")),this.radius=e-.66*this.element.offsetWidth,this.rootAngle=this.angle=s,this.foldAngle=i,this.oneDegInPX=this.radius*Math.sin(Math.PI/180),this.height=this.element.offsetHeight,this.originRect=this.element.getBoundingClientRect(),document.documentElement.addEventListener("niveax:navigation:leftaligned",t=>this.leftAligned=t.detail.leftAligned)}setup(){return this.angle=this.rootAngle-(this.element.offsetTop+this.element.offsetHeight/2)/this.oneDegInPX,this.translate(this.angle),this.element.cni=this,this}move(t){var e=this.angle-t/this.oneDegInPX;return this.translate(e),this}translate(t){return this.element.style.transform=`rotate(${this.leftAligned?-t:t}deg)translate(${this.leftAligned?-this.radius:this.radius}px)rotate(${this.leftAligned?t:-t}deg)`,this}reset(){return this.element.classList.remove("nx-mob-nav__item--show"),this.element.classList.remove("nx-mob-nav__item--open"),this.element.removeAttribute("style"),this.originRect=this.element.getBoundingClientRect(),this}fadeIn(){return this.element.classList.add("nx-mob-nav__item--show"),this}fadeOut(){return this.element.classList.remove("nx-mob-nav__item--show"),this}open(){return this.element.classList.add("nx-mob-nav__item--open"),this}close(){return this.element.classList.remove("nx-mob-nav__item--open"),this}fadeLink(t,e){var s,i;return e=e||0,this.originRect.bottom+e>t.bottom?(s=this.originRect.bottom-t.bottom,i=Math.max(Math.min(1-(s+e)/40,1),0),this.link.forEach(t=>t.style.opacity=i.toString()),this):(s=this.originRect.top-t.top,i=Math.max(Math.min(1+(s+e)/40,1),0),this.link.forEach(t=>t.style.opacity=i.toString()),this.element.classList.toggle("nx-mob-nav__item--hidden",0==i),this)}}}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/CircleNavigationList.d40c22cb.js.2671def8.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.