Socket
Socket
Sign inDemoInstall

@porscheofficial/cookie-consent-banner

Package Overview
Dependencies
1
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 3.1.0

dist/cjs/index-87a315ca.js

60

dist/cjs/cookie-consent-banner.cjs.entry.js

@@ -5,3 +5,3 @@ 'use strict';

const index = require('./index-afa6f655.js');
const index = require('./index-87a315ca.js');

@@ -15,19 +15,15 @@ const cookieConsentBannerCss = ":host{display:block;-webkit-text-size-adjust:100%;--internal-cookie-consent-banner-colors-primary:var(\n --cookie-consent-banner-colors-primary,\n var(--theme-ui-colors-primary, #81c784)\n );--internal-cookie-consent-banner-colors-primary-border:var(\n --cookie-consent-banner-colors-primary,\n var(--theme-ui-colors-primary, #81c784)\n );--internal-cookie-consent-banner-colors-primary-content:var(\n --cookie-consent-banner-colors-primary-content,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-secondary:var(\n --cookie-consent-banner-colors-secondary,\n var(--theme-ui-colors-secondary, transparent)\n );--internal-cookie-consent-banner-colors-secondary-border:var(\n --cookie-consent-banner-colors-secondary-border,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-secondary-content:var(\n --cookie-consent-banner-colors-secondary-content,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-background-body:var(\n --cookie-consent-banner-colors-background-body,\n var(--theme-ui-colors-background, rgba(25, 31, 34, 0.92))\n );--internal-cookie-consent-banner-colors-text:var(\n --cookie-consent-banner-colors-text,\n var(--theme-ui-colors-text, #fff)\n );--internal-cookie-consent-banner-font-family-headline:var(\n --cookie-consent-banner-font-family-headline,\n var(--theme-ui-fonts-heading, inherit)\n );--internal-cookie-consent-banner-font-family-body:var(\n --cookie-consent-banner-font-family-body,\n var(--theme-ui-fonts-body, inherit)\n );--internal-cookie-consent-banner-font-size-headline:var(\n --cookie-consent-banner-font-size-headline,\n 1.5rem\n );--internal-cookie-consent-banner-font-size-body:var(\n --cookie-consent-banner-font-size-body,\n 0.875rem\n );--internal-cookie-consent-banner-border-radius-buttons:var(\n --cookie-consent-banner-border-radius-buttons,\n var(--theme-ui-radii-default, 0.6rem)\n );--internal-cookie-consent-banner-border-radius-body:var(\n --cookie-consent-banner-border-radius-body,\n var(--theme-ui-radii-default, 0)\n );--internal-cookie-consent-banner-spacings-container-padding-top:var(\n --cookie-consent-banner-spacings-container-padding-top,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-left:var(\n --cookie-consent-banner-spacings-container-padding-left,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-bottom:var(\n --cookie-consent-banner-spacings-container-padding-bottom,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-right:var(\n --cookie-consent-banner-spacings-container-padding-right,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-body-padding-top:var(\n --cookie-consent-banner-spacings-body-padding-top,\n var(--theme-ui-spacings-2, 0)\n );--internal-cookie-consent-banner-spacings-body-padding-left:var(\n --cookie-consent-banner-spacings-body-padding-left,\n var(--theme-ui-spacings-2, 2rem)\n );--internal-cookie-consent-banner-spacings-body-padding-bottom:var(\n --cookie-consent-banner-spacings-body-padding-bottom,\n var(--theme-ui-spacings-2, 0)\n );--internal-cookie-consent-banner-spacings-body-padding-right:var(\n --cookie-consent-banner-spacings-body-padding-right,\n var(--theme-ui-spacings-2, 2rem)\n );--internal-cookie-consent-banner-z-index-container:var(\n --cookie-consent-banner-z-index-container,\n 1\n )}.launcher{position:fixed;left:0;bottom:0;z-index:var(--internal-cookie-consent-banner-z-index-container);margin-left:1rem;padding-top:1.2rem;padding-left:2rem;padding-bottom:1.2rem;padding-right:2rem;background-color:rgba(25, 31, 34, 0.92);box-shadow:0px -3px 13px 0px rgba(57, 57, 57, 0.38);color:#fff;transform:translateY(70%);transition:transform 1s ease}.launcher:hover{transform:translateY(0)}*,*:before,*:after{box-sizing:border-box}@keyframes slideup{0%{transform:translateY(110vh)}100%{transform:translateY(0vh)}}.cc{position:fixed;left:0;bottom:0;z-index:var(--internal-cookie-consent-banner-z-index-container);width:100%;max-height:100%;max-height:stretch;padding-top:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-top) +\n env(safe-area-inset-top)\n );padding-left:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-left) +\n env(safe-area-inset-left)\n );padding-bottom:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-bottom) +\n env(safe-area-inset-bottom)\n );padding-right:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-right) +\n env(safe-area-inset-right)\n );overflow-y:auto;transform:translateY(110vh);animation:slideup 1s forwards}.cc_disable-slide-in{transform:none;animation:none}.cc_body{background-color:var(\n --internal-cookie-consent-banner-colors-background-body\n );border-radius:var(--internal-cookie-consent-banner-border-radius-body);padding-top:var(--internal-cookie-consent-banner-spacings-body-padding-top);padding-left:var(\n --internal-cookie-consent-banner-spacings-body-padding-left\n );padding-bottom:var(\n --internal-cookie-consent-banner-spacings-body-padding-bottom\n );padding-right:var(\n --internal-cookie-consent-banner-spacings-body-padding-right\n );box-shadow:0px -3px 13px 0px rgba(57, 57, 57, 0.38)}.cc_headline{margin:0;padding-top:2rem;padding-bottom:0;font-size:var(--internal-cookie-consent-banner-font-size-headline);color:var(--internal-cookie-consent-banner-colors-text);font-family:var(--internal-cookie-consent-banner-font-family-headline)}.cc_text{padding-top:1rem;padding-bottom:1.5rem;font-family:var(--internal-cookie-consent-banner-font-family-body)}a,.textlink,::slotted(a){text-decoration:underline;color:var(--internal-cookie-consent-banner-colors-text)}.textlink:hover,::slotted(a:hover){cursor:pointer}label,p,::slotted(label),::slotted(p){box-sizing:border-box;margin:0;min-width:0;max-width:100%;font-size:var(--internal-cookie-consent-banner-font-size-body);line-height:1.37;font-weight:400;letter-spacing:0.02em;color:var(--internal-cookie-consent-banner-colors-text)}.cc_settings{padding-bottom:2rem}.cc_settings_description{padding-bottom:1rem}.cc_checkboxes{display:grid}.cc_checkboxes_item{display:block;width:100%;padding-bottom:1rem;padding-left:0.5rem}.cc_buttons{padding-bottom:1rem;text-align:right}.cc_buttons>button{width:100%;margin-bottom:1rem}.cc_buttons>button:hover{cursor:pointer}@media (min-width: 48em){.cc_buttons>button{width:auto;margin-bottom:0}}button{box-sizing:border-box;min-width:0;appearance:none;display:inline-block;margin-top:0;margin-left:0.25rem;margin-bottom:0;margin-right:0.25rem;padding-top:1rem;padding-left:2.5rem;padding-bottom:1rem;padding-right:2.5rem;background-color:var(--internal-cookie-consent-banner-colors-primary);border-radius:var(--internal-cookie-consent-banner-border-radius-buttons);border-width:1px;border-color:var(--internal-cookie-consent-banner-colors-primary-border);border-style:solid;color:var(--internal-cookie-consent-banner-colors-primary-content);font-size:inherit;font-size:1rem;font-weight:700;line-height:inherit;text-decoration:none;text-align:center}button.secondary{background-color:var(--internal-cookie-consent-banner-colors-secondary);border-color:var(--internal-cookie-consent-banner-colors-secondary-border);color:var(--internal-cookie-consent-banner-colors-secondary-content)}";

this.eventCookieConsentUpdated = index.createEvent(this, "cookie_consent_preferences_updated", 7);
// ===========================================================================
// PROPS
// ===========================================================================
// Available Categories
this.availableCategories = [];
// Overwrite Cookie Name
this.cookieName = "cookies_accepted_categories";
// Overwrite Cookie Domain
this.cookieDomain = document.location.hostname;
// Site Cookies will be deleted if consent for any category is withdrawn. Set to true to disable behaviour.
this.disableResetSiteCookiesOnConsentWithdrawn = false;
// A cookie banner could have impact on the Web Vitals / LCP measurement
// See #7
this.disableSlideInAnimation = false;
// =============================================================================
// STATES
// =============================================================================
this.headline = undefined;
this.btnLabelAcceptAndContinue = undefined;
this.btnLabelOnlyEssentialAndContinue = undefined;
this.btnLabelSelectAllAndContinue = undefined;
this.btnLabelPersistSelectionAndContinue = undefined;
this.contentSettingsDescription = undefined;
this.handlePreferencesRestored = undefined;
this.handlePreferencesUpdated = undefined;
this.isShown = false;

@@ -53,7 +49,4 @@ this.acceptedCategoriesNext = [];

.map((category) => category.key);
const cookieValueString = `; ${document.cookie}`
.split(`; ${this.cookieName}=`)
.pop()
.split(";")
.shift();
const cookieValueString = `; ${document.cookie}`.split(`; ${this.cookieName}=`).pop() ??
"".split(";").shift();
const cookieValues = cookieValueString ? cookieValueString.split(",") : [];

@@ -72,2 +65,3 @@ if (cookieValues.length === 0) {

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesRestored) {

@@ -97,2 +91,3 @@ this.handlePreferencesRestored({

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesUpdated) {

@@ -114,3 +109,2 @@ this.handlePreferencesUpdated({

}
/* eslint-disable-next-line @typescript-eslint/explicit-member-accessibility,@typescript-eslint/member-ordering */
render() {

@@ -120,17 +114,15 @@ if (!this.isShown) {

}
return (index.h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" }, index.h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 }, Boolean(this.headline) && (index.h("h1", { class: "cc_headline" }, this.headline)), index.h("form", null, index.h("p", { class: "cc_text" }, index.h("slot", null)), Boolean(this.isShownSettings) && (index.h("div", { class: "cc_settings" }, index.h("p", { class: "cc_settings_description" }, this.contentSettingsDescription), index.h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => {
return (index.h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` }, index.h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category?.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event?.currentTarget?.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }), " ", category.label, ": ", category.description));
})))), index.h("div", { class: "cc_buttons" }, Boolean(this.isShownSettings) && (index.h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)), !this.isShownSettings &&
return (index.h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" }, index.h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 }, Boolean(this.headline) && (index.h("h1", { class: "cc_headline" }, this.headline)), index.h("form", null, index.h("p", { class: "cc_text" }, index.h("slot", null)), Boolean(this.isShownSettings) && (index.h("div", { class: "cc_settings" }, index.h("p", { class: "cc_settings_description" }, this.contentSettingsDescription), index.h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => (index.h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` }, index.h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event.currentTarget.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }), " ", category.label, ": ", category.description)))))), index.h("div", { class: "cc_buttons" }, Boolean(this.isShownSettings) && (index.h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)), !this.isShownSettings &&
!!this.btnLabelOnlyEssentialAndContinue && (index.h("button", { class: "secondary", type: "button", onClick: () => this.handleEssentialsOnly(), onKeyPress: () => this.handleEssentialsOnly() }, this.btnLabelOnlyEssentialAndContinue)), index.h("button", { onClick: () => this.handleAcceptAll(), onKeyPress: () => this.handleAcceptAll(), type: "button" }, !this.isShownSettings

@@ -137,0 +129,0 @@ ? this.btnLabelAcceptAndContinue

'use strict';
const index = require('./index-afa6f655.js');
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-87a315ca.js');
/*
Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
*/

@@ -20,1 +22,3 @@ const patchBrowser = () => {

});
exports.setNonce = index.setNonce;

@@ -5,6 +5,6 @@ 'use strict';

const index = require('./index-afa6f655.js');
const index = require('./index-87a315ca.js');
/*
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
*/

@@ -22,2 +22,3 @@ const patchEsm = () => {

exports.setNonce = index.setNonce;
exports.defineCustomElements = defineCustomElements;

@@ -7,4 +7,4 @@ {

"name": "@stencil/core",
"version": "2.17.0",
"typescriptVersion": "4.5.4"
"version": "2.22.1",
"typescriptVersion": "4.9.4"
},

@@ -11,0 +11,0 @@ "collections": [],

/* eslint-disable @typescript-eslint/no-unsafe-return,no-unused-vars,@typescript-eslint/no-unused-vars */
// https://github.com/ionic-team/stencil/blob/master/BREAKING_CHANGES.md
import { Component, Event, Listen, h, State, Prop, } from "@stencil/core";
import { h, } from "@stencil/core";
export class CookieConsentBanner {
constructor() {
// ===========================================================================
// PROPS
// ===========================================================================
// Available Categories
this.availableCategories = [];
// Overwrite Cookie Name
this.cookieName = "cookies_accepted_categories";
// Overwrite Cookie Domain
this.cookieDomain = document.location.hostname;
// Site Cookies will be deleted if consent for any category is withdrawn. Set to true to disable behaviour.
this.disableResetSiteCookiesOnConsentWithdrawn = false;
// A cookie banner could have impact on the Web Vitals / LCP measurement
// See #7
this.disableSlideInAnimation = false;
// =============================================================================
// STATES
// =============================================================================
this.headline = undefined;
this.btnLabelAcceptAndContinue = undefined;
this.btnLabelOnlyEssentialAndContinue = undefined;
this.btnLabelSelectAllAndContinue = undefined;
this.btnLabelPersistSelectionAndContinue = undefined;
this.contentSettingsDescription = undefined;
this.handlePreferencesRestored = undefined;
this.handlePreferencesUpdated = undefined;
this.isShown = false;

@@ -43,7 +39,4 @@ this.acceptedCategoriesNext = [];

.map((category) => category.key);
const cookieValueString = `; ${document.cookie}`
.split(`; ${this.cookieName}=`)
.pop()
.split(";")
.shift();
const cookieValueString = `; ${document.cookie}`.split(`; ${this.cookieName}=`).pop() ??
"".split(";").shift();
const cookieValues = cookieValueString ? cookieValueString.split(",") : [];

@@ -62,2 +55,3 @@ if (cookieValues.length === 0) {

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesRestored) {

@@ -87,2 +81,3 @@ this.handlePreferencesRestored({

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesUpdated) {

@@ -104,3 +99,2 @@ this.handlePreferencesUpdated({

}
/* eslint-disable-next-line @typescript-eslint/explicit-member-accessibility,@typescript-eslint/member-ordering */
render() {

@@ -110,323 +104,316 @@ if (!this.isShown) {

}
return (h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" },
h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 },
Boolean(this.headline) && (h("h1", { class: "cc_headline" }, this.headline)),
h("form", null,
h("p", { class: "cc_text" },
h("slot", null)),
Boolean(this.isShownSettings) && (h("div", { class: "cc_settings" },
h("p", { class: "cc_settings_description" }, this.contentSettingsDescription),
h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => {
return (h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` },
h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category?.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event?.currentTarget?.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }),
" ",
category.label,
": ",
category.description));
})))),
h("div", { class: "cc_buttons" },
Boolean(this.isShownSettings) && (h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)),
!this.isShownSettings &&
!!this.btnLabelOnlyEssentialAndContinue && (h("button", { class: "secondary", type: "button", onClick: () => this.handleEssentialsOnly(), onKeyPress: () => this.handleEssentialsOnly() }, this.btnLabelOnlyEssentialAndContinue)),
h("button", { onClick: () => this.handleAcceptAll(), onKeyPress: () => this.handleAcceptAll(), type: "button" }, !this.isShownSettings
? this.btnLabelAcceptAndContinue
: this.btnLabelSelectAllAndContinue))))));
return (h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" }, h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 }, Boolean(this.headline) && (h("h1", { class: "cc_headline" }, this.headline)), h("form", null, h("p", { class: "cc_text" }, h("slot", null)), Boolean(this.isShownSettings) && (h("div", { class: "cc_settings" }, h("p", { class: "cc_settings_description" }, this.contentSettingsDescription), h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => (h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` }, h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event.currentTarget.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }), " ", category.label, ": ", category.description)))))), h("div", { class: "cc_buttons" }, Boolean(this.isShownSettings) && (h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)), !this.isShownSettings &&
!!this.btnLabelOnlyEssentialAndContinue && (h("button", { class: "secondary", type: "button", onClick: () => this.handleEssentialsOnly(), onKeyPress: () => this.handleEssentialsOnly() }, this.btnLabelOnlyEssentialAndContinue)), h("button", { onClick: () => this.handleAcceptAll(), onKeyPress: () => this.handleAcceptAll(), type: "button" }, !this.isShownSettings
? this.btnLabelAcceptAndContinue
: this.btnLabelSelectAllAndContinue))))));
}
static get is() { return "cookie-consent-banner"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() { return {
"$": ["cookie-consent-banner.css"]
}; }
static get styleUrls() { return {
"$": ["cookie-consent-banner.css"]
}; }
static get properties() { return {
"availableCategories": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "CategoryItem[]",
"resolved": "CategoryItem[]",
"references": {
"CategoryItem": {
"location": "import",
"path": "./types"
static get originalStyleUrls() {
return {
"$": ["cookie-consent-banner.css"]
};
}
static get styleUrls() {
return {
"$": ["cookie-consent-banner.css"]
};
}
static get properties() {
return {
"availableCategories": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "CategoryItem[]",
"resolved": "CategoryItem[]",
"references": {
"CategoryItem": {
"location": "import",
"path": "./types"
}
}
}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"defaultValue": "[]"
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"cookieName": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "cookie-name",
"reflect": false,
"defaultValue": "\"cookies_accepted_categories\""
},
"defaultValue": "[]"
},
"cookieName": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
"cookieDomain": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "cookie-domain",
"reflect": false,
"defaultValue": "document.location.hostname"
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"disableResetSiteCookiesOnConsentWithdrawn": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "disable-reset-site-cookies-on-consent-withdrawn",
"reflect": false,
"defaultValue": "false"
},
"attribute": "cookie-name",
"reflect": false,
"defaultValue": "\"cookies_accepted_categories\""
},
"cookieDomain": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
"disableSlideInAnimation": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "disable-slide-in-animation",
"reflect": false,
"defaultValue": "false"
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"headline": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "headline",
"reflect": false
},
"attribute": "cookie-domain",
"reflect": false,
"defaultValue": "document.location.hostname"
},
"disableResetSiteCookiesOnConsentWithdrawn": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
"btnLabelAcceptAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-accept-and-continue",
"reflect": false
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"btnLabelOnlyEssentialAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-only-essential-and-continue",
"reflect": false
},
"attribute": "disable-reset-site-cookies-on-consent-withdrawn",
"reflect": false,
"defaultValue": "false"
},
"disableSlideInAnimation": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
"btnLabelSelectAllAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-select-all-and-continue",
"reflect": false
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"btnLabelPersistSelectionAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-persist-selection-and-continue",
"reflect": false
},
"attribute": "disable-slide-in-animation",
"reflect": false,
"defaultValue": "false"
},
"headline": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
"contentSettingsDescription": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "content-settings-description",
"reflect": false
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"handlePreferencesRestored": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "({\n acceptedCategories,\n }: {\n acceptedCategories: string[];\n }) => void",
"resolved": "({ acceptedCategories, }: { acceptedCategories: string[]; }) => void",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
}
},
"attribute": "headline",
"reflect": false
},
"btnLabelAcceptAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-accept-and-continue",
"reflect": false
},
"btnLabelOnlyEssentialAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-only-essential-and-continue",
"reflect": false
},
"btnLabelSelectAllAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-select-all-and-continue",
"reflect": false
},
"btnLabelPersistSelectionAndContinue": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "btn-label-persist-selection-and-continue",
"reflect": false
},
"contentSettingsDescription": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "content-settings-description",
"reflect": false
},
"handlePreferencesRestored": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "({\n acceptedCategories,\n }: {\n acceptedCategories: string[];\n }) => void",
"resolved": "({ acceptedCategories, }: { acceptedCategories: string[]; }) => void",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
"handlePreferencesUpdated": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "({\n acceptedCategories,\n }: {\n acceptedCategories: string[];\n }) => void",
"resolved": "({ acceptedCategories, }: { acceptedCategories: string[]; }) => void",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
}
}
},
"handlePreferencesUpdated": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "({\n acceptedCategories,\n }: {\n acceptedCategories: string[];\n }) => void",
"resolved": "({ acceptedCategories, }: { acceptedCategories: string[]; }) => void",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
}
}
}; }
static get states() { return {
"isShown": {},
"acceptedCategoriesNext": {},
"acceptedCategoriesPersisted": {},
"isShownSettings": {}
}; }
static get events() { return [{
"method": "eventCookieConsentRestored",
"name": "cookie_consent_preferences_restored",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}, {
"method": "eventCookieConsentUpdated",
"name": "cookie_consent_preferences_updated",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}]; }
static get listeners() { return [{
"name": "cookie_consent_show",
"method": "eventListenerShow",
"target": "document",
"capture": false,
"passive": false
}, {
"name": "cookie_consent_details_show",
"method": "eventListenerDetailsShow",
"target": "document",
"capture": false,
"passive": false
}]; }
};
}
static get states() {
return {
"isShown": {},
"acceptedCategoriesNext": {},
"acceptedCategoriesPersisted": {},
"isShownSettings": {}
};
}
static get events() {
return [{
"method": "eventCookieConsentRestored",
"name": "cookie_consent_preferences_restored",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}, {
"method": "eventCookieConsentUpdated",
"name": "cookie_consent_preferences_updated",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}];
}
static get listeners() {
return [{
"name": "cookie_consent_show",
"method": "eventListenerShow",
"target": "document",
"capture": false,
"passive": false
}, {
"name": "cookie_consent_details_show",
"method": "eventListenerDetailsShow",
"target": "document",
"capture": false,
"passive": false
}];
}
}

@@ -0,1 +1,2 @@

// eslint-disable-next-line import/extensions, import/no-unresolved
export * from "./components";

@@ -1,1 +0,1 @@

import{p as e,b as n}from"./p-5d3bad05.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((e=>n([["p-e314e540",[[1,"cookie-consent-banner",{availableCategories:[16],cookieName:[1,"cookie-name"],cookieDomain:[1,"cookie-domain"],disableResetSiteCookiesOnConsentWithdrawn:[4,"disable-reset-site-cookies-on-consent-withdrawn"],disableSlideInAnimation:[4,"disable-slide-in-animation"],headline:[1],btnLabelAcceptAndContinue:[1,"btn-label-accept-and-continue"],btnLabelOnlyEssentialAndContinue:[1,"btn-label-only-essential-and-continue"],btnLabelSelectAllAndContinue:[1,"btn-label-select-all-and-continue"],btnLabelPersistSelectionAndContinue:[1,"btn-label-persist-selection-and-continue"],contentSettingsDescription:[1,"content-settings-description"],handlePreferencesRestored:[16],handlePreferencesUpdated:[16],isShown:[32],acceptedCategoriesNext:[32],acceptedCategoriesPersisted:[32],isShownSettings:[32]},[[4,"cookie_consent_show","eventListenerShow"],[4,"cookie_consent_details_show","eventListenerDetailsShow"]]]]]],e)));
import{p as e,b as n}from"./p-1549f98e.js";export{s as setNonce}from"./p-1549f98e.js";(()=>{const n=import.meta.url,t={};return""!==n&&(t.resourcesUrl=new URL(".",n).href),e(t)})().then((e=>n([["p-e22fd931",[[1,"cookie-consent-banner",{availableCategories:[16],cookieName:[1,"cookie-name"],cookieDomain:[1,"cookie-domain"],disableResetSiteCookiesOnConsentWithdrawn:[4,"disable-reset-site-cookies-on-consent-withdrawn"],disableSlideInAnimation:[4,"disable-slide-in-animation"],headline:[1],btnLabelAcceptAndContinue:[1,"btn-label-accept-and-continue"],btnLabelOnlyEssentialAndContinue:[1,"btn-label-only-essential-and-continue"],btnLabelSelectAllAndContinue:[1,"btn-label-select-all-and-continue"],btnLabelPersistSelectionAndContinue:[1,"btn-label-persist-selection-and-continue"],contentSettingsDescription:[1,"content-settings-description"],handlePreferencesRestored:[16],handlePreferencesUpdated:[16],isShown:[32],acceptedCategoriesNext:[32],acceptedCategoriesPersisted:[32],isShownSettings:[32]},[[4,"cookie_consent_show","eventListenerShow"],[4,"cookie_consent_details_show","eventListenerDetailsShow"]]]]]],e)));

@@ -1,2 +0,2 @@

import { r as registerInstance, c as createEvent, h } from './index-b8e3c377.js';
import { r as registerInstance, c as createEvent, h } from './index-a4b755f8.js';

@@ -10,19 +10,15 @@ const cookieConsentBannerCss = ":host{display:block;-webkit-text-size-adjust:100%;--internal-cookie-consent-banner-colors-primary:var(\n --cookie-consent-banner-colors-primary,\n var(--theme-ui-colors-primary, #81c784)\n );--internal-cookie-consent-banner-colors-primary-border:var(\n --cookie-consent-banner-colors-primary,\n var(--theme-ui-colors-primary, #81c784)\n );--internal-cookie-consent-banner-colors-primary-content:var(\n --cookie-consent-banner-colors-primary-content,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-secondary:var(\n --cookie-consent-banner-colors-secondary,\n var(--theme-ui-colors-secondary, transparent)\n );--internal-cookie-consent-banner-colors-secondary-border:var(\n --cookie-consent-banner-colors-secondary-border,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-secondary-content:var(\n --cookie-consent-banner-colors-secondary-content,\n var(--theme-ui-colors-white, #fff)\n );--internal-cookie-consent-banner-colors-background-body:var(\n --cookie-consent-banner-colors-background-body,\n var(--theme-ui-colors-background, rgba(25, 31, 34, 0.92))\n );--internal-cookie-consent-banner-colors-text:var(\n --cookie-consent-banner-colors-text,\n var(--theme-ui-colors-text, #fff)\n );--internal-cookie-consent-banner-font-family-headline:var(\n --cookie-consent-banner-font-family-headline,\n var(--theme-ui-fonts-heading, inherit)\n );--internal-cookie-consent-banner-font-family-body:var(\n --cookie-consent-banner-font-family-body,\n var(--theme-ui-fonts-body, inherit)\n );--internal-cookie-consent-banner-font-size-headline:var(\n --cookie-consent-banner-font-size-headline,\n 1.5rem\n );--internal-cookie-consent-banner-font-size-body:var(\n --cookie-consent-banner-font-size-body,\n 0.875rem\n );--internal-cookie-consent-banner-border-radius-buttons:var(\n --cookie-consent-banner-border-radius-buttons,\n var(--theme-ui-radii-default, 0.6rem)\n );--internal-cookie-consent-banner-border-radius-body:var(\n --cookie-consent-banner-border-radius-body,\n var(--theme-ui-radii-default, 0)\n );--internal-cookie-consent-banner-spacings-container-padding-top:var(\n --cookie-consent-banner-spacings-container-padding-top,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-left:var(\n --cookie-consent-banner-spacings-container-padding-left,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-bottom:var(\n --cookie-consent-banner-spacings-container-padding-bottom,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-container-padding-right:var(\n --cookie-consent-banner-spacings-container-padding-right,\n var(--theme-ui-spacings-2, 1rem)\n );--internal-cookie-consent-banner-spacings-body-padding-top:var(\n --cookie-consent-banner-spacings-body-padding-top,\n var(--theme-ui-spacings-2, 0)\n );--internal-cookie-consent-banner-spacings-body-padding-left:var(\n --cookie-consent-banner-spacings-body-padding-left,\n var(--theme-ui-spacings-2, 2rem)\n );--internal-cookie-consent-banner-spacings-body-padding-bottom:var(\n --cookie-consent-banner-spacings-body-padding-bottom,\n var(--theme-ui-spacings-2, 0)\n );--internal-cookie-consent-banner-spacings-body-padding-right:var(\n --cookie-consent-banner-spacings-body-padding-right,\n var(--theme-ui-spacings-2, 2rem)\n );--internal-cookie-consent-banner-z-index-container:var(\n --cookie-consent-banner-z-index-container,\n 1\n )}.launcher{position:fixed;left:0;bottom:0;z-index:var(--internal-cookie-consent-banner-z-index-container);margin-left:1rem;padding-top:1.2rem;padding-left:2rem;padding-bottom:1.2rem;padding-right:2rem;background-color:rgba(25, 31, 34, 0.92);box-shadow:0px -3px 13px 0px rgba(57, 57, 57, 0.38);color:#fff;transform:translateY(70%);transition:transform 1s ease}.launcher:hover{transform:translateY(0)}*,*:before,*:after{box-sizing:border-box}@keyframes slideup{0%{transform:translateY(110vh)}100%{transform:translateY(0vh)}}.cc{position:fixed;left:0;bottom:0;z-index:var(--internal-cookie-consent-banner-z-index-container);width:100%;max-height:100%;max-height:stretch;padding-top:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-top) +\n env(safe-area-inset-top)\n );padding-left:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-left) +\n env(safe-area-inset-left)\n );padding-bottom:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-bottom) +\n env(safe-area-inset-bottom)\n );padding-right:calc(\n var(--internal-cookie-consent-banner-spacings-container-padding-right) +\n env(safe-area-inset-right)\n );overflow-y:auto;transform:translateY(110vh);animation:slideup 1s forwards}.cc_disable-slide-in{transform:none;animation:none}.cc_body{background-color:var(\n --internal-cookie-consent-banner-colors-background-body\n );border-radius:var(--internal-cookie-consent-banner-border-radius-body);padding-top:var(--internal-cookie-consent-banner-spacings-body-padding-top);padding-left:var(\n --internal-cookie-consent-banner-spacings-body-padding-left\n );padding-bottom:var(\n --internal-cookie-consent-banner-spacings-body-padding-bottom\n );padding-right:var(\n --internal-cookie-consent-banner-spacings-body-padding-right\n );box-shadow:0px -3px 13px 0px rgba(57, 57, 57, 0.38)}.cc_headline{margin:0;padding-top:2rem;padding-bottom:0;font-size:var(--internal-cookie-consent-banner-font-size-headline);color:var(--internal-cookie-consent-banner-colors-text);font-family:var(--internal-cookie-consent-banner-font-family-headline)}.cc_text{padding-top:1rem;padding-bottom:1.5rem;font-family:var(--internal-cookie-consent-banner-font-family-body)}a,.textlink,::slotted(a){text-decoration:underline;color:var(--internal-cookie-consent-banner-colors-text)}.textlink:hover,::slotted(a:hover){cursor:pointer}label,p,::slotted(label),::slotted(p){box-sizing:border-box;margin:0;min-width:0;max-width:100%;font-size:var(--internal-cookie-consent-banner-font-size-body);line-height:1.37;font-weight:400;letter-spacing:0.02em;color:var(--internal-cookie-consent-banner-colors-text)}.cc_settings{padding-bottom:2rem}.cc_settings_description{padding-bottom:1rem}.cc_checkboxes{display:grid}.cc_checkboxes_item{display:block;width:100%;padding-bottom:1rem;padding-left:0.5rem}.cc_buttons{padding-bottom:1rem;text-align:right}.cc_buttons>button{width:100%;margin-bottom:1rem}.cc_buttons>button:hover{cursor:pointer}@media (min-width: 48em){.cc_buttons>button{width:auto;margin-bottom:0}}button{box-sizing:border-box;min-width:0;appearance:none;display:inline-block;margin-top:0;margin-left:0.25rem;margin-bottom:0;margin-right:0.25rem;padding-top:1rem;padding-left:2.5rem;padding-bottom:1rem;padding-right:2.5rem;background-color:var(--internal-cookie-consent-banner-colors-primary);border-radius:var(--internal-cookie-consent-banner-border-radius-buttons);border-width:1px;border-color:var(--internal-cookie-consent-banner-colors-primary-border);border-style:solid;color:var(--internal-cookie-consent-banner-colors-primary-content);font-size:inherit;font-size:1rem;font-weight:700;line-height:inherit;text-decoration:none;text-align:center}button.secondary{background-color:var(--internal-cookie-consent-banner-colors-secondary);border-color:var(--internal-cookie-consent-banner-colors-secondary-border);color:var(--internal-cookie-consent-banner-colors-secondary-content)}";

this.eventCookieConsentUpdated = createEvent(this, "cookie_consent_preferences_updated", 7);
// ===========================================================================
// PROPS
// ===========================================================================
// Available Categories
this.availableCategories = [];
// Overwrite Cookie Name
this.cookieName = "cookies_accepted_categories";
// Overwrite Cookie Domain
this.cookieDomain = document.location.hostname;
// Site Cookies will be deleted if consent for any category is withdrawn. Set to true to disable behaviour.
this.disableResetSiteCookiesOnConsentWithdrawn = false;
// A cookie banner could have impact on the Web Vitals / LCP measurement
// See #7
this.disableSlideInAnimation = false;
// =============================================================================
// STATES
// =============================================================================
this.headline = undefined;
this.btnLabelAcceptAndContinue = undefined;
this.btnLabelOnlyEssentialAndContinue = undefined;
this.btnLabelSelectAllAndContinue = undefined;
this.btnLabelPersistSelectionAndContinue = undefined;
this.contentSettingsDescription = undefined;
this.handlePreferencesRestored = undefined;
this.handlePreferencesUpdated = undefined;
this.isShown = false;

@@ -48,7 +44,4 @@ this.acceptedCategoriesNext = [];

.map((category) => category.key);
const cookieValueString = `; ${document.cookie}`
.split(`; ${this.cookieName}=`)
.pop()
.split(";")
.shift();
const cookieValueString = `; ${document.cookie}`.split(`; ${this.cookieName}=`).pop() ??
"".split(";").shift();
const cookieValues = cookieValueString ? cookieValueString.split(",") : [];

@@ -67,2 +60,3 @@ if (cookieValues.length === 0) {

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesRestored) {

@@ -92,2 +86,3 @@ this.handlePreferencesRestored({

});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (this.handlePreferencesUpdated) {

@@ -109,3 +104,2 @@ this.handlePreferencesUpdated({

}
/* eslint-disable-next-line @typescript-eslint/explicit-member-accessibility,@typescript-eslint/member-ordering */
render() {

@@ -115,17 +109,15 @@ if (!this.isShown) {

}
return (h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" }, h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 }, Boolean(this.headline) && (h("h1", { class: "cc_headline" }, this.headline)), h("form", null, h("p", { class: "cc_text" }, h("slot", null)), Boolean(this.isShownSettings) && (h("div", { class: "cc_settings" }, h("p", { class: "cc_settings_description" }, this.contentSettingsDescription), h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => {
return (h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` }, h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category?.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event?.currentTarget?.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }), " ", category.label, ": ", category.description));
})))), h("div", { class: "cc_buttons" }, Boolean(this.isShownSettings) && (h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)), !this.isShownSettings &&
return (h("div", { class: this.disableSlideInAnimation ? "cc cc_disable-slide-in" : "cc" }, h("div", { class: "cc_body", role: "dialog", "aria-modal": "true", "aria-label": "Cookie Consent Management", tabIndex: -1 }, Boolean(this.headline) && (h("h1", { class: "cc_headline" }, this.headline)), h("form", null, h("p", { class: "cc_text" }, h("slot", null)), Boolean(this.isShownSettings) && (h("div", { class: "cc_settings" }, h("p", { class: "cc_settings_description" }, this.contentSettingsDescription), h("div", { class: "cc_checkboxes" }, this.availableCategories.map((category) => (h("label", { class: "cc_checkboxes_item", htmlFor: `check-category-${category.label}` }, h("input", { id: `check-category-${category.label}`, type: "checkbox", disabled: category.isMandatory ?? false, checked: this.acceptedCategoriesNext.includes(category.key), onChange: (event) => {
const isChecked = event.currentTarget.checked;
if (isChecked) {
this.acceptedCategoriesNext = [
...this.acceptedCategoriesNext,
category.key,
];
}
else {
this.acceptedCategoriesNext =
this.acceptedCategoriesNext.filter((item) => item !== category.key);
}
} }), " ", category.label, ": ", category.description)))))), h("div", { class: "cc_buttons" }, Boolean(this.isShownSettings) && (h("button", { type: "submit", class: "secondary", onClick: () => this.persistSelection(), onKeyPress: () => this.persistSelection() }, this.btnLabelPersistSelectionAndContinue)), !this.isShownSettings &&
!!this.btnLabelOnlyEssentialAndContinue && (h("button", { class: "secondary", type: "button", onClick: () => this.handleEssentialsOnly(), onKeyPress: () => this.handleEssentialsOnly() }, this.btnLabelOnlyEssentialAndContinue)), h("button", { onClick: () => this.handleAcceptAll(), onKeyPress: () => this.handleAcceptAll(), type: "button" }, !this.isShownSettings

@@ -132,0 +124,0 @@ ? this.btnLabelAcceptAndContinue

@@ -1,5 +0,6 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-b8e3c377.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-a4b755f8.js';
export { s as setNonce } from './index-a4b755f8.js';
/*
Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Browser v2.22.1 | MIT Licensed | https://stenciljs.com
*/

@@ -6,0 +7,0 @@ const patchBrowser = () => {

@@ -1,5 +0,6 @@

import { p as promiseResolve, b as bootstrapLazy } from './index-b8e3c377.js';
import { p as promiseResolve, b as bootstrapLazy } from './index-a4b755f8.js';
export { s as setNonce } from './index-a4b755f8.js';
/*
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
Stencil Client Patch Esm v2.22.1 | MIT Licensed | https://stenciljs.com
*/

@@ -6,0 +7,0 @@ const patchEsm = () => {

@@ -1,1 +0,1 @@

var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);

@@ -33,3 +33,3 @@ import { EventEmitter, JSX } from "../../stencil-public-runtime";

private handleEssentialsOnly;
render(): JSX.Element;
render(): JSX.Element | null;
}

@@ -1,2 +0,2 @@

export declare type CategoryItem = {
export interface CategoryItem {
label: string;

@@ -6,2 +6,2 @@ key: string;

description: string;
};
}

@@ -136,3 +136,3 @@ declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;

}
export declare type ListenTargetOptions = 'body' | 'document' | 'window';
export type ListenTargetOptions = 'body' | 'document' | 'window';
export interface StateDecorator {

@@ -218,4 +218,4 @@ (): PropertyDecorator;

export declare const Watch: WatchDecorator;
export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
/**

@@ -226,3 +226,5 @@ * `setMode()` is used for libraries which provide multiple "modes" for styles.

/**
* getMode
* `getMode()` is used for libraries which provide multiple "modes" for styles.
* @param ref a reference to the node to get styles for
* @returns the current mode or undefined, if not found
*/

@@ -240,2 +242,5 @@ export declare function getMode<T = string | undefined>(ref: any): T;

* if the path needs to be customized.
* @param path the path to use in calculating the asset path. this value will be
* used in conjunction with the base asset path
* @returns the base path
*/

@@ -253,9 +258,22 @@ export declare function getAssetPath(path: string): string;

* But do note that this configuration depends on how your script is bundled, or lack of
* bunding, and where your assets can be loaded from. Additionally custom bundling
* bundling, and where your assets can be loaded from. Additionally custom bundling
* will have to ensure the static assets are copied to its build directory.
* @param path the asset path to set
* @returns the set path
*/
export declare function setAssetPath(path: string): string;
/**
* getElement
* Used to specify a nonce value that corresponds with an application's
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
* @param nonce The value to be used for the nonce attribute.
*/
export declare function setNonce(nonce: string): void;
/**
* Retrieve a Stencil element for a given reference
* @param ref the ref to get the Stencil element for
* @returns a reference to the element
*/
export declare function getElement(ref: any): HTMLStencilElement;

@@ -265,3 +283,5 @@ /**

*
* Notice `forceUpdate()` is not syncronous and might perform the DOM render in the next frame.
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
*
* @param ref the node/element to force the re-render of
*/

@@ -271,2 +291,3 @@ export declare function forceUpdate(ref: any): void;

* getRenderingRef
* @returns the rendering ref
*/

@@ -282,2 +303,4 @@ export declare function getRenderingRef(): any;

* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-write to schedule
*/

@@ -290,2 +313,4 @@ export declare function writeTask(task: RafCallback): void;

* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-read to schedule
*/

@@ -429,4 +454,40 @@ export declare function readTask(task: RafCallback): void;

}
/**
* Utilities for working with functional Stencil components. An object
* conforming to this interface is passed by the Stencil runtime as the third
* argument to a functional component, allowing component authors to work with
* features like children.
*
* The children of a functional component will be passed as the second
* argument, so a functional component which uses these utils to transform its
* children might look like the following:
*
* ```ts
* export const AddClass: FunctionalComponent = (_, children, utils) => (
* utils.map(children, child => ({
* ...child,
* vattrs: {
* ...child.vattrs,
* class: `${child.vattrs.class} add-class`
* }
* }))
* );
* ```
*
* For more see the Stencil documentation, here:
* https://stenciljs.com/docs/functional-components
*/
export interface FunctionalUtilities {
/**
* Utility for reading the children of a functional component at runtime.
* Since the Stencil runtime uses a different interface for children it is
* not recommendeded to read the children directly, and is preferable to use
* this utility to, for instance, perform a side effect for each child.
*/
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
/**
* Utility for transforming the children of a functional component. Given an
* array of children and a callback this will return a list of the results of
* passing each child to the supplied callback.
*/
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];

@@ -433,0 +494,0 @@ }

@@ -13,1 +13,10 @@ export * from '../dist/types/components';

export declare function applyPolyfills(): Promise<void>;
/**
* Used to specify a nonce value that corresponds with an application's CSP.
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
* Alternatively, the nonce value can be set on a meta tag in the DOM head
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
* will result in the same behavior.
*/
export declare function setNonce(nonce: string): void;
{
"name": "cookie-consent-banner-loader",
"private": true,
"typings": "./index.d.ts",

@@ -4,0 +5,0 @@ "module": "./index.js",

{
"name": "@porscheofficial/cookie-consent-banner",
"license": "MIT",
"version": "3.0.1",
"version": "3.1.0",
"repository": {

@@ -12,4 +12,6 @@ "type": "git",

"build": "stencil build",
"eslint:ci": "eslint ./src/ --ext .js,.jsx,.tsx,.ts",
"eslint:fix": "eslint ./src/ --fix --ext .js,.jsx,.tsx,.ts",
"eslint:ci": "eslint src/ --ext .js,.jsx,.tsx,.ts -f stylish",
"eslint:fix": "eslint src/ --fix --ext .js,.jsx,.tsx,.ts -f stylish --quiet",
"prettier:ci": "prettier --check ./src/",
"prettier:fix": "prettier --write ./src/",
"start": "stencil build --dev --watch --serve",

@@ -20,3 +22,3 @@ "generate": "stencil generate",

"test:watch": "stencil test --spec --e2e --watchAll",
"test:ci": "yarn eslint:ci && stencil test --spec --passWithNoTests"
"test:ci": "yarn prettier:ci && yarn eslint:ci && stencil test --spec --passWithNoTests"
},

@@ -47,14 +49,18 @@ "main": "dist/index.cjs.js",

"dependencies": {
"@stencil/core": "2.17.0"
"@stencil/core": "2.22.1"
},
"devDependencies": {
"@stencil/react-output-target": "0.3.1",
"@types/jest": "27.0.3",
"@types/puppeteer": "5.4.6",
"eslint": "8.18.0",
"jest": "27.0.3",
"jest-cli": "27.0.3",
"puppeteer": "15.0.0",
"standard-version": "9.5.0"
"@porscheofficial/eslint-config-porschedigital-react": "2.3.0",
"@porscheofficial/prettier-config-porschedigital": "2.3.0",
"@stencil/react-output-target": "0.4.0",
"@types/jest": "27.5.2",
"@types/puppeteer": "5.4.7",
"eslint": "8.32.0",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"prettier": "2.8.3",
"puppeteer": "15.5.0",
"standard-version": "9.5.0",
"typescript": "4.9.4"
}
}

@@ -1,2 +0,2 @@

export type CategoryItem = {
export interface CategoryItem {
label: string;

@@ -6,2 +6,2 @@ key: string;

description: string;
};
}

@@ -0,1 +1,2 @@

// eslint-disable-next-line import/extensions, import/no-unresolved
export * from "./components";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc