@nypl/web-reader 3.2.4 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -174,12 +174,77 @@ var cacheNames = {
174
174
  }
175
175
  };
176
176
 
177
+ // node_modules/workbox-core/_private/cacheMatchIgnoreParams.js
178
+ function stripParams(fullURL, ignoreParams) {
179
+ const strippedURL = new URL(fullURL);
180
+ for (const param of ignoreParams) {
181
+ strippedURL.searchParams.delete(param);
182
+ }
183
+ return strippedURL.href;
184
+ }
185
+ function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {
186
+ return __async(this, null, function* () {
187
+ const strippedRequestURL = stripParams(request.url, ignoreParams);
188
+ if (request.url === strippedRequestURL) {
189
+ return cache.match(request, matchOptions);
190
+ }
191
+ const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });
192
+ const cacheKeys = yield cache.keys(request, keysOptions);
193
+ for (const cacheKey of cacheKeys) {
194
+ const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);
195
+ if (strippedRequestURL === strippedCacheKeyURL) {
196
+ return cache.match(cacheKey, matchOptions);
197
+ }
198
+ }
199
+ return;
200
+ });
201
+ }
202
+
177
203
  // node_modules/workbox-core/_private/dontWaitFor.js
178
204
  function dontWaitFor(promise) {
179
205
  void promise.then(() => {
180
206
  });
181
207
  }
182
208
 
209
+ // node_modules/workbox-core/_private/Deferred.js
210
+ var Deferred = class {
211
+ constructor() {
212
+ this.promise = new Promise((resolve, reject) => {
213
+ this.resolve = resolve;
214
+ this.reject = reject;
215
+ });
216
+ }
217
+ };
218
+
219
+ // node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js
220
+ function executeQuotaErrorCallbacks() {
221
+ return __async(this, null, function* () {
222
+ if (false) {
223
+ logger.log(`About to run ${quotaErrorCallbacks.size} callbacks to clean up caches.`);
224
+ }
225
+ for (const callback of quotaErrorCallbacks) {
226
+ yield callback();
227
+ if (false) {
228
+ logger.log(callback, "is complete.");
229
+ }
230
+ }
231
+ if (false) {
232
+ logger.log("Finished running callbacks.");
233
+ }
234
+ });
235
+ }
236
+
237
+ // node_modules/workbox-core/_private/getFriendlyURL.js
238
+ var getFriendlyURL = (url) => {
239
+ const urlObj = new URL(String(url), location.href);
240
+ return urlObj.href.replace(new RegExp(`^${location.origin}`), "");
241
+ };
242
+
243
+ // node_modules/workbox-core/_private/timeout.js
244
+ function timeout(ms) {
245
+ return new Promise((resolve) => setTimeout(resolve, ms));
246
+ }
247
+
183
248
  // node_modules/workbox-core/clientsClaim.js
184
249
  function clientsClaim() {
185
250
  self.addEventListener("activate", () => self.clients.claim());
@@ -429,7 +494,9 @@ var CacheTimestampsModel = class {
429
494
  id: this._getId(url)
430
495
  };
431
496
  const db = yield this.getDb();
432
- yield db.put(CACHE_OBJECT_STORE, entry);
497
+ const tx = db.transaction(CACHE_OBJECT_STORE, "readwrite", { durability: "relaxed" });
498
+ yield tx.store.put(entry);
499
+ yield tx.done;
433
500
  });
434
501
  }
435
502
  getTimestamp(url) {
@@ -709,195 +776,9 @@ var ExpirationPlugin = class {
709
776
  }
710
777
  };
711
778
 
712
- // node_modules/workbox-strategies/node_modules/workbox-core/_version.js
713
- try {
714
- self["workbox:core:6.5.3"] && _();
715
- } catch (e) {
716
- }
717
-
718
- // node_modules/workbox-strategies/node_modules/workbox-core/models/messages/messageGenerator.js
719
- var fallback2 = (code, ...args) => {
720
- let msg = code;
721
- if (args.length > 0) {
722
- msg += ` :: ${JSON.stringify(args)}`;
723
- }
724
- return msg;
725
- };
726
- var messageGenerator2 = true ? fallback2 : generatorFunction;
727
-
728
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/WorkboxError.js
729
- var WorkboxError2 = class extends Error {
730
- constructor(errorCode, details) {
731
- const message = messageGenerator2(errorCode, details);
732
- super(message);
733
- this.name = errorCode;
734
- this.details = details;
735
- }
736
- };
737
-
738
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/logger.js
739
- var logger2 = true ? null : (() => {
740
- if (!("__WB_DISABLE_DEV_LOGS" in self)) {
741
- self.__WB_DISABLE_DEV_LOGS = false;
742
- }
743
- let inGroup = false;
744
- const methodToColorMap = {
745
- debug: `#7f8c8d`,
746
- log: `#2ecc71`,
747
- warn: `#f39c12`,
748
- error: `#c0392b`,
749
- groupCollapsed: `#3498db`,
750
- groupEnd: null
751
- };
752
- const print = function(method, args) {
753
- if (self.__WB_DISABLE_DEV_LOGS) {
754
- return;
755
- }
756
- if (method === "groupCollapsed") {
757
- if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
758
- console[method](...args);
759
- return;
760
- }
761
- }
762
- const styles = [
763
- `background: ${methodToColorMap[method]}`,
764
- `border-radius: 0.5em`,
765
- `color: white`,
766
- `font-weight: bold`,
767
- `padding: 2px 0.5em`
768
- ];
769
- const logPrefix = inGroup ? [] : ["%cworkbox", styles.join(";")];
770
- console[method](...logPrefix, ...args);
771
- if (method === "groupCollapsed") {
772
- inGroup = true;
773
- }
774
- if (method === "groupEnd") {
775
- inGroup = false;
776
- }
777
- };
778
- const api = {};
779
- const loggerMethods = Object.keys(methodToColorMap);
780
- for (const key of loggerMethods) {
781
- const method = key;
782
- api[method] = (...args) => {
783
- print(method, args);
784
- };
785
- }
786
- return api;
787
- })();
788
-
789
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/cacheNames.js
790
- var _cacheNameDetails2 = {
791
- googleAnalytics: "googleAnalytics",
792
- precache: "precache-v2",
793
- prefix: "workbox",
794
- runtime: "runtime",
795
- suffix: typeof registration !== "undefined" ? registration.scope : ""
796
- };
797
- var _createCacheName2 = (cacheName) => {
798
- return [_cacheNameDetails2.prefix, cacheName, _cacheNameDetails2.suffix].filter((value) => value && value.length > 0).join("-");
799
- };
800
- var eachCacheNameDetail2 = (fn) => {
801
- for (const key of Object.keys(_cacheNameDetails2)) {
802
- fn(key);
803
- }
804
- };
805
- var cacheNames3 = {
806
- updateDetails: (details) => {
807
- eachCacheNameDetail2((key) => {
808
- if (typeof details[key] === "string") {
809
- _cacheNameDetails2[key] = details[key];
810
- }
811
- });
812
- },
813
- getGoogleAnalyticsName: (userCacheName) => {
814
- return userCacheName || _createCacheName2(_cacheNameDetails2.googleAnalytics);
815
- },
816
- getPrecacheName: (userCacheName) => {
817
- return userCacheName || _createCacheName2(_cacheNameDetails2.precache);
818
- },
819
- getPrefix: () => {
820
- return _cacheNameDetails2.prefix;
821
- },
822
- getRuntimeName: (userCacheName) => {
823
- return userCacheName || _createCacheName2(_cacheNameDetails2.runtime);
824
- },
825
- getSuffix: () => {
826
- return _cacheNameDetails2.suffix;
827
- }
828
- };
829
-
830
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/getFriendlyURL.js
831
- var getFriendlyURL2 = (url) => {
832
- const urlObj = new URL(String(url), location.href);
833
- return urlObj.href.replace(new RegExp(`^${location.origin}`), "");
834
- };
835
-
836
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/cacheMatchIgnoreParams.js
837
- function stripParams(fullURL, ignoreParams) {
838
- const strippedURL = new URL(fullURL);
839
- for (const param of ignoreParams) {
840
- strippedURL.searchParams.delete(param);
841
- }
842
- return strippedURL.href;
843
- }
844
- function cacheMatchIgnoreParams2(cache, request, ignoreParams, matchOptions) {
845
- return __async(this, null, function* () {
846
- const strippedRequestURL = stripParams(request.url, ignoreParams);
847
- if (request.url === strippedRequestURL) {
848
- return cache.match(request, matchOptions);
849
- }
850
- const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });
851
- const cacheKeys = yield cache.keys(request, keysOptions);
852
- for (const cacheKey of cacheKeys) {
853
- const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);
854
- if (strippedRequestURL === strippedCacheKeyURL) {
855
- return cache.match(cacheKey, matchOptions);
856
- }
857
- }
858
- return;
859
- });
860
- }
861
-
862
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/Deferred.js
863
- var Deferred2 = class {
864
- constructor() {
865
- this.promise = new Promise((resolve, reject) => {
866
- this.resolve = resolve;
867
- this.reject = reject;
868
- });
869
- }
870
- };
871
-
872
- // node_modules/workbox-strategies/node_modules/workbox-core/models/quotaErrorCallbacks.js
873
- var quotaErrorCallbacks2 = /* @__PURE__ */ new Set();
874
-
875
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js
876
- function executeQuotaErrorCallbacks2() {
877
- return __async(this, null, function* () {
878
- if (false) {
879
- logger2.log(`About to run ${quotaErrorCallbacks2.size} callbacks to clean up caches.`);
880
- }
881
- for (const callback of quotaErrorCallbacks2) {
882
- yield callback();
883
- if (false) {
884
- logger2.log(callback, "is complete.");
885
- }
886
- }
887
- if (false) {
888
- logger2.log("Finished running callbacks.");
889
- }
890
- });
891
- }
892
-
893
- // node_modules/workbox-strategies/node_modules/workbox-core/_private/timeout.js
894
- function timeout2(ms) {
895
- return new Promise((resolve) => setTimeout(resolve, ms));
896
- }
897
-
898
779
  // node_modules/workbox-strategies/_version.js
899
780
  try {
900
- self["workbox:strategies:6.5.3"] && _();
781
+ self["workbox:strategies:6.2.4"] && _();
901
782
  } catch (e) {
902
783
  }
903
784
 
@@ -909,7 +790,7 @@ var StrategyHandler = class {
909
790
  constructor(strategy, options) {
910
791
  this._cacheKeys = {};
911
792
  if (false) {
912
- finalAssertExports2.isInstance(options.event, ExtendableEvent, {
793
+ finalAssertExports.isInstance(options.event, ExtendableEvent, {
913
794
  moduleName: "workbox-strategies",
914
795
  className: "StrategyHandler",
915
796
  funcName: "constructor",
@@ -919,7 +800,7 @@ var StrategyHandler = class {
919
800
  Object.assign(this, options);
920
801
  this.event = options.event;
921
802
  this._strategy = strategy;
922
- this._handlerDeferred = new Deferred2();
803
+ this._handlerDeferred = new Deferred();
923
804
  this._extendLifetimePromises = [];
924
805
  this._plugins = [...strategy.plugins];
925
806
  this._pluginStateMap = /* @__PURE__ */ new Map();
@@ -936,7 +817,7 @@ var StrategyHandler = class {
936
817
  const possiblePreloadResponse = yield event.preloadResponse;
937
818
  if (possiblePreloadResponse) {
938
819
  if (false) {
939
- logger2.log(`Using a preloaded navigation response for '${getFriendlyURL2(request.url)}'`);
820
+ logger.log(`Using a preloaded navigation response for '${getFriendlyURL(request.url)}'`);
940
821
  }
941
822
  return possiblePreloadResponse;
942
823
  }
@@ -948,9 +829,7 @@ var StrategyHandler = class {
948
829
  }
949
830
  } catch (err) {
950
831
  if (err instanceof Error) {
951
- throw new WorkboxError2("plugin-error-request-will-fetch", {
952
- thrownErrorMessage: err.message
953
- });
832
+ throw new WorkboxError("plugin-error-request-will-fetch", { thrownErrorMessage: err.message });
954
833
  }
955
834
  }
956
835
  const pluginFilteredRequest = request.clone();
@@ -958,7 +837,7 @@ var StrategyHandler = class {
958
837
  let fetchResponse;
959
838
  fetchResponse = yield fetch(request, request.mode === "navigate" ? void 0 : this._strategy.fetchOptions);
960
839
  if (false) {
961
- logger2.debug(`Network request for '${getFriendlyURL2(request.url)}' returned a response with status '${fetchResponse.status}'.`);
840
+ logger.debug(`Network request for '${getFriendlyURL(request.url)}' returned a response with status '${fetchResponse.status}'.`);
962
841
  }
963
842
  for (const callback of this.iterateCallbacks("fetchDidSucceed")) {
964
843
  fetchResponse = yield callback({
@@ -970,7 +849,7 @@ var StrategyHandler = class {
970
849
  return fetchResponse;
971
850
  } catch (error) {
972
851
  if (false) {
973
- logger2.log(`Network request for '${getFriendlyURL2(request.url)}' threw an error.`, error);
852
+ logger.log(`Network request for '${getFriendlyURL(request.url)}' threw an error.`, error);
974
853
  }
975
854
  if (originalRequest) {
976
855
  yield this.runCallbacks("fetchDidFail", {
@@ -1002,9 +881,9 @@ var StrategyHandler = class {
1002
881
  cachedResponse = yield caches.match(effectiveRequest, multiMatchOptions);
1003
882
  if (false) {
1004
883
  if (cachedResponse) {
1005
- logger2.debug(`Found a cached response in '${cacheName}'.`);
884
+ logger.debug(`Found a cached response in '${cacheName}'.`);
1006
885
  } else {
1007
- logger2.debug(`No cached response found in '${cacheName}'.`);
886
+ logger.debug(`No cached response found in '${cacheName}'.`);
1008
887
  }
1009
888
  }
1010
889
  for (const callback of this.iterateCallbacks("cachedResponseWillBeUsed")) {
@@ -1022,48 +901,48 @@ var StrategyHandler = class {
1022
901
  cachePut(key, response) {
1023
902
  return __async(this, null, function* () {
1024
903
  const request = toRequest(key);
1025
- yield timeout2(0);
904
+ yield timeout(0);
1026
905
  const effectiveRequest = yield this.getCacheKey(request, "write");
1027
906
  if (false) {
1028
907
  if (effectiveRequest.method && effectiveRequest.method !== "GET") {
1029
- throw new WorkboxError2("attempt-to-cache-non-get-request", {
1030
- url: getFriendlyURL2(effectiveRequest.url),
908
+ throw new WorkboxError("attempt-to-cache-non-get-request", {
909
+ url: getFriendlyURL(effectiveRequest.url),
1031
910
  method: effectiveRequest.method
1032
911
  });
1033
912
  }
1034
913
  const vary = response.headers.get("Vary");
1035
914
  if (vary) {
1036
- logger2.debug(`The response for ${getFriendlyURL2(effectiveRequest.url)} has a 'Vary: ${vary}' header. Consider setting the {ignoreVary: true} option on your strategy to ensure cache matching and deletion works as expected.`);
915
+ logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} has a 'Vary: ${vary}' header. Consider setting the {ignoreVary: true} option on your strategy to ensure cache matching and deletion works as expected.`);
1037
916
  }
1038
917
  }
1039
918
  if (!response) {
1040
919
  if (false) {
1041
- logger2.error(`Cannot cache non-existent response for '${getFriendlyURL2(effectiveRequest.url)}'.`);
920
+ logger.error(`Cannot cache non-existent response for '${getFriendlyURL(effectiveRequest.url)}'.`);
1042
921
  }
1043
- throw new WorkboxError2("cache-put-with-no-response", {
1044
- url: getFriendlyURL2(effectiveRequest.url)
922
+ throw new WorkboxError("cache-put-with-no-response", {
923
+ url: getFriendlyURL(effectiveRequest.url)
1045
924
  });
1046
925
  }
1047
926
  const responseToCache = yield this._ensureResponseSafeToCache(response);
1048
927
  if (!responseToCache) {
1049
928
  if (false) {
1050
- logger2.debug(`Response '${getFriendlyURL2(effectiveRequest.url)}' will not be cached.`, responseToCache);
929
+ logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' will not be cached.`, responseToCache);
1051
930
  }
1052
931
  return false;
1053
932
  }
1054
933
  const { cacheName, matchOptions } = this._strategy;
1055
934
  const cache = yield self.caches.open(cacheName);
1056
935
  const hasCacheUpdateCallback = this.hasCallback("cacheDidUpdate");
1057
- const oldResponse = hasCacheUpdateCallback ? yield cacheMatchIgnoreParams2(cache, effectiveRequest.clone(), ["__WB_REVISION__"], matchOptions) : null;
936
+ const oldResponse = hasCacheUpdateCallback ? yield cacheMatchIgnoreParams(cache, effectiveRequest.clone(), ["__WB_REVISION__"], matchOptions) : null;
1058
937
  if (false) {
1059
- logger2.debug(`Updating the '${cacheName}' cache with a new Response for ${getFriendlyURL2(effectiveRequest.url)}.`);
938
+ logger.debug(`Updating the '${cacheName}' cache with a new Response for ${getFriendlyURL(effectiveRequest.url)}.`);
1060
939
  }
1061
940
  try {
1062
941
  yield cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);
1063
942
  } catch (error) {
1064
943
  if (error instanceof Error) {
1065
944
  if (error.name === "QuotaExceededError") {
1066
- yield executeQuotaErrorCallbacks2();
945
+ yield executeQuotaErrorCallbacks();
1067
946
  }
1068
947
  throw error;
1069
948
  }
@@ -1082,8 +961,7 @@ var StrategyHandler = class {
1082
961
  }
1083
962
  getCacheKey(request, mode) {
1084
963
  return __async(this, null, function* () {
1085
- const key = `${request.url} | ${mode}`;
1086
- if (!this._cacheKeys[key]) {
964
+ if (!this._cacheKeys[mode]) {
1087
965
  let effectiveRequest = request;
1088
966
  for (const callback of this.iterateCallbacks("cacheKeyWillBeUsed")) {
1089
967
  effectiveRequest = toRequest(yield callback({
@@ -1093,9 +971,9 @@ var StrategyHandler = class {
1093
971
  params: this.params
1094
972
  }));
1095
973
  }
1096
- this._cacheKeys[key] = effectiveRequest;
974
+ this._cacheKeys[mode] = effectiveRequest;
1097
975
  }
1098
- return this._cacheKeys[key];
976
+ return this._cacheKeys[mode];
1099
977
  });
1100
978
  }
1101
979
  hasCallback(name) {
@@ -1163,9 +1041,9 @@ var StrategyHandler = class {
1163
1041
  if (responseToCache) {
1164
1042
  if (responseToCache.status !== 200) {
1165
1043
  if (responseToCache.status === 0) {
1166
- logger2.warn(`The response for '${this.request.url}' is an opaque response. The caching strategy that you're using will not cache opaque responses by default.`);
1044
+ logger.warn(`The response for '${this.request.url}' is an opaque response. The caching strategy that you're using will not cache opaque responses by default.`);
1167
1045
  } else {
1168
- logger2.debug(`The response for '${this.request.url}' returned a status code of '${response.status}' and won't be cached as a result.`);
1046
+ logger.debug(`The response for '${this.request.url}' returned a status code of '${response.status}' and won't be cached as a result.`);
1169
1047
  }
1170
1048
  }
1171
1049
  }
@@ -1179,7 +1057,7 @@ var StrategyHandler = class {
1179
1057
  // node_modules/workbox-strategies/Strategy.js
1180
1058
  var Strategy = class {
1181
1059
  constructor(options = {}) {
1182
- this.cacheName = cacheNames3.getRuntimeName(options.cacheName);
1060
+ this.cacheName = cacheNames.getRuntimeName(options.cacheName);
1183
1061
  this.plugins = options.plugins || [];
1184
1062
  this.fetchOptions = options.fetchOptions;
1185
1063
  this.matchOptions = options.matchOptions;
@@ -1210,7 +1088,7 @@ var Strategy = class {
1210
1088
  try {
1211
1089
  response = yield this._handle(request, handler);
1212
1090
  if (!response || response.type === "error") {
1213
- throw new WorkboxError2("no-response", { url: request.url });
1091
+ throw new WorkboxError("no-response", { url: request.url });
1214
1092
  }
1215
1093
  } catch (error) {
1216
1094
  if (error instanceof Error) {
@@ -1224,7 +1102,7 @@ var Strategy = class {
1224
1102
  if (!response) {
1225
1103
  throw error;
1226
1104
  } else if (false) {
1227
- logger2.log(`While responding to '${getFriendlyURL2(request.url)}', an ${error instanceof Error ? error.toString() : ""} error occurred. Using a fallback response provided by a handlerDidError plugin.`);
1105
+ logger.log(`While responding to '${getFriendlyURL(request.url)}', an ${error instanceof Error ? error.toString() : ""} error occurred. Using a fallback response provided by a handlerDidError plugin.`);
1228
1106
  }
1229
1107
  }
1230
1108
  for (const callback of handler.iterateCallbacks("handlerWillRespond")) {
@@ -1273,7 +1151,7 @@ var CacheFirst = class extends Strategy {
1273
1151
  return __async(this, null, function* () {
1274
1152
  const logs = [];
1275
1153
  if (false) {
1276
- finalAssertExports2.isInstance(request, Request, {
1154
+ finalAssertExports.isInstance(request, Request, {
1277
1155
  moduleName: "workbox-strategies",
1278
1156
  className: this.constructor.name,
1279
1157
  funcName: "makeRequest",
@@ -1306,15 +1184,15 @@ var CacheFirst = class extends Strategy {
1306
1184
  }
1307
1185
  }
1308
1186
  if (false) {
1309
- logger2.groupCollapsed(messages3.strategyStart(this.constructor.name, request));
1187
+ logger.groupCollapsed(messages2.strategyStart(this.constructor.name, request));
1310
1188
  for (const log2 of logs) {
1311
- logger2.log(log2);
1189
+ logger.log(log2);
1312
1190
  }
1313
- messages3.printFinalResponse(response);
1314
- logger2.groupEnd();
1191
+ messages2.printFinalResponse(response);
1192
+ logger.groupEnd();
1315
1193
  }
1316
1194
  if (!response) {
1317
- throw new WorkboxError2("no-response", { url: request.url, error });
1195
+ throw new WorkboxError("no-response", { url: request.url, error });
1318
1196
  }
1319
1197
  return response;
1320
1198
  });
@@ -1343,7 +1221,7 @@ var StaleWhileRevalidate = class extends Strategy {
1343
1221
  return __async(this, null, function* () {
1344
1222
  const logs = [];
1345
1223
  if (false) {
1346
- finalAssertExports2.isInstance(request, Request, {
1224
+ finalAssertExports.isInstance(request, Request, {
1347
1225
  moduleName: "workbox-strategies",
1348
1226
  className: this.constructor.name,
1349
1227
  funcName: "handle",
@@ -1352,7 +1230,6 @@ var StaleWhileRevalidate = class extends Strategy {
1352
1230
  }
1353
1231
  const fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => {
1354
1232
  });
1355
- void handler.waitUntil(fetchAndCachePromise);
1356
1233
  let response = yield handler.cacheMatch(request);
1357
1234
  let error;
1358
1235
  if (response) {
@@ -1372,15 +1249,15 @@ var StaleWhileRevalidate = class extends Strategy {
1372
1249
  }
1373
1250
  }
1374
1251
  if (false) {
1375
- logger2.groupCollapsed(messages3.strategyStart(this.constructor.name, request));
1252
+ logger.groupCollapsed(messages2.strategyStart(this.constructor.name, request));
1376
1253
  for (const log2 of logs) {
1377
- logger2.log(log2);
1254
+ logger.log(log2);
1378
1255
  }
1379
- messages3.printFinalResponse(response);
1380
- logger2.groupEnd();
1256
+ messages2.printFinalResponse(response);
1257
+ logger.groupEnd();
1381
1258
  }
1382
1259
  if (!response) {
1383
- throw new WorkboxError2("no-response", { url: request.url, error });
1260
+ throw new WorkboxError("no-response", { url: request.url, error });
1384
1261
  }
1385
1262
  return response;
1386
1263
  });
@@ -1399,86 +1276,9 @@ var WEBPUB_CACHE_NAME = "webpub-cache";
1399
1276
  var PRECACHE_PUBLICATIONS = "PRECACHE_PUBLICATIONS";
1400
1277
  var CACHE_EXPIRATION_SECONDS = 7 * 24 * 60 * 60;
1401
1278
 
1402
- // node_modules/workbox-routing/node_modules/workbox-core/_version.js
1403
- try {
1404
- self["workbox:core:6.5.3"] && _();
1405
- } catch (e) {
1406
- }
1407
-
1408
- // node_modules/workbox-routing/node_modules/workbox-core/models/messages/messageGenerator.js
1409
- var fallback3 = (code, ...args) => {
1410
- let msg = code;
1411
- if (args.length > 0) {
1412
- msg += ` :: ${JSON.stringify(args)}`;
1413
- }
1414
- return msg;
1415
- };
1416
- var messageGenerator3 = true ? fallback3 : generatorFunction;
1417
-
1418
- // node_modules/workbox-routing/node_modules/workbox-core/_private/WorkboxError.js
1419
- var WorkboxError3 = class extends Error {
1420
- constructor(errorCode, details) {
1421
- const message = messageGenerator3(errorCode, details);
1422
- super(message);
1423
- this.name = errorCode;
1424
- this.details = details;
1425
- }
1426
- };
1427
-
1428
- // node_modules/workbox-routing/node_modules/workbox-core/_private/logger.js
1429
- var logger3 = true ? null : (() => {
1430
- if (!("__WB_DISABLE_DEV_LOGS" in self)) {
1431
- self.__WB_DISABLE_DEV_LOGS = false;
1432
- }
1433
- let inGroup = false;
1434
- const methodToColorMap = {
1435
- debug: `#7f8c8d`,
1436
- log: `#2ecc71`,
1437
- warn: `#f39c12`,
1438
- error: `#c0392b`,
1439
- groupCollapsed: `#3498db`,
1440
- groupEnd: null
1441
- };
1442
- const print = function(method, args) {
1443
- if (self.__WB_DISABLE_DEV_LOGS) {
1444
- return;
1445
- }
1446
- if (method === "groupCollapsed") {
1447
- if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
1448
- console[method](...args);
1449
- return;
1450
- }
1451
- }
1452
- const styles = [
1453
- `background: ${methodToColorMap[method]}`,
1454
- `border-radius: 0.5em`,
1455
- `color: white`,
1456
- `font-weight: bold`,
1457
- `padding: 2px 0.5em`
1458
- ];
1459
- const logPrefix = inGroup ? [] : ["%cworkbox", styles.join(";")];
1460
- console[method](...logPrefix, ...args);
1461
- if (method === "groupCollapsed") {
1462
- inGroup = true;
1463
- }
1464
- if (method === "groupEnd") {
1465
- inGroup = false;
1466
- }
1467
- };
1468
- const api = {};
1469
- const loggerMethods = Object.keys(methodToColorMap);
1470
- for (const key of loggerMethods) {
1471
- const method = key;
1472
- api[method] = (...args) => {
1473
- print(method, args);
1474
- };
1475
- }
1476
- return api;
1477
- })();
1478
-
1479
1279
  // node_modules/workbox-routing/_version.js
1480
1280
  try {
1481
- self["workbox:routing:6.5.3"] && _();
1281
+ self["workbox:routing:6.2.4"] && _();
1482
1282
  } catch (e) {
1483
1283
  }
1484
1284
 
@@ -1489,7 +1289,7 @@ var defaultMethod = "GET";
1489
1289
  var normalizeHandler = (handler) => {
1490
1290
  if (handler && typeof handler === "object") {
1491
1291
  if (false) {
1492
- finalAssertExports3.hasMethod(handler, "handle", {
1292
+ finalAssertExports.hasMethod(handler, "handle", {
1493
1293
  moduleName: "workbox-routing",
1494
1294
  className: "Route",
1495
1295
  funcName: "constructor",
@@ -1499,7 +1299,7 @@ var normalizeHandler = (handler) => {
1499
1299
  return handler;
1500
1300
  } else {
1501
1301
  if (false) {
1502
- finalAssertExports3.isType(handler, "function", {
1302
+ finalAssertExports.isType(handler, "function", {
1503
1303
  moduleName: "workbox-routing",
1504
1304
  className: "Route",
1505
1305
  funcName: "constructor",
@@ -1514,14 +1314,14 @@ var normalizeHandler = (handler) => {
1514
1314
  var Route = class {
1515
1315
  constructor(match, handler, method = defaultMethod) {
1516
1316
  if (false) {
1517
- finalAssertExports3.isType(match, "function", {
1317
+ finalAssertExports.isType(match, "function", {
1518
1318
  moduleName: "workbox-routing",
1519
1319
  className: "Route",
1520
1320
  funcName: "constructor",
1521
1321
  paramName: "match"
1522
1322
  });
1523
1323
  if (method) {
1524
- finalAssertExports3.isOneOf(method, validMethods, { paramName: "method" });
1324
+ finalAssertExports.isOneOf(method, validMethods, { paramName: "method" });
1525
1325
  }
1526
1326
  }
1527
1327
  this.handler = normalizeHandler(handler);
@@ -1537,7 +1337,7 @@ var Route = class {
1537
1337
  var RegExpRoute = class extends Route {
1538
1338
  constructor(regExp, handler, method) {
1539
1339
  if (false) {
1540
- finalAssertExports3.isInstance(regExp, RegExp, {
1340
+ finalAssertExports.isInstance(regExp, RegExp, {
1541
1341
  moduleName: "workbox-routing",
1542
1342
  className: "RegExpRoute",
1543
1343
  funcName: "constructor",
@@ -1551,7 +1351,7 @@ var RegExpRoute = class extends Route {
1551
1351
  }
1552
1352
  if (url.origin !== location.origin && result.index !== 0) {
1553
1353
  if (false) {
1554
- logger3.debug(`The regular expression '${regExp.toString()}' only partially matched against the cross-origin URL '${url.toString()}'. RegExpRoute's will only handle cross-origin requests if they match the entire URL.`);
1354
+ logger.debug(`The regular expression '${regExp.toString()}' only partially matched against the cross-origin URL '${url.toString()}'. RegExpRoute's will only handle cross-origin requests if they match the entire URL.`);
1555
1355
  }
1556
1356
  return;
1557
1357
  }
@@ -1584,7 +1384,7 @@ var Router = class {
1584
1384
  if (event.data && event.data.type === "CACHE_URLS") {
1585
1385
  const { payload } = event.data;
1586
1386
  if (false) {
1587
- logger3.debug(`Caching URLs from the window`, payload.urlsToCache);
1387
+ logger.debug(`Caching URLs from the window`, payload.urlsToCache);
1588
1388
  }
1589
1389
  const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {
1590
1390
  if (typeof entry === "string") {
@@ -1602,7 +1402,7 @@ var Router = class {
1602
1402
  }
1603
1403
  handleRequest({ request, event }) {
1604
1404
  if (false) {
1605
- finalAssertExports3.isInstance(request, Request, {
1405
+ finalAssertExports.isInstance(request, Request, {
1606
1406
  moduleName: "workbox-routing",
1607
1407
  className: "Router",
1608
1408
  funcName: "handleRequest",
@@ -1612,7 +1412,7 @@ var Router = class {
1612
1412
  const url = new URL(request.url, location.href);
1613
1413
  if (!url.protocol.startsWith("http")) {
1614
1414
  if (false) {
1615
- logger3.debug(`Workbox Router only supports URLs that start with 'http'.`);
1415
+ logger.debug(`Workbox Router only supports URLs that start with 'http'.`);
1616
1416
  }
1617
1417
  return;
1618
1418
  }
@@ -1627,7 +1427,10 @@ var Router = class {
1627
1427
  const debugMessages = [];
1628
1428
  if (false) {
1629
1429
  if (handler) {
1630
- debugMessages.push([`Found a route to handle this request:`, route]);
1430
+ debugMessages.push([
1431
+ `Found a route to handle this request:`,
1432
+ route
1433
+ ]);
1631
1434
  if (params) {
1632
1435
  debugMessages.push([
1633
1436
  `Passing the following params to the route's handler:`,
@@ -1645,20 +1448,20 @@ var Router = class {
1645
1448
  }
1646
1449
  if (!handler) {
1647
1450
  if (false) {
1648
- logger3.debug(`No route found for: ${getFriendlyURL3(url)}`);
1451
+ logger.debug(`No route found for: ${getFriendlyURL(url)}`);
1649
1452
  }
1650
1453
  return;
1651
1454
  }
1652
1455
  if (false) {
1653
- logger3.groupCollapsed(`Router is responding to: ${getFriendlyURL3(url)}`);
1456
+ logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);
1654
1457
  debugMessages.forEach((msg) => {
1655
1458
  if (Array.isArray(msg)) {
1656
- logger3.log(...msg);
1459
+ logger.log(...msg);
1657
1460
  } else {
1658
- logger3.log(msg);
1461
+ logger.log(msg);
1659
1462
  }
1660
1463
  });
1661
- logger3.groupEnd();
1464
+ logger.groupEnd();
1662
1465
  }
1663
1466
  let responsePromise;
1664
1467
  try {
@@ -1671,10 +1474,10 @@ var Router = class {
1671
1474
  responsePromise = responsePromise.catch((err) => __async(this, null, function* () {
1672
1475
  if (catchHandler) {
1673
1476
  if (false) {
1674
- logger3.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL3(url)}. Falling back to route's Catch Handler.`);
1675
- logger3.error(`Error thrown by:`, route);
1676
- logger3.error(err);
1677
- logger3.groupEnd();
1477
+ logger.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);
1478
+ logger.error(`Error thrown by:`, route);
1479
+ logger.error(err);
1480
+ logger.groupEnd();
1678
1481
  }
1679
1482
  try {
1680
1483
  return yield catchHandler.handle({ url, request, event, params });
@@ -1686,10 +1489,10 @@ var Router = class {
1686
1489
  }
1687
1490
  if (this._catchHandler) {
1688
1491
  if (false) {
1689
- logger3.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL3(url)}. Falling back to global Catch Handler.`);
1690
- logger3.error(`Error thrown by:`, route);
1691
- logger3.error(err);
1692
- logger3.groupEnd();
1492
+ logger.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);
1493
+ logger.error(`Error thrown by:`, route);
1494
+ logger.error(err);
1495
+ logger.groupEnd();
1693
1496
  }
1694
1497
  return this._catchHandler.handle({ url, request, event });
1695
1498
  }
@@ -1706,7 +1509,7 @@ var Router = class {
1706
1509
  if (matchResult) {
1707
1510
  if (false) {
1708
1511
  if (matchResult instanceof Promise) {
1709
- logger3.warn(`While routing ${getFriendlyURL3(url)}, an async matchCallback function was used. Please convert the following route to use a synchronous matchCallback function:`, route);
1512
+ logger.warn(`While routing ${getFriendlyURL(url)}, an async matchCallback function was used. Please convert the following route to use a synchronous matchCallback function:`, route);
1710
1513
  }
1711
1514
  }
1712
1515
  params = matchResult;
@@ -1730,31 +1533,31 @@ var Router = class {
1730
1533
  }
1731
1534
  registerRoute(route) {
1732
1535
  if (false) {
1733
- finalAssertExports3.isType(route, "object", {
1536
+ finalAssertExports.isType(route, "object", {
1734
1537
  moduleName: "workbox-routing",
1735
1538
  className: "Router",
1736
1539
  funcName: "registerRoute",
1737
1540
  paramName: "route"
1738
1541
  });
1739
- finalAssertExports3.hasMethod(route, "match", {
1542
+ finalAssertExports.hasMethod(route, "match", {
1740
1543
  moduleName: "workbox-routing",
1741
1544
  className: "Router",
1742
1545
  funcName: "registerRoute",
1743
1546
  paramName: "route"
1744
1547
  });
1745
- finalAssertExports3.isType(route.handler, "object", {
1548
+ finalAssertExports.isType(route.handler, "object", {
1746
1549
  moduleName: "workbox-routing",
1747
1550
  className: "Router",
1748
1551
  funcName: "registerRoute",
1749
1552
  paramName: "route"
1750
1553
  });
1751
- finalAssertExports3.hasMethod(route.handler, "handle", {
1554
+ finalAssertExports.hasMethod(route.handler, "handle", {
1752
1555
  moduleName: "workbox-routing",
1753
1556
  className: "Router",
1754
1557
  funcName: "registerRoute",
1755
1558
  paramName: "route.handler"
1756
1559
  });
1757
- finalAssertExports3.isType(route.method, "string", {
1560
+ finalAssertExports.isType(route.method, "string", {
1758
1561
  moduleName: "workbox-routing",
1759
1562
  className: "Router",
1760
1563
  funcName: "registerRoute",
@@ -1768,7 +1571,7 @@ var Router = class {
1768
1571
  }
1769
1572
  unregisterRoute(route) {
1770
1573
  if (!this._routes.has(route.method)) {
1771
- throw new WorkboxError3("unregister-route-but-not-found-with-method", {
1574
+ throw new WorkboxError("unregister-route-but-not-found-with-method", {
1772
1575
  method: route.method
1773
1576
  });
1774
1577
  }
@@ -1776,7 +1579,7 @@ var Router = class {
1776
1579
  if (routeIndex > -1) {
1777
1580
  this._routes.get(route.method).splice(routeIndex, 1);
1778
1581
  } else {
1779
- throw new WorkboxError3("unregister-route-route-not-registered");
1582
+ throw new WorkboxError("unregister-route-route-not-registered");
1780
1583
  }
1781
1584
  }
1782
1585
  };
@@ -1799,7 +1602,7 @@ function registerRoute(capture, handler, method) {
1799
1602
  const captureUrl = new URL(capture, location.href);
1800
1603
  if (false) {
1801
1604
  if (!(capture.startsWith("/") || capture.startsWith("http"))) {
1802
- throw new WorkboxError3("invalid-string", {
1605
+ throw new WorkboxError("invalid-string", {
1803
1606
  moduleName: "workbox-routing",
1804
1607
  funcName: "registerRoute",
1805
1608
  paramName: "capture"
@@ -1808,13 +1611,13 @@ function registerRoute(capture, handler, method) {
1808
1611
  const valueToCheck = capture.startsWith("http") ? captureUrl.pathname : capture;
1809
1612
  const wildcards = "[*:?+]";
1810
1613
  if (new RegExp(`${wildcards}`).exec(valueToCheck)) {
1811
- logger3.debug(`The '$capture' parameter contains an Express-style wildcard character (${wildcards}). Strings are now always interpreted as exact matches; use a RegExp for partial or wildcard matches.`);
1614
+ logger.debug(`The '$capture' parameter contains an Express-style wildcard character (${wildcards}). Strings are now always interpreted as exact matches; use a RegExp for partial or wildcard matches.`);
1812
1615
  }
1813
1616
  }
1814
1617
  const matchCallback = ({ url }) => {
1815
1618
  if (false) {
1816
1619
  if (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) {
1817
- logger3.debug(`${capture} only partially matches the cross-origin URL ${url.toString()}. This route will only handle cross-origin requests if they match the entire URL.`);
1620
+ logger.debug(`${capture} only partially matches the cross-origin URL ${url.toString()}. This route will only handle cross-origin requests if they match the entire URL.`);
1818
1621
  }
1819
1622
  }
1820
1623
  return url.href === captureUrl.href;
@@ -1827,7 +1630,7 @@ function registerRoute(capture, handler, method) {
1827
1630
  } else if (capture instanceof Route) {
1828
1631
  route = capture;
1829
1632
  } else {
1830
- throw new WorkboxError3("unsupported-route-type", {
1633
+ throw new WorkboxError("unsupported-route-type", {
1831
1634
  moduleName: "workbox-routing",
1832
1635
  funcName: "registerRoute",
1833
1636
  paramName: "capture"