-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsw.js
More file actions
1 lines (1 loc) · 1.76 KB
/
sw.js
File metadata and controls
1 lines (1 loc) · 1.76 KB
1
if(!self.define){let e,s={};const n=(n,t)=>(n=new URL(n+".js",t).href,s[n]||new Promise((s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()})).then((()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e})));self.define=(t,i)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let o={};const r=e=>n(e,c),u={module:{uri:c},exports:o,require:r};s[c]=Promise.all(t.map((e=>u[e]||r(e)))).then((e=>(i(...e),o)))}}define(["./workbox-4f46c945"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"icon-192.png",revision:"eee92895d0f904366869de2cc8073ecf"},{url:"icon-512.png",revision:"433a681c987fc50ea949388c238e4e07"},{url:"manifest.webmanifest",revision:"1b1f425ad9e76da430c64a04942c2d08"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html"),{denylist:[/^\/entry\//]})),e.registerRoute((({request:e})=>"script"===e.destination||"style"===e.destination),new e.NetworkFirst({cacheName:"static-resources",networkTimeoutSeconds:3,plugins:[new e.ExpirationPlugin({maxEntries:100,maxAgeSeconds:604800}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({request:e})=>"image"===e.destination),new e.CacheFirst({cacheName:"images",plugins:[new e.ExpirationPlugin({maxEntries:60,maxAgeSeconds:2592e3}),new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET"),e.registerRoute((({request:e})=>"document"===e.destination),new e.NetworkFirst({cacheName:"documents",networkTimeoutSeconds:5,plugins:[new e.CacheableResponsePlugin({statuses:[0,200]})]}),"GET")}));