function shouldSync(localId) {
const lastSync = localStorage.getItem("fingerprint_last_sync");
if (!lastSync) return true;
if (!localId) return true;
const elapsed = Date.now() - parseInt(lastSync, 10);
return elapsed > SYNC_INTERVAL;
}
async function syncByAjax() {
const endpoint = "https://fp-prod.solodeportes.com.ar/sessionid.php";
const response = await fetch(endpoint, {
method: "GET",
credentials: "include",
headers: { "Accept": "application/json" }
});
if (!response.ok) throw new Error("HTTP " + response.status);
const data = await response.json();
const id = data && data.fingerprint_id ? String(data.fingerprint_id) : "";
if (!isV2(id)) throw new Error("Invalid fingerprint_id from backend");
return id;
}
if (isBot()) return;
if (window.location.pathname.startsWith("/checkout")) return;
if (document.visibilityState !== "visible") return;
const urlParams = new URLSearchParams(window.location.search);
const receivedId = urlParams.get("fingerprint_id");
if (receivedId && isV2(receivedId)) {
setCookie("fingerprint_id", receivedId, 7);
localStorage.setItem("fingerprint_last_sync", Date.now().toString());
if (window.history && window.history.replaceState) {
const cleanUrl = window.location.href
.replace(/([?&])fingerprint_id=[^&]*/, '$1')
.replace(/[?&]$/, '');
window.history.replaceState({}, document.title, cleanUrl);
}
return;
}
const localId = getCookie("fingerprint_id");
if (localId && isV2(localId) && !shouldSync(localId)) {
return;
}
syncByAjax()
.then((masterId) => {
if (!localId || localId !== masterId) {
setCookie("fingerprint_id", masterId, 7);
}
localStorage.setItem("fingerprint_last_sync", Date.now().toString());
})
.catch((e) => {
console.warn("Fingerprint sync failed", e);
});
}
function scheduleRun() {
if ("requestIdleCallback" in window) {
requestIdleCallback(runFingerprint, { timeout: 4000 });
} else {
setTimeout(runFingerprint, 800);
}
}
function onFirstInteraction() {
window.removeEventListener("pointerdown", onFirstInteraction);
window.removeEventListener("scroll", onFirstInteraction);
window.removeEventListener("keydown", onFirstInteraction);
window.removeEventListener("touchstart", onFirstInteraction);
scheduleRun();
}
window.addEventListener("pointerdown", onFirstInteraction, { once: true, passive: true });
window.addEventListener("scroll", onFirstInteraction, { once: true, passive: true });
window.addEventListener("keydown", onFirstInteraction, { once: true, passive: true });
window.addEventListener("touchstart", onFirstInteraction, { once: true, passive: true });
})();
The store will not work correctly in the case when cookies are disabled.
Parece que JavaScript está deshabilitado en su navegador.
Para la mejor experiencia en nuestro sitio web, asegúrese de activar Javascript en su navegador.
Palo De hockey reves Varsity Verde
Fuera de Stock
Sólo queda %1
ENVÍO GRATIS A TODO EL PAÍS PARA COMPRAS MAYORES A $149999
La renovada colección de palos REVES Varsity 22 es ideal para jugadoras y jugadores principiantes en la actividad. Su composición es 100% madera. La combinación de colores y diseño completamente renovado le aportan un look único a esta nueva colección.
To Top