chefcookie 2.5.2 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,7 +81,7 @@ const cc = new chefcookie({
81
81
  consent_tracking: null, // '/wp-json/v1/track-consent.php'
82
82
  expiration: 7, // in days
83
83
  cookie_prefix: 'cc_', // switch cookie prefix (e.g. for different pages on the same top level domain)
84
- exclude_google_pagespeed: true,
84
+ exclude_ua_regex: /(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/,
85
85
  style: {
86
86
  layout: 'overlay', // overlay|bottombar|topbar
87
87
  size: 3, // 1|2|3|4|5
@@ -431,6 +431,20 @@ you can programmatically control chefcookie via javascript:
431
431
  - `cc.destroy()`: destroy the cookie banner and all event listeners
432
432
  - `cc.updateOptOutOptIn()`: refreshes the state of opt out / opt in buttons
433
433
 
434
+ #### exclude user agent
435
+
436
+ you can avoid showing the banner for specific user agents (i.e. bots or crawlers), using a regular expression.
437
+
438
+ ```js
439
+ const cc = new chefcookie({
440
+ ...
441
+ exclude_ua_regex: /(myBOT)/
442
+ ...
443
+ });
444
+ ```
445
+
446
+ currently the default regex `/(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/` excludes Google PageSpeed Insights, Chrome Lighthouse and WebPageTest.org.
447
+
434
448
  #### consent manager tracking
435
449
 
436
450
  to test the acceptance of the consent manager, it is recommended to use the `consent_tracking`-option. if you specify an url (relative or absolute) there, chefcookie sends a post-request with analysis data for every action that a user performs in the consent manager. these requests have the form:
package/_build/script.js CHANGED
@@ -11,6 +11,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
 
12
12
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
13
 
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+
14
16
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
17
 
16
18
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -29,12 +31,19 @@ require("@babel/polyfill/noConflict");
29
31
 
30
32
  var _helper = _interopRequireDefault(require("./_helper"));
31
33
 
32
- // ie11 support
34
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
+
36
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
+
33
38
  var chefcookie = /*#__PURE__*/function () {
34
39
  function chefcookie() {
35
40
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
36
41
  (0, _classCallCheck2.default)(this, chefcookie);
37
- this.config = config; // add dummy entries for empty groups
42
+ var defaults = {
43
+ exclude_ua_regex: /(Speed Insights|Chrome-Lighthouse|PSTS[\d\.]+)/
44
+ };
45
+ this.config = _objectSpread(_objectSpread({}, defaults), config);
46
+ console.log(this.config); // add dummy entries for empty groups
38
47
 
39
48
  this.config.settings.forEach(function (group, i) {
40
49
  if (!('scripts' in group) || Object.keys(group.scripts).length === 0) {
@@ -66,7 +75,12 @@ var chefcookie = /*#__PURE__*/function () {
66
75
  (0, _createClass2.default)(chefcookie, [{
67
76
  key: "init",
68
77
  value: function init() {
69
- if ((this.config.exclude_google_pagespeed === undefined || this.config.exclude_google_pagespeed === true) && (navigator.userAgent.indexOf('Speed Insights') > -1 || navigator.userAgent.indexOf('Chrome-Lighthouse') > -1)) {
78
+ if (this.config.exclude_google_pagespeed === true) {
79
+ // deprecated legacy support
80
+ this.config.exclude_ua_regex = /(Speed Insights|Chrome-Lighthouse)/;
81
+ }
82
+
83
+ if (this.config.exclude_ua_regex !== undefined && navigator.userAgent.match(this.config.exclude_ua_regex)) {
70
84
  return;
71
85
  }
72
86
 
@@ -370,7 +384,7 @@ var chefcookie = /*#__PURE__*/function () {
370
384
  value: function addStyle() {
371
385
  var _this$config$style$co, _this$config$style$co2, _ref, _this$config$style$co3, _this$config$style$co4, _this$config$style$co5, _this$config$style$co6, _this$config$style$co7, _this$config$style$co8, _this$config$style$co9, _this$config$style$co10, _this$config$style$co11, _this$config$style$co12, _this$config$style$co13, _this$config$style$co14, _this$config$style$co15, _this$config$style$co16, _this$config$style$co17, _this$config$style$co18, _this$config$style$co19;
372
386
 
373
- var css = "\n .chefcookie, .chefcookie *\n {\n box-sizing: border-box;\n margin:0;\n padding:0;\n }\n /* try to reset styles */\n .chefcookie h2,\n .chefcookie a:link, \n .chefcookie a:hover, \n .chefcookie a:visited\n {\n color:inherit;\n }\n .chefcookie\n {\n position: fixed;\n z-index: 2147483647;\n left: 0;\n right: 0;\n bottom: 0;\n transform: translateZ(0);\n }\n .chefcookie--hidden\n {\n opacity: 0;\n pointer-events:none;\n }\n .chefcookie__inner\n {\n width:100%;\n height:100%;\n text-align: center;\n white-space: nowrap;\n font-size: 0;\n overflow-y:auto;\n overflow-x:hidden;\n max-height:100vh;\n }\n .chefcookie__box\n {\n font-size: ".concat(15 + (this.config.style.size - 3), "px;\n line-height:1.6;\n color:").concat((_this$config$style$co = this.config.style.color_text) !== null && _this$config$style$co !== void 0 ? _this$config$style$co : '#595f60', ";\n width: 100%;\n margin: 0 auto;\n display: inline-block;\n vertical-align: middle;\n white-space: normal;\n border-radius: 0;\n padding-top: 2em;\n padding-bottom: 2em;\n padding-left: 3em;\n padding-right: 3em;\n text-align: left;\n }\n .chefcookie__message\n {\n margin-bottom:1.5em;\n text-align:justify;\n }\n .chefcookie__message h2\n {\n margin-bottom:0.5em;\n font-size:2em;\n line-height:1.4;\n text-transform:uppercase;\n font-weight:700;\n text-align:left;\n }\n .chefcookie__message p {\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a,\n .chefcookie__message a:focus\n {\n color:inherit;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-decoration:underline;\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__message a:hover\n {\n opacity: 0.5;\n color: inherit;\n }\n }\n .chefcookie__message a:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons\n {\n margin-top:0.5em;\n }\n .chefcookie__button,\n .chefcookie__button:focus\n {\n padding: 1em 0.5em;\n border: 2px solid ").concat((_this$config$style$co2 = this.config.style.color_text) !== null && _this$config$style$co2 !== void 0 ? _this$config$style$co2 : '#595f60', ";\n font-weight: bold;\n display: block;\n color: inherit;\n text-decoration: none;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-transform: uppercase;\n float: left;\n text-align: center;\n min-width: 21em;\n margin-right:3em;\n }\n .chefcookie__buttons--count-3 .chefcookie__button,\n .chefcookie__buttons--count-3 .chefcookie__button:focus {\n min-width:15em;\n margin-right:1em;\n }\n .chefcookie__button:last-child\n {\n margin-right:0;\n }\n .chefcookie__button:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__button:hover\n {\n opacity: 0.5;\n text-decoration:none;\n color: inherit;\n }\n }\n .chefcookie__button:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n ").concat(this.config.style.highlight_accept === undefined || this.config.style.highlight_accept === true ? "\n .chefcookie__button--accept\n {\n background-color:".concat((_ref = (_this$config$style$co3 = this.config.style.color_highlight) !== null && _this$config$style$co3 !== void 0 ? _this$config$style$co3 : this.config.style.color) !== null && _ref !== void 0 ? _ref : '#ff0000', ";\n border-color:transparent;\n }\n .chefcookie__button--accept.chefcookie__button--accept,\n .chefcookie__button--accept.chefcookie__button--accept:hover,\n .chefcookie__button--accept.chefcookie__button--accept:focus,\n .chefcookie__button--accept.chefcookie__button--accept:link,\n .chefcookie__button--accept.chefcookie__button--accept:visited\n {\n color:").concat((_this$config$style$co4 = this.config.style.color_background) !== null && _this$config$style$co4 !== void 0 ? _this$config$style$co4 : '#eeeeee', ";\n }\n ") : "", "\n .chefcookie__settings-container\n {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__groups\n {\n list-style-type:none;\n }\n .chefcookie__groups:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n .chefcookie__group\n {\n float: left;\n }\n .chefcookie__group-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n font-weight:bold;\n font-size:1.2em;\n line-height:1.7;\n text-transform:uppercase;\n }\n .chefcookie__group-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n font-size:1em;\n line-height:1.6;\n }\n .chefcookie__group-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__group--disabled .chefcookie__group-label\n {\n cursor:default;\n }\n .chefcookie__group-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__group--disabled .chefcookie__group-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__group-checkbox-icon\n {\n line-height:2;\n display: block;\n width: 4em;\n height: 2em;\n background-color: ").concat((_this$config$style$co5 = this.config.style.color_background) !== null && _this$config$style$co5 !== void 0 ? _this$config$style$co5 : '#eeeeee', ";\n border: 2px solid ").concat((_this$config$style$co6 = this.config.style.color_text) !== null && _this$config$style$co6 !== void 0 ? _this$config$style$co6 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__group-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-weight: bold;\n font-size: 1em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co7 = this.config.style.color_text) !== null && _this$config$style$co7 !== void 0 ? _this$config$style$co7 : '#595f60', ";\n }\n .chefcookie__group-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co8 = this.config.style.color_text) !== null && _this$config$style$co8 !== void 0 ? _this$config$style$co8 : '#595f60', ";\n background-color: ").concat((_this$config$style$co9 = this.config.style.color_text) !== null && _this$config$style$co9 !== void 0 ? _this$config$style$co9 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__group-checkbox ~ *\n {\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__group-checkbox[data-status=\"0\"] ~ *\n {\n opacity: 0.75;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon\n {\n opacity: 0.85;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:25%;\n }\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:before,\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co10 = this.config.style.color_text) !== null && _this$config$style$co10 !== void 0 ? _this$config$style$co10 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 3px;\n }\n .chefcookie__group-description\n {\n width:100%;\n clear:both;\n padding-top:1em;\n display: block;\n font-size:0.9em;\n line-height:1.5;\n text-align:justify;\n font-weight: normal;\n }\n .chefcookie__group-collapse,\n .chefcookie__group-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__group-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__scripts\n {\n list-style-type:none;\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__scripts--visible {\n height:auto;\n }\n .chefcookie__script {\n margin-bottom:0.5em;\n }\n .chefcookie__script:first-child {\n margin-top:1em;\n }\n .chefcookie__script:last-child {\n margin-bottom:0;\n }\n .chefcookie__script-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n }\n .chefcookie__script-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n }\n .chefcookie__script-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__script--disabled .chefcookie__script-label\n {\n cursor:default;\n }\n .chefcookie__script-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__script--disabled .chefcookie__script-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__script-checkbox-icon\n {\n line-height:1.5;\n display: block;\n width: 3em;\n height: 1.5em;\n background-color: ").concat((_this$config$style$co11 = this.config.style.color_background) !== null && _this$config$style$co11 !== void 0 ? _this$config$style$co11 : '#eeeeee', ";\n border: 1px solid ").concat((_this$config$style$co12 = this.config.style.color_text) !== null && _this$config$style$co12 !== void 0 ? _this$config$style$co12 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__script-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-size: 0.7em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co13 = this.config.style.color_text) !== null && _this$config$style$co13 !== void 0 ? _this$config$style$co13 : '#595f60', ";\n }\n .chefcookie__script-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co14 = this.config.style.color_text) !== null && _this$config$style$co14 !== void 0 ? _this$config$style$co14 : '#595f60', ";\n background-color: ").concat((_this$config$style$co15 = this.config.style.color_text) !== null && _this$config$style$co15 !== void 0 ? _this$config$style$co15 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__script-checkbox ~ *\n {\n opacity: 0.75;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__script-checkbox:checked ~ *\n {\n opacity:1;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co16 = this.config.style.color_text) !== null && _this$config$style$co16 !== void 0 ? _this$config$style$co16 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 2px;\n }\n\n .chefcookie__script-description\n {\n width: 100%;\n clear: both;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n display: block;\n font-size: 0.8em;\n line-height:1.4;\n text-align: justify;\n }\n .chefcookie__script-description-collapse,\n .chefcookie__script-description-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.25em;\n padding-bottom: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__script-description-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__script-description-content {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__script-description-content > *:not(:last-child) {\n margin-bottom:0.5em;\n }\n .chefcookie__script-description-content table {\n width:100%;\n border-collapse: collapse;\n table-layout: fixed;\n }\n .chefcookie__script-description-content table td {\n border:1px solid ").concat(this.hexToRgbaStr((_this$config$style$co17 = this.config.style.color_text) !== null && _this$config$style$co17 !== void 0 ? _this$config$style$co17 : '#595f60', 0.1), ";\n padding: 0.3em 0.5em;\n vertical-align:top;\n }\n\n .chefcookie--noscroll body\n {\n position:fixed;\n width: 100%;\n overflow:hidden;\n }\n .chefcookie--fade body:after,\n .chefcookie--blur body:after\n {\n content:\"\";\n position:fixed;\n z-index: 2147483644;\n top:0;\n left:0;\n width:100%;\n height:100%;\n }\n .chefcookie--fade body:after\n {\n background-color: rgba(0, 0, 0, 0.65);\n }\n .chefcookie--blur body:after\n {\n backdrop-filter: grayscale(50%) blur(5px);\n }\n .chefcookie--overlay\n {\n top: 0;\n }\n .chefcookie--overlay .chefcookie__inner:before\n {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n .chefcookie--overlay .chefcookie__box\n {\n width: 95%;\n max-width: 60em;\n box-shadow: 0 1em 5em -0.5em #000;\n background-color: ").concat((_this$config$style$co18 = this.config.style.color_background) !== null && _this$config$style$co18 !== void 0 ? _this$config$style$co18 : '#eeeeee', ";\n }\n .chefcookie--overlay .chefcookie__group\n {\n height: 13em;\n margin-bottom: 4%;\n background-color: rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.05);\n border: 1px solid rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.01);\n width: 48%;\n margin-right: 4%;\n }\n .chefcookie--overlay .chefcookie__group:nth-child(2n)\n {\n margin-right:0;\n }\n .chefcookie--overlay.chefcookie--has-scripts .chefcookie__group\n {\n height:auto;\n width: 100%;\n margin-right: 0;\n margin-bottom: 1em;\n }\n .chefcookie--overlay .chefcookie__group\n {\n padding: 1em 1.25em;\n }\n .chefcookie--bottombar,\n .chefcookie--topbar\n {\n background-color:").concat((_this$config$style$co19 = this.config.style.color_background) !== null && _this$config$style$co19 !== void 0 ? _this$config$style$co19 : '#eeeeee', ";\n box-shadow: 0 1em 5em -0.5em #000;\n }\n .chefcookie--bottombar\n {\n bottom:0;\n top:auto;\n }\n .chefcookie--topbar\n {\n bottom:auto;\n top:0;\n position:relative;\n }\n .chefcookie--bottombar .chefcookie__box,\n .chefcookie--topbar .chefcookie__box\n {\n max-width: 1280px;\n }\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n margin-bottom: 40px;\n margin-top: 40px;\n width: 22%;\n margin-right: 4%;\n }\n .chefcookie--bottombar .chefcookie__group:last-child,\n .chefcookie--topbar .chefcookie__group:last-child\n {\n margin-right:0;\n }\n .chefcookie--bottombar .chefcookie__groups--count-9 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-9 .chefcookie__group { width: 7.55%; }\n .chefcookie--bottombar .chefcookie__groups--count-8 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-8 .chefcookie__group { width: 9.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-7 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-7 .chefcookie__group { width: 10.85%; }\n .chefcookie--bottombar .chefcookie__groups--count-6 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-6 .chefcookie__group { width: 13.33%; }\n .chefcookie--bottombar .chefcookie__groups--count-5 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-5 .chefcookie__group { width: 16.80%; }\n .chefcookie--bottombar .chefcookie__groups--count-4 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-4 .chefcookie__group { width: 22.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-3 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-3 .chefcookie__group { width: 30.66%; }\n .chefcookie--bottombar .chefcookie__groups--count-2 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-2 .chefcookie__group { width: 48%; }\n .chefcookie--bottombar .chefcookie__groups--count-1 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-1 .chefcookie__group { width: 100%; }\n @media screen and (max-width: 940px)\n {\n .chefcookie__button,\n .chefcookie__button:focus\n {\n float: none;\n margin: 0 0 1em;\n text-align: center;\n width: 100%;\n min-width:0;\n }\n }\n @media screen and (max-width: 840px)\n {\n .chefcookie__box\n {\n padding:1em;\n }\n .chefcookie__message h2\n {\n font-size:1.5em;\n line-height:1.4;\n }\n .chefcookie .chefcookie__group,\n .chefcookie--overlay .chefcookie__group,\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n float:none;\n margin-right:0;\n width:100% !important;\n height:auto;\n }\n }\n ");
387
+ var css = "\n .chefcookie, .chefcookie *\n {\n box-sizing: border-box;\n margin:0;\n padding:0;\n }\n /* try to reset styles */\n .chefcookie h2,\n .chefcookie a:link,\n .chefcookie a:hover,\n .chefcookie a:visited\n {\n color:inherit;\n }\n .chefcookie\n {\n position: fixed;\n z-index: 2147483647;\n left: 0;\n right: 0;\n bottom: 0;\n transform: translateZ(0);\n }\n .chefcookie--hidden\n {\n opacity: 0;\n pointer-events:none;\n }\n .chefcookie__inner\n {\n width:100%;\n height:100%;\n text-align: center;\n white-space: nowrap;\n font-size: 0;\n overflow-y:auto;\n overflow-x:hidden;\n max-height:100vh;\n }\n .chefcookie__box\n {\n font-size: ".concat(15 + (this.config.style.size - 3), "px;\n line-height:1.6;\n color:").concat((_this$config$style$co = this.config.style.color_text) !== null && _this$config$style$co !== void 0 ? _this$config$style$co : '#595f60', ";\n width: 100%;\n margin: 0 auto;\n display: inline-block;\n vertical-align: middle;\n white-space: normal;\n border-radius: 0;\n padding-top: 2em;\n padding-bottom: 2em;\n padding-left: 3em;\n padding-right: 3em;\n text-align: left;\n }\n .chefcookie__message\n {\n margin-bottom:1.5em;\n text-align:justify;\n }\n .chefcookie__message h2\n {\n margin-bottom:0.5em;\n font-size:2em;\n line-height:1.4;\n text-transform:uppercase;\n font-weight:700;\n text-align:left;\n }\n .chefcookie__message p {\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a,\n .chefcookie__message a:focus\n {\n color:inherit;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-decoration:underline;\n font-size: 1em;\n line-height:1.6;\n }\n .chefcookie__message a:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__message a:hover\n {\n opacity: 0.5;\n color: inherit;\n }\n }\n .chefcookie__message a:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons\n {\n margin-top:0.5em;\n }\n .chefcookie__button,\n .chefcookie__button:focus\n {\n padding: 1em 0.5em;\n border: 2px solid ").concat((_this$config$style$co2 = this.config.style.color_text) !== null && _this$config$style$co2 !== void 0 ? _this$config$style$co2 : '#595f60', ";\n font-weight: bold;\n display: block;\n color: inherit;\n text-decoration: none;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-transform: uppercase;\n float: left;\n text-align: center;\n min-width: 21em;\n margin-right:3em;\n }\n .chefcookie__buttons--count-3 .chefcookie__button,\n .chefcookie__buttons--count-3 .chefcookie__button:focus {\n min-width:15em;\n margin-right:1em;\n }\n .chefcookie__button:last-child\n {\n margin-right:0;\n }\n .chefcookie__button:focus\n {\n outline:none;\n }\n @media (hover: hover) {\n .chefcookie__button:hover\n {\n opacity: 0.5;\n text-decoration:none;\n color: inherit;\n }\n }\n .chefcookie__button:active\n {\n opacity: 0.1;\n color: inherit;\n }\n .chefcookie__buttons:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n ").concat(this.config.style.highlight_accept === undefined || this.config.style.highlight_accept === true ? "\n .chefcookie__button--accept\n {\n background-color:".concat((_ref = (_this$config$style$co3 = this.config.style.color_highlight) !== null && _this$config$style$co3 !== void 0 ? _this$config$style$co3 : this.config.style.color) !== null && _ref !== void 0 ? _ref : '#ff0000', ";\n border-color:transparent;\n }\n .chefcookie__button--accept.chefcookie__button--accept,\n .chefcookie__button--accept.chefcookie__button--accept:hover,\n .chefcookie__button--accept.chefcookie__button--accept:focus,\n .chefcookie__button--accept.chefcookie__button--accept:link,\n .chefcookie__button--accept.chefcookie__button--accept:visited\n {\n color:").concat((_this$config$style$co4 = this.config.style.color_background) !== null && _this$config$style$co4 !== void 0 ? _this$config$style$co4 : '#eeeeee', ";\n }\n ") : "", "\n .chefcookie__settings-container\n {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__groups\n {\n list-style-type:none;\n }\n .chefcookie__groups:after\n {\n clear:both;\n display:table;\n content:\"\";\n }\n .chefcookie__group\n {\n float: left;\n }\n .chefcookie__group-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n font-weight:bold;\n font-size:1.2em;\n line-height:1.7;\n text-transform:uppercase;\n }\n .chefcookie__group-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n font-size:1em;\n line-height:1.6;\n }\n .chefcookie__group-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__group--disabled .chefcookie__group-label\n {\n cursor:default;\n }\n .chefcookie__group-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__group--disabled .chefcookie__group-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__group-checkbox-icon\n {\n line-height:2;\n display: block;\n width: 4em;\n height: 2em;\n background-color: ").concat((_this$config$style$co5 = this.config.style.color_background) !== null && _this$config$style$co5 !== void 0 ? _this$config$style$co5 : '#eeeeee', ";\n border: 2px solid ").concat((_this$config$style$co6 = this.config.style.color_text) !== null && _this$config$style$co6 !== void 0 ? _this$config$style$co6 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__group-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-weight: bold;\n font-size: 1em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co7 = this.config.style.color_text) !== null && _this$config$style$co7 !== void 0 ? _this$config$style$co7 : '#595f60', ";\n }\n .chefcookie__group-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co8 = this.config.style.color_text) !== null && _this$config$style$co8 !== void 0 ? _this$config$style$co8 : '#595f60', ";\n background-color: ").concat((_this$config$style$co9 = this.config.style.color_text) !== null && _this$config$style$co9 !== void 0 ? _this$config$style$co9 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__group-checkbox ~ *\n {\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__group-checkbox[data-status=\"0\"] ~ *\n {\n opacity: 0.75;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon\n {\n opacity: 0.85;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:25%;\n }\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__group-checkbox[data-status=\"1\"] ~ .chefcookie__group-checkbox-icon:before,\n .chefcookie__group-checkbox[data-status=\"2\"] ~ .chefcookie__group-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co10 = this.config.style.color_text) !== null && _this$config$style$co10 !== void 0 ? _this$config$style$co10 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 3px;\n }\n .chefcookie__group-description\n {\n width:100%;\n clear:both;\n padding-top:1em;\n display: block;\n font-size:0.9em;\n line-height:1.5;\n text-align:justify;\n font-weight: normal;\n }\n .chefcookie__group-collapse,\n .chefcookie__group-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__group-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__scripts\n {\n list-style-type:none;\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__scripts--visible {\n height:auto;\n }\n .chefcookie__script {\n margin-bottom:0.5em;\n }\n .chefcookie__script:first-child {\n margin-top:1em;\n }\n .chefcookie__script:last-child {\n margin-bottom:0;\n }\n .chefcookie__script-title\n {\n float:left;\n width:70%;\n min-height: 1.66em;\n line-height: 1.66;\n display: block;\n }\n .chefcookie__script-label\n {\n cursor: pointer;\n display:block;\n width:100%;\n height:100%;\n }\n .chefcookie__script-label:after\n {\n clear:both;\n display:table;\n content:\"\"\n }\n .chefcookie__script--disabled .chefcookie__script-label\n {\n cursor:default;\n }\n .chefcookie__script-checkbox\n {\n opacity: 0;\n position:absolute;\n display: block;\n pointer-events:none;\n }\n .chefcookie__script--disabled .chefcookie__script-checkbox-icon\n {\n ").concat(this.config.style.show_disabled_checkbox === undefined || this.config.style.show_disabled_checkbox === false ? "display:none;" : "opacity: 0.75 !important;", "\n }\n .chefcookie__script-checkbox-icon\n {\n line-height:1.5;\n display: block;\n width: 3em;\n height: 1.5em;\n background-color: ").concat((_this$config$style$co11 = this.config.style.color_background) !== null && _this$config$style$co11 !== void 0 ? _this$config$style$co11 : '#eeeeee', ";\n border: 1px solid ").concat((_this$config$style$co12 = this.config.style.color_text) !== null && _this$config$style$co12 !== void 0 ? _this$config$style$co12 : '#595f60', ";\n margin: 0;\n padding: 0;\n position: relative;\n border-radius: 2em;\n float: right;\n }\n .chefcookie__script-checkbox-icon:before\n {\n content: \"0\";\n position: absolute;\n top: 0;\n left: 45%;\n width: 50%;\n bottom: 0;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n text-align: center;\n font-size: 0.7em;\n line-height: 2;\n opacity: 0.25;\n color: ").concat((_this$config$style$co13 = this.config.style.color_text) !== null && _this$config$style$co13 !== void 0 ? _this$config$style$co13 : '#595f60', ";\n }\n .chefcookie__script-checkbox-icon:after\n {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 50%;\n bottom: 0;\n box-shadow: 0 0 0px 1px ").concat((_this$config$style$co14 = this.config.style.color_text) !== null && _this$config$style$co14 !== void 0 ? _this$config$style$co14 : '#595f60', ";\n background-color: ").concat((_this$config$style$co15 = this.config.style.color_text) !== null && _this$config$style$co15 !== void 0 ? _this$config$style$co15 : '#595f60', ";\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n border-radius: 50%;\n }\n .chefcookie__script-checkbox ~ *\n {\n opacity: 0.75;\n transition: all ").concat(this.animationSpeed / 1000, "s ease-in-out;\n }\n .chefcookie__script-checkbox:checked ~ *\n {\n opacity:1;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:after\n {\n left:50%;\n }\n .chefcookie__script-checkbox:checked ~ .chefcookie__script-checkbox-icon:before\n {\n content: \"\";\n background-color: ").concat((_this$config$style$co16 = this.config.style.color_text) !== null && _this$config$style$co16 !== void 0 ? _this$config$style$co16 : '#595f60', ";\n top: 30%;\n bottom: 30%;\n left: 27%;\n width: 2px;\n }\n\n .chefcookie__script-description\n {\n width: 100%;\n clear: both;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n display: block;\n font-size: 0.8em;\n line-height:1.4;\n text-align: justify;\n }\n .chefcookie__script-description-collapse,\n .chefcookie__script-description-collapse:focus {\n color:inherit;\n text-decoration:underline;\n padding-top: 0.25em;\n padding-bottom: 0.5em;\n display: block;\n }\n @media (hover: hover) {\n .chefcookie__script-description-collapse:hover\n {\n opacity: 0.9;\n color: inherit;\n text-decoration:underline;\n }\n }\n .chefcookie__script-description-content {\n height:0;\n overflow:hidden;\n transition: height ").concat(this.animationSpeed / 1000, "s ease-out;\n }\n .chefcookie__script-description-content > *:not(:last-child) {\n margin-bottom:0.5em;\n }\n .chefcookie__script-description-content table {\n width:100%;\n border-collapse: collapse;\n table-layout: fixed;\n }\n .chefcookie__script-description-content table td {\n border:1px solid ").concat(this.hexToRgbaStr((_this$config$style$co17 = this.config.style.color_text) !== null && _this$config$style$co17 !== void 0 ? _this$config$style$co17 : '#595f60', 0.1), ";\n padding: 0.3em 0.5em;\n vertical-align:top;\n }\n\n .chefcookie--noscroll body\n {\n position:fixed;\n width: 100%;\n overflow:hidden;\n }\n .chefcookie--fade body:after,\n .chefcookie--blur body:after\n {\n content:\"\";\n position:fixed;\n z-index: 2147483644;\n top:0;\n left:0;\n width:100%;\n height:100%;\n }\n .chefcookie--fade body:after\n {\n background-color: rgba(0, 0, 0, 0.65);\n }\n .chefcookie--blur body:after\n {\n backdrop-filter: grayscale(50%) blur(5px);\n }\n .chefcookie--overlay\n {\n top: 0;\n }\n .chefcookie--overlay .chefcookie__inner:before\n {\n content: '';\n display: inline-block;\n height: 100%;\n vertical-align: middle;\n }\n .chefcookie--overlay .chefcookie__box\n {\n width: 95%;\n max-width: 60em;\n box-shadow: 0 1em 5em -0.5em #000;\n background-color: ").concat((_this$config$style$co18 = this.config.style.color_background) !== null && _this$config$style$co18 !== void 0 ? _this$config$style$co18 : '#eeeeee', ";\n }\n .chefcookie--overlay .chefcookie__group\n {\n height: 13em;\n margin-bottom: 4%;\n background-color: rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.05);\n border: 1px solid rgba(").concat(this.config.style.color_background != '' && ['#000', '#000000', 'black'].indexOf(this.config.style.color_background) > -1 ? '255, 255, 255' : '0, 0, 0', ", 0.01);\n width: 48%;\n margin-right: 4%;\n }\n .chefcookie--overlay .chefcookie__group:nth-child(2n)\n {\n margin-right:0;\n }\n .chefcookie--overlay.chefcookie--has-scripts .chefcookie__group\n {\n height:auto;\n width: 100%;\n margin-right: 0;\n margin-bottom: 1em;\n }\n .chefcookie--overlay .chefcookie__group\n {\n padding: 1em 1.25em;\n }\n .chefcookie--bottombar,\n .chefcookie--topbar\n {\n background-color:").concat((_this$config$style$co19 = this.config.style.color_background) !== null && _this$config$style$co19 !== void 0 ? _this$config$style$co19 : '#eeeeee', ";\n box-shadow: 0 1em 5em -0.5em #000;\n }\n .chefcookie--bottombar\n {\n bottom:0;\n top:auto;\n }\n .chefcookie--topbar\n {\n bottom:auto;\n top:0;\n position:relative;\n }\n .chefcookie--bottombar .chefcookie__box,\n .chefcookie--topbar .chefcookie__box\n {\n max-width: 1280px;\n }\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n margin-bottom: 40px;\n margin-top: 40px;\n width: 22%;\n margin-right: 4%;\n }\n .chefcookie--bottombar .chefcookie__group:last-child,\n .chefcookie--topbar .chefcookie__group:last-child\n {\n margin-right:0;\n }\n .chefcookie--bottombar .chefcookie__groups--count-9 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-9 .chefcookie__group { width: 7.55%; }\n .chefcookie--bottombar .chefcookie__groups--count-8 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-8 .chefcookie__group { width: 9.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-7 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-7 .chefcookie__group { width: 10.85%; }\n .chefcookie--bottombar .chefcookie__groups--count-6 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-6 .chefcookie__group { width: 13.33%; }\n .chefcookie--bottombar .chefcookie__groups--count-5 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-5 .chefcookie__group { width: 16.80%; }\n .chefcookie--bottombar .chefcookie__groups--count-4 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-4 .chefcookie__group { width: 22.00%; }\n .chefcookie--bottombar .chefcookie__groups--count-3 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-3 .chefcookie__group { width: 30.66%; }\n .chefcookie--bottombar .chefcookie__groups--count-2 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-2 .chefcookie__group { width: 48%; }\n .chefcookie--bottombar .chefcookie__groups--count-1 .chefcookie__group,\n .chefcookie--topbar .chefcookie__groups--count-1 .chefcookie__group { width: 100%; }\n @media screen and (max-width: 940px)\n {\n .chefcookie__button,\n .chefcookie__button:focus\n {\n float: none;\n margin: 0 0 1em;\n text-align: center;\n width: 100%;\n min-width:0;\n }\n }\n @media screen and (max-width: 840px)\n {\n .chefcookie__box\n {\n padding:1em;\n }\n .chefcookie__message h2\n {\n font-size:1.5em;\n line-height:1.4;\n }\n .chefcookie .chefcookie__group,\n .chefcookie--overlay .chefcookie__group,\n .chefcookie--bottombar .chefcookie__group,\n .chefcookie--topbar .chefcookie__group\n {\n float:none;\n margin-right:0;\n width:100% !important;\n height:auto;\n }\n }\n ");
374
388
 
375
389
  if ('css_replace' in this.config.style && this.config.style.css_replace !== undefined && this.config.style.css_replace !== null && this.config.style.css_replace !== '') {
376
390
  css = this.config.style.css_replace;