if ('function' === typeof importScripts) {
  importScripts(
'https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js'  );
  /* global workbox */
  if (workbox) {
    console.log('Workbox is loaded');

    /* injection point for manifest files.  */
    workbox.precaching.precacheAndRoute([
  {
    "url": "images/icons/icon-128x128.png",
    "revision": "9b65ec1999eabc1e5a6e0ddddb2df761"
  },
  {
    "url": "images/icons/icon-144x144.png",
    "revision": "bc2686d9affbea818c51618a9e2904b3"
  },
  {
    "url": "images/icons/icon-152x152.png",
    "revision": "26cb72d6b00dc76ac7d0248c78120388"
  },
  {
    "url": "images/icons/icon-192x192.png",
    "revision": "aa917ae9ad0dccfcc3c739dc3a9e79e1"
  },
  {
    "url": "images/icons/icon-384x384.png",
    "revision": "9eb6aa6158756031252cc644879fc79a"
  },
  {
    "url": "images/icons/icon-512x512.png",
    "revision": "6fcced46b18d87741590ec24f21cbd6c"
  },
  {
    "url": "images/icons/icon-72x72.png",
    "revision": "a6fdc2f52799f5a48d696a04b50c9bc9"
  },
  {
    "url": "images/icons/icon-96x96.png",
    "revision": "7a9350d989f30c41bb7b45d69400db92"
  },
  {
    "url": "index.html",
    "revision": "f4a90d3cf009d3b904428a00025faa8d"
  },
  {
    "url": "precache-manifest.bfef958d89be7c1593bab4dcdfa213c3.js",
    "revision": "bfef958d89be7c1593bab4dcdfa213c3"
  },
  {
    "url": "service-worker.js",
    "revision": "4b04e737bab58b35638463744a015007"
  },
  {
    "url": "static/css/2.ebaa34e2.chunk.css",
    "revision": "46dd80a5c985f803d6b633ea45cee588"
  },
  {
    "url": "static/css/main.6b61a5d0.chunk.css",
    "revision": "7edcb7fcf17f900ab607bf9c18f5c534"
  },
  {
    "url": "static/js/2.48f87f05.chunk.js",
    "revision": "eb80ef224014ba939283fa0a9450bf03"
  },
  {
    "url": "static/js/main.7a47a5be.chunk.js",
    "revision": "ebc5f089f166c92bb5f7f823ac02fd87"
  },
  {
    "url": "static/js/runtime~main.a8a9905a.js",
    "revision": "238c9148d722c1b6291779bd879837a1"
  }
]);

/* custom cache rules*/
workbox.routing.registerNavigationRoute('/index.html', {
      blacklist: [/^\/_/, /\/[^\/]+\.[^\/]+$/],
    });

workbox.routing.registerRoute(
      /\.(?:png|gif|jpg|jpeg)$/,
      new workbox.strategies.CacheFirst({
        cacheName: 'images',
        plugins: [
          new workbox.expiration.Plugin({
            maxEntries: 60,
            maxAgeSeconds: 30 * 24 * 60 * 60, // 30 Days
          }),
        ],
      })
    );

} else {
    console.log('Workbox could not be loaded. No Offline support');
  }
}