Rocky_Mountain_Vending/.pnpm-store/v10/files/b2/7187e32783e42160550b2b8927e2362e9fbbf9c0cc057134aae7475618626b319c25ac3be90c0a454287a7f488b93f41555fa94ccf7589399af4adbe9210a5
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

30 lines
No EOL
1.2 KiB
Text

/**
* Stores the Trusted Types Policy. Starts as undefined and can be set to null
* if Trusted Types is not supported in the browser.
*/ let policy;
/**
* Getter for the Trusted Types Policy. If it is undefined, it is instantiated
* here or set to null if Trusted Types is not supported in the browser.
*/ function getPolicy() {
if (typeof policy === 'undefined' && typeof window !== 'undefined') {
policy = window.trustedTypes?.createPolicy('nextjs', {
createHTML: (input)=>input,
createScript: (input)=>input,
createScriptURL: (input)=>input
}) || null;
}
return policy;
}
/**
* Unsafely promote a string to a TrustedScriptURL, falling back to strings
* when Trusted Types are not available.
* This is a security-sensitive function; any use of this function
* must go through security review. In particular, it must be assured that the
* provided string will never cause an XSS vulnerability if used in a context
* that will cause a browser to load and execute a resource, e.g. when
* assigning to script.src.
*/ export function __unsafeCreateTrustedScriptURL(url) {
return getPolicy()?.createScriptURL(url) || url;
}
//# sourceMappingURL=trusted-types.js.map