Rocky_Mountain_Vending/.pnpm-store/v10/files/9c/81902104b9b1a0fbcaae6df26ceb7470e6b888da078e8987a853c894bbba99fe81d37c49d1d0ffa211300989d1909ddf1a4730341518f12760a9461803d0f3
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

25 lines
No EOL
802 B
Text

import { makeRe } from 'next/dist/compiled/picomatch';
// Modifying this function should also modify writeImagesManifest()
export function matchLocalPattern(pattern, url) {
if (pattern.search !== undefined) {
if (pattern.search !== url.search) {
return false;
}
}
if (!makeRe(pattern.pathname ?? '**', {
dot: true
}).test(url.pathname)) {
return false;
}
return true;
}
export function hasLocalMatch(localPatterns, urlPathAndQuery) {
if (!localPatterns) {
// if the user didn't define "localPatterns", we allow all local images
return true;
}
const url = new URL(urlPathAndQuery, 'http://n');
return localPatterns.some((p)=>matchLocalPattern(p, url));
}
//# sourceMappingURL=match-local-pattern.js.map