From aefff8690bc001667eaf1290f88174ed6993edb6 Mon Sep 17 00:00:00 2001 From: Sendi John Date: Wed, 15 Oct 2025 22:10:36 +0100 Subject: [PATCH 1/4] feat(dashboard): integrate real STRK and STRKP balances - Add formatBalance utility to convert wei to decimal format - Read STRKP token balance from StarkPlayERC20 contract - Read STRK token balance from StarkPlayVault contract - Implement loading states while fetching balances - Use connected user address via useAccount hook - Format values to 2 decimals for UI display - Handle wallet disconnection gracefully Closes #554 --- packages/nextjs/app/dapp/dashboard/page.tsx | 67 ++++++++++++++++++++- packages/nextjs/utils/formatBalance.ts | 57 ++++++++++++++++++ 2 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 packages/nextjs/utils/formatBalance.ts diff --git a/packages/nextjs/app/dapp/dashboard/page.tsx b/packages/nextjs/app/dapp/dashboard/page.tsx index 578f4082..bf68a0bc 100644 --- a/packages/nextjs/app/dapp/dashboard/page.tsx +++ b/packages/nextjs/app/dapp/dashboard/page.tsx @@ -20,12 +20,14 @@ import LastDrawResultsCard from "~~/components/dashboard/dashboard/LastDrawResul import { useDrawInfo } from "~~/hooks/scaffold-stark/useDrawInfo"; import { useCurrentDrawId } from "~~/hooks/scaffold-stark/useCurrentDrawId"; +import { useScaffoldReadContract } from "~~/hooks/scaffold-stark/useScaffoldReadContract"; import { fetchDashboardMock, type DashboardMock } from "~~/lib/mocks/dashboard"; +import { formatBalance } from "~~/utils/formatBalance"; export default function DashboardPage() { const navigate = useRouter(); const { scrollY } = useScroll(); - const { status } = useAccount(); + const { address, isConnected } = useAccount(); const heroY = useTransform(scrollY, [0, 500], [0, -100]); const prizeDistributionY = useTransform(scrollY, [0, 2000], [0, -50]); @@ -36,10 +38,66 @@ export default function DashboardPage() { const [selectedNumbers, setSelectedNumbers] = useState([]); const [data, setData] = useState(null); + // State for balances + const [strkBalance, setStrkBalance] = useState(0); + const [strkpBalance, setStrkpBalance] = useState(0); + const [isLoadingBalances, setIsLoadingBalances] = useState(false); + const { currentDrawId } = useCurrentDrawId(); const { timeRemainingFromBlocks, blocksRemaining, currentBlock } = useDrawInfo({ drawId: currentDrawId }); + + // Get STRKP contract address from Lottery + const { data: strkpContractAddress, isLoading: loadingStrkpAddress } = + useScaffoldReadContract({ + contractName: "Lottery", + functionName: "GetStarkPlayContractAddress", + args: [], + }); + + // Read STRKP balance + const { + data: strkpBalanceRaw, + isLoading: loadingStrkpBalance, + error: strkpError, + } = useScaffoldReadContract({ + contractName: "StarkPlayERC20", + functionName: "balanceOf", + args: address ? [address] : undefined, + enabled: !!address && isConnected, + }); + + // For STRK balance, i use Scaffold-Stark's balance reading + // This uses the native STRK token balance via getBalance + const { data: strkBalanceRaw, isLoading: loadingStrkBalance } = + useScaffoldReadContract({ + contractName: "StarkPlayVault", + functionName: "get_total_strk_stored", + args: [], + enabled: !!address && isConnected, + }); + + // Update state when balances change + useEffect(() => { + if (strkpBalanceRaw) { + const formatted = formatBalance(strkpBalanceRaw as bigint, 18, 2); + setStrkpBalance(formatted); + } + }, [strkpBalanceRaw]); + + useEffect(() => { + if (strkBalanceRaw) { + const formatted = formatBalance(strkBalanceRaw as bigint, 18, 2); + setStrkBalance(formatted); + } + }, [strkBalanceRaw]); + + // Track loading state + useEffect(() => { + setIsLoadingBalances(loadingStrkpBalance || loadingStrkBalance); + }, [loadingStrkpBalance, loadingStrkBalance]); + const jackpot = 250295; const targetDate = new Date(); targetDate.setDate(targetDate.getDate() + 1); @@ -110,7 +168,12 @@ export default function DashboardPage() {
- + {/* Pass real balances instead of mock data */} +
diff --git a/packages/nextjs/utils/formatBalance.ts b/packages/nextjs/utils/formatBalance.ts new file mode 100644 index 00000000..8d854e91 --- /dev/null +++ b/packages/nextjs/utils/formatBalance.ts @@ -0,0 +1,57 @@ +/** + * Converts balance from wei (with 18 decimals) to readable decimal format + * @param balance Balance in wei as bigint or number + * @param decimals Number of decimals (default: 18) + * @param displayDecimals Number of decimals to show (default: 2) + * @returns Formatted balance as number + */ +export function formatBalance( + balance: bigint | number | undefined | null, + decimals: number = 18, + displayDecimals: number = 2 + ): number { + if (!balance) return 0; + + try { + // Convert to bigint if it's a number + const balanceBigInt = + typeof balance === "bigint" ? balance : BigInt(balance); + + // Calculate divisor (10^decimals) + const divisor = BigInt(10 ** decimals); + + // Get integer and fractional parts + const integerPart = balanceBigInt / divisor; + const fractionalPart = balanceBigInt % divisor; + + // Convert to decimal + const formatted = + Number(integerPart) + Number(fractionalPart) / Number(divisor); + + // Round to display decimals + const multiplier = Math.pow(10, displayDecimals); + return Math.round(formatted * multiplier) / multiplier; + } catch (error) { + console.error("Error formatting balance:", error); + return 0; + } + } + + /** + * Formats balance to a readable string with optional thousand separators + * @param balance Balance in wei + * @param decimals Number of decimals (default: 18) + * @param displayDecimals Number of decimals to show (default: 2) + * @returns Formatted balance string like "1,234.56" + */ + export function formatBalanceToString( + balance: bigint | number | undefined | null, + decimals: number = 18, + displayDecimals: number = 2 + ): string { + const formatted = formatBalance(balance, decimals, displayDecimals); + return formatted.toLocaleString("en-US", { + minimumFractionDigits: displayDecimals, + maximumFractionDigits: displayDecimals, + }); + } \ No newline at end of file From 2abb91e4199b414d702dd75e6a297efe261af29c Mon Sep 17 00:00:00 2001 From: Sendi John Date: Thu, 16 Oct 2025 22:03:50 +0100 Subject: [PATCH 2/4] fix: clean up formatting in formatBalance utility and dashboard page --- packages/nextjs/app/dapp/dashboard/page.tsx | 1 - packages/nextjs/utils/formatBalance.ts | 96 ++++++++++----------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/packages/nextjs/app/dapp/dashboard/page.tsx b/packages/nextjs/app/dapp/dashboard/page.tsx index bf68a0bc..bace5315 100644 --- a/packages/nextjs/app/dapp/dashboard/page.tsx +++ b/packages/nextjs/app/dapp/dashboard/page.tsx @@ -47,7 +47,6 @@ export default function DashboardPage() { const { timeRemainingFromBlocks, blocksRemaining, currentBlock } = useDrawInfo({ drawId: currentDrawId }); - // Get STRKP contract address from Lottery const { data: strkpContractAddress, isLoading: loadingStrkpAddress } = useScaffoldReadContract({ diff --git a/packages/nextjs/utils/formatBalance.ts b/packages/nextjs/utils/formatBalance.ts index 8d854e91..bc8a1331 100644 --- a/packages/nextjs/utils/formatBalance.ts +++ b/packages/nextjs/utils/formatBalance.ts @@ -6,52 +6,52 @@ * @returns Formatted balance as number */ export function formatBalance( - balance: bigint | number | undefined | null, - decimals: number = 18, - displayDecimals: number = 2 - ): number { - if (!balance) return 0; - - try { - // Convert to bigint if it's a number - const balanceBigInt = - typeof balance === "bigint" ? balance : BigInt(balance); - - // Calculate divisor (10^decimals) - const divisor = BigInt(10 ** decimals); - - // Get integer and fractional parts - const integerPart = balanceBigInt / divisor; - const fractionalPart = balanceBigInt % divisor; - - // Convert to decimal - const formatted = - Number(integerPart) + Number(fractionalPart) / Number(divisor); - - // Round to display decimals - const multiplier = Math.pow(10, displayDecimals); - return Math.round(formatted * multiplier) / multiplier; - } catch (error) { - console.error("Error formatting balance:", error); - return 0; - } + balance: bigint | number | undefined | null, + decimals: number = 18, + displayDecimals: number = 2, +): number { + if (!balance) return 0; + + try { + // Convert to bigint if it's a number + const balanceBigInt = + typeof balance === "bigint" ? balance : BigInt(balance); + + // Calculate divisor (10^decimals) + const divisor = BigInt(10 ** decimals); + + // Get integer and fractional parts + const integerPart = balanceBigInt / divisor; + const fractionalPart = balanceBigInt % divisor; + + // Convert to decimal + const formatted = + Number(integerPart) + Number(fractionalPart) / Number(divisor); + + // Round to display decimals + const multiplier = Math.pow(10, displayDecimals); + return Math.round(formatted * multiplier) / multiplier; + } catch (error) { + console.error("Error formatting balance:", error); + return 0; } - - /** - * Formats balance to a readable string with optional thousand separators - * @param balance Balance in wei - * @param decimals Number of decimals (default: 18) - * @param displayDecimals Number of decimals to show (default: 2) - * @returns Formatted balance string like "1,234.56" - */ - export function formatBalanceToString( - balance: bigint | number | undefined | null, - decimals: number = 18, - displayDecimals: number = 2 - ): string { - const formatted = formatBalance(balance, decimals, displayDecimals); - return formatted.toLocaleString("en-US", { - minimumFractionDigits: displayDecimals, - maximumFractionDigits: displayDecimals, - }); - } \ No newline at end of file +} + +/** + * Formats balance to a readable string with optional thousand separators + * @param balance Balance in wei + * @param decimals Number of decimals (default: 18) + * @param displayDecimals Number of decimals to show (default: 2) + * @returns Formatted balance string like "1,234.56" + */ +export function formatBalanceToString( + balance: bigint | number | undefined | null, + decimals: number = 18, + displayDecimals: number = 2, +): string { + const formatted = formatBalance(balance, decimals, displayDecimals); + return formatted.toLocaleString("en-US", { + minimumFractionDigits: displayDecimals, + maximumFractionDigits: displayDecimals, + }); +} From 9e52034d43867a1205a42ba3b93a695d9c43c61b Mon Sep 17 00:00:00 2001 From: Sendi John Date: Thu, 16 Oct 2025 23:09:02 +0100 Subject: [PATCH 3/4] fix(dashboard): improve balance handling and error management in DashboardPage --- packages/nextjs/app/dapp/dashboard/page.tsx | 32 +- packages/nextjs/public/sw.js | 598 +-------- packages/nextjs/public/workbox-4754cb34.js | 1323 +------------------ 3 files changed, 26 insertions(+), 1927 deletions(-) diff --git a/packages/nextjs/app/dapp/dashboard/page.tsx b/packages/nextjs/app/dapp/dashboard/page.tsx index bace5315..bdc99944 100644 --- a/packages/nextjs/app/dapp/dashboard/page.tsx +++ b/packages/nextjs/app/dapp/dashboard/page.tsx @@ -63,12 +63,12 @@ export default function DashboardPage() { } = useScaffoldReadContract({ contractName: "StarkPlayERC20", functionName: "balanceOf", - args: address ? [address] : undefined, + //always provide a tuple + args: (address ? [address] : [undefined]) as readonly [string | undefined], enabled: !!address && isConnected, }); - // For STRK balance, i use Scaffold-Stark's balance reading - // This uses the native STRK token balance via getBalance + // Read STRK balance const { data: strkBalanceRaw, isLoading: loadingStrkBalance } = useScaffoldReadContract({ contractName: "StarkPlayVault", @@ -77,18 +77,34 @@ export default function DashboardPage() { enabled: !!address && isConnected, }); - // Update state when balances change + // Safely handle Starknet typed return values (u256 arrays, etc.) useEffect(() => { if (strkpBalanceRaw) { - const formatted = formatBalance(strkpBalanceRaw as bigint, 18, 2); - setStrkpBalance(formatted); + try { + const raw = strkpBalanceRaw as unknown; + const value = Array.isArray(raw) + ? BigInt((raw as any)[0]?.value ?? 0) + : BigInt(raw as bigint); + const formatted = formatBalance(value, 18, 2); + setStrkpBalance(formatted); + } catch { + setStrkpBalance(0); + } } }, [strkpBalanceRaw]); useEffect(() => { if (strkBalanceRaw) { - const formatted = formatBalance(strkBalanceRaw as bigint, 18, 2); - setStrkBalance(formatted); + try { + const raw = strkBalanceRaw as unknown; + const value = Array.isArray(raw) + ? BigInt((raw as any)[0]?.value ?? 0) + : BigInt(raw as bigint); + const formatted = formatBalance(value, 18, 2); + setStrkBalance(formatted); + } catch { + setStrkBalance(0); + } } }, [strkBalanceRaw]); diff --git a/packages/nextjs/public/sw.js b/packages/nextjs/public/sw.js index 0e685d1a..ac83c412 100644 --- a/packages/nextjs/public/sw.js +++ b/packages/nextjs/public/sw.js @@ -1,597 +1 @@ -if (!self.define) { - let e, - s = {}; - const a = (a, t) => ( - (a = new URL(a + ".js", t).href), - s[a] || - new Promise((s) => { - if ("document" in self) { - const e = document.createElement("script"); - ((e.src = a), (e.onload = s), document.head.appendChild(e)); - } else ((e = a), importScripts(a), s()); - }).then(() => { - let e = s[a]; - if (!e) throw new Error(`Module ${a} didn’t register its module`); - return e; - }) - ); - self.define = (t, n) => { - const i = - e || - ("document" in self ? document.currentScript.src : "") || - location.href; - if (s[i]) return; - let c = {}; - const r = (e) => a(e, i), - f = { module: { uri: i }, exports: c, require: r }; - s[i] = Promise.all(t.map((e) => f[e] || r(e))).then((e) => (n(...e), c)); - }; -} -define(["./workbox-4754cb34"], function (e) { - "use strict"; - (importScripts(), - self.skipWaiting(), - e.clientsClaim(), - e.precacheAndRoute( - [ - { url: "/Andres.jpeg", revision: "d60720c95c1fd3d82dc681b4fe7a6977" }, - { url: "/David.jpeg", revision: "ed9364b636205805087b76f5d2bc92a1" }, - { - url: "/FutureMindsLogo.png", - revision: "5d1b117ea1cd8acec1db5384a7e93290", - }, - { url: "/Jeff.jpeg", revision: "db1b90dc9668178b88891f1290659583" }, - { url: "/Joseph.jpeg", revision: "6a30f4063a312f5e19e6ec54ae833831" }, - { url: "/Kim.png", revision: "afe82c70a85aab93417aaff6cf74179b" }, - { - url: "/Logo-sin-texto.png", - revision: "7fbf40dd5ec3cdec627b28490dec1430", - }, - { - url: "/Logo_Sin_Texto_Transparente.png", - revision: "e1015ed1b3bc6467b6d76194dbe66d8e", - }, - { url: "/Profile.svg", revision: "7ec057e52553d10cbcbfa1558c731aec" }, - { - url: "/Starklotto.png", - revision: "28f2c14b1e65406102932aa7c1b61060", - }, - { - url: "/_next/app-build-manifest.json", - revision: "789803e92a83da13102d782c0caf32ea", - }, - { - url: "/_next/static/aS3jJLfkGqftpm8ZKCFrw/_buildManifest.js", - revision: "d551238b042369e750acb6722dccfe58", - }, - { - url: "/_next/static/aS3jJLfkGqftpm8ZKCFrw/_ssgManifest.js", - revision: "b6652df95db52feb4daf4eca35380933", - }, - { - url: "/_next/static/chunks/1186-9a65c2a5586b201c.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/1218-eb34d217f148215b.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/1684-dc4632b38f8aec56.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/2077-0faa45e0724c5fa6.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/2200-57c1f5c2ae1dad70.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/2347.ef36ce4322b451d1.js", - revision: "ef36ce4322b451d1", - }, - { - url: "/_next/static/chunks/2564-5a8dcdfb20abd6a8.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/277-4b92422e0dd77f4b.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/2878-bb61f0752e5f06e6.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/2f0b94e8-009c4fe7d09feb3b.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/3063-392cf10d902d1d57.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/30a37ab2-c194af7319be38d5.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/3340-eb992131d15aa06e.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/4026-0c1450ede9e9d058.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/4139-ae1bd859311056aa.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/4191-17511b5bb8d710a2.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/4277-23d3626bb2535746.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/473f56c0-6b03c6907205fb07.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/4bd1b696-29c1d99d049afc50.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/5274-4fc2df354ce7ef88.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/5331-6c1e3d4f6f57f119.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/5728.12b88c9a7cf9f3d8.js", - revision: "12b88c9a7cf9f3d8", - }, - { - url: "/_next/static/chunks/6047-230155c320ecccab.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/6281-8e20ce5aa13ccbbf.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/658-5fd6cdc383acd9d5.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/6874-3389db82a2c367e3.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/6885-085169be9377ee78.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/7022-4eb19c5647273d0b.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/70646a03-49307dd85cd81a56.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/7248-f5f3aca7ad687091.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/8225-e9e280387ece4bd2.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/8260-a2d6da7ba3d8f3da.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/8844-f28ae56012058f65.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/930-5a91f7079bfc6aed.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/9608-7ebebc96817e5764.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/972.9dee389435e21097.js", - revision: "9dee389435e21097", - }, - { - url: "/_next/static/chunks/app/_not-found/page-e021c69819b6c202.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/about-us/page-4583d77c87d493e0.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/admin-lottery/page-84c8f4b59fad9691.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/admin/layout-b34a32a6c44d9c2f.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/admin/page-b4e235a319d79ca9.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/api/price/route-d7ff5854924f6fdc.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/configure/page-bfb441c2344ad329.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/contact-us/page-c6543c084f18fb68.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/buy-tickets/page-f445cd3093c6c3cd.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/claim/page-ededd898e10a69cf.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/dashboard/page-5a5790e0df457ed3.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/layout-9dea3d3ebc9f5f49.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/mint/page-36aedf876eac1bfd.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/dapp/unmint/page-361a1afce8ad42a8.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/debug/page-57e6944ad4ba96b9.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/how-it-works/page-d3810add71ff6732.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/i18n-demo/page-ca4866fe65c65fb8.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/jackpot-report/page-bcbd89bea8745201.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/layout-6406cd050a7b8689.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/not-found-fbae5fddd370c916.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/page-3d9e60cce6cb1745.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/play/confirmation/page-6b8b4c6dcfeaa5b3.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/play/page-852db567c52fb7d6.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/prizes/page-1493797cf2970510.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/profile/page-970a27402b904ebf.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/results/%5BdrawId%5D/page-0b3d6f69667e247a.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/app/results/page-af13201a8429ca70.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/e6909d18-d1e7bf26fe24aa96.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/framework-fc63273ed5a51da5.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/main-a460c7fac429e573.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/main-app-a07d235cc2ec6b59.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/pages/_app-5d1abe03d322390c.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/pages/_error-3b2a1d523de49635.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/chunks/polyfills-42372ed130431b0a.js", - revision: "846118c33b2c0e922d7b3a7676f81f6f", - }, - { - url: "/_next/static/chunks/webpack-c8b3617e853d3c50.js", - revision: "aS3jJLfkGqftpm8ZKCFrw", - }, - { - url: "/_next/static/css/f397428739d6ce55.css", - revision: "f397428739d6ce55", - }, - { - url: "/blast-icon-color.svg", - revision: "d949ffbc94b7c50e2e4fcf2b1daf1607", - }, - { - url: "/debug-icon.svg", - revision: "62ce54a2ddb8d11cb25c891c9adbdbea", - }, - { - url: "/debug-image.png", - revision: "34c4ca2676dd59ff24d6338faa1af371", - }, - { - url: "/explorer-icon.svg", - revision: "f6413b9b86d870f77edeb18891f6b3d5", - }, - { - url: "/gradient-s.svg", - revision: "1966c9867618efad27716a8591d9ade0", - }, - { url: "/jackpot.svg", revision: "481b6e2e5e5fa92a5dc041f8803acb47" }, - { url: "/logo.ico", revision: "0359e607e29a3d3b08095d84a9d25c39" }, - { url: "/logo.svg", revision: "a497d49f3c5cf63fe06eda59345d5ec1" }, - { url: "/manifest.json", revision: "781788f3e2bc4b2b176b5d8c425d7475" }, - { - url: "/overlay-blur-blue.svg", - revision: "2ae16f575d0e2bf12ecaf14e6fe63439", - }, - { - url: "/overlay-blur-purple.svg", - revision: "128571dc5c25ff9b1c452211584ba3f4", - }, - { - url: "/rpc-version.png", - revision: "cf97fd668cfa1221bec0210824978027", - }, - { - url: "/scaffold-config.png", - revision: "1ebfc244c31732dc4273fe292bd07596", - }, - { - url: "/sn-symbol-gradient.png", - revision: "908b60a4f6b92155b8ea38a009fa7081", - }, - { - url: "/starkcompass-icon.svg", - revision: "f8853deea695e7491b012b31a0e6ed82", - }, - { - url: "/starklotto-main-home.png", - revision: "a5ac0d6b3535aa95802af961927381c4", - }, - { url: "/strk-svg.svg", revision: "ebece79312b65a26a672c5fc6acb29b4" }, - { url: "/trophy.svg", revision: "e9348e094665c925720fdf316722bfb1" }, - { - url: "/voyager-icon.svg", - revision: "06663dd5ba2c49423225a8e3893b45fe", - }, - ], - { ignoreURLParametersMatching: [] }, - ), - e.cleanupOutdatedCaches(), - e.registerRoute( - "/", - new e.NetworkFirst({ - cacheName: "start-url", - plugins: [ - { - cacheWillUpdate: async ({ - request: e, - response: s, - event: a, - state: t, - }) => - s && "opaqueredirect" === s.type - ? new Response(s.body, { - status: 200, - statusText: "OK", - headers: s.headers, - }) - : s, - }, - ], - }), - "GET", - ), - e.registerRoute( - /^https:\/\/fonts\.(?:gstatic)\.com\/.*/i, - new e.CacheFirst({ - cacheName: "google-fonts-webfonts", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 31536e3 }), - ], - }), - "GET", - ), - e.registerRoute( - /^https:\/\/fonts\.(?:googleapis)\.com\/.*/i, - new e.StaleWhileRevalidate({ - cacheName: "google-fonts-stylesheets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 604800 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i, - new e.StaleWhileRevalidate({ - cacheName: "static-font-assets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 604800 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i, - new e.StaleWhileRevalidate({ - cacheName: "static-image-assets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 64, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\/_next\/image\?url=.+$/i, - new e.StaleWhileRevalidate({ - cacheName: "next-image", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 64, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:mp3|wav|ogg)$/i, - new e.CacheFirst({ - cacheName: "static-audio-assets", - plugins: [ - new e.RangeRequestsPlugin(), - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:mp4)$/i, - new e.CacheFirst({ - cacheName: "static-video-assets", - plugins: [ - new e.RangeRequestsPlugin(), - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:js)$/i, - new e.StaleWhileRevalidate({ - cacheName: "static-js-assets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:css|less)$/i, - new e.StaleWhileRevalidate({ - cacheName: "static-style-assets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\/_next\/data\/.+\/.+\.json$/i, - new e.StaleWhileRevalidate({ - cacheName: "next-data", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - /\.(?:json|xml|csv)$/i, - new e.NetworkFirst({ - cacheName: "static-data-assets", - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - ({ url: e }) => { - if (!(self.origin === e.origin)) return !1; - const s = e.pathname; - return !s.startsWith("/api/auth/") && !!s.startsWith("/api/"); - }, - new e.NetworkFirst({ - cacheName: "apis", - networkTimeoutSeconds: 10, - plugins: [ - new e.ExpirationPlugin({ maxEntries: 16, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - ({ url: e }) => { - if (!(self.origin === e.origin)) return !1; - return !e.pathname.startsWith("/api/"); - }, - new e.NetworkFirst({ - cacheName: "others", - networkTimeoutSeconds: 10, - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), - ], - }), - "GET", - ), - e.registerRoute( - ({ url: e }) => !(self.origin === e.origin), - new e.NetworkFirst({ - cacheName: "cross-origin", - networkTimeoutSeconds: 10, - plugins: [ - new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 3600 }), - ], - }), - "GET", - )); -}); +if(!self.define){let e,s={};const n=(n,a)=>(n=new URL(n+".js",a).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(a,i)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let c={};const r=e=>n(e,t),l={module:{uri:t},exports:c,require:r};s[t]=Promise.all(a.map(e=>l[e]||r(e))).then(e=>(i(...e),c))}}define(["./workbox-4754cb34"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Andres.jpeg",revision:"d60720c95c1fd3d82dc681b4fe7a6977"},{url:"/David.jpeg",revision:"ed9364b636205805087b76f5d2bc92a1"},{url:"/FutureMindsLogo.png",revision:"5d1b117ea1cd8acec1db5384a7e93290"},{url:"/Jeff.jpeg",revision:"db1b90dc9668178b88891f1290659583"},{url:"/Joseph.jpeg",revision:"6a30f4063a312f5e19e6ec54ae833831"},{url:"/Kim.png",revision:"afe82c70a85aab93417aaff6cf74179b"},{url:"/Logo-sin-texto.png",revision:"7fbf40dd5ec3cdec627b28490dec1430"},{url:"/Logo_Sin_Texto_Transparente.png",revision:"e1015ed1b3bc6467b6d76194dbe66d8e"},{url:"/Profile.svg",revision:"7ec057e52553d10cbcbfa1558c731aec"},{url:"/Starklotto.png",revision:"28f2c14b1e65406102932aa7c1b61060"},{url:"/_next/app-build-manifest.json",revision:"bb0b4ba27f16bc2877076316c2bfdd85"},{url:"/_next/static/chunks/1186-9a65c2a5586b201c.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/1218-eb34d217f148215b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/1684-dc4632b38f8aec56.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2077-0faa45e0724c5fa6.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2200-57c1f5c2ae1dad70.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2347.ef36ce4322b451d1.js",revision:"ef36ce4322b451d1"},{url:"/_next/static/chunks/2564-5a8dcdfb20abd6a8.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/277-4b92422e0dd77f4b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2878-bb61f0752e5f06e6.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2f0b94e8-009c4fe7d09feb3b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/3063-392cf10d902d1d57.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/30a37ab2-c194af7319be38d5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4026-0c1450ede9e9d058.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4139-ae1bd859311056aa.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4191-17511b5bb8d710a2.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4277-23d3626bb2535746.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/473f56c0-6b03c6907205fb07.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4bd1b696-29c1d99d049afc50.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5274-4fc2df354ce7ef88.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5470-88842a1e3eb51b04.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5728.12b88c9a7cf9f3d8.js",revision:"12b88c9a7cf9f3d8"},{url:"/_next/static/chunks/6047-230155c320ecccab.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6281-88eea553f9a87ab0.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/658-5fd6cdc383acd9d5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6874-3389db82a2c367e3.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6885-085169be9377ee78.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/7022-4eb19c5647273d0b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/70646a03-49307dd85cd81a56.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/7248-f5f3aca7ad687091.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8225-e9e280387ece4bd2.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8252-125ae14c1f773066.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8260-a2d6da7ba3d8f3da.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8844-f28ae56012058f65.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/930-63713162fb98c1f9.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/9608-7ebebc96817e5764.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/972.9dee389435e21097.js",revision:"9dee389435e21097"},{url:"/_next/static/chunks/app/_not-found/page-e021c69819b6c202.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/about-us/page-733cc13964489540.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin-lottery/page-0872504be0c5ce86.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin/layout-b34a32a6c44d9c2f.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin/page-ba3501461696b75a.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/api/price/route-d7ff5854924f6fdc.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/configure/page-9db3d8831e9168bf.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/contact-us/page-62ade46c57388c09.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/buy-tickets/page-e78b023de6169ef5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/claim/page-aeeca46d691088bd.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/dashboard/page-586fd77169bd0750.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/layout-f80554f204e1d958.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/mint/page-134c618992e23663.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/page-41d42d77a83ebacb.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/unmint/page-da4152c53b71bace.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/debug/page-1142d1559c7b206d.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/how-it-works/page-03189833d8fe55ad.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/i18n-demo/page-a15b2b017158ab1e.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/jackpot-report/page-9b71ed7bb679fffc.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/layout-a098e52d49134f15.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/not-found-5095b03fcdaa1009.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/page-2a76d79592010369.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/play/confirmation/page-cd1c54eaca96a4c4.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/play/page-2a4a57e2265e5e69.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/prizes/page-accf0412f40674e5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/profile/page-eb4046598a37c38b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/results/%5BdrawId%5D/page-c28ef5663ff02cc1.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/results/page-18e303c64cc09a13.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/e6909d18-d1e7bf26fe24aa96.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/framework-fc63273ed5a51da5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/main-a460c7fac429e573.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/main-app-e4c6a0453a83baa7.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/pages/_app-5d1abe03d322390c.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/pages/_error-3b2a1d523de49635.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-c8b3617e853d3c50.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/css/a3548ace7fb40a91.css",revision:"a3548ace7fb40a91"},{url:"/_next/static/iCaUWjtmr8nS2ABz6lyYO/_buildManifest.js",revision:"f45e51bfddb1d656d7abd0bfc4679fa5"},{url:"/_next/static/iCaUWjtmr8nS2ABz6lyYO/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/blast-icon-color.svg",revision:"d949ffbc94b7c50e2e4fcf2b1daf1607"},{url:"/debug-icon.svg",revision:"62ce54a2ddb8d11cb25c891c9adbdbea"},{url:"/debug-image.png",revision:"34c4ca2676dd59ff24d6338faa1af371"},{url:"/explorer-icon.svg",revision:"f6413b9b86d870f77edeb18891f6b3d5"},{url:"/gradient-s.svg",revision:"1966c9867618efad27716a8591d9ade0"},{url:"/jackpot.svg",revision:"481b6e2e5e5fa92a5dc041f8803acb47"},{url:"/logo.ico",revision:"0359e607e29a3d3b08095d84a9d25c39"},{url:"/logo.svg",revision:"a497d49f3c5cf63fe06eda59345d5ec1"},{url:"/manifest.json",revision:"781788f3e2bc4b2b176b5d8c425d7475"},{url:"/overlay-blur-blue.svg",revision:"2ae16f575d0e2bf12ecaf14e6fe63439"},{url:"/overlay-blur-purple.svg",revision:"128571dc5c25ff9b1c452211584ba3f4"},{url:"/rpc-version.png",revision:"cf97fd668cfa1221bec0210824978027"},{url:"/scaffold-config.png",revision:"1ebfc244c31732dc4273fe292bd07596"},{url:"/sn-symbol-gradient.png",revision:"908b60a4f6b92155b8ea38a009fa7081"},{url:"/starkcompass-icon.svg",revision:"f8853deea695e7491b012b31a0e6ed82"},{url:"/starklotto-main-home.png",revision:"a5ac0d6b3535aa95802af961927381c4"},{url:"/strk-svg.svg",revision:"ebece79312b65a26a672c5fc6acb29b4"},{url:"/trophy.svg",revision:"e9348e094665c925720fdf316722bfb1"},{url:"/voyager-icon.svg",revision:"06663dd5ba2c49423225a8e3893b45fe"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); diff --git a/packages/nextjs/public/workbox-4754cb34.js b/packages/nextjs/public/workbox-4754cb34.js index 5b2355a5..788fd6c4 100644 --- a/packages/nextjs/public/workbox-4754cb34.js +++ b/packages/nextjs/public/workbox-4754cb34.js @@ -1,1322 +1 @@ -define(["exports"], function (t) { - "use strict"; - try { - self["workbox:core:6.5.4"] && _(); - } catch (t) {} - const e = (t, ...e) => { - let s = t; - return (e.length > 0 && (s += ` :: ${JSON.stringify(e)}`), s); - }; - class s extends Error { - constructor(t, s) { - (super(e(t, s)), (this.name = t), (this.details = s)); - } - } - try { - self["workbox:routing:6.5.4"] && _(); - } catch (t) {} - const n = (t) => (t && "object" == typeof t ? t : { handle: t }); - class r { - constructor(t, e, s = "GET") { - ((this.handler = n(e)), (this.match = t), (this.method = s)); - } - setCatchHandler(t) { - this.catchHandler = n(t); - } - } - class i extends r { - constructor(t, e, s) { - super( - ({ url: e }) => { - const s = t.exec(e.href); - if (s && (e.origin === location.origin || 0 === s.index)) - return s.slice(1); - }, - e, - s, - ); - } - } - class a { - constructor() { - ((this.t = new Map()), (this.i = new Map())); - } - get routes() { - return this.t; - } - addFetchListener() { - self.addEventListener("fetch", (t) => { - const { request: e } = t, - s = this.handleRequest({ request: e, event: t }); - s && t.respondWith(s); - }); - } - addCacheListener() { - self.addEventListener("message", (t) => { - if (t.data && "CACHE_URLS" === t.data.type) { - const { payload: e } = t.data, - s = Promise.all( - e.urlsToCache.map((e) => { - "string" == typeof e && (e = [e]); - const s = new Request(...e); - return this.handleRequest({ request: s, event: t }); - }), - ); - (t.waitUntil(s), - t.ports && t.ports[0] && s.then(() => t.ports[0].postMessage(!0))); - } - }); - } - handleRequest({ request: t, event: e }) { - const s = new URL(t.url, location.href); - if (!s.protocol.startsWith("http")) return; - const n = s.origin === location.origin, - { params: r, route: i } = this.findMatchingRoute({ - event: e, - request: t, - sameOrigin: n, - url: s, - }); - let a = i && i.handler; - const o = t.method; - if ((!a && this.i.has(o) && (a = this.i.get(o)), !a)) return; - let c; - try { - c = a.handle({ url: s, request: t, event: e, params: r }); - } catch (t) { - c = Promise.reject(t); - } - const h = i && i.catchHandler; - return ( - c instanceof Promise && - (this.o || h) && - (c = c.catch(async (n) => { - if (h) - try { - return await h.handle({ - url: s, - request: t, - event: e, - params: r, - }); - } catch (t) { - t instanceof Error && (n = t); - } - if (this.o) return this.o.handle({ url: s, request: t, event: e }); - throw n; - })), - c - ); - } - findMatchingRoute({ url: t, sameOrigin: e, request: s, event: n }) { - const r = this.t.get(s.method) || []; - for (const i of r) { - let r; - const a = i.match({ url: t, sameOrigin: e, request: s, event: n }); - if (a) - return ( - (r = a), - ((Array.isArray(r) && 0 === r.length) || - (a.constructor === Object && 0 === Object.keys(a).length) || - "boolean" == typeof a) && - (r = void 0), - { route: i, params: r } - ); - } - return {}; - } - setDefaultHandler(t, e = "GET") { - this.i.set(e, n(t)); - } - setCatchHandler(t) { - this.o = n(t); - } - registerRoute(t) { - (this.t.has(t.method) || this.t.set(t.method, []), - this.t.get(t.method).push(t)); - } - unregisterRoute(t) { - if (!this.t.has(t.method)) - throw new s("unregister-route-but-not-found-with-method", { - method: t.method, - }); - const e = this.t.get(t.method).indexOf(t); - if (!(e > -1)) throw new s("unregister-route-route-not-registered"); - this.t.get(t.method).splice(e, 1); - } - } - let o; - const c = () => ( - o || ((o = new a()), o.addFetchListener(), o.addCacheListener()), - o - ); - function h(t, e, n) { - let a; - if ("string" == typeof t) { - const s = new URL(t, location.href); - a = new r(({ url: t }) => t.href === s.href, e, n); - } else if (t instanceof RegExp) a = new i(t, e, n); - else if ("function" == typeof t) a = new r(t, e, n); - else { - if (!(t instanceof r)) - throw new s("unsupported-route-type", { - moduleName: "workbox-routing", - funcName: "registerRoute", - paramName: "capture", - }); - a = t; - } - return (c().registerRoute(a), a); - } - try { - self["workbox:strategies:6.5.4"] && _(); - } catch (t) {} - const u = { - cacheWillUpdate: async ({ response: t }) => - 200 === t.status || 0 === t.status ? t : null, - }, - l = { - googleAnalytics: "googleAnalytics", - precache: "precache-v2", - prefix: "workbox", - runtime: "runtime", - suffix: "undefined" != typeof registration ? registration.scope : "", - }, - f = (t) => - [l.prefix, t, l.suffix].filter((t) => t && t.length > 0).join("-"), - w = (t) => t || f(l.precache), - d = (t) => t || f(l.runtime); - function p(t, e) { - const s = new URL(t); - for (const t of e) s.searchParams.delete(t); - return s.href; - } - class y { - constructor() { - this.promise = new Promise((t, e) => { - ((this.resolve = t), (this.reject = e)); - }); - } - } - const g = new Set(); - function m(t) { - return "string" == typeof t ? new Request(t) : t; - } - class v { - constructor(t, e) { - ((this.h = {}), - Object.assign(this, e), - (this.event = e.event), - (this.u = t), - (this.l = new y()), - (this.p = []), - (this.m = [...t.plugins]), - (this.v = new Map())); - for (const t of this.m) this.v.set(t, {}); - this.event.waitUntil(this.l.promise); - } - async fetch(t) { - const { event: e } = this; - let n = m(t); - if ( - "navigate" === n.mode && - e instanceof FetchEvent && - e.preloadResponse - ) { - const t = await e.preloadResponse; - if (t) return t; - } - const r = this.hasCallback("fetchDidFail") ? n.clone() : null; - try { - for (const t of this.iterateCallbacks("requestWillFetch")) - n = await t({ request: n.clone(), event: e }); - } catch (t) { - if (t instanceof Error) - throw new s("plugin-error-request-will-fetch", { - thrownErrorMessage: t.message, - }); - } - const i = n.clone(); - try { - let t; - t = await fetch( - n, - "navigate" === n.mode ? void 0 : this.u.fetchOptions, - ); - for (const s of this.iterateCallbacks("fetchDidSucceed")) - t = await s({ event: e, request: i, response: t }); - return t; - } catch (t) { - throw ( - r && - (await this.runCallbacks("fetchDidFail", { - error: t, - event: e, - originalRequest: r.clone(), - request: i.clone(), - })), - t - ); - } - } - async fetchAndCachePut(t) { - const e = await this.fetch(t), - s = e.clone(); - return (this.waitUntil(this.cachePut(t, s)), e); - } - async cacheMatch(t) { - const e = m(t); - let s; - const { cacheName: n, matchOptions: r } = this.u, - i = await this.getCacheKey(e, "read"), - a = Object.assign(Object.assign({}, r), { cacheName: n }); - s = await caches.match(i, a); - for (const t of this.iterateCallbacks("cachedResponseWillBeUsed")) - s = - (await t({ - cacheName: n, - matchOptions: r, - cachedResponse: s, - request: i, - event: this.event, - })) || void 0; - return s; - } - async cachePut(t, e) { - const n = m(t); - var r; - await ((r = 0), new Promise((t) => setTimeout(t, r))); - const i = await this.getCacheKey(n, "write"); - if (!e) - throw new s("cache-put-with-no-response", { - url: - ((a = i.url), - new URL(String(a), location.href).href.replace( - new RegExp(`^${location.origin}`), - "", - )), - }); - var a; - const o = await this.R(e); - if (!o) return !1; - const { cacheName: c, matchOptions: h } = this.u, - u = await self.caches.open(c), - l = this.hasCallback("cacheDidUpdate"), - f = l - ? await (async function (t, e, s, n) { - const r = p(e.url, s); - if (e.url === r) return t.match(e, n); - const i = Object.assign(Object.assign({}, n), { - ignoreSearch: !0, - }), - a = await t.keys(e, i); - for (const e of a) if (r === p(e.url, s)) return t.match(e, n); - })(u, i.clone(), ["__WB_REVISION__"], h) - : null; - try { - await u.put(i, l ? o.clone() : o); - } catch (t) { - if (t instanceof Error) - throw ( - "QuotaExceededError" === t.name && - (await (async function () { - for (const t of g) await t(); - })()), - t - ); - } - for (const t of this.iterateCallbacks("cacheDidUpdate")) - await t({ - cacheName: c, - oldResponse: f, - newResponse: o.clone(), - request: i, - event: this.event, - }); - return !0; - } - async getCacheKey(t, e) { - const s = `${t.url} | ${e}`; - if (!this.h[s]) { - let n = t; - for (const t of this.iterateCallbacks("cacheKeyWillBeUsed")) - n = m( - await t({ - mode: e, - request: n, - event: this.event, - params: this.params, - }), - ); - this.h[s] = n; - } - return this.h[s]; - } - hasCallback(t) { - for (const e of this.u.plugins) if (t in e) return !0; - return !1; - } - async runCallbacks(t, e) { - for (const s of this.iterateCallbacks(t)) await s(e); - } - *iterateCallbacks(t) { - for (const e of this.u.plugins) - if ("function" == typeof e[t]) { - const s = this.v.get(e), - n = (n) => { - const r = Object.assign(Object.assign({}, n), { state: s }); - return e[t](r); - }; - yield n; - } - } - waitUntil(t) { - return (this.p.push(t), t); - } - async doneWaiting() { - let t; - for (; (t = this.p.shift()); ) await t; - } - destroy() { - this.l.resolve(null); - } - async R(t) { - let e = t, - s = !1; - for (const t of this.iterateCallbacks("cacheWillUpdate")) - if ( - ((e = - (await t({ - request: this.request, - response: e, - event: this.event, - })) || void 0), - (s = !0), - !e) - ) - break; - return (s || (e && 200 !== e.status && (e = void 0)), e); - } - } - class R { - constructor(t = {}) { - ((this.cacheName = d(t.cacheName)), - (this.plugins = t.plugins || []), - (this.fetchOptions = t.fetchOptions), - (this.matchOptions = t.matchOptions)); - } - handle(t) { - const [e] = this.handleAll(t); - return e; - } - handleAll(t) { - t instanceof FetchEvent && (t = { event: t, request: t.request }); - const e = t.event, - s = "string" == typeof t.request ? new Request(t.request) : t.request, - n = "params" in t ? t.params : void 0, - r = new v(this, { event: e, request: s, params: n }), - i = this.q(r, s, e); - return [i, this.D(i, r, s, e)]; - } - async q(t, e, n) { - let r; - await t.runCallbacks("handlerWillStart", { event: n, request: e }); - try { - if (((r = await this.U(e, t)), !r || "error" === r.type)) - throw new s("no-response", { url: e.url }); - } catch (s) { - if (s instanceof Error) - for (const i of t.iterateCallbacks("handlerDidError")) - if (((r = await i({ error: s, event: n, request: e })), r)) break; - if (!r) throw s; - } - for (const s of t.iterateCallbacks("handlerWillRespond")) - r = await s({ event: n, request: e, response: r }); - return r; - } - async D(t, e, s, n) { - let r, i; - try { - r = await t; - } catch (i) {} - try { - (await e.runCallbacks("handlerDidRespond", { - event: n, - request: s, - response: r, - }), - await e.doneWaiting()); - } catch (t) { - t instanceof Error && (i = t); - } - if ( - (await e.runCallbacks("handlerDidComplete", { - event: n, - request: s, - response: r, - error: i, - }), - e.destroy(), - i) - ) - throw i; - } - } - function b(t) { - t.then(() => {}); - } - function q() { - return ( - (q = Object.assign - ? Object.assign.bind() - : function (t) { - for (var e = 1; e < arguments.length; e++) { - var s = arguments[e]; - for (var n in s) ({}).hasOwnProperty.call(s, n) && (t[n] = s[n]); - } - return t; - }), - q.apply(null, arguments) - ); - } - let D, U; - const x = new WeakMap(), - L = new WeakMap(), - I = new WeakMap(), - C = new WeakMap(), - E = new WeakMap(); - let N = { - get(t, e, s) { - if (t instanceof IDBTransaction) { - if ("done" === e) return L.get(t); - if ("objectStoreNames" === e) return t.objectStoreNames || I.get(t); - if ("store" === e) - return s.objectStoreNames[1] - ? void 0 - : s.objectStore(s.objectStoreNames[0]); - } - return k(t[e]); - }, - set: (t, e, s) => ((t[e] = s), !0), - has: (t, e) => - (t instanceof IDBTransaction && ("done" === e || "store" === e)) || - e in t, - }; - function O(t) { - return t !== IDBDatabase.prototype.transaction || - "objectStoreNames" in IDBTransaction.prototype - ? ( - U || - (U = [ - IDBCursor.prototype.advance, - IDBCursor.prototype.continue, - IDBCursor.prototype.continuePrimaryKey, - ]) - ).includes(t) - ? function (...e) { - return (t.apply(B(this), e), k(x.get(this))); - } - : function (...e) { - return k(t.apply(B(this), e)); - } - : function (e, ...s) { - const n = t.call(B(this), e, ...s); - return (I.set(n, e.sort ? e.sort() : [e]), k(n)); - }; - } - function T(t) { - return "function" == typeof t - ? O(t) - : (t instanceof IDBTransaction && - (function (t) { - if (L.has(t)) return; - const e = new Promise((e, s) => { - const n = () => { - (t.removeEventListener("complete", r), - t.removeEventListener("error", i), - t.removeEventListener("abort", i)); - }, - r = () => { - (e(), n()); - }, - i = () => { - (s(t.error || new DOMException("AbortError", "AbortError")), - n()); - }; - (t.addEventListener("complete", r), - t.addEventListener("error", i), - t.addEventListener("abort", i)); - }); - L.set(t, e); - })(t), - (e = t), - ( - D || - (D = [ - IDBDatabase, - IDBObjectStore, - IDBIndex, - IDBCursor, - IDBTransaction, - ]) - ).some((t) => e instanceof t) - ? new Proxy(t, N) - : t); - var e; - } - function k(t) { - if (t instanceof IDBRequest) - return (function (t) { - const e = new Promise((e, s) => { - const n = () => { - (t.removeEventListener("success", r), - t.removeEventListener("error", i)); - }, - r = () => { - (e(k(t.result)), n()); - }, - i = () => { - (s(t.error), n()); - }; - (t.addEventListener("success", r), t.addEventListener("error", i)); - }); - return ( - e - .then((e) => { - e instanceof IDBCursor && x.set(e, t); - }) - .catch(() => {}), - E.set(e, t), - e - ); - })(t); - if (C.has(t)) return C.get(t); - const e = T(t); - return (e !== t && (C.set(t, e), E.set(e, t)), e); - } - const B = (t) => E.get(t); - const P = ["get", "getKey", "getAll", "getAllKeys", "count"], - M = ["put", "add", "delete", "clear"], - W = new Map(); - function j(t, e) { - if (!(t instanceof IDBDatabase) || e in t || "string" != typeof e) return; - if (W.get(e)) return W.get(e); - const s = e.replace(/FromIndex$/, ""), - n = e !== s, - r = M.includes(s); - if ( - !(s in (n ? IDBIndex : IDBObjectStore).prototype) || - (!r && !P.includes(s)) - ) - return; - const i = async function (t, ...e) { - const i = this.transaction(t, r ? "readwrite" : "readonly"); - let a = i.store; - return ( - n && (a = a.index(e.shift())), - (await Promise.all([a[s](...e), r && i.done]))[0] - ); - }; - return (W.set(e, i), i); - } - N = ((t) => - q({}, t, { - get: (e, s, n) => j(e, s) || t.get(e, s, n), - has: (e, s) => !!j(e, s) || t.has(e, s), - }))(N); - try { - self["workbox:expiration:6.5.4"] && _(); - } catch (t) {} - const S = "cache-entries", - K = (t) => { - const e = new URL(t, location.href); - return ((e.hash = ""), e.href); - }; - class A { - constructor(t) { - ((this._ = null), (this.L = t)); - } - I(t) { - const e = t.createObjectStore(S, { keyPath: "id" }); - (e.createIndex("cacheName", "cacheName", { unique: !1 }), - e.createIndex("timestamp", "timestamp", { unique: !1 })); - } - C(t) { - (this.I(t), - this.L && - (function (t, { blocked: e } = {}) { - const s = indexedDB.deleteDatabase(t); - (e && s.addEventListener("blocked", (t) => e(t.oldVersion, t)), - k(s).then(() => {})); - })(this.L)); - } - async setTimestamp(t, e) { - const s = { - url: (t = K(t)), - timestamp: e, - cacheName: this.L, - id: this.N(t), - }, - n = (await this.getDb()).transaction(S, "readwrite", { - durability: "relaxed", - }); - (await n.store.put(s), await n.done); - } - async getTimestamp(t) { - const e = await this.getDb(), - s = await e.get(S, this.N(t)); - return null == s ? void 0 : s.timestamp; - } - async expireEntries(t, e) { - const s = await this.getDb(); - let n = await s - .transaction(S) - .store.index("timestamp") - .openCursor(null, "prev"); - const r = []; - let i = 0; - for (; n; ) { - const s = n.value; - (s.cacheName === this.L && - ((t && s.timestamp < t) || (e && i >= e) ? r.push(n.value) : i++), - (n = await n.continue())); - } - const a = []; - for (const t of r) (await s.delete(S, t.id), a.push(t.url)); - return a; - } - N(t) { - return this.L + "|" + K(t); - } - async getDb() { - return ( - this._ || - (this._ = await (function ( - t, - e, - { blocked: s, upgrade: n, blocking: r, terminated: i } = {}, - ) { - const a = indexedDB.open(t, e), - o = k(a); - return ( - n && - a.addEventListener("upgradeneeded", (t) => { - n( - k(a.result), - t.oldVersion, - t.newVersion, - k(a.transaction), - t, - ); - }), - s && - a.addEventListener("blocked", (t) => - s(t.oldVersion, t.newVersion, t), - ), - o - .then((t) => { - (i && t.addEventListener("close", () => i()), - r && - t.addEventListener("versionchange", (t) => - r(t.oldVersion, t.newVersion, t), - )); - }) - .catch(() => {}), - o - ); - })("workbox-expiration", 1, { upgrade: this.C.bind(this) })), - this._ - ); - } - } - class F { - constructor(t, e = {}) { - ((this.O = !1), - (this.T = !1), - (this.k = e.maxEntries), - (this.B = e.maxAgeSeconds), - (this.P = e.matchOptions), - (this.L = t), - (this.M = new A(t))); - } - async expireEntries() { - if (this.O) return void (this.T = !0); - this.O = !0; - const t = this.B ? Date.now() - 1e3 * this.B : 0, - e = await this.M.expireEntries(t, this.k), - s = await self.caches.open(this.L); - for (const t of e) await s.delete(t, this.P); - ((this.O = !1), this.T && ((this.T = !1), b(this.expireEntries()))); - } - async updateTimestamp(t) { - await this.M.setTimestamp(t, Date.now()); - } - async isURLExpired(t) { - if (this.B) { - const e = await this.M.getTimestamp(t), - s = Date.now() - 1e3 * this.B; - return void 0 === e || e < s; - } - return !1; - } - async delete() { - ((this.T = !1), await this.M.expireEntries(1 / 0)); - } - } - try { - self["workbox:range-requests:6.5.4"] && _(); - } catch (t) {} - async function H(t, e) { - try { - if (206 === e.status) return e; - const n = t.headers.get("range"); - if (!n) throw new s("no-range-header"); - const r = (function (t) { - const e = t.trim().toLowerCase(); - if (!e.startsWith("bytes=")) - throw new s("unit-must-be-bytes", { normalizedRangeHeader: e }); - if (e.includes(",")) - throw new s("single-range-only", { normalizedRangeHeader: e }); - const n = /(\d*)-(\d*)/.exec(e); - if (!n || (!n[1] && !n[2])) - throw new s("invalid-range-values", { normalizedRangeHeader: e }); - return { - start: "" === n[1] ? void 0 : Number(n[1]), - end: "" === n[2] ? void 0 : Number(n[2]), - }; - })(n), - i = await e.blob(), - a = (function (t, e, n) { - const r = t.size; - if ((n && n > r) || (e && e < 0)) - throw new s("range-not-satisfiable", { size: r, end: n, start: e }); - let i, a; - return ( - void 0 !== e && void 0 !== n - ? ((i = e), (a = n + 1)) - : void 0 !== e && void 0 === n - ? ((i = e), (a = r)) - : void 0 !== n && void 0 === e && ((i = r - n), (a = r)), - { start: i, end: a } - ); - })(i, r.start, r.end), - o = i.slice(a.start, a.end), - c = o.size, - h = new Response(o, { - status: 206, - statusText: "Partial Content", - headers: e.headers, - }); - return ( - h.headers.set("Content-Length", String(c)), - h.headers.set( - "Content-Range", - `bytes ${a.start}-${a.end - 1}/${i.size}`, - ), - h - ); - } catch (t) { - return new Response("", { - status: 416, - statusText: "Range Not Satisfiable", - }); - } - } - function $(t, e) { - const s = e(); - return (t.waitUntil(s), s); - } - try { - self["workbox:precaching:6.5.4"] && _(); - } catch (t) {} - function z(t) { - if (!t) throw new s("add-to-cache-list-unexpected-type", { entry: t }); - if ("string" == typeof t) { - const e = new URL(t, location.href); - return { cacheKey: e.href, url: e.href }; - } - const { revision: e, url: n } = t; - if (!n) throw new s("add-to-cache-list-unexpected-type", { entry: t }); - if (!e) { - const t = new URL(n, location.href); - return { cacheKey: t.href, url: t.href }; - } - const r = new URL(n, location.href), - i = new URL(n, location.href); - return ( - r.searchParams.set("__WB_REVISION__", e), - { cacheKey: r.href, url: i.href } - ); - } - class G { - constructor() { - ((this.updatedURLs = []), - (this.notUpdatedURLs = []), - (this.handlerWillStart = async ({ request: t, state: e }) => { - e && (e.originalRequest = t); - }), - (this.cachedResponseWillBeUsed = async ({ - event: t, - state: e, - cachedResponse: s, - }) => { - if ( - "install" === t.type && - e && - e.originalRequest && - e.originalRequest instanceof Request - ) { - const t = e.originalRequest.url; - s ? this.notUpdatedURLs.push(t) : this.updatedURLs.push(t); - } - return s; - })); - } - } - class V { - constructor({ precacheController: t }) { - ((this.cacheKeyWillBeUsed = async ({ request: t, params: e }) => { - const s = - (null == e ? void 0 : e.cacheKey) || this.W.getCacheKeyForURL(t.url); - return s ? new Request(s, { headers: t.headers }) : t; - }), - (this.W = t)); - } - } - let J, Q; - async function X(t, e) { - let n = null; - if (t.url) { - n = new URL(t.url).origin; - } - if (n !== self.location.origin) - throw new s("cross-origin-copy-response", { origin: n }); - const r = t.clone(), - i = { - headers: new Headers(r.headers), - status: r.status, - statusText: r.statusText, - }, - a = e ? e(i) : i, - o = (function () { - if (void 0 === J) { - const t = new Response(""); - if ("body" in t) - try { - (new Response(t.body), (J = !0)); - } catch (t) { - J = !1; - } - J = !1; - } - return J; - })() - ? r.body - : await r.blob(); - return new Response(o, a); - } - class Y extends R { - constructor(t = {}) { - ((t.cacheName = w(t.cacheName)), - super(t), - (this.j = !1 !== t.fallbackToNetwork), - this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)); - } - async U(t, e) { - const s = await e.cacheMatch(t); - return ( - s || - (e.event && "install" === e.event.type - ? await this.S(t, e) - : await this.K(t, e)) - ); - } - async K(t, e) { - let n; - const r = e.params || {}; - if (!this.j) - throw new s("missing-precache-entry", { - cacheName: this.cacheName, - url: t.url, - }); - { - const s = r.integrity, - i = t.integrity, - a = !i || i === s; - ((n = await e.fetch( - new Request(t, { integrity: "no-cors" !== t.mode ? i || s : void 0 }), - )), - s && - a && - "no-cors" !== t.mode && - (this.A(), await e.cachePut(t, n.clone()))); - } - return n; - } - async S(t, e) { - this.A(); - const n = await e.fetch(t); - if (!(await e.cachePut(t, n.clone()))) - throw new s("bad-precaching-response", { - url: t.url, - status: n.status, - }); - return n; - } - A() { - let t = null, - e = 0; - for (const [s, n] of this.plugins.entries()) - n !== Y.copyRedirectedCacheableResponsesPlugin && - (n === Y.defaultPrecacheCacheabilityPlugin && (t = s), - n.cacheWillUpdate && e++); - 0 === e - ? this.plugins.push(Y.defaultPrecacheCacheabilityPlugin) - : e > 1 && null !== t && this.plugins.splice(t, 1); - } - } - ((Y.defaultPrecacheCacheabilityPlugin = { - cacheWillUpdate: async ({ response: t }) => - !t || t.status >= 400 ? null : t, - }), - (Y.copyRedirectedCacheableResponsesPlugin = { - cacheWillUpdate: async ({ response: t }) => - t.redirected ? await X(t) : t, - })); - class Z { - constructor({ - cacheName: t, - plugins: e = [], - fallbackToNetwork: s = !0, - } = {}) { - ((this.F = new Map()), - (this.H = new Map()), - (this.$ = new Map()), - (this.u = new Y({ - cacheName: w(t), - plugins: [...e, new V({ precacheController: this })], - fallbackToNetwork: s, - })), - (this.install = this.install.bind(this)), - (this.activate = this.activate.bind(this))); - } - get strategy() { - return this.u; - } - precache(t) { - (this.addToCacheList(t), - this.G || - (self.addEventListener("install", this.install), - self.addEventListener("activate", this.activate), - (this.G = !0))); - } - addToCacheList(t) { - const e = []; - for (const n of t) { - "string" == typeof n - ? e.push(n) - : n && void 0 === n.revision && e.push(n.url); - const { cacheKey: t, url: r } = z(n), - i = "string" != typeof n && n.revision ? "reload" : "default"; - if (this.F.has(r) && this.F.get(r) !== t) - throw new s("add-to-cache-list-conflicting-entries", { - firstEntry: this.F.get(r), - secondEntry: t, - }); - if ("string" != typeof n && n.integrity) { - if (this.$.has(t) && this.$.get(t) !== n.integrity) - throw new s("add-to-cache-list-conflicting-integrities", { - url: r, - }); - this.$.set(t, n.integrity); - } - if ((this.F.set(r, t), this.H.set(r, i), e.length > 0)) { - const t = `Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`; - console.warn(t); - } - } - } - install(t) { - return $(t, async () => { - const e = new G(); - this.strategy.plugins.push(e); - for (const [e, s] of this.F) { - const n = this.$.get(s), - r = this.H.get(e), - i = new Request(e, { - integrity: n, - cache: r, - credentials: "same-origin", - }); - await Promise.all( - this.strategy.handleAll({ - params: { cacheKey: s }, - request: i, - event: t, - }), - ); - } - const { updatedURLs: s, notUpdatedURLs: n } = e; - return { updatedURLs: s, notUpdatedURLs: n }; - }); - } - activate(t) { - return $(t, async () => { - const t = await self.caches.open(this.strategy.cacheName), - e = await t.keys(), - s = new Set(this.F.values()), - n = []; - for (const r of e) s.has(r.url) || (await t.delete(r), n.push(r.url)); - return { deletedURLs: n }; - }); - } - getURLsToCacheKeys() { - return this.F; - } - getCachedURLs() { - return [...this.F.keys()]; - } - getCacheKeyForURL(t) { - const e = new URL(t, location.href); - return this.F.get(e.href); - } - getIntegrityForCacheKey(t) { - return this.$.get(t); - } - async matchPrecache(t) { - const e = t instanceof Request ? t.url : t, - s = this.getCacheKeyForURL(e); - if (s) { - return (await self.caches.open(this.strategy.cacheName)).match(s); - } - } - createHandlerBoundToURL(t) { - const e = this.getCacheKeyForURL(t); - if (!e) throw new s("non-precached-url", { url: t }); - return (s) => ( - (s.request = new Request(t)), - (s.params = Object.assign({ cacheKey: e }, s.params)), - this.strategy.handle(s) - ); - } - } - const tt = () => (Q || (Q = new Z()), Q); - class et extends r { - constructor(t, e) { - super(({ request: s }) => { - const n = t.getURLsToCacheKeys(); - for (const r of (function* ( - t, - { - ignoreURLParametersMatching: e = [/^utm_/, /^fbclid$/], - directoryIndex: s = "index.html", - cleanURLs: n = !0, - urlManipulation: r, - } = {}, - ) { - const i = new URL(t, location.href); - ((i.hash = ""), yield i.href); - const a = (function (t, e = []) { - for (const s of [...t.searchParams.keys()]) - e.some((t) => t.test(s)) && t.searchParams.delete(s); - return t; - })(i, e); - if ((yield a.href, s && a.pathname.endsWith("/"))) { - const t = new URL(a.href); - ((t.pathname += s), yield t.href); - } - if (n) { - const t = new URL(a.href); - ((t.pathname += ".html"), yield t.href); - } - if (r) { - const t = r({ url: i }); - for (const e of t) yield e.href; - } - })(s.url, e)) { - const e = n.get(r); - if (e) { - return { cacheKey: e, integrity: t.getIntegrityForCacheKey(e) }; - } - } - }, t.strategy); - } - } - ((t.CacheFirst = class extends R { - async U(t, e) { - let n, - r = await e.cacheMatch(t); - if (!r) - try { - r = await e.fetchAndCachePut(t); - } catch (t) { - t instanceof Error && (n = t); - } - if (!r) throw new s("no-response", { url: t.url, error: n }); - return r; - } - }), - (t.ExpirationPlugin = class { - constructor(t = {}) { - ((this.cachedResponseWillBeUsed = async ({ - event: t, - request: e, - cacheName: s, - cachedResponse: n, - }) => { - if (!n) return null; - const r = this.V(n), - i = this.J(s); - b(i.expireEntries()); - const a = i.updateTimestamp(e.url); - if (t) - try { - t.waitUntil(a); - } catch (t) {} - return r ? n : null; - }), - (this.cacheDidUpdate = async ({ cacheName: t, request: e }) => { - const s = this.J(t); - (await s.updateTimestamp(e.url), await s.expireEntries()); - }), - (this.X = t), - (this.B = t.maxAgeSeconds), - (this.Y = new Map()), - t.purgeOnQuotaError && - (function (t) { - g.add(t); - })(() => this.deleteCacheAndMetadata())); - } - J(t) { - if (t === d()) throw new s("expire-custom-caches-only"); - let e = this.Y.get(t); - return (e || ((e = new F(t, this.X)), this.Y.set(t, e)), e); - } - V(t) { - if (!this.B) return !0; - const e = this.Z(t); - if (null === e) return !0; - return e >= Date.now() - 1e3 * this.B; - } - Z(t) { - if (!t.headers.has("date")) return null; - const e = t.headers.get("date"), - s = new Date(e).getTime(); - return isNaN(s) ? null : s; - } - async deleteCacheAndMetadata() { - for (const [t, e] of this.Y) - (await self.caches.delete(t), await e.delete()); - this.Y = new Map(); - } - }), - (t.NetworkFirst = class extends R { - constructor(t = {}) { - (super(t), - this.plugins.some((t) => "cacheWillUpdate" in t) || - this.plugins.unshift(u), - (this.tt = t.networkTimeoutSeconds || 0)); - } - async U(t, e) { - const n = [], - r = []; - let i; - if (this.tt) { - const { id: s, promise: a } = this.et({ - request: t, - logs: n, - handler: e, - }); - ((i = s), r.push(a)); - } - const a = this.st({ timeoutId: i, request: t, logs: n, handler: e }); - r.push(a); - const o = await e.waitUntil( - (async () => (await e.waitUntil(Promise.race(r))) || (await a))(), - ); - if (!o) throw new s("no-response", { url: t.url }); - return o; - } - et({ request: t, logs: e, handler: s }) { - let n; - return { - promise: new Promise((e) => { - n = setTimeout(async () => { - e(await s.cacheMatch(t)); - }, 1e3 * this.tt); - }), - id: n, - }; - } - async st({ timeoutId: t, request: e, logs: s, handler: n }) { - let r, i; - try { - i = await n.fetchAndCachePut(e); - } catch (t) { - t instanceof Error && (r = t); - } - return ( - t && clearTimeout(t), - (!r && i) || (i = await n.cacheMatch(e)), - i - ); - } - }), - (t.RangeRequestsPlugin = class { - constructor() { - this.cachedResponseWillBeUsed = async ({ - request: t, - cachedResponse: e, - }) => (e && t.headers.has("range") ? await H(t, e) : e); - } - }), - (t.StaleWhileRevalidate = class extends R { - constructor(t = {}) { - (super(t), - this.plugins.some((t) => "cacheWillUpdate" in t) || - this.plugins.unshift(u)); - } - async U(t, e) { - const n = e.fetchAndCachePut(t).catch(() => {}); - e.waitUntil(n); - let r, - i = await e.cacheMatch(t); - if (i); - else - try { - i = await n; - } catch (t) { - t instanceof Error && (r = t); - } - if (!i) throw new s("no-response", { url: t.url, error: r }); - return i; - } - }), - (t.cleanupOutdatedCaches = function () { - self.addEventListener("activate", (t) => { - const e = w(); - t.waitUntil( - (async (t, e = "-precache-") => { - const s = (await self.caches.keys()).filter( - (s) => - s.includes(e) && s.includes(self.registration.scope) && s !== t, - ); - return (await Promise.all(s.map((t) => self.caches.delete(t))), s); - })(e).then((t) => {}), - ); - }); - }), - (t.clientsClaim = function () { - self.addEventListener("activate", () => self.clients.claim()); - }), - (t.precacheAndRoute = function (t, e) { - (!(function (t) { - tt().precache(t); - })(t), - (function (t) { - const e = tt(); - h(new et(e, t)); - })(e)); - }), - (t.registerRoute = h)); -}); +define(["exports"],function(t){"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.4"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:6.5.4"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter(t=>t&&t.length>0).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const g=new Set;function m(t){return"string"==typeof t?new Request(t):t}class v{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=m(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=m(t);var r;await(r=0,new Promise(t=>setTimeout(t,r)));const i=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=i.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.R(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.u,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const r=p(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===p(e.url,s))return t.match(e,n)}(u,i.clone(),["__WB_REVISION__"],h):null;try{await u.put(i,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of g)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.h[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await t({mode:e,request:n,event:this.event,params:this.params}));this.h[s]=n}return this.h[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.p.push(t),t}async doneWaiting(){let t;for(;t=this.p.shift();)await t}destroy(){this.l.resolve(null)}async R(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class R{constructor(t={}){this.cacheName=d(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new v(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.D(i,r,s,e)]}async q(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async D(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}function b(t){t.then(()=>{})}function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function O(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(U||(U=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(B(this),e),k(x.get(this))}:function(...e){return k(t.apply(B(this),e))}:function(e,...s){const n=t.call(B(this),e,...s);return I.set(n,e.sort?e.sort():[e]),k(n)}}function T(t){return"function"==typeof t?O(t):(t instanceof IDBTransaction&&function(t){if(L.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)});L.set(t,e)}(t),e=t,(D||(D=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,N):t);var e}function k(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(k(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)});return e.then(e=>{e instanceof IDBCursor&&x.set(e,t)}).catch(()=>{}),E.set(e,t),e}(t);if(C.has(t))return C.get(t);const e=T(t);return e!==t&&(C.set(t,e),E.set(e,t)),e}const B=t=>E.get(t);const P=["get","getKey","getAll","getAllKeys","count"],M=["put","add","delete","clear"],W=new Map;function j(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(W.get(e))return W.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=M.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!P.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return W.set(e,i),i}N=(t=>q({},t,{get:(e,s,n)=>j(e,s)||t.get(e,s,n),has:(e,s)=>!!j(e,s)||t.has(e,s)}))(N);try{self["workbox:expiration:6.5.4"]&&_()}catch(t){}const S="cache-entries",K=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class A{constructor(t){this._=null,this.L=t}I(t){const e=t.createObjectStore(S,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}C(t){this.I(t),this.L&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),k(s).then(()=>{})}(this.L)}async setTimestamp(t,e){const s={url:t=K(t),timestamp:e,cacheName:this.L,id:this.N(t)},n=(await this.getDb()).transaction(S,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(S,this.N(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(S).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.L&&(t&&s.timestamp=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(S,t.id),a.push(t.url);return a}N(t){return this.L+"|"+K(t)}async getDb(){return this._||(this._=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=k(a);return n&&a.addEventListener("upgradeneeded",t=>{n(k(a.result),t.oldVersion,t.newVersion,k(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{i&&t.addEventListener("close",()=>i()),r&&t.addEventListener("versionchange",t=>r(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.C.bind(this)})),this._}}class F{constructor(t,e={}){this.O=!1,this.T=!1,this.k=e.maxEntries,this.B=e.maxAgeSeconds,this.P=e.matchOptions,this.L=t,this.M=new A(t)}async expireEntries(){if(this.O)return void(this.T=!0);this.O=!0;const t=this.B?Date.now()-1e3*this.B:0,e=await this.M.expireEntries(t,this.k),s=await self.caches.open(this.L);for(const t of e)await s.delete(t,this.P);this.O=!1,this.T&&(this.T=!1,b(this.expireEntries()))}async updateTimestamp(t){await this.M.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.B){const e=await this.M.getTimestamp(t),s=Date.now()-1e3*this.B;return void 0===e||er||e&&e<0)throw new s("range-not-satisfiable",{size:r,end:n,start:e});let i,a;return void 0!==e&&void 0!==n?(i=e,a=n+1):void 0!==e&&void 0===n?(i=e,a=r):void 0!==n&&void 0===e&&(i=r-n,a=r),{start:i,end:a}}(i,r.start,r.end),o=i.slice(a.start,a.end),c=o.size,h=new Response(o,{status:206,statusText:"Partial Content",headers:e.headers});return h.headers.set("Content-Length",String(c)),h.headers.set("Content-Range",`bytes ${a.start}-${a.end-1}/${i.size}`),h}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}function $(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.5.4"]&&_()}catch(t){}function z(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const r=new URL(n,location.href),i=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",e),{cacheKey:r.href,url:i.href}}class G{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class V{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let J,Q;async function X(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(i):i,o=function(){if(void 0===J){const t=new Response("");if("body"in t)try{new Response(t.body),J=!0}catch(t){J=!1}J=!1}return J}()?r.body:await r.blob();return new Response(o,a)}class Y extends R{constructor(t={}){t.cacheName=w(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)}async U(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const r=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=r.integrity,i=t.integrity,a=!i||i===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Y.copyRedirectedCacheableResponsesPlugin&&(n===Y.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Y.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}Y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await X(t):t};class Z{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.H=new Map,this.$=new Map,this.u=new Y({cacheName:w(t),plugins:[...e,new V({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:r}=z(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(r)&&this.F.get(r)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(r),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.$.has(t)&&this.$.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:r});this.$.set(t,n.integrity)}if(this.F.set(r,t),this.H.set(r,i),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return $(t,async()=>{const e=new G;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.$.get(s),r=this.H.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return $(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.$.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const tt=()=>(Q||(Q=new Z),Q);class et extends r{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(i,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.CacheFirst=class extends R{async U(t,e){let n,r=await e.cacheMatch(t);if(!r)try{r=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.V(n),i=this.J(s);b(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.B=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){g.add(t)}(()=>this.deleteCacheAndMetadata())}J(t){if(t===d())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new F(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.B)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.B}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NetworkFirst=class extends R{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u),this.tt=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.tt){const{id:s,promise:a}=this.et({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.st({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}et({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t))},1e3*this.tt)}),id:n}}async st({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await H(t,e):e}},t.StaleWhileRevalidate=class extends R{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u)}async U(t,e){const n=e.fetchAndCachePut(t).catch(()=>{});e.waitUntil(n);let r,i=await e.cacheMatch(t);if(i);else try{i=await n}catch(t){t instanceof Error&&(r=t)}if(!i)throw new s("no-response",{url:t.url,error:r});return i}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=w();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.precacheAndRoute=function(t,e){!function(t){tt().precache(t)}(t),function(t){const e=tt();h(new et(e,t))}(e)},t.registerRoute=h}); From 5df6642b1b3c70bad31f4c95cd6151b5e2f7f274 Mon Sep 17 00:00:00 2001 From: Sendi John Date: Sun, 2 Nov 2025 23:12:09 +0100 Subject: [PATCH 4/4] fix: format service worker files with prettier --- packages/nextjs/public/sw.js | 602 ++++++++- packages/nextjs/public/workbox-4754cb34.js | 1323 +++++++++++++++++++- 2 files changed, 1923 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/public/sw.js b/packages/nextjs/public/sw.js index ac83c412..73079303 100644 --- a/packages/nextjs/public/sw.js +++ b/packages/nextjs/public/sw.js @@ -1 +1,601 @@ -if(!self.define){let e,s={};const n=(n,a)=>(n=new URL(n+".js",a).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(a,i)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let c={};const r=e=>n(e,t),l={module:{uri:t},exports:c,require:r};s[t]=Promise.all(a.map(e=>l[e]||r(e))).then(e=>(i(...e),c))}}define(["./workbox-4754cb34"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/Andres.jpeg",revision:"d60720c95c1fd3d82dc681b4fe7a6977"},{url:"/David.jpeg",revision:"ed9364b636205805087b76f5d2bc92a1"},{url:"/FutureMindsLogo.png",revision:"5d1b117ea1cd8acec1db5384a7e93290"},{url:"/Jeff.jpeg",revision:"db1b90dc9668178b88891f1290659583"},{url:"/Joseph.jpeg",revision:"6a30f4063a312f5e19e6ec54ae833831"},{url:"/Kim.png",revision:"afe82c70a85aab93417aaff6cf74179b"},{url:"/Logo-sin-texto.png",revision:"7fbf40dd5ec3cdec627b28490dec1430"},{url:"/Logo_Sin_Texto_Transparente.png",revision:"e1015ed1b3bc6467b6d76194dbe66d8e"},{url:"/Profile.svg",revision:"7ec057e52553d10cbcbfa1558c731aec"},{url:"/Starklotto.png",revision:"28f2c14b1e65406102932aa7c1b61060"},{url:"/_next/app-build-manifest.json",revision:"bb0b4ba27f16bc2877076316c2bfdd85"},{url:"/_next/static/chunks/1186-9a65c2a5586b201c.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/1218-eb34d217f148215b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/1684-dc4632b38f8aec56.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2077-0faa45e0724c5fa6.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2200-57c1f5c2ae1dad70.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2347.ef36ce4322b451d1.js",revision:"ef36ce4322b451d1"},{url:"/_next/static/chunks/2564-5a8dcdfb20abd6a8.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/277-4b92422e0dd77f4b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2878-bb61f0752e5f06e6.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/2f0b94e8-009c4fe7d09feb3b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/3063-392cf10d902d1d57.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/30a37ab2-c194af7319be38d5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4026-0c1450ede9e9d058.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4139-ae1bd859311056aa.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4191-17511b5bb8d710a2.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4277-23d3626bb2535746.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/473f56c0-6b03c6907205fb07.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/4bd1b696-29c1d99d049afc50.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5274-4fc2df354ce7ef88.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5470-88842a1e3eb51b04.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/5728.12b88c9a7cf9f3d8.js",revision:"12b88c9a7cf9f3d8"},{url:"/_next/static/chunks/6047-230155c320ecccab.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6281-88eea553f9a87ab0.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/658-5fd6cdc383acd9d5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6874-3389db82a2c367e3.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/6885-085169be9377ee78.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/7022-4eb19c5647273d0b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/70646a03-49307dd85cd81a56.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/7248-f5f3aca7ad687091.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8225-e9e280387ece4bd2.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8252-125ae14c1f773066.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8260-a2d6da7ba3d8f3da.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/8844-f28ae56012058f65.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/930-63713162fb98c1f9.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/9608-7ebebc96817e5764.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/972.9dee389435e21097.js",revision:"9dee389435e21097"},{url:"/_next/static/chunks/app/_not-found/page-e021c69819b6c202.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/about-us/page-733cc13964489540.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin-lottery/page-0872504be0c5ce86.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin/layout-b34a32a6c44d9c2f.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/admin/page-ba3501461696b75a.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/api/price/route-d7ff5854924f6fdc.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/configure/page-9db3d8831e9168bf.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/contact-us/page-62ade46c57388c09.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/buy-tickets/page-e78b023de6169ef5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/claim/page-aeeca46d691088bd.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/dashboard/page-586fd77169bd0750.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/layout-f80554f204e1d958.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/mint/page-134c618992e23663.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/page-41d42d77a83ebacb.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/dapp/unmint/page-da4152c53b71bace.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/debug/page-1142d1559c7b206d.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/how-it-works/page-03189833d8fe55ad.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/i18n-demo/page-a15b2b017158ab1e.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/jackpot-report/page-9b71ed7bb679fffc.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/layout-a098e52d49134f15.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/not-found-5095b03fcdaa1009.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/page-2a76d79592010369.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/play/confirmation/page-cd1c54eaca96a4c4.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/play/page-2a4a57e2265e5e69.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/prizes/page-accf0412f40674e5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/profile/page-eb4046598a37c38b.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/results/%5BdrawId%5D/page-c28ef5663ff02cc1.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/app/results/page-18e303c64cc09a13.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/e6909d18-d1e7bf26fe24aa96.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/framework-fc63273ed5a51da5.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/main-a460c7fac429e573.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/main-app-e4c6a0453a83baa7.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/pages/_app-5d1abe03d322390c.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/pages/_error-3b2a1d523de49635.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-c8b3617e853d3c50.js",revision:"iCaUWjtmr8nS2ABz6lyYO"},{url:"/_next/static/css/a3548ace7fb40a91.css",revision:"a3548ace7fb40a91"},{url:"/_next/static/iCaUWjtmr8nS2ABz6lyYO/_buildManifest.js",revision:"f45e51bfddb1d656d7abd0bfc4679fa5"},{url:"/_next/static/iCaUWjtmr8nS2ABz6lyYO/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/blast-icon-color.svg",revision:"d949ffbc94b7c50e2e4fcf2b1daf1607"},{url:"/debug-icon.svg",revision:"62ce54a2ddb8d11cb25c891c9adbdbea"},{url:"/debug-image.png",revision:"34c4ca2676dd59ff24d6338faa1af371"},{url:"/explorer-icon.svg",revision:"f6413b9b86d870f77edeb18891f6b3d5"},{url:"/gradient-s.svg",revision:"1966c9867618efad27716a8591d9ade0"},{url:"/jackpot.svg",revision:"481b6e2e5e5fa92a5dc041f8803acb47"},{url:"/logo.ico",revision:"0359e607e29a3d3b08095d84a9d25c39"},{url:"/logo.svg",revision:"a497d49f3c5cf63fe06eda59345d5ec1"},{url:"/manifest.json",revision:"781788f3e2bc4b2b176b5d8c425d7475"},{url:"/overlay-blur-blue.svg",revision:"2ae16f575d0e2bf12ecaf14e6fe63439"},{url:"/overlay-blur-purple.svg",revision:"128571dc5c25ff9b1c452211584ba3f4"},{url:"/rpc-version.png",revision:"cf97fd668cfa1221bec0210824978027"},{url:"/scaffold-config.png",revision:"1ebfc244c31732dc4273fe292bd07596"},{url:"/sn-symbol-gradient.png",revision:"908b60a4f6b92155b8ea38a009fa7081"},{url:"/starkcompass-icon.svg",revision:"f8853deea695e7491b012b31a0e6ed82"},{url:"/starklotto-main-home.png",revision:"a5ac0d6b3535aa95802af961927381c4"},{url:"/strk-svg.svg",revision:"ebece79312b65a26a672c5fc6acb29b4"},{url:"/trophy.svg",revision:"e9348e094665c925720fdf316722bfb1"},{url:"/voyager-icon.svg",revision:"06663dd5ba2c49423225a8e3893b45fe"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); +if (!self.define) { + let e, + s = {}; + const n = (n, a) => ( + (n = new URL(n + ".js", a).href), + s[n] || + new Promise((s) => { + if ("document" in self) { + const e = document.createElement("script"); + ((e.src = n), (e.onload = s), document.head.appendChild(e)); + } else ((e = n), importScripts(n), s()); + }).then(() => { + let e = s[n]; + if (!e) throw new Error(`Module ${n} didn’t register its module`); + return e; + }) + ); + self.define = (a, i) => { + const t = + e || + ("document" in self ? document.currentScript.src : "") || + location.href; + if (s[t]) return; + let c = {}; + const r = (e) => n(e, t), + l = { module: { uri: t }, exports: c, require: r }; + s[t] = Promise.all(a.map((e) => l[e] || r(e))).then((e) => (i(...e), c)); + }; +} +define(["./workbox-4754cb34"], function (e) { + "use strict"; + (importScripts(), + self.skipWaiting(), + e.clientsClaim(), + e.precacheAndRoute( + [ + { url: "/Andres.jpeg", revision: "d60720c95c1fd3d82dc681b4fe7a6977" }, + { url: "/David.jpeg", revision: "ed9364b636205805087b76f5d2bc92a1" }, + { + url: "/FutureMindsLogo.png", + revision: "5d1b117ea1cd8acec1db5384a7e93290", + }, + { url: "/Jeff.jpeg", revision: "db1b90dc9668178b88891f1290659583" }, + { url: "/Joseph.jpeg", revision: "6a30f4063a312f5e19e6ec54ae833831" }, + { url: "/Kim.png", revision: "afe82c70a85aab93417aaff6cf74179b" }, + { + url: "/Logo-sin-texto.png", + revision: "7fbf40dd5ec3cdec627b28490dec1430", + }, + { + url: "/Logo_Sin_Texto_Transparente.png", + revision: "e1015ed1b3bc6467b6d76194dbe66d8e", + }, + { url: "/Profile.svg", revision: "7ec057e52553d10cbcbfa1558c731aec" }, + { + url: "/Starklotto.png", + revision: "28f2c14b1e65406102932aa7c1b61060", + }, + { + url: "/_next/app-build-manifest.json", + revision: "bb0b4ba27f16bc2877076316c2bfdd85", + }, + { + url: "/_next/static/chunks/1186-9a65c2a5586b201c.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/1218-eb34d217f148215b.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/1684-dc4632b38f8aec56.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/2077-0faa45e0724c5fa6.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/2200-57c1f5c2ae1dad70.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/2347.ef36ce4322b451d1.js", + revision: "ef36ce4322b451d1", + }, + { + url: "/_next/static/chunks/2564-5a8dcdfb20abd6a8.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/277-4b92422e0dd77f4b.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/2878-bb61f0752e5f06e6.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/2f0b94e8-009c4fe7d09feb3b.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/3063-392cf10d902d1d57.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/30a37ab2-c194af7319be38d5.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/4026-0c1450ede9e9d058.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/4139-ae1bd859311056aa.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/4191-17511b5bb8d710a2.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/4277-23d3626bb2535746.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/473f56c0-6b03c6907205fb07.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/4bd1b696-29c1d99d049afc50.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/5274-4fc2df354ce7ef88.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/5470-88842a1e3eb51b04.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/5728.12b88c9a7cf9f3d8.js", + revision: "12b88c9a7cf9f3d8", + }, + { + url: "/_next/static/chunks/6047-230155c320ecccab.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/6281-88eea553f9a87ab0.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/658-5fd6cdc383acd9d5.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/6874-3389db82a2c367e3.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/6885-085169be9377ee78.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/7022-4eb19c5647273d0b.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/70646a03-49307dd85cd81a56.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/7248-f5f3aca7ad687091.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/8225-e9e280387ece4bd2.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/8252-125ae14c1f773066.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/8260-a2d6da7ba3d8f3da.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/8844-f28ae56012058f65.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/930-63713162fb98c1f9.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/9608-7ebebc96817e5764.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/972.9dee389435e21097.js", + revision: "9dee389435e21097", + }, + { + url: "/_next/static/chunks/app/_not-found/page-e021c69819b6c202.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/about-us/page-733cc13964489540.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/admin-lottery/page-0872504be0c5ce86.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/admin/layout-b34a32a6c44d9c2f.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/admin/page-ba3501461696b75a.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/api/price/route-d7ff5854924f6fdc.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/configure/page-9db3d8831e9168bf.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/contact-us/page-62ade46c57388c09.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/buy-tickets/page-e78b023de6169ef5.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/claim/page-aeeca46d691088bd.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/dashboard/page-586fd77169bd0750.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/layout-f80554f204e1d958.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/mint/page-134c618992e23663.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/page-41d42d77a83ebacb.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/dapp/unmint/page-da4152c53b71bace.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/debug/page-1142d1559c7b206d.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/how-it-works/page-03189833d8fe55ad.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/i18n-demo/page-a15b2b017158ab1e.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/jackpot-report/page-9b71ed7bb679fffc.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/layout-a098e52d49134f15.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/not-found-5095b03fcdaa1009.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/page-2a76d79592010369.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/play/confirmation/page-cd1c54eaca96a4c4.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/play/page-2a4a57e2265e5e69.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/prizes/page-accf0412f40674e5.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/profile/page-eb4046598a37c38b.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/results/%5BdrawId%5D/page-c28ef5663ff02cc1.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/app/results/page-18e303c64cc09a13.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/e6909d18-d1e7bf26fe24aa96.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/framework-fc63273ed5a51da5.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/main-a460c7fac429e573.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/main-app-e4c6a0453a83baa7.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/pages/_app-5d1abe03d322390c.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/pages/_error-3b2a1d523de49635.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/chunks/polyfills-42372ed130431b0a.js", + revision: "846118c33b2c0e922d7b3a7676f81f6f", + }, + { + url: "/_next/static/chunks/webpack-c8b3617e853d3c50.js", + revision: "iCaUWjtmr8nS2ABz6lyYO", + }, + { + url: "/_next/static/css/a3548ace7fb40a91.css", + revision: "a3548ace7fb40a91", + }, + { + url: "/_next/static/iCaUWjtmr8nS2ABz6lyYO/_buildManifest.js", + revision: "f45e51bfddb1d656d7abd0bfc4679fa5", + }, + { + url: "/_next/static/iCaUWjtmr8nS2ABz6lyYO/_ssgManifest.js", + revision: "b6652df95db52feb4daf4eca35380933", + }, + { + url: "/blast-icon-color.svg", + revision: "d949ffbc94b7c50e2e4fcf2b1daf1607", + }, + { + url: "/debug-icon.svg", + revision: "62ce54a2ddb8d11cb25c891c9adbdbea", + }, + { + url: "/debug-image.png", + revision: "34c4ca2676dd59ff24d6338faa1af371", + }, + { + url: "/explorer-icon.svg", + revision: "f6413b9b86d870f77edeb18891f6b3d5", + }, + { + url: "/gradient-s.svg", + revision: "1966c9867618efad27716a8591d9ade0", + }, + { url: "/jackpot.svg", revision: "481b6e2e5e5fa92a5dc041f8803acb47" }, + { url: "/logo.ico", revision: "0359e607e29a3d3b08095d84a9d25c39" }, + { url: "/logo.svg", revision: "a497d49f3c5cf63fe06eda59345d5ec1" }, + { url: "/manifest.json", revision: "781788f3e2bc4b2b176b5d8c425d7475" }, + { + url: "/overlay-blur-blue.svg", + revision: "2ae16f575d0e2bf12ecaf14e6fe63439", + }, + { + url: "/overlay-blur-purple.svg", + revision: "128571dc5c25ff9b1c452211584ba3f4", + }, + { + url: "/rpc-version.png", + revision: "cf97fd668cfa1221bec0210824978027", + }, + { + url: "/scaffold-config.png", + revision: "1ebfc244c31732dc4273fe292bd07596", + }, + { + url: "/sn-symbol-gradient.png", + revision: "908b60a4f6b92155b8ea38a009fa7081", + }, + { + url: "/starkcompass-icon.svg", + revision: "f8853deea695e7491b012b31a0e6ed82", + }, + { + url: "/starklotto-main-home.png", + revision: "a5ac0d6b3535aa95802af961927381c4", + }, + { url: "/strk-svg.svg", revision: "ebece79312b65a26a672c5fc6acb29b4" }, + { url: "/trophy.svg", revision: "e9348e094665c925720fdf316722bfb1" }, + { + url: "/voyager-icon.svg", + revision: "06663dd5ba2c49423225a8e3893b45fe", + }, + ], + { ignoreURLParametersMatching: [] }, + ), + e.cleanupOutdatedCaches(), + e.registerRoute( + "/", + new e.NetworkFirst({ + cacheName: "start-url", + plugins: [ + { + cacheWillUpdate: async ({ + request: e, + response: s, + event: n, + state: a, + }) => + s && "opaqueredirect" === s.type + ? new Response(s.body, { + status: 200, + statusText: "OK", + headers: s.headers, + }) + : s, + }, + ], + }), + "GET", + ), + e.registerRoute( + /^https:\/\/fonts\.(?:gstatic)\.com\/.*/i, + new e.CacheFirst({ + cacheName: "google-fonts-webfonts", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 31536e3 }), + ], + }), + "GET", + ), + e.registerRoute( + /^https:\/\/fonts\.(?:googleapis)\.com\/.*/i, + new e.StaleWhileRevalidate({ + cacheName: "google-fonts-stylesheets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 604800 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i, + new e.StaleWhileRevalidate({ + cacheName: "static-font-assets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 4, maxAgeSeconds: 604800 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i, + new e.StaleWhileRevalidate({ + cacheName: "static-image-assets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 64, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\/_next\/image\?url=.+$/i, + new e.StaleWhileRevalidate({ + cacheName: "next-image", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 64, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:mp3|wav|ogg)$/i, + new e.CacheFirst({ + cacheName: "static-audio-assets", + plugins: [ + new e.RangeRequestsPlugin(), + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:mp4)$/i, + new e.CacheFirst({ + cacheName: "static-video-assets", + plugins: [ + new e.RangeRequestsPlugin(), + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:js)$/i, + new e.StaleWhileRevalidate({ + cacheName: "static-js-assets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:css|less)$/i, + new e.StaleWhileRevalidate({ + cacheName: "static-style-assets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\/_next\/data\/.+\/.+\.json$/i, + new e.StaleWhileRevalidate({ + cacheName: "next-data", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + /\.(?:json|xml|csv)$/i, + new e.NetworkFirst({ + cacheName: "static-data-assets", + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + ({ url: e }) => { + if (!(self.origin === e.origin)) return !1; + const s = e.pathname; + return !s.startsWith("/api/auth/") && !!s.startsWith("/api/"); + }, + new e.NetworkFirst({ + cacheName: "apis", + networkTimeoutSeconds: 10, + plugins: [ + new e.ExpirationPlugin({ maxEntries: 16, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + ({ url: e }) => { + if (!(self.origin === e.origin)) return !1; + return !e.pathname.startsWith("/api/"); + }, + new e.NetworkFirst({ + cacheName: "others", + networkTimeoutSeconds: 10, + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 86400 }), + ], + }), + "GET", + ), + e.registerRoute( + ({ url: e }) => !(self.origin === e.origin), + new e.NetworkFirst({ + cacheName: "cross-origin", + networkTimeoutSeconds: 10, + plugins: [ + new e.ExpirationPlugin({ maxEntries: 32, maxAgeSeconds: 3600 }), + ], + }), + "GET", + )); +}); diff --git a/packages/nextjs/public/workbox-4754cb34.js b/packages/nextjs/public/workbox-4754cb34.js index 788fd6c4..5b2355a5 100644 --- a/packages/nextjs/public/workbox-4754cb34.js +++ b/packages/nextjs/public/workbox-4754cb34.js @@ -1 +1,1322 @@ -define(["exports"],function(t){"use strict";try{self["workbox:core:6.5.4"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.4"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);function h(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}try{self["workbox:strategies:6.5.4"]&&_()}catch(t){}const u={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null},l={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},f=t=>[l.prefix,t,l.suffix].filter(t=>t&&t.length>0).join("-"),w=t=>t||f(l.precache),d=t=>t||f(l.runtime);function p(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class y{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}const g=new Set;function m(t){return"string"==typeof t?new Request(t):t}class v{constructor(t,e){this.h={},Object.assign(this,e),this.event=e.event,this.u=t,this.l=new y,this.p=[],this.m=[...t.plugins],this.v=new Map;for(const t of this.m)this.v.set(t,{});this.event.waitUntil(this.l.promise)}async fetch(t){const{event:e}=this;let n=m(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.u.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:r}=this.u,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=m(t);var r;await(r=0,new Promise(t=>setTimeout(t,r)));const i=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=i.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.R(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.u,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const r=p(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===p(e.url,s))return t.match(e,n)}(u,i.clone(),["__WB_REVISION__"],h):null;try{await u.put(i,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of g)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.h[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await t({mode:e,request:n,event:this.event,params:this.params}));this.h[s]=n}return this.h[s]}hasCallback(t){for(const e of this.u.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.u.plugins)if("function"==typeof e[t]){const s=this.v.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.p.push(t),t}async doneWaiting(){let t;for(;t=this.p.shift();)await t}destroy(){this.l.resolve(null)}async R(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class R{constructor(t={}){this.cacheName=d(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new v(this,{event:e,request:s,params:n}),i=this.q(r,s,e);return[i,this.D(i,r,s,e)]}async q(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async D(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}function b(t){t.then(()=>{})}function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function O(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(U||(U=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(B(this),e),k(x.get(this))}:function(...e){return k(t.apply(B(this),e))}:function(e,...s){const n=t.call(B(this),e,...s);return I.set(n,e.sort?e.sort():[e]),k(n)}}function T(t){return"function"==typeof t?O(t):(t instanceof IDBTransaction&&function(t){if(L.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)});L.set(t,e)}(t),e=t,(D||(D=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,N):t);var e}function k(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(k(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)});return e.then(e=>{e instanceof IDBCursor&&x.set(e,t)}).catch(()=>{}),E.set(e,t),e}(t);if(C.has(t))return C.get(t);const e=T(t);return e!==t&&(C.set(t,e),E.set(e,t)),e}const B=t=>E.get(t);const P=["get","getKey","getAll","getAllKeys","count"],M=["put","add","delete","clear"],W=new Map;function j(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(W.get(e))return W.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=M.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!P.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return W.set(e,i),i}N=(t=>q({},t,{get:(e,s,n)=>j(e,s)||t.get(e,s,n),has:(e,s)=>!!j(e,s)||t.has(e,s)}))(N);try{self["workbox:expiration:6.5.4"]&&_()}catch(t){}const S="cache-entries",K=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class A{constructor(t){this._=null,this.L=t}I(t){const e=t.createObjectStore(S,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}C(t){this.I(t),this.L&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),k(s).then(()=>{})}(this.L)}async setTimestamp(t,e){const s={url:t=K(t),timestamp:e,cacheName:this.L,id:this.N(t)},n=(await this.getDb()).transaction(S,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(S,this.N(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(S).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.L&&(t&&s.timestamp=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(S,t.id),a.push(t.url);return a}N(t){return this.L+"|"+K(t)}async getDb(){return this._||(this._=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=k(a);return n&&a.addEventListener("upgradeneeded",t=>{n(k(a.result),t.oldVersion,t.newVersion,k(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{i&&t.addEventListener("close",()=>i()),r&&t.addEventListener("versionchange",t=>r(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.C.bind(this)})),this._}}class F{constructor(t,e={}){this.O=!1,this.T=!1,this.k=e.maxEntries,this.B=e.maxAgeSeconds,this.P=e.matchOptions,this.L=t,this.M=new A(t)}async expireEntries(){if(this.O)return void(this.T=!0);this.O=!0;const t=this.B?Date.now()-1e3*this.B:0,e=await this.M.expireEntries(t,this.k),s=await self.caches.open(this.L);for(const t of e)await s.delete(t,this.P);this.O=!1,this.T&&(this.T=!1,b(this.expireEntries()))}async updateTimestamp(t){await this.M.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.B){const e=await this.M.getTimestamp(t),s=Date.now()-1e3*this.B;return void 0===e||er||e&&e<0)throw new s("range-not-satisfiable",{size:r,end:n,start:e});let i,a;return void 0!==e&&void 0!==n?(i=e,a=n+1):void 0!==e&&void 0===n?(i=e,a=r):void 0!==n&&void 0===e&&(i=r-n,a=r),{start:i,end:a}}(i,r.start,r.end),o=i.slice(a.start,a.end),c=o.size,h=new Response(o,{status:206,statusText:"Partial Content",headers:e.headers});return h.headers.set("Content-Length",String(c)),h.headers.set("Content-Range",`bytes ${a.start}-${a.end-1}/${i.size}`),h}catch(t){return new Response("",{status:416,statusText:"Range Not Satisfiable"})}}function $(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.5.4"]&&_()}catch(t){}function z(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const r=new URL(n,location.href),i=new URL(n,location.href);return r.searchParams.set("__WB_REVISION__",e),{cacheKey:r.href,url:i.href}}class G{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class V{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.W.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.W=t}}let J,Q;async function X(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const r=t.clone(),i={headers:new Headers(r.headers),status:r.status,statusText:r.statusText},a=e?e(i):i,o=function(){if(void 0===J){const t=new Response("");if("body"in t)try{new Response(t.body),J=!0}catch(t){J=!1}J=!1}return J}()?r.body:await r.blob();return new Response(o,a)}class Y extends R{constructor(t={}){t.cacheName=w(t.cacheName),super(t),this.j=!1!==t.fallbackToNetwork,this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)}async U(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.S(t,e):await this.K(t,e))}async K(t,e){let n;const r=e.params||{};if(!this.j)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=r.integrity,i=t.integrity,a=!i||i===s;n=await e.fetch(new Request(t,{integrity:"no-cors"!==t.mode?i||s:void 0})),s&&a&&"no-cors"!==t.mode&&(this.A(),await e.cachePut(t,n.clone()))}return n}async S(t,e){this.A();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}A(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==Y.copyRedirectedCacheableResponsesPlugin&&(n===Y.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(Y.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}Y.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},Y.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await X(t):t};class Z{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.F=new Map,this.H=new Map,this.$=new Map,this.u=new Y({cacheName:w(t),plugins:[...e,new V({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.u}precache(t){this.addToCacheList(t),this.G||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.G=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:r}=z(n),i="string"!=typeof n&&n.revision?"reload":"default";if(this.F.has(r)&&this.F.get(r)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.F.get(r),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.$.has(t)&&this.$.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:r});this.$.set(t,n.integrity)}if(this.F.set(r,t),this.H.set(r,i),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return $(t,async()=>{const e=new G;this.strategy.plugins.push(e);for(const[e,s]of this.F){const n=this.$.get(s),r=this.H.get(e),i=new Request(e,{integrity:n,cache:r,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:i,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}})}activate(t){return $(t,async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.F.values()),n=[];for(const r of e)s.has(r.url)||(await t.delete(r),n.push(r.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this.F}getCachedURLs(){return[...this.F.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.F.get(e.href)}getIntegrityForCacheKey(t){return this.$.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}const tt=()=>(Q||(Q=new Z),Q);class et extends r{constructor(t,e){super(({request:s})=>{const n=t.getURLsToCacheKeys();for(const r of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const i=new URL(t,location.href);i.hash="",yield i.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some(t=>t.test(s))&&t.searchParams.delete(s);return t}(i,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(r){const t=r({url:i});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(r);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}},t.strategy)}}t.CacheFirst=class extends R{async U(t,e){let n,r=await e.cacheMatch(t);if(!r)try{r=await e.fetchAndCachePut(t)}catch(t){t instanceof Error&&(n=t)}if(!r)throw new s("no-response",{url:t.url,error:n});return r}},t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.V(n),i=this.J(s);b(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.J(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.X=t,this.B=t.maxAgeSeconds,this.Y=new Map,t.purgeOnQuotaError&&function(t){g.add(t)}(()=>this.deleteCacheAndMetadata())}J(t){if(t===d())throw new s("expire-custom-caches-only");let e=this.Y.get(t);return e||(e=new F(t,this.X),this.Y.set(t,e)),e}V(t){if(!this.B)return!0;const e=this.Z(t);if(null===e)return!0;return e>=Date.now()-1e3*this.B}Z(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.Y)await self.caches.delete(t),await e.delete();this.Y=new Map}},t.NetworkFirst=class extends R{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u),this.tt=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.tt){const{id:s,promise:a}=this.et({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.st({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}et({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t))},1e3*this.tt)}),id:n}}async st({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.RangeRequestsPlugin=class{constructor(){this.cachedResponseWillBeUsed=async({request:t,cachedResponse:e})=>e&&t.headers.has("range")?await H(t,e):e}},t.StaleWhileRevalidate=class extends R{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(u)}async U(t,e){const n=e.fetchAndCachePut(t).catch(()=>{});e.waitUntil(n);let r,i=await e.cacheMatch(t);if(i);else try{i=await n}catch(t){t instanceof Error&&(r=t)}if(!i)throw new s("no-response",{url:t.url,error:r});return i}},t.cleanupOutdatedCaches=function(){self.addEventListener("activate",t=>{const e=w();t.waitUntil((async(t,e="-precache-")=>{const s=(await self.caches.keys()).filter(s=>s.includes(e)&&s.includes(self.registration.scope)&&s!==t);return await Promise.all(s.map(t=>self.caches.delete(t))),s})(e).then(t=>{}))})},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.precacheAndRoute=function(t,e){!function(t){tt().precache(t)}(t),function(t){const e=tt();h(new et(e,t))}(e)},t.registerRoute=h}); +define(["exports"], function (t) { + "use strict"; + try { + self["workbox:core:6.5.4"] && _(); + } catch (t) {} + const e = (t, ...e) => { + let s = t; + return (e.length > 0 && (s += ` :: ${JSON.stringify(e)}`), s); + }; + class s extends Error { + constructor(t, s) { + (super(e(t, s)), (this.name = t), (this.details = s)); + } + } + try { + self["workbox:routing:6.5.4"] && _(); + } catch (t) {} + const n = (t) => (t && "object" == typeof t ? t : { handle: t }); + class r { + constructor(t, e, s = "GET") { + ((this.handler = n(e)), (this.match = t), (this.method = s)); + } + setCatchHandler(t) { + this.catchHandler = n(t); + } + } + class i extends r { + constructor(t, e, s) { + super( + ({ url: e }) => { + const s = t.exec(e.href); + if (s && (e.origin === location.origin || 0 === s.index)) + return s.slice(1); + }, + e, + s, + ); + } + } + class a { + constructor() { + ((this.t = new Map()), (this.i = new Map())); + } + get routes() { + return this.t; + } + addFetchListener() { + self.addEventListener("fetch", (t) => { + const { request: e } = t, + s = this.handleRequest({ request: e, event: t }); + s && t.respondWith(s); + }); + } + addCacheListener() { + self.addEventListener("message", (t) => { + if (t.data && "CACHE_URLS" === t.data.type) { + const { payload: e } = t.data, + s = Promise.all( + e.urlsToCache.map((e) => { + "string" == typeof e && (e = [e]); + const s = new Request(...e); + return this.handleRequest({ request: s, event: t }); + }), + ); + (t.waitUntil(s), + t.ports && t.ports[0] && s.then(() => t.ports[0].postMessage(!0))); + } + }); + } + handleRequest({ request: t, event: e }) { + const s = new URL(t.url, location.href); + if (!s.protocol.startsWith("http")) return; + const n = s.origin === location.origin, + { params: r, route: i } = this.findMatchingRoute({ + event: e, + request: t, + sameOrigin: n, + url: s, + }); + let a = i && i.handler; + const o = t.method; + if ((!a && this.i.has(o) && (a = this.i.get(o)), !a)) return; + let c; + try { + c = a.handle({ url: s, request: t, event: e, params: r }); + } catch (t) { + c = Promise.reject(t); + } + const h = i && i.catchHandler; + return ( + c instanceof Promise && + (this.o || h) && + (c = c.catch(async (n) => { + if (h) + try { + return await h.handle({ + url: s, + request: t, + event: e, + params: r, + }); + } catch (t) { + t instanceof Error && (n = t); + } + if (this.o) return this.o.handle({ url: s, request: t, event: e }); + throw n; + })), + c + ); + } + findMatchingRoute({ url: t, sameOrigin: e, request: s, event: n }) { + const r = this.t.get(s.method) || []; + for (const i of r) { + let r; + const a = i.match({ url: t, sameOrigin: e, request: s, event: n }); + if (a) + return ( + (r = a), + ((Array.isArray(r) && 0 === r.length) || + (a.constructor === Object && 0 === Object.keys(a).length) || + "boolean" == typeof a) && + (r = void 0), + { route: i, params: r } + ); + } + return {}; + } + setDefaultHandler(t, e = "GET") { + this.i.set(e, n(t)); + } + setCatchHandler(t) { + this.o = n(t); + } + registerRoute(t) { + (this.t.has(t.method) || this.t.set(t.method, []), + this.t.get(t.method).push(t)); + } + unregisterRoute(t) { + if (!this.t.has(t.method)) + throw new s("unregister-route-but-not-found-with-method", { + method: t.method, + }); + const e = this.t.get(t.method).indexOf(t); + if (!(e > -1)) throw new s("unregister-route-route-not-registered"); + this.t.get(t.method).splice(e, 1); + } + } + let o; + const c = () => ( + o || ((o = new a()), o.addFetchListener(), o.addCacheListener()), + o + ); + function h(t, e, n) { + let a; + if ("string" == typeof t) { + const s = new URL(t, location.href); + a = new r(({ url: t }) => t.href === s.href, e, n); + } else if (t instanceof RegExp) a = new i(t, e, n); + else if ("function" == typeof t) a = new r(t, e, n); + else { + if (!(t instanceof r)) + throw new s("unsupported-route-type", { + moduleName: "workbox-routing", + funcName: "registerRoute", + paramName: "capture", + }); + a = t; + } + return (c().registerRoute(a), a); + } + try { + self["workbox:strategies:6.5.4"] && _(); + } catch (t) {} + const u = { + cacheWillUpdate: async ({ response: t }) => + 200 === t.status || 0 === t.status ? t : null, + }, + l = { + googleAnalytics: "googleAnalytics", + precache: "precache-v2", + prefix: "workbox", + runtime: "runtime", + suffix: "undefined" != typeof registration ? registration.scope : "", + }, + f = (t) => + [l.prefix, t, l.suffix].filter((t) => t && t.length > 0).join("-"), + w = (t) => t || f(l.precache), + d = (t) => t || f(l.runtime); + function p(t, e) { + const s = new URL(t); + for (const t of e) s.searchParams.delete(t); + return s.href; + } + class y { + constructor() { + this.promise = new Promise((t, e) => { + ((this.resolve = t), (this.reject = e)); + }); + } + } + const g = new Set(); + function m(t) { + return "string" == typeof t ? new Request(t) : t; + } + class v { + constructor(t, e) { + ((this.h = {}), + Object.assign(this, e), + (this.event = e.event), + (this.u = t), + (this.l = new y()), + (this.p = []), + (this.m = [...t.plugins]), + (this.v = new Map())); + for (const t of this.m) this.v.set(t, {}); + this.event.waitUntil(this.l.promise); + } + async fetch(t) { + const { event: e } = this; + let n = m(t); + if ( + "navigate" === n.mode && + e instanceof FetchEvent && + e.preloadResponse + ) { + const t = await e.preloadResponse; + if (t) return t; + } + const r = this.hasCallback("fetchDidFail") ? n.clone() : null; + try { + for (const t of this.iterateCallbacks("requestWillFetch")) + n = await t({ request: n.clone(), event: e }); + } catch (t) { + if (t instanceof Error) + throw new s("plugin-error-request-will-fetch", { + thrownErrorMessage: t.message, + }); + } + const i = n.clone(); + try { + let t; + t = await fetch( + n, + "navigate" === n.mode ? void 0 : this.u.fetchOptions, + ); + for (const s of this.iterateCallbacks("fetchDidSucceed")) + t = await s({ event: e, request: i, response: t }); + return t; + } catch (t) { + throw ( + r && + (await this.runCallbacks("fetchDidFail", { + error: t, + event: e, + originalRequest: r.clone(), + request: i.clone(), + })), + t + ); + } + } + async fetchAndCachePut(t) { + const e = await this.fetch(t), + s = e.clone(); + return (this.waitUntil(this.cachePut(t, s)), e); + } + async cacheMatch(t) { + const e = m(t); + let s; + const { cacheName: n, matchOptions: r } = this.u, + i = await this.getCacheKey(e, "read"), + a = Object.assign(Object.assign({}, r), { cacheName: n }); + s = await caches.match(i, a); + for (const t of this.iterateCallbacks("cachedResponseWillBeUsed")) + s = + (await t({ + cacheName: n, + matchOptions: r, + cachedResponse: s, + request: i, + event: this.event, + })) || void 0; + return s; + } + async cachePut(t, e) { + const n = m(t); + var r; + await ((r = 0), new Promise((t) => setTimeout(t, r))); + const i = await this.getCacheKey(n, "write"); + if (!e) + throw new s("cache-put-with-no-response", { + url: + ((a = i.url), + new URL(String(a), location.href).href.replace( + new RegExp(`^${location.origin}`), + "", + )), + }); + var a; + const o = await this.R(e); + if (!o) return !1; + const { cacheName: c, matchOptions: h } = this.u, + u = await self.caches.open(c), + l = this.hasCallback("cacheDidUpdate"), + f = l + ? await (async function (t, e, s, n) { + const r = p(e.url, s); + if (e.url === r) return t.match(e, n); + const i = Object.assign(Object.assign({}, n), { + ignoreSearch: !0, + }), + a = await t.keys(e, i); + for (const e of a) if (r === p(e.url, s)) return t.match(e, n); + })(u, i.clone(), ["__WB_REVISION__"], h) + : null; + try { + await u.put(i, l ? o.clone() : o); + } catch (t) { + if (t instanceof Error) + throw ( + "QuotaExceededError" === t.name && + (await (async function () { + for (const t of g) await t(); + })()), + t + ); + } + for (const t of this.iterateCallbacks("cacheDidUpdate")) + await t({ + cacheName: c, + oldResponse: f, + newResponse: o.clone(), + request: i, + event: this.event, + }); + return !0; + } + async getCacheKey(t, e) { + const s = `${t.url} | ${e}`; + if (!this.h[s]) { + let n = t; + for (const t of this.iterateCallbacks("cacheKeyWillBeUsed")) + n = m( + await t({ + mode: e, + request: n, + event: this.event, + params: this.params, + }), + ); + this.h[s] = n; + } + return this.h[s]; + } + hasCallback(t) { + for (const e of this.u.plugins) if (t in e) return !0; + return !1; + } + async runCallbacks(t, e) { + for (const s of this.iterateCallbacks(t)) await s(e); + } + *iterateCallbacks(t) { + for (const e of this.u.plugins) + if ("function" == typeof e[t]) { + const s = this.v.get(e), + n = (n) => { + const r = Object.assign(Object.assign({}, n), { state: s }); + return e[t](r); + }; + yield n; + } + } + waitUntil(t) { + return (this.p.push(t), t); + } + async doneWaiting() { + let t; + for (; (t = this.p.shift()); ) await t; + } + destroy() { + this.l.resolve(null); + } + async R(t) { + let e = t, + s = !1; + for (const t of this.iterateCallbacks("cacheWillUpdate")) + if ( + ((e = + (await t({ + request: this.request, + response: e, + event: this.event, + })) || void 0), + (s = !0), + !e) + ) + break; + return (s || (e && 200 !== e.status && (e = void 0)), e); + } + } + class R { + constructor(t = {}) { + ((this.cacheName = d(t.cacheName)), + (this.plugins = t.plugins || []), + (this.fetchOptions = t.fetchOptions), + (this.matchOptions = t.matchOptions)); + } + handle(t) { + const [e] = this.handleAll(t); + return e; + } + handleAll(t) { + t instanceof FetchEvent && (t = { event: t, request: t.request }); + const e = t.event, + s = "string" == typeof t.request ? new Request(t.request) : t.request, + n = "params" in t ? t.params : void 0, + r = new v(this, { event: e, request: s, params: n }), + i = this.q(r, s, e); + return [i, this.D(i, r, s, e)]; + } + async q(t, e, n) { + let r; + await t.runCallbacks("handlerWillStart", { event: n, request: e }); + try { + if (((r = await this.U(e, t)), !r || "error" === r.type)) + throw new s("no-response", { url: e.url }); + } catch (s) { + if (s instanceof Error) + for (const i of t.iterateCallbacks("handlerDidError")) + if (((r = await i({ error: s, event: n, request: e })), r)) break; + if (!r) throw s; + } + for (const s of t.iterateCallbacks("handlerWillRespond")) + r = await s({ event: n, request: e, response: r }); + return r; + } + async D(t, e, s, n) { + let r, i; + try { + r = await t; + } catch (i) {} + try { + (await e.runCallbacks("handlerDidRespond", { + event: n, + request: s, + response: r, + }), + await e.doneWaiting()); + } catch (t) { + t instanceof Error && (i = t); + } + if ( + (await e.runCallbacks("handlerDidComplete", { + event: n, + request: s, + response: r, + error: i, + }), + e.destroy(), + i) + ) + throw i; + } + } + function b(t) { + t.then(() => {}); + } + function q() { + return ( + (q = Object.assign + ? Object.assign.bind() + : function (t) { + for (var e = 1; e < arguments.length; e++) { + var s = arguments[e]; + for (var n in s) ({}).hasOwnProperty.call(s, n) && (t[n] = s[n]); + } + return t; + }), + q.apply(null, arguments) + ); + } + let D, U; + const x = new WeakMap(), + L = new WeakMap(), + I = new WeakMap(), + C = new WeakMap(), + E = new WeakMap(); + let N = { + get(t, e, s) { + if (t instanceof IDBTransaction) { + if ("done" === e) return L.get(t); + if ("objectStoreNames" === e) return t.objectStoreNames || I.get(t); + if ("store" === e) + return s.objectStoreNames[1] + ? void 0 + : s.objectStore(s.objectStoreNames[0]); + } + return k(t[e]); + }, + set: (t, e, s) => ((t[e] = s), !0), + has: (t, e) => + (t instanceof IDBTransaction && ("done" === e || "store" === e)) || + e in t, + }; + function O(t) { + return t !== IDBDatabase.prototype.transaction || + "objectStoreNames" in IDBTransaction.prototype + ? ( + U || + (U = [ + IDBCursor.prototype.advance, + IDBCursor.prototype.continue, + IDBCursor.prototype.continuePrimaryKey, + ]) + ).includes(t) + ? function (...e) { + return (t.apply(B(this), e), k(x.get(this))); + } + : function (...e) { + return k(t.apply(B(this), e)); + } + : function (e, ...s) { + const n = t.call(B(this), e, ...s); + return (I.set(n, e.sort ? e.sort() : [e]), k(n)); + }; + } + function T(t) { + return "function" == typeof t + ? O(t) + : (t instanceof IDBTransaction && + (function (t) { + if (L.has(t)) return; + const e = new Promise((e, s) => { + const n = () => { + (t.removeEventListener("complete", r), + t.removeEventListener("error", i), + t.removeEventListener("abort", i)); + }, + r = () => { + (e(), n()); + }, + i = () => { + (s(t.error || new DOMException("AbortError", "AbortError")), + n()); + }; + (t.addEventListener("complete", r), + t.addEventListener("error", i), + t.addEventListener("abort", i)); + }); + L.set(t, e); + })(t), + (e = t), + ( + D || + (D = [ + IDBDatabase, + IDBObjectStore, + IDBIndex, + IDBCursor, + IDBTransaction, + ]) + ).some((t) => e instanceof t) + ? new Proxy(t, N) + : t); + var e; + } + function k(t) { + if (t instanceof IDBRequest) + return (function (t) { + const e = new Promise((e, s) => { + const n = () => { + (t.removeEventListener("success", r), + t.removeEventListener("error", i)); + }, + r = () => { + (e(k(t.result)), n()); + }, + i = () => { + (s(t.error), n()); + }; + (t.addEventListener("success", r), t.addEventListener("error", i)); + }); + return ( + e + .then((e) => { + e instanceof IDBCursor && x.set(e, t); + }) + .catch(() => {}), + E.set(e, t), + e + ); + })(t); + if (C.has(t)) return C.get(t); + const e = T(t); + return (e !== t && (C.set(t, e), E.set(e, t)), e); + } + const B = (t) => E.get(t); + const P = ["get", "getKey", "getAll", "getAllKeys", "count"], + M = ["put", "add", "delete", "clear"], + W = new Map(); + function j(t, e) { + if (!(t instanceof IDBDatabase) || e in t || "string" != typeof e) return; + if (W.get(e)) return W.get(e); + const s = e.replace(/FromIndex$/, ""), + n = e !== s, + r = M.includes(s); + if ( + !(s in (n ? IDBIndex : IDBObjectStore).prototype) || + (!r && !P.includes(s)) + ) + return; + const i = async function (t, ...e) { + const i = this.transaction(t, r ? "readwrite" : "readonly"); + let a = i.store; + return ( + n && (a = a.index(e.shift())), + (await Promise.all([a[s](...e), r && i.done]))[0] + ); + }; + return (W.set(e, i), i); + } + N = ((t) => + q({}, t, { + get: (e, s, n) => j(e, s) || t.get(e, s, n), + has: (e, s) => !!j(e, s) || t.has(e, s), + }))(N); + try { + self["workbox:expiration:6.5.4"] && _(); + } catch (t) {} + const S = "cache-entries", + K = (t) => { + const e = new URL(t, location.href); + return ((e.hash = ""), e.href); + }; + class A { + constructor(t) { + ((this._ = null), (this.L = t)); + } + I(t) { + const e = t.createObjectStore(S, { keyPath: "id" }); + (e.createIndex("cacheName", "cacheName", { unique: !1 }), + e.createIndex("timestamp", "timestamp", { unique: !1 })); + } + C(t) { + (this.I(t), + this.L && + (function (t, { blocked: e } = {}) { + const s = indexedDB.deleteDatabase(t); + (e && s.addEventListener("blocked", (t) => e(t.oldVersion, t)), + k(s).then(() => {})); + })(this.L)); + } + async setTimestamp(t, e) { + const s = { + url: (t = K(t)), + timestamp: e, + cacheName: this.L, + id: this.N(t), + }, + n = (await this.getDb()).transaction(S, "readwrite", { + durability: "relaxed", + }); + (await n.store.put(s), await n.done); + } + async getTimestamp(t) { + const e = await this.getDb(), + s = await e.get(S, this.N(t)); + return null == s ? void 0 : s.timestamp; + } + async expireEntries(t, e) { + const s = await this.getDb(); + let n = await s + .transaction(S) + .store.index("timestamp") + .openCursor(null, "prev"); + const r = []; + let i = 0; + for (; n; ) { + const s = n.value; + (s.cacheName === this.L && + ((t && s.timestamp < t) || (e && i >= e) ? r.push(n.value) : i++), + (n = await n.continue())); + } + const a = []; + for (const t of r) (await s.delete(S, t.id), a.push(t.url)); + return a; + } + N(t) { + return this.L + "|" + K(t); + } + async getDb() { + return ( + this._ || + (this._ = await (function ( + t, + e, + { blocked: s, upgrade: n, blocking: r, terminated: i } = {}, + ) { + const a = indexedDB.open(t, e), + o = k(a); + return ( + n && + a.addEventListener("upgradeneeded", (t) => { + n( + k(a.result), + t.oldVersion, + t.newVersion, + k(a.transaction), + t, + ); + }), + s && + a.addEventListener("blocked", (t) => + s(t.oldVersion, t.newVersion, t), + ), + o + .then((t) => { + (i && t.addEventListener("close", () => i()), + r && + t.addEventListener("versionchange", (t) => + r(t.oldVersion, t.newVersion, t), + )); + }) + .catch(() => {}), + o + ); + })("workbox-expiration", 1, { upgrade: this.C.bind(this) })), + this._ + ); + } + } + class F { + constructor(t, e = {}) { + ((this.O = !1), + (this.T = !1), + (this.k = e.maxEntries), + (this.B = e.maxAgeSeconds), + (this.P = e.matchOptions), + (this.L = t), + (this.M = new A(t))); + } + async expireEntries() { + if (this.O) return void (this.T = !0); + this.O = !0; + const t = this.B ? Date.now() - 1e3 * this.B : 0, + e = await this.M.expireEntries(t, this.k), + s = await self.caches.open(this.L); + for (const t of e) await s.delete(t, this.P); + ((this.O = !1), this.T && ((this.T = !1), b(this.expireEntries()))); + } + async updateTimestamp(t) { + await this.M.setTimestamp(t, Date.now()); + } + async isURLExpired(t) { + if (this.B) { + const e = await this.M.getTimestamp(t), + s = Date.now() - 1e3 * this.B; + return void 0 === e || e < s; + } + return !1; + } + async delete() { + ((this.T = !1), await this.M.expireEntries(1 / 0)); + } + } + try { + self["workbox:range-requests:6.5.4"] && _(); + } catch (t) {} + async function H(t, e) { + try { + if (206 === e.status) return e; + const n = t.headers.get("range"); + if (!n) throw new s("no-range-header"); + const r = (function (t) { + const e = t.trim().toLowerCase(); + if (!e.startsWith("bytes=")) + throw new s("unit-must-be-bytes", { normalizedRangeHeader: e }); + if (e.includes(",")) + throw new s("single-range-only", { normalizedRangeHeader: e }); + const n = /(\d*)-(\d*)/.exec(e); + if (!n || (!n[1] && !n[2])) + throw new s("invalid-range-values", { normalizedRangeHeader: e }); + return { + start: "" === n[1] ? void 0 : Number(n[1]), + end: "" === n[2] ? void 0 : Number(n[2]), + }; + })(n), + i = await e.blob(), + a = (function (t, e, n) { + const r = t.size; + if ((n && n > r) || (e && e < 0)) + throw new s("range-not-satisfiable", { size: r, end: n, start: e }); + let i, a; + return ( + void 0 !== e && void 0 !== n + ? ((i = e), (a = n + 1)) + : void 0 !== e && void 0 === n + ? ((i = e), (a = r)) + : void 0 !== n && void 0 === e && ((i = r - n), (a = r)), + { start: i, end: a } + ); + })(i, r.start, r.end), + o = i.slice(a.start, a.end), + c = o.size, + h = new Response(o, { + status: 206, + statusText: "Partial Content", + headers: e.headers, + }); + return ( + h.headers.set("Content-Length", String(c)), + h.headers.set( + "Content-Range", + `bytes ${a.start}-${a.end - 1}/${i.size}`, + ), + h + ); + } catch (t) { + return new Response("", { + status: 416, + statusText: "Range Not Satisfiable", + }); + } + } + function $(t, e) { + const s = e(); + return (t.waitUntil(s), s); + } + try { + self["workbox:precaching:6.5.4"] && _(); + } catch (t) {} + function z(t) { + if (!t) throw new s("add-to-cache-list-unexpected-type", { entry: t }); + if ("string" == typeof t) { + const e = new URL(t, location.href); + return { cacheKey: e.href, url: e.href }; + } + const { revision: e, url: n } = t; + if (!n) throw new s("add-to-cache-list-unexpected-type", { entry: t }); + if (!e) { + const t = new URL(n, location.href); + return { cacheKey: t.href, url: t.href }; + } + const r = new URL(n, location.href), + i = new URL(n, location.href); + return ( + r.searchParams.set("__WB_REVISION__", e), + { cacheKey: r.href, url: i.href } + ); + } + class G { + constructor() { + ((this.updatedURLs = []), + (this.notUpdatedURLs = []), + (this.handlerWillStart = async ({ request: t, state: e }) => { + e && (e.originalRequest = t); + }), + (this.cachedResponseWillBeUsed = async ({ + event: t, + state: e, + cachedResponse: s, + }) => { + if ( + "install" === t.type && + e && + e.originalRequest && + e.originalRequest instanceof Request + ) { + const t = e.originalRequest.url; + s ? this.notUpdatedURLs.push(t) : this.updatedURLs.push(t); + } + return s; + })); + } + } + class V { + constructor({ precacheController: t }) { + ((this.cacheKeyWillBeUsed = async ({ request: t, params: e }) => { + const s = + (null == e ? void 0 : e.cacheKey) || this.W.getCacheKeyForURL(t.url); + return s ? new Request(s, { headers: t.headers }) : t; + }), + (this.W = t)); + } + } + let J, Q; + async function X(t, e) { + let n = null; + if (t.url) { + n = new URL(t.url).origin; + } + if (n !== self.location.origin) + throw new s("cross-origin-copy-response", { origin: n }); + const r = t.clone(), + i = { + headers: new Headers(r.headers), + status: r.status, + statusText: r.statusText, + }, + a = e ? e(i) : i, + o = (function () { + if (void 0 === J) { + const t = new Response(""); + if ("body" in t) + try { + (new Response(t.body), (J = !0)); + } catch (t) { + J = !1; + } + J = !1; + } + return J; + })() + ? r.body + : await r.blob(); + return new Response(o, a); + } + class Y extends R { + constructor(t = {}) { + ((t.cacheName = w(t.cacheName)), + super(t), + (this.j = !1 !== t.fallbackToNetwork), + this.plugins.push(Y.copyRedirectedCacheableResponsesPlugin)); + } + async U(t, e) { + const s = await e.cacheMatch(t); + return ( + s || + (e.event && "install" === e.event.type + ? await this.S(t, e) + : await this.K(t, e)) + ); + } + async K(t, e) { + let n; + const r = e.params || {}; + if (!this.j) + throw new s("missing-precache-entry", { + cacheName: this.cacheName, + url: t.url, + }); + { + const s = r.integrity, + i = t.integrity, + a = !i || i === s; + ((n = await e.fetch( + new Request(t, { integrity: "no-cors" !== t.mode ? i || s : void 0 }), + )), + s && + a && + "no-cors" !== t.mode && + (this.A(), await e.cachePut(t, n.clone()))); + } + return n; + } + async S(t, e) { + this.A(); + const n = await e.fetch(t); + if (!(await e.cachePut(t, n.clone()))) + throw new s("bad-precaching-response", { + url: t.url, + status: n.status, + }); + return n; + } + A() { + let t = null, + e = 0; + for (const [s, n] of this.plugins.entries()) + n !== Y.copyRedirectedCacheableResponsesPlugin && + (n === Y.defaultPrecacheCacheabilityPlugin && (t = s), + n.cacheWillUpdate && e++); + 0 === e + ? this.plugins.push(Y.defaultPrecacheCacheabilityPlugin) + : e > 1 && null !== t && this.plugins.splice(t, 1); + } + } + ((Y.defaultPrecacheCacheabilityPlugin = { + cacheWillUpdate: async ({ response: t }) => + !t || t.status >= 400 ? null : t, + }), + (Y.copyRedirectedCacheableResponsesPlugin = { + cacheWillUpdate: async ({ response: t }) => + t.redirected ? await X(t) : t, + })); + class Z { + constructor({ + cacheName: t, + plugins: e = [], + fallbackToNetwork: s = !0, + } = {}) { + ((this.F = new Map()), + (this.H = new Map()), + (this.$ = new Map()), + (this.u = new Y({ + cacheName: w(t), + plugins: [...e, new V({ precacheController: this })], + fallbackToNetwork: s, + })), + (this.install = this.install.bind(this)), + (this.activate = this.activate.bind(this))); + } + get strategy() { + return this.u; + } + precache(t) { + (this.addToCacheList(t), + this.G || + (self.addEventListener("install", this.install), + self.addEventListener("activate", this.activate), + (this.G = !0))); + } + addToCacheList(t) { + const e = []; + for (const n of t) { + "string" == typeof n + ? e.push(n) + : n && void 0 === n.revision && e.push(n.url); + const { cacheKey: t, url: r } = z(n), + i = "string" != typeof n && n.revision ? "reload" : "default"; + if (this.F.has(r) && this.F.get(r) !== t) + throw new s("add-to-cache-list-conflicting-entries", { + firstEntry: this.F.get(r), + secondEntry: t, + }); + if ("string" != typeof n && n.integrity) { + if (this.$.has(t) && this.$.get(t) !== n.integrity) + throw new s("add-to-cache-list-conflicting-integrities", { + url: r, + }); + this.$.set(t, n.integrity); + } + if ((this.F.set(r, t), this.H.set(r, i), e.length > 0)) { + const t = `Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`; + console.warn(t); + } + } + } + install(t) { + return $(t, async () => { + const e = new G(); + this.strategy.plugins.push(e); + for (const [e, s] of this.F) { + const n = this.$.get(s), + r = this.H.get(e), + i = new Request(e, { + integrity: n, + cache: r, + credentials: "same-origin", + }); + await Promise.all( + this.strategy.handleAll({ + params: { cacheKey: s }, + request: i, + event: t, + }), + ); + } + const { updatedURLs: s, notUpdatedURLs: n } = e; + return { updatedURLs: s, notUpdatedURLs: n }; + }); + } + activate(t) { + return $(t, async () => { + const t = await self.caches.open(this.strategy.cacheName), + e = await t.keys(), + s = new Set(this.F.values()), + n = []; + for (const r of e) s.has(r.url) || (await t.delete(r), n.push(r.url)); + return { deletedURLs: n }; + }); + } + getURLsToCacheKeys() { + return this.F; + } + getCachedURLs() { + return [...this.F.keys()]; + } + getCacheKeyForURL(t) { + const e = new URL(t, location.href); + return this.F.get(e.href); + } + getIntegrityForCacheKey(t) { + return this.$.get(t); + } + async matchPrecache(t) { + const e = t instanceof Request ? t.url : t, + s = this.getCacheKeyForURL(e); + if (s) { + return (await self.caches.open(this.strategy.cacheName)).match(s); + } + } + createHandlerBoundToURL(t) { + const e = this.getCacheKeyForURL(t); + if (!e) throw new s("non-precached-url", { url: t }); + return (s) => ( + (s.request = new Request(t)), + (s.params = Object.assign({ cacheKey: e }, s.params)), + this.strategy.handle(s) + ); + } + } + const tt = () => (Q || (Q = new Z()), Q); + class et extends r { + constructor(t, e) { + super(({ request: s }) => { + const n = t.getURLsToCacheKeys(); + for (const r of (function* ( + t, + { + ignoreURLParametersMatching: e = [/^utm_/, /^fbclid$/], + directoryIndex: s = "index.html", + cleanURLs: n = !0, + urlManipulation: r, + } = {}, + ) { + const i = new URL(t, location.href); + ((i.hash = ""), yield i.href); + const a = (function (t, e = []) { + for (const s of [...t.searchParams.keys()]) + e.some((t) => t.test(s)) && t.searchParams.delete(s); + return t; + })(i, e); + if ((yield a.href, s && a.pathname.endsWith("/"))) { + const t = new URL(a.href); + ((t.pathname += s), yield t.href); + } + if (n) { + const t = new URL(a.href); + ((t.pathname += ".html"), yield t.href); + } + if (r) { + const t = r({ url: i }); + for (const e of t) yield e.href; + } + })(s.url, e)) { + const e = n.get(r); + if (e) { + return { cacheKey: e, integrity: t.getIntegrityForCacheKey(e) }; + } + } + }, t.strategy); + } + } + ((t.CacheFirst = class extends R { + async U(t, e) { + let n, + r = await e.cacheMatch(t); + if (!r) + try { + r = await e.fetchAndCachePut(t); + } catch (t) { + t instanceof Error && (n = t); + } + if (!r) throw new s("no-response", { url: t.url, error: n }); + return r; + } + }), + (t.ExpirationPlugin = class { + constructor(t = {}) { + ((this.cachedResponseWillBeUsed = async ({ + event: t, + request: e, + cacheName: s, + cachedResponse: n, + }) => { + if (!n) return null; + const r = this.V(n), + i = this.J(s); + b(i.expireEntries()); + const a = i.updateTimestamp(e.url); + if (t) + try { + t.waitUntil(a); + } catch (t) {} + return r ? n : null; + }), + (this.cacheDidUpdate = async ({ cacheName: t, request: e }) => { + const s = this.J(t); + (await s.updateTimestamp(e.url), await s.expireEntries()); + }), + (this.X = t), + (this.B = t.maxAgeSeconds), + (this.Y = new Map()), + t.purgeOnQuotaError && + (function (t) { + g.add(t); + })(() => this.deleteCacheAndMetadata())); + } + J(t) { + if (t === d()) throw new s("expire-custom-caches-only"); + let e = this.Y.get(t); + return (e || ((e = new F(t, this.X)), this.Y.set(t, e)), e); + } + V(t) { + if (!this.B) return !0; + const e = this.Z(t); + if (null === e) return !0; + return e >= Date.now() - 1e3 * this.B; + } + Z(t) { + if (!t.headers.has("date")) return null; + const e = t.headers.get("date"), + s = new Date(e).getTime(); + return isNaN(s) ? null : s; + } + async deleteCacheAndMetadata() { + for (const [t, e] of this.Y) + (await self.caches.delete(t), await e.delete()); + this.Y = new Map(); + } + }), + (t.NetworkFirst = class extends R { + constructor(t = {}) { + (super(t), + this.plugins.some((t) => "cacheWillUpdate" in t) || + this.plugins.unshift(u), + (this.tt = t.networkTimeoutSeconds || 0)); + } + async U(t, e) { + const n = [], + r = []; + let i; + if (this.tt) { + const { id: s, promise: a } = this.et({ + request: t, + logs: n, + handler: e, + }); + ((i = s), r.push(a)); + } + const a = this.st({ timeoutId: i, request: t, logs: n, handler: e }); + r.push(a); + const o = await e.waitUntil( + (async () => (await e.waitUntil(Promise.race(r))) || (await a))(), + ); + if (!o) throw new s("no-response", { url: t.url }); + return o; + } + et({ request: t, logs: e, handler: s }) { + let n; + return { + promise: new Promise((e) => { + n = setTimeout(async () => { + e(await s.cacheMatch(t)); + }, 1e3 * this.tt); + }), + id: n, + }; + } + async st({ timeoutId: t, request: e, logs: s, handler: n }) { + let r, i; + try { + i = await n.fetchAndCachePut(e); + } catch (t) { + t instanceof Error && (r = t); + } + return ( + t && clearTimeout(t), + (!r && i) || (i = await n.cacheMatch(e)), + i + ); + } + }), + (t.RangeRequestsPlugin = class { + constructor() { + this.cachedResponseWillBeUsed = async ({ + request: t, + cachedResponse: e, + }) => (e && t.headers.has("range") ? await H(t, e) : e); + } + }), + (t.StaleWhileRevalidate = class extends R { + constructor(t = {}) { + (super(t), + this.plugins.some((t) => "cacheWillUpdate" in t) || + this.plugins.unshift(u)); + } + async U(t, e) { + const n = e.fetchAndCachePut(t).catch(() => {}); + e.waitUntil(n); + let r, + i = await e.cacheMatch(t); + if (i); + else + try { + i = await n; + } catch (t) { + t instanceof Error && (r = t); + } + if (!i) throw new s("no-response", { url: t.url, error: r }); + return i; + } + }), + (t.cleanupOutdatedCaches = function () { + self.addEventListener("activate", (t) => { + const e = w(); + t.waitUntil( + (async (t, e = "-precache-") => { + const s = (await self.caches.keys()).filter( + (s) => + s.includes(e) && s.includes(self.registration.scope) && s !== t, + ); + return (await Promise.all(s.map((t) => self.caches.delete(t))), s); + })(e).then((t) => {}), + ); + }); + }), + (t.clientsClaim = function () { + self.addEventListener("activate", () => self.clients.claim()); + }), + (t.precacheAndRoute = function (t, e) { + (!(function (t) { + tt().precache(t); + })(t), + (function (t) { + const e = tt(); + h(new et(e, t)); + })(e)); + }), + (t.registerRoute = h)); +});