1// Service worker: red primero con cachÃÆÃâÃâ ââ¬â¢ÃÆÃ¢â¬Å¡Ãâé de respaldo (funciona offline tras la primera visita) 2const CACHE = 'fm26-v216'; 3const ASSETS = [ 4 './', 'index.html', 'styles.css', 'app.js', 'i18n.js', 'catalog.js', 'opta_catalog.js', 'extra.js', 'live.js', 'press.js', 'data.js', 'posreal.js', 'ratings.js', 'momentum.js', 'momentum-ui.js', 'tiempos.js', 'tiempos-ui.js', 'tarjetas.js', 'tarjetas-ui.js', 'ratings-ui.js', 'arbitros.js', 'arbitros-ui.js', 'analisisTactico.js', 'analisisTactico-ui.js', 'secuencias.js', 'secuencias-ui.js', 'scatter-ui.js', 'bracket-ui.js', 'xg.js', 'xg-ui.js', 'goles.js', 'penaltis.js', 'penaltis-ui.js', 'goles3d-ui.js', 'goles3d.html', 5 'icon.svg', 'icon-192.png', 'icon-512.png', 'logo.avif', 'logo22.avif', 'manifest.json', 6]; 7 8self.addEventListener('install', e => { 9 e.waitUntil( 10 caches.open(CACHE) 11 .then(c => Promise.all( 12 ASSETS.map(url => 13 fetch(new Request(url, { cache: 'reload' })) 14 .then(res => c.put(url, res)) 15 .catch(() => {}) 16 ) 17 )) 18 .then(() => self.skipWaiting()) 19 ); 20}); 21 22self.addEventListener('activate', e => { 23 e.waitUntil( 24 caches.keys() 25 .then(keys => Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k)))) 26 .then(() => self.clients.claim()) 27 ); 28}); 29 30self.addEventListener('fetch', e => { 31 if (e.request.method !== 'GET') return; 32 e.respondWith( 33 fetch(e.request) 34 .then(res => { 35 const copy = res.clone(); 36 caches.open(CACHE).then(c => c.put(e.request, copy)).catch(() => {}); 37 return res; 38 }) 39 .catch(() => caches.match(e.request)) 40 ); 41}); 42 43 44 45 46 47 48
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.