{"version":3,"file":"scan.cjs","names":[],"sources":["../../../src/scan/scan.ts"],"sourcesContent":["import { readdir, readFile } from \"node:fs/promises\";\nimport { join, relative } from \"node:path\";\nimport { parse, parseSync } from \"oxc-parser\";\n\nimport { DEFAULT_IGNORE, HTTP_VERBS, ROUTE_VERB_PATTERN } from \"../constants.js\";\nimport type { ExtensionOption } from \"../config.js\";\nimport { ScanError, ScanErrorCollection } from \"../support/errors.js\";\nimport { toPosixPath } from \"../support/paths.js\";\nimport type {\n  GeneratedModel,\n  HttpVerb,\n  LayoutFile,\n  RouteEntry,\n  RouteFileMethod,\n  RouteMethodEntry,\n  ScanResult,\n} from \"../types.js\";\nimport {\n  assertPhysicalRouteFile,\n  buildUrlPath,\n  getMethodFromRouteFile,\n  importPathFromRouteRel,\n  isHttpVerb,\n  isLayoutFile,\n  isRouteFile,\n  layoutIdFromPath,\n  layoutImportName,\n  layoutImportPathFromRouteRel,\n  layoutParentId,\n  normalizeRouteRel,\n  routeImportName,\n  routeLayoutChain,\n  routePathWithoutVerb,\n  shouldIgnoreRoutePath,\n} from \"./paths.js\";\nimport type { AnalysisCache } from \"./cache.js\";\n\ntype OxcNode = {\n  type: string;\n  [key: string]: unknown;\n};\n\nexport type ParseRouteSourceResult = {\n  errors: ScanError[];\n  methods?: HttpVerb[];\n};\n\nexport function createRouteFactoryName(method: RouteFileMethod): string {\n  if (method === \"ANY\") return \"t.any\";\n  if (method === \"ALL\") return \"t.all\";\n  return `t.${method.toLowerCase()}`;\n}\n\nfunction expectedFactoryMember(method: RouteFileMethod): string {\n  if (method === \"ANY\") return \"any\";\n  if (method === \"ALL\") return \"all\";\n  return method.toLowerCase();\n}\n\nfunction isIdentifier(node: OxcNode | undefined, name?: string): boolean {\n  return node?.type === \"Identifier\" && (name === undefined || node.name === name);\n}\n\nfunction isMemberExpression(node: OxcNode | undefined): node is OxcNode & {\n  object: OxcNode;\n  property: OxcNode;\n} {\n  return node?.type === \"MemberExpression\";\n}\n\nfunction isTFactoryCall(node: OxcNode, member: string): boolean {\n  if (!isMemberExpression(node)) return false;\n  if (!isIdentifier(node.object, \"t\")) return false;\n  return isIdentifier(node.property, member);\n}\n\nfunction isFactoryCall(node: OxcNode, member: string): boolean {\n  return isTFactoryCall(node, member);\n}\n\nfunction hasExportDefault(program: OxcNode): boolean {\n  const body = program.body as OxcNode[] | undefined;\n  if (!body) return false;\n\n  for (const statement of body) {\n    if (statement.type === \"ExportDefaultDeclaration\") {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction forEachTopLevelCall(program: OxcNode, callback: (callNode: OxcNode) => void): void {\n  const body = program.body as OxcNode[] | undefined;\n  if (!body) return;\n\n  function checkExpression(node: OxcNode | undefined): void {\n    if (!node) return;\n    if (node.type === \"CallExpression\") {\n      callback(node);\n      checkExpression(node.callee as OxcNode | undefined);\n      const args = node.arguments as OxcNode[] | undefined;\n      if (args) {\n        for (const arg of args) {\n          if (\n            arg &&\n            typeof arg === \"object\" &&\n            \"type\" in arg &&\n            arg.type !== \"ArrowFunctionExpression\" &&\n            arg.type !== \"FunctionExpression\"\n          ) {\n            checkExpression(arg as OxcNode);\n          }\n        }\n      }\n    } else if (node.type === \"MemberExpression\") {\n      checkExpression(node.object as OxcNode | undefined);\n    }\n  }\n\n  for (const statement of body) {\n    if (statement.type === \"ExportDefaultDeclaration\") {\n      checkExpression(statement.declaration as OxcNode | undefined);\n    } else if (statement.type === \"ExportNamedDeclaration\") {\n      const declaration = statement.declaration as OxcNode | undefined;\n      if (declaration?.type === \"VariableDeclaration\") {\n        for (const declarator of (declaration.declarations as OxcNode[]) ?? []) {\n          checkExpression(declarator.init as OxcNode | undefined);\n        }\n      }\n    } else if (statement.type === \"VariableDeclaration\") {\n      for (const declarator of (statement.declarations as OxcNode[]) ?? []) {\n        checkExpression(declarator.init as OxcNode | undefined);\n      }\n    } else if (statement.type === \"ExpressionStatement\") {\n      checkExpression(statement.expression as OxcNode | undefined);\n    }\n  }\n}\n\nfunction containsFactoryCall(root: OxcNode, member: string): boolean {\n  let found = false;\n  forEachTopLevelCall(root, (node) => {\n    if (isFactoryCall(node.callee as OxcNode, member)) {\n      found = true;\n    }\n  });\n  return found;\n}\n\nfunction parseAnyMethodsFromSource(root: OxcNode, rawRel: string): ParseRouteSourceResult {\n  const errors: ScanError[] = [];\n  let methods: HttpVerb[] | undefined;\n\n  forEachTopLevelCall(root, (node) => {\n    if (!isFactoryCall(node.callee as OxcNode, \"any\")) return;\n\n    const args = node.arguments as OxcNode[] | undefined;\n    const methodsArg = args?.[1];\n    if (!methodsArg || methodsArg.type !== \"ArrayExpression\") {\n      errors.push(\n        new ScanError(\n          \"ANY route must call `t.any(path, [methods], ...)` with a static methods array\",\n          rawRel,\n        ),\n      );\n      return;\n    }\n\n    const elements = methodsArg.elements as OxcNode[] | undefined;\n    if (!elements || elements.length === 0) {\n      errors.push(new ScanError(\"ANY route methods array must be a non-empty array\", rawRel));\n      return;\n    }\n\n    const parsed: HttpVerb[] = [];\n    const seen = new Set<string>();\n\n    for (const element of elements) {\n      if (!element || element.type !== \"Literal\" || typeof element.value !== \"string\") {\n        errors.push(new ScanError(\"ANY route methods must be string literals\", rawRel));\n        continue;\n      }\n      const verb = element.value.toUpperCase();\n      if (!isHttpVerb(verb)) {\n        errors.push(\n          new ScanError(\n            `Unknown HTTP method \"${element.value}\" in t.any methods. Use one of: ${HTTP_VERBS.join(\", \")}`,\n            rawRel,\n          ),\n        );\n        continue;\n      }\n      if (seen.has(verb)) {\n        errors.push(new ScanError(`Duplicate method \"${verb}\" in t.any methods`, rawRel));\n        continue;\n      }\n      seen.add(verb);\n      parsed.push(verb as HttpVerb);\n    }\n\n    if (errors.length === 0) {\n      methods = parsed;\n    }\n  });\n\n  if (!methods && errors.length === 0) {\n    errors.push(\n      new ScanError(\n        \"ANY route must call `t.any(path, [methods], ...)` with a static methods array\",\n        rawRel,\n      ),\n    );\n  }\n\n  return { errors, ...(methods ? { methods } : {}) };\n}\n\nfunction parseProgram(\n  source: string,\n  rawRel: string,\n): { program: OxcNode } | { errors: ScanError[] } {\n  const result = parseSync(rawRel, source);\n  if (result.errors.length > 0) {\n    const message = result.errors.map((error) => error.message).join(\"; \");\n    return { errors: [new ScanError(`Failed to parse route file: ${message}`, rawRel)] };\n  }\n  return { program: result.program as unknown as OxcNode };\n}\n\nasync function parseProgramAsync(\n  source: string,\n  rawRel: string,\n): Promise<{ program: OxcNode } | { errors: ScanError[] }> {\n  const result = await parse(rawRel, source);\n  if (result.errors.length > 0) {\n    const message = result.errors.map((error) => error.message).join(\"; \");\n    return { errors: [new ScanError(`Failed to parse route file: ${message}`, rawRel)] };\n  }\n  return { program: result.program as unknown as OxcNode };\n}\n\nexport function analyzeRouteFileSource(\n  source: string,\n  rawRel: string,\n  method: RouteFileMethod,\n): ParseRouteSourceResult {\n  const parsed = parseProgram(source, rawRel);\n  if (\"errors\" in parsed) return { errors: parsed.errors };\n\n  const errors: ScanError[] = [];\n  if (!hasExportDefault(parsed.program)) {\n    errors.push(new ScanError(\"Route file must have a default export\", rawRel));\n  }\n\n  const factoryMember = expectedFactoryMember(method);\n  const hasFactory = containsFactoryCall(parsed.program, factoryMember);\n  if (!hasFactory) {\n    const factoryName = createRouteFactoryName(method);\n    errors.push(\n      new ScanError(`Route file must use \\`${factoryName}(...)\\` for ${method} routes`, rawRel),\n    );\n  }\n\n  if (method === \"ANY\") {\n    const anyResult = parseAnyMethodsFromSource(parsed.program, rawRel);\n    return {\n      errors: [...errors, ...anyResult.errors],\n      ...(anyResult.methods ? { methods: anyResult.methods } : {}),\n    };\n  }\n\n  return { errors };\n}\n\nexport async function analyzeRouteFileSourceAsync(\n  source: string,\n  rawRel: string,\n  method: RouteFileMethod,\n): Promise<ParseRouteSourceResult> {\n  const parsed = await parseProgramAsync(source, rawRel);\n  if (\"errors\" in parsed) return { errors: parsed.errors };\n\n  const errors: ScanError[] = [];\n  if (!hasExportDefault(parsed.program)) {\n    errors.push(new ScanError(\"Route file must have a default export\", rawRel));\n  }\n\n  const factoryMember = expectedFactoryMember(method);\n  const hasFactory = containsFactoryCall(parsed.program, factoryMember);\n  if (!hasFactory) {\n    const factoryName = createRouteFactoryName(method);\n    errors.push(\n      new ScanError(`Route file must use \\`${factoryName}(...)\\` for ${method} routes`, rawRel),\n    );\n  }\n\n  if (method === \"ANY\") {\n    const anyResult = parseAnyMethodsFromSource(parsed.program, rawRel);\n    return {\n      errors: [...errors, ...anyResult.errors],\n      ...(anyResult.methods ? { methods: anyResult.methods } : {}),\n    };\n  }\n\n  return { errors };\n}\n\nexport function analyzeLayoutFileSource(source: string, rawRel: string): ParseRouteSourceResult {\n  const parsed = parseProgram(source, rawRel);\n  if (\"errors\" in parsed) return { errors: parsed.errors };\n\n  const errors: ScanError[] = [];\n  if (!hasExportDefault(parsed.program)) {\n    errors.push(new ScanError(\"Layout file must have a default export\", rawRel));\n  }\n\n  const hasLayout = containsFactoryCall(parsed.program, \"layout\");\n  if (!hasLayout) {\n    errors.push(new ScanError(\"Layout file must use `t.layout(...)`\", rawRel));\n  }\n\n  return { errors };\n}\n\nexport async function analyzeLayoutFileSourceAsync(\n  source: string,\n  rawRel: string,\n): Promise<ParseRouteSourceResult> {\n  const parsed = await parseProgramAsync(source, rawRel);\n  if (\"errors\" in parsed) return { errors: parsed.errors };\n\n  const errors: ScanError[] = [];\n  if (!hasExportDefault(parsed.program)) {\n    errors.push(new ScanError(\"Layout file must have a default export\", rawRel));\n  }\n\n  const hasLayout = containsFactoryCall(parsed.program, \"layout\");\n  if (!hasLayout) {\n    errors.push(new ScanError(\"Layout file must use `t.layout(...)`\", rawRel));\n  }\n\n  return { errors };\n}\n\nconst VALID_PARAM_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;\n\nfunction extractParamsFromSegment(segment: string): Array<{ paramName: string; isValid: boolean }> {\n  const params: Array<{ paramName: string; isValid: boolean }> = [];\n  if (!segment || !segment.includes(\"$\")) return params;\n  if (segment === \"$\" || segment === \"{$}\") return params;\n\n  if (segment.startsWith(\"$\") && !segment.includes(\"{\")) {\n    const paramName = segment.slice(1);\n    if (paramName) {\n      params.push({ paramName, isValid: VALID_PARAM_NAME_REGEX.test(paramName) });\n    }\n    return params;\n  }\n\n  const bracePattern = /\\{(-?\\$)([^}]*)\\}/g;\n  let match: RegExpExecArray | null;\n  while ((match = bracePattern.exec(segment)) !== null) {\n    const paramName = match[2]!;\n    if (paramName) {\n      params.push({ paramName, isValid: VALID_PARAM_NAME_REGEX.test(paramName) });\n    }\n  }\n\n  return params;\n}\n\nexport function collectInvalidRouteParams(\n  filePath: string,\n): Array<{ paramName: string; filePath: string }> {\n  if (!filePath || !filePath.includes(\"$\")) return [];\n\n  const invalid: Array<{ paramName: string; filePath: string }> = [];\n  for (const segment of filePath.replace(/\\\\/g, \"/\").split(\"/\")) {\n    const basename = segment.replace(ROUTE_VERB_PATTERN, \"\");\n    for (const param of extractParamsFromSegment(basename)) {\n      if (!param.isValid) {\n        invalid.push({ paramName: param.paramName, filePath });\n      }\n    }\n  }\n\n  return invalid;\n}\n\nexport function formatInvalidParamMessage(paramName: string, filePath: string): string {\n  return (\n    `Invalid param name \"${paramName}\" in route file \"${filePath}\". ` +\n    \"Param names must be valid JavaScript identifiers (match /[a-zA-Z_$][a-zA-Z0-9_$]*/).\"\n  );\n}\n\nexport async function walkRouteFiles(\n  routesDir: string,\n  ignore?: readonly string[],\n  baseRoutesDir: string = routesDir,\n): Promise<string[]> {\n  let topLevelEntries;\n  try {\n    topLevelEntries = await readdir(routesDir, { withFileTypes: true });\n  } catch {\n    return [];\n  }\n  const nestedResults = await Promise.all(\n    topLevelEntries.map(async (entry) => {\n      const fullPath = join(routesDir, entry.name);\n      const relPath = toPosixPath(relative(baseRoutesDir, fullPath));\n      if (shouldIgnoreRoutePath(relPath, ignore)) {\n        return [];\n      }\n      if (entry.isDirectory()) {\n        return walkRouteFiles(fullPath, ignore, baseRoutesDir);\n      }\n      if (!entry.isFile() || !entry.name.endsWith(\".ts\")) {\n        return [];\n      }\n      return [fullPath];\n    }),\n  );\n\n  return nestedResults.flat();\n}\n\nfunction parseRouteEntry(\n  rawRel: string,\n  routesImportBase: string,\n  extension: ExtensionOption,\n  methods?: RouteEntry[\"methods\"],\n): RouteEntry {\n  const routeRel = normalizeRouteRel(rawRel);\n  const method = getMethodFromRouteFile(routeRel);\n\n  const entry: RouteEntry = {\n    routeRel,\n    urlPath: buildUrlPath(routeRel),\n    method,\n    layouts: [],\n    importName: routeImportName(routeRel, method),\n    importPath: importPathFromRouteRel(rawRel, routesImportBase, extension),\n  };\n\n  if (methods) {\n    entry.methods = methods;\n  }\n\n  return entry;\n}\n\nfunction parseLayoutEntry(\n  rawRel: string,\n  routesImportBase: string,\n  extension: ExtensionOption,\n): LayoutFile {\n  const id = layoutIdFromPath(normalizeRouteRel(rawRel));\n  return {\n    id,\n    importPath: layoutImportPathFromRouteRel(rawRel, routesImportBase, extension),\n    importName: layoutImportName(id),\n  };\n}\n\nfunction validateDuplicateRoutes(routes: RouteEntry[]): ScanError[] {\n  const errors: ScanError[] = [];\n  const seen = new Map<string, string>();\n\n  for (const route of routes) {\n    const key = `${route.urlPath}:${route.method}`;\n    const existing = seen.get(key);\n    if (existing) {\n      errors.push(\n        new ScanError(\n          `Duplicate route for ${route.method} ${route.urlPath} (${existing} and ${route.routeRel})`,\n          route.routeRel,\n        ),\n      );\n      continue;\n    }\n    seen.set(key, route.routeRel);\n  }\n\n  return errors;\n}\n\nexport type ScanOptions = {\n  extension?: ExtensionOption;\n  ignore?: readonly string[];\n  cache?: AnalysisCache | undefined;\n};\n\nexport async function scanRouteFiles(\n  routesDir: string,\n  routesImportBase: string,\n  absoluteFiles: string[],\n  options: ScanOptions = {},\n): Promise<ScanResult> {\n  const extension = options.extension ?? true;\n  const errors: ScanError[] = [];\n  const layouts: LayoutFile[] = [];\n  const routes: RouteEntry[] = [];\n\n  type PendingFile = {\n    absolutePath: string;\n    rawRel: string;\n    kind: \"route\" | \"layout\";\n    method?: RouteFileMethod;\n  };\n\n  const pending: PendingFile[] = [];\n\n  for (const absolutePath of absoluteFiles) {\n    const rawRel = toPosixPath(relative(routesDir, absolutePath));\n    try {\n      assertPhysicalRouteFile(rawRel);\n      if (isRouteFile(rawRel)) {\n        const method = getMethodFromRouteFile(normalizeRouteRel(rawRel));\n        pending.push({ absolutePath, rawRel, kind: \"route\", method });\n      } else if (isLayoutFile(rawRel)) {\n        pending.push({ absolutePath, rawRel, kind: \"layout\" });\n      }\n    } catch (error) {\n      if (error instanceof ScanError) {\n        errors.push(error);\n      } else {\n        throw error;\n      }\n    }\n  }\n\n  await Promise.all(\n    pending.map(async (file) => {\n      if (file.kind === \"route\") {\n        const method = file.method!;\n        let methods: RouteEntry[\"methods\"] | undefined;\n        let analysis;\n\n        if (options.cache) {\n          analysis = await options.cache.analyzeRoute(file.absolutePath, file.rawRel, method);\n        } else {\n          const source = await readFile(file.absolutePath, \"utf8\").catch(() => undefined);\n          if (source !== undefined) {\n            analysis = await analyzeRouteFileSourceAsync(source, file.rawRel, method);\n          }\n        }\n\n        if (analysis) {\n          errors.push(...analysis.errors);\n          methods = analysis.methods;\n        }\n\n        routes.push(parseRouteEntry(file.rawRel, routesImportBase, extension, methods));\n        return;\n      }\n\n      layouts.push(parseLayoutEntry(file.rawRel, routesImportBase, extension));\n\n      let analysis;\n      if (options.cache) {\n        analysis = await options.cache.analyzeLayout(file.absolutePath, file.rawRel);\n      } else {\n        const source = await readFile(file.absolutePath, \"utf8\").catch(() => undefined);\n        if (source !== undefined) {\n          analysis = await analyzeLayoutFileSourceAsync(source, file.rawRel);\n        }\n      }\n\n      if (analysis) {\n        errors.push(...analysis.errors);\n      }\n    }),\n  );\n\n  for (const route of routes) {\n    for (const invalid of collectInvalidRouteParams(route.routeRel)) {\n      errors.push(\n        new ScanError(\n          formatInvalidParamMessage(invalid.paramName, invalid.filePath),\n          route.routeRel,\n        ),\n      );\n    }\n  }\n\n  const seenLayoutIds = new Set<string>();\n  for (const layout of layouts) {\n    if (seenLayoutIds.has(layout.id)) {\n      errors.push(new ScanError(`Duplicate layout id \"${layout.id}\"`, layout.id));\n      continue;\n    }\n    seenLayoutIds.add(layout.id);\n  }\n\n  errors.push(...validateDuplicateRoutes(routes));\n\n  if (errors.length > 0) {\n    throw new ScanErrorCollection(errors);\n  }\n\n  return finalizeScanResult({ layouts, routes });\n}\n\nfunction resolveRouteLayouts(routeRel: string, layouts: LayoutFile[]): string[] {\n  return routeLayoutChain(routePathWithoutVerb(routeRel), layouts);\n}\n\nexport function finalizeScanResult(scan: ScanResult): ScanResult {\n  const layouts = [...scan.layouts].sort((left, right) => left.id.localeCompare(right.id));\n\n  for (const route of scan.routes) {\n    route.layouts = resolveRouteLayouts(route.routeRel, layouts);\n  }\n\n  scan.routes.sort((left, right) => {\n    const pathCompare = left.urlPath.localeCompare(right.urlPath);\n    if (pathCompare !== 0) return pathCompare;\n    return left.method.localeCompare(right.method);\n  });\n\n  return { layouts, routes: scan.routes };\n}\n\nfunction toRouteMethodEntry(route: RouteEntry, method: HttpVerb): RouteMethodEntry {\n  return {\n    method,\n    importName: route.importName,\n    routeRel: route.routeRel,\n    layouts: route.layouts,\n  };\n}\n\nfunction groupRoutesByUrlPath(routes: RouteEntry[]): Map<string, RouteEntry[]> {\n  const byPath = new Map<string, RouteEntry[]>();\n  for (const route of routes) {\n    const list = byPath.get(route.urlPath) ?? [];\n    list.push(route);\n    byPath.set(route.urlPath, list);\n  }\n  return byPath;\n}\n\nfunction expandMethodsForUrlPath(pathRoutes: RouteEntry[]): RouteMethodEntry[] {\n  const filled = new Map<HttpVerb, RouteMethodEntry>();\n  let anyRoute: RouteEntry | undefined;\n  let allRoute: RouteEntry | undefined;\n\n  for (const route of pathRoutes) {\n    if (isHttpVerb(route.method)) {\n      filled.set(route.method, toRouteMethodEntry(route, route.method));\n    } else if (route.method === \"ANY\") {\n      anyRoute = route;\n    } else if (route.method === \"ALL\") {\n      allRoute = route;\n    }\n  }\n\n  if (anyRoute) {\n    for (const method of anyRoute.methods ?? []) {\n      if (!filled.has(method)) {\n        filled.set(method, toRouteMethodEntry(anyRoute, method));\n      }\n    }\n  }\n\n  if (allRoute) {\n    for (const method of HTTP_VERBS) {\n      if (!filled.has(method)) {\n        filled.set(method, toRouteMethodEntry(allRoute, method));\n      }\n    }\n  }\n\n  return [...filled.values()].sort((left, right) => left.method.localeCompare(right.method));\n}\n\nfunction expandRoutesByPath(routes: RouteEntry[]): Map<string, RouteMethodEntry[]> {\n  const byPath = groupRoutesByUrlPath(routes);\n  const routesByPath = new Map<string, RouteMethodEntry[]>();\n\n  for (const [urlPath, pathRoutes] of byPath) {\n    routesByPath.set(urlPath, expandMethodsForUrlPath(pathRoutes));\n  }\n\n  return routesByPath;\n}\n\nexport function buildGeneratedModelFromScan(scan: ScanResult): GeneratedModel {\n  const layoutIds = scan.layouts.map((layout) => layout.id);\n  const layoutIdSet = new Set(layoutIds);\n  const layoutParents = new Map(\n    layoutIds.map((layoutId) => [layoutId, layoutParentId(layoutId, layoutIdSet)]),\n  );\n\n  const routesByPath = expandRoutesByPath(scan.routes);\n  const routePaths = [...routesByPath.keys()].sort();\n\n  return {\n    layouts: scan.layouts,\n    routes: scan.routes,\n    layoutIds,\n    layoutParents,\n    routePaths,\n    routesByPath,\n  };\n}\n\nexport type ScanAndBuildOptions = {\n  routesDir: string;\n  routesImportBase?: string;\n  extension?: ExtensionOption;\n  ignore?: readonly string[];\n  cache?: AnalysisCache | undefined;\n};\n\nexport async function scanAndBuildModel(options: ScanAndBuildOptions): Promise<GeneratedModel> {\n  const routesDir = options.routesDir;\n  const routesImportBase = options.routesImportBase\n    ? toPosixPath(options.routesImportBase)\n    : toPosixPath(routesDir);\n\n  const ignore = options.ignore ?? DEFAULT_IGNORE;\n  const files = await walkRouteFiles(routesDir, ignore);\n\n  const scan = await scanRouteFiles(routesDir, routesImportBase, files, {\n    extension: options.extension ?? false,\n    cache: options.cache,\n    ignore,\n  });\n\n  return buildGeneratedModelFromScan(scan);\n}\n"],"mappings":";;;;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