andsteing commited on
Commit
f4a3c43
·
1 Parent(s): 81970b7

Initial commit

Browse files

Track large files with Git LFS

.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ bundle.js filter=lfs diff=lfs merge=lfs -text
2
+ bundle.js.map filter=lfs diff=lfs merge=lfs -text
README.md ADDED
File without changes
android-chrome-192x192.png ADDED
android-chrome-512x512.png ADDED
apple-touch-icon.png ADDED
bundle.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:779b6880e8ec03f8a0896633a10c7ccd1bb87d1498ec8d1642888062ef6b2b48
3
+ size 12930152
bundle.js.LICENSE.txt ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Determine if an object is a Buffer
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ /*!
16
+ * pad-left <https://github.com/jonschlinkert/pad-left>
17
+ *
18
+ * Copyright (c) 2014-2015, Jon Schlinkert.
19
+ * Licensed under the MIT license.
20
+ */
21
+
22
+ /*!
23
+ * repeat-string <https://github.com/jonschlinkert/repeat-string>
24
+ *
25
+ * Copyright (c) 2014-2015, Jon Schlinkert.
26
+ * Licensed under the MIT License.
27
+ */
28
+
29
+ /*! Bundled license information:
30
+
31
+ native-promise-only/lib/npo.src.js:
32
+ (*! Native Promise Only
33
+ v0.8.1 (c) Kyle Simpson
34
+ MIT License: http://getify.mit-license.org
35
+ *)
36
+
37
+ polybooljs/index.js:
38
+ (*
39
+ * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
40
+ * @license MIT
41
+ * @preserve Project Home: https://github.com/voidqk/polybooljs
42
+ *)
43
+
44
+ ieee754/index.js:
45
+ (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
46
+
47
+ buffer/index.js:
48
+ (*!
49
+ * The buffer module from node.js, for the browser.
50
+ *
51
+ * @author Feross Aboukhadijeh <https://feross.org>
52
+ * @license MIT
53
+ *)
54
+
55
+ safe-buffer/index.js:
56
+ (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
57
+
58
+ assert/build/internal/util/comparisons.js:
59
+ (*!
60
+ * The buffer module from node.js, for the browser.
61
+ *
62
+ * @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
63
+ * @license MIT
64
+ *)
65
+
66
+ object-assign/index.js:
67
+ (*
68
+ object-assign
69
+ (c) Sindre Sorhus
70
+ @license MIT
71
+ *)
72
+
73
+ maplibre-gl/dist/maplibre-gl.js:
74
+ (**
75
+ * MapLibre GL JS
76
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
77
+ *)
78
+ */
79
+
80
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
bundle.js.map ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b28fa5104016d01083ceed0ec0e90f945ccc95327a8f4f49ca8841d3af9f316c
3
+ size 29675145
favicon-16x16.png ADDED
favicon-32x32.png ADDED
favicon.ico ADDED
index.html ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!doctype html><html lang="en"><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="manifest.json"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Fractal Gaussian Noise</title><style>body {
2
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
3
+ margin: 0;
4
+ padding: 3em;
5
+ background-color: #f4f4f9;
6
+ color: #333;
7
+ display: flex;
8
+ flex-direction: column;
9
+ align-items: center;
10
+ width: 95vw;
11
+ padding: 0;
12
+ margin: 0 auto;
13
+ }
14
+ .spinner {
15
+ width: 48px;
16
+ height: 48px;
17
+ border: 6px solid #e0e0e0;
18
+ border-top: 6px solid #6c63ff;
19
+ border-radius: 50%;
20
+ animation: spin 1s linear infinite;
21
+ margin: auto;
22
+ }
23
+ @keyframes spin {
24
+ to { transform: rotate(360deg); }
25
+ }
26
+ #titleDiv {
27
+ h1 {
28
+ margin: 10px;
29
+ }
30
+ text-align: center;
31
+ margin-bottom: 1em;
32
+ }
33
+ #uiDiv {
34
+ width:100%;
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: 1em;
38
+ }
39
+ .settings {
40
+ justify-content: center;
41
+ }
42
+ .plot {
43
+ width: 100%;
44
+ height: 40vh;
45
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
46
+ }
47
+ .h {
48
+ display: flex;
49
+ gap: 1em;
50
+ }
51
+ .fw {
52
+ flex-wrap: wrap;
53
+ }
54
+ .g2 {
55
+ gap: 2em;
56
+ }
57
+ .token {
58
+ border: 1px solid #888;
59
+ }</style><script defer="defer" src="bundle.js"></script></head><body><div id="titleDiv"><h1>Do LLMs Capture the Fractal Complexity of Language?</h1>ICML 2025 | <a href="https://arxiv.org/abs/2502.14924">paper</a> | <a href="https://icml.cc/media/PosterPDFs/ICML%202025/44028.png">poster</a> | <a href="https://huggingface.co/datasets/ibomohsin/gagle/blob/main/GAGLE_Dataset.ipynb">dataset</a></div><div id="loadingDiv" style="display: flex; flex-direction: column; align-items: center; margin-top: 4em;"><div class="spinner"></div><div style="margin-top: 1em; font-size: 1.2em; color: #555;">Loading...</div></div><div id="uiDiv" style="display:none;"><div class="h fw g2 settings"><div class="h"><select size="1" id="plotSelect"><option value="integral">plot integral</option><option value="increments">plot increments</option></select> <select size="1" id="spdSelect"><option value="100">100 samples</option><option value="1000">1000 samples</option><option value="10000" selected="selected">10000 samples</option></select> <select size="1" id="epsSelect"><option value="0.01">eps=0.01</option><option value="0.001">eps=0.001</option><option value="0.0001">eps=0.0001</option></select></div><div class="h"><select size="1" id="panelSelect"><option value="fgn">FGN</option><option value="scores" selected="selected">Scores</option></select><div class="h fw" id="fgnPanel"><select size="1" id="hurstSelect"><option value="0.1">h=0.1</option><option value="0.2">h=0.2</option><option value="0.3">h=0.3</option><option value="0.4">h=0.4</option><option value="0.5">h=0.5</option><option value="0.6">h=0.6</option><option value="0.7" selected="selected">h=0.7</option><option value="0.8">h=0.8</option><option value="0.9">h=0.9</option></select></div><div class="h fw" id="scoresPanel"><select size="1" id="dataSelect"></select><div><select size="1" id="idx0Select"></select> - <select size="1" id="idx1Select"></select></div><select size="1" id="textSelect"><option value="original_text">original_text</option><option value="llm_text">llm_text</option></select> <select size="1" id="scorerSelect"><option value="gemma-2b">gemma-2b</option><option value="mistral-7b">mistral-7b</option></select></div></div><!-- #{fgn,scores}Panel --></div><div id="resultsDiv" class="h"><div id="holderPlot" class="plot"></div><div id="hurstPlot" class="plot"></div></div><div id="mainPlot" class="plot"></div><div id="textDiv"></div></div></body></html>
manifest.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "short_name": "gagle web app",
3
+ "name": "gagle web app",
4
+ "icons": [
5
+ {
6
+ "src": "./android-chrome-192x192.png",
7
+ "sizes": "192x192",
8
+ "type": "image/png"
9
+ },
10
+ {
11
+ "src": "./android-chrome-512x512.png",
12
+ "sizes": "512x512",
13
+ "type": "image/png"
14
+ }
15
+ ],
16
+ "start_url": ".",
17
+ "display": "standalone",
18
+ "theme_color": "#ffffff",
19
+ "background_color": "#f4f4f9"
20
+ }
service-worker.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ if(!self.define){let e,i={};const n=(n,o)=>(n=new URL(n+".js",o).href,i[n]||new Promise(i=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=i,document.head.appendChild(e)}else e=n,importScripts(n),i()}).then(()=>{let e=i[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(o,r)=>{const f=e||("document"in self?document.currentScript.src:"")||location.href;if(i[f])return;let d={};const c=e=>n(e,f),s={module:{uri:f},exports:d,require:c};i[f]=Promise.all(o.map(e=>s[e]||c(e))).then(e=>(r(...e),d))}}define(["./workbox-1f84e78b"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"android-chrome-192x192.png",revision:"eba3afab542a1f2a73f5ab00189500f8"},{url:"android-chrome-512x512.png",revision:"d0c93c1c7327a37da474912e218aa4f0"},{url:"apple-touch-icon.png",revision:"9d6fb9e7fafb85f17d076cd894d67451"},{url:"bundle.js.LICENSE.txt",revision:"68da120916319de1636898d7a1f2a84b"},{url:"favicon-16x16.png",revision:"1a81b313988bf91c60533d7bc185d2d8"},{url:"favicon-32x32.png",revision:"489780f7ef149d8deb63c0462ae8225a"},{url:"favicon.ico",revision:"8ffac74f023c54765fcaffe620e6c373"},{url:"index.html",revision:"191319da740426b6a62ea188e6e37062"},{url:"manifest.json",revision:"12149f1b9ae97de7d9759f6007416e50"}],{})});
2
+ //# sourceMappingURL=service-worker.js.map
service-worker.js.map ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version":3,"file":"service-worker.js","sources":["../../../../../private/var/folders/69/820n51r53cd0mj_gqbc4p040009258/T/b517f781fe1318ee925898a60fc64cac/service-worker.js"],"sourcesContent":["import {clientsClaim as workbox_core_clientsClaim} from '/Users/andstein/git/gagle/webapp/node_modules/workbox-core/clientsClaim.mjs';\nimport {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/Users/andstein/git/gagle/webapp/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"android-chrome-192x192.png\",\n \"revision\": \"eba3afab542a1f2a73f5ab00189500f8\"\n },\n {\n \"url\": \"android-chrome-512x512.png\",\n \"revision\": \"d0c93c1c7327a37da474912e218aa4f0\"\n },\n {\n \"url\": \"apple-touch-icon.png\",\n \"revision\": \"9d6fb9e7fafb85f17d076cd894d67451\"\n },\n {\n \"url\": \"bundle.js.LICENSE.txt\",\n \"revision\": \"68da120916319de1636898d7a1f2a84b\"\n },\n {\n \"url\": \"favicon-16x16.png\",\n \"revision\": \"1a81b313988bf91c60533d7bc185d2d8\"\n },\n {\n \"url\": \"favicon-32x32.png\",\n \"revision\": \"489780f7ef149d8deb63c0462ae8225a\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"8ffac74f023c54765fcaffe620e6c373\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"191319da740426b6a62ea188e6e37062\"\n },\n {\n \"url\": \"manifest.json\",\n \"revision\": \"12149f1b9ae97de7d9759f6007416e50\"\n }\n], {});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_core_clientsClaim","workbox_precaching_precacheAndRoute","url","revision"],"mappings":"inBAoBAA,KAAKC,cAELC,EAAAA,eAQAC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,qCAEb,CAAA"}
workbox-1f84e78b.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ define(["exports"],function(t){"use strict";try{self["workbox:core:7.2.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.2.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const c=t.method;if(!o&&this.i.has(c)&&(o=this.i.get(c)),!o)return;let a;try{a=o.handle({url:s,request:t,event:e,params:i})}catch(t){a=Promise.reject(t)}const h=r&&r.catchHandler;return a instanceof Promise&&(this.o||h)&&(a=a.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),a}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let c;const a={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[a.prefix,t,a.suffix].filter(t=>t&&t.length>0).join("-"),u=t=>t||h(a.precache),l=t=>t||h(a.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.2.0"]&&_()}catch(t){}function w(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class d{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class p{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let y;async function g(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,c=function(){if(void 0===y){const t=new Response("");if("body"in t)try{new Response(t.body),y=!0}catch(t){y=!1}y=!1}return y}()?i.body:await i.blob();return new Response(c,o)}function R(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class m{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const v=new Set;try{self["workbox:strategies:7.2.0"]&&_()}catch(t){}function q(t){return"string"==typeof t?new Request(t):t}class U{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new m,this.R=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=q(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=q(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=q(t);var i;await(i=0,new Promise(t=>setTimeout(t,i)));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const c=await this.q(e);if(!c)return!1;const{cacheName:a,matchOptions:h}=this.l,u=await self.caches.open(a),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=R(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===R(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of v)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:a,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=q(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.R.push(t),t}async doneWaiting(){let t;for(;t=this.R.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class L{constructor(t={}){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new U(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this._(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class b extends L{constructor(t={}){t.cacheName=u(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(b.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,e){let n;const i=e.params||{};if(!this.C)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||s:void 0})),s&&o&&"no-cors"!==t.mode&&(this.k(),await e.cachePut(t,n.clone()))}return n}async O(t,e){this.k();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}k(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==b.copyRedirectedCacheableResponsesPlugin&&(n===b.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(b.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}b.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},b.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await g(t):t};class C{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.T=new Map,this.W=new Map,this.l=new b({cacheName:u(t),plugins:[...e,new p({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.j||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.j=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=w(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.W.has(t)&&this.W.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.W.set(t,n.integrity)}if(this.K.set(i,t),this.T.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return f(t,async()=>{const e=new d;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.W.get(s),i=this.T.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return f(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.W.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let E;const O=()=>(E||(E=new C),E);class x extends i{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}function N(t){const e=O();!function(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new i(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new r(t,e,n);else if("function"==typeof t)a=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}(c||(c=new o,c.addFetchListener(),c.addCacheListener()),c).registerRoute(a)}(new x(e,t))}t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.precacheAndRoute=function(t,e){!function(t){O().precache(t)}(t),N(e)}});
2
+ //# sourceMappingURL=workbox-1f84e78b.js.map
workbox-1f84e78b.js.map ADDED
The diff for this file is too large to render. See raw diff