1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[51141],{1141(e,t,i){i.r(t),i.d(t,{default:()=>h});var o=i(4059),s=i(4632),n=i(1452),r=i(4335);class h extends r.A{static #e=this.options={cookieExpiration:30,cookieName:"cookie-preference",buttonSelector:".js-cookie-permission-button",resizeDebounceTime:200,autoFocus:!0};init(){this._button=this.el.querySelector(this.options.buttonSelector),this._isPreferenceSet()||(this._setBodyPadding(),this._registerEvents(),this._setFocus()),this._registerShowAndHideCookieBarEvents()}_setFocus(){!this._isDataPrivacyPage()&&this.options.autoFocus&&window.focusHandler.setFocus(this.el,{preventScroll:!0})}_isDataPrivacyPage(){let e=this.el.querySelector(".cookie-permission-content a");if(!e?.href)return!1;let t=e=>e.origin+e.pathname.replace(/\/$/,"").toLowerCase(),i=new URL(this._getCurrentLocation()),o=new URL(e.href);return t(i)===t(o)}_getCurrentLocation(){return window.location.href}_isPreferenceSet(){return!!n.A.getItem(this.options.cookieName)||(this._showCookieBar(),!1)}_showCookieBar(){this.el.style.display="block",this.$emitter.publish("showCookieBar")}_hideCookieBar(){this.el.style.display="none",this.$emitter.publish("hideCookieBar")}_registerEvents(){if(this._button){let e=s.A.isTouchDevice()?"touchstart":"click";this._button.addEventListener(e,this._handleDenyButton.bind(this))}window.addEventListener("resize",o.A.debounce(this._setBodyPadding.bind(this),this.options.resizeDebounceTime),{capture:!0,passive:!0})}_registerShowAndHideCookieBarEvents(){document.addEventListener("showCookieBar",this._handleShowCookieBarEvent.bind(this)),document.addEventListener("hideCookieBar",this._handleHideCookieBarEvent.bind(this))}_handleShowCookieBarEvent(){this._setBodyPadding(),this._showCookieBar(),this._setFocus()}_handleHideCookieBarEvent(){this._removeBodyPadding(),this._hideCookieBar()}_handleDenyButton(e){e.preventDefault();let{cookieExpiration:t,cookieName:i}=this.options;this._hideCookieBar(),this._removeBodyPadding(),n.A.setItem(i,"1",t),this.$emitter.publish("onClickDenyButton")}_calculateCookieBarHeight(){return this.el.offsetHeight}_setBodyPadding(){document.body.style.paddingBottom=`${this._calculateCookieBarHeight()}px`,this.$emitter.publish("setBodyPadding")}_removeBodyPadding(){document.body.style.paddingBottom="0",this.$emitter.publish("removeBodyPadding")}}}}]);
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.