@bettercms-ai/convert 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/cli.ts","../src/index.ts","../src/brief.ts","../src/dialect.ts","../src/expr.ts","../src/helper.ts","../src/entities.ts","../src/text.ts","../src/locate.ts","../src/loops.ts","../src/scope.ts","../src/sites/shared.ts","../src/sites/jsx.ts","../src/props.ts","../src/resolve.ts","../src/routes.ts","../src/declarations.ts","../src/converted.ts","../src/rewrite.ts","../src/receipt.ts","../src/sites/html.ts","../src/sites/astro.ts","../src/sites/svelte.ts","../src/sites/vue.ts","../src/sites/index.ts","../src/tolerant.ts","../src/scan.ts"],"sourcesContent":["/**\n * `bettercms-convert` — run the codemod over a working tree.\n *\n * The LOCAL lane of the conversion: an agent (or a person) reads the brief from\n * `get_conversion_brief`, runs this, and reads `git diff`. It never talks to the platform, so\n * there is no key and no network here — the only authority it holds is \"read and write files under\n * `--root`\", and the path checks below are what keep that true.\n *\n * Exit codes are the contract: 0 done (pending listed), 1 something refused, 2 only with `--strict`\n * and a non-empty pending list — which is what a CI job wants and what a human does not.\n */\nimport { readdir, readFile, writeFile, mkdir, stat } from \"node:fs/promises\";\nimport { dirname, join, relative, resolve, sep } from \"node:path\";\nimport { convertSources, ConvertError, type PlanFile } from \"./index.js\";\nimport { isSourceCandidate } from \"./scan.js\";\nimport type { Brief } from \"./brief.js\";\nimport type { ConversionReceipt } from \"./receipt.js\";\n\nconst VERSION = \"0.1.0\";\n/** Bigger than any template. A file past it is not one a human wrote copy into. */\nconst MAX_FILE_BYTES = 512 * 1024;\n\ninterface Args {\n brief: string | undefined;\n root: string;\n dryRun: boolean;\n receipt: string | undefined;\n strict: boolean;\n overwriteHelper: boolean;\n verbose: boolean;\n help: boolean;\n}\n\nclass CliError extends Error {}\n\nfunction parseArgs(argv: string[]): Args {\n const args: Args = {\n brief: undefined,\n root: \".\",\n dryRun: false,\n receipt: undefined,\n strict: false,\n overwriteHelper: false,\n verbose: false,\n help: false,\n };\n for (let i = 0; i < argv.length; i++) {\n const arg = argv[i]!;\n if (arg === \"--brief\") args.brief = argv[++i];\n else if (arg === \"--root\") args.root = argv[++i] ?? \".\";\n else if (arg === \"--receipt\") args.receipt = argv[++i];\n else if (arg === \"--dry-run\") args.dryRun = true;\n else if (arg === \"--strict\") args.strict = true;\n else if (arg === \"--overwrite-helper\") args.overwriteHelper = true;\n else if (arg === \"--verbose\") args.verbose = true;\n else if (arg === \"--help\" || arg === \"-h\") args.help = true;\n else if (arg === \"--version\" || arg === \"-v\") {\n process.stdout.write(`${VERSION}\\n`);\n process.exit(0);\n } else throw new CliError(`Unknown option: ${arg}`);\n }\n return args;\n}\n\nconst HELP = `bettercms-convert ${VERSION}\n\n bettercms-convert --brief <json> --root . [options]\n\n --brief <file> The conversion brief, as get_conversion_brief returns it. Required.\n --root <dir> The repository to convert. Default: the working directory.\n --dry-run Print what would change; write nothing.\n --receipt <file> Write the receipt as JSON.\n --strict Exit 2 when any path is left pending (for CI).\n --overwrite-helper Replace a bcms-content helper this tool did not write.\n --verbose Print stack traces and every file considered.\n\nExit: 0 done (pending paths are listed), 1 refused, 2 --strict with pending paths.\n`;\n\n/** Every candidate file under `root`, repository-relative, in path order. */\nasync function readTree(root: string, verbose: boolean): Promise<{ path: string; content: string }[]> {\n const files: { path: string; content: string }[] = [];\n\n const walk = async (dir: string): Promise<void> => {\n const entries = await readdir(dir, { withFileTypes: true });\n for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {\n const full = join(dir, entry.name);\n const rel = relative(root, full).split(sep).join(\"/\");\n if (entry.isDirectory()) {\n if (isSourceCandidate(`${rel}/x.html`)) await walk(full);\n continue;\n }\n if (!entry.isFile() || !isSourceCandidate(rel)) continue;\n const info = await stat(full);\n if (info.size > MAX_FILE_BYTES) {\n if (verbose) process.stderr.write(`skipped (too large): ${rel}\\n`);\n continue;\n }\n files.push({ path: rel, content: await readFile(full, \"utf-8\") });\n }\n };\n\n await walk(root);\n return files;\n}\n\n/** Refuse to write outside `--root`, whatever the plan says. The CLI's only real authority. */\nfunction under(root: string, path: string): string {\n const target = resolve(root, path);\n if (target !== root && !target.startsWith(root + sep)) {\n throw new CliError(`Refusing to write outside --root: ${path}`);\n }\n return target;\n}\n\nfunction report(files: PlanFile[], receipt: ConversionReceipt, dryRun: boolean): void {\n const { declared, rewritten, alreadyDeclared, pending } = receipt.paths;\n for (const file of files) {\n process.stdout.write(`${dryRun ? \"would \" : \"\"}${file.operation} ${file.path}\\n`);\n }\n process.stdout.write(\n `\\n${rewritten} of ${declared} paths bound (${alreadyDeclared} already declared, ${pending.length} pending)\\n`,\n );\n for (const path of pending) {\n process.stdout.write(` pending ${path.route} ${path.path} — ${path.reason}${path.file ? ` (${path.file})` : \"\"}\\n`);\n }\n}\n\nasync function main(): Promise<number> {\n const args = parseArgs(process.argv.slice(2));\n if (args.help) {\n process.stdout.write(HELP);\n return 0;\n }\n if (!args.brief) throw new CliError(\"--brief <file> is required. See --help.\");\n\n const root = resolve(args.root);\n const brief = JSON.parse(await readFile(resolve(args.brief), \"utf-8\")) as Brief;\n if (!Array.isArray(brief.pages)) {\n throw new CliError(`${args.brief} is not a conversion brief: it has no \"pages\" array.`);\n }\n\n const sources = await readTree(root, args.verbose);\n if (args.verbose) process.stderr.write(`read ${sources.length} candidate files under ${root}\\n`);\n\n const { files, receipt } = await convertSources(brief, sources, {\n overwriteHelper: args.overwriteHelper,\n });\n\n if (!args.dryRun) {\n for (const file of files) {\n const target = under(root, file.path);\n await mkdir(dirname(target), { recursive: true });\n await writeFile(target, file.content, \"utf-8\");\n }\n }\n if (args.receipt) {\n await writeFile(resolve(args.receipt), `${JSON.stringify(receipt, null, 2)}\\n`, \"utf-8\");\n }\n\n report(files, receipt, args.dryRun);\n return args.strict && receipt.paths.pending.length > 0 ? 2 : 0;\n}\n\nmain()\n .then((code) => process.exit(code))\n .catch((error: unknown) => {\n const message = error instanceof Error ? error.message : String(error);\n const code = error instanceof ConvertError ? `${error.code}: ` : \"\";\n process.stderr.write(`${code}${message}\\n`);\n if (process.argv.includes(\"--verbose\") && error instanceof Error) {\n process.stderr.write(`${error.stack}\\n`);\n }\n process.exit(1);\n });\n","/**\n * `@bettercms-ai/convert` — turn an imported site's text-matched bindings into declared ones,\n * deterministically, and say exactly what could not be done.\n *\n * PURE. No filesystem, no network, no credential, no clock. Files come in as values and go out as\n * values; `cli.ts` is the only module that touches a disk, and the server lane hands the same\n * function bytes it already read. That is what lets the interesting half — which element holds\n * which path, and why one could not be found — be tested exhaustively without a repository.\n *\n * THREE TIERS PER FILE, and a file is exactly one of them:\n * 1. the dialect's parser, which yields real offsets;\n * 2. `findSitesTolerant`, for a file no parser would read — one occurrence, verified `>…<`;\n * 3. the INJECTED `llmFallback`, whose output is accepted only if it re-parses under tier 1 and\n * declares exactly the paths that were asked for. The package never calls a model itself.\n */\nimport MagicString from \"magic-string\";\nimport { briefDigest, type Brief, type BriefPath } from \"./brief.js\";\nimport { dialectOf, type Dialect } from \"./dialect.js\";\nimport { DIALECT_RULES } from \"./expr.js\";\nimport {\n CONTENT_DIR,\n HELPER_PATH,\n HELPER_VERSION,\n STUB_CONTENT,\n helperSource,\n isKnownHelper,\n relativeImport,\n} from \"./helper.js\";\nimport { locate, type LocatedPath, type SourceFile } from \"./locate.js\";\nimport { emitRepeater, emptyRow, setLeaf, shapeOf, splitIndexed, type RepeatMember } from \"./loops.js\";\nimport { MAX_HOPS, bindingsName, bindingsRead, findPropTargets } from \"./props.js\";\nimport { parseProgram } from \"./sites/jsx.js\";\nimport { aliasesFrom, importsIn, resolveSpecifier } from \"./resolve.js\";\nimport { isDynamicRoute, routeParams } from \"./routes.js\";\nimport { allocateNames, topLevelBindings } from \"./scope.js\";\nimport { convertedHere, declaringElements, helperLocals, snapshotLocal, splitArrayPath } from \"./converted.js\";\nimport {\n covers,\n scopedPath,\n declarationsIn,\n declaredByScan,\n declaredInTree,\n shapeOfPath,\n stripLayoutPrefix,\n type Declaration,\n} from \"./declarations.js\";\nimport { overlapping, rewriteFile, type Rewrite } from \"./rewrite.js\";\nimport {\n assertReceipt,\n type ConversionReceipt,\n type PendingPath,\n type PendingReason,\n type DynamicBinding,\n type ReceiptFile,\n} from \"./receipt.js\";\nimport { parseFile } from \"./sites/index.js\";\nimport {\n collectSites,\n isImageSource,\n isIntrinsic,\n norm,\n type ImportPoint,\n type Node,\n type ParsedFile,\n type Site,\n} from \"./sites/shared.js\";\nimport { findSitesTolerant } from \"./tolerant.js\";\n\nexport type { Brief, BriefPage, BriefPath, PathLocator } from \"./brief.js\";\nexport { briefDigest } from \"./brief.js\";\nexport { dialectOf, type Dialect } from \"./dialect.js\";\nexport { locate, flat, stripTags, type LocatedPath, type UnlocatedPath, type SourceFile } from \"./locate.js\";\nexport { findSitesTolerant } from \"./tolerant.js\";\nexport { findSites, parseFile, PARSE_FILE } from \"./sites/index.js\";\nexport type { Site, SiteWhere, ParserError, FindSitesResult, ParsedFile, Node } from \"./sites/shared.js\";\nexport { rewriteFile, overlapping, type Rewrite } from \"./rewrite.js\";\nexport { DIALECT_RULES, readExpr, attrsFor, propsAttribute, type AttrBinding } from \"./expr.js\";\nexport {\n HELPER_PATH,\n HELPER_VERSION,\n CONTENT_DIR,\n STUB_CONTENT,\n helperSource,\n isKnownHelper,\n relativeImport,\n} from \"./helper.js\";\nexport {\n assertReceipt,\n coverageOf,\n ReceiptInvariantError,\n type ConversionReceipt,\n type PendingPath,\n type PendingReason,\n type DynamicBinding,\n type ReceiptFile,\n} from \"./receipt.js\";\nexport { SOURCE_EXTENSIONS, SKIP_DIRS, SKIP_FILES, isSourceCandidate } from \"./scan.js\";\nexport { aliasesFrom, importsIn, resolveSpecifier, type ImportedFrom } from \"./resolve.js\";\nexport { walkAst, exportedFunction, type AstNode } from \"./props.js\";\nexport { convertedHere, declaringElements, type TargetIdentity } from \"./converted.js\";\nexport { readDeclarations, type FileDeclaration } from \"./declared.js\";\n\n/** One file operation, exactly as `src/lib/github/plan-digest.ts` spells it. */\nexport interface PlanFile {\n path: string;\n operation: \"modify\" | \"add\";\n content: string;\n}\n\n/**\n * Tier 3, INJECTED by the server lane and never by this package.\n *\n * The CLI passes none: the coding agent running it IS tier 3, and the playbook tells it to take\n * the `PARSE_ERROR` list itself.\n */\nexport type LlmFallback = (file: SourceFile, remaining: LocatedPath[]) => Promise<string | null>;\n\nexport interface ConvertOptions {\n llmFallback?: LlmFallback;\n /** Replace a helper module this package did not write, instead of refusing. The CLI's flag. */\n overwriteHelper?: boolean;\n}\n\nexport type ConvertErrorCode = \"HELPER_CONFLICT\";\n\nexport class ConvertError extends Error {\n constructor(\n readonly code: ConvertErrorCode,\n message: string,\n ) {\n super(message);\n this.name = \"ConvertError\";\n }\n}\n\n/**\n * `(route, scope, path)` — the receipt's path identity, as one string.\n *\n * 🔴 A LAYOUT PATH HAS NO ROUTE. The shared chrome is ONE field that every route renders, and the\n * brief lists it under every page because that is how the pages were derived. Keyed by route it\n * would be four targets pointing at one element in one layout file — which collide, resolve to\n * `AMBIGUOUS_LITERAL`, and report a header nobody can convert. Collapsing it here is also what\n * makes the coverage meter count it once.\n */\nconst keyOf = (route: string, scope: string, path: string): string =>\n scope === \"layout\" ? `layout::${path}` : `${route}::page::${path}`;\n\nconst escapeRegExp = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/** `home` → `bcmsHome`, so a page's snapshot has a legal, stable identifier. */\nconst identifierFor = (slug: string): string =>\n `bcms${slug.replace(/[^A-Za-z0-9]+(.)?/g, (_, c: string | undefined) => (c ? c.toUpperCase() : \"\")).replace(/^./, (c) => c.toUpperCase())}`;\n\n/** What one file did with one path. */\ntype Outcome = \"rewritten\" | \"declared\" | PendingReason;\n\n/** One replacement in a file this conversion is not otherwise rewriting — a drilled component. */\nexport interface Splice {\n start: number;\n end: number;\n text: string;\n}\n\n/** Everything the second hop needs to find and edit a component file. @see props.ts */\ninterface DrillContext {\n files: Set<string>;\n aliases: Map<string, string[]>;\n contents: Map<string, string>;\n parseOf: (file: string) => Promise<ParsedFile | null>;\n /** Does this conversion already rewrite that file for copy of its own? */\n converts: (file: string) => boolean;\n}\n\ninterface DrillResult {\n ok: boolean;\n reason?: \"PROP_TARGET_NOT_FOUND\" | \"PROP_DRILLED_DEEP\";\n edits: { file: string; splices: Splice[] }[];\n}\n\n/**\n * Follow one prop from a call site to the element that renders it, editing every file on the way.\n *\n * 🔴 A COMPONENT THIS CONVERSION ALREADY REWRITES IS NOT DRILLED. Its own copy is being spliced at\n * offsets taken from its original bytes, and a second set of offsets from a second decision would\n * be two coordinate systems over one file — the failure this package avoids everywhere else by\n * doing one `magic-string` pass. Reported as `PROP_TARGET_NOT_FOUND`, which is what it is: for\n * this proposal, that element is not reachable.\n */\nasync function drillProp(\n ctx: DrillContext,\n fromFile: string,\n component: string,\n prop: string,\n kind: string,\n hop: number,\n): Promise<DrillResult> {\n const miss: DrillResult = { ok: false, reason: \"PROP_TARGET_NOT_FOUND\", edits: [] };\n if (hop > MAX_HOPS) return { ok: false, reason: \"PROP_DRILLED_DEEP\", edits: [] };\n\n const from = await ctx.parseOf(fromFile);\n const fromDialect = dialectOf(fromFile, ctx.contents.get(fromFile) ?? \"\");\n if (!from || from.error || !fromDialect) return miss;\n const source = importsIn(from, fromDialect).get(component);\n if (!source) return miss;\n const file = resolveSpecifier(fromFile, source.specifier, ctx.files, ctx.aliases);\n if (!file || ctx.converts(file)) return miss;\n\n const content = ctx.contents.get(file)!;\n const dialect = dialectOf(file, content);\n const parsed = await ctx.parseOf(file);\n if (!dialect || !parsed || parsed.error) return miss;\n\n const found = findPropTargets(content, parsed, prop, dialect, source.imported);\n if (!found.receivable) return miss;\n\n const splices: Splice[] = [];\n const at = (offset: number, text: string): void => void splices.push({ start: offset, end: offset, text });\n const rule = DIALECT_RULES[dialect];\n\n if (found.targets.length > 0) {\n for (const target of found.targets) {\n const read = bindingsRead(prop, found.viaProps);\n const kindAttr = kind ? ` data-bcms-kind=\"${kind}\"` : \"\";\n at(target.attrInsertAt, ` data-bcms-field={${read}}${kindAttr}`);\n if (kind === \"richtext\" && rule.richtext && target.inner) {\n // The prop carries markup, so it goes into the dialect's html sink rather than being\n // rendered as text — the same rule the page lane follows, one file further in.\n const inner = content.slice(target.inner.start, target.inner.end).trim().replace(/^\\{|\\}$/g, \"\");\n splices.push({ start: target.inner.start, end: target.inner.end, text: \"\" });\n at(target.attrInsertAt, ` ${rule.richtext(inner.trim())}`);\n }\n }\n } else if (found.forwards.length > 0) {\n const forward = found.forwards[0]!;\n const deeper = await drillProp(ctx, file, forward.component, forward.prop, kind, hop + 1);\n if (!deeper.ok) return deeper;\n // The intermediate component passes the whole object on, so the leaf can name any prop in it.\n if (!forward.forwards) at(forward.attrInsertAt, ` bcmsBindings={${bindingsName(found.viaProps)}}`);\n splices.push(...deeper.edits.flatMap((e) => (e.file === file ? e.splices : [])));\n const others = deeper.edits.filter((e) => e.file !== file);\n if (found.receive !== null) at(found.receive, \", bcmsBindings\");\n if (found.propsType) at(found.propsType.at, found.propsType.text);\n return { ok: true, edits: [...others, { file, splices }] };\n } else {\n return miss;\n }\n\n if (found.receive !== null) at(found.receive, \", bcmsBindings\");\n if (found.propsType) at(found.propsType.at, found.propsType.text);\n return { ok: true, edits: [{ file, splices }] };\n}\n\ninterface FileResult {\n tier: 1 | 2 | 3;\n content: string | null;\n outcomes: Map<string, Outcome>;\n bindings: string[];\n occurrences: { located: number; rewritten: number };\n /** The dialect actually WRITTEN — tier 2 writes html's attribute-only rule in every dialect. */\n dialect: Dialect | null;\n /** Bindings this file declares as an expression. @see receipt.ts */\n dynamic: DynamicBinding[];\n /** Edits to OTHER files — the components this file drills a prop into. @see props.ts */\n componentEdits: { file: string; splices: Splice[] }[];\n /** Page slugs whose snapshot this file now imports. Empty when it reads nothing at build time. */\n snapshots: string[];\n}\n\n/** Everything the codemod needs to know about one brief path, flattened once. */\ninterface Target {\n key: string;\n route: string;\n /** Page copy, or the shared chrome every route renders. @see brief.ts */\n scope: \"page\" | \"layout\";\n slug: string;\n path: string;\n kind: string;\n /** The raw original, kept as the in-code fallback; `literal` is its flattened form. */\n fallback: string;\n literal: string;\n locator: BriefPath[\"locator\"];\n}\n\nexport async function convertSources(\n brief: Brief,\n sources: SourceFile[],\n options?: ConvertOptions,\n): Promise<{ files: PlanFile[]; receipt: ConversionReceipt }> {\n const digest = briefDigest(brief);\n const targets = new Map<string, Target>();\n for (const page of brief.pages) {\n for (const p of page.paths) {\n const scope = p.scope ?? \"page\";\n const key = keyOf(page.route, scope, p.path);\n targets.set(key, {\n key,\n route: page.route,\n scope,\n slug: page.slug,\n path: p.path,\n kind: p.kind,\n fallback: p.original ?? \"\",\n literal: norm(p.original ?? \"\"),\n locator: p.locator,\n });\n }\n }\n\n // The codemod may match a richtext value by the TEXT it renders; the proposer may not. @see locate\n const { located, unlocated } = locate(brief, sources, { stripTags: true });\n const pending: PendingPath[] = [];\n const pend = (target: Target, reason: PendingReason, file?: string, message?: string): void => {\n pending.push({\n route: target.route,\n scope: target.scope,\n path: target.path,\n kind: target.kind,\n ...(file ? { file } : {}),\n reason,\n ...(message ? { message } : {}),\n });\n };\n\n const contents = new Map(sources.map((s) => [s.path, s.content]));\n\n /** ONE parse per file, shared by the declaration reader and the matcher. */\n const parses = new Map<string, ParsedFile | null>();\n const parseOf = async (file: string): Promise<ParsedFile | null> => {\n if (parses.has(file)) return parses.get(file)!;\n const content = contents.get(file) ?? \"\";\n const dialect = dialectOf(file, content);\n const parsed = dialect ? await parseFile(dialect, content) : null;\n parses.set(file, parsed);\n return parsed;\n };\n\n /**\n * What each file declares — off its elements, and off NOTHING for a file no dialect covers.\n *\n * A `.js` data module cannot carry a template attribute, so a string in one that happens to look\n * like a declaration declares nothing. @see declaredInTree.\n */\n const declarations = new Map<string, Set<string>>();\n for (const source of sources) {\n const parsed = await parseOf(source.path);\n declarations.set(\n source.path,\n parsed === null\n ? new Set<string>()\n : parsed.error\n ? declaredByScan(source.content)\n : declaredInTree(parsed.roots, source.content),\n );\n }\n\n /**\n * A path whose literal is GONE from the source but which some file already declares.\n *\n * Once a value is read through `bcms(…)` its literal survives only inside a JavaScript string,\n * and for richtext that string carries markup — so a text search can stop finding it while the\n * binding sits right there on the element. Trusting the declaration is what makes a second run\n * of the codemod a no-op instead of a regression.\n *\n * 🔴 AND THE DECLARATION HAS TO BE THIS ROUTE'S. Two routes legitimately carry the same path\n * (`hero.title` on every landing page), so \"some file, somewhere, declares that string\" would\n * let one converted route mark the other one bound and quietly leave it hardcoded forever. The\n * evidence demanded is the READ this package itself writes — `bcms(<this route's snapshot>,\n * \"<this path>\"` — which names both halves of the identity in one expression.\n */\n /**\n * A path whose literal is GONE but which some file has ALREADY CONVERTED.\n *\n * The evidence is one element carrying both halves — the declaration and the read that names\n * this route's snapshot — because that is the only thing that distinguishes \"this route is\n * done\" from \"some other route in this file is\". @see converted.ts\n */\n let declaredOnly = 0;\n const witnessed = async (target: Target): Promise<boolean> => {\n for (const source of sources) {\n const parsed = await parseOf(source.path);\n const dialect = dialectOf(source.path, source.content);\n if (!parsed || !dialect) continue;\n if (convertedHere(source.content, parsed, dialect, target, source.path)) return true;\n }\n return false;\n };\n\n // One entry per IDENTITY, which for the shared chrome means one entry for every route that\n // renders it. Located wins over unlocated: a path found on one route is found.\n const locatedByKey = new Map<string, LocatedPath>();\n for (const hit of located) {\n const key = keyOf(hit.route, hit.scope ?? \"page\", hit.path);\n if (!locatedByKey.has(key)) locatedByKey.set(key, hit);\n }\n\n const missed = new Set<string>();\n for (const miss of unlocated) {\n const key = keyOf(miss.route, miss.scope ?? \"page\", miss.path);\n const target = targets.get(key);\n if (!target || locatedByKey.has(key) || missed.has(key)) continue;\n missed.add(key);\n if (await witnessed(target)) declaredOnly++;\n else pend(target, miss.reason === \"no-original\" ? \"NO_ORIGINAL\" : \"NOT_IN_SOURCE\");\n }\n\n const byFile = new Map<string, Target[]>();\n for (const [key, hit] of locatedByKey) {\n const target = targets.get(key);\n if (!target) continue;\n for (const file of hit.files) byFile.set(file, [...(byFile.get(file) ?? []), target]);\n }\n /**\n * What the second hop is allowed to touch, decided BEFORE any file is written.\n *\n * `converts` reads the set of files this conversion already rewrites for copy of their own, and\n * it has to be the same answer for every call — otherwise whether a component may be drilled\n * would depend on the order the files happened to be converted in.\n */\n const drill: DrillContext = {\n files: new Set(contents.keys()),\n aliases: aliasesFrom(sources),\n contents,\n parseOf,\n converts: (file) => byFile.has(file),\n };\n\n const results = new Map<string, Map<string, Outcome>>(); // file → outcomes\n const componentEdits = new Map<string, Splice[]>();\n const outFiles: PlanFile[] = [];\n const receiptFiles: ReceiptFile[] = [];\n const dialects = new Set<Dialect>();\n const dynamicBindings: DynamicBinding[] = [];\n const snapshotSlugs = new Set<string>();\n let occurrencesLocated = 0;\n let occurrencesRewritten = 0;\n\n for (const file of [...byFile.keys()].sort()) {\n const content = contents.get(file)!;\n const result = await convertFile(\n file,\n content,\n byFile.get(file)!,\n (await parseOf(file)) ?? undefined,\n declarations.get(file) ?? new Set<string>(),\n options?.llmFallback,\n drill,\n );\n for (const edit of result.componentEdits) {\n componentEdits.set(edit.file, [...(componentEdits.get(edit.file) ?? []), ...edit.splices]);\n }\n results.set(file, result.outcomes);\n occurrencesLocated += result.occurrences.located;\n occurrencesRewritten += result.occurrences.rewritten;\n if (result.content !== null && result.content !== content) {\n if (result.dialect) dialects.add(result.dialect);\n outFiles.push({ path: file, operation: \"modify\", content: result.content });\n receiptFiles.push({ path: file, bindings: result.bindings, tier: result.tier });\n dynamicBindings.push(...result.dynamic);\n for (const slug of result.snapshots) snapshotSlugs.add(slug);\n }\n }\n\n // Per PATH across every file that renders it: rewritten only when nothing was left behind.\n let rewritten = 0;\n let alreadyDeclared = declaredOnly;\n for (const [key, hit] of locatedByKey) {\n const target = targets.get(key)!;\n const outcomes = hit.files.map((file) => results.get(file)?.get(target.key) ?? \"NOT_IN_SOURCE\");\n const worst = outcomes.find((o) => o !== \"rewritten\" && o !== \"declared\");\n if (worst) {\n const file = hit.files[outcomes.indexOf(worst)];\n pend(target, worst, file);\n } else if (outcomes.every((o) => o === \"declared\")) alreadyDeclared++;\n else rewritten++;\n }\n\n /**\n * The component files, spliced once each.\n *\n * Two call sites drilling the same prop into the same component produce the same splice twice —\n * deduped rather than applied twice, which would declare the binding on the element twice and\n * add `bcmsBindings` to the destructuring twice.\n */\n for (const [file, splices] of [...componentEdits].sort(([a], [b]) => a.localeCompare(b))) {\n const source = new MagicString(contents.get(file)!);\n const seen = new Set<string>();\n for (const splice of splices) {\n const id = `${splice.start}:${splice.end}:${splice.text}`;\n if (seen.has(id)) continue;\n seen.add(id);\n if (splice.start === splice.end) source.appendLeft(splice.start, splice.text);\n else source.overwrite(splice.start, splice.end, splice.text);\n }\n const content = source.toString();\n if (content !== contents.get(file)) {\n outFiles.push({ path: file, operation: \"modify\", content });\n receiptFiles.push({\n path: file,\n bindings: [...new Set(dynamicBindings.filter((d) => d.file === file).map((d) => d.path))].sort(),\n tier: 1,\n });\n }\n }\n\n const { helpers, helperUpgraded } = emitHelpers(dialects, contents, outFiles, options?.overwriteHelper);\n emitStubs(dialects, snapshotSlugs, contents, outFiles);\n\n const receipt = assertReceipt({\n briefDigest: digest,\n paths: { declared: targets.size, rewritten, alreadyDeclared, pending },\n occurrences: { located: occurrencesLocated, rewritten: occurrencesRewritten },\n files: receiptFiles,\n helpers,\n helperUpgraded,\n dynamicBindings,\n });\n\n return { files: outFiles.sort((a, b) => a.path.localeCompare(b.path)), receipt };\n}\n\n/**\n * One file, one tier.\n *\n * The tiers are tried in order and the FIRST one that can place a site wins the whole file: mixing\n * a parsed rewrite with a regex-placed one in the same file would leave two sets of offsets in one\n * coordinate system, which is how a splice lands in the middle of a tag.\n */\nasync function convertFile(\n file: string,\n content: string,\n targets: Target[],\n parsed: ParsedFile | undefined,\n declared: Set<string>,\n llmFallback: LlmFallback | undefined,\n drill: DrillContext,\n): Promise<FileResult> {\n const outcomes = new Map<string, Outcome>();\n const pendingTargets: Target[] = [];\n const dialect = dialectOf(file, content);\n for (const target of targets) {\n /**\n * A path this file has ALREADY converted for THIS route.\n *\n * The read is what proves the route: after conversion the literal survives only inside the\n * fallback string (and for richtext it carries markup), so the element renders an expression\n * and no site matches it any more — this is the check that makes a second run a no-op. Shapes\n * count too, because a repeater declares `cards[*].title` once for every row.\n *\n * A hand-written declaration has no read, so it fails here on purpose and is judged against\n * the target's own ELEMENT further down. @see plan\n */\n if (parsed && dialect && convertedHere(content, parsed, dialect, target, file)) {\n outcomes.set(target.key, \"declared\");\n } else pendingTargets.push(target);\n }\n const empty: FileResult = {\n tier: 1,\n content: null,\n outcomes,\n bindings: [],\n occurrences: { located: 0, rewritten: 0 },\n dialect: dialectOf(file, content),\n dynamic: [],\n componentEdits: [],\n snapshots: [],\n };\n if (pendingTargets.length === 0) return empty;\n\n if (!dialect) {\n for (const target of pendingTargets) outcomes.set(target.key, \"DIALECT_UNSUPPORTED\");\n return { ...empty, dialect: null, outcomes };\n }\n\n const literals = [...new Set(pendingTargets.map((t) => t.literal))];\n // The parse this file already had. Re-parsing here would be a second coordinate system for one\n // file, which is how a splice lands in the middle of a tag.\n const tier1 = parsed ?? (await parseFile(dialect, content));\n let tier: 1 | 2 | 3 = 1;\n let sites = tier1.error ? [] : collectSites(tier1.roots, literals);\n let importAt = tier1.importAt;\n\n if (tier1.error) {\n tier = 2;\n sites = findSitesTolerant(content, literals);\n importAt = undefined; // no parse, no import point: tier 2 declares, it does not read\n }\n\n if (sites.length === 0 && llmFallback) {\n const rescued = await tierThree(file, content, dialect, pendingTargets, llmFallback);\n if (rescued.ok) {\n for (const target of pendingTargets) outcomes.set(target.key, \"rewritten\");\n return {\n tier: 3,\n content: rescued.content,\n outcomes,\n bindings: pendingTargets.map((t) => t.path),\n occurrences: { located: pendingTargets.length, rewritten: pendingTargets.length },\n // NULL, not the file's dialect: tier 3 rewrote the whole file, so whatever it reads from\n // and whatever it imports are its own. Committing a helper and a stub beside output this\n // package did not write would be a guess about a file it cannot account for.\n dialect: null,\n dynamic: [],\n componentEdits: [],\n snapshots: [],\n };\n }\n if (rescued.reason === \"unverifiable\") {\n for (const target of pendingTargets) outcomes.set(target.key, \"TIER3_UNVERIFIABLE\");\n return { ...empty, tier: 3, outcomes, dialect: null };\n }\n }\n\n if (sites.length === 0) {\n const reason: PendingReason =\n tier1.error?.code === \"DIALECT_UNSUPPORTED\"\n ? \"DIALECT_UNSUPPORTED\"\n : tier1.error\n ? \"PARSE_ERROR\"\n : \"NOT_IN_SOURCE\";\n for (const target of pendingTargets) outcomes.set(target.key, reason);\n return { ...empty, tier, outcomes, dialect };\n }\n\n return plan(\n file,\n content,\n dialect,\n pendingTargets,\n sites,\n importAt,\n outcomes,\n tier,\n tier1,\n drill,\n tier1.error ? [] : declarationsIn(tier1.roots, content),\n );\n}\n\n/** Sites → rewrites → bytes, with every refusal named. */\nasync function plan(\n file: string,\n content: string,\n dialect: Dialect,\n targets: Target[],\n sites: Site[],\n importAt: ImportPoint | undefined,\n outcomes: Map<string, Outcome>,\n tier: 1 | 2 | 3,\n parsed: ParsedFile,\n drill: DrillContext,\n declarations: Declaration[],\n): Promise<FileResult> {\n /**\n * TIER 2 WRITES ATTRIBUTES AND NOTHING ELSE, in every dialect.\n *\n * A tolerant site is a regex hit in a file no parser would read: there is no import point, so a\n * `{bcms(…)}` spliced in would reference an identifier the file does not have and break a build\n * that currently works. Declaring the binding is the part that is safe without a tree, so that\n * is the part it does — which is exactly the html dialect's rule, reused rather than re-stated.\n */\n const writing: Dialect = tier === 2 ? \"html\" : dialect;\n const missing: PendingReason = tier === 2 ? \"PARSE_ERROR\" : \"NOT_IN_SOURCE\";\n\n /**\n * The names this file's new identifiers will have, allocated against the ones it already binds.\n *\n * Computed BEFORE any rewrite, because the expressions and the imports have to agree: a page\n * that reads `bcms_1(bcmsHome_1, …)` while importing `bcms` is the collision, moved. @see scope.ts\n */\n const taken = parsed.error ? new Set<string>() : topLevelBindings(dialect, parsed, content);\n /**\n * 🔴 TWO NAMESPACES, BECAUSE A SLUG IS A STRING SOMEBODY ELSE CHOSE. A page slugged `bcms` or\n * `bcmsRows` collided with a helper's own key, took its allocation, and the file imported the\n * helper under the page's identifier — or read the page's snapshot through the helper's. The\n * keys are prefixed so the two sets cannot meet.\n */\n /**\n * What this file ALREADY imports, reused rather than allocated beside.\n *\n * A file converted for one route and not another has the helper and one snapshot in scope\n * already; allocating `bcms_1` for the second route imports the same binding twice under two\n * names, and a snapshot imported twice under one name is a syntax error rather than clutter.\n */\n const slugs = [...new Set(targets.map((t) => t.slug))].sort();\n const preset = new Map<string, string>();\n if (!parsed.error) {\n const locals = helperLocals(parsed, dialect, file);\n for (const [key, held] of [\n [\"helper:bcms\", locals.bcms],\n [\"helper:bcmsRows\", locals.bcmsRows],\n [\"helper:bcmsLayout\", locals.bcmsLayout],\n ] as const) {\n if (held[0]) preset.set(key, held[0]);\n }\n for (const slug of slugs) {\n const local = snapshotLocal(parsed, dialect, slug, file);\n if (local) preset.set(`slug:${slug}`, local);\n }\n }\n\n const wanted = [\n { key: \"helper:bcms\", name: \"bcms\" },\n { key: \"helper:bcmsRows\", name: \"bcmsRows\" },\n { key: \"helper:bcmsLayout\", name: \"bcmsLayout\" },\n // Keyed by the SLUG: two slugs that spell one identifier are still two pages. @see scope.ts\n ...slugs.map((slug) => ({ key: `slug:${slug}`, name: identifierFor(slug) })),\n ].filter((entry) => !preset.has(entry.key));\n const names = new Map([...preset, ...allocateNames(taken, wanted)]);\n const snapshotName = (slug: string): string => names.get(`slug:${slug}`)!;\n const helperName = (name: string): string => names.get(`helper:${name}`)!;\n\n /**\n * The route parameter, for a file whose path is `[…]`-shaped.\n *\n * Decided ONCE per file: every read in it appends the same expression, and the signature edit\n * that makes the expression legal is written once. A dynamic route this cannot give a parameter\n * to converts NOTHING page-scoped — see `DYNAMIC_PARAMS_UNAVAILABLE` below for why a read\n * without the slug is worse than no read at all.\n */\n const dynamicRoute = isDynamicRoute(file) && tier !== 2;\n const params = dynamicRoute ? routeParams(content, parsed, dialect, file) : null;\n const byLiteral = new Map<string, Target[]>();\n for (const target of targets) byLiteral.set(target.literal, [...(byLiteral.get(target.literal) ?? []), target]);\n\n const rewrites: Rewrite[] = [];\n const dynamic: DynamicBinding[] = [];\n const componentEdits: { file: string; splices: Splice[] }[] = [];\n let located = 0;\n\n for (const [literal, sharing] of byLiteral) {\n const forLiteral = sites.filter((s) => s.literal === literal);\n if (forLiteral.length === 0) {\n for (const target of sharing) outcomes.set(target.key, missing);\n continue;\n }\n const assigned = sharing.length === 1 ? new Map([[sharing[0]!.key, forLiteral]]) : resolvePositionally(sharing, forLiteral);\n if (!assigned) {\n // Two DIFFERENT paths render the same sentence and position cannot tell them apart. BOTH\n // are skipped — binding either would be a coin flip — and the rest of the file proceeds.\n for (const target of sharing) outcomes.set(target.key, \"AMBIGUOUS_LITERAL\");\n continue;\n }\n\n for (const target of sharing) {\n const mine = assigned.get(target.key) ?? [];\n // A string in a script or a comment is a program's, not a page's: never rewritten, and\n // reported only when it is the ONLY place the literal appears.\n const rewritable = mine.filter((s) => s.where !== \"script\" && s.where !== \"comment\" && !s.partial);\n if (rewritable.length === 0) {\n outcomes.set(\n target.key,\n mine.some((s) => s.partial)\n ? \"SUBSTRING_ONLY\"\n : mine.some((s) => s.where === \"script\" || s.where === \"comment\")\n ? \"IN_SCRIPT_OR_COMMENT\"\n : missing,\n );\n continue;\n }\n // An image path's value is a URL, and a URL matches things that are not images: an\n // element's TEXT, or an `href` pointing at the same file. Those are COINCIDENCES, so they\n // are dropped rather than refused — but if nothing eligible is left, the path is a kind\n // mismatch and says so. @see isImageSource\n const eligible = target.kind === \"image\" ? rewritable.filter(isImageSource) : rewritable;\n if (eligible.length === 0) {\n outcomes.set(target.key, \"KIND_MISMATCH\");\n continue;\n }\n\n // A page-scoped read on a dynamic route resolves the same entry for every URL the route\n // serves, so binding it without the parameter renders the first post on all hundred of them.\n if (dynamicRoute && params === null && target.scope === \"page\" && DIALECT_RULES[writing].text) {\n outcomes.set(target.key, \"DYNAMIC_PARAMS_UNAVAILABLE\");\n continue;\n }\n\n /**\n * 🔴 A DECLARATION ON A COMPONENT REACHES NO DOM NODE. `<Card>` expands to markup the\n * component decides; an attribute on it is a prop, and a prop nothing reads is a binding\n * every release reports unmatched. The value has to move INTO the component instead, which\n * is `PROP_TARGET_NOT_FOUND` until it does.\n *\n * ONE exception, and it does NOT extend to richtext: icon+text, where the value gets its own\n * `<span>` — real markup, whatever the component does with its children. A richtext value IS\n * the element's whole subtree, so there is no single text child to wrap; taking the exception\n * there declared the path on `<Card>` with no read at all, and reported it rewritten.\n */\n const wrappable = (site: Site): boolean =>\n target.kind !== \"richtext\" && site.mixed && site.textRange !== null;\n const unreachable = eligible.some(\n (site) => site.where === \"text\" && !isIntrinsic(site.tag) && !wrappable(site),\n );\n if (unreachable) {\n outcomes.set(target.key, \"PROP_TARGET_NOT_FOUND\");\n continue;\n }\n\n /**\n * 🔴 PER OCCURRENCE, NOT PER PATH. A hand-written `data-bcms-field` on the FIRST of two\n * elements rendering this value used to mark the whole path declared, and the second\n * sentence stayed hardcoded — a page half of which stops reflecting, with a receipt that\n * says it is done. So each site is asked separately, and only the ones that already carry\n * THIS declaration are left alone.\n */\n const declares = (d: Declaration): boolean =>\n d.scope === target.scope && (d.path === target.path || d.path === shapeOfPath(target.path));\n const declaredAt = new Set(declarations.filter(declares).map((d) => d.at));\n // An element carries ONE `data-bcms-field`. One already bound to another path is not a\n // place this path can go — and writing a second attribute is markup a browser silently\n // keeps only the first of.\n const claimedAt = new Set(declarations.filter((d) => !declares(d) && d.via === \"field\").map((d) => d.at));\n const writesField = (site: Site): boolean => site.where !== \"attr\" || target.kind === \"image\";\n const fresh = eligible.filter(\n (site) => !declaredAt.has(site.attrInsertAt) && !(writesField(site) && claimedAt.has(site.attrInsertAt)),\n );\n\n located += eligible.length;\n /**\n * 🔴 AN OCCURRENCE THIS CANNOT WRITE IS A REFUSAL, NOT A SILENT DROP. An element already\n * carrying a `data-bcms-field` for a DIFFERENT path cannot also carry this one, so the\n * occurrence is unbindable — and quietly removing it from the list left the path reported as\n * fully rewritten with one sentence on the page still hardcoded. Both paths want one\n * element and nothing can say which; that is what `AMBIGUOUS_LITERAL` means.\n */\n const blocked = eligible.filter(\n (site) => !declaredAt.has(site.attrInsertAt) && writesField(site) && claimedAt.has(site.attrInsertAt),\n );\n if (blocked.length > 0) {\n outcomes.set(target.key, \"AMBIGUOUS_LITERAL\");\n continue;\n }\n if (fresh.length === 0) {\n outcomes.set(\n target.key,\n eligible.some((site) => declaredAt.has(site.attrInsertAt)) ? \"declared\" : \"AMBIGUOUS_LITERAL\",\n );\n continue;\n }\n let refusal: PendingReason | null = null;\n for (const site of fresh) {\n /**\n * A PROP travels to another file, so the conversion is two hops and the receipt records\n * both. Hop 1 happens either way — the value coming from the CMS is an improvement even\n * when nothing can declare it — and only the DECLARATION is conditional.\n */\n let bindings: { prop: string; path: string } | undefined;\n let bindingsMerge: Rewrite[\"bindingsMerge\"];\n if (site.where === \"prop\" && site.attr) {\n /**\n * The FIRST component is hop 1, not hop 2.\n *\n * The call site is where the value comes from, not a hop of the chain — counting it as\n * one made `MAX_HOPS: 4` mean three components, and a four-component chain that the\n * doctrine says is in range came back `PROP_DRILLED_DEEP`.\n */\n const merge = mergeInto(content, site);\n const drilled =\n merge === \"refuse\"\n ? { ok: false as const, reason: \"PROP_TARGET_NOT_FOUND\" as const, edits: [] }\n : await drillProp(drill, file, site.tag, site.attr, target.kind, 1);\n if (drilled.ok) {\n bindings = { prop: site.attr, path: target.path };\n if (merge !== null && merge !== \"refuse\") bindingsMerge = merge;\n componentEdits.push(...drilled.edits);\n dynamic.push({\n file: drilled.edits[0]!.file,\n prop: site.attr,\n path: target.path,\n callSites: [{ file, literal: `${site.attr}: ${JSON.stringify(target.path)}` }],\n });\n } else {\n refusal = drilled.reason ?? \"PROP_TARGET_NOT_FOUND\";\n }\n }\n rewrites.push({\n ...(bindings ? { bindings } : {}),\n ...(bindingsMerge ? { bindingsMerge } : {}),\n site: { ...site, file },\n key: target.key,\n path: target.path,\n kind: target.kind,\n // A richtext fallback is taken from the SOURCE, not from the brief: the brief's\n // `original` has been through `firstBlockText`, so it is the text a reader sees with\n // the markup already stripped. Keeping that as the in-code fallback would silently\n // flatten every bold and link the moment a build ran against a stub snapshot.\n fallback:\n target.kind === \"richtext\" && site.inner\n ? content.slice(site.inner.start, site.inner.end).trim()\n : target.fallback,\n snapshot: snapshotName(target.slug),\n slug: target.slug,\n scope: target.scope,\n dynamic: params !== null && target.scope === \"page\",\n });\n }\n outcomes.set(target.key, refusal ?? \"rewritten\");\n }\n }\n\n const rule = DIALECT_RULES[writing];\n\n /**\n * REPEATERS, after every leaf has been placed and before anything is written.\n *\n * After, because a loop needs to know which element each leaf landed on — that is the whole\n * input to finding the rows. Before, because the loop REPLACES its members' rewrites with one\n * splice over the whole group. @see loops.ts\n */\n const looped = new Set<string>();\n for (const [arrayPath, group] of repeatGroups(targets)) {\n const members: RepeatMember[] = [];\n for (const target of group) {\n const mine = rewrites.filter((r) => r.key === target.key);\n const split = splitIndexed(arrayPath, target.path);\n // One site per leaf: a value rendered twice inside one card is not a row this can template.\n if (mine.length !== 1 || !split) continue;\n members.push({\n key: target.key,\n path: target.path,\n leaf: split.leaf,\n index: split.index,\n kind: target.kind,\n fallback: mine[0]!.fallback,\n site: mine[0]!.site,\n });\n }\n if (members.length !== group.length || new Set(members.map((m) => m.index)).size < 2) continue;\n\n // Nested at the path the read walks, not flattened into a dotted key. @see setLeaf\n const rows: Record<string, unknown>[] = [];\n const writable = members.every((member) =>\n setLeaf((rows[member.index] ??= emptyRow()), member.leaf, member.fallback),\n );\n\n const memberKeys = new Set(members.map((m) => m.key));\n const plan = parsed.error || !writable\n ? null\n : emitRepeater(writing, members, arrayPath, rows.filter(Boolean), {\n content,\n roots: parsed.roots,\n read: helperName(\"bcms\"),\n rows: helperName(\"bcmsRows\"),\n snapshot: snapshotName(group[0]!.slug),\n // 🔴 A REPEATER ON A DYNAMIC ROUTE READS ITS OWN ENTRY'S ARRAY. Without the parameter\n // `bcmsRows` looks for `cards` on the entries WRAPPER, finds nothing, and every URL the\n // route serves renders the in-code fallback rows forever.\n slug: params?.slug ?? null,\n });\n // A rewrite belonging to something else inside the group's span would be swallowed by the\n // splice. Rather than silently lose it, the group stays a fixed number of rows.\n const swallows =\n plan !== null &&\n rewrites.some(\n (r) => !memberKeys.has(r.key) && r.site.range.start >= plan.range.start && r.site.range.end <= plan.range.end,\n );\n\n if (!plan || swallows) {\n // Every index is still declared and still reads its own value — what is fixed is the\n // NUMBER of rows, and that is exactly what the reason says.\n for (const member of members) outcomes.set(member.key, \"REPEATER_FIXED_LENGTH\");\n continue;\n }\n\n for (const member of members) {\n looped.add(member.key);\n outcomes.set(member.key, \"rewritten\");\n }\n // ONE entry per leaf, not per row: the loop declares `cards[*].title` once and every row\n // resolves it. Listing it three times would tell the proposer to verify one thing thrice.\n for (const leaf of [...new Set(members.map((m) => m.leaf))]) {\n dynamic.push({\n file,\n prop: null,\n path: shapeOf(arrayPath, leaf),\n // The loop's OWN index name — `i_1` when the row already bound `i`. Hardcoding `i` here\n // described a binding the file does not contain, which is what the proposer looks for.\n callSites: [{ file, literal: `${arrayPath}[\\${${plan.names.index}}].${leaf}` }],\n });\n }\n rewrites.push({\n site: { ...members[0]!.site, file, range: plan.range, where: \"text\" },\n key: `${arrayPath}::loop`,\n path: arrayPath,\n kind: \"\",\n fallback: \"\",\n snapshot: snapshotName(group[0]!.slug),\n slug: group[0]!.slug,\n scope: \"page\",\n dynamic: false,\n raw: plan.text,\n });\n }\n const kept = rewrites.filter((r) => !looped.has(r.key));\n\n // By KEY, never by path: dropping \"every rewrite whose path collided\" would drop the other\n // route's perfectly placed rewrite of the same path along with the colliding one.\n const collided = new Set(overlapping(kept).map((r) => r.key));\n const applied = kept.filter((r) => !collided.has(r.key));\n for (const key of collided) outcomes.set(key, \"AMBIGUOUS_LITERAL\");\n\n if (applied.length === 0) {\n return { tier, content: null, outcomes, bindings: [], occurrences: { located, rewritten: 0 }, dialect: writing, dynamic: [], componentEdits, snapshots: [] };\n }\n\n // From the rewrites this file actually EMITS, so the imports and the expressions can never\n // disagree about which snapshot a page reads.\n // Layout rewrites read the shared snapshot the helper imports itself, so they name no page.\n const readSlugs = [...new Set(applied.filter((r) => r.scope === \"page\").map((r) => r.slug))].sort();\n const helper = HELPER_PATH[writing];\n const rewritten = rewriteFile(content, writing, applied, {\n // html reads nothing at build time, so it imports nothing: `injectFields` writes its values\n // into the built markup at publish.\n snapshots: rule.text\n ? readSlugs\n .filter((slug) => !preset.has(`slug:${slug}`))\n .map((slug) => ({\n identifier: snapshotName(slug),\n specifier: relativeImport(file, `${CONTENT_DIR}/${slug}.json`),\n }))\n : [],\n helper: rule.text && helper ? relativeImport(file, helper).replace(/\\.tsx?$/, \"\") : null,\n read: helperName(\"bcms\"),\n layout: helperName(\"bcmsLayout\"),\n slug: params?.slug ?? null,\n extra: params?.imports,\n // Only what the file uses: an unused import is dead code in someone else's repository.\n helpers: [\n ...(applied.some((r) => r.scope === \"page\" && r.raw === undefined)\n ? [{ name: \"bcms\", alias: helperName(\"bcms\") }]\n : []),\n ...(applied.some((r) => r.raw !== undefined)\n ? [\n { name: \"bcms\", alias: helperName(\"bcms\") },\n { name: \"bcmsRows\", alias: helperName(\"bcmsRows\") },\n ]\n : []),\n ...(applied.some((r) => r.scope === \"layout\")\n ? [{ name: \"bcmsLayout\", alias: helperName(\"bcmsLayout\") }]\n : []),\n ]\n .filter((helper, at, all) => all.findIndex((h) => h.name === helper.name) === at)\n .filter((helper) => !preset.has(`helper:${helper.name}`)),\n at: importAt,\n }, params?.splices ?? []);\n\n return {\n tier,\n content: rewritten,\n outcomes,\n bindings: [...new Set([...applied.flatMap((r) => (r.raw ? [] : [r.path])), ...dynamic.map((d) => d.path)])].sort(),\n occurrences: { located, rewritten: applied.length },\n dialect: writing,\n dynamic,\n componentEdits,\n snapshots: rule.text ? readSlugs : [],\n };\n}\n\n/**\n * How this call site's EXISTING `bcmsBindings` can be joined — or that it cannot.\n *\n * `null` when there is none. An object literal is merged into; any other expression is spread into\n * a new one, which keeps whatever the author wrote. Anything this cannot read at all is refused,\n * because the alternative is an edit that assumes a shape and writes a file that does not parse.\n *\n * 🔴 THE MEMBERS AND THE COMMA COME FROM THE PARSE. Scanning back from the closing braces for a\n * comma reads one that is inside a trailing COMMENT — an object whose last member is followed by a\n * block comment looked like it already ended in a separator, and an empty object containing only a\n * comment looked like it had members. The emitted object was then missing a comma or carrying two,\n * and either is somebody's build. Babel is asked instead, and the insertion goes directly after\n * the last PROPERTY, which is before any trailing trivia by construction.\n */\nfunction mergeInto(content: string, site: Site): Rewrite[\"bindingsMerge\"] | \"refuse\" | null {\n if (!site.bindingsAttr) return null;\n const text = content.slice(site.bindingsAttr.start, site.bindingsAttr.end);\n const open = text.indexOf(\"{\");\n if (open < 0) return \"refuse\";\n // The attribute's value, as an expression: `bcmsBindings={<expr>}`.\n const inner = text.slice(open + 1, text.lastIndexOf(\"}\"));\n const parsed = parseExpression(inner);\n if (!parsed) return \"refuse\";\n\n const base = site.bindingsAttr.start + open + 1;\n if (parsed.type !== \"ObjectExpression\") {\n return {\n kind: \"spread\",\n range: site.bindingsAttr,\n inner: inner.trim(),\n insertAt: 0,\n separator: \", \",\n trailing: \"\",\n };\n }\n\n const properties = (parsed.properties as { end?: number | null }[]) ?? [];\n const last = properties[properties.length - 1];\n if (!last) {\n /**\n * An object with no members: just inside its opening brace, so a comment it holds stays where\n * the author put it. The spacing is read off what is already there rather than assumed — an\n * object containing only a comment already has both spaces, and adding more is noise in a\n * diff a human has to approve.\n */\n const within = (parsed.start ?? 0) + 1;\n const rest = inner.slice(within);\n return {\n kind: \"object\",\n range: site.bindingsAttr,\n inner: \"\",\n insertAt: base + within,\n // A space after the brace always; one before whatever follows only when there is not one.\n separator: \" \",\n trailing: /^\\s/.test(rest) ? \"\" : \" \",\n };\n }\n /**\n * Directly after the last property, with its own comma.\n *\n * Whatever follows — a trailing comma, a comment, both — stays exactly where the author put it,\n * and a trailing comma that ends up after the new member is still a trailing comma. That is why\n * this needs no \"is it already separated?\" question at all: the question only existed because\n * the insertion used to go at the closing brace, on the far side of the trivia.\n */\n return {\n kind: \"object\",\n range: site.bindingsAttr,\n inner: \"\",\n insertAt: base + (last.end ?? 0),\n separator: \", \",\n trailing: \"\",\n };\n}\n\n/** One expression, or null when it is not one this can read. */\nfunction parseExpression(code: string): { type: string; start?: number | null; end?: number | null; properties?: unknown[] } | null {\n try {\n const ast = parseProgram(`(${code})`) as {\n program: { body: { expression?: { type: string; start?: number; end?: number } }[] };\n };\n const expression = ast.program.body[0]?.expression;\n if (!expression) return null;\n // The wrapping `(` shifts every offset by one.\n return {\n ...expression,\n start: (expression.start ?? 0) - 1,\n end: (expression.end ?? 0) - 1,\n properties: (expression as { properties?: unknown[] }).properties?.map((property) => {\n const held = property as { start?: number; end?: number };\n return { ...held, start: (held.start ?? 0) - 1, end: (held.end ?? 0) - 1 };\n }),\n };\n } catch {\n return null;\n }\n}\n\n/**\n * The brief's repeater groups in this file, by array path.\n *\n * The grouping is the DERIVE lane's, carried on the locator: `deriveSchema` decided these three\n * siblings are one repeater, and re-deciding it here from the source would be a second opinion\n * about a question already answered — with the dashboard showing the first answer.\n */\nfunction repeatGroups(targets: Target[]): Map<string, Target[]> {\n const out = new Map<string, Target[]>();\n for (const target of targets) {\n const key = target.locator?.repeat?.groupKey;\n if (key) out.set(key, [...(out.get(key) ?? []), target]);\n }\n return out;\n}\n\n/**\n * Which of two paths sharing a sentence is which, by the built element's position.\n *\n * BEST-EFFORT, and it says so by failing rather than guessing: built-DOM positions do not survive\n * component expansion, wrappers or conditional rendering, so the ancestor chain is compared as a\n * SUBSEQUENCE and anything short of a unique assignment falls through to `AMBIGUOUS_LITERAL`.\n */\nfunction resolvePositionally(targets: Target[], sites: Site[]): Map<string, Site[]> | null {\n const assigned = new Map<string, Site[]>();\n const claimed = new Set<Site>();\n for (const target of targets) {\n const locator = target.locator;\n if (!locator) return null;\n const candidates = sites.filter(\n (s) => s.siblingIndex === locator.siblingIndex && isSubsequence(locator.ancestors, s.ancestors),\n );\n // Two members of one repeater sit at the SAME position inside their own row, so position alone\n // cannot separate them — `repeat.index` is the whole of what distinguishes row 0 from row 1,\n // and it indexes the candidates in document order.\n const site = locator.repeat ? candidates[locator.repeat.index] : candidates.length === 1 ? candidates[0] : undefined;\n if (!site || claimed.has(site)) return null;\n claimed.add(site);\n assigned.set(target.key, [site]);\n }\n return assigned;\n}\n\n/** Is every tag of `wanted` present in `chain`, in order? Wrappers may sit between them. */\nfunction isSubsequence(wanted: string[], chain: string[]): boolean {\n let at = 0;\n for (const tag of chain) if (at < wanted.length && wanted[at]!.toLowerCase() === tag.toLowerCase()) at++;\n return at === wanted.length;\n}\n\n/**\n * Tier 3, verified before it is believed.\n *\n * The output has to re-parse under tier 1 AND declare EXACTLY the paths that were asked for.\n * Anything else is a file that looks converted and is not: a binding outside the brief is dead\n * forever, and a missing one is a value that silently stops reflecting.\n */\ntype TierThree = { ok: true; content: string } | { ok: false; reason: \"declined\" | \"unverifiable\" };\n\nasync function tierThree(\n file: string,\n content: string,\n dialect: Dialect,\n targets: Target[],\n llmFallback: LlmFallback,\n): Promise<TierThree> {\n const remaining: LocatedPath[] = targets.map((t) => ({\n route: t.route,\n path: t.path,\n kind: t.kind,\n original: t.literal,\n files: [file],\n }));\n const produced = await llmFallback({ path: file, content }, remaining);\n // Declining is not a failure: the CLI passes no fallback at all, and a server-lane transformer\n // that has nothing to say must leave the paths to the tier-1/2 reason rather than mask it.\n if (!produced) return { ok: false, reason: \"declined\" };\n\n const reparsed = await parseFile(dialect, produced);\n if (reparsed.error) return { ok: false, reason: \"unverifiable\" };\n\n /**\n * 🔴 STRUCTURALLY, OFF THE PARSE — never off a regex over the bytes.\n *\n * A set of matched strings answers none of the questions that decide whether this file is\n * converted: a declaration inside a comment or a string counts; the same path declared on two\n * elements counts once; a wrong `data-bcms-kind` counts as right; and a file that declares\n * every path while reading NOTHING from the CMS — the exact output a model produces when it\n * misreads the task — passes completely. Each of those ships a file that looks converted and\n * is not, which is the one thing tier 3 exists to be unable to do.\n */\n /**\n * 🔴 KEYED BY THE WHOLE IDENTITY, AND CHECKED ON THE ELEMENT.\n *\n * `path` alone answers the wrong question three ways: two routes rendered by one file share a\n * path, a `data-bcms-layout-field` is a different lane from a `data-bcms-field` of the same\n * name, and one element declared twice counts once. And a file-wide `bcms(` proves nothing about\n * the element that declares — a call in an unused statement, or on a descendant, passed. So each\n * declaring element is matched to ONE target, and its own bytes have to carry that target's\n * read, naming identifiers this file imports. @see converted.ts\n */\n /**\n * 🔴 ONE ELEMENT PER TARGET, MATCHED BY THE WHOLE IDENTITY.\n *\n * Keying by `(scope, path)` collapses the case this whole lane exists for: one file rendering\n * two routes that carry the same path. Two elements then matched one key, the second was read as\n * a duplicate, and output that converted `/` twice while leaving `/about` hardcoded was refused\n * — or, with the counts lining up, accepted. Each declaring element is matched to the target\n * whose OWN snapshot it reads, and the match has to be a bijection.\n */\n const elements = declaringElements(reparsed.roots, produced);\n if (elements.length !== targets.length) return { ok: false, reason: \"unverifiable\" };\n\n const locals = helperLocals(reparsed, dialect, file);\n const reads = DIALECT_RULES[dialect].text !== null;\n const boundary = (name: string): string => `(?<![\\\\w$])${escapeRegExp(name)}(?![\\\\w$])`;\n const claimed = new Set<Target>();\n\n for (const element of elements) {\n // Every target this element COULD be — same lane, same path — narrowed by the read it carries.\n const candidates = targets.filter(\n (target) =>\n !claimed.has(target) &&\n target.scope === element.scope &&\n target.path === element.path &&\n element.kind === target.kind,\n );\n const match = candidates.find((target) => {\n if (!reads) return true;\n const quoted = escapeRegExp(JSON.stringify(target.path));\n if (target.scope === \"layout\") {\n return locals.bcmsLayout.some((name) =>\n new RegExp(`${boundary(name)}\\\\s*\\\\(\\\\s*${quoted}`).test(element.own),\n );\n }\n const snapshot = snapshotLocal(reparsed, dialect, target.slug, file);\n return (\n snapshot !== null &&\n locals.bcms.some((name) =>\n new RegExp(`${boundary(name)}\\\\s*\\\\(\\\\s*${boundary(snapshot)}\\\\s*,\\\\s*${quoted}`).test(element.own),\n )\n );\n });\n if (!match) return { ok: false, reason: \"unverifiable\" };\n claimed.add(match);\n }\n if (claimed.size !== targets.length) return { ok: false, reason: \"unverifiable\" };\n\n return { ok: true, content: produced };\n}\n\n/** The helper module for every dialect this conversion actually wrote a read into. */\nfunction emitHelpers(\n dialects: Set<Dialect>,\n contents: Map<string, string>,\n out: PlanFile[],\n overwrite?: boolean,\n): { helpers: string[]; helperUpgraded: boolean } {\n const helpers: string[] = [];\n let helperUpgraded = false;\n for (const dialect of [...dialects].sort()) {\n const path = HELPER_PATH[dialect];\n if (!path || !DIALECT_RULES[dialect].text) continue;\n const source = helperSource(dialect);\n const existing = contents.get(path);\n if (existing === undefined) {\n out.push({ path, operation: \"add\", content: source });\n helpers.push(path);\n continue;\n }\n const version = isKnownHelper(existing, dialect);\n if (version === null && overwrite) {\n out.push({ path, operation: \"modify\", content: source });\n helpers.push(path);\n continue;\n }\n if (version === null) {\n throw new ConvertError(\n \"HELPER_CONFLICT\",\n `${path} already exists and its bytes are not ones @bettercms-ai/convert wrote — someone else's module, or ours with edits in it. Overwriting it would destroy that work. Move it, or re-run with --overwrite-helper.`,\n );\n }\n if (version < HELPER_VERSION) {\n out.push({ path, operation: \"modify\", content: source });\n helpers.push(path);\n helperUpgraded = true;\n }\n }\n return { helpers, helperUpgraded };\n}\n\n/**\n * The snapshot stubs — the second and last kind of file this codemod creates.\n *\n * `{}` exactly, at `bcms-content/*.json` exactly: the proposer's NEW_FILE exemption is written as\n * that pattern and that content, so a stub the platform can recognise is the only new file a\n * conversion can smuggle in. A build with them renders every fallback and still succeeds.\n */\nfunction emitStubs(\n dialects: Set<Dialect>,\n slugs: Set<string>,\n contents: Map<string, string>,\n out: PlanFile[],\n): void {\n if (![...dialects].some((d) => DIALECT_RULES[d].text)) return;\n const paths = [...[...slugs].map((slug) => `${CONTENT_DIR}/${slug}.json`), `${CONTENT_DIR}/layout.json`];\n for (const path of paths.sort()) {\n if (contents.has(path) || out.some((f) => f.path === path)) continue;\n out.push({ path, operation: \"add\", content: STUB_CONTENT });\n }\n}\n","/**\n * The brief this package accepts, and the digest that names one.\n *\n * Structurally a SUBSET of the backend's `ConversionBrief` (`src/lib/content/conversion-brief.ts`)\n * so that value can be passed straight in: everything the codemod does not read is optional here.\n * The one addition is `locator`, which the derive lane will record per path and which positional\n * resolution uses to tell two copies of the same sentence apart. It is optional on purpose —\n * a brief without locators still converts, it just falls back to \"the literal must be unique\".\n */\nimport { createHash } from \"node:crypto\";\n\n/**\n * Where the BUILT element that carried this value sat, so a duplicate literal can be resolved\n * by position rather than by guessing.\n *\n * Best-effort by construction: built-DOM positions do not survive component expansion, wrappers\n * or conditional rendering, so `ancestors` is compared as a SUBSEQUENCE of the source element's\n * tag chain and any mismatch falls to `AMBIGUOUS_LITERAL` rather than to a coin flip.\n */\nexport interface PathLocator {\n /** Tag names from the nearest landmark down to the element's parent, outermost first. */\n ancestors: string[];\n /** The element's index among its ELEMENT siblings. */\n siblingIndex: number;\n /** Set when the element is one member of a derived repeater group. */\n repeat?: { groupKey: string; index: number };\n}\n\nexport interface BriefPath {\n /** The `data-bcms-field` value, in the editor's grammar (`hero.title`, `facts[2].label`). */\n path: string;\n /**\n * PAGE or LAYOUT, and the difference is an attribute, a helper and an identity.\n *\n * A value the derive lane found identical on every route is the shared chrome — a header, a\n * footer — and it is ONE field, not one per page. It is read with `bcmsLayout` and declared on\n * `data-bcms-layout-field`, the separate attribute the chrome lane already carries\n * (`src/lib/sites/render-page.ts`), so the block lane's own `[data-bcms-field]` query cannot\n * reach it. Absent means `\"page\"`: a brief written before the distinction existed still means\n * what it said.\n */\n scope?: \"page\" | \"layout\";\n /** `data-bcms-kind` — \"text\" | \"richtext\" | \"image\", as `kindOf` spells it. */\n kind: string;\n /** The declared field type, which `kind` deliberately loses (richtext vs document). */\n type: string;\n label: string;\n /** The copy the REPO renders today. Null when the import captured no default. */\n original: string | null;\n /** What the CMS holds now. */\n current: string;\n truncated?: true;\n locator?: PathLocator;\n}\n\nexport interface BriefPage {\n slug: string;\n /** The URL the built site serves this page at. */\n route: string;\n title?: string;\n paths: BriefPath[];\n pathsOmitted?: number;\n}\n\n/** Only what the codemod reads. A backend `ConversionBrief` satisfies it. */\nexport interface Brief {\n pages: BriefPage[];\n}\n\n/**\n * The name of one brief — `(route, path, kind, original)` for every page, hashed.\n *\n * Identity, not integrity: the receipt carries it so a coverage meter can say \"this conversion\n * was run against THAT list of paths\" and refuse to compare against a re-derived one. Labels and\n * `current` values are excluded because an edit in the dashboard changes them without changing\n * what there is to convert. So is SCOPE: a field that moves from page to layout is the same field\n * with the same copy, and the pin carries each path's scope separately where it is actually read.\n *\n * 🔴 BYTE-FOR-BYTE `src/lib/content/brief-digest.ts`. The codemod runs on the customer's machine\n * and the server computes the same name for the same brief; the pin is keyed by it and the\n * receipt carries it, so a disagreement makes every receipt stop matching its pin and the\n * coverage meter read zero forever. `brief-digest.test.ts` pins both against one literal hash.\n */\nexport function briefDigest(brief: Brief): string {\n const lines = brief.pages\n .flatMap((page) =>\n page.paths.map((p) => [page.route, p.path, p.kind, p.original ?? \"\"].join(\" \")),\n )\n .sort();\n const hash = createHash(\"sha256\").update([`paths:${lines.length}`, ...lines].join(\"\\n\"), \"utf8\");\n return `sha256:${hash.digest(\"hex\")}`;\n}\n","/**\n * Which template language a file is written in — by EXTENSION, and nothing else.\n *\n * Sniffing content would let one badly named file decide which parser runs, and a parser that\n * runs on the wrong grammar does not fail loudly: it returns a plausible tree with the wrong\n * offsets, and the rewrite splices bytes into the middle of something. `content` is accepted\n * because the callers all have it and one distinction will eventually need it (a `.js` file that\n * is really JSX), and until then the answer must not depend on it.\n */\nexport type Dialect = \"html\" | \"astro\" | \"jsx\" | \"svelte\" | \"vue\";\n\nconst BY_EXTENSION: Record<string, Dialect> = {\n \".html\": \"html\",\n \".htm\": \"html\",\n \".astro\": \"astro\",\n \".jsx\": \"jsx\",\n \".tsx\": \"jsx\",\n \".svelte\": \"svelte\",\n \".vue\": \"vue\",\n};\n\nexport function dialectOf(path: string, _content?: string): Dialect | null {\n const lower = path.toLowerCase();\n const at = lower.lastIndexOf(\".\");\n return at < 0 ? null : (BY_EXTENSION[lower.slice(at)] ?? null);\n}\n","/**\n * The two strings the codemod writes: the READ (how a template asks the CMS for a value) and the\n * DECLARATION (the attributes that say which element holds it).\n *\n * Both are literal text on purpose. `data-bcms-field={paths.hero.title}` would be a binding\n * nothing can verify before a release — the proposer refuses it by name — so this module never\n * emits an expression where a path belongs, and the fallback is the exact copy the repo renders\n * today so a build with an empty snapshot renders the site it rendered before.\n */\nimport { formatPropsAttribute, type BindingKind } from \"@bettercms-ai/types\";\nimport type { Dialect } from \"./dialect.js\";\n\n/** How a dialect spells the things that differ. Data, so a sixth dialect is a row. */\nexport interface DialectRule {\n /** A value in TEXT position, or null when this dialect only ever writes attributes. */\n text: ((expression: string) => string) | null;\n /** The attribute that replaces an element's children with HTML. */\n richtext: ((expression: string) => string) | null;\n /** `alt={…}` — a value in ATTRIBUTE position. */\n attr: ((name: string, expression: string) => string) | null;\n /** How this dialect reads the route parameter on a dynamic route. */\n slug: string | null;\n /**\n * How this dialect repeats one element over a list.\n *\n * TWO SHAPES, because the dialects genuinely have two: jsx, astro and svelte WRAP the row in a\n * construct, vue puts `v-for` ON the row's open tag. One shape forced onto the other would mean\n * emitting a `<template v-for>` wrapper nobody writes by hand, in a diff a human has to approve.\n */\n loop:\n | { kind: \"wrap\"; open: (rows: string, row: string, index: string) => string; close: string }\n | { kind: \"attr\"; attr: (rows: string, row: string, index: string) => string }\n | null;\n /** An extra attribute every row carries — React's list key. Null where the dialect needs none. */\n loopKey: ((index: string) => string) | null;\n /** The helper module, repository-relative, or null when the dialect needs none. */\n helper: string | null;\n /** How an import statement is spelled, and where it goes. */\n importAt: \"frontmatter\" | \"afterImports\" | null;\n}\n\n/**\n * An html attribute holding a JavaScript expression, quoted so the expression survives.\n *\n * 🔴 VUE PUTS CODE IN AN ATTRIBUTE, and the code contains strings. `v-for=\"… bcmsRows(page,\n * \"cards\", […])\"` ends the attribute at the first inner quote and leaves the rest of the\n * expression as stray attributes — a template that does not compile. Single quotes carry a\n * double-quoted expression; an expression carrying both gets its double quotes escaped, which is\n * what an html attribute value is allowed to hold.\n */\nexport function quoteAttr(expression: string): string {\n if (!expression.includes('\"')) return `\"${expression}\"`;\n /**\n * 🔴 SINGLE QUOTES, ALWAYS, ONCE THERE IS A DOUBLE QUOTE IN THE EXPRESSION.\n *\n * A repeater's rows expression carries JSON, so it always has `\"`. When a fallback ALSO carried\n * an apostrophe the old rule flipped back to double quotes and escaped every `\"` as `&quot;` —\n * which changes the bytes of the path the binding declares, so the next run could not find what\n * it had written and reported the whole group not in the source. The apostrophes are escaped\n * instead: they are inside a quoted attribute, where an entity is exactly what an entity is for.\n */\n return `'${expression.replace(/'/g, \"&#39;\")}'`;\n}\n\nexport const DIALECT_RULES: Record<Dialect, DialectRule> = {\n // Attributes only: a static site's values are written into the built markup by `injectFields`\n // at publish time, so there is nothing for the template itself to read.\n html: {\n text: null,\n richtext: null,\n attr: null,\n slug: null,\n // No loop, and that is the honest answer rather than a missing feature: a static site's rows\n // are written into the built markup per index by `injectFields` at publish time. A repeater\n // here is `REPEATER_FIXED_LENGTH`, documented, with every index still declared.\n loop: null,\n loopKey: null,\n helper: null,\n importAt: null,\n },\n astro: {\n text: (e) => `{${e}}`,\n richtext: (e) => `set:html={${e}}`,\n attr: (name, e) => `${name}={${e}}`,\n slug: \"Astro.params.slug\",\n loop: { kind: \"wrap\", open: (rows, row, i) => `{${rows}.map((${row}, ${i}) => (`, close: \"))}\" },\n loopKey: null,\n helper: \"src/bcms-content.ts\",\n importAt: \"frontmatter\",\n },\n jsx: {\n text: (e) => `{${e}}`,\n richtext: (e) => `dangerouslySetInnerHTML={{ __html: ${e} }}`,\n attr: (name, e) => `${name}={${e}}`,\n // Next's `[slug]/page.tsx` takes it from `params`, which means editing the page component's\n // signature — so this is the shape, and `routeParams` decides whether it can be written (and\n // whether it has to be awaited). A page it cannot edit is `DYNAMIC_PARAMS_UNAVAILABLE`.\n slug: \"params.slug\",\n loop: { kind: \"wrap\", open: (rows, row, i) => `{${rows}.map((${row}, ${i}) => (`, close: \"))}\" },\n loopKey: (i) => `key={${i}}`,\n helper: \"src/bcms-content.ts\",\n importAt: \"afterImports\",\n },\n // TODO(P2, later PR): both need their compiler before any of this can be emitted. @see sites/svelte.ts\n svelte: {\n text: (e) => `{${e}}`,\n richtext: (e) => `{@html ${e}}`,\n attr: (name, e) => `${name}={${e}}`,\n slug: \"$page.params.slug\",\n loop: { kind: \"wrap\", open: (rows, row, i) => `{#each ${rows} as ${row}, ${i}}`, close: \"{/each}\" },\n loopKey: null,\n helper: \"src/lib/bcms-content.ts\",\n importAt: null,\n },\n vue: {\n text: (e) => `{{ ${e} }}`,\n richtext: (e) => `v-html=${quoteAttr(e)}`,\n attr: (name, e) => `:${name}=${quoteAttr(e)}`,\n slug: \"useRoute().params.slug\",\n loop: { kind: \"attr\", attr: (rows, row, i) => `v-for=${quoteAttr(`(${row}, ${i}) in ${rows}`)}` },\n // Vue warns for a keyless `v-for` exactly as React does for a keyless list.\n loopKey: (i) => `:key=\"${i}\"`,\n helper: \"composables/bcms-content.ts\",\n importAt: null,\n },\n};\n\n/**\n * `bcms(<snapshot>, \"<path>\", <fallback>)` — the call a template makes.\n *\n * `page` is the IDENTIFIER the page's snapshot was imported under, not the snapshot itself: this\n * module writes source, and the import is added once per file by `rewrite.ts`. Same for `fn`,\n * the name the helper itself was imported under.\n */\nexport function readExpr(\n dialect: Dialect,\n page: string,\n path: string,\n _kind: string,\n fallback: string,\n route: { dynamic: boolean; fn?: string; slug?: string | null },\n): string {\n // The FILE's own spelling when it has one — `(await params).slug` on an async Next page — and\n // the dialect's default otherwise. @see routes.ts\n const slug = route.dynamic ? route.slug ?? DIALECT_RULES[dialect].slug : null;\n const args = [page, JSON.stringify(path), JSON.stringify(fallback), ...(slug ? [slug] : [])];\n // `fn` is the name the helper was imported UNDER in this file, which is not always `bcms`:\n // a module that already binds that word gets `bcms_1`. @see scope.ts\n return `${route.fn ?? \"bcms\"}(${args.join(\", \")})`;\n}\n\n/**\n * The prefix the chrome lane's attribute carries — `data-bcms-layout-field=\"layout:<address>\"`.\n *\n * Taken from the renderer that already emits it (`src/lib/sites/render-page.ts`), not invented\n * here: the two ends have to spell one address the same way, and a second spelling is a marker the\n * editor silently cannot resolve.\n */\nexport const LAYOUT_PREFIX = \"layout:\";\n\n/**\n * `bcmsLayout(\"<address>\", \"<fallback>\")` — the call a shared header or footer makes.\n *\n * No snapshot argument and no slug: the layout is ONE object by definition, imported by the helper\n * itself, and it is the same object on every route. That is what makes it the layout.\n */\nexport const layoutExpr = (fn: string, path: string, fallback: string): string =>\n `${fn}(${JSON.stringify(path)}, ${JSON.stringify(fallback)})`;\n\n/** Attribute bindings for one element: `{ alt: \"hero.image.alt\" }` → `data-bcms-props`. */\nexport interface AttrBinding {\n attr: string;\n path: string;\n kind: BindingKind;\n /** Page copy, or the shared chrome. Decides the prefix the ADDRESS carries. @see propsAttribute */\n scope?: \"page\" | \"layout\";\n}\n\n/**\n * The declaration, as attribute text ready to splice after an open tag's last attribute.\n *\n * A kind is emitted whenever the brief states one — which, for a brief built by `flattenBindings`,\n * is ALWAYS: `kindOf` spells plain text `\"text\"`, not `\"\"`. The proposer then requires\n * `data-bcms-kind` on that element, so omitting it because the platform's prose says \"plain text\n * needs no kind\" is what would get the conversion refused.\n */\nexport function attrsFor(\n path: string,\n kind: string,\n props?: AttrBinding[],\n scope: \"page\" | \"layout\" = \"page\",\n): string {\n const parts: string[] = [];\n // An empty path is the attribute-only case — a value that lives in an `alt` declares nothing on\n // `data-bcms-field`, because an element carries one of those and it belongs to its own text.\n if (path) {\n // 🔴 A DIFFERENT ATTRIBUTE for the chrome, not a differently shaped value on the same one. The\n // two lanes carry different identity types, and the block lane's own `[data-bcms-field]` query\n // must not be able to reach a chrome marker at all. @see src/lib/sites/render-page.ts\n parts.push(\n scope === \"layout\"\n ? `data-bcms-layout-field=\"${LAYOUT_PREFIX}${path}\"`\n : `data-bcms-field=\"${path}\"`,\n );\n if (kind) parts.push(`data-bcms-kind=\"${kind}\"`);\n }\n const attribute = propsAttribute(props ?? []);\n if (attribute) parts.push(attribute);\n return parts.join(\" \");\n}\n\n/**\n * `data-bcms-props` for a set of attribute bindings, or \"\" when there are none.\n *\n * 🔴 THE ADDRESS CARRIES ITS LANE HERE TOO. A value in an attribute — a promoted nav link's\n * `href` — is declared on `data-bcms-props` rather than on a field attribute, and the raw path was\n * written there with no `layout:` prefix. The release reader then classified a chrome address as a\n * page one, found no page field by that name, and reported it unmatched on every release. One\n * prefix, applied wherever an address is written.\n */\nexport function propsAttribute(props: AttrBinding[]): string {\n if (props.length === 0) return \"\";\n const value = formatPropsAttribute(\n props.map((p) => ({\n address: p.scope === \"layout\" ? `${LAYOUT_PREFIX}${p.path}` : p.path,\n kind: p.kind,\n attr: p.attr,\n })),\n );\n return `data-bcms-props=\"${value}\"`;\n}\n","/**\n * The ~30 lines the codemod commits into the customer's repo, and the rules for replacing them.\n *\n * BUILD-TIME, NOT RUNTIME. The helper reads a snapshot that a page STATICALLY imports\n * (`import snap from \"…/bcms-content/<slug>.json\"`), which every bundler resolves while building.\n * No `fs`, no fetch, no key — so the same helper works in a server component, a client component,\n * a static build and an edge runtime, and only the page's own content can reach its bundle. The\n * consequence is stated in the playbook rather than hidden: live reflection outside the canvas is\n * a rebuild.\n *\n * ZERO DEPENDENCIES, which is why `readPath` is INLINED here rather than imported from\n * `@bettercms-ai/types` — the file lands in someone else's repository, where our packages do not\n * exist. `helper-parity.test.ts` evaluates the emitted source against the exported `readPath` over\n * a table of paths, so the copy cannot drift from the original without a test going red.\n */\nimport { createHash } from \"node:crypto\";\nimport type { Dialect } from \"./dialect.js\";\nimport { DIALECT_RULES } from \"./expr.js\";\n\n/** Bumped whenever the emitted source changes. `isKnownHelper` upgrades anything older. */\nexport const HELPER_VERSION = 2;\n\nconst HEADER = \"// @bettercms-ai/convert helper v\";\n\n/** Where each dialect's helper lives. Null = this dialect reads nothing at build time. */\nexport const HELPER_PATH: Record<Dialect, string | null> = Object.fromEntries(\n (Object.keys(DIALECT_RULES) as Dialect[]).map((d) => [d, DIALECT_RULES[d].helper]),\n) as Record<Dialect, string | null>;\n\n/** The directory the snapshots live in, at the repository root. */\nexport const CONTENT_DIR = \"bcms-content\";\n/** The stub the codemod commits, and the exact content the proposer's NEW_FILE exemption allows. */\nexport const STUB_CONTENT = \"{}\";\n\n/** `src/pages/index.astro` + `bcms-content/home.json` → `../../bcms-content/home.json`. */\nexport function relativeImport(fromFile: string, toFile: string): string {\n const from = fromFile.split(\"/\").slice(0, -1);\n const to = toFile.split(\"/\");\n let shared = 0;\n while (shared < from.length && shared < to.length - 1 && from[shared] === to[shared]) shared++;\n const up = from.length - shared;\n const path = [...Array(up).fill(\"..\"), ...to.slice(shared)].join(\"/\");\n return up === 0 ? `./${path}` : path;\n}\n\n/**\n * The helper, for one dialect.\n *\n * `bcms` takes the SNAPSHOT as its first argument because the import is page-scoped: a helper that\n * imported every page's content would put a 4,974-entry workspace into one client bundle.\n * `bcmsLayout` is the exception and imports directly, because the layout is one shared object by\n * definition — that is what makes it the layout. `bcmsRows` is `bcms` for a value that is a LIST:\n * a repeater's loop reads it once and each row reads its own leaves back through `bcms(card, …)`.\n */\nexport function helperSource(dialect: Dialect): string {\n const path = HELPER_PATH[dialect];\n if (!path) throw new Error(`The ${dialect} dialect reads its values at publish time, not at build time.`);\n const layout = relativeImport(path, `${CONTENT_DIR}/layout.json`);\n return `${HEADER}${HELPER_VERSION}\n// Values come from bcms-content/*.json, written into the tree before the build. The committed\n// stubs are {} — a build with them renders every fallback below and still succeeds.\nimport layoutSnapshot from \"${layout}\";\n\nconst isRecord = (v: unknown): v is Record<string, unknown> =>\n typeof v === \"object\" && v !== null && !Array.isArray(v);\n\n/** Dotted keys and \\`[n]\\` indices, positionally — the editor's own path grammar. */\nfunction readPath(root: unknown, path: string): unknown {\n let cursor: unknown = root;\n for (const segment of path.split(\".\")) {\n if (!segment) return undefined;\n const key = segment.replace(/\\\\[\\\\d+\\\\]/g, \"\");\n if (key) {\n if (!isRecord(cursor)) return undefined;\n cursor = cursor[key];\n }\n for (const index of segment.matchAll(/\\\\[(\\\\d+)\\\\]/g)) {\n if (!Array.isArray(cursor)) return undefined;\n cursor = cursor[Number(index[1])];\n }\n }\n return cursor;\n}\n\n/** A stored value as a template renders it: richtext is its html, an image is its url. */\nfunction render(value: unknown): string | undefined {\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n if (isRecord(value)) {\n if (typeof value.html === \"string\") return value.html;\n if (typeof value.url === \"string\") return value.url;\n }\n return undefined;\n}\n\n/** One field of one page. \\`slug\\` selects the entry on a dynamic route. */\nexport function bcms(page: unknown, path: string, fallback: string, slug?: string): string {\n const entries = isRecord(page) ? page.entries : undefined;\n const root = slug !== undefined && isRecord(entries) ? entries[slug] : page;\n return render(readPath(root, path)) ?? fallback;\n}\n\n/** One field of the shared layout — the header and footer every route renders. */\nexport function bcmsLayout(path: string, fallback: string): string {\n return render(readPath(layoutSnapshot, path)) ?? fallback;\n}\n\n/**\n * The ROWS of a repeater. \\`fallback\\` is every row the template shipped with, so a build against\n * an empty snapshot still renders the same number of cards it always did.\n */\nexport function bcmsRows<T>(page: unknown, path: string, fallback: T[], slug?: string): T[] {\n const entries = isRecord(page) ? page.entries : undefined;\n const root = slug !== undefined && isRecord(entries) ? entries[slug] : page;\n const value = readPath(root, path);\n return Array.isArray(value) ? (value as T[]) : fallback;\n}\n`;\n}\n\n/**\n * Every helper this package has ever emitted, by the sha256 of its exact bytes.\n *\n * 🔴 THE HEADER IS NOT EVIDENCE. `isKnownHelper` used to answer \"v1\" for anything whose first line\n * said v1 — including a helper somebody had since edited, added a `console.log` to, or extended\n * with a project-specific reader. That file was then REPLACED wholesale by an upgrade, and the\n * customer's edits were gone from a diff that read as boilerplate. Only bytes this package\n * actually produced are recognised; anything else is an unknown module at that path, which is\n * exactly what `HELPER_CONFLICT` is for.\n *\n * The current version is not listed: it is compared against `helperSource(dialect)` directly, so\n * a change to the emitted source can never leave a stale hash behind.\n */\nconst HISTORICAL: Record<string, Record<number, string>> = {\n \"src/bcms-content.ts\": { 1: \"c272412532efed7db64b6cf313b2bed4291f9951430412289c8a588b7f565407\" },\n \"src/lib/bcms-content.ts\": { 1: \"ae72ae14d706943d481c880d70da5789b4816ba1ba319a10fbc63ded4d0b42f2\" },\n \"composables/bcms-content.ts\": { 1: \"c272412532efed7db64b6cf313b2bed4291f9951430412289c8a588b7f565407\" },\n};\n\nconst sha256 = (value: string): string => createHash(\"sha256\").update(value, \"utf8\").digest(\"hex\");\n\n/**\n * The version of a helper WE wrote, byte for byte, or null for anything else.\n *\n * Null covers both \"somebody else's module lives here\" and \"our module, edited\" — the caller\n * treats them the same way, because it cannot tell them apart and must not overwrite either.\n */\nexport function isKnownHelper(content: string, dialect: Dialect): number | null {\n if (content === helperSource(dialect)) return HELPER_VERSION;\n const path = HELPER_PATH[dialect];\n if (!path) return null;\n const digest = sha256(content);\n for (const [version, known] of Object.entries(HISTORICAL[path] ?? {})) {\n if (known === digest) return Number(version);\n }\n return null;\n}\n","/**\n * The HTML named character references, as data — and no dependency to resolve for them.\n *\n * 🔴 THIS PACKAGE SHIPS INTO STRANGERS' REPOSITORIES. Every runtime dependency is one more thing\n * that can fail to resolve in somebody else's toolchain, and one that failed here: `entities` is a\n * dual CJS/ESM package whose exports map differs across its majors, and the CLI could not start\n * under a runtime that resolved a different one than `parse5` had pulled in. A table is bytes.\n *\n * 🔴 KEYED WITH AND WITHOUT THE SEMICOLON, which is the whole of the \"legacy\" rule. The spec has\n * no separate whitelist: the table simply contains 106 names in a semicolonless form, and a\n * match is legal exactly when the name is in it. So `&copy` decodes and `&NotEqual` does not, and\n * neither is special-cased anywhere — @see decodeEntities, which takes the LONGEST key that\n * matches, so `&copycat` is `©cat` and `&copysr;` is `℗`.\n */\n\n/** The longest key here, so the matcher knows how far to look. */\nexport const LONGEST_ENTITY = 32;\n\nexport const NAMED_ENTITIES: Record<string, string> = {\n \"AElig\":\"\\u00c6\",\"AElig;\":\"\\u00c6\",\"AMP\":\"&\",\"AMP;\":\"&\",\"Aacute\":\"\\u00c1\",\n \"Aacute;\":\"\\u00c1\",\"Abreve;\":\"\\u0102\",\"Acirc\":\"\\u00c2\",\"Acirc;\":\"\\u00c2\",\"Acy;\":\"\\u0410\",\n \"Afr;\":\"\\ud835\\udd04\",\"Agrave\":\"\\u00c0\",\"Agrave;\":\"\\u00c0\",\"Alpha;\":\"\\u0391\",\"Amacr;\":\"\\u0100\",\n \"And;\":\"\\u2a53\",\"Aogon;\":\"\\u0104\",\"Aopf;\":\"\\ud835\\udd38\",\"ApplyFunction;\":\"\\u2061\",\"Aring\":\"\\u00c5\",\n \"Aring;\":\"\\u00c5\",\"Ascr;\":\"\\ud835\\udc9c\",\"Assign;\":\"\\u2254\",\"Atilde\":\"\\u00c3\",\"Atilde;\":\"\\u00c3\",\n \"Auml\":\"\\u00c4\",\"Auml;\":\"\\u00c4\",\"Backslash;\":\"\\u2216\",\"Barv;\":\"\\u2ae7\",\"Barwed;\":\"\\u2306\",\n \"Bcy;\":\"\\u0411\",\"Because;\":\"\\u2235\",\"Bernoullis;\":\"\\u212c\",\"Beta;\":\"\\u0392\",\"Bfr;\":\"\\ud835\\udd05\",\n \"Bopf;\":\"\\ud835\\udd39\",\"Breve;\":\"\\u02d8\",\"Bscr;\":\"\\u212c\",\"Bumpeq;\":\"\\u224e\",\"CHcy;\":\"\\u0427\",\n \"COPY\":\"\\u00a9\",\"COPY;\":\"\\u00a9\",\"Cacute;\":\"\\u0106\",\"Cap;\":\"\\u22d2\",\"CapitalDifferentialD;\":\"\\u2145\",\n \"Cayleys;\":\"\\u212d\",\"Ccaron;\":\"\\u010c\",\"Ccedil\":\"\\u00c7\",\"Ccedil;\":\"\\u00c7\",\"Ccirc;\":\"\\u0108\",\n \"Cconint;\":\"\\u2230\",\"Cdot;\":\"\\u010a\",\"Cedilla;\":\"\\u00b8\",\"CenterDot;\":\"\\u00b7\",\"Cfr;\":\"\\u212d\",\n \"Chi;\":\"\\u03a7\",\"CircleDot;\":\"\\u2299\",\"CircleMinus;\":\"\\u2296\",\"CirclePlus;\":\"\\u2295\",\"CircleTimes;\":\"\\u2297\",\n \"ClockwiseContourIntegral;\":\"\\u2232\",\"CloseCurlyDoubleQuote;\":\"\\u201d\",\"CloseCurlyQuote;\":\"\\u2019\",\"Colon;\":\"\\u2237\",\"Colone;\":\"\\u2a74\",\n \"Congruent;\":\"\\u2261\",\"Conint;\":\"\\u222f\",\"ContourIntegral;\":\"\\u222e\",\"Copf;\":\"\\u2102\",\"Coproduct;\":\"\\u2210\",\n \"CounterClockwiseContourIntegral;\":\"\\u2233\",\"Cross;\":\"\\u2a2f\",\"Cscr;\":\"\\ud835\\udc9e\",\"Cup;\":\"\\u22d3\",\"CupCap;\":\"\\u224d\",\n \"DD;\":\"\\u2145\",\"DDotrahd;\":\"\\u2911\",\"DJcy;\":\"\\u0402\",\"DScy;\":\"\\u0405\",\"DZcy;\":\"\\u040f\",\n \"Dagger;\":\"\\u2021\",\"Darr;\":\"\\u21a1\",\"Dashv;\":\"\\u2ae4\",\"Dcaron;\":\"\\u010e\",\"Dcy;\":\"\\u0414\",\n \"Del;\":\"\\u2207\",\"Delta;\":\"\\u0394\",\"Dfr;\":\"\\ud835\\udd07\",\"DiacriticalAcute;\":\"\\u00b4\",\"DiacriticalDot;\":\"\\u02d9\",\n \"DiacriticalDoubleAcute;\":\"\\u02dd\",\"DiacriticalGrave;\":\"`\",\"DiacriticalTilde;\":\"\\u02dc\",\"Diamond;\":\"\\u22c4\",\"DifferentialD;\":\"\\u2146\",\n \"Dopf;\":\"\\ud835\\udd3b\",\"Dot;\":\"\\u00a8\",\"DotDot;\":\"\\u20dc\",\"DotEqual;\":\"\\u2250\",\"DoubleContourIntegral;\":\"\\u222f\",\n \"DoubleDot;\":\"\\u00a8\",\"DoubleDownArrow;\":\"\\u21d3\",\"DoubleLeftArrow;\":\"\\u21d0\",\"DoubleLeftRightArrow;\":\"\\u21d4\",\"DoubleLeftTee;\":\"\\u2ae4\",\n \"DoubleLongLeftArrow;\":\"\\u27f8\",\"DoubleLongLeftRightArrow;\":\"\\u27fa\",\"DoubleLongRightArrow;\":\"\\u27f9\",\"DoubleRightArrow;\":\"\\u21d2\",\"DoubleRightTee;\":\"\\u22a8\",\n \"DoubleUpArrow;\":\"\\u21d1\",\"DoubleUpDownArrow;\":\"\\u21d5\",\"DoubleVerticalBar;\":\"\\u2225\",\"DownArrow;\":\"\\u2193\",\"DownArrowBar;\":\"\\u2913\",\n \"DownArrowUpArrow;\":\"\\u21f5\",\"DownBreve;\":\"\\u0311\",\"DownLeftRightVector;\":\"\\u2950\",\"DownLeftTeeVector;\":\"\\u295e\",\"DownLeftVector;\":\"\\u21bd\",\n \"DownLeftVectorBar;\":\"\\u2956\",\"DownRightTeeVector;\":\"\\u295f\",\"DownRightVector;\":\"\\u21c1\",\"DownRightVectorBar;\":\"\\u2957\",\"DownTee;\":\"\\u22a4\",\n \"DownTeeArrow;\":\"\\u21a7\",\"Downarrow;\":\"\\u21d3\",\"Dscr;\":\"\\ud835\\udc9f\",\"Dstrok;\":\"\\u0110\",\"ENG;\":\"\\u014a\",\n \"ETH\":\"\\u00d0\",\"ETH;\":\"\\u00d0\",\"Eacute\":\"\\u00c9\",\"Eacute;\":\"\\u00c9\",\"Ecaron;\":\"\\u011a\",\n \"Ecirc\":\"\\u00ca\",\"Ecirc;\":\"\\u00ca\",\"Ecy;\":\"\\u042d\",\"Edot;\":\"\\u0116\",\"Efr;\":\"\\ud835\\udd08\",\n \"Egrave\":\"\\u00c8\",\"Egrave;\":\"\\u00c8\",\"Element;\":\"\\u2208\",\"Emacr;\":\"\\u0112\",\"EmptySmallSquare;\":\"\\u25fb\",\n \"EmptyVerySmallSquare;\":\"\\u25ab\",\"Eogon;\":\"\\u0118\",\"Eopf;\":\"\\ud835\\udd3c\",\"Epsilon;\":\"\\u0395\",\"Equal;\":\"\\u2a75\",\n \"EqualTilde;\":\"\\u2242\",\"Equilibrium;\":\"\\u21cc\",\"Escr;\":\"\\u2130\",\"Esim;\":\"\\u2a73\",\"Eta;\":\"\\u0397\",\n \"Euml\":\"\\u00cb\",\"Euml;\":\"\\u00cb\",\"Exists;\":\"\\u2203\",\"ExponentialE;\":\"\\u2147\",\"Fcy;\":\"\\u0424\",\n \"Ffr;\":\"\\ud835\\udd09\",\"FilledSmallSquare;\":\"\\u25fc\",\"FilledVerySmallSquare;\":\"\\u25aa\",\"Fopf;\":\"\\ud835\\udd3d\",\"ForAll;\":\"\\u2200\",\n \"Fouriertrf;\":\"\\u2131\",\"Fscr;\":\"\\u2131\",\"GJcy;\":\"\\u0403\",\"GT\":\">\",\"GT;\":\">\",\n \"Gamma;\":\"\\u0393\",\"Gammad;\":\"\\u03dc\",\"Gbreve;\":\"\\u011e\",\"Gcedil;\":\"\\u0122\",\"Gcirc;\":\"\\u011c\",\n \"Gcy;\":\"\\u0413\",\"Gdot;\":\"\\u0120\",\"Gfr;\":\"\\ud835\\udd0a\",\"Gg;\":\"\\u22d9\",\"Gopf;\":\"\\ud835\\udd3e\",\n \"GreaterEqual;\":\"\\u2265\",\"GreaterEqualLess;\":\"\\u22db\",\"GreaterFullEqual;\":\"\\u2267\",\"GreaterGreater;\":\"\\u2aa2\",\"GreaterLess;\":\"\\u2277\",\n \"GreaterSlantEqual;\":\"\\u2a7e\",\"GreaterTilde;\":\"\\u2273\",\"Gscr;\":\"\\ud835\\udca2\",\"Gt;\":\"\\u226b\",\"HARDcy;\":\"\\u042a\",\n \"Hacek;\":\"\\u02c7\",\"Hat;\":\"^\",\"Hcirc;\":\"\\u0124\",\"Hfr;\":\"\\u210c\",\"HilbertSpace;\":\"\\u210b\",\n \"Hopf;\":\"\\u210d\",\"HorizontalLine;\":\"\\u2500\",\"Hscr;\":\"\\u210b\",\"Hstrok;\":\"\\u0126\",\"HumpDownHump;\":\"\\u224e\",\n \"HumpEqual;\":\"\\u224f\",\"IEcy;\":\"\\u0415\",\"IJlig;\":\"\\u0132\",\"IOcy;\":\"\\u0401\",\"Iacute\":\"\\u00cd\",\n \"Iacute;\":\"\\u00cd\",\"Icirc\":\"\\u00ce\",\"Icirc;\":\"\\u00ce\",\"Icy;\":\"\\u0418\",\"Idot;\":\"\\u0130\",\n \"Ifr;\":\"\\u2111\",\"Igrave\":\"\\u00cc\",\"Igrave;\":\"\\u00cc\",\"Im;\":\"\\u2111\",\"Imacr;\":\"\\u012a\",\n \"ImaginaryI;\":\"\\u2148\",\"Implies;\":\"\\u21d2\",\"Int;\":\"\\u222c\",\"Integral;\":\"\\u222b\",\"Intersection;\":\"\\u22c2\",\n \"InvisibleComma;\":\"\\u2063\",\"InvisibleTimes;\":\"\\u2062\",\"Iogon;\":\"\\u012e\",\"Iopf;\":\"\\ud835\\udd40\",\"Iota;\":\"\\u0399\",\n \"Iscr;\":\"\\u2110\",\"Itilde;\":\"\\u0128\",\"Iukcy;\":\"\\u0406\",\"Iuml\":\"\\u00cf\",\"Iuml;\":\"\\u00cf\",\n \"Jcirc;\":\"\\u0134\",\"Jcy;\":\"\\u0419\",\"Jfr;\":\"\\ud835\\udd0d\",\"Jopf;\":\"\\ud835\\udd41\",\"Jscr;\":\"\\ud835\\udca5\",\n \"Jsercy;\":\"\\u0408\",\"Jukcy;\":\"\\u0404\",\"KHcy;\":\"\\u0425\",\"KJcy;\":\"\\u040c\",\"Kappa;\":\"\\u039a\",\n \"Kcedil;\":\"\\u0136\",\"Kcy;\":\"\\u041a\",\"Kfr;\":\"\\ud835\\udd0e\",\"Kopf;\":\"\\ud835\\udd42\",\"Kscr;\":\"\\ud835\\udca6\",\n \"LJcy;\":\"\\u0409\",\"LT\":\"<\",\"LT;\":\"<\",\"Lacute;\":\"\\u0139\",\"Lambda;\":\"\\u039b\",\n \"Lang;\":\"\\u27ea\",\"Laplacetrf;\":\"\\u2112\",\"Larr;\":\"\\u219e\",\"Lcaron;\":\"\\u013d\",\"Lcedil;\":\"\\u013b\",\n \"Lcy;\":\"\\u041b\",\"LeftAngleBracket;\":\"\\u27e8\",\"LeftArrow;\":\"\\u2190\",\"LeftArrowBar;\":\"\\u21e4\",\"LeftArrowRightArrow;\":\"\\u21c6\",\n \"LeftCeiling;\":\"\\u2308\",\"LeftDoubleBracket;\":\"\\u27e6\",\"LeftDownTeeVector;\":\"\\u2961\",\"LeftDownVector;\":\"\\u21c3\",\"LeftDownVectorBar;\":\"\\u2959\",\n \"LeftFloor;\":\"\\u230a\",\"LeftRightArrow;\":\"\\u2194\",\"LeftRightVector;\":\"\\u294e\",\"LeftTee;\":\"\\u22a3\",\"LeftTeeArrow;\":\"\\u21a4\",\n \"LeftTeeVector;\":\"\\u295a\",\"LeftTriangle;\":\"\\u22b2\",\"LeftTriangleBar;\":\"\\u29cf\",\"LeftTriangleEqual;\":\"\\u22b4\",\"LeftUpDownVector;\":\"\\u2951\",\n \"LeftUpTeeVector;\":\"\\u2960\",\"LeftUpVector;\":\"\\u21bf\",\"LeftUpVectorBar;\":\"\\u2958\",\"LeftVector;\":\"\\u21bc\",\"LeftVectorBar;\":\"\\u2952\",\n \"Leftarrow;\":\"\\u21d0\",\"Leftrightarrow;\":\"\\u21d4\",\"LessEqualGreater;\":\"\\u22da\",\"LessFullEqual;\":\"\\u2266\",\"LessGreater;\":\"\\u2276\",\n \"LessLess;\":\"\\u2aa1\",\"LessSlantEqual;\":\"\\u2a7d\",\"LessTilde;\":\"\\u2272\",\"Lfr;\":\"\\ud835\\udd0f\",\"Ll;\":\"\\u22d8\",\n \"Lleftarrow;\":\"\\u21da\",\"Lmidot;\":\"\\u013f\",\"LongLeftArrow;\":\"\\u27f5\",\"LongLeftRightArrow;\":\"\\u27f7\",\"LongRightArrow;\":\"\\u27f6\",\n \"Longleftarrow;\":\"\\u27f8\",\"Longleftrightarrow;\":\"\\u27fa\",\"Longrightarrow;\":\"\\u27f9\",\"Lopf;\":\"\\ud835\\udd43\",\"LowerLeftArrow;\":\"\\u2199\",\n \"LowerRightArrow;\":\"\\u2198\",\"Lscr;\":\"\\u2112\",\"Lsh;\":\"\\u21b0\",\"Lstrok;\":\"\\u0141\",\"Lt;\":\"\\u226a\",\n \"Map;\":\"\\u2905\",\"Mcy;\":\"\\u041c\",\"MediumSpace;\":\"\\u205f\",\"Mellintrf;\":\"\\u2133\",\"Mfr;\":\"\\ud835\\udd10\",\n \"MinusPlus;\":\"\\u2213\",\"Mopf;\":\"\\ud835\\udd44\",\"Mscr;\":\"\\u2133\",\"Mu;\":\"\\u039c\",\"NJcy;\":\"\\u040a\",\n \"Nacute;\":\"\\u0143\",\"Ncaron;\":\"\\u0147\",\"Ncedil;\":\"\\u0145\",\"Ncy;\":\"\\u041d\",\"NegativeMediumSpace;\":\"\\u200b\",\n \"NegativeThickSpace;\":\"\\u200b\",\"NegativeThinSpace;\":\"\\u200b\",\"NegativeVeryThinSpace;\":\"\\u200b\",\"NestedGreaterGreater;\":\"\\u226b\",\"NestedLessLess;\":\"\\u226a\",\n \"NewLine;\":\"\\n\",\"Nfr;\":\"\\ud835\\udd11\",\"NoBreak;\":\"\\u2060\",\"NonBreakingSpace;\":\"\\u00a0\",\"Nopf;\":\"\\u2115\",\n \"Not;\":\"\\u2aec\",\"NotCongruent;\":\"\\u2262\",\"NotCupCap;\":\"\\u226d\",\"NotDoubleVerticalBar;\":\"\\u2226\",\"NotElement;\":\"\\u2209\",\n \"NotEqual;\":\"\\u2260\",\"NotEqualTilde;\":\"\\u2242\\u0338\",\"NotExists;\":\"\\u2204\",\"NotGreater;\":\"\\u226f\",\"NotGreaterEqual;\":\"\\u2271\",\n \"NotGreaterFullEqual;\":\"\\u2267\\u0338\",\"NotGreaterGreater;\":\"\\u226b\\u0338\",\"NotGreaterLess;\":\"\\u2279\",\"NotGreaterSlantEqual;\":\"\\u2a7e\\u0338\",\"NotGreaterTilde;\":\"\\u2275\",\n \"NotHumpDownHump;\":\"\\u224e\\u0338\",\"NotHumpEqual;\":\"\\u224f\\u0338\",\"NotLeftTriangle;\":\"\\u22ea\",\"NotLeftTriangleBar;\":\"\\u29cf\\u0338\",\"NotLeftTriangleEqual;\":\"\\u22ec\",\n \"NotLess;\":\"\\u226e\",\"NotLessEqual;\":\"\\u2270\",\"NotLessGreater;\":\"\\u2278\",\"NotLessLess;\":\"\\u226a\\u0338\",\"NotLessSlantEqual;\":\"\\u2a7d\\u0338\",\n \"NotLessTilde;\":\"\\u2274\",\"NotNestedGreaterGreater;\":\"\\u2aa2\\u0338\",\"NotNestedLessLess;\":\"\\u2aa1\\u0338\",\"NotPrecedes;\":\"\\u2280\",\"NotPrecedesEqual;\":\"\\u2aaf\\u0338\",\n \"NotPrecedesSlantEqual;\":\"\\u22e0\",\"NotReverseElement;\":\"\\u220c\",\"NotRightTriangle;\":\"\\u22eb\",\"NotRightTriangleBar;\":\"\\u29d0\\u0338\",\"NotRightTriangleEqual;\":\"\\u22ed\",\n \"NotSquareSubset;\":\"\\u228f\\u0338\",\"NotSquareSubsetEqual;\":\"\\u22e2\",\"NotSquareSuperset;\":\"\\u2290\\u0338\",\"NotSquareSupersetEqual;\":\"\\u22e3\",\"NotSubset;\":\"\\u2282\\u20d2\",\n \"NotSubsetEqual;\":\"\\u2288\",\"NotSucceeds;\":\"\\u2281\",\"NotSucceedsEqual;\":\"\\u2ab0\\u0338\",\"NotSucceedsSlantEqual;\":\"\\u22e1\",\"NotSucceedsTilde;\":\"\\u227f\\u0338\",\n \"NotSuperset;\":\"\\u2283\\u20d2\",\"NotSupersetEqual;\":\"\\u2289\",\"NotTilde;\":\"\\u2241\",\"NotTildeEqual;\":\"\\u2244\",\"NotTildeFullEqual;\":\"\\u2247\",\n \"NotTildeTilde;\":\"\\u2249\",\"NotVerticalBar;\":\"\\u2224\",\"Nscr;\":\"\\ud835\\udca9\",\"Ntilde\":\"\\u00d1\",\"Ntilde;\":\"\\u00d1\",\n \"Nu;\":\"\\u039d\",\"OElig;\":\"\\u0152\",\"Oacute\":\"\\u00d3\",\"Oacute;\":\"\\u00d3\",\"Ocirc\":\"\\u00d4\",\n \"Ocirc;\":\"\\u00d4\",\"Ocy;\":\"\\u041e\",\"Odblac;\":\"\\u0150\",\"Ofr;\":\"\\ud835\\udd12\",\"Ograve\":\"\\u00d2\",\n \"Ograve;\":\"\\u00d2\",\"Omacr;\":\"\\u014c\",\"Omega;\":\"\\u03a9\",\"Omicron;\":\"\\u039f\",\"Oopf;\":\"\\ud835\\udd46\",\n \"OpenCurlyDoubleQuote;\":\"\\u201c\",\"OpenCurlyQuote;\":\"\\u2018\",\"Or;\":\"\\u2a54\",\"Oscr;\":\"\\ud835\\udcaa\",\"Oslash\":\"\\u00d8\",\n \"Oslash;\":\"\\u00d8\",\"Otilde\":\"\\u00d5\",\"Otilde;\":\"\\u00d5\",\"Otimes;\":\"\\u2a37\",\"Ouml\":\"\\u00d6\",\n \"Ouml;\":\"\\u00d6\",\"OverBar;\":\"\\u203e\",\"OverBrace;\":\"\\u23de\",\"OverBracket;\":\"\\u23b4\",\"OverParenthesis;\":\"\\u23dc\",\n \"PartialD;\":\"\\u2202\",\"Pcy;\":\"\\u041f\",\"Pfr;\":\"\\ud835\\udd13\",\"Phi;\":\"\\u03a6\",\"Pi;\":\"\\u03a0\",\n \"PlusMinus;\":\"\\u00b1\",\"Poincareplane;\":\"\\u210c\",\"Popf;\":\"\\u2119\",\"Pr;\":\"\\u2abb\",\"Precedes;\":\"\\u227a\",\n \"PrecedesEqual;\":\"\\u2aaf\",\"PrecedesSlantEqual;\":\"\\u227c\",\"PrecedesTilde;\":\"\\u227e\",\"Prime;\":\"\\u2033\",\"Product;\":\"\\u220f\",\n \"Proportion;\":\"\\u2237\",\"Proportional;\":\"\\u221d\",\"Pscr;\":\"\\ud835\\udcab\",\"Psi;\":\"\\u03a8\",\"QUOT\":\"\\\"\",\n \"QUOT;\":\"\\\"\",\"Qfr;\":\"\\ud835\\udd14\",\"Qopf;\":\"\\u211a\",\"Qscr;\":\"\\ud835\\udcac\",\"RBarr;\":\"\\u2910\",\n \"REG\":\"\\u00ae\",\"REG;\":\"\\u00ae\",\"Racute;\":\"\\u0154\",\"Rang;\":\"\\u27eb\",\"Rarr;\":\"\\u21a0\",\n \"Rarrtl;\":\"\\u2916\",\"Rcaron;\":\"\\u0158\",\"Rcedil;\":\"\\u0156\",\"Rcy;\":\"\\u0420\",\"Re;\":\"\\u211c\",\n \"ReverseElement;\":\"\\u220b\",\"ReverseEquilibrium;\":\"\\u21cb\",\"ReverseUpEquilibrium;\":\"\\u296f\",\"Rfr;\":\"\\u211c\",\"Rho;\":\"\\u03a1\",\n \"RightAngleBracket;\":\"\\u27e9\",\"RightArrow;\":\"\\u2192\",\"RightArrowBar;\":\"\\u21e5\",\"RightArrowLeftArrow;\":\"\\u21c4\",\"RightCeiling;\":\"\\u2309\",\n \"RightDoubleBracket;\":\"\\u27e7\",\"RightDownTeeVector;\":\"\\u295d\",\"RightDownVector;\":\"\\u21c2\",\"RightDownVectorBar;\":\"\\u2955\",\"RightFloor;\":\"\\u230b\",\n \"RightTee;\":\"\\u22a2\",\"RightTeeArrow;\":\"\\u21a6\",\"RightTeeVector;\":\"\\u295b\",\"RightTriangle;\":\"\\u22b3\",\"RightTriangleBar;\":\"\\u29d0\",\n \"RightTriangleEqual;\":\"\\u22b5\",\"RightUpDownVector;\":\"\\u294f\",\"RightUpTeeVector;\":\"\\u295c\",\"RightUpVector;\":\"\\u21be\",\"RightUpVectorBar;\":\"\\u2954\",\n \"RightVector;\":\"\\u21c0\",\"RightVectorBar;\":\"\\u2953\",\"Rightarrow;\":\"\\u21d2\",\"Ropf;\":\"\\u211d\",\"RoundImplies;\":\"\\u2970\",\n \"Rrightarrow;\":\"\\u21db\",\"Rscr;\":\"\\u211b\",\"Rsh;\":\"\\u21b1\",\"RuleDelayed;\":\"\\u29f4\",\"SHCHcy;\":\"\\u0429\",\n \"SHcy;\":\"\\u0428\",\"SOFTcy;\":\"\\u042c\",\"Sacute;\":\"\\u015a\",\"Sc;\":\"\\u2abc\",\"Scaron;\":\"\\u0160\",\n \"Scedil;\":\"\\u015e\",\"Scirc;\":\"\\u015c\",\"Scy;\":\"\\u0421\",\"Sfr;\":\"\\ud835\\udd16\",\"ShortDownArrow;\":\"\\u2193\",\n \"ShortLeftArrow;\":\"\\u2190\",\"ShortRightArrow;\":\"\\u2192\",\"ShortUpArrow;\":\"\\u2191\",\"Sigma;\":\"\\u03a3\",\"SmallCircle;\":\"\\u2218\",\n \"Sopf;\":\"\\ud835\\udd4a\",\"Sqrt;\":\"\\u221a\",\"Square;\":\"\\u25a1\",\"SquareIntersection;\":\"\\u2293\",\"SquareSubset;\":\"\\u228f\",\n \"SquareSubsetEqual;\":\"\\u2291\",\"SquareSuperset;\":\"\\u2290\",\"SquareSupersetEqual;\":\"\\u2292\",\"SquareUnion;\":\"\\u2294\",\"Sscr;\":\"\\ud835\\udcae\",\n \"Star;\":\"\\u22c6\",\"Sub;\":\"\\u22d0\",\"Subset;\":\"\\u22d0\",\"SubsetEqual;\":\"\\u2286\",\"Succeeds;\":\"\\u227b\",\n \"SucceedsEqual;\":\"\\u2ab0\",\"SucceedsSlantEqual;\":\"\\u227d\",\"SucceedsTilde;\":\"\\u227f\",\"SuchThat;\":\"\\u220b\",\"Sum;\":\"\\u2211\",\n \"Sup;\":\"\\u22d1\",\"Superset;\":\"\\u2283\",\"SupersetEqual;\":\"\\u2287\",\"Supset;\":\"\\u22d1\",\"THORN\":\"\\u00de\",\n \"THORN;\":\"\\u00de\",\"TRADE;\":\"\\u2122\",\"TSHcy;\":\"\\u040b\",\"TScy;\":\"\\u0426\",\"Tab;\":\"\\t\",\n \"Tau;\":\"\\u03a4\",\"Tcaron;\":\"\\u0164\",\"Tcedil;\":\"\\u0162\",\"Tcy;\":\"\\u0422\",\"Tfr;\":\"\\ud835\\udd17\",\n \"Therefore;\":\"\\u2234\",\"Theta;\":\"\\u0398\",\"ThickSpace;\":\"\\u205f\\u200a\",\"ThinSpace;\":\"\\u2009\",\"Tilde;\":\"\\u223c\",\n \"TildeEqual;\":\"\\u2243\",\"TildeFullEqual;\":\"\\u2245\",\"TildeTilde;\":\"\\u2248\",\"Topf;\":\"\\ud835\\udd4b\",\"TripleDot;\":\"\\u20db\",\n \"Tscr;\":\"\\ud835\\udcaf\",\"Tstrok;\":\"\\u0166\",\"Uacute\":\"\\u00da\",\"Uacute;\":\"\\u00da\",\"Uarr;\":\"\\u219f\",\n \"Uarrocir;\":\"\\u2949\",\"Ubrcy;\":\"\\u040e\",\"Ubreve;\":\"\\u016c\",\"Ucirc\":\"\\u00db\",\"Ucirc;\":\"\\u00db\",\n \"Ucy;\":\"\\u0423\",\"Udblac;\":\"\\u0170\",\"Ufr;\":\"\\ud835\\udd18\",\"Ugrave\":\"\\u00d9\",\"Ugrave;\":\"\\u00d9\",\n \"Umacr;\":\"\\u016a\",\"UnderBar;\":\"_\",\"UnderBrace;\":\"\\u23df\",\"UnderBracket;\":\"\\u23b5\",\"UnderParenthesis;\":\"\\u23dd\",\n \"Union;\":\"\\u22c3\",\"UnionPlus;\":\"\\u228e\",\"Uogon;\":\"\\u0172\",\"Uopf;\":\"\\ud835\\udd4c\",\"UpArrow;\":\"\\u2191\",\n \"UpArrowBar;\":\"\\u2912\",\"UpArrowDownArrow;\":\"\\u21c5\",\"UpDownArrow;\":\"\\u2195\",\"UpEquilibrium;\":\"\\u296e\",\"UpTee;\":\"\\u22a5\",\n \"UpTeeArrow;\":\"\\u21a5\",\"Uparrow;\":\"\\u21d1\",\"Updownarrow;\":\"\\u21d5\",\"UpperLeftArrow;\":\"\\u2196\",\"UpperRightArrow;\":\"\\u2197\",\n \"Upsi;\":\"\\u03d2\",\"Upsilon;\":\"\\u03a5\",\"Uring;\":\"\\u016e\",\"Uscr;\":\"\\ud835\\udcb0\",\"Utilde;\":\"\\u0168\",\n \"Uuml\":\"\\u00dc\",\"Uuml;\":\"\\u00dc\",\"VDash;\":\"\\u22ab\",\"Vbar;\":\"\\u2aeb\",\"Vcy;\":\"\\u0412\",\n \"Vdash;\":\"\\u22a9\",\"Vdashl;\":\"\\u2ae6\",\"Vee;\":\"\\u22c1\",\"Verbar;\":\"\\u2016\",\"Vert;\":\"\\u2016\",\n \"VerticalBar;\":\"\\u2223\",\"VerticalLine;\":\"|\",\"VerticalSeparator;\":\"\\u2758\",\"VerticalTilde;\":\"\\u2240\",\"VeryThinSpace;\":\"\\u200a\",\n \"Vfr;\":\"\\ud835\\udd19\",\"Vopf;\":\"\\ud835\\udd4d\",\"Vscr;\":\"\\ud835\\udcb1\",\"Vvdash;\":\"\\u22aa\",\"Wcirc;\":\"\\u0174\",\n \"Wedge;\":\"\\u22c0\",\"Wfr;\":\"\\ud835\\udd1a\",\"Wopf;\":\"\\ud835\\udd4e\",\"Wscr;\":\"\\ud835\\udcb2\",\"Xfr;\":\"\\ud835\\udd1b\",\n \"Xi;\":\"\\u039e\",\"Xopf;\":\"\\ud835\\udd4f\",\"Xscr;\":\"\\ud835\\udcb3\",\"YAcy;\":\"\\u042f\",\"YIcy;\":\"\\u0407\",\n \"YUcy;\":\"\\u042e\",\"Yacute\":\"\\u00dd\",\"Yacute;\":\"\\u00dd\",\"Ycirc;\":\"\\u0176\",\"Ycy;\":\"\\u042b\",\n \"Yfr;\":\"\\ud835\\udd1c\",\"Yopf;\":\"\\ud835\\udd50\",\"Yscr;\":\"\\ud835\\udcb4\",\"Yuml;\":\"\\u0178\",\"ZHcy;\":\"\\u0416\",\n \"Zacute;\":\"\\u0179\",\"Zcaron;\":\"\\u017d\",\"Zcy;\":\"\\u0417\",\"Zdot;\":\"\\u017b\",\"ZeroWidthSpace;\":\"\\u200b\",\n \"Zeta;\":\"\\u0396\",\"Zfr;\":\"\\u2128\",\"Zopf;\":\"\\u2124\",\"Zscr;\":\"\\ud835\\udcb5\",\"aacute\":\"\\u00e1\",\n \"aacute;\":\"\\u00e1\",\"abreve;\":\"\\u0103\",\"ac;\":\"\\u223e\",\"acE;\":\"\\u223e\\u0333\",\"acd;\":\"\\u223f\",\n \"acirc\":\"\\u00e2\",\"acirc;\":\"\\u00e2\",\"acute\":\"\\u00b4\",\"acute;\":\"\\u00b4\",\"acy;\":\"\\u0430\",\n \"aelig\":\"\\u00e6\",\"aelig;\":\"\\u00e6\",\"af;\":\"\\u2061\",\"afr;\":\"\\ud835\\udd1e\",\"agrave\":\"\\u00e0\",\n \"agrave;\":\"\\u00e0\",\"alefsym;\":\"\\u2135\",\"aleph;\":\"\\u2135\",\"alpha;\":\"\\u03b1\",\"amacr;\":\"\\u0101\",\n \"amalg;\":\"\\u2a3f\",\"amp\":\"&\",\"amp;\":\"&\",\"and;\":\"\\u2227\",\"andand;\":\"\\u2a55\",\n \"andd;\":\"\\u2a5c\",\"andslope;\":\"\\u2a58\",\"andv;\":\"\\u2a5a\",\"ang;\":\"\\u2220\",\"ange;\":\"\\u29a4\",\n \"angle;\":\"\\u2220\",\"angmsd;\":\"\\u2221\",\"angmsdaa;\":\"\\u29a8\",\"angmsdab;\":\"\\u29a9\",\"angmsdac;\":\"\\u29aa\",\n \"angmsdad;\":\"\\u29ab\",\"angmsdae;\":\"\\u29ac\",\"angmsdaf;\":\"\\u29ad\",\"angmsdag;\":\"\\u29ae\",\"angmsdah;\":\"\\u29af\",\n \"angrt;\":\"\\u221f\",\"angrtvb;\":\"\\u22be\",\"angrtvbd;\":\"\\u299d\",\"angsph;\":\"\\u2222\",\"angst;\":\"\\u00c5\",\n \"angzarr;\":\"\\u237c\",\"aogon;\":\"\\u0105\",\"aopf;\":\"\\ud835\\udd52\",\"ap;\":\"\\u2248\",\"apE;\":\"\\u2a70\",\n \"apacir;\":\"\\u2a6f\",\"ape;\":\"\\u224a\",\"apid;\":\"\\u224b\",\"apos;\":\"'\",\"approx;\":\"\\u2248\",\n \"approxeq;\":\"\\u224a\",\"aring\":\"\\u00e5\",\"aring;\":\"\\u00e5\",\"ascr;\":\"\\ud835\\udcb6\",\"ast;\":\"*\",\n \"asymp;\":\"\\u2248\",\"asympeq;\":\"\\u224d\",\"atilde\":\"\\u00e3\",\"atilde;\":\"\\u00e3\",\"auml\":\"\\u00e4\",\n \"auml;\":\"\\u00e4\",\"awconint;\":\"\\u2233\",\"awint;\":\"\\u2a11\",\"bNot;\":\"\\u2aed\",\"backcong;\":\"\\u224c\",\n \"backepsilon;\":\"\\u03f6\",\"backprime;\":\"\\u2035\",\"backsim;\":\"\\u223d\",\"backsimeq;\":\"\\u22cd\",\"barvee;\":\"\\u22bd\",\n \"barwed;\":\"\\u2305\",\"barwedge;\":\"\\u2305\",\"bbrk;\":\"\\u23b5\",\"bbrktbrk;\":\"\\u23b6\",\"bcong;\":\"\\u224c\",\n \"bcy;\":\"\\u0431\",\"bdquo;\":\"\\u201e\",\"becaus;\":\"\\u2235\",\"because;\":\"\\u2235\",\"bemptyv;\":\"\\u29b0\",\n \"bepsi;\":\"\\u03f6\",\"bernou;\":\"\\u212c\",\"beta;\":\"\\u03b2\",\"beth;\":\"\\u2136\",\"between;\":\"\\u226c\",\n \"bfr;\":\"\\ud835\\udd1f\",\"bigcap;\":\"\\u22c2\",\"bigcirc;\":\"\\u25ef\",\"bigcup;\":\"\\u22c3\",\"bigodot;\":\"\\u2a00\",\n \"bigoplus;\":\"\\u2a01\",\"bigotimes;\":\"\\u2a02\",\"bigsqcup;\":\"\\u2a06\",\"bigstar;\":\"\\u2605\",\"bigtriangledown;\":\"\\u25bd\",\n \"bigtriangleup;\":\"\\u25b3\",\"biguplus;\":\"\\u2a04\",\"bigvee;\":\"\\u22c1\",\"bigwedge;\":\"\\u22c0\",\"bkarow;\":\"\\u290d\",\n \"blacklozenge;\":\"\\u29eb\",\"blacksquare;\":\"\\u25aa\",\"blacktriangle;\":\"\\u25b4\",\"blacktriangledown;\":\"\\u25be\",\"blacktriangleleft;\":\"\\u25c2\",\n \"blacktriangleright;\":\"\\u25b8\",\"blank;\":\"\\u2423\",\"blk12;\":\"\\u2592\",\"blk14;\":\"\\u2591\",\"blk34;\":\"\\u2593\",\n \"block;\":\"\\u2588\",\"bne;\":\"=\\u20e5\",\"bnequiv;\":\"\\u2261\\u20e5\",\"bnot;\":\"\\u2310\",\"bopf;\":\"\\ud835\\udd53\",\n \"bot;\":\"\\u22a5\",\"bottom;\":\"\\u22a5\",\"bowtie;\":\"\\u22c8\",\"boxDL;\":\"\\u2557\",\"boxDR;\":\"\\u2554\",\n \"boxDl;\":\"\\u2556\",\"boxDr;\":\"\\u2553\",\"boxH;\":\"\\u2550\",\"boxHD;\":\"\\u2566\",\"boxHU;\":\"\\u2569\",\n \"boxHd;\":\"\\u2564\",\"boxHu;\":\"\\u2567\",\"boxUL;\":\"\\u255d\",\"boxUR;\":\"\\u255a\",\"boxUl;\":\"\\u255c\",\n \"boxUr;\":\"\\u2559\",\"boxV;\":\"\\u2551\",\"boxVH;\":\"\\u256c\",\"boxVL;\":\"\\u2563\",\"boxVR;\":\"\\u2560\",\n \"boxVh;\":\"\\u256b\",\"boxVl;\":\"\\u2562\",\"boxVr;\":\"\\u255f\",\"boxbox;\":\"\\u29c9\",\"boxdL;\":\"\\u2555\",\n \"boxdR;\":\"\\u2552\",\"boxdl;\":\"\\u2510\",\"boxdr;\":\"\\u250c\",\"boxh;\":\"\\u2500\",\"boxhD;\":\"\\u2565\",\n \"boxhU;\":\"\\u2568\",\"boxhd;\":\"\\u252c\",\"boxhu;\":\"\\u2534\",\"boxminus;\":\"\\u229f\",\"boxplus;\":\"\\u229e\",\n \"boxtimes;\":\"\\u22a0\",\"boxuL;\":\"\\u255b\",\"boxuR;\":\"\\u2558\",\"boxul;\":\"\\u2518\",\"boxur;\":\"\\u2514\",\n \"boxv;\":\"\\u2502\",\"boxvH;\":\"\\u256a\",\"boxvL;\":\"\\u2561\",\"boxvR;\":\"\\u255e\",\"boxvh;\":\"\\u253c\",\n \"boxvl;\":\"\\u2524\",\"boxvr;\":\"\\u251c\",\"bprime;\":\"\\u2035\",\"breve;\":\"\\u02d8\",\"brvbar\":\"\\u00a6\",\n \"brvbar;\":\"\\u00a6\",\"bscr;\":\"\\ud835\\udcb7\",\"bsemi;\":\"\\u204f\",\"bsim;\":\"\\u223d\",\"bsime;\":\"\\u22cd\",\n \"bsol;\":\"\\\\\",\"bsolb;\":\"\\u29c5\",\"bsolhsub;\":\"\\u27c8\",\"bull;\":\"\\u2022\",\"bullet;\":\"\\u2022\",\n \"bump;\":\"\\u224e\",\"bumpE;\":\"\\u2aae\",\"bumpe;\":\"\\u224f\",\"bumpeq;\":\"\\u224f\",\"cacute;\":\"\\u0107\",\n \"cap;\":\"\\u2229\",\"capand;\":\"\\u2a44\",\"capbrcup;\":\"\\u2a49\",\"capcap;\":\"\\u2a4b\",\"capcup;\":\"\\u2a47\",\n \"capdot;\":\"\\u2a40\",\"caps;\":\"\\u2229\\ufe00\",\"caret;\":\"\\u2041\",\"caron;\":\"\\u02c7\",\"ccaps;\":\"\\u2a4d\",\n \"ccaron;\":\"\\u010d\",\"ccedil\":\"\\u00e7\",\"ccedil;\":\"\\u00e7\",\"ccirc;\":\"\\u0109\",\"ccups;\":\"\\u2a4c\",\n \"ccupssm;\":\"\\u2a50\",\"cdot;\":\"\\u010b\",\"cedil\":\"\\u00b8\",\"cedil;\":\"\\u00b8\",\"cemptyv;\":\"\\u29b2\",\n \"cent\":\"\\u00a2\",\"cent;\":\"\\u00a2\",\"centerdot;\":\"\\u00b7\",\"cfr;\":\"\\ud835\\udd20\",\"chcy;\":\"\\u0447\",\n \"check;\":\"\\u2713\",\"checkmark;\":\"\\u2713\",\"chi;\":\"\\u03c7\",\"cir;\":\"\\u25cb\",\"cirE;\":\"\\u29c3\",\n \"circ;\":\"\\u02c6\",\"circeq;\":\"\\u2257\",\"circlearrowleft;\":\"\\u21ba\",\"circlearrowright;\":\"\\u21bb\",\"circledR;\":\"\\u00ae\",\n \"circledS;\":\"\\u24c8\",\"circledast;\":\"\\u229b\",\"circledcirc;\":\"\\u229a\",\"circleddash;\":\"\\u229d\",\"cire;\":\"\\u2257\",\n \"cirfnint;\":\"\\u2a10\",\"cirmid;\":\"\\u2aef\",\"cirscir;\":\"\\u29c2\",\"clubs;\":\"\\u2663\",\"clubsuit;\":\"\\u2663\",\n \"colon;\":\":\",\"colone;\":\"\\u2254\",\"coloneq;\":\"\\u2254\",\"comma;\":\",\",\"commat;\":\"@\",\n \"comp;\":\"\\u2201\",\"compfn;\":\"\\u2218\",\"complement;\":\"\\u2201\",\"complexes;\":\"\\u2102\",\"cong;\":\"\\u2245\",\n \"congdot;\":\"\\u2a6d\",\"conint;\":\"\\u222e\",\"copf;\":\"\\ud835\\udd54\",\"coprod;\":\"\\u2210\",\"copy\":\"\\u00a9\",\n \"copy;\":\"\\u00a9\",\"copysr;\":\"\\u2117\",\"crarr;\":\"\\u21b5\",\"cross;\":\"\\u2717\",\"cscr;\":\"\\ud835\\udcb8\",\n \"csub;\":\"\\u2acf\",\"csube;\":\"\\u2ad1\",\"csup;\":\"\\u2ad0\",\"csupe;\":\"\\u2ad2\",\"ctdot;\":\"\\u22ef\",\n \"cudarrl;\":\"\\u2938\",\"cudarrr;\":\"\\u2935\",\"cuepr;\":\"\\u22de\",\"cuesc;\":\"\\u22df\",\"cularr;\":\"\\u21b6\",\n \"cularrp;\":\"\\u293d\",\"cup;\":\"\\u222a\",\"cupbrcap;\":\"\\u2a48\",\"cupcap;\":\"\\u2a46\",\"cupcup;\":\"\\u2a4a\",\n \"cupdot;\":\"\\u228d\",\"cupor;\":\"\\u2a45\",\"cups;\":\"\\u222a\\ufe00\",\"curarr;\":\"\\u21b7\",\"curarrm;\":\"\\u293c\",\n \"curlyeqprec;\":\"\\u22de\",\"curlyeqsucc;\":\"\\u22df\",\"curlyvee;\":\"\\u22ce\",\"curlywedge;\":\"\\u22cf\",\"curren\":\"\\u00a4\",\n \"curren;\":\"\\u00a4\",\"curvearrowleft;\":\"\\u21b6\",\"curvearrowright;\":\"\\u21b7\",\"cuvee;\":\"\\u22ce\",\"cuwed;\":\"\\u22cf\",\n \"cwconint;\":\"\\u2232\",\"cwint;\":\"\\u2231\",\"cylcty;\":\"\\u232d\",\"dArr;\":\"\\u21d3\",\"dHar;\":\"\\u2965\",\n \"dagger;\":\"\\u2020\",\"daleth;\":\"\\u2138\",\"darr;\":\"\\u2193\",\"dash;\":\"\\u2010\",\"dashv;\":\"\\u22a3\",\n \"dbkarow;\":\"\\u290f\",\"dblac;\":\"\\u02dd\",\"dcaron;\":\"\\u010f\",\"dcy;\":\"\\u0434\",\"dd;\":\"\\u2146\",\n \"ddagger;\":\"\\u2021\",\"ddarr;\":\"\\u21ca\",\"ddotseq;\":\"\\u2a77\",\"deg\":\"\\u00b0\",\"deg;\":\"\\u00b0\",\n \"delta;\":\"\\u03b4\",\"demptyv;\":\"\\u29b1\",\"dfisht;\":\"\\u297f\",\"dfr;\":\"\\ud835\\udd21\",\"dharl;\":\"\\u21c3\",\n \"dharr;\":\"\\u21c2\",\"diam;\":\"\\u22c4\",\"diamond;\":\"\\u22c4\",\"diamondsuit;\":\"\\u2666\",\"diams;\":\"\\u2666\",\n \"die;\":\"\\u00a8\",\"digamma;\":\"\\u03dd\",\"disin;\":\"\\u22f2\",\"div;\":\"\\u00f7\",\"divide\":\"\\u00f7\",\n \"divide;\":\"\\u00f7\",\"divideontimes;\":\"\\u22c7\",\"divonx;\":\"\\u22c7\",\"djcy;\":\"\\u0452\",\"dlcorn;\":\"\\u231e\",\n \"dlcrop;\":\"\\u230d\",\"dollar;\":\"$\",\"dopf;\":\"\\ud835\\udd55\",\"dot;\":\"\\u02d9\",\"doteq;\":\"\\u2250\",\n \"doteqdot;\":\"\\u2251\",\"dotminus;\":\"\\u2238\",\"dotplus;\":\"\\u2214\",\"dotsquare;\":\"\\u22a1\",\"doublebarwedge;\":\"\\u2306\",\n \"downarrow;\":\"\\u2193\",\"downdownarrows;\":\"\\u21ca\",\"downharpoonleft;\":\"\\u21c3\",\"downharpoonright;\":\"\\u21c2\",\"drbkarow;\":\"\\u2910\",\n \"drcorn;\":\"\\u231f\",\"drcrop;\":\"\\u230c\",\"dscr;\":\"\\ud835\\udcb9\",\"dscy;\":\"\\u0455\",\"dsol;\":\"\\u29f6\",\n \"dstrok;\":\"\\u0111\",\"dtdot;\":\"\\u22f1\",\"dtri;\":\"\\u25bf\",\"dtrif;\":\"\\u25be\",\"duarr;\":\"\\u21f5\",\n \"duhar;\":\"\\u296f\",\"dwangle;\":\"\\u29a6\",\"dzcy;\":\"\\u045f\",\"dzigrarr;\":\"\\u27ff\",\"eDDot;\":\"\\u2a77\",\n \"eDot;\":\"\\u2251\",\"eacute\":\"\\u00e9\",\"eacute;\":\"\\u00e9\",\"easter;\":\"\\u2a6e\",\"ecaron;\":\"\\u011b\",\n \"ecir;\":\"\\u2256\",\"ecirc\":\"\\u00ea\",\"ecirc;\":\"\\u00ea\",\"ecolon;\":\"\\u2255\",\"ecy;\":\"\\u044d\",\n \"edot;\":\"\\u0117\",\"ee;\":\"\\u2147\",\"efDot;\":\"\\u2252\",\"efr;\":\"\\ud835\\udd22\",\"eg;\":\"\\u2a9a\",\n \"egrave\":\"\\u00e8\",\"egrave;\":\"\\u00e8\",\"egs;\":\"\\u2a96\",\"egsdot;\":\"\\u2a98\",\"el;\":\"\\u2a99\",\n \"elinters;\":\"\\u23e7\",\"ell;\":\"\\u2113\",\"els;\":\"\\u2a95\",\"elsdot;\":\"\\u2a97\",\"emacr;\":\"\\u0113\",\n \"empty;\":\"\\u2205\",\"emptyset;\":\"\\u2205\",\"emptyv;\":\"\\u2205\",\"emsp13;\":\"\\u2004\",\"emsp14;\":\"\\u2005\",\n \"emsp;\":\"\\u2003\",\"eng;\":\"\\u014b\",\"ensp;\":\"\\u2002\",\"eogon;\":\"\\u0119\",\"eopf;\":\"\\ud835\\udd56\",\n \"epar;\":\"\\u22d5\",\"eparsl;\":\"\\u29e3\",\"eplus;\":\"\\u2a71\",\"epsi;\":\"\\u03b5\",\"epsilon;\":\"\\u03b5\",\n \"epsiv;\":\"\\u03f5\",\"eqcirc;\":\"\\u2256\",\"eqcolon;\":\"\\u2255\",\"eqsim;\":\"\\u2242\",\"eqslantgtr;\":\"\\u2a96\",\n \"eqslantless;\":\"\\u2a95\",\"equals;\":\"=\",\"equest;\":\"\\u225f\",\"equiv;\":\"\\u2261\",\"equivDD;\":\"\\u2a78\",\n \"eqvparsl;\":\"\\u29e5\",\"erDot;\":\"\\u2253\",\"erarr;\":\"\\u2971\",\"escr;\":\"\\u212f\",\"esdot;\":\"\\u2250\",\n \"esim;\":\"\\u2242\",\"eta;\":\"\\u03b7\",\"eth\":\"\\u00f0\",\"eth;\":\"\\u00f0\",\"euml\":\"\\u00eb\",\n \"euml;\":\"\\u00eb\",\"euro;\":\"\\u20ac\",\"excl;\":\"!\",\"exist;\":\"\\u2203\",\"expectation;\":\"\\u2130\",\n \"exponentiale;\":\"\\u2147\",\"fallingdotseq;\":\"\\u2252\",\"fcy;\":\"\\u0444\",\"female;\":\"\\u2640\",\"ffilig;\":\"\\ufb03\",\n \"fflig;\":\"\\ufb00\",\"ffllig;\":\"\\ufb04\",\"ffr;\":\"\\ud835\\udd23\",\"filig;\":\"\\ufb01\",\"fjlig;\":\"fj\",\n \"flat;\":\"\\u266d\",\"fllig;\":\"\\ufb02\",\"fltns;\":\"\\u25b1\",\"fnof;\":\"\\u0192\",\"fopf;\":\"\\ud835\\udd57\",\n \"forall;\":\"\\u2200\",\"fork;\":\"\\u22d4\",\"forkv;\":\"\\u2ad9\",\"fpartint;\":\"\\u2a0d\",\"frac12\":\"\\u00bd\",\n \"frac12;\":\"\\u00bd\",\"frac13;\":\"\\u2153\",\"frac14\":\"\\u00bc\",\"frac14;\":\"\\u00bc\",\"frac15;\":\"\\u2155\",\n \"frac16;\":\"\\u2159\",\"frac18;\":\"\\u215b\",\"frac23;\":\"\\u2154\",\"frac25;\":\"\\u2156\",\"frac34\":\"\\u00be\",\n \"frac34;\":\"\\u00be\",\"frac35;\":\"\\u2157\",\"frac38;\":\"\\u215c\",\"frac45;\":\"\\u2158\",\"frac56;\":\"\\u215a\",\n \"frac58;\":\"\\u215d\",\"frac78;\":\"\\u215e\",\"frasl;\":\"\\u2044\",\"frown;\":\"\\u2322\",\"fscr;\":\"\\ud835\\udcbb\",\n \"gE;\":\"\\u2267\",\"gEl;\":\"\\u2a8c\",\"gacute;\":\"\\u01f5\",\"gamma;\":\"\\u03b3\",\"gammad;\":\"\\u03dd\",\n \"gap;\":\"\\u2a86\",\"gbreve;\":\"\\u011f\",\"gcirc;\":\"\\u011d\",\"gcy;\":\"\\u0433\",\"gdot;\":\"\\u0121\",\n \"ge;\":\"\\u2265\",\"gel;\":\"\\u22db\",\"geq;\":\"\\u2265\",\"geqq;\":\"\\u2267\",\"geqslant;\":\"\\u2a7e\",\n \"ges;\":\"\\u2a7e\",\"gescc;\":\"\\u2aa9\",\"gesdot;\":\"\\u2a80\",\"gesdoto;\":\"\\u2a82\",\"gesdotol;\":\"\\u2a84\",\n \"gesl;\":\"\\u22db\\ufe00\",\"gesles;\":\"\\u2a94\",\"gfr;\":\"\\ud835\\udd24\",\"gg;\":\"\\u226b\",\"ggg;\":\"\\u22d9\",\n \"gimel;\":\"\\u2137\",\"gjcy;\":\"\\u0453\",\"gl;\":\"\\u2277\",\"glE;\":\"\\u2a92\",\"gla;\":\"\\u2aa5\",\n \"glj;\":\"\\u2aa4\",\"gnE;\":\"\\u2269\",\"gnap;\":\"\\u2a8a\",\"gnapprox;\":\"\\u2a8a\",\"gne;\":\"\\u2a88\",\n \"gneq;\":\"\\u2a88\",\"gneqq;\":\"\\u2269\",\"gnsim;\":\"\\u22e7\",\"gopf;\":\"\\ud835\\udd58\",\"grave;\":\"`\",\n \"gscr;\":\"\\u210a\",\"gsim;\":\"\\u2273\",\"gsime;\":\"\\u2a8e\",\"gsiml;\":\"\\u2a90\",\"gt\":\">\",\n \"gt;\":\">\",\"gtcc;\":\"\\u2aa7\",\"gtcir;\":\"\\u2a7a\",\"gtdot;\":\"\\u22d7\",\"gtlPar;\":\"\\u2995\",\n \"gtquest;\":\"\\u2a7c\",\"gtrapprox;\":\"\\u2a86\",\"gtrarr;\":\"\\u2978\",\"gtrdot;\":\"\\u22d7\",\"gtreqless;\":\"\\u22db\",\n \"gtreqqless;\":\"\\u2a8c\",\"gtrless;\":\"\\u2277\",\"gtrsim;\":\"\\u2273\",\"gvertneqq;\":\"\\u2269\\ufe00\",\"gvnE;\":\"\\u2269\\ufe00\",\n \"hArr;\":\"\\u21d4\",\"hairsp;\":\"\\u200a\",\"half;\":\"\\u00bd\",\"hamilt;\":\"\\u210b\",\"hardcy;\":\"\\u044a\",\n \"harr;\":\"\\u2194\",\"harrcir;\":\"\\u2948\",\"harrw;\":\"\\u21ad\",\"hbar;\":\"\\u210f\",\"hcirc;\":\"\\u0125\",\n \"hearts;\":\"\\u2665\",\"heartsuit;\":\"\\u2665\",\"hellip;\":\"\\u2026\",\"hercon;\":\"\\u22b9\",\"hfr;\":\"\\ud835\\udd25\",\n \"hksearow;\":\"\\u2925\",\"hkswarow;\":\"\\u2926\",\"hoarr;\":\"\\u21ff\",\"homtht;\":\"\\u223b\",\"hookleftarrow;\":\"\\u21a9\",\n \"hookrightarrow;\":\"\\u21aa\",\"hopf;\":\"\\ud835\\udd59\",\"horbar;\":\"\\u2015\",\"hscr;\":\"\\ud835\\udcbd\",\"hslash;\":\"\\u210f\",\n \"hstrok;\":\"\\u0127\",\"hybull;\":\"\\u2043\",\"hyphen;\":\"\\u2010\",\"iacute\":\"\\u00ed\",\"iacute;\":\"\\u00ed\",\n \"ic;\":\"\\u2063\",\"icirc\":\"\\u00ee\",\"icirc;\":\"\\u00ee\",\"icy;\":\"\\u0438\",\"iecy;\":\"\\u0435\",\n \"iexcl\":\"\\u00a1\",\"iexcl;\":\"\\u00a1\",\"iff;\":\"\\u21d4\",\"ifr;\":\"\\ud835\\udd26\",\"igrave\":\"\\u00ec\",\n \"igrave;\":\"\\u00ec\",\"ii;\":\"\\u2148\",\"iiiint;\":\"\\u2a0c\",\"iiint;\":\"\\u222d\",\"iinfin;\":\"\\u29dc\",\n \"iiota;\":\"\\u2129\",\"ijlig;\":\"\\u0133\",\"imacr;\":\"\\u012b\",\"image;\":\"\\u2111\",\"imagline;\":\"\\u2110\",\n \"imagpart;\":\"\\u2111\",\"imath;\":\"\\u0131\",\"imof;\":\"\\u22b7\",\"imped;\":\"\\u01b5\",\"in;\":\"\\u2208\",\n \"incare;\":\"\\u2105\",\"infin;\":\"\\u221e\",\"infintie;\":\"\\u29dd\",\"inodot;\":\"\\u0131\",\"int;\":\"\\u222b\",\n \"intcal;\":\"\\u22ba\",\"integers;\":\"\\u2124\",\"intercal;\":\"\\u22ba\",\"intlarhk;\":\"\\u2a17\",\"intprod;\":\"\\u2a3c\",\n \"iocy;\":\"\\u0451\",\"iogon;\":\"\\u012f\",\"iopf;\":\"\\ud835\\udd5a\",\"iota;\":\"\\u03b9\",\"iprod;\":\"\\u2a3c\",\n \"iquest\":\"\\u00bf\",\"iquest;\":\"\\u00bf\",\"iscr;\":\"\\ud835\\udcbe\",\"isin;\":\"\\u2208\",\"isinE;\":\"\\u22f9\",\n \"isindot;\":\"\\u22f5\",\"isins;\":\"\\u22f4\",\"isinsv;\":\"\\u22f3\",\"isinv;\":\"\\u2208\",\"it;\":\"\\u2062\",\n \"itilde;\":\"\\u0129\",\"iukcy;\":\"\\u0456\",\"iuml\":\"\\u00ef\",\"iuml;\":\"\\u00ef\",\"jcirc;\":\"\\u0135\",\n \"jcy;\":\"\\u0439\",\"jfr;\":\"\\ud835\\udd27\",\"jmath;\":\"\\u0237\",\"jopf;\":\"\\ud835\\udd5b\",\"jscr;\":\"\\ud835\\udcbf\",\n \"jsercy;\":\"\\u0458\",\"jukcy;\":\"\\u0454\",\"kappa;\":\"\\u03ba\",\"kappav;\":\"\\u03f0\",\"kcedil;\":\"\\u0137\",\n \"kcy;\":\"\\u043a\",\"kfr;\":\"\\ud835\\udd28\",\"kgreen;\":\"\\u0138\",\"khcy;\":\"\\u0445\",\"kjcy;\":\"\\u045c\",\n \"kopf;\":\"\\ud835\\udd5c\",\"kscr;\":\"\\ud835\\udcc0\",\"lAarr;\":\"\\u21da\",\"lArr;\":\"\\u21d0\",\"lAtail;\":\"\\u291b\",\n \"lBarr;\":\"\\u290e\",\"lE;\":\"\\u2266\",\"lEg;\":\"\\u2a8b\",\"lHar;\":\"\\u2962\",\"lacute;\":\"\\u013a\",\n \"laemptyv;\":\"\\u29b4\",\"lagran;\":\"\\u2112\",\"lambda;\":\"\\u03bb\",\"lang;\":\"\\u27e8\",\"langd;\":\"\\u2991\",\n \"langle;\":\"\\u27e8\",\"lap;\":\"\\u2a85\",\"laquo\":\"\\u00ab\",\"laquo;\":\"\\u00ab\",\"larr;\":\"\\u2190\",\n \"larrb;\":\"\\u21e4\",\"larrbfs;\":\"\\u291f\",\"larrfs;\":\"\\u291d\",\"larrhk;\":\"\\u21a9\",\"larrlp;\":\"\\u21ab\",\n \"larrpl;\":\"\\u2939\",\"larrsim;\":\"\\u2973\",\"larrtl;\":\"\\u21a2\",\"lat;\":\"\\u2aab\",\"latail;\":\"\\u2919\",\n \"late;\":\"\\u2aad\",\"lates;\":\"\\u2aad\\ufe00\",\"lbarr;\":\"\\u290c\",\"lbbrk;\":\"\\u2772\",\"lbrace;\":\"{\",\n \"lbrack;\":\"[\",\"lbrke;\":\"\\u298b\",\"lbrksld;\":\"\\u298f\",\"lbrkslu;\":\"\\u298d\",\"lcaron;\":\"\\u013e\",\n \"lcedil;\":\"\\u013c\",\"lceil;\":\"\\u2308\",\"lcub;\":\"{\",\"lcy;\":\"\\u043b\",\"ldca;\":\"\\u2936\",\n \"ldquo;\":\"\\u201c\",\"ldquor;\":\"\\u201e\",\"ldrdhar;\":\"\\u2967\",\"ldrushar;\":\"\\u294b\",\"ldsh;\":\"\\u21b2\",\n \"le;\":\"\\u2264\",\"leftarrow;\":\"\\u2190\",\"leftarrowtail;\":\"\\u21a2\",\"leftharpoondown;\":\"\\u21bd\",\"leftharpoonup;\":\"\\u21bc\",\n \"leftleftarrows;\":\"\\u21c7\",\"leftrightarrow;\":\"\\u2194\",\"leftrightarrows;\":\"\\u21c6\",\"leftrightharpoons;\":\"\\u21cb\",\"leftrightsquigarrow;\":\"\\u21ad\",\n \"leftthreetimes;\":\"\\u22cb\",\"leg;\":\"\\u22da\",\"leq;\":\"\\u2264\",\"leqq;\":\"\\u2266\",\"leqslant;\":\"\\u2a7d\",\n \"les;\":\"\\u2a7d\",\"lescc;\":\"\\u2aa8\",\"lesdot;\":\"\\u2a7f\",\"lesdoto;\":\"\\u2a81\",\"lesdotor;\":\"\\u2a83\",\n \"lesg;\":\"\\u22da\\ufe00\",\"lesges;\":\"\\u2a93\",\"lessapprox;\":\"\\u2a85\",\"lessdot;\":\"\\u22d6\",\"lesseqgtr;\":\"\\u22da\",\n \"lesseqqgtr;\":\"\\u2a8b\",\"lessgtr;\":\"\\u2276\",\"lesssim;\":\"\\u2272\",\"lfisht;\":\"\\u297c\",\"lfloor;\":\"\\u230a\",\n \"lfr;\":\"\\ud835\\udd29\",\"lg;\":\"\\u2276\",\"lgE;\":\"\\u2a91\",\"lhard;\":\"\\u21bd\",\"lharu;\":\"\\u21bc\",\n \"lharul;\":\"\\u296a\",\"lhblk;\":\"\\u2584\",\"ljcy;\":\"\\u0459\",\"ll;\":\"\\u226a\",\"llarr;\":\"\\u21c7\",\n \"llcorner;\":\"\\u231e\",\"llhard;\":\"\\u296b\",\"lltri;\":\"\\u25fa\",\"lmidot;\":\"\\u0140\",\"lmoust;\":\"\\u23b0\",\n \"lmoustache;\":\"\\u23b0\",\"lnE;\":\"\\u2268\",\"lnap;\":\"\\u2a89\",\"lnapprox;\":\"\\u2a89\",\"lne;\":\"\\u2a87\",\n \"lneq;\":\"\\u2a87\",\"lneqq;\":\"\\u2268\",\"lnsim;\":\"\\u22e6\",\"loang;\":\"\\u27ec\",\"loarr;\":\"\\u21fd\",\n \"lobrk;\":\"\\u27e6\",\"longleftarrow;\":\"\\u27f5\",\"longleftrightarrow;\":\"\\u27f7\",\"longmapsto;\":\"\\u27fc\",\"longrightarrow;\":\"\\u27f6\",\n \"looparrowleft;\":\"\\u21ab\",\"looparrowright;\":\"\\u21ac\",\"lopar;\":\"\\u2985\",\"lopf;\":\"\\ud835\\udd5d\",\"loplus;\":\"\\u2a2d\",\n \"lotimes;\":\"\\u2a34\",\"lowast;\":\"\\u2217\",\"lowbar;\":\"_\",\"loz;\":\"\\u25ca\",\"lozenge;\":\"\\u25ca\",\n \"lozf;\":\"\\u29eb\",\"lpar;\":\"(\",\"lparlt;\":\"\\u2993\",\"lrarr;\":\"\\u21c6\",\"lrcorner;\":\"\\u231f\",\n \"lrhar;\":\"\\u21cb\",\"lrhard;\":\"\\u296d\",\"lrm;\":\"\\u200e\",\"lrtri;\":\"\\u22bf\",\"lsaquo;\":\"\\u2039\",\n \"lscr;\":\"\\ud835\\udcc1\",\"lsh;\":\"\\u21b0\",\"lsim;\":\"\\u2272\",\"lsime;\":\"\\u2a8d\",\"lsimg;\":\"\\u2a8f\",\n \"lsqb;\":\"[\",\"lsquo;\":\"\\u2018\",\"lsquor;\":\"\\u201a\",\"lstrok;\":\"\\u0142\",\"lt\":\"<\",\n \"lt;\":\"<\",\"ltcc;\":\"\\u2aa6\",\"ltcir;\":\"\\u2a79\",\"ltdot;\":\"\\u22d6\",\"lthree;\":\"\\u22cb\",\n \"ltimes;\":\"\\u22c9\",\"ltlarr;\":\"\\u2976\",\"ltquest;\":\"\\u2a7b\",\"ltrPar;\":\"\\u2996\",\"ltri;\":\"\\u25c3\",\n \"ltrie;\":\"\\u22b4\",\"ltrif;\":\"\\u25c2\",\"lurdshar;\":\"\\u294a\",\"luruhar;\":\"\\u2966\",\"lvertneqq;\":\"\\u2268\\ufe00\",\n \"lvnE;\":\"\\u2268\\ufe00\",\"mDDot;\":\"\\u223a\",\"macr\":\"\\u00af\",\"macr;\":\"\\u00af\",\"male;\":\"\\u2642\",\n \"malt;\":\"\\u2720\",\"maltese;\":\"\\u2720\",\"map;\":\"\\u21a6\",\"mapsto;\":\"\\u21a6\",\"mapstodown;\":\"\\u21a7\",\n \"mapstoleft;\":\"\\u21a4\",\"mapstoup;\":\"\\u21a5\",\"marker;\":\"\\u25ae\",\"mcomma;\":\"\\u2a29\",\"mcy;\":\"\\u043c\",\n \"mdash;\":\"\\u2014\",\"measuredangle;\":\"\\u2221\",\"mfr;\":\"\\ud835\\udd2a\",\"mho;\":\"\\u2127\",\"micro\":\"\\u00b5\",\n \"micro;\":\"\\u00b5\",\"mid;\":\"\\u2223\",\"midast;\":\"*\",\"midcir;\":\"\\u2af0\",\"middot\":\"\\u00b7\",\n \"middot;\":\"\\u00b7\",\"minus;\":\"\\u2212\",\"minusb;\":\"\\u229f\",\"minusd;\":\"\\u2238\",\"minusdu;\":\"\\u2a2a\",\n \"mlcp;\":\"\\u2adb\",\"mldr;\":\"\\u2026\",\"mnplus;\":\"\\u2213\",\"models;\":\"\\u22a7\",\"mopf;\":\"\\ud835\\udd5e\",\n \"mp;\":\"\\u2213\",\"mscr;\":\"\\ud835\\udcc2\",\"mstpos;\":\"\\u223e\",\"mu;\":\"\\u03bc\",\"multimap;\":\"\\u22b8\",\n \"mumap;\":\"\\u22b8\",\"nGg;\":\"\\u22d9\\u0338\",\"nGt;\":\"\\u226b\\u20d2\",\"nGtv;\":\"\\u226b\\u0338\",\"nLeftarrow;\":\"\\u21cd\",\n \"nLeftrightarrow;\":\"\\u21ce\",\"nLl;\":\"\\u22d8\\u0338\",\"nLt;\":\"\\u226a\\u20d2\",\"nLtv;\":\"\\u226a\\u0338\",\"nRightarrow;\":\"\\u21cf\",\n \"nVDash;\":\"\\u22af\",\"nVdash;\":\"\\u22ae\",\"nabla;\":\"\\u2207\",\"nacute;\":\"\\u0144\",\"nang;\":\"\\u2220\\u20d2\",\n \"nap;\":\"\\u2249\",\"napE;\":\"\\u2a70\\u0338\",\"napid;\":\"\\u224b\\u0338\",\"napos;\":\"\\u0149\",\"napprox;\":\"\\u2249\",\n \"natur;\":\"\\u266e\",\"natural;\":\"\\u266e\",\"naturals;\":\"\\u2115\",\"nbsp\":\"\\u00a0\",\"nbsp;\":\"\\u00a0\",\n \"nbump;\":\"\\u224e\\u0338\",\"nbumpe;\":\"\\u224f\\u0338\",\"ncap;\":\"\\u2a43\",\"ncaron;\":\"\\u0148\",\"ncedil;\":\"\\u0146\",\n \"ncong;\":\"\\u2247\",\"ncongdot;\":\"\\u2a6d\\u0338\",\"ncup;\":\"\\u2a42\",\"ncy;\":\"\\u043d\",\"ndash;\":\"\\u2013\",\n \"ne;\":\"\\u2260\",\"neArr;\":\"\\u21d7\",\"nearhk;\":\"\\u2924\",\"nearr;\":\"\\u2197\",\"nearrow;\":\"\\u2197\",\n \"nedot;\":\"\\u2250\\u0338\",\"nequiv;\":\"\\u2262\",\"nesear;\":\"\\u2928\",\"nesim;\":\"\\u2242\\u0338\",\"nexist;\":\"\\u2204\",\n \"nexists;\":\"\\u2204\",\"nfr;\":\"\\ud835\\udd2b\",\"ngE;\":\"\\u2267\\u0338\",\"nge;\":\"\\u2271\",\"ngeq;\":\"\\u2271\",\n \"ngeqq;\":\"\\u2267\\u0338\",\"ngeqslant;\":\"\\u2a7e\\u0338\",\"nges;\":\"\\u2a7e\\u0338\",\"ngsim;\":\"\\u2275\",\"ngt;\":\"\\u226f\",\n \"ngtr;\":\"\\u226f\",\"nhArr;\":\"\\u21ce\",\"nharr;\":\"\\u21ae\",\"nhpar;\":\"\\u2af2\",\"ni;\":\"\\u220b\",\n \"nis;\":\"\\u22fc\",\"nisd;\":\"\\u22fa\",\"niv;\":\"\\u220b\",\"njcy;\":\"\\u045a\",\"nlArr;\":\"\\u21cd\",\n \"nlE;\":\"\\u2266\\u0338\",\"nlarr;\":\"\\u219a\",\"nldr;\":\"\\u2025\",\"nle;\":\"\\u2270\",\"nleftarrow;\":\"\\u219a\",\n \"nleftrightarrow;\":\"\\u21ae\",\"nleq;\":\"\\u2270\",\"nleqq;\":\"\\u2266\\u0338\",\"nleqslant;\":\"\\u2a7d\\u0338\",\"nles;\":\"\\u2a7d\\u0338\",\n \"nless;\":\"\\u226e\",\"nlsim;\":\"\\u2274\",\"nlt;\":\"\\u226e\",\"nltri;\":\"\\u22ea\",\"nltrie;\":\"\\u22ec\",\n \"nmid;\":\"\\u2224\",\"nopf;\":\"\\ud835\\udd5f\",\"not\":\"\\u00ac\",\"not;\":\"\\u00ac\",\"notin;\":\"\\u2209\",\n \"notinE;\":\"\\u22f9\\u0338\",\"notindot;\":\"\\u22f5\\u0338\",\"notinva;\":\"\\u2209\",\"notinvb;\":\"\\u22f7\",\"notinvc;\":\"\\u22f6\",\n \"notni;\":\"\\u220c\",\"notniva;\":\"\\u220c\",\"notnivb;\":\"\\u22fe\",\"notnivc;\":\"\\u22fd\",\"npar;\":\"\\u2226\",\n \"nparallel;\":\"\\u2226\",\"nparsl;\":\"\\u2afd\\u20e5\",\"npart;\":\"\\u2202\\u0338\",\"npolint;\":\"\\u2a14\",\"npr;\":\"\\u2280\",\n \"nprcue;\":\"\\u22e0\",\"npre;\":\"\\u2aaf\\u0338\",\"nprec;\":\"\\u2280\",\"npreceq;\":\"\\u2aaf\\u0338\",\"nrArr;\":\"\\u21cf\",\n \"nrarr;\":\"\\u219b\",\"nrarrc;\":\"\\u2933\\u0338\",\"nrarrw;\":\"\\u219d\\u0338\",\"nrightarrow;\":\"\\u219b\",\"nrtri;\":\"\\u22eb\",\n \"nrtrie;\":\"\\u22ed\",\"nsc;\":\"\\u2281\",\"nsccue;\":\"\\u22e1\",\"nsce;\":\"\\u2ab0\\u0338\",\"nscr;\":\"\\ud835\\udcc3\",\n \"nshortmid;\":\"\\u2224\",\"nshortparallel;\":\"\\u2226\",\"nsim;\":\"\\u2241\",\"nsime;\":\"\\u2244\",\"nsimeq;\":\"\\u2244\",\n \"nsmid;\":\"\\u2224\",\"nspar;\":\"\\u2226\",\"nsqsube;\":\"\\u22e2\",\"nsqsupe;\":\"\\u22e3\",\"nsub;\":\"\\u2284\",\n \"nsubE;\":\"\\u2ac5\\u0338\",\"nsube;\":\"\\u2288\",\"nsubset;\":\"\\u2282\\u20d2\",\"nsubseteq;\":\"\\u2288\",\"nsubseteqq;\":\"\\u2ac5\\u0338\",\n \"nsucc;\":\"\\u2281\",\"nsucceq;\":\"\\u2ab0\\u0338\",\"nsup;\":\"\\u2285\",\"nsupE;\":\"\\u2ac6\\u0338\",\"nsupe;\":\"\\u2289\",\n \"nsupset;\":\"\\u2283\\u20d2\",\"nsupseteq;\":\"\\u2289\",\"nsupseteqq;\":\"\\u2ac6\\u0338\",\"ntgl;\":\"\\u2279\",\"ntilde\":\"\\u00f1\",\n \"ntilde;\":\"\\u00f1\",\"ntlg;\":\"\\u2278\",\"ntriangleleft;\":\"\\u22ea\",\"ntrianglelefteq;\":\"\\u22ec\",\"ntriangleright;\":\"\\u22eb\",\n \"ntrianglerighteq;\":\"\\u22ed\",\"nu;\":\"\\u03bd\",\"num;\":\"#\",\"numero;\":\"\\u2116\",\"numsp;\":\"\\u2007\",\n \"nvDash;\":\"\\u22ad\",\"nvHarr;\":\"\\u2904\",\"nvap;\":\"\\u224d\\u20d2\",\"nvdash;\":\"\\u22ac\",\"nvge;\":\"\\u2265\\u20d2\",\n \"nvgt;\":\">\\u20d2\",\"nvinfin;\":\"\\u29de\",\"nvlArr;\":\"\\u2902\",\"nvle;\":\"\\u2264\\u20d2\",\"nvlt;\":\"<\\u20d2\",\n \"nvltrie;\":\"\\u22b4\\u20d2\",\"nvrArr;\":\"\\u2903\",\"nvrtrie;\":\"\\u22b5\\u20d2\",\"nvsim;\":\"\\u223c\\u20d2\",\"nwArr;\":\"\\u21d6\",\n \"nwarhk;\":\"\\u2923\",\"nwarr;\":\"\\u2196\",\"nwarrow;\":\"\\u2196\",\"nwnear;\":\"\\u2927\",\"oS;\":\"\\u24c8\",\n \"oacute\":\"\\u00f3\",\"oacute;\":\"\\u00f3\",\"oast;\":\"\\u229b\",\"ocir;\":\"\\u229a\",\"ocirc\":\"\\u00f4\",\n \"ocirc;\":\"\\u00f4\",\"ocy;\":\"\\u043e\",\"odash;\":\"\\u229d\",\"odblac;\":\"\\u0151\",\"odiv;\":\"\\u2a38\",\n \"odot;\":\"\\u2299\",\"odsold;\":\"\\u29bc\",\"oelig;\":\"\\u0153\",\"ofcir;\":\"\\u29bf\",\"ofr;\":\"\\ud835\\udd2c\",\n \"ogon;\":\"\\u02db\",\"ograve\":\"\\u00f2\",\"ograve;\":\"\\u00f2\",\"ogt;\":\"\\u29c1\",\"ohbar;\":\"\\u29b5\",\n \"ohm;\":\"\\u03a9\",\"oint;\":\"\\u222e\",\"olarr;\":\"\\u21ba\",\"olcir;\":\"\\u29be\",\"olcross;\":\"\\u29bb\",\n \"oline;\":\"\\u203e\",\"olt;\":\"\\u29c0\",\"omacr;\":\"\\u014d\",\"omega;\":\"\\u03c9\",\"omicron;\":\"\\u03bf\",\n \"omid;\":\"\\u29b6\",\"ominus;\":\"\\u2296\",\"oopf;\":\"\\ud835\\udd60\",\"opar;\":\"\\u29b7\",\"operp;\":\"\\u29b9\",\n \"oplus;\":\"\\u2295\",\"or;\":\"\\u2228\",\"orarr;\":\"\\u21bb\",\"ord;\":\"\\u2a5d\",\"order;\":\"\\u2134\",\n \"orderof;\":\"\\u2134\",\"ordf\":\"\\u00aa\",\"ordf;\":\"\\u00aa\",\"ordm\":\"\\u00ba\",\"ordm;\":\"\\u00ba\",\n \"origof;\":\"\\u22b6\",\"oror;\":\"\\u2a56\",\"orslope;\":\"\\u2a57\",\"orv;\":\"\\u2a5b\",\"oscr;\":\"\\u2134\",\n \"oslash\":\"\\u00f8\",\"oslash;\":\"\\u00f8\",\"osol;\":\"\\u2298\",\"otilde\":\"\\u00f5\",\"otilde;\":\"\\u00f5\",\n \"otimes;\":\"\\u2297\",\"otimesas;\":\"\\u2a36\",\"ouml\":\"\\u00f6\",\"ouml;\":\"\\u00f6\",\"ovbar;\":\"\\u233d\",\n \"par;\":\"\\u2225\",\"para\":\"\\u00b6\",\"para;\":\"\\u00b6\",\"parallel;\":\"\\u2225\",\"parsim;\":\"\\u2af3\",\n \"parsl;\":\"\\u2afd\",\"part;\":\"\\u2202\",\"pcy;\":\"\\u043f\",\"percnt;\":\"%\",\"period;\":\".\",\n \"permil;\":\"\\u2030\",\"perp;\":\"\\u22a5\",\"pertenk;\":\"\\u2031\",\"pfr;\":\"\\ud835\\udd2d\",\"phi;\":\"\\u03c6\",\n \"phiv;\":\"\\u03d5\",\"phmmat;\":\"\\u2133\",\"phone;\":\"\\u260e\",\"pi;\":\"\\u03c0\",\"pitchfork;\":\"\\u22d4\",\n \"piv;\":\"\\u03d6\",\"planck;\":\"\\u210f\",\"planckh;\":\"\\u210e\",\"plankv;\":\"\\u210f\",\"plus;\":\"+\",\n \"plusacir;\":\"\\u2a23\",\"plusb;\":\"\\u229e\",\"pluscir;\":\"\\u2a22\",\"plusdo;\":\"\\u2214\",\"plusdu;\":\"\\u2a25\",\n \"pluse;\":\"\\u2a72\",\"plusmn\":\"\\u00b1\",\"plusmn;\":\"\\u00b1\",\"plussim;\":\"\\u2a26\",\"plustwo;\":\"\\u2a27\",\n \"pm;\":\"\\u00b1\",\"pointint;\":\"\\u2a15\",\"popf;\":\"\\ud835\\udd61\",\"pound\":\"\\u00a3\",\"pound;\":\"\\u00a3\",\n \"pr;\":\"\\u227a\",\"prE;\":\"\\u2ab3\",\"prap;\":\"\\u2ab7\",\"prcue;\":\"\\u227c\",\"pre;\":\"\\u2aaf\",\n \"prec;\":\"\\u227a\",\"precapprox;\":\"\\u2ab7\",\"preccurlyeq;\":\"\\u227c\",\"preceq;\":\"\\u2aaf\",\"precnapprox;\":\"\\u2ab9\",\n \"precneqq;\":\"\\u2ab5\",\"precnsim;\":\"\\u22e8\",\"precsim;\":\"\\u227e\",\"prime;\":\"\\u2032\",\"primes;\":\"\\u2119\",\n \"prnE;\":\"\\u2ab5\",\"prnap;\":\"\\u2ab9\",\"prnsim;\":\"\\u22e8\",\"prod;\":\"\\u220f\",\"profalar;\":\"\\u232e\",\n \"profline;\":\"\\u2312\",\"profsurf;\":\"\\u2313\",\"prop;\":\"\\u221d\",\"propto;\":\"\\u221d\",\"prsim;\":\"\\u227e\",\n \"prurel;\":\"\\u22b0\",\"pscr;\":\"\\ud835\\udcc5\",\"psi;\":\"\\u03c8\",\"puncsp;\":\"\\u2008\",\"qfr;\":\"\\ud835\\udd2e\",\n \"qint;\":\"\\u2a0c\",\"qopf;\":\"\\ud835\\udd62\",\"qprime;\":\"\\u2057\",\"qscr;\":\"\\ud835\\udcc6\",\"quaternions;\":\"\\u210d\",\n \"quatint;\":\"\\u2a16\",\"quest;\":\"?\",\"questeq;\":\"\\u225f\",\"quot\":\"\\\"\",\"quot;\":\"\\\"\",\n \"rAarr;\":\"\\u21db\",\"rArr;\":\"\\u21d2\",\"rAtail;\":\"\\u291c\",\"rBarr;\":\"\\u290f\",\"rHar;\":\"\\u2964\",\n \"race;\":\"\\u223d\\u0331\",\"racute;\":\"\\u0155\",\"radic;\":\"\\u221a\",\"raemptyv;\":\"\\u29b3\",\"rang;\":\"\\u27e9\",\n \"rangd;\":\"\\u2992\",\"range;\":\"\\u29a5\",\"rangle;\":\"\\u27e9\",\"raquo\":\"\\u00bb\",\"raquo;\":\"\\u00bb\",\n \"rarr;\":\"\\u2192\",\"rarrap;\":\"\\u2975\",\"rarrb;\":\"\\u21e5\",\"rarrbfs;\":\"\\u2920\",\"rarrc;\":\"\\u2933\",\n \"rarrfs;\":\"\\u291e\",\"rarrhk;\":\"\\u21aa\",\"rarrlp;\":\"\\u21ac\",\"rarrpl;\":\"\\u2945\",\"rarrsim;\":\"\\u2974\",\n \"rarrtl;\":\"\\u21a3\",\"rarrw;\":\"\\u219d\",\"ratail;\":\"\\u291a\",\"ratio;\":\"\\u2236\",\"rationals;\":\"\\u211a\",\n \"rbarr;\":\"\\u290d\",\"rbbrk;\":\"\\u2773\",\"rbrace;\":\"}\",\"rbrack;\":\"]\",\"rbrke;\":\"\\u298c\",\n \"rbrksld;\":\"\\u298e\",\"rbrkslu;\":\"\\u2990\",\"rcaron;\":\"\\u0159\",\"rcedil;\":\"\\u0157\",\"rceil;\":\"\\u2309\",\n \"rcub;\":\"}\",\"rcy;\":\"\\u0440\",\"rdca;\":\"\\u2937\",\"rdldhar;\":\"\\u2969\",\"rdquo;\":\"\\u201d\",\n \"rdquor;\":\"\\u201d\",\"rdsh;\":\"\\u21b3\",\"real;\":\"\\u211c\",\"realine;\":\"\\u211b\",\"realpart;\":\"\\u211c\",\n \"reals;\":\"\\u211d\",\"rect;\":\"\\u25ad\",\"reg\":\"\\u00ae\",\"reg;\":\"\\u00ae\",\"rfisht;\":\"\\u297d\",\n \"rfloor;\":\"\\u230b\",\"rfr;\":\"\\ud835\\udd2f\",\"rhard;\":\"\\u21c1\",\"rharu;\":\"\\u21c0\",\"rharul;\":\"\\u296c\",\n \"rho;\":\"\\u03c1\",\"rhov;\":\"\\u03f1\",\"rightarrow;\":\"\\u2192\",\"rightarrowtail;\":\"\\u21a3\",\"rightharpoondown;\":\"\\u21c1\",\n \"rightharpoonup;\":\"\\u21c0\",\"rightleftarrows;\":\"\\u21c4\",\"rightleftharpoons;\":\"\\u21cc\",\"rightrightarrows;\":\"\\u21c9\",\"rightsquigarrow;\":\"\\u219d\",\n \"rightthreetimes;\":\"\\u22cc\",\"ring;\":\"\\u02da\",\"risingdotseq;\":\"\\u2253\",\"rlarr;\":\"\\u21c4\",\"rlhar;\":\"\\u21cc\",\n \"rlm;\":\"\\u200f\",\"rmoust;\":\"\\u23b1\",\"rmoustache;\":\"\\u23b1\",\"rnmid;\":\"\\u2aee\",\"roang;\":\"\\u27ed\",\n \"roarr;\":\"\\u21fe\",\"robrk;\":\"\\u27e7\",\"ropar;\":\"\\u2986\",\"ropf;\":\"\\ud835\\udd63\",\"roplus;\":\"\\u2a2e\",\n \"rotimes;\":\"\\u2a35\",\"rpar;\":\")\",\"rpargt;\":\"\\u2994\",\"rppolint;\":\"\\u2a12\",\"rrarr;\":\"\\u21c9\",\n \"rsaquo;\":\"\\u203a\",\"rscr;\":\"\\ud835\\udcc7\",\"rsh;\":\"\\u21b1\",\"rsqb;\":\"]\",\"rsquo;\":\"\\u2019\",\n \"rsquor;\":\"\\u2019\",\"rthree;\":\"\\u22cc\",\"rtimes;\":\"\\u22ca\",\"rtri;\":\"\\u25b9\",\"rtrie;\":\"\\u22b5\",\n \"rtrif;\":\"\\u25b8\",\"rtriltri;\":\"\\u29ce\",\"ruluhar;\":\"\\u2968\",\"rx;\":\"\\u211e\",\"sacute;\":\"\\u015b\",\n \"sbquo;\":\"\\u201a\",\"sc;\":\"\\u227b\",\"scE;\":\"\\u2ab4\",\"scap;\":\"\\u2ab8\",\"scaron;\":\"\\u0161\",\n \"sccue;\":\"\\u227d\",\"sce;\":\"\\u2ab0\",\"scedil;\":\"\\u015f\",\"scirc;\":\"\\u015d\",\"scnE;\":\"\\u2ab6\",\n \"scnap;\":\"\\u2aba\",\"scnsim;\":\"\\u22e9\",\"scpolint;\":\"\\u2a13\",\"scsim;\":\"\\u227f\",\"scy;\":\"\\u0441\",\n \"sdot;\":\"\\u22c5\",\"sdotb;\":\"\\u22a1\",\"sdote;\":\"\\u2a66\",\"seArr;\":\"\\u21d8\",\"searhk;\":\"\\u2925\",\n \"searr;\":\"\\u2198\",\"searrow;\":\"\\u2198\",\"sect\":\"\\u00a7\",\"sect;\":\"\\u00a7\",\"semi;\":\";\",\n \"seswar;\":\"\\u2929\",\"setminus;\":\"\\u2216\",\"setmn;\":\"\\u2216\",\"sext;\":\"\\u2736\",\"sfr;\":\"\\ud835\\udd30\",\n \"sfrown;\":\"\\u2322\",\"sharp;\":\"\\u266f\",\"shchcy;\":\"\\u0449\",\"shcy;\":\"\\u0448\",\"shortmid;\":\"\\u2223\",\n \"shortparallel;\":\"\\u2225\",\"shy\":\"\\u00ad\",\"shy;\":\"\\u00ad\",\"sigma;\":\"\\u03c3\",\"sigmaf;\":\"\\u03c2\",\n \"sigmav;\":\"\\u03c2\",\"sim;\":\"\\u223c\",\"simdot;\":\"\\u2a6a\",\"sime;\":\"\\u2243\",\"simeq;\":\"\\u2243\",\n \"simg;\":\"\\u2a9e\",\"simgE;\":\"\\u2aa0\",\"siml;\":\"\\u2a9d\",\"simlE;\":\"\\u2a9f\",\"simne;\":\"\\u2246\",\n \"simplus;\":\"\\u2a24\",\"simrarr;\":\"\\u2972\",\"slarr;\":\"\\u2190\",\"smallsetminus;\":\"\\u2216\",\"smashp;\":\"\\u2a33\",\n \"smeparsl;\":\"\\u29e4\",\"smid;\":\"\\u2223\",\"smile;\":\"\\u2323\",\"smt;\":\"\\u2aaa\",\"smte;\":\"\\u2aac\",\n \"smtes;\":\"\\u2aac\\ufe00\",\"softcy;\":\"\\u044c\",\"sol;\":\"/\",\"solb;\":\"\\u29c4\",\"solbar;\":\"\\u233f\",\n \"sopf;\":\"\\ud835\\udd64\",\"spades;\":\"\\u2660\",\"spadesuit;\":\"\\u2660\",\"spar;\":\"\\u2225\",\"sqcap;\":\"\\u2293\",\n \"sqcaps;\":\"\\u2293\\ufe00\",\"sqcup;\":\"\\u2294\",\"sqcups;\":\"\\u2294\\ufe00\",\"sqsub;\":\"\\u228f\",\"sqsube;\":\"\\u2291\",\n \"sqsubset;\":\"\\u228f\",\"sqsubseteq;\":\"\\u2291\",\"sqsup;\":\"\\u2290\",\"sqsupe;\":\"\\u2292\",\"sqsupset;\":\"\\u2290\",\n \"sqsupseteq;\":\"\\u2292\",\"squ;\":\"\\u25a1\",\"square;\":\"\\u25a1\",\"squarf;\":\"\\u25aa\",\"squf;\":\"\\u25aa\",\n \"srarr;\":\"\\u2192\",\"sscr;\":\"\\ud835\\udcc8\",\"ssetmn;\":\"\\u2216\",\"ssmile;\":\"\\u2323\",\"sstarf;\":\"\\u22c6\",\n \"star;\":\"\\u2606\",\"starf;\":\"\\u2605\",\"straightepsilon;\":\"\\u03f5\",\"straightphi;\":\"\\u03d5\",\"strns;\":\"\\u00af\",\n \"sub;\":\"\\u2282\",\"subE;\":\"\\u2ac5\",\"subdot;\":\"\\u2abd\",\"sube;\":\"\\u2286\",\"subedot;\":\"\\u2ac3\",\n \"submult;\":\"\\u2ac1\",\"subnE;\":\"\\u2acb\",\"subne;\":\"\\u228a\",\"subplus;\":\"\\u2abf\",\"subrarr;\":\"\\u2979\",\n \"subset;\":\"\\u2282\",\"subseteq;\":\"\\u2286\",\"subseteqq;\":\"\\u2ac5\",\"subsetneq;\":\"\\u228a\",\"subsetneqq;\":\"\\u2acb\",\n \"subsim;\":\"\\u2ac7\",\"subsub;\":\"\\u2ad5\",\"subsup;\":\"\\u2ad3\",\"succ;\":\"\\u227b\",\"succapprox;\":\"\\u2ab8\",\n \"succcurlyeq;\":\"\\u227d\",\"succeq;\":\"\\u2ab0\",\"succnapprox;\":\"\\u2aba\",\"succneqq;\":\"\\u2ab6\",\"succnsim;\":\"\\u22e9\",\n \"succsim;\":\"\\u227f\",\"sum;\":\"\\u2211\",\"sung;\":\"\\u266a\",\"sup1\":\"\\u00b9\",\"sup1;\":\"\\u00b9\",\n \"sup2\":\"\\u00b2\",\"sup2;\":\"\\u00b2\",\"sup3\":\"\\u00b3\",\"sup3;\":\"\\u00b3\",\"sup;\":\"\\u2283\",\n \"supE;\":\"\\u2ac6\",\"supdot;\":\"\\u2abe\",\"supdsub;\":\"\\u2ad8\",\"supe;\":\"\\u2287\",\"supedot;\":\"\\u2ac4\",\n \"suphsol;\":\"\\u27c9\",\"suphsub;\":\"\\u2ad7\",\"suplarr;\":\"\\u297b\",\"supmult;\":\"\\u2ac2\",\"supnE;\":\"\\u2acc\",\n \"supne;\":\"\\u228b\",\"supplus;\":\"\\u2ac0\",\"supset;\":\"\\u2283\",\"supseteq;\":\"\\u2287\",\"supseteqq;\":\"\\u2ac6\",\n \"supsetneq;\":\"\\u228b\",\"supsetneqq;\":\"\\u2acc\",\"supsim;\":\"\\u2ac8\",\"supsub;\":\"\\u2ad4\",\"supsup;\":\"\\u2ad6\",\n \"swArr;\":\"\\u21d9\",\"swarhk;\":\"\\u2926\",\"swarr;\":\"\\u2199\",\"swarrow;\":\"\\u2199\",\"swnwar;\":\"\\u292a\",\n \"szlig\":\"\\u00df\",\"szlig;\":\"\\u00df\",\"target;\":\"\\u2316\",\"tau;\":\"\\u03c4\",\"tbrk;\":\"\\u23b4\",\n \"tcaron;\":\"\\u0165\",\"tcedil;\":\"\\u0163\",\"tcy;\":\"\\u0442\",\"tdot;\":\"\\u20db\",\"telrec;\":\"\\u2315\",\n \"tfr;\":\"\\ud835\\udd31\",\"there4;\":\"\\u2234\",\"therefore;\":\"\\u2234\",\"theta;\":\"\\u03b8\",\"thetasym;\":\"\\u03d1\",\n \"thetav;\":\"\\u03d1\",\"thickapprox;\":\"\\u2248\",\"thicksim;\":\"\\u223c\",\"thinsp;\":\"\\u2009\",\"thkap;\":\"\\u2248\",\n \"thksim;\":\"\\u223c\",\"thorn\":\"\\u00fe\",\"thorn;\":\"\\u00fe\",\"tilde;\":\"\\u02dc\",\"times\":\"\\u00d7\",\n \"times;\":\"\\u00d7\",\"timesb;\":\"\\u22a0\",\"timesbar;\":\"\\u2a31\",\"timesd;\":\"\\u2a30\",\"tint;\":\"\\u222d\",\n \"toea;\":\"\\u2928\",\"top;\":\"\\u22a4\",\"topbot;\":\"\\u2336\",\"topcir;\":\"\\u2af1\",\"topf;\":\"\\ud835\\udd65\",\n \"topfork;\":\"\\u2ada\",\"tosa;\":\"\\u2929\",\"tprime;\":\"\\u2034\",\"trade;\":\"\\u2122\",\"triangle;\":\"\\u25b5\",\n \"triangledown;\":\"\\u25bf\",\"triangleleft;\":\"\\u25c3\",\"trianglelefteq;\":\"\\u22b4\",\"triangleq;\":\"\\u225c\",\"triangleright;\":\"\\u25b9\",\n \"trianglerighteq;\":\"\\u22b5\",\"tridot;\":\"\\u25ec\",\"trie;\":\"\\u225c\",\"triminus;\":\"\\u2a3a\",\"triplus;\":\"\\u2a39\",\n \"trisb;\":\"\\u29cd\",\"tritime;\":\"\\u2a3b\",\"trpezium;\":\"\\u23e2\",\"tscr;\":\"\\ud835\\udcc9\",\"tscy;\":\"\\u0446\",\n \"tshcy;\":\"\\u045b\",\"tstrok;\":\"\\u0167\",\"twixt;\":\"\\u226c\",\"twoheadleftarrow;\":\"\\u219e\",\"twoheadrightarrow;\":\"\\u21a0\",\n \"uArr;\":\"\\u21d1\",\"uHar;\":\"\\u2963\",\"uacute\":\"\\u00fa\",\"uacute;\":\"\\u00fa\",\"uarr;\":\"\\u2191\",\n \"ubrcy;\":\"\\u045e\",\"ubreve;\":\"\\u016d\",\"ucirc\":\"\\u00fb\",\"ucirc;\":\"\\u00fb\",\"ucy;\":\"\\u0443\",\n \"udarr;\":\"\\u21c5\",\"udblac;\":\"\\u0171\",\"udhar;\":\"\\u296e\",\"ufisht;\":\"\\u297e\",\"ufr;\":\"\\ud835\\udd32\",\n \"ugrave\":\"\\u00f9\",\"ugrave;\":\"\\u00f9\",\"uharl;\":\"\\u21bf\",\"uharr;\":\"\\u21be\",\"uhblk;\":\"\\u2580\",\n \"ulcorn;\":\"\\u231c\",\"ulcorner;\":\"\\u231c\",\"ulcrop;\":\"\\u230f\",\"ultri;\":\"\\u25f8\",\"umacr;\":\"\\u016b\",\n \"uml\":\"\\u00a8\",\"uml;\":\"\\u00a8\",\"uogon;\":\"\\u0173\",\"uopf;\":\"\\ud835\\udd66\",\"uparrow;\":\"\\u2191\",\n \"updownarrow;\":\"\\u2195\",\"upharpoonleft;\":\"\\u21bf\",\"upharpoonright;\":\"\\u21be\",\"uplus;\":\"\\u228e\",\"upsi;\":\"\\u03c5\",\n \"upsih;\":\"\\u03d2\",\"upsilon;\":\"\\u03c5\",\"upuparrows;\":\"\\u21c8\",\"urcorn;\":\"\\u231d\",\"urcorner;\":\"\\u231d\",\n \"urcrop;\":\"\\u230e\",\"uring;\":\"\\u016f\",\"urtri;\":\"\\u25f9\",\"uscr;\":\"\\ud835\\udcca\",\"utdot;\":\"\\u22f0\",\n \"utilde;\":\"\\u0169\",\"utri;\":\"\\u25b5\",\"utrif;\":\"\\u25b4\",\"uuarr;\":\"\\u21c8\",\"uuml\":\"\\u00fc\",\n \"uuml;\":\"\\u00fc\",\"uwangle;\":\"\\u29a7\",\"vArr;\":\"\\u21d5\",\"vBar;\":\"\\u2ae8\",\"vBarv;\":\"\\u2ae9\",\n \"vDash;\":\"\\u22a8\",\"vangrt;\":\"\\u299c\",\"varepsilon;\":\"\\u03f5\",\"varkappa;\":\"\\u03f0\",\"varnothing;\":\"\\u2205\",\n \"varphi;\":\"\\u03d5\",\"varpi;\":\"\\u03d6\",\"varpropto;\":\"\\u221d\",\"varr;\":\"\\u2195\",\"varrho;\":\"\\u03f1\",\n \"varsigma;\":\"\\u03c2\",\"varsubsetneq;\":\"\\u228a\\ufe00\",\"varsubsetneqq;\":\"\\u2acb\\ufe00\",\"varsupsetneq;\":\"\\u228b\\ufe00\",\"varsupsetneqq;\":\"\\u2acc\\ufe00\",\n \"vartheta;\":\"\\u03d1\",\"vartriangleleft;\":\"\\u22b2\",\"vartriangleright;\":\"\\u22b3\",\"vcy;\":\"\\u0432\",\"vdash;\":\"\\u22a2\",\n \"vee;\":\"\\u2228\",\"veebar;\":\"\\u22bb\",\"veeeq;\":\"\\u225a\",\"vellip;\":\"\\u22ee\",\"verbar;\":\"|\",\n \"vert;\":\"|\",\"vfr;\":\"\\ud835\\udd33\",\"vltri;\":\"\\u22b2\",\"vnsub;\":\"\\u2282\\u20d2\",\"vnsup;\":\"\\u2283\\u20d2\",\n \"vopf;\":\"\\ud835\\udd67\",\"vprop;\":\"\\u221d\",\"vrtri;\":\"\\u22b3\",\"vscr;\":\"\\ud835\\udccb\",\"vsubnE;\":\"\\u2acb\\ufe00\",\n \"vsubne;\":\"\\u228a\\ufe00\",\"vsupnE;\":\"\\u2acc\\ufe00\",\"vsupne;\":\"\\u228b\\ufe00\",\"vzigzag;\":\"\\u299a\",\"wcirc;\":\"\\u0175\",\n \"wedbar;\":\"\\u2a5f\",\"wedge;\":\"\\u2227\",\"wedgeq;\":\"\\u2259\",\"weierp;\":\"\\u2118\",\"wfr;\":\"\\ud835\\udd34\",\n \"wopf;\":\"\\ud835\\udd68\",\"wp;\":\"\\u2118\",\"wr;\":\"\\u2240\",\"wreath;\":\"\\u2240\",\"wscr;\":\"\\ud835\\udccc\",\n \"xcap;\":\"\\u22c2\",\"xcirc;\":\"\\u25ef\",\"xcup;\":\"\\u22c3\",\"xdtri;\":\"\\u25bd\",\"xfr;\":\"\\ud835\\udd35\",\n \"xhArr;\":\"\\u27fa\",\"xharr;\":\"\\u27f7\",\"xi;\":\"\\u03be\",\"xlArr;\":\"\\u27f8\",\"xlarr;\":\"\\u27f5\",\n \"xmap;\":\"\\u27fc\",\"xnis;\":\"\\u22fb\",\"xodot;\":\"\\u2a00\",\"xopf;\":\"\\ud835\\udd69\",\"xoplus;\":\"\\u2a01\",\n \"xotime;\":\"\\u2a02\",\"xrArr;\":\"\\u27f9\",\"xrarr;\":\"\\u27f6\",\"xscr;\":\"\\ud835\\udccd\",\"xsqcup;\":\"\\u2a06\",\n \"xuplus;\":\"\\u2a04\",\"xutri;\":\"\\u25b3\",\"xvee;\":\"\\u22c1\",\"xwedge;\":\"\\u22c0\",\"yacute\":\"\\u00fd\",\n \"yacute;\":\"\\u00fd\",\"yacy;\":\"\\u044f\",\"ycirc;\":\"\\u0177\",\"ycy;\":\"\\u044b\",\"yen\":\"\\u00a5\",\n \"yen;\":\"\\u00a5\",\"yfr;\":\"\\ud835\\udd36\",\"yicy;\":\"\\u0457\",\"yopf;\":\"\\ud835\\udd6a\",\"yscr;\":\"\\ud835\\udcce\",\n \"yucy;\":\"\\u044e\",\"yuml\":\"\\u00ff\",\"yuml;\":\"\\u00ff\",\"zacute;\":\"\\u017a\",\"zcaron;\":\"\\u017e\",\n \"zcy;\":\"\\u0437\",\"zdot;\":\"\\u017c\",\"zeetrf;\":\"\\u2128\",\"zeta;\":\"\\u03b6\",\"zfr;\":\"\\ud835\\udd37\",\n \"zhcy;\":\"\\u0436\",\"zigrarr;\":\"\\u21dd\",\"zopf;\":\"\\ud835\\udd6b\",\"zscr;\":\"\\ud835\\udccf\",\"zwj;\":\"\\u200d\",\n \"zwnj;\":\"\\u200c\",\n};\n","/**\n * Turning source bytes into the text a READER sees — the one comparison this whole package makes.\n *\n * 🔴 THE PREFILTER AND THE PARSER MUST AGREE. `locate` decides which files are opened at all by\n * searching their raw bytes; the parsers then decide which element holds the value. When the two\n * disagree the parser is never consulted: `Fish &amp; Chips` in the template is `Fish & Chips` to\n * every reader and to `deriveSchema`, and `Hello{\" \"}world` renders as one sentence — but a raw\n * byte search finds neither, so the file is reported as not rendering copy it visibly renders.\n * Both transforms live here so both sides call the same function.\n */\nimport { LONGEST_ENTITY, NAMED_ENTITIES } from \"./entities.js\";\n\n/**\n * The numeric references HTML does NOT decode to the number written.\n *\n * 🔴 THE WINDOWS-1252 REMAP IS NOT A CURIOSITY. `&#128;` is the euro sign on every page ever\n * authored against a Windows code page, and browsers decode it that way to this day — decoding it\n * as U+0080 instead produces an invisible control character where a `€` is, which is two different\n * sentences comparing unequal and a file reported as not rendering copy it plainly renders.\n * @see https://html.spec.whatwg.org/multipage/parsing.html#numeric-character-reference-end-state\n */\nconst WINDOWS_1252: Record<number, number> = {\n 0x80: 0x20ac, 0x82: 0x201a, 0x83: 0x0192, 0x84: 0x201e, 0x85: 0x2026,\n 0x86: 0x2020, 0x87: 0x2021, 0x88: 0x02c6, 0x89: 0x2030, 0x8a: 0x0160,\n 0x8b: 0x2039, 0x8c: 0x0152, 0x8e: 0x017d, 0x91: 0x2018, 0x92: 0x2019,\n 0x93: 0x201c, 0x94: 0x201d, 0x95: 0x2022, 0x96: 0x2013, 0x97: 0x2014,\n 0x98: 0x02dc, 0x99: 0x2122, 0x9a: 0x0161, 0x9b: 0x203a, 0x9c: 0x0153,\n 0x9e: 0x017e, 0x9f: 0x0178,\n};\n\nconst REPLACEMENT = \"�\";\n\n/** Sticky, so the match starts at the ampersand and runs to the end of the digits. */\nconst NUMERIC = /&#(?:[xX]([0-9a-fA-F]+)|([0-9]+));?/y;\n\n/** One numeric reference's character, by the spec's rules rather than by `fromCodePoint`. */\nfunction numericCharacter(code: number): string {\n if (!Number.isFinite(code)) return REPLACEMENT;\n // Null, out of range, and the surrogate halves are all U+FFFD — a lone surrogate is not a\n // character, and `String.fromCodePoint` throws on one rather than saying so.\n if (code === 0 || code > 0x10ffff) return REPLACEMENT;\n if (code >= 0xd800 && code <= 0xdfff) return REPLACEMENT;\n return String.fromCodePoint(WINDOWS_1252[code] ?? code);\n}\n\n/**\n * `&amp;` → `&`, by the HTML character-reference algorithm rather than by a regex.\n *\n * 🔴 LONGEST VALID PREFIX, NOT \"up to the semicolon\". `&copycat` is `©cat` to every browser,\n * because the table contains `copy` without a semicolon; `&NotEqual` without one is left ALONE,\n * because the table does not. A regex anchored on `;` gets the first wrong and a regex that\n * ignores `;` gets the second wrong — and both failures are silent, costing a file the prefilter\n * then reports as not rendering the copy.\n *\n * Anything that matches nothing is left EXACTLY as it is, ampersand included: the cost of that is\n * a comparison that does not match, and the cost of guessing is a binding on the wrong element.\n */\nexport function decodeEntities(value: string): string {\n if (!value.includes(\"&\")) return value;\n let out = \"\";\n let at = 0;\n\n while (at < value.length) {\n const amp = value.indexOf(\"&\", at);\n if (amp < 0) {\n out += value.slice(at);\n break;\n }\n out += value.slice(at, amp);\n\n /**\n * 🔴 THE WHOLE DIGIT RUN, however long it is.\n *\n * Looking at a fixed window of bytes truncates a padded reference: `&#000000000065;` is `A` to\n * every browser and became `\\u{FFFD}65;` here — a sentence that no longer matches the one the\n * CMS holds, in a file the prefilter then reports as not rendering it. A sticky match reads to\n * the end of the digits and costs no slice.\n */\n NUMERIC.lastIndex = amp;\n const numeric = NUMERIC.exec(value);\n if (numeric) {\n out += numericCharacter(parseInt(numeric[1] ?? numeric[2]!, numeric[1] ? 16 : 10));\n at = amp + numeric[0].length;\n continue;\n }\n\n // The longest key that matches here. Keys carry their own semicolon when they need one, so\n // the legacy rule needs no separate list. @see entities.ts\n const window = value.slice(amp + 1, amp + 1 + LONGEST_ENTITY);\n let matched: string | null = null;\n for (let length = Math.min(window.length, LONGEST_ENTITY); length > 0; length--) {\n const held = NAMED_ENTITIES[window.slice(0, length)];\n if (held !== undefined) {\n out += held;\n matched = window.slice(0, length);\n break;\n }\n }\n if (matched === null) {\n out += \"&\";\n at = amp + 1;\n continue;\n }\n at = amp + 1 + matched.length;\n }\n\n return out;\n}\n\n/**\n * `{\" \"}` and `{\"a string\"}` are TEXT a reader sees, not expressions.\n *\n * The jsx parser already normalises them into text nodes, so this exists for the prefilter, which\n * has no tree. Only a plain single- or double-quoted literal is unwrapped: anything else inside\n * the braces is a program, and a program's text is not the page's.\n */\nconst JSX_STRING_CHILD = /\\{\\s*([\"'])((?:\\\\.|(?!\\1)[^\\\\])*)\\1\\s*\\}/g;\n\nconst SINGLE: Record<string, string> = {\n n: \"\\n\",\n t: \"\\t\",\n r: \"\\r\",\n b: \"\\b\",\n f: \"\\f\",\n v: \"\\v\",\n \"0\": \"\\0\",\n};\n\nconst ESCAPE = /\\\\(?:u\\{([0-9a-fA-F]+)\\}|u([0-9a-fA-F]{4})|x([0-9a-fA-F]{2})|\\r\\n|([\\s\\S]))/g;\n\n/**\n * A JavaScript string literal's own text — escapes DECODED, not stripped.\n *\n * `\"Fish &amp; Chips\"` renders a non-breaking space; dropping the backslash left the literal\n * `u00a0` in the middle of the sentence, which matches nothing and silently costs the file. A line\n * continuation (`\\` before a newline) produces nothing at all, which is what it means.\n */\nexport function decodeStringEscapes(body: string): string {\n return body.replace(ESCAPE, (_whole, braced?: string, unicode?: string, hex?: string, char?: string) => {\n const code = braced ?? unicode ?? hex;\n if (code !== undefined) {\n const point = parseInt(code, 16);\n return Number.isFinite(point) && point <= 0x10ffff ? String.fromCodePoint(point) : \"\";\n }\n if (char === undefined) return \"\"; // `\\` before a newline: a line continuation\n if (char === \"\\n\" || char === \"\\r\" || char === \"
\" || char === \"
\") return \"\";\n return SINGLE[char] ?? char;\n });\n}\n\nexport const unwrapJsxStrings = (value: string): string =>\n value.replace(JSX_STRING_CHILD, (_whole, _quote, body: string) => decodeStringEscapes(body));\n","/**\n * Where in the source does each of the brief's paths actually appear?\n *\n * Moved here verbatim from `src/lib/conversion/propose.ts`, which now re-exports it: the proposer\n * checks \"did the conversion bind every path in every file that renders it\", and the codemod\n * decides which files to open. A second implementation of \"where does this string appear\" would\n * drift from the first silently, and the failure it produces is a proposal refused for not binding\n * a path in a file the other half never asked it to touch.\n */\n\n/** One file as it was read. Same shape the proposer's `SourceFile` has. */\nexport interface SourceFile {\n path: string;\n content: string;\n}\n\n/** A brief path whose `original` was found verbatim in the source. */\nexport interface LocatedPath {\n route: string;\n /** Page or shared chrome — half of the `(route, scope, path)` identity. @see brief.ts */\n scope?: \"page\" | \"layout\";\n path: string;\n kind: string;\n /** The whitespace-normalised copy that was matched. */\n original: string;\n /** Every source file that renders it. A value rendered twice must be bound twice. */\n files: string[];\n}\n\n/** A brief path the source does not appear to render, with the reason it could not be placed. */\nexport interface UnlocatedPath {\n route: string;\n scope?: \"page\" | \"layout\";\n path: string;\n reason: \"no-original\" | \"not-in-source\";\n}\n\nimport { decodeEntities, unwrapJsxStrings } from \"./text.js\";\n\n/**\n * Collapse whitespace for comparison.\n *\n * The same normalisation the annotator and the live-editor matcher use. A template wraps its copy\n * across lines and indents it; the CMS holds one line. Comparing raw bytes would find nothing on a\n * correctly formatted file, which is every file.\n */\nexport const flat = (value: string): string => value.replace(/\\s+/g, \" \").trim();\n\n/** The same text with tags removed — what a reader sees, not what the file says. */\nexport const stripTags = (value: string): string =>\n value.replace(/<br\\s*\\/?>/gi, \" \").replace(/<[^>]*>/g, \"\");\n\ninterface BriefLike {\n pages: {\n route: string;\n paths: { path: string; kind: string; original: string | null; scope?: \"page\" | \"layout\" }[];\n }[];\n}\n\nexport interface LocateOptions {\n /**\n * Also match a path whose original is the element's TEXT rather than its markup.\n *\n * A richtext field's brief `original` is the first block's text — `Read this now` — while the\n * template says `Read <strong>this</strong> now`. A literal search finds nothing, which is the\n * right answer for the proposer (it must not demand a binding for a string it cannot point at)\n * and the wrong one for the codemod, which can see the element. OFF by default so the moved\n * implementation keeps its exact previous behaviour for `propose.ts`.\n */\n stripTags?: boolean;\n}\n\n/**\n * Split the brief's paths into the ones the source renders and the ones it does not.\n *\n * Exported because the generator needs the SAME answer: the transformer is told which originals\n * live in which file, and a second implementation of \"where does this string appear\" would drift\n * from this one silently — the model would then be asked to bind a path in a file this module has\n * already decided does not render it.\n */\nexport function locate(\n brief: BriefLike,\n sources: SourceFile[],\n options?: LocateOptions,\n): { located: LocatedPath[]; unlocated: UnlocatedPath[] } {\n const flattened = sources.map((s) => {\n // What a READER sees, from bytes: entities decoded and JSX string children unwrapped, so the\n // prefilter agrees with the parser about what the file renders. @see text.ts\n const readable = unwrapJsxStrings(decodeEntities(s.content));\n return {\n path: s.path,\n content: flat(readable),\n text: options?.stripTags ? flat(stripTags(readable)) : null,\n };\n });\n const located: LocatedPath[] = [];\n const unlocated: UnlocatedPath[] = [];\n\n for (const page of brief.pages) {\n for (const p of page.paths) {\n const original = p.original === null ? \"\" : flat(p.original);\n if (!original) {\n // No `defaultValue` means the import never captured what the repo renders here, so there\n // is no string to search for. Reported rather than silently dropped: it is the single\n // most common reason a path cannot be converted automatically.\n unlocated.push({ route: page.route, scope: p.scope, path: p.path, reason: \"no-original\" });\n continue;\n }\n const files = flattened\n .filter((f) => f.content.includes(original) || (f.text !== null && f.text.includes(original)))\n .map((f) => f.path);\n if (files.length === 0) {\n unlocated.push({ route: page.route, scope: p.scope, path: p.path, reason: \"not-in-source\" });\n continue;\n }\n located.push({ route: page.route, scope: p.scope, path: p.path, kind: p.kind, original, files });\n }\n }\n return { located, unlocated };\n}\n","/**\n * A repeated sibling group in the source, turned into the loop the CMS can actually grow.\n *\n * 🔴 THE POINT IS THE FOURTH CARD. `deriveSchema` calls three identical siblings a repeater and\n * mints `cards[i].title`, so the dashboard shows an array an editor can add a row to. If the\n * codemod only stamps `cards[0]`, `cards[1]`, `cards[2]` onto the three elements that exist, the\n * array is editable in the dashboard and the site still renders exactly three cards forever — an\n * editor adds one, publishes, and nothing happens. Binding the group as a LOOP is what makes the\n * array mean what the dashboard says it means.\n *\n * THE FALLBACK IS EVERY ROW, not the first. The rows come from `bcmsRows(page, \"cards\", [...])`\n * and that array is serialised from all three siblings before two of them are deleted, so a build\n * against the committed `{}` stub renders the same three cards the repository renders today.\n *\n * WHAT IT REFUSES, and it refuses by falling back rather than by guessing: siblings that are not\n * consecutive (something else is rendered between two cards, so a loop would move it), siblings\n * whose shapes differ (row 2 has a badge row 1 does not, so one template cannot stand for both),\n * a dialect with no loop form (html — the published markup is injected per index instead). Each\n * one leaves the group rewritten per index and reports `REPEATER_FIXED_LENGTH`, which is the true\n * statement: those bindings work, and the array's length is the template's.\n */\nimport MagicString from \"magic-string\";\nimport type { Dialect } from \"./dialect.js\";\nimport { DIALECT_RULES } from \"./expr.js\";\nimport { allocateNames } from \"./scope.js\";\nimport { isIntrinsic, type Node, type Range, type Site } from \"./sites/shared.js\";\n\n/** One leaf of one row: `cards[1].title` is row 1's `title`. */\nexport interface RepeatMember {\n key: string;\n path: string;\n /** The part after the index — `title` in `cards[1].title`. */\n leaf: string;\n index: number;\n kind: string;\n /** The copy this leaf renders today. It becomes row `index`'s entry in the fallback array. */\n fallback: string;\n site: Site;\n}\n\n/** What one row of the group occupies in the file, and which leaves live inside it. */\ninterface RepeatRow {\n index: number;\n range: Range;\n /** Where an attribute may be inserted on the row element itself — jsx's `key={i}` goes here. */\n attrInsertAt: number;\n /** The row element's own `key`, when it already has one. A second would be a duplicate. */\n keyAttr: Range | null;\n /** The element itself, so the shape comparison can tell markup trivia from content. */\n node: Extract<Node, { type: \"element\" }>;\n members: RepeatMember[];\n}\n\nexport interface RepeaterPlan {\n /** The whole group's span — first row's `<` to the last row's `>`. Replaced in one splice. */\n range: Range;\n text: string;\n /** `cards[*].title` — what this file now declares, as a shape rather than as a path. */\n bindings: string[];\n /** The row and index identifiers the loop introduced, for the caller's own bookkeeping. */\n names: { row: string; index: string };\n}\n\n/** Everything about the file that the emitted text has to agree with. */\nexport interface RepeaterContext {\n content: string;\n roots: Node[];\n /** The names `bcms` and `bcmsRows` were imported under here. @see scope.ts */\n read: string;\n rows: string;\n /** The identifier this page's snapshot is imported under. */\n snapshot: string;\n /** How this file reads its route parameter, on a dynamic route. @see routes.ts */\n slug: string | null;\n}\n\n/** `cards[*].title` — one binding for every row, which is the whole reason the loop exists. */\nexport const shapeOf = (arrayPath: string, leaf: string): string => `${arrayPath}[*].${leaf}`;\n\n/** The full span of an element, close tag included. Null for anything self-closing. */\nconst elementEnd = (node: Extract<Node, { type: \"element\" }>): number | null =>\n node.inner ? node.inner.end + node.tag.length + 3 : null;\n\n/**\n * The sibling elements each holding exactly one row's leaves, DEEPEST group first.\n *\n * Deepest, because an outer wrapper contains every row too and looping it would repeat the whole\n * section. The container is found by asking each element's own children the only question that\n * matters: does each of you hold the leaves of exactly one index, and between you do you hold all\n * of them?\n */\nfunction findRows(roots: Node[], members: RepeatMember[]): RepeatRow[] | null {\n const wanted = new Set(members.map((m) => m.index));\n\n const search = (node: Node): RepeatRow[] | null => {\n if (node.type !== \"element\") return null;\n for (const child of node.children) {\n const deeper = search(child);\n if (deeper) return deeper;\n }\n const rows: RepeatRow[] = [];\n for (const child of node.children) {\n if (child.type !== \"element\") continue;\n const end = elementEnd(child);\n if (end === null) continue;\n const inside = members.filter((m) => m.site.range.start >= child.start && m.site.range.end <= end);\n if (inside.length === 0) continue;\n const indices = new Set(inside.map((m) => m.index));\n // A child holding two rows' leaves is a wrapper, not a row.\n if (indices.size !== 1) return null;\n rows.push({\n index: inside[0]!.index,\n range: { start: child.start, end },\n attrInsertAt: child.attrInsertAt,\n // `:key` in vue, `key` in jsx — one existing key, whichever way it is spelled.\n keyAttr: child.attrs.find((a) => a.name.replace(/^:/, \"\") === \"key\")?.range ?? null,\n node: child,\n members: inside,\n });\n }\n if (rows.length === 0) return null;\n const covered = new Set(rows.flatMap((r) => r.members.map((m) => m.index)));\n if (covered.size !== wanted.size || rows.length !== wanted.size) return null;\n if (rows.some((r) => r.members.length !== members.length / wanted.size)) return null;\n return rows.sort((a, b) => a.range.start - b.range.start);\n };\n\n for (const root of roots) {\n const found = search(root);\n if (found) return found;\n }\n return null;\n}\n\n/** Nothing but whitespace between one row and the next: a loop may not swallow other markup. */\nconst consecutive = (rows: RepeatRow[], content: string): boolean =>\n rows.every((row, at) => at === 0 || content.slice(rows[at - 1]!.range.end, row.range.start).trim() === \"\");\n\n/**\n * Do all rows render the same thing?\n *\n * 🔴 THE WHOLE SUBTREE, WITH ONLY THE EDITABLE LITERALS MASKED. The first row becomes the template\n * and the others are DELETED, so anything they render that it does not is gone from the site: a\n * `class=\"featured\"` on row two, a `<span class=\"badge\">New</span>` row three has, one extra\n * wrapper, a different attribute order. Comparing the leaves alone said those rows had the same\n * shape and the diff quietly dropped them. Comparing the masked bytes is the only test that\n * matches what the emitter actually does, and anything it cannot prove identical stays a fixed\n * number of rows.\n *\n * Whitespace is collapsed because indentation legitimately differs between siblings; nothing else\n * is normalised, because nothing else is safe to ignore.\n */\nfunction maskedRow(row: RepeatRow, content: string): string {\n const masked = new Map(row.members.map((member) => [member.site.inner!.start, member.leaf]));\n return canonical(row.node, content, masked);\n}\n\n/** Whitespace a FORMATTER owns: a text node that is only whitespace, between two tags. */\nconst TRIVIA = \"\\u0001\";\n\n/**\n * One row as a string that differs exactly when the rows differ.\n *\n * 🔴 ONLY WHITESPACE-ONLY TEXT NODES ARE TRIVIA. A regex over the row's bytes cannot tell the\n * indentation between two tags — which siblings legitimately differ in — from the indentation\n * INSIDE a `<pre>`, a multiline template literal or an attribute value, where it is the content.\n * Collapsing those made two rows that render visibly different text compare equal, one became the\n * template, and the other was deleted. The parser already knows which is which, so it is asked.\n */\nfunction canonical(node: Node, content: string, masked: Map<number, string>): string {\n if (node.type === \"text\") {\n return node.value.trim() === \"\" ? TRIVIA : content.slice(node.range.start, node.range.end);\n }\n if (node.type === \"comment\" || node.type === \"expr\") {\n return content.slice(node.range.start, node.range.end);\n }\n if (node.type !== \"element\") return \"\";\n\n const open = content.slice(node.start, node.inner ? node.inner.start : node.attrInsertAt);\n // An editable leaf's own copy is what the rows are ALLOWED to differ in — it is the whole point\n // of the group — so it is replaced by the leaf's name rather than compared.\n if (node.inner && masked.has(node.inner.start)) {\n return `${open}\\u0000${masked.get(node.inner.start)}\\u0000</${node.tag}>`;\n }\n const inside = node.children.map((child) => canonical(child, content, masked)).join(\"\");\n return node.inner ? `${open}${inside}</${node.tag}>` : open;\n}\n\nfunction sameShape(rows: RepeatRow[], content: string): boolean {\n const first = maskedRow(rows[0]!, content);\n return rows.every((row) => maskedRow(row, content) === first);\n}\n\n/** One row's source, moved in by two spaces so the loop it sits inside reads as a nesting level. */\nconst indented = (body: string, indent: string): string =>\n body\n .split(\"\\n\")\n .map((line) => (line.startsWith(indent) ? `${indent} ${line.slice(indent.length)}` : `${indent} ${line}`))\n .join(\"\\n\");\n\n/** The indentation the first row sits at, so the loop it becomes reads like the file around it. */\nfunction indentOf(content: string, at: number): string {\n const lineStart = content.lastIndexOf(\"\\n\", at - 1) + 1;\n const prefix = content.slice(lineStart, at);\n return prefix.trim() === \"\" ? prefix : \"\";\n}\n\n/**\n * The loop, or null when this group has to stay a fixed number of rows.\n *\n * `fallbackRows` is passed in rather than derived so the caller — which already holds every\n * target's `original` — decides what a row's in-code value is; this module only decides where the\n * bytes go.\n */\nexport function emitRepeater(\n dialect: Dialect,\n group: RepeatMember[],\n arrayPath: string,\n fallbackRows: Record<string, unknown>[],\n ctx: RepeaterContext,\n): RepeaterPlan | null {\n const rule = DIALECT_RULES[dialect];\n if (!rule.loop || !rule.text || group.length === 0) return null;\n\n const rows = findRows(ctx.roots, group);\n if (!rows || rows.length < 2) return null;\n if (!consecutive(rows, ctx.content)) return null;\n if (!sameShape(rows, ctx.content)) return null;\n // Every leaf has to be a place a loop can write: an expression in text position on an element\n // the browser renders. An attribute leaf would need `data-bcms-props` to hold a template\n // literal, which nothing downstream can verify. @see propsAttribute\n if (group.some((m) => m.site.where !== \"text\" || !isIntrinsic(m.site.tag) || !m.site.inner)) return null;\n\n const template = rows[0]!;\n /**\n * The row and index names, allocated against every identifier the TEMPLATE already uses.\n *\n * 🔴 `card` AND `i` ARE ORDINARY WORDS. A row rendering `data-index={i}` or `{card.name}` from\n * an outer scope has those names bound already, and a loop that introduces its own silently\n * shadows them — the row renders the loop's value instead of the page's, and nothing says so.\n * @see scope.ts, which does the same job for the module's own bindings.\n */\n const used = new Set(ctx.content.slice(template.range.start, template.range.end).match(/[A-Za-z_$][\\w$]*/g) ?? []);\n const allocated = allocateNames(used, [\n { key: \"row\", name: \"card\" },\n { key: \"index\", name: \"i\" },\n ]);\n const names = { row: allocated.get(\"row\")!, index: allocated.get(\"index\")! };\n\n const source = new MagicString(ctx.content.slice(template.range.start, template.range.end));\n const shift = -template.range.start;\n const bindings: string[] = [];\n\n for (const member of template.members) {\n const site = member.site;\n const expression = `${ctx.read}(${names.row}, ${JSON.stringify(member.leaf)}, \"\")`;\n if (member.kind === \"richtext\" && rule.richtext) {\n source.remove(site.inner!.start + shift, site.inner!.end + shift);\n source.appendLeft(site.attrInsertAt + shift, ` ${rule.richtext(expression)}`);\n } else {\n source.overwrite(site.inner!.start + shift, site.inner!.end + shift, rule.text(expression));\n }\n // 🔴 A TEMPLATE LITERAL, not a computed name. `${i}` is the row index and everything else is\n // written out, so the proposer's own scan can read the path shape off the bytes rather than\n // being asked to trust that some expression resolves to a real field. @see propose.ts\n //\n // Spelled by the DIALECT's own attribute rule, because vue writes `:name=\"expr\"` where jsx and\n // svelte write `name={expr}` — one row of the table, not a second emitter.\n const kind = member.kind ? ` data-bcms-kind=\"${member.kind}\"` : \"\";\n const path = `\\`${arrayPath}[\\${${names.index}}].${member.leaf}\\``;\n source.appendLeft(site.attrInsertAt + shift, ` ${rule.attr!(\"data-bcms-field\", path)}${kind}`);\n bindings.push(shapeOf(arrayPath, member.leaf));\n }\n const args = [ctx.snapshot, JSON.stringify(arrayPath), JSON.stringify(fallbackRows), ...(ctx.slug ? [ctx.slug] : [])];\n const rowsExpr = `${ctx.rows}(${args.join(\", \")})`;\n // Vue repeats an element by an ATTRIBUTE on the row itself; the others wrap it. Applying the\n // attribute here rather than emitting a `<template v-for>` wrapper keeps the diff one a Vue\n // author recognises as their own markup.\n if (rule.loop.kind === \"attr\") {\n /**\n * 🔴 `appendRight`, NOT `appendLeft`. When the row already carries a `:key` as its LAST\n * attribute, the insertion offset IS that attribute's end — and `appendLeft` attaches to the\n * chunk ENDING there, which is the key's own chunk, which the key replacement below then\n * overwrites. The `v-for` went with it: a loop with no loop in it, rendering one row.\n * `appendRight` attaches to the chunk that starts there, which nothing rewrites.\n */\n source.appendRight(template.attrInsertAt + shift, ` ${rule.loop.attr(rowsExpr, names.row, names.index)}`);\n }\n\n /**\n * React wants a key on a list element and warns in every console without one. Astro does not,\n * and svelte/vue key their loops in the loop form itself.\n *\n * 🔴 REPLACED, NOT APPENDED. A row already carrying `key={card.id}` would end up with two, and\n * JSX keeps whichever it likes — so the existing one is overwritten with the loop's index. An\n * existing key whose bytes are not a plain attribute is one this cannot rewrite safely, and the\n * group stays a fixed number of rows rather than shipping a duplicate.\n */\n if (rule.loopKey) {\n const key = rule.loopKey(names.index);\n if (!template.keyAttr) source.appendRight(template.attrInsertAt + shift, ` ${key}`);\n else if (template.keyAttr.end > template.keyAttr.start)\n source.overwrite(template.keyAttr.start + shift, template.keyAttr.end + shift, key);\n else return null;\n }\n\n // A WRAP adds a nesting level, so the row moves in by one; an ATTRIBUTE adds none, and moving\n // the row would leave it indented past the markup around it.\n const indent = indentOf(ctx.content, template.range.start);\n const text =\n rule.loop.kind === \"wrap\"\n ? `${rule.loop.open(rowsExpr, names.row, names.index)}\\n${indented(source.toString(), indent)}\\n${indent}${rule.loop.close}`\n : source.toString();\n\n return {\n range: { start: template.range.start, end: rows[rows.length - 1]!.range.end },\n text,\n bindings: [...new Set(bindings)],\n names,\n };\n}\n\n/**\n * Write one leaf into a fallback row, at the path the helper will READ it from.\n *\n * 🔴 `{ \"cta.label\": \"Learn more\" }` IS NOT `{ cta: { label: \"Learn more\" } }`. The row is read\n * back with `bcms(card, \"cta.label\", \"\")`, which walks the dots — so a flat key spelled with a dot\n * in it resolves to nothing and every row renders an empty string. The structure has to match the\n * grammar the read uses, indices included.\n */\nexport function setLeaf(row: Record<string, unknown>, leaf: string, value: string): boolean {\n const segments = leaf.split(\".\").flatMap((segment) => {\n const name = segment.replace(/\\[\\d+\\]/g, \"\");\n const indices = [...segment.matchAll(/\\[(\\d+)\\]/g)].map((m) => Number(m[1]));\n return [...(name ? [name] : []), ...indices];\n });\n /**\n * 🔴 A LEAF NAME COMES FROM A BRIEF, WHICH COMES FROM SOMEBODY'S SITE. `__proto__.x` walked into\n * `Object.prototype` and wrote there — every object in the process gaining an `x` — and\n * `constructor` or an INHERITED key made `held === undefined` false for a property this row does\n * not own, so the next segment was written onto a shared object instead of the row. Refused by\n * name, and the containers have no prototype to reach in the first place.\n */\n if (segments.some((segment) => typeof segment === \"string\" && FORBIDDEN.has(segment))) return false;\n\n let cursor: Record<string, unknown> | unknown[] = row;\n for (const [at, segment] of segments.entries()) {\n const key = segment as string;\n const last = at === segments.length - 1;\n if (last) {\n (cursor as Record<string, unknown>)[key] = value;\n return true;\n }\n const held = Object.prototype.hasOwnProperty.call(cursor, key)\n ? (cursor as Record<string, unknown>)[key]\n : undefined;\n if (held === undefined || typeof held !== \"object\" || held === null) {\n (cursor as Record<string, unknown>)[key] = typeof segments[at + 1] === \"number\" ? [] : emptyRow();\n }\n cursor = (cursor as Record<string, unknown>)[key] as Record<string, unknown>;\n }\n return true;\n}\n\n/** Names that address the prototype chain rather than a field. */\nconst FORBIDDEN = new Set([\"__proto__\", \"constructor\", \"prototype\"]);\n\n/** A row object with NO prototype, so nothing a leaf name says can reach one. */\nexport const emptyRow = (): Record<string, unknown> => Object.create(null) as Record<string, unknown>;\n\n/** `cards[2].title` under the group `cards` → `{ index: 2, leaf: \"title\" }`. */\nexport function splitIndexed(arrayPath: string, path: string): { index: number; leaf: string } | null {\n const match = path.match(/^(.*)\\[(\\d+)\\]\\.(.+)$/);\n if (!match || match[1] !== arrayPath) return null;\n return { index: Number(match[2]), leaf: match[3]! };\n}\n","/**\n * The names a module already binds, and collision-free names to add beside them.\n *\n * 🔴 A GENERATED IDENTIFIER IS A GUESS ABOUT SOMEONE ELSE'S MODULE. `bcms` is an ordinary word:\n * a site that already has `import { bcms } from \"./lib/bcms\"`, or `const bcmsHome = …`, gets a\n * SECOND declaration of the same name spliced above its own — which is a syntax error in every\n * bundler, on a file that built a moment ago. The codemod's whole promise is that its diff is safe\n * to approve, so the names it introduces are checked against the ones already there.\n *\n * Over-reporting a binding is free (one unnecessary `_1` suffix); missing one breaks a build. The\n * readers below are therefore conservative in that direction on purpose.\n */\nimport type { Dialect } from \"./dialect.js\";\nimport type { Node, ParsedFile } from \"./sites/shared.js\";\n\n/** Only what is read here. @see sites/jsx.ts for the same narrowing, for the same reason. */\ninterface AstNode {\n type: string;\n [key: string]: unknown;\n}\n\n/** Every name a binding PATTERN introduces — `const { a, b: c, ...rest } = x` binds three. */\nfunction patternNames(node: unknown, out: Set<string>): void {\n if (!node || typeof node !== \"object\") return;\n const typed = node as AstNode;\n switch (typed.type) {\n case \"Identifier\":\n out.add(String(typed.name));\n return;\n case \"ObjectPattern\":\n for (const property of (typed.properties as AstNode[]) ?? [])\n patternNames(property.type === \"RestElement\" ? property.argument : property.value, out);\n return;\n case \"ArrayPattern\":\n for (const element of (typed.elements as AstNode[]) ?? []) patternNames(element, out);\n return;\n case \"AssignmentPattern\":\n patternNames(typed.left, out);\n return;\n case \"RestElement\":\n patternNames(typed.argument, out);\n return;\n default:\n return;\n }\n}\n\n/** One top-level statement's own bindings. `export` is unwrapped, not treated as a statement. */\nfunction statementNames(node: unknown, out: Set<string>): void {\n if (!node || typeof node !== \"object\") return;\n const typed = node as AstNode;\n switch (typed.type) {\n case \"ExportNamedDeclaration\":\n case \"ExportDefaultDeclaration\":\n statementNames(typed.declaration, out);\n return;\n case \"ImportDeclaration\":\n for (const specifier of (typed.specifiers as AstNode[]) ?? []) patternNames(specifier.local, out);\n return;\n case \"VariableDeclaration\":\n for (const declarator of (typed.declarations as AstNode[]) ?? []) patternNames(declarator.id, out);\n return;\n case \"FunctionDeclaration\":\n case \"ClassDeclaration\":\n case \"TSTypeAliasDeclaration\":\n case \"TSInterfaceDeclaration\":\n case \"TSEnumDeclaration\":\n case \"TSModuleDeclaration\":\n patternNames(typed.id, out);\n return;\n default:\n return;\n }\n}\n\n/** Declaration keywords, for a script no parser handed us an AST for. Over-reports; that is safe. */\nconst DECLARED = /\\b(?:const|let|var|function|class|interface|type|enum)\\s+([A-Za-z_$][\\w$]*)/g;\nconst IMPORTED = /\\bimport\\s+([^;\\n]*?)\\s+from\\b/g;\n\nfunction scanNames(code: string, out: Set<string>): void {\n for (const match of code.matchAll(DECLARED)) out.add(match[1]!);\n for (const match of code.matchAll(IMPORTED))\n for (const name of match[1]!.match(/[A-Za-z_$][\\w$]*/g) ?? []) {\n if (name !== \"as\" && name !== \"type\") out.add(name);\n }\n}\n\n/** Every `<script>` in a tree, as source. The html dialect's only module-shaped region. */\nfunction scriptText(nodes: Node[], content: string, out: string[]): void {\n for (const node of nodes) {\n if (node.type !== \"element\") continue;\n if (node.raw && node.tag === \"script\" && node.inner) out.push(content.slice(node.inner.start, node.inner.end));\n scriptText(node.children, content, out);\n }\n}\n\n/**\n * The top-level names one file already binds.\n *\n * jsx reads its babel program; astro reads the frontmatter's, which is the same parser over the\n * same grammar; html has no module, so its `<script>` blocks are scanned. A dialect with neither\n * reports nothing, which only costs an alias that was not needed.\n */\nexport function topLevelBindings(dialect: Dialect, parsed: ParsedFile, content: string): Set<string> {\n const out = new Set<string>();\n const program = (parsed.ast as AstNode | undefined)?.program as AstNode | undefined;\n if (program) for (const statement of (program.body as unknown[]) ?? []) statementNames(statement, out);\n else if (parsed.script) scanNames(parsed.script.code, out);\n if (dialect === \"html\") {\n const scripts: string[] = [];\n scriptText(parsed.roots, content, scripts);\n for (const code of scripts) scanNames(code, out);\n }\n return out;\n}\n\n/** One identifier this codemod needs: what it is FOR, and what it would like to be called. */\nexport interface WantedName {\n /** The distinct thing needing a name — a page slug, or the helper's own export name. */\n key: string;\n /** The identifier that thing would produce, before any collision is resolved. */\n name: string;\n}\n\n/**\n * Names for the identifiers this codemod introduces, in a module that may already use them.\n *\n * 🔴 KEYED BY WHAT NEEDS THE NAME, NOT BY THE NAME. `identifierFor` is lossy — the slugs `blog-2`\n * and `blog_2` both spell `bcmsBlog2` — so keying the result by the identifier gave two DIFFERENT\n * pages one binding: the second import overwrote the first, and one of the two routes silently\n * read the other's content. Distinct keys get distinct suffixes; a key asked for twice gets the\n * same answer, because it is the same thing.\n *\n * Deterministic, and in the order asked for: the same file converted twice produces the same\n * names, so the diff is stable and the plan digest is a property of the input rather than of the\n * iteration order of a set.\n */\nexport function allocateNames(taken: Set<string>, wanted: WantedName[]): Map<string, string> {\n const used = new Set(taken);\n const out = new Map<string, string>();\n for (const { key, name } of wanted) {\n if (out.has(key)) continue;\n let candidate = name;\n for (let n = 1; used.has(candidate); n++) candidate = `${name}_${n}`;\n used.add(candidate);\n out.set(key, candidate);\n }\n return out;\n}\n","/**\n * The ONE matcher, and the neutral tree every dialect parser normalises into.\n *\n * Three parsers disagree about everything except the two facts this package needs: where an\n * element's bytes are, and what text it renders. Normalising to that pair keeps \"which element\n * holds this sentence\" written once — the alternative is the same subtle traversal in five files,\n * where a rule fixed in one of them stays broken in the other four.\n */\n\nimport { decodeEntities } from \"../text.js\";\n\nexport interface Range {\n start: number;\n end: number;\n}\n\nexport interface AttrNode {\n name: string;\n /** The literal value, or \"\" for an expression / valueless attribute. */\n value: string;\n /** The value's own characters, quotes excluded. Null when there is nothing to replace. */\n valueRange: Range | null;\n /** `alt={x}` rather than `alt=\"x\"` — never rewritten, never matched. */\n expression: boolean;\n /** The whole `name=\"value\"` span, so an attribute can be replaced outright. */\n range: Range;\n}\n\nexport type Node =\n | {\n type: \"element\";\n tag: string;\n /** The `<` of the open tag. */\n start: number;\n /** Where an attribute may be inserted: after the last attribute, before `/` and `>`. */\n attrInsertAt: number;\n /** Everything between the tags. Null for void and self-closing elements. */\n inner: Range | null;\n attrs: AttrNode[];\n children: Node[];\n /** `<script>` / `<style>`: the children are code, not copy. */\n raw: boolean;\n }\n | { type: \"text\"; range: Range; value: string }\n | { type: \"comment\"; range: Range; value: string }\n /**\n * An expression the codemod does not read — but which may CONTAIN markup it has to see.\n *\n * `children` is populated with the elements nested inside (a `.map(…)` body, a ternary's\n * branches) and is deliberately invisible to `collectSites`: the copy inside an expression is a\n * program's, and matching it would bind a value to a branch that may not render. What does read\n * it is the DECLARATION walk, because a loop this package itself wrote lives here, and a second\n * run that could not see it would convert the same file twice.\n */\n | { type: \"expr\"; range: Range; value: string; children: Node[] };\n\nexport type SiteWhere = \"text\" | \"attr\" | \"prop\" | \"expr\" | \"script\" | \"comment\" | \"data\";\n\nexport interface Site {\n /** Filled in by the caller; `findSites` is given one file's bytes and does not know its name. */\n file: string;\n tag: string;\n attrInsertAt: number;\n /** The bytes this site's value occupies — a text node, an inner range, or an attribute value. */\n range: Range;\n /** The element's inner range, for the kinds that replace a whole subtree (richtext). */\n inner: Range | null;\n where: SiteWhere;\n scope: \"page\";\n attr?: string;\n /** The whole `name=\"value\"` span, so an attribute can be rewritten as an expression. */\n attrRange?: Range;\n existingAttrs: Record<string, string>;\n /** The element renders something besides this literal — an icon, a nested element. */\n mixed: boolean;\n /** The one non-blank direct text child, when there is exactly one. The wrap target. */\n textRange: Range | null;\n /** The whitespace-flattened literal this site matched. */\n literal: string;\n /** The literal is only PART of what this element renders; rewriting it would eat the rest. */\n partial: boolean;\n /** Tag chain from the document root down to the element's parent, outermost first. */\n ancestors: string[];\n /** Index among the element's ELEMENT siblings. */\n siblingIndex: number;\n /**\n * Reserved for `emitRepeater`: the sibling group this element belongs to. Set by nothing today —\n * the group comes from the brief's locator, which is the derive lane's answer. @see loops.ts\n */\n repeat?: { groupId: string; index: number; siblingRanges: Range[] };\n /**\n * The `bcmsBindings={{ … }}` already on this element, when there is one.\n *\n * A second prop drilled into the same component must MERGE into that object rather than write a\n * second attribute of the same name, which JSX takes the last of and Astro the first.\n */\n bindingsAttr?: Range;\n}\n\n/** A parser that refused. Never thrown across the package boundary — it selects the next tier. */\nexport interface ParserError {\n code: \"PARSE_ERROR\" | \"DIALECT_UNSUPPORTED\";\n message: string;\n}\n\n/**\n * Where the helper's `import` goes, answered by the parser that already read the file.\n *\n * The rule differs per dialect (frontmatter top, after the last import, `<script>` top) and every\n * version of it needs a position only a parse knows. Returning it with the sites keeps one parse\n * per file, which is also what keeps the offsets in one coordinate system.\n */\nexport interface ImportPoint {\n at: number;\n /**\n * The file has no block to put an import IN, so the caller opens one around the import lines.\n *\n * Astro wants a frontmatter fence, Svelte and Vue want a `<script>`. One field rather than one\n * boolean per dialect: the parser knows what its own language opens with, and `rewrite.ts` only\n * has to splice what it is given.\n */\n wrap?: { before: string; after: string };\n}\n\nexport interface FindSitesResult {\n sites: Site[];\n error?: ParserError;\n importAt?: ImportPoint;\n}\n\n/**\n * ONE PARSE PER FILE, handed to everything that needs it.\n *\n * The matcher wants the neutral tree; prop drilling wants the module's own AST; the alias\n * allocator wants its top-level bindings. Parsing three times would be three coordinate systems\n * for one file, which is how a splice lands in the middle of a tag.\n */\nexport interface ParsedFile {\n roots: Node[];\n error?: ParserError;\n importAt?: ImportPoint;\n /** The dialect's own AST, when it has one worth keeping (jsx: babel; astro: the frontmatter). */\n ast?: unknown;\n /** The file's TypeScript/JavaScript region, for the dialects that separate it from the markup. */\n script?: { code: string; offset: number };\n}\n\n/**\n * Is this tag an element the BROWSER renders, rather than a component the framework expands?\n *\n * The convention is the framework's own and it is the whole rule in JSX and Astro alike: a\n * capitalised tag is a component reference, a lowercase one is an intrinsic element. It matters\n * because an attribute put on a component is a PROP — React and Astro pass unknown props nowhere,\n * so `data-bcms-field` on `<Card>` reaches no DOM node and binds nothing, and\n * `dangerouslySetInnerHTML` on it deletes the children while doing nothing at all.\n */\nexport const isIntrinsic = (tag: string): boolean =>\n tag !== \"\" && !tag.includes(\".\") && tag[0] === tag[0]!.toLowerCase();\n\n/**\n * Where an image URL legitimately lives, by (tag, attribute).\n *\n * An `href` that ends in `.png` is a LINK to a file, not an image source: binding the image field\n * to the anchor makes a publish rewrite the link's target with whatever the editor uploads, and\n * the actual `<img>` on the page never moves. A table, so a sixth position is a row.\n */\nexport const IMAGE_SOURCES: Record<string, string[]> = {\n img: [\"src\", \"srcset\"],\n source: [\"src\", \"srcset\"],\n video: [\"poster\"],\n};\n\n/** Does this site hold an image's source, rather than a string that happens to look like one? */\nexport const isImageSource = (site: Site): boolean =>\n site.where === \"attr\" && (IMAGE_SOURCES[site.tag.toLowerCase()] ?? []).includes(site.attr ?? \"\");\n\n/**\n * NFC on both sides, entities decoded, whitespace collapsed. No case folding — copy is\n * case-sensitive. The same normalisation `locate`'s prefilter applies, so a file it opened for a\n * literal is a file this matcher can still see that literal in. @see ../text.ts\n */\nexport const norm = (value: string): string =>\n decodeEntities(value.normalize(\"NFC\")).replace(/\\s+/g, \" \").trim();\n\n/** Attributes the codemod writes. An element already carrying one is already declared. */\nexport const BCMS_ATTRS = [\"data-bcms-field\", \"data-bcms-kind\", \"data-bcms-props\", \"data-bcms-layout-field\"];\n\n/**\n * Where an attribute may be inserted, FROM THE PARSER — after the last attribute it located, or\n * after the tag name when there are none.\n *\n * 🔴 NOT SCANNED. Scanning for the tag's `>` has to model the grammar it is scanning: a `\"` inside\n * `title=\"He said \\\"go\\\"\"` closes nothing in JSX, but a scanner that treats every quote as a\n * terminator runs to the end of the file and appends the attribute after the component. Every one\n * of the three parsers already reports where each attribute ends and where the element starts, so\n * the position is READ rather than re-derived. `openTagEnd` survives for tier 2 only, which has no\n * parse by definition.\n */\nexport const attrInsertAfter = (attrs: AttrNode[], start: number, tag: string): number =>\n attrs.length > 0 ? Math.max(...attrs.map((a) => a.range.end)) : start + 1 + tag.length;\n\n/**\n * Where an attribute may be inserted in the open tag that starts at `start` — TIER 2 ONLY.\n *\n * A regex tier has no attribute offsets to read, so this scans for the `>`, tracking quotes and\n * braces so a `>` inside `alt=\">\"` or `class={a > b}` does not end the tag. It is deliberately not\n * used by any parsed dialect: @see `attrInsertAfter` for why a scanner is the wrong instrument\n * once a parse exists.\n */\nexport function openTagEnd(content: string, start: number): number {\n let quote: string | null = null;\n let depth = 0;\n for (let i = start + 1; i < content.length; i++) {\n const ch = content[i]!;\n if (quote) {\n if (ch === quote) quote = null;\n continue;\n }\n if (ch === '\"' || ch === \"'\" || ch === \"`\") quote = ch;\n else if (ch === \"{\") depth++;\n else if (ch === \"}\") depth = Math.max(0, depth - 1);\n else if (ch === \">\" && depth === 0) {\n let at = i;\n // Insert BEFORE a self-closing slash and the whitespace in front of it, so `<img src=\"x\" />`\n // becomes `<img src=\"x\" data-bcms-field=\"…\" />` and not `<img src=\"x\" /data-bcms-field…`.\n while (at > start && /[\\s/]/.test(content[at - 1]!)) at--;\n return at;\n }\n }\n return content.length;\n}\n\nconst isBlank = (value: string): boolean => value.trim() === \"\";\n\n/** Every text a reader sees under this node — `<script>` and comments excluded. */\nfunction renderedText(node: Node): string {\n if (node.type === \"text\") return node.value;\n if (node.type === \"element\") return node.raw ? \"\" : node.children.map(renderedText).join(\"\");\n return \"\";\n}\n\nconst attrsOf = (node: Extract<Node, { type: \"element\" }>): Record<string, string> =>\n Object.fromEntries(node.attrs.map((a) => [a.name, a.value]));\n\n/** The single non-blank direct text child, when there is exactly one. Otherwise nothing to wrap. */\nfunction soleTextChild(node: Extract<Node, { type: \"element\" }>): Range | null {\n const texts = node.children.filter((c) => c.type === \"text\" && !isBlank(c.value));\n return texts.length === 1 ? (texts[0] as Extract<Node, { type: \"text\" }>).range : null;\n}\n\ninterface Walk {\n ancestors: string[];\n siblingIndex: number;\n}\n\n/**\n * Every place one of `literals` is rendered, deepest element wins.\n *\n * DEEPEST, because `<div><h1>Hello</h1></div>` renders \"Hello\" at two nesting levels and only one\n * of them is the element that holds the value — binding the wrapper would make a publish rewrite\n * the whole card. A literal that no element renders EXACTLY is looked for again as a fragment, and\n * that site is marked `partial` so the caller can refuse it by name (`SUBSTRING_ONLY`) instead of\n * splicing over half a sentence.\n */\nexport function collectSites(roots: Node[], literals: string[]): Site[] {\n const wanted = new Set(literals.map(norm));\n const sites: Site[] = [];\n\n /** A site with no element behind it — a comment, or a string in a script. */\n const bare = (literal: string, where: SiteWhere, range: Range, walk: Walk): Site => ({\n file: \"\",\n tag: \"\",\n attrInsertAt: range.start,\n range,\n inner: null,\n where,\n scope: \"page\",\n existingAttrs: {},\n mixed: false,\n textRange: null,\n literal,\n partial: false,\n ancestors: walk.ancestors,\n siblingIndex: walk.siblingIndex,\n });\n\n const visit = (node: Node, walk: Walk): Set<string> => {\n const matched = new Set<string>();\n if (node.type === \"comment\") {\n for (const literal of wanted) {\n if (norm(node.value).includes(literal)) {\n sites.push(bare(literal, \"comment\", node.range, walk));\n }\n }\n return matched;\n }\n if (node.type !== \"element\") return matched;\n\n const attrs = attrsOf(node);\n let index = 0;\n for (const child of node.children) {\n const childWalk = { ancestors: [...walk.ancestors, node.tag], siblingIndex: index };\n if (child.type === \"element\") index++;\n for (const hit of visit(child, childWalk)) matched.add(hit);\n }\n\n if (node.raw) {\n // Code, not copy. Recorded so a literal that lives ONLY here can be reported by name, and\n // never rewritten: a string in a script is a program's, not a page's.\n const text = norm(renderedTextRaw(node));\n for (const literal of wanted) {\n if (text.includes(literal)) sites.push(bare(literal, \"script\", { start: node.start, end: node.start }, walk));\n }\n return matched;\n }\n\n const text = norm(renderedText(node));\n for (const literal of wanted) {\n if (matched.has(literal) || text !== literal) continue;\n matched.add(literal);\n sites.push({\n file: \"\",\n tag: node.tag,\n attrInsertAt: node.attrInsertAt,\n range: node.inner ?? { start: node.attrInsertAt, end: node.attrInsertAt },\n inner: node.inner,\n where: \"text\",\n scope: \"page\",\n existingAttrs: attrs,\n mixed: node.children.some((c) => c.type !== \"text\"),\n textRange: soleTextChild(node),\n literal,\n partial: false,\n ancestors: walk.ancestors,\n siblingIndex: walk.siblingIndex,\n });\n }\n\n const bindingsAttr = node.attrs.find((a) => a.name === \"bcmsBindings\")?.range;\n for (const attr of node.attrs) {\n if (attr.expression || !attr.valueRange || BCMS_ATTRS.includes(attr.name)) continue;\n const value = norm(attr.value);\n for (const literal of wanted) {\n if (value !== literal) continue;\n matched.add(literal);\n sites.push({\n file: \"\",\n tag: node.tag,\n attrInsertAt: node.attrInsertAt,\n range: attr.valueRange,\n inner: node.inner,\n // 🔴 A COMPONENT'S ATTRIBUTE IS A PROP, and a prop is a different conversion: the value\n // is rendered in another file, by an element only that file knows. @see props.ts\n where: isIntrinsic(node.tag) ? \"attr\" : \"prop\",\n ...(bindingsAttr ? { bindingsAttr } : {}),\n scope: \"page\",\n attr: attr.name,\n attrRange: attr.range,\n existingAttrs: attrs,\n mixed: false,\n textRange: null,\n literal,\n partial: false,\n ancestors: walk.ancestors,\n siblingIndex: walk.siblingIndex,\n });\n }\n }\n return matched;\n };\n\n for (const [i, root] of roots.entries()) visit(root, { ancestors: [], siblingIndex: i });\n\n // Second pass, only for literals nothing rendered exactly: the deepest element that renders\n // them as a FRAGMENT, reported as `partial` so `SUBSTRING_ONLY` can name it.\n const exact = new Set(sites.filter((s) => s.where === \"text\").map((s) => s.literal));\n const missing = [...wanted].filter((l) => !exact.has(l));\n if (missing.length > 0) for (const root of roots) partials(root, missing, { ancestors: [], siblingIndex: 0 }, sites);\n\n return sites;\n}\n\n/** A raw element's own text — `renderedText` deliberately reports none. */\nfunction renderedTextRaw(node: Extract<Node, { type: \"element\" }>): string {\n return node.children.map((c) => (c.type === \"text\" ? c.value : \"\")).join(\"\");\n}\n\n/** The deepest element whose rendered text CONTAINS a literal, on a word boundary. */\nfunction partials(node: Node, literals: string[], walk: Walk, out: Site[]): boolean {\n if (node.type !== \"element\" || node.raw) return false;\n let deeper = false;\n let index = 0;\n for (const child of node.children) {\n const childWalk = { ancestors: [...walk.ancestors, node.tag], siblingIndex: index };\n if (child.type === \"element\") index++;\n if (partials(child, literals, childWalk, out)) deeper = true;\n }\n if (deeper) return true;\n\n const text = norm(renderedText(node));\n let hit = false;\n for (const literal of literals) {\n if (!wordBounded(text, literal)) continue;\n hit = true;\n out.push({\n file: \"\",\n tag: node.tag,\n attrInsertAt: node.attrInsertAt,\n range: node.inner ?? { start: node.attrInsertAt, end: node.attrInsertAt },\n inner: node.inner,\n where: \"text\",\n scope: \"page\",\n existingAttrs: attrsOf(node),\n mixed: node.children.some((c) => c.type !== \"text\"),\n textRange: soleTextChild(node),\n literal,\n partial: true,\n ancestors: walk.ancestors,\n siblingIndex: walk.siblingIndex,\n });\n }\n return hit;\n}\n\n/**\n * Does `haystack` contain `needle` as a whole word?\n *\n * \"Go\" inside \"Google\" is not the copy anyone meant, and a binding placed there rewrites a word\n * in the middle of a sentence on the next publish.\n */\nexport function wordBounded(haystack: string, needle: string): boolean {\n let at = haystack.indexOf(needle);\n while (at >= 0) {\n const before = at === 0 ? \"\" : haystack[at - 1]!;\n const after = haystack[at + needle.length] ?? \"\";\n if (!/[\\p{L}\\p{N}]/u.test(before) && !/[\\p{L}\\p{N}]/u.test(after)) return true;\n at = haystack.indexOf(needle, at + 1);\n }\n return false;\n}\n","/**\n * `.jsx` / `.tsx` — `@babel/parser` with the jsx and typescript plugins.\n *\n * Only the JSX is normalised. Everything else in the module is JavaScript the codemod has no\n * business rewriting; it reads exactly one more thing from the program — where the last import\n * ends — because that is where the helper's import has to go for a bundler to hoist it with the\n * others rather than after code that already ran.\n */\nimport { parse as parseModule } from \"@babel/parser\";\nimport {\n attrInsertAfter,\n type AttrNode,\n type ParsedFile,\n type Node,\n} from \"./shared.js\";\n\n/** Only what is read here, so this file does not depend on @babel/types' full node union. */\ninterface JsxNode {\n type: string;\n start?: number | null;\n end?: number | null;\n [key: string]: unknown;\n}\n\nconst nameOf = (node: JsxNode | undefined): string => {\n if (!node) return \"\";\n if (node.type === \"JSXIdentifier\") return String(node.name);\n if (node.type === \"JSXMemberExpression\")\n return `${nameOf(node.object as JsxNode)}.${nameOf(node.property as JsxNode)}`;\n if (node.type === \"JSXNamespacedName\")\n return `${nameOf(node.namespace as JsxNode)}:${nameOf(node.name as JsxNode)}`;\n return \"\";\n};\n\n/** The name a SPREAD attribute is recorded under. Not a legal attribute, so nothing collides. */\nexport const SPREAD = \"{...}\";\n\nfunction attrsOf(open: JsxNode, content: string): AttrNode[] {\n return ((open.attributes as JsxNode[]) ?? []).flatMap((attr): AttrNode[] => {\n /**\n * `<Child {...props} />` — nothing NAMED to match, and everything to do with prop drilling.\n *\n * A spread is how most components forward what they were given, so discarding it made the\n * chain end at the first one: the drill reported `PROP_TARGET_NOT_FOUND` for a component that\n * plainly renders the value. Kept as an expression attribute, which the matcher ignores by\n * construction and `findPropTargets` reads. @see props.ts\n */\n if (attr.type === \"JSXSpreadAttribute\") {\n const argument = attr.argument as JsxNode | undefined;\n return [\n {\n name: SPREAD,\n value: content.slice(argument?.start ?? 0, argument?.end ?? 0),\n valueRange: null,\n expression: true,\n range: { start: attr.start ?? 0, end: attr.end ?? 0 },\n },\n ];\n }\n if (attr.type !== \"JSXAttribute\") return [];\n const value = attr.value as JsxNode | null | undefined;\n const range = { start: attr.start ?? 0, end: attr.end ?? 0 };\n const literal = value?.type === \"StringLiteral\";\n return [\n {\n name: nameOf(attr.name as JsxNode),\n value: literal ? String(value!.value) : \"\",\n // The quotes are one character each on a StringLiteral; babel's range covers them.\n valueRange: literal ? { start: (value!.start ?? 0) + 1, end: (value!.end ?? 0) - 1 } : null,\n expression: !literal,\n range,\n },\n ];\n });\n}\n\n/** The OUTERMOST JSX elements inside an expression. Their own children are `convert`'s job. */\nfunction nestedJsx(node: unknown, out: JsxNode[] = [], seen = new Set<unknown>()): JsxNode[] {\n if (!node || typeof node !== \"object\" || seen.has(node)) return out;\n seen.add(node);\n if (Array.isArray(node)) {\n for (const child of node) nestedJsx(child, out, seen);\n return out;\n }\n const typed = node as JsxNode;\n if (typeof typed.type !== \"string\") return out;\n if (typed.type === \"JSXElement\" || typed.type === \"JSXFragment\") {\n out.push(typed);\n return out;\n }\n for (const key of Object.keys(typed)) {\n if (key === \"loc\" || key === \"leadingComments\" || key === \"trailingComments\") continue;\n nestedJsx(typed[key], out, seen);\n }\n return out;\n}\n\nfunction convert(node: JsxNode, content: string): Node | null {\n if (node.type === \"JSXText\") {\n return {\n type: \"text\",\n range: { start: node.start ?? 0, end: node.end ?? 0 },\n value: String(node.value ?? \"\"),\n };\n }\n if (node.type === \"JSXExpressionContainer\") {\n const expression = node.expression as JsxNode;\n // `{\"a string child\"}` is text a reader sees, not an expression the codemod must leave alone.\n if (expression?.type === \"StringLiteral\") {\n return {\n type: \"text\",\n range: { start: (expression.start ?? 0) + 1, end: (expression.end ?? 0) - 1 },\n value: String(expression.value),\n };\n }\n return {\n type: \"expr\",\n range: { start: node.start ?? 0, end: node.end ?? 0 },\n value: content.slice(node.start ?? 0, node.end ?? 0),\n children: nestedJsx(expression).flatMap((child) => {\n const converted = convert(child, content);\n return converted ? [converted] : [];\n }),\n };\n }\n if (node.type === \"JSXFragment\" || node.type === \"JSXElement\") {\n const open = (node.openingElement ?? null) as JsxNode | null;\n const close = (node.closingElement ?? null) as JsxNode | null;\n const start = node.start ?? 0;\n const tag = node.type === \"JSXFragment\" ? \"\" : nameOf(open?.name as JsxNode);\n const attrs = open ? attrsOf(open, content) : [];\n const children = ((node.children as JsxNode[]) ?? []).flatMap((child) => {\n const converted = convert(child, content);\n return converted ? [converted] : [];\n });\n return {\n type: \"element\",\n tag,\n start,\n // Babel's own offsets: the last attribute's `end`, or the end of the element's NAME. Both\n // come out of the parse, so an escaped quote inside an attribute cannot move them.\n attrInsertAt:\n node.type === \"JSXFragment\"\n ? start + 1\n : attrInsertAfter(attrs, open?.start ?? start, tag),\n inner: close ? { start: (open?.end ?? start) as number, end: close.start ?? 0 } : null,\n attrs,\n children,\n raw: false,\n };\n }\n return null;\n}\n\n/** Every JSX root in the module, in source order, plus where the last import ends. */\nfunction walkProgram(ast: unknown): { roots: JsxNode[]; importAt: number } {\n const roots: JsxNode[] = [];\n let importAt = 0;\n const seen = new Set<unknown>();\n\n const walk = (node: unknown): void => {\n if (!node || typeof node !== \"object\" || seen.has(node)) return;\n seen.add(node);\n if (Array.isArray(node)) {\n for (const child of node) walk(child);\n return;\n }\n const typed = node as JsxNode;\n if (typeof typed.type !== \"string\") return;\n if (typed.type === \"ImportDeclaration\") importAt = Math.max(importAt, typed.end ?? 0);\n // A module with no imports still has a floor: `\"use client\"` must stay the first statement,\n // so the import goes after the directive prologue and not at byte zero.\n if (typed.type === \"Program\")\n for (const directive of (typed.directives as JsxNode[]) ?? [])\n importAt = Math.max(importAt, directive.end ?? 0);\n if (typed.type === \"JSXElement\" || typed.type === \"JSXFragment\") {\n roots.push(typed); // its children are walked by `convert`, not here\n return;\n }\n for (const key of Object.keys(typed)) {\n if (key === \"loc\" || key === \"leadingComments\" || key === \"trailingComments\") continue;\n walk(typed[key]);\n }\n };\n\n walk(ast);\n return { roots, importAt };\n}\n\n/** The module's AST, for the callers that need more than the markup (props, page signatures). */\nexport function parseProgram(content: string): unknown {\n return parseModule(content, {\n sourceType: \"module\",\n allowReturnOutsideFunction: true,\n plugins: [\"jsx\", \"typescript\"],\n });\n}\n\nexport function parse(content: string): ParsedFile {\n let ast: unknown;\n try {\n ast = parseProgram(content);\n } catch (error) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: (error as Error).message } };\n }\n const { roots, importAt } = walkProgram(ast);\n const nodes = roots.flatMap((root) => {\n const converted = convert(root, content);\n return converted ? [converted] : [];\n });\n // After the LAST import, never before the first: a `\"use client\"` directive has to stay the\n // first statement in the file, and an import spliced above it silently disables the directive.\n return { roots: nodes, importAt: { at: importAt }, ast };\n}\n","/**\n * A literal that reaches the page as a PROP — `<Hero title=\"Ship your site today\" />` — and the\n * element inside the component that actually renders it.\n *\n * 🔴 THE ATTRIBUTE ON `<Hero>` IS NOT A BINDING. React and Astro pass unknown props nowhere, so a\n * `data-bcms-field` written there reaches no DOM node: every release reports the path unmatched,\n * and the value the editor changes never appears. The declaration has to go on the `<h1>` inside\n * `Hero`, which is in a different file — so the conversion is TWO HOPS, and it is one proposal\n * because half of it is worse than neither half.\n *\n * WHAT THE SECOND HOP WRITES, and why an expression is unavoidable here. The component renders\n * every call site, and different call sites carry different paths, so the element cannot declare a\n * literal one: it declares `data-bcms-field={bcmsBindings?.title}`, and the LITERAL lives at each\n * call site in `bcmsBindings={{ title: \"hero.title\" }}`. That is the one shape this package emits\n * that a reader cannot verify by looking at the element alone — which is exactly why\n * `proposeConversion` re-derives it from its OWN scan of every call site and never from the\n * receipt.\n *\n * A MISS IS A REFUSAL, NOT A GUESS. If the component cannot be resolved, or nothing in it renders\n * the prop, hop 1 still makes the value come from the CMS (the page is no worse off) but the\n * bindings prop is DROPPED and the path is reported `PROP_TARGET_NOT_FOUND` — a declaration whose\n * other half does not exist is a binding that reads as done and is not.\n */\nimport type { Dialect } from \"./dialect.js\";\nimport { parseProgram } from \"./sites/jsx.js\";\nimport { SPREAD } from \"./sites/jsx.js\";\nimport { isIntrinsic, type Node, type ParsedFile, type Range } from \"./sites/shared.js\";\n\n/** How deep a prop may be drilled before this stops following it. @see PROP_DRILLED_DEEP */\nexport const MAX_HOPS = 4;\n\n/** The narrowed AST shape. @see sites/jsx.ts for the same narrowing, for the same reason. */\nexport interface AstNode {\n type: string;\n start?: number | null;\n end?: number | null;\n [key: string]: unknown;\n}\n\n/** An element inside the component that renders the prop, and where its declaration goes. */\nexport interface PropTarget {\n attrInsertAt: number;\n inner: Range | null;\n tag: string;\n}\n\n/** A call site inside the component that passes the prop ON to another component. */\nexport interface PropForward {\n component: string;\n /** The name the prop arrives under in the callee. */\n prop: string;\n attrInsertAt: number;\n /** It already forwards `bcmsBindings`, so nothing needs adding at this call site. */\n forwards: boolean;\n}\n\nexport interface PropTargets {\n targets: PropTarget[];\n forwards: PropForward[];\n /**\n * Where `bcmsBindings` has to be added to the component's own props destructuring.\n *\n * Null when the component takes its props as one object (`props.title`), because\n * `props.bcmsBindings` needs no declaration — and null when it takes NO props at all, which is\n * a component that cannot receive the bindings and therefore is not a target.\n */\n receive: number | null;\n /** The component reads `props.x`, so the emitted expression is `props.bcmsBindings?.…`. */\n viaProps: boolean;\n /** Where `bcmsBindings?: Record<string, string>` goes, and the exact text to insert. */\n propsType: { at: number; text: string } | null;\n /** No parameter to receive props through at all. */\n receivable: boolean;\n}\n\n/** Walk every node of an AST once. */\nexport function walkAst(node: unknown, visit: (node: AstNode) => void, seen = new Set<unknown>()): void {\n if (!node || typeof node !== \"object\" || seen.has(node)) return;\n seen.add(node);\n if (Array.isArray(node)) {\n for (const child of node) walkAst(child, visit, seen);\n return;\n }\n const typed = node as AstNode;\n if (typeof typed.type !== \"string\") return;\n visit(typed);\n for (const key of Object.keys(typed)) {\n if (key === \"loc\" || key === \"leadingComments\" || key === \"trailingComments\") continue;\n walkAst(typed[key], visit, seen);\n }\n}\n\nconst FUNCTIONS = new Set([\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"]);\n\n/**\n * The function behind ONE export of a module.\n *\n * 🔴 A MODULE IS NOT A COMPONENT. `Hero.tsx` legitimately exports `Hero`, a `HeroSkeleton` and a\n * `useHero`, and scanning every function in it for a `title` prop answers with whichever one\n * happened to have a parameter of that name — a declaration written into a component the call\n * site does not render. The import said which export it wants; that is the one analysed.\n */\nexport function exportedFunction(ast: unknown, imported: string | null): AstNode | null {\n let found: AstNode | null = null;\n const fromDeclaration = (declaration: AstNode | undefined, name: string | null): AstNode | null => {\n if (!declaration) return null;\n if (FUNCTIONS.has(declaration.type)) {\n const own = (declaration.id as AstNode | undefined)?.name;\n return name === null || own === undefined || own === name ? declaration : null;\n }\n if (declaration.type === \"VariableDeclaration\") {\n for (const declarator of (declaration.declarations as AstNode[]) ?? []) {\n const id = (declarator.id as AstNode | undefined)?.name;\n const init = declarator.init as AstNode | undefined;\n if (init && FUNCTIONS.has(init.type) && (name === null || id === name)) return init;\n }\n }\n return null;\n };\n\n walkAst(ast, (node) => {\n if (found) return;\n if (imported === null && node.type === \"ExportDefaultDeclaration\") {\n const declaration = node.declaration as AstNode | undefined;\n // `export default Hero` names a function declared elsewhere in the module.\n if (declaration?.type === \"Identifier\") {\n found = localFunction(ast, String(declaration.name));\n return;\n }\n found = fromDeclaration(declaration, null);\n return;\n }\n if (imported !== null && node.type === \"ExportNamedDeclaration\") {\n found = fromDeclaration(node.declaration as AstNode | undefined, imported);\n }\n });\n\n /**\n * `export { Hero }` and `export default Hero` — the export names a BINDING, not a function.\n *\n * Both are ordinary ways to write a component, and neither carries the function on the export\n * statement: `const Hero = () => …` sits above it. Resolving the name to its declaration is the\n * whole of it, and without it the drill found nothing and reported `PROP_TARGET_NOT_FOUND` for\n * a component plainly rendering the value.\n */\n if (!found && imported !== null) {\n walkAst(ast, (node) => {\n if (found || node.type !== \"ExportNamedDeclaration\" || node.declaration) return;\n const specifier = ((node.specifiers as AstNode[]) ?? []).find(\n (entry) => ((entry.exported as AstNode | undefined)?.name ?? \"\") === imported,\n );\n // 🔴 THE LOCAL NAME, NOT THE EXPORTED ONE. `export { Hero as Banner }` is imported as\n // `Banner` and declared as `Hero`; looking up `Banner` in this module finds nothing, and the\n // drill reported `PROP_TARGET_NOT_FOUND` for a component sitting right there.\n const local = (specifier?.local as AstNode | undefined)?.name;\n if (specifier) found = localFunction(ast, String(local ?? imported));\n });\n }\n return found ?? (imported === null ? null : localFunction(ast, imported));\n}\n\n/** A top-level `function Name(){}` or `const Name = () => {}`, by name. */\nfunction localFunction(ast: unknown, name: string): AstNode | null {\n let found: AstNode | null = null;\n walkAst(ast, (node) => {\n if (found) return;\n if (FUNCTIONS.has(node.type) && (node.id as AstNode | undefined)?.name === name) found = node;\n if (node.type === \"VariableDeclarator\" && (node.id as AstNode | undefined)?.name === name) {\n const init = node.init as AstNode | undefined;\n if (init && FUNCTIONS.has(init.type)) found = init;\n }\n });\n return found;\n}\n\n/**\n * The `}` that closes a destructuring pattern, so `, bcmsBindings` lands INSIDE it.\n *\n * 🔴 NOT `pattern.end - 1`. Babel's `end` for `{ title }: HeroProps` covers the type annotation\n * too, and inserting one character before it produced `{ title }: HeroProp, bcmsBindingss` — a\n * component that no longer compiles, in a diff that reads almost right. The brace is found by\n * scanning back from the pattern's own end for the last `}`.\n */\nfunction patternClose(content: string, pattern: AstNode, offset: number): number | null {\n const annotation = pattern.typeAnnotation as AstNode | undefined;\n const boundary = (annotation?.start ?? pattern.end ?? 0) + offset;\n let at = content.lastIndexOf(\"}\", boundary);\n if (at < 0) return null;\n // Back over the space the author put before the brace, so the result reads `{ title, x }`.\n while (at > 0 && /\\s/.test(content[at - 1]!)) at--;\n return at;\n}\n\n/** What the component calls this prop locally, and how it would receive one more. */\ninterface Reception {\n names: Set<string>;\n receive: number | null;\n viaProps: boolean;\n typeName: string | null;\n receivable: boolean;\n /** An inline `{ title: string }` annotation, which has no name to look up. */\n inline: AstNode | null;\n /** The props OBJECT's own name (`props`), when the component takes one. */\n receiver: string | null;\n /** The `...rest` binding, when the destructuring has one. A spread of it forwards the prop. */\n rest: string | null;\n /** It already destructures `bcmsBindings`, so a second one would be a duplicate binding. */\n hasBindings: boolean;\n /** The prop was named explicitly in the pattern, so a `...rest` no longer contains it. */\n destructured: boolean;\n}\n\n/**\n * How this module takes `propName` in: destructured (possibly renamed), or off a props object.\n *\n * Every function in the file is considered rather than \"the component\", because which function is\n * the component is a guess — the one that destructures the prop we are looking for is the one that\n * matters, and a file where two do is a file this refuses by finding two receptions and no single\n * answer for where the value is rendered.\n */\nfunction receptionIn(component: AstNode | null, propName: string, offset: number, content: string): Reception {\n const names = new Set<string>();\n let receive: number | null = null;\n let viaProps = false;\n let typeName: string | null = null;\n let receivable = false;\n let inline: AstNode | null = null;\n let receiver: string | null = null;\n let rest: string | null = null;\n let hasBindings = false;\n let destructured = false;\n\n for (const node of component ? [component] : []) {\n const params = (node.params as AstNode[]) ?? [];\n const first = params[0];\n if (!first) break;\n const annotated = (first.typeAnnotation as AstNode | undefined)?.typeAnnotation as AstNode | undefined;\n if (annotated?.type === \"TSTypeReference\") {\n typeName = ((annotated.typeName as AstNode | undefined)?.name as string | undefined) ?? typeName;\n }\n // `({ title }: { title: string })` — the type is written where the parameter is, and there is\n // no name to look up. It is augmented where it stands.\n if (annotated?.type === \"TSTypeLiteral\") inline = annotated;\n if (first.type === \"ObjectPattern\") {\n for (const property of (first.properties as AstNode[]) ?? []) {\n if (property.type === \"RestElement\") {\n /**\n * `({ className, ...others })` — the prop this drill is following arrives INSIDE the\n * rest, unnamed. The component can still receive `bcmsBindings` (and must, since\n * destructuring it takes it back out of the rest), so this is a reception even though\n * the prop itself is never mentioned.\n */\n rest = String((property.argument as AstNode | undefined)?.name ?? \"\") || null;\n if (rest) {\n receivable = true;\n receive = patternClose(content, first, offset);\n }\n continue;\n }\n if (property.type !== \"ObjectProperty\") continue;\n const key = (property.key as AstNode | undefined)?.name;\n if (key === \"bcmsBindings\") hasBindings = true;\n if (key !== propName) continue;\n const value = property.value as AstNode | undefined;\n if (value?.type === \"Identifier\") names.add(String(value.name));\n destructured = true;\n receivable = true;\n receive = patternClose(content, first, offset);\n }\n } else if (first.type === \"Identifier\") {\n receiver = String(first.name);\n // `function Hero(props) { … props.title … }` — nothing to destructure, and\n // `props.bcmsBindings` is already in scope.\n receivable = true;\n viaProps = true;\n }\n }\n\n return { names, receive, viaProps, typeName, receivable, inline, receiver, rest, hasBindings, destructured };\n}\n\n/** The same question for astro, whose module is the frontmatter and whose props are `Astro.props`. */\nfunction astroReception(ast: unknown, propName: string, offset: number, content: string): Reception {\n const names = new Set<string>();\n let receive: number | null = null;\n let viaProps = false;\n let typeName: string | null = null;\n let receivable = false;\n let hasBindings = false;\n\n walkAst(ast, (node) => {\n if (node.type !== \"VariableDeclarator\") return;\n const init = node.init as AstNode | undefined;\n const object = (init?.object as AstNode | undefined)?.name;\n const property = (init?.property as AstNode | undefined)?.name;\n if (init?.type !== \"MemberExpression\" || object !== \"Astro\" || property !== \"props\") return;\n const id = node.id as AstNode;\n if (id.type === \"ObjectPattern\") {\n for (const entry of (id.properties as AstNode[]) ?? []) {\n if (entry.type !== \"ObjectProperty\") continue;\n if ((entry.key as AstNode | undefined)?.name === \"bcmsBindings\") hasBindings = true;\n if ((entry.key as AstNode | undefined)?.name !== propName) continue;\n const value = entry.value as AstNode | undefined;\n if (value?.type === \"Identifier\") names.add(String(value.name));\n receivable = true;\n receive = patternClose(content, id, offset);\n }\n // `const { title }: Props = Astro.props`\n const annotated = (id.typeAnnotation as AstNode | undefined)?.typeAnnotation as AstNode | undefined;\n if (annotated?.type === \"TSTypeReference\") {\n typeName = ((annotated.typeName as AstNode | undefined)?.name as string | undefined) ?? typeName;\n }\n } else if (id.type === \"Identifier\") {\n receivable = true;\n viaProps = true;\n }\n });\n\n // Astro's convention is a `Props` interface whether or not the destructuring is annotated.\n return {\n names,\n receive,\n viaProps,\n typeName: typeName ?? \"Props\",\n receivable,\n inline: null,\n receiver: null,\n rest: null,\n hasBindings,\n destructured: names.size > 0,\n };\n}\n\n/** The member list of a type literal or an interface body, whichever this node is. */\nconst membersOf = (node: AstNode | null): AstNode[] =>\n ((node?.members ?? (node?.body as AstNode | undefined)?.body ?? []) as AstNode[]) ?? [];\n\n/**\n * Where — and HOW — `bcmsBindings?: Record<string, string>` goes into a component's props type.\n *\n * 🔴 THE SEPARATOR IS PART OF THE EDIT. `type Props={title:string}` has no trailing `;`, so\n * appending a member produced `{title:stringbcmsBindings?: …}` — a file that no longer parses, in\n * a diff that looks like one line. The separator the literal already uses is read off its own\n * source and reused, and a literal with no members at all needs none.\n *\n * INLINE COUNTS. `({ title }: { title: string })` writes its type where the parameter is, with no\n * name to look up — the commonest shape in a small component, and the one that used to be skipped\n * silently, leaving `bcmsBindings` a type error at every call site.\n */\nfunction propsTypeEnd(\n ast: unknown,\n reception: Reception,\n offset: number,\n content: string,\n): { at: number; text: string } | null {\n let literal: AstNode | null = reception.inline;\n if (!literal && reception.typeName) {\n walkAst(ast, (node) => {\n if (literal) return;\n const name = (node.id as AstNode | undefined)?.name;\n if (node.type === \"TSInterfaceDeclaration\" && name === reception.typeName) literal = node;\n if (node.type === \"TSTypeAliasDeclaration\" && name === reception.typeName) {\n const annotation = node.typeAnnotation as AstNode | undefined;\n if (annotation?.type === \"TSTypeLiteral\") literal = annotation;\n }\n });\n }\n if (!literal) return null;\n if (membersOf(literal).some((member) => (member.key as AstNode | undefined)?.name === \"bcmsBindings\")) {\n return null;\n }\n\n const body = (literal as AstNode).type === \"TSInterfaceDeclaration\" ? ((literal as AstNode).body as AstNode) : (literal as AstNode);\n const close = (body.end ?? 1) - 1 + offset;\n const members = membersOf(literal);\n const last = members[members.length - 1];\n if (!last) return { at: close, text: \" bcmsBindings?: Record<string, string> \" };\n // Straight after the LAST MEMBER, not at the closing brace: inserting at the brace pushed the\n // separator past the author's own whitespace and produced `{ title: string ; … }`.\n const at = (last.end ?? 0) + offset;\n\n const tail = content.slice((last.end ?? 0) + offset, close);\n // Babel puts a member's own terminator INSIDE its span, so the separator can be on either side\n // of `end`. Both are looked at, because guessing wrong writes `{title:stringbcmsBindings…}`.\n const own = (node: AstNode): string => content.slice((node.start ?? 0) + offset, (node.end ?? 0) + offset);\n const trailing = (node: AstNode): string => own(node).trimEnd().slice(-1);\n const separated = /[;,]/.test(tail) || /[;,]/.test(trailing(last));\n const separator = separated ? \"\" : members.some((m) => trailing(m) === \",\") ? \",\" : \";\";\n if (!tail.includes(\"\\n\")) return { at, text: `${separator} bcmsBindings?: Record<string, string>` };\n // A multi-line literal keeps its own indentation, read off the line the last member starts on.\n const lineStart = content.lastIndexOf(\"\\n\", (last.start ?? 0) + offset) + 1;\n const indent = content.slice(lineStart, (last.start ?? 0) + offset);\n return { at, text: `${separator}\\n${/^\\s*$/.test(indent) ? indent : \" \"}bcmsBindings?: Record<string, string>;` };\n}\n\n/**\n * Is this expression the prop, and nothing else?\n *\n * `{title}`, `{props.title}`, `{t}` after `({ title: t })`, and `{title ?? \"…\"}` — the last one\n * because a default is the ordinary way a component states one, and the element still renders the\n * prop when there is one. Anything else is a computation, and a computation's output is not a\n * field's value.\n */\nconst READS = /^\\{\\s*(?:(props)\\.)?([A-Za-z_$][\\w$]*)\\s*(?:(?:\\?\\?|\\|\\|)[\\s\\S]+)?\\}$/;\n\nfunction readsProp(expression: string, propName: string, names: Set<string>): boolean {\n const match = expression.trim().match(READS);\n if (!match) return false;\n return match[1] === \"props\" ? match[2] === propName : names.has(match[2]!);\n}\n\n/** The one non-blank child of an element, when it has exactly one. */\nfunction soleChild(node: Extract<Node, { type: \"element\" }>): Node | null {\n const kept = node.children.filter((c) => !(c.type === \"text\" && c.value.trim() === \"\"));\n return kept.length === 1 ? kept[0]! : null;\n}\n\n/**\n * Everything hop 2 needs to know about one component file, for one prop.\n *\n * Pure and offset-based like the rest of the package: it reports positions, and the caller decides\n * whether the whole chain is worth writing.\n */\nexport function findPropTargets(\n content: string,\n parsed: ParsedFile,\n propName: string,\n dialect: Dialect,\n /** Which export the call site imported — null for a default import. @see exportedFunction */\n imported: string | null = null,\n): PropTargets {\n const empty: PropTargets = {\n targets: [],\n forwards: [],\n receive: null,\n viaProps: false,\n propsType: null,\n receivable: false,\n };\n if (parsed.error) return empty;\n\n const offset = parsed.script?.offset ?? 0;\n const ast =\n dialect === \"astro\"\n ? parsed.ast ?? (parsed.script ? tryParse(parsed.script.code) : undefined)\n : parsed.ast;\n const component = dialect === \"astro\" ? null : exportedFunction(ast, imported);\n const reception =\n dialect === \"astro\"\n ? astroReception(ast, propName, offset, content)\n : receptionIn(component, propName, offset, content);\n if (!reception.receivable) return empty;\n const names = new Set(reception.names.size > 0 ? reception.names : [propName]);\n /**\n * Only the markup THIS component renders.\n *\n * A module's other exports render their own elements, and one of them may well hold a `{title}`\n * — a declaration written there is a binding on a component nobody called. Astro files hold one\n * component by construction, so they are not restricted.\n */\n const within = (node: Extract<Node, { type: \"element\" }>): boolean =>\n component === null ||\n (node.start >= ((component.start ?? 0) + offset) && node.start <= ((component.end ?? 0) + offset));\n\n const targets: PropTarget[] = [];\n const forwards: PropForward[] = [];\n\n const visit = (node: Node): void => {\n if (node.type === \"expr\") {\n for (const child of node.children) visit(child);\n return;\n }\n if (node.type !== \"element\") return;\n\n if (isIntrinsic(node.tag)) {\n const child = soleChild(node);\n if (within(node) && child?.type === \"expr\" && readsProp(child.value, propName, names)) {\n targets.push({ attrInsertAt: node.attrInsertAt, inner: node.inner, tag: node.tag });\n }\n } else if (within(node)) {\n /**\n * A component receiving the prop is the next hop, not a target: a `data-bcms-field` here\n * would be a prop that component drops, which is the defect this module exists to avoid.\n *\n * A SPREAD of the props object forwards everything the component was handed — which is how\n * most components pass things on, and which used to be invisible because the parser dropped\n * spread attributes. It is a forward like any other, and the bindings object is still added\n * EXPLICITLY at that call site: `bcmsBindings` is destructured out of the props by the hop\n * above, so `{...props}` no longer carries it.\n */\n const spread = node.attrs.find((a) => a.name === SPREAD);\n if (spread && spreadsProps(spread.value, reception)) {\n forwards.push({\n component: node.tag,\n prop: propName,\n attrInsertAt: node.attrInsertAt,\n forwards: node.attrs.some((a) => a.name === \"bcmsBindings\"),\n });\n }\n for (const attr of node.attrs) {\n if (attr.name === propName || names.has(attr.name)) {\n const expression = content.slice(attr.range.start, attr.range.end).replace(/^[^=]*=/, \"\");\n if (readsProp(expression, propName, names)) {\n forwards.push({\n component: node.tag,\n prop: attr.name,\n attrInsertAt: node.attrInsertAt,\n forwards: node.attrs.some((a) => a.name === \"bcmsBindings\"),\n });\n }\n }\n }\n }\n for (const child of node.children) visit(child);\n };\n for (const root of parsed.roots) visit(root);\n\n return {\n targets,\n forwards,\n // Already there? Then nothing to add — a second `bcmsBindings` in one destructuring is a\n // duplicate binding, and a second member in one type literal is a duplicate property.\n receive: reception.hasBindings ? null : reception.receive,\n viaProps: reception.viaProps,\n propsType: propsTypeEnd(ast, reception, offset, content),\n receivable: reception.receivable,\n };\n}\n\n/**\n * `{...props}` or `{...rest}` — a spread of the object this component receives its props through.\n *\n * Only an identifier is recognised. `{...{ title: other }}` and `{...compute()}` are objects this\n * cannot reason about, and treating them as forwards would write a binding into a component that\n * may never see the prop.\n */\nfunction spreadsProps(expression: string, reception: Reception): boolean {\n const name = expression.trim();\n if (!/^[A-Za-z_$][\\w$]*$/.test(name)) return false;\n /**\n * 🔴 THE RECEIVER'S ACTUAL NAME. `props` and `rest` are conventions, not rules — a component\n * written `function Hero(all)` or `({ title, ...others })` forwards through a name this used to\n * refuse, so the chain ended at a component that plainly passes everything on. What the AST says\n * the receiver is called is the only thing that answers this.\n */\n /**\n * 🔴 A REST NO LONGER HOLDS WHAT THE PATTERN TOOK OUT OF IT. `({ title, ...others })` binds\n * `title` and leaves `others` WITHOUT it, so `<Inner {...others} />` forwards everything except\n * the prop being followed — and treating it as a forward wrote the declaration into a component\n * that never receives the value. The props OBJECT still carries everything.\n */\n if (name === reception.receiver) return true;\n return name === reception.rest && !reception.destructured;\n}\n\nfunction tryParse(code: string): unknown {\n try {\n return parseProgram(code);\n } catch {\n return undefined;\n }\n}\n\n/** The bindings object itself, as this component names it. */\nexport const bindingsName = (viaProps: boolean): string => (viaProps ? \"props.bcmsBindings\" : \"bcmsBindings\");\n\n/** `bcmsBindings?.title`, or `props.bcmsBindings?.title` when the component takes a props object. */\nexport const bindingsRead = (prop: string, viaProps: boolean): string =>\n `${bindingsName(viaProps)}?.${prop}`;\n\n","/**\n * Which file is `<Hero>`? — import specifier in, repository path out.\n *\n * PURE, and bounded by the files it was GIVEN. There is no filesystem here and no resolution\n * algorithm beyond the two a template repository actually uses: a relative path, and a `paths`\n * alias the project's own tsconfig declares. A specifier this cannot place is reported as a miss\n * rather than guessed at, because guessing means editing a file nobody showed us.\n */\nimport { walkAst, type AstNode } from \"./props.js\";\nimport type { Dialect } from \"./dialect.js\";\nimport type { SourceFile } from \"./locate.js\";\nimport type { ParsedFile } from \"./sites/shared.js\";\n\n/** The order a bundler tries, narrowed to the extensions this package can read. */\nconst EXTENSIONS = [\".astro\", \".tsx\", \".jsx\", \".ts\", \".js\", \".svelte\", \".vue\", \".mjs\", \".cjs\"];\n\n/** `src/pages/index.astro` + `../components/Hero.astro` → `src/components/Hero.astro`. */\nfunction join(fromFile: string, specifier: string): string {\n const parts = fromFile.split(\"/\").slice(0, -1);\n for (const segment of specifier.split(\"/\")) {\n if (segment === \".\" || segment === \"\") continue;\n if (segment === \"..\") parts.pop();\n else parts.push(segment);\n }\n return parts.join(\"/\");\n}\n\n/** The first candidate that is actually one of the files we were given. */\nconst firstPresent = (base: string, files: Set<string>): string | null =>\n [base, ...EXTENSIONS.map((ext) => `${base}${ext}`), ...EXTENSIONS.map((ext) => `${base}/index${ext}`)].find(\n (candidate) => files.has(candidate),\n ) ?? null;\n\n/**\n * The project's own `compilerOptions.paths`, when a tsconfig is among the files.\n *\n * 🔴 THE PROJECT'S, NEVER A DEFAULT. `@/` means `src/` in most Next projects and something else in\n * plenty of others; assuming it would resolve `<Hero>` to a file that is not the one the build\n * uses, and the edit would land in a component nobody renders. No tsconfig means relative\n * specifiers only, which is a smaller conversion and a true one.\n */\nexport function aliasesFrom(sources: SourceFile[]): Map<string, string[]> {\n const out = new Map<string, string[]>();\n for (const source of sources) {\n if (!source.path.endsWith(\"tsconfig.json\") && !source.path.endsWith(\"jsconfig.json\")) continue;\n try {\n // Comments are legal in a tsconfig and illegal in JSON. Only line comments are stripped:\n // a heavier parser here would be a dependency for a file we can also simply not read.\n const parsed = JSON.parse(source.content.replace(/^\\s*\\/\\/.*$/gm, \"\")) as {\n compilerOptions?: { baseUrl?: string; paths?: Record<string, string[]> };\n };\n const base = parsed.compilerOptions?.baseUrl?.replace(/^\\.\\/?/, \"\").replace(/\\/$/, \"\") ?? \"\";\n const root = source.path.split(\"/\").slice(0, -1).join(\"/\");\n for (const [pattern, targets] of Object.entries(parsed.compilerOptions?.paths ?? {})) {\n out.set(\n pattern,\n targets.map((target) => [root, base, target.replace(/^\\.\\/?/, \"\")].filter(Boolean).join(\"/\")),\n );\n }\n } catch {\n // A tsconfig we cannot read is a tsconfig we do not have. @see the paragraph above.\n }\n }\n return out;\n}\n\n/** Apply one `paths` entry (`@/*` → `src/*`) to a specifier. */\nfunction expand(specifier: string, aliases: Map<string, string[]>): string[] {\n const out: string[] = [];\n for (const [pattern, targets] of aliases) {\n const star = pattern.indexOf(\"*\");\n if (star < 0) {\n if (specifier === pattern) out.push(...targets);\n continue;\n }\n const head = pattern.slice(0, star);\n const tail = pattern.slice(star + 1);\n if (!specifier.startsWith(head) || !specifier.endsWith(tail)) continue;\n const middle = specifier.slice(head.length, specifier.length - tail.length);\n out.push(...targets.map((target) => target.replace(\"*\", middle)));\n }\n return out;\n}\n\n/** The repository path a specifier names, or null when it is not among the files we were given. */\nexport function resolveSpecifier(\n fromFile: string,\n specifier: string,\n files: Set<string>,\n aliases: Map<string, string[]>,\n): string | null {\n if (specifier.startsWith(\".\")) return firstPresent(join(fromFile, specifier), files);\n for (const candidate of expand(specifier, aliases)) {\n const found = firstPresent(candidate.replace(/\\/$/, \"\"), files);\n if (found) return found;\n }\n return null;\n}\n\n/** What one local name was imported from, and WHICH export of it. */\nexport interface ImportedFrom {\n specifier: string;\n /** The exported name, or null for a default import. */\n imported: string | null;\n}\n\n/**\n * Local name → what it was imported from, for one file.\n *\n * From the parse: a regex over `import` lines cannot tell a real import from one inside a string\n * or a comment, and this decides which file gets edited. The EXPORT is carried too, because a\n * module legitimately exports several components and only one of them renders this prop.\n */\nexport function importsIn(parsed: ParsedFile, _dialect: Dialect): Map<string, ImportedFrom> {\n const out = new Map<string, ImportedFrom>();\n walkAst(parsed.ast, (node: AstNode) => {\n if (node.type !== \"ImportDeclaration\") return;\n /**\n * 🔴 A TYPE IMPORT IS NOT A VALUE. `import type { Hero } from \"./Hero\"` is erased before the\n * code runs — the binding does not exist at runtime — so treating it as a component reference\n * sent the drill into a file the page never renders, and treating it as the helper accepted a\n * read through an identifier that is not there. Babel marks both the declaration and each\n * specifier; either one saying `type` is enough.\n */\n if (node.importKind === \"type\") return;\n const specifier = (node.source as AstNode | undefined)?.value;\n if (typeof specifier !== \"string\") return;\n for (const entry of (node.specifiers as AstNode[]) ?? []) {\n if (entry.importKind === \"type\") continue;\n const local = (entry.local as AstNode | undefined)?.name;\n if (typeof local !== \"string\") continue;\n const imported =\n entry.type === \"ImportDefaultSpecifier\"\n ? null\n : (((entry.imported as AstNode | undefined)?.name as string | undefined) ?? local);\n out.set(local, { specifier, imported });\n }\n });\n return out;\n}\n","/**\n * A dynamic route reads ITS OWN entry, and the route parameter is how it says which.\n *\n * 🔴 WITHOUT THE PARAMETER THE PAGE IS WRONG, NOT INCOMPLETE. `bcms(page, \"title\", \"…\")` on\n * `[slug].astro` resolves the same value for every URL the route serves, so a hundred posts render\n * the first post's title — a conversion that builds, passes every attribute check, and is visibly\n * broken. So a dynamic route either gets its parameter or reports `DYNAMIC_PARAMS_UNAVAILABLE`\n * and stays as it was.\n *\n * Astro hands it over for free (`Astro.params`). Next does not: `params` is an argument to the\n * page component, so the SIGNATURE has to be edited — and on Next 15 `params` is a promise, which\n * is why an already-`async` component gets `(await params).slug` and a synchronous one does not.\n */\nimport type { Dialect } from \"./dialect.js\";\nimport { DIALECT_RULES } from \"./expr.js\";\nimport { walkAst, type AstNode } from \"./props.js\";\nimport type { ParsedFile } from \"./sites/shared.js\";\n\n/** One insertion in the page file itself — the `{ params }` a Next page did not take. */\nexport interface ParamSplice {\n start: number;\n end: number;\n text: string;\n}\n\nexport interface RouteParams {\n /** The expression the read appends: `Astro.params.slug`, `params.slug`, `(await params).slug`. */\n slug: string;\n splices: ParamSplice[];\n /** Import lines the expression needs — SvelteKit's `page` store is not global. */\n imports?: string[];\n}\n\n/** `src/pages/[slug].astro`, `app/blog/[slug]/page.tsx` — a segment in brackets. */\nexport const isDynamicRoute = (file: string): boolean =>\n file.split(\"/\").some((segment) => /^\\[.+\\]/.test(segment) || /\\[.+\\]\\.[a-z]+$/i.test(segment));\n\nconst FUNCTIONS = new Set([\"FunctionDeclaration\", \"FunctionExpression\", \"ArrowFunctionExpression\"]);\n\n/** The default-exported component — the one the router calls, and the only one given `params`. */\nfunction defaultComponent(ast: unknown): AstNode | null {\n let found: AstNode | null = null;\n walkAst(ast, (node) => {\n if (node.type !== \"ExportDefaultDeclaration\" || found) return;\n const declaration = node.declaration as AstNode | undefined;\n if (declaration && FUNCTIONS.has(declaration.type)) found = declaration;\n });\n return found;\n}\n\n/**\n * How this file reads its route parameter, or null when it cannot be given one.\n *\n * Null is a real answer: a page whose default export is not a function (a `const Page = memo(…)`,\n * a re-export) is one this cannot edit without guessing where the argument goes, and a guess here\n * is a signature change in someone's router.\n */\nexport function routeParams(\n content: string,\n parsed: ParsedFile,\n dialect: Dialect,\n file: string,\n): RouteParams | null {\n const rule = DIALECT_RULES[dialect];\n if (dialect === \"svelte\") {\n // `$page` is a store, and a store is a module import — Nuxt's `useRoute` is auto-imported and\n // `Astro.params` is a global, so this is the one dialect whose parameter costs a line.\n return rule.slug\n ? { slug: rule.slug, splices: [], imports: ['import { page } from \"$app/stores\";'] }\n : null;\n }\n if (dialect !== \"jsx\") return rule.slug ? { slug: rule.slug, splices: [] } : null;\n if (parsed.error) return null;\n\n const component = defaultComponent(parsed.ast);\n if (!component) return null;\n\n /**\n * 🔴 `params` IS A PROMISE ON NEXT 15, AND A CLIENT COMPONENT CANNOT AWAIT IT.\n *\n * Reading `params.slug` off a promise yields `undefined` on every request — the page builds,\n * renders the fallback copy for every URL, and nothing says so. So the read is always awaited,\n * which means the page component has to be `async`; a server component can be made one, and a\n * `\"use client\"` component cannot (its export has to stay a plain function React can render).\n * That file is `DYNAMIC_PARAMS_UNAVAILABLE`, which is the truth: this cannot give it a slug.\n */\n const clientComponent = /^\\s*[\"']use client[\"']/m.test(content);\n if (clientComponent) return null;\n\n const splices: ParamSplice[] = [];\n if (component.async !== true) {\n /**\n * `function Page` → `async function Page`, and for an arrow, `async` at its own start.\n *\n * An arrow page (`export default () => …`) has no `function` keyword to find, so looking for\n * one returned null and every arrow-bodied dynamic route was refused. The arrow's start IS\n * the insertion point, before its parameter list.\n */\n const at =\n component.type === \"ArrowFunctionExpression\"\n ? (component.start ?? 0)\n : content.indexOf(\"function\", component.start ?? 0);\n const bodyStart = (component.body as AstNode | undefined)?.start ?? Number.MAX_SAFE_INTEGER;\n if (at < 0 || at > bodyStart) return null;\n splices.push({ start: at, end: at, text: \"async \" });\n }\n\n const typed = file.endsWith(\".tsx\") || file.endsWith(\".ts\");\n const annotation = typed ? \": { params: Promise<{ slug: string }> }\" : \"\";\n const params = (component.params as AstNode[]) ?? [];\n const first = params[0];\n\n if (!first) {\n const open = content.indexOf(\"(\", (component.id as AstNode | undefined)?.end ?? component.start ?? 0);\n if (open < 0) return null;\n return {\n slug: \"(await params).slug\",\n splices: [...splices, { start: open + 1, end: open + 1, text: `{ params }${annotation}` }],\n };\n }\n if (first.type === \"ObjectPattern\") {\n /**\n * The name `params` actually arrives under.\n *\n * 🔴 A DESTRUCTURING CAN RENAME. `({ params: routeParams })` binds `routeParams`, and an\n * emitted `(await params).slug` there names nothing — a build error, or worse, an outer\n * binding of the same name. A NESTED pattern (`{ params: { slug } }`) is refused outright:\n * it destructures a promise, so there is no correct expression to write beside it.\n */\n const properties = (first.properties as AstNode[]) ?? [];\n const property = properties.find((entry) => (entry.key as AstNode | undefined)?.name === \"params\");\n if (property) {\n const value = property.value as AstNode | undefined;\n if (value?.type !== \"Identifier\") return null;\n return { slug: `(await ${String(value.name)}).slug`, splices };\n }\n\n /**\n * 🔴 ADDING A PROPERTY TO A TYPED DESTRUCTURING IS ALSO A TYPE CHANGE. `({ searchParams }:\n * Props)` gaining `params` is an error on the very next build unless `Props` gains it too —\n * and `Props` is somebody else's declaration, in a file this may not even have. An INLINE\n * literal is augmented where it stands; a NAMED type is not guessed at.\n */\n const annotated = (first.typeAnnotation as AstNode | undefined)?.typeAnnotation as AstNode | undefined;\n if (annotated && annotated.type !== \"TSTypeLiteral\") return null;\n if (annotated?.type === \"TSTypeLiteral\") {\n const member = typeMember(content, annotated);\n if (!member) return null;\n splices.push(member);\n }\n\n const insert = insertProperty(content, first, properties);\n return insert === null\n ? null\n : { slug: \"(await params).slug\", splices: [...splices, insert] };\n }\n if (first.type === \"Identifier\") {\n // `export default function Page(props)` — the parameter is already there, under its own name.\n return { slug: `(await ${String(first.name)}.params).slug`, splices };\n }\n return null;\n}\n\n/** The `}` closing a destructuring pattern, before its type annotation. @see props.ts */\nfunction closeOf(content: string, pattern: AstNode): number | null {\n const annotation = pattern.typeAnnotation as AstNode | undefined;\n let at = content.lastIndexOf(\"}\", annotation?.start ?? pattern.end ?? 0);\n if (at < 0) return null;\n while (at > 0 && /\\s/.test(content[at - 1]!)) at--;\n return at;\n}\n\n/**\n * Where `params` goes in an existing destructuring, and whether it needs a comma.\n *\n * 🔴 NOT ALWAYS AT THE END, AND NOT ALWAYS WITH A COMMA. `({ searchParams, ...rest })` must take\n * it BEFORE the rest — `{ searchParams, ...rest, params }` is a syntax error — and a pattern that\n * already ends in a trailing comma gains a second one from an unconditional `\", params\"`. Both\n * come off the AST rather than off an assumption about how somebody writes their arguments.\n */\nfunction insertProperty(content: string, pattern: AstNode, properties: AstNode[]): ParamSplice | null {\n const rest = properties.find((entry) => entry.type === \"RestElement\");\n if (rest) {\n const at = rest.start ?? 0;\n return { start: at, end: at, text: \"params, \" };\n }\n /**\n * 🔴 AFTER THE LAST PROPERTY, NOT AT THE CLOSING BRACE.\n *\n * Deciding the separator from the character before the `}` reads whatever trivia is there: a\n * trailing comma followed by a comment looked like no comma at all, and the emitted pattern put\n * TWO separators around that comment — which is not a destructuring, and does not parse.\n * Written directly after the last property, the comma is this insertion's own\n * and everything the author put after it stays where they put it.\n */\n const last = properties[properties.length - 1];\n if (last) {\n const at = last.end ?? 0;\n return { start: at, end: at, text: \", params\" };\n }\n const close = closeOf(content, pattern);\n return close === null ? null : { start: close, end: close, text: \" params\" };\n}\n\n/** `params: Promise<{ slug: string }>` added to an INLINE parameter type, in its own style. */\nfunction typeMember(content: string, literal: AstNode): ParamSplice | null {\n const members = ((literal.members ?? []) as AstNode[]) ?? [];\n const close = (literal.end ?? 1) - 1;\n const text = \"params: Promise<{ slug: string }>\";\n const last = members[members.length - 1];\n if (!last) return { start: close, end: close, text: ` ${text} ` };\n /**\n * 🔴 THE SEPARATOR COMES FROM THE MEMBER'S OWN SPAN, and the insertion goes right after it.\n *\n * Looking at the text between the last member and the closing brace reads a trailing COMMENT:\n * a `;` or a `,` inside one was taken for the member's terminator, and the emitted type either\n * ran two members together or carried two separators. Babel puts a member's own terminator\n * inside its span, so that is the only thing asked.\n */\n const at = last.end ?? close;\n const own = content.slice(last.start ?? 0, at).trimEnd();\n const terminated = own.endsWith(\";\") || own.endsWith(\",\");\n return { start: at, end: at, text: `${terminated ? \"\" : \";\"} ${text}` };\n}\n","/**\n * What a template DECLARES, read off the parse rather than scanned for.\n *\n * 🔴 A REGEX CANNOT TELL A DECLARATION FROM A MENTION OF ONE. `<!-- data-bcms-field=\"hero.title\" -->`\n * and `const example = 'data-bcms-field=\"hero.title\"'` both match, and both would put a path in the\n * `alreadyDeclared` bucket — a path counted as bound that nothing binds, which is precisely the\n * silent failure the receipt exists to make impossible. Attributes come off elements the parser\n * found, so a comment declares nothing.\n *\n * Its own module because BOTH ends of the lane ask the question: the codemod, to know what it has\n * already done, and `proposeConversion`, to know whether the proposal binds what it must. Two\n * implementations would drift, and the failure that produces is a proposal refused for leaving\n * unbound a path that is declared right there in the tree.\n */\nimport type { Node } from \"./sites/shared.js\";\n\n/** Declared bindings in a file, in every spelling. Same shapes the proposer scans for. */\nconst BINDING_ATTR = /data-bcms-(?:layout-)?field\\s*=\\s*[\"']([^\"']+)[\"']/g;\nconst PROPS_ATTR = /data-bcms-props\\s*=\\s*[\"']([^\"']+)[\"']/g;\nconst TEMPLATE_SCAN = /:?data-bcms-(?:layout-)?field\\s*=\\s*(?:\\{\\s*`([^`]+)`\\s*\\}|\"\\s*`([^`]+)`\\s*\")/g;\nconst BINDINGS_SCAN = /bcmsBindings\\s*=\\s*\\{\\{[^}]*\\}\\}/g;\n\n/**\n * One declaration read off ONE element: which lane it is on, which path, and WHERE.\n *\n * 🔴 ALL THREE, BECAUSE A PATH IS NOT A DECLARATION. \"This file declares `hero.title`\" answers\n * nothing a conversion needs: a file that renders two routes declares it for one of them, and a\n * `data-bcms-layout-field=\"layout:brand\"` is not a declaration of the page path `brand`. The\n * element is identified by its attribute insert offset, which is the same coordinate the sites\n * carry, so a target's own occurrence can be compared against it.\n */\nexport interface Declaration {\n scope: \"page\" | \"layout\";\n path: string;\n kind: string;\n /** The element's attribute insert offset — its identity within the file. */\n at: number;\n /**\n * Which attribute carried it. An element holds ONE `data-bcms-field`, so a second path wanting\n * that element is a collision — while `data-bcms-props` and a call site's `bcmsBindings` hold\n * several addresses by design and claim nothing.\n */\n via: \"field\" | \"props\" | \"prop\";\n}\n\n/** The declarations one `data-bcms-props` value carries. The grammar belongs to `packages/types`. */\nconst propsDeclarations = (value: string, at: number): Declaration[] =>\n value.split(\";\").flatMap((entry) => {\n const [address, kind] = entry.split(\"|\");\n if (!address) return [];\n // An address on this attribute carries the same `layout:` prefix a field attribute does.\n const scope = address.startsWith(\"layout:\") ? (\"layout\" as const) : (\"page\" as const);\n return [{ scope, path: stripLayoutPrefix(address), kind: kind ?? \"\", at, via: \"props\" as const }];\n });\n\nconst propsPaths = (value: string): { scope: \"page\" | \"layout\"; path: string }[] =>\n propsDeclarations(value, 0).map((d) => ({ scope: d.scope, path: d.path }));\n\n/**\n * A repeater's declaration, as it is written: `` data-bcms-field={`cards[${i}].title`} ``.\n *\n * Read off the attribute's own bytes because it is an EXPRESSION — the parsers report no literal\n * value for one, and without this a converted file would look undeclared on the next run and be\n * converted a second time. @see loops.ts\n */\nconst TEMPLATE_BINDING = /^:?data-bcms-(?:layout-)?field\\s*=\\s*(?:\\{\\s*`([^`]+)`\\s*\\}|\"\\s*`([^`]+)`\\s*\")$/;\n\n/** `cards[0].title` and `cards[${i}].title` are the same declaration. Indices are positions. */\nexport const shapeOfPath = (path: string): string => path.replace(/\\[(?:\\d+|\\$\\{[^}]*\\})\\]/g, \"[*]\");\n\n/** Every declaration in a parsed file, in document order, with duplicates KEPT. @see tierThree */\nexport function declarationsIn(roots: Node[], content: string): Declaration[] {\n const out: Declaration[] = [];\n const visit = (node: Node): void => {\n // Into expressions too: a loop this package wrote declares its bindings inside one.\n if (node.type === \"expr\") {\n for (const child of node.children) visit(child);\n return;\n }\n if (node.type !== \"element\") return;\n const kind = node.attrs.find((a) => a.name === \"data-bcms-kind\")?.value ?? \"\";\n const at = node.attrInsertAt;\n for (const attr of node.attrs) {\n // `:data-bcms-field` is vue's own spelling of an expression-valued attribute.\n const name = attr.name.replace(/^:/, \"\");\n if (name === \"data-bcms-field\" || name === \"data-bcms-layout-field\") {\n const scope = name === \"data-bcms-layout-field\" ? (\"layout\" as const) : (\"page\" as const);\n const template = content.slice(attr.range.start, attr.range.end).match(TEMPLATE_BINDING);\n const templated = template?.[1] ?? template?.[2];\n if (templated) out.push({ scope, path: shapeOfPath(stripLayoutPrefix(templated)), kind, at, via: \"field\" });\n else if (attr.value) out.push({ scope, path: stripLayoutPrefix(attr.value), kind, at, via: \"field\" });\n } else if (attr.name === \"data-bcms-props\") {\n out.push(...propsDeclarations(attr.value, at));\n } else if (attr.name === \"bcmsBindings\") {\n // The call-site half of a drilled prop. It IS a declaration — the element that renders the\n // value reads its path from here — so a second run must not convert the same prop again.\n for (const path of bindingsPaths(content.slice(attr.range.start, attr.range.end))) {\n out.push({ scope: \"page\", path, kind: \"\", at, via: \"prop\" });\n }\n }\n }\n for (const child of node.children) visit(child);\n };\n for (const root of roots) visit(root);\n return out;\n}\n\n/** The paths inside `bcmsBindings={{ title: \"hero.title\" }}`, in either quote style. */\nconst bindingsPaths = (text: string): string[] =>\n [...text.matchAll(/[\"']([^\"']+)[\"']/g)].map((match) => match[1]!);\n\n/**\n * What a file DECLARES — read off the parsed elements, not scanned for.\n *\n * 🔴 A REGEX CANNOT TELL A DECLARATION FROM A MENTION OF ONE. `<!-- data-bcms-field=\"hero.title\" -->`\n * and `const example = 'data-bcms-field=\"hero.title\"'` both match, and both would put a path in the\n * `alreadyDeclared` bucket — a path counted as bound that nothing binds, which is precisely the\n * silent failure the receipt exists to make impossible. Attributes come off elements the parser\n * found, so a comment declares nothing.\n */\n/** `(scope, path)` as one string — how a declaration is compared to a target. */\nexport const scopedPath = (scope: string, path: string): string => `${scope}::${path}`;\n\n/** Does this declaration set cover the target's `(scope, path)`, by path or by repeater shape? */\nexport const covers = (declared: Set<string> | undefined, target: { scope: string; path: string }): boolean =>\n declared !== undefined &&\n (declared.has(scopedPath(target.scope, target.path)) ||\n declared.has(scopedPath(target.scope, shapeOfPath(target.path))));\n\nexport const declaredInTree = (roots: Node[], content: string): Set<string> =>\n new Set(declarationsIn(roots, content).map((d) => scopedPath(d.scope, d.path)));\n\n/** The same list as `declarationsIn`, for a file no parser would read. @see declaredByScan */\nexport const scannedDeclarations = (content: string): { scope: \"page\" | \"layout\"; path: string }[] =>\n [...declaredByScan(content)].map((entry) => {\n const [scope, ...rest] = entry.split(\"::\");\n return { scope: scope as \"page\" | \"layout\", path: rest.join(\"::\") };\n });\n\n/**\n * The same question for a file NO PARSER WOULD READ.\n *\n * Tier 2's instrument is a regex because a regex is all it has; using one here is the same\n * admission, in the same place, and it is stated rather than hidden. A parsed file never reaches\n * this function.\n */\nexport function declaredByScan(content: string): Set<string> {\n const out = new Set<string>();\n const add = (scope: \"page\" | \"layout\", path: string): void => void out.add(scopedPath(scope, path));\n for (const match of content.matchAll(BINDING_ATTR)) {\n add(match[0].includes(\"layout-field\") ? \"layout\" : \"page\", stripLayoutPrefix(match[1]!));\n }\n for (const match of content.matchAll(TEMPLATE_SCAN)) {\n add(match[0].includes(\"layout-field\") ? \"layout\" : \"page\", shapeOfPath(stripLayoutPrefix(match[1] ?? match[2]!)));\n }\n for (const match of content.matchAll(BINDINGS_SCAN)) for (const path of bindingsPaths(match[0])) add(\"page\", path);\n // The lane comes off the address, so a chrome link is not counted as a page one.\n for (const match of content.matchAll(PROPS_ATTR))\n for (const entry of propsPaths(match[1]!)) add(entry.scope, entry.path);\n return out;\n}\n\n/** `data-bcms-layout-field` carries the renderer's `layout:` prefix; the brief's path does not. */\nexport const stripLayoutPrefix = (value: string): string =>\n value.startsWith(\"layout:\") ? value.slice(\"layout:\".length) : value;\n","/**\n * Is THIS element already converted for THIS target — declaration and read, together?\n *\n * 🔴 A FILE-WIDE DECLARATION PLUS A FILE-WIDE READ IS NOT EVIDENCE OF EITHER. A page that renders\n * two routes carries both, for different elements; a page converted for `/` and a hardcoded `<h2>`\n * for `/about` satisfies \"the file declares that path\" and \"the file reads that path\" while the\n * second sentence never reflects an edit again. And a `bcms(…)` sitting three elements away — or\n * in an unused statement at the top of the module — answers the same way. So the question is\n * asked of ONE element's own bytes, against identifiers this file actually imports.\n *\n * Used by both ends of the conversion: the per-file prefilter, which decides whether a target has\n * already been done, and tier 3's verification, which decides whether a model's output may be\n * believed. One implementation, because the two must not disagree about what \"converted\" means.\n */\nimport type { Dialect } from \"./dialect.js\";\nimport { shapeOfPath, stripLayoutPrefix } from \"./declarations.js\";\nimport { CONTENT_DIR, HELPER_PATH } from \"./helper.js\";\nimport { importsIn } from \"./resolve.js\";\nimport type { Node, ParsedFile } from \"./sites/shared.js\";\n\n/** The identity a declaration is compared against. */\nexport interface TargetIdentity {\n scope: \"page\" | \"layout\";\n path: string;\n /** The page slug whose snapshot the read must name. Unused for layout scope. */\n slug: string;\n}\n\n/** One element that declares something, and the bytes a reader of THAT element would see. */\nexport interface DeclaringElement {\n scope: \"page\" | \"layout\";\n path: string;\n kind: string;\n /** The open tag plus this element's OWN text and expressions — never a descendant's. */\n own: string;\n}\n\nconst escapeRegExp = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/** A repeater's `cards[0].title` → `{ array: \"cards\", leaf: \"title\" }`. Null for a plain path. */\nexport function splitArrayPath(path: string): { array: string; leaf: string } | null {\n const match = path.match(/^(.*?)\\[\\d+\\]\\.(.+)$/);\n return match ? { array: match[1]!, leaf: match[2]! } : null;\n}\n\n/**\n * The element's OWN bytes: its open tag, and the text and expressions directly inside it.\n *\n * 🔴 NOT THE SUBTREE. `<div data-bcms-field=\"hero.title\"><span>{bcms(page, \"hero.title\", …)}</span></div>`\n * has the declaration on the div and the read on the span — the value the div renders is still\n * whatever the span decides, and binding the div makes a publish rewrite the whole card. Reading\n * a descendant's call as though it were this element's is how that passed verification.\n */\nexport function ownBytes(node: Extract<Node, { type: \"element\" }>, content: string): string {\n const open = content.slice(node.start, node.inner ? node.inner.start : node.attrInsertAt);\n const mine = node.children\n .filter((child) => child.type === \"text\" || child.type === \"expr\")\n .map((child) => (child.type === \"expr\" ? exprBytes(child, content) : content.slice(child.range.start, child.range.end)))\n .join(\"\");\n return `${open}${mine}`;\n}\n\n/**\n * An expression's own bytes, with the MARKUP inside it removed.\n *\n * 🔴 AN EXPRESSION CAN CONTAIN ELEMENTS. `{cond && <span>{bcms(page, \"hero.title\", …)}</span>}` is\n * one expression child of its parent — so taking its whole span as the parent's \"own\" bytes handed\n * the parent a read that belongs to the span three levels in, and the parent passed verification\n * for a value it does not render. The nested elements' ranges are cut out; what is left is the\n * expression this element actually evaluates.\n */\nfunction exprBytes(node: Extract<Node, { type: \"expr\" }>, content: string): string {\n const nested = node.children.flatMap((child) =>\n child.type === \"element\"\n ? [{ start: child.start, end: child.inner ? child.inner.end + child.tag.length + 3 : child.attrInsertAt }]\n : [],\n );\n let out = \"\";\n let at = node.range.start;\n for (const range of [...nested].sort((a, b) => a.start - b.start)) {\n if (range.start < at) continue;\n out += content.slice(at, range.start);\n at = Math.max(at, range.end);\n }\n return out + content.slice(at, node.range.end);\n}\n\n/** Every element in a parse that declares a binding, with its own bytes. */\nexport function declaringElements(roots: Node[], content: string): DeclaringElement[] {\n const out: DeclaringElement[] = [];\n const visit = (node: Node): void => {\n if (node.type === \"expr\") {\n for (const child of node.children) visit(child);\n return;\n }\n if (node.type !== \"element\") return;\n const kind = node.attrs.find((a) => a.name.replace(/^:/, \"\") === \"data-bcms-kind\")?.value ?? \"\";\n for (const attr of node.attrs) {\n const name = attr.name.replace(/^:/, \"\");\n /**\n * A call site handing a component a path IS a declaration — the element that renders the\n * value reads its path from here, and this file's half of the conversion is the `bcms(…)`\n * beside it. Omitting it made every drilled prop look unconverted on the next run.\n */\n if (name === \"bcmsBindings\") {\n const own = ownBytes(node, content);\n for (const quoted of content.slice(attr.range.start, attr.range.end).matchAll(/[\"']([^\"']+)[\"']/g)) {\n out.push({ scope: \"page\", path: quoted[1]!, kind, own });\n }\n continue;\n }\n /**\n * `data-bcms-props` declares too, and it is the ONLY declaration an attribute-valued binding\n * gets — a promoted nav link's `href` has no field attribute of its own. Leaving it out made\n * such a link look unconverted on every subsequent run.\n */\n if (name === \"data-bcms-props\") {\n for (const entry of attr.value.split(\";\")) {\n /**\n * 🔴 THE KIND IS IN THE ENTRY, NOT ON THE ELEMENT. `address|kind|attr` is the grammar,\n * and an element whose only binding is an attribute emits NO `data-bcms-kind` of its own\n * — so falling back to the element's gave every props entry `kind: \"\"`, and tier 3\n * rejected correct output for declaring a kind that did not match the brief.\n */\n const [address, entryKind] = entry.split(\"|\");\n if (!address) continue;\n out.push({\n scope: address.startsWith(\"layout:\") ? \"layout\" : \"page\",\n path: stripLayoutPrefix(address),\n kind: entryKind ?? \"\",\n own: ownBytes(node, content),\n });\n }\n continue;\n }\n if (name !== \"data-bcms-field\" && name !== \"data-bcms-layout-field\") continue;\n const scope = name === \"data-bcms-layout-field\" ? (\"layout\" as const) : (\"page\" as const);\n const text = content.slice(attr.range.start, attr.range.end);\n const template = text.match(/`([^`]+)`/);\n const value = template ? shapeOfPath(template[1]!) : attr.value;\n if (value) out.push({ scope, path: stripLayoutPrefix(value), kind, own: ownBytes(node, content) });\n }\n for (const child of node.children) visit(child);\n };\n for (const root of roots) visit(root);\n return out;\n}\n\n/** The local names a file imports the three helpers under. Empty when it imports none. */\nexport interface HelperLocals {\n bcms: string[];\n bcmsRows: string[];\n bcmsLayout: string[];\n}\n\n/**\n * Which identifiers in this file are OUR helpers, and which is the page's snapshot.\n *\n * 🔴 AN IDENTIFIER IS NOT A FUNCTION. `bcms(page, \"hero.title\", …)` proves nothing on its own: the\n * name may be the project's own utility, or nothing at all — an undefined identifier in a file\n * that does not build. Resolving it to an import of the helper module is what makes the read a\n * read. Same for the snapshot, which has to be the DEFAULT import of `bcms-content/<slug>.json`\n * and not merely a variable that happens to be spelled `bcmsHome`.\n */\nexport function helperLocals(parsed: ParsedFile, dialect: Dialect, file: string): HelperLocals {\n const out: HelperLocals = { bcms: [], bcmsRows: [], bcmsLayout: [] };\n const helper = HELPER_PATH[dialect];\n if (!helper) return out;\n // 🔴 THE GENERATED HELPER, NOT \"a specifier with `bcms-content` in it\". A project's own\n // `./lib/bcms-content-utils` exporting a `bcms` satisfied that test, and a page reading ITS\n // `bcms` was then accepted as converted — a binding whose value comes from somewhere nobody\n // declared. The specifier has to resolve to the exact module this package writes.\n for (const [local, from] of importsIn(parsed, dialect)) {\n if (!namesFile(file, from.specifier, helper)) continue;\n if (from.imported === \"bcms\") out.bcms.push(local);\n if (from.imported === \"bcmsRows\") out.bcmsRows.push(local);\n if (from.imported === \"bcmsLayout\") out.bcmsLayout.push(local);\n }\n return out;\n}\n\n/**\n * The repository path a RELATIVE specifier names, or null for a bare one.\n *\n * 🔴 `./src/bcms-content` AND `src/bcms-content` ARE NOT THE SAME MODULE. The first is relative to\n * the importing file; the second is a bare specifier, which resolves through node_modules or a\n * path alias and may be a package entirely. Flattening both to one string made a project's own\n * `src/bcms-content` package satisfy the helper test from any directory in the tree — a page\n * reading ITS `bcms` was then accepted as converted. Only a relative specifier can be this\n * package's helper, because a relative import is the only thing this package ever writes.\n */\nfunction resolveRelative(fromFile: string, specifier: string): string | null {\n if (!specifier.startsWith(\".\")) return null;\n const parts = fromFile.split(\"/\").slice(0, -1);\n for (const segment of specifier.split(\"/\")) {\n if (segment === \".\" || segment === \"\") continue;\n if (segment === \"..\") {\n /**\n * 🔴 A `..` PAST THE ROOT LEAVES THE REPOSITORY, and `pop()` on an empty array does not say\n * so — it silently stays put. A root-level `App.tsx` importing `../src/bcms-content` reaches\n * OUTSIDE the tree, and clamping resolved it to the in-repo helper: a page reading somebody\n * else's module was counted `alreadyDeclared` and never converted. A path this cannot place\n * inside the repository is not one of its files.\n */\n if (parts.length === 0) return null;\n parts.pop();\n } else parts.push(segment);\n }\n return parts.join(\"/\");\n}\n\n/**\n * Does this specifier name exactly `target`?\n *\n * The extension may be omitted, but ONLY the target's own — `./bcms-content` names\n * `src/bcms-content.ts` and `./bcms-content.tsx` does not. Treating every TypeScript extension as\n * interchangeable made a `.tsx` module of somebody else's pass as this package's `.ts` helper.\n */\nfunction namesFile(fromFile: string, specifier: string, target: string): boolean {\n const resolved = resolveRelative(fromFile, specifier);\n if (resolved === null) return false;\n if (resolved === target) return true;\n const extension = target.slice(target.lastIndexOf(\".\"));\n return extension.startsWith(\".\") && `${resolved}${extension}` === target;\n}\n\n/** The name this file imports `bcms-content/<slug>.json` under, or null when it does not. */\nexport function snapshotLocal(parsed: ParsedFile, dialect: Dialect, slug: string, file: string): string | null {\n const target = `${CONTENT_DIR}/${slug}.json`;\n for (const [local, from] of importsIn(parsed, dialect)) {\n if (from.imported !== null) continue; // a NAMED import of a json module is not the snapshot\n if (namesFile(file, from.specifier, target)) return local;\n }\n return null;\n}\n\n/** `\\bname\\b`, so `bcmsHome` never matches `bcmsHomepage`. */\nconst identifier = (name: string): string => `(?<![\\\\w$])${escapeRegExp(name)}(?![\\\\w$])`;\n\n/**\n * Does this element read `target` through an imported helper?\n *\n * The three shapes, and each names both halves of the identity in one expression:\n * layout `bcmsLayout(\"<address>\", …)`\n * page `bcms(<this route's snapshot>, \"<path>\", …)`\n * repeater `bcms(<the loop's row>, \"<leaf>\", …)` — the row is the loop's own binding, so the\n * ARRAY's read is checked once against the file instead. @see reads\n */\nfunction elementReads(own: string, target: TargetIdentity, locals: HelperLocals, snapshot: string | null): boolean {\n const quoted = escapeRegExp(JSON.stringify(target.path));\n if (target.scope === \"layout\") {\n return locals.bcmsLayout.some((name) => new RegExp(`${identifier(name)}\\\\s*\\\\(\\\\s*${quoted}`).test(own));\n }\n const indexed = splitArrayPath(target.path);\n if (indexed) {\n const leaf = escapeRegExp(JSON.stringify(indexed.leaf));\n return locals.bcms.some((name) => new RegExp(`${identifier(name)}\\\\s*\\\\([^)]*,\\\\s*${leaf}`).test(own));\n }\n if (!snapshot) return false;\n return locals.bcms.some((name) =>\n new RegExp(`${identifier(name)}\\\\s*\\\\(\\\\s*${identifier(snapshot)}\\\\s*,\\\\s*${quoted}`).test(own),\n );\n}\n\n/**\n * Has this file already converted this target — on an element of its own, with a real read?\n *\n * Every half is required and every half is scoped: the DECLARATION has to be for this scope and\n * this path, the READ has to be inside that same element, and the identifiers it names have to be\n * ones this file imports. A repeater additionally needs the array read, which lives on the loop\n * rather than on the row.\n */\nexport function convertedHere(\n content: string,\n parsed: ParsedFile,\n dialect: Dialect,\n target: TargetIdentity,\n file: string,\n): boolean {\n if (parsed.error) return false;\n const locals = helperLocals(parsed, dialect, file);\n const snapshot = snapshotLocal(parsed, dialect, target.slug, file);\n const shape = shapeOfPath(target.path);\n\n const indexed = splitArrayPath(target.path);\n if (indexed) {\n // The rows are read ONCE, for the array, and the row's own leaves off the row. Both halves.\n const array = escapeRegExp(JSON.stringify(indexed.array));\n const rows = locals.bcmsRows.some(\n (name) =>\n snapshot !== null &&\n new RegExp(`${identifier(name)}\\\\s*\\\\(\\\\s*${identifier(snapshot)}\\\\s*,\\\\s*${array}`).test(content),\n );\n if (!rows) return false;\n }\n\n return declaringElements(parsed.roots, content).some(\n (element) =>\n element.scope === target.scope &&\n (element.path === target.path || element.path === shape) &&\n elementReads(element.own, target, locals, snapshot),\n );\n}\n","/**\n * ONE `magic-string` pass per file. The tree is never re-serialised.\n *\n * That is the whole primitive: a parser hands over offsets, and the only thing written back is a\n * splice at those offsets. Re-printing an AST would reformat a repository the author has opinions\n * about, lose comments and directives, and make a review diff impossible to read — and a reviewer\n * who cannot read the diff cannot approve it, which is the only gate this lane has.\n */\nimport MagicString from \"magic-string\";\nimport type { BindingKind } from \"@bettercms-ai/types\";\nimport type { Dialect } from \"./dialect.js\";\nimport { DIALECT_RULES, attrsFor, layoutExpr, propsAttribute, readExpr, type AttrBinding } from \"./expr.js\";\nimport { isIntrinsic, type ImportPoint, type Range, type Site } from \"./sites/shared.js\";\n\n/** One path, one place in one file, and what to write there. */\nexport interface Rewrite {\n site: Site;\n /**\n * The receipt's path identity — `(route, scope, path)` — carried, never re-derived.\n *\n * 🔴 A PATH IS NOT AN IDENTITY. Two routes rendered by ONE file legitimately carry the same\n * path, and recovering \"which target is this?\" by path alone picks whichever one sorted first:\n * the page reads `bcmsAbout` while the file imports only `bcmsHome`, and the site does not\n * build. Every consumer below takes the answer from the rewrite it is already holding.\n */\n key: string;\n path: string;\n /** The brief's kind: \"text\" | \"richtext\" | \"image\". */\n kind: string;\n /** The copy the repo renders today, kept as the in-code fallback. */\n fallback: string;\n /** The identifier this page's snapshot is imported under. */\n snapshot: string;\n /** The page slug that snapshot belongs to. The file's import set is derived from these. */\n slug: string;\n /** Page copy, or the shared chrome — which decides the attribute AND the helper. @see expr.ts */\n scope: \"page\" | \"layout\";\n dynamic: boolean;\n /**\n * A whole span replaced by text computed elsewhere — a repeater's loop.\n *\n * The loop's own leaves were rewritten against a COPY of the row, so its bytes arrive finished;\n * splicing them here keeps every write to one file in one `magic-string` pass. @see loops.ts\n */\n raw?: string;\n /**\n * The literal half of a drilled prop: `bcmsBindings={{ title: \"hero.title\" }}` at the call site.\n *\n * Absent when hop 2 missed — the value still comes from the CMS, and nothing claims a binding\n * that does not exist. @see props.ts\n */\n bindings?: { prop: string; path: string };\n /**\n * How the call site's existing `bcmsBindings` is joined, when it has one.\n *\n * `object` merges into `{{ … }}`; `spread` wraps whatever expression is there in a new object\n * literal. A shape neither of those covers is refused by the caller before it reaches here.\n */\n bindingsMerge?: {\n kind: \"object\" | \"spread\";\n range: Range;\n inner: string;\n insertAt: number;\n /** What goes before the new members — `\", \"`, or `\" \"` when the object already ends in one. */\n separator: string;\n /** What goes after them, so an empty object closes as `{{ … }}` rather than `{{ …}}`. */\n trailing: string;\n };\n}\n\nexport interface FileImports {\n /** `bcmsHome` → `../../bcms-content/home.json`. */\n snapshots: { identifier: string; specifier: string }[];\n /** The helper module, relative to this file. Null when the dialect needs none. */\n helper: string | null;\n /** The name `bcms` is imported under here — `bcms` unless this module already binds it. */\n read: string;\n /** Every named helper this file uses, with the name it was imported under. */\n helpers: { name: string; alias: string }[];\n /** The name `bcmsLayout` is imported under here. */\n layout: string;\n /** How THIS file reads its route parameter, when it is a dynamic route. @see routes.ts */\n slug: string | null;\n /** Import lines something other than the helper needs — a route parameter's store. */\n extra?: string[];\n at: ImportPoint | undefined;\n}\n\nconst overlaps = (a: Range, b: Range): boolean => a.start < b.end && b.start < a.end;\n\n/**\n * The rewrites whose ranges collide, which is how one element ends up claimed by two paths.\n *\n * Reported rather than resolved: splicing both would corrupt the file and picking one would be a\n * coin flip the receipt could not explain. The caller drops them as `AMBIGUOUS_LITERAL` and the\n * rest of the file still converts.\n */\nexport function overlapping(rewrites: Rewrite[]): Rewrite[] {\n const out = new Set<Rewrite>();\n for (const a of rewrites) {\n for (const b of rewrites) {\n if (a.raw !== undefined || b.raw !== undefined) continue; // a loop OWNS its span\n if (a !== b && a.key !== b.key && a.site.where === \"text\" && b.site.where === \"text\" && overlaps(a.site.range, b.site.range)) {\n out.add(a);\n out.add(b);\n }\n }\n }\n return [...out];\n}\n\n/** What a single rewrite declares on its element: `data-bcms-field`, or a `data-bcms-props` entry. */\nfunction declaration(rewrite: Rewrite): { plain: string[]; props: AttrBinding[] } {\n const { site, path, kind, scope } = rewrite;\n // An element carries ONE `data-bcms-field`, so a value that lives in an attribute other than an\n // image's `src` is declared on `data-bcms-props` instead — the grammar in packages/types.\n if (site.where === \"attr\" && kind !== \"image\") {\n return { plain: [], props: [{ attr: site.attr ?? \"\", path, kind: kind as BindingKind, scope }] };\n }\n return { plain: [attrsFor(path, kind, undefined, scope)], props: [] };\n}\n\n/**\n * Apply every rewrite to one file.\n *\n * Attribute insertions are grouped by element first: an `<img>` that binds both its `src` and its\n * `alt` gets one `data-bcms-props`, not two attributes with the same name — which a browser\n * silently keeps only the first of.\n */\nexport function rewriteFile(\n content: string,\n dialect: Dialect,\n rewrites: Rewrite[],\n imports: FileImports,\n /** Edits this file needs that no binding asked for — a page component's `{ params }`. */\n extra: { start: number; end: number; text: string }[] = [],\n): string {\n const rule = DIALECT_RULES[dialect];\n const source = new MagicString(content);\n const attributes = new Map<number, { plain: string[]; props: AttrBinding[] }>();\n /** Drilled props, grouped per element so one `bcmsBindings` object holds all of them. */\n const bindings = new Map<\n number,\n { entries: { prop: string; path: string }[]; merge: Rewrite[\"bindingsMerge\"] }\n >();\n\n /**\n * 🔴 NOT NAMED `declare`. `declare` is a TypeScript contextual keyword, and a STATEMENT that\n * begins with it is an ambient declaration — which a TS-aware transform is entitled to erase\n * along with everything it declares. A call written as `addDeclaration(site.attrInsertAt, …)` is that\n * shape exactly, so under such a transform every one of these calls disappeared: the rewrite\n * still ran, the receipt still said it had bound every path, and the emitted files carried no\n * `data-bcms-*` attribute at all. Nothing failed loudly. The name is the whole defect.\n */\n const addDeclaration = (at: number, add: { plain: string[]; props: AttrBinding[] }): void => {\n const held = attributes.get(at) ?? { plain: [], props: [] };\n held.plain.push(...add.plain);\n held.props.push(...add.props);\n attributes.set(at, held);\n };\n\n for (const rewrite of rewrites) {\n const { site, path, kind, fallback, snapshot, dynamic } = rewrite;\n\n if (rewrite.raw !== undefined) {\n source.overwrite(site.range.start, site.range.end, rewrite.raw);\n continue;\n }\n\n const expression =\n rewrite.scope === \"layout\"\n ? layoutExpr(imports.layout, path, fallback)\n : readExpr(dialect, snapshot, path, kind, fallback, {\n dynamic,\n fn: imports.read,\n slug: imports.slug,\n });\n\n if (site.where === \"prop\") {\n // The call site: the VALUE comes from the CMS here, and the PATH travels with it so the\n // component can declare a binding it could not otherwise name.\n if (rule.attr && site.attrRange && site.attr) {\n source.overwrite(site.attrRange.start, site.attrRange.end, rule.attr(site.attr, expression));\n }\n if (rewrite.bindings) {\n const held = bindings.get(site.attrInsertAt) ?? { entries: [], merge: rewrite.bindingsMerge };\n held.entries.push(rewrite.bindings);\n bindings.set(site.attrInsertAt, held);\n }\n continue;\n }\n\n if (site.where === \"attr\") {\n // The value lives in an attribute. Only the dialects that can hold an expression rewrite it;\n // html declares the binding and lets `injectFields` write the value at publish time.\n if (rule.attr && site.attrRange && site.attr) {\n source.overwrite(site.attrRange.start, site.attrRange.end, rule.attr(site.attr, expression));\n }\n addDeclaration(site.attrInsertAt, declaration(rewrite));\n continue;\n }\n\n if (kind === \"richtext\") {\n // The element's children ARE the value, so they are replaced wholesale by the dialect's\n // html sink. In html they stay exactly as they are: the publisher rewrites them in place.\n //\n // 🔴 INTRINSIC ELEMENTS ONLY, AND THE GATE IS FIRST. `dangerouslySetInnerHTML` and\n // `set:html` are properties of a DOM node; on a component they are an ignored prop, and the\n // `source.remove` below would delete the children in exchange for nothing. Declaring on the\n // component instead is worse — a binding with no read, reported as rewritten. The caller\n // refuses such a site by name (`PROP_TARGET_NOT_FOUND`); this writes NOTHING rather than\n // falling through to a declaration.\n if (!isIntrinsic(site.tag)) continue;\n if (rule.richtext && site.inner) {\n source.remove(site.inner.start, site.inner.end);\n addDeclaration(site.attrInsertAt, { plain: [rule.richtext(expression), ...declaration(rewrite).plain], props: [] });\n continue;\n }\n addDeclaration(site.attrInsertAt, declaration(rewrite));\n continue;\n }\n\n if (site.mixed && site.textRange) {\n // Icon + text: the element renders more than this value, so the value gets its OWN element.\n // Wrapping is always safe; binding the parent would make a publish delete the icon.\n const inner = rule.text ? rule.text(expression) : content.slice(site.textRange.start, site.textRange.end).trim();\n source.overwrite(\n site.textRange.start,\n site.textRange.end,\n `<span ${attrsFor(path, kind, undefined, rewrite.scope)}>${inner}</span>`,\n );\n continue;\n }\n\n if (rule.text && site.inner) source.overwrite(site.inner.start, site.inner.end, rule.text(expression));\n addDeclaration(site.attrInsertAt, declaration(rewrite));\n }\n\n for (const [at, held] of attributes) {\n const text = [...held.plain, propsAttribute(held.props)].filter(Boolean).join(\" \");\n if (text) source.appendLeft(at, ` ${text}`);\n }\n\n for (const [at, held] of bindings) {\n const entries = held.entries.map((b) => `${b.prop}: ${JSON.stringify(b.path)}`).join(\", \");\n if (!held.merge) {\n source.appendLeft(at, ` bcmsBindings={{ ${entries} }}`);\n } else if (held.merge.kind === \"object\") {\n // `bcmsBindings={{ a: \"x\" }}` → `bcmsBindings={{ a: \"x\", b: \"y\" }}`, written just inside the\n // object's own closing brace.\n source.appendLeft(held.merge.insertAt, `${held.merge.separator}${entries}${held.merge.trailing}`);\n } else {\n // 🔴 THE EXISTING VALUE IS NOT AN OBJECT LITERAL — `bcmsBindings={paths}`. Splicing members\n // \"before the closing braces\" produced `bcmsBindings={path, title: \"…\"s}`: a file that does\n // not parse, from an edit that assumed a shape it never checked. Spreading keeps whatever\n // the author meant and adds this path beside it.\n source.overwrite(\n held.merge.range.start,\n held.merge.range.end,\n `bcmsBindings={{ ...${held.merge.inner}, ${entries} }}`,\n );\n }\n }\n\n for (const splice of extra) {\n if (splice.start === splice.end) source.appendLeft(splice.start, splice.text);\n else source.overwrite(splice.start, splice.end, splice.text);\n }\n\n const lines = importLines(imports);\n if (lines.length > 0 && imports.at) {\n if (imports.at.wrap) {\n source.appendLeft(imports.at.at, `${imports.at.wrap.before}${lines.join(\"\\n\")}${imports.at.wrap.after}`);\n } else if (imports.at.at === 0) source.appendLeft(0, `${lines.join(\"\\n\")}\\n`);\n else source.appendLeft(imports.at.at, `\\n${lines.join(\"\\n\")}`);\n }\n\n return source.toString();\n}\n\n/** The import statements one converted file needs, snapshots first. */\nfunction importLines(imports: FileImports): string[] {\n const lines = [...(imports.extra ?? [])];\n lines.push(...imports.snapshots.map((s) => `import ${s.identifier} from \"${s.specifier}\";`));\n if (imports.helper && imports.helpers.length > 0) {\n const named = imports.helpers\n .map((h) => (h.name === h.alias ? h.name : `${h.name} as ${h.alias}`))\n .join(\", \");\n lines.push(`import { ${named} } from \"${imports.helper}\";`);\n }\n return lines;\n}\n","/**\n * What the conversion did, and — the half that matters — what it did not.\n *\n * A codemod that silently skips a path presents as a finished conversion and fails months later,\n * when an editor changes a value and the page keeps rendering the old one. So every path in the\n * brief lands in exactly one of four buckets, and the arithmetic saying so is asserted rather than\n * believed: `declared === rewritten + alreadyDeclared + pending.length`.\n *\n * PATH IDENTITY IS `(route, scope, path)`. Occurrences are counted separately, because \"this\n * sentence appears in three files\" and \"this field is bound\" are different questions — and a path\n * is only `rewritten` when EVERY located occurrence of it was.\n */\n\nexport type PendingReason =\n | \"NO_ORIGINAL\"\n | \"NOT_IN_SOURCE\"\n | \"DIALECT_UNSUPPORTED\"\n | \"IN_EXPRESSION\"\n | \"IN_SCRIPT_OR_COMMENT\"\n | \"IN_DATA_FILE\"\n | \"AMBIGUOUS_LITERAL\"\n | \"KIND_MISMATCH\"\n | \"SUBSTRING_ONLY\"\n | \"PROP_TARGET_NOT_FOUND\"\n | \"PROP_DRILLED_DEEP\"\n | \"REPEATER_FIXED_LENGTH\"\n | \"DYNAMIC_PARAMS_UNAVAILABLE\"\n | \"BRIEF_META_UNPLACED\"\n | \"PARSE_ERROR\"\n | \"TIER3_UNVERIFIABLE\";\n\nexport interface PendingPath {\n route: string;\n scope: \"page\" | \"layout\";\n path: string;\n kind: string;\n /** The file the reason is about, when the reason is about one. */\n file?: string;\n reason: PendingReason;\n message?: string;\n}\n\n/** One file the conversion touched, and the tier that produced it. A file is exactly one tier. */\nexport interface ReceiptFile {\n path: string;\n bindings: string[];\n tier: 1 | 2 | 3;\n}\n\nexport interface ConversionReceipt {\n briefDigest: string;\n paths: {\n declared: number;\n rewritten: number;\n alreadyDeclared: number;\n pending: PendingPath[];\n };\n occurrences: { located: number; rewritten: number };\n files: ReceiptFile[];\n /** Helper modules written or upgraded, by path. */\n helpers: string[];\n helperUpgraded: boolean;\n /**\n * Bindings declared as an EXPRESSION rather than as a literal path — informative ONLY.\n *\n * 🔴 THE PROPOSER NEVER TRUSTS THIS. It re-derives every entry from its own scan of the\n * proposed files, because a receipt is a claim by the thing being checked. The list is here so\n * a reviewer can see what to look for, and so the scan has somewhere to disagree with.\n */\n dynamicBindings: DynamicBinding[];\n}\n\n/**\n * One binding whose `data-bcms-field` is an expression, and where its value is written literally.\n *\n * Two shapes produce one: a repeater's `` {`cards[${i}].title`} ``, whose call site is the loop in\n * the same file, and a drilled prop's `{bcmsBindings?.title}`, whose call sites are every place\n * the component is used with a literal in `bcmsBindings`.\n */\nexport interface DynamicBinding {\n /** The file carrying the expression. */\n file: string;\n /** The prop the expression reads, or null for a repeater. */\n prop: string | null;\n /** The path it resolves to — `cards[*].title` for a repeater, a real path for a prop. */\n path: string;\n /** Where the literal that makes it resolvable is written. */\n callSites: { file: string; literal: string }[];\n}\n\n/** Raised when the receipt does not add up. Never caught inside this package. */\nexport class ReceiptInvariantError extends Error {\n readonly code = \"RECEIPT_INVARIANT\";\n constructor(message: string) {\n super(message);\n this.name = \"ReceiptInvariantError\";\n }\n}\n\n/**\n * The invariant, checked where the receipt is built rather than where it is read.\n *\n * A path that is in none of the four buckets is a path the conversion forgot, and forgetting is\n * exactly the failure mode this whole lane exists to make impossible. Refusing here means a bug in\n * this package surfaces as a loud error on the developer's own fixture run, not as a coverage\n * meter that reads 96 % forever.\n */\nexport function assertReceipt(receipt: ConversionReceipt): ConversionReceipt {\n const { declared, rewritten, alreadyDeclared, pending } = receipt.paths;\n const sum = rewritten + alreadyDeclared + pending.length;\n if (sum !== declared) {\n throw new ReceiptInvariantError(\n `The receipt does not account for every path: ${declared} declared but ${rewritten} rewritten + ${alreadyDeclared} already declared + ${pending.length} pending = ${sum}.`,\n );\n }\n if (receipt.occurrences.rewritten > receipt.occurrences.located) {\n throw new ReceiptInvariantError(\n `More occurrences were rewritten (${receipt.occurrences.rewritten}) than were located (${receipt.occurrences.located}).`,\n );\n }\n return receipt;\n}\n\n/** What a coverage meter reads: how much of the brief this conversion actually made editable. */\nexport function coverageOf(receipt: ConversionReceipt): {\n briefDigest: string;\n declared: number;\n bound: number;\n pending: { path: string; reason: PendingReason }[];\n} {\n return {\n briefDigest: receipt.briefDigest,\n declared: receipt.paths.declared,\n bound: receipt.paths.rewritten + receipt.paths.alreadyDeclared,\n pending: receipt.paths.pending.map((p) => ({ path: p.path, reason: p.reason })),\n };\n}\n","/**\n * `.html` / `.htm` — parse5 with source locations.\n *\n * The html dialect NEVER gets an expression: a static site's values are written into the markup\n * by `injectFields` at publish time, so all this lane produces is the attributes that say which\n * element holds which path. The sites are found the same way as everywhere else, which is the\n * point of normalising the tree.\n */\nimport { parse as parseHtml, type DefaultTreeAdapterMap } from \"parse5\";\nimport {\n attrInsertAfter,\n type AttrNode,\n type ParsedFile,\n type Node,\n} from \"./shared.js\";\n\ntype P5Node = DefaultTreeAdapterMap[\"node\"];\ntype P5Element = DefaultTreeAdapterMap[\"element\"];\n\nconst RAW_TAGS = new Set([\"script\", \"style\", \"noscript\", \"template\"]);\n\nconst attrsOf = (el: P5Element, content: string): AttrNode[] => {\n const locations = el.sourceCodeLocation?.attrs ?? {};\n return el.attrs.map((attr): AttrNode => {\n const at = locations[attr.name];\n const range = at ? { start: at.startOffset, end: at.endOffset } : null;\n // The value's own characters, quotes excluded. An unquoted value ends the span itself, so the\n // closing character is checked rather than assumed — off by one here splices into the `=`.\n let valueRange: AttrNode[\"valueRange\"] = null;\n if (range && attr.value !== \"\") {\n const quoted = /[\"']/.test(content[range.end - 1] ?? \"\");\n const end = quoted ? range.end - 1 : range.end;\n valueRange = { start: end - attr.value.length, end };\n }\n return {\n name: attr.name,\n value: attr.value,\n valueRange,\n expression: false,\n range: range ?? { start: 0, end: 0 },\n };\n });\n};\n\n/**\n * One parse5 node as zero or more neutral nodes.\n *\n * ZERO OR MORE, because parse5 INVENTS elements: a fragment like `<h1>x</h1>` comes back wrapped\n * in `html`/`head`/`body` that are not in the source and therefore carry no location. Dropping\n * such a node dropped the whole document with it; passing its children through keeps the\n * traversal honest — an element nobody wrote is not an element a binding can go on.\n */\nfunction convert(node: P5Node, content: string): Node[] {\n if (node.nodeName === \"#text\") {\n const text = node as DefaultTreeAdapterMap[\"textNode\"];\n const at = text.sourceCodeLocation;\n if (!at) return [];\n return [{ type: \"text\", range: { start: at.startOffset, end: at.endOffset }, value: text.value }];\n }\n if (node.nodeName === \"#comment\") {\n const comment = node as DefaultTreeAdapterMap[\"commentNode\"];\n const at = comment.sourceCodeLocation;\n if (!at) return [];\n return [{ type: \"comment\", range: { start: at.startOffset, end: at.endOffset }, value: comment.data }];\n }\n if (!(\"tagName\" in node)) return [];\n\n const el = node as P5Element;\n const at = el.sourceCodeLocation;\n if (!at?.startTag) return el.childNodes.flatMap((child) => convert(child, content));\n const start = at.startOffset;\n const attrs = attrsOf(el, content);\n // parse5's own offsets: the last attribute's end, or the end of the tag name.\n const insertAt = attrInsertAfter(attrs, start, el.tagName);\n const inner = at.endTag\n ? { start: at.startTag.endOffset, end: at.endTag.startOffset }\n : null;\n\n return [\n {\n type: \"element\",\n tag: el.tagName,\n start,\n attrInsertAt: insertAt,\n inner,\n attrs,\n children: el.childNodes.flatMap((child) => convert(child, content)),\n raw: RAW_TAGS.has(el.tagName),\n },\n ];\n}\n\nexport function parse(content: string): ParsedFile {\n try {\n const doc = parseHtml(content, { sourceCodeLocationInfo: true });\n return { roots: doc.childNodes.flatMap((child) => convert(child, content)) };\n } catch (error) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: (error as Error).message } };\n }\n}\n","/**\n * `.astro` — `@astrojs/compiler`'s `parse`, with two of its positions distrusted.\n *\n * Verified against the fixtures, not assumed:\n * - a TEXT node's `position.end` is right, but it is recomputed from `start + value.length`\n * anyway, because the compiler reports no end at all on some node kinds and a missing end\n * silently becomes `NaN` in an offset calculation;\n * - an ELEMENT's `position.end` is WRONG for self-closing tags (`<img … />` came back as a\n * point six characters in), so the open tag is found by scanning and the closing tag by\n * subtracting `</name>` from the reported end — which is right precisely for the elements\n * that have one.\n */\nimport { parse } from \"@astrojs/compiler\";\nimport { parse as parseScript } from \"@babel/parser\";\nimport {\n attrInsertAfter,\n type AttrNode,\n type ParsedFile,\n type Node,\n} from \"./shared.js\";\n\n/** The compiler's node shape, narrowed to what is read here. */\ninterface AstroNode {\n type: string;\n name?: string;\n value?: string;\n attributes?: {\n type: string;\n kind: string;\n name: string;\n value: string;\n raw?: string;\n position?: { start?: { offset?: number } };\n }[];\n children?: AstroNode[];\n position?: { start?: { offset?: number }; end?: { offset?: number } };\n}\n\nconst RAW_TAGS = new Set([\"script\", \"style\"]);\n\n/** Trim back over whitespace: the next attribute's start is not this one's end. */\nconst backOverSpace = (content: string, at: number): number => {\n let end = at;\n while (end > 0 && /\\s/.test(content[end - 1]!)) end--;\n return end;\n};\n\n/**\n * Where one attribute's bytes stop, from what the compiler already knows.\n *\n * Three shapes, in the order they are certain: a NEXT attribute bounds this one absolutely; a\n * QUOTED value's `raw` is its exact source text; an EXPRESSION's `value` is the text the compiler\n * parsed from between the braces, so it is found in the source and the `}` after it closes the\n * attribute. Nothing here scans for a matching brace, so a comment or a string inside the\n * expression cannot move the answer.\n */\nfunction attrEnd(\n content: string,\n attr: { name: string; value: string; raw?: string; kind: string },\n start: number,\n nextStart: number | undefined,\n): number {\n if (nextStart !== undefined) return backOverSpace(content, nextStart);\n\n const afterName = start + attr.name.length;\n /**\n * `{...props}` and `{title}` — the compiler reports the NAME's offset and no text at all.\n *\n * 🔴 THE NAME IS NOT THE ATTRIBUTE. For a spread the reported start is the `p` of `props`, four\n * characters into `{...props}`, and `value` and `raw` are both empty — so \"the end is after the\n * name\" landed on the closing brace, and an attribute inserted at \"after the last attribute\"\n * was written INSIDE it: `<h1 {...props data-bcms-field=\"…\"}>`. The brace that closes the\n * shorthand is the end, and it is the next one after the name.\n */\n if (attr.kind === \"spread\" || attr.kind === \"shorthand\") {\n const close = content.indexOf(\"}\", afterName);\n return close < 0 ? afterName : close + 1;\n }\n if (attr.kind === \"quoted\" && attr.raw) {\n const at = content.indexOf(attr.raw, afterName);\n return at < 0 ? afterName : at + attr.raw.length;\n }\n // Valueless (`disabled`), or a shorthand the compiler gives no text for.\n if (attr.value === \"\") return afterName;\n\n const open = content.indexOf(\"{\", afterName);\n if (open < 0) return afterName;\n const at = content.indexOf(attr.value, open);\n if (at < 0) return afterName;\n let close = at + attr.value.length;\n while (close < content.length && /\\s/.test(content[close]!)) close++;\n return content[close] === \"}\" ? close + 1 : afterName;\n}\n\n/**\n * The braces of `{expr}`, from the compiler's own child positions.\n *\n * 🔴 THE COMPILER'S EXPRESSION POSITION IS NOT THE EXPRESSION. On `<h1>{title}</h1>` it reports a\n * span starting at the `>` of the open tag and running past `</h1>` — so a caller asking \"what\n * does this expression say?\" was handed `>{title}</h1>`, and prop drilling could not recognise the\n * element that renders the prop. What IS reliable is the expression's parsed CHILDREN: a simple\n * `{title}` has one text child whose start and text give both braces, with no brace matching and\n * therefore nothing a comment or a string can move. An expression containing MARKUP keeps the\n * reported end — its text is a program's, and nothing reads it.\n */\nfunction expressionSpan(node: AstroNode, content: string, start: number, reportedEnd: number): { start: number; end: number } {\n const children = node.children ?? [];\n const only = children.length === 1 ? children[0] : undefined;\n const childStart = only?.type === \"text\" ? only.position?.start?.offset : undefined;\n if (childStart === undefined || only?.value === undefined) return { start, end: reportedEnd };\n\n const open = content.lastIndexOf(\"{\", childStart);\n if (open < start - 1 || open < 0) return { start, end: reportedEnd };\n let close = childStart + only.value.length;\n while (close < content.length && /\\s/.test(content[close]!)) close++;\n return content[close] === \"}\" ? { start: open, end: close + 1 } : { start, end: reportedEnd };\n}\n\n/** `frontmatter` is TypeScript, `doctype` is not copy. Neither can hold a binding. */\nconst IGNORED = new Set([\"frontmatter\", \"doctype\"]);\n\nfunction attrsOf(node: AstroNode, content: string): AttrNode[] {\n const attributes = node.attributes ?? [];\n return attributes.flatMap((attr, at): AttrNode[] => {\n const start = attr.position?.start?.offset;\n if (start === undefined) return [];\n const raw = attr.raw ?? \"\";\n /**\n * 🔴 THE SPAN COMES OFF THE AST, NOT OFF A BRACE SCANNER.\n *\n * The compiler reports an attribute's START and its parsed VALUE, and no end. Reconstructing\n * the end by matching braces means modelling the grammar inside them, and a scanner that gets\n * `class={/* } *\\/ \"a\"}` wrong writes an attribute into the middle of someone's tag. The value\n * the compiler already parsed is the answer: find it once, and the `}` after it is the end.\n * The NEXT attribute's start bounds it, which is the one fact no expression can move.\n */\n const end = attrEnd(content, attr, start, attributes[at + 1]?.position?.start?.offset);\n const range = { start, end };\n // `kind` is the compiler's own word for how the value was written; only a quoted one is a\n // literal this codemod may match or replace.\n const quoted = attr.kind === \"quoted\";\n const rawStart = quoted ? content.indexOf(raw, start) : -1;\n const unquoted = raw.length === attr.value.length;\n return [\n {\n name: attr.name,\n value: attr.value,\n valueRange:\n quoted && rawStart >= 0 && attr.value !== \"\"\n ? { start: rawStart + (unquoted ? 0 : 1), end: rawStart + raw.length - (unquoted ? 0 : 1) }\n : null,\n expression: !quoted,\n range,\n },\n ];\n });\n}\n\n/** Zero or more neutral nodes. @see ./html.ts for why a node without a position is transparent. */\nfunction convert(node: AstroNode, content: string): Node[] {\n if (IGNORED.has(node.type)) return [];\n const start = node.position?.start?.offset;\n if (start === undefined) return (node.children ?? []).flatMap((child) => convert(child, content));\n\n if (node.type === \"text\") {\n const value = node.value ?? \"\";\n return [{ type: \"text\", range: { start, end: start + value.length }, value }];\n }\n if (node.type === \"comment\") {\n const value = node.value ?? \"\";\n // `<!--` + body + `-->`; the compiler reports the body only.\n return [{ type: \"comment\", range: { start, end: start + value.length + 7 }, value }];\n }\n if (node.type === \"expression\") {\n const span = expressionSpan(node, content, start, node.position?.end?.offset ?? start);\n return [\n {\n type: \"expr\",\n range: span,\n value: content.slice(span.start, span.end),\n // Markup inside an expression — a `.map(…)` body — is invisible to the matcher and\n // visible to the declaration walk. @see shared.ts\n children: (node.children ?? []).flatMap((child) => convert(child, content)),\n },\n ];\n }\n if (node.type !== \"element\" && node.type !== \"component\" && node.type !== \"custom-element\") return [];\n\n const tag = node.name ?? \"\";\n const children = (node.children ?? []).flatMap((child) => convert(child, content));\n const attrs = attrsOf(node, content);\n // The compiler's own offsets: the last attribute's end, or the end of the tag name. Scanning for\n // the `>` would have to model the grammar, and an escaped quote is where that goes wrong.\n const insertAt = attrInsertAfter(attrs, start, tag);\n const closeTag = `</${tag}>`;\n const reportedEnd = node.position?.end?.offset;\n const closes =\n reportedEnd !== undefined && content.slice(reportedEnd - closeTag.length, reportedEnd) === closeTag;\n const inner = closes\n ? { start: content.indexOf(\">\", insertAt) + 1, end: reportedEnd! - closeTag.length }\n : null;\n\n return [\n {\n type: \"element\",\n tag,\n start,\n attrInsertAt: insertAt,\n inner,\n attrs,\n children,\n raw: RAW_TAGS.has(tag),\n },\n ];\n}\n\nexport async function parseFile(content: string): Promise<ParsedFile> {\n let top: AstroNode[];\n try {\n const result = await parse(content, { position: true });\n top = (result.ast as AstroNode).children ?? [];\n } catch (error) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: (error as Error).message } };\n }\n const roots = top.flatMap((child) => convert(child, content));\n // Frontmatter TOP: an import added under the opening fence runs before anything the page\n // already computes, so a helper call in the markup can never read an identifier that is not\n // there yet. A page with no fence gets one opened for it.\n const frontmatter = top.find((c) => c.type === \"frontmatter\");\n const fence = frontmatter?.position?.start?.offset;\n return {\n roots,\n importAt: fence === undefined ? { at: 0, wrap: { before: \"---\\n\", after: \"\\n---\\n\" } } : { at: fence + 3 },\n // The frontmatter IS the module: `Astro.props` is destructured there, a `Props` interface is\n // declared there, and both are TypeScript a babel parse can read.\n script:\n fence === undefined || frontmatter?.value === undefined\n ? undefined\n : { code: frontmatter.value, offset: fence + 3 },\n // TypeScript, not TSX: astro frontmatter has no JSX, and the jsx plugin would read a generic\n // arrow (`<T,>() => …`) as an element. A frontmatter that will not parse is not a broken\n // page — the markup still converts — so the failure is an absent AST, never an error.\n ast: frontmatter?.value === undefined ? undefined : tryParse(frontmatter.value),\n };\n}\n\nfunction tryParse(code: string): unknown {\n try {\n return parseScript(code, { sourceType: \"module\", plugins: [\"typescript\"] });\n } catch {\n return undefined;\n }\n}\n","/**\n * `.svelte` — `svelte/compiler`'s `parse`, in its modern AST.\n *\n * The compiler is honest about offsets in a way the others are not: every node carries `start` and\n * `end` over the original source, and an attribute's value is a list of nodes with their own\n * spans. So this file reads positions rather than reconstructing them, and the only two things it\n * derives are the ones no AST states — where an open tag's `>` is, and where a close tag begins —\n * both of which follow from the element's own end and its name.\n *\n * `{expr}` is an `ExpressionTag`, which normalises to the neutral tree's `expr`: copy inside an\n * expression is a program's, so the matcher ignores it and the declaration walk descends into it.\n */\nimport { parse } from \"svelte/compiler\";\nimport { attrInsertAfter, type AttrNode, type Node, type ParsedFile } from \"./shared.js\";\n\n/** Only what is read here. @see sites/jsx.ts for the same narrowing, for the same reason. */\ninterface SvelteNode {\n type: string;\n name?: string;\n start?: number;\n end?: number;\n data?: string;\n raw?: string;\n value?: unknown;\n attributes?: SvelteNode[];\n fragment?: { nodes?: SvelteNode[] };\n nodes?: SvelteNode[];\n [key: string]: unknown;\n}\n\nconst RAW_TAGS = new Set([\"script\", \"style\"]);\n\n/** An attribute's literal value nodes, when every one of them is text. */\nfunction literalValue(attr: SvelteNode): { value: string; range: { start: number; end: number } } | null {\n const parts = Array.isArray(attr.value) ? (attr.value as SvelteNode[]) : [];\n if (parts.length === 0 || parts.some((part) => part.type !== \"Text\")) return null;\n const start = parts[0]!.start ?? 0;\n const end = parts[parts.length - 1]!.end ?? start;\n return { value: parts.map((part) => String(part.data ?? part.raw ?? \"\")).join(\"\"), range: { start, end } };\n}\n\nfunction attrsOf(node: SvelteNode): AttrNode[] {\n return (node.attributes ?? []).flatMap((attr): AttrNode[] => {\n /**\n * 🔴 EVERY ATTRIBUTE, INCLUDING THE ONES THIS PACKAGE WILL NEVER TOUCH.\n *\n * Spreads, `use:` actions, `on:` handlers and `class:active={count > 0}` name nothing to\n * match and nothing to rewrite — but they occupy BYTES, and the open tag's end is derived\n * from where the last attribute stops. Dropping them put that boundary before them, so the\n * `>` inside `{count > 0}` was read as the end of the tag and a declaration was written into\n * the middle of a directive. Kept as expression-valued, which the matcher ignores by rule.\n */\n const name = typeof attr.name === \"string\" ? attr.name : attr.type;\n const range = { start: attr.start ?? 0, end: attr.end ?? 0 };\n if (attr.type !== \"Attribute\") {\n return [{ name: `\\u0000${name}`, value: \"\", valueRange: null, expression: true, range }];\n }\n const literal = literalValue(attr);\n return [\n {\n name,\n value: literal?.value ?? \"\",\n valueRange: literal && literal.value !== \"\" ? literal.range : null,\n expression: literal === null,\n range,\n },\n ];\n });\n}\n\n/**\n * The markup under a node, wherever this AST keeps it.\n *\n * An element keeps its children in `fragment`; a BLOCK keeps them in a branch — `{#each}` in\n * `body`, `{#if}` in `consequent`/`alternate`, `{#await}` in `pending`/`then`/`catch`. Reading only\n * `fragment` made every element inside a block invisible, which is how a loop this package itself\n * wrote came back as unconverted markup on the next run.\n */\nfunction childrenOf(node: SvelteNode): SvelteNode[] {\n const branches = [\"fragment\", \"body\", \"consequent\", \"alternate\", \"pending\", \"then\", \"catch\", \"fallback\"];\n const out: SvelteNode[] = Array.isArray(node.nodes) ? (node.nodes as SvelteNode[]) : [];\n for (const branch of branches) {\n const held = node[branch] as { nodes?: SvelteNode[] } | undefined;\n if (held?.nodes) out.push(...held.nodes);\n }\n return out;\n}\n\nconst ELEMENTS = new Set([\"RegularElement\", \"Component\", \"SvelteElement\", \"SvelteComponent\", \"SlotElement\", \"TitleElement\"]);\n\nfunction convert(node: SvelteNode, content: string): Node[] {\n if (node.type === \"Text\") {\n const start = node.start ?? 0;\n return [{ type: \"text\", range: { start, end: node.end ?? start }, value: String(node.data ?? node.raw ?? \"\") }];\n }\n if (node.type === \"Comment\") {\n const start = node.start ?? 0;\n return [{ type: \"comment\", range: { start, end: node.end ?? start }, value: String(node.data ?? \"\") }];\n }\n if (node.type === \"ExpressionTag\" || node.type === \"HtmlTag\") {\n const start = node.start ?? 0;\n const end = node.end ?? start;\n return [{ type: \"expr\", range: { start, end }, value: content.slice(start, end), children: [] }];\n }\n // A block (`{#each}`, `{#if}`, `{#await}`) is a program's structure: its branches hold markup,\n // which is kept, but the block itself is not an element a binding can sit on.\n if (node.type.endsWith(\"Block\") || node.type === \"Fragment\") {\n return childrenOf(node).flatMap((child) => convert(child, content));\n }\n if (!ELEMENTS.has(node.type)) return [];\n\n const tag = node.name ?? \"\";\n const start = node.start ?? 0;\n const end = node.end ?? start;\n const attrs = attrsOf(node);\n const insertAt = attrInsertAfter(attrs, start, tag);\n const close = `</${tag}>`;\n const closes = content.slice(end - close.length, end) === close;\n\n return [\n {\n type: \"element\",\n tag,\n start,\n attrInsertAt: insertAt,\n inner: closes ? { start: content.indexOf(\">\", insertAt) + 1, end: end - close.length } : null,\n attrs,\n children: childrenOf(node).flatMap((child) => convert(child, content)),\n raw: RAW_TAGS.has(tag),\n },\n ];\n}\n\nexport function parseFile(content: string): ParsedFile {\n let ast: SvelteNode;\n try {\n ast = parse(content, { modern: true }) as unknown as SvelteNode;\n } catch (error) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: (error as Error).message } };\n }\n\n const roots = childrenOf(ast.fragment as SvelteNode).flatMap((child) => convert(child, content));\n const instance = ast.instance as { content?: { start?: number; end?: number }; start?: number } | undefined;\n const program = instance?.content;\n\n return {\n roots,\n /**\n * TOP OF `<script>`, or a `<script>` opened for the file.\n *\n * The instance script runs before the markup renders, so an import added at the top of it is\n * in scope everywhere a binding can appear. A component with no script gets one, because the\n * alternative — putting an import in the markup — is not Svelte.\n */\n importAt:\n program?.start === undefined\n ? { at: 0, wrap: { before: \"<script>\\n\", after: \"\\n</script>\\n\\n\" } }\n : { at: program.start },\n /**\n * The instance script's ESTree program, wrapped the way babel wraps one.\n *\n * 🔴 THE WRAPPER NEEDS A `type`. Every walker in this package starts by asking a node what it\n * is and stops when the answer is not a string — so a bare `{ program }` was walked no further\n * than its first line, and this file's imports were invisible: no helper resolved, and a file\n * this package had already converted looked untouched on the next run.\n */\n ast: program ? { type: \"File\", program } : undefined,\n };\n}\n","/**\n * `.vue` — `@vue/compiler-sfc`'s `parse`, over the `<template>` block only.\n *\n * The descriptor splits the file into blocks and hands the template back with an AST whose every\n * node carries a `loc` in the ORIGINAL file's coordinates, which is what lets one `magic-string`\n * pass cover the whole file. `<script setup>` is read for its own span so an import can be added\n * at the top of it.\n *\n * Vue is the one dialect whose loop is an ATTRIBUTE rather than a wrapper (`v-for` on the row),\n * and the one whose expression attributes are `:name=\"expr\"`. Both are rows in `DIALECT_RULES`,\n * so nothing here knows about either.\n */\nimport { parse } from \"@vue/compiler-sfc\";\nimport { parse as parseScript } from \"@babel/parser\";\nimport { attrInsertAfter, type AttrNode, type Node, type ParsedFile } from \"./shared.js\";\n\n/** The compiler's node kinds, by the numbers its AST uses. */\nconst ROOT = 0;\nconst ELEMENT = 1;\nconst TEXT = 2;\nconst COMMENT = 3;\nconst INTERPOLATION = 5;\nconst ATTRIBUTE = 6;\nconst DIRECTIVE = 7;\n\ninterface Loc {\n start?: { offset?: number };\n end?: { offset?: number };\n}\n\ninterface VueNode {\n type: number;\n tag?: string;\n content?: unknown;\n loc?: Loc;\n props?: VueProp[];\n children?: VueNode[];\n isSelfClosing?: boolean;\n}\n\ninterface VueProp {\n type: number;\n name?: string;\n loc?: Loc;\n value?: { content?: string; loc?: Loc };\n /** A directive's argument — the attribute `:data-bcms-field` actually binds. */\n arg?: { content?: string };\n}\n\nconst RAW_TAGS = new Set([\"script\", \"style\"]);\n\nconst spanOf = (loc: Loc | undefined): { start: number; end: number } => ({\n start: loc?.start?.offset ?? 0,\n end: loc?.end?.offset ?? loc?.start?.offset ?? 0,\n});\n\nfunction attrsOf(node: VueNode): AttrNode[] {\n return (node.props ?? []).flatMap((prop): AttrNode[] => {\n /**\n * A `v-bind` DIRECTIVE is an attribute whose value is an expression — `:data-bcms-field=\"…\"`.\n *\n * It is never matched against a literal and never overwritten in place, but it has to be SEEN:\n * a repeater's binding is written in exactly this form, and a parser that discards directives\n * reports the file as undeclared and converts it a second time.\n */\n if (prop.type === DIRECTIVE && prop.name === \"bind\" && prop.arg?.content) {\n return [\n {\n name: prop.arg.content,\n value: \"\",\n valueRange: null,\n expression: true,\n range: spanOf(prop.loc),\n },\n ];\n }\n /**\n * 🔴 EVERY OTHER DIRECTIVE IS KEPT TOO, for its SPAN. `v-if=\"count > 0\"` and `@click=\"a > b\"`\n * name nothing this package writes, but the open tag's end comes from where the last\n * attribute stops — and dropping them put that boundary before the `>` inside the\n * expression, which was then read as the end of the tag.\n */\n if (prop.type !== ATTRIBUTE || typeof prop.name !== \"string\") {\n return [\n {\n name: `\\u0000${prop.name ?? \"directive\"}`,\n value: \"\",\n valueRange: null,\n expression: true,\n range: spanOf(prop.loc),\n },\n ];\n }\n const range = spanOf(prop.loc);\n const value = prop.value?.content ?? \"\";\n // The value's `loc` covers its quotes, which are one character each.\n const quoted = prop.value ? spanOf(prop.value.loc) : null;\n return [\n {\n name: prop.name,\n value,\n valueRange: quoted && value !== \"\" ? { start: quoted.start + 1, end: quoted.end - 1 } : null,\n expression: false,\n range,\n },\n ];\n });\n}\n\nfunction convert(node: VueNode, content: string): Node[] {\n if (node.type === TEXT) {\n return [{ type: \"text\", range: spanOf(node.loc), value: String(node.content ?? \"\") }];\n }\n if (node.type === COMMENT) {\n return [{ type: \"comment\", range: spanOf(node.loc), value: String(node.content ?? \"\") }];\n }\n if (node.type === INTERPOLATION) {\n const range = spanOf(node.loc);\n return [{ type: \"expr\", range, value: content.slice(range.start, range.end), children: [] }];\n }\n if (node.type === ROOT) return (node.children ?? []).flatMap((child) => convert(child, content));\n if (node.type !== ELEMENT) return [];\n\n const tag = node.tag ?? \"\";\n const { start, end } = spanOf(node.loc);\n const attrs = attrsOf(node);\n const insertAt = attrInsertAfter(attrs, start, tag);\n const close = `</${tag}>`;\n const closes = !node.isSelfClosing && content.slice(end - close.length, end) === close;\n\n return [\n {\n type: \"element\",\n tag,\n start,\n attrInsertAt: insertAt,\n inner: closes ? { start: content.indexOf(\">\", insertAt) + 1, end: end - close.length } : null,\n attrs,\n children: (node.children ?? []).flatMap((child) => convert(child, content)),\n raw: RAW_TAGS.has(tag),\n },\n ];\n}\n\nexport function parseFile(content: string): ParsedFile {\n let descriptor: ReturnType<typeof parse>[\"descriptor\"];\n let errors: unknown[];\n try {\n ({ descriptor, errors } = parse(content));\n } catch (error) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: (error as Error).message } };\n }\n if (errors.length > 0) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: String((errors[0] as Error).message ?? errors[0]) } };\n }\n const template = descriptor.template as { ast?: VueNode } | null;\n if (!template?.ast) {\n return { roots: [], error: { code: \"PARSE_ERROR\", message: \"This single-file component has no <template> block.\" } };\n }\n\n const roots = convert(template.ast, content);\n const script = descriptor.scriptSetup ?? descriptor.script;\n const at = script?.loc?.start?.offset;\n\n return {\n roots,\n /**\n * TOP OF `<script setup>`, or a `<script setup>` opened for the file.\n *\n * Setup runs before the template renders, so an import at the top of it is in scope for every\n * expression the template holds.\n */\n importAt:\n at === undefined\n ? { at: 0, wrap: { before: \"<script setup>\\n\", after: \"\\n</script>\\n\\n\" } }\n : { at },\n script: script ? { code: script.content, offset: at ?? 0 } : undefined,\n // The setup block IS the module: its imports are what say whether `bcms` in the template is\n // this package's helper or the project's own utility. A block that will not parse is not a\n // broken component — the template still converts — so the failure is an absent AST.\n ast: script ? tryParse(script.content) : undefined,\n };\n}\n\nfunction tryParse(code: string): unknown {\n try {\n return parseScript(code, { sourceType: \"module\", plugins: [\"typescript\"] });\n } catch {\n return undefined;\n }\n}\n","/** One entry point per dialect, chosen by a table rather than by a chain of ifs. */\nimport type { Dialect } from \"../dialect.js\";\nimport { collectSites, type FindSitesResult, type ParsedFile } from \"./shared.js\";\nimport { parse as html } from \"./html.js\";\nimport { parseFile as astro } from \"./astro.js\";\nimport { parse as jsx } from \"./jsx.js\";\nimport { parseFile as svelte } from \"./svelte.js\";\nimport { parseFile as vue } from \"./vue.js\";\n\ntype Parser = (content: string) => ParsedFile | Promise<ParsedFile>;\n\nexport const PARSE_FILE: Record<Dialect, Parser> = { html, astro, jsx, svelte, vue };\n\n/**\n * ONE parse of one file, in the dialect's own parser. A parser that refuses returns an error on\n * the result; it never throws at the caller, because a refusal SELECTS the next tier.\n */\nexport const parseFile = (dialect: Dialect, content: string): Promise<ParsedFile> =>\n Promise.resolve(PARSE_FILE[dialect](content));\n\n/** Tier 1 for one file: parse, then match. */\nexport const findSites = async (\n dialect: Dialect,\n content: string,\n literals: string[],\n): Promise<FindSitesResult> => {\n const parsed = await parseFile(dialect, content);\n return parsed.error\n ? { sites: [], error: parsed.error }\n : { sites: collectSites(parsed.roots, literals), importAt: parsed.importAt };\n};\n","/**\n * Tier 2: what can still be done for a file no parser would read.\n *\n * A template with a syntax error, or a dialect this build cannot parse, still has its copy sitting\n * between a `>` and a `<`. That is enough to place a binding — and ONLY when the literal occurs\n * exactly once in the file, because without a tree there is nothing to tell two copies apart and\n * a wrong guess splices bytes into the middle of someone's markup.\n *\n * Everything this tier cannot answer is left to tier 3 or reported as pending. It never widens\n * its own rules to cover one more case: the whole reason it is allowed to run on an unparsable\n * file is that its rule is narrow enough to be obviously safe.\n */\nimport { norm, openTagEnd, type Site } from \"./sites/shared.js\";\n\nconst escape = (value: string): string => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n\n/** The literal as it may appear in a wrapped, indented template: every space run is any run. */\nconst flexible = (literal: string): RegExp =>\n new RegExp(escape(literal).split(\" \").map(escape).join(\"\\\\s+\"), \"gu\");\n\nexport function findSitesTolerant(content: string, literals: string[]): Site[] {\n const source = content.normalize(\"NFC\");\n const sites: Site[] = [];\n\n for (const raw of literals) {\n const literal = norm(raw);\n if (!literal) continue;\n const matches = [...source.matchAll(flexible(literal))];\n // EXACTLY ONE. Two occurrences and this tier has no way to say which element is which.\n if (matches.length !== 1) continue;\n\n const match = matches[0]!;\n const start = match.index;\n const end = start + match[0].length;\n // The text-node context, verified rather than assumed: the first non-space character before\n // the match must close a tag and the first one after must open one, so the match is the whole\n // of an element's text and not a fragment of a longer sentence.\n const before = source.slice(0, start).replace(/\\s+$/, \"\");\n const after = source.slice(end).replace(/^\\s+/, \"\");\n if (!before.endsWith(\">\") || !after.startsWith(\"<\")) continue;\n\n const openStart = source.lastIndexOf(\"<\", before.length - 1);\n if (openStart < 0) continue;\n const tag = source.slice(openStart + 1, before.length).match(/^([A-Za-z][\\w:.-]*)/)?.[1] ?? \"\";\n if (!tag) continue;\n\n sites.push({\n file: \"\",\n tag,\n attrInsertAt: openTagEnd(source, openStart),\n range: { start, end },\n inner: { start, end },\n where: \"text\",\n scope: \"page\",\n existingAttrs: {},\n mixed: false,\n textRange: { start, end },\n literal,\n partial: false,\n ancestors: [],\n siblingIndex: 0,\n });\n }\n return sites;\n}\n","/**\n * Which files in a repository can possibly render a page's copy.\n *\n * ONE list, shared by the CLI (which walks a working tree) and by the server lane's `acquire.ts`\n * (which walks a GitHub tree). They were two copies of the same three arrays; a file kind added\n * to one and not the other means the two lanes convert different sites from the same repository,\n * and nothing would say so.\n */\n\n/** Directories that never hold a template a human wrote. */\nexport const SKIP_DIRS = [\n \"node_modules/\",\n \"dist/\",\n \"build/\",\n \".git/\",\n \".github/\",\n \".next/\",\n \".astro/\",\n \".output/\",\n \".svelte-kit/\",\n \".vercel/\",\n \".cache/\",\n \"coverage/\",\n \"vendor/\",\n];\n\n/** Generated or machine-owned files. A lockfile can contain anything and means nothing. */\nexport const SKIP_FILES = [\"package-lock.json\", \"bun.lock\", \"bun.lockb\", \"yarn.lock\", \"pnpm-lock.yaml\"];\n\n/**\n * Extensions that can render copy. Everything else — images, fonts, data — is skipped unread.\n *\n * Wider than the five dialects the codemod can rewrite, deliberately: a literal that lives only\n * in an `.md` or a `.liquid` has to be REPORTED as `DIALECT_UNSUPPORTED`, and a file nobody\n * opened cannot be reported at all.\n */\nexport const SOURCE_EXTENSIONS = [\n \".astro\", \".html\", \".htm\", \".jsx\", \".tsx\", \".js\", \".mjs\", \".cjs\", \".ts\",\n \".svelte\", \".vue\", \".md\", \".mdx\", \".njk\", \".hbs\", \".ejs\", \".liquid\", \".erb\", \".twig\",\n];\n\n/** Is this repository-relative path a file worth opening? */\nexport function isSourceCandidate(path: string): boolean {\n const lower = path.toLowerCase();\n if (SKIP_DIRS.some((dir) => lower === dir.slice(0, -1) || lower.startsWith(dir) || lower.includes(`/${dir}`)))\n return false;\n if (SKIP_FILES.includes(lower.split(\"/\").pop() ?? \"\")) return false;\n return SOURCE_EXTENSIONS.some((ext) => lower.endsWith(ext));\n}\n"],"mappings":";;;AAWA,SAAS,SAAS,UAAU,WAAW,OAAO,YAAY;AAC1D,SAAS,SAAS,QAAAA,OAAM,UAAU,SAAS,WAAW;;;ACGtD,OAAOC,kBAAiB;;;ACNxB,SAAS,kBAAkB;AA0EpB,SAAS,YAAY,OAAsB;AAChD,QAAM,QAAQ,MAAM,MACjB;AAAA,IAAQ,CAAC,SACR,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,KAAK,GAAG,CAAC;AAAA,EAChF,EACC,KAAK;AACR,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AAK,SAAS,WAAW,KAAK,iBAAiB,OAAO;AAChE,YAAQ,OAAO,MAAM,GAAG,MAAM,KAAK;AAAA,CAAI;AAAA,EACzC;AACA,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":["join","MagicString","createHash","createHash","text","attrsOf","declaration","FUNCTIONS","declaration","MagicString","MagicString","attrsOf","convert","at","parse","parse","RAW_TAGS","close","at","attrsOf","convert","parse","tryParse","parse","RAW_TAGS","attrsOf","convert","start","end","parseFile","parse","parse","parseScript","RAW_TAGS","attrsOf","convert","parseFile","parse","tryParse","parseScript","parse","parseFile","escapeRegExp","parseFile","MagicString","plan","helper","join"]}