/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 139: /***/ (function(module) { /** * Copyright (C) 2014-2020 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ var $ = jQuery; module.exports = { random: function random(len, suffix) { var text = ''; var possible = 'abcdefghijklmnopqrstuvwxyz0123456789'; for (var i = 0; i < len; i++) { text += possible.charAt(Math.floor(Math.random() * possible.length)); } if (suffix) { return text + suffix; } return text; }, form: function form(id) { return $(id).serializeArray(); }, ucfirst: function ucfirst(text) { return text.charAt(0).toUpperCase() + text.slice(1); }, list: function list(input) { // Convert object to list if ($.isPlainObject(input)) { var result = []; var params = decodeURIComponent($.param(input)).split('&'); // Loop over params $.each(params, function (index, item) { var value = item.split('='); // Add item result.push({ name: value[0], value: value[1] }); }); return result; } return input; }, json: function json(input) { if (typeof input === 'string') { var result = input.match(/{[\s\S]+}/); if (result !== null) { return result[0]; } } return false; }, sizeFormat: function sizeFormat(bytes) { if (parseInt(bytes) === 0) { return '0 B'; } var i = Math.floor(Math.log(bytes) / Math.log(1024)); var sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; var size = (bytes / Math.pow(1024, i)).toFixed(2) * 1; if (isNaN(size)) { return '0 B'; } return size + ' ' + sizes[i]; }, dirname: function dirname(path) { return path.replace(/\\/g, '/').replace(/\/[^/]*\/?$/, ''); }, basename: function basename(path) { return path.replace(/\\/g, '/').replace(/.*\//, ''); } }; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/global */ /******/ !function() { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. !function() { /** * Copyright (C) 2014-2020 ServMask Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ███████╗███████╗██████╗ ██╗ ██╗███╗ ███╗ █████╗ ███████╗██╗ ██╗ * ██╔════╝██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝██║ ██╔╝ * ███████╗█████╗ ██████╔╝██║ ██║██╔████╔██║███████║███████╗█████╔╝ * ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██║╚██╔╝██║██╔══██║╚════██║██╔═██╗ * ███████║███████╗██║ ██║ ╚████╔╝ ██║ ╚═╝ ██║██║ ██║███████║██║ ██╗ * ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ */ var Util = __webpack_require__(139); __webpack_require__.g.Ai1wm = jQuery.extend({}, __webpack_require__.g.Ai1wm, { Util: Util }); }(); /******/ })() ;// eslint-disable-next-line no-undef UAGBInlineNotice = { init( attr, id ) { const main = document.querySelectorAll( id ); if ( main.length === 0 ) { return; } const uniqueId = attr.c_id; const isCookie = attr.cookies; const cookiesDays = attr.close_cookie_days; const currentCookie = Cookies.get( 'uagb-notice-' + uniqueId ); for ( const mainWrap of main ) { if ( 'undefined' === typeof currentCookie && true === isCookie ) { mainWrap.style.display = 'block'; } const noticeDismissClass = mainWrap.querySelector( '.uagb-notice-dismiss' ) || mainWrap.querySelector( 'svg' ); const closeBtn = noticeDismissClass ? noticeDismissClass : mainWrap.querySelector( 'button[type="button"] svg' ); if ( '' !== attr.noticeDismiss && '' !== attr.icon ) { closeBtn.addEventListener( 'click', function () { dismissClick( isCookie, currentCookie, uniqueId, cookiesDays, main ); } ); main[0].addEventListener( 'keydown', function ( e ) { if ( e.keyCode === 13 || e.keyCode === 32 ) { const focusedVisibleElement = document.querySelector( id + ' :focus-visible' ); dismissClick( isCookie, currentCookie, uniqueId, cookiesDays, main, focusedVisibleElement ); } } ); } } }, }; function dismissClick( isCookie, currentCookie, uniqueId, cookiesDays, main, focusedVisibleElement ) { if ( true === isCookie && 'undefined' === typeof currentCookie ) { Cookies.set( 'uagb-notice-' + uniqueId, true, { expires: cookiesDays } ); } main[0]?.classList?.add( 'uagb-notice__active' ); if ( focusedVisibleElement ) { const closeDismiss = focusedVisibleElement?.parentElement; closeDismiss.style.display = 'none'; } else { main[0].style.display = 'none'; } }