lineas-romero-cookies-consent 1.1.9 → 1.1.10
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,5 +1,5 @@
|
|
|
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 : [];
|
|
@@ -19,7 +19,7 @@ function C(o) {
|
|
|
19
19
|
cookiePatterns: Array.isArray(a.cookiePatterns) ? a.cookiePatterns.map(String) : [],
|
|
20
20
|
cookiesDetails: Array.isArray(a.cookiesDetails) ? a.cookiesDetails : []
|
|
21
21
|
};
|
|
22
|
-
}), t = o.cookieName ? String(o.cookieName) :
|
|
22
|
+
}), t = o.cookieName ? String(o.cookieName) : C, n = Number.isFinite(o.cookieExpiresDays) ? Number(o.cookieExpiresDays) : 180;
|
|
23
23
|
return {
|
|
24
24
|
siteName: o.siteName ? String(o.siteName) : "",
|
|
25
25
|
autoClear: !!o.autoClear,
|
|
@@ -35,17 +35,17 @@ function S(o) {
|
|
|
35
35
|
e[i.id] = i.readonly ? !0 : !!i.enabled;
|
|
36
36
|
return e;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function A(o) {
|
|
39
39
|
try {
|
|
40
40
|
return JSON.parse(decodeURIComponent(o));
|
|
41
41
|
} catch {
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function v() {
|
|
46
46
|
return "LR-" + Math.random().toString(36).substr(2, 9).toUpperCase() + "-" + Date.now().toString(36).toUpperCase();
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function _(o) {
|
|
49
49
|
if (typeof document > "u") return null;
|
|
50
50
|
const e = document.cookie ? document.cookie.split("; ") : [];
|
|
51
51
|
for (const i of e) {
|
|
@@ -55,7 +55,7 @@ function D(o) {
|
|
|
55
55
|
}
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function D(o, e, { expiresDays: i }) {
|
|
59
59
|
if (typeof document > "u") return;
|
|
60
60
|
const t = /* @__PURE__ */ new Date();
|
|
61
61
|
t.setTime(t.getTime() + i * 24 * 60 * 60 * 1e3);
|
|
@@ -71,7 +71,7 @@ function m() {
|
|
|
71
71
|
return i >= 0 ? e.slice(0, i) : e;
|
|
72
72
|
}).filter(Boolean);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function E(o) {
|
|
75
75
|
const e = /* @__PURE__ */ new Set();
|
|
76
76
|
if (!o) return Array.from(e);
|
|
77
77
|
e.add(o), o.includes(".") && e.add(`.${o}`);
|
|
@@ -84,19 +84,19 @@ function N(o) {
|
|
|
84
84
|
}
|
|
85
85
|
function g(o) {
|
|
86
86
|
if (typeof document > "u") return;
|
|
87
|
-
const e = "Thu, 01 Jan 1970 00:00:00 GMT", i = typeof location < "u" ? location.hostname : "", t =
|
|
87
|
+
const e = "Thu, 01 Jan 1970 00:00:00 GMT", i = typeof location < "u" ? location.hostname : "", t = E(i);
|
|
88
88
|
document.cookie = `${o}=; Expires=${e}; Path=/; SameSite=Lax`;
|
|
89
89
|
for (const n of t)
|
|
90
90
|
document.cookie = `${o}=; Expires=${e}; Path=/; Domain=${n}; SameSite=Lax`;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function P(o, e) {
|
|
93
93
|
return o.find((i) => i.id === e) || null;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
const i =
|
|
95
|
+
function N(o, e) {
|
|
96
|
+
const i = P(o, e);
|
|
97
97
|
return i ? i.cookiePatterns : [];
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function h({ categories: o, allowedPreferences: e }) {
|
|
100
100
|
const i = m();
|
|
101
101
|
for (const t of o)
|
|
102
102
|
if (!e[t.id])
|
|
@@ -112,11 +112,11 @@ function p(o, e) {
|
|
|
112
112
|
return i;
|
|
113
113
|
}
|
|
114
114
|
function q(o) {
|
|
115
|
-
const e =
|
|
115
|
+
const e = y(o), i = S(e.categories), t = _(e.cookieName), n = t ? A(t) : null;
|
|
116
116
|
let a = n && n.preferences ? p(e.categories, n.preferences) : i, s = n ? n.consentId : null, c = n ? n.updatedAt : null;
|
|
117
117
|
n && n.preferences && e.onAccept && e.onAccept({ ...a });
|
|
118
118
|
function d(r) {
|
|
119
|
-
return a = p(e.categories, r), s || (s =
|
|
119
|
+
return a = p(e.categories, r), s || (s = v()), c = (/* @__PURE__ */ new Date()).toISOString(), D(
|
|
120
120
|
e.cookieName,
|
|
121
121
|
{
|
|
122
122
|
preferences: a,
|
|
@@ -125,7 +125,7 @@ function q(o) {
|
|
|
125
125
|
siteName: e.siteName
|
|
126
126
|
},
|
|
127
127
|
{ expiresDays: e.cookieExpiresDays }
|
|
128
|
-
), e.autoClear &&
|
|
128
|
+
), e.autoClear && h({ categories: e.categories, allowedPreferences: a }), e.onAccept && e.onAccept({ ...a }), { ...a };
|
|
129
129
|
}
|
|
130
130
|
return {
|
|
131
131
|
getConsentDetails() {
|
|
@@ -166,7 +166,7 @@ function q(o) {
|
|
|
166
166
|
return d({ ...a, ...r || {} });
|
|
167
167
|
},
|
|
168
168
|
clearCategoryCookies(r) {
|
|
169
|
-
const l =
|
|
169
|
+
const l = N(e.categories, r), k = m();
|
|
170
170
|
for (const u of k)
|
|
171
171
|
l.some((b) => f(u, b)) && g(u);
|
|
172
172
|
}
|
|
@@ -266,7 +266,7 @@ const w = (o) => {
|
|
|
266
266
|
label: "Marketing",
|
|
267
267
|
description: 'Las cookies de marketing se utilizan para rastrear a los visitantes en las páginas web. La intención es mostrar anuncios relevantes y atractivos para el usuario individual, y por lo tanto, más valiosos para los editores y terceros anunciantes."',
|
|
268
268
|
enabled: !1,
|
|
269
|
-
cookiePatterns: ["_fbp", "fr", "tr", "_gcl", "__Secure-", "NID", "AEC", "SID", "HSID", "APISID", "SSID", "SAPISID", "OTZ", "SOCS", "1P_JAR", "datr", "sb", "wd"],
|
|
269
|
+
cookiePatterns: ["_fbp", "fr", "tr", "_gcl", "__Secure-", "NID", "AEC", "SID", "HSID", "APISID", "SSID", "SAPISID", "OTZ", "SOCS", "1P_JAR", "datr", "sb", "wd", "SEARCH_SAMESITE", "SIDCC"],
|
|
270
270
|
cookiesDetails: [
|
|
271
271
|
{
|
|
272
272
|
provider: "Facebook",
|
|
@@ -274,23 +274,41 @@ const w = (o) => {
|
|
|
274
274
|
duration: "3 meses",
|
|
275
275
|
purpose: "Utilizada por Facebook para ofrecer productos publicitarios."
|
|
276
276
|
},
|
|
277
|
+
{
|
|
278
|
+
provider: "Facebook",
|
|
279
|
+
name: "datr / sb / wd",
|
|
280
|
+
duration: "2 años",
|
|
281
|
+
purpose: "Identificación de navegador segura y fines publicitarios de Facebook."
|
|
282
|
+
},
|
|
277
283
|
{
|
|
278
284
|
provider: "Google",
|
|
279
|
-
name: "NID / SID / HSID",
|
|
285
|
+
name: "NID / SID / HSID / SIDCC",
|
|
280
286
|
duration: "6 meses - 2 años",
|
|
281
287
|
purpose: "Contienen registros encriptados y firmados de forma digital de la hora de inicio de sesión más reciente y del ID de cuenta de Google."
|
|
282
288
|
},
|
|
283
289
|
{
|
|
284
290
|
provider: "Google",
|
|
285
|
-
name: "__Secure-ENID /
|
|
291
|
+
name: "__Secure-ENID / 3PSID / 1PSID",
|
|
286
292
|
duration: "13 meses",
|
|
287
293
|
purpose: "Utilizadas para crear un perfil de intereses y mostrar anuncios relevantes de Google en otros sitios."
|
|
288
294
|
},
|
|
289
295
|
{
|
|
290
296
|
provider: "Google",
|
|
291
|
-
name: "SOCS",
|
|
297
|
+
name: "SOCS / AEC",
|
|
292
298
|
duration: "13 meses",
|
|
293
|
-
purpose: "Almacena el estado de las elecciones de cookies
|
|
299
|
+
purpose: "Almacena el estado de las elecciones de cookies y garantiza que las solicitudes dentro de una sesión de navegación sean realizadas por el usuario y no por otros sitios."
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
provider: "Google",
|
|
303
|
+
name: "SEARCH_SAMESITE",
|
|
304
|
+
duration: "6 meses",
|
|
305
|
+
purpose: "Se utiliza para evitar que el navegador envíe esta cookie junto con solicitudes entre sitios (Cross-Site) para proteger la seguridad del usuario."
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
provider: "Google Ads",
|
|
309
|
+
name: "_gcl_au",
|
|
310
|
+
duration: "3 meses",
|
|
311
|
+
purpose: "Experimentación con la eficiencia publicitaria."
|
|
294
312
|
}
|
|
295
313
|
]
|
|
296
314
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(d=typeof globalThis<"u"?globalThis:d||self,p(d.LineasRomeroCookies={}))})(this,(function(d){"use strict";const p="CookieConsent";function C(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 a=e.map(i=>{if(!i||typeof i!="object")throw new Error("initCookieConsent(config): invalid category");if(!i.id)throw new Error("initCookieConsent(config): category.id is required");return{id:String(i.id),label:i.label?String(i.label):String(i.id),description:i.description?String(i.description):"",enabled:!!i.enabled,readonly:!!i.readonly,cookiePatterns:Array.isArray(i.cookiePatterns)?i.cookiePatterns.map(String):[],cookiesDetails:Array.isArray(i.cookiesDetails)?i.cookiesDetails:[]}}),t=o.cookieName?String(o.cookieName):p,n=Number.isFinite(o.cookieExpiresDays)?Number(o.cookieExpiresDays):180;return{siteName:o.siteName?String(o.siteName):"",autoClear:!!o.autoClear,cookieName:t,cookieExpiresDays:n,categories:a,onAccept:typeof o.onAccept=="function"?o.onAccept:null}}function y(o){const e={};for(const a of o)e[a.id]=a.readonly?!0:!!a.enabled;return e}function S(o){try{return JSON.parse(decodeURIComponent(o))}catch{return null}}function A(){return"LR-"+Math.random().toString(36).substr(2,9).toUpperCase()+"-"+Date.now().toString(36).toUpperCase()}function _(o){if(typeof document>"u")return null;const e=document.cookie?document.cookie.split("; "):[];for(const a of e){const t=a.indexOf("=");if((t>=0?a.slice(0,t):a)===o)return t>=0?a.slice(t+1):""}return null}function D(o,e,{expiresDays:a}){if(typeof document>"u")return;const t=new Date;t.setTime(t.getTime()+a*24*60*60*1e3);const n=encodeURIComponent(JSON.stringify(e));document.cookie=`${o}=${n}; Expires=${t.toUTCString()}; Path=/; SameSite=Lax`}function f(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 a=e.indexOf("=");return a>=0?e.slice(0,a):e}).filter(Boolean)}function P(o){const e=new Set;if(!o)return Array.from(e);e.add(o),o.includes(".")&&e.add(`.${o}`);const a=o.split(".").filter(Boolean);for(let t=1;t<a.length-1;t+=1){const n=a.slice(t).join(".");e.add(n),e.add(`.${n}`)}return Array.from(e)}function g(o){if(typeof document>"u")return;const e="Thu, 01 Jan 1970 00:00:00 GMT",a=typeof location<"u"?location.hostname:"",t=P(a);document.cookie=`${o}=; Expires=${e}; Path=/; SameSite=Lax`;for(const n of t)document.cookie=`${o}=; Expires=${e}; Path=/; Domain=${n}; SameSite=Lax`}function v(o,e){return o.find(a=>a.id===e)||null}function h(o,e){const a=v(o,e);return a?a.cookiePatterns:[]}function N({categories:o,allowedPreferences:e}){const a=m();for(const t of o)if(!e[t.id])for(const i of a)t.cookiePatterns.some(c=>f(i,c))&&g(i)}function k(o,e){const a={};for(const t of o){const n=e&&Object.prototype.hasOwnProperty.call(e,t.id)?!!e[t.id]:!!t.enabled;a[t.id]=t.readonly?!0:n}return a}function E(o){const e=C(o),a=y(e.categories),t=_(e.cookieName),n=t?S(t):null;let i=n&&n.preferences?k(e.categories,n.preferences):a,s=n?n.consentId:null,c=n?n.updatedAt:null;n&&n.preferences&&e.onAccept&&e.onAccept({...i});function l(r){return i=k(e.categories,r),s||(s=A()),c=new Date().toISOString(),D(e.cookieName,{preferences:i,consentId:s,updatedAt:c,siteName:e.siteName},{expiresDays:e.cookieExpiresDays}),e.autoClear&&N({categories:e.categories,allowedPreferences:i}),e.onAccept&&e.onAccept({...i}),{...i}}return{getConsentDetails(){return{consentId:s||"No registrado",consentDate:c||"No registrado",preferences:{...i}}},getConfig(){return{siteName:e.siteName,autoClear:e.autoClear,cookieName:e.cookieName,cookieExpiresDays:e.cookieExpiresDays,categories:e.categories.map(r=>({...r}))}},hasStoredConsent(){return!!(n&&n.preferences)},getPreferences(){return{...i}},acceptAll(){const r={};for(const u of e.categories)r[u.id]=!0;return l(r)},rejectAll(){const r={};for(const u of e.categories)r[u.id]=!!u.readonly;return l(r)},setPreferences(r){return l({...i,...r||{}})},clearCategoryCookies(r){const u=h(e.categories,r),T=m();for(const b of T)u.some(x=>f(b,x))&&g(b)}}}const w=o=>{if(typeof document>"u"||document.querySelector(`script[src="${o}"]`))return;const e=document.createElement("script");e.src=o,e.async=!0,document.head.appendChild(e)},I={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.",enabled:!0,readonly:!0,cookiePatterns:["fh_","fareharbor","next-","__Host-","connect.sid","CookieConsent","NEXT_LOCALE","fh-","csrftoken","_abck"],cookiesDetails:[{provider:"Lineas Romero",name:"CookieConsent",duration:"6 meses",purpose:"Almacena el estado de consentimiento de cookies del usuario."},{provider:"Stripe",name:"m",duration:"2 años",purpose:"Cookie necesaria para la prevención de fraude y el procesamiento de pagos."},{provider:"Akamai",name:"_abck",duration:"1 año",purpose:"Utilizada para detectar y mitigar el tráfico de bots maliciosos (Seguridad)."},{provider:"FareHarbor",name:"fh-sticking-routing",duration:"Sesión",purpose:"Mantiene la conexión segura con el servidor de reservas."},{provider:"FareHarbor",name:"csrftoken",duration:"1 año",purpose:"Token de seguridad para prevenir ataques en formularios."},{provider:"FareHarbor",name:"fh-units-language / fh-content-language",duration:"Sesión",purpose:"Guarda la configuración de idioma y moneda del motor de reservas."}]},{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:[],cookiesDetails:[]},{id:"statistics",label:"Estadística",description:"Las cookies de estadística ayudan a los propietarios de sitios web a comprender cómo interactúan los visitantes con los sitios web mediante la recopilación y presentación de información de forma anónima.",enabled:!1,cookiePatterns:["_ga","_gid","_gat","mc_","metricool"],cookiesDetails:[{provider:"Google Analytics",name:"_ga",duration:"2 años",purpose:"Registra una identificación única que se utiliza para generar datos estadísticos."},{provider:"Google Analytics",name:"_gid",duration:"24 horas",purpose:"Registra una identificación única que se utiliza para generar datos estadísticos."},{provider:"Metricool",name:"mc_session",duration:"Sesión",purpose:"Analítica interna de visitas."}]},{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 y atractivos para el usuario individual, y por lo tanto, más valiosos para los editores y terceros anunciantes."',enabled:!1,cookiePatterns:["_fbp","fr","tr","_gcl","__Secure-","NID","AEC","SID","HSID","APISID","SSID","SAPISID","OTZ","SOCS","1P_JAR","datr","sb","wd"],cookiesDetails:[{provider:"Facebook",name:"_fbp",duration:"3 meses",purpose:"Utilizada por Facebook para ofrecer productos publicitarios."},{provider:"Google",name:"NID / SID / HSID",duration:"6 meses - 2 años",purpose:"Contienen registros encriptados y firmados de forma digital de la hora de inicio de sesión más reciente y del ID de cuenta de Google."},{provider:"Google",name:"__Secure-ENID / __Secure-3PSID",duration:"13 meses",purpose:"Utilizadas para crear un perfil de intereses y mostrar anuncios relevantes de Google en otros sitios."},{provider:"Google",name:"SOCS",duration:"13 meses",purpose:"Almacena el estado de las elecciones de cookies del usuario para Google."}]},{id:"unclassified",label:"No clasificadas",description:"Las cookies no clasificadas son cookies para las que todavía estamos en proceso de clasificar, junto con los proveedores de cookies individuales.",enabled:!1,cookiePatterns:[],cookiesDetails:[]}],onAccept:o=>{if(o.statistics){(function(a,t,n,i,s){a[i]=a[i]||[],a[i].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var c=t.getElementsByTagName(n)[0],l=t.createElement(n),r="";l.async=!0,l.src="https://www.googletagmanager.com/gtm.js?id="+s+r,c.parentNode.insertBefore(l,c)})(window,document,"script","dataLayer","GTM-T22MXTS"),w("https://tracker.metricool.com/resources/be.js");const e=setInterval(()=>{window.beTracker&&(clearInterval(e),window.beTracker.t({hash:"dfa94193071c025264595ebeb4647ae3"}))},100)}o.marketing&&((function(e,a,t,n,i,s,c){e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],s=a.createElement(t),s.async=!0,s.src=n,c=a.getElementsByTagName(t)[0],c.parentNode.insertBefore(s,c))})(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),fbq("init","1048470300095520"),fbq("track","PageView"))}},L={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}},q={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}};d.initCookieConsent=E,d.nextJsConfig=I,d.visitLaGraciosaConfig=q,d.wpApartamentosConfig=L,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(d,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(d=typeof globalThis<"u"?globalThis:d||self,p(d.LineasRomeroCookies={}))})(this,(function(d){"use strict";const p="CookieConsent";function C(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 a=e.map(i=>{if(!i||typeof i!="object")throw new Error("initCookieConsent(config): invalid category");if(!i.id)throw new Error("initCookieConsent(config): category.id is required");return{id:String(i.id),label:i.label?String(i.label):String(i.id),description:i.description?String(i.description):"",enabled:!!i.enabled,readonly:!!i.readonly,cookiePatterns:Array.isArray(i.cookiePatterns)?i.cookiePatterns.map(String):[],cookiesDetails:Array.isArray(i.cookiesDetails)?i.cookiesDetails:[]}}),t=o.cookieName?String(o.cookieName):p,n=Number.isFinite(o.cookieExpiresDays)?Number(o.cookieExpiresDays):180;return{siteName:o.siteName?String(o.siteName):"",autoClear:!!o.autoClear,cookieName:t,cookieExpiresDays:n,categories:a,onAccept:typeof o.onAccept=="function"?o.onAccept:null}}function y(o){const e={};for(const a of o)e[a.id]=a.readonly?!0:!!a.enabled;return e}function S(o){try{return JSON.parse(decodeURIComponent(o))}catch{return null}}function A(){return"LR-"+Math.random().toString(36).substr(2,9).toUpperCase()+"-"+Date.now().toString(36).toUpperCase()}function v(o){if(typeof document>"u")return null;const e=document.cookie?document.cookie.split("; "):[];for(const a of e){const t=a.indexOf("=");if((t>=0?a.slice(0,t):a)===o)return t>=0?a.slice(t+1):""}return null}function _(o,e,{expiresDays:a}){if(typeof document>"u")return;const t=new Date;t.setTime(t.getTime()+a*24*60*60*1e3);const n=encodeURIComponent(JSON.stringify(e));document.cookie=`${o}=${n}; Expires=${t.toUTCString()}; Path=/; SameSite=Lax`}function f(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 a=e.indexOf("=");return a>=0?e.slice(0,a):e}).filter(Boolean)}function D(o){const e=new Set;if(!o)return Array.from(e);e.add(o),o.includes(".")&&e.add(`.${o}`);const a=o.split(".").filter(Boolean);for(let t=1;t<a.length-1;t+=1){const n=a.slice(t).join(".");e.add(n),e.add(`.${n}`)}return Array.from(e)}function g(o){if(typeof document>"u")return;const e="Thu, 01 Jan 1970 00:00:00 GMT",a=typeof location<"u"?location.hostname:"",t=D(a);document.cookie=`${o}=; Expires=${e}; Path=/; SameSite=Lax`;for(const n of t)document.cookie=`${o}=; Expires=${e}; Path=/; Domain=${n}; SameSite=Lax`}function E(o,e){return o.find(a=>a.id===e)||null}function P(o,e){const a=E(o,e);return a?a.cookiePatterns:[]}function h({categories:o,allowedPreferences:e}){const a=m();for(const t of o)if(!e[t.id])for(const i of a)t.cookiePatterns.some(c=>f(i,c))&&g(i)}function k(o,e){const a={};for(const t of o){const n=e&&Object.prototype.hasOwnProperty.call(e,t.id)?!!e[t.id]:!!t.enabled;a[t.id]=t.readonly?!0:n}return a}function N(o){const e=C(o),a=y(e.categories),t=v(e.cookieName),n=t?S(t):null;let i=n&&n.preferences?k(e.categories,n.preferences):a,s=n?n.consentId:null,c=n?n.updatedAt:null;n&&n.preferences&&e.onAccept&&e.onAccept({...i});function l(r){return i=k(e.categories,r),s||(s=A()),c=new Date().toISOString(),_(e.cookieName,{preferences:i,consentId:s,updatedAt:c,siteName:e.siteName},{expiresDays:e.cookieExpiresDays}),e.autoClear&&h({categories:e.categories,allowedPreferences:i}),e.onAccept&&e.onAccept({...i}),{...i}}return{getConsentDetails(){return{consentId:s||"No registrado",consentDate:c||"No registrado",preferences:{...i}}},getConfig(){return{siteName:e.siteName,autoClear:e.autoClear,cookieName:e.cookieName,cookieExpiresDays:e.cookieExpiresDays,categories:e.categories.map(r=>({...r}))}},hasStoredConsent(){return!!(n&&n.preferences)},getPreferences(){return{...i}},acceptAll(){const r={};for(const u of e.categories)r[u.id]=!0;return l(r)},rejectAll(){const r={};for(const u of e.categories)r[u.id]=!!u.readonly;return l(r)},setPreferences(r){return l({...i,...r||{}})},clearCategoryCookies(r){const u=P(e.categories,r),L=m();for(const b of L)u.some(x=>f(b,x))&&g(b)}}}const w=o=>{if(typeof document>"u"||document.querySelector(`script[src="${o}"]`))return;const e=document.createElement("script");e.src=o,e.async=!0,document.head.appendChild(e)},I={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.",enabled:!0,readonly:!0,cookiePatterns:["fh_","fareharbor","next-","__Host-","connect.sid","CookieConsent","NEXT_LOCALE","fh-","csrftoken","_abck"],cookiesDetails:[{provider:"Lineas Romero",name:"CookieConsent",duration:"6 meses",purpose:"Almacena el estado de consentimiento de cookies del usuario."},{provider:"Stripe",name:"m",duration:"2 años",purpose:"Cookie necesaria para la prevención de fraude y el procesamiento de pagos."},{provider:"Akamai",name:"_abck",duration:"1 año",purpose:"Utilizada para detectar y mitigar el tráfico de bots maliciosos (Seguridad)."},{provider:"FareHarbor",name:"fh-sticking-routing",duration:"Sesión",purpose:"Mantiene la conexión segura con el servidor de reservas."},{provider:"FareHarbor",name:"csrftoken",duration:"1 año",purpose:"Token de seguridad para prevenir ataques en formularios."},{provider:"FareHarbor",name:"fh-units-language / fh-content-language",duration:"Sesión",purpose:"Guarda la configuración de idioma y moneda del motor de reservas."}]},{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:[],cookiesDetails:[]},{id:"statistics",label:"Estadística",description:"Las cookies de estadística ayudan a los propietarios de sitios web a comprender cómo interactúan los visitantes con los sitios web mediante la recopilación y presentación de información de forma anónima.",enabled:!1,cookiePatterns:["_ga","_gid","_gat","mc_","metricool"],cookiesDetails:[{provider:"Google Analytics",name:"_ga",duration:"2 años",purpose:"Registra una identificación única que se utiliza para generar datos estadísticos."},{provider:"Google Analytics",name:"_gid",duration:"24 horas",purpose:"Registra una identificación única que se utiliza para generar datos estadísticos."},{provider:"Metricool",name:"mc_session",duration:"Sesión",purpose:"Analítica interna de visitas."}]},{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 y atractivos para el usuario individual, y por lo tanto, más valiosos para los editores y terceros anunciantes."',enabled:!1,cookiePatterns:["_fbp","fr","tr","_gcl","__Secure-","NID","AEC","SID","HSID","APISID","SSID","SAPISID","OTZ","SOCS","1P_JAR","datr","sb","wd","SEARCH_SAMESITE","SIDCC"],cookiesDetails:[{provider:"Facebook",name:"_fbp",duration:"3 meses",purpose:"Utilizada por Facebook para ofrecer productos publicitarios."},{provider:"Facebook",name:"datr / sb / wd",duration:"2 años",purpose:"Identificación de navegador segura y fines publicitarios de Facebook."},{provider:"Google",name:"NID / SID / HSID / SIDCC",duration:"6 meses - 2 años",purpose:"Contienen registros encriptados y firmados de forma digital de la hora de inicio de sesión más reciente y del ID de cuenta de Google."},{provider:"Google",name:"__Secure-ENID / 3PSID / 1PSID",duration:"13 meses",purpose:"Utilizadas para crear un perfil de intereses y mostrar anuncios relevantes de Google en otros sitios."},{provider:"Google",name:"SOCS / AEC",duration:"13 meses",purpose:"Almacena el estado de las elecciones de cookies y garantiza que las solicitudes dentro de una sesión de navegación sean realizadas por el usuario y no por otros sitios."},{provider:"Google",name:"SEARCH_SAMESITE",duration:"6 meses",purpose:"Se utiliza para evitar que el navegador envíe esta cookie junto con solicitudes entre sitios (Cross-Site) para proteger la seguridad del usuario."},{provider:"Google Ads",name:"_gcl_au",duration:"3 meses",purpose:"Experimentación con la eficiencia publicitaria."}]},{id:"unclassified",label:"No clasificadas",description:"Las cookies no clasificadas son cookies para las que todavía estamos en proceso de clasificar, junto con los proveedores de cookies individuales.",enabled:!1,cookiePatterns:[],cookiesDetails:[]}],onAccept:o=>{if(o.statistics){(function(a,t,n,i,s){a[i]=a[i]||[],a[i].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var c=t.getElementsByTagName(n)[0],l=t.createElement(n),r="";l.async=!0,l.src="https://www.googletagmanager.com/gtm.js?id="+s+r,c.parentNode.insertBefore(l,c)})(window,document,"script","dataLayer","GTM-T22MXTS"),w("https://tracker.metricool.com/resources/be.js");const e=setInterval(()=>{window.beTracker&&(clearInterval(e),window.beTracker.t({hash:"dfa94193071c025264595ebeb4647ae3"}))},100)}o.marketing&&((function(e,a,t,n,i,s,c){e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],s=a.createElement(t),s.async=!0,s.src=n,c=a.getElementsByTagName(t)[0],c.parentNode.insertBefore(s,c))})(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),fbq("init","1048470300095520"),fbq("track","PageView"))}},q={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}},T={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}};d.initCookieConsent=N,d.nextJsConfig=I,d.visitLaGraciosaConfig=T,d.wpApartamentosConfig=q,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lineas-romero-cookies-consent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "Gestor en vanilla JS + CSS para granular las cookies de las páginas de LR, Apartamentos y Visit La Graciosa de manera manual.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|