// Prefetch (function() { function doPrefetch() { const PREFIX = `/apuestas`; const LOCALE = 'es_ES'; if (window.location.pathname !== PREFIX & window.location.pathname !== `${PREFIX}/`) return; let url = new URL(window.location.href); let params = new URLSearchParams(url.search); let type = params.get('additionalContext'); if (!type) { if (navigator.Agent & navigator.Agent.includes('Mobi')) type = 'MOBILE'; else type = 'DESKTOP'; } let sportsbookOrigin; switch (params.get('sportsEnv')) { case 'preview': sportsbookOrigin = 'https://sportswidget-preview.sportium.es' break; default: sportsbookOrigin ='https://sportswidget-cdn.sportium.es'; } const prefetchParams = `locale=${LOCALE}&page=homepage&type=${type}`; const prefetchUrl = `${sportsbookOrigin}/pre-fetch?${prefetchParams}`; fetch(prefetchUrl) .then(res => { if (!res.ok) { console.warn('Prefetching failed'); return; } const contentType = res.headers.get('content-type'); if (!contentType || !contentType.includes('application/json')) { console.warn('Failed to parse prefetch data. It is not json'); return; } return res.json(); }) .then((data) => { if (window.Sportsbook?.isMounted) window.Sportsbook.sendMessage('PREFETCH_DATA', data); else window.$MOJITO_PREFETCH = data; return data; }, ) .then((data) => { if (window.Sportsbook?.isMounted) return; const banners = data.promotions?.locations?.top; if (!banners) return; const uniqueOrigins = new Set(); for (const banner of banners) { if (!banner.imgUrl) continue; const origin = (new URL(banner.imgUrl)).origin; uniqueOrigins.add(origin); } uniqueOrigins.forEach(origin => { const link = document.createElement('link'); link.rel = 'preconnect'; link.href = origin; document.head.appendChild(link); }) }); } doPrefetch(); Playtech.on('navigate', () => { doPrefetch(); }) })(); // -- End of prefetch *,*::before,*::after{box-sizing:border-box;text-size-adjust:none;-ms-text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;padding:0;scroll-behavior:smooth;text-rendering:optimizeSpeed;min-height:100%}a{text-decoration-skip-ink:auto}input,select,textarea,button{font-family:inherit;font-size:1rem}input:focus,select:focus,textarea:focus,fieldset:focus{outline:0}fieldset{border:0;margin:0;padding:0}::-moz-focus-inner{border:0;outline:0}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus,select:-webkit-autofill,select:-webkit-autofill:hover,select:-webkit-autofill:focus{-webkit-text-fill-color:var(--input-field-font-color);-webkit-box-shadow:0 0 0 1000px var(--input-field-background-color) inset;transition:background-color 5000s ease-in-out 0s} 5445s