forked from d3fend/d3fend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
service-worker.js
304 lines (304 loc) · 14.1 KB
/
service-worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
const a = /* @__PURE__ */ location.pathname.split("/").slice(0, -1).join("/"), u = [
a + "/_app/immutable/entry/app.7f96160f.js",
a + "/_app/immutable/nodes/0.f4b3e5f5.js",
a + "/_app/immutable/nodes/1.afef6be5.js",
a + "/_app/immutable/assets/9.e1a8d951.css",
a + "/_app/immutable/nodes/10.17563c27.js",
a + "/_app/immutable/nodes/11.63dad473.js",
a + "/_app/immutable/nodes/12.8145dac9.js",
a + "/_app/immutable/nodes/13.bf15cb23.js",
a + "/_app/immutable/assets/14.7d23fb85.css",
a + "/_app/immutable/nodes/14.0b8a7aa8.js",
a + "/_app/immutable/assets/15.cec432e3.css",
a + "/_app/immutable/nodes/15.6be87eb5.js",
a + "/_app/immutable/assets/16.0136ae2d.css",
a + "/_app/immutable/nodes/16.cc532755.js",
a + "/_app/immutable/assets/CollapsibleSection.10e43eb6.css",
a + "/_app/immutable/nodes/17.ff1f05ff.js",
a + "/_app/immutable/nodes/18.d544759d.js",
a + "/_app/immutable/assets/19.b5a02fc4.css",
a + "/_app/immutable/nodes/19.42c01187.js",
a + "/_app/immutable/assets/autocomplete.553fd25d.css",
a + "/_app/immutable/assets/2.0496bb8e.css",
a + "/_app/immutable/nodes/2.6d736c42.js",
a + "/_app/immutable/assets/20.ac8c22bb.css",
a + "/_app/immutable/nodes/20.531b1efb.js",
a + "/_app/immutable/nodes/21.36606bbc.js",
a + "/_app/immutable/nodes/22.b0e96956.js",
a + "/_app/immutable/nodes/23.2087cde8.js",
a + "/_app/immutable/assets/24.093affa7.css",
a + "/_app/immutable/nodes/24.7bf1c16e.js",
a + "/_app/immutable/nodes/25.b81a57d2.js",
a + "/_app/immutable/assets/26.92306f0b.css",
a + "/_app/immutable/nodes/26.7744a84e.js",
a + "/_app/immutable/nodes/27.9f8b2d3d.js",
a + "/_app/immutable/nodes/28.dcbc679e.js",
a + "/_app/immutable/nodes/29.61b81aa6.js",
a + "/_app/immutable/nodes/3.6a3acdfa.js",
a + "/_app/immutable/nodes/30.97d9457f.js",
a + "/_app/immutable/nodes/31.56776aa0.js",
a + "/_app/immutable/nodes/32.b27be227.js",
a + "/_app/immutable/nodes/33.069712c1.js",
a + "/_app/immutable/assets/34.b84b65f2.css",
a + "/_app/immutable/nodes/34.0bd08dd0.js",
a + "/_app/immutable/assets/35.be93f9a1.css",
a + "/_app/immutable/nodes/35.a73ef1b4.js",
a + "/_app/immutable/nodes/36.7352e5bc.js",
a + "/_app/immutable/assets/37.bbf908d4.css",
a + "/_app/immutable/nodes/37.3a2cad7b.js",
a + "/_app/immutable/nodes/38.4a2600dd.js",
a + "/_app/immutable/nodes/39.6c3b3483.js",
a + "/_app/immutable/assets/4.dae97b45.css",
a + "/_app/immutable/nodes/4.e732d0f5.js",
a + "/_app/immutable/assets/TaxoMatrix.be725175.css",
a + "/_app/immutable/nodes/40.231e212b.js",
a + "/_app/immutable/assets/41.a31569e7.css",
a + "/_app/immutable/nodes/41.befc481f.js",
a + "/_app/immutable/assets/Button.82434732.css",
a + "/_app/immutable/nodes/42.771f8f47.js",
a + "/_app/immutable/nodes/43.d4bb1ea7.js",
a + "/_app/immutable/assets/44.5d437c2e.css",
a + "/_app/immutable/nodes/44.aee4e80f.js",
a + "/_app/immutable/nodes/45.94180859.js",
a + "/_app/immutable/assets/46.95ae6bc3.css",
a + "/_app/immutable/nodes/46.c5472c9f.js",
a + "/_app/immutable/assets/Button-DAO.2520275a.css",
a + "/_app/immutable/nodes/47.dca8fd23.js",
a + "/_app/immutable/nodes/48.102adf19.js",
a + "/_app/immutable/nodes/49.2d9db301.js",
a + "/_app/immutable/nodes/5.d1a8c37b.js",
a + "/_app/immutable/nodes/50.84bde233.js",
a + "/_app/immutable/nodes/51.df6e363a.js",
a + "/_app/immutable/nodes/52.c4d441ec.js",
a + "/_app/immutable/assets/53.6c5d86a4.css",
a + "/_app/immutable/nodes/53.715b9ba0.js",
a + "/_app/immutable/assets/Alert.8ab89406.css",
a + "/_app/immutable/assets/54.0decab3c.css",
a + "/_app/immutable/nodes/54.d00522a9.js",
a + "/_app/immutable/nodes/55.1edeabe6.js",
a + "/_app/immutable/nodes/56.5fbcfdcd.js",
a + "/_app/immutable/nodes/57.50d9b112.js",
a + "/_app/immutable/assets/58.48e0af04.css",
a + "/_app/immutable/nodes/58.747de5ef.js",
a + "/_app/immutable/assets/59.84237f10.css",
a + "/_app/immutable/nodes/59.61044571.js",
a + "/_app/immutable/nodes/6.48031cc0.js",
a + "/_app/immutable/assets/60.43fb420c.css",
a + "/_app/immutable/nodes/60.c3ad9df6.js",
a + "/_app/immutable/assets/61.6bb9758f.css",
a + "/_app/immutable/nodes/61.b1ae8b87.js",
a + "/_app/immutable/nodes/62.849d5f1c.js",
a + "/_app/immutable/nodes/7.63dad473.js",
a + "/_app/immutable/nodes/8.d1a8c37b.js",
a + "/_app/immutable/nodes/9.17563c27.js",
a + "/_app/immutable/assets/D3FMatrix.1df6314d.css",
a + "/_app/immutable/assets/Hamburger.ab9add57.css",
a + "/_app/immutable/assets/Header.d22f11e5.css",
a + "/_app/immutable/assets/Loading.04085483.css",
a + "/_app/immutable/assets/Lookup-DAO.26221288.css",
a + "/_app/immutable/assets/MatrixLayout.5aac2513.css",
a + "/_app/immutable/assets/Modal_full.64676ff1.css",
a + "/_app/immutable/assets/Nav-mobile.48a70d3b.css",
a + "/_app/immutable/assets/Notification.f3032b6b.css",
a + "/_app/immutable/assets/SPARQLTable.b89e18ea.css",
a + "/_app/immutable/assets/ScrollFrame.1d86a0d6.css",
a + "/_app/immutable/assets/SimpleAutocomplete.390a1976.css",
a + "/_app/immutable/assets/Technique.cff9011f.css",
a + "/_app/immutable/assets/TechniqueSubclasses.ec1a3178.css",
a + "/_app/immutable/assets/ToggleBar.067f3e93.css",
a + "/_app/immutable/chunks/Alert.d9b74077.js",
a + "/_app/immutable/chunks/BlockTree.f9b2587b.js",
a + "/_app/immutable/chunks/Button.ffd0b611.js",
a + "/_app/immutable/chunks/CSharp.19772410.js",
a + "/_app/immutable/chunks/D3FMatrix.969b1e40.js",
a + "/_app/immutable/assets/_Graph.67a3f048.css",
a + "/_app/immutable/chunks/Hamburger.dffefca9.js",
a + "/_app/immutable/chunks/Header.66ace148.js",
a + "/_app/immutable/chunks/Loading.4c47dc42.js",
a + "/_app/immutable/chunks/Lookup-DAO.0a863d00.js",
a + "/_app/immutable/chunks/MatrixLayout.76a4b599.js",
a + "/_app/immutable/chunks/Modal_full.18992346.js",
a + "/_app/immutable/chunks/Nav-mobile.2d9ef691.js",
a + "/_app/immutable/chunks/Notification.a07f3b00.js",
a + "/_app/immutable/chunks/SPARQLTable.1c1cc8ed.js",
a + "/_app/immutable/chunks/ScrollFrame.71b93efe.js",
a + "/_app/immutable/chunks/SimpleAutocomplete.98963f12.js",
a + "/_app/immutable/chunks/Table.2f9a613c.js",
a + "/_app/immutable/chunks/TaxoMatrix.6afaf9b3.js",
a + "/_app/immutable/chunks/Technique.1120b833.js",
a + "/_app/immutable/chunks/TechniqueSubclasses.079ca94e.js",
a + "/_app/immutable/chunks/Title.28d88b77.js",
a + "/_app/immutable/chunks/ToggleBar.68003971.js",
a + "/_app/immutable/chunks/_Graph.6383555f.js",
a + "/_app/immutable/chunks/_arrayReduce.865b0d3f.js",
a + "/_app/immutable/chunks/_commonjs-dynamic-modules.302442b1.js",
a + "/_app/immutable/chunks/_commonjsHelpers.de833af9.js",
a + "/_app/immutable/chunks/add-html-label.a7b8b896.js",
a + "/_app/immutable/chunks/arc.9c65975b.js",
a + "/_app/immutable/chunks/array.9f3ba611.js",
a + "/_app/immutable/chunks/await_block.3cda980a.js",
a + "/_app/immutable/chunks/config.6235f7da.js",
a + "/_app/immutable/chunks/constant.6af51708.js",
a + "/_app/immutable/chunks/consts.3b726b9b.js",
a + "/_app/immutable/chunks/control.f5b05b5f.js",
a + "/_app/immutable/chunks/dao-artifacts.816d0d74.js",
a + "/_app/immutable/chunks/dialog.6b7a2585.js",
a + "/_app/immutable/assets/dialog.5e071adb.css",
a + "/_app/immutable/chunks/each.8d18d1a2.js",
a + "/_app/immutable/chunks/edges-65da65dc.ad366804.js",
a + "/_app/immutable/chunks/extract.8fe98a53.js",
a + "/_app/immutable/assets/extract.af5c7489.css",
a + "/_app/immutable/chunks/globals.7f7f1b26.js",
a + "/_app/immutable/chunks/index-f9d09cc9.5aa6822c.js",
a + "/_app/immutable/chunks/index.227a97d3.js",
a + "/_app/immutable/chunks/index.24431cc3.js",
a + "/_app/immutable/chunks/index.400c825c.js",
a + "/_app/immutable/chunks/index.5e2a9a64.js",
a + "/_app/immutable/chunks/init.77b53fdd.js",
a + "/_app/immutable/chunks/isArray.43a48bdb.js",
a + "/_app/immutable/chunks/isEmpty.24b656b1.js",
a + "/_app/immutable/chunks/isPlainObject.4d47543b.js",
a + "/_app/immutable/chunks/isTypedArray.d780b3d2.js",
a + "/_app/immutable/chunks/is_dark.d48bef79.js",
a + "/_app/immutable/chunks/layout.f5dbbe2b.js",
a + "/_app/immutable/chunks/lib.9e57a3f1.js",
a + "/_app/immutable/chunks/marked.esm.76161808.js",
a + "/_app/immutable/chunks/matrix.91be0855.js",
a + "/_app/immutable/chunks/measures.1b2dc2d6.js",
a + "/_app/immutable/chunks/memoize.e19fc13a.js",
a + "/_app/immutable/chunks/mermaid.core.65f7eeba.js",
a + "/_app/immutable/chunks/navigation.f704002d.js",
a + "/_app/immutable/chunks/offensive-technique.a85155c6.js",
a + "/_app/immutable/chunks/paths.17b8a929.js",
a + "/_app/immutable/chunks/preload-helper.a4192956.js",
a + "/_app/immutable/chunks/scheduler.50831561.js",
a + "/_app/immutable/chunks/selectAll.b8189eaf.js",
a + "/_app/immutable/chunks/singletons.67bb3745.js",
a + "/_app/immutable/chunks/sortBy.010ae666.js",
a + "/_app/immutable/chunks/spread.8a54911c.js",
a + "/_app/immutable/chunks/stores.87b59478.js",
a + "/_app/immutable/chunks/stores.9b0ea2d4.js",
a + "/_app/immutable/chunks/styles-0dd3ba1e.163ac408.js",
a + "/_app/immutable/chunks/styles-4fe3d1fc.a6542994.js",
a + "/_app/immutable/chunks/styles-d6bd7a5e.a7439da9.js",
a + "/_app/immutable/chunks/svgDraw-6a237a99.511db521.js",
a + "/_app/immutable/chunks/toString.573793c9.js",
a + "/_app/immutable/chunks/updateDefendTree.c70a257c.js",
a + "/_app/immutable/entry/start.7cda07fe.js",
a + "/_app/immutable/chunks/c4Diagram-f9e67060.f653acc8.js",
a + "/_app/immutable/chunks/classDiagram-4456d403.1e35c2ea.js",
a + "/_app/immutable/chunks/classDiagram-v2-539b00ca.d8308f42.js",
a + "/_app/immutable/chunks/erDiagram-25977acd.a198d77b.js",
a + "/_app/immutable/chunks/errorDiagram-bb949655.06458205.js",
a + "/_app/immutable/chunks/flowDiagram-42bb1e4d.0e6953ac.js",
a + "/_app/immutable/chunks/flowDiagram-v2-4c9a7611.f100e581.js",
a + "/_app/immutable/chunks/flowchart-elk-definition-c9fc5e04.f19a3c4d.js",
a + "/_app/immutable/chunks/ganttDiagram-41439120.ae3229f1.js",
a + "/_app/immutable/chunks/gitGraphDiagram-30dcca6d.a7548526.js",
a + "/_app/immutable/chunks/infoDiagram-1b335302.0fe93984.js",
a + "/_app/immutable/chunks/journeyDiagram-ded66ec9.b4d8cd6f.js",
a + "/_app/immutable/chunks/mindmap-definition-c8a05b8a.a76f4d0f.js",
a + "/_app/immutable/chunks/pieDiagram-905ac727.dc44f9f6.js",
a + "/_app/immutable/chunks/requirementDiagram-84e9ae78.beb1695b.js",
a + "/_app/immutable/chunks/sequenceDiagram-2c95880e.aaf670d9.js",
a + "/_app/immutable/chunks/stateDiagram-95825141.8611c803.js",
a + "/_app/immutable/chunks/stateDiagram-v2-1cc5d8ed.d74bad9c.js",
a + "/_app/immutable/chunks/timeline-definition-24ebf147.09b77be5.js",
a + "/_app/immutable/assets/getting-d3fend-to-1.0.dc6fdb1f.css",
a + "/_app/immutable/chunks/getting-d3fend-to-1.0.8ac5ba5c.js"
], b = [
a + "/favicon.ico",
a + "/font/azonix/azonix-d3fend.otf",
a + "/global-d3fend.css",
a + "/img/acf.png",
a + "/img/attack-dao-defend.png",
a + "/img/attack-defend.png",
a + "/img/attack-mapper.png",
a + "/img/csd.png",
a + "/img/csv.png",
a + "/img/d3fend-og.png",
a + "/img/d3fend-poster-thumb.png",
a + "/img/dtea.png",
a + "/img/gimp/d3fend-icon.xcf",
a + "/img/graph.png",
a + "/img/graph1.png",
a + "/img/json.png",
a + "/img/mappings-mitigations.png",
a + "/img/mitre.png",
a + "/img/nsa.png",
a + "/img/owl.png",
a + "/img/paper.png",
a + "/img/ttl.png",
a + "/img/usdre.png",
a + "/ontologies/.git",
a + "/ontologies/README.md",
a + "/ontologies/d3fend/0.10.1-BETA-1/d3fend.csv",
a + "/ontologies/d3fend/0.10.1-BETA-1/d3fend.json",
a + "/ontologies/d3fend/0.10.1-BETA-1/d3fend.owl",
a + "/ontologies/d3fend/0.10.1-BETA-1/d3fend.ttl",
a + "/ontologies/d3fend/0.11.0-BETA-1/d3fend.csv",
a + "/ontologies/d3fend/0.11.0-BETA-1/d3fend.json",
a + "/ontologies/d3fend/0.11.0-BETA-1/d3fend.owl",
a + "/ontologies/d3fend/0.11.0-BETA-1/d3fend.ttl",
a + "/ontologies/d3fend/0.12.0-BETA-1/d3fend.csv",
a + "/ontologies/d3fend/0.12.0-BETA-1/d3fend.json",
a + "/ontologies/d3fend/0.12.0-BETA-1/d3fend.owl",
a + "/ontologies/d3fend/0.12.0-BETA-1/d3fend.ttl",
a + "/ontologies/d3fend/0.12.0-BETA-2/d3fend-full-mappings.csv",
a + "/ontologies/d3fend/0.12.0-BETA-2/d3fend-full-mappings.json",
a + "/ontologies/d3fend/0.12.0-BETA-2/d3fend.json",
a + "/ontologies/d3fend/0.12.0-BETA-2/d3fend.owl",
a + "/ontologies/d3fend/0.12.0-BETA-2/d3fend.ttl",
a + "/ontologies/d3fend/0.13.0-BETA-1/d3fend.csv",
a + "/ontologies/d3fend/0.13.0-BETA-1/d3fend.json",
a + "/ontologies/d3fend/0.13.0-BETA-1/d3fend.owl",
a + "/ontologies/d3fend/0.13.0-BETA-1/d3fend.ttl",
a + "/ontologies/d3fend/0.9.3-BETA-1/d3fend.json",
a + "/ontologies/d3fend/0.9.3-BETA-1/d3fend.owl",
a + "/ontologies/d3fend/0.9.3-BETA-1/d3fend.ttl",
a + "/ontologies/d3fend.csv",
a + "/ontologies/d3fend.json",
a + "/ontologies/d3fend.owl",
a + "/ontologies/d3fend.ttl",
a + "/resources/D3FEND.pdf",
a + "/resources/d3fend-full-mappings.csv",
a + "/resources/d3fend-full-mappings.json",
a + "/resources/extra-dist/CNAME",
a + "/resources/extra-dist/README.md"
], i = "1699366029244", n = `cache${i}`, c = u.concat(b), l = new Set(c);
self.addEventListener("install", (s) => {
s.waitUntil(
caches.open(n).then((e) => e.addAll(c)).then(() => {
self.skipWaiting();
})
);
});
self.addEventListener("activate", (s) => {
s.waitUntil(
caches.keys().then(async (e) => {
for (const m of e)
m !== n && await caches.delete(m);
self.clients.claim();
})
);
});
async function o(s) {
const e = await caches.open(`offline${i}`);
try {
const m = await fetch(s);
return e.put(s, m.clone()), m;
} catch (m) {
const p = await e.match(s);
if (p)
return p;
throw m;
}
}
self.addEventListener("fetch", (s) => {
if (s.request.method !== "GET" || s.request.headers.has("range"))
return;
const e = new URL(s.request.url), m = e.protocol.startsWith("http"), p = e.hostname === self.location.hostname && e.port !== self.location.port, t = e.host === self.location.host && l.has(e.pathname), d = s.request.cache === "only-if-cached" && !t;
m && !p && !d && s.respondWith(
(async () => t && await caches.match(s.request) || o(s.request))()
);
});