1"use strict";(self.webpackChunk_spinnwerk_blueprint=self.webpackChunk_spinnwerk_blueprint||[]).push([[6111],{8195:function(t,e,o){o.r(e),o.d(e,{AutoScrolling:function(){return r}});var n=o(2194),i=o(1378);let s=null;class r{constructor(t={}){this.defaultOptions={offset:0,fromHashChanges:!0,fromAnchors:!0,updateHash:!1,getTargetId:void 0,scrollAnchors:"",extendDefaultAnchorsSelector:!1,beforeScroll(){}},this.options={...this.defaultOptions,...t,elOffset:{}},this._init(),s=this}static singleton(t={}){return null===s&&new r(t),s}_init(){this._initOffset(),this.options.fromHashChanges&&this._initHashScrolling(),this.options.fromAnchors&&this._initAnchorScrolling()}_initOffset(){let t=this.options.offset;"object"!=typeof t?t=this.options.offset={small:{up:t,down:t}}:("up"in t||"down"in t)&&(t=this.options.offset={small:t});for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let o=t[e];t[e]="object"!=typeof o?{up:Number(o),down:Number(o)}:{up:isNaN(o.up)?document.querySelector(o.up):Number(o.up),down:isNaN(o.down)?document.querySelector(o.down):Number(o.down)}}this.options.offset=t}_initEvents(){window.addEventListener("popstate",this._onUrlChange.bind(this))}_initHashScrolling(){this._initEvents(),CONFIG.initialHash&&(location.hash=CONFIG.initialHash.replace(/^#\/?(.*)/,"#$1"))}_onScrollAnchorActivation(t,e){let o=t.target.closest(e),n=o.href,i=window.location.pathname.replace(/\/$/,""),s=n.replace(/^.*\/\/[^/]+/,"").replace(/#.*/,"").replace(/\/$/,"");n&&-1!==n.indexOf("#")&&(n=n.split("#").pop()),this.options.fromHashChanges&&(this.options.updateHash&&"false"!==o.dataset.setHash||!this.options.updateHash&&"true"===o.dataset.setHash)?(t.preventDefault(),n&&"/"!==n[0]&&(n="/"+n),i!==s?window.location.href=o.href:location.hash=n):i===s&&(t.preventDefault(),this.scroll(this._getTargetSelector(n)))}async _initAnchorScrolling(){const t=this.options.scrollAnchors,e='a[href*="#"]:not([href="#"]):not(.no-scroll)',o=[this.options.extendDefaultAnchorsSelector?e:null,t||e].filter(Boolean);this.options.fromHashChanges||this._initEvents(),(await(0,i.cJ)()).addEventListener(o,"click",this._onScrollAnchorActivation.bind(this)).addEventListener(o,"keydown",((t,e)=>{"Enter"!==t.key&&" "!==t.key||(this._onScrollAnchorActivation(t,e),t.stopImmediatePropagation())}))}_onUrlChange(t){!0!==this.options.fromHashChanges&&this.options.fromAnchors?this._onUrlChangeWithAnchorScrolling(t):this._onUrlChangeWithHashScrolling(t)}_onUrlChangeWithHashScrolling(t){t.preventDefault(),t.stopImmediatePropagation();let e,o=this._getTargetSelector(location.hash);try{e=document.querySelectorAll(o)}catch(t){e=null}e&&("complete"===document.readyState?this.scroll(o):document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&this.scroll(o)})))}_getTargetSelector(t){let e,o=this.options;return e="function"==typeof o.getTargetId?o.getTargetId(t):t.replace(/^#/,""),"#"+e}_onUrlChangeWithAnchorScrolling(t){t.preventDefault(),t.stopImmediatePropagation()}scroll(t,e=0,o=!0){let i=n(t),s=i.data("scroll-offset");return s&&isNaN(s)&&(s=document.querySelector(s).scrollHeight),this.options.beforeScroll(i.get(0),i),new Promise((n=>{Foundation.SmoothScroll.scrollToLoc(i,{threshold:0,offset:this._getScrollOffset(t)+(s||0)+e,animationDuration:300},(()=>{if(o){let e="string"==typeof t?document.querySelector(t):t;if(e.focus({preventScroll:!0}),document.activeElement!==e){let t={once:!0,passive:!0},o=()=>{e.removeAttribute("tabindex")};e.tabIndex=-1,e.addEventListener("blur",o,t),e.addEventListener("focusout",o,t),e.focus({preventScroll:!0})}}n()}))}))}_getScrollOffset(t){let e,o=this.options,n=0,i="string"==typeof t?document.querySelector(t):t;if(!i)return n;e=i.offsetTop<Math.max(document.documentElement.scrollTop,document.body.scrollTop)?"up":"down";for(const t of[...Foundation.MediaQuery.queries].reverse())if(t.name in o.offset&&Foundation.MediaQuery.atLeast(t.name)){let i=o.offset[t.name][e];n="function"==typeof i?i():"object"==typeof i?i.getBoundingClientRect().height:i;break}return n}}}}]); 2//# sourceMappingURL=null.336d5ebc5436-0000cbe1c3010f08623a.js.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.