forked from mystiq/hydrogen-web
1 line
No EOL
19 KiB
Text
1 line
No EOL
19 KiB
Text
{"version":3,"file":"sw.js","sources":["../src/platform/web/assets/icon.png?url","../src/platform/web/sw.js"],"sourcesContent":["export default \"__VITE_ASSET__2a39c64c__\"","/*\nCopyright 2020 Bruno Windels <bruno@windels.cloud>\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport NOTIFICATION_BADGE_ICON from \"./assets/icon.png?url\";\n// replaced by the service worker build plugin\nconst UNHASHED_PRECACHED_ASSETS = DEFINE_UNHASHED_PRECACHED_ASSETS;\nconst HASHED_PRECACHED_ASSETS = DEFINE_HASHED_PRECACHED_ASSETS;\nconst HASHED_CACHED_ON_REQUEST_ASSETS = DEFINE_HASHED_CACHED_ON_REQUEST_ASSETS;\n\nconst unhashedCacheName = `hydrogen-assets-${DEFINE_GLOBAL_HASH}`;\nconst hashedCacheName = `hydrogen-assets`;\nconst mediaThumbnailCacheName = `hydrogen-media-thumbnails-v2`;\n\nself.addEventListener('install', function(e) {\n e.waitUntil((async () => {\n const unhashedCache = await caches.open(unhashedCacheName);\n await unhashedCache.addAll(UNHASHED_PRECACHED_ASSETS);\n const hashedCache = await caches.open(hashedCacheName);\n await Promise.all(HASHED_PRECACHED_ASSETS.map(async asset => {\n if (!await hashedCache.match(asset)) {\n await hashedCache.add(asset);\n }\n }));\n })());\n});\n\nself.addEventListener('activate', (event) => {\n // on a first page load/sw install,\n // start using the service worker on all pages straight away\n self.clients.claim();\n event.waitUntil(purgeOldCaches());\n});\n\nasync function purgeOldCaches() {\n // remove any caches we don't know about\n const keyList = await caches.keys();\n for (const key of keyList) {\n if (key !== unhashedCacheName && key !== hashedCacheName && key !== mediaThumbnailCacheName) {\n await caches.delete(key);\n }\n }\n // remove the cache for any old hashed resource\n const hashedCache = await caches.open(hashedCacheName);\n const keys = await hashedCache.keys();\n const hashedAssetURLs =\n HASHED_PRECACHED_ASSETS\n .concat(HASHED_CACHED_ON_REQUEST_ASSETS)\n .map(a => new URL(a, self.registration.scope).href);\n\n for (const request of keys) {\n if (!hashedAssetURLs.some(url => url === request.url)) {\n hashedCache.delete(request);\n }\n }\n}\n\nself.addEventListener('fetch', (event) => {\n /*\n service worker shouldn't handle xhr uploads because otherwise\n the progress events won't fire.\n This has to do with xhr not being supported in service workers.\n */\n if (event.request.method === \"GET\") {\n event.respondWith(handleRequest(event.request));\n }\n});\n\nfunction isCacheableThumbnail(url) {\n if (url.pathname.startsWith(\"/_matrix/media/r0/thumbnail/\")) {\n const width = parseInt(url.searchParams.get(\"width\"), 10);\n const height = parseInt(url.searchParams.get(\"height\"), 10);\n if (width <= 50 && height <= 50) {\n return true;\n }\n }\n return false;\n}\n\nconst baseURL = new URL(self.registration.scope);\nlet pendingFetchAbortController = new AbortController();\n\nasync function handleRequest(request) {\n try {\n if (request.url.includes(\"config.json\") || /theme-.+\\.json/.test(request.url)) {\n return handleStaleWhileRevalidateRequest(request);\n }\n const url = new URL(request.url);\n // rewrite / to /index.html so it hits the cache\n if (url.origin === baseURL.origin && url.pathname === baseURL.pathname) {\n request = new Request(new URL(\"index.html\", baseURL.href));\n }\n let response = await readCache(request);\n if (!response) {\n // use cors so the resource in the cache isn't opaque and uses up to 7mb\n // https://developers.google.com/web/tools/chrome-devtools/progressive-web-apps?utm_source=devtools#opaque-responses\n if (isCacheableThumbnail(url)) {\n response = await fetch(request, {signal: pendingFetchAbortController.signal, mode: \"cors\", credentials: \"omit\"});\n } else {\n response = await fetch(request, {signal: pendingFetchAbortController.signal});\n }\n await updateCache(request, response);\n }\n return response;\n } catch (err) {\n if (err.name !== \"TypeError\" && err.name !== \"AbortError\") {\n console.error(\"error in service worker\", err);\n }\n throw err;\n }\n}\n\n/**\n * Stale-while-revalidate caching for certain files\n * see https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale-while-revalidate\n */\nasync function handleStaleWhileRevalidateRequest(request) {\n let response = await readCache(request);\n const networkResponsePromise = fetchAndUpdateCache(request);\n if (response) {\n return response;\n } else {\n return await networkResponsePromise;\n }\n}\n\nasync function fetchAndUpdateCache(request) {\n const response = await fetch(request, {\n signal: pendingFetchAbortController.signal,\n headers: {\n \"Cache-Control\": \"no-cache\",\n },\n });\n updateCache(request, response.clone());\n return response;\n}\n\nasync function updateCache(request, response) {\n // don't write error responses to the cache\n if (response.status >= 400) {\n return;\n }\n const url = new URL(request.url);\n const baseURL = self.registration.scope;\n if (isCacheableThumbnail(url)) {\n const cache = await caches.open(mediaThumbnailCacheName);\n cache.put(request, response.clone());\n } else if (request.url.startsWith(baseURL)) {\n let assetName = request.url.substr(baseURL.length);\n let cacheName;\n if (HASHED_CACHED_ON_REQUEST_ASSETS.includes(assetName)) {\n cacheName = hashedCacheName;\n } else if (UNHASHED_PRECACHED_ASSETS.includes(assetName)) {\n cacheName = unhashedCacheName;\n }\n if (cacheName) {\n const cache = await caches.open(cacheName);\n await cache.put(request, response.clone());\n }\n }\n}\n\nasync function readCache(request) {\n const unhashedCache = await caches.open(unhashedCacheName);\n let response = await unhashedCache.match(request);\n if (response) {\n return response;\n }\n const hashedCache = await caches.open(hashedCacheName);\n response = await hashedCache.match(request);\n if (response) {\n return response;\n }\n \n const url = new URL(request.url);\n if (isCacheableThumbnail(url)) {\n const mediaThumbnailCache = await caches.open(mediaThumbnailCacheName);\n response = await mediaThumbnailCache.match(request);\n // added in 0.1.26, remove previously cached error responses, remove this in some time\n if (response?.status >= 400) {\n await mediaThumbnailCache.delete(request);\n response = null;\n }\n }\n return response;\n}\n\nself.addEventListener('message', (event) => {\n const reply = payload => event.source.postMessage({replyTo: event.data.id, payload});\n const {replyTo} = event.data;\n if (replyTo) {\n const resolve = pendingReplies.get(replyTo);\n if (resolve) {\n pendingReplies.delete(replyTo);\n resolve(event.data.payload);\n }\n } else {\n switch (event.data?.type) {\n case \"version\":\n reply({version: DEFINE_VERSION, buildHash: DEFINE_GLOBAL_HASH});\n break;\n case \"skipWaiting\":\n self.skipWaiting();\n break;\n case \"haltRequests\":\n event.waitUntil(haltRequests().finally(() => reply()));\n break;\n case \"closeSession\":\n event.waitUntil(\n closeSession(event.data.payload.sessionId, event.source.id)\n .finally(() => reply())\n );\n break;\n }\n }\n});\n\nconst NOTIF_TAG_NEW_MESSAGE = \"new_message\";\n\nasync function openClientFromNotif(event) {\n if (event.notification.tag !== NOTIF_TAG_NEW_MESSAGE) {\n console.log(\"clicked notif with tag\", event.notification.tag);\n return;\n }\n const {sessionId, roomId} = event.notification.data;\n const sessionHash = `#/session/${sessionId}`;\n const roomHash = `${sessionHash}/room/${roomId}`;\n const clientWithSession = await findClient(async client => {\n return await sendAndWaitForReply(client, \"hasSessionOpen\", {sessionId});\n });\n if (clientWithSession) {\n console.log(\"notificationclick: client has session open, showing room there\");\n // use a message rather than clientWithSession.navigate here as this refreshes the page on chrome\n clientWithSession.postMessage({type: \"openRoom\", payload: {roomId}});\n if ('focus' in clientWithSession) {\n try {\n await clientWithSession.focus();\n } catch (err) { console.error(err); } // I've had this throw on me on Android\n }\n } else if (self.clients.openWindow) {\n console.log(\"notificationclick: no client found with session open, opening new window\");\n const roomURL = new URL(`./${roomHash}`, baseURL).href;\n await self.clients.openWindow(roomURL);\n }\n}\n\nself.addEventListener('notificationclick', event => {\n event.notification.close();\n event.waitUntil(openClientFromNotif(event));\n});\n\nasync function handlePushNotification(n) {\n console.log(\"got a push message\", n);\n const sessionId = n.session_id;\n let sender = n.sender_display_name || n.sender;\n if (sender && n.event_id) {\n const roomId = n.room_id;\n const hasFocusedClientOnRoom = !!await findClient(async client => {\n if (client.visibilityState === \"visible\" && client.focused) {\n return await sendAndWaitForReply(client, \"hasRoomOpen\", {sessionId, roomId});\n }\n });\n if (hasFocusedClientOnRoom) {\n console.log(\"client is focused, room is open, don't show notif\");\n return;\n }\n const newMessageNotifs = Array.from(await self.registration.getNotifications({tag: NOTIF_TAG_NEW_MESSAGE}));\n const notifsForRoom = newMessageNotifs.filter(n => n.data.roomId === roomId);\n const hasMultiNotification = notifsForRoom.some(n => n.data.multi);\n const hasSingleNotifsForRoom = newMessageNotifs.some(n => !n.data.multi);\n const roomName = n.room_name || n.room_alias;\n let multi = false;\n let label;\n let body;\n if (hasMultiNotification) {\n console.log(\"already have a multi message, don't do anything\");\n return;\n } else if (hasSingleNotifsForRoom) {\n console.log(\"showing multi message notification\");\n multi = true;\n label = roomName || sender;\n body = \"New messages\";\n } else {\n console.log(\"showing new message notification\");\n if (roomName && roomName !== sender) {\n label = `${sender} in ${roomName}`;\n } else {\n label = sender;\n }\n body = n.content?.body || \"New message\";\n }\n await self.registration.showNotification(label, {\n body,\n data: {sessionId, roomId, multi},\n tag: NOTIF_TAG_NEW_MESSAGE,\n badge: NOTIFICATION_BADGE_ICON\n });\n }\n // we could consider hiding previous notifications here based on the unread count\n // (although we can't really figure out which notifications to hide) and also hiding\n // notifications makes it hard to ensure we always show a notification after a push message\n // when no client is visible, see https://goo.gl/yqv4Q4\n}\n\nself.addEventListener('push', event => {\n event.waitUntil(handlePushNotification(event.data.json()));\n});\n\nasync function closeSession(sessionId, requestingClientId) {\n const clients = await self.clients.matchAll();\n await Promise.all(clients.map(async client => {\n if (client.id !== requestingClientId) {\n await sendAndWaitForReply(client, \"closeSession\", {sessionId});\n }\n }));\n}\n\nasync function haltRequests() {\n // first ask all clients to block sending any more requests\n const clients = await self.clients.matchAll({type: \"window\"});\n await Promise.all(clients.map(client => {\n return sendAndWaitForReply(client, \"haltRequests\");\n }));\n // and only then abort the current requests\n pendingFetchAbortController.abort();\n}\n\nconst pendingReplies = new Map();\nlet messageIdCounter = 0;\nfunction sendAndWaitForReply(client, type, payload) {\n messageIdCounter += 1;\n const id = messageIdCounter;\n const promise = new Promise(resolve => {\n pendingReplies.set(id, resolve);\n });\n client.postMessage({type, id, payload});\n return promise;\n}\n\nasync function findClient(predicate) {\n const clientList = await self.clients.matchAll({type: \"window\"});\n for (const client of clientList) {\n if (await predicate(client)) {\n return client;\n }\n }\n}\n"],"names":[],"mappings":"AAAA,GAAe,GAAA,6BCmBf,KAAM,GAA4B,oCAC5B,EAA0B,kCAC1B,EAAkC,0CAElC,EAAoB,mBAAmB,OAAA,oBAAA,IACvC,EAAkB,kBAClB,EAA0B,+BAEhC,KAAK,iBAAiB,UAAW,SAAS,EAAG,CACzC,EAAE,UAAW,UAAY,CAErB,KAAM,AADgB,MAAM,QAAO,KAAK,CAAiB,GACrC,OAAO,CAAyB,EACpD,KAAM,GAAc,KAAM,QAAO,KAAK,CAAe,EACrD,KAAM,SAAQ,IAAI,EAAwB,IAAI,KAAM,IAAS,CACzD,AAAK,KAAM,GAAY,MAAM,CAAK,GAC9B,KAAM,GAAY,IAAI,CAAK,CAElC,CAAA,CAAC,CACL,GAAA,CAAG,CACR,CAAC,EAED,KAAK,iBAAiB,WAAY,AAAC,GAAU,CAGzC,KAAK,QAAQ,QACb,EAAM,UAAU,EAAc,CAAE,CACpC,CAAC,EAED,kBAAgC,CAE5B,KAAM,GAAU,KAAM,QAAO,OAC7B,SAAW,KAAO,GACd,AAAI,IAAQ,GAAqB,IAAQ,GAAmB,IAAQ,GAChE,KAAM,QAAO,OAAO,CAAG,EAI/B,KAAM,GAAc,KAAM,QAAO,KAAK,CAAe,EAC/C,EAAO,KAAM,GAAY,OACzB,EACF,EACC,OAAO,CAA+B,EACtC,IAAI,GAAK,GAAI,KAAI,EAAG,KAAK,aAAa,KAAK,EAAE,IAAI,EAEtD,SAAW,KAAW,GAClB,AAAK,EAAgB,KAAK,GAAO,IAAQ,EAAQ,GAAG,GAChD,EAAY,OAAO,CAAO,CAGtC,CAEA,KAAK,iBAAiB,QAAS,AAAC,GAAU,C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