/opt/canhelp/node_modules/next/dist/compiled/@next/font/dist/google
NameSizeModeActions
fetch-css-from-google-fonts.d.ts4820644editdlrm
fetch-css-from-google-fonts.js13470644editdlrm
fetch-font-file.d.ts2260644editdlrm
fetch-font-file.js9570644editdlrm
fetch-resource.d.ts2930644editdlrm
fetch-resource.js19940644editdlrm
find-font-files-in-css.d.ts4130644editdlrm
find-font-files-in-css.js15280644editdlrm
font-data.json4496130644editdlrm
get-fallback-font-override-metrics.d.ts5180644editdlrm
get-fallback-font-override-metrics.js24840644editdlrm
get-font-axes.d.ts3140644editdlrm
get-font-axes.js31050644editdlrm
get-google-fonts-url.d.ts2900644editdlrm
get-google-fonts-url.js22480644editdlrm
get-proxy-agent.d.ts1800644editdlrm
get-proxy-agent.js9140644editdlrm
google-fonts-metadata.d.ts3650644editdlrm
google-fonts-metadata.js3810644editdlrm
index.d.ts8272310644editdlrm
index.js770644editdlrm
loader.d.ts1380644editdlrm
loader.js85470644editdlrm
retry.d.ts1550644editdlrm
retry.js6740644editdlrm
sort-fonts-variant-values.d.ts2310644editdlrm
sort-fonts-variant-values.js11480644editdlrm
validate-google-font-function-call.d.ts5040644editdlrm
validate-google-font-function-call.js50740644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/compiled/@next/font/dist/google/find-font-files-in-css.js (1528B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findFontFilesInCss = findFontFilesInCss; /** * Find all font files in the CSS response and determine which files should be preloaded. * In Google Fonts responses, the @font-face's subset is above it in a comment. * Walk through the CSS from top to bottom, keeping track of the current subset. */ function findFontFilesInCss(css, subsetsToPreload) { var _a, _b; // Find font files to download const fontFiles = []; // Keep track of the current subset let currentSubset = ''; for (const line of css.split('\n')) { const newSubset = (_a = /\/\* (.+?) \*\//.exec(line)) === null || _a === void 0 ? void 0 : _a[1]; if (newSubset) { // Found new subset in a comment above the next @font-face declaration currentSubset = newSubset; } else { const googleFontFileUrl = (_b = /src: url\((.+?)\)/.exec(line)) === null || _b === void 0 ? void 0 : _b[1]; if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl)) { // Found the font file in the @font-face declaration. fontFiles.push({ googleFontFileUrl, preloadFontFile: !!(subsetsToPreload === null || subsetsToPreload === void 0 ? void 0 : subsetsToPreload.includes(currentSubset)), }); } } } return fontFiles; }