tldraw/public/sw.js
2021-06-17 12:26:20 +01:00

1 line
7.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let s=Promise.resolve();return n[e]||(s=new Promise((async s=>{if("document"in self){const n=document.createElement("script");n.src=e,document.head.appendChild(n),n.onload=s}else importScripts(e),s()}))),s.then((()=>{if(!n[e])throw new Error(`Module ${e} didnt register its module`);return n[e]}))},s=(s,n)=>{Promise.all(s.map(e)).then((e=>n(1===e.length?e[0]:e)))},n={require:Promise.resolve(s)};self.define=(s,r,t)=>{n[s]||(n[s]=Promise.resolve().then((()=>{let n={};const i={uri:location.origin+s.slice(1)};return Promise.all(r.map((s=>{switch(s){case"exports":return n;case"module":return i;default:return e(s)}}))).then((e=>{const s=t(...e);return n.default||(n.default=s),n}))})))}}define("./sw.js",["./workbox-ea903bce"],(function(e){"use strict";importScripts("worker-sTsqr_RdML8Zn1Mtf4L93.js"),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/VerveineRegular.woff",revision:"858cc7add1765cbcfb0439e275fd167b"},{url:"/_next/static/chunks/245.ce5b9e5f7458bab9f385.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/277.403407e826b90878290c.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/288-927c4239253e14719742.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/37bf9728.224964ff38fcbeae11e1.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/413.cabdee2786cc1cfc278b.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/433-caf2f02f06da9ebe6b55.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/448.9037d63f8ab3e56d4175.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/4c8073aa.2bde4c2edac6a89dc162.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/58917679.c9a296fa294d3d63f7ec.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/605.899dd2ae3f7eeccd53d5.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/64f69659.89e250a93e362eaeb785.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/725.6d0b06d94720e004bf3e.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/768.9668a986d8ee7e8682eb.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/82c1d43a.7bd74b5f0c5e3e0e5142.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/847.f08e8fc00be4d1df0436.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/94.4be39486bdfd850e158f.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/945.793b89ac0f97173af2b2.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/965.f6f31a813cda47c0aa44.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/commons-74dcbb4d31f829044ba6.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/d67bd397.b6201376af6acbfcfd19.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/ee9ce975.86aa96caa4da7c6c2d4b.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/fc6701f7.e6c2fae6a1cd875ac87b.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/framework-0937f3836f2e952792fe.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/main-b92da9bc7e7c9efef0b7.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/pages/_app-d079eb0170fdb9ba1b3e.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/pages/_error-f717ec1d85219d4720aa.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/pages/index-831e74c79b91ae77f1ad.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/polyfills-8683bd742a84c1edd48c.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/chunks/webpack-9d15dacb38c39b5bd50b.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/css/50297e5ab72b54dddbcb.css",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/sTsqr_RdML8Zn1Mtf4L93/_buildManifest.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/_next/static/sTsqr_RdML8Zn1Mtf4L93/_ssgManifest.js",revision:"sTsqr_RdML8Zn1Mtf4L93"},{url:"/android-chrome-192x192.png",revision:"0fd386edd39acea9fa31b4dac03e0e07"},{url:"/android-chrome-512x512.png",revision:"44da99a558c07596c306d4e714befd28"},{url:"/android-icon-144x144.png",revision:"6e9fe5076295cac45cd6f4d3e7f08f6f"},{url:"/android-icon-168x168.png",revision:"3fe7934e2dc81ef7456797201a65c558"},{url:"/android-icon-48x48.png",revision:"f25802841897e0ca547e5d42c513d585"},{url:"/android-icon-72x72.png",revision:"68e29e32526d47b7b415ae18476cd819"},{url:"/android-icon-96x96.png",revision:"7fb410577d10537f9a8ee605afd8f157"},{url:"/apple-touch-icon.png",revision:"42e1ccd90009f853c1654199ab51e9e8"},{url:"/favicon-16x16.png",revision:"bc0808eb6d4a028ed5e82a1b3870e12f"},{url:"/favicon-32x32.png",revision:"9aef18bbed942511815b576802c319bd"},{url:"/favicon.ico",revision:"694c8c5bc32a1f2843e5ede096afaa0e"},{url:"/icons/grab.svg",revision:"a1ca9e5c31d1edd2558ab075f72fde4e"},{url:"/icons/pointer.svg",revision:"dff260f896fe23adb83341639fdf93be"},{url:"/icons/resize.svg",revision:"0a3cb701d15731e25919783801d18f95"},{url:"/manifest.json",revision:"ebe4513d4f6223d063881ffaf4341b34"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:r})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:mp3|mp4)$/i,new e.StaleWhileRevalidate({cacheName:"static-media-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")}),new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET"),e.registerRoute((({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")}),new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400,purgeOnQuotaError:!0})]}),"GET")}));