lineas-romero-cookies-consent 1.1.2 → 1.1.4
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.
|
@@ -1,47 +1,50 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const C = "CookieConsent";
|
|
2
|
+
function y(o) {
|
|
3
3
|
if (!o || typeof o != "object")
|
|
4
4
|
throw new Error("initCookieConsent(config): config is required");
|
|
5
5
|
const e = Array.isArray(o.categories) ? o.categories : [];
|
|
6
6
|
if (e.length === 0)
|
|
7
7
|
throw new Error("initCookieConsent(config): config.categories is required");
|
|
8
|
-
const t = e.map((
|
|
9
|
-
if (!
|
|
8
|
+
const t = e.map((i) => {
|
|
9
|
+
if (!i || typeof i != "object")
|
|
10
10
|
throw new Error("initCookieConsent(config): invalid category");
|
|
11
|
-
if (!
|
|
11
|
+
if (!i.id)
|
|
12
12
|
throw new Error("initCookieConsent(config): category.id is required");
|
|
13
13
|
return {
|
|
14
|
-
id: String(
|
|
15
|
-
label:
|
|
16
|
-
description:
|
|
17
|
-
enabled: !!
|
|
18
|
-
readonly: !!
|
|
19
|
-
cookiePatterns: Array.isArray(
|
|
14
|
+
id: String(i.id),
|
|
15
|
+
label: i.label ? String(i.label) : String(i.id),
|
|
16
|
+
description: i.description ? String(i.description) : "",
|
|
17
|
+
enabled: !!i.enabled,
|
|
18
|
+
readonly: !!i.readonly,
|
|
19
|
+
cookiePatterns: Array.isArray(i.cookiePatterns) ? i.cookiePatterns.map(String) : []
|
|
20
20
|
};
|
|
21
|
-
}), n = o.cookieName ? String(o.cookieName) :
|
|
21
|
+
}), n = o.cookieName ? String(o.cookieName) : C, a = Number.isFinite(o.cookieExpiresDays) ? Number(o.cookieExpiresDays) : 180;
|
|
22
22
|
return {
|
|
23
23
|
siteName: o.siteName ? String(o.siteName) : "",
|
|
24
24
|
autoClear: !!o.autoClear,
|
|
25
25
|
cookieName: n,
|
|
26
|
-
cookieExpiresDays:
|
|
26
|
+
cookieExpiresDays: a,
|
|
27
27
|
categories: t,
|
|
28
28
|
onAccept: typeof o.onAccept == "function" ? o.onAccept : null
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function P(o) {
|
|
32
32
|
const e = {};
|
|
33
33
|
for (const t of o)
|
|
34
34
|
e[t.id] = t.readonly ? !0 : !!t.enabled;
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function N(o) {
|
|
38
38
|
try {
|
|
39
39
|
return JSON.parse(decodeURIComponent(o));
|
|
40
40
|
} catch {
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function A() {
|
|
45
|
+
return "LR-" + Math.random().toString(36).substr(2, 9).toUpperCase() + "-" + Date.now().toString(36).toUpperCase();
|
|
46
|
+
}
|
|
47
|
+
function E(o) {
|
|
45
48
|
if (typeof document > "u") return null;
|
|
46
49
|
const e = document.cookie ? document.cookie.split("; ") : [];
|
|
47
50
|
for (const t of e) {
|
|
@@ -51,154 +54,178 @@ function b(o) {
|
|
|
51
54
|
}
|
|
52
55
|
return null;
|
|
53
56
|
}
|
|
54
|
-
function
|
|
57
|
+
function S(o, e, { expiresDays: t }) {
|
|
55
58
|
if (typeof document > "u") return;
|
|
56
59
|
const n = /* @__PURE__ */ new Date();
|
|
57
60
|
n.setTime(n.getTime() + t * 24 * 60 * 60 * 1e3);
|
|
58
|
-
const
|
|
59
|
-
document.cookie = `${o}=${
|
|
61
|
+
const a = encodeURIComponent(JSON.stringify(e));
|
|
62
|
+
document.cookie = `${o}=${a}; Expires=${n.toUTCString()}; Path=/; SameSite=Lax`;
|
|
60
63
|
}
|
|
61
|
-
function
|
|
64
|
+
function p(o, e) {
|
|
62
65
|
return e ? o === e ? !0 : o.startsWith(e) : !1;
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function m() {
|
|
65
68
|
return typeof document > "u" ? [] : (document.cookie ? document.cookie.split("; ") : []).map((e) => {
|
|
66
69
|
const t = e.indexOf("=");
|
|
67
70
|
return t >= 0 ? e.slice(0, t) : e;
|
|
68
71
|
}).filter(Boolean);
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function _(o) {
|
|
71
74
|
const e = /* @__PURE__ */ new Set();
|
|
72
75
|
if (!o) return Array.from(e);
|
|
73
76
|
e.add(o), o.includes(".") && e.add(`.${o}`);
|
|
74
77
|
const t = o.split(".").filter(Boolean);
|
|
75
78
|
for (let n = 1; n < t.length - 1; n += 1) {
|
|
76
|
-
const
|
|
77
|
-
e.add(
|
|
79
|
+
const a = t.slice(n).join(".");
|
|
80
|
+
e.add(a), e.add(`.${a}`);
|
|
78
81
|
}
|
|
79
82
|
return Array.from(e);
|
|
80
83
|
}
|
|
81
|
-
function
|
|
84
|
+
function g(o) {
|
|
82
85
|
if (typeof document > "u") return;
|
|
83
|
-
const e = "Thu, 01 Jan 1970 00:00:00 GMT", t = typeof location < "u" ? location.hostname : "", n =
|
|
86
|
+
const e = "Thu, 01 Jan 1970 00:00:00 GMT", t = typeof location < "u" ? location.hostname : "", n = _(t);
|
|
84
87
|
document.cookie = `${o}=; Expires=${e}; Path=/; SameSite=Lax`;
|
|
85
|
-
for (const
|
|
86
|
-
document.cookie = `${o}=; Expires=${e}; Path=/; Domain=${
|
|
88
|
+
for (const a of n)
|
|
89
|
+
document.cookie = `${o}=; Expires=${e}; Path=/; Domain=${a}; SameSite=Lax`;
|
|
87
90
|
}
|
|
88
|
-
function
|
|
91
|
+
function w(o, e) {
|
|
89
92
|
return o.find((t) => t.id === e) || null;
|
|
90
93
|
}
|
|
91
|
-
function
|
|
92
|
-
const t =
|
|
94
|
+
function D(o, e) {
|
|
95
|
+
const t = w(o, e);
|
|
93
96
|
return t ? t.cookiePatterns : [];
|
|
94
97
|
}
|
|
95
|
-
function
|
|
96
|
-
const t =
|
|
98
|
+
function h({ categories: o, allowedPreferences: e }) {
|
|
99
|
+
const t = m();
|
|
97
100
|
for (const n of o)
|
|
98
101
|
if (!e[n.id])
|
|
99
|
-
for (const
|
|
100
|
-
n.cookiePatterns.some((l) =>
|
|
102
|
+
for (const i of t)
|
|
103
|
+
n.cookiePatterns.some((l) => p(i, l)) && g(i);
|
|
101
104
|
}
|
|
102
|
-
function
|
|
105
|
+
function f(o, e) {
|
|
103
106
|
const t = {};
|
|
104
107
|
for (const n of o) {
|
|
105
|
-
const
|
|
106
|
-
t[n.id] = n.readonly ? !0 :
|
|
108
|
+
const a = e && Object.prototype.hasOwnProperty.call(e, n.id) ? !!e[n.id] : !!n.enabled;
|
|
109
|
+
t[n.id] = n.readonly ? !0 : a;
|
|
107
110
|
}
|
|
108
111
|
return t;
|
|
109
112
|
}
|
|
110
|
-
function
|
|
111
|
-
const e =
|
|
112
|
-
let
|
|
113
|
-
|
|
114
|
-
function
|
|
115
|
-
return
|
|
113
|
+
function L(o) {
|
|
114
|
+
const e = y(o), t = P(e.categories), n = E(e.cookieName), a = n ? N(n) : null;
|
|
115
|
+
let i = a && a.preferences ? f(e.categories, a.preferences) : t, c = a ? a.consentId : null, l = a ? a.updatedAt : null;
|
|
116
|
+
a && a.preferences && e.onAccept && e.onAccept({ ...i });
|
|
117
|
+
function d(r) {
|
|
118
|
+
return i = f(e.categories, r), c || (c = A()), l = (/* @__PURE__ */ new Date()).toISOString(), S(
|
|
116
119
|
e.cookieName,
|
|
117
120
|
{
|
|
118
|
-
preferences:
|
|
119
|
-
|
|
121
|
+
preferences: i,
|
|
122
|
+
consentId: c,
|
|
123
|
+
// Guardamos el ID
|
|
124
|
+
updatedAt: l,
|
|
125
|
+
// Guardamos la fecha
|
|
120
126
|
siteName: e.siteName
|
|
121
127
|
},
|
|
122
128
|
{ expiresDays: e.cookieExpiresDays }
|
|
123
|
-
), e.autoClear &&
|
|
129
|
+
), e.autoClear && h({ categories: e.categories, allowedPreferences: i }), e.onAccept && e.onAccept({ ...i }), { ...i };
|
|
124
130
|
}
|
|
125
131
|
return {
|
|
132
|
+
getConsentDetails() {
|
|
133
|
+
return {
|
|
134
|
+
consentId: c || "No registrado",
|
|
135
|
+
consentDate: l || "No registrado",
|
|
136
|
+
preferences: { ...i }
|
|
137
|
+
};
|
|
138
|
+
},
|
|
126
139
|
getConfig() {
|
|
127
140
|
return {
|
|
128
141
|
siteName: e.siteName,
|
|
129
142
|
autoClear: e.autoClear,
|
|
130
143
|
cookieName: e.cookieName,
|
|
131
144
|
cookieExpiresDays: e.cookieExpiresDays,
|
|
132
|
-
categories: e.categories.map((
|
|
145
|
+
categories: e.categories.map((r) => ({ ...r }))
|
|
133
146
|
};
|
|
134
147
|
},
|
|
135
148
|
hasStoredConsent() {
|
|
136
|
-
return !!(
|
|
149
|
+
return !!(a && a.preferences);
|
|
137
150
|
},
|
|
138
151
|
getPreferences() {
|
|
139
|
-
return { ...
|
|
152
|
+
return { ...i };
|
|
140
153
|
},
|
|
141
154
|
acceptAll() {
|
|
142
|
-
const
|
|
143
|
-
for (const
|
|
144
|
-
s
|
|
145
|
-
return
|
|
155
|
+
const r = {};
|
|
156
|
+
for (const s of e.categories)
|
|
157
|
+
r[s.id] = !0;
|
|
158
|
+
return d(r);
|
|
146
159
|
},
|
|
147
160
|
rejectAll() {
|
|
148
|
-
const
|
|
149
|
-
for (const
|
|
150
|
-
s
|
|
151
|
-
return
|
|
161
|
+
const r = {};
|
|
162
|
+
for (const s of e.categories)
|
|
163
|
+
r[s.id] = !!s.readonly;
|
|
164
|
+
return d(r);
|
|
152
165
|
},
|
|
153
|
-
setPreferences(
|
|
154
|
-
return
|
|
166
|
+
setPreferences(r) {
|
|
167
|
+
return d({ ...i, ...r || {} });
|
|
155
168
|
},
|
|
156
|
-
clearCategoryCookies(
|
|
157
|
-
const
|
|
158
|
-
for (const
|
|
159
|
-
|
|
169
|
+
clearCategoryCookies(r) {
|
|
170
|
+
const s = D(e.categories, r), k = m();
|
|
171
|
+
for (const u of k)
|
|
172
|
+
s.some((b) => p(u, b)) && g(u);
|
|
160
173
|
}
|
|
161
174
|
};
|
|
162
175
|
}
|
|
163
|
-
const
|
|
176
|
+
const I = {
|
|
164
177
|
siteName: "Lineas Romero NextJS",
|
|
165
178
|
autoClear: !0,
|
|
166
179
|
categories: [
|
|
167
180
|
{
|
|
168
181
|
id: "necessary",
|
|
169
|
-
label: "
|
|
170
|
-
description: "
|
|
182
|
+
label: "Necesario",
|
|
183
|
+
description: "Las cookies necesarias ayudan a hacer una página web utilizable activando funciones básicas como la navegación en la página y el acceso a áreas seguras de la página web.",
|
|
171
184
|
enabled: !0,
|
|
172
185
|
readonly: !0,
|
|
173
|
-
cookiePatterns: ["fh_", "fareharbor", "next-", "__Host-", "connect.sid"]
|
|
186
|
+
cookiePatterns: ["fh_", "fareharbor", "next-", "__Host-", "connect.sid", "CookieConsent", "NEXT_LOCALE"]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "preferences",
|
|
190
|
+
label: "Preferencias",
|
|
191
|
+
description: "Las cookies de preferencias permiten a la página web recordar información que cambia la forma en que la página se comporta o el aspecto que tiene.",
|
|
192
|
+
enabled: !1,
|
|
193
|
+
cookiePatterns: []
|
|
174
194
|
},
|
|
175
195
|
{
|
|
176
|
-
id: "
|
|
177
|
-
|
|
178
|
-
|
|
196
|
+
id: "statistics",
|
|
197
|
+
// Renombrado de 'analytics' a 'statistics'
|
|
198
|
+
label: "Estadística",
|
|
199
|
+
description: "Las cookies estadísticas ayudan a los propietarios de páginas web a comprender cómo interactúan los visitantes con las páginas web reuniendo información de forma anónima.",
|
|
179
200
|
enabled: !1,
|
|
180
201
|
cookiePatterns: ["_ga", "_gid", "_gat", "mc_", "metricool"]
|
|
181
202
|
},
|
|
182
203
|
{
|
|
183
204
|
id: "marketing",
|
|
184
205
|
label: "Marketing",
|
|
185
|
-
description: "
|
|
206
|
+
description: "Las cookies de marketing se utilizan para rastrear a los visitantes en las páginas web. La intención es mostrar anuncios relevantes.",
|
|
207
|
+
enabled: !1,
|
|
208
|
+
cookiePatterns: ["_fbp", "fr", "tr", "_gcl", "_gac"]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
id: "unclassified",
|
|
212
|
+
label: "No clasificadas",
|
|
213
|
+
description: "Cookies que estamos en proceso de clasificar.",
|
|
186
214
|
enabled: !1,
|
|
187
|
-
cookiePatterns: [
|
|
215
|
+
cookiePatterns: []
|
|
188
216
|
}
|
|
189
217
|
],
|
|
190
|
-
/* aqui es donde voy a inicializar los scripts de analytics y marketing, y cualquiera que sea */
|
|
191
218
|
onAccept: (o) => {
|
|
192
|
-
o.
|
|
219
|
+
o.statistics, o.marketing;
|
|
193
220
|
}
|
|
194
|
-
},
|
|
221
|
+
}, v = {
|
|
195
222
|
siteName: "Apartamentos Lineas Romero",
|
|
196
223
|
autoClear: !0,
|
|
197
224
|
categories: [
|
|
198
225
|
{
|
|
199
226
|
id: "necessary",
|
|
200
|
-
label: "
|
|
201
|
-
description: "
|
|
227
|
+
label: "Necesario",
|
|
228
|
+
description: "Las cookies necesarias ayudan a hacer una página web utilizable activando funciones básicas.",
|
|
202
229
|
enabled: !0,
|
|
203
230
|
readonly: !0,
|
|
204
231
|
cookiePatterns: [
|
|
@@ -210,46 +237,77 @@ const w = {
|
|
|
210
237
|
"__Secure-BUCKET"
|
|
211
238
|
]
|
|
212
239
|
},
|
|
240
|
+
{
|
|
241
|
+
id: "preferences",
|
|
242
|
+
label: "Preferencias",
|
|
243
|
+
description: "Permiten recordar información que cambia el aspecto o comportamiento del sitio.",
|
|
244
|
+
enabled: !1,
|
|
245
|
+
cookiePatterns: []
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
id: "statistics",
|
|
249
|
+
label: "Estadística",
|
|
250
|
+
description: "Ayudan a comprender cómo interactúan los visitantes con la web.",
|
|
251
|
+
enabled: !1,
|
|
252
|
+
cookiePatterns: ["_ga", "_gid"]
|
|
253
|
+
},
|
|
213
254
|
{
|
|
214
255
|
id: "marketing",
|
|
215
|
-
label: "Marketing
|
|
216
|
-
description: "
|
|
256
|
+
label: "Marketing",
|
|
257
|
+
description: "Se utilizan para rastrear a los visitantes y mostrar anuncios relevantes.",
|
|
217
258
|
enabled: !1,
|
|
218
259
|
cookiePatterns: ["IDE", "_gcl", "ar_debug", "SOCS", "__Secure-ENID", "NID", "1P_JAR"]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: "unclassified",
|
|
263
|
+
label: "No clasificadas",
|
|
264
|
+
description: "Cookies en proceso de clasificación.",
|
|
265
|
+
enabled: !1,
|
|
266
|
+
cookiePatterns: []
|
|
219
267
|
}
|
|
220
268
|
],
|
|
221
269
|
onAccept: (o) => {
|
|
222
270
|
o.marketing;
|
|
223
271
|
}
|
|
224
|
-
},
|
|
272
|
+
}, B = {
|
|
225
273
|
siteName: "Visit La Graciosa",
|
|
226
274
|
autoClear: !0,
|
|
227
275
|
categories: [
|
|
228
276
|
{
|
|
229
277
|
id: "necessary",
|
|
230
|
-
label: "
|
|
231
|
-
description: "
|
|
278
|
+
label: "Necesario",
|
|
279
|
+
description: "Esenciales para preferencias de idioma y funcionamiento del sitio.",
|
|
232
280
|
enabled: !0,
|
|
233
281
|
readonly: !0,
|
|
234
|
-
cookiePatterns: [
|
|
235
|
-
"pll_",
|
|
236
|
-
"session_id",
|
|
237
|
-
"PHPSESSID"
|
|
238
|
-
]
|
|
282
|
+
cookiePatterns: ["pll_", "session_id", "PHPSESSID"]
|
|
239
283
|
},
|
|
240
284
|
{
|
|
241
|
-
id: "
|
|
242
|
-
label: "
|
|
243
|
-
description: "
|
|
285
|
+
id: "preferences",
|
|
286
|
+
label: "Preferencias",
|
|
287
|
+
description: "Configuración regional e idioma.",
|
|
288
|
+
enabled: !1,
|
|
289
|
+
cookiePatterns: []
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: "statistics",
|
|
293
|
+
label: "Estadística",
|
|
294
|
+
description: "Estadísticas de uso anónimo.",
|
|
244
295
|
enabled: !1,
|
|
245
296
|
cookiePatterns: ["_ga", "_gid"]
|
|
246
297
|
},
|
|
247
298
|
{
|
|
248
299
|
id: "marketing",
|
|
249
300
|
label: "Marketing",
|
|
250
|
-
description: "
|
|
301
|
+
description: "Publicidad y seguimiento de conversiones.",
|
|
251
302
|
enabled: !1,
|
|
252
303
|
cookiePatterns: ["_gcl", "_gac"]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: "unclassified",
|
|
307
|
+
label: "No clasificadas",
|
|
308
|
+
description: "Pendientes de clasificar.",
|
|
309
|
+
enabled: !1,
|
|
310
|
+
cookiePatterns: []
|
|
253
311
|
}
|
|
254
312
|
],
|
|
255
313
|
onAccept: (o) => {
|
|
@@ -257,8 +315,8 @@ const w = {
|
|
|
257
315
|
}
|
|
258
316
|
};
|
|
259
317
|
export {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
318
|
+
L as initCookieConsent,
|
|
319
|
+
I as nextJsConfig,
|
|
320
|
+
B as visitLaGraciosaConfig,
|
|
321
|
+
v as wpApartamentosConfig
|
|
264
322
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(r=typeof globalThis<"u"?globalThis:r||self,l(r.LineasRomeroCookies={}))})(this,(function(r){"use strict";const l="CookieConsent";function b(o){if(!o||typeof o!="object")throw new Error("initCookieConsent(config): config is required");const e=Array.isArray(o.categories)?o.categories:[];if(e.length===0)throw new Error("initCookieConsent(config): config.categories is required");const i=e.map(t=>{if(!t||typeof t!="object")throw new Error("initCookieConsent(config): invalid category");if(!t.id)throw new Error("initCookieConsent(config): category.id is required");return{id:String(t.id),label:t.label?String(t.label):String(t.id),description:t.description?String(t.description):"",enabled:!!t.enabled,readonly:!!t.readonly,cookiePatterns:Array.isArray(t.cookiePatterns)?t.cookiePatterns.map(String):[]}}),n=o.cookieName?String(o.cookieName):l,a=Number.isFinite(o.cookieExpiresDays)?Number(o.cookieExpiresDays):180;return{siteName:o.siteName?String(o.siteName):"",autoClear:!!o.autoClear,cookieName:n,cookieExpiresDays:a,categories:i,onAccept:typeof o.onAccept=="function"?o.onAccept:null}}function y(o){const e={};for(const i of o)e[i.id]=i.readonly?!0:!!i.enabled;return e}function P(o){try{return JSON.parse(decodeURIComponent(o))}catch{return null}}function N(){return"LR-"+Math.random().toString(36).substr(2,9).toUpperCase()+"-"+Date.now().toString(36).toUpperCase()}function A(o){if(typeof document>"u")return null;const e=document.cookie?document.cookie.split("; "):[];for(const i of e){const n=i.indexOf("=");if((n>=0?i.slice(0,n):i)===o)return n>=0?i.slice(n+1):""}return null}function S(o,e,{expiresDays:i}){if(typeof document>"u")return;const n=new Date;n.setTime(n.getTime()+i*24*60*60*1e3);const a=encodeURIComponent(JSON.stringify(e));document.cookie=`${o}=${a}; Expires=${n.toUTCString()}; Path=/; SameSite=Lax`}function p(o,e){return e?o===e?!0:o.startsWith(e):!1}function m(){return typeof document>"u"?[]:(document.cookie?document.cookie.split("; "):[]).map(e=>{const i=e.indexOf("=");return i>=0?e.slice(0,i):e}).filter(Boolean)}function E(o){const e=new Set;if(!o)return Array.from(e);e.add(o),o.includes(".")&&e.add(`.${o}`);const i=o.split(".").filter(Boolean);for(let n=1;n<i.length-1;n+=1){const a=i.slice(n).join(".");e.add(a),e.add(`.${a}`)}return Array.from(e)}function g(o){if(typeof document>"u")return;const e="Thu, 01 Jan 1970 00:00:00 GMT",i=typeof location<"u"?location.hostname:"",n=E(i);document.cookie=`${o}=; Expires=${e}; Path=/; SameSite=Lax`;for(const a of n)document.cookie=`${o}=; Expires=${e}; Path=/; Domain=${a}; SameSite=Lax`}function _(o,e){return o.find(i=>i.id===e)||null}function w(o,e){const i=_(o,e);return i?i.cookiePatterns:[]}function h({categories:o,allowedPreferences:e}){const i=m();for(const n of o)if(!e[n.id])for(const t of i)n.cookiePatterns.some(f=>p(t,f))&&g(t)}function k(o,e){const i={};for(const n of o){const a=e&&Object.prototype.hasOwnProperty.call(e,n.id)?!!e[n.id]:!!n.enabled;i[n.id]=n.readonly?!0:a}return i}function D(o){const e=b(o),i=y(e.categories),n=A(e.cookieName),a=n?P(n):null;let t=a&&a.preferences?k(e.categories,a.preferences):i,d=a?a.consentId:null,f=a?a.updatedAt:null;a&&a.preferences&&e.onAccept&&e.onAccept({...t});function u(s){return t=k(e.categories,s),d||(d=N()),f=new Date().toISOString(),S(e.cookieName,{preferences:t,consentId:d,updatedAt:f,siteName:e.siteName},{expiresDays:e.cookieExpiresDays}),e.autoClear&&h({categories:e.categories,allowedPreferences:t}),e.onAccept&&e.onAccept({...t}),{...t}}return{getConsentDetails(){return{consentId:d||"No registrado",consentDate:f||"No registrado",preferences:{...t}}},getConfig(){return{siteName:e.siteName,autoClear:e.autoClear,cookieName:e.cookieName,cookieExpiresDays:e.cookieExpiresDays,categories:e.categories.map(s=>({...s}))}},hasStoredConsent(){return!!(a&&a.preferences)},getPreferences(){return{...t}},acceptAll(){const s={};for(const c of e.categories)s[c.id]=!0;return u(s)},rejectAll(){const s={};for(const c of e.categories)s[c.id]=!!c.readonly;return u(s)},setPreferences(s){return u({...t,...s||{}})},clearCategoryCookies(s){const c=w(e.categories,s),I=m();for(const C of I)c.some(O=>p(C,O))&&g(C)}}}const L={siteName:"Lineas Romero NextJS",autoClear:!0,categories:[{id:"necessary",label:"Necesario",description:"Las cookies necesarias ayudan a hacer una página web utilizable activando funciones básicas como la navegación en la página y el acceso a áreas seguras de la página web.",enabled:!0,readonly:!0,cookiePatterns:["fh_","fareharbor","next-","__Host-","connect.sid","CookieConsent","NEXT_LOCALE"]},{id:"preferences",label:"Preferencias",description:"Las cookies de preferencias permiten a la página web recordar información que cambia la forma en que la página se comporta o el aspecto que tiene.",enabled:!1,cookiePatterns:[]},{id:"statistics",label:"Estadística",description:"Las cookies estadísticas ayudan a los propietarios de páginas web a comprender cómo interactúan los visitantes con las páginas web reuniendo información de forma anónima.",enabled:!1,cookiePatterns:["_ga","_gid","_gat","mc_","metricool"]},{id:"marketing",label:"Marketing",description:"Las cookies de marketing se utilizan para rastrear a los visitantes en las páginas web. La intención es mostrar anuncios relevantes.",enabled:!1,cookiePatterns:["_fbp","fr","tr","_gcl","_gac"]},{id:"unclassified",label:"No clasificadas",description:"Cookies que estamos en proceso de clasificar.",enabled:!1,cookiePatterns:[]}],onAccept:o=>{o.statistics,o.marketing}},x={siteName:"Apartamentos Lineas Romero",autoClear:!0,categories:[{id:"necessary",label:"Necesario",description:"Las cookies necesarias ayudan a hacer una página web utilizable activando funciones básicas.",enabled:!0,readonly:!0,cookiePatterns:["wp-settings","wordpress_","pll_","CookieConsent","AEC","__Secure-BUCKET"]},{id:"preferences",label:"Preferencias",description:"Permiten recordar información que cambia el aspecto o comportamiento del sitio.",enabled:!1,cookiePatterns:[]},{id:"statistics",label:"Estadística",description:"Ayudan a comprender cómo interactúan los visitantes con la web.",enabled:!1,cookiePatterns:["_ga","_gid"]},{id:"marketing",label:"Marketing",description:"Se utilizan para rastrear a los visitantes y mostrar anuncios relevantes.",enabled:!1,cookiePatterns:["IDE","_gcl","ar_debug","SOCS","__Secure-ENID","NID","1P_JAR"]},{id:"unclassified",label:"No clasificadas",description:"Cookies en proceso de clasificación.",enabled:!1,cookiePatterns:[]}],onAccept:o=>{o.marketing}},v={siteName:"Visit La Graciosa",autoClear:!0,categories:[{id:"necessary",label:"Necesario",description:"Esenciales para preferencias de idioma y funcionamiento del sitio.",enabled:!0,readonly:!0,cookiePatterns:["pll_","session_id","PHPSESSID"]},{id:"preferences",label:"Preferencias",description:"Configuración regional e idioma.",enabled:!1,cookiePatterns:[]},{id:"statistics",label:"Estadística",description:"Estadísticas de uso anónimo.",enabled:!1,cookiePatterns:["_ga","_gid"]},{id:"marketing",label:"Marketing",description:"Publicidad y seguimiento de conversiones.",enabled:!1,cookiePatterns:["_gcl","_gac"]},{id:"unclassified",label:"No clasificadas",description:"Pendientes de clasificar.",enabled:!1,cookiePatterns:[]}],onAccept:o=>{o.marketing}};r.initCookieConsent=D,r.nextJsConfig=L,r.visitLaGraciosaConfig=v,r.wpApartamentosConfig=x,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED