diff --git a/app/(protected)/admin/urls/page.tsx b/app/(protected)/admin/urls/page.tsx index bbf4ed5..506a461 100644 --- a/app/(protected)/admin/urls/page.tsx +++ b/app/(protected)/admin/urls/page.tsx @@ -33,7 +33,7 @@ export default async function DashboardPage() { Links Realtime - + { - const countBySegment: { - [key: string]: { count: number; timestamp: number }; - } = {}; - const timestamps = locations - .filter((loc) => loc.updatedAt) - .map((loc) => new Date(loc.updatedAt || "").getTime()); + // 过滤有效数据 + const validLocations = locations.filter((loc) => loc.createdAt); + if (validLocations.length === 0) return []; - if (timestamps.length === 0) return []; + // 获取时间范围 + const dates = validLocations.map((loc) => new Date(loc.createdAt!)); + const minDate = new Date(Math.min(...dates.map((d) => d.getTime()))); + const maxDate = new Date(Math.max(...dates.map((d) => d.getTime()))); - const minTime = Math.min(...timestamps); - const maxTime = Math.max(...timestamps); - const timeRangeMinutes = (maxTime - minTime) / (1000 * 60); - console.log("[sss]", timeRangeMinutes); + // 根据时间跨度选择分组策略 + const totalMinutes = differenceInMinutes(maxDate, minDate); + const totalHours = differenceInHours(maxDate, minDate); + const totalDays = differenceInDays(maxDate, minDate); - let segmentSizeMinutes: number; - if (timeRangeMinutes <= 30) segmentSizeMinutes = 0.5; - else if (timeRangeMinutes <= 60) segmentSizeMinutes = 2; - else if (timeRangeMinutes <= 360) segmentSizeMinutes = 12; - else if (timeRangeMinutes <= 720) segmentSizeMinutes = 24; - else if (timeRangeMinutes <= 1440) segmentSizeMinutes = 36; - else { - segmentSizeMinutes = Math.ceil(timeRangeMinutes / 30); - segmentSizeMinutes = Math.ceil(segmentSizeMinutes / 60) * 60; + let groupByFn: (date: Date) => Date; + let formatFn: (date: Date) => string; + let intervalFn: (date: Date, interval: number) => Date; + let interval: number; + + // 30分钟内:按1分钟分组 + if (totalMinutes <= 30) { + groupByFn = startOfMinute; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 1; + } else if (totalMinutes <= 60) { + // 1小时内:按2分钟分组 + groupByFn = (date) => { + const minutes = Math.floor(date.getMinutes() / 2) * 2; + const grouped = startOfMinute(date); + grouped.setMinutes(minutes); + return grouped; + }; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 2; + } else if (totalHours <= 2) { + // 2小时内:按4分钟分组 + groupByFn = (date) => { + const minutes = Math.floor(date.getMinutes() / 4) * 4; + const grouped = startOfMinute(date); + grouped.setMinutes(minutes); + return grouped; + }; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 4; + } else if (totalHours <= 6) { + // 6小时内:按12分钟分组 + groupByFn = (date) => { + const minutes = Math.floor(date.getMinutes() / 12) * 12; + const grouped = startOfMinute(date); + grouped.setMinutes(minutes); + return grouped; + }; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 12; + } else if (totalHours <= 12) { + // 12小时内:按24分钟分组 + groupByFn = (date) => { + const minutes = Math.floor(date.getMinutes() / 24) * 24; + const grouped = startOfMinute(date); + grouped.setMinutes(minutes); + return grouped; + }; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 24; + } else if (totalHours <= 24) { + // 24小时内:按48分钟分组 + groupByFn = (date) => { + const minutes = Math.floor(date.getMinutes() / 48) * 48; + const grouped = startOfMinute(date); + grouped.setMinutes(minutes); + return grouped; + }; + formatFn = (date) => format(date, "MM-dd HH:mm"); + intervalFn = addMinutes; + interval = 48; + } else if (totalDays <= 7) { + // 7天内:按天分组 + groupByFn = startOfDay; + formatFn = (date) => format(date, "MM-dd"); + intervalFn = addHours; + interval = 24; + } else { + // 更长时间:按天分组 + groupByFn = startOfDay; + formatFn = (date) => format(date, "MM-dd"); + intervalFn = addHours; + interval = 24; } - locations.forEach((loc) => { - if (!loc.updatedAt) return; - const date = new Date(loc.updatedAt); - const minutesSinceStart = Math.floor( - (date.getTime() - minTime) / (1000 * 60), - ); - const segmentIndex = Math.floor(minutesSinceStart / segmentSizeMinutes); - const segmentStartMinutes = segmentIndex * segmentSizeMinutes; - const segmentDate = new Date(minTime + segmentStartMinutes * 60 * 1000); - const timeKey = `${segmentDate.getHours().toString().padStart(2, "0")}:${segmentDate - .getMinutes() - .toString() - .padStart(2, "0")}`; + // 分组聚合数据 + const groupedData = new Map(); - if (!countBySegment[timeKey]) { - countBySegment[timeKey] = { - count: 0, - timestamp: segmentDate.getTime(), - }; - } - countBySegment[timeKey].count += loc.count; + validLocations.forEach((loc) => { + const date = new Date(loc.createdAt!); + const groupedDate = groupByFn(date); + const key = groupedDate.getTime().toString(); + + groupedData.set(key, (groupedData.get(key) || 0) + loc.count); }); - return Object.keys(countBySegment) - .sort((a, b) => countBySegment[a].timestamp - countBySegment[b].timestamp) - .map((time) => ({ - time, - count: countBySegment[time].count, - })); + // 填充时间间隔,确保连续性 + const result: ChartData[] = []; + const startGroup = groupByFn(minDate); + const endGroup = groupByFn(maxDate); + + let current = startGroup; + // 过滤掉count为0 的数据 + while (current <= endGroup) { + const key = current.getTime().toString(); + result.push({ + time: formatFn(current), + count: groupedData.get(key) || 0, + }); + current = intervalFn(current, interval); + } + + return result; }; const appendLocationData = ( @@ -176,6 +258,7 @@ export default function Realtime({ isAdmin = false }: { isAdmin?: boolean }) { browser: item.browser, userUrl: item.userUrl, updatedAt: item.updatedAt, + createdAt: item.createdAt, }); } totalNewClicks += clickCount; @@ -216,7 +299,7 @@ export default function Realtime({ isAdmin = false }: { isAdmin?: boolean }) { const result = await response.json(); if (result.error) { - console.error("API Error:", result.error); + // console.error("API Error:", result.error); return; } diff --git a/app/(protected)/dashboard/urls/globe/realtime-chart.tsx b/app/(protected)/dashboard/urls/globe/realtime-chart.tsx index 3199eb4..cc3abee 100644 --- a/app/(protected)/dashboard/urls/globe/realtime-chart.tsx +++ b/app/(protected)/dashboard/urls/globe/realtime-chart.tsx @@ -29,72 +29,75 @@ export const RealtimeChart = ({ chartData, totalClicks, }: RealtimeChartProps) => { - const maxCount = Math.max(...chartData.map((d) => d.count), 1); - // const tickInterval = - // chartData.length <= 10 ? 0 : Math.ceil(chartData.length / 10); const getTickInterval = (dataLength: number) => { - if (dataLength <= 6) return 0; // 显示所有刻度 - if (dataLength <= 12) return 1; // 每隔1个显示 - if (dataLength <= 24) return Math.ceil(dataLength / 8); // 大约8个刻度 - return Math.ceil(dataLength / 6); // 大约6个刻度 + if (dataLength <= 6) return 0; + if (dataLength <= 12) return 1; + if (dataLength <= 24) return Math.ceil(dataLength / 8); + return Math.ceil(dataLength / 6); }; - const tickInterval = getTickInterval(chartData.length); + + // console.log("chartData", chartData); + // 过滤掉为count=0的数据,但是最后一个数据为0时不要剔除 + const filteredChartData = chartData.filter((item, index) => { + return item.count !== 0 || index === chartData.length - 1; + }); + const tickInterval = getTickInterval(filteredChartData.length); return ( -
+

Realtime Visits

{totalClicks}

- - - value} - /> - - { - if (active && payload && payload.length) { - return ( -
-

{`${label}`}

-

{`Visits: ${payload[0].value}`}

-
- ); - } - return null; - }} - /> - -
-
+ {/* */} + + value.split(" ")[1]} + /> + + { + if (active && payload && payload.length) { + return ( +
+

{`${label}`}

+

{`Visits: ${payload[0].value}`}

+
+ ); + } + return null; + }} + /> + +
); }; diff --git a/app/(protected)/dashboard/urls/globe/realtime-globe.tsx b/app/(protected)/dashboard/urls/globe/realtime-globe.tsx index 49a92fd..0872e76 100644 --- a/app/(protected)/dashboard/urls/globe/realtime-globe.tsx +++ b/app/(protected)/dashboard/urls/globe/realtime-globe.tsx @@ -40,13 +40,8 @@ export default function RealtimeGlobe({ const [countries, setCountries] = useState({}); const [currentLocation, setCurrentLocation] = useState({}); const [hexAltitude, setHexAltitude] = useState(0.001); - const { - ref: wrapperRef, - width: wrapperWidth, - height: wrapperHeight, - } = useElementSize(); + const { ref: wrapperRef, width: wrapperWidth } = useElementSize(); const [isLoaded, setIsLoaded] = useState(false); - const [error, setError] = useState(null); const highest = locations.reduce((acc, curr) => Math.max(acc, curr.count), 0) || 1; @@ -62,8 +57,7 @@ export default function RealtimeGlobe({ const { MeshPhongMaterial } = await import("three"); return { Globe, MeshPhongMaterial }; } catch (err) { - console.error("Failed to load Globe.gl:", err); - setError("Failed to load Globe.gl library"); + // console.error("Failed to load Globe.gl:", err); return null; } }, []); @@ -128,7 +122,8 @@ export default function RealtimeGlobe({ globe = new Globe(container) .width(wrapperWidth) - .height(wrapperWidth > 728 ? wrapperWidth * 0.8 : wrapperWidth) + .height(wrapperWidth) + .globeOffset([0, -100]) .atmosphereColor("rgba(170, 170, 200, 0.8)") .backgroundColor("rgba(0,0,0,0)") .globeMaterial( @@ -188,7 +183,6 @@ export default function RealtimeGlobe({ } setIsLoaded(true); - setError(null); }); if (globe.controls()) { @@ -214,14 +208,7 @@ export default function RealtimeGlobe({ } globeInstanceRef.current = globe; - - // console.log("Globe initialization complete"); - } catch (err) { - // console.error("Error initializing globe:", err); - setError( - err instanceof Error ? err.message : "Failed to initialize globe", - ); - } + } catch (err) {} }, [ countries, locations, @@ -308,16 +295,11 @@ export default function RealtimeGlobe({ }, [cleanup]); return ( -
+
728 - // ? `${wrapperWidth * 0.8}px` - // : `${wrapperWidth}px`, maxWidth: `${wrapperWidth}px`, // 比较疑惑 minHeight: "100px", }} diff --git a/app/(protected)/dashboard/urls/page.tsx b/app/(protected)/dashboard/urls/page.tsx index bd118db..1bde5e3 100644 --- a/app/(protected)/dashboard/urls/page.tsx +++ b/app/(protected)/dashboard/urls/page.tsx @@ -34,7 +34,7 @@ export default async function DashboardPage() { Realtime - + -https://wr.do/robots.txt2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/manifest.json2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/pricing2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/privacy2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/terms2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/authentification2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/cloudflare2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/cloudflare-email-worker2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/components2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/config-files2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/database2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/email2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/installation2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/markdown-files2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/developer/quick-start2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/dns-records2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/emails2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/examples/cloudflare2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/examples/other2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/examples/vercel2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/examples/zeabur2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/icon2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/markdown2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/meta-info2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/qrcode2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/screenshot2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/open-api/text2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/plan2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/quick-start2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/short-urls2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/docs/wroom2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/chat2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/password-prompt2025-05-23T15:05:05.510Zdaily0.7 -https://wr.do/opengraph-image.jpg2025-05-23T15:05:05.510Zdaily0.7 +https://wr.do/robots.txt2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/authentification2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/cloudflare2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/cloudflare-email-worker2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/components2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/config-files2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/database2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/email2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/installation2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/markdown-files2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/developer/quick-start2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/dns-records2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/emails2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/examples/cloudflare2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/examples/other2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/examples/vercel2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/examples/zeabur2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/icon2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/markdown2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/meta-info2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/qrcode2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/screenshot2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/open-api/text2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/plan2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/quick-start2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/short-urls2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/docs/wroom2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/pricing2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/privacy2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/terms2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/chat2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/manifest.json2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/password-prompt2025-05-24T09:27:12.895Zdaily0.7 +https://wr.do/opengraph-image.jpg2025-05-24T09:27:12.895Zdaily0.7 \ No newline at end of file diff --git a/public/sw.js.map b/public/sw.js.map index de93e6c..a3f9dd0 100644 --- a/public/sw.js.map +++ b/public/sw.js.map @@ -1 +1 @@ -{"version":3,"file":"sw.js","sources":["../../../../../../private/var/folders/9b/3qmyp8zd2xvdspdrp149fyg00000gn/T/878dacb8d47cfcd9f63657be98d10c50/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-core@6.6.0/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,EAEZ,CAAA;EAQDC,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAA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AA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA6B,CAAC,CAAA,CAAA,CAAA,CAAA,CAAK,CAAE,CAAA,CAAA,CAAA,CAAA,CAAIc,mBAA8B,CAAC,CAAA;EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,EAAC,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA;EAAEZ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,EAAE,CAAA,CAAA;EAAG,CAAC,CAAC,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAC,CAAA;;"} \ No newline at end of file +{"version":3,"file":"sw.js","sources":["../../../../../../private/var/folders/9b/3qmyp8zd2xvdspdrp149fyg00000gn/T/421af727c156b643ce824110d9e6d403/sw.js"],"sourcesContent":["import {registerRoute as workbox_routing_registerRoute} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-routing@6.6.0/node_modules/workbox-routing/registerRoute.mjs';\nimport {NetworkFirst as workbox_strategies_NetworkFirst} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/NetworkFirst.mjs';\nimport {NetworkOnly as workbox_strategies_NetworkOnly} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-strategies@6.6.0/node_modules/workbox-strategies/NetworkOnly.mjs';\nimport {clientsClaim as workbox_core_clientsClaim} from '/Users/songjunxi/Desktop/repos/wrdo-app/wr.do/node_modules/.pnpm/workbox-core@6.6.0/node_modules/workbox-core/clientsClaim.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\nimportScripts(\n \n);\n\n\n\n\n\n\n\nself.skipWaiting();\n\nworkbox_core_clientsClaim();\n\n\n\nworkbox_routing_registerRoute(\"/\", new workbox_strategies_NetworkFirst({ \"cacheName\":\"start-url\", plugins: [{ cacheWillUpdate: async ({ request, response, event, state }) => { if (response && response.type === 'opaqueredirect') { return new Response(response.body, { status: 200, statusText: 'OK', headers: response.headers }) } return response } }] }), 'GET');\nworkbox_routing_registerRoute(/.*/i, new workbox_strategies_NetworkOnly({ \"cacheName\":\"dev\", plugins: [] }), 'GET');\n\n\n\n\n"],"names":["importScripts","self","skipWaiting","workbox_core_clientsClaim","workbox_routing_registerRoute","workbox_strategies_NetworkFirst","plugins","cacheWillUpdate","request","response","event","state","type","Response","body","status","statusText","headers","workbox_strategies_NetworkOnly"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAa,EAEZ,CAAA;EAQDC,CAAI,CAAA,CAAA,CAAA,CAACC,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA;AAElBC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB,EAAE,CAAA;AAI3BC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA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