Built 9 directories

Directories:
  animations/web
  provider_shopper/web
  charts/web
  filipino_cuisine/web
  github_dataviz/web
  particle_background/web
  slide_puzzle/web
  timeflow/web
  vision_challenge/web

Branch: fix-sample-index-build
Commit: fddbee1c87 (dirty)

package:peanut 3.5.1
pull/687/head
John Ryan 4 years ago
parent 7edcb02cab
commit a4c53e7bff

@ -19,6 +19,7 @@ create_a_horizontal_list.html
create_and_style_a_text_field.html
create_lists_with_different_types_of_items.html
description.dart.js
dice.html
display_a_snackbar.html
display_images_from_the_internet.html
export_fonts_from_a_package.html
@ -149,6 +150,8 @@ images/cookbook/validation.png
images/cookbook/validation_thumb.png
images/cookbook/web-sockets.png
images/cookbook/web-sockets_thumb.png
images/dice.png
images/dice_thumb.png
images/filipino_cuisine1.png
images/filipino_cuisine1_thumb.png
images/flutter_maps_firestore1.png

File diff suppressed because one or more lines are too long

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Flutter samples</title>
<link href="styles.css" rel="stylesheet" media="screen">
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Google+Sans+Display|Roboto:300,400,500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="packages/mdc_web/material-components-web.min.js"></script>
<script defer src="description.dart.js"></script>
</head>
<body>
<div class="content">
<div class="navbar">
<a class="leading" href="./">
<img src="images/logos/logo_lockup_flutter_horizontal_wht_96.png" />
<span class="title">Samples</span>
</a>
<div class="nav-items">
<a href="https://flutter.dev/">Flutter Home</a>
<a href="https://api.flutter.dev/">API Docs</a>
</div>
</div>
<div class="container">
<div class="description-title-row">
<h1>Dice</h1>
<div class="type-label type-label-bordered">demo</div>
</div>
<p>By Jaime Blasco</p>
<div class="toolbar">
<div class="buttons">
<button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://z.flutter.gallery/#/dice';"><span class="mdc-button__ripple"></span> Launch App</button><button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://github.com/jamesblasco/zflutter/blob/master/zflutter/example/lib/examples/dice/dice.dart';">
<div class="mdc-button__ripple"></div>
<i class="material-icons mdc-button__icon" aria-hidden="true">code</i>
<span class="mdc-button__label">Source Code</span>
</button>
</div>
<div class="tags-container">
<div class="tags-label">
<i class="material-icons">local_offer</i>
<span>Tags</span>
</div>
<div class="tags">
<a href="./#?search=tag%3Ademo">demo</a>
<a href="./#?search=tag%3Aanimation">animation</a>
</div>
</div>
</div>
<div class="screenshots">
<img src="images/dice.png" alt="Dice screenshot" />
</div>
<div class="description">
<p>A demo of 3d animation using dice
</p>
</div>
</div>
</div>
</body>
<div class="footer">
<span>© Flutter 2020</span>
</div>
</html>

@ -31,7 +31,7 @@
<p>By Flutter</p>
<div class="toolbar">
<div class="buttons">
<button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://flutter.github.io/gallery';"><span class="mdc-button__ripple"></span> Launch App</button><button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://github.com/flutter/gallery';">
<button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://gallery.flutter.dev';"><span class="mdc-button__ripple"></span> Launch App</button><button class="mdc-button mdc-button--outlined" onclick="window.location.href = 'https://github.com/flutter/gallery';">
<div class="mdc-button__ripple"></div>
<i class="material-icons mdc-button__icon" aria-hidden="true">code</i>
<span class="mdc-button__label">Source Code</span>

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -246,6 +246,17 @@
</div>
</div>
</div>
<div class="mdc-card demo-card mdc-elevation--z0" search-attrs="dice tag:demo demo tag:animation animation platform:web web type:demo">
<div class="mdc-card__primary-action demo-card__primary-action" tabindex="0" href="dice.html">
<div class="mdc-card__media mdc-card__media--16-9 demo-card__media" style="background-image: url('images/dice_thumb.png');"></div>
<div class="demo-card__label type-label">demo</div>
<div class="demo-card__primary">
<h2 class="demo-card__title mdc-typography mdc-typography--headline6">Dice</h2>
</div>
<div class="demo-card__secondary mdc-typography mdc-typography--body2">A demo of 3d animation using dice
</div>
</div>
</div>
<div class="mdc-card demo-card mdc-elevation--z0" search-attrs="animate a page route transition tag:cookbook cookbook tag:animation animation type:cookbook">
<div class="mdc-card__primary-action demo-card__primary-action" tabindex="0" href="animate_a_page_route_transition.html">
<div class="mdc-card__media mdc-card__media--16-9 demo-card__media" style="background-image: url('images/cookbook/page-route-animation_thumb.png');"></div>

@ -33,7 +33,22 @@ if (typeof __filename !== "undefined") {
// if we're running in a browser, Dart supports most of this out of box
// make sure we only run these in Node.js environment
if (!dartNodePreambleSelf.window) {
var dartNodeIsActuallyNode = !dartNodePreambleSelf.window
try {
// Check if we're in a Web Worker instead.
if ("undefined" !== typeof WorkerGlobalScope && dartNodePreambleSelf instanceof WorkerGlobalScope) {
dartNodeIsActuallyNode = false;
}
// Check if we're in Electron.
if (dartNodeIsActuallyNode && dartNodePreambleSelf.process && dartNodePreambleSelf.versions && process.versions.hasOwnProperty('electron')) {
dartNodeIsActuallyNode = false;
}
} catch(e) {}
if (dartNodeIsActuallyNode) {
// This line is to:
// 1) Prevent Webpack from bundling.
// 2) In Webpack on Node.js, make sure we're using the native Node.js require, which is available via __non_webpack_require__

@ -1 +1 @@
var dartNodePreambleSelf="undefined"!=typeof global?global:window,self=Object.create(dartNodePreambleSelf);if(self.scheduleImmediate=self.setImmediate?function(e){dartNodePreambleSelf.setImmediate(e)}:function(e){setTimeout(e,0)},self.require=require,self.exports=exports,"undefined"!=typeof process)self.process=process;if("undefined"!=typeof __dirname)self.__dirname=__dirname;if("undefined"!=typeof __filename)self.__filename=__filename;if(!dartNodePreambleSelf.window){var url=("undefined"!=typeof __webpack_require__?__non_webpack_require__:require)("url");self.location={get href(){if(url.pathToFileURL)return url.pathToFileURL(process.cwd()).href+"/";else return"file://"+function(){var e=process.cwd();if("win32"!=process.platform)return e;else return"/"+e.replace(/\\/g,"/")}()+"/"}},function(){function e(){try{throw new Error}catch(t){var e=t.stack,r=new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$","mg"),l=null;do{var n=r.exec(e);if(null!=n)l=n}while(null!=n);return l[1]}}var r=null;self.document={get currentScript(){if(null==r)r={src:e()};return r}}}(),self.dartDeferredLibraryLoader=function(e,r,l){try{load(e),r()}catch(e){l(e)}}}
var dartNodePreambleSelf="undefined"!=typeof global?global:window,self=Object.create(dartNodePreambleSelf);if(self.scheduleImmediate=self.setImmediate?function(e){dartNodePreambleSelf.setImmediate(e)}:function(e){setTimeout(e,0)},self.require=require,self.exports=exports,"undefined"!=typeof process)self.process=process;if("undefined"!=typeof __dirname)self.__dirname=__dirname;if("undefined"!=typeof __filename)self.__filename=__filename;var dartNodeIsActuallyNode=!dartNodePreambleSelf.window;try{if("undefined"!=typeof WorkerGlobalScope&&dartNodePreambleSelf instanceof WorkerGlobalScope)dartNodeIsActuallyNode=!1;if(dartNodeIsActuallyNode&&dartNodePreambleSelf.process&&dartNodePreambleSelf.versions&&process.versions.hasOwnProperty("electron"))dartNodeIsActuallyNode=!1}catch(e){}if(dartNodeIsActuallyNode){var url=("undefined"!=typeof __webpack_require__?__non_webpack_require__:require)("url");self.location={get href(){if(url.pathToFileURL)return url.pathToFileURL(process.cwd()).href+"/";else return"file://"+function(){var e=process.cwd();if("win32"!=process.platform)return e;else return"/"+e.replace(/\\/g,"/")}()+"/"}},function(){function e(){try{throw new Error}catch(o){var e=o.stack,r=new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$","mg"),l=null;do{var t=r.exec(e);if(null!=t)l=t}while(null!=t);return l[1]}}var r=null;self.document={get currentScript(){if(null==r)r={src:e()};return r}}}(),self.dartDeferredLibraryLoader=function(e,r,l){try{load(e),r()}catch(e){l(e)}}}

@ -429,3 +429,19 @@ samples:
tags: ['demo', 'game']
web: web/vision_challenge
type: demo
- name: Dice
author: Jaime Blasco
screenshots:
- url: images/dice.png
alt: Dice screenshot
source: https://github.com/jamesblasco/zflutter/blob/master/zflutter/example/lib/examples/dice/dice.dart
description: >
A demo of 3d animation using dice
difficulty: advanced
widgets: []
packages: []
platforms: ['web']
tags: ['demo', 'animation']
web: https://z.flutter.gallery/#/dice
type: demo

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -13151,7 +13151,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,12 +5,12 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "e2634995892cc50d32890e8161bed4c4",
"/": "e2634995892cc50d32890e8161bed4c4",
"main.dart.js": "c53a7d978ab58ef14f87dda2c4b650ed",
"main.dart.js": "b5c493edb6bed940e18b2bcf562423bf",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"manifest.json": "1294ed65db20bc1191041c5e3a73d8f9",
"assets/LICENSE": "a45abf0d0f485d85e4064c1429d8ae12",
"assets/AssetManifest.json": "23bb7325c9c562fafc5c7888b9c1a36f",
"assets/NOTICES": "598feb42c9f4a16af6875af1fd832d9e",
"assets/FontManifest.json": "01700ba55b08a6141f33e168c4a6c22f",
"assets/packages/cupertino_icons/assets/CupertinoIcons.ttf": "115e937bb829a890521f72d2e664b632",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
@ -25,8 +25,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -36,7 +36,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -55,6 +56,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -104,6 +106,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -112,8 +118,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -122,3 +130,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -13089,7 +13089,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "4d6feb643eddbc9dcf4eba259ab4c373",
"assets/LICENSE": "e535a852cb6a68ffc12a2bf69009a974",
"main.dart.js": "2a6b742fecaf9a9e352c56b30042a325",
"assets/AssetManifest.json": "e9760aff26d7236650b16d3f72345665",
"assets/NOTICES": "793d18e2c77026e4e0eb88f7bd8ae556",
"assets/FontManifest.json": "580ff1a5d08679ded8fcf5c6848cece7",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
"assets/assets/preview.png": "c097a5e6dc82ffff6c6a7ddb0a6995ec"
@ -16,8 +16,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -27,7 +27,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -46,6 +47,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -95,6 +97,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -103,8 +109,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -113,3 +121,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -13123,7 +13123,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "131562ad5ba302b9bf28375f35d3cafc",
"assets/LICENSE": "bb8f420b3f8a3c75026aed8b3a294101",
"main.dart.js": "7dcd6a5ddecd7a7de53b0ff90c8f3ef7",
"assets/AssetManifest.json": "9a9dc0fcf13a169b21599ded2002d794",
"assets/NOTICES": "b48591b7114c518432ec540d16de5120",
"assets/FontManifest.json": "3c5f459c429d13fe7072fe429f68b654",
"assets/fonts/Arkipelago.otf": "8d60d9104579c47ed7aed99f61cba541",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
@ -52,8 +52,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -63,7 +63,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -82,6 +83,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -131,6 +133,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -139,8 +145,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -149,3 +157,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -12947,7 +12947,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "0687efebad1158054a896e13e4fad5b7",
"assets/LICENSE": "3bd7cd76d67a9f1f4b2dc6b5debc48d4",
"main.dart.js": "29b3e1963aac9c8ce7dfb5dfe7edc287",
"assets/AssetManifest.json": "7ac1367789abe6eed8ffe5db603b0604",
"assets/NOTICES": "bd3ce89fe7d5ad0e1cb691fa0e9d57e0",
"assets/FontManifest.json": "d751713988987e9331980363e24189ce",
"assets/assets/preview.png": "f41b57a2a2dab8d74ade52f9175b4a59",
"assets/github_data/contributors.json": "4f7b5d7640ca5ab67ee419df55a4833f",
@ -21,8 +21,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -32,7 +32,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -51,6 +52,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -100,6 +102,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -108,8 +114,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -118,3 +126,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -12845,7 +12845,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "f9874eab0eb6eea631da942dc9577462",
"assets/LICENSE": "73330a6953dd3ee5b5ada764dec4424b",
"main.dart.js": "9a591a4c2ca60e6623385ff3ae9261b0",
"assets/AssetManifest.json": "e9760aff26d7236650b16d3f72345665",
"assets/NOTICES": "8717db18935bf06f08b7dc8a851e2f05",
"assets/FontManifest.json": "d751713988987e9331980363e24189ce",
"assets/assets/preview.png": "6b10c71454f2d3eb2d2d867c656607ef"
};
@ -15,8 +15,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -26,7 +26,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -45,6 +46,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -94,6 +96,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -102,8 +108,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -112,3 +120,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -13151,7 +13151,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,12 +5,12 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "32a753cd40727968c29938c1c32a2fe2",
"/": "32a753cd40727968c29938c1c32a2fe2",
"main.dart.js": "33c3272b324c4ef2e5c08141ceddbe37",
"main.dart.js": "21eae6fb34f2ff7e5e749235dd07d16e",
"icons/Icon-192.png": "ac9a721a12bbc803b44f645561ecb1e1",
"icons/Icon-512.png": "96e752610906ba2a93c65f8abe1645f1",
"manifest.json": "5bfaa8407b6bbc7d3ec933b8243f9786",
"assets/LICENSE": "b208994aa57ebba48b42c4fcdb56f5fe",
"assets/AssetManifest.json": "3a1a25fc13ec0260a7852156dbee4d3d",
"assets/NOTICES": "314b5d373b78c4e79eaa42707baacc59",
"assets/FontManifest.json": "0a8d34b221a73ebaa0b1afbffbba0193",
"assets/fonts/Corben/Corben-Bold.ttf": "8f9921f9c52d3c25fd354d6e01f7b024",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16"
@ -19,8 +19,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -30,7 +30,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -49,6 +50,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -98,6 +100,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -106,8 +112,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -116,3 +124,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -13403,7 +13403,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,11 +5,11 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "9c473ce14d9afeb3525b5e9ea752c013",
"/": "9c473ce14d9afeb3525b5e9ea752c013",
"main.dart.js": "98cb44131576f052483405ef1c4e0c10",
"assets/LICENSE": "a4d300ed24ee55e63964ae71d7429a59",
"main.dart.js": "6de0cc27b62724faeb293a6e79064d92",
"assets/asset/seattle.jpg": "b3497f8c3eac62f0f696e9423be862a0",
"assets/asset/fonts/plaster/Plaster-Regular.ttf": "3bdb6c45e898b254e76cd6c164850f94",
"assets/AssetManifest.json": "ecb4d39e576209dc5ae70fad278c3df6",
"assets/NOTICES": "9053f47b719336e01c65c0ddf1f5ea69",
"assets/FontManifest.json": "a397d647e4c43d7aa824b52dd59799bd",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16"
};
@ -17,8 +17,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -28,7 +28,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -47,6 +48,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -96,6 +98,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -104,8 +110,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -114,3 +122,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -12837,7 +12837,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "de0677543081531c9e13fe65d78b7d99",
"assets/LICENSE": "561584461634ad3b3da48f6b37dd7910",
"main.dart.js": "df5d0a3793bc75d8e3e5e5458f39cea2",
"assets/AssetManifest.json": "e9760aff26d7236650b16d3f72345665",
"assets/NOTICES": "87896075f082b6554db86d4c3e154fd3",
"assets/FontManifest.json": "580ff1a5d08679ded8fcf5c6848cece7",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
"assets/assets/preview.png": "84a7314976da474e68875dcf8e35cd1b"
@ -16,8 +16,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -27,7 +27,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -46,6 +47,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -95,6 +97,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -103,8 +109,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -113,3 +121,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
0a559f8757192e3baa707a138701458a
a5966345dd5304f5d8975d226499a4dc

@ -12898,7 +12898,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
vulkanmemoryallocator
Copyright (c) 2017-2018 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -5,9 +5,9 @@ const CACHE_NAME = 'flutter-app-cache';
const RESOURCES = {
"index.html": "51839f812a32cce7ac40ca488295da30",
"/": "51839f812a32cce7ac40ca488295da30",
"main.dart.js": "4d6ec2b4fd2009ca0d084751f77d6fcd",
"assets/LICENSE": "214b42b1da140cbb9f54bc2f61ee17e4",
"main.dart.js": "f462e5b2375e9a8e13cb3499a2e2aa7a",
"assets/AssetManifest.json": "752c8e3f4304d36d239f2c923af773c1",
"assets/NOTICES": "d8442869e5d1469fee1fb33505ba9adf",
"assets/FontManifest.json": "580ff1a5d08679ded8fcf5c6848cece7",
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
"assets/assets/preview.png": "b743324f80ce372be751c15d192bf08b",
@ -25,8 +25,8 @@ const RESOURCES = {
// The application shell files that are downloaded before a service worker can
// start.
const CORE = [
"main.dart.js",
"/",
"/",
"main.dart.js",
"index.html",
"assets/LICENSE",
"assets/AssetManifest.json",
@ -36,7 +36,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
return cache.addAll(CORE);
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
})
);
});
@ -55,6 +56,7 @@ self.addEventListener("activate", function(event) {
// When there is no prior manifest, clear the entire cache.
if (!manifest) {
await caches.delete(CACHE_NAME);
contentCache = await caches.open(CACHE_NAME);
for (var request of await tempCache.keys()) {
var response = await tempCache.match(request);
await contentCache.put(request, response);
@ -104,6 +106,10 @@ self.addEventListener("activate", function(event) {
self.addEventListener("fetch", (event) => {
var origin = self.location.origin;
var key = event.request.url.substring(origin.length + 1);
// Redirect URLs to the index.html
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
key = '/';
}
// If the URL is not the the RESOURCE list, skip the cache.
if (!RESOURCES[key]) {
return event.respondWith(fetch(event.request));
@ -112,8 +118,10 @@ self.addEventListener("fetch", (event) => {
.then((cache) => {
return cache.match(event.request).then((response) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache.
return response || fetch(event.request).then((response) => {
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
});
@ -122,3 +130,35 @@ self.addEventListener("fetch", (event) => {
);
});
self.addEventListener('message', (event) => {
// SkipWaiting can be used to immediately activate a waiting service worker.
// This will also require a page refresh triggered by the main worker.
if (event.message == 'skipWaiting') {
return self.skipWaiting();
}
if (event.message = 'downloadOffline') {
downloadOffline();
}
});
// Download offline will check the RESOURCES for all files not in the cache
// and populate them.
async function downloadOffline() {
var resources = [];
var contentCache = await caches.open(CACHE_NAME);
var currentContent = {};
for (var request of await contentCache.keys()) {
var key = request.url.substring(origin.length + 1);
if (key == "") {
key = "/";
}
currentContent[key] = true;
}
for (var resourceKey in Object.keys(RESOURCES)) {
if (!currentContent[resourceKey]) {
resources.add(resourceKey);
}
}
return Cache.addAll(resources);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save