PageSourceSearch

https://applied-rl-course.netlify.app/sw.js

js applied-rl-course.netlify.app collected 2026-10-03 10:27:52 UTC 3,665 bytes, 117 lines download raw bytes

1/**
2 * Welcome to your Workbox-powered service worker!
3 *
4 * You'll need to register this file in your web app and you should
5 * disable HTTP caching for this file too.
6 * See https://goo.gl/nhQhGp
7 *
8 * The rest of the code is auto-generated. Please don't update this file
9 * directly; instead, make changes to your Workbox build configuration
10 * and re-run your build process.
11 * See https://goo.gl/2aRDsh
12 */
13
14importScripts("workbox-v3.6.3/workbox-sw.js");
15workbox.setConfig({modulePathPrefix: "workbox-v3.6.3"});
16
17workbox.core.setCacheNameDetails({prefix: "gatsby-plugin-offline"});
18
19workbox.skipWaiting();
20workbox.clientsClaim();
21
22/**
23 * The workboxSW.precacheAndRoute() method efficiently caches and responds to
24 * requests for URLs in the manifest.
25 * See https://goo.gl/S9QRab
26 */
27self.__precacheManifest = [
28  {
29    "url": "webpack-runtime-a3934dc7c30d15ef9ba4.js"
30  },
31  {
32    "url": "styles.ed814c15158275760b01.css"
33  },
34  {
35    "url": "styles-9b6f388623a2ec93d35f.js"
36  },
37  {
38    "url": "framework-b99e5b06d0e81c14e224.js"
39  },
40  {
41    "url": "edea2dd3-c949fa54f90f15cb4531.js"
42  },
43  {
44    "url": "d659406a-eefdd0a9685ee2bbfd72.js"
45  },
46  {
47    "url": "f65a48b9-b5da10f0d862fb34fe4d.js"
48  },
49  {
50    "url": "d9c63220-0fc514e12e5334942118.js"
51  },
52  {
53    "url": "component---node-modules-gatsby-plugin-offline-app-shell-js-45bf683116d53a0b962c.js"
54  },
55  {
56    "url": "offline-plugin-app-shell-fallback/index.html",
57    "revision": "4c99206f8d0763d69f1db63fd1fac834"
58  },
59  {
60    "url": "manifest.webmanifest",
61    "revision": "98c7f349928eed18fd18418b4accc536"
62  }
63].concat(self.__precacheManifest || []);
64workbox.precaching.suppressWarnings();
65workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
66
67workbox.routing.registerRoute(/(\.js$|\.css$|static\/)/, workbox.strategies.cacheFirst(), 'GET');
68workbox.routing.registerRoute(/^https?:.*\page-data\/.*\/page-data\.json/, workbox.strategies.networkFirst(), 'GET');
69workbox.routing.registerRoute(/^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, workbox.strategies.staleWhileRevalidate(), 'GET');
70workbox.routing.registerRoute(/^https?:\/\/fonts\.googleapis\.com\/css/, workbox.strategies.staleWhileRevalidate(), 'GET');
71
72/* global importScripts, workbox, idbKeyval */
73
74importScripts(`idb-keyval-iife.min.js`)
75
76const { NavigationRoute } = workbox.routing
77
78const navigationRoute = new NavigationRoute(async ({ event }) => {
79  let { pathname } = new URL(event.request.url)
80  pathname = pathname.replace(new RegExp(`^`), ``)
81
82  // Check for resources + the app bundle
83  // The latter may not exist if the SW is updating to a new version
84  const resources = await idbKeyval.get(`resources:${pathname}`)
85  if (!resources || !(await caches.match(`/app-34db07faaa268db1b9da.js`))) {
86    return await fetch(event.request)
87  }
88
89  for (const resource of resources) {
90    // As soon as we detect a failed resource, fetch the entire page from
91    // network - that way we won't risk being in an inconsistent state with
92    // some parts of the page failing.
93    if (!(await caches.match(resource))) {
94      return await fetch(event.request)
95    }
96  }
97
98  const offlineShell = `/offline-plugin-app-shell-fallback/index.html`
99  return await caches.match(offlineShell)
100})
101
102workbox.routing.registerRoute(navigationRoute)
103
104const messageApi = {
105  setPathResources(event, { path, resources }) {
106    event.waitUntil(idbKeyval.set(`resources:${path}`, resources))
107  },
108
109  clearPathResources(event) {
110    event.waitUntil(idbKeyval.clear())
111  },
112}
113
114self.addEventListener(`message`, event => {
115  const { gatsbyApi } = event.data
116  if (gatsbyApi) messageApi[gatsbyApi](event, event.data)
117})

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.