@circuitwall/jarela 0.7.0 → 0.7.2
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +6 -6
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +5 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.html +2 -2
- package/.next/standalone/.next/server/app/index.rsc +7 -7
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup.html +1 -1
- package/.next/standalone/.next/server/app/setup.rsc +5 -5
- package/.next/standalone/.next/server/app/setup.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/setup.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/_index.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/setup.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/setup.segments/setup.segment.rsc +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +20 -1
- package/.next/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/.next/standalone/.next/server/next-font-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/IauO0rNZkUVPX834k-SBa/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/3457-5218e06617c4db2a.js +21026 -0
- package/.next/standalone/.next/static/chunks/3457-5218e06617c4db2a.js.map +1 -0
- package/.next/standalone/.next/static/chunks/4bd1b696-f4afdf0ad1d556a5.js +18276 -0
- package/.next/standalone/.next/static/chunks/4bd1b696-f4afdf0ad1d556a5.js.map +1 -0
- package/.next/standalone/.next/static/chunks/6945-269d42dc1784c71a.js +728 -0
- package/.next/standalone/.next/static/chunks/6945-269d42dc1784c71a.js.map +1 -0
- package/.next/standalone/.next/static/chunks/8657-ce5d7648903bc458.js +64051 -0
- package/.next/standalone/.next/static/chunks/8657-ce5d7648903bc458.js.map +1 -0
- package/.next/standalone/.next/static/chunks/app/_global-error/page-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/_not-found/page-1c2b53258ccc0873.js +191 -0
- package/.next/standalone/.next/static/chunks/app/_not-found/page-1c2b53258ccc0873.js.map +1 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/app/layout-0814b4dde82d031c.js +211 -0
- package/.next/standalone/.next/static/chunks/app/layout-0814b4dde82d031c.js.map +1 -0
- package/.next/standalone/.next/static/chunks/app/page-a20902703c0a4f10.js +18162 -0
- package/.next/standalone/.next/static/chunks/app/page-a20902703c0a4f10.js.map +1 -0
- package/.next/standalone/.next/static/chunks/app/setup/page-28c01e39806ffb39.js +709 -0
- package/.next/standalone/.next/static/chunks/app/setup/page-28c01e39806ffb39.js.map +1 -0
- package/.next/standalone/.next/static/chunks/framework-01304d5a84d96921.js +17321 -0
- package/.next/standalone/.next/static/chunks/framework-01304d5a84d96921.js.map +1 -0
- package/.next/standalone/.next/static/chunks/main-app-3f37bcefd1eaffaf.js +40 -0
- package/.next/standalone/.next/static/chunks/main-app-3f37bcefd1eaffaf.js.map +1 -0
- package/.next/standalone/.next/static/chunks/main-da6c99fc920e0f54.js +10973 -0
- package/.next/standalone/.next/static/chunks/main-da6c99fc920e0f54.js.map +1 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-e0f5f907bea96484.js +19 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-e0f5f907bea96484.js.map +1 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-ef2695e78d17eafd.js +17 -0
- package/.next/standalone/.next/static/chunks/webpack-ff5627013a5e3842.js +330 -0
- package/.next/standalone/.next/static/chunks/webpack-ff5627013a5e3842.js.map +1 -0
- package/.next/standalone/.next/static/css/61d4279c2300e146.css +120 -0
- package/.next/standalone/.next/static/css/61d4279c2300e146.css.map +1 -0
- package/.next/standalone/.next/static/css/cc66c456aba91258.css +5 -0
- package/.next/standalone/.next/static/css/cc66c456aba91258.css.map +1 -0
- package/.next/standalone/package.json +8 -7
- package/.next/standalone/public/sw.js.map +1 -0
- package/.next/standalone/public/swe-worker-f61931bc2770d10b.js.map +1 -0
- package/.next/standalone/server.js +1 -1
- package/CHANGELOG.md +26 -0
- package/next.config.ts +15 -0
- package/package.json +8 -7
- package/public/sw.js.map +1 -0
- package/public/swe-worker-f61931bc2770d10b.js.map +1 -0
- package/scripts/jarela-bin.mjs +9 -0
- package/scripts/optimize-client-chunks.mjs +144 -0
- package/scripts/start-prod.mjs +10 -0
- package/.next/standalone/.next/static/YPyYnTKBZDNmNtxfosViy/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/3457-33fb797ce4ab98b5.js +0 -32
- package/.next/standalone/.next/static/chunks/4bd1b696-d3a0b478714afd8c.js +0 -1
- package/.next/standalone/.next/static/chunks/6945-fe3c2c29fcc9747d.js +0 -1
- package/.next/standalone/.next/static/chunks/8657-4832c6fc644bc4b4.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_global-error/page-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/_not-found/page-a6e862db975a5eb0.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/[identity]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/access/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/compact/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/display-filters/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/[id]/thread/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/agents/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/chats/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/lookup/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/pair/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/[route_id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/routes/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/[id]/status/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/bridges/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/builtin-tools/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/search/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/settings/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/reindex/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/documents/sources/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/allowlist/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/env-sync/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/events/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/events/test/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/extensions/tools/[name]/secrets/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/files/[name]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/fs/browse/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/default/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/harnesses/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/health/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/[name]/test/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/callback/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/start/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/gmail/oauth/status/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/callback/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/start/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/outlook/oauth/status/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/integrations/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/maps/embed/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/[name]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/registry/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/mcp-servers/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/[namespace]/[key]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/memory/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/models/[name]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/models/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/page-capture/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/approve/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/[id]/deny/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/pending-actions/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/location/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/profile/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/[provider]/models/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/github-copilot/auth/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/providers/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/proxy-config/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/[id]/run/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/scheduled-tasks/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/setup/test-key/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/tailscale/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/[agent_id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/tasks/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/[thread_id]/run/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/threads/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/tools/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/update/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/transcribe/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/voice/tts/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/[id]/run/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/reaction-scripts/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/v1/watchers/route-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/app/layout-764e6d7e68bc7d35.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-a4f8846bc63c9c2f.js +0 -24
- package/.next/standalone/.next/static/chunks/app/setup/page-ed59c750c18fee42.js +0 -1
- package/.next/standalone/.next/static/chunks/framework-29e3791c8b7ad5e0.js +0 -1
- package/.next/standalone/.next/static/chunks/main-app-cb0edf855588e8f1.js +0 -1
- package/.next/standalone/.next/static/chunks/main-b611c7b6b84fbe95.js +0 -5
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-23ce00bb5787d544.js +0 -1
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2a40ae26adab6590.js +0 -1
- package/.next/standalone/.next/static/chunks/webpack-5793430421782353.js +0 -1
- package/.next/standalone/.next/static/css/5eacd01f773eed7f.css +0 -11
- package/.next/standalone/.next/static/css/a0f98435baf0fccf.css +0 -1
- /package/.next/standalone/.next/static/{YPyYnTKBZDNmNtxfosViy → IauO0rNZkUVPX834k-SBa}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"../public/sw.js","mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yCAAyC;AAC9D;AACA,iBAAiB,UAAU,0DAA0D,uBAAuB,sBAAsB,sBAAsB;AACxJ,EAAE;AACF,oBAAoB,4CAA4C;AAChE;AACA,2BAA2B,UAAU,iBAAiB,WAAW,GAAG,UAAU,GAAG,SAAS;AAC1F,EAAE;AACF,sBAAsB,0DAA0D;AAChF;AACA,2BAA2B,UAAU,iBAAiB,WAAW,GAAG,eAAe,UAAU,QAAQ,EAAE,SAAS,sBAAsB,aAAa;AACnJ,EAAE;AACF,uBAAuB,qFAAqF;AAC5G;AACA,sCAAsC,UAAU;AAChD,6DAA6D,WAAW,GAAG,aAAa,EAAE,SAAS,mCAAmC,kBAAkB;AACxJ,2BAA2B,UAAU,iBAAiB,WAAW,GAAG,aAAa,EAAE,SAAS,mCAAmC,kBAAkB;AACjJ,EAAE;AACF,wBAAwB,4DAA4D;AACpF;AACA,YAAY,WAAW,GAAG,UAAU,GAAG,SAAS,mBAAmB,UAAU,2BAA2B,eAAe;AACvH,EAAE;AACF,yCAAyC,OAAO;AAChD,+FAA+F,sBAAsB;AACrH,EAAE;AACF,6CAA6C,yBAAyB;AACtE;AACA,2FAA2F,YAAY;AACvG,EAAE;AACF,uCAAuC,oBAAoB;AAC3D;AACA,0GAA0G,mBAAmB;AAC7H,EAAE;AACF,0BAA0B,oBAAoB;AAC9C;AACA,yFAAyF,EAAE,YAAY,QAAQ,0BAA0B,sBAAsB;AAC/J,EAAE;AACF,kDAAkD,QAAQ;AAC1D;AACA,sGAAsG,OAAO;AAC7G,EAAE;AACF;AACA;AACA,EAAE;AACF,2BAA2B,MAAM;AACjC,iDAAiD,KAAK;AACtD,EAAE;AACF,4BAA4B,MAAM;AAClC,4BAA4B,KAAK;AACjC,EAAE;AACF,oCAAoC,uBAAuB;AAC3D,iBAAiB,WAAW,wCAAwC,UAAU;AAC9E,EAAE;AACF,8BAA8B,4CAA4C;AAC1E,0BAA0B,UAAU,iEAAiE,WAAW,GAAG,UAAU,GAAG,UAAU;AAC1I,EAAE;AACF,0BAA0B,kEAAkE;AAC5F,0BAA0B,UAAU,mCAAmC,cAAc,uBAAuB,sBAAsB,+BAA+B,WAAW,GAAG,UAAU,GAAG,SAAS;AACrM,EAAE;AACF,mCAAmC,iCAAiC;AACpE,qFAAqF,WAAW,GAAG,UAAU,GAAG,SAAS;AACzH,EAAE;AACF,oCAAoC,iCAAiC;AACrE,6EAA6E,WAAW,GAAG,UAAU,GAAG,SAAS;AACjH,EAAE;AACF,sBAAsB,iCAAiC;AACvD;AACA,qCAAqC,UAAU,0HAA0H,WAAW,GAAG,SAAS;AAChM,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF,0BAA0B,uBAAuB;AACjD;AACA,0GAA0G,sBAAsB;AAChI,EAAE;AACF,yBAAyB,uBAAuB;AAChD;AACA,wIAAwI,sBAAsB;AAC9J,EAAE;AACF,4BAA4B,uBAAuB;AACnD;AACA,0IAA0I,sBAAsB;AAChK,EAAE;AACF;AACA;AACA,EAAE;AACF,6BAA6B,kBAAkB;AAC/C,uBAAuB,MAAM,aAAa,IAAI,6EAA6E,MAAM;AACjI,EAAE;AACF,wCAAwC,aAAa;AACrD,6BAA6B,IAAI,qBAAqB,OAAO;AAC7D,EAAE;AACF,kCAAkC,KAAK;AACvC,2CAA2C,IAAI;AAC/C,EAAE;AACF,mBAAmB,YAAY;AAC/B,mEAAmE,IAAI;AACvE,oDAAoD,MAAM;AAC1D;AACA,EAAE;AACF,+BAA+B,aAAa;AAC5C,wCAAwC,IAAI,UAAU,oCAAoC,OAAO,SAAS;AAC1G,EAAE;AACF,yBAAyB,KAAK;AAC9B,sCAAsC,IAAI;AAC1C,EAAE;AACF,iDAAiD,KAAK;AACtD,2FAA2F,KAAK;AAChG,EAAE;AACF,8BAA8B,gBAAgB;AAC9C,mDAAmD,WAAW,MAAM,IAAI;AACxE,EAAE;AACF,kCAAkC,QAAQ;AAC1C,6HAA6H,OAAO;AACpI,EAAE;AACF,6BAA6B,MAAM;AACnC,2EAA2E,KAAK;AAChF,2CAA2C,SAAS;AACpD,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,6CAA6C;AAC7C;AACA,mEAAmE,KAAK;AACxE;AACA;AACA,yBAAyB,KAAqC,cAAc,CAAiB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+BAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+BAAY;AAClD;AACA;AACA;AACA;AACA,YAAY,+BAAY;AACxB;AACA;AACA;AACA;AACA;AACA,YAAY,+BAAY;AACxB;AACA;AACA;AACA;AACA;AACA,YAAY,+BAAY;AACxB;AACA;AACA;AACA;AACA,sDAAsD,4BAA4B;AAClF,YAAY,+BAAY;AACxB;AACA;AACA;AACA,mBAAmB,+BAAY;AAC/B;AACA;AACA;AACA,2BAA2B,KAAqC,UAAU,CAOzE;AACD;AACA;AACA;AACA,wEAAwE,gBAAgB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,yBAAM,GAAG,KAAoE,UAAU,CAqCzF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAAqF;AACjI;AACA;AACA,MAAM,KAAqC,EAAE,EAAqC;AAClF;AACA,KAAK,KAAqC,EAAE,EAA0C;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAE1C;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACsU;;AAEtU;;ACreA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yCAAyC,IAAI;AAC9E;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,UAAU,IAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,CAAC;;AAEyC;;;AChTkO;AAC/O;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAAY,iCAAiC,QAAQ;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,uBAAuB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,MAAM,wDAAwD,0BAA0B;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,oDAAoD,eAAe;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8CAA8C,IAAI;AACvE,sCAAsC,+BAAY,2BAA2B,MAAM;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2CAA2C;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAAoH;AACjK;AACA;AACA;AACA;AACA;AACA,aAAa,oCAAoC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA4G;AAC1J,IAAI;AACJ;AACA,OAAO,KAAqC,EAAE,EAA4H;AAC1K,aAAa,+BAAY,0BAA0B,kBAAkB;AACrE;AACA,MAAM,KAAqC,EAAE,EAAuG;AACpJ;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,GAAG,WAAW;AACrE,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAuE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,GAAG,WAAW;AACjD,QAAQ,KAAqC,EAAE,EAAuE;AACtH;AACA;AACA;AACA;AACA,2BAA2B,aAAa;AACxC,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,KAAqC,EAAE,EAAsE;AACpH,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,8BAA8B;AACpE;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B,kCAAkC,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,UAAU;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB,gBAAgB,2BAA2B;AAC/F,GAAG,8BAA8B;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,IAAI;AACJ,uCAAuC,+BAAY,sCAAsC,iCAAiC;AAC1H;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAgI;AAC9K;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAA0F;AACxI;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,0BAA0B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EACsB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,QAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0BAAO;AACf;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA,OAAO,KAAqC,EAAE,EAAkG;AAChJ,aAAa,+BAAY,iCAAiC,KAAK,cAAc,wBAAwB;AACrG;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAwG;AACtJ;AACA;AACA,UAAU,0BAA0B;AACpC;AACA,MAAM,KAAqC,EAAE,EAG1C;AACH;AACA,qDAAqD,sBAAsB;AAC3E,MAAM,KAAqC,EAAE,EAAmH;AAChK;AACA;AACA,IAAI;AACJ;AACA,mDAAmD,0BAA0B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,yCAAyC,oBAAoB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,aAAa,IAAI,KAAK;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4CAA4C;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uCAAuC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAAoG;AACnJ;AACA;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EACiG;AAChJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAQ;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,mEAAmE,+BAAY,kBAAkB,kBAAkB;AACnH,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA+M;AAC7P;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,qCAAQ;AACd,oDAAoD,cAAc,iBAAiB,cAAc,cAAc;AAC/G;AACA;AACA,GAAG,yBAAM;AACT,GAAG,yBAAM;AACT,GAAG,yBAAM;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wBAAwB;AAC7B;AACA,iCAAiC,qCAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAO1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,MAAM,KAAqC,EAAE,EAK1C;AACH,2BAA2B,+BAAY,kBAAkB,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,wBAAwB;AAC9C;AACA;AACA;AACA;AACA,SAAS,KAAqC,EAAE,EAAwF;AACxI;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mCAAmC;AAC/D;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EACuD;AACpG;AACA;AACA,OAAO,KAAqC,EAAE,EAC2B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,wBAAwB;AAC3E;AACA,gCAAgC,qCAAQ;AACxC;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAAO;AAClC;AACA;AACA;AACA,0EAA0E,6BAA6B;AACvG,IAAI;AACJ;AACA;AACA,MAAM,KAAqC,EAAE,EAM1C;AACH,2BAA2B,+BAAY;AACvC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA,KAAK,KAAqC,EAAE,EAKxC;AACJ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAQ1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,oBAAoB;AACzB;AACA;AACA;AACA,GAAG,mBAAmB,UAAU;AAChC;AACA,sDAAsD,qCAAQ;AAC9D;AACA,8CAA8C,wBAAwB,UAAU;AAChF;AACA;AACA;AACA,mDAAmD,wBAAwB,UAAU;AACrF;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,sBAAsB,UAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA0I;AACxL;AACA;AACA;AACA,yDAAyD,4FAA4F;AACrJ;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAE1C;AACL;AACA,IAAI,eAAe,+BAAY;AAC/B;AACA;AACA,GAAG;AACH,MAAM,KAAqC,EAAE,EAW1C;AACH;AACA;AACA;AACA;AACA;AACA,oEAAoE,+BAAY;AAChF;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,mCAAmC,IAAI;AAC/D,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc;AACxB;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA6I;AAC3L;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAyE;AACvH;AACA;AACA,MAAM,KAAqC,EAAE,EAAyI;AACtL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAgD;AAC9F,GAAG;AACH,EAAE;AACF,UAAU,KAAqC,EAAE,EAAsE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAiD;AAC/F,GAAG;AACH,EAAE;AACF,UAAU,KAAqC,EAAE,EAAsE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wHAAwH,IAAI;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,gBAAgB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB;AAChE;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL,mBAAmB,KAAK;AACxB;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAA0N;AACzQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAkB1C;AACF,CAAC,UAAU;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+BAAY,wCAAwC,OAAO;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,gBAAgB;AACzB,qBAAqB,+BAAY,wCAAwC,OAAO;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA,qCAAqC,8BAA8B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,gBAAgB;AACzF,6BAA6B,gBAAgB;AAC7C,oBAAoB,iCAAiC;AACrD;AACA,4CAA4C,iBAAiB;AAC7D;AACA,oDAAoD,iBAAiB;AACrE;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAS1C;AACH,2BAA2B,KAAK;AAChC,OAAO,KAAqC,EAAE,EAE1C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+BAAY;AACvB;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe,gBAAgB,yCAAyC;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB,MAAM,gCAAgC;AACpF,gDAAgD,uBAAuB,MAAM,+CAA+C;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACsoB;;AAEtoB;;ACz+DuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,6CAAqB;AACpC;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAa;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qCAAa;AAClB,uBAAuB,YAAY;AACnC,EAAE,qCAAa;AACf,GAAG;AACH,EAAE,qCAAa;AACf;AACA,QAAQ,qCAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACyF;;AAEzF;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,6BAA6B,eAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,wCAAwC;AACxC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACoJ;;AAEpJ;;AC/FwP;AAC8b;AACrmB;AAC1C;AACG;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAU;AAChB;AACA,SAAS,UAAY;AACrB,EAAE;AACF;AACA,SAAS,UAAY;AACrB,EAAE;AACF;AACA,SAAS,UAAY;AACrB,EAAE;AACF;AACA,SAAS,UAAY;AACrB,EAAE;AACF;AACA,SAAS,UAAY;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAE1C;AACF;AACA;AACA,EAAE;AACF,MAAM,KAAqC,EAAE,EAG1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oDAAoD,IAAI;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAmB1C;AACH;AACA;AACA,OAAO,KAAqC,EAAE,EAA0E;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD,qCAAqC;AACrC,iCAAiC,gDAAgD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,MAAM,KAAqC,EAAE,EAkB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAqB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,UAAU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,gBAAgB,GAAG,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,eAAe;AAC7E,mDAAmD,eAAe;AAClE,mDAAmD,eAAe;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,uBAAuB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,MAAM,eAAe,oDAAoD;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,MAAM,KAAqC,EAAE,EAwB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKiC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAGxC;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAIxC;AACJ,CAAC,mBAAmB;AACpB,KAAK,KAAqC,EAAE,EAA0E;AACtH;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB,MAAM,KAAqC,EAAE,EAwB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAY,6BAA6B,+BAAY;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,2CAA2C;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAE1C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oBAAoB;AAC5C,MAAM,KAAqC,EAAE,EAa1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uBAAkB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA,WAAW,qBAAqB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,KAAK;AACL,QAAQ,KAAqC,EAAE,EAA0E;AACzH,KAAK;AACL;AACA,QAAQ,KAAqC,EAAE,EAAwG;AACvJ;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAA0F;AACvI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB,qBAAqB,WAAW,GAAG,yBAAyB;AAC5D,aAAa,KAAK,6BAA6B,KAAK;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB,YAAY,KAAK,YAAY,YAAY,GAAG,WAAW;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB,YAAY,KAAK,YAAY,YAAY,GAAG,WAAW;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,KAAK;AACvB,YAAY,KAAK,YAAY,YAAY,GAAG,WAAW;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gCAAgC;AACrE,2BAA2B,UAAY;AACvC,0BAA0B,oBAAoB;AAC9C,oBAAoB,uBAAkB;AACtC;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uBAAuB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAIxC;AACJ;AACA,4DAA4D,+BAAY;AACxE;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAIxC;AACJ;AACA,4DAA4D,+BAAY,yBAAyB,uBAAuB;AACxH,oDAAoD,+BAAY,wBAAwB,uBAAuB;AAC/G;AACA,iEAAiE,+BAAY,2BAA2B,uBAAuB;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAW1C;AACH;AACA;AACA,8BAA8B,+BAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,uDAAuD,0BAA0B,GAAG,4BAA4B,GAAG,kBAAkB;AACrI;AACA,GAAG;AACH,MAAM,KAAqC,EAAE,EAO1C;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wBAAwB;AAC7B;AACA,+BAA+B,qCAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAsG;AACpJ;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO,KAAqC,EAAE,EACkB;AAChE,IAAI,SAAS,KAAqC,EAAE,EAAuE;AAC3H,MAAM,KAAqC,EAAE,EAK1C;AACH,2BAA2B,+BAAY;AACvC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB;AACzE;AACA,8BAA8B,wDAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA,MAAM,KAAqC,EAAE,EAO1C;AACH,yDAAyD,kBAAkB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wBAAwB;AAC7B;AACA,yCAAyC,qCAAQ;AACjD;AACA;AACA;AACA,yBAAyB;AACzB;AACA,8EAA8E,sBAAsB;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL,+EAA+E;AAC/E;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAgI;AAC9K,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAqG;AACnJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH,2BAA2B,+BAAY;AACvC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iBAAiB,cAAc,mBAAmB;AACnE;AACA;AACA,kCAAkC,KAAK;AACvC;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA,6BAA6B,qBAAqB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAoF;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA,4CAA4C,0BAA0B;AACtE;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,SAAS,qcAAqc;AAC9c;AACA;AACA,cAAc,UAAY;AAC1B,8DAA8D,6BAA6B;AAC3F;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4PAA4P,IAAI;AAC/Q,UAAU,qEAAqE;AAC/E;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uBAAuB;AAChD,0BAA0B,mBAAmB,GAAG,iBAAiB;AACjE;AACA;AACA;AACA,GAAG;AACH,sBAAsB,YAAY;AAClC;AACA,iDAAiD,qBAAqB;AACtE;AACA,mEAAmE,eAAe;AAClF;AACA;AACA,GAAG;AACH,gJAAgJ,eAAe;AAC/J;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,uCAAuC,qCAAQ;AAC/C,KAAK;AACL;AACA;AACA;AACA,wBAAwB,cAAc;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA;AACA;AACA,WAAW,gBAAgB,EAAE,cAAc;AAC3C;AACA,gGAAgG,+BAAY;AAC5G;AACA;AACA,IAAI;AACJ;AACA,gIAAgI,+BAAY,gDAAgD,KAAK;AACjM;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,2BAA2B;AAC1G,OAAO,IAAqC;AAC5C,QAAQ,EAA4B;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB,mCAAmC,2BAA2B;AAC9D;AACA,SAAS,QAAQ;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL,IAAI;AACJ,WAAW,8BAA8B;AACzC,OAAO,KAAqC,EAAE,EAAiD;AAC/F;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA8K;AAC5N;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA8S;AAC5V;AACA;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAuN;AACrQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,SAAS;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA0C;AACxF,YAAY;AACZ,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,UAAU;AACpB;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,OAAO,KAAqC,EAAE,EAAkE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,gBAAgB;AACtD;AACA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA,qDAAqD,iBAAiB;AACtE;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,MAAM,KAAqC,EAAE,EA+B1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA,iDAAiD,+BAAY,iDAAiD,sBAAsB;AACpI;AACA;AACA,iBAAiB,+BAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAAY,wBAAwB,KAAK;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC,MAAM,KAAqC,EAAE,EAKxC;AACL;AACA;AACA,OAAO,KAAqC,EAAE,EAAkE;AAChH;AACA;AACA;AACA,UAAU,gBAAgB;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA,OAAO,KAAqC,EAAE,EAA0G;AACxJ;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAA2D;AACzG;AACA;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAK1C;AACL;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAK1C;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,QAAQ,KAAqC,EAAE,EAE1C;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC6sB;;AAE7sB;;ACtzD6H;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,MAAqC,GAAG,CAG3D;AACF;AACA;AACA,eAAe,UAAU;AACzB;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,UAAU;AACzB;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,UAAU;AACzB;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI,OAAO,mBAAmB;AAC9B,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,UAAU;AACzB;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI,OAAO,mBAAmB;AAC9B,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,oBAAoB;AACnC;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA,eAAe,WAAW,GAAG,2BAA2B;AACxD,EAAE;AACF;AACA,cAAc,mBAAmB,YAAY;AAC7C;AACA,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH,EAAE;AACF;AACA,cAAc,gBAAgB,UAAU,cAAc;AACtD,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,cAAc,gBAAgB,UAAU,cAAc;AACtD,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,cAAc,gBAAgB,UAAU,cAAc;AACtD,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,cAAc,OAAO,UAAU,cAAc;AAC7C,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,IAAI;AACJ,GAAG;AACH,EAAE;AACF;AACA,cAAc,YAAY;AAC1B,eAAe,YAAY;AAC3B;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AAC0C;;AAE1C;;AClOA,iCAAiC;AACjC,mEAAmE;AACnE,yEAAyE;AACzE,wEAAwE;AAEpB;AAEL;AAW/C,4EAA4E;AAC5E,6EAA6E;AAC7E,2EAA2E;AAC3E,uEAAuE;AACvE,uCAAuC;AACvC,MAAMG,cAAc,CAAC,GAAGC,QAAoB,CAAC,EAAEC,GAAG,EAAgB,GAChED,MAAME,QAAQ,CAACD,IAAIE,QAAQ;AAE7B,MAAMC,UAAU,IAAIN,OAAOA,CAAC;IAC1BO,iBAAiBC,KAAKC,aAAa;IACnCC,aAAa;IACbC,cAAc;IACdC,mBAAmB;IACnBC,gBAAgB;QACd,sEAAsE;QACtE,kEAAkE;QAClE,oEAAoE;QACpE,mEAAmE;QACnE,wEAAwE;QACxE;YACEC,SAASb,YAAY;YACrBc,SAAS,IAAIhB,WAAWA;QAC1B;QACA;YACE,8DAA8D;YAC9D,oEAAoE;YACpE,0CAA0C;YAC1Ce,SAAS,CAAC,EAAEE,OAAO,EAAEb,GAAG,EAAE,GACxBA,IAAIE,QAAQ,CAACY,UAAU,CAAC,YAAYD,QAAQE,MAAM,KAAK;YACzDH,SAAS,IAAIhB,WAAWA;QAC1B;QACA;YACE,oEAAoE;YACpE,0DAA0D;YAC1De,SAAS,CAAC,EAAEX,GAAG,EAAE,GACfA,IAAIE,QAAQ,CAACY,UAAU,CAAC,uBACxBd,IAAIE,QAAQ,CAACc,QAAQ,CAAC;YACxBJ,SAAS,IAAIhB,WAAWA;QAC1B;QACA,qEAAqE;QACrE,sEAAsE;QACtE,yEAAyE;QACzE,mEAAmE;QACnE,uEAAuE;QACvE,qEAAqE;QACrE,UAAU;QACV;YACEe,SAAS,CAAC,EAAEE,OAAO,EAAEb,GAAG,EAAE,GACxBA,IAAIE,QAAQ,CAACY,UAAU,CAAC,YAAYD,QAAQE,MAAM,KAAK;YACzDH,SAAS,IAAIhB,WAAWA;QAC1B;QACA,2EAA2E;WACxED,YAAYA;KAChB;AACH;AAEAQ,QAAQc,iBAAiB;AAEzB,0EAA0E;AAC1E,2EAA2E;AAC3E,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,gEAAgE;AAChE,oDAAoD;AACpD,MAAMC,uBAAuB;IAAC;IAAgB;IAAiB;CAAe;AAC9Eb,KAAKc,gBAAgB,CAAC,YAAY,CAACC;IACjCA,MAAMC,SAAS,CAAC,CAAC;QACf,MAAMC,aAAa,MAAMC,OAAOC,IAAI;QACpC,MAAMC,QAAQC,GAAG,CAACJ,WAAWK,GAAG,CAAC,OAAOC;YACtC,IAAIV,qBAAqBjB,QAAQ,CAAC2B,OAAO;gBACvC,MAAML,OAAOM,MAAM,CAACD;gBACpB;YACF;YACA,MAAME,QAAQ,MAAMP,OAAOQ,IAAI,CAACH;YAChC,MAAMI,WAAW,MAAMF,MAAMN,IAAI;YACjC,MAAMC,QAAQC,GAAG,CAACM,SAASL,GAAG,CAAC,CAACM;gBAC9B,IAAI;oBACF,MAAMC,IAAI,IAAIC,IAAIF,IAAIjC,GAAG;oBACzB,IACEkC,EAAEhC,QAAQ,CAACY,UAAU,CAAC,YACtBoB,EAAEhC,QAAQ,KAAK,oBACfgC,EAAEhC,QAAQ,KAAK,aAAa,+BAA+B,OAC1DgC,EAAEhC,QAAQ,CAACY,UAAU,CAAC,uBAAuBoB,EAAEhC,QAAQ,CAACc,QAAQ,CAAC,SAClE;wBACA,OAAOc,MAAMD,MAAM,CAACI;oBACtB;gBACF,EAAE,OAAM,CAAe;gBACvB,OAAOR,QAAQW,OAAO,CAAC;YACzB;QACF;IACF;AACF","sources":["webpack://_N_E/./node_modules/serwist/dist/chunks/waitUntil-BHDx3Rgo.js","webpack://_N_E/./node_modules/idb/build/index.js","webpack://_N_E/./node_modules/serwist/dist/chunks/printInstallDetails-c9A08ZVZ.js","webpack://_N_E/./node_modules/serwist/dist/chunks/index.internal-Dxj9Ni9X.js","webpack://_N_E/./node_modules/@serwist/utils/dist/index.mjs","webpack://_N_E/./node_modules/serwist/dist/index.mjs","webpack://_N_E/./node_modules/@serwist/next/dist/index.worker.mjs","webpack://_N_E/./app/sw.ts"],"sourcesContent":["//#region src/utils/cacheNames.ts\nconst _cacheNameDetails = {\n\tgoogleAnalytics: \"googleAnalytics\",\n\tprecache: \"precache-v2\",\n\tprefix: \"serwist\",\n\truntime: \"runtime\",\n\tsuffix: typeof registration !== \"undefined\" ? registration.scope : \"\"\n};\nconst _createCacheName = (cacheName) => {\n\treturn [\n\t\t_cacheNameDetails.prefix,\n\t\tcacheName,\n\t\t_cacheNameDetails.suffix\n\t].filter((value) => value && value.length > 0).join(\"-\");\n};\nconst eachCacheNameDetail = (fn) => {\n\tfor (const key of Object.keys(_cacheNameDetails)) fn(key);\n};\nconst cacheNames = {\n\tupdateDetails: (details) => {\n\t\teachCacheNameDetail((key) => {\n\t\t\tconst detail = details[key];\n\t\t\tif (typeof detail === \"string\") _cacheNameDetails[key] = detail;\n\t\t});\n\t},\n\tgetGoogleAnalyticsName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n\t},\n\tgetPrecacheName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.precache);\n\t},\n\tgetPrefix: () => {\n\t\treturn _cacheNameDetails.prefix;\n\t},\n\tgetRuntimeName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.runtime);\n\t},\n\tgetSuffix: () => {\n\t\treturn _cacheNameDetails.suffix;\n\t}\n};\n//#endregion\n//#region src/utils/canConstructResponseFromBodyStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a new response from a `response.body` stream.\n*\n* @returns `true`, if the current browser can successfully construct\n* a response from a `response.body` stream, `false` otherwise.\n* @private\n*/\nfunction canConstructResponseFromBodyStream() {\n\tif (supportStatus === void 0) {\n\t\tconst testResponse = new Response(\"\");\n\t\tif (\"body\" in testResponse) try {\n\t\t\tnew Response(testResponse.body);\n\t\t\tsupportStatus = true;\n\t\t} catch {\n\t\t\tsupportStatus = false;\n\t\t}\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/models/messages/messages.ts\nconst messages = {\n\t\"invalid-value\": ({ paramName, validValueDescription, value }) => {\n\t\tif (!paramName || !validValueDescription) throw new Error(`Unexpected input to 'invalid-value' error.`);\n\t\treturn `The '${paramName}' parameter was given a value with an unexpected value. ${validValueDescription} Received a value of ${JSON.stringify(value)}.`;\n\t},\n\t\"not-an-array\": ({ moduleName, className, funcName, paramName }) => {\n\t\tif (!moduleName || !className || !funcName || !paramName) throw new Error(`Unexpected input to 'not-an-array' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className}.${funcName}()' must be an array.`;\n\t},\n\t\"incorrect-type\": ({ expectedType, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedType || !paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-type' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className ? `${className}.` : \"\"}${funcName}()' must be of type ${expectedType}.`;\n\t},\n\t\"incorrect-class\": ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem }) => {\n\t\tif (!expectedClassName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-class' error.`);\n\t\tconst classNameStr = className ? `${className}.` : \"\";\n\t\tif (isReturnValueProblem) return `The return value from '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t},\n\t\"missing-a-method\": ({ expectedMethod, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedMethod || !paramName || !moduleName || !className || !funcName) throw new Error(`Unexpected input to 'missing-a-method' error.`);\n\t\treturn `${moduleName}.${className}.${funcName}() expected the '${paramName}' parameter to expose a '${expectedMethod}' method.`;\n\t},\n\t\"add-to-cache-list-unexpected-type\": ({ entry }) => {\n\t\treturn `An unexpected entry was passed to 'serwist.Serwist.addToPrecacheList()' The entry '${JSON.stringify(entry)}' isn't supported. You must supply an array of strings with one or more characters, objects with a url property or Request objects.`;\n\t},\n\t\"add-to-cache-list-conflicting-entries\": ({ firstEntry, secondEntry }) => {\n\t\tif (!firstEntry || !secondEntry) throw new Error(\"Unexpected input to 'add-to-cache-list-duplicate-entries' error.\");\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${firstEntry} but different revision details. Serwist is unable to cache and version the asset correctly. Please remove one of the entries.`;\n\t},\n\t\"plugin-error-request-will-fetch\": ({ thrownErrorMessage }) => {\n\t\tif (!thrownErrorMessage) throw new Error(\"Unexpected input to 'plugin-error-request-will-fetch', error.\");\n\t\treturn `An error was thrown by a plugin's 'requestWillFetch()' method. The thrown error message was: '${thrownErrorMessage}'.`;\n\t},\n\t\"invalid-cache-name\": ({ cacheNameId, value }) => {\n\t\tif (!cacheNameId) throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n\t\treturn `You must provide a name containing at least one character for setCacheDetails({${cacheNameId}: '...'}). Received a value of '${JSON.stringify(value)}'`;\n\t},\n\t\"unregister-route-but-not-found-with-method\": ({ method }) => {\n\t\tif (!method) throw new Error(\"Unexpected input to 'unregister-route-but-not-found-with-method' error.\");\n\t\treturn `The route you're trying to unregister was not previously registered for the method type '${method}'.`;\n\t},\n\t\"unregister-route-route-not-registered\": () => {\n\t\treturn \"The route you're trying to unregister was not previously registered.\";\n\t},\n\t\"queue-replay-failed\": ({ name }) => {\n\t\treturn `Replaying the background sync queue '${name}' failed.`;\n\t},\n\t\"duplicate-queue-name\": ({ name }) => {\n\t\treturn `The queue name '${name}' is already being used. All instances of 'serwist.BackgroundSyncQueue' must be given unique names.`;\n\t},\n\t\"expired-test-without-max-age\": ({ methodName, paramName }) => {\n\t\treturn `The '${methodName}()' method can only be used when the '${paramName}' is used in the constructor.`;\n\t},\n\t\"unsupported-route-type\": ({ moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter was an unsupported type. Please check the docs for ${moduleName}.${className}.${funcName} for valid input types.`;\n\t},\n\t\"not-array-of-class\": ({ value, expectedClass, moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter must be an array of '${expectedClass}' objects. Received '${JSON.stringify(value)},'. Please check the call to ${moduleName}.${className}.${funcName}() to fix the issue.`;\n\t},\n\t\"max-entries-or-age-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.maxEntries' or 'config.maxAgeSeconds' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"statuses-or-headers-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.statuses' or 'config.headers' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"invalid-string\": ({ moduleName, funcName, paramName }) => {\n\t\tif (!paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'invalid-string' error.`);\n\t\treturn `When using strings, the '${paramName}' parameter must start with 'http' (for cross-origin matches) or '/' (for same-origin matches). Please see the docs for ${moduleName}.${funcName}() for more info.`;\n\t},\n\t\"channel-name-required\": () => {\n\t\treturn \"You must provide a channelName to construct a BroadcastCacheUpdate instance.\";\n\t},\n\t\"invalid-responses-are-same-args\": () => {\n\t\treturn \"The arguments passed into responsesAreSame() appear to be invalid. Please ensure valid Responses are used.\";\n\t},\n\t\"expire-custom-caches-only\": () => {\n\t\treturn \"You must provide a 'cacheName' property when using the expiration plugin with a runtime caching strategy.\";\n\t},\n\t\"unit-must-be-bytes\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n\t\treturn `The 'unit' portion of the Range header must be set to 'bytes'. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"single-range-only\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'single-range-only' error.`);\n\t\treturn `Multiple ranges are not supported. Please use a single start value, and optional end value. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"invalid-range-values\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n\t\treturn `The Range header is missing both start and end values. At least one of those values is needed. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"no-range-header\": () => {\n\t\treturn \"No Range header was found in the Request provided.\";\n\t},\n\t\"range-not-satisfiable\": ({ size, start, end }) => {\n\t\treturn `The start (${start}) and end (${end}) values in the Range are not satisfiable by the cached response, which is ${size} bytes.`;\n\t},\n\t\"attempt-to-cache-non-get-request\": ({ url, method }) => {\n\t\treturn `Unable to cache '${url}' because it is a '${method}' request and only 'GET' requests can be cached.`;\n\t},\n\t\"cache-put-with-no-response\": ({ url }) => {\n\t\treturn `There was an attempt to cache '${url}' but the response was not defined.`;\n\t},\n\t\"no-response\": ({ url, error }) => {\n\t\tlet message = `The strategy could not generate a response for '${url}'.`;\n\t\tif (error) message += ` The underlying error is ${error}.`;\n\t\treturn message;\n\t},\n\t\"bad-precaching-response\": ({ url, status }) => {\n\t\treturn `The precaching request for '${url}' failed${status ? ` with an HTTP status of ${status}.` : \".\"}`;\n\t},\n\t\"non-precached-url\": ({ url }) => {\n\t\treturn `'createHandlerBoundToURL(\"${url}\")' was called, but that URL is not precached. Please pass in a URL that is precached instead.`;\n\t},\n\t\"add-to-cache-list-conflicting-integrities\": ({ url }) => {\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${url} with different integrity values. Please remove one of them.`;\n\t},\n\t\"missing-precache-entry\": ({ cacheName, url }) => {\n\t\treturn `Unable to find a precached response in ${cacheName} for ${url}.`;\n\t},\n\t\"cross-origin-copy-response\": ({ origin }) => {\n\t\treturn `'@serwist/core.copyResponse()' can only be used with same-origin responses. It was passed a response with origin ${origin}.`;\n\t},\n\t\"opaque-streams-source\": ({ type }) => {\n\t\tconst message = `One of the '@serwist/streams' sources resulted in an '${type}' response.`;\n\t\tif (type === \"opaqueredirect\") return `${message} Please do not use a navigation request that results in a redirect as a source.`;\n\t\treturn `${message} Please ensure your sources are CORS-enabled.`;\n\t}\n};\n//#endregion\n//#region src/models/messages/messageGenerator.ts\nconst fallback = (code, ...args) => {\n\tlet msg = code;\n\tif (args.length > 0) msg += ` :: ${JSON.stringify(args)}`;\n\treturn msg;\n};\nconst generatorFunction = (code, details = {}) => {\n\tconst message = messages[code];\n\tif (!message) throw new Error(`Unable to find message for code '${code}'.`);\n\treturn message(details);\n};\nconst messageGenerator = process.env.NODE_ENV === \"production\" ? fallback : generatorFunction;\n//#endregion\n//#region src/utils/SerwistError.ts\n/**\n* Serwist errors should be thrown with this class.\n* This allows use to ensure the type easily in tests,\n* helps developers identify errors from Serwist\n* easily and allows use to optimise error\n* messages correctly.\n*\n* @private\n*/\nvar SerwistError = class extends Error {\n\tdetails;\n\t/**\n\t*\n\t* @param errorCode The error code that\n\t* identifies this particular error.\n\t* @param details Any relevant arguments\n\t* that will help developers identify issues should\n\t* be added as a key on the context object.\n\t*/\n\tconstructor(errorCode, details) {\n\t\tconst message = messageGenerator(errorCode, details);\n\t\tsuper(message);\n\t\tthis.name = errorCode;\n\t\tthis.details = details;\n\t}\n};\n//#endregion\n//#region src/utils/assert.ts\nconst isArray = (value, details) => {\n\tif (!Array.isArray(value)) throw new SerwistError(\"not-an-array\", details);\n};\nconst hasMethod = (object, expectedMethod, details) => {\n\tif (typeof object[expectedMethod] !== \"function\") {\n\t\tdetails.expectedMethod = expectedMethod;\n\t\tthrow new SerwistError(\"missing-a-method\", details);\n\t}\n};\nconst isType = (object, expectedType, details) => {\n\tif (typeof object !== expectedType) {\n\t\tdetails.expectedType = expectedType;\n\t\tthrow new SerwistError(\"incorrect-type\", details);\n\t}\n};\nconst isInstance = (object, expectedClass, details) => {\n\tif (!(object instanceof expectedClass)) {\n\t\tdetails.expectedClassName = expectedClass.name;\n\t\tthrow new SerwistError(\"incorrect-class\", details);\n\t}\n};\nconst isOneOf = (value, validValues, details) => {\n\tif (!validValues.includes(value)) {\n\t\tdetails.validValueDescription = `Valid values are ${JSON.stringify(validValues)}.`;\n\t\tthrow new SerwistError(\"invalid-value\", details);\n\t}\n};\nconst isArrayOfClass = (value, expectedClass, details) => {\n\tconst error = new SerwistError(\"not-array-of-class\", details);\n\tif (!Array.isArray(value)) throw error;\n\tfor (const item of value) if (!(item instanceof expectedClass)) throw error;\n};\nconst finalAssertExports = process.env.NODE_ENV === \"production\" ? null : {\n\thasMethod,\n\tisArray,\n\tisInstance,\n\tisOneOf,\n\tisType,\n\tisArrayOfClass\n};\n//#endregion\n//#region src/utils/getFriendlyURL.ts\nconst getFriendlyURL = (url) => {\n\treturn new URL(String(url), location.href).href.replace(new RegExp(`^${location.origin}`), \"\");\n};\n//#endregion\n//#region src/utils/logger.ts\n/**\n* The logger used by Serwist inside of both service workers and the window global scope.\n*\n* Note: This is forcibly `null` in production mode to reduce bundle size. Do check whether\n* you are currently in development mode (by using `process.env.NODE_ENV !== \"production\"`)\n* before using it.\n*/\nconst logger = process.env.NODE_ENV === \"production\" || typeof self === \"undefined\" ? null : (() => {\n\tif (!(\"__WB_DISABLE_DEV_LOGS\" in globalThis)) self.__WB_DISABLE_DEV_LOGS = false;\n\tlet inGroup = false;\n\tconst methodToColorMap = {\n\t\tdebug: \"#7f8c8d\",\n\t\tlog: \"#2ecc71\",\n\t\twarn: \"#f39c12\",\n\t\terror: \"#c0392b\",\n\t\tgroupCollapsed: \"#3498db\",\n\t\tgroupEnd: null\n\t};\n\tconst print = (method, args) => {\n\t\tif (self.__WB_DISABLE_DEV_LOGS) return;\n\t\tif (method === \"groupCollapsed\") {\n\t\t\tif (typeof navigator !== \"undefined\" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n\t\t\t\tconsole[method](...args);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst styles = [\n\t\t\t`background: ${methodToColorMap[method]}`,\n\t\t\t\"border-radius: 0.5em\",\n\t\t\t\"color: white\",\n\t\t\t\"font-weight: bold\",\n\t\t\t\"padding: 2px 0.5em\"\n\t\t];\n\t\tconst logPrefix = inGroup ? [] : [\"%cserwist\", styles.join(\";\")];\n\t\tconsole[method](...logPrefix, ...args);\n\t\tif (method === \"groupCollapsed\") inGroup = true;\n\t\tif (method === \"groupEnd\") inGroup = false;\n\t};\n\treturn Object.keys(methodToColorMap).reduce((api, method) => {\n\t\tapi[method] = (...args) => {\n\t\t\tprint(method, args);\n\t\t};\n\t\treturn api;\n\t}, {});\n})();\n//#endregion\n//#region src/utils/timeout.ts\n/**\n* Returns a promise that resolves and the passed number of milliseconds.\n* This utility is an async/await-friendly version of `setTimeout`.\n*\n* @param ms\n* @returns\n* @private\n*/\nfunction timeout(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n//#endregion\n//#region src/models/quotaErrorCallbacks.ts\nconst quotaErrorCallbacks = /* @__PURE__ */ new Set();\n//#endregion\n//#region src/utils/cacheMatchIgnoreParams.ts\nfunction stripParams(fullURL, ignoreParams) {\n\tconst strippedURL = new URL(fullURL);\n\tfor (const param of ignoreParams) strippedURL.searchParams.delete(param);\n\treturn strippedURL.href;\n}\n/**\n* Matches an item in the cache, ignoring specific URL params. This is similar\n* to the `ignoreSearch` option, but it allows you to ignore just specific\n* params (while continuing to match on the others).\n*\n* @private\n* @param cache\n* @param request\n* @param matchOptions\n* @param ignoreParams\n* @returns\n*/\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n\tconst strippedRequestURL = stripParams(request.url, ignoreParams);\n\tif (request.url === strippedRequestURL) return cache.match(request, matchOptions);\n\tconst keysOptions = {\n\t\t...matchOptions,\n\t\tignoreSearch: true\n\t};\n\tconst cacheKeys = await cache.keys(request, keysOptions);\n\tfor (const cacheKey of cacheKeys) if (strippedRequestURL === stripParams(cacheKey.url, ignoreParams)) return cache.match(cacheKey, matchOptions);\n}\n//#endregion\n//#region src/utils/Deferred.ts\n/**\n* The Deferred class composes Promises in a way that allows for them to be\n* resolved or rejected from outside the constructor. In most cases promises\n* should be used directly, but Deferreds can be necessary when the logic to\n* resolve a promise must be separate.\n*\n* @private\n*/\nvar Deferred = class {\n\tpromise;\n\tresolve;\n\treject;\n\t/**\n\t* Creates a promise and exposes its resolve and reject functions as methods.\n\t*/\n\tconstructor() {\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n};\n//#endregion\n//#region src/utils/executeQuotaErrorCallbacks.ts\n/**\n* Runs all of the callback functions, one at a time sequentially, in the order\n* in which they were registered.\n*\n* @private\n*/\nconst executeQuotaErrorCallbacks = async () => {\n\tif (process.env.NODE_ENV !== \"production\") logger.log(`About to run ${quotaErrorCallbacks.size} callbacks to clean up caches.`);\n\tfor (const callback of quotaErrorCallbacks) {\n\t\tawait callback();\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(callback, \"is complete.\");\n\t}\n\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Finished running callbacks.\");\n};\n//#endregion\n//#region src/utils/deleteOutdatedCaches.ts\nconst SUBSTRING_TO_FIND = \"-precache-\";\n/**\n* Cleans up incompatible precaches that were created by older versions of\n* Serwist, by a service worker registered under the current scope.\n*\n* This is meant to be called as part of the `activate` event.\n*\n* This should be safe to use as long as you don't include `substringToFind`\n* (defaulting to `-precache-`) in your non-precache cache names.\n*\n* @param currentPrecacheName The cache name currently in use for\n* precaching. This cache won't be deleted.\n* @param substringToFind Cache names which include this\n* substring will be deleted (excluding `currentPrecacheName`).\n* @returns A list of all the cache names that were deleted.\n* @private\n*/\nconst deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {\n\tconst cacheNamesToDelete = (await self.caches.keys()).filter((cacheName) => {\n\t\treturn cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName;\n\t});\n\tawait Promise.all(cacheNamesToDelete.map((cacheName) => self.caches.delete(cacheName)));\n\treturn cacheNamesToDelete;\n};\n//#endregion\n//#region src/utils/cleanupOutdatedCaches.ts\n/**\n* Adds an `activate` event listener which will clean up incompatible\n* precaches that were created by older versions of Serwist.\n*/\nconst cleanupOutdatedCaches = (cacheName) => {\n\tself.addEventListener(\"activate\", (event) => {\n\t\tevent.waitUntil(deleteOutdatedCaches(cacheNames.getPrecacheName(cacheName)).then((cachesDeleted) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (cachesDeleted.length > 0) logger.log(\"The following out-of-date precaches were cleaned up automatically:\", cachesDeleted);\n\t\t\t}\n\t\t}));\n\t});\n};\n//#endregion\n//#region src/utils/clientsClaim.ts\n/**\n* Claims any currently available clients once the service worker\n* becomes active. This is normally used in conjunction with `skipWaiting()`.\n*/\nconst clientsClaim = () => {\n\tself.addEventListener(\"activate\", () => self.clients.claim());\n};\n//#endregion\n//#region src/utils/waitUntil.ts\n/**\n* A utility method that makes it easier to use `event.waitUntil` with\n* async functions and return the result.\n*\n* @param event\n* @param asyncFn\n* @returns\n* @private\n*/\nconst waitUntil = (event, asyncFn) => {\n\tconst returnPromise = asyncFn();\n\tevent.waitUntil(returnPromise);\n\treturn returnPromise;\n};\n//#endregion\nexport { Deferred as a, timeout as c, finalAssertExports as d, SerwistError as f, executeQuotaErrorCallbacks as i, logger as l, cacheNames as m, clientsClaim as n, cacheMatchIgnoreParams as o, canConstructResponseFromBodyStream as p, cleanupOutdatedCaches as r, quotaErrorCallbacks as s, waitUntil as t, getFriendlyURL as u };\n\n//# sourceMappingURL=waitUntil-BHDx3Rgo.js.map","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst transactionDoneMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n // This mapping exists in reverseTransformCache but doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(this.request);\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nconst advanceMethodProps = ['continue', 'continuePrimaryKey', 'advance'];\nconst methodMap = {};\nconst advanceResults = new WeakMap();\nconst ittrProxiedCursorToOriginalProxy = new WeakMap();\nconst cursorIteratorTraps = {\n get(target, prop) {\n if (!advanceMethodProps.includes(prop))\n return target[prop];\n let cachedFunc = methodMap[prop];\n if (!cachedFunc) {\n cachedFunc = methodMap[prop] = function (...args) {\n advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));\n };\n }\n return cachedFunc;\n },\n};\nasync function* iterate(...args) {\n // tslint:disable-next-line:no-this-assignment\n let cursor = this;\n if (!(cursor instanceof IDBCursor)) {\n cursor = await cursor.openCursor(...args);\n }\n if (!cursor)\n return;\n cursor = cursor;\n const proxiedCursor = new Proxy(cursor, cursorIteratorTraps);\n ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor);\n // Map this double-proxy back to the original, so other cursor methods work.\n reverseTransformCache.set(proxiedCursor, unwrap(cursor));\n while (cursor) {\n yield proxiedCursor;\n // If one of the advancing methods was not called, call continue().\n cursor = await (advanceResults.get(proxiedCursor) || cursor.continue());\n advanceResults.delete(proxiedCursor);\n }\n}\nfunction isIteratorProp(target, prop) {\n return ((prop === Symbol.asyncIterator &&\n instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor])) ||\n (prop === 'iterate' && instanceOfAny(target, [IDBIndex, IDBObjectStore])));\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get(target, prop, receiver) {\n if (isIteratorProp(target, prop))\n return iterate;\n return oldTraps.get(target, prop, receiver);\n },\n has(target, prop) {\n return isIteratorProp(target, prop) || oldTraps.has(target, prop);\n },\n}));\n\nexport { deleteDB, openDB, unwrap, wrap };\n","import { a as Deferred, c as timeout, d as finalAssertExports, f as SerwistError, i as executeQuotaErrorCallbacks, l as logger, m as cacheNames, o as cacheMatchIgnoreParams, p as canConstructResponseFromBodyStream, u as getFriendlyURL } from \"./waitUntil-BHDx3Rgo.js\";\nimport { openDB } from \"idb\";\n//#region src/copyResponse.ts\n/**\n* Allows developers to copy a response and modify its `headers`, `status`,\n* or `statusText` values (the [valid options](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#options)\n* when constructing a `Response` object).\n* To modify these values, pass a function as the second argument. That\n* function will be invoked with the options of the initial `Response` object.\n* The return value of this function will be used as the options for the new `Response` object.\n* To change the values either modify the passed parameter(s) and return it or return a totally\n* new object.\n*\n* This method is intentionally limited to same-origin responses, regardless of\n* whether CORS was used or not.\n*\n* @param response The initial response.\n* @param modifier The function used to modify the options of the `Response` object.\n*/\nconst copyResponse = async (response, modifier) => {\n\tlet origin = null;\n\tif (response.url) origin = new URL(response.url).origin;\n\tif (origin !== self.location.origin) throw new SerwistError(\"cross-origin-copy-response\", { origin });\n\tconst clonedResponse = response.clone();\n\tconst responseInit = {\n\t\theaders: new Headers(clonedResponse.headers),\n\t\tstatus: clonedResponse.status,\n\t\tstatusText: clonedResponse.statusText\n\t};\n\tconst modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n\tconst body = canConstructResponseFromBodyStream() ? clonedResponse.body : await clonedResponse.blob();\n\treturn new Response(body, modifiedResponseInit);\n};\n//#endregion\n//#region src/disableDevLogs.ts\n/**\n* Disables Serwist's logging in development mode.\n*\n* @see https://serwist.pages.dev/docs/serwist/core/disable-dev-logs\n*/\nconst disableDevLogs = () => {\n\tself.__WB_DISABLE_DEV_LOGS = true;\n};\n//#endregion\n//#region src/lib/backgroundSync/BackgroundSyncQueueDb.ts\nconst BACKGROUND_SYNC_DB_VERSION = 3;\nconst BACKGROUND_SYNC_DB_NAME = \"serwist-background-sync\";\nconst REQUEST_OBJECT_STORE_NAME = \"requests\";\nconst QUEUE_NAME_INDEX = \"queueName\";\n/**\n* A class to interact directly an IndexedDB created specifically to save and\n* retrieve QueueStoreEntries. This class encapsulates all the schema details\n* to store the representation of a Queue.\n*\n* @private\n*/\nvar BackgroundSyncQueueDb = class {\n\t_db = null;\n\t/**\n\t* Add QueueStoreEntry to underlying db.\n\t*\n\t* @param entry\n\t*/\n\tasync addEntry(entry) {\n\t\tconst tx = (await this.getDb()).transaction(REQUEST_OBJECT_STORE_NAME, \"readwrite\", { durability: \"relaxed\" });\n\t\tawait tx.store.add(entry);\n\t\tawait tx.done;\n\t}\n\t/**\n\t* Returns the first entry id in the ObjectStore.\n\t*\n\t* @returns\n\t*/\n\tasync getFirstEntryId() {\n\t\treturn (await (await this.getDb()).transaction(REQUEST_OBJECT_STORE_NAME).store.openCursor())?.value.id;\n\t}\n\t/**\n\t* Get all the entries filtered by index\n\t*\n\t* @param queueName\n\t* @returns\n\t*/\n\tasync getAllEntriesByQueueName(queueName) {\n\t\tconst results = await (await this.getDb()).getAllFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n\t\treturn results ? results : [];\n\t}\n\t/**\n\t* Returns the number of entries filtered by index\n\t*\n\t* @param queueName\n\t* @returns\n\t*/\n\tasync getEntryCountByQueueName(queueName) {\n\t\treturn (await this.getDb()).countFromIndex(REQUEST_OBJECT_STORE_NAME, QUEUE_NAME_INDEX, IDBKeyRange.only(queueName));\n\t}\n\t/**\n\t* Deletes a single entry by id.\n\t*\n\t* @param id the id of the entry to be deleted\n\t*/\n\tasync deleteEntry(id) {\n\t\tawait (await this.getDb()).delete(REQUEST_OBJECT_STORE_NAME, id);\n\t}\n\t/**\n\t*\n\t* @param queueName\n\t* @returns\n\t*/\n\tasync getFirstEntryByQueueName(queueName) {\n\t\treturn await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), \"next\");\n\t}\n\t/**\n\t*\n\t* @param queueName\n\t* @returns\n\t*/\n\tasync getLastEntryByQueueName(queueName) {\n\t\treturn await this.getEndEntryFromIndex(IDBKeyRange.only(queueName), \"prev\");\n\t}\n\t/**\n\t* Returns either the first or the last entries, depending on direction.\n\t* Filtered by index.\n\t*\n\t* @param direction\n\t* @param query\n\t* @returns\n\t* @private\n\t*/\n\tasync getEndEntryFromIndex(query, direction) {\n\t\treturn (await (await this.getDb()).transaction(REQUEST_OBJECT_STORE_NAME).store.index(QUEUE_NAME_INDEX).openCursor(query, direction))?.value;\n\t}\n\t/**\n\t* Returns an open connection to the database.\n\t*\n\t* @private\n\t*/\n\tasync getDb() {\n\t\tif (!this._db) this._db = await openDB(BACKGROUND_SYNC_DB_NAME, BACKGROUND_SYNC_DB_VERSION, { upgrade: this._upgradeDb });\n\t\treturn this._db;\n\t}\n\t/**\n\t* Upgrades QueueDB\n\t*\n\t* @param db\n\t* @param oldVersion\n\t* @private\n\t*/\n\t_upgradeDb(db, oldVersion) {\n\t\tif (oldVersion > 0 && oldVersion < BACKGROUND_SYNC_DB_VERSION) {\n\t\t\tif (db.objectStoreNames.contains(REQUEST_OBJECT_STORE_NAME)) db.deleteObjectStore(REQUEST_OBJECT_STORE_NAME);\n\t\t}\n\t\tdb.createObjectStore(REQUEST_OBJECT_STORE_NAME, {\n\t\t\tautoIncrement: true,\n\t\t\tkeyPath: \"id\"\n\t\t}).createIndex(QUEUE_NAME_INDEX, QUEUE_NAME_INDEX, { unique: false });\n\t}\n};\n//#endregion\n//#region src/lib/backgroundSync/BackgroundSyncQueueStore.ts\n/**\n* A class to manage storing requests from a Queue in IndexedDB,\n* indexed by their queue name for easier access.\n*\n* Most developers will not need to access this class directly;\n* it is exposed for advanced use cases.\n*/\nvar BackgroundSyncQueueStore = class {\n\t_queueName;\n\t_queueDb;\n\t/**\n\t* Associates this instance with a Queue instance, so entries added can be\n\t* identified by their queue name.\n\t*\n\t* @param queueName\n\t*/\n\tconstructor(queueName) {\n\t\tthis._queueName = queueName;\n\t\tthis._queueDb = new BackgroundSyncQueueDb();\n\t}\n\t/**\n\t* Append an entry last in the queue.\n\t*\n\t* @param entry\n\t*/\n\tasync pushEntry(entry) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(entry, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueueStore\",\n\t\t\t\tfuncName: \"pushEntry\",\n\t\t\t\tparamName: \"entry\"\n\t\t\t});\n\t\t\tfinalAssertExports.isType(entry.requestData, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueueStore\",\n\t\t\t\tfuncName: \"pushEntry\",\n\t\t\t\tparamName: \"entry.requestData\"\n\t\t\t});\n\t\t}\n\t\tdelete entry.id;\n\t\tentry.queueName = this._queueName;\n\t\tawait this._queueDb.addEntry(entry);\n\t}\n\t/**\n\t* Prepend an entry first in the queue.\n\t*\n\t* @param entry\n\t*/\n\tasync unshiftEntry(entry) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(entry, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueueStore\",\n\t\t\t\tfuncName: \"unshiftEntry\",\n\t\t\t\tparamName: \"entry\"\n\t\t\t});\n\t\t\tfinalAssertExports.isType(entry.requestData, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueueStore\",\n\t\t\t\tfuncName: \"unshiftEntry\",\n\t\t\t\tparamName: \"entry.requestData\"\n\t\t\t});\n\t\t}\n\t\tconst firstId = await this._queueDb.getFirstEntryId();\n\t\tif (firstId) entry.id = firstId - 1;\n\t\telse delete entry.id;\n\t\tentry.queueName = this._queueName;\n\t\tawait this._queueDb.addEntry(entry);\n\t}\n\t/**\n\t* Removes and returns the last entry in the queue matching the `queueName`.\n\t*\n\t* @returns\n\t*/\n\tasync popEntry() {\n\t\treturn this._removeEntry(await this._queueDb.getLastEntryByQueueName(this._queueName));\n\t}\n\t/**\n\t* Removes and returns the first entry in the queue matching the `queueName`.\n\t*\n\t* @returns\n\t*/\n\tasync shiftEntry() {\n\t\treturn this._removeEntry(await this._queueDb.getFirstEntryByQueueName(this._queueName));\n\t}\n\t/**\n\t* Returns all entries in the store matching the `queueName`.\n\t*\n\t* @returns\n\t*/\n\tasync getAll() {\n\t\treturn await this._queueDb.getAllEntriesByQueueName(this._queueName);\n\t}\n\t/**\n\t* Returns the number of entries in the store matching the `queueName`.\n\t*\n\t* @returns\n\t*/\n\tasync size() {\n\t\treturn await this._queueDb.getEntryCountByQueueName(this._queueName);\n\t}\n\t/**\n\t* Deletes the entry for the given ID.\n\t*\n\t* WARNING: this method does not ensure the deleted entry belongs to this\n\t* queue (i.e. matches the `queueName`). But this limitation is acceptable\n\t* as this class is not publicly exposed. An additional check would make\n\t* this method slower than it needs to be.\n\t*\n\t* @param id\n\t*/\n\tasync deleteEntry(id) {\n\t\tawait this._queueDb.deleteEntry(id);\n\t}\n\t/**\n\t* Removes and returns the first or last entry in the queue (based on the\n\t* `direction` argument) matching the `queueName`.\n\t*\n\t* @returns\n\t* @private\n\t*/\n\tasync _removeEntry(entry) {\n\t\tif (entry) await this.deleteEntry(entry.id);\n\t\treturn entry;\n\t}\n};\n//#endregion\n//#region src/lib/backgroundSync/StorableRequest.ts\nconst serializableProperties = [\n\t\"method\",\n\t\"referrer\",\n\t\"referrerPolicy\",\n\t\"mode\",\n\t\"credentials\",\n\t\"cache\",\n\t\"redirect\",\n\t\"integrity\",\n\t\"keepalive\"\n];\n/**\n* A class to make it easier to serialize and de-serialize requests so they\n* can be stored in IndexedDB.\n*\n* Most developers will not need to access this class directly;\n* it is exposed for advanced use cases.\n*/\nvar StorableRequest = class StorableRequest {\n\t_requestData;\n\t/**\n\t* Converts a Request object to a plain object that can be structured\n\t* cloned or stringified to JSON.\n\t*\n\t* @param request\n\t* @returns\n\t*/\n\tstatic async fromRequest(request) {\n\t\tconst requestData = {\n\t\t\turl: request.url,\n\t\t\theaders: {}\n\t\t};\n\t\tif (request.method !== \"GET\") requestData.body = await request.clone().arrayBuffer();\n\t\trequest.headers.forEach((value, key) => {\n\t\t\trequestData.headers[key] = value;\n\t\t});\n\t\tfor (const prop of serializableProperties) if (request[prop] !== void 0) requestData[prop] = request[prop];\n\t\treturn new StorableRequest(requestData);\n\t}\n\t/**\n\t* Accepts an object of request data that can be used to construct a\n\t* `Request` object but can also be stored in IndexedDB.\n\t*\n\t* @param requestData An object of request data that includes the `url` plus any relevant property of\n\t* [`requestInit`](https://fetch.spec.whatwg.org/#requestinit).\n\t*/\n\tconstructor(requestData) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(requestData, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"StorableRequest\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"requestData\"\n\t\t\t});\n\t\t\tfinalAssertExports.isType(requestData.url, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"StorableRequest\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"requestData.url\"\n\t\t\t});\n\t\t}\n\t\tif (requestData.mode === \"navigate\") requestData.mode = \"same-origin\";\n\t\tthis._requestData = requestData;\n\t}\n\t/**\n\t* Returns a deep clone of the instance's `requestData` object.\n\t*\n\t* @returns\n\t*/\n\ttoObject() {\n\t\tconst requestData = Object.assign({}, this._requestData);\n\t\trequestData.headers = Object.assign({}, this._requestData.headers);\n\t\tif (requestData.body) requestData.body = requestData.body.slice(0);\n\t\treturn requestData;\n\t}\n\t/**\n\t* Converts this instance to a Request.\n\t*\n\t* @returns\n\t*/\n\ttoRequest() {\n\t\treturn new Request(this._requestData.url, this._requestData);\n\t}\n\t/**\n\t* Creates and returns a deep clone of the instance.\n\t*\n\t* @returns\n\t*/\n\tclone() {\n\t\treturn new StorableRequest(this.toObject());\n\t}\n};\n//#endregion\n//#region src/lib/backgroundSync/BackgroundSyncQueue.ts\nconst TAG_PREFIX = \"serwist-background-sync\";\nconst MAX_RETENTION_TIME = 1440 * 7;\nconst queueNames = /* @__PURE__ */ new Set();\n/**\n* Converts a QueueStore entry into the format exposed by Queue. This entails\n* converting the request data into a real request and omitting the `id` and\n* `queueName` properties.\n*\n* @param queueStoreEntry\n* @returns\n* @private\n*/\nconst convertEntry = (queueStoreEntry) => {\n\tconst queueEntry = {\n\t\trequest: new StorableRequest(queueStoreEntry.requestData).toRequest(),\n\t\ttimestamp: queueStoreEntry.timestamp\n\t};\n\tif (queueStoreEntry.metadata) queueEntry.metadata = queueStoreEntry.metadata;\n\treturn queueEntry;\n};\n/**\n* A class to manage storing failed requests in IndexedDB and retrying them\n* later. All parts of the storing and replaying process are observable via\n* callbacks.\n*/\nvar BackgroundSyncQueue = class {\n\t_name;\n\t_onSync;\n\t_maxRetentionTime;\n\t_queueStore;\n\t_forceSyncFallback;\n\t_syncInProgress = false;\n\t_requestsAddedDuringSync = false;\n\t/**\n\t* Creates an instance of Queue with the given options\n\t*\n\t* @param name The unique name for this queue. This name must be\n\t* unique as it's used to register sync events and store requests\n\t* in IndexedDB specific to this instance. An error will be thrown if\n\t* a duplicate name is detected.\n\t* @param options\n\t*/\n\tconstructor(name, { forceSyncFallback, onSync, maxRetentionTime } = {}) {\n\t\tif (queueNames.has(name)) throw new SerwistError(\"duplicate-queue-name\", { name });\n\t\tqueueNames.add(name);\n\t\tthis._name = name;\n\t\tthis._onSync = onSync || this.replayRequests;\n\t\tthis._maxRetentionTime = maxRetentionTime || MAX_RETENTION_TIME;\n\t\tthis._forceSyncFallback = Boolean(forceSyncFallback);\n\t\tthis._queueStore = new BackgroundSyncQueueStore(this._name);\n\t\tthis._addSyncListener();\n\t}\n\t/**\n\t* @returns\n\t*/\n\tget name() {\n\t\treturn this._name;\n\t}\n\t/**\n\t* Stores the passed request in IndexedDB (with its timestamp and any\n\t* metadata) at the end of the queue.\n\t*\n\t* @param entry\n\t*/\n\tasync pushRequest(entry) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(entry, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueue\",\n\t\t\t\tfuncName: \"pushRequest\",\n\t\t\t\tparamName: \"entry\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(entry.request, Request, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueue\",\n\t\t\t\tfuncName: \"pushRequest\",\n\t\t\t\tparamName: \"entry.request\"\n\t\t\t});\n\t\t}\n\t\tawait this._addRequest(entry, \"push\");\n\t}\n\t/**\n\t* Stores the passed request in IndexedDB (with its timestamp and any\n\t* metadata) at the beginning of the queue.\n\t*\n\t* @param entry\n\t*/\n\tasync unshiftRequest(entry) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(entry, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueue\",\n\t\t\t\tfuncName: \"unshiftRequest\",\n\t\t\t\tparamName: \"entry\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(entry.request, Request, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BackgroundSyncQueue\",\n\t\t\t\tfuncName: \"unshiftRequest\",\n\t\t\t\tparamName: \"entry.request\"\n\t\t\t});\n\t\t}\n\t\tawait this._addRequest(entry, \"unshift\");\n\t}\n\t/**\n\t* Removes and returns the last request in the queue (along with its\n\t* timestamp and any metadata).\n\t*\n\t* @returns\n\t*/\n\tasync popRequest() {\n\t\treturn this._removeRequest(\"pop\");\n\t}\n\t/**\n\t* Removes and returns the first request in the queue (along with its\n\t* timestamp and any metadata).\n\t*\n\t* @returns\n\t*/\n\tasync shiftRequest() {\n\t\treturn this._removeRequest(\"shift\");\n\t}\n\t/**\n\t* Returns all the entries that have not expired (per `maxRetentionTime`).\n\t* Any expired entries are removed from the queue.\n\t*\n\t* @returns\n\t*/\n\tasync getAll() {\n\t\tconst allEntries = await this._queueStore.getAll();\n\t\tconst now = Date.now();\n\t\tconst unexpiredEntries = [];\n\t\tfor (const entry of allEntries) {\n\t\t\tconst maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1e3;\n\t\t\tif (now - entry.timestamp > maxRetentionTimeInMs) await this._queueStore.deleteEntry(entry.id);\n\t\t\telse unexpiredEntries.push(convertEntry(entry));\n\t\t}\n\t\treturn unexpiredEntries;\n\t}\n\t/**\n\t* Returns the number of entries present in the queue.\n\t* Note that expired entries (per `maxRetentionTime`) are also included in this count.\n\t*\n\t* @returns\n\t*/\n\tasync size() {\n\t\treturn await this._queueStore.size();\n\t}\n\t/**\n\t* Adds the entry to the QueueStore and registers for a sync event.\n\t*\n\t* @param entry\n\t* @param operation\n\t* @private\n\t*/\n\tasync _addRequest({ request, metadata, timestamp = Date.now() }, operation) {\n\t\tconst entry = {\n\t\t\trequestData: (await StorableRequest.fromRequest(request.clone())).toObject(),\n\t\t\ttimestamp\n\t\t};\n\t\tif (metadata) entry.metadata = metadata;\n\t\tswitch (operation) {\n\t\t\tcase \"push\":\n\t\t\t\tawait this._queueStore.pushEntry(entry);\n\t\t\t\tbreak;\n\t\t\tcase \"unshift\":\n\t\t\t\tawait this._queueStore.unshiftEntry(entry);\n\t\t\t\tbreak;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Request for '${getFriendlyURL(request.url)}' has been added to background sync queue '${this._name}'.`);\n\t\tif (this._syncInProgress) this._requestsAddedDuringSync = true;\n\t\telse await this.registerSync();\n\t}\n\t/**\n\t* Removes and returns the first or last (depending on `operation`) entry\n\t* from the {@linkcode BackgroundSyncQueueStore} that's not older than the `maxRetentionTime`.\n\t*\n\t* @param operation\n\t* @returns\n\t* @private\n\t*/\n\tasync _removeRequest(operation) {\n\t\tconst now = Date.now();\n\t\tlet entry;\n\t\tswitch (operation) {\n\t\t\tcase \"pop\":\n\t\t\t\tentry = await this._queueStore.popEntry();\n\t\t\t\tbreak;\n\t\t\tcase \"shift\":\n\t\t\t\tentry = await this._queueStore.shiftEntry();\n\t\t\t\tbreak;\n\t\t}\n\t\tif (entry) {\n\t\t\tconst maxRetentionTimeInMs = this._maxRetentionTime * 60 * 1e3;\n\t\t\tif (now - entry.timestamp > maxRetentionTimeInMs) return this._removeRequest(operation);\n\t\t\treturn convertEntry(entry);\n\t\t}\n\t}\n\t/**\n\t* Loops through each request in the queue and attempts to re-fetch it.\n\t* If any request fails to re-fetch, it's put back in the same position in\n\t* the queue (which registers a retry for the next sync event).\n\t*/\n\tasync replayRequests() {\n\t\tlet entry;\n\t\twhile (entry = await this.shiftRequest()) try {\n\t\t\tawait fetch(entry.request.clone());\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Request for '${getFriendlyURL(entry.request.url)}' has been replayed in queue '${this._name}'`);\n\t\t} catch {\n\t\t\tawait this.unshiftRequest(entry);\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Request for '${getFriendlyURL(entry.request.url)}' failed to replay, putting it back in queue '${this._name}'`);\n\t\t\tthrow new SerwistError(\"queue-replay-failed\", { name: this._name });\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`All requests in queue '${this.name}' have successfully replayed; the queue is now empty!`);\n\t}\n\t/**\n\t* Registers a sync event with a tag unique to this instance.\n\t*/\n\tasync registerSync() {\n\t\tif (\"sync\" in self.registration && !this._forceSyncFallback) try {\n\t\t\tawait self.registration.sync.register(`${TAG_PREFIX}:${this._name}`);\n\t\t} catch (err) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(`Unable to register sync event for '${this._name}'.`, err);\n\t\t}\n\t}\n\t/**\n\t* In sync-supporting browsers, this adds a listener for the sync event.\n\t* In non-sync-supporting browsers, or if _forceSyncFallback is true, this\n\t* will retry the queue on service worker startup.\n\t*\n\t* @private\n\t*/\n\t_addSyncListener() {\n\t\tif (\"sync\" in self.registration && !this._forceSyncFallback) self.addEventListener(\"sync\", (event) => {\n\t\t\tif (event.tag === `${TAG_PREFIX}:${this._name}`) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Background sync for tag '${event.tag}' has been received`);\n\t\t\t\tconst syncComplete = async () => {\n\t\t\t\t\tthis._syncInProgress = true;\n\t\t\t\t\tlet syncError;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this._onSync({ queue: this });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (error instanceof Error) {\n\t\t\t\t\t\t\tsyncError = error;\n\t\t\t\t\t\t\tthrow syncError;\n\t\t\t\t\t\t}\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (this._requestsAddedDuringSync && !(syncError && !event.lastChance)) await this.registerSync();\n\t\t\t\t\t\tthis._syncInProgress = false;\n\t\t\t\t\t\tthis._requestsAddedDuringSync = false;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tevent.waitUntil(syncComplete());\n\t\t\t}\n\t\t});\n\t\telse {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Background sync replaying without background sync event\");\n\t\t\tthis._onSync({ queue: this });\n\t\t}\n\t}\n\t/**\n\t* Returns the set of queue names. This is primarily used to reset the list\n\t* of queue names in tests.\n\t*\n\t* @returns\n\t* @private\n\t*/\n\tstatic get _queueNames() {\n\t\treturn queueNames;\n\t}\n};\n//#endregion\n//#region src/lib/backgroundSync/BackgroundSyncPlugin.ts\n/**\n* A class implementing the `fetchDidFail` lifecycle callback. This makes it\n* easier to add failed requests to a {@linkcode BackgroundSyncQueue}.\n*/\nvar BackgroundSyncPlugin = class {\n\t_queue;\n\t/**\n\t* @param name See the {@linkcode BackgroundSyncQueue}\n\t* documentation for parameter details.\n\t* @param options See the {@linkcode BackgroundSyncQueue}\n\t* documentation for parameter details.\n\t* @see https://serwist.pages.dev/docs/serwist/core/background-sync-queue\n\t*/\n\tconstructor(name, options) {\n\t\tthis._queue = new BackgroundSyncQueue(name, options);\n\t}\n\t/**\n\t* @param options\n\t* @private\n\t*/\n\tasync fetchDidFail({ request }) {\n\t\tawait this._queue.pushRequest({ request });\n\t}\n};\n//#endregion\n//#region src/lib/strategies/plugins/cacheOkAndOpaquePlugin.ts\nconst cacheOkAndOpaquePlugin = { \n/**\n* Returns a valid response (to allow caching) if the status is 200 (OK) or\n* 0 (opaque).\n*\n* @param options\n* @returns\n* @private\n*/\ncacheWillUpdate: async ({ response }) => {\n\tif (response.status === 200 || response.status === 0) return response;\n\treturn null;\n} };\n//#endregion\n//#region src/lib/strategies/StrategyHandler.ts\nfunction toRequest(input) {\n\treturn typeof input === \"string\" ? new Request(input) : input;\n}\n/**\n* A class created every time a {@linkcode Strategy} instance calls {@linkcode Strategy.handle} or\n* {@linkcode Strategy.handleAll} that wraps all fetch and cache actions around plugin callbacks\n* and keeps track of when the strategy is \"done\" (i.e. when all added `event.waitUntil()` promises\n* have resolved).\n*/\nvar StrategyHandler = class {\n\t/**\n\t* The event associated with this request.\n\t*/\n\tevent;\n\t/**\n\t* The request the strategy is processing (passed to the strategy's\n\t* `handle()` or `handleAll()` method).\n\t*/\n\trequest;\n\t/**\n\t* A `URL` instance of `request.url` (if passed to the strategy's\n\t* `handle()` or `handleAll()` method).\n\t* Note: the `url` param will be present if the strategy is invoked\n\t* from a {@linkcode Route} object.\n\t*/\n\turl;\n\t/**\n\t* Some additional params (if passed to the strategy's\n\t* `handle()` or `handleAll()` method).\n\t*\n\t* Note: the `params` param will be present if the strategy is invoked\n\t* from a {@linkcode Route} object and that route's matcher returned a truthy\n\t* value (it will be that value).\n\t*/\n\tparams;\n\t_cacheKeys = {};\n\t_strategy;\n\t_handlerDeferred;\n\t_extendLifetimePromises;\n\t_plugins;\n\t_pluginStateMap;\n\t/**\n\t* Creates a new instance associated with the passed strategy and event\n\t* that's handling the request.\n\t*\n\t* The constructor also initializes the state that will be passed to each of\n\t* the plugins handling this request.\n\t*\n\t* @param strategy\n\t* @param options\n\t*/\n\tconstructor(strategy, options) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isInstance(options.event, ExtendableEvent, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"StrategyHandler\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"options.event\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(options.request, Request, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"StrategyHandler\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"options.request\"\n\t\t\t});\n\t\t}\n\t\tthis.event = options.event;\n\t\tthis.request = options.request;\n\t\tif (options.url) {\n\t\t\tthis.url = options.url;\n\t\t\tthis.params = options.params;\n\t\t}\n\t\tthis._strategy = strategy;\n\t\tthis._handlerDeferred = new Deferred();\n\t\tthis._extendLifetimePromises = [];\n\t\tthis._plugins = [...strategy.plugins];\n\t\tthis._pluginStateMap = /* @__PURE__ */ new Map();\n\t\tfor (const plugin of this._plugins) this._pluginStateMap.set(plugin, {});\n\t\tthis.event.waitUntil(this._handlerDeferred.promise);\n\t}\n\t/**\n\t* Fetches a given request (and invokes any applicable plugin callback\n\t* methods), taking the `fetchOptions` (for non-navigation requests) and\n\t* `plugins` provided to the {@linkcode Strategy} object into account.\n\t*\n\t* The following plugin lifecycle methods are invoked when using this method:\n\t* - `requestWillFetch()`\n\t* - `fetchDidSucceed()`\n\t* - `fetchDidFail()`\n\t*\n\t* @param input The URL or request to fetch.\n\t* @returns\n\t*/\n\tasync fetch(input) {\n\t\tconst { event } = this;\n\t\tlet request = toRequest(input);\n\t\tconst preloadResponse = await this.getPreloadResponse();\n\t\tif (preloadResponse) return preloadResponse;\n\t\tconst originalRequest = this.hasCallback(\"fetchDidFail\") ? request.clone() : null;\n\t\ttry {\n\t\t\tfor (const cb of this.iterateCallbacks(\"requestWillFetch\")) request = await cb({\n\t\t\t\trequest: request.clone(),\n\t\t\t\tevent\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tif (err instanceof Error) throw new SerwistError(\"plugin-error-request-will-fetch\", { thrownErrorMessage: err.message });\n\t\t}\n\t\tconst pluginFilteredRequest = request.clone();\n\t\ttry {\n\t\t\tlet fetchResponse;\n\t\t\tfetchResponse = await fetch(request, request.mode === \"navigate\" ? void 0 : this._strategy.fetchOptions);\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`Network request for '${getFriendlyURL(request.url)}' returned a response with status '${fetchResponse.status}'.`);\n\t\t\tfor (const callback of this.iterateCallbacks(\"fetchDidSucceed\")) fetchResponse = await callback({\n\t\t\t\tevent,\n\t\t\t\trequest: pluginFilteredRequest,\n\t\t\t\tresponse: fetchResponse\n\t\t\t});\n\t\t\treturn fetchResponse;\n\t\t} catch (error) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Network request for '${getFriendlyURL(request.url)}' threw an error.`, error);\n\t\t\tif (originalRequest) await this.runCallbacks(\"fetchDidFail\", {\n\t\t\t\terror,\n\t\t\t\tevent,\n\t\t\t\toriginalRequest: originalRequest.clone(),\n\t\t\t\trequest: pluginFilteredRequest.clone()\n\t\t\t});\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Calls `this.fetch()` and (in the background) caches the generated response.\n\t*\n\t* The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n\t* so you do not have to call `waitUntil()` yourself.\n\t*\n\t* @param input The request or URL to fetch and cache.\n\t* @returns\n\t*/\n\tasync fetchAndCachePut(input) {\n\t\tconst response = await this.fetch(input);\n\t\tconst responseClone = response.clone();\n\t\tthis.waitUntil(this.cachePut(input, responseClone));\n\t\treturn response;\n\t}\n\t/**\n\t* Matches a request from the cache (and invokes any applicable plugin\n\t* callback method) using the `cacheName`, `matchOptions`, and `plugins`\n\t* provided to the `Strategy` object.\n\t*\n\t* The following lifecycle methods are invoked when using this method:\n\t* - `cacheKeyWillBeUsed`\n\t* - `cachedResponseWillBeUsed`\n\t*\n\t* @param key The `Request` or `URL` object to use as the cache key.\n\t* @returns A matching response, if found.\n\t*/\n\tasync cacheMatch(key) {\n\t\tconst request = toRequest(key);\n\t\tlet cachedResponse;\n\t\tconst { cacheName, matchOptions } = this._strategy;\n\t\tconst effectiveRequest = await this.getCacheKey(request, \"read\");\n\t\tconst multiMatchOptions = {\n\t\t\t...matchOptions,\n\t\t\tcacheName\n\t\t};\n\t\tcachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n\t\tif (process.env.NODE_ENV !== \"production\") if (cachedResponse) logger.debug(`Found a cached response in '${cacheName}'.`);\n\t\telse logger.debug(`No cached response found in '${cacheName}'.`);\n\t\tfor (const callback of this.iterateCallbacks(\"cachedResponseWillBeUsed\")) cachedResponse = await callback({\n\t\t\tcacheName,\n\t\t\tmatchOptions,\n\t\t\tcachedResponse,\n\t\t\trequest: effectiveRequest,\n\t\t\tevent: this.event\n\t\t}) || void 0;\n\t\treturn cachedResponse;\n\t}\n\t/**\n\t* Puts a request/response pair into the cache (and invokes any applicable\n\t* plugin callback method) using the `cacheName` and `plugins` provided to\n\t* the {@linkcode Strategy} object.\n\t*\n\t* The following plugin lifecycle methods are invoked when using this method:\n\t* - `cacheKeyWillBeUsed`\n\t* - `cacheWillUpdate`\n\t* - `cacheDidUpdate`\n\t*\n\t* @param key The request or URL to use as the cache key.\n\t* @param response The response to cache.\n\t* @returns `false` if a `cacheWillUpdate` caused the response to\n\t* not be cached, and `true` otherwise.\n\t*/\n\tasync cachePut(key, response) {\n\t\tconst request = toRequest(key);\n\t\tawait timeout(0);\n\t\tconst effectiveRequest = await this.getCacheKey(request, \"write\");\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (effectiveRequest.method && effectiveRequest.method !== \"GET\") throw new SerwistError(\"attempt-to-cache-non-get-request\", {\n\t\t\t\turl: getFriendlyURL(effectiveRequest.url),\n\t\t\t\tmethod: effectiveRequest.method\n\t\t\t});\n\t\t}\n\t\tif (!response) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(`Cannot cache non-existent response for '${getFriendlyURL(effectiveRequest.url)}'.`);\n\t\t\tthrow new SerwistError(\"cache-put-with-no-response\", { url: getFriendlyURL(effectiveRequest.url) });\n\t\t}\n\t\tconst responseToCache = await this._ensureResponseSafeToCache(response);\n\t\tif (!responseToCache) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' will not be cached.`, responseToCache);\n\t\t\treturn false;\n\t\t}\n\t\tconst { cacheName, matchOptions } = this._strategy;\n\t\tconst cache = await self.caches.open(cacheName);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst vary = response.headers.get(\"Vary\");\n\t\t\tif (vary && matchOptions?.ignoreVary !== true) 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.`);\n\t\t}\n\t\tconst hasCacheUpdateCallback = this.hasCallback(\"cacheDidUpdate\");\n\t\tconst oldResponse = hasCacheUpdateCallback ? await cacheMatchIgnoreParams(cache, effectiveRequest.clone(), [\"__WB_REVISION__\"], matchOptions) : null;\n\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`Updating the '${cacheName}' cache with a new Response for ${getFriendlyURL(effectiveRequest.url)}.`);\n\t\ttry {\n\t\t\tawait cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error) {\n\t\t\t\tif (error.name === \"QuotaExceededError\") await executeQuotaErrorCallbacks();\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\tfor (const callback of this.iterateCallbacks(\"cacheDidUpdate\")) await callback({\n\t\t\tcacheName,\n\t\t\toldResponse,\n\t\t\tnewResponse: responseToCache.clone(),\n\t\t\trequest: effectiveRequest,\n\t\t\tevent: this.event\n\t\t});\n\t\treturn true;\n\t}\n\t/**\n\t* Checks the `plugins` provided to the {@linkcode Strategy} object for `cacheKeyWillBeUsed`\n\t* callbacks and executes found callbacks in sequence. The final `Request`\n\t* object returned by the last plugin is treated as the cache key for cache\n\t* reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n\t* been registered, the passed request is returned unmodified.\n\t*\n\t* @param request\n\t* @param mode\n\t* @returns\n\t*/\n\tasync getCacheKey(request, mode) {\n\t\tconst key = `${request.url} | ${mode}`;\n\t\tif (!this._cacheKeys[key]) {\n\t\t\tlet effectiveRequest = request;\n\t\t\tfor (const callback of this.iterateCallbacks(\"cacheKeyWillBeUsed\")) effectiveRequest = toRequest(await callback({\n\t\t\t\tmode,\n\t\t\t\trequest: effectiveRequest,\n\t\t\t\tevent: this.event,\n\t\t\t\tparams: this.params\n\t\t\t}));\n\t\t\tthis._cacheKeys[key] = effectiveRequest;\n\t\t}\n\t\treturn this._cacheKeys[key];\n\t}\n\t/**\n\t* Returns `true` if the strategy has at least one plugin with the given\n\t* callback.\n\t*\n\t* @param name The name of the callback to check for.\n\t* @returns\n\t*/\n\thasCallback(name) {\n\t\tfor (const plugin of this._strategy.plugins) if (name in plugin) return true;\n\t\treturn false;\n\t}\n\t/**\n\t* Runs all plugin callbacks matching the given name, in order, passing the\n\t* given param object as the only argument.\n\t*\n\t* Note: since this method runs all plugins, it's not suitable for cases\n\t* where the return value of a callback needs to be applied prior to calling\n\t* the next callback. See {@linkcode StrategyHandler.iterateCallbacks} for how to handle that case.\n\t*\n\t* @param name The name of the callback to run within each plugin.\n\t* @param param The object to pass as the first (and only) param when executing each callback. This object will be merged with the\n\t* current plugin state prior to callback execution.\n\t*/\n\tasync runCallbacks(name, param) {\n\t\tfor (const callback of this.iterateCallbacks(name)) await callback(param);\n\t}\n\t/**\n\t* Accepts a callback name and returns an iterable of matching plugin callbacks.\n\t*\n\t* @param name The name fo the callback to run\n\t* @returns\n\t*/\n\t*iterateCallbacks(name) {\n\t\tfor (const plugin of this._strategy.plugins) if (typeof plugin[name] === \"function\") {\n\t\t\tconst state = this._pluginStateMap.get(plugin);\n\t\t\tconst statefulCallback = (param) => {\n\t\t\t\tconst statefulParam = {\n\t\t\t\t\t...param,\n\t\t\t\t\tstate\n\t\t\t\t};\n\t\t\t\treturn plugin[name](statefulParam);\n\t\t\t};\n\t\t\tyield statefulCallback;\n\t\t}\n\t}\n\t/**\n\t* Adds a promise to the\n\t* [extend lifetime promises](https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises)\n\t* of the event event associated with the request being handled (usually a `FetchEvent`).\n\t*\n\t* Note: you can await {@linkcode StrategyHandler.doneWaiting} to know when all added promises have settled.\n\t*\n\t* @param promise A promise to add to the extend lifetime promises of\n\t* the event that triggered the request.\n\t*/\n\twaitUntil(promise) {\n\t\tthis._extendLifetimePromises.push(promise);\n\t\treturn promise;\n\t}\n\t/**\n\t* Returns a promise that resolves once all promises passed to\n\t* `this.waitUntil()` have settled.\n\t*\n\t* Note: any work done after `doneWaiting()` settles should be manually\n\t* passed to an event's `waitUntil()` method (not `this.waitUntil()`), otherwise\n\t* the service worker thread may be killed prior to your work completing.\n\t*/\n\tasync doneWaiting() {\n\t\tlet promise;\n\t\twhile (promise = this._extendLifetimePromises.shift()) await promise;\n\t}\n\t/**\n\t* Stops running the strategy and immediately resolves any pending\n\t* `waitUntil()` promise.\n\t*/\n\tdestroy() {\n\t\tthis._handlerDeferred.resolve(null);\n\t}\n\t/**\n\t* This method checks if the navigation preload `Response` is available.\n\t*\n\t* @param request\n\t* @param event\n\t* @returns\n\t*/\n\tasync getPreloadResponse() {\n\t\tif (this.event instanceof FetchEvent && this.event.request.mode === \"navigate\" && \"preloadResponse\" in this.event) try {\n\t\t\tconst possiblePreloadResponse = await this.event.preloadResponse;\n\t\t\tif (possiblePreloadResponse) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Using a preloaded navigation response for '${getFriendlyURL(this.event.request.url)}'`);\n\t\t\t\treturn possiblePreloadResponse;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(error);\n\t\t\treturn;\n\t\t}\n\t}\n\t/**\n\t* This method will call `cacheWillUpdate` on the available plugins (or use\n\t* status === 200) to determine if the response is safe and valid to cache.\n\t*\n\t* @param response\n\t* @returns\n\t* @private\n\t*/\n\tasync _ensureResponseSafeToCache(response) {\n\t\tlet responseToCache = response;\n\t\tlet pluginsUsed = false;\n\t\tfor (const callback of this.iterateCallbacks(\"cacheWillUpdate\")) {\n\t\t\tresponseToCache = await callback({\n\t\t\t\trequest: this.request,\n\t\t\t\tresponse: responseToCache,\n\t\t\t\tevent: this.event\n\t\t\t}) || void 0;\n\t\t\tpluginsUsed = true;\n\t\t\tif (!responseToCache) break;\n\t\t}\n\t\tif (!pluginsUsed) {\n\t\t\tif (responseToCache && responseToCache.status !== 200) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") if (responseToCache.status === 0) 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.`);\n\t\t\t\telse logger.debug(`The response for '${this.request.url}' returned a status code of '${response.status}' and won't be cached as a result.`);\n\t\t\t\tresponseToCache = void 0;\n\t\t\t}\n\t\t}\n\t\treturn responseToCache;\n\t}\n};\n//#endregion\n//#region src/lib/strategies/Strategy.ts\n/**\n* Abstract class for implementing runtime caching strategies.\n*\n* Custom strategies should extend this class and leverage `StrategyHandler`, which will ensure all relevant cache options,\n* fetch options, and plugins are used (per the current strategy instance), to perform all fetching and caching logic.\n*/\nvar Strategy = class {\n\tcacheName;\n\tplugins;\n\tfetchOptions;\n\tmatchOptions;\n\t/**\n\t* Creates a new instance of the strategy and sets all documented option\n\t* properties as public instance properties.\n\t*\n\t* Note: if a custom strategy class extends the base Strategy class and does\n\t* not need more than these properties, it does not need to define its own\n\t* constructor.\n\t*\n\t* @param options\n\t*/\n\tconstructor(options = {}) {\n\t\tthis.cacheName = cacheNames.getRuntimeName(options.cacheName);\n\t\tthis.plugins = options.plugins || [];\n\t\tthis.fetchOptions = options.fetchOptions;\n\t\tthis.matchOptions = options.matchOptions;\n\t}\n\t/**\n\t* Performs a request strategy and returns a promise that will resolve to\n\t* a response, invoking all relevant plugin callbacks.\n\t*\n\t* When a strategy instance is registered with a route, this method is automatically\n\t* called when the route matches.\n\t*\n\t* Alternatively, this method can be used in a standalone `fetch` event\n\t* listener by passing it to `event.respondWith()`.\n\t*\n\t* @param options A `FetchEvent` or an object with the properties listed below.\n\t* @param options.request A request to run this strategy for.\n\t* @param options.event The event associated with the request.\n\t* @param options.url\n\t* @param options.params\n\t*/\n\thandle(options) {\n\t\tconst [responseDone] = this.handleAll(options);\n\t\treturn responseDone;\n\t}\n\t/**\n\t* Similar to `handle()`, but instead of just returning a promise that\n\t* resolves to a response, it will return an tuple of `[response, done]` promises,\n\t* where `response` is equivalent to what `handle()` returns, and `done` is a\n\t* promise that will resolve once all promises added to `event.waitUntil()` as a part\n\t* of performing the strategy have completed.\n\t*\n\t* You can await the `done` promise to ensure any extra work performed by\n\t* the strategy (usually caching responses) completes successfully.\n\t*\n\t* @param options A `FetchEvent` or `HandlerCallbackOptions` object.\n\t* @returns A tuple of [response, done] promises that can be used to determine when the response resolves as\n\t* well as when the handler has completed all its work.\n\t*/\n\thandleAll(options) {\n\t\tif (options instanceof FetchEvent) options = {\n\t\t\tevent: options,\n\t\t\trequest: options.request\n\t\t};\n\t\tconst event = options.event;\n\t\tconst request = typeof options.request === \"string\" ? new Request(options.request) : options.request;\n\t\tconst handler = new StrategyHandler(this, options.url ? {\n\t\t\tevent,\n\t\t\trequest,\n\t\t\turl: options.url,\n\t\t\tparams: options.params\n\t\t} : {\n\t\t\tevent,\n\t\t\trequest\n\t\t});\n\t\tconst responseDone = this._getResponse(handler, request, event);\n\t\treturn [responseDone, this._awaitComplete(responseDone, handler, request, event)];\n\t}\n\tasync _getResponse(handler, request, event) {\n\t\tawait handler.runCallbacks(\"handlerWillStart\", {\n\t\t\tevent,\n\t\t\trequest\n\t\t});\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await this._handle(request, handler);\n\t\t\tif (response === void 0 || response.type === \"error\") throw new SerwistError(\"no-response\", { url: request.url });\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error) for (const callback of handler.iterateCallbacks(\"handlerDidError\")) {\n\t\t\t\tresponse = await callback({\n\t\t\t\t\terror,\n\t\t\t\t\tevent,\n\t\t\t\t\trequest\n\t\t\t\t});\n\t\t\t\tif (response !== void 0) break;\n\t\t\t}\n\t\t\tif (!response) throw error;\n\t\t\tif (process.env.NODE_ENV !== \"production\") throw 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.`);\n\t\t}\n\t\tfor (const callback of handler.iterateCallbacks(\"handlerWillRespond\")) response = await callback({\n\t\t\tevent,\n\t\t\trequest,\n\t\t\tresponse\n\t\t});\n\t\treturn response;\n\t}\n\tasync _awaitComplete(responseDone, handler, request, event) {\n\t\tlet response;\n\t\tlet error;\n\t\ttry {\n\t\t\tresponse = await responseDone;\n\t\t} catch {}\n\t\ttry {\n\t\t\tawait handler.runCallbacks(\"handlerDidRespond\", {\n\t\t\t\tevent,\n\t\t\t\trequest,\n\t\t\t\tresponse\n\t\t\t});\n\t\t\tawait handler.doneWaiting();\n\t\t} catch (waitUntilError) {\n\t\t\tif (waitUntilError instanceof Error) error = waitUntilError;\n\t\t}\n\t\tawait handler.runCallbacks(\"handlerDidComplete\", {\n\t\t\tevent,\n\t\t\trequest,\n\t\t\tresponse,\n\t\t\terror\n\t\t});\n\t\thandler.destroy();\n\t\tif (error) throw error;\n\t}\n};\n//#endregion\n//#region src/lib/strategies/utils/messages.ts\nconst messages = {\n\tstrategyStart: (strategyName, request) => `Using ${strategyName} to respond to '${getFriendlyURL(request.url)}'`,\n\tprintFinalResponse: (response) => {\n\t\tif (response) {\n\t\t\tlogger.groupCollapsed(\"View the final response here.\");\n\t\t\tlogger.log(response || \"[No response returned]\");\n\t\t\tlogger.groupEnd();\n\t\t}\n\t}\n};\n//#endregion\n//#region src/lib/strategies/NetworkFirst.ts\n/**\n* An implementation of the [network first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network_first_falling_back_to_cache)\n* request strategy.\n*\n* By default, this strategy will cache responses with a 200 status code as\n* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque_responses).\n* Opaque responses are are cross-origin requests where the response doesn't\n* support [CORS](https://enable-cors.org/).\n*\n* If the network request fails, and there is no cache match, this will throw\n* a {@linkcode SerwistError} exception.\n*/\nvar NetworkFirst = class extends Strategy {\n\t_networkTimeoutSeconds;\n\t/**\n\t* @param options\n\t* This option can be used to combat\n\t* \"[lie-fi](https://developers.google.com/web/fundamentals/performance/poor-connectivity/#lie-fi)\"\n\t* scenarios.\n\t*/\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (!this.plugins.some((p) => \"cacheWillUpdate\" in p)) this.plugins.unshift(cacheOkAndOpaquePlugin);\n\t\tthis._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (this._networkTimeoutSeconds) finalAssertExports.isType(this._networkTimeoutSeconds, \"number\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: this.constructor.name,\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"networkTimeoutSeconds\"\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tconst logs = [];\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: this.constructor.name,\n\t\t\tfuncName: \"handle\",\n\t\t\tparamName: \"makeRequest\"\n\t\t});\n\t\tconst promises = [];\n\t\tlet timeoutId;\n\t\tif (this._networkTimeoutSeconds) {\n\t\t\tconst { id, promise } = this._getTimeoutPromise({\n\t\t\t\trequest,\n\t\t\t\tlogs,\n\t\t\t\thandler\n\t\t\t});\n\t\t\ttimeoutId = id;\n\t\t\tpromises.push(promise);\n\t\t}\n\t\tconst networkPromise = this._getNetworkPromise({\n\t\t\ttimeoutId,\n\t\t\trequest,\n\t\t\tlogs,\n\t\t\thandler\n\t\t});\n\t\tpromises.push(networkPromise);\n\t\tconst response = await handler.waitUntil((async () => {\n\t\t\treturn await handler.waitUntil(Promise.race(promises)) || await networkPromise;\n\t\t})());\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n\t\t\tfor (const log of logs) logger.log(log);\n\t\t\tmessages.printFinalResponse(response);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tif (!response) throw new SerwistError(\"no-response\", { url: request.url });\n\t\treturn response;\n\t}\n\t/**\n\t* @param options\n\t* @returns\n\t* @private\n\t*/\n\t_getTimeoutPromise({ request, logs, handler }) {\n\t\tlet timeoutId;\n\t\treturn {\n\t\t\tpromise: new Promise((resolve) => {\n\t\t\t\tconst onNetworkTimeout = async () => {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") logs.push(`Timing out the network response at ${this._networkTimeoutSeconds} seconds.`);\n\t\t\t\t\tresolve(await handler.cacheMatch(request));\n\t\t\t\t};\n\t\t\t\ttimeoutId = setTimeout(onNetworkTimeout, this._networkTimeoutSeconds * 1e3);\n\t\t\t}),\n\t\t\tid: timeoutId\n\t\t};\n\t}\n\t/**\n\t* @param options\n\t* @param options.timeoutId\n\t* @param options.request\n\t* @param options.logs A reference to the logs Array.\n\t* @param options.event\n\t* @returns\n\t*\n\t* @private\n\t*/\n\tasync _getNetworkPromise({ timeoutId, request, logs, handler }) {\n\t\tlet error;\n\t\tlet response;\n\t\ttry {\n\t\t\tresponse = await handler.fetchAndCachePut(request);\n\t\t} catch (fetchError) {\n\t\t\tif (fetchError instanceof Error) error = fetchError;\n\t\t}\n\t\tif (timeoutId) clearTimeout(timeoutId);\n\t\tif (process.env.NODE_ENV !== \"production\") if (response) logs.push(\"Got response from network.\");\n\t\telse logs.push(\"Unable to get a response from the network. Will respond with a cached response.\");\n\t\tif (error || !response) {\n\t\t\tresponse = await handler.cacheMatch(request);\n\t\t\tif (process.env.NODE_ENV !== \"production\") if (response) logs.push(`Found a cached response in the '${this.cacheName}' cache.`);\n\t\t\telse logs.push(`No response found in the '${this.cacheName}' cache.`);\n\t\t}\n\t\treturn response;\n\t}\n};\n//#endregion\n//#region src/lib/strategies/NetworkOnly.ts\n/**\n* An implementation of the [network only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#network_only)\n* request strategy.\n*\n* This class is useful if you require specific requests to only be fulfilled from the network.\n*\n* If the network request fails, this will throw a {@linkcode SerwistError} exception.\n*/\nvar NetworkOnly = class extends Strategy {\n\t_networkTimeoutSeconds;\n\t/**\n\t* @param options\n\t*/\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tthis._networkTimeoutSeconds = options.networkTimeoutSeconds || 0;\n\t}\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: this.constructor.name,\n\t\t\tfuncName: \"_handle\",\n\t\t\tparamName: \"request\"\n\t\t});\n\t\tlet error;\n\t\tlet response;\n\t\ttry {\n\t\t\tconst promises = [handler.fetch(request)];\n\t\t\tif (this._networkTimeoutSeconds) {\n\t\t\t\tconst timeoutPromise = timeout(this._networkTimeoutSeconds * 1e3);\n\t\t\t\tpromises.push(timeoutPromise);\n\t\t\t}\n\t\t\tresponse = await Promise.race(promises);\n\t\t\tif (!response) throw new Error(`Timed out the network response after ${this._networkTimeoutSeconds} seconds.`);\n\t\t} catch (err) {\n\t\t\tif (err instanceof Error) error = err;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n\t\t\tif (response) logger.log(\"Got response from network.\");\n\t\t\telse logger.log(\"Unable to get a response from the network.\");\n\t\t\tmessages.printFinalResponse(response);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tif (!response) throw new SerwistError(\"no-response\", {\n\t\t\turl: request.url,\n\t\t\terror\n\t\t});\n\t\treturn response;\n\t}\n};\n//#endregion\n//#region src/constants.ts\n/**\n* The list of valid HTTP methods associated with requests that could be routed.\n*\n* @private\n*/\nconst validMethods = [\n\t\"DELETE\",\n\t\"GET\",\n\t\"HEAD\",\n\t\"PATCH\",\n\t\"POST\",\n\t\"PUT\"\n];\n//#endregion\n//#region src/utils/normalizeHandler.ts\n/**\n* @param handler Either a function, or an object with a\n* 'handle' method.\n* @returns An object with a handle method.\n*\n* @private\n*/\nconst normalizeHandler = (handler) => {\n\tif (handler && typeof handler === \"object\") {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.hasMethod(handler, \"handle\", {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"Route\",\n\t\t\tfuncName: \"constructor\",\n\t\t\tparamName: \"handler\"\n\t\t});\n\t\treturn handler;\n\t}\n\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isType(handler, \"function\", {\n\t\tmoduleName: \"serwist\",\n\t\tclassName: \"Route\",\n\t\tfuncName: \"constructor\",\n\t\tparamName: \"handler\"\n\t});\n\treturn { handle: handler };\n};\n//#endregion\n//#region src/Route.ts\n/**\n* A `Route` consists of a pair of callback functions, `match` and `handler`.\n* The `match` callback determines if a route should be used to handle a\n* request by returning a truthy value if it can. The `handler` callback\n* is called when the route matches and should return a promise that resolves\n* to a response.\n*/\nvar Route = class {\n\thandler;\n\tmatch;\n\tmethod;\n\tcatchHandler;\n\t/**\n\t* Constructor for Route class.\n\t*\n\t* @param match A callback function that determines whether the\n\t* route matches a given `fetch` event by returning a truthy value.\n\t* @param handler A callback function that returns a `Promise` resolving\n\t* to a `Response`.\n\t* @param method The HTTP method to match the route against. Defaults\n\t* to `GET`.\n\t*/\n\tconstructor(match, handler, method = \"GET\") {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(match, \"function\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Route\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"match\"\n\t\t\t});\n\t\t\tif (method) finalAssertExports.isOneOf(method, validMethods, { paramName: \"method\" });\n\t\t}\n\t\tthis.handler = normalizeHandler(handler);\n\t\tthis.match = match;\n\t\tthis.method = method;\n\t}\n\t/**\n\t*\n\t* @param handler A callback function that returns a Promise resolving\n\t* to a Response.\n\t*/\n\tsetCatchHandler(handler) {\n\t\tthis.catchHandler = normalizeHandler(handler);\n\t}\n};\n//#endregion\n//#region src/lib/strategies/PrecacheStrategy.ts\n/**\n* A {@linkcode Strategy} implementation specifically designed to both cache\n* and fetch precached assets.\n*\n* Note: an instance of this class is created automatically when creating a\n* {@linkcode Serwist} instance; it's generally not necessary to create this yourself.\n*/\nvar PrecacheStrategy = class PrecacheStrategy extends Strategy {\n\t_fallbackToNetwork;\n\tstatic defaultPrecacheCacheabilityPlugin = { async cacheWillUpdate({ response }) {\n\t\tif (!response || response.status >= 400) return null;\n\t\treturn response;\n\t} };\n\tstatic copyRedirectedCacheableResponsesPlugin = { async cacheWillUpdate({ response }) {\n\t\treturn response.redirected ? await copyResponse(response) : response;\n\t} };\n\t/**\n\t* @param options\n\t*/\n\tconstructor(options = {}) {\n\t\toptions.cacheName = cacheNames.getPrecacheName(options.cacheName);\n\t\tsuper(options);\n\t\tthis._fallbackToNetwork = options.fallbackToNetwork !== false;\n\t\tthis.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n\t}\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tconst preloadResponse = await handler.getPreloadResponse();\n\t\tif (preloadResponse) return preloadResponse;\n\t\tconst response = await handler.cacheMatch(request);\n\t\tif (response) return response;\n\t\tif (handler.event && handler.event.type === \"install\") return await this._handleInstall(request, handler);\n\t\treturn await this._handleFetch(request, handler);\n\t}\n\tasync _handleFetch(request, handler) {\n\t\tlet response;\n\t\tconst params = handler.params || {};\n\t\tif (this._fallbackToNetwork) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(`The precached response for ${getFriendlyURL(request.url)} in ${this.cacheName} was not found. Falling back to the network.`);\n\t\t\tconst integrityInManifest = params.integrity;\n\t\t\tconst integrityInRequest = request.integrity;\n\t\t\tconst noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n\t\t\tresponse = await handler.fetch(new Request(request, { integrity: request.mode !== \"no-cors\" ? integrityInRequest || integrityInManifest : void 0 }));\n\t\t\tif (integrityInManifest && noIntegrityConflict && request.mode !== \"no-cors\") {\n\t\t\t\tthis._useDefaultCacheabilityPluginIfNeeded();\n\t\t\t\tconst wasCached = await handler.cachePut(request, response.clone());\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\tif (wasCached) logger.log(`A response for ${getFriendlyURL(request.url)} was used to \"repair\" the precache.`);\n\t\t\t\t}\n\t\t\t}\n\t\t} else throw new SerwistError(\"missing-precache-entry\", {\n\t\t\tcacheName: this.cacheName,\n\t\t\turl: request.url\n\t\t});\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tconst cacheKey = params.cacheKey || await handler.getCacheKey(request, \"read\");\n\t\t\tlogger.groupCollapsed(`Precaching is responding to: ${getFriendlyURL(request.url)}`);\n\t\t\tlogger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n\t\t\tlogger.groupCollapsed(\"View request details here.\");\n\t\t\tlogger.log(request);\n\t\t\tlogger.groupEnd();\n\t\t\tlogger.groupCollapsed(\"View response details here.\");\n\t\t\tlogger.log(response);\n\t\t\tlogger.groupEnd();\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\treturn response;\n\t}\n\tasync _handleInstall(request, handler) {\n\t\tthis._useDefaultCacheabilityPluginIfNeeded();\n\t\tconst response = await handler.fetch(request);\n\t\tif (!await handler.cachePut(request, response.clone())) throw new SerwistError(\"bad-precaching-response\", {\n\t\t\turl: request.url,\n\t\t\tstatus: response.status\n\t\t});\n\t\treturn response;\n\t}\n\t/**\n\t* This method is complex, as there a number of things to account for:\n\t*\n\t* The `plugins` array can be set at construction, and/or it might be added to\n\t* to at any time before the strategy is used.\n\t*\n\t* At the time the strategy is used (i.e. during an `install` event), there\n\t* needs to be at least one plugin that implements `cacheWillUpdate` in the\n\t* array, other than `copyRedirectedCacheableResponsesPlugin`.\n\t*\n\t* - If this method is called and there are no suitable `cacheWillUpdate`\n\t* plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n\t*\n\t* - If this method is called and there is exactly one `cacheWillUpdate`, then\n\t* we don't have to do anything (this might be a previously added\n\t* `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n\t*\n\t* - If this method is called and there is more than one `cacheWillUpdate`,\n\t* then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n\t* we need to remove it. (This situation is unlikely, but it could happen if\n\t* the strategy is used multiple times, the first without a `cacheWillUpdate`,\n\t* and then later on after manually adding a custom `cacheWillUpdate`.)\n\t*\n\t* See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n\t*\n\t* @private\n\t*/\n\t_useDefaultCacheabilityPluginIfNeeded() {\n\t\tlet defaultPluginIndex = null;\n\t\tlet cacheWillUpdatePluginCount = 0;\n\t\tfor (const [index, plugin] of this.plugins.entries()) {\n\t\t\tif (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) continue;\n\t\t\tif (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) defaultPluginIndex = index;\n\t\t\tif (plugin.cacheWillUpdate) cacheWillUpdatePluginCount++;\n\t\t}\n\t\tif (cacheWillUpdatePluginCount === 0) this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n\t\telse if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) this.plugins.splice(defaultPluginIndex, 1);\n\t}\n};\n//#endregion\n//#region src/NavigationRoute.ts\n/**\n* A class that makes it easy to create a {@linkcode Route} object that matches navigation requests.\n*\n* It will only match incoming requests whose [`mode`](https://fetch.spec.whatwg.org/#concept-request-mode) is set to `\"navigate\"`.\n*\n* You can optionally only apply this route to a subset of navigation requests\n* by using one or both of the `denylist` and `allowlist` parameters.\n*/\nvar NavigationRoute = class extends Route {\n\t_allowlist;\n\t_denylist;\n\t/**\n\t* If both `denylist` and `allowlist` are provided, `denylist` will\n\t* take precedence.\n\t*\n\t* The regular expressions in `allowlist` and `denylist`\n\t* are matched against the concatenated\n\t* [`pathname`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/pathname)\n\t* and [`search`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/search)\n\t* portions of the requested URL.\n\t*\n\t* *Note*: These RegExps may be evaluated against every destination URL during\n\t* a navigation. Avoid using\n\t* [complex RegExps](https://github.com/GoogleChrome/workbox/issues/3077),\n\t* or else your users may see delays when navigating your site.\n\t*\n\t* @param handler A callback function that returns a `Promise` resulting in a `Response`.\n\t* @param options\n\t*/\n\tconstructor(handler, { allowlist = [/./], denylist = [] } = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isArrayOfClass(allowlist, RegExp, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"NavigationRoute\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"options.allowlist\"\n\t\t\t});\n\t\t\tfinalAssertExports.isArrayOfClass(denylist, RegExp, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"NavigationRoute\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"options.denylist\"\n\t\t\t});\n\t\t}\n\t\tsuper((options) => this._match(options), handler);\n\t\tthis._allowlist = allowlist;\n\t\tthis._denylist = denylist;\n\t}\n\t/**\n\t* Routes match handler.\n\t*\n\t* @param options\n\t* @returns\n\t* @private\n\t*/\n\t_match({ url, request }) {\n\t\tif (request && request.mode !== \"navigate\") return false;\n\t\tconst pathnameAndSearch = url.pathname + url.search;\n\t\tfor (const regExp of this._denylist) if (regExp.test(pathnameAndSearch)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`The navigation route ${pathnameAndSearch} is not being used, since the URL matches this denylist pattern: ${regExp.toString()}`);\n\t\t\treturn false;\n\t\t}\n\t\tif (this._allowlist.some((regExp) => regExp.test(pathnameAndSearch))) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`The navigation route ${pathnameAndSearch} is being used.`);\n\t\t\treturn true;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`The navigation route ${pathnameAndSearch} is not being used, since the URL being navigated to doesn't match the allowlist.`);\n\t\treturn false;\n\t}\n};\n//#endregion\n//#region src/navigationPreload.ts\n/**\n* Checks whether the current browser supports\n* navigation preloading.\n*\n* @returns\n* @see https://serwist.pages.dev/docs/serwist/core/is-navigation-preload-supported\n*/\nconst isNavigationPreloadSupported = () => {\n\treturn Boolean(self.registration?.navigationPreload);\n};\n/**\n* If the browser supports navigation preloading, then this will enable it.\n*\n* @param headerValue Optional. Allows developers to override the value of\n* the `Service-Worker-Navigation-Preload` header which will be sent to the\n* server when making the navigation request.\n* @see https://serwist.pages.dev/docs/serwist/core/enable-navigation-preload\n*/\nconst enableNavigationPreload = (headerValue) => {\n\tif (isNavigationPreloadSupported()) self.addEventListener(\"activate\", (event) => {\n\t\tevent.waitUntil(self.registration.navigationPreload.enable().then(() => {\n\t\t\tif (headerValue) self.registration.navigationPreload.setHeaderValue(headerValue);\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Navigation preloading is enabled.\");\n\t\t}));\n\t});\n\telse if (process.env.NODE_ENV !== \"production\") logger.log(\"Navigation preloading is not supported in this browser.\");\n};\n/**\n* If the browser supports navigation preloading, then this will disable it.\n*\n* @see https://serwist.pages.dev/docs/serwist/core/disable-navigation-preload\n*/\nconst disableNavigationPreload = () => {\n\tif (isNavigationPreloadSupported()) self.addEventListener(\"activate\", (event) => {\n\t\tevent.waitUntil(self.registration.navigationPreload.disable().then(() => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Navigation preloading is disabled.\");\n\t\t}));\n\t});\n\telse if (process.env.NODE_ENV !== \"production\") logger.log(\"Navigation preloading is not supported in this browser.\");\n};\n//#endregion\n//#region src/utils/removeIgnoredSearchParams.ts\n/**\n* Removes any URL search parameters that should be ignored.\n*\n* @param urlObject The original URL.\n* @param ignoreURLParametersMatching RegExps to test against\n* each search parameter name. Matches mean that the search parameter should be\n* ignored.\n* @returns The URL with any ignored search parameters removed.\n* @private\n*/\nconst removeIgnoredSearchParams = (urlObject, ignoreURLParametersMatching = []) => {\n\tfor (const paramName of [...urlObject.searchParams.keys()]) if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) urlObject.searchParams.delete(paramName);\n\treturn urlObject;\n};\n//#endregion\n//#region src/utils/generateURLVariations.ts\n/**\n* Generator function that yields possible variations on the original URL to\n* check, one at a time.\n*\n* @param url\n* @param options\n*\n* @private\n*/\nfunction* generateURLVariations(url, { directoryIndex = \"index.html\", ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], cleanURLs = true, urlManipulation } = {}) {\n\tconst urlObject = new URL(url, location.href);\n\turlObject.hash = \"\";\n\tyield urlObject.href;\n\tconst urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n\tyield urlWithoutIgnoredParams.href;\n\tif (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith(\"/\")) {\n\t\tconst directoryURL = new URL(urlWithoutIgnoredParams.href);\n\t\tdirectoryURL.pathname += directoryIndex;\n\t\tyield directoryURL.href;\n\t}\n\tif (cleanURLs) {\n\t\tconst cleanURL = new URL(urlWithoutIgnoredParams.href);\n\t\tcleanURL.pathname += \".html\";\n\t\tyield cleanURL.href;\n\t}\n\tif (urlManipulation) {\n\t\tconst additionalURLs = urlManipulation({ url: urlObject });\n\t\tfor (const urlToAttempt of additionalURLs) yield urlToAttempt.href;\n\t}\n}\n//#endregion\n//#region src/RegExpRoute.ts\n/**\n* A class that makes it easy to create a {@linkcode Route} object with a regular expression.\n*\n* For same-origin requests the `RegExp` only needs to match part of the URL. For\n* requests against third-party servers, you must define a `RegExp` that matches\n* the start of the URL.\n*/\nvar RegExpRoute = class extends Route {\n\t/**\n\t* If the regular expression contains\n\t* [capture groups](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references),\n\t* the captured values will be passed to the `params` argument.\n\t*\n\t* @param regExp The regular expression to match against URLs.\n\t* @param handler A callback function that returns a `Promise` resulting in a `Response`.\n\t* @param method The HTTP method to match the {@linkcode Route} against. Defaults to `GET`.\n\t* against.\n\t*/\n\tconstructor(regExp, handler, method) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(regExp, RegExp, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"RegExpRoute\",\n\t\t\tfuncName: \"constructor\",\n\t\t\tparamName: \"pattern\"\n\t\t});\n\t\tconst match = ({ url }) => {\n\t\t\tconst result = regExp.exec(url.href);\n\t\t\tif (!result) return;\n\t\t\tif (url.origin !== location.origin && result.index !== 0) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") 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.`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn result.slice(1);\n\t\t};\n\t\tsuper(match, handler, method);\n\t}\n};\n//#endregion\n//#region src/setCacheNameDetails.ts\n/**\n* Modifies the default cache names used by Serwist packages.\n* Cache names are generated as `<prefix>-<Cache Name>-<suffix>`.\n*\n* @param details\n*/\nconst setCacheNameDetails = (details) => {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tfor (const key of Object.keys(details)) finalAssertExports.isType(details[key], \"string\", {\n\t\t\tmoduleName: \"@serwist/core\",\n\t\t\tfuncName: \"setCacheNameDetails\",\n\t\t\tparamName: `details.${key}`\n\t\t});\n\t\tif (details.precache?.length === 0) throw new SerwistError(\"invalid-cache-name\", {\n\t\t\tcacheNameId: \"precache\",\n\t\t\tvalue: details.precache\n\t\t});\n\t\tif (details.runtime?.length === 0) throw new SerwistError(\"invalid-cache-name\", {\n\t\t\tcacheNameId: \"runtime\",\n\t\t\tvalue: details.runtime\n\t\t});\n\t\tif (details.googleAnalytics?.length === 0) throw new SerwistError(\"invalid-cache-name\", {\n\t\t\tcacheNameId: \"googleAnalytics\",\n\t\t\tvalue: details.googleAnalytics\n\t\t});\n\t}\n\tcacheNames.updateDetails(details);\n};\n//#endregion\n//#region src/utils/createCacheKey.ts\nconst REVISION_SEARCH_PARAM = \"__WB_REVISION__\";\n/**\n* Converts a manifest entry into a versioned URL suitable for precaching.\n*\n* @param entry\n* @returns A URL with versioning info.\n*\n* @private\n*/\nconst createCacheKey = (entry) => {\n\tif (!entry) throw new SerwistError(\"add-to-cache-list-unexpected-type\", { entry });\n\tif (typeof entry === \"string\") {\n\t\tconst urlObject = new URL(entry, location.href);\n\t\treturn {\n\t\t\tcacheKey: urlObject.href,\n\t\t\turl: urlObject.href\n\t\t};\n\t}\n\tconst { revision, url } = entry;\n\tif (!url) throw new SerwistError(\"add-to-cache-list-unexpected-type\", { entry });\n\tif (!revision) {\n\t\tconst urlObject = new URL(url, location.href);\n\t\treturn {\n\t\t\tcacheKey: urlObject.href,\n\t\t\turl: urlObject.href\n\t\t};\n\t}\n\tconst cacheKeyURL = new URL(url, location.href);\n\tconst originalURL = new URL(url, location.href);\n\tcacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n\treturn {\n\t\tcacheKey: cacheKeyURL.href,\n\t\turl: originalURL.href\n\t};\n};\n//#endregion\n//#region src/utils/PrecacheInstallReportPlugin.ts\n/**\n* A plugin designed to determine the number of assets that were updated (or not updated)\n* during the `install` event.\n*\n* @private\n*/\nvar PrecacheInstallReportPlugin = class {\n\tupdatedURLs = [];\n\tnotUpdatedURLs = [];\n\thandlerWillStart = async ({ request, state }) => {\n\t\tif (state) state.originalRequest = request;\n\t};\n\tcachedResponseWillBeUsed = async ({ event, state, cachedResponse }) => {\n\t\tif (event.type === \"install\") {\n\t\t\tif (state?.originalRequest && state.originalRequest instanceof Request) {\n\t\t\t\tconst url = state.originalRequest.url;\n\t\t\t\tif (cachedResponse) this.notUpdatedURLs.push(url);\n\t\t\t\telse this.updatedURLs.push(url);\n\t\t\t}\n\t\t}\n\t\treturn cachedResponse;\n\t};\n};\n//#endregion\n//#region src/utils/parseRoute.ts\n/**\n* Parses a `RegExp`, string, or function with a caching strategy into a {@linkcode Route}. This is for\n* when you want to create a {@linkcode Route}, but you don't want to register it just yet: sometimes\n* you want to call {@linkcode Route.setCatchHandler} first, for example.\n*\n* @param capture If the capture param is a {@linkcode Route} object, all other arguments will be ignored.\n* @param handler A callback function that returns a promise resulting in a response.\n* This parameter is required if `capture` is not a {@linkcode Route} object.\n* @param method The HTTP method to match the route against. Defaults to `'GET'`.\n* @returns The generated {@linkcode Route}.\n*/\nconst parseRoute = (capture, handler, method) => {\n\tif (typeof capture === \"string\") {\n\t\tconst captureUrl = new URL(capture, location.href);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!(capture.startsWith(\"/\") || capture.startsWith(\"http\"))) throw new SerwistError(\"invalid-string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tfuncName: \"parseRoute\",\n\t\t\t\tparamName: \"capture\"\n\t\t\t});\n\t\t\tconst valueToCheck = capture.startsWith(\"http\") ? captureUrl.pathname : capture;\n\t\t\tconst wildcards = \"[*:?+]\";\n\t\t\tif (new RegExp(`${wildcards}`).exec(valueToCheck)) 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.`);\n\t\t}\n\t\tconst matchCallback = ({ url }) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (url.pathname === captureUrl.pathname && url.origin !== captureUrl.origin) 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.`);\n\t\t\t}\n\t\t\treturn url.href === captureUrl.href;\n\t\t};\n\t\treturn new Route(matchCallback, handler, method);\n\t}\n\tif (capture instanceof RegExp) return new RegExpRoute(capture, handler, method);\n\tif (typeof capture === \"function\") return new Route(capture, handler, method);\n\tif (capture instanceof Route) return capture;\n\tthrow new SerwistError(\"unsupported-route-type\", {\n\t\tmoduleName: \"serwist\",\n\t\tfuncName: \"parseRoute\",\n\t\tparamName: \"capture\"\n\t});\n};\n//#endregion\n//#region src/utils/printCleanupDetails.ts\n/**\n* @param groupTitle\n* @param deletedURLs\n*\n* @private\n*/\nconst logGroup = (groupTitle, deletedURLs) => {\n\tlogger.groupCollapsed(groupTitle);\n\tfor (const url of deletedURLs) logger.log(url);\n\tlogger.groupEnd();\n};\n/**\n* @param deletedURLs\n* @private\n*/\nconst printCleanupDetails = (deletedURLs) => {\n\tconst deletionCount = deletedURLs.length;\n\tif (deletionCount > 0) {\n\t\tlogger.groupCollapsed(`During precaching cleanup, ${deletionCount} cached request${deletionCount === 1 ? \" was\" : \"s were\"} deleted.`);\n\t\tlogGroup(\"Deleted Cache Requests\", deletedURLs);\n\t\tlogger.groupEnd();\n\t}\n};\n//#endregion\n//#region src/utils/printInstallDetails.ts\n/**\n* @param groupTitle\n* @param urls\n*\n* @private\n*/\nfunction _nestedGroup(groupTitle, urls) {\n\tif (urls.length === 0) return;\n\tlogger.groupCollapsed(groupTitle);\n\tfor (const url of urls) logger.log(url);\n\tlogger.groupEnd();\n}\n/**\n* @param urlsToPrecache\n* @param urlsAlreadyPrecached\n* @private\n*/\nconst printInstallDetails = (urlsToPrecache, urlsAlreadyPrecached) => {\n\tconst precachedCount = urlsToPrecache.length;\n\tconst alreadyPrecachedCount = urlsAlreadyPrecached.length;\n\tif (precachedCount || alreadyPrecachedCount) {\n\t\tlet message = `Precaching ${precachedCount} file${precachedCount === 1 ? \"\" : \"s\"}.`;\n\t\tif (alreadyPrecachedCount > 0) message += ` ${alreadyPrecachedCount} file${alreadyPrecachedCount === 1 ? \" is\" : \"s are\"} already cached.`;\n\t\tlogger.groupCollapsed(message);\n\t\t_nestedGroup(\"View newly precached URLs.\", urlsToPrecache);\n\t\t_nestedGroup(\"View previously precached URLs.\", urlsAlreadyPrecached);\n\t\tlogger.groupEnd();\n\t}\n};\n//#endregion\nexport { BackgroundSyncQueue as C, copyResponse as D, disableDevLogs as E, BackgroundSyncPlugin as S, BackgroundSyncQueueStore as T, NetworkFirst as _, createCacheKey as a, StrategyHandler as b, generateURLVariations as c, isNavigationPreloadSupported as d, NavigationRoute as f, NetworkOnly as g, normalizeHandler as h, PrecacheInstallReportPlugin as i, disableNavigationPreload as l, Route as m, printCleanupDetails as n, setCacheNameDetails as o, PrecacheStrategy as p, parseRoute as r, RegExpRoute as s, printInstallDetails as t, enableNavigationPreload as u, messages as v, StorableRequest as w, cacheOkAndOpaquePlugin as x, Strategy as y };\n\n//# sourceMappingURL=printInstallDetails-c9A08ZVZ.js.map","import { c as timeout } from \"./waitUntil-BHDx3Rgo.js\";\n//#region src/utils/resultingClientExists.ts\nconst MAX_RETRY_TIME = 2e3;\n/**\n* Returns a promise that resolves to a window client matching the passed\n* `resultingClientId`. For browsers that don't support `resultingClientId`\n* or if waiting for the resulting client to apper takes too long, resolve to\n* `undefined`.\n*\n* @param resultingClientId\n* @returns\n* @private\n*/\nasync function resultingClientExists(resultingClientId) {\n\tif (!resultingClientId) return;\n\tlet existingWindows = await self.clients.matchAll({ type: \"window\" });\n\tconst existingWindowIds = new Set(existingWindows.map((w) => w.id));\n\tlet resultingWindow;\n\tconst startTime = performance.now();\n\twhile (performance.now() - startTime < MAX_RETRY_TIME) {\n\t\texistingWindows = await self.clients.matchAll({ type: \"window\" });\n\t\tresultingWindow = existingWindows.find((w) => {\n\t\t\tif (resultingClientId) return w.id === resultingClientId;\n\t\t\treturn !existingWindowIds.has(w.id);\n\t\t});\n\t\tif (resultingWindow) break;\n\t\tawait timeout(100);\n\t}\n\treturn resultingWindow;\n}\n//#endregion\n//#region src/utils/canConstructReadableStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n* object.\n*\n* @returns `true`, if the current browser can successfully construct a `ReadableStream`, `false` otherwise.\n*\n* @private\n*/\nfunction canConstructReadableStream() {\n\tif (supportStatus === void 0) try {\n\t\tnew ReadableStream({ start() {} });\n\t\tsupportStatus = true;\n\t} catch {\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/utils/dontWaitFor.ts\n/**\n* A helper function that prevents a promise from being flagged as unused.\n*\n* @private\n*/\nfunction dontWaitFor(promise) {\n\tpromise.then(() => {});\n}\n//#endregion\nexport { canConstructReadableStream as n, resultingClientExists as r, dontWaitFor as t };\n\n//# sourceMappingURL=index.internal-Dxj9Ni9X.js.map","//#region src/non-nullable.ts\nconst nonNullable = (value) => value !== null && value !== void 0;\n//#endregion\n//#region src/parallel.ts\n/**\n* Executes many async functions in parallel. Returns the\n* results from all functions as an array. Does not handle\n* any error.\n*/\nconst parallel = async (limit, array, func) => {\n\tconst work = array.map((item, index) => ({\n\t\tindex,\n\t\titem\n\t}));\n\tconst processor = async (res) => {\n\t\tconst results = [];\n\t\twhile (true) {\n\t\t\tconst next = work.pop();\n\t\t\tif (!next) return res(results);\n\t\t\tconst result = await func(next.item);\n\t\t\tresults.push({\n\t\t\t\tresult,\n\t\t\t\tindex: next.index\n\t\t\t});\n\t\t}\n\t};\n\tconst queues = Array.from({ length: limit }, () => new Promise(processor));\n\treturn (await Promise.all(queues)).flat().sort((a, b) => a.index < b.index ? -1 : 1).map((res) => res.result);\n};\n//#endregion\n//#region src/to-unix.ts\nconst toUnix = (p) => p.replace(/\\\\/g, \"/\").replace(/(?<!^)\\/+/g, \"/\");\n//#endregion\n//#region src/compare.ts\nconst compare = (a, b) => {\n\tif (a < b) return -1;\n\tif (a > b) return 1;\n\treturn 0;\n};\n//#endregion\n//#region src/constants.ts\n/** @see https://esbuild.github.io/api/#target */\nconst SUPPORTED_ESBUILD_TARGETS = [\n\t\"chrome\",\n\t\"deno\",\n\t\"edge\",\n\t\"firefox\",\n\t\"hermes\",\n\t\"ie\",\n\t\"ios\",\n\t\"node\",\n\t\"opera\",\n\t\"rhino\",\n\t\"safari\"\n];\nconst UNSUPPORTED_BROWSERLIST_TARGETS = [\n\t\"android 4\",\n\t\"android 3\",\n\t\"android 2\"\n];\n//#endregion\n//#region src/semver.ts\nconst compareSemver = (a, b) => {\n\treturn compare(Number.parseInt(a[0], 10), Number.parseInt(b[0], 10)) || compare(Number.parseInt(a[1] || \"0\", 10), Number.parseInt(b[1] || \"0\", 10)) || compare(Number.parseInt(a[2] || \"0\", 10), Number.parseInt(b[2] || \"0\", 10));\n};\n//#endregion\n//#region src/browserslist.ts\n/**\n* Loads and converts Browserslist into esbuild's `target` option.\n*\n* @param cwd\n* @returns\n*/\nconst browserslistToEsbuild = (browserslist, cwd, defaultBrowserslist) => {\n\treturn browserslist(browserslist.loadConfig({ path: cwd }) ?? defaultBrowserslist).filter((query) => !UNSUPPORTED_BROWSERLIST_TARGETS.some((target) => query.startsWith(target))).map((query) => {\n\t\tconst split = (query === \"safari TP\" ? browserslist(\"last 1 safari version\")[0] : query).split(\" \");\n\t\tif (split[0] === \"android\" || split[0] === \"and_chr\") split[0] = \"chrome\";\n\t\tif (split[0] === \"and_ff\") split[0] = \"firefox\";\n\t\tif (split[0] === \"ios_saf\" || split[0] === \"ios\") split[0] = \"safari\";\n\t\tif (split[1].includes(\"-\")) split[1] = split[1].slice(0, split[1].indexOf(\"-\"));\n\t\tif (split[1].endsWith(\".0\")) split[1] = split[1].slice(0, -2);\n\t\treturn split;\n\t}).filter((split) => SUPPORTED_ESBUILD_TARGETS.includes(split[0]) && /^\\d+(\\.\\d+)*$/.test(split[1])).sort((a, b) => {\n\t\tif (a[0] === b[0]) return compareSemver(b[1].split(\".\"), a[1].split(\".\"));\n\t\telse return compare(a[0], b[0]);\n\t}).reduce((acc, browser) => {\n\t\tconst existingIndex = acc.findIndex((br) => br[0] === browser[0]);\n\t\tif (existingIndex !== -1) acc[existingIndex][1] = browser[1];\n\t\telse acc.push(browser);\n\t\treturn acc;\n\t}, []).map((split) => split.join(\"\"));\n};\n//#endregion\nexport { SUPPORTED_ESBUILD_TARGETS, UNSUPPORTED_BROWSERLIST_TARGETS, browserslistToEsbuild, compare, compareSemver, nonNullable, parallel, toUnix };\n\n//# sourceMappingURL=index.mjs.map","import { c as timeout, d as finalAssertExports, f as SerwistError, l as logger, m as cacheNames$1, n as clientsClaim, r as cleanupOutdatedCaches, s as quotaErrorCallbacks, t as waitUntil, u as getFriendlyURL } from \"./chunks/waitUntil-BHDx3Rgo.js\";\nimport { C as BackgroundSyncQueue, D as copyResponse, E as disableDevLogs, S as BackgroundSyncPlugin, T as BackgroundSyncQueueStore, _ as NetworkFirst, a as createCacheKey, b as StrategyHandler, c as generateURLVariations, d as isNavigationPreloadSupported, f as NavigationRoute, g as NetworkOnly, h as normalizeHandler, i as PrecacheInstallReportPlugin, l as disableNavigationPreload, m as Route, n as printCleanupDetails, o as setCacheNameDetails, p as PrecacheStrategy, r as parseRoute, s as RegExpRoute, t as printInstallDetails, u as enableNavigationPreload, v as messages, w as StorableRequest, x as cacheOkAndOpaquePlugin, y as Strategy } from \"./chunks/printInstallDetails-c9A08ZVZ.js\";\nimport { r as resultingClientExists } from \"./chunks/index.internal-Dxj9Ni9X.js\";\nimport { deleteDB, openDB } from \"idb\";\nimport { parallel } from \"@serwist/utils\";\n//#region src/cacheNames.ts\n/**\n* Get the current cache names and prefix/suffix used by Serwist.\n*\n* `cacheNames.precache` is used for precached assets,\n* `cacheNames.googleAnalytics` is used by `@serwist/google-analytics` to\n* store `analytics.js`, and `cacheNames.runtime` is used for everything else.\n*\n* `cacheNames.prefix` can be used to retrieve just the current prefix value.\n* `cacheNames.suffix` can be used to retrieve just the current suffix value.\n*\n* @returns An object with `precache`, `runtime`, `prefix`, and `googleAnalytics` properties.\n*/\nconst cacheNames = {\n\tget googleAnalytics() {\n\t\treturn cacheNames$1.getGoogleAnalyticsName();\n\t},\n\tget precache() {\n\t\treturn cacheNames$1.getPrecacheName();\n\t},\n\tget prefix() {\n\t\treturn cacheNames$1.getPrefix();\n\t},\n\tget runtime() {\n\t\treturn cacheNames$1.getRuntimeName();\n\t},\n\tget suffix() {\n\t\treturn cacheNames$1.getSuffix();\n\t}\n};\n//#endregion\n//#region src/lib/broadcastUpdate/constants.ts\nconst BROADCAST_UPDATE_MESSAGE_TYPE = \"CACHE_UPDATED\";\nconst BROADCAST_UPDATE_MESSAGE_META = \"serwist-broadcast-update\";\nconst BROADCAST_UPDATE_DEFAULT_HEADERS = [\n\t\"content-length\",\n\t\"etag\",\n\t\"last-modified\"\n];\n//#endregion\n//#region src/lib/broadcastUpdate/responsesAreSame.ts\n/**\n* Given two responses, compares several header values to see if they are\n* the same or not.\n*\n* @param firstResponse The first response.\n* @param secondResponse The second response.\n* @param headersToCheck A list of headers to check.\n* @returns\n*/\nconst responsesAreSame = (firstResponse, secondResponse, headersToCheck) => {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif (!(firstResponse instanceof Response && secondResponse instanceof Response)) throw new SerwistError(\"invalid-responses-are-same-args\");\n\t}\n\tif (!headersToCheck.some((header) => {\n\t\treturn firstResponse.headers.has(header) && secondResponse.headers.has(header);\n\t})) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.warn(\"Unable to determine where the response has been updated because none of the headers that would be checked are present.\");\n\t\t\tlogger.debug(\"Attempting to compare the following: \", firstResponse, secondResponse, headersToCheck);\n\t\t}\n\t\treturn true;\n\t}\n\treturn headersToCheck.every((header) => {\n\t\tconst headerStateComparison = firstResponse.headers.has(header) === secondResponse.headers.has(header);\n\t\tconst headerValueComparison = firstResponse.headers.get(header) === secondResponse.headers.get(header);\n\t\treturn headerStateComparison && headerValueComparison;\n\t});\n};\n//#endregion\n//#region src/lib/broadcastUpdate/BroadcastCacheUpdate.ts\nconst isSafari = typeof navigator !== \"undefined\" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n/**\n* Generates the default payload used in update messages. By default the\n* payload includes the `cacheName` and `updatedURL` fields.\n*\n* @returns\n* @private\n*/\nconst defaultPayloadGenerator = (data) => {\n\treturn {\n\t\tcacheName: data.cacheName,\n\t\tupdatedURL: data.request.url\n\t};\n};\n/**\n* A class that uses the `postMessage()` API to inform any open windows/tabs when\n* a cached response has been updated.\n*\n* For efficiency's sake, the underlying response bodies are not compared;\n* only specific response headers are checked.\n*/\nvar BroadcastCacheUpdate = class {\n\t_headersToCheck;\n\t_generatePayload;\n\t_notifyAllClients;\n\t/**\n\t* Construct an instance of `BroadcastCacheUpdate`.\n\t*\n\t* @param options\n\t*/\n\tconstructor({ generatePayload, headersToCheck, notifyAllClients } = {}) {\n\t\tthis._headersToCheck = headersToCheck || BROADCAST_UPDATE_DEFAULT_HEADERS;\n\t\tthis._generatePayload = generatePayload || defaultPayloadGenerator;\n\t\tthis._notifyAllClients = notifyAllClients ?? true;\n\t}\n\t/**\n\t* Compares two responses and sends a message (via `postMessage()`) to all window clients if the\n\t* responses differ. Neither of the Responses can be opaque.\n\t*\n\t* The message that's posted has the following format (where `payload` can\n\t* be customized via the `generatePayload` option the instance is created\n\t* with):\n\t*\n\t* ```\n\t* {\n\t* type: 'CACHE_UPDATED',\n\t* meta: 'workbox-broadcast-update',\n\t* payload: {\n\t* cacheName: 'the-cache-name',\n\t* updatedURL: 'https://example.com/'\n\t* }\n\t* }\n\t* ```\n\t*\n\t* @param options\n\t* @returns Resolves once the update is sent.\n\t*/\n\tasync notifyIfUpdated(options) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(options.cacheName, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BroadcastCacheUpdate\",\n\t\t\t\tfuncName: \"notifyIfUpdated\",\n\t\t\t\tparamName: \"cacheName\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(options.newResponse, Response, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BroadcastCacheUpdate\",\n\t\t\t\tfuncName: \"notifyIfUpdated\",\n\t\t\t\tparamName: \"newResponse\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(options.request, Request, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"BroadcastCacheUpdate\",\n\t\t\t\tfuncName: \"notifyIfUpdated\",\n\t\t\t\tparamName: \"request\"\n\t\t\t});\n\t\t}\n\t\tif (!options.oldResponse) return;\n\t\tif (!responsesAreSame(options.oldResponse, options.newResponse, this._headersToCheck)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Newer response found (and cached) for:\", options.request.url);\n\t\t\tconst messageData = {\n\t\t\t\ttype: BROADCAST_UPDATE_MESSAGE_TYPE,\n\t\t\t\tmeta: BROADCAST_UPDATE_MESSAGE_META,\n\t\t\t\tpayload: this._generatePayload(options)\n\t\t\t};\n\t\t\tif (options.request.mode === \"navigate\") {\n\t\t\t\tlet resultingClientId;\n\t\t\t\tif (options.event instanceof FetchEvent) resultingClientId = options.event.resultingClientId;\n\t\t\t\tif (!await resultingClientExists(resultingClientId) || isSafari) await timeout(3500);\n\t\t\t}\n\t\t\tif (this._notifyAllClients) {\n\t\t\t\tconst windows = await self.clients.matchAll({ type: \"window\" });\n\t\t\t\tfor (const win of windows) win.postMessage(messageData);\n\t\t\t} else if (options.event instanceof FetchEvent) (await self.clients.get(options.event.clientId))?.postMessage(messageData);\n\t\t}\n\t}\n};\n//#endregion\n//#region src/lib/broadcastUpdate/BroadcastUpdatePlugin.ts\n/**\n* A class implementing the `cacheDidUpdate` lifecycle callback. It will automatically\n* broadcast a message whenever a cached response is updated.\n*/\nvar BroadcastUpdatePlugin = class {\n\t_broadcastUpdate;\n\t/**\n\t* Construct a {@linkcode BroadcastCacheUpdate} instance with\n\t* the passed options and calls its {@linkcode BroadcastCacheUpdate.notifyIfUpdated}\n\t* method whenever the plugin's {@linkcode BroadcastUpdatePlugin.cacheDidUpdate} callback\n\t* is invoked.\n\t*\n\t* @param options\n\t*/\n\tconstructor(options) {\n\t\tthis._broadcastUpdate = new BroadcastCacheUpdate(options);\n\t}\n\t/**\n\t* @private\n\t* @param options The input object to this function.\n\t*/\n\tcacheDidUpdate(options) {\n\t\tthis._broadcastUpdate.notifyIfUpdated(options);\n\t}\n};\n//#endregion\n//#region src/lib/cacheableResponse/CacheableResponse.ts\n/**\n* Allows you to set up rules determining what status codes and/or headers need\n* to be present in order for a [response](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n* to be considered cacheable.\n*/\nvar CacheableResponse = class {\n\t_statuses;\n\t_headers;\n\t/**\n\t* To construct a new `CacheableResponse` instance you must provide at least\n\t* one of the `config` properties.\n\t*\n\t* If both `statuses` and `headers` are specified, then both conditions must\n\t* be met for the response to be considered cacheable.\n\t*\n\t* @param config\n\t*/\n\tconstructor(config = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!(config.statuses || config.headers)) throw new SerwistError(\"statuses-or-headers-required\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheableResponse\",\n\t\t\t\tfuncName: \"constructor\"\n\t\t\t});\n\t\t\tif (config.statuses) finalAssertExports.isArray(config.statuses, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheableResponse\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.statuses\"\n\t\t\t});\n\t\t\tif (config.headers) finalAssertExports.isType(config.headers, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheableResponse\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.headers\"\n\t\t\t});\n\t\t}\n\t\tthis._statuses = config.statuses;\n\t\tif (config.headers) this._headers = new Headers(config.headers);\n\t}\n\t/**\n\t* Checks a response to see whether it's cacheable or not.\n\t*\n\t* @param response The response whose cacheability is being\n\t* checked.\n\t* @returns `true` if the response is cacheable, and `false`\n\t* otherwise.\n\t*/\n\tisResponseCacheable(response) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(response, Response, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"CacheableResponse\",\n\t\t\tfuncName: \"isResponseCacheable\",\n\t\t\tparamName: \"response\"\n\t\t});\n\t\tlet cacheable = true;\n\t\tif (this._statuses) cacheable = this._statuses.includes(response.status);\n\t\tif (this._headers && cacheable) {\n\t\t\tfor (const [headerName, headerValue] of this._headers.entries()) if (response.headers.get(headerName) !== headerValue) {\n\t\t\t\tcacheable = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!cacheable) {\n\t\t\t\tlogger.groupCollapsed(`The request for '${getFriendlyURL(response.url)}' returned a response that does not meet the criteria for being cached.`);\n\t\t\t\tlogger.groupCollapsed(\"View cacheability criteria here.\");\n\t\t\t\tlogger.log(`Cacheable statuses: ${JSON.stringify(this._statuses)}`);\n\t\t\t\tlogger.log(`Cacheable headers: ${JSON.stringify(this._headers, null, 2)}`);\n\t\t\t\tlogger.groupEnd();\n\t\t\t\tconst logFriendlyHeaders = {};\n\t\t\t\tresponse.headers.forEach((value, key) => {\n\t\t\t\t\tlogFriendlyHeaders[key] = value;\n\t\t\t\t});\n\t\t\t\tlogger.groupCollapsed(\"View response status and headers here.\");\n\t\t\t\tlogger.log(`Response status: ${response.status}`);\n\t\t\t\tlogger.log(`Response headers: ${JSON.stringify(logFriendlyHeaders, null, 2)}`);\n\t\t\t\tlogger.groupEnd();\n\t\t\t\tlogger.groupCollapsed(\"View full response details here.\");\n\t\t\t\tlogger.log(response.headers);\n\t\t\t\tlogger.log(response);\n\t\t\t\tlogger.groupEnd();\n\t\t\t\tlogger.groupEnd();\n\t\t\t}\n\t\t}\n\t\treturn cacheable;\n\t}\n};\n//#endregion\n//#region src/lib/cacheableResponse/CacheableResponsePlugin.ts\n/**\n* A class implementing the `cacheWillUpdate` lifecycle callback. This makes it\n* easier to add in cacheability checks to requests made via Serwist's built-in\n* strategies.\n*/\nvar CacheableResponsePlugin = class {\n\t_cacheableResponse;\n\t/**\n\t* To construct a new `CacheableResponsePlugin` instance you must provide at\n\t* least one of the `config` properties.\n\t*\n\t* If both `statuses` and `headers` are specified, then both conditions must\n\t* be met for the response to be considered cacheable.\n\t*\n\t* @param config\n\t*/\n\tconstructor(config) {\n\t\tthis._cacheableResponse = new CacheableResponse(config);\n\t}\n\t/**\n\t* @param options\n\t* @returns\n\t* @private\n\t*/\n\tcacheWillUpdate = async ({ response }) => {\n\t\tif (this._cacheableResponse.isResponseCacheable(response)) return response;\n\t\treturn null;\n\t};\n};\n//#endregion\n//#region src/lib/expiration/models/CacheTimestampsModel.ts\nconst DB_NAME = \"serwist-expiration\";\nconst CACHE_OBJECT_STORE = \"cache-entries\";\nconst normalizeURL = (unNormalizedUrl) => {\n\tconst url = new URL(unNormalizedUrl, location.href);\n\turl.hash = \"\";\n\treturn url.href;\n};\n/**\n* Returns the timestamp model.\n*\n* @private\n*/\nvar CacheTimestampsModel = class {\n\t_cacheName;\n\t_db = null;\n\t/**\n\t*\n\t* @param cacheName\n\t*\n\t* @private\n\t*/\n\tconstructor(cacheName) {\n\t\tthis._cacheName = cacheName;\n\t}\n\t/**\n\t* Takes a URL and returns an ID that will be unique in the object store.\n\t*\n\t* @param url\n\t* @returns\n\t* @private\n\t*/\n\t_getId(url) {\n\t\treturn `${this._cacheName}|${normalizeURL(url)}`;\n\t}\n\t/**\n\t* Performs an upgrade of indexedDB.\n\t*\n\t* @param db\n\t*\n\t* @private\n\t*/\n\t_upgradeDb(db) {\n\t\tconst objStore = db.createObjectStore(CACHE_OBJECT_STORE, { keyPath: \"id\" });\n\t\tobjStore.createIndex(\"cacheName\", \"cacheName\", { unique: false });\n\t\tobjStore.createIndex(\"timestamp\", \"timestamp\", { unique: false });\n\t}\n\t/**\n\t* Performs an upgrade of indexedDB and deletes deprecated DBs.\n\t*\n\t* @param db\n\t*\n\t* @private\n\t*/\n\t_upgradeDbAndDeleteOldDbs(db) {\n\t\tthis._upgradeDb(db);\n\t\tif (this._cacheName) deleteDB(this._cacheName);\n\t}\n\t/**\n\t* @param url\n\t* @param timestamp\n\t*\n\t* @private\n\t*/\n\tasync setTimestamp(url, timestamp) {\n\t\turl = normalizeURL(url);\n\t\tconst entry = {\n\t\t\tid: this._getId(url),\n\t\t\tcacheName: this._cacheName,\n\t\t\turl,\n\t\t\ttimestamp\n\t\t};\n\t\tconst tx = (await this.getDb()).transaction(CACHE_OBJECT_STORE, \"readwrite\", { durability: \"relaxed\" });\n\t\tawait tx.store.put(entry);\n\t\tawait tx.done;\n\t}\n\t/**\n\t* Returns the timestamp stored for a given URL.\n\t*\n\t* @param url\n\t* @returns\n\t* @private\n\t*/\n\tasync getTimestamp(url) {\n\t\treturn (await (await this.getDb()).get(CACHE_OBJECT_STORE, this._getId(url)))?.timestamp;\n\t}\n\t/**\n\t* Iterates through all the entries in the object store (from newest to\n\t* oldest) and removes entries once either `maxCount` is reached or the\n\t* entry's timestamp is less than `minTimestamp`.\n\t*\n\t* @param minTimestamp\n\t* @param maxCount\n\t* @returns\n\t* @private\n\t*/\n\tasync expireEntries(minTimestamp, maxCount) {\n\t\tlet cursor = await (await this.getDb()).transaction(CACHE_OBJECT_STORE, \"readwrite\").store.index(\"timestamp\").openCursor(null, \"prev\");\n\t\tconst urlsDeleted = [];\n\t\tlet entriesNotDeletedCount = 0;\n\t\twhile (cursor) {\n\t\t\tconst result = cursor.value;\n\t\t\tif (result.cacheName === this._cacheName) if (minTimestamp && result.timestamp < minTimestamp || maxCount && entriesNotDeletedCount >= maxCount) {\n\t\t\t\tcursor.delete();\n\t\t\t\turlsDeleted.push(result.url);\n\t\t\t} else entriesNotDeletedCount++;\n\t\t\tcursor = await cursor.continue();\n\t\t}\n\t\treturn urlsDeleted;\n\t}\n\t/**\n\t* Returns an open connection to the database.\n\t*\n\t* @private\n\t*/\n\tasync getDb() {\n\t\tif (!this._db) this._db = await openDB(DB_NAME, 1, { upgrade: this._upgradeDbAndDeleteOldDbs.bind(this) });\n\t\treturn this._db;\n\t}\n};\n//#endregion\n//#region src/lib/expiration/CacheExpiration.ts\n/**\n* Allows you to expires cached responses based on age or maximum number of entries.\n* @see https://serwist.pages.dev/docs/serwist/core/cache-expiration\n*/\nvar CacheExpiration = class {\n\t_isRunning = false;\n\t_rerunRequested = false;\n\t_maxEntries;\n\t_maxAgeSeconds;\n\t_matchOptions;\n\t_cacheName;\n\t_timestampModel;\n\t/**\n\t* To construct a new `CacheExpiration` instance you must provide at least\n\t* one of the `config` properties.\n\t*\n\t* @param cacheName Name of the cache to apply restrictions to.\n\t* @param config\n\t*/\n\tconstructor(cacheName, config = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(cacheName, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheExpiration\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"cacheName\"\n\t\t\t});\n\t\t\tif (!(config.maxEntries || config.maxAgeSeconds)) throw new SerwistError(\"max-entries-or-age-required\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheExpiration\",\n\t\t\t\tfuncName: \"constructor\"\n\t\t\t});\n\t\t\tif (config.maxEntries) finalAssertExports.isType(config.maxEntries, \"number\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheExpiration\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.maxEntries\"\n\t\t\t});\n\t\t\tif (config.maxAgeSeconds) finalAssertExports.isType(config.maxAgeSeconds, \"number\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"CacheExpiration\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.maxAgeSeconds\"\n\t\t\t});\n\t\t}\n\t\tthis._maxEntries = config.maxEntries;\n\t\tthis._maxAgeSeconds = config.maxAgeSeconds;\n\t\tthis._matchOptions = config.matchOptions;\n\t\tthis._cacheName = cacheName;\n\t\tthis._timestampModel = new CacheTimestampsModel(cacheName);\n\t}\n\t/**\n\t* Expires entries for the given cache and given criteria.\n\t*/\n\tasync expireEntries() {\n\t\tif (this._isRunning) {\n\t\t\tthis._rerunRequested = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._isRunning = true;\n\t\tconst minTimestamp = this._maxAgeSeconds ? Date.now() - this._maxAgeSeconds * 1e3 : 0;\n\t\tconst urlsExpired = await this._timestampModel.expireEntries(minTimestamp, this._maxEntries);\n\t\tconst cache = await self.caches.open(this._cacheName);\n\t\tfor (const url of urlsExpired) await cache.delete(url, this._matchOptions);\n\t\tif (process.env.NODE_ENV !== \"production\") if (urlsExpired.length > 0) {\n\t\t\tlogger.groupCollapsed(`Expired ${urlsExpired.length} ${urlsExpired.length === 1 ? \"entry\" : \"entries\"} and removed ${urlsExpired.length === 1 ? \"it\" : \"them\"} from the '${this._cacheName}' cache.`);\n\t\t\tlogger.log(`Expired the following ${urlsExpired.length === 1 ? \"URL\" : \"URLs\"}:`);\n\t\t\tfor (const url of urlsExpired) logger.log(` ${url}`);\n\t\t\tlogger.groupEnd();\n\t\t} else logger.debug(\"Cache expiration ran and found no entries to remove.\");\n\t\tthis._isRunning = false;\n\t\tif (this._rerunRequested) {\n\t\t\tthis._rerunRequested = false;\n\t\t\tthis.expireEntries();\n\t\t}\n\t}\n\t/**\n\t* Updates the timestamp for the given URL, allowing it to be correctly\n\t* tracked by the class.\n\t*\n\t* @param url\n\t*/\n\tasync updateTimestamp(url) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isType(url, \"string\", {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"CacheExpiration\",\n\t\t\tfuncName: \"updateTimestamp\",\n\t\t\tparamName: \"url\"\n\t\t});\n\t\tawait this._timestampModel.setTimestamp(url, Date.now());\n\t}\n\t/**\n\t* Checks if a URL has expired or not before it's used.\n\t*\n\t* This looks the timestamp up in IndexedDB and can be slow.\n\t*\n\t* Note: This method does not remove an expired entry, call\n\t* `expireEntries()` to remove such entries instead.\n\t*\n\t* @param url\n\t* @returns\n\t*/\n\tasync isURLExpired(url) {\n\t\tif (!this._maxAgeSeconds) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") throw new SerwistError(\"expired-test-without-max-age\", {\n\t\t\t\tmethodName: \"isURLExpired\",\n\t\t\t\tparamName: \"maxAgeSeconds\"\n\t\t\t});\n\t\t\treturn false;\n\t\t}\n\t\tconst timestamp = await this._timestampModel.getTimestamp(url);\n\t\tconst expireOlderThan = Date.now() - this._maxAgeSeconds * 1e3;\n\t\treturn timestamp !== void 0 ? timestamp < expireOlderThan : true;\n\t}\n\t/**\n\t* Removes the IndexedDB used to keep track of cache expiration metadata.\n\t*/\n\tasync delete() {\n\t\tthis._rerunRequested = false;\n\t\tawait this._timestampModel.expireEntries(Number.POSITIVE_INFINITY);\n\t}\n};\n//#endregion\n//#region src/registerQuotaErrorCallback.ts\n/**\n* Adds a function to the set of quotaErrorCallbacks that will be executed if\n* there's a quota error.\n*\n* @param callback\n*/\nconst registerQuotaErrorCallback = (callback) => {\n\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isType(callback, \"function\", {\n\t\tmoduleName: \"@serwist/core\",\n\t\tfuncName: \"register\",\n\t\tparamName: \"callback\"\n\t});\n\tquotaErrorCallbacks.add(callback);\n\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Registered a callback to respond to quota errors.\", callback);\n};\n//#endregion\n//#region src/lib/expiration/ExpirationPlugin.ts\n/**\n* This plugin can be used in a {@linkcode Strategy} to regularly enforce a\n* limit on the age and/or the number of cached requests.\n*\n* It can only be used with {@linkcode Strategy} instances that have a custom `cacheName` property set.\n* In other words, it can't be used to expire entries in strategies that use the default runtime\n* cache name.\n*\n* Whenever a cached response is used or updated, this plugin will look\n* at the associated cache and remove any old or extra responses.\n*\n* When using `maxAgeSeconds`, responses may be used *once* after expiring\n* because the expiration clean up will not have occurred until *after* the\n* cached response has been used. If the response has a \"Date\" header, then a lightweight expiration\n* check is performed, and the response will not be used immediately.\n*\n* When using `maxEntries`, the least recently requested entry will be removed\n* from the cache.\n*\n* @see https://serwist.pages.dev/docs/serwist/runtime-caching/plugins/expiration-plugin\n*/\nvar ExpirationPlugin = class {\n\t_config;\n\t_cacheExpirations;\n\t/**\n\t* @param config\n\t*/\n\tconstructor(config = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!(config.maxEntries || config.maxAgeSeconds)) throw new SerwistError(\"max-entries-or-age-required\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"ExpirationPlugin\",\n\t\t\t\tfuncName: \"constructor\"\n\t\t\t});\n\t\t\tif (config.maxEntries) finalAssertExports.isType(config.maxEntries, \"number\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"ExpirationPlugin\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.maxEntries\"\n\t\t\t});\n\t\t\tif (config.maxAgeSeconds) finalAssertExports.isType(config.maxAgeSeconds, \"number\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"ExpirationPlugin\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.maxAgeSeconds\"\n\t\t\t});\n\t\t\tif (config.maxAgeFrom) finalAssertExports.isType(config.maxAgeFrom, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"ExpirationPlugin\",\n\t\t\t\tfuncName: \"constructor\",\n\t\t\t\tparamName: \"config.maxAgeFrom\"\n\t\t\t});\n\t\t}\n\t\tthis._config = config;\n\t\tthis._cacheExpirations = /* @__PURE__ */ new Map();\n\t\tif (!this._config.maxAgeFrom) this._config.maxAgeFrom = \"last-fetched\";\n\t\tif (this._config.purgeOnQuotaError) registerQuotaErrorCallback(() => this.deleteCacheAndMetadata());\n\t}\n\t/**\n\t* A simple helper method to return a CacheExpiration instance for a given\n\t* cache name.\n\t*\n\t* @param cacheName\n\t* @returns\n\t* @private\n\t*/\n\t_getCacheExpiration(cacheName) {\n\t\tif (cacheName === cacheNames$1.getRuntimeName()) throw new SerwistError(\"expire-custom-caches-only\");\n\t\tlet cacheExpiration = this._cacheExpirations.get(cacheName);\n\t\tif (!cacheExpiration) {\n\t\t\tcacheExpiration = new CacheExpiration(cacheName, this._config);\n\t\t\tthis._cacheExpirations.set(cacheName, cacheExpiration);\n\t\t}\n\t\treturn cacheExpiration;\n\t}\n\t/**\n\t* A lifecycle callback that will be triggered automatically when a\n\t* response is about to be returned from a [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).\n\t* It allows the response to be inspected for freshness and\n\t* prevents it from being used if the response's `Date` header value is\n\t* older than the configured `maxAgeSeconds`.\n\t*\n\t* @param options\n\t* @returns `cachedResponse` if it is fresh and `null` if it is stale or\n\t* not available.\n\t* @private\n\t*/\n\tcachedResponseWillBeUsed({ event, cacheName, request, cachedResponse }) {\n\t\tif (!cachedResponse) return null;\n\t\tconst isFresh = this._isResponseDateFresh(cachedResponse);\n\t\tconst cacheExpiration = this._getCacheExpiration(cacheName);\n\t\tconst isMaxAgeFromLastUsed = this._config.maxAgeFrom === \"last-used\";\n\t\tconst done = (async () => {\n\t\t\tif (isMaxAgeFromLastUsed) await cacheExpiration.updateTimestamp(request.url);\n\t\t\tawait cacheExpiration.expireEntries();\n\t\t})();\n\t\ttry {\n\t\t\tevent.waitUntil(done);\n\t\t} catch {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (event instanceof FetchEvent) logger.warn(`Unable to ensure service worker stays alive when updating cache entry for '${getFriendlyURL(event.request.url)}'.`);\n\t\t\t}\n\t\t}\n\t\treturn isFresh ? cachedResponse : null;\n\t}\n\t/**\n\t* @param cachedResponse\n\t* @returns\n\t* @private\n\t*/\n\t_isResponseDateFresh(cachedResponse) {\n\t\tif (this._config.maxAgeFrom === \"last-used\") return true;\n\t\tconst now = Date.now();\n\t\tif (!this._config.maxAgeSeconds) return true;\n\t\tconst dateHeaderTimestamp = this._getDateHeaderTimestamp(cachedResponse);\n\t\tif (dateHeaderTimestamp === null) return true;\n\t\treturn dateHeaderTimestamp >= now - this._config.maxAgeSeconds * 1e3;\n\t}\n\t/**\n\t* Extracts the `Date` header and parse it into an useful value.\n\t*\n\t* @param cachedResponse\n\t* @returns\n\t* @private\n\t*/\n\t_getDateHeaderTimestamp(cachedResponse) {\n\t\tif (!cachedResponse.headers.has(\"date\")) return null;\n\t\tconst dateHeader = cachedResponse.headers.get(\"date\");\n\t\tconst headerTime = new Date(dateHeader).getTime();\n\t\tif (Number.isNaN(headerTime)) return null;\n\t\treturn headerTime;\n\t}\n\t/**\n\t* A lifecycle callback that will be triggered automatically when an entry is added\n\t* to a cache.\n\t*\n\t* @param options\n\t* @private\n\t*/\n\tasync cacheDidUpdate({ cacheName, request }) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(cacheName, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Plugin\",\n\t\t\t\tfuncName: \"cacheDidUpdate\",\n\t\t\t\tparamName: \"cacheName\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(request, Request, {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Plugin\",\n\t\t\t\tfuncName: \"cacheDidUpdate\",\n\t\t\t\tparamName: \"request\"\n\t\t\t});\n\t\t}\n\t\tconst cacheExpiration = this._getCacheExpiration(cacheName);\n\t\tawait cacheExpiration.updateTimestamp(request.url);\n\t\tawait cacheExpiration.expireEntries();\n\t}\n\t/**\n\t* Deletes the underlying `Cache` instance associated with this instance and the metadata\n\t* from IndexedDB used to keep track of expiration details for each `Cache` instance.\n\t*\n\t* When using cache expiration, calling this method is preferable to calling\n\t* `caches.delete()` directly, since this will ensure that the IndexedDB\n\t* metadata is also cleanly removed and that open IndexedDB instances are deleted.\n\t*\n\t* Note that if you're *not* using cache expiration for a given cache, calling\n\t* `caches.delete()` and passing in the cache's name should be sufficient.\n\t* There is no Serwist-specific method needed for cleanup in that case.\n\t*/\n\tasync deleteCacheAndMetadata() {\n\t\tfor (const [cacheName, cacheExpiration] of this._cacheExpirations) {\n\t\t\tawait self.caches.delete(cacheName);\n\t\t\tawait cacheExpiration.delete();\n\t\t}\n\t\tthis._cacheExpirations = /* @__PURE__ */ new Map();\n\t}\n};\n//#endregion\n//#region src/lib/googleAnalytics/constants.ts\nconst QUEUE_NAME = \"serwist-google-analytics\";\nconst MAX_RETENTION_TIME = 2880;\nconst COLLECT_PATHS_REGEX = /^\\/(\\w+\\/)?collect/;\n//#endregion\n//#region src/lib/googleAnalytics/initializeGoogleAnalytics.ts\n/**\n* Creates the requestWillDequeue callback to be used with the background\n* sync plugin. The callback takes the failed request and adds the\n* `qt` param based on the current time, as well as applies any other\n* user-defined hit modifications.\n*\n* @param config\n* @returns The requestWillDequeue callback function.\n* @private\n*/\nconst createOnSyncCallback = (config) => {\n\treturn async ({ queue }) => {\n\t\tlet entry;\n\t\twhile (entry = await queue.shiftRequest()) {\n\t\t\tconst { request, timestamp } = entry;\n\t\t\tconst url = new URL(request.url);\n\t\t\ttry {\n\t\t\t\tconst params = request.method === \"POST\" ? new URLSearchParams(await request.clone().text()) : url.searchParams;\n\t\t\t\tconst originalHitTime = timestamp - (Number(params.get(\"qt\")) || 0);\n\t\t\t\tconst queueTime = Date.now() - originalHitTime;\n\t\t\t\tparams.set(\"qt\", String(queueTime));\n\t\t\t\tif (config.parameterOverrides) for (const param of Object.keys(config.parameterOverrides)) {\n\t\t\t\t\tconst value = config.parameterOverrides[param];\n\t\t\t\t\tparams.set(param, value);\n\t\t\t\t}\n\t\t\t\tif (typeof config.hitFilter === \"function\") config.hitFilter.call(null, params);\n\t\t\t\tawait fetch(new Request(url.origin + url.pathname, {\n\t\t\t\t\tbody: params.toString(),\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tmode: \"cors\",\n\t\t\t\t\tcredentials: \"omit\",\n\t\t\t\t\theaders: { \"Content-Type\": \"text/plain\" }\n\t\t\t\t}));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Request for '${getFriendlyURL(url.href)}' has been replayed`);\n\t\t\t} catch (err) {\n\t\t\t\tawait queue.unshiftRequest(entry);\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(`Request for '${getFriendlyURL(url.href)}' failed to replay, putting it back in the queue.`);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"All Google Analytics request successfully replayed; the queue is now empty!\");\n\t};\n};\n/**\n* Creates GET and POST routes to catch failed Measurement Protocol hits.\n*\n* @param bgSyncPlugin\n* @returns The created routes.\n* @private\n*/\nconst createCollectRoutes = (bgSyncPlugin) => {\n\tconst match = ({ url }) => url.hostname === \"www.google-analytics.com\" && COLLECT_PATHS_REGEX.test(url.pathname);\n\tconst handler = new NetworkOnly({ plugins: [bgSyncPlugin] });\n\treturn [new Route(match, handler, \"GET\"), new Route(match, handler, \"POST\")];\n};\n/**\n* Creates a route with a network first strategy for the analytics.js script.\n*\n* @param cacheName\n* @returns The created route.\n* @private\n*/\nconst createAnalyticsJsRoute = (cacheName) => {\n\tconst match = ({ url }) => url.hostname === \"www.google-analytics.com\" && url.pathname === \"/analytics.js\";\n\treturn new Route(match, new NetworkFirst({ cacheName }), \"GET\");\n};\n/**\n* Creates a route with a network first strategy for the gtag.js script.\n*\n* @param cacheName\n* @returns The created route.\n* @private\n*/\nconst createGtagJsRoute = (cacheName) => {\n\tconst match = ({ url }) => url.hostname === \"www.googletagmanager.com\" && url.pathname === \"/gtag/js\";\n\treturn new Route(match, new NetworkFirst({ cacheName }), \"GET\");\n};\n/**\n* Creates a route with a network first strategy for the gtm.js script.\n*\n* @param cacheName\n* @returns The created route.\n* @private\n*/\nconst createGtmJsRoute = (cacheName) => {\n\tconst match = ({ url }) => url.hostname === \"www.googletagmanager.com\" && url.pathname === \"/gtm.js\";\n\treturn new Route(match, new NetworkFirst({ cacheName }), \"GET\");\n};\n/**\n* Initialize Serwist's offline Google Analytics v3 support.\n*\n* @param options\n*/\nconst initializeGoogleAnalytics = ({ serwist, cacheName, ...options }) => {\n\tconst resolvedCacheName = cacheNames$1.getGoogleAnalyticsName(cacheName);\n\tconst bgSyncPlugin = new BackgroundSyncPlugin(QUEUE_NAME, {\n\t\tmaxRetentionTime: MAX_RETENTION_TIME,\n\t\tonSync: createOnSyncCallback(options)\n\t});\n\tconst routes = [\n\t\tcreateGtmJsRoute(resolvedCacheName),\n\t\tcreateAnalyticsJsRoute(resolvedCacheName),\n\t\tcreateGtagJsRoute(resolvedCacheName),\n\t\t...createCollectRoutes(bgSyncPlugin)\n\t];\n\tfor (const route of routes) serwist.registerRoute(route);\n};\n//#endregion\n//#region src/lib/precaching/PrecacheFallbackPlugin.ts\n/**\n* Allows you to specify offline fallbacks to be used when a given strategy\n* is unable to generate a response.\n*\n* It does this by intercepting the `handlerDidError` plugin callback\n* and returning a precached response, taking the expected revision parameter\n* into account automatically.\n*/\nvar PrecacheFallbackPlugin = class {\n\t_fallbackUrls;\n\t_serwist;\n\t/**\n\t* Constructs a new instance with the associated `fallbackUrls`.\n\t*\n\t* @param config\n\t*/\n\tconstructor({ fallbackUrls, serwist }) {\n\t\tthis._fallbackUrls = fallbackUrls;\n\t\tthis._serwist = serwist;\n\t}\n\t/**\n\t* @returns The precache response for one of the fallback URLs, or `undefined` if\n\t* nothing satisfies the conditions.\n\t* @private\n\t*/\n\tasync handlerDidError(param) {\n\t\tfor (const fallback of this._fallbackUrls) if (typeof fallback === \"string\") {\n\t\t\tconst fallbackResponse = await this._serwist.matchPrecache(fallback);\n\t\t\tif (fallbackResponse !== void 0) return fallbackResponse;\n\t\t} else if (fallback.matcher(param)) {\n\t\t\tconst fallbackResponse = await this._serwist.matchPrecache(fallback.url);\n\t\t\tif (fallbackResponse !== void 0) return fallbackResponse;\n\t\t}\n\t}\n};\n//#endregion\n//#region src/lib/rangeRequests/utils/calculateEffectiveBoundaries.ts\n/**\n* @param blob A source blob.\n* @param start The offset to use as the start of the\n* slice.\n* @param end The offset to use as the end of the slice.\n* @returns An object with `start` and `end` properties, reflecting\n* the effective boundaries to use given the size of the blob.\n* @private\n*/\nconst calculateEffectiveBoundaries = (blob, start, end) => {\n\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(blob, Blob, {\n\t\tmoduleName: \"@serwist/range-requests\",\n\t\tfuncName: \"calculateEffectiveBoundaries\",\n\t\tparamName: \"blob\"\n\t});\n\tconst blobSize = blob.size;\n\tif (end && end > blobSize || start && start < 0) throw new SerwistError(\"range-not-satisfiable\", {\n\t\tsize: blobSize,\n\t\tend,\n\t\tstart\n\t});\n\tlet effectiveStart;\n\tlet effectiveEnd;\n\tif (start !== void 0 && end !== void 0) {\n\t\teffectiveStart = start;\n\t\teffectiveEnd = end + 1;\n\t} else if (start !== void 0 && end === void 0) {\n\t\teffectiveStart = start;\n\t\teffectiveEnd = blobSize;\n\t} else if (end !== void 0 && start === void 0) {\n\t\teffectiveStart = blobSize - end;\n\t\teffectiveEnd = blobSize;\n\t}\n\treturn {\n\t\tstart: effectiveStart,\n\t\tend: effectiveEnd\n\t};\n};\n//#endregion\n//#region src/lib/rangeRequests/utils/parseRangeHeader.ts\n/**\n* @param rangeHeader A `Range` header value.\n* @returns An object with `start` and `end` properties, reflecting\n* the parsed value of the `Range` header. If either the `start` or `end` are\n* omitted, then `null` will be returned.\n* @private\n*/\nconst parseRangeHeader = (rangeHeader) => {\n\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isType(rangeHeader, \"string\", {\n\t\tmoduleName: \"@serwist/range-requests\",\n\t\tfuncName: \"parseRangeHeader\",\n\t\tparamName: \"rangeHeader\"\n\t});\n\tconst normalizedRangeHeader = rangeHeader.trim().toLowerCase();\n\tif (!normalizedRangeHeader.startsWith(\"bytes=\")) throw new SerwistError(\"unit-must-be-bytes\", { normalizedRangeHeader });\n\tif (normalizedRangeHeader.includes(\",\")) throw new SerwistError(\"single-range-only\", { normalizedRangeHeader });\n\tconst rangeParts = /(\\d*)-(\\d*)/.exec(normalizedRangeHeader);\n\tif (!rangeParts || !(rangeParts[1] || rangeParts[2])) throw new SerwistError(\"invalid-range-values\", { normalizedRangeHeader });\n\treturn {\n\t\tstart: rangeParts[1] === \"\" ? void 0 : Number(rangeParts[1]),\n\t\tend: rangeParts[2] === \"\" ? void 0 : Number(rangeParts[2])\n\t};\n};\n//#endregion\n//#region src/lib/rangeRequests/createPartialResponse.ts\n/**\n* Given a request and a response, this will return a\n* promise that resolves to a partial response.\n*\n* If the original response already contains partial content (i.e. it has\n* a status of 206), then this assumes it already fulfills the `Range`\n* requirements, and will return it as-is.\n*\n* @param request A request, which should contain a `Range`\n* header.\n* @param originalResponse A response.\n* @returns Either a `206 Partial Content` response, with\n* the response body set to the slice of content specified by the request's\n* `Range` header, or a `416 Range Not Satisfiable` response if the\n* conditions of the `Range` header can't be met.\n*/\nconst createPartialResponse = async (request, originalResponse) => {\n\ttry {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isInstance(request, Request, {\n\t\t\t\tmoduleName: \"@serwist/range-requests\",\n\t\t\t\tfuncName: \"createPartialResponse\",\n\t\t\t\tparamName: \"request\"\n\t\t\t});\n\t\t\tfinalAssertExports.isInstance(originalResponse, Response, {\n\t\t\t\tmoduleName: \"@serwist/range-requests\",\n\t\t\t\tfuncName: \"createPartialResponse\",\n\t\t\t\tparamName: \"originalResponse\"\n\t\t\t});\n\t\t}\n\t\tif (originalResponse.status === 206) return originalResponse;\n\t\tconst rangeHeader = request.headers.get(\"range\");\n\t\tif (!rangeHeader) throw new SerwistError(\"no-range-header\");\n\t\tconst boundaries = parseRangeHeader(rangeHeader);\n\t\tconst originalBlob = await originalResponse.blob();\n\t\tconst effectiveBoundaries = calculateEffectiveBoundaries(originalBlob, boundaries.start, boundaries.end);\n\t\tconst slicedBlob = originalBlob.slice(effectiveBoundaries.start, effectiveBoundaries.end);\n\t\tconst slicedBlobSize = slicedBlob.size;\n\t\tconst slicedResponse = new Response(slicedBlob, {\n\t\t\tstatus: 206,\n\t\t\tstatusText: \"Partial Content\",\n\t\t\theaders: originalResponse.headers\n\t\t});\n\t\tslicedResponse.headers.set(\"Content-Length\", String(slicedBlobSize));\n\t\tslicedResponse.headers.set(\"Content-Range\", `bytes ${effectiveBoundaries.start}-${effectiveBoundaries.end - 1}/${originalBlob.size}`);\n\t\treturn slicedResponse;\n\t} catch (error) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.warn(\"Unable to construct a partial response; returning a 416 Range Not Satisfiable response instead.\");\n\t\t\tlogger.groupCollapsed(\"View details here.\");\n\t\t\tlogger.log(error);\n\t\t\tlogger.log(request);\n\t\t\tlogger.log(originalResponse);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\treturn new Response(\"\", {\n\t\t\tstatus: 416,\n\t\t\tstatusText: \"Range Not Satisfiable\"\n\t\t});\n\t}\n};\n//#endregion\n//#region src/lib/rangeRequests/RangeRequestsPlugin.ts\n/**\n* Makes it easy for a request with a `Range` header to be fulfilled by a cached response.\n*\n* It does this by intercepting the `cachedResponseWillBeUsed` plugin callback\n* and returning the appropriate subset of the cached response body.\n*/\nvar RangeRequestsPlugin = class {\n\t/**\n\t* @param options\n\t* @returns If request contains a `Range` header, then a\n\t* partial response whose body is a subset of `cachedResponse` is\n\t* returned. Otherwise, `cachedResponse` is returned as-is.\n\t* @private\n\t*/\n\tcachedResponseWillBeUsed = async ({ request, cachedResponse }) => {\n\t\tif (cachedResponse && request.headers.has(\"range\")) return await createPartialResponse(request, cachedResponse);\n\t\treturn cachedResponse;\n\t};\n};\n//#endregion\n//#region src/lib/strategies/CacheFirst.ts\n/**\n* An implementation of the [cache first](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache_first_falling_back_to_network)\n* request strategy.\n*\n* A cache first strategy is useful for assets that have been revisioned,\n* such as URLs like \"/styles/example.a8f5f1.css\", since they\n* can be cached for long periods of time.\n*\n* If the network request fails, and there is no cache match, this will throw\n* a {@linkcode SerwistError} exception.\n*/\nvar CacheFirst = class extends Strategy {\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tconst logs = [];\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: this.constructor.name,\n\t\t\tfuncName: \"makeRequest\",\n\t\t\tparamName: \"request\"\n\t\t});\n\t\tlet response = await handler.cacheMatch(request);\n\t\tlet error;\n\t\tif (!response) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logs.push(`No response found in the '${this.cacheName}' cache. Will respond with a network request.`);\n\t\t\ttry {\n\t\t\t\tresponse = await handler.fetchAndCachePut(request);\n\t\t\t} catch (err) {\n\t\t\t\tif (err instanceof Error) error = err;\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\") if (response) logs.push(\"Got response from network.\");\n\t\t\telse logs.push(\"Unable to get a response from the network.\");\n\t\t} else if (process.env.NODE_ENV !== \"production\") logs.push(`Found a cached response in the '${this.cacheName}' cache.`);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n\t\t\tfor (const log of logs) logger.log(log);\n\t\t\tmessages.printFinalResponse(response);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tif (!response) throw new SerwistError(\"no-response\", {\n\t\t\turl: request.url,\n\t\t\terror\n\t\t});\n\t\treturn response;\n\t}\n};\n//#endregion\n//#region src/lib/strategies/CacheOnly.ts\n/**\n* An implementation of the [cache only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache_only)\n* request strategy.\n*\n* This class is useful if you already have your own precaching step.\n*\n* If there is no cache match, this will throw a {@linkcode SerwistError} exception.\n*/\nvar CacheOnly = class extends Strategy {\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: this.constructor.name,\n\t\t\tfuncName: \"makeRequest\",\n\t\t\tparamName: \"request\"\n\t\t});\n\t\tconst response = await handler.cacheMatch(request);\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n\t\t\tif (response) {\n\t\t\t\tlogger.log(`Found a cached response in the '${this.cacheName}' cache.`);\n\t\t\t\tmessages.printFinalResponse(response);\n\t\t\t} else logger.log(`No response found in the '${this.cacheName}' cache.`);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tif (!response) throw new SerwistError(\"no-response\", { url: request.url });\n\t\treturn response;\n\t}\n};\n//#endregion\n//#region src/lib/strategies/StaleWhileRevalidate.ts\n/**\n* An implementation of the\n* [stale-while-revalidate](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#stale_while_revalidate)\n* request strategy.\n*\n* Resources are requested from both the cache and the network in parallel.\n* The strategy will respond with the cached version if available, otherwise\n* wait for the network response. The cache is updated with the network response\n* with each successful request.\n*\n* By default, this strategy will cache responses with a 200 status code as\n* well as [opaque responses](https://developer.chrome.com/docs/workbox/caching-resources-during-runtime/#opaque-responses).\n* Opaque responses are cross-origin requests where the response doesn't\n* support [CORS](https://enable-cors.org/).\n*\n* If the network request fails, and there is no cache match, this will throw\n* a {@linkcode SerwistError} exception.\n*/\nvar StaleWhileRevalidate = class extends Strategy {\n\t/**\n\t* @param options\n\t*/\n\tconstructor(options = {}) {\n\t\tsuper(options);\n\t\tif (!this.plugins.some((p) => \"cacheWillUpdate\" in p)) this.plugins.unshift(cacheOkAndOpaquePlugin);\n\t}\n\t/**\n\t* @private\n\t* @param request A request to run this strategy for.\n\t* @param handler The event that triggered the request.\n\t* @returns\n\t*/\n\tasync _handle(request, handler) {\n\t\tconst logs = [];\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: this.constructor.name,\n\t\t\tfuncName: \"handle\",\n\t\t\tparamName: \"request\"\n\t\t});\n\t\tconst fetchAndCachePromise = handler.fetchAndCachePut(request).catch(() => {});\n\t\thandler.waitUntil(fetchAndCachePromise);\n\t\tlet response = await handler.cacheMatch(request);\n\t\tlet error;\n\t\tif (response) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logs.push(`Found a cached response in the '${this.cacheName}' cache. Will update with the network response in the background.`);\n\t\t} else {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logs.push(`No response found in the '${this.cacheName}' cache. Will wait for the network response.`);\n\t\t\ttry {\n\t\t\t\tresponse = await fetchAndCachePromise;\n\t\t\t} catch (err) {\n\t\t\t\tif (err instanceof Error) error = err;\n\t\t\t}\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(messages.strategyStart(this.constructor.name, request));\n\t\t\tfor (const log of logs) logger.log(log);\n\t\t\tmessages.printFinalResponse(response);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tif (!response) throw new SerwistError(\"no-response\", {\n\t\t\turl: request.url,\n\t\t\terror\n\t\t});\n\t\treturn response;\n\t}\n};\n//#endregion\n//#region src/PrecacheRoute.ts\n/**\n* A subclass of {@linkcode Route} that takes a {@linkcode Serwist} instance and uses it to match\n* incoming requests and handle fetching responses from the precache.\n*/\nvar PrecacheRoute = class extends Route {\n\t/**\n\t* @param serwist A {@linkcode Serwist} instance.\n\t* @param options Options to control how requests are matched\n\t* against the list of precached URLs.\n\t*/\n\tconstructor(serwist, options) {\n\t\tconst match = ({ request }) => {\n\t\t\tconst urlsToCacheKeys = serwist.getUrlsToPrecacheKeys();\n\t\t\tfor (const possibleURL of generateURLVariations(request.url, options)) {\n\t\t\t\tconst cacheKey = urlsToCacheKeys.get(possibleURL);\n\t\t\t\tif (cacheKey) return {\n\t\t\t\t\tcacheKey,\n\t\t\t\t\tintegrity: serwist.getIntegrityForPrecacheKey(cacheKey)\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`Precaching did not find a match for ${getFriendlyURL(request.url)}.`);\n\t\t};\n\t\tsuper(match, serwist.precacheStrategy);\n\t}\n};\n//#endregion\n//#region src/utils/PrecacheCacheKeyPlugin.ts\n/**\n* A plugin, designed to be used with PrecacheController, to translate URLs into\n* the corresponding cache key, based on the current revision info.\n*\n* @private\n*/\nvar PrecacheCacheKeyPlugin = class {\n\t_precacheController;\n\tconstructor({ precacheController }) {\n\t\tthis._precacheController = precacheController;\n\t}\n\tcacheKeyWillBeUsed = async ({ request, params }) => {\n\t\tconst cacheKey = params?.cacheKey || this._precacheController.getPrecacheKeyForUrl(request.url);\n\t\treturn cacheKey ? new Request(cacheKey, { headers: request.headers }) : request;\n\t};\n};\n//#endregion\n//#region src/utils/parsePrecacheOptions.ts\nconst parsePrecacheOptions = (serwist, precacheOptions = {}) => {\n\tconst { cacheName: precacheCacheName, plugins: precachePlugins = [], fetchOptions: precacheFetchOptions, matchOptions: precacheMatchOptions, fallbackToNetwork: precacheFallbackToNetwork, directoryIndex: precacheDirectoryIndex, ignoreURLParametersMatching: precacheIgnoreUrls, cleanURLs: precacheCleanUrls, urlManipulation: precacheUrlManipulation, cleanupOutdatedCaches, concurrency = 10, navigateFallback, navigateFallbackAllowlist, navigateFallbackDenylist } = precacheOptions ?? {};\n\treturn {\n\t\tprecacheStrategyOptions: {\n\t\t\tcacheName: cacheNames$1.getPrecacheName(precacheCacheName),\n\t\t\tplugins: [...precachePlugins, new PrecacheCacheKeyPlugin({ precacheController: serwist })],\n\t\t\tfetchOptions: precacheFetchOptions,\n\t\t\tmatchOptions: precacheMatchOptions,\n\t\t\tfallbackToNetwork: precacheFallbackToNetwork\n\t\t},\n\t\tprecacheRouteOptions: {\n\t\t\tdirectoryIndex: precacheDirectoryIndex,\n\t\t\tignoreURLParametersMatching: precacheIgnoreUrls,\n\t\t\tcleanURLs: precacheCleanUrls,\n\t\t\turlManipulation: precacheUrlManipulation\n\t\t},\n\t\tprecacheMiscOptions: {\n\t\t\tcleanupOutdatedCaches,\n\t\t\tconcurrency,\n\t\t\tnavigateFallback,\n\t\t\tnavigateFallbackAllowlist,\n\t\t\tnavigateFallbackDenylist\n\t\t}\n\t};\n};\n//#endregion\n//#region src/Serwist.ts\n/**\n* A class that helps bootstrap the service worker.\n*\n* @see https://serwist.pages.dev/docs/serwist/core/serwist\n*/\nvar Serwist = class {\n\t_urlsToCacheKeys = /* @__PURE__ */ new Map();\n\t_urlsToCacheModes = /* @__PURE__ */ new Map();\n\t_cacheKeysToIntegrities = /* @__PURE__ */ new Map();\n\t_concurrentPrecaching;\n\t_precacheStrategy;\n\t_routes;\n\t_defaultHandlerMap;\n\t_catchHandler;\n\t_requestRules;\n\tconstructor({ precacheEntries, precacheOptions, skipWaiting = false, importScripts, navigationPreload = false, cacheId, clientsClaim: clientsClaim$1 = false, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: disableDevLogs$1 = false, fallbacks, requestRules } = {}) {\n\t\tconst { precacheStrategyOptions, precacheRouteOptions, precacheMiscOptions } = parsePrecacheOptions(this, precacheOptions);\n\t\tthis._concurrentPrecaching = precacheMiscOptions.concurrency;\n\t\tthis._precacheStrategy = new PrecacheStrategy(precacheStrategyOptions);\n\t\tthis._routes = /* @__PURE__ */ new Map();\n\t\tthis._defaultHandlerMap = /* @__PURE__ */ new Map();\n\t\tthis._requestRules = requestRules;\n\t\tthis.handleInstall = this.handleInstall.bind(this);\n\t\tthis.handleActivate = this.handleActivate.bind(this);\n\t\tthis.handleFetch = this.handleFetch.bind(this);\n\t\tthis.handleCache = this.handleCache.bind(this);\n\t\tif (!!importScripts && importScripts.length > 0) self.importScripts(...importScripts);\n\t\tif (navigationPreload) enableNavigationPreload();\n\t\tif (cacheId !== void 0) setCacheNameDetails({ prefix: cacheId });\n\t\tif (skipWaiting) self.skipWaiting();\n\t\telse self.addEventListener(\"message\", (event) => {\n\t\t\tif (event.data && event.data.type === \"SKIP_WAITING\") self.skipWaiting();\n\t\t});\n\t\tif (clientsClaim$1) clientsClaim();\n\t\tif (!!precacheEntries && precacheEntries.length > 0) this.addToPrecacheList(precacheEntries);\n\t\tif (precacheMiscOptions.cleanupOutdatedCaches) cleanupOutdatedCaches(precacheStrategyOptions.cacheName);\n\t\tthis.registerRoute(new PrecacheRoute(this, precacheRouteOptions));\n\t\tif (precacheMiscOptions.navigateFallback) this.registerRoute(new NavigationRoute(this.createHandlerBoundToUrl(precacheMiscOptions.navigateFallback), {\n\t\t\tallowlist: precacheMiscOptions.navigateFallbackAllowlist,\n\t\t\tdenylist: precacheMiscOptions.navigateFallbackDenylist\n\t\t}));\n\t\tif (offlineAnalyticsConfig !== void 0) if (typeof offlineAnalyticsConfig === \"boolean\") offlineAnalyticsConfig && initializeGoogleAnalytics({ serwist: this });\n\t\telse initializeGoogleAnalytics({\n\t\t\t...offlineAnalyticsConfig,\n\t\t\tserwist: this\n\t\t});\n\t\tif (runtimeCaching !== void 0) {\n\t\t\tif (fallbacks !== void 0) {\n\t\t\t\tconst fallbackPlugin = new PrecacheFallbackPlugin({\n\t\t\t\t\tfallbackUrls: fallbacks.entries,\n\t\t\t\t\tserwist: this\n\t\t\t\t});\n\t\t\t\truntimeCaching.forEach((cacheEntry) => {\n\t\t\t\t\tif (cacheEntry.handler instanceof Strategy && !cacheEntry.handler.plugins.some((plugin) => \"handlerDidError\" in plugin)) cacheEntry.handler.plugins.push(fallbackPlugin);\n\t\t\t\t});\n\t\t\t}\n\t\t\tfor (const entry of runtimeCaching) this.registerCapture(entry.matcher, entry.handler, entry.method);\n\t\t}\n\t\tif (disableDevLogs$1) disableDevLogs();\n\t}\n\t/**\n\t* The strategy used to precache assets and respond to `fetch` events.\n\t*/\n\tget precacheStrategy() {\n\t\treturn this._precacheStrategy;\n\t}\n\t/**\n\t* A `Map` of HTTP method name (`'GET'`, etc.) to an array of all corresponding registered {@linkcode Route}\n\t* instances.\n\t*/\n\tget routes() {\n\t\treturn this._routes;\n\t}\n\t/**\n\t* Adds Serwist's event listeners for you. Before calling it, add your own listeners should you need to.\n\t*/\n\taddEventListeners() {\n\t\tself.addEventListener(\"install\", this.handleInstall);\n\t\tself.addEventListener(\"activate\", this.handleActivate);\n\t\tself.addEventListener(\"fetch\", this.handleFetch);\n\t\tself.addEventListener(\"message\", this.handleCache);\n\t}\n\t/**\n\t* Adds items to the precache list, removing duplicates and ensuring the information is valid.\n\t*\n\t* @param entries Array of entries to precache.\n\t*/\n\taddToPrecacheList(entries) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isArray(entries, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"Serwist\",\n\t\t\tfuncName: \"addToCacheList\",\n\t\t\tparamName: \"entries\"\n\t\t});\n\t\tconst urlsToWarnAbout = [];\n\t\tfor (const entry of entries) {\n\t\t\tif (typeof entry === \"string\") urlsToWarnAbout.push(entry);\n\t\t\telse if (entry && !entry.integrity && entry.revision === void 0) urlsToWarnAbout.push(entry.url);\n\t\t\tconst { cacheKey, url } = createCacheKey(entry);\n\t\t\tconst cacheMode = typeof entry !== \"string\" && entry.revision ? \"reload\" : \"default\";\n\t\t\tif (this._urlsToCacheKeys.has(url) && this._urlsToCacheKeys.get(url) !== cacheKey) throw new SerwistError(\"add-to-cache-list-conflicting-entries\", {\n\t\t\t\tfirstEntry: this._urlsToCacheKeys.get(url),\n\t\t\t\tsecondEntry: cacheKey\n\t\t\t});\n\t\t\tif (typeof entry !== \"string\" && entry.integrity) {\n\t\t\t\tif (this._cacheKeysToIntegrities.has(cacheKey) && this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) throw new SerwistError(\"add-to-cache-list-conflicting-integrities\", { url });\n\t\t\t\tthis._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n\t\t\t}\n\t\t\tthis._urlsToCacheKeys.set(url, cacheKey);\n\t\t\tthis._urlsToCacheModes.set(url, cacheMode);\n\t\t}\n\t\tif (urlsToWarnAbout.length > 0) {\n\t\t\tconst warningMessage = `Serwist is precaching URLs without revision info: ${urlsToWarnAbout.join(\", \")}\\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;\n\t\t\tif (process.env.NODE_ENV === \"production\") console.warn(warningMessage);\n\t\t\telse logger.warn(warningMessage);\n\t\t}\n\t}\n\t/**\n\t* Precaches new and updated assets. Call this method from the service worker's\n\t* `install` event.\n\t*\n\t* Note: this method calls `event.waitUntil()` for you, so you do not need\n\t* to call it yourself in your event handlers.\n\t*\n\t* @param event\n\t* @returns\n\t*/\n\thandleInstall(event) {\n\t\tthis.registerRequestRules(event);\n\t\treturn waitUntil(event, async () => {\n\t\t\tconst installReportPlugin = new PrecacheInstallReportPlugin();\n\t\t\tthis.precacheStrategy.plugins.push(installReportPlugin);\n\t\t\tawait parallel(this._concurrentPrecaching, Array.from(this._urlsToCacheKeys.entries()), async ([url, cacheKey]) => {\n\t\t\t\tconst integrity = this._cacheKeysToIntegrities.get(cacheKey);\n\t\t\t\tconst cacheMode = this._urlsToCacheModes.get(url);\n\t\t\t\tconst request = new Request(url, {\n\t\t\t\t\tintegrity,\n\t\t\t\t\tcache: cacheMode,\n\t\t\t\t\tcredentials: \"same-origin\"\n\t\t\t\t});\n\t\t\t\tawait Promise.all(this.precacheStrategy.handleAll({\n\t\t\t\t\tevent,\n\t\t\t\t\trequest,\n\t\t\t\t\turl: new URL(request.url),\n\t\t\t\t\tparams: { cacheKey }\n\t\t\t\t}));\n\t\t\t});\n\t\t\tconst { updatedURLs, notUpdatedURLs } = installReportPlugin;\n\t\t\tif (process.env.NODE_ENV !== \"production\") printInstallDetails(updatedURLs, notUpdatedURLs);\n\t\t\treturn {\n\t\t\t\tupdatedURLs,\n\t\t\t\tnotUpdatedURLs\n\t\t\t};\n\t\t});\n\t}\n\t/**\n\t* Registers request rules using the experimental `InstallEvent.addRoutes()` API.\n\t* These rules allow bypassing the service worker for specific requests to improve performance.\n\t*\n\t* @param event The event object of an `install` event handler.\n\t* @throws {Error} When the route rules are invalid\n\t*/\n\tasync registerRequestRules(event) {\n\t\tif (!this._requestRules) return;\n\t\tif (!event?.addRoutes) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(\"Request rules ignored as the Static Routing API is not supported in this browser. See https://caniuse.com/mdn-api_installevent_addroutes for more information.\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(\"Request rules may not be supported in all browsers as the Static Routing API is experimental. This feature allows bypassing the service worker for specific requests to improve performance. See https://developer.mozilla.org/en-US/docs/Web/API/InstallEvent/addRoutes for more information.\");\n\t\t\tawait event.addRoutes(this._requestRules);\n\t\t\tthis._requestRules = void 0;\n\t\t} catch (error) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(`Failed to register request rules: ${error instanceof Error ? error.message : String(error)}. This may occur if the browser doesn't support the Static Routing API or if the request rules are invalid.`);\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* Deletes assets that are no longer present in the current precache manifest.\n\t* Call this method from the service worker's `activate` event.\n\t*\n\t* Note: this method calls `event.waitUntil()` for you, so you do not need\n\t* to call it yourself in your event handlers.\n\t*\n\t* @param event\n\t* @returns\n\t*/\n\thandleActivate(event) {\n\t\treturn waitUntil(event, async () => {\n\t\t\tconst cache = await self.caches.open(this.precacheStrategy.cacheName);\n\t\t\tconst currentlyCachedRequests = await cache.keys();\n\t\t\tconst expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n\t\t\tconst deletedCacheRequests = [];\n\t\t\tfor (const request of currentlyCachedRequests) if (!expectedCacheKeys.has(request.url)) {\n\t\t\t\tawait cache.delete(request);\n\t\t\t\tdeletedCacheRequests.push(request.url);\n\t\t\t}\n\t\t\tif (process.env.NODE_ENV !== \"production\") printCleanupDetails(deletedCacheRequests);\n\t\t\treturn { deletedCacheRequests };\n\t\t});\n\t}\n\t/**\n\t* Gets a `Response` from an appropriate `Route`'s handler. Call this method\n\t* from the service worker's `fetch` event.\n\t* @param event\n\t*/\n\thandleFetch(event) {\n\t\tconst { request } = event;\n\t\tconst responsePromise = this.handleRequest({\n\t\t\trequest,\n\t\t\tevent\n\t\t});\n\t\tif (responsePromise) event.respondWith(responsePromise);\n\t}\n\t/**\n\t* Caches new URLs on demand. Call this method from the service worker's\n\t* `message` event. To trigger the handler, send a message of type `\"CACHE_URLS\"`\n\t* alongside a list of URLs that should be cached as `urlsToCache`.\n\t* @param event\n\t*/\n\thandleCache(event) {\n\t\tif (event.data && event.data.type === \"CACHE_URLS\") {\n\t\t\tconst { payload } = event.data;\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(\"Caching URLs from the window\", payload.urlsToCache);\n\t\t\tconst requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n\t\t\t\tlet request;\n\t\t\t\tif (typeof entry === \"string\") request = new Request(entry);\n\t\t\t\telse request = new Request(...entry);\n\t\t\t\treturn this.handleRequest({\n\t\t\t\t\trequest,\n\t\t\t\t\tevent\n\t\t\t\t});\n\t\t\t}));\n\t\t\tevent.waitUntil(requestPromises);\n\t\t\tif (event.ports?.[0]) requestPromises.then(() => event.ports[0].postMessage(true));\n\t\t}\n\t}\n\t/**\n\t* Define a default handler that's called when no routes explicitly\n\t* match the incoming request.\n\t*\n\t* Each HTTP method (`'GET'`, `'POST'`, etc.) gets its own default handler.\n\t*\n\t* Without a default handler, unmatched requests will go against the\n\t* network as if there were no service worker present.\n\t*\n\t* @param handler A callback function that returns a `Promise` resulting in a `Response`.\n\t* @param method The HTTP method to associate with this default handler. Each method\n\t* has its own default. Defaults to `'GET'`.\n\t*/\n\tsetDefaultHandler(handler, method = \"GET\") {\n\t\tthis._defaultHandlerMap.set(method, normalizeHandler(handler));\n\t}\n\t/**\n\t* If a {@linkcode Route} throws an error while handling a request, this handler\n\t* will be called and given a chance to provide a response.\n\t*\n\t* @param handler A callback function that returns a `Promise` resulting\n\t* in a `Response`.\n\t*/\n\tsetCatchHandler(handler) {\n\t\tthis._catchHandler = normalizeHandler(handler);\n\t}\n\t/**\n\t* Registers a `RegExp`, string, or function with a caching\n\t* strategy to the router.\n\t*\n\t* @param capture If the capture param is a {@linkcode Route} object, all other arguments will be ignored.\n\t* @param handler A callback function that returns a `Promise` resulting in a `Response`.\n\t* This parameter is required if `capture` is not a {@linkcode Route} object.\n\t* @param method The HTTP method to match the route against. Defaults to `'GET'`.\n\t* @returns The generated {@linkcode Route} object.\n\t*/\n\tregisterCapture(capture, handler, method) {\n\t\tconst route = parseRoute(capture, handler, method);\n\t\tthis.registerRoute(route);\n\t\treturn route;\n\t}\n\t/**\n\t* Registers a {@linkcode Route} with the router.\n\t*\n\t* @param route The {@linkcode Route} to register.\n\t*/\n\tregisterRoute(route) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tfinalAssertExports.isType(route, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Serwist\",\n\t\t\t\tfuncName: \"registerRoute\",\n\t\t\t\tparamName: \"route\"\n\t\t\t});\n\t\t\tfinalAssertExports.hasMethod(route, \"match\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Serwist\",\n\t\t\t\tfuncName: \"registerRoute\",\n\t\t\t\tparamName: \"route\"\n\t\t\t});\n\t\t\tfinalAssertExports.isType(route.handler, \"object\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Serwist\",\n\t\t\t\tfuncName: \"registerRoute\",\n\t\t\t\tparamName: \"route\"\n\t\t\t});\n\t\t\tfinalAssertExports.hasMethod(route.handler, \"handle\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Serwist\",\n\t\t\t\tfuncName: \"registerRoute\",\n\t\t\t\tparamName: \"route.handler\"\n\t\t\t});\n\t\t\tfinalAssertExports.isType(route.method, \"string\", {\n\t\t\t\tmoduleName: \"serwist\",\n\t\t\t\tclassName: \"Serwist\",\n\t\t\t\tfuncName: \"registerRoute\",\n\t\t\t\tparamName: \"route.method\"\n\t\t\t});\n\t\t}\n\t\tif (!this._routes.has(route.method)) this._routes.set(route.method, []);\n\t\tthis._routes.get(route.method).push(route);\n\t}\n\t/**\n\t* Unregisters a route from the router.\n\t*\n\t* @param route The {@linkcode Route} object to unregister.\n\t*/\n\tunregisterRoute(route) {\n\t\tif (!this._routes.has(route.method)) throw new SerwistError(\"unregister-route-but-not-found-with-method\", { method: route.method });\n\t\tconst routeIndex = this._routes.get(route.method).indexOf(route);\n\t\tif (routeIndex > -1) this._routes.get(route.method).splice(routeIndex, 1);\n\t\telse throw new SerwistError(\"unregister-route-route-not-registered\");\n\t}\n\t/**\n\t* Returns a mapping of a precached URL to the corresponding cache key, taking\n\t* into account the revision information for the URL.\n\t*\n\t* @returns A URL to cache key mapping.\n\t*/\n\tgetUrlsToPrecacheKeys() {\n\t\treturn this._urlsToCacheKeys;\n\t}\n\t/**\n\t* Returns a list of all the URLs that have been precached by the current\n\t* service worker.\n\t*\n\t* @returns The precached URLs.\n\t*/\n\tgetPrecachedUrls() {\n\t\treturn [...this._urlsToCacheKeys.keys()];\n\t}\n\t/**\n\t* Returns the cache key used for storing a given URL. If that URL is\n\t* unversioned, like \"/index.html\", then the cache key will be the original\n\t* URL with a search parameter appended to it.\n\t*\n\t* @param url A URL whose cache key you want to look up.\n\t* @returns The versioned URL that corresponds to a cache key\n\t* for the original URL, or undefined if that URL isn't precached.\n\t*/\n\tgetPrecacheKeyForUrl(url) {\n\t\tconst urlObject = new URL(url, location.href);\n\t\treturn this._urlsToCacheKeys.get(urlObject.href);\n\t}\n\t/**\n\t* @param url A cache key whose SRI you want to look up.\n\t* @returns The subresource integrity associated with the cache key,\n\t* or undefined if it's not set.\n\t*/\n\tgetIntegrityForPrecacheKey(cacheKey) {\n\t\treturn this._cacheKeysToIntegrities.get(cacheKey);\n\t}\n\t/**\n\t* This acts as a drop-in replacement for\n\t* [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n\t* with the following differences:\n\t*\n\t* - It knows what the name of the precache is, and only checks in that cache.\n\t* - It allows you to pass in an \"original\" URL without versioning parameters,\n\t* and it will automatically look up the correct cache key for the currently\n\t* active revision of that URL.\n\t*\n\t* E.g., `matchPrecache('index.html')` will find the correct precached\n\t* response for the currently active service worker, even if the actual cache\n\t* key is `'/index.html?__WB_REVISION__=1234abcd'`.\n\t*\n\t* @param request The key (without revisioning parameters)\n\t* to look up in the precache.\n\t* @returns\n\t*/\n\tasync matchPrecache(request) {\n\t\tconst url = request instanceof Request ? request.url : request;\n\t\tconst cacheKey = this.getPrecacheKeyForUrl(url);\n\t\tif (cacheKey) return (await self.caches.open(this.precacheStrategy.cacheName)).match(cacheKey);\n\t}\n\t/**\n\t* Returns a function that looks up `url` in the precache (taking into\n\t* account revision information), and returns the corresponding `Response`.\n\t*\n\t* @param url The precached URL which will be used to lookup the response.\n\t* @return\n\t*/\n\tcreateHandlerBoundToUrl(url) {\n\t\tconst cacheKey = this.getPrecacheKeyForUrl(url);\n\t\tif (!cacheKey) throw new SerwistError(\"non-precached-url\", { url });\n\t\treturn (options) => {\n\t\t\toptions.request = new Request(url);\n\t\t\toptions.params = {\n\t\t\t\tcacheKey,\n\t\t\t\t...options.params\n\t\t\t};\n\t\t\treturn this.precacheStrategy.handle(options);\n\t\t};\n\t}\n\t/**\n\t* Applies the routing rules to a `FetchEvent` object to get a response from an\n\t* appropriate route.\n\t*\n\t* @param options\n\t* @returns A promise is returned if a registered route can handle the request.\n\t* If there is no matching route and there's no default handler, `undefined`\n\t* is returned.\n\t*/\n\thandleRequest({ request, event }) {\n\t\tif (process.env.NODE_ENV !== \"production\") finalAssertExports.isInstance(request, Request, {\n\t\t\tmoduleName: \"serwist\",\n\t\t\tclassName: \"Serwist\",\n\t\t\tfuncName: \"handleRequest\",\n\t\t\tparamName: \"options.request\"\n\t\t});\n\t\tconst url = new URL(request.url, location.href);\n\t\tif (!url.protocol.startsWith(\"http\")) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(\"Router only supports URLs that start with 'http'.\");\n\t\t\treturn;\n\t\t}\n\t\tconst sameOrigin = url.origin === location.origin;\n\t\tconst { params, route } = this.findMatchingRoute({\n\t\t\tevent,\n\t\t\trequest,\n\t\t\tsameOrigin,\n\t\t\turl\n\t\t});\n\t\tlet handler = route?.handler;\n\t\tconst debugMessages = [];\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (handler) {\n\t\t\t\tdebugMessages.push([\"Found a route to handle this request:\", route]);\n\t\t\t\tif (params) debugMessages.push([`Passing the following params to the route's handler:`, params]);\n\t\t\t}\n\t\t}\n\t\tconst method = request.method;\n\t\tif (!handler && this._defaultHandlerMap.has(method)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") debugMessages.push(`Failed to find a matching route. Falling back to the default handler for ${method}.`);\n\t\t\thandler = this._defaultHandlerMap.get(method);\n\t\t}\n\t\tif (!handler) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n\t\t\treturn;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n\t\t\tfor (const msg of debugMessages) if (Array.isArray(msg)) logger.log(...msg);\n\t\t\telse logger.log(msg);\n\t\t\tlogger.groupEnd();\n\t\t}\n\t\tlet responsePromise;\n\t\ttry {\n\t\t\tresponsePromise = handler.handle({\n\t\t\t\turl,\n\t\t\t\trequest,\n\t\t\t\tevent,\n\t\t\t\tparams\n\t\t\t});\n\t\t} catch (err) {\n\t\t\tresponsePromise = Promise.reject(err);\n\t\t}\n\t\tconst catchHandler = route?.catchHandler;\n\t\tif (responsePromise instanceof Promise && (this._catchHandler || catchHandler)) responsePromise = responsePromise.catch(async (err) => {\n\t\t\tif (catchHandler) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\tlogger.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n\t\t\t\t\tlogger.error(\"Error thrown by:\", route);\n\t\t\t\t\tlogger.error(err);\n\t\t\t\t\tlogger.groupEnd();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\treturn await catchHandler.handle({\n\t\t\t\t\t\turl,\n\t\t\t\t\t\trequest,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\tparams\n\t\t\t\t\t});\n\t\t\t\t} catch (catchErr) {\n\t\t\t\t\tif (catchErr instanceof Error) err = catchErr;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._catchHandler) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\tlogger.groupCollapsed(`Error thrown when responding to: ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n\t\t\t\t\tlogger.error(\"Error thrown by:\", route);\n\t\t\t\t\tlogger.error(err);\n\t\t\t\t\tlogger.groupEnd();\n\t\t\t\t}\n\t\t\t\treturn this._catchHandler.handle({\n\t\t\t\t\turl,\n\t\t\t\t\trequest,\n\t\t\t\t\tevent\n\t\t\t\t});\n\t\t\t}\n\t\t\tthrow err;\n\t\t});\n\t\treturn responsePromise;\n\t}\n\t/**\n\t* Checks a request and URL (and optionally an event) against the list of\n\t* registered routes, and if there's a match, returns the corresponding\n\t* route along with any params generated by the match.\n\t*\n\t* @param options\n\t* @returns An object with `route` and `params` properties. They are populated\n\t* if a matching route was found or `undefined` otherwise.\n\t*/\n\tfindMatchingRoute({ url, sameOrigin, request, event }) {\n\t\tconst routes = this._routes.get(request.method) || [];\n\t\tfor (const route of routes) {\n\t\t\tlet params;\n\t\t\tconst matchResult = route.match({\n\t\t\t\turl,\n\t\t\t\tsameOrigin,\n\t\t\t\trequest,\n\t\t\t\tevent\n\t\t\t});\n\t\t\tif (matchResult) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\t\tif (matchResult instanceof Promise) logger.warn(`While routing ${getFriendlyURL(url)}, an async matchCallback function was used. Please convert the following route to use a synchronous matchCallback function:`, route);\n\t\t\t\t}\n\t\t\t\tparams = matchResult;\n\t\t\t\tif (Array.isArray(params) && params.length === 0) params = void 0;\n\t\t\t\telse if (matchResult.constructor === Object && Object.keys(matchResult).length === 0) params = void 0;\n\t\t\t\telse if (typeof matchResult === \"boolean\") params = void 0;\n\t\t\t\treturn {\n\t\t\t\t\troute,\n\t\t\t\t\tparams\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {};\n\t}\n};\n//#endregion\nexport { BROADCAST_UPDATE_DEFAULT_HEADERS, BackgroundSyncPlugin, BackgroundSyncQueue, BackgroundSyncQueueStore, BroadcastCacheUpdate, BroadcastUpdatePlugin, CacheExpiration, CacheFirst, CacheOnly, CacheableResponse, CacheableResponsePlugin, ExpirationPlugin, NavigationRoute, NetworkFirst, NetworkOnly, PrecacheFallbackPlugin, PrecacheRoute, PrecacheStrategy, RangeRequestsPlugin, RegExpRoute, Route, Serwist, StaleWhileRevalidate, StorableRequest, Strategy, StrategyHandler, cacheNames, copyResponse, createPartialResponse, disableDevLogs, disableNavigationPreload, enableNavigationPreload, initializeGoogleAnalytics, isNavigationPreloadSupported, registerQuotaErrorCallback, responsesAreSame, setCacheNameDetails };\n\n//# sourceMappingURL=index.mjs.map","import { CacheFirst, ExpirationPlugin, NetworkFirst, NetworkOnly, RangeRequestsPlugin, StaleWhileRevalidate } from \"serwist\";\n//#region src/index.worker.ts\nconst PAGES_CACHE_NAME = {\n\trscPrefetch: \"pages-rsc-prefetch\",\n\trsc: \"pages-rsc\",\n\thtml: \"pages\"\n};\n/**\n* The default, recommended list of caching strategies for applications\n* built with Next.js.\n*\n* @see https://serwist.pages.dev/docs/next/worker-exports#default-cache\n*/\nconst defaultCache = process.env.NODE_ENV !== \"production\" ? [{\n\tmatcher: /.*/i,\n\thandler: new NetworkOnly()\n}] : [\n\t{\n\t\tmatcher: /^https:\\/\\/fonts\\.(?:gstatic)\\.com\\/.*/i,\n\t\thandler: new CacheFirst({\n\t\t\tcacheName: \"google-fonts-webfonts\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 4,\n\t\t\t\tmaxAgeSeconds: 365 * 24 * 60 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /^https:\\/\\/fonts\\.(?:googleapis)\\.com\\/.*/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"google-fonts-stylesheets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 4,\n\t\t\t\tmaxAgeSeconds: 10080 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"static-font-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 4,\n\t\t\t\tmaxAgeSeconds: 10080 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"static-image-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 64,\n\t\t\t\tmaxAgeSeconds: 720 * 60 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\/_next\\/static.+\\.js$/i,\n\t\thandler: new CacheFirst({\n\t\t\tcacheName: \"next-static-js-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 64,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\/_next\\/image\\?url=.+$/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"next-image\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 64,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:mp3|wav|ogg)$/i,\n\t\thandler: new CacheFirst({\n\t\t\tcacheName: \"static-audio-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t}), new RangeRequestsPlugin()]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:mp4|webm)$/i,\n\t\thandler: new CacheFirst({\n\t\t\tcacheName: \"static-video-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t}), new RangeRequestsPlugin()]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:js)$/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"static-js-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 48,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:css|less)$/i,\n\t\thandler: new StaleWhileRevalidate({\n\t\t\tcacheName: \"static-style-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\/_next\\/data\\/.+\\/.+\\.json$/i,\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: \"next-data\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\.(?:json|xml|csv)$/i,\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: \"static-data-assets\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: /\\/api\\/auth\\/.*/,\n\t\thandler: new NetworkOnly({ networkTimeoutSeconds: 10 })\n\t},\n\t{\n\t\tmatcher: ({ sameOrigin, url: { pathname } }) => sameOrigin && pathname.startsWith(\"/api/\"),\n\t\tmethod: \"GET\",\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: \"apis\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 16,\n\t\t\t\tmaxAgeSeconds: 1440 * 60,\n\t\t\t\tmaxAgeFrom: \"last-used\"\n\t\t\t})],\n\t\t\tnetworkTimeoutSeconds: 10\n\t\t})\n\t},\n\t{\n\t\tmatcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get(\"RSC\") === \"1\" && request.headers.get(\"Next-Router-Prefetch\") === \"1\" && sameOrigin && !pathname.startsWith(\"/api/\"),\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: PAGES_CACHE_NAME.rscPrefetch,\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get(\"RSC\") === \"1\" && sameOrigin && !pathname.startsWith(\"/api/\"),\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: PAGES_CACHE_NAME.rsc,\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: ({ request, url: { pathname }, sameOrigin }) => request.headers.get(\"Content-Type\")?.includes(\"text/html\") && sameOrigin && !pathname.startsWith(\"/api/\"),\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: PAGES_CACHE_NAME.html,\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: ({ url: { pathname }, sameOrigin }) => sameOrigin && !pathname.startsWith(\"/api/\"),\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: \"others\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 1440 * 60\n\t\t\t})]\n\t\t})\n\t},\n\t{\n\t\tmatcher: ({ sameOrigin }) => !sameOrigin,\n\t\thandler: new NetworkFirst({\n\t\t\tcacheName: \"cross-origin\",\n\t\t\tplugins: [new ExpirationPlugin({\n\t\t\t\tmaxEntries: 32,\n\t\t\t\tmaxAgeSeconds: 3600\n\t\t\t})],\n\t\t\tnetworkTimeoutSeconds: 10\n\t\t})\n\t},\n\t{\n\t\tmatcher: /.*/i,\n\t\tmethod: \"GET\",\n\t\thandler: new NetworkOnly()\n\t}\n];\n//#endregion\nexport { PAGES_CACHE_NAME, defaultCache };\n\n//# sourceMappingURL=index.worker.mjs.map","/// <reference lib=\"webworker\" />\n// Service worker source for Jarela. @serwist/next compiles this to\n// public/sw.js during `next build`. Replaces the previous next-pwa setup\n// (next-pwa is webpack-only and unmaintained for Next 16+ / Turbopack).\n\nimport { defaultCache } from \"@serwist/next/worker\";\nimport type { PrecacheEntry, SerwistGlobalConfig } from \"serwist\";\nimport { NetworkOnly, Serwist } from \"serwist\";\n\ndeclare global {\n interface WorkerGlobalScope extends SerwistGlobalConfig {\n // Injected by Serwist at build time with the precache manifest.\n __SW_MANIFEST: (PrecacheEntry | string)[] | undefined;\n }\n}\n\ndeclare const self: ServiceWorkerGlobalScope;\n\n// Pathname-based matchers. IMPORTANT: serwist's RegExpRoute matches against\n// `url.href`, so an anchored pattern like /^\\/api\\/.../ would never fire for\n// the cross-origin-looking full URL (https://host/api/...). Using function\n// matchers against `url.pathname` is unambiguous and works the same on\n// loopback, tailnet, and PWA contexts.\nconst isExactPath = (...paths: string[]) => ({ url }: { url: URL }) =>\n paths.includes(url.pathname);\n\nconst serwist = new Serwist({\n precacheEntries: self.__SW_MANIFEST,\n skipWaiting: true,\n clientsClaim: true,\n navigationPreload: true,\n runtimeCaching: [\n // Endpoints that MUST NEVER be cached. /api/v1/health is the liveness\n // probe. Everything under /api/v1/threads/<id>/run is a streaming\n // endpoint (POST submit returns 202 JSON, GET returns an SSE stream\n // consumed via EventSource — see ADR-0008) that must not be served\n // from cache; the per-thread/agents/etc. POSTs aren't cacheable either.\n {\n matcher: isExactPath(\"/api/v1/health\"),\n handler: new NetworkOnly(),\n },\n {\n // All POSTs go straight to network. Browsers don't cache POST\n // responses by default, but we want serwist out of the way entirely\n // so streaming bodies aren't intercepted.\n matcher: ({ request, url }) =>\n url.pathname.startsWith(\"/api/\") && request.method !== \"GET\",\n handler: new NetworkOnly(),\n },\n {\n // The run endpoint's GET path is an SSE stream — NetworkOnly so the\n // SW does not try to clone/cache a never-ending response.\n matcher: ({ url }) =>\n url.pathname.startsWith(\"/api/v1/threads/\") &&\n url.pathname.endsWith(\"/run\"),\n handler: new NetworkOnly(),\n },\n // All API GETs go straight to network. We're not building an offline\n // experience: the app is useless without the local server anyway. The\n // previous NetworkFirst+5s setup caused Safari PWA (esp. over Tailscale,\n // where the first request can take >5s) to silently fall back to a\n // stale cached payload — e.g. an empty agent list pinned for up to 24h\n // after a transient auth glitch. NetworkOnly removes the whole class\n // of bug.\n {\n matcher: ({ request, url }) =>\n url.pathname.startsWith(\"/api/\") && request.method === \"GET\",\n handler: new NetworkOnly(),\n },\n // Serwist defaults handle static assets, Next.js data, fonts, images, etc.\n ...defaultCache,\n ],\n});\n\nserwist.addEventListeners();\n\n// On activate, purge stale runtime API caches. Earlier SW versions cached\n// /api/v1/agents, /api/v1/threads, /api/v1/memory etc. with NetworkFirst —\n// which on Safari PWA over Tailscale would pin installed clients to an\n// empty/stale payload for up to 24h after a transient auth glitch. Also\n// purge legacy cached entries for endpoints that should NEVER be cached\n// (/api/v1/health, streaming run endpoints, and the now-removed\n// /api/v1/ws WS-URL discovery endpoint — ADR-0008).\nconst STALE_RUNTIME_CACHES = [\"agents-cache\", \"threads-cache\", \"memory-cache\"];\nself.addEventListener(\"activate\", (event) => {\n event.waitUntil((async () => {\n const cacheNames = await caches.keys();\n await Promise.all(cacheNames.map(async (name) => {\n if (STALE_RUNTIME_CACHES.includes(name)) {\n await caches.delete(name);\n return;\n }\n const cache = await caches.open(name);\n const requests = await cache.keys();\n await Promise.all(requests.map((req) => {\n try {\n const u = new URL(req.url);\n if (\n u.pathname.startsWith(\"/api/\") ||\n u.pathname === \"/api/v1/health\" ||\n u.pathname === \"/api/v1/ws\" /* legacy, removed in ADR-0008 */ ||\n (u.pathname.startsWith(\"/api/v1/threads/\") && u.pathname.endsWith(\"/run\"))\n ) {\n return cache.delete(req);\n }\n } catch { /* ignore */ }\n return Promise.resolve(false);\n }));\n }));\n })());\n});\n"],"names":["defaultCache","NetworkOnly","Serwist","isExactPath","paths","url","includes","pathname","serwist","precacheEntries","self","__SW_MANIFEST","skipWaiting","clientsClaim","navigationPreload","runtimeCaching","matcher","handler","request","startsWith","method","endsWith","addEventListeners","STALE_RUNTIME_CACHES","addEventListener","event","waitUntil","cacheNames","caches","keys","Promise","all","map","name","delete","cache","open","requests","req","u","URL","resolve"],"sourceRoot":"","ignoreList":[0,1,2,3,4,5,6]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"../public/swe-worker-f61931bc2770d10b.js","mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACU;;AAEV,4C","sources":["webpack://_N_E/./node_modules/@serwist/next/dist/sw-entry-worker.mjs"],"sourcesContent":["//#region src/sw-entry-worker.ts\nself.onmessage = async (ev) => {\n\tswitch (ev.data.type) {\n\t\tcase \"__START_URL_CACHE__\": {\n\t\t\tconst url = ev.data.url;\n\t\t\tconst response = await fetch(url);\n\t\t\tif (!response.redirected) return (await caches.open(\"start-url\")).put(url, response);\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tcase \"__FRONTEND_NAV_CACHE__\": {\n\t\t\tconst url = ev.data.url;\n\t\t\tconst pagesCache = await caches.open(\"pages\");\n\t\t\tif (!!await pagesCache.match(url, { ignoreSearch: true })) return;\n\t\t\tconst page = await fetch(url);\n\t\t\tif (!page.ok) return;\n\t\t\tpagesCache.put(url, page.clone());\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tdefault: return Promise.resolve();\n\t}\n};\n//#endregion\nexport {};\n\n//# sourceMappingURL=sw-entry-worker.mjs.map"],"names":[],"sourceRoot":"","ignoreList":[0]}
|