1import{o as s,a}from"./helpers-D3mYkYaM.js";const t="__ont-age-consent";class l{constructor(e="age-consent-msg"){localStorage.getItem(t)||this.setValue({shown:!1,value:!1}),this.consent=JSON.parse(localStorage.getItem(t)),this.modalId=e}handle(){this.consent.shown&&this.consent.value||(this.consent.shown&&!this.consent.value?window.location="/":(s(this.modalId,{prevent:!0}),window.addEventListener("keyup",e=>{this.handleEscapeKey(e)})))}handleEscapeKey(e){e.keyCode===27&&this.decline()}setValue(e){localStorage.setItem(t,JSON.stringify(e))}confirm(){this.setValue({shown:!0,value:!0}),this.gtag({event:"age_check",over23:"yes"}),a(!0)}decline(){this.setValue({shown:!0,value:!1}),this.gtag({event:"age_check",over23:"no"}),window.location="/"}gtag(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(e)}}export{l as default};
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.