PageSourceSearch

https://almartcolorado.com/sw.js

js almartcolorado.com collected 2026-10-04 23:19:31 UTC 10,915 bytes, 150 lines download raw bytes

1"use strict";
2
3const CACHE_NAME = 'almartcolorado.com-1604513627808';
4const SW_SUPPORTED_PROTOCOL_REGEX = /http(s?):/;
5const pageUrls = JSON.parse('["/","/photo-gallery","/about-us"]');
6const staticAssets = JSON.parse('["//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/4524c1974583bbdd/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/f3ce1dff28c4871e/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/b3a5f323aeacb066/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/3773bc2c3107d85d/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/9714e31145de958/styles.css","https://img1.wsimg.com/poly/v2/polyfill.min.js?unknown=polyfill&flags=gated&features=default%2Cfetch%2CArray.prototype.%40%40iterator%2CArray.prototype.find%2CArray.prototype.findIndex%2CFunction.name%2CNumber.isFinite%2CPromise%2CString.prototype.repeat%2CMath.sign%2CMath.trunc%2CArray.prototype.includes%2CObject.entries%2CObject.values%2CObject.is%2CIntersectionObserver%2CIntl.~locale.en-US","//img1.wsimg.com/blobby/go/gpub/79fb68164481d54f/script.js","//img1.wsimg.com/blobby/go/gpub/55a2b9c112bc94c7/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/402b6f4d25a67b71/script.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/layout12-bfac99e3.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/index3-9d3c1b2c.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/Layout-abe4d6bb.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/index4-0672ac78.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/legacyOverrides-b3a5b619.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/loaders-cdd1ec86.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/LuxeForeground-a2efdf5c.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/utils-6f80a19a.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/video-2d5f0f4d.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/Background-62f46fb7.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/utils3-f3f78e42.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/Foreground-707c82cd.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/NavItems-c8860a9b.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/SubTagline-5336804e.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/themeOverrides-08fb4580.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/utils2-523b4d00.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/alignmentToFlex-cefb637f.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/boldOutline-5729271a.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/ConditionalParallax-a919cc5d.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/contentStatuses-5c099935.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/defaultSocialIconPack-de218de9.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/LAYOUT/c/FullBleedBackground-4c520398.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/HEADER/header9-3dacd7f7.js","https://img1.wsimg.com/blobby/go/static/radpack/@widget/HEADER/c/defaultProps-620e170a.js","//img1.wsimg.com/ceph-p3-01/website-builder-data-prod/static/widgets/UX.3.69.19.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/a0c6ab7a29d8b3a2/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/755eaf27e41e85a0/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/ec1571aca1bf5c26/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/f9e8668452c1125a/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/86f576306a32ac17/script.js","//fonts.googleapis.com/css?family=Cabin:700&display=swap","//fonts.googleapis.com/css?family=Lato:100,300,400,400i,700,700i,900&display=swap","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/f87080d3b606a3c0/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/6d7e1584f09f189e/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/8b072e43347c7296/script.
6js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/1588818113236ebe/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/f36ddd590af44b75/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/941b4cb10d1d1607/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/a9aa3871b1c11e8/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/7b597e40d270ae83/styles.css","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/2ac25c603013b824/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/868affdc14aac3db/script.js","//img1.wsimg.com/blobby/go/4e55fa31-2866-414e-92b3-544a6127fbcf/gpub/7c7b4f30ba4c309e/script.js"]');
7const networkOnlyUrls = JSON.parse('["https://api.ola.godaddy.com","https://4e55fa31-2866-414e-92b3-544a6127fbcf.onlinestore.godaddy.com","https://img.secureserver.net/t/1/tl/event","https://img.test-secureserver.net/t/1/tl/event","https://www.google-analytics.com/collect","https://calendar.apps.dev-secureserver.net","https://calendar.apps.test-secureserver.net","https://calendar.apps.secureserver.net"]');
8const networkOnlyUrlsRegex = JSON.parse('["almartcolorado.com/m/api/.*","almartcolorado.com(?:/.*)?/ola/services/.*","almartcolorado.com/ola/meetings/.*","securepay.godaddy.com/api/apps/ola/accounts/.*"]').map(regexString => new RegExp(regexString));
9const networkThenCacheUrls = JSON.parse('["https://blog.apps.secureserver.net/v1/website/4e55fa31-2866-414e-92b3-544a6127fbcf/feed/post/","https://blog.apps.secureserver.net/v1/website/4e55fa31-2866-414e-92b3-544a6127fbcf/feed"]');
10const networkThenCacheUrlsRegex = JSON.parse('["almartcolorado.com(?:/.*)?/f/.*"]').map(regexString => new RegExp(regexString));
11self.addEventListener('unhandledrejection', function (event) {
12  // eslint-disable-next-line no-console
13  console.warn('sw unhandledrejection error: ', event.reason);
14});
15
16function preCacheResources() {
17  return caches.open(CACHE_NAME).then(function (cache) {
18    // Pre-Cache pages to improve subsequent navigation but don't making it blocking
19    // Avoid extremely large websites from using the end-users data in unexpected amount
20    cache.addAll(pageUrls); // Pre-cache all static assets by keeping them as installation dependency
21
22    return cache.addAll(staticAssets);
23  });
24}
25
26self.addEventListener('install', function (event) {
27  // Let the new worker take over as fast as possible
28  // For quirks refer: https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#skip_the_waiting_phase
29  self.skipWaiting();
30  event.waitUntil(preCacheResources());
31});
32
33function clearOldCache() {
34  return caches.keys().then(function (keys) {
35    return Promise.all(keys.filter(function (key) {
36      return key !== CACHE_NAME;
37    }).map(function (key) {
38      return caches.delete(key);
39    }));
40  });
41}
42
43self.addEventListener('activate', function (event) {
44  // Remember to keep this step as lean as possible
45  // Only sutiable for performing stuff that can't be done while the previous worker is running
46  event.waitUntil(clearOldCache().then(function () {
47    clients.claim(); // eslint-disable-line no-undef
48  }));
49});
50
51function isPageRequest(url) {
52  return url.origin === location.origin && pageUrls.includes(url.pathname);
53}
54
55function isNetworkOnlyRequest(url, requestMethod) {
56  // Browser extensions don't use the standard `http` and `https` protocols
57  // Refer: https://github.com/GoogleChromeLabs/sw-toolbox/issues/171
58  if (requestMethod !== 'GET' || !SW_SUPPORTED_PROTOCOL_REGEX.test(url.protocol)) {
59    return true;
60  }
61
62  const urlOrigin = url.origin;
63  const urlPathName = url.pathname;
64  const fullUrl = `${urlOrigin}${urlPathName}`;
65
66  if (networkOnlyUrls.includes(urlOrigin) || networkOnlyUrls.includes(fullUrl)) {
67    return true;
68  }
69
70  if (networkOnlyUrlsRegex.some(regex => regex.test(fullUrl))) {
71    return true;
72  }
73
74  return false;
75}
76
77function isNetworkThenCacheRequest(url, requestMethod) {
78  // Browser extensions don't use the standard `http` and `https` protocols
79  // Refer: https://github.com/GoogleChromeLabs/sw-toolbox/issues/171
80  if (requestMethod !== 'GET' || !SW_SUPPORTED_PROTOCOL_REGEX.test(url.protocol)) {
81    return true;
82  }
83
84  const urlOrigin = url.origin;
85  const urlPathName = url.pathname;
86  const fullUrl = `${urlOrigin}${urlPathName}`;
87
88  if (networkThenCacheUrls.includes(urlOrigin) || networkThenCacheUrls.includes(fullUrl)) {
89    return true;
90  }
91
92  if (networkThenCacheUrlsRegex.some(regex => regex.test(fullUrl))) {
93    return true;
94  }
95
96  return false;
97}
98
99function handleWithNetworkThenCache(event) {
100  return event.respondWith(fetch(event.request).then(function (networkResponse) {
101    if (!networkResponse.ok) {
102      return networkResponse;
103    }
104
105    return caches.open(CACHE_NAME).then(function (cache) {
106      cache.put(event.request, networkResponse.clone());
107      return networkResponse;
108    });
109  }).catch(function () {
110    // network failed, try to serve a cached response or offline page if there is one
111    return caches.match(event.request);
112  }));
113}
114
115function handleWithCacheThenNetwork(event) {
116  return event.respondWith(caches.open(CACHE_NAME).then(function (cache) {
117    return cache.match(event.request).then(function (response) {
118      return response || fetch(event.request).then(function (networkResponse) {
119        networkResponse.ok && cache.put(event.request, networkResponse.clone());
120        return networkResponse;
121      });
122    });
123  }).catch(function (err) {
124    // TODO: respond with `offline.html` as the final fallback for page requests
125    // and use appropriate response for other cases
126    return err;
127  }));
128}
129
130function handleWithNetwork(event) {
131  return event.respondWith(fetch(event.request));
132}
133
134function handleRequests(event) {
135  const requestURL = new URL(event.request.url);
136
137  if (isNetworkOnlyRequest(requestURL, event.request.method)) {
138    return handleWithNetwork(event);
139  }
140
141  if (isPageRequest(requestURL) || isNetworkThenCacheRequest(requestURL, event.request.method)) {
142    // To avoid serving stale content after a publish
143    // always fetch the markup from origin and use cache only when the user is offline
144    return handleWithNetworkThenCache(event);
145  }
146
147  return handleWithCacheThenNetwork(event);
148}
149
150self.addEventListener('fetch', handleRequests);

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.