HEX
Server: LiteSpeed
System: Linux us-phx-web629.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User: u756937133 (756937133)
PHP: 8.2.30
Disabled: passthru,chgrp
Upload Files
File: /home/u756937133/domains/northspiritvodka.com/public_html/wp-content/plugins/age-gate/dist/focus.js
/*! For license information please see focus.js.LICENSE.txt */
(()=>{"use strict";var e=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],t=e.join(","),n="undefined"==typeof Element,r=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,o=!n&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},a=function(e,n,o){var a=Array.prototype.slice.apply(e.querySelectorAll(t));return n&&r.call(e,t)&&a.unshift(e),a=a.filter(o)},i=function e(n,o,a){for(var i=[],u=Array.from(n);u.length;){var c=u.shift();if("SLOT"===c.tagName){var s=c.assignedElements(),l=e(s.length?s:c.children,!0,a);a.flatten?i.push.apply(i,l):i.push({scope:c,candidates:l})}else{r.call(c,t)&&a.filter(c)&&(o||!n.includes(c))&&i.push(c);var f=c.shadowRoot||"function"==typeof a.getShadowRoot&&a.getShadowRoot(c),d=!a.shadowRootFilter||a.shadowRootFilter(c);if(f&&d){var p=e(!0===f?c.children:f.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scope:c,candidates:p})}else u.unshift.apply(u,c.children)}}return i},u=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},c=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},s=function(e){return"INPUT"===e.tagName},l=function(e){return function(e){return s(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||o(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return!1}var a=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!a||a===e}(e)},f=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},d=function(e,t){return!(t.disabled||function(e){return s(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var i=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(i,"details:not([open]) *"))return!0;var u=o(e).host,c=(null==u?void 0:u.ownerDocument.contains(u))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return f(e)}else{if("function"==typeof a){for(var s=e;e;){var l=e.parentElement,d=o(e);if(l&&!l.shadowRoot&&!0===a(l))return f(e);e=e.assignedSlot?e.assignedSlot:l||d===e.ownerDocument?l:d.host}e=s}if(c)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var o=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},p=function(e,t){return!(l(t)||u(t)<0||!d(e,t))},b=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},v=function e(t){var n=[],r=[];return t.forEach((function(t,o){var a=!!t.scope,i=a?t.scope:t,c=u(i,a),s=a?e(t.candidates):i;0===c?a?n.push.apply(n,s):n.push(i):r.push({documentOrder:o,tabIndex:c,item:t,isScope:a,content:s})})),r.sort(c).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},h=function(e,t){var n;return n=(t=t||{}).getShadowRoot?i([e],t.includeContainer,{filter:p.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):a(e,t.includeContainer,p.bind(null,t)),v(n)},m=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return!1!==r.call(e,t)&&p(n,e)},y=e.concat("iframe").join(","),g=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==r.call(e,y)&&d(t,e)};function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N,S=(N=[],{activateTrap:function(e){if(N.length>0){var t=N[N.length-1];t!==e&&t.pause()}var n=N.indexOf(e);-1===n||N.splice(n,1),N.push(e)},deactivateTrap:function(e){var t=N.indexOf(e);-1!==t&&N.splice(t,1),N.length>0&&N[N.length-1].unpause()}}),T=function(e){return setTimeout(e,0)},D=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},F=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},R=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},k=function(e,t){var n,r=(null==t?void 0:t.document)||document,o=E({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),u={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},c=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},s=function(e){return u.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},l=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t=t.apply(void 0,a)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var u=t;if("string"==typeof t&&!(u=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return u},f=function(){var e=l("initialFocus");if(!1===e)return!1;if(void 0===e)if(s(r.activeElement)>=0)e=r.activeElement;else{var t=u.tabbableGroups[0];e=t&&t.firstTabbableNode||l("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},p=function(){if(u.containerGroups=u.containers.map((function(e){var t,n,r=h(e,o.tabbableOptions),u=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?i([t],n.includeContainer,{filter:d.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):a(t,n.includeContainer,d.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:u,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=u.findIndex((function(t){return t===e}));if(!(n<0))return t?u.slice(n+1).find((function(e){return m(e,o.tabbableOptions)})):u.slice(0,n).reverse().find((function(e){return m(e,o.tabbableOptions)}))}}})),u.tabbableGroups=u.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),u.tabbableGroups.length<=0&&!l("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},b=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),u.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(f()))},v=function(e){var t=l("setReturnFocus",e);return t||!1!==t&&e},y=function(e){var t=R(e);s(t)>=0||(F(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!g(t,o.tabbableOptions)}):F(o.allowOutsideClick,e)||e.preventDefault())},w=function(e){var t=R(e),n=s(t)>=0;n||t instanceof Document?n&&(u.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),b(u.mostRecentlyFocusedNode||f()))},O=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==F(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=R(e);p();var n=null;if(u.tabbableGroups.length>0){var r=s(t),a=r>=0?u.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?u.tabbableGroups[u.tabbableGroups.length-1].lastTabbableNode:u.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var i=D(u.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(i<0&&(a.container===t||g(t,o.tabbableOptions)&&!m(t,o.tabbableOptions)&&!a.nextTabbableNode(t,!1))&&(i=r),i>=0){var c=0===i?u.tabbableGroups.length-1:i-1;n=u.tabbableGroups[c].lastTabbableNode}}else{var f=D(u.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(f<0&&(a.container===t||g(t,o.tabbableOptions)&&!m(t,o.tabbableOptions)&&!a.nextTabbableNode(t))&&(f=r),f>=0){var d=f===u.tabbableGroups.length-1?0:f+1;n=u.tabbableGroups[d].firstTabbableNode}}}else n=l("fallbackFocus");n&&(e.preventDefault(),b(n))}(e)},N=function(e){var t=R(e);s(t)>=0||F(o.clickOutsideDeactivates,e)||F(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},k=function(){if(u.active)return S.activateTrap(n),u.delayInitialFocusTimer=o.delayInitialFocus?T((function(){b(f())})):b(f()),r.addEventListener("focusin",w,!0),r.addEventListener("mousedown",y,{capture:!0,passive:!1}),r.addEventListener("touchstart",y,{capture:!0,passive:!1}),r.addEventListener("click",N,{capture:!0,passive:!1}),r.addEventListener("keydown",O,{capture:!0,passive:!1}),n},I=function(){if(u.active)return r.removeEventListener("focusin",w,!0),r.removeEventListener("mousedown",y,!0),r.removeEventListener("touchstart",y,!0),r.removeEventListener("click",N,!0),r.removeEventListener("keydown",O,!0),n};return(n={get active(){return u.active},get paused(){return u.paused},activate:function(e){if(u.active)return this;var t=c(e,"onActivate"),n=c(e,"onPostActivate"),o=c(e,"checkCanFocusTrap");o||p(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=r.activeElement,t&&t();var a=function(){o&&p(),k(),n&&n()};return o?(o(u.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(e){if(!u.active)return this;var t=E({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(u.delayInitialFocusTimer),u.delayInitialFocusTimer=void 0,I(),u.active=!1,u.paused=!1,S.deactivateTrap(n);var r=c(t,"onDeactivate"),a=c(t,"onPostDeactivate"),i=c(t,"checkCanReturnFocus"),s=c(t,"returnFocus","returnFocusOnDeactivate");r&&r();var l=function(){T((function(){s&&b(v(u.nodeFocusedBeforeActivation)),a&&a()}))};return s&&i?(i(v(u.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(){return u.paused||!u.active||(u.paused=!0,I()),this},unpause:function(){return u.paused&&u.active?(u.paused=!1,p(),k(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return u.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),u.active&&p(),this}}).updateContainerElements(e),n};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A(r.key),r)}}function P(e,t,n){return t&&C(e.prototype,t),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A(e){var t=function(e,t){if("object"!=I(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=I(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==I(t)?t:t+""}new(P((function e(){var t,n,r,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,r=function(){o.elements.length&&(window.addEventListener("age_gate_shown",(function(){var e={escapeDeactivates:!1};o.focus&&Object.assign(e,{initialFocus:'[name="'.concat(o.focus,'"]')}),o.trap=k(o.elements,e),o.trap.activate()})),window.addEventListener("age_gate_passed",(function(){o.trap.deactivate()})))},(n=A(n="init"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;var a=agfocus,i=a.elements,u=a.focus;this.elements=i,this.focus=u,this.init()})))})();