1var idbKeyval=(e=>{class t{constructor(s="keyval-store",i="keyval"){this.storeName=i,this._dbp=new Promise((e,t)=>{let n=indexedDB.open(s,1);n.onerror=()=>t(n.error),n.onsuccess=()=>e(n.result),n.onupgradeneeded=()=>{n.result.createObjectStore(i)}})}_withIDBStore(i,r){return this._dbp.then(s=>new Promise((e,t)=>{let n=s.transaction(this.storeName,i);n.oncomplete=()=>e(),n.onabort=n.onerror=()=>t(n.error),r(n.objectStore(this.storeName))}))}}let n;function s(){return n=n||new t}return e.Store=t,e.get=function(t,e=s()){let n;return e._withIDBStore("readonly",e=>{n=e.get(t)}).then(()=>n.result)},e.set=function(t,n,e=s()){return e._withIDBStore("readwrite",e=>{e.put(n,t)})},e.del=function(t,e=s()){return e._withIDBStore("readwrite",e=>{e.delete(t)})},e.clear=function(e=s()){return e._withIDBStore("readwrite",e=>{e.clear()})},e.keys=function(e=s()){let t=[];return e._withIDBStore("readonly",e=>{(e.openKeyCursor||e.openCursor).call(e).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},e})({});let CACHE_NAME="lospec",FILES_TO_CACHE=["/offline.htm","/stylesheets/offline.css","/favicon.ico","https://fonts.googleapis.com/css?family=Roboto:400,400i,700"],USER_SESSION_EXPIRATION=60;self.addEventListener("install",function(e){e.waitUntil(caches.open(CACHE_NAME).then(e=>e.addAll(FILES_TO_CACHE)))});var notificationsBroadcast=new BroadcastChannel("notifications");function verifySessionUser(){return new Promise((t,n)=>{getSessionUser().then(e=>t(e)).catch(e=>{updateSessionUser().then(e=>t(e)).catch(e=>n(e))})})}function getSessionUser(){return new Promise((n,s)=>{idbKeyval.get("lastUserSessionUpdate").then(e=>{var t;if((t=e?Math.floor((new Date-e)/1e3/60):t)>=USER_SESSION_EXPIRATION)return s("expired");idbKeyval.get("currentUserSession").then(e=>e?n(e):s("empty"))})})}function updateSessionUser(){return new Promise((t,n)=>{fetch("/user/session").then(e=>{if(!e.ok)return idbKeyval.del("currentUserSession"),n("request failed");e.text().then(e=>24!=e.length?(idbKeyval.del("currentUserSession"),n("invalid length")):(idbKeyval.set("currentUserSession",e),idbKeyval.set("lastUserSessionUpdate",new Date),t(e)))})})}self.addEventListener("push",e=>{var t=e.data.json();verifySessionUser().then(e=>{e==t.data.userId&&(self.registration.showNotification(t.title,{body:t.body,icon:t.image||"/images/favicons/favicon64.png",badge:"/images/badge.png",data:t.data}),notificationsBroadcast.postMessage({unseenNotifications:t.unseenNotifications}))})}),self.addEventListener("notificationclick",function(e){var i,r,o;e.notification.close(),e.notification.data&&e.notification.data.url&&(i=e.notification.data.url,r=-1!==i.indexOf("#")?i.substring(0,i.indexOf("#")):i,o=i.substring(i.indexOf("#"),i.length),e.waitUntil(self.clients.matchAll({type:"window",includeUncontrolled:!0}).then(e=>{for(var t=0;t<e.length;t++){var n=e[t],s=-1!==n.url.indexOf("#")?n.url.substring(0,n.url.indexOf("#")):n.url;if(s===r&&"focus"in n)return n.focus(),i.indexOf("#")?n.navigate(r).then(function(e){e.postMessage({jumpToAnchor:o})}):n.navigate(i)}if(self.clients.openWindow)return self.clients.openWindow(i)})))}),self.addEventListener("fetch",function(t){t.respondWith(fetch(t.request).catch(()=>"navigate"==t.request.mode?caches.open(CACHE_NAME).then(e=>e.match(FILES_TO_CACHE[0])):caches.open(CACHE_NAME).then(e=>e.match(t.request))).then(e=>(t.request.url.includes("lospec.com/user/logout")?idbKeyval.del("currentUserSession"):/^.*lospec\.com\/user\/login\/.*\/auth/.test(t.request.url)&&verifySessionUser(),e)))}),self.addEventListener("activate",function(e){verifySessionUser(),e.waitUntil(caches.keys().then(e=>Promise.all(e.map(e=>{if(e!==CACHE_NAME)return caches.delete(e)}))))}); 2//# sourceMappingURL=maps/service-worker.js.map
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.