Rocky_Mountain_Vending/.pnpm-store/v10/files/64/b7285a9ff0aadf8fd83da4a70c73d26493c430739b177f539746fe574e67c6f35dcacff262d6aca906c0d0edd3b48b697531e001332a53784cd9f0ec7e8fef
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

1 line
No EOL
6.3 KiB
Text

{"version":3,"sources":["../../src/server/accept-header.ts"],"sourcesContent":["interface Selection {\n pos: number\n pref?: number\n q: number\n token: string\n}\n\ninterface Options {\n prefixMatch?: boolean\n type: 'accept-language'\n}\n\nfunction parse(\n raw: string,\n preferences: readonly string[] | undefined,\n options: Options\n) {\n const lowers = new Map<string, { orig: string; pos: number }>()\n const header = raw.replace(/[ \\t]/g, '')\n\n if (preferences) {\n let pos = 0\n for (const preference of preferences) {\n const lower = preference.toLowerCase()\n lowers.set(lower, { orig: preference, pos: pos++ })\n if (options.prefixMatch) {\n const parts = lower.split('-')\n while ((parts.pop(), parts.length > 0)) {\n const joined = parts.join('-')\n if (!lowers.has(joined)) {\n lowers.set(joined, { orig: preference, pos: pos++ })\n }\n }\n }\n }\n }\n\n const parts = header.split(',')\n const selections: Selection[] = []\n const map = new Set<string>()\n\n for (let i = 0; i < parts.length; ++i) {\n const part = parts[i]\n if (!part) {\n continue\n }\n\n const params = part.split(';')\n if (params.length > 2) {\n throw new Error(`Invalid ${options.type} header`)\n }\n\n let token = params[0].toLowerCase()\n if (!token) {\n throw new Error(`Invalid ${options.type} header`)\n }\n\n const selection: Selection = { token, pos: i, q: 1 }\n if (preferences && lowers.has(token)) {\n selection.pref = lowers.get(token)!.pos\n }\n\n map.add(selection.token)\n\n if (params.length === 2) {\n const q = params[1]\n const [key, value] = q.split('=')\n\n if (!value || (key !== 'q' && key !== 'Q')) {\n throw new Error(`Invalid ${options.type} header`)\n }\n\n const score = parseFloat(value)\n if (score === 0) {\n continue\n }\n\n if (Number.isFinite(score) && score <= 1 && score >= 0.001) {\n selection.q = score\n }\n }\n\n selections.push(selection)\n }\n\n selections.sort((a, b) => {\n if (b.q !== a.q) {\n return b.q - a.q\n }\n\n if (b.pref !== a.pref) {\n if (a.pref === undefined) {\n return 1\n }\n\n if (b.pref === undefined) {\n return -1\n }\n\n return a.pref - b.pref\n }\n\n return a.pos - b.pos\n })\n\n const values = selections.map((selection) => selection.token)\n if (!preferences || !preferences.length) {\n return values\n }\n\n const preferred: string[] = []\n for (const selection of values) {\n if (selection === '*') {\n for (const [preference, value] of lowers) {\n if (!map.has(preference)) {\n preferred.push(value.orig)\n }\n }\n } else {\n const lower = selection.toLowerCase()\n if (lowers.has(lower)) {\n preferred.push(lowers.get(lower)!.orig)\n }\n }\n }\n\n return preferred\n}\n\nexport function acceptLanguage(header = '', preferences?: readonly string[]) {\n return (\n parse(header, preferences, {\n type: 'accept-language',\n prefixMatch: true,\n })[0] || ''\n )\n}\n"],"names":["parse","raw","preferences","options","lowers","Map","header","replace","pos","preference","lower","toLowerCase","set","orig","prefixMatch","parts","split","pop","length","joined","join","has","selections","map","Set","i","part","params","Error","type","token","selection","q","pref","get","add","key","value","score","parseFloat","Number","isFinite","push","sort","a","b","undefined","values","preferred","acceptLanguage"],"mappings":"AAYA,SAASA,MACPC,GAAW,EACXC,WAA0C,EAC1CC,OAAgB;IAEhB,MAAMC,SAAS,IAAIC;IACnB,MAAMC,SAASL,IAAIM,OAAO,CAAC,UAAU;IAErC,IAAIL,aAAa;QACf,IAAIM,MAAM;QACV,KAAK,MAAMC,cAAcP,YAAa;YACpC,MAAMQ,QAAQD,WAAWE,WAAW;YACpCP,OAAOQ,GAAG,CAACF,OAAO;gBAAEG,MAAMJ;gBAAYD,KAAKA;YAAM;YACjD,IAAIL,QAAQW,WAAW,EAAE;gBACvB,MAAMC,QAAQL,MAAMM,KAAK,CAAC;gB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