@naturalcycles/internal-web-lib 1.5.0 → 1.6.0
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/bundle/analyticsClient.js +19 -19
- package/bundle/analyticsClient.js.map +1 -1
- package/bundle/conversionClient.js +17 -17
- package/bundle/conversionClient.js.map +1 -1
- package/bundle/cookieMonster.js +169 -137
- package/bundle/cookieMonster.js.map +1 -1
- package/dist/cookie-monster/css/shared-sheets.js +1 -1
- package/dist/cookie-monster/utils/translationsService.d.ts +2 -2
- package/dist/cookie-monster/utils/translationsService.js +5 -5
- package/dist/node_modules/.pnpm/{@naturalcycles_ncuikit@1.15.0_react@19.3.0_undici@8.11.2 → @naturalcycles_ncuikit@1.17.0_react@19.3.1_undici@8.12.1}/node_modules/@naturalcycles/ncuikit/dist/styles/_palette.js +1 -1
- package/package.json +2 -2
package/bundle/cookieMonster.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@naturalcycles+ncuikit@1.
|
|
1
|
+
//#region ../../node_modules/.pnpm/@naturalcycles+ncuikit@1.17.0_react@19.3.1_undici@8.12.1/node_modules/@naturalcycles/ncuikit/dist/styles/_palette.css?inline
|
|
2
2
|
var e = ":root{--color-purple-200:#f8f2f7;--color-purple-300:#edc4e6;--color-purple-400:#c377b4;--color-purple-500:#72035d;--color-purple-600:#560246;--color-purple-700:#3c0231;--color-purple-1000:#310629;--color-lavender-300:#ffcbff;--color-lavender-400:#fdabf5;--color-lavender-500:#f796ee;--color-lavender-600:#f471e8;--color-neue-blue-200:#e9f3ff;--color-neue-blue-250:#c9e0fd;--color-neue-blue-300:#9cbbff;--color-neue-blue-400:#709dff;--color-neue-blue-500:#3c6df0;--color-neue-blue-600:#204cc5;--color-neue-blue-700:#2547a7;--color-raspberry-300:#febfcf;--color-raspberry-400:#ed7f9d;--color-raspberry-500:#d71c5a;--color-raspberry-600:#c90d4b;--color-ink-100:#1a1a1a0d;--color-ink-200:#1a1a1a1a;--color-ink-300:#dedede;--color-ink-400:#a3a3a3;--color-ink-500:#757575;--color-ink-600:#5f5f5f;--color-ink-1000:#1a1a1a;--color-sand-50:#fcf8f829;--color-sand-100:#fcf8f8;--color-sand-300:#f8f2f2;--color-sand-500:#f3eeee;--color-sand-600:#e2d4d4;--color-sand-700:#d1c0c0;--color-white-100:#ffffff14;--color-white-200:#ffffff29;--color-white-1000:#fff;--color-green-50:#f3f8ec1a;--color-green-100:#f3f8ec;--color-green-300:#a0c95e;--color-green-500:#87b738;--color-green-600:#658d25;--color-red-50:#fcebeb1a;--color-red-100:#fcebeb;--color-red-500:#ff7c7c;--color-red-600:#d83030;--color-orange-50:#fff4e61a;--color-orange-100:#f6d7b2;--color-orange-300:#ffa64d;--color-orange-500:#ff9000;--color-orange-700:#d16900;--color-orange-900:#65291f;--color-trackers-mood-100:#ffdf5c66;--color-trackers-mood-300:#fee996;--color-trackers-mood-500:#ffdf5c;--color-trackers-mood-600:#e0cb79;--color-trackers-pain-100:#ff9a7566;--color-trackers-pain-300:#f39ab5;--color-trackers-pain-500:#ff9a75;--color-trackers-pain-600:#d57e98;--color-trackers-pain-700:#ac2e00;--color-trackers-lifestyle-100:#a6d1a666;--color-trackers-lifestyle-300:#afd6af;--color-trackers-lifestyle-500:#a6d1a6;--color-trackers-lifestyle-600:#92b892;--color-trackers-lifestyle-700:#1a5c41;--color-trackers-external-factor-100:#ffb80066;--color-trackers-external-factor-300:#ffbf1a;--color-trackers-external-factor-500:#ffb800;--color-trackers-external-factor-600:#e0a200;--color-trackers-external-factor-700:#915f04;--color-trackers-skin-100:#ff928e66;--color-trackers-skin-300:#ff9d99;--color-trackers-skin-500:#ff928e;--color-trackers-skin-600:#e0807d;--color-trackers-skin-700:#b12a25;--color-trackers-sex-100:#fd90b466;--color-trackers-sex-300:#fd9bbc;--color-trackers-sex-500:#fd90b4;--color-trackers-sex-600:#df7f9e;--color-trackers-sex-700:#a93059;--color-trackers-tracker-500:#620d4e;--color-trackers-cervical-mucus-100:#f196e766;--color-trackers-cervical-mucus-300:#dcb2ea;--color-trackers-cervical-mucus-500:#f196e7;--color-trackers-cervical-mucus-600:#be95cc;--color-trackers-cervical-mucus-700:#8f1f83;--color-trackers-bleeding-100:#d294ef66;--color-trackers-bleeding-300:#c48fd8;--color-trackers-bleeding-500:#d294ef;--color-trackers-bleeding-600:#a673bb;--color-trackers-excluded-500:#ff736f;--color-trackers-lh-test-100:#8dbeff66;--color-trackers-lh-test-300:#98c5ff;--color-trackers-lh-test-500:#8dbeff;--color-trackers-lh-test-600:#7ca7e0;--color-trackers-lh-test-700:#16427b;--color-trackers-pregnancy-test-100:#63a4f866;--color-trackers-pregnancy-test-300:#73adf9;--color-trackers-pregnancy-test-500:#63a4f8;--color-trackers-pregnancy-test-600:#5790da;--color-trackers-pregnancy-test-700:#16427b;--color-trackers-sensitive-500:#e2d4d4;--color-trackers-sleep-100:#abb1d266;--color-trackers-sleep-300:#d1d5e6;--color-trackers-sleep-500:#abb1d2;--color-trackers-sleep-600:#8c91ad;--color-trackers-sleep-700:#4d5478;--color-trackers-breastfeeding-100:#ffcdd366;--color-trackers-breastfeeding-300:#ffd2d7;--color-trackers-breastfeeding-500:#ffcdd3;--color-trackers-breastfeeding-600:#e0b4ba;--color-trackers-breastfeeding-700:#8f343f;--color-trackers-bottle-feeding-100:#72d6c466;--color-trackers-bottle-feeding-300:#80daca;--color-trackers-bottle-feeding-500:#72d6c4;--color-trackers-bottle-feeding-600:#64bcac;--color-trackers-bottle-feeding-700:#005a46;--color-trackers-pumping-100:#ffb80066;--color-trackers-pumping-300:#ffbf1a;--color-trackers-pumping-500:#ffb800;--color-trackers-pumping-600:#e0a200;--color-trackers-pumping-700:#915f04;--color-pale-purple-300:#512d4a;--color-pale-purple-500:#4a2d47;--color-pale-purple-700:#411a3a;--color-fertility-red-50:#f33b6e80;--color-fertility-red-100:#f3b6c7;--color-fertility-red-200:#f590ad;--color-fertility-red-500:#fb7598;--color-fertility-red-800:#f15880;--color-fertility-red-900:#f74577;--color-fertility-red-1000:#f33b6e;--color-fertility-grey-500:#e8d2c6;--color-fertility-lavender-100:#f3e6f9;--color-fertility-lavender-500:#d294ef;--color-fertility-blue-500:#63a4f8;--color-fertility-green-600:#3ed08e}", t = "@font-face{font-family:Open Sauce One;font-display:swap;src:url(/fonts/opensauce/one/OpenSauceOne-Regular.woff2)format(\"woff2\");font-weight:400;font-style:normal}@font-face{font-family:Open Sauce One;font-display:swap;src:url(/fonts/opensauce/one/OpenSauceOne-Medium.woff2)format(\"woff2\");font-weight:500;font-style:normal}@font-face{font-family:Open Sauce One;font-display:swap;src:url(/fonts/opensauce/one/OpenSauceOne-Bold.woff2)format(\"woff2\");font-weight:600;font-style:normal}@font-face{font-family:Open Sauce One;font-display:swap;src:url(/fonts/opensauce/one/OpenSauceOne-ExtraBold.woff2)format(\"woff2\");font-weight:800;font-style:normal}", n = "*{box-sizing:border-box;margin:0;padding:0;font-family:Open Sauce One,sans-serif;line-height:150%}";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/cookie-monster/css/shared-sheets.ts
|
|
@@ -18,62 +18,74 @@ var i = r(e.replaceAll(":root", ":host")), a = r(n), o = r(t), s = "data:image/s
|
|
|
18
18
|
return e.explicit = "explicit", e.gpc = "gpc", e;
|
|
19
19
|
}({}), p = Object.keys;
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/@naturalcycles+js-lib@15.93.
|
|
21
|
+
//#region ../../node_modules/.pnpm/@naturalcycles+js-lib@15.93.1_undici@8.12.1/node_modules/@naturalcycles/js-lib/dist/env.js
|
|
22
22
|
function m() {
|
|
23
|
-
return !
|
|
23
|
+
return !ee();
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ee() {
|
|
26
26
|
return typeof window < "u" && !!window?.document;
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region ../shared/dist/lang/langService.js
|
|
30
|
-
var
|
|
30
|
+
var h;
|
|
31
31
|
(function(e) {
|
|
32
32
|
e.en_US = "en-US", e.en_GB = "en-GB", e.es_US = "es-US", e.pt_BR = "pt-BR", e.sv_SE = "sv-SE", e.en_CA = "en-CA", e.de_DE = "de-DE", e.fr_FR = "fr-FR", e.it_IT = "it-IT", e.is_IS = "is-IS", e.da_DK = "da-DK", e.nl_NL = "nl-NL", e.no_NO = "no-NO", e.fi_FI = "fi-FI", e.el_GR = "el-GR", e.hr_HR = "hr-HR", e.ro_RO = "ro-RO", e.cs_CZ = "cs-CZ", e.sk_SK = "sk-SK", e.sl_SI = "sl-SI";
|
|
33
|
-
})(
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
], y =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
|
|
76
|
-
|
|
33
|
+
})(h ||= {});
|
|
34
|
+
var g = h.en_US, _ = [
|
|
35
|
+
h.en_US,
|
|
36
|
+
h.en_GB,
|
|
37
|
+
h.es_US,
|
|
38
|
+
h.pt_BR,
|
|
39
|
+
h.sv_SE,
|
|
40
|
+
h.de_DE,
|
|
41
|
+
h.fr_FR,
|
|
42
|
+
h.it_IT,
|
|
43
|
+
h.is_IS,
|
|
44
|
+
h.da_DK,
|
|
45
|
+
h.nl_NL,
|
|
46
|
+
h.no_NO,
|
|
47
|
+
h.fi_FI,
|
|
48
|
+
h.el_GR,
|
|
49
|
+
h.hr_HR,
|
|
50
|
+
h.ro_RO,
|
|
51
|
+
h.cs_CZ,
|
|
52
|
+
h.sk_SK,
|
|
53
|
+
h.sl_SI
|
|
54
|
+
], v = _, y = [..._, h.en_CA], b = [..._, h.en_CA], x = [
|
|
55
|
+
h.en_US,
|
|
56
|
+
h.en_GB,
|
|
57
|
+
h.de_DE,
|
|
58
|
+
h.fr_FR,
|
|
59
|
+
h.es_US,
|
|
60
|
+
h.it_IT,
|
|
61
|
+
h.pt_BR,
|
|
62
|
+
h.sv_SE,
|
|
63
|
+
h.fi_FI,
|
|
64
|
+
h.da_DK,
|
|
65
|
+
h.no_NO
|
|
66
|
+
], te = {
|
|
67
|
+
[h.pt_BR]: "Português",
|
|
68
|
+
[h.en_US]: "English (US)",
|
|
69
|
+
[h.en_GB]: "English (GB)",
|
|
70
|
+
[h.sv_SE]: "Svenska",
|
|
71
|
+
[h.es_US]: "Español",
|
|
72
|
+
[h.en_CA]: "English (CA)",
|
|
73
|
+
[h.de_DE]: "Deutsch",
|
|
74
|
+
[h.fr_FR]: "Français",
|
|
75
|
+
[h.it_IT]: "Italiano",
|
|
76
|
+
[h.is_IS]: "Íslenska",
|
|
77
|
+
[h.da_DK]: "Dansk",
|
|
78
|
+
[h.nl_NL]: "Nederlands",
|
|
79
|
+
[h.no_NO]: "Norsk",
|
|
80
|
+
[h.fi_FI]: "Suomi",
|
|
81
|
+
[h.el_GR]: "Ελληνικά",
|
|
82
|
+
[h.hr_HR]: "Hrvatski",
|
|
83
|
+
[h.ro_RO]: "Română",
|
|
84
|
+
[h.cs_CZ]: "Čeština",
|
|
85
|
+
[h.sk_SK]: "Slovenčina",
|
|
86
|
+
[h.sl_SI]: "Slovenščina"
|
|
87
|
+
}, S = v.map((e) => ({
|
|
88
|
+
label: te[e],
|
|
77
89
|
value: e
|
|
78
90
|
})).concat([
|
|
79
91
|
{
|
|
@@ -105,16 +117,18 @@ var _ = g.en_US, v = [
|
|
|
105
117
|
value: "pl-PL"
|
|
106
118
|
}
|
|
107
119
|
]), C = /* @__PURE__ */ new Set([
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
h.de_DE,
|
|
121
|
+
h.es_US,
|
|
122
|
+
h.fr_FR,
|
|
123
|
+
h.it_IT,
|
|
124
|
+
h.pt_BR,
|
|
125
|
+
h.sv_SE
|
|
114
126
|
]), w = new class {
|
|
115
|
-
LANG_DEFAULT =
|
|
116
|
-
SUPPORTED_APP_LANGUAGES =
|
|
117
|
-
SUPPORTED_WEBSIGNUP_LANGUAGES =
|
|
127
|
+
LANG_DEFAULT = g;
|
|
128
|
+
SUPPORTED_APP_LANGUAGES = v;
|
|
129
|
+
SUPPORTED_WEBSIGNUP_LANGUAGES = y;
|
|
130
|
+
SUPPORTED_NCWEB_LANGUAGES = b;
|
|
131
|
+
SUPPORTED_COOKIE_MONSTER_LANGUAGES = x;
|
|
118
132
|
SUPPORTED_HELP_CENTER_LANGUAGES = C;
|
|
119
133
|
SUPPORTED_WEBSIGNUP_CONSENT_LANGUAGE_OPTIONS = S;
|
|
120
134
|
normalizeLang(e) {
|
|
@@ -123,23 +137,41 @@ var _ = g.en_US, v = [
|
|
|
123
137
|
return e.length < 5 ? t : [t, e.slice(3, 5).toUpperCase()].join("-");
|
|
124
138
|
}
|
|
125
139
|
toSupportedLang(e) {
|
|
126
|
-
return this.toSupportedLangOrUndefined(e) ||
|
|
140
|
+
return this.toSupportedLangOrUndefined(e) || g;
|
|
127
141
|
}
|
|
128
142
|
toSupportedLangOrUndefined(e) {
|
|
129
143
|
if (!e || e.length < 2) return;
|
|
130
144
|
let [t, n] = this.getLangStringParts(e);
|
|
131
|
-
return this.getMatchingLangOrUndefined(t, n,
|
|
145
|
+
return this.getMatchingLangOrUndefined(t, n, _);
|
|
146
|
+
}
|
|
147
|
+
toAppLang(e) {
|
|
148
|
+
return this.toAppLangOrUndefined(e) || g;
|
|
149
|
+
}
|
|
150
|
+
toAppLangOrUndefined(e) {
|
|
151
|
+
if (!e || e.length < 2) return;
|
|
152
|
+
let [t, n] = this.getLangStringParts(e);
|
|
153
|
+
return this.getMatchingLangOrUndefined(t, n, v);
|
|
132
154
|
}
|
|
133
155
|
toWebsignupLang(e) {
|
|
134
|
-
return this.toWebsignupLangOrUndefined(e) ||
|
|
156
|
+
return this.toWebsignupLangOrUndefined(e) || g;
|
|
135
157
|
}
|
|
136
158
|
toWebsignupLangOrUndefined(e) {
|
|
137
159
|
if (!e || e.length < 2) return;
|
|
138
160
|
let [t, n] = this.getLangStringParts(e);
|
|
139
|
-
return this.getMatchingLangOrUndefined(t, n,
|
|
161
|
+
return this.getMatchingLangOrUndefined(t, n, y);
|
|
140
162
|
}
|
|
141
163
|
toNCWebLangOrUndefined(e) {
|
|
142
|
-
|
|
164
|
+
if (!e || e.length < 2) return;
|
|
165
|
+
let [t, n] = this.getLangStringParts(e);
|
|
166
|
+
return this.getMatchingLangOrUndefined(t, n, b);
|
|
167
|
+
}
|
|
168
|
+
toCookieMonsterLangOrUndefined(e) {
|
|
169
|
+
if (!e || e.length < 2) return;
|
|
170
|
+
let [t, n] = this.getLangStringParts(e);
|
|
171
|
+
return this.getMatchingLangOrUndefined(t, n, x);
|
|
172
|
+
}
|
|
173
|
+
isEnglish(e) {
|
|
174
|
+
return e?.slice(0, 2).toLowerCase() === "en";
|
|
143
175
|
}
|
|
144
176
|
getLangStringParts(e) {
|
|
145
177
|
return [e.slice(0, 2).toLowerCase(), e.slice(3, 5).toUpperCase()];
|
|
@@ -216,7 +248,7 @@ var _ = g.en_US, v = [
|
|
|
216
248
|
"heading-cookies-privacy": "Deine Privatsphäre ist uns wichtig.",
|
|
217
249
|
"heading-manage-cookie-settings": "Cookie-Einstellungen verwalten:",
|
|
218
250
|
"text-cookies-usage": "Wir verwenden Cookies, um den Datenverkehr zu analysieren sowie Inhalte und Anzeigen zu personalisieren. Du hast die Kontrolle und kannst die Einstellungen unten oder jederzeit in unserer {{ cookiePolicyLink }} verwalten."
|
|
219
|
-
},
|
|
251
|
+
}, O = {
|
|
220
252
|
"button-back": "Back",
|
|
221
253
|
"button-cookie-policy": "Cookie Policy",
|
|
222
254
|
"button-cookies-accept": "Accept all",
|
|
@@ -234,7 +266,7 @@ var _ = g.en_US, v = [
|
|
|
234
266
|
"heading-cookies-privacy": "Your privacy matters to us.",
|
|
235
267
|
"heading-manage-cookie-settings": "Manage cookie settings:",
|
|
236
268
|
"text-cookies-usage": "While we use cookies to analyze traffic and personalize content and ads, you are in control and can manage settings below or anytime in our {{ cookiePolicyLink }}."
|
|
237
|
-
},
|
|
269
|
+
}, k = {
|
|
238
270
|
"button-back": "Back",
|
|
239
271
|
"button-cookie-policy": "Cookie Policy",
|
|
240
272
|
"button-cookies-accept": "Accept all",
|
|
@@ -252,7 +284,7 @@ var _ = g.en_US, v = [
|
|
|
252
284
|
"heading-cookies-privacy": "Your privacy matters to us.",
|
|
253
285
|
"heading-manage-cookie-settings": "Manage cookie settings:",
|
|
254
286
|
"text-cookies-usage": "While we use cookies to analyze traffic and personalize content and ads, you are in control and can manage settings below or anytime in our {{ cookiePolicyLink }}."
|
|
255
|
-
},
|
|
287
|
+
}, A = {
|
|
256
288
|
"button-back": "Atrás",
|
|
257
289
|
"button-cookie-policy": "Política de cookies",
|
|
258
290
|
"button-cookies-accept": "Aceptar todo",
|
|
@@ -270,7 +302,7 @@ var _ = g.en_US, v = [
|
|
|
270
302
|
"heading-cookies-privacy": "Tu privacidad nos importa.",
|
|
271
303
|
"heading-manage-cookie-settings": "Administrar configuración de cookies:",
|
|
272
304
|
"text-cookies-usage": "Aunque usamos cookies para analizar el tráfico y personalizar el contenido y los anuncios, tú tienes el control y puedes gestionar la configuración abajo o en cualquier momento en nuestra {{ cookiePolicyLink }}."
|
|
273
|
-
},
|
|
305
|
+
}, ne = {
|
|
274
306
|
"button-back": "Takaisin",
|
|
275
307
|
"button-cookie-policy": "Evästekäytäntö",
|
|
276
308
|
"button-cookies-accept": "Hyväksy kaikki",
|
|
@@ -288,7 +320,7 @@ var _ = g.en_US, v = [
|
|
|
288
320
|
"heading-cookies-privacy": "Yksityisyytesi on meille tärkeää.",
|
|
289
321
|
"heading-manage-cookie-settings": "Evästeasetusten hallinta:",
|
|
290
322
|
"text-cookies-usage": "Käytämme evästeitä liikenteen analysointiin sekä sisällön ja mainosten personointiin. Voit hallita asetuksia alla tai milloin tahansa {{ cookiePolicyLink }}-sivullamme."
|
|
291
|
-
},
|
|
323
|
+
}, re = {
|
|
292
324
|
"button-back": "Retour",
|
|
293
325
|
"button-cookie-policy": "Politique en matière de cookies",
|
|
294
326
|
"button-cookies-accept": "Tout accepter",
|
|
@@ -306,7 +338,7 @@ var _ = g.en_US, v = [
|
|
|
306
338
|
"heading-cookies-privacy": "Votre confidentialité nous tient à cœur.",
|
|
307
339
|
"heading-manage-cookie-settings": "Gérer les paramètres des cookies:",
|
|
308
340
|
"text-cookies-usage": "Nous utilisons des cookies pour analyser le trafic, personnaliser le contenu et les publicités, mais vous gardez le contrôle et pouvez gérer vos préférences ci-dessous ou à tout moment dans notre {{ cookiePolicyLink }}."
|
|
309
|
-
},
|
|
341
|
+
}, ie = {
|
|
310
342
|
"button-back": "Indietro",
|
|
311
343
|
"button-cookie-policy": "Cookie Policy",
|
|
312
344
|
"button-cookies-accept": "Accetta tutto",
|
|
@@ -324,7 +356,7 @@ var _ = g.en_US, v = [
|
|
|
324
356
|
"heading-cookies-privacy": "La tua privacy per noi è importante.",
|
|
325
357
|
"heading-manage-cookie-settings": "Gestisci le impostazioni dei cookie:",
|
|
326
358
|
"text-cookies-usage": "Anche se usiamo i cookie per analizzare il traffico e personalizzare contenuti e annunci, il controllo è nelle tue mani e puoi gestire le impostazioni qui sotto o in qualsiasi momento nella nostra {{ cookiePolicyLink }}."
|
|
327
|
-
},
|
|
359
|
+
}, ae = {
|
|
328
360
|
"button-back": "Tilbake",
|
|
329
361
|
"button-cookie-policy": "Retningslinjer for informasjonskapsler",
|
|
330
362
|
"button-cookies-accept": "Godta alle",
|
|
@@ -342,7 +374,7 @@ var _ = g.en_US, v = [
|
|
|
342
374
|
"heading-cookies-privacy": "Personvernet ditt er viktig for oss.",
|
|
343
375
|
"heading-manage-cookie-settings": "Administrer informasjonskapselinnstillinger:",
|
|
344
376
|
"text-cookies-usage": "Vi bruker informasjonskapsler for å analysere trafikk og tilpasse innhold og annonser. Du har full kontroll og kan administrere innstillingene nedenfor eller når som helst i våre {{ cookiePolicyLink }}."
|
|
345
|
-
},
|
|
377
|
+
}, oe = {
|
|
346
378
|
"button-back": "Voltar",
|
|
347
379
|
"button-cookie-policy": "Política de cookies",
|
|
348
380
|
"button-cookies-accept": "Aceitar todos",
|
|
@@ -360,7 +392,7 @@ var _ = g.en_US, v = [
|
|
|
360
392
|
"heading-cookies-privacy": "Sua privacidade é importante para nós.",
|
|
361
393
|
"heading-manage-cookie-settings": "Gerenciar configurações de cookies:",
|
|
362
394
|
"text-cookies-usage": "Embora utilizemos cookies para analisar o tráfego e personalizar conteúdo e anúncios, você tem controle e pode gerenciar as configurações abaixo ou a qualquer momento em nossa {{ cookiePolicyLink }}."
|
|
363
|
-
},
|
|
395
|
+
}, se = {
|
|
364
396
|
"button-back": "Tillbaka",
|
|
365
397
|
"button-cookie-policy": "Cookiepolicy",
|
|
366
398
|
"button-cookies-accept": "Acceptera alla",
|
|
@@ -378,26 +410,26 @@ var _ = g.en_US, v = [
|
|
|
378
410
|
"heading-cookies-privacy": "Din integritet är viktig för oss.",
|
|
379
411
|
"heading-manage-cookie-settings": "Hantera cookie-inställningar:",
|
|
380
412
|
"text-cookies-usage": "Vi använder cookies för att analysera trafik och anpassa innehåll och annonser, men det är du som bestämmer och du kan hantera inställningarna nedan eller när som helst i vår {{ cookiePolicyLink }}."
|
|
381
|
-
},
|
|
382
|
-
[
|
|
383
|
-
[
|
|
384
|
-
[
|
|
385
|
-
[
|
|
386
|
-
[
|
|
387
|
-
[
|
|
388
|
-
[
|
|
389
|
-
[
|
|
390
|
-
[
|
|
391
|
-
[
|
|
392
|
-
[
|
|
413
|
+
}, j = {
|
|
414
|
+
[h.en_US]: k,
|
|
415
|
+
[h.en_GB]: O,
|
|
416
|
+
[h.de_DE]: D,
|
|
417
|
+
[h.fr_FR]: re,
|
|
418
|
+
[h.es_US]: A,
|
|
419
|
+
[h.it_IT]: ie,
|
|
420
|
+
[h.pt_BR]: oe,
|
|
421
|
+
[h.sv_SE]: se,
|
|
422
|
+
[h.fi_FI]: ne,
|
|
423
|
+
[h.da_DK]: E,
|
|
424
|
+
[h.no_NO]: ae
|
|
393
425
|
};
|
|
394
|
-
p(
|
|
395
|
-
var
|
|
396
|
-
copy =
|
|
426
|
+
p(j);
|
|
427
|
+
var M = new class {
|
|
428
|
+
copy = j[w.LANG_DEFAULT];
|
|
397
429
|
setLanguage(e) {
|
|
398
|
-
let t = w.
|
|
399
|
-
this.copy =
|
|
400
|
-
...
|
|
430
|
+
let t = w.toCookieMonsterLangOrUndefined(e) ?? w.LANG_DEFAULT, n = j[t];
|
|
431
|
+
this.copy = t !== w.LANG_DEFAULT && w.isEnglish(t) ? {
|
|
432
|
+
...j[w.LANG_DEFAULT],
|
|
401
433
|
...n
|
|
402
434
|
} : n;
|
|
403
435
|
}
|
|
@@ -408,15 +440,15 @@ var k = /* @__PURE__ */ new Set([g.en_GB, g.en_CA]), A = new class {
|
|
|
408
440
|
return r;
|
|
409
441
|
}
|
|
410
442
|
}();
|
|
411
|
-
function
|
|
412
|
-
|
|
443
|
+
function N(e) {
|
|
444
|
+
M.setLanguage(e);
|
|
413
445
|
}
|
|
414
|
-
function
|
|
415
|
-
return
|
|
446
|
+
function P(e, t) {
|
|
447
|
+
return M.tr(e, t);
|
|
416
448
|
}
|
|
417
449
|
//#endregion
|
|
418
450
|
//#region src/cookie-monster/components/setting-dropdown/setting-dropdown.component.ts
|
|
419
|
-
var
|
|
451
|
+
var F = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300);grid-template-columns:max-content 1fr;align-items:center;padding:16px 0;display:grid}:host(:last-of-type) .CookieMonster__dropdown{border-bottom:none}.CookieMonster__icon{width:24px;height:24px;margin-right:4px}.CookieMonster__icon___expanded{transform:rotate(180deg)}.CookieMonster__dropdownHeading{color:var(--color-ink-1000);align-self:center;font-size:16px;font-weight:800}.CookieMonster__dropdownContent{color:var(--color-ink-600);grid-column:1/span 2;padding-top:16px;font-size:14px;overflow-y:auto}.CookieMonster__dropdownButton{cursor:pointer;background-color:#0000;border:none;display:flex}.CookieMonster__dropdownLabel{color:var(--color-ink-600);justify-self:end;font-size:14px}input[type=checkbox]{appearance:none;border:2px solid var(--color-purple-500);cursor:pointer;border-radius:2px;justify-self:end;width:18px;height:18px;position:relative}input[type=checkbox]:checked:after{content:\"✓\";color:#fff;font-size:14px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}input[type=checkbox]:checked:not(:disabled){background-color:var(--color-purple-500);border-color:var(--color-purple-500)}input[type=checkbox]:checked:disabled{background-color:var(--color-ink-400);border-color:var(--color-ink-400)}.CookieMonster__alwaysOnGroup{justify-content:flex-end;align-items:center;gap:8px;display:flex}::slotted(a){color:var(--color-neue-blue-500)}"), I = class extends HTMLElement {
|
|
420
452
|
root;
|
|
421
453
|
dropdown;
|
|
422
454
|
button;
|
|
@@ -430,7 +462,7 @@ var N = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300)
|
|
|
430
462
|
i,
|
|
431
463
|
a,
|
|
432
464
|
o,
|
|
433
|
-
|
|
465
|
+
F
|
|
434
466
|
], this.dropdown = document.createElement("div"), this.dropdown.classList.add("CookieMonster__dropdown");
|
|
435
467
|
let e = document.createElement("button");
|
|
436
468
|
e.setAttribute("uid", `cm-dropdown-btn-${this.uid}`), e.classList.add("CookieMonster__dropdownButton"), e.setAttribute("aria-expanded", "false"), e.setAttribute("aria-controls", "content"), e.type = "button", this.button = e;
|
|
@@ -463,7 +495,7 @@ var N = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300)
|
|
|
463
495
|
if (e === "always-on" && n !== null) {
|
|
464
496
|
this.checkbox.checked = !0, this.checkbox.disabled = !0;
|
|
465
497
|
let e = document.createElement("p");
|
|
466
|
-
e.textContent =
|
|
498
|
+
e.textContent = P("dropdown-always-on-warning"), e.classList.add("CookieMonster__dropdownLabel");
|
|
467
499
|
let t = document.createElement("div");
|
|
468
500
|
t.classList.add("CookieMonster__alwaysOnGroup"), this.checkbox.replaceWith(t), t.append(e, this.checkbox);
|
|
469
501
|
}
|
|
@@ -487,7 +519,7 @@ var N = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300)
|
|
|
487
519
|
isChecked() {
|
|
488
520
|
return this.checkbox.checked;
|
|
489
521
|
}
|
|
490
|
-
},
|
|
522
|
+
}, L = r(".CookieMonster__button{text-align:center;white-space:nowrap;cursor:pointer;background-color:#0000;border:none;border-radius:28px;justify-content:center;align-items:center;gap:4px;width:100%;padding:8px 16px;font-size:14px;font-style:normal;line-height:100%;display:flex}.CookieMonster__button___primary{border:1px solid var(--color-purple-500);background-color:var(--color-purple-500);color:var(--color-white-1000)}.CookieMonster__button___secondary{border:1px solid var(--color-purple-500);color:var(--color-purple-500)}"), R = class extends HTMLElement {
|
|
491
523
|
root;
|
|
492
524
|
button;
|
|
493
525
|
constructor() {
|
|
@@ -495,7 +527,7 @@ var N = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300)
|
|
|
495
527
|
i,
|
|
496
528
|
a,
|
|
497
529
|
o,
|
|
498
|
-
|
|
530
|
+
L
|
|
499
531
|
], this.button = document.createElement("button"), this.button.classList.add("CookieMonster__button"), this.button.innerHTML = "<slot></slot>", this.root.append(this.button);
|
|
500
532
|
}
|
|
501
533
|
static get observedAttributes() {
|
|
@@ -506,16 +538,16 @@ var N = r(".CookieMonster__dropdown{border-bottom:1px solid var(--color-ink-300)
|
|
|
506
538
|
}
|
|
507
539
|
};
|
|
508
540
|
l.cookieMonsterOnMount, l.cookieMonsterOnDisplay, l.cookieMonsterOnClose, l.cookieMonsterOnSettingsViewed, l.cookieMonsterOnBackToBanner;
|
|
509
|
-
var
|
|
541
|
+
var z = {
|
|
510
542
|
necessary: !0,
|
|
511
543
|
preferences: !1,
|
|
512
544
|
statistics: !1,
|
|
513
545
|
marketing: !1,
|
|
514
546
|
source: f.gpc
|
|
515
|
-
},
|
|
547
|
+
}, B = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.38381%208.25519C1.41634%208.33382%201.46457%208.40749%201.52849%208.4714L6.19515%2013.1381C6.4555%2013.3984%206.87761%2013.3984%207.13796%2013.1381C7.39831%2012.8777%207.39831%2012.4556%207.13796%2012.1953L3.60937%208.66666L13.9999%208.66667C14.3681%208.66667%2014.6666%208.36819%2014.6666%208C14.6666%207.63181%2014.3681%207.33333%2013.9999%207.33333L3.60937%207.33333L7.13796%203.80473C7.39831%203.54439%207.39831%203.12228%207.13796%202.86193C6.87761%202.60158%206.4555%202.60158%206.19515%202.86193L1.52849%207.52859C1.39988%207.6572%201.3348%207.82529%201.33325%207.99384'%20fill='%2372035D'/%3e%3cpath%20d='M1.38381%208.25519C1.35195%208.17837%201.33405%208.0943%201.33325%208.00615L1.38381%208.25519Z'%20fill='%2372035D'/%3e%3c/svg%3e";
|
|
516
548
|
//#endregion
|
|
517
549
|
//#region src/cookie-monster/utils/getCookieMonsterEvent.ts
|
|
518
|
-
function
|
|
550
|
+
function V(e, t) {
|
|
519
551
|
return new CustomEvent(e, {
|
|
520
552
|
detail: t,
|
|
521
553
|
bubbles: !0,
|
|
@@ -524,7 +556,7 @@ function z(e, t) {
|
|
|
524
556
|
}
|
|
525
557
|
//#endregion
|
|
526
558
|
//#region src/cookie-monster/utils/handleRootClick.ts
|
|
527
|
-
function
|
|
559
|
+
function H(e) {
|
|
528
560
|
return function(t) {
|
|
529
561
|
let n = t.target;
|
|
530
562
|
if (!n) return;
|
|
@@ -538,13 +570,13 @@ function B(e) {
|
|
|
538
570
|
}
|
|
539
571
|
//#endregion
|
|
540
572
|
//#region src/cookie-monster/utils/linkify.ts
|
|
541
|
-
function
|
|
573
|
+
function U(e) {
|
|
542
574
|
let t = document.createElement("div");
|
|
543
575
|
return t.textContent = e, t.innerHTML = t.innerHTML.replaceAll(/\bhttps?:\/\/[^\s<]+[^\s<.)\]]/g, (e) => `<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`), t.innerHTML;
|
|
544
576
|
}
|
|
545
577
|
//#endregion
|
|
546
578
|
//#region src/cookie-monster/views/views.css?inline
|
|
547
|
-
var
|
|
579
|
+
var W = ".CookieMonster__overlay{z-index:9999998;background-color:#1a1a1acc;position:fixed;inset:0}.CookieMonster__mainBanner{background-color:var(--color-white-1000);border:1px solid var(--color-ink-300);z-index:9999999;border-radius:16px 16px 0 0;padding:32px 16px 24px;position:fixed;bottom:0;left:0;right:0;overflow:hidden;box-shadow:0 10px 24px #1a1a1a29}@media only screen and (width>=768px){.CookieMonster__mainBanner{border-radius:16px;width:375px;inset:50% auto auto 50%;transform:translate(-50%,-50%)}}.CookieMonster__mainBanner[data-state=settings]{height:auto;max-height:90vh}.CookieMonster__bannerContent{display:grid}.CookieMonster__mainBanner[data-state=settings] .CookieMonster__bannerContent,settings-view{display:none}.CookieMonster__settingsContent{background-color:var(--color-purple-200);border-radius:8px;flex-direction:column;max-height:228px;margin-bottom:24px;padding:0 16px;display:flex;overflow-y:scroll}.CookieMonster__settingsHeader{flex-direction:row;justify-content:space-between;display:flex}.CookieMonster__settingActions{flex-direction:column;gap:8px;display:flex}.CookieMonster__settingActions themed-button{flex:1}.CookieMonster__mainBanner[data-state=settings] settings-view{display:block}.CookieMonster__mainHeading{color:var(--color-ink-1000);margin-bottom:12px;font-size:20px;font-weight:800}.CookieMonster__heading{color:var(--color-ink-1000);margin:0 0 24px;font-size:20px;font-weight:800}.CookieMonster__text{color:var(--color-ink-600);font-size:14px}.CookieMonster__bannerButtons{flex-direction:column;align-items:center;gap:8px;margin:16px 0 0;display:flex}.CookieMonster__bannerButtons themed-button{flex:1;width:100%}.CookieMonster__buttonLink{cursor:pointer;color:var(--color-neue-blue-500);background-color:#0000;border:none;font-size:14px;text-decoration:underline}", G = r(W), ce = class extends HTMLElement {
|
|
548
580
|
root;
|
|
549
581
|
container;
|
|
550
582
|
necessaryDropdown;
|
|
@@ -554,18 +586,18 @@ var H = ".CookieMonster__overlay{z-index:9999998;background-color:#1a1a1acc;posi
|
|
|
554
586
|
actionHandlers;
|
|
555
587
|
handleRootClick;
|
|
556
588
|
constructor() {
|
|
557
|
-
super(), this.handleBack = this.handleBack.bind(this), this.handleSaveSettings = this.handleSaveSettings.bind(this), this.root = this.attachShadow({ mode: "open" }), this.root.adoptedStyleSheets = [i,
|
|
589
|
+
super(), this.handleBack = this.handleBack.bind(this), this.handleSaveSettings = this.handleSaveSettings.bind(this), this.root = this.attachShadow({ mode: "open" }), this.root.adoptedStyleSheets = [i, G], this.container = document.createElement("div"), this.container.classList.add("CookieMonster__settings"), this.container.innerHTML = `
|
|
558
590
|
<div class="CookieMonster__settingsHeader">
|
|
559
|
-
<p class="CookieMonster__heading">${
|
|
591
|
+
<p class="CookieMonster__heading">${P("heading-manage-cookie-settings")}</p>
|
|
560
592
|
</div>
|
|
561
593
|
<div class="CookieMonster__settingsContent"></div>
|
|
562
594
|
|
|
563
595
|
<div class="CookieMonster__settingActions">
|
|
564
596
|
<themed-button uid="settings-save" data-action="save" theme="primary">
|
|
565
|
-
${
|
|
597
|
+
${P("button-cookies-settings-save")}
|
|
566
598
|
</themed-button>
|
|
567
599
|
<themed-button uid="settings-back" data-action="back" theme="secondary">
|
|
568
|
-
<img src="${
|
|
600
|
+
<img src="${B}" alt="" aria-hidden="true" />${P("button-back")}
|
|
569
601
|
</themed-button>
|
|
570
602
|
</div>
|
|
571
603
|
`, this.root.append(this.container);
|
|
@@ -573,7 +605,7 @@ var H = ".CookieMonster__overlay{z-index:9999998;background-color:#1a1a1acc;posi
|
|
|
573
605
|
this.necessaryDropdown = this.createSettingsDropdown("necessary", "dropdown-title-necessary", "dropdown-content-necessary", !0), this.preferencesDropdown = this.createSettingsDropdown("preferences", "dropdown-title-preferences", "dropdown-content-preferences"), this.statisticsDropdown = this.createSettingsDropdown("statistics", "dropdown-title-statistics", "dropdown-content-statistics"), this.marketingDropdown = this.createSettingsDropdown("marketing", "dropdown-title-marketing", "dropdown-content-marketing"), e.append(this.necessaryDropdown, this.preferencesDropdown, this.statisticsDropdown, this.marketingDropdown), this.actionHandlers = {
|
|
574
606
|
back: this.handleBack,
|
|
575
607
|
save: this.handleSaveSettings
|
|
576
|
-
}, this.handleRootClick =
|
|
608
|
+
}, this.handleRootClick = H(this.actionHandlers);
|
|
577
609
|
}
|
|
578
610
|
connectedCallback() {
|
|
579
611
|
this.container.addEventListener("click", this.handleRootClick), this.container.addEventListener(d.DropdownOpen, (e) => {
|
|
@@ -586,11 +618,11 @@ var H = ".CookieMonster__overlay{z-index:9999998;background-color:#1a1a1acc;posi
|
|
|
586
618
|
});
|
|
587
619
|
}
|
|
588
620
|
handleBack() {
|
|
589
|
-
this.dispatchEvent(
|
|
621
|
+
this.dispatchEvent(V(l.cookieMonsterOnBackToBanner, { reason: u.BackButton }));
|
|
590
622
|
}
|
|
591
623
|
handleSaveSettings() {
|
|
592
624
|
let e = this.getConsentSettings();
|
|
593
|
-
this.dispatchEvent(
|
|
625
|
+
this.dispatchEvent(V(l.cookieMonsterOnClose, {
|
|
594
626
|
reason: u.SaveSettings,
|
|
595
627
|
consent: e
|
|
596
628
|
}));
|
|
@@ -606,18 +638,18 @@ var H = ".CookieMonster__overlay{z-index:9999998;background-color:#1a1a1acc;posi
|
|
|
606
638
|
}
|
|
607
639
|
createSettingsDropdown(e, t, n, r) {
|
|
608
640
|
let i = document.createElement("setting-dropdown");
|
|
609
|
-
return i.setAttribute("uid", e), i.setAttribute("title",
|
|
641
|
+
return i.setAttribute("uid", e), i.setAttribute("title", P(t)), i.innerHTML = U(P(n)), r && i.setAttribute("always-on", ""), i;
|
|
610
642
|
}
|
|
611
643
|
};
|
|
612
644
|
//#endregion
|
|
613
645
|
//#region src/cookie-monster/utils/createButton.ts
|
|
614
|
-
function
|
|
646
|
+
function K(e, t, n, r) {
|
|
615
647
|
let i = document.createElement("themed-button");
|
|
616
648
|
return i.setAttribute("uid", e), i.dataset.action = t, i.setAttribute("theme", n), i.textContent = r, i;
|
|
617
649
|
}
|
|
618
650
|
//#endregion
|
|
619
651
|
//#region src/cookie-monster/views/main.view.ts
|
|
620
|
-
var le = r(
|
|
652
|
+
var le = r(W), ue = class extends HTMLElement {
|
|
621
653
|
state = c.banner;
|
|
622
654
|
root;
|
|
623
655
|
mainBanner;
|
|
@@ -633,12 +665,12 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
633
665
|
o,
|
|
634
666
|
le
|
|
635
667
|
];
|
|
636
|
-
let e =
|
|
668
|
+
let e = K("accept-all", "acceptAll", "primary", P("button-cookies-accept")), t = K("open-settings", "settings", "secondary", P("button-manage-cookies")), n = document.createElement("div");
|
|
637
669
|
n.className = "CookieMonster__bannerButtons", n.append(e, t);
|
|
638
670
|
let r = document.createElement("h1");
|
|
639
|
-
r.className = "CookieMonster__mainHeading", r.textContent =
|
|
671
|
+
r.className = "CookieMonster__mainHeading", r.textContent = P("heading-cookies-privacy"), this.heading = r;
|
|
640
672
|
let s = document.createElement("p");
|
|
641
|
-
s.className = "CookieMonster__text", s.innerHTML =
|
|
673
|
+
s.className = "CookieMonster__text", s.innerHTML = P("text-cookies-usage", { cookiePolicyLink: `<a uid="cookie-policy" href="https://www.naturalcycles.com/other/legal/cookies" target="_blank" rel="noopener noreferrer" class="CookieMonster__buttonLink">${P("button-cookie-policy")}</a>` }), this.text = s;
|
|
642
674
|
let c = document.createElement("settings-view");
|
|
643
675
|
this.settings = c;
|
|
644
676
|
let l = document.createElement("div");
|
|
@@ -649,7 +681,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
649
681
|
d.className = "CookieMonster__overlay", d.setAttribute("uid", "cookie-overlay"), this.root.append(d, u), this.actionHandlers = {
|
|
650
682
|
acceptAll: this.handleAcceptAll,
|
|
651
683
|
settings: this.handleOpenSettings
|
|
652
|
-
}, this.handleRootClick =
|
|
684
|
+
}, this.handleRootClick = H(this.actionHandlers);
|
|
653
685
|
}
|
|
654
686
|
connectedCallback() {
|
|
655
687
|
this.setupBannerButtons(), this.setupChildViewListeners(), this.updateView();
|
|
@@ -672,7 +704,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
672
704
|
});
|
|
673
705
|
}
|
|
674
706
|
handleOpenSettings() {
|
|
675
|
-
this.setState(c.settings), this.dispatchEvent(
|
|
707
|
+
this.setState(c.settings), this.dispatchEvent(V(l.cookieMonsterOnSettingsViewed, { reason: u.OpenSettings }));
|
|
676
708
|
}
|
|
677
709
|
handleAcceptAll() {
|
|
678
710
|
let e = {
|
|
@@ -682,7 +714,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
682
714
|
marketing: !0,
|
|
683
715
|
source: f.explicit
|
|
684
716
|
};
|
|
685
|
-
this.dispatchEvent(
|
|
717
|
+
this.dispatchEvent(V(l.cookieMonsterOnClose, {
|
|
686
718
|
reason: u.AcceptAll,
|
|
687
719
|
consent: e
|
|
688
720
|
}));
|
|
@@ -693,7 +725,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
693
725
|
updateView() {
|
|
694
726
|
this.mainBanner.dataset.state = this.state;
|
|
695
727
|
}
|
|
696
|
-
}, de = r(
|
|
728
|
+
}, de = r(W), q = class e extends HTMLElement {
|
|
697
729
|
root;
|
|
698
730
|
container;
|
|
699
731
|
mainView;
|
|
@@ -716,14 +748,14 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
716
748
|
return t ||= document.createElement("cookie-monster"), e && t.setAttribute("language", e), t.isConnected || document.body.append(t), t;
|
|
717
749
|
}
|
|
718
750
|
constructor() {
|
|
719
|
-
super(),
|
|
751
|
+
super(), N(this.getAttribute("language") || w.LANG_DEFAULT), this.root = this.attachShadow({ mode: "open" }), this.root.adoptedStyleSheets = [
|
|
720
752
|
i,
|
|
721
753
|
a,
|
|
722
754
|
de
|
|
723
755
|
], this.container = document.createElement("div"), this.container.id = "CookieMonster", this.container.setAttribute("uid", "cookiemonster"), this.root.append(this.container), this.mainView = document.createElement("main-view"), this.container.append(this.mainView);
|
|
724
756
|
}
|
|
725
757
|
connectedCallback() {
|
|
726
|
-
|
|
758
|
+
N(this.getAttribute("language") || w.LANG_DEFAULT), this.replaceMainView(), this.dispatchEvent(V(l.cookieMonsterOnMount)), this.attributeChangedCallback("display", null, this.getAttribute("display")), this.addEventListener(l.cookieMonsterOnClose, this.handleFinalDecision);
|
|
727
759
|
}
|
|
728
760
|
static get observedAttributes() {
|
|
729
761
|
return ["display", "language"];
|
|
@@ -731,11 +763,11 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
731
763
|
attributeChangedCallback(e, t, n) {
|
|
732
764
|
if (e === "display") {
|
|
733
765
|
let e = n !== null && n !== "false";
|
|
734
|
-
this.container.style.display = e ? "block" : "none", e ? this.lockScroll() : this.unlockScroll(), this.dispatchEvent(
|
|
766
|
+
this.container.style.display = e ? "block" : "none", e ? this.lockScroll() : this.unlockScroll(), this.dispatchEvent(V(l.cookieMonsterOnDisplay, { display: e }));
|
|
735
767
|
}
|
|
736
768
|
if (e === "language") {
|
|
737
769
|
if (t === n) return;
|
|
738
|
-
|
|
770
|
+
N(n || w.LANG_DEFAULT), this.replaceMainView();
|
|
739
771
|
}
|
|
740
772
|
}
|
|
741
773
|
disconnectedCallback() {
|
|
@@ -763,9 +795,9 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
763
795
|
let e = document.createElement("main-view");
|
|
764
796
|
this.mainView.replaceWith(e), this.mainView = e;
|
|
765
797
|
}
|
|
766
|
-
},
|
|
798
|
+
}, J = "CookieConsent", fe = 365, Y = "CookieMonsterConsentLog", X = new class {
|
|
767
799
|
readConsentCookie() {
|
|
768
|
-
let e = T.getCookie(
|
|
800
|
+
let e = T.getCookie(J);
|
|
769
801
|
if (e) try {
|
|
770
802
|
return JSON.parse(e);
|
|
771
803
|
} catch {
|
|
@@ -773,7 +805,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
773
805
|
}
|
|
774
806
|
}
|
|
775
807
|
writeConsentCookie(e, t) {
|
|
776
|
-
t && T.deleteCookie(
|
|
808
|
+
t && T.deleteCookie(J), T.setCookie(J, JSON.stringify(e), fe, t);
|
|
777
809
|
}
|
|
778
810
|
getConsentLogEntries() {
|
|
779
811
|
try {
|
|
@@ -797,7 +829,7 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
797
829
|
this.versionProvider = e;
|
|
798
830
|
}
|
|
799
831
|
initConsent(e) {
|
|
800
|
-
m() || this.initialized || (this.initialized = !0, this.domain = e?.domain, this.isGpcActive() && this.persistConsent({ ...
|
|
832
|
+
m() || this.initialized || (this.initialized = !0, this.domain = e?.domain, this.isGpcActive() && this.persistConsent({ ...z }, e?.domain, void 0), globalThis.addEventListener(l.cookieMonsterOnClose, this.handleClose), X.readConsentCookie() || q.open({ language: e?.language }));
|
|
801
833
|
}
|
|
802
834
|
teardownConsent() {
|
|
803
835
|
m() || (globalThis.removeEventListener(l.cookieMonsterOnClose, this.handleClose), this.initialized = !1, this.domain = void 0);
|
|
@@ -830,21 +862,21 @@ var le = r(H), ue = class extends HTMLElement {
|
|
|
830
862
|
getBannerText() {
|
|
831
863
|
return document.querySelector("cookie-monster")?.getBannerText();
|
|
832
864
|
}
|
|
833
|
-
}(),
|
|
865
|
+
}(), pe = class {
|
|
834
866
|
register(e) {
|
|
835
|
-
$("cookie-monster",
|
|
867
|
+
$("cookie-monster", q), $("main-view", ue), $("settings-view", ce), $("setting-dropdown", I), $("themed-button", R), Z.setVersionProvider(Q), Z.initConsent(e);
|
|
836
868
|
}
|
|
837
869
|
unregister() {
|
|
838
870
|
Z.teardownConsent();
|
|
839
871
|
}
|
|
840
872
|
open(e) {
|
|
841
|
-
|
|
873
|
+
q.open(e);
|
|
842
874
|
}
|
|
843
875
|
openSettings() {
|
|
844
|
-
|
|
876
|
+
q.open({ view: c.settings });
|
|
845
877
|
}
|
|
846
878
|
close() {
|
|
847
|
-
|
|
879
|
+
q.close();
|
|
848
880
|
}
|
|
849
881
|
getConsent() {
|
|
850
882
|
return Z.getConsent();
|
|
@@ -862,8 +894,8 @@ function Q() {
|
|
|
862
894
|
function $(e, t) {
|
|
863
895
|
globalThis.customElements && (globalThis.customElements.get(e) || globalThis.customElements.define(e, t));
|
|
864
896
|
}
|
|
865
|
-
var
|
|
866
|
-
globalThis.cookieMonsterService =
|
|
897
|
+
var me = new pe();
|
|
898
|
+
globalThis.cookieMonsterService = me, document.dispatchEvent(new CustomEvent("CookieMonsterReady"));
|
|
867
899
|
//#endregion
|
|
868
900
|
|
|
869
901
|
//# sourceMappingURL=cookieMonster.js.map
|