1/* Generated by vite.config.web.ts â do not edit. */ 2const BUILD_ID = "unknown-20261001T141457" 3const PRECACHE = 'finchat-precache-' + BUILD_ID 4const RUNTIME = 'finchat-runtime-' + BUILD_ID 5const PRECACHE_URLS = ["/","/assets/MobileBottomSheet-B6kysGgQ.js","/assets/MobileBottomSheet-D-9-ijM7.css","/assets/RunStrategyModal-CquLFMtG.css","/assets/chat-dialog-CCjw_DoA.css","/assets/chatBootstrap-CnhKjAU0.js","/assets/index--FsQcL7s.css","/assets/index-BL7CAZNo.css","/assets/index-BPvvT87T.js","/assets/index-BTdLDmWB.css","/assets/index-CA6ANDz_.css","/assets/index-COcwUhtK.css","/assets/index-CPeDhq0J.css","/assets/index-CQ565Eui.css","/assets/index-Cbj206Rk.js","/assets/index-Cx8A-iuK.js","/assets/index-CzNRDcY2.css","/assets/index-D1AptkyS.js","/assets/index-DG-CgWAe.js","/assets/index-DKTt0r1c.css","/assets/index-DWaP_4KW.js","/assets/index-DnOxCY4g.js","/assets/index-Dnsv_R6M.js","/assets/index-DrLBEkUX.css","/assets/index-ShIeufbd.js","/assets/index-TGnBdIi7.css","/assets/index-Y8wO1y55.css","/assets/index-dKtP5Uqd.js","/assets/intercom-DrlG_LL-.js","/assets/katex-DrELT6T8.css","/assets/keycode-BXpp3jFq.js","/assets/marketEntry-69WHgBkv.js","/assets/reasoningEffort-DMqdhCXG.js","/assets/recoveryWizardAdapter-CfmWI5nW.js","/assets/styles-B7wfuknb.css","/assets/styles-DhZtE4D9.js","/assets/useChatSSE-DC2XAVY8.js","/assets/useCurrentMarket-B7ooaSNT.css","/assets/useCurrentMarket-C7mMkbTP.js","/assets/useSelectedModels-7i7MPkaQ.css","/assets/useSelectedModels-gaSSJh4s.js","/assets/vendor-i18n-CeqKB46a.js","/assets/vendor-react-C7snOpfu.js","/assets/vendor-redux-DVG1W9QJ.js","/assets/vendor-router-Bvr19Whe.js"] 6 7self.addEventListener('install', (event) => { 8 event.waitUntil((async () => { 9 const cache = await caches.open(PRECACHE) 10 await Promise.all(PRECACHE_URLS.map(async (url) => { 11 // 'reload' bypasses the HTTP cache, which is what '/' needs: this install 12 // must capture the new shell even inside its short stale window. Asset names 13 // carry a content hash and are served immutable for a year, so there the 14 // HTTP cache can only hold the right bytes â letting it answer turns a 15 // deploy's precache refill from ~1.5MB of downloads into mostly local 16 // copies, and a name it has never seen still goes to the network. 17 const init = url === '/' ? { cache: 'reload' } : undefined 18 try { await cache.add(new Request(url, init)) } catch (_) {} 19 })) 20 await self.skipWaiting() 21 })()) 22}) 23 24self.addEventListener('activate', (event) => { 25 event.waitUntil((async () => { 26 const keep = new Set([PRECACHE, RUNTIME]) 27 const names = await caches.keys() 28 await Promise.all(names.filter((name) => name.startsWith('finchat-') && !keep.has(name)).map((name) => caches.delete(name))) 29 await self.clients.claim() 30 })()) 31}) 32 33async function cachedAppShell(request) { 34 const precache = await caches.open(PRECACHE) 35 const cached = await precache.match('/') 36 if (cached) { 37 // Update the HTML in the background for the following navigation. 38 fetch(request).then((response) => { 39 if (response.status === 200) storeResponse(PRECACHE, '/', response.clone()) 40 }).catch(() => {}) 41 return cached 42 } 43 const response = await fetch(request) 44 if (response.status === 200) storeResponse(PRECACHE, '/', response.clone()) 45 return response 46} 47 48// Only a complete 200 is storable, and storing is always best-effort. `ok` spans 49// the whole 2xx range, so it let a 206 through and the Cache API rejects those 50// outright â the reported `Failed to execute 'put' on 'Cache'` came from a ranged 51// asset request. A put can also fail on its own terms (quota, private browsing), 52// and a detached rejection surfaces in the page as an unhandled error. Opening the 53// cache belongs inside the same bet: the open is what creates RUNTIME, so it fails 54// under the very storage pressure this is guarding against, and awaiting it out in 55// the response path would fail the asset request itself rather than just its 56// caching. 57function storeResponse(name, key, response) { 58 caches.open(name).then((cache) => cache.put(key, response)).catch(() => {}) 59} 60 61async function cachedStaticAsset(request) { 62 const cached = await caches.match(request) 63 if (cached) return cached 64 const response = await fetch(request) 65 if (response.status === 200) storeResponse(RUNTIME, request, response.clone()) 66 return response 67} 68 69self.addEventListener('fetch', (event) => { 70 const request = event.request 71 if (request.method !== 'GET') return 72 const url = new URL(request.url) 73 if (url.origin !== self.location.origin) return 74 if (url.pathname.startsWith('/api/') || url.pathname.startsWith('/dev-api/') || url.pathname.startsWith('/account/')) return 75 // A ranged request cannot be answered from this cache: the Cache API refuses to
76 // store the 206 it produces, and a full cached copy would have to be sliced by 77 // hand to answer one. Every <video> asset request is ranged, so they are left to 78 // the network â /assets/ is immutable for a year, so the HTTP cache holds them. 79 if (request.headers.has('range')) return 80 81 if (request.mode === 'navigate') { 82 event.respondWith(cachedAppShell(request)) 83 return 84 } 85 if (url.pathname.startsWith('/assets/') || url.pathname === '/favicon.png') { 86 event.respondWith(cachedStaticAsset(request)) 87 } 88})
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.