Rocky_Mountain_Vending/.pnpm-store/v10/files/55/b9817064ac7e4ff3c2facdaade5f6e066aca2ccbdec84f41bcc67ee2815c4055591a211704295837e53e1076adc968aef9d596a6212332fe841e200fd02e7a
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

46 lines
1.7 KiB
Text

import { __assign } from "tslib";
import { ErrorKind } from './error';
import { Parser } from './parser';
import { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';
function pruneLocation(els) {
els.forEach(function (el) {
delete el.location;
if (isSelectElement(el) || isPluralElement(el)) {
for (var k in el.options) {
delete el.options[k].location;
pruneLocation(el.options[k].value);
}
}
else if (isNumberElement(el) && isNumberSkeleton(el.style)) {
delete el.style.location;
}
else if ((isDateElement(el) || isTimeElement(el)) &&
isDateTimeSkeleton(el.style)) {
delete el.style.location;
}
else if (isTagElement(el)) {
pruneLocation(el.children);
}
});
}
export function parse(message, opts) {
if (opts === void 0) { opts = {}; }
opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);
var result = new Parser(message, opts).parse();
if (result.err) {
var error = SyntaxError(ErrorKind[result.err.kind]);
// @ts-expect-error Assign to error object
error.location = result.err.location;
// @ts-expect-error Assign to error object
error.originalMessage = result.err.message;
throw error;
}
if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {
pruneLocation(result.val);
}
return result.val;
}
export * from './types';
// only for testing
export var _Parser = Parser;
export { isStructurallySame } from './manipulator';