@absolutejs/absolute 0.19.0-beta.968 → 0.19.0-beta.969

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.
package/dist/index.js CHANGED
@@ -11859,14 +11859,118 @@ var validateSafePath = (targetPath, baseDirectory) => {
11859
11859
  };
11860
11860
  var init_validateSafePath = () => {};
11861
11861
 
11862
+ // src/build/scanAngularPageRoutes.ts
11863
+ import { readdirSync as readdirSync2, readFileSync as readFileSync14 } from "fs";
11864
+ import { basename as basename6, join as join23, relative as relative9 } from "path";
11865
+ import ts6 from "typescript";
11866
+ var SOURCE_EXTENSIONS2, SKIP_DIRS2, hasSourceExtension2 = (filePath) => {
11867
+ const idx = filePath.lastIndexOf(".");
11868
+ if (idx === -1)
11869
+ return false;
11870
+ return SOURCE_EXTENSIONS2.has(filePath.slice(idx));
11871
+ }, isPageFile = (filePath) => {
11872
+ if (!hasSourceExtension2(filePath))
11873
+ return false;
11874
+ const base = basename6(filePath);
11875
+ if (base.endsWith(".d.ts"))
11876
+ return false;
11877
+ if (base.endsWith(".test.ts"))
11878
+ return false;
11879
+ if (base.endsWith(".spec.ts"))
11880
+ return false;
11881
+ return true;
11882
+ }, collectPageFiles = (pagesRoot) => {
11883
+ const out = [];
11884
+ const stack = [pagesRoot];
11885
+ while (stack.length > 0) {
11886
+ const dir = stack.pop();
11887
+ if (!dir)
11888
+ continue;
11889
+ let entries;
11890
+ try {
11891
+ entries = readdirSync2(dir, {
11892
+ encoding: "utf-8",
11893
+ withFileTypes: true
11894
+ });
11895
+ } catch {
11896
+ continue;
11897
+ }
11898
+ for (const entry of entries) {
11899
+ if (entry.isDirectory()) {
11900
+ if (SKIP_DIRS2.has(entry.name))
11901
+ continue;
11902
+ if (entry.name.startsWith("."))
11903
+ continue;
11904
+ stack.push(join23(dir, entry.name));
11905
+ } else if (entry.isFile() && isPageFile(entry.name)) {
11906
+ out.push(join23(dir, entry.name));
11907
+ }
11908
+ }
11909
+ }
11910
+ return out;
11911
+ }, hasTopLevelRoutesExport = (source, filePath) => {
11912
+ if (!source.includes("routes"))
11913
+ return false;
11914
+ const sf = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, ts6.ScriptKind.TS);
11915
+ for (const statement of sf.statements) {
11916
+ if (!ts6.isVariableStatement(statement))
11917
+ continue;
11918
+ const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts6.SyntaxKind.ExportKeyword);
11919
+ if (!isExported)
11920
+ continue;
11921
+ for (const declaration of statement.declarationList.declarations) {
11922
+ if (!ts6.isIdentifier(declaration.name))
11923
+ continue;
11924
+ if (declaration.name.text === "routes")
11925
+ return true;
11926
+ }
11927
+ }
11928
+ return false;
11929
+ }, scanAngularPageRoutes = (pagesRoot) => {
11930
+ const files = collectPageFiles(pagesRoot);
11931
+ const out = [];
11932
+ for (const file2 of files) {
11933
+ let source;
11934
+ try {
11935
+ source = readFileSync14(file2, "utf-8");
11936
+ } catch {
11937
+ continue;
11938
+ }
11939
+ const hasRoutes = hasTopLevelRoutesExport(source, file2);
11940
+ const base = basename6(file2).replace(/\.[cm]?[tj]sx?$/, "");
11941
+ const manifestKey = toPascal(base);
11942
+ out.push({
11943
+ hasRoutes,
11944
+ manifestKey,
11945
+ pageFile: file2
11946
+ });
11947
+ }
11948
+ return out;
11949
+ }, relativeRoutesImport = (emittedFromDir, pageFile) => {
11950
+ const rel = relative9(emittedFromDir, pageFile.replace(/\.ts$/, "")).replace(/\\/g, "/");
11951
+ return rel.startsWith(".") ? rel : `./${rel}`;
11952
+ };
11953
+ var init_scanAngularPageRoutes = __esm(() => {
11954
+ SOURCE_EXTENSIONS2 = new Set([".ts", ".tsx", ".mts", ".cts"]);
11955
+ SKIP_DIRS2 = new Set([
11956
+ ".absolutejs",
11957
+ ".generated",
11958
+ ".git",
11959
+ "build",
11960
+ "compiled",
11961
+ "dist",
11962
+ "node_modules"
11963
+ ]);
11964
+ });
11965
+
11862
11966
  // src/build/emitAngularProvidersFiles.ts
11863
11967
  import { mkdirSync as mkdirSync8, writeFileSync as writeFileSync8 } from "fs";
11864
- import { dirname as dirname13, join as join23, relative as relative9 } from "path";
11968
+ import { dirname as dirname13, join as join24, relative as relative10 } from "path";
11865
11969
  var buildModuleSpecifier = (importSpec, outputPath) => {
11866
11970
  if (!importSpec.resolvedAbsPath)
11867
11971
  return importSpec.source;
11868
11972
  const outputDir = dirname13(outputPath);
11869
- const rel = relative9(outputDir, importSpec.resolvedAbsPath).replace(/\\/g, "/");
11973
+ const rel = relative10(outputDir, importSpec.resolvedAbsPath).replace(/\\/g, "/");
11870
11974
  const withoutExt = rel.replace(/\.[cm]?[tj]sx?$/, "");
11871
11975
  return withoutExt.startsWith(".") ? withoutExt : `./${withoutExt}`;
11872
11976
  }, buildImportLine = (importSpec, outputPath) => {
@@ -11912,7 +12016,7 @@ var buildModuleSpecifier = (importSpec, outputPath) => {
11912
12016
  }
11913
12017
  return lines.join(`
11914
12018
  `);
11915
- }, renderFile = (call, outputPath, basePath) => {
12019
+ }, ROUTER_FEATURES_DEFAULT, renderFile = (call, outputPath, basePath, pageRoutes) => {
11916
12020
  const sections = [];
11917
12021
  sections.push("/* AUTOGENERATED by AbsoluteJS \u2014 see `scanAngularHandlerCalls`. */", "/* eslint-disable */");
11918
12022
  const groups = groupImports(call.providerImports);
@@ -11924,8 +12028,17 @@ var buildModuleSpecifier = (importSpec, outputPath) => {
11924
12028
  if (basePath !== null) {
11925
12029
  sections.push(`import { APP_BASE_HREF } from "@angular/common";`, `const __basePathProvider = { provide: APP_BASE_HREF, useValue: ${JSON.stringify(basePath)} };`);
11926
12030
  }
12031
+ if (pageRoutes?.hasRoutes) {
12032
+ const routesImport = relativeRoutesImport(dirname13(outputPath), pageRoutes.pageFile);
12033
+ sections.push(`import { ${["provideRouter", ...ROUTER_FEATURES_DEFAULT].join(", ")} } from "@angular/router";`, `import { routes as __pageRoutes } from "${routesImport}";`, `const __routerProvider = provideRouter(__pageRoutes, ${ROUTER_FEATURES_DEFAULT.map((name) => `${name}()`).join(", ")});`);
12034
+ }
11927
12035
  const userProviders = call.providersExpr ?? "[]";
11928
- const exportExpr = basePath === null ? userProviders : `[...(${userProviders}), __basePathProvider]`;
12036
+ const extras = [];
12037
+ if (pageRoutes?.hasRoutes)
12038
+ extras.push("__routerProvider");
12039
+ if (basePath !== null)
12040
+ extras.push("__basePathProvider");
12041
+ const exportExpr = extras.length === 0 ? userProviders : `[...(${userProviders}), ${extras.join(", ")}]`;
11929
12042
  sections.push(`export const providers = ${exportExpr};`);
11930
12043
  return sections.join(`
11931
12044
 
@@ -11938,14 +12051,19 @@ var buildModuleSpecifier = (importSpec, outputPath) => {
11938
12051
  return null;
11939
12052
  const trimmed = mountPath.slice(0, -1);
11940
12053
  return trimmed === "/" ? null : trimmed;
11941
- }, emitAngularProvidersFiles = (projectRoot, calls) => {
12054
+ }, emitAngularProvidersFiles = (projectRoot, calls, pageRoutes) => {
11942
12055
  const outputDir = getProvidersOutputDir(projectRoot);
11943
12056
  mkdirSync8(outputDir, { recursive: true });
12057
+ const pageRoutesByKey = new Map;
12058
+ for (const entry of pageRoutes) {
12059
+ pageRoutesByKey.set(entry.manifestKey, entry);
12060
+ }
11944
12061
  const emitted = [];
11945
12062
  for (const call of calls) {
11946
- const outputPath = join23(outputDir, `${call.manifestKey}.providers.ts`);
12063
+ const outputPath = join24(outputDir, `${call.manifestKey}.providers.ts`);
11947
12064
  const basePath = deriveBasePath(call.mountPath);
11948
- const content = renderFile(call, outputPath, basePath);
12065
+ const pageRoute = pageRoutesByKey.get(call.manifestKey);
12066
+ const content = renderFile(call, outputPath, basePath, pageRoute);
11949
12067
  writeFileSync8(outputPath, content, "utf-8");
11950
12068
  emitted.push({
11951
12069
  basePath,
@@ -11955,14 +12073,19 @@ var buildModuleSpecifier = (importSpec, outputPath) => {
11955
12073
  });
11956
12074
  }
11957
12075
  return emitted;
11958
- }, getProvidersOutputDir = (projectRoot) => join23(getFrameworkGeneratedDir("angular", projectRoot), "providers");
12076
+ }, getProvidersOutputDir = (projectRoot) => join24(getFrameworkGeneratedDir("angular", projectRoot), "providers");
11959
12077
  var init_emitAngularProvidersFiles = __esm(() => {
11960
12078
  init_generatedDir();
12079
+ init_scanAngularPageRoutes();
12080
+ ROUTER_FEATURES_DEFAULT = [
12081
+ "withComponentInputBinding",
12082
+ "withViewTransitions"
12083
+ ];
11961
12084
  });
11962
12085
 
11963
12086
  // src/build/emitAngularRouteMounts.ts
11964
12087
  import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync9 } from "fs";
11965
- import { join as join24 } from "path";
12088
+ import { join as join25 } from "path";
11966
12089
  var deriveBasePath2 = (mountPath) => {
11967
12090
  if (!mountPath)
11968
12091
  return null;
@@ -11973,7 +12096,7 @@ var deriveBasePath2 = (mountPath) => {
11973
12096
  }, escapeForRegex = (literal) => literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), mountToPatternSource = (basePath) => {
11974
12097
  const withoutTrailing = basePath.replace(/\/$/, "");
11975
12098
  return `^${escapeForRegex(withoutTrailing)}(\\/|$)`;
11976
- }, getRouteMountsOutputPath = (projectRoot) => join24(getFrameworkGeneratedDir("angular", projectRoot), "route-mounts.ts"), emitAngularRouteMounts = (projectRoot, calls) => {
12099
+ }, getRouteMountsOutputPath = (projectRoot) => join25(getFrameworkGeneratedDir("angular", projectRoot), "route-mounts.ts"), emitAngularRouteMounts = (projectRoot, calls) => {
11977
12100
  const entries = [];
11978
12101
  const seen = new Set;
11979
12102
  for (const call of calls) {
@@ -12009,18 +12132,18 @@ var init_emitAngularRouteMounts = __esm(() => {
12009
12132
  });
12010
12133
 
12011
12134
  // src/build/scanAngularHandlerCalls.ts
12012
- import { readdirSync as readdirSync2, readFileSync as readFileSync14 } from "fs";
12013
- import { dirname as dirname14, isAbsolute as isAbsolute3, join as join25, resolve as resolve22 } from "path";
12014
- import ts6 from "typescript";
12015
- var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
12135
+ import { readdirSync as readdirSync3, readFileSync as readFileSync15 } from "fs";
12136
+ import { dirname as dirname14, isAbsolute as isAbsolute3, join as join26, resolve as resolve22 } from "path";
12137
+ import ts7 from "typescript";
12138
+ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, getScriptKind2 = (filePath) => {
12016
12139
  if (filePath.endsWith(".tsx"))
12017
- return ts6.ScriptKind.TSX;
12018
- return ts6.ScriptKind.TS;
12019
- }, hasSourceExtension2 = (filePath) => {
12140
+ return ts7.ScriptKind.TSX;
12141
+ return ts7.ScriptKind.TS;
12142
+ }, hasSourceExtension3 = (filePath) => {
12020
12143
  const idx = filePath.lastIndexOf(".");
12021
12144
  if (idx === -1)
12022
12145
  return false;
12023
- return SOURCE_EXTENSIONS2.has(filePath.slice(idx));
12146
+ return SOURCE_EXTENSIONS3.has(filePath.slice(idx));
12024
12147
  }, collectSourceFiles2 = (root) => {
12025
12148
  const out = [];
12026
12149
  const stack = [root];
@@ -12030,7 +12153,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12030
12153
  continue;
12031
12154
  let entries;
12032
12155
  try {
12033
- entries = readdirSync2(dir, {
12156
+ entries = readdirSync3(dir, {
12034
12157
  encoding: "utf-8",
12035
12158
  withFileTypes: true
12036
12159
  });
@@ -12039,13 +12162,13 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12039
12162
  }
12040
12163
  for (const entry of entries) {
12041
12164
  if (entry.isDirectory()) {
12042
- if (SKIP_DIRS2.has(entry.name))
12165
+ if (SKIP_DIRS3.has(entry.name))
12043
12166
  continue;
12044
12167
  if (entry.name.startsWith("."))
12045
12168
  continue;
12046
- stack.push(join25(dir, entry.name));
12047
- } else if (entry.isFile() && hasSourceExtension2(entry.name)) {
12048
- out.push(join25(dir, entry.name));
12169
+ stack.push(join26(dir, entry.name));
12170
+ } else if (entry.isFile() && hasSourceExtension3(entry.name)) {
12171
+ out.push(join26(dir, entry.name));
12049
12172
  }
12050
12173
  }
12051
12174
  }
@@ -12066,9 +12189,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12066
12189
  return null;
12067
12190
  };
12068
12191
  for (const statement of sf.statements) {
12069
- if (!ts6.isImportDeclaration(statement))
12192
+ if (!ts7.isImportDeclaration(statement))
12070
12193
  continue;
12071
- if (!ts6.isStringLiteral(statement.moduleSpecifier))
12194
+ if (!ts7.isStringLiteral(statement.moduleSpecifier))
12072
12195
  continue;
12073
12196
  if (statement.importClause?.isTypeOnly)
12074
12197
  continue;
@@ -12089,7 +12212,7 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12089
12212
  const bindings = clause.namedBindings;
12090
12213
  if (!bindings)
12091
12214
  continue;
12092
- if (ts6.isNamespaceImport(bindings)) {
12215
+ if (ts7.isNamespaceImport(bindings)) {
12093
12216
  recordSpec(bindings.name.text, {
12094
12217
  importedName: "*",
12095
12218
  isDefault: false,
@@ -12117,38 +12240,38 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12117
12240
  }, collectExpressionIdentifiers = (expr) => {
12118
12241
  const out = new Set;
12119
12242
  const visit = (node) => {
12120
- if (ts6.isIdentifier(node)) {
12243
+ if (ts7.isIdentifier(node)) {
12121
12244
  out.add(node.text);
12122
12245
  return;
12123
12246
  }
12124
- if (ts6.isPropertyAccessExpression(node)) {
12247
+ if (ts7.isPropertyAccessExpression(node)) {
12125
12248
  visit(node.expression);
12126
12249
  return;
12127
12250
  }
12128
- ts6.forEachChild(node, visit);
12251
+ ts7.forEachChild(node, visit);
12129
12252
  };
12130
12253
  visit(expr);
12131
12254
  return out;
12132
12255
  }, extractManifestKey = (pagePathValue) => {
12133
- if (!ts6.isCallExpression(pagePathValue))
12256
+ if (!ts7.isCallExpression(pagePathValue))
12134
12257
  return null;
12135
12258
  const callee = pagePathValue.expression;
12136
- if (!ts6.isIdentifier(callee) || callee.text !== "asset")
12259
+ if (!ts7.isIdentifier(callee) || callee.text !== "asset")
12137
12260
  return null;
12138
12261
  const [, second] = pagePathValue.arguments;
12139
12262
  if (!second)
12140
12263
  return null;
12141
- if (!ts6.isStringLiteral(second))
12264
+ if (!ts7.isStringLiteral(second))
12142
12265
  return null;
12143
12266
  return second.text;
12144
12267
  }, findEnclosingMountPath = (node) => {
12145
12268
  let cursor = node.parent;
12146
12269
  while (cursor) {
12147
- if (ts6.isCallExpression(cursor)) {
12270
+ if (ts7.isCallExpression(cursor)) {
12148
12271
  const callee = cursor.expression;
12149
- if (ts6.isPropertyAccessExpression(callee) && ts6.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
12272
+ if (ts7.isPropertyAccessExpression(callee) && ts7.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
12150
12273
  const firstArg = cursor.arguments[0];
12151
- if (firstArg && ts6.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
12274
+ if (firstArg && ts7.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
12152
12275
  return firstArg.text;
12153
12276
  }
12154
12277
  }
@@ -12159,37 +12282,37 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12159
12282
  }, extractCallsFromFile = (filePath, out) => {
12160
12283
  let source;
12161
12284
  try {
12162
- source = readFileSync14(filePath, "utf-8");
12285
+ source = readFileSync15(filePath, "utf-8");
12163
12286
  } catch {
12164
12287
  return;
12165
12288
  }
12166
12289
  if (!fileMayContainAngularHandler(source))
12167
12290
  return;
12168
- const sf = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, getScriptKind2(filePath));
12291
+ const sf = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, getScriptKind2(filePath));
12169
12292
  const imports = collectFileImports(sf, filePath);
12170
12293
  const visit = (node) => {
12171
- if (ts6.isCallExpression(node) && ts6.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
12294
+ if (ts7.isCallExpression(node) && ts7.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
12172
12295
  const [arg] = node.arguments;
12173
- if (arg && ts6.isObjectLiteralExpression(arg)) {
12296
+ if (arg && ts7.isObjectLiteralExpression(arg)) {
12174
12297
  let manifestKey = null;
12175
12298
  let providersExpr = null;
12176
12299
  for (const prop of arg.properties) {
12177
- if (ts6.isPropertyAssignment(prop)) {
12300
+ if (ts7.isPropertyAssignment(prop)) {
12178
12301
  if (!prop.name)
12179
12302
  continue;
12180
- const name = ts6.isIdentifier(prop.name) ? prop.name.text : ts6.isStringLiteral(prop.name) ? prop.name.text : null;
12303
+ const name = ts7.isIdentifier(prop.name) ? prop.name.text : ts7.isStringLiteral(prop.name) ? prop.name.text : null;
12181
12304
  if (name === "pagePath") {
12182
12305
  manifestKey = extractManifestKey(prop.initializer);
12183
12306
  } else if (name === "providers") {
12184
12307
  providersExpr = prop.initializer;
12185
12308
  }
12186
- } else if (ts6.isSpreadAssignment(prop)) {
12309
+ } else if (ts7.isSpreadAssignment(prop)) {
12187
12310
  if (manifestKey)
12188
12311
  continue;
12189
12312
  const spreadExpr = prop.expression;
12190
- if (ts6.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
12313
+ if (ts7.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
12191
12314
  const [firstArg] = spreadExpr.arguments;
12192
- if (firstArg && ts6.isStringLiteral(firstArg)) {
12315
+ if (firstArg && ts7.isStringLiteral(firstArg)) {
12193
12316
  manifestKey = firstArg.text;
12194
12317
  }
12195
12318
  }
@@ -12217,9 +12340,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (fil
12217
12340
  }
12218
12341
  }
12219
12342
  }
12220
- ts6.forEachChild(node, visit);
12343
+ ts7.forEachChild(node, visit);
12221
12344
  };
12222
- ts6.forEachChild(sf, visit);
12345
+ ts7.forEachChild(sf, visit);
12223
12346
  }, scanAngularHandlerCalls = (projectRoot) => {
12224
12347
  const files = collectSourceFiles2(projectRoot);
12225
12348
  const collected = [];
@@ -12239,7 +12362,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
12239
12362
  "post",
12240
12363
  "put"
12241
12364
  ]);
12242
- SKIP_DIRS2 = new Set([
12365
+ SKIP_DIRS3 = new Set([
12243
12366
  ".absolutejs",
12244
12367
  ".generated",
12245
12368
  ".git",
@@ -12251,7 +12374,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
12251
12374
  "dist",
12252
12375
  "node_modules"
12253
12376
  ]);
12254
- SOURCE_EXTENSIONS2 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12377
+ SOURCE_EXTENSIONS3 = new Set([".ts", ".tsx", ".mts", ".cts"]);
12255
12378
  });
12256
12379
 
12257
12380
  // src/build/runAngularHandlerScan.ts
@@ -12259,13 +12382,15 @@ var exports_runAngularHandlerScan = {};
12259
12382
  __export(exports_runAngularHandlerScan, {
12260
12383
  runAngularHandlerScan: () => runAngularHandlerScan
12261
12384
  });
12262
- var runAngularHandlerScan = (projectRoot) => {
12385
+ var runAngularHandlerScan = (projectRoot, angularDirectory) => {
12263
12386
  const calls = scanAngularHandlerCalls(projectRoot);
12264
- const providersFiles = emitAngularProvidersFiles(projectRoot, calls);
12387
+ const pageRoutes = scanAngularPageRoutes(angularDirectory);
12388
+ const providersFiles = emitAngularProvidersFiles(projectRoot, calls, pageRoutes);
12265
12389
  emitAngularRouteMounts(projectRoot, calls);
12266
12390
  return {
12267
12391
  calls,
12268
12392
  manifestKeysWithProviders: new Set(providersFiles.map((file2) => file2.manifestKey)),
12393
+ pageRoutes,
12269
12394
  providersFiles
12270
12395
  };
12271
12396
  };
@@ -12273,6 +12398,7 @@ var init_runAngularHandlerScan = __esm(() => {
12273
12398
  init_emitAngularProvidersFiles();
12274
12399
  init_emitAngularRouteMounts();
12275
12400
  init_scanAngularHandlerCalls();
12401
+ init_scanAngularPageRoutes();
12276
12402
  });
12277
12403
 
12278
12404
  // src/svelte/renderToReadableStream.ts
@@ -12341,11 +12467,11 @@ import { existsSync as existsSync20 } from "fs";
12341
12467
  import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
12342
12468
  import {
12343
12469
  dirname as dirname15,
12344
- join as join26,
12345
- basename as basename6,
12470
+ join as join27,
12471
+ basename as basename7,
12346
12472
  extname as extname5,
12347
12473
  resolve as resolve23,
12348
- relative as relative10,
12474
+ relative as relative11,
12349
12475
  sep as sep2
12350
12476
  } from "path";
12351
12477
  import { env as env2 } from "process";
@@ -12400,14 +12526,14 @@ var resolveDevClientDir2 = () => {
12400
12526
  `${basePath}.svelte`,
12401
12527
  `${basePath}.svelte.ts`,
12402
12528
  `${basePath}.svelte.js`,
12403
- join26(basePath, "index.ts"),
12404
- join26(basePath, "index.js"),
12405
- join26(basePath, "index.mjs"),
12406
- join26(basePath, "index.cjs"),
12407
- join26(basePath, "index.json"),
12408
- join26(basePath, "index.svelte"),
12409
- join26(basePath, "index.svelte.ts"),
12410
- join26(basePath, "index.svelte.js")
12529
+ join27(basePath, "index.ts"),
12530
+ join27(basePath, "index.js"),
12531
+ join27(basePath, "index.mjs"),
12532
+ join27(basePath, "index.cjs"),
12533
+ join27(basePath, "index.json"),
12534
+ join27(basePath, "index.svelte"),
12535
+ join27(basePath, "index.svelte.ts"),
12536
+ join27(basePath, "index.svelte.js")
12411
12537
  ];
12412
12538
  const checks = await Promise.all(candidates.map(exists));
12413
12539
  return candidates.find((_2, index) => checks[index]) ?? null;
@@ -12437,8 +12563,8 @@ var resolveDevClientDir2 = () => {
12437
12563
  return jsPath;
12438
12564
  return null;
12439
12565
  }, addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
12440
- const toServer = relative10(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
12441
- const toClient = relative10(clientOutputDir, resolvedModule).replace(/\\/g, "/");
12566
+ const toServer = relative11(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
12567
+ const toClient = relative11(clientOutputDir, resolvedModule).replace(/\\/g, "/");
12442
12568
  rewrites.set(rawSpec, {
12443
12569
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
12444
12570
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12446,9 +12572,9 @@ var resolveDevClientDir2 = () => {
12446
12572
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev2 = false, stylePreprocessors) => {
12447
12573
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
12448
12574
  const generatedDir = getFrameworkGeneratedDir("svelte");
12449
- const clientDir = join26(generatedDir, "client");
12450
- const indexDir = join26(generatedDir, "indexes");
12451
- const serverDir = join26(generatedDir, "server");
12575
+ const clientDir = join27(generatedDir, "client");
12576
+ const indexDir = join27(generatedDir, "indexes");
12577
+ const serverDir = join27(generatedDir, "server");
12452
12578
  await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
12453
12579
  const dev = env2.NODE_ENV !== "production";
12454
12580
  const build2 = async (src) => {
@@ -12476,9 +12602,9 @@ var resolveDevClientDir2 = () => {
12476
12602
  const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
12477
12603
  const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedServer) : preprocessedServer;
12478
12604
  const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedClient) : preprocessedClient;
12479
- const rawRel = dirname15(relative10(svelteRoot, src)).replace(/\\/g, "/");
12480
- const relDir = rawRel.startsWith("..") ? `_ext/${relative10(process.cwd(), dirname15(src)).replace(/\\/g, "/")}` : rawRel;
12481
- const baseName = basename6(src).replace(/\.svelte(\.(ts|js))?$/, "");
12605
+ const rawRel = dirname15(relative11(svelteRoot, src)).replace(/\\/g, "/");
12606
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative11(process.cwd(), dirname15(src)).replace(/\\/g, "/")}` : rawRel;
12607
+ const baseName = basename7(src).replace(/\.svelte(\.(ts|js))?$/, "");
12482
12608
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
12483
12609
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
12484
12610
  const resolvedImports = await Promise.all(importPaths.map((importPath) => resolveSvelte(importPath, src)));
@@ -12486,8 +12612,8 @@ var resolveDevClientDir2 = () => {
12486
12612
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
12487
12613
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
12488
12614
  const externalRewrites = new Map;
12489
- const ssrOutputDir = dirname15(join26(serverDir, relDir, `${baseName}.js`));
12490
- const clientOutputDir = dirname15(join26(clientDir, relDir, `${baseName}.js`));
12615
+ const ssrOutputDir = dirname15(join27(serverDir, relDir, `${baseName}.js`));
12616
+ const clientOutputDir = dirname15(join27(clientDir, relDir, `${baseName}.js`));
12491
12617
  for (let idx = 0;idx < importPaths.length; idx++) {
12492
12618
  const rawSpec = importPaths[idx];
12493
12619
  if (!rawSpec)
@@ -12498,15 +12624,15 @@ var resolveDevClientDir2 = () => {
12498
12624
  addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
12499
12625
  if (!resolved)
12500
12626
  continue;
12501
- const childRel = relative10(svelteRoot, resolved).replace(/\\/g, "/");
12627
+ const childRel = relative11(svelteRoot, resolved).replace(/\\/g, "/");
12502
12628
  if (!childRel.startsWith(".."))
12503
12629
  continue;
12504
12630
  const childBuilt2 = cache.get(resolved);
12505
12631
  if (!childBuilt2)
12506
12632
  continue;
12507
12633
  const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
12508
- const toServer = relative10(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
12509
- const toClient = relative10(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
12634
+ const toServer = relative11(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
12635
+ const toClient = relative11(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
12510
12636
  externalRewrites.set(origSpec, {
12511
12637
  client: toClient.startsWith(".") ? toClient : `./${toClient}`,
12512
12638
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -12540,7 +12666,7 @@ var resolveDevClientDir2 = () => {
12540
12666
  }).js;
12541
12667
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
12542
12668
  if (mode === "client" && isDev2) {
12543
- const moduleKey = `/@src/${relative10(process.cwd(), src).replace(/\\/g, "/")}`;
12669
+ const moduleKey = `/@src/${relative11(process.cwd(), src).replace(/\\/g, "/")}`;
12544
12670
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
12545
12671
  if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
12546
12672
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
@@ -12552,8 +12678,8 @@ var resolveDevClientDir2 = () => {
12552
12678
  code += islandMetadataExports;
12553
12679
  return { code, map: compiledJs.map };
12554
12680
  };
12555
- const ssrPath = join26(serverDir, relDir, `${baseName}.js`);
12556
- const clientPath = join26(clientDir, relDir, `${baseName}.js`);
12681
+ const ssrPath = join27(serverDir, relDir, `${baseName}.js`);
12682
+ const clientPath = join27(clientDir, relDir, `${baseName}.js`);
12557
12683
  await Promise.all([
12558
12684
  mkdir4(dirname15(ssrPath), { recursive: true }),
12559
12685
  mkdir4(dirname15(clientPath), { recursive: true })
@@ -12589,10 +12715,10 @@ var resolveDevClientDir2 = () => {
12589
12715
  };
12590
12716
  const roots = await Promise.all(entryPoints.map(build2));
12591
12717
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
12592
- const relClientDir = dirname15(relative10(clientDir, client2));
12593
- const name = basename6(client2, extname5(client2));
12594
- const indexPath = join26(indexDir, relClientDir, `${name}.js`);
12595
- const importRaw = relative10(dirname15(indexPath), client2).split(sep2).join("/");
12718
+ const relClientDir = dirname15(relative11(clientDir, client2));
12719
+ const name = basename7(client2, extname5(client2));
12720
+ const indexPath = join27(indexDir, relClientDir, `${name}.js`);
12721
+ const importRaw = relative11(dirname15(indexPath), client2).split(sep2).join("/");
12596
12722
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
12597
12723
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
12598
12724
  import "${hmrClientPath3}";
@@ -12669,8 +12795,8 @@ if (typeof window !== "undefined") {
12669
12795
  return {
12670
12796
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
12671
12797
  svelteIndexPaths: roots.map(({ client: client2 }) => {
12672
- const rel = dirname15(relative10(clientDir, client2));
12673
- return join26(indexDir, rel, basename6(client2));
12798
+ const rel = dirname15(relative11(clientDir, client2));
12799
+ return join27(indexDir, rel, basename7(client2));
12674
12800
  }),
12675
12801
  svelteServerPaths: roots.map(({ ssr }) => ssr)
12676
12802
  };
@@ -12685,7 +12811,7 @@ var init_compileSvelte = __esm(() => {
12685
12811
  init_lowerAwaitSlotSyntax();
12686
12812
  init_renderToReadableStream();
12687
12813
  devClientDir2 = resolveDevClientDir2();
12688
- hmrClientPath3 = join26(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12814
+ hmrClientPath3 = join27(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
12689
12815
  persistentCache = new Map;
12690
12816
  sourceHashCache = new Map;
12691
12817
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -12700,7 +12826,7 @@ __export(exports_chainInlineSourcemaps, {
12700
12826
  chainBundleInlineSourcemap: () => chainBundleInlineSourcemap,
12701
12827
  buildLineRemap: () => buildLineRemap
12702
12828
  });
12703
- import { readFileSync as readFileSync15, writeFileSync as writeFileSync10 } from "fs";
12829
+ import { readFileSync as readFileSync16, writeFileSync as writeFileSync10 } from "fs";
12704
12830
  var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", BASE64_TO_INT, decodeVlq = (str, startPos) => {
12705
12831
  let result = 0;
12706
12832
  let shift = 0;
@@ -12991,7 +13117,7 @@ var BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567
12991
13117
  version: 3
12992
13118
  };
12993
13119
  }, chainBundleInlineSourcemap = (bundleFilePath) => {
12994
- const text = readFileSync15(bundleFilePath, "utf-8");
13120
+ const text = readFileSync16(bundleFilePath, "utf-8");
12995
13121
  const outerMap = extractInlineMap(text);
12996
13122
  if (!outerMap)
12997
13123
  return;
@@ -13080,11 +13206,11 @@ __export(exports_compileVue, {
13080
13206
  import { existsSync as existsSync21 } from "fs";
13081
13207
  import { mkdir as mkdir5 } from "fs/promises";
13082
13208
  import {
13083
- basename as basename7,
13209
+ basename as basename8,
13084
13210
  dirname as dirname16,
13085
13211
  isAbsolute as isAbsolute4,
13086
- join as join27,
13087
- relative as relative11,
13212
+ join as join28,
13213
+ relative as relative12,
13088
13214
  resolve as resolve24
13089
13215
  } from "path";
13090
13216
  var {file: file3, write: write3, Transpiler: Transpiler3 } = globalThis.Bun;
@@ -13136,7 +13262,7 @@ var resolveDevClientDir3 = () => {
13136
13262
  return "template-only";
13137
13263
  }
13138
13264
  return "full";
13139
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath, sourceDir) => {
13265
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative12(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), extractImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => importPath !== undefined), toJs = (filePath, sourceDir) => {
13140
13266
  if (filePath.endsWith(".vue"))
13141
13267
  return filePath.replace(/\.vue$/, ".js");
13142
13268
  if (filePath.endsWith(".ts"))
@@ -13169,9 +13295,9 @@ var resolveDevClientDir3 = () => {
13169
13295
  const cachedResult = cacheMap.get(sourceFilePath);
13170
13296
  if (cachedResult)
13171
13297
  return cachedResult;
13172
- const relativeFilePath = relative11(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13298
+ const relativeFilePath = relative12(vueRootDir, sourceFilePath).replace(/\\/g, "/");
13173
13299
  const relativeWithoutExtension = relativeFilePath.replace(/\.vue$/, "");
13174
- const fileBaseName = basename7(sourceFilePath, ".vue");
13300
+ const fileBaseName = basename8(sourceFilePath, ".vue");
13175
13301
  const componentId = toKebab(fileBaseName);
13176
13302
  const rawSourceContent = await file3(sourceFilePath).text();
13177
13303
  const sourceContent = isEntryPoint ? addAutoRouterSetupApp(rawSourceContent) : rawSourceContent;
@@ -13261,7 +13387,7 @@ var resolveDevClientDir3 = () => {
13261
13387
  ];
13262
13388
  let cssOutputPaths = [];
13263
13389
  if (isEntryPoint && allCss.length) {
13264
- const cssOutputFile = join27(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13390
+ const cssOutputFile = join28(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
13265
13391
  await mkdir5(dirname16(cssOutputFile), { recursive: true });
13266
13392
  await write3(cssOutputFile, allCss.join(`
13267
13393
  `));
@@ -13292,8 +13418,8 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13292
13418
  };
13293
13419
  const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
13294
13420
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
13295
- const clientOutputPath = join27(outputDirs.client, `${relativeWithoutExtension}.js`);
13296
- const serverOutputPath = join27(outputDirs.server, `${relativeWithoutExtension}.js`);
13421
+ const clientOutputPath = join28(outputDirs.client, `${relativeWithoutExtension}.js`);
13422
+ const serverOutputPath = join28(outputDirs.server, `${relativeWithoutExtension}.js`);
13297
13423
  const relDir = dirname16(relativeFilePath);
13298
13424
  const relDepth = relDir === "." ? 0 : relDir.split("/").length;
13299
13425
  const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_2, prefix, dots) => {
@@ -13306,7 +13432,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13306
13432
  let result2 = code;
13307
13433
  for (const [bareImport, paths] of packageImportRewrites) {
13308
13434
  const targetPath = mode === "server" ? paths.server : paths.client;
13309
- let rel = relative11(dirname16(outputPath), targetPath).replace(/\\/g, "/");
13435
+ let rel = relative12(dirname16(outputPath), targetPath).replace(/\\/g, "/");
13310
13436
  if (!rel.startsWith("."))
13311
13437
  rel = `./${rel}`;
13312
13438
  result2 = result2.replaceAll(bareImport, rel);
@@ -13346,10 +13472,10 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13346
13472
  }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors) => {
13347
13473
  const compiler = await import("@vue/compiler-sfc");
13348
13474
  const generatedDir = getFrameworkGeneratedDir("vue");
13349
- const clientOutputDir = join27(generatedDir, "client");
13350
- const indexOutputDir = join27(generatedDir, "indexes");
13351
- const serverOutputDir = join27(generatedDir, "server");
13352
- const cssOutputDir = join27(generatedDir, "compiled");
13475
+ const clientOutputDir = join28(generatedDir, "client");
13476
+ const indexOutputDir = join28(generatedDir, "indexes");
13477
+ const serverOutputDir = join28(generatedDir, "server");
13478
+ const cssOutputDir = join28(generatedDir, "compiled");
13353
13479
  await Promise.all([
13354
13480
  mkdir5(clientOutputDir, { recursive: true }),
13355
13481
  mkdir5(indexOutputDir, { recursive: true }),
@@ -13365,9 +13491,9 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13365
13491
  server: serverOutputDir
13366
13492
  }, buildCache, true, vueRootDir, compiler, stylePreprocessors);
13367
13493
  result.tsHelperPaths.forEach((path) => allTsHelperPaths.add(path));
13368
- const entryBaseName = basename7(entryPath, ".vue");
13369
- const indexOutputFile = join27(indexOutputDir, `${entryBaseName}.js`);
13370
- const clientOutputFile = join27(clientOutputDir, relative11(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13494
+ const entryBaseName = basename8(entryPath, ".vue");
13495
+ const indexOutputFile = join28(indexOutputDir, `${entryBaseName}.js`);
13496
+ const clientOutputFile = join28(clientOutputDir, relative12(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
13371
13497
  await mkdir5(dirname16(indexOutputFile), { recursive: true });
13372
13498
  const vueHmrImports = isDev2 ? [
13373
13499
  `window.__HMR_FRAMEWORK__ = "vue";`,
@@ -13375,7 +13501,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13375
13501
  ] : [];
13376
13502
  await write3(indexOutputFile, [
13377
13503
  ...vueHmrImports,
13378
- `import Comp, * as PageModule from "${relative11(dirname16(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
13504
+ `import Comp, * as PageModule from "${relative12(dirname16(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
13379
13505
  'import { createSSRApp, createApp } from "vue";',
13380
13506
  "",
13381
13507
  "// HMR State Preservation: Check for preserved state from HMR",
@@ -13519,9 +13645,9 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
13519
13645
  await Promise.all(Array.from(allTsHelperPaths).map(async (tsPath) => {
13520
13646
  const sourceCode = await file3(tsPath).text();
13521
13647
  const transpiledCode = transpiler4.transformSync(sourceCode);
13522
- const relativeJsPath = relative11(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13523
- const outClientPath = join27(clientOutputDir, relativeJsPath);
13524
- const outServerPath = join27(serverOutputDir, relativeJsPath);
13648
+ const relativeJsPath = relative12(vueRootDir, tsPath).replace(/\.ts$/, ".js");
13649
+ const outClientPath = join28(clientOutputDir, relativeJsPath);
13650
+ const outServerPath = join28(serverOutputDir, relativeJsPath);
13525
13651
  await mkdir5(dirname16(outClientPath), { recursive: true });
13526
13652
  await mkdir5(dirname16(outServerPath), { recursive: true });
13527
13653
  await write3(outClientPath, transpiledCode);
@@ -13544,7 +13670,7 @@ var init_compileVue = __esm(() => {
13544
13670
  init_vueAutoRouterTransform();
13545
13671
  init_stylePreprocessor();
13546
13672
  devClientDir3 = resolveDevClientDir3();
13547
- hmrClientPath4 = join27(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13673
+ hmrClientPath4 = join28(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
13548
13674
  transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
13549
13675
  scriptCache = new Map;
13550
13676
  scriptSetupCache = new Map;
@@ -14025,17 +14151,17 @@ __export(exports_compileAngular, {
14025
14151
  compileAngularFile: () => compileAngularFile,
14026
14152
  compileAngular: () => compileAngular
14027
14153
  });
14028
- import { existsSync as existsSync22, readFileSync as readFileSync16, promises as fs5 } from "fs";
14029
- import { join as join28, basename as basename8, sep as sep3, dirname as dirname17, resolve as resolve25, relative as relative12 } from "path";
14154
+ import { existsSync as existsSync22, readFileSync as readFileSync17, promises as fs5 } from "fs";
14155
+ import { join as join29, basename as basename9, sep as sep3, dirname as dirname17, resolve as resolve25, relative as relative13 } from "path";
14030
14156
  var {Glob: Glob6 } = globalThis.Bun;
14031
- import ts7 from "typescript";
14157
+ import ts8 from "typescript";
14032
14158
  var traceAngularPhase = async (name, fn2, metadata2) => {
14033
14159
  const tracePhase = globalThis.__absoluteBuildTracePhase;
14034
14160
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
14035
14161
  }, readTsconfigPathAliases = () => {
14036
14162
  try {
14037
14163
  const configPath2 = resolve25(process.cwd(), "tsconfig.json");
14038
- const config = ts7.readConfigFile(configPath2, ts7.sys.readFile).config;
14164
+ const config = ts8.readConfigFile(configPath2, ts8.sys.readFile).config;
14039
14165
  const compilerOptions = config?.compilerOptions ?? {};
14040
14166
  const baseUrl = resolve25(process.cwd(), compilerOptions.baseUrl ?? ".");
14041
14167
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
@@ -14069,10 +14195,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14069
14195
  `${candidate}.tsx`,
14070
14196
  `${candidate}.js`,
14071
14197
  `${candidate}.jsx`,
14072
- join28(candidate, "index.ts"),
14073
- join28(candidate, "index.tsx"),
14074
- join28(candidate, "index.js"),
14075
- join28(candidate, "index.jsx")
14198
+ join29(candidate, "index.ts"),
14199
+ join29(candidate, "index.tsx"),
14200
+ join29(candidate, "index.js"),
14201
+ join29(candidate, "index.jsx")
14076
14202
  ];
14077
14203
  return candidates.find((file4) => existsSync22(file4));
14078
14204
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
@@ -14164,7 +14290,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14164
14290
  return resolve25(import.meta.dir, "./dev/client");
14165
14291
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
14166
14292
  try {
14167
- return ts7.flattenDiagnosticMessageText(diagnostic.messageText, `
14293
+ return ts8.flattenDiagnosticMessageText(diagnostic.messageText, `
14168
14294
  `);
14169
14295
  } catch {
14170
14296
  return String(diagnostic.messageText || "Unknown error");
@@ -14172,7 +14298,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14172
14298
  }, throwOnCompilationErrors = (diagnostics) => {
14173
14299
  if (!diagnostics?.length)
14174
14300
  return;
14175
- const errors = diagnostics.filter((diag) => diag.category === ts7.DiagnosticCategory.Error);
14301
+ const errors = diagnostics.filter((diag) => diag.category === ts8.DiagnosticCategory.Error);
14176
14302
  if (!errors.length)
14177
14303
  return;
14178
14304
  const fullMessage = errors.map(formatDiagnosticMessage).join(`
@@ -14214,22 +14340,22 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14214
14340
  }
14215
14341
  return `${path}.js${query}`;
14216
14342
  }, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
14217
- const sourceFile = ts7.createSourceFile(fileName, source, ts7.ScriptTarget.Latest, true, ts7.ScriptKind.TS);
14343
+ const sourceFile = ts8.createSourceFile(fileName, source, ts8.ScriptTarget.Latest, true, ts8.ScriptKind.TS);
14218
14344
  const specifiers = [];
14219
14345
  const addSpecifier = (node) => {
14220
- if (!node || !ts7.isStringLiteralLike(node))
14346
+ if (!node || !ts8.isStringLiteralLike(node))
14221
14347
  return;
14222
14348
  const specifier = node.text;
14223
14349
  if (isRelativeModuleSpecifier(specifier))
14224
14350
  specifiers.push(specifier);
14225
14351
  };
14226
14352
  const visit = (node) => {
14227
- if (ts7.isImportDeclaration(node) || ts7.isExportDeclaration(node)) {
14353
+ if (ts8.isImportDeclaration(node) || ts8.isExportDeclaration(node)) {
14228
14354
  addSpecifier(node.moduleSpecifier);
14229
- } else if (ts7.isCallExpression(node) && node.expression.kind === ts7.SyntaxKind.ImportKeyword) {
14355
+ } else if (ts8.isCallExpression(node) && node.expression.kind === ts8.SyntaxKind.ImportKeyword) {
14230
14356
  addSpecifier(node.arguments[0]);
14231
14357
  }
14232
- ts7.forEachChild(node, visit);
14358
+ ts8.forEachChild(node, visit);
14233
14359
  };
14234
14360
  visit(sourceFile);
14235
14361
  return specifiers;
@@ -14242,10 +14368,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14242
14368
  `${basePath}.tsx`,
14243
14369
  `${basePath}.mts`,
14244
14370
  `${basePath}.cts`,
14245
- join28(basePath, "index.ts"),
14246
- join28(basePath, "index.tsx"),
14247
- join28(basePath, "index.mts"),
14248
- join28(basePath, "index.cts")
14371
+ join29(basePath, "index.ts"),
14372
+ join29(basePath, "index.tsx"),
14373
+ join29(basePath, "index.mts"),
14374
+ join29(basePath, "index.cts")
14249
14375
  ];
14250
14376
  return candidates.map((candidate) => resolve25(candidate)).find((candidate) => existsSync22(candidate) && !candidate.endsWith(".d.ts")) ?? null;
14251
14377
  }, readFileForAotTransform = async (fileName, readFile6) => {
@@ -14271,15 +14397,15 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14271
14397
  const paths = [];
14272
14398
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14273
14399
  if (templateUrlMatch?.[1])
14274
- paths.push(join28(fileDir, templateUrlMatch[1]));
14400
+ paths.push(join29(fileDir, templateUrlMatch[1]));
14275
14401
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14276
14402
  if (styleUrlMatch?.[1])
14277
- paths.push(join28(fileDir, styleUrlMatch[1]));
14403
+ paths.push(join29(fileDir, styleUrlMatch[1]));
14278
14404
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
14279
14405
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
14280
14406
  if (urlMatches) {
14281
14407
  for (const urlMatch of urlMatches) {
14282
- paths.push(join28(fileDir, urlMatch.replace(/['"]/g, "")));
14408
+ paths.push(join29(fileDir, urlMatch.replace(/['"]/g, "")));
14283
14409
  }
14284
14410
  }
14285
14411
  return paths.map((path) => resolve25(path));
@@ -14313,7 +14439,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14313
14439
  safeStableStringify(stylePreprocessors ?? null)
14314
14440
  ].join("\x00");
14315
14441
  const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
14316
- return join28(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14442
+ return join29(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
14317
14443
  }, precomputeAotResourceTransforms = async (inputPaths, readFile6, stylePreprocessors) => {
14318
14444
  const transformedSources = new Map;
14319
14445
  const visited = new Set;
@@ -14359,10 +14485,10 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14359
14485
  return { stats, transformedSources };
14360
14486
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
14361
14487
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
14362
- const outputPath = resolve25(join28(outDir, relative12(process.cwd(), resolve25(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14488
+ const outputPath = resolve25(join29(outDir, relative13(process.cwd(), resolve25(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
14363
14489
  return [
14364
14490
  outputPath,
14365
- buildIslandMetadataExports(readFileSync16(inputPath, "utf-8"))
14491
+ buildIslandMetadataExports(readFileSync17(inputPath, "utf-8"))
14366
14492
  ];
14367
14493
  })), { entries: inputPaths.length });
14368
14494
  await traceAngularPhase("aot/preload-compiler", () => import("@angular/compiler"));
@@ -14377,36 +14503,36 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14377
14503
  emitDecoratorMetadata: true,
14378
14504
  esModuleInterop: true,
14379
14505
  experimentalDecorators: true,
14380
- module: ts7.ModuleKind.ESNext,
14381
- moduleResolution: ts7.ModuleResolutionKind.Bundler,
14382
- newLine: ts7.NewLineKind.LineFeed,
14506
+ module: ts8.ModuleKind.ESNext,
14507
+ moduleResolution: ts8.ModuleResolutionKind.Bundler,
14508
+ newLine: ts8.NewLineKind.LineFeed,
14383
14509
  noLib: false,
14384
14510
  outDir,
14385
14511
  skipLibCheck: true,
14386
- target: ts7.ScriptTarget.ES2022,
14512
+ target: ts8.ScriptTarget.ES2022,
14387
14513
  ...config.options
14388
14514
  };
14389
- options.target = ts7.ScriptTarget.ES2022;
14515
+ options.target = ts8.ScriptTarget.ES2022;
14390
14516
  options.experimentalDecorators = true;
14391
14517
  options.emitDecoratorMetadata = true;
14392
- options.newLine = ts7.NewLineKind.LineFeed;
14518
+ options.newLine = ts8.NewLineKind.LineFeed;
14393
14519
  options.outDir = outDir;
14394
14520
  options.noEmit = false;
14395
14521
  options.incremental = false;
14396
14522
  options.tsBuildInfoFile = undefined;
14397
14523
  options.rootDir = process.cwd();
14398
- const host = await traceAngularPhase("aot/create-compiler-host", () => ts7.createCompilerHost(options));
14524
+ const host = await traceAngularPhase("aot/create-compiler-host", () => ts8.createCompilerHost(options));
14399
14525
  const originalGetDefaultLibLocation = host.getDefaultLibLocation;
14400
14526
  host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
14401
14527
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
14402
14528
  host.getDefaultLibFileName = (opts) => {
14403
14529
  const fileName = originalGetDefaultLibFileName ? originalGetDefaultLibFileName(opts) : "lib.d.ts";
14404
- return basename8(fileName);
14530
+ return basename9(fileName);
14405
14531
  };
14406
14532
  const originalGetSourceFile = host.getSourceFile;
14407
14533
  host.getSourceFile = (fileName, languageVersion, onError) => {
14408
14534
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
14409
- const resolvedPath = join28(tsLibDir, fileName);
14535
+ const resolvedPath = join29(tsLibDir, fileName);
14410
14536
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
14411
14537
  }
14412
14538
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
@@ -14441,7 +14567,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14441
14567
  host.getSourceFile = (fileName, languageVersion, onError) => {
14442
14568
  const source = transformedSources.get(resolve25(fileName));
14443
14569
  if (source) {
14444
- return ts7.createSourceFile(fileName, source, languageVersion, true);
14570
+ return ts8.createSourceFile(fileName, source, languageVersion, true);
14445
14571
  }
14446
14572
  return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
14447
14573
  };
@@ -14461,7 +14587,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
14461
14587
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
14462
14588
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
14463
14589
  content,
14464
- target: join28(outDir, fileName)
14590
+ target: join29(outDir, fileName)
14465
14591
  }));
14466
14592
  const outputFiles = new Set(rawEntries.map(({ target }) => resolve25(target)));
14467
14593
  return rawEntries.map(({ content, target }) => {
@@ -14638,7 +14764,7 @@ ${fields}
14638
14764
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
14639
14765
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14640
14766
  if (templateUrlMatch?.[1]) {
14641
- const templatePath = join28(fileDir, templateUrlMatch[1]);
14767
+ const templatePath = join29(fileDir, templateUrlMatch[1]);
14642
14768
  if (!existsSync22(templatePath)) {
14643
14769
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14644
14770
  }
@@ -14669,11 +14795,11 @@ ${fields}
14669
14795
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
14670
14796
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
14671
14797
  if (templateUrlMatch?.[1]) {
14672
- const templatePath = join28(fileDir, templateUrlMatch[1]);
14798
+ const templatePath = join29(fileDir, templateUrlMatch[1]);
14673
14799
  if (!existsSync22(templatePath)) {
14674
14800
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
14675
14801
  }
14676
- const templateRaw2 = readFileSync16(templatePath, "utf-8");
14802
+ const templateRaw2 = readFileSync17(templatePath, "utf-8");
14677
14803
  const lowered2 = lowerAngularDeferSyntax(templateRaw2);
14678
14804
  const escaped2 = escapeTemplateContent(lowered2.template);
14679
14805
  const replacedSource2 = source.slice(0, templateUrlMatch.index) + `template: \`${escaped2}\`` + source.slice(templateUrlMatch.index + templateUrlMatch[0].length);
@@ -14706,7 +14832,7 @@ ${fields}
14706
14832
  return source;
14707
14833
  const stylePromises = urlMatches.map((urlMatch) => {
14708
14834
  const styleUrl = urlMatch.replace(/['"]/g, "");
14709
- return readAndEscapeFile(join28(fileDir, styleUrl), stylePreprocessors);
14835
+ return readAndEscapeFile(join29(fileDir, styleUrl), stylePreprocessors);
14710
14836
  });
14711
14837
  const results = await Promise.all(stylePromises);
14712
14838
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -14717,7 +14843,7 @@ ${fields}
14717
14843
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
14718
14844
  if (!styleUrlMatch?.[1])
14719
14845
  return source;
14720
- const escaped = await readAndEscapeFile(join28(fileDir, styleUrlMatch[1]), stylePreprocessors);
14846
+ const escaped = await readAndEscapeFile(join29(fileDir, styleUrlMatch[1]), stylePreprocessors);
14721
14847
  if (!escaped)
14722
14848
  return source;
14723
14849
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -14753,10 +14879,10 @@ ${fields}
14753
14879
  `${candidate}.js`,
14754
14880
  `${candidate}.jsx`,
14755
14881
  `${candidate}.json`,
14756
- join28(candidate, "index.ts"),
14757
- join28(candidate, "index.tsx"),
14758
- join28(candidate, "index.js"),
14759
- join28(candidate, "index.jsx")
14882
+ join29(candidate, "index.ts"),
14883
+ join29(candidate, "index.tsx"),
14884
+ join29(candidate, "index.js"),
14885
+ join29(candidate, "index.jsx")
14760
14886
  ];
14761
14887
  return candidates.find((file4) => existsSync22(file4));
14762
14888
  };
@@ -14782,8 +14908,8 @@ ${fields}
14782
14908
  const toOutputPath = (sourcePath) => {
14783
14909
  const inputDir = dirname17(sourcePath);
14784
14910
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
14785
- const fileBase = basename8(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
14786
- return join28(outDir, relativeDir, fileBase);
14911
+ const fileBase = basename9(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
14912
+ return join29(outDir, relativeDir, fileBase);
14787
14913
  };
14788
14914
  const withCacheBuster = (specifier) => {
14789
14915
  if (!cacheBuster)
@@ -14833,8 +14959,8 @@ ${fields}
14833
14959
  if (resolved.endsWith(".json") && existsSync22(resolved)) {
14834
14960
  const inputDir2 = dirname17(resolved);
14835
14961
  const relativeDir2 = inputDir2.startsWith(baseDir) ? inputDir2.substring(baseDir.length + 1) : inputDir2;
14836
- const targetDir2 = join28(outDir, relativeDir2);
14837
- const targetPath2 = join28(targetDir2, basename8(resolved));
14962
+ const targetDir2 = join29(outDir, relativeDir2);
14963
+ const targetPath2 = join29(targetDir2, basename9(resolved));
14838
14964
  await fs5.mkdir(targetDir2, { recursive: true });
14839
14965
  await fs5.copyFile(resolved, targetPath2);
14840
14966
  allOutputs.push(targetPath2);
@@ -14850,8 +14976,8 @@ ${fields}
14850
14976
  sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname17(actualPath)).source;
14851
14977
  const inputDir = dirname17(actualPath);
14852
14978
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
14853
- const fileBase = basename8(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
14854
- const targetDir = join28(outDir, relativeDir);
14979
+ const fileBase = basename9(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
14980
+ const targetDir = join29(outDir, relativeDir);
14855
14981
  const targetPath = toOutputPath(actualPath);
14856
14982
  const localImports = [];
14857
14983
  const importRewrites = new Map;
@@ -14873,7 +14999,7 @@ ${fields}
14873
14999
  const resolved2 = resolveLocalImport(specifier, inputDir);
14874
15000
  if (!resolved2)
14875
15001
  return null;
14876
- const relativeImport = relative12(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
15002
+ const relativeImport = relative13(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
14877
15003
  const relativeRewrite = relativeImport.startsWith(".") ? relativeImport : `./${relativeImport}`;
14878
15004
  importRewrites.set(specifier, relativeRewrite);
14879
15005
  return resolved2;
@@ -14912,7 +15038,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14912
15038
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
14913
15039
  }
14914
15040
  const compiledRoot = compiledParent;
14915
- const indexesDir = join28(compiledParent, "indexes");
15041
+ const indexesDir = join29(compiledParent, "indexes");
14916
15042
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
14917
15043
  const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve25(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
14918
15044
  if (!hmr) {
@@ -14926,9 +15052,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14926
15052
  absolute: false,
14927
15053
  cwd: angularSrcDir
14928
15054
  })) {
14929
- const sourcePath = join28(angularSrcDir, rel);
14930
- const cwdRel = relative12(cwd, sourcePath);
14931
- const targetPath = join28(compiledRoot, cwdRel);
15055
+ const sourcePath = join29(angularSrcDir, rel);
15056
+ const cwdRel = relative13(cwd, sourcePath);
15057
+ const targetPath = join29(compiledRoot, cwdRel);
14932
15058
  await fs5.mkdir(dirname17(targetPath), { recursive: true });
14933
15059
  await fs5.copyFile(sourcePath, targetPath);
14934
15060
  }
@@ -14937,17 +15063,17 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14937
15063
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
14938
15064
  const compileTasks = entryPoints.map(async (entry) => {
14939
15065
  const resolvedEntry = resolve25(entry);
14940
- const relativeEntry = relative12(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
15066
+ const relativeEntry = relative13(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
14941
15067
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
14942
15068
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
14943
15069
  entry: resolvedEntry
14944
15070
  }) : aotOutputs;
14945
- const fileBase = basename8(resolvedEntry).replace(/\.[tj]s$/, "");
15071
+ const fileBase = basename9(resolvedEntry).replace(/\.[tj]s$/, "");
14946
15072
  const jsName = `${fileBase}.js`;
14947
15073
  const compiledFallbackPaths = [
14948
- join28(compiledRoot, relativeEntry),
14949
- join28(compiledRoot, "pages", jsName),
14950
- join28(compiledRoot, jsName)
15074
+ join29(compiledRoot, relativeEntry),
15075
+ join29(compiledRoot, "pages", jsName),
15076
+ join29(compiledRoot, jsName)
14951
15077
  ].map((file4) => resolve25(file4));
14952
15078
  const resolveRawServerFile = (candidatePaths) => {
14953
15079
  const normalizedCandidates = [
@@ -14995,7 +15121,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
14995
15121
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
14996
15122
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
14997
15123
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
14998
- const clientFile = join28(indexesDir, jsName);
15124
+ const clientFile = join29(indexesDir, jsName);
14999
15125
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync22(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
15000
15126
  return {
15001
15127
  clientPath: clientFile,
@@ -15021,13 +15147,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
15021
15147
  `;
15022
15148
  }
15023
15149
  await traceAngularPhase("wrapper/write-server-output", () => fs5.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
15024
- const relativePath = relative12(indexesDir, rawServerFile).replace(/\\/g, "/");
15150
+ const relativePath = relative13(indexesDir, rawServerFile).replace(/\\/g, "/");
15025
15151
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
15026
15152
  const manifestKeyForProviders = toPascal(fileBase);
15027
- const providersFilePath = join28(compiledParent, "providers", `${manifestKeyForProviders}.providers.ts`);
15153
+ const providersFilePath = join29(compiledParent, "providers", `${manifestKeyForProviders}.providers.ts`);
15028
15154
  const hasGeneratedProviders = existsSync22(providersFilePath);
15029
15155
  const providersImportPath = hasGeneratedProviders ? (() => {
15030
- const rel = relative12(indexesDir, providersFilePath.replace(/\.ts$/, "")).replace(/\\/g, "/");
15156
+ const rel = relative13(indexesDir, providersFilePath.replace(/\.ts$/, "")).replace(/\\/g, "/");
15031
15157
  return rel.startsWith(".") ? rel : `./${rel}`;
15032
15158
  })() : null;
15033
15159
  const generatedProvidersImport = providersImportPath ? `import { providers as generatedProviders } from '${providersImportPath}';` : "var generatedProviders = null;";
@@ -15231,24 +15357,24 @@ var init_compileAngular = __esm(() => {
15231
15357
  init_stylePreprocessor();
15232
15358
  init_generatedDir();
15233
15359
  devClientDir4 = resolveDevClientDir4();
15234
- hmrClientPath5 = join28(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15360
+ hmrClientPath5 = join29(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
15235
15361
  jitContentCache = new Map;
15236
15362
  wrapperOutputCache = new Map;
15237
15363
  });
15238
15364
 
15239
15365
  // src/dev/angular/hmrImportGenerator.ts
15240
- import ts8 from "typescript";
15366
+ import ts9 from "typescript";
15241
15367
  var createHmrImportGenerator = (namespaceMap) => ({
15242
15368
  addImport(request) {
15243
15369
  const ns = namespaceMap.get(request.exportModuleSpecifier);
15244
15370
  if (!ns) {
15245
15371
  throw new Error(`HMR import generator has no namespace mapping for ${request.exportModuleSpecifier}. ` + `Add it to namespaceDependencies before calling compileHmrUpdateCallback.`);
15246
15372
  }
15247
- const namespaceId = ts8.factory.createIdentifier(ns);
15373
+ const namespaceId = ts9.factory.createIdentifier(ns);
15248
15374
  if (request.exportSymbolName === null) {
15249
15375
  return namespaceId;
15250
15376
  }
15251
- return ts8.factory.createPropertyAccessExpression(namespaceId, ts8.factory.createIdentifier(request.exportSymbolName));
15377
+ return ts9.factory.createPropertyAccessExpression(namespaceId, ts9.factory.createIdentifier(request.exportSymbolName));
15252
15378
  }
15253
15379
  });
15254
15380
  var init_hmrImportGenerator = () => {};
@@ -15621,13 +15747,13 @@ var init_translator = __esm(() => {
15621
15747
  });
15622
15748
 
15623
15749
  // src/dev/angular/vendor/translator/ts_util.ts
15624
- import ts9 from "typescript";
15750
+ import ts10 from "typescript";
15625
15751
  function tsNumericExpression(value) {
15626
15752
  if (value < 0) {
15627
- const operand = ts9.factory.createNumericLiteral(Math.abs(value));
15628
- return ts9.factory.createPrefixUnaryExpression(ts9.SyntaxKind.MinusToken, operand);
15753
+ const operand = ts10.factory.createNumericLiteral(Math.abs(value));
15754
+ return ts10.factory.createPrefixUnaryExpression(ts10.SyntaxKind.MinusToken, operand);
15629
15755
  }
15630
- return ts9.factory.createNumericLiteral(value);
15756
+ return ts10.factory.createNumericLiteral(value);
15631
15757
  }
15632
15758
  var init_ts_util = __esm(() => {
15633
15759
  /*!
@@ -15640,142 +15766,142 @@ var init_ts_util = __esm(() => {
15640
15766
  });
15641
15767
 
15642
15768
  // src/dev/angular/vendor/translator/typescript_ast_factory.ts
15643
- import ts10 from "typescript";
15769
+ import ts11 from "typescript";
15644
15770
 
15645
15771
  class TypeScriptAstFactory {
15646
15772
  annotateForClosureCompiler;
15647
15773
  externalSourceFiles = new Map;
15648
15774
  UNARY_OPERATORS = /* @__PURE__ */ (() => ({
15649
- "+": ts10.SyntaxKind.PlusToken,
15650
- "-": ts10.SyntaxKind.MinusToken,
15651
- "!": ts10.SyntaxKind.ExclamationToken
15775
+ "+": ts11.SyntaxKind.PlusToken,
15776
+ "-": ts11.SyntaxKind.MinusToken,
15777
+ "!": ts11.SyntaxKind.ExclamationToken
15652
15778
  }))();
15653
15779
  BINARY_OPERATORS = /* @__PURE__ */ (() => ({
15654
- "&&": ts10.SyntaxKind.AmpersandAmpersandToken,
15655
- ">": ts10.SyntaxKind.GreaterThanToken,
15656
- ">=": ts10.SyntaxKind.GreaterThanEqualsToken,
15657
- "&": ts10.SyntaxKind.AmpersandToken,
15658
- "|": ts10.SyntaxKind.BarToken,
15659
- "/": ts10.SyntaxKind.SlashToken,
15660
- "==": ts10.SyntaxKind.EqualsEqualsToken,
15661
- "===": ts10.SyntaxKind.EqualsEqualsEqualsToken,
15662
- "<": ts10.SyntaxKind.LessThanToken,
15663
- "<=": ts10.SyntaxKind.LessThanEqualsToken,
15664
- "-": ts10.SyntaxKind.MinusToken,
15665
- "%": ts10.SyntaxKind.PercentToken,
15666
- "*": ts10.SyntaxKind.AsteriskToken,
15667
- "**": ts10.SyntaxKind.AsteriskAsteriskToken,
15668
- "!=": ts10.SyntaxKind.ExclamationEqualsToken,
15669
- "!==": ts10.SyntaxKind.ExclamationEqualsEqualsToken,
15670
- "||": ts10.SyntaxKind.BarBarToken,
15671
- "+": ts10.SyntaxKind.PlusToken,
15672
- "??": ts10.SyntaxKind.QuestionQuestionToken,
15673
- "=": ts10.SyntaxKind.EqualsToken,
15674
- "+=": ts10.SyntaxKind.PlusEqualsToken,
15675
- "-=": ts10.SyntaxKind.MinusEqualsToken,
15676
- "*=": ts10.SyntaxKind.AsteriskEqualsToken,
15677
- "/=": ts10.SyntaxKind.SlashEqualsToken,
15678
- "%=": ts10.SyntaxKind.PercentEqualsToken,
15679
- "**=": ts10.SyntaxKind.AsteriskAsteriskEqualsToken,
15680
- "&&=": ts10.SyntaxKind.AmpersandAmpersandEqualsToken,
15681
- "||=": ts10.SyntaxKind.BarBarEqualsToken,
15682
- "??=": ts10.SyntaxKind.QuestionQuestionEqualsToken,
15683
- in: ts10.SyntaxKind.InKeyword,
15684
- instanceof: ts10.SyntaxKind.InstanceOfKeyword
15780
+ "&&": ts11.SyntaxKind.AmpersandAmpersandToken,
15781
+ ">": ts11.SyntaxKind.GreaterThanToken,
15782
+ ">=": ts11.SyntaxKind.GreaterThanEqualsToken,
15783
+ "&": ts11.SyntaxKind.AmpersandToken,
15784
+ "|": ts11.SyntaxKind.BarToken,
15785
+ "/": ts11.SyntaxKind.SlashToken,
15786
+ "==": ts11.SyntaxKind.EqualsEqualsToken,
15787
+ "===": ts11.SyntaxKind.EqualsEqualsEqualsToken,
15788
+ "<": ts11.SyntaxKind.LessThanToken,
15789
+ "<=": ts11.SyntaxKind.LessThanEqualsToken,
15790
+ "-": ts11.SyntaxKind.MinusToken,
15791
+ "%": ts11.SyntaxKind.PercentToken,
15792
+ "*": ts11.SyntaxKind.AsteriskToken,
15793
+ "**": ts11.SyntaxKind.AsteriskAsteriskToken,
15794
+ "!=": ts11.SyntaxKind.ExclamationEqualsToken,
15795
+ "!==": ts11.SyntaxKind.ExclamationEqualsEqualsToken,
15796
+ "||": ts11.SyntaxKind.BarBarToken,
15797
+ "+": ts11.SyntaxKind.PlusToken,
15798
+ "??": ts11.SyntaxKind.QuestionQuestionToken,
15799
+ "=": ts11.SyntaxKind.EqualsToken,
15800
+ "+=": ts11.SyntaxKind.PlusEqualsToken,
15801
+ "-=": ts11.SyntaxKind.MinusEqualsToken,
15802
+ "*=": ts11.SyntaxKind.AsteriskEqualsToken,
15803
+ "/=": ts11.SyntaxKind.SlashEqualsToken,
15804
+ "%=": ts11.SyntaxKind.PercentEqualsToken,
15805
+ "**=": ts11.SyntaxKind.AsteriskAsteriskEqualsToken,
15806
+ "&&=": ts11.SyntaxKind.AmpersandAmpersandEqualsToken,
15807
+ "||=": ts11.SyntaxKind.BarBarEqualsToken,
15808
+ "??=": ts11.SyntaxKind.QuestionQuestionEqualsToken,
15809
+ in: ts11.SyntaxKind.InKeyword,
15810
+ instanceof: ts11.SyntaxKind.InstanceOfKeyword
15685
15811
  }))();
15686
15812
  VAR_TYPES = /* @__PURE__ */ (() => ({
15687
- const: ts10.NodeFlags.Const,
15688
- let: ts10.NodeFlags.Let,
15689
- var: ts10.NodeFlags.None
15813
+ const: ts11.NodeFlags.Const,
15814
+ let: ts11.NodeFlags.Let,
15815
+ var: ts11.NodeFlags.None
15690
15816
  }))();
15691
15817
  constructor(annotateForClosureCompiler) {
15692
15818
  this.annotateForClosureCompiler = annotateForClosureCompiler;
15693
15819
  }
15694
15820
  attachComments = attachComments;
15695
- createArrayLiteral = ts10.factory.createArrayLiteralExpression;
15821
+ createArrayLiteral = ts11.factory.createArrayLiteralExpression;
15696
15822
  createAssignment(target, operator, value) {
15697
- return ts10.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
15823
+ return ts11.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
15698
15824
  }
15699
15825
  createBinaryExpression(leftOperand, operator, rightOperand) {
15700
- return ts10.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
15826
+ return ts11.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
15701
15827
  }
15702
15828
  createBlock(body) {
15703
- return ts10.factory.createBlock(body);
15829
+ return ts11.factory.createBlock(body);
15704
15830
  }
15705
15831
  createCallExpression(callee, args, pure) {
15706
- const call = ts10.factory.createCallExpression(callee, undefined, args);
15832
+ const call = ts11.factory.createCallExpression(callee, undefined, args);
15707
15833
  if (pure) {
15708
- ts10.addSyntheticLeadingComment(call, ts10.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
15834
+ ts11.addSyntheticLeadingComment(call, ts11.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
15709
15835
  }
15710
15836
  return call;
15711
15837
  }
15712
15838
  createConditional(condition, whenTrue, whenFalse) {
15713
- return ts10.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
15839
+ return ts11.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
15714
15840
  }
15715
- createElementAccess = ts10.factory.createElementAccessExpression;
15716
- createExpressionStatement = ts10.factory.createExpressionStatement;
15841
+ createElementAccess = ts11.factory.createElementAccessExpression;
15842
+ createExpressionStatement = ts11.factory.createExpressionStatement;
15717
15843
  createDynamicImport(url) {
15718
- return ts10.factory.createCallExpression(ts10.factory.createToken(ts10.SyntaxKind.ImportKeyword), undefined, [
15719
- typeof url === "string" ? ts10.factory.createStringLiteral(url) : url
15844
+ return ts11.factory.createCallExpression(ts11.factory.createToken(ts11.SyntaxKind.ImportKeyword), undefined, [
15845
+ typeof url === "string" ? ts11.factory.createStringLiteral(url) : url
15720
15846
  ]);
15721
15847
  }
15722
15848
  createFunctionDeclaration(functionName, parameters, body) {
15723
- if (!ts10.isBlock(body)) {
15724
- throw new Error(`Invalid syntax, expected a block, but got ${ts10.SyntaxKind[body.kind]}.`);
15849
+ if (!ts11.isBlock(body)) {
15850
+ throw new Error(`Invalid syntax, expected a block, but got ${ts11.SyntaxKind[body.kind]}.`);
15725
15851
  }
15726
- return ts10.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15852
+ return ts11.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15727
15853
  }
15728
15854
  createFunctionExpression(functionName, parameters, body) {
15729
- if (!ts10.isBlock(body)) {
15730
- throw new Error(`Invalid syntax, expected a block, but got ${ts10.SyntaxKind[body.kind]}.`);
15855
+ if (!ts11.isBlock(body)) {
15856
+ throw new Error(`Invalid syntax, expected a block, but got ${ts11.SyntaxKind[body.kind]}.`);
15731
15857
  }
15732
- return ts10.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15858
+ return ts11.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
15733
15859
  }
15734
15860
  createArrowFunctionExpression(parameters, body) {
15735
- if (ts10.isStatement(body) && !ts10.isBlock(body)) {
15736
- throw new Error(`Invalid syntax, expected a block, but got ${ts10.SyntaxKind[body.kind]}.`);
15861
+ if (ts11.isStatement(body) && !ts11.isBlock(body)) {
15862
+ throw new Error(`Invalid syntax, expected a block, but got ${ts11.SyntaxKind[body.kind]}.`);
15737
15863
  }
15738
- return ts10.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
15864
+ return ts11.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
15739
15865
  }
15740
15866
  createParameter(param) {
15741
- return ts10.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
15867
+ return ts11.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
15742
15868
  }
15743
- createIdentifier = ts10.factory.createIdentifier;
15869
+ createIdentifier = ts11.factory.createIdentifier;
15744
15870
  createIfStatement(condition, thenStatement, elseStatement) {
15745
- return ts10.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
15871
+ return ts11.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
15746
15872
  }
15747
15873
  createLiteral(value) {
15748
15874
  if (value === undefined) {
15749
- return ts10.factory.createIdentifier("undefined");
15875
+ return ts11.factory.createIdentifier("undefined");
15750
15876
  } else if (value === null) {
15751
- return ts10.factory.createNull();
15877
+ return ts11.factory.createNull();
15752
15878
  } else if (typeof value === "boolean") {
15753
- return value ? ts10.factory.createTrue() : ts10.factory.createFalse();
15879
+ return value ? ts11.factory.createTrue() : ts11.factory.createFalse();
15754
15880
  } else if (typeof value === "number") {
15755
15881
  return tsNumericExpression(value);
15756
15882
  } else {
15757
- return ts10.factory.createStringLiteral(value);
15883
+ return ts11.factory.createStringLiteral(value);
15758
15884
  }
15759
15885
  }
15760
15886
  createNewExpression(expression, args) {
15761
- return ts10.factory.createNewExpression(expression, undefined, args);
15887
+ return ts11.factory.createNewExpression(expression, undefined, args);
15762
15888
  }
15763
15889
  createObjectLiteral(properties) {
15764
- return ts10.factory.createObjectLiteralExpression(properties.map((prop) => {
15890
+ return ts11.factory.createObjectLiteralExpression(properties.map((prop) => {
15765
15891
  if (prop.kind === "spread") {
15766
- return ts10.factory.createSpreadAssignment(prop.expression);
15892
+ return ts11.factory.createSpreadAssignment(prop.expression);
15767
15893
  }
15768
- return ts10.factory.createPropertyAssignment(prop.quoted ? ts10.factory.createStringLiteral(prop.propertyName) : ts10.factory.createIdentifier(prop.propertyName), prop.value);
15894
+ return ts11.factory.createPropertyAssignment(prop.quoted ? ts11.factory.createStringLiteral(prop.propertyName) : ts11.factory.createIdentifier(prop.propertyName), prop.value);
15769
15895
  }));
15770
15896
  }
15771
- createParenthesizedExpression = ts10.factory.createParenthesizedExpression;
15772
- createPropertyAccess = ts10.factory.createPropertyAccessExpression;
15773
- createSpreadElement = ts10.factory.createSpreadElement;
15897
+ createParenthesizedExpression = ts11.factory.createParenthesizedExpression;
15898
+ createPropertyAccess = ts11.factory.createPropertyAccessExpression;
15899
+ createSpreadElement = ts11.factory.createSpreadElement;
15774
15900
  createReturnStatement(expression) {
15775
- return ts10.factory.createReturnStatement(expression ?? undefined);
15901
+ return ts11.factory.createReturnStatement(expression ?? undefined);
15776
15902
  }
15777
15903
  createTaggedTemplate(tag, template) {
15778
- return ts10.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
15904
+ return ts11.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
15779
15905
  }
15780
15906
  createTemplateLiteral(template) {
15781
15907
  let templateLiteral;
@@ -15785,7 +15911,7 @@ class TypeScriptAstFactory {
15785
15911
  throw new Error("createTemplateLiteral: template has no elements");
15786
15912
  }
15787
15913
  if (length === 1) {
15788
- templateLiteral = ts10.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
15914
+ templateLiteral = ts11.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
15789
15915
  } else {
15790
15916
  const spans = [];
15791
15917
  for (let i = 1;i < length - 1; i++) {
@@ -15799,7 +15925,7 @@ class TypeScriptAstFactory {
15799
15925
  if (range !== null) {
15800
15926
  this.setSourceMapRange(middle, range);
15801
15927
  }
15802
- spans.push(ts10.factory.createTemplateSpan(expression, middle));
15928
+ spans.push(ts11.factory.createTemplateSpan(expression, middle));
15803
15929
  }
15804
15930
  const resolvedExpression = template.expressions[length - 2];
15805
15931
  const templatePart = template.elements[length - 1];
@@ -15810,27 +15936,27 @@ class TypeScriptAstFactory {
15810
15936
  if (templatePart.range !== null) {
15811
15937
  this.setSourceMapRange(templateTail, templatePart.range);
15812
15938
  }
15813
- spans.push(ts10.factory.createTemplateSpan(resolvedExpression, templateTail));
15814
- templateLiteral = ts10.factory.createTemplateExpression(ts10.factory.createTemplateHead(head.cooked, head.raw), spans);
15939
+ spans.push(ts11.factory.createTemplateSpan(resolvedExpression, templateTail));
15940
+ templateLiteral = ts11.factory.createTemplateExpression(ts11.factory.createTemplateHead(head.cooked, head.raw), spans);
15815
15941
  }
15816
15942
  if (head.range !== null) {
15817
15943
  this.setSourceMapRange(templateLiteral, head.range);
15818
15944
  }
15819
15945
  return templateLiteral;
15820
15946
  }
15821
- createThrowStatement = ts10.factory.createThrowStatement;
15822
- createTypeOfExpression = ts10.factory.createTypeOfExpression;
15823
- createVoidExpression = ts10.factory.createVoidExpression;
15947
+ createThrowStatement = ts11.factory.createThrowStatement;
15948
+ createTypeOfExpression = ts11.factory.createTypeOfExpression;
15949
+ createVoidExpression = ts11.factory.createVoidExpression;
15824
15950
  createUnaryExpression(operator, operand) {
15825
- return ts10.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
15951
+ return ts11.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
15826
15952
  }
15827
15953
  createVariableDeclaration(variableName, initializer, variableType, type) {
15828
- return ts10.factory.createVariableStatement(undefined, ts10.factory.createVariableDeclarationList([
15829
- ts10.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer ?? undefined)
15954
+ return ts11.factory.createVariableStatement(undefined, ts11.factory.createVariableDeclarationList([
15955
+ ts11.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer ?? undefined)
15830
15956
  ], this.VAR_TYPES[variableType]));
15831
15957
  }
15832
15958
  createRegularExpressionLiteral(body, flags) {
15833
- return ts10.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
15959
+ return ts11.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
15834
15960
  }
15835
15961
  setSourceMapRange(node, sourceMapRange) {
15836
15962
  if (sourceMapRange === null) {
@@ -15838,10 +15964,10 @@ class TypeScriptAstFactory {
15838
15964
  }
15839
15965
  const url = sourceMapRange.url;
15840
15966
  if (!this.externalSourceFiles.has(url)) {
15841
- this.externalSourceFiles.set(url, ts10.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
15967
+ this.externalSourceFiles.set(url, ts11.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
15842
15968
  }
15843
15969
  const source = this.externalSourceFiles.get(url);
15844
- ts10.setSourceMapRange(node, {
15970
+ ts11.setSourceMapRange(node, {
15845
15971
  pos: sourceMapRange.start.offset,
15846
15972
  end: sourceMapRange.end.offset,
15847
15973
  source
@@ -15851,77 +15977,77 @@ class TypeScriptAstFactory {
15851
15977
  createBuiltInType(type) {
15852
15978
  switch (type) {
15853
15979
  case "any":
15854
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.AnyKeyword);
15980
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.AnyKeyword);
15855
15981
  case "boolean":
15856
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.BooleanKeyword);
15982
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.BooleanKeyword);
15857
15983
  case "number":
15858
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.NumberKeyword);
15984
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.NumberKeyword);
15859
15985
  case "string":
15860
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.StringKeyword);
15986
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.StringKeyword);
15861
15987
  case "function":
15862
- return ts10.factory.createTypeReferenceNode(ts10.factory.createIdentifier("Function"));
15988
+ return ts11.factory.createTypeReferenceNode(ts11.factory.createIdentifier("Function"));
15863
15989
  case "never":
15864
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.NeverKeyword);
15990
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.NeverKeyword);
15865
15991
  case "unknown":
15866
- return ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.UnknownKeyword);
15992
+ return ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.UnknownKeyword);
15867
15993
  }
15868
15994
  }
15869
15995
  createExpressionType(expression, typeParams) {
15870
15996
  const typeName = getEntityTypeFromExpression(expression);
15871
- return ts10.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
15997
+ return ts11.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
15872
15998
  }
15873
15999
  createArrayType(elementType) {
15874
- return ts10.factory.createArrayTypeNode(elementType);
16000
+ return ts11.factory.createArrayTypeNode(elementType);
15875
16001
  }
15876
16002
  createMapType(valueType) {
15877
- return ts10.factory.createTypeLiteralNode([
15878
- ts10.factory.createIndexSignature(undefined, [
15879
- ts10.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts10.factory.createKeywordTypeNode(ts10.SyntaxKind.StringKeyword))
16003
+ return ts11.factory.createTypeLiteralNode([
16004
+ ts11.factory.createIndexSignature(undefined, [
16005
+ ts11.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts11.factory.createKeywordTypeNode(ts11.SyntaxKind.StringKeyword))
15880
16006
  ], valueType)
15881
16007
  ]);
15882
16008
  }
15883
16009
  transplantType(type) {
15884
- if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts10.isTypeNode(type)) {
16010
+ if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts11.isTypeNode(type)) {
15885
16011
  return type;
15886
16012
  }
15887
16013
  throw new Error("Attempting to transplant a type node from a non-TypeScript AST: " + type);
15888
16014
  }
15889
16015
  }
15890
16016
  function createTemplateMiddle(cooked, raw) {
15891
- const node = ts10.factory.createTemplateHead(cooked, raw);
15892
- node.kind = ts10.SyntaxKind.TemplateMiddle;
16017
+ const node = ts11.factory.createTemplateHead(cooked, raw);
16018
+ node.kind = ts11.SyntaxKind.TemplateMiddle;
15893
16019
  return node;
15894
16020
  }
15895
16021
  function createTemplateTail(cooked, raw) {
15896
- const node = ts10.factory.createTemplateHead(cooked, raw);
15897
- node.kind = ts10.SyntaxKind.TemplateTail;
16022
+ const node = ts11.factory.createTemplateHead(cooked, raw);
16023
+ node.kind = ts11.SyntaxKind.TemplateTail;
15898
16024
  return node;
15899
16025
  }
15900
16026
  function attachComments(statement, leadingComments) {
15901
16027
  for (const comment of leadingComments) {
15902
- const commentKind = comment.multiline ? ts10.SyntaxKind.MultiLineCommentTrivia : ts10.SyntaxKind.SingleLineCommentTrivia;
16028
+ const commentKind = comment.multiline ? ts11.SyntaxKind.MultiLineCommentTrivia : ts11.SyntaxKind.SingleLineCommentTrivia;
15903
16029
  if (comment.multiline) {
15904
- ts10.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
16030
+ ts11.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
15905
16031
  } else {
15906
16032
  for (const line of comment.toString().split(`
15907
16033
  `)) {
15908
- ts10.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
16034
+ ts11.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
15909
16035
  }
15910
16036
  }
15911
16037
  }
15912
16038
  }
15913
16039
  function getEntityTypeFromExpression(expression) {
15914
- if (ts10.isIdentifier(expression)) {
16040
+ if (ts11.isIdentifier(expression)) {
15915
16041
  return expression;
15916
16042
  }
15917
- if (ts10.isPropertyAccessExpression(expression)) {
16043
+ if (ts11.isPropertyAccessExpression(expression)) {
15918
16044
  const left = getEntityTypeFromExpression(expression.expression);
15919
- if (!ts10.isIdentifier(expression.name)) {
16045
+ if (!ts11.isIdentifier(expression.name)) {
15920
16046
  throw new Error(`Unsupported property access for type reference: ${expression.name.text}`);
15921
16047
  }
15922
- return ts10.factory.createQualifiedName(left, expression.name);
16048
+ return ts11.factory.createQualifiedName(left, expression.name);
15923
16049
  }
15924
- throw new Error(`Unsupported expression for type reference: ${ts10.SyntaxKind[expression.kind]}`);
16050
+ throw new Error(`Unsupported expression for type reference: ${ts11.SyntaxKind[expression.kind]}`);
15925
16051
  }
15926
16052
  var init_typescript_ast_factory = __esm(() => {
15927
16053
  init_ts_util();
@@ -15954,9 +16080,9 @@ __export(exports_fastHmrCompiler, {
15954
16080
  primeComponentFingerprint: () => primeComponentFingerprint,
15955
16081
  invalidateFingerprintCache: () => invalidateFingerprintCache
15956
16082
  });
15957
- import { existsSync as existsSync23, readFileSync as readFileSync17, statSync as statSync2 } from "fs";
15958
- import { dirname as dirname18, extname as extname6, relative as relative13, resolve as resolve26 } from "path";
15959
- import ts11 from "typescript";
16083
+ import { existsSync as existsSync23, readFileSync as readFileSync18, statSync as statSync2 } from "fs";
16084
+ import { dirname as dirname18, extname as extname6, relative as relative14, resolve as resolve26 } from "path";
16085
+ import ts12 from "typescript";
15960
16086
  var fail = (reason, detail, location) => ({
15961
16087
  ok: false,
15962
16088
  reason,
@@ -16040,23 +16166,23 @@ var fail = (reason, detail, location) => ({
16040
16166
  }
16041
16167
  let sourceFile;
16042
16168
  try {
16043
- sourceFile = ts11.createSourceFile(componentFilePath, source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
16169
+ sourceFile = ts12.createSourceFile(componentFilePath, source, ts12.ScriptTarget.Latest, true, ts12.ScriptKind.TS);
16044
16170
  } catch {
16045
16171
  return;
16046
16172
  }
16047
16173
  for (const stmt of sourceFile.statements) {
16048
- if (!ts11.isClassDeclaration(stmt))
16174
+ if (!ts12.isClassDeclaration(stmt))
16049
16175
  continue;
16050
16176
  const className = stmt.name?.text;
16051
16177
  if (!className)
16052
16178
  continue;
16053
- const decorators = ts11.getDecorators(stmt) ?? [];
16179
+ const decorators = ts12.getDecorators(stmt) ?? [];
16054
16180
  const decoratorName = (() => {
16055
16181
  for (const d2 of decorators) {
16056
- if (!ts11.isCallExpression(d2.expression))
16182
+ if (!ts12.isCallExpression(d2.expression))
16057
16183
  continue;
16058
16184
  const expr = d2.expression.expression;
16059
- if (!ts11.isIdentifier(expr))
16185
+ if (!ts12.isIdentifier(expr))
16060
16186
  continue;
16061
16187
  if (expr.text === "Component" || expr.text === "Directive" || expr.text === "Pipe" || expr.text === "Injectable") {
16062
16188
  return expr.text;
@@ -16066,20 +16192,20 @@ var fail = (reason, detail, location) => ({
16066
16192
  })();
16067
16193
  if (!decoratorName)
16068
16194
  continue;
16069
- const projectRel = relative13(process.cwd(), componentFilePath).replace(/\\/g, "/");
16195
+ const projectRel = relative14(process.cwd(), componentFilePath).replace(/\\/g, "/");
16070
16196
  const id = encodeURIComponent(`${projectRel}@${className}`);
16071
16197
  if (decoratorName === "Component") {
16072
16198
  const componentDecorator = decorators.find((d2) => {
16073
- if (!ts11.isCallExpression(d2.expression))
16199
+ if (!ts12.isCallExpression(d2.expression))
16074
16200
  return false;
16075
16201
  const expr = d2.expression.expression;
16076
- return ts11.isIdentifier(expr) && expr.text === "Component";
16202
+ return ts12.isIdentifier(expr) && expr.text === "Component";
16077
16203
  });
16078
16204
  if (!componentDecorator)
16079
16205
  continue;
16080
16206
  const decoratorCall = componentDecorator.expression;
16081
16207
  const args = decoratorCall.arguments[0];
16082
- if (!args || !ts11.isObjectLiteralExpression(args))
16208
+ if (!args || !ts12.isObjectLiteralExpression(args))
16083
16209
  continue;
16084
16210
  const decoratorMeta = readDecoratorMeta(args);
16085
16211
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
@@ -16113,11 +16239,11 @@ var fail = (reason, detail, location) => ({
16113
16239
  return false;
16114
16240
  return true;
16115
16241
  }, ENTITY_DECORATOR_NAMES, findEntityDecorator = (cls) => {
16116
- for (const dec of ts11.getDecorators(cls) ?? []) {
16242
+ for (const dec of ts12.getDecorators(cls) ?? []) {
16117
16243
  const expr = dec.expression;
16118
- if (!ts11.isCallExpression(expr))
16244
+ if (!ts12.isCallExpression(expr))
16119
16245
  continue;
16120
- if (!ts11.isIdentifier(expr.expression))
16246
+ if (!ts12.isIdentifier(expr.expression))
16121
16247
  continue;
16122
16248
  if (ENTITY_DECORATOR_NAMES.has(expr.expression.text))
16123
16249
  return dec;
@@ -16135,18 +16261,18 @@ var fail = (reason, detail, location) => ({
16135
16261
  }
16136
16262
  const ctorParamTypes = [];
16137
16263
  for (const member of cls.members) {
16138
- if (!ts11.isConstructorDeclaration(member))
16264
+ if (!ts12.isConstructorDeclaration(member))
16139
16265
  continue;
16140
16266
  for (const param of member.parameters) {
16141
16267
  const typeText = param.type ? param.type.getText() : "";
16142
- const decorators = ts11.getDecorators(param) ?? [];
16268
+ const decorators = ts12.getDecorators(param) ?? [];
16143
16269
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
16144
16270
  const e = d2.expression;
16145
- if (ts11.isCallExpression(e) && ts11.isIdentifier(e.expression)) {
16271
+ if (ts12.isCallExpression(e) && ts12.isIdentifier(e.expression)) {
16146
16272
  const args = e.arguments.map((a) => a.getText()).join(",");
16147
16273
  return `@${e.expression.text}(${args})`;
16148
16274
  }
16149
- if (ts11.isIdentifier(e))
16275
+ if (ts12.isIdentifier(e))
16150
16276
  return `@${e.text}`;
16151
16277
  return "@<unknown>";
16152
16278
  }).join("");
@@ -16168,23 +16294,23 @@ var fail = (reason, detail, location) => ({
16168
16294
  const walk = (node) => {
16169
16295
  if (found)
16170
16296
  return;
16171
- if (ts11.isClassDeclaration(node) && node.name?.text === className) {
16297
+ if (ts12.isClassDeclaration(node) && node.name?.text === className) {
16172
16298
  found = node;
16173
16299
  return;
16174
16300
  }
16175
- ts11.forEachChild(node, walk);
16301
+ ts12.forEachChild(node, walk);
16176
16302
  };
16177
16303
  walk(sourceFile);
16178
16304
  return found;
16179
16305
  }, getClassDecorators = (cls) => {
16180
- const modifiers = ts11.getDecorators(cls) ?? [];
16306
+ const modifiers = ts12.getDecorators(cls) ?? [];
16181
16307
  return [...modifiers];
16182
16308
  }, findComponentDecorator = (cls) => {
16183
16309
  for (const decorator of getClassDecorators(cls)) {
16184
16310
  const expr = decorator.expression;
16185
- if (ts11.isCallExpression(expr)) {
16311
+ if (ts12.isCallExpression(expr)) {
16186
16312
  const fn2 = expr.expression;
16187
- if (ts11.isIdentifier(fn2) && fn2.text === "Component") {
16313
+ if (ts12.isIdentifier(fn2) && fn2.text === "Component") {
16188
16314
  return decorator;
16189
16315
  }
16190
16316
  }
@@ -16192,15 +16318,15 @@ var fail = (reason, detail, location) => ({
16192
16318
  return null;
16193
16319
  }, getDecoratorArgsObject = (decorator) => {
16194
16320
  const call = decorator.expression;
16195
- if (!ts11.isCallExpression(call))
16321
+ if (!ts12.isCallExpression(call))
16196
16322
  return null;
16197
16323
  const arg = call.arguments[0];
16198
- if (!arg || !ts11.isObjectLiteralExpression(arg))
16324
+ if (!arg || !ts12.isObjectLiteralExpression(arg))
16199
16325
  return null;
16200
16326
  return arg;
16201
16327
  }, getProperty = (obj, name) => {
16202
16328
  for (const prop of obj.properties) {
16203
- if (ts11.isPropertyAssignment(prop) && (ts11.isIdentifier(prop.name) && prop.name.text === name || ts11.isStringLiteral(prop.name) && prop.name.text === name)) {
16329
+ if (ts12.isPropertyAssignment(prop) && (ts12.isIdentifier(prop.name) && prop.name.text === name || ts12.isStringLiteral(prop.name) && prop.name.text === name)) {
16204
16330
  return prop.initializer;
16205
16331
  }
16206
16332
  }
@@ -16209,7 +16335,7 @@ var fail = (reason, detail, location) => ({
16209
16335
  const expr = getProperty(obj, name);
16210
16336
  if (!expr)
16211
16337
  return null;
16212
- if (ts11.isStringLiteral(expr) || ts11.isNoSubstitutionTemplateLiteral(expr)) {
16338
+ if (ts12.isStringLiteral(expr) || ts12.isNoSubstitutionTemplateLiteral(expr)) {
16213
16339
  return expr.text;
16214
16340
  }
16215
16341
  return null;
@@ -16217,22 +16343,22 @@ var fail = (reason, detail, location) => ({
16217
16343
  const expr = getProperty(obj, name);
16218
16344
  if (!expr)
16219
16345
  return null;
16220
- if (expr.kind === ts11.SyntaxKind.TrueKeyword)
16346
+ if (expr.kind === ts12.SyntaxKind.TrueKeyword)
16221
16347
  return true;
16222
- if (expr.kind === ts11.SyntaxKind.FalseKeyword)
16348
+ if (expr.kind === ts12.SyntaxKind.FalseKeyword)
16223
16349
  return false;
16224
16350
  return null;
16225
16351
  }, isAngularDecoratorIdentifier = (name) => name === "Component" || name === "Directive" || name === "Pipe" || name === "Injectable", classHasAngularDecorator = (cls) => {
16226
- for (const dec of ts11.getDecorators(cls) ?? []) {
16352
+ for (const dec of ts12.getDecorators(cls) ?? []) {
16227
16353
  const expr = dec.expression;
16228
- if (ts11.isCallExpression(expr) && ts11.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
16354
+ if (ts12.isCallExpression(expr) && ts12.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
16229
16355
  return true;
16230
16356
  }
16231
16357
  }
16232
16358
  return false;
16233
16359
  }, findClassInSourceFile = (sf, className) => {
16234
16360
  for (const stmt of sf.statements) {
16235
- if (ts11.isClassDeclaration(stmt) && stmt.name?.text === className) {
16361
+ if (ts12.isClassDeclaration(stmt) && stmt.name?.text === className) {
16236
16362
  return stmt;
16237
16363
  }
16238
16364
  }
@@ -16242,15 +16368,15 @@ var fail = (reason, detail, location) => ({
16242
16368
  if (sameFile)
16243
16369
  return classHasAngularDecorator(sameFile);
16244
16370
  for (const stmt of sourceFile.statements) {
16245
- if (!ts11.isImportDeclaration(stmt))
16371
+ if (!ts12.isImportDeclaration(stmt))
16246
16372
  continue;
16247
- if (!ts11.isStringLiteral(stmt.moduleSpecifier))
16373
+ if (!ts12.isStringLiteral(stmt.moduleSpecifier))
16248
16374
  continue;
16249
16375
  const clause = stmt.importClause;
16250
16376
  if (!clause || clause.isTypeOnly)
16251
16377
  continue;
16252
16378
  const named = clause.namedBindings;
16253
- if (!named || !ts11.isNamedImports(named))
16379
+ if (!named || !ts12.isNamedImports(named))
16254
16380
  continue;
16255
16381
  const found = named.elements.find((el) => el.name.text === parentClassName);
16256
16382
  if (!found)
@@ -16271,11 +16397,11 @@ var fail = (reason, detail, location) => ({
16271
16397
  continue;
16272
16398
  let content;
16273
16399
  try {
16274
- content = readFileSync17(candidate, "utf-8");
16400
+ content = readFileSync18(candidate, "utf-8");
16275
16401
  } catch {
16276
16402
  continue;
16277
16403
  }
16278
- const parentSf = ts11.createSourceFile(candidate, content, ts11.ScriptTarget.Latest, true);
16404
+ const parentSf = ts12.createSourceFile(candidate, content, ts12.ScriptTarget.Latest, true);
16279
16405
  const parentCls = findClassInSourceFile(parentSf, parentClassName);
16280
16406
  if (!parentCls)
16281
16407
  continue;
@@ -16287,11 +16413,11 @@ var fail = (reason, detail, location) => ({
16287
16413
  }, inheritsDecoratedClass = (cls, sourceFile, componentDir, projectRoot) => {
16288
16414
  const heritage = cls.heritageClauses ?? [];
16289
16415
  for (const clause of heritage) {
16290
- if (clause.token !== ts11.SyntaxKind.ExtendsKeyword)
16416
+ if (clause.token !== ts12.SyntaxKind.ExtendsKeyword)
16291
16417
  continue;
16292
16418
  for (const typeNode of clause.types) {
16293
16419
  const expr = typeNode.expression;
16294
- if (!ts11.isIdentifier(expr)) {
16420
+ if (!ts12.isIdentifier(expr)) {
16295
16421
  return true;
16296
16422
  }
16297
16423
  if (parentHasAngularDecoratorAcrossFiles(expr.text, sourceFile, componentDir, projectRoot)) {
@@ -16302,18 +16428,18 @@ var fail = (reason, detail, location) => ({
16302
16428
  return false;
16303
16429
  }, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
16304
16430
  for (const member of cls.members) {
16305
- if (!ts11.isMethodDeclaration(member))
16431
+ if (!ts12.isMethodDeclaration(member))
16306
16432
  continue;
16307
- if (member.modifiers?.some((m) => m.kind === ts11.SyntaxKind.StaticKeyword))
16433
+ if (member.modifiers?.some((m) => m.kind === ts12.SyntaxKind.StaticKeyword))
16308
16434
  continue;
16309
16435
  const name = member.name;
16310
16436
  if (name === undefined)
16311
16437
  continue;
16312
- const nameText = ts11.isIdentifier(name) ? name.text : name.getText();
16438
+ const nameText = ts12.isIdentifier(name) ? name.text : name.getText();
16313
16439
  if (nameText !== CONTROL_CREATE_METHOD_NAME)
16314
16440
  continue;
16315
16441
  const firstParam = member.parameters[0];
16316
- if (firstParam === undefined || firstParam.type === undefined || !ts11.isTypeReferenceNode(firstParam.type)) {
16442
+ if (firstParam === undefined || firstParam.type === undefined || !ts12.isTypeReferenceNode(firstParam.type)) {
16317
16443
  return { passThroughInput: null };
16318
16444
  }
16319
16445
  const typeArgs = firstParam.type.typeArguments;
@@ -16321,16 +16447,16 @@ var fail = (reason, detail, location) => ({
16321
16447
  return { passThroughInput: null };
16322
16448
  }
16323
16449
  const arg = typeArgs[0];
16324
- if (arg === undefined || !ts11.isLiteralTypeNode(arg) || !ts11.isStringLiteral(arg.literal)) {
16450
+ if (arg === undefined || !ts12.isLiteralTypeNode(arg) || !ts12.isStringLiteral(arg.literal)) {
16325
16451
  return { passThroughInput: null };
16326
16452
  }
16327
16453
  return { passThroughInput: arg.literal.text };
16328
16454
  }
16329
16455
  return null;
16330
16456
  }, resolveEnumPropertyAccess = (expr, enumName, values) => {
16331
- if (!ts11.isPropertyAccessExpression(expr))
16457
+ if (!ts12.isPropertyAccessExpression(expr))
16332
16458
  return null;
16333
- if (!ts11.isIdentifier(expr.expression))
16459
+ if (!ts12.isIdentifier(expr.expression))
16334
16460
  return null;
16335
16461
  if (expr.expression.text !== enumName)
16336
16462
  return null;
@@ -16349,21 +16475,21 @@ var fail = (reason, detail, location) => ({
16349
16475
  const hostExpr = getProperty(args, "host");
16350
16476
  const schemasExpr = getProperty(args, "schemas");
16351
16477
  const styleUrls = [];
16352
- if (styleUrlsExpr && ts11.isArrayLiteralExpression(styleUrlsExpr)) {
16478
+ if (styleUrlsExpr && ts12.isArrayLiteralExpression(styleUrlsExpr)) {
16353
16479
  for (const el of styleUrlsExpr.elements) {
16354
- if (ts11.isStringLiteral(el))
16480
+ if (ts12.isStringLiteral(el))
16355
16481
  styleUrls.push(el.text);
16356
16482
  }
16357
16483
  }
16358
16484
  const styles = [];
16359
16485
  if (stylesExpr) {
16360
- if (ts11.isArrayLiteralExpression(stylesExpr)) {
16486
+ if (ts12.isArrayLiteralExpression(stylesExpr)) {
16361
16487
  for (const el of stylesExpr.elements) {
16362
- if (ts11.isStringLiteral(el) || ts11.isNoSubstitutionTemplateLiteral(el)) {
16488
+ if (ts12.isStringLiteral(el) || ts12.isNoSubstitutionTemplateLiteral(el)) {
16363
16489
  styles.push(el.text);
16364
16490
  }
16365
16491
  }
16366
- } else if (ts11.isStringLiteral(stylesExpr) || ts11.isNoSubstitutionTemplateLiteral(stylesExpr)) {
16492
+ } else if (ts12.isStringLiteral(stylesExpr) || ts12.isNoSubstitutionTemplateLiteral(stylesExpr)) {
16367
16493
  styles.push(stylesExpr.text);
16368
16494
  }
16369
16495
  }
@@ -16376,15 +16502,15 @@ var fail = (reason, detail, location) => ({
16376
16502
  encapsulation,
16377
16503
  hasProviders: getProperty(args, "providers") !== null,
16378
16504
  hasViewProviders: getProperty(args, "viewProviders") !== null,
16379
- importsExpr: importsExpr && ts11.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
16380
- hostDirectivesExpr: hostDirectivesExpr && ts11.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
16381
- animationsExpr: animationsExpr && ts11.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
16382
- providersExpr: providersExpr && ts11.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
16383
- viewProvidersExpr: viewProvidersExpr && ts11.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
16384
- inputsArrayExpr: inputsArrayExpr && ts11.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
16385
- outputsArrayExpr: outputsArrayExpr && ts11.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
16386
- hostExpr: hostExpr && ts11.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
16387
- schemasExpr: schemasExpr && ts11.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
16505
+ importsExpr: importsExpr && ts12.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
16506
+ hostDirectivesExpr: hostDirectivesExpr && ts12.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
16507
+ animationsExpr: animationsExpr && ts12.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
16508
+ providersExpr: providersExpr && ts12.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
16509
+ viewProvidersExpr: viewProvidersExpr && ts12.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
16510
+ inputsArrayExpr: inputsArrayExpr && ts12.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
16511
+ outputsArrayExpr: outputsArrayExpr && ts12.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
16512
+ hostExpr: hostExpr && ts12.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
16513
+ schemasExpr: schemasExpr && ts12.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
16388
16514
  preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
16389
16515
  selector: getStringProperty(args, "selector"),
16390
16516
  standalone: getBooleanProperty(args, "standalone") ?? true,
@@ -16395,13 +16521,13 @@ var fail = (reason, detail, location) => ({
16395
16521
  templateUrl: getStringProperty(args, "templateUrl")
16396
16522
  };
16397
16523
  }, extractDecoratorInput = (prop, compiler) => {
16398
- const decorators = ts11.getDecorators(prop) ?? [];
16524
+ const decorators = ts12.getDecorators(prop) ?? [];
16399
16525
  for (const decorator of decorators) {
16400
16526
  const expr = decorator.expression;
16401
- if (!ts11.isCallExpression(expr))
16527
+ if (!ts12.isCallExpression(expr))
16402
16528
  continue;
16403
16529
  const fn2 = expr.expression;
16404
- if (!ts11.isIdentifier(fn2) || fn2.text !== "Input")
16530
+ if (!ts12.isIdentifier(fn2) || fn2.text !== "Input")
16405
16531
  continue;
16406
16532
  const classPropertyName = prop.name.getText();
16407
16533
  let bindingPropertyName = classPropertyName;
@@ -16409,9 +16535,9 @@ var fail = (reason, detail, location) => ({
16409
16535
  let transformFunction = null;
16410
16536
  const arg = expr.arguments[0];
16411
16537
  if (arg) {
16412
- if (ts11.isStringLiteral(arg)) {
16538
+ if (ts12.isStringLiteral(arg)) {
16413
16539
  bindingPropertyName = arg.text;
16414
- } else if (ts11.isObjectLiteralExpression(arg)) {
16540
+ } else if (ts12.isObjectLiteralExpression(arg)) {
16415
16541
  const aliasNode = getStringProperty(arg, "alias");
16416
16542
  if (aliasNode !== null)
16417
16543
  bindingPropertyName = aliasNode;
@@ -16435,11 +16561,11 @@ var fail = (reason, detail, location) => ({
16435
16561
  }
16436
16562
  return null;
16437
16563
  }, isInputSignalCall = (init) => {
16438
- if (ts11.isCallExpression(init)) {
16564
+ if (ts12.isCallExpression(init)) {
16439
16565
  const fn2 = init.expression;
16440
- if (ts11.isIdentifier(fn2) && fn2.text === "input")
16566
+ if (ts12.isIdentifier(fn2) && fn2.text === "input")
16441
16567
  return true;
16442
- if (ts11.isPropertyAccessExpression(fn2) && ts11.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
16568
+ if (ts12.isPropertyAccessExpression(fn2) && ts12.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
16443
16569
  return true;
16444
16570
  }
16445
16571
  }
@@ -16450,13 +16576,13 @@ var fail = (reason, detail, location) => ({
16450
16576
  const classPropertyName = prop.name.getText();
16451
16577
  const call = prop.initializer;
16452
16578
  let required = false;
16453
- if (ts11.isPropertyAccessExpression(call.expression) && ts11.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
16579
+ if (ts12.isPropertyAccessExpression(call.expression) && ts12.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
16454
16580
  required = true;
16455
16581
  }
16456
16582
  let bindingPropertyName = classPropertyName;
16457
16583
  let transformFunction = null;
16458
16584
  const optsArg = call.arguments[required ? 0 : 1];
16459
- if (optsArg && ts11.isObjectLiteralExpression(optsArg)) {
16585
+ if (optsArg && ts12.isObjectLiteralExpression(optsArg)) {
16460
16586
  const aliasNode = getStringProperty(optsArg, "alias");
16461
16587
  if (aliasNode !== null)
16462
16588
  bindingPropertyName = aliasNode;
@@ -16476,28 +16602,28 @@ var fail = (reason, detail, location) => ({
16476
16602
  }
16477
16603
  };
16478
16604
  }, extractDecoratorOutput = (prop) => {
16479
- const decorators = ts11.getDecorators(prop) ?? [];
16605
+ const decorators = ts12.getDecorators(prop) ?? [];
16480
16606
  for (const decorator of decorators) {
16481
16607
  const expr = decorator.expression;
16482
- if (!ts11.isCallExpression(expr))
16608
+ if (!ts12.isCallExpression(expr))
16483
16609
  continue;
16484
16610
  const fn2 = expr.expression;
16485
- if (!ts11.isIdentifier(fn2) || fn2.text !== "Output")
16611
+ if (!ts12.isIdentifier(fn2) || fn2.text !== "Output")
16486
16612
  continue;
16487
16613
  const classPropertyName = prop.name.getText();
16488
16614
  let bindingName = classPropertyName;
16489
16615
  const arg = expr.arguments[0];
16490
- if (arg && ts11.isStringLiteral(arg))
16616
+ if (arg && ts12.isStringLiteral(arg))
16491
16617
  bindingName = arg.text;
16492
16618
  return { classPropertyName, bindingName };
16493
16619
  }
16494
16620
  return null;
16495
16621
  }, isOutputSignalCall = (init) => {
16496
- if (ts11.isCallExpression(init)) {
16622
+ if (ts12.isCallExpression(init)) {
16497
16623
  const fn2 = init.expression;
16498
- if (ts11.isIdentifier(fn2) && fn2.text === "output")
16624
+ if (ts12.isIdentifier(fn2) && fn2.text === "output")
16499
16625
  return true;
16500
- if (ts11.isPropertyAccessExpression(fn2) && ts11.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
16626
+ if (ts12.isPropertyAccessExpression(fn2) && ts12.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
16501
16627
  return true;
16502
16628
  }
16503
16629
  }
@@ -16509,7 +16635,7 @@ var fail = (reason, detail, location) => ({
16509
16635
  const call = prop.initializer;
16510
16636
  let bindingName = classPropertyName;
16511
16637
  const optsArg = call.arguments[0];
16512
- if (optsArg && ts11.isObjectLiteralExpression(optsArg)) {
16638
+ if (optsArg && ts12.isObjectLiteralExpression(optsArg)) {
16513
16639
  const aliasNode = getStringProperty(optsArg, "alias");
16514
16640
  if (aliasNode !== null)
16515
16641
  bindingName = aliasNode;
@@ -16521,7 +16647,7 @@ var fail = (reason, detail, location) => ({
16521
16647
  let hasDecoratorIO = false;
16522
16648
  let hasSignalIO = false;
16523
16649
  for (const member of cls.members) {
16524
- if (!ts11.isPropertyDeclaration(member))
16650
+ if (!ts12.isPropertyDeclaration(member))
16525
16651
  continue;
16526
16652
  const decoratorIn = extractDecoratorInput(member, compiler);
16527
16653
  if (decoratorIn) {
@@ -16555,21 +16681,21 @@ var fail = (reason, detail, location) => ({
16555
16681
  specialAttributes: {}
16556
16682
  }), parseHostObjectInto = (host, args, hostExprNode, compiler) => {
16557
16683
  const hostNode = getProperty(args, "host");
16558
- if (!hostNode || !ts11.isObjectLiteralExpression(hostNode)) {
16684
+ if (!hostNode || !ts12.isObjectLiteralExpression(hostNode)) {
16559
16685
  if (!hostExprNode)
16560
16686
  return;
16561
16687
  }
16562
- const obj = hostNode && ts11.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
16688
+ const obj = hostNode && ts12.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
16563
16689
  if (!obj)
16564
16690
  return;
16565
16691
  for (const prop of obj.properties) {
16566
- if (!ts11.isPropertyAssignment(prop))
16692
+ if (!ts12.isPropertyAssignment(prop))
16567
16693
  continue;
16568
16694
  const keyNode = prop.name;
16569
16695
  let key;
16570
- if (ts11.isStringLiteral(keyNode) || ts11.isNoSubstitutionTemplateLiteral(keyNode)) {
16696
+ if (ts12.isStringLiteral(keyNode) || ts12.isNoSubstitutionTemplateLiteral(keyNode)) {
16571
16697
  key = keyNode.text;
16572
- } else if (ts11.isIdentifier(keyNode)) {
16698
+ } else if (ts12.isIdentifier(keyNode)) {
16573
16699
  key = keyNode.text;
16574
16700
  } else {
16575
16701
  continue;
@@ -16586,36 +16712,36 @@ var fail = (reason, detail, location) => ({
16586
16712
  }
16587
16713
  }, mergeMemberHostDecorators = (host, cls) => {
16588
16714
  for (const member of cls.members) {
16589
- if (!ts11.canHaveDecorators(member))
16715
+ if (!ts12.canHaveDecorators(member))
16590
16716
  continue;
16591
- const decorators = ts11.getDecorators(member) ?? [];
16717
+ const decorators = ts12.getDecorators(member) ?? [];
16592
16718
  for (const dec of decorators) {
16593
16719
  const expr = dec.expression;
16594
- if (!ts11.isCallExpression(expr))
16720
+ if (!ts12.isCallExpression(expr))
16595
16721
  continue;
16596
16722
  const fn2 = expr.expression;
16597
- if (!ts11.isIdentifier(fn2))
16723
+ if (!ts12.isIdentifier(fn2))
16598
16724
  continue;
16599
16725
  if (fn2.text === "HostBinding") {
16600
- if (!ts11.isPropertyDeclaration(member) && !ts11.isGetAccessor(member))
16726
+ if (!ts12.isPropertyDeclaration(member) && !ts12.isGetAccessor(member))
16601
16727
  continue;
16602
16728
  const propertyName = member.name.text;
16603
16729
  const target = expr.arguments[0];
16604
- const key = target && ts11.isStringLiteral(target) ? target.text : propertyName;
16730
+ const key = target && ts12.isStringLiteral(target) ? target.text : propertyName;
16605
16731
  host.properties[key] = propertyName;
16606
16732
  } else if (fn2.text === "HostListener") {
16607
- if (!ts11.isMethodDeclaration(member))
16733
+ if (!ts12.isMethodDeclaration(member))
16608
16734
  continue;
16609
16735
  const methodName = member.name.text;
16610
16736
  const eventArg = expr.arguments[0];
16611
- if (!eventArg || !ts11.isStringLiteral(eventArg))
16737
+ if (!eventArg || !ts12.isStringLiteral(eventArg))
16612
16738
  continue;
16613
16739
  const event = eventArg.text;
16614
16740
  const argsArg = expr.arguments[1];
16615
16741
  let argsList = [];
16616
- if (argsArg && ts11.isArrayLiteralExpression(argsArg)) {
16742
+ if (argsArg && ts12.isArrayLiteralExpression(argsArg)) {
16617
16743
  for (const el of argsArg.elements) {
16618
- if (ts11.isStringLiteral(el))
16744
+ if (ts12.isStringLiteral(el))
16619
16745
  argsList.push(el.text);
16620
16746
  }
16621
16747
  }
@@ -16628,14 +16754,14 @@ var fail = (reason, detail, location) => ({
16628
16754
  let descendants = true;
16629
16755
  let emitDistinctChangesOnly = true;
16630
16756
  const opts = args[1];
16631
- if (opts && ts11.isObjectLiteralExpression(opts)) {
16757
+ if (opts && ts12.isObjectLiteralExpression(opts)) {
16632
16758
  static_ = getBooleanProperty(opts, "static") ?? false;
16633
16759
  descendants = getBooleanProperty(opts, "descendants") ?? true;
16634
16760
  emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
16635
16761
  }
16636
16762
  return { static_, descendants, emitDistinctChangesOnly };
16637
16763
  }, queryPredicateFromArg = (arg, compiler) => {
16638
- if (ts11.isStringLiteral(arg)) {
16764
+ if (ts12.isStringLiteral(arg)) {
16639
16765
  return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
16640
16766
  }
16641
16767
  return {
@@ -16646,15 +16772,15 @@ var fail = (reason, detail, location) => ({
16646
16772
  const contentQueries = [];
16647
16773
  const viewQueries = [];
16648
16774
  for (const member of cls.members) {
16649
- if (!ts11.isPropertyDeclaration(member))
16775
+ if (!ts12.isPropertyDeclaration(member))
16650
16776
  continue;
16651
- const decorators = ts11.getDecorators(member) ?? [];
16777
+ const decorators = ts12.getDecorators(member) ?? [];
16652
16778
  for (const dec of decorators) {
16653
16779
  const expr = dec.expression;
16654
- if (!ts11.isCallExpression(expr))
16780
+ if (!ts12.isCallExpression(expr))
16655
16781
  continue;
16656
16782
  const fn2 = expr.expression;
16657
- if (!ts11.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
16783
+ if (!ts12.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
16658
16784
  continue;
16659
16785
  const propertyName = member.name.text;
16660
16786
  const tokenArg = expr.arguments[0];
@@ -16666,7 +16792,7 @@ var fail = (reason, detail, location) => ({
16666
16792
  const { static_, descendants, emitDistinctChangesOnly } = parseQueryDecoratorOptions(expr.arguments);
16667
16793
  const opts = expr.arguments[1];
16668
16794
  let read = null;
16669
- if (opts && ts11.isObjectLiteralExpression(opts)) {
16795
+ if (opts && ts12.isObjectLiteralExpression(opts)) {
16670
16796
  const readNode = getProperty(opts, "read");
16671
16797
  if (readNode) {
16672
16798
  read = new compiler.WrappedNodeExpr(readNode);
@@ -16694,15 +16820,15 @@ var fail = (reason, detail, location) => ({
16694
16820
  const contentQueries = [];
16695
16821
  const viewQueries = [];
16696
16822
  for (const member of cls.members) {
16697
- if (!ts11.isPropertyDeclaration(member) || !member.initializer)
16823
+ if (!ts12.isPropertyDeclaration(member) || !member.initializer)
16698
16824
  continue;
16699
16825
  let init = member.initializer;
16700
- if (!ts11.isCallExpression(init))
16826
+ if (!ts12.isCallExpression(init))
16701
16827
  continue;
16702
16828
  let queryName;
16703
- if (ts11.isIdentifier(init.expression)) {
16829
+ if (ts12.isIdentifier(init.expression)) {
16704
16830
  queryName = init.expression.text;
16705
- } else if (ts11.isPropertyAccessExpression(init.expression) && ts11.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
16831
+ } else if (ts12.isPropertyAccessExpression(init.expression) && ts12.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
16706
16832
  queryName = init.expression.expression.text;
16707
16833
  } else {
16708
16834
  continue;
@@ -16720,7 +16846,7 @@ var fail = (reason, detail, location) => ({
16720
16846
  let descendants = true;
16721
16847
  let read = null;
16722
16848
  const opts = init.arguments[1];
16723
- if (opts && ts11.isObjectLiteralExpression(opts)) {
16849
+ if (opts && ts12.isObjectLiteralExpression(opts)) {
16724
16850
  descendants = getBooleanProperty(opts, "descendants") ?? true;
16725
16851
  const readNode = getProperty(opts, "read");
16726
16852
  if (readNode)
@@ -16746,13 +16872,13 @@ var fail = (reason, detail, location) => ({
16746
16872
  const node = getProperty(args, "exportAs");
16747
16873
  if (!node)
16748
16874
  return null;
16749
- if (ts11.isStringLiteral(node)) {
16875
+ if (ts12.isStringLiteral(node)) {
16750
16876
  return node.text.split(",").map((s2) => s2.trim()).filter(Boolean);
16751
16877
  }
16752
- if (ts11.isArrayLiteralExpression(node)) {
16878
+ if (ts12.isArrayLiteralExpression(node)) {
16753
16879
  const out = [];
16754
16880
  for (const el of node.elements) {
16755
- if (ts11.isStringLiteral(el))
16881
+ if (ts12.isStringLiteral(el))
16756
16882
  out.push(el.text);
16757
16883
  }
16758
16884
  return out.length > 0 ? out : null;
@@ -16760,11 +16886,11 @@ var fail = (reason, detail, location) => ({
16760
16886
  return null;
16761
16887
  }, extractHostDirectives = (args, compiler) => {
16762
16888
  const node = getProperty(args, "hostDirectives");
16763
- if (!node || !ts11.isArrayLiteralExpression(node))
16889
+ if (!node || !ts12.isArrayLiteralExpression(node))
16764
16890
  return null;
16765
16891
  const out = [];
16766
16892
  for (const el of node.elements) {
16767
- if (ts11.isIdentifier(el)) {
16893
+ if (ts12.isIdentifier(el)) {
16768
16894
  out.push({
16769
16895
  directive: {
16770
16896
  value: new compiler.WrappedNodeExpr(el),
@@ -16776,7 +16902,7 @@ var fail = (reason, detail, location) => ({
16776
16902
  });
16777
16903
  continue;
16778
16904
  }
16779
- if (!ts11.isObjectLiteralExpression(el))
16905
+ if (!ts12.isObjectLiteralExpression(el))
16780
16906
  continue;
16781
16907
  const directiveNode = getProperty(el, "directive");
16782
16908
  if (!directiveNode)
@@ -16784,11 +16910,11 @@ var fail = (reason, detail, location) => ({
16784
16910
  const inputsNode = getProperty(el, "inputs");
16785
16911
  const outputsNode = getProperty(el, "outputs");
16786
16912
  const collectMap = (n) => {
16787
- if (!n || !ts11.isArrayLiteralExpression(n))
16913
+ if (!n || !ts12.isArrayLiteralExpression(n))
16788
16914
  return null;
16789
16915
  const map = {};
16790
16916
  for (const item of n.elements) {
16791
- if (!ts11.isStringLiteral(item))
16917
+ if (!ts12.isStringLiteral(item))
16792
16918
  continue;
16793
16919
  const [name, alias] = item.text.split(":").map((s2) => s2.trim());
16794
16920
  if (name)
@@ -16850,7 +16976,7 @@ var fail = (reason, detail, location) => ({
16850
16976
  return cached.info;
16851
16977
  let source;
16852
16978
  try {
16853
- source = readFileSync17(filePath, "utf-8");
16979
+ source = readFileSync18(filePath, "utf-8");
16854
16980
  } catch {
16855
16981
  childComponentInfoCache.set(cacheKey2, {
16856
16982
  info: null,
@@ -16858,10 +16984,10 @@ var fail = (reason, detail, location) => ({
16858
16984
  });
16859
16985
  return null;
16860
16986
  }
16861
- const sf = ts11.createSourceFile(filePath, source, ts11.ScriptTarget.Latest, true);
16987
+ const sf = ts12.createSourceFile(filePath, source, ts12.ScriptTarget.Latest, true);
16862
16988
  let info = null;
16863
16989
  for (const stmt of sf.statements) {
16864
- if (!ts11.isClassDeclaration(stmt))
16990
+ if (!ts12.isClassDeclaration(stmt))
16865
16991
  continue;
16866
16992
  if (!stmt.name || stmt.name.text !== className)
16867
16993
  continue;
@@ -16904,7 +17030,7 @@ var fail = (reason, detail, location) => ({
16904
17030
  return cached.info;
16905
17031
  let content;
16906
17032
  try {
16907
- content = readFileSync17(dtsPath, "utf-8");
17033
+ content = readFileSync18(dtsPath, "utf-8");
16908
17034
  } catch {
16909
17035
  childComponentInfoCache.set(cacheKey2, {
16910
17036
  info: null,
@@ -16996,9 +17122,9 @@ var fail = (reason, detail, location) => ({
16996
17122
  }, buildClassToSpecMap = (sourceFile) => {
16997
17123
  const result = new Map;
16998
17124
  for (const stmt of sourceFile.statements) {
16999
- if (!ts11.isImportDeclaration(stmt))
17125
+ if (!ts12.isImportDeclaration(stmt))
17000
17126
  continue;
17001
- if (!ts11.isStringLiteral(stmt.moduleSpecifier))
17127
+ if (!ts12.isStringLiteral(stmt.moduleSpecifier))
17002
17128
  continue;
17003
17129
  const spec = stmt.moduleSpecifier.text;
17004
17130
  const clause = stmt.importClause;
@@ -17007,7 +17133,7 @@ var fail = (reason, detail, location) => ({
17007
17133
  if (clause.name)
17008
17134
  result.set(clause.name.text, spec);
17009
17135
  const named = clause.namedBindings;
17010
- if (named && ts11.isNamedImports(named)) {
17136
+ if (named && ts12.isNamedImports(named)) {
17011
17137
  for (const el of named.elements) {
17012
17138
  if (el.isTypeOnly)
17013
17139
  continue;
@@ -17024,7 +17150,7 @@ var fail = (reason, detail, location) => ({
17024
17150
  return null;
17025
17151
  let content;
17026
17152
  try {
17027
- content = readFileSync17(startDtsPath, "utf-8");
17153
+ content = readFileSync18(startDtsPath, "utf-8");
17028
17154
  } catch {
17029
17155
  return null;
17030
17156
  }
@@ -17120,7 +17246,7 @@ var fail = (reason, detail, location) => ({
17120
17246
  return result;
17121
17247
  const classToSpec = buildClassToSpecMap(sourceFile);
17122
17248
  for (const el of importsExpr.elements) {
17123
- if (!ts11.isIdentifier(el))
17249
+ if (!ts12.isIdentifier(el))
17124
17250
  continue;
17125
17251
  const className = el.text;
17126
17252
  const spec = classToSpec.get(className);
@@ -17139,35 +17265,35 @@ var fail = (reason, detail, location) => ({
17139
17265
  }
17140
17266
  return (h2 >>> 0).toString(36);
17141
17267
  }, initializerShapeIsStructural = (node) => {
17142
- if (ts11.isArrowFunction(node) || ts11.isFunctionExpression(node) || ts11.isCallExpression(node) || ts11.isNewExpression(node)) {
17268
+ if (ts12.isArrowFunction(node) || ts12.isFunctionExpression(node) || ts12.isCallExpression(node) || ts12.isNewExpression(node)) {
17143
17269
  return true;
17144
17270
  }
17145
- if (ts11.isConditionalExpression(node)) {
17271
+ if (ts12.isConditionalExpression(node)) {
17146
17272
  return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
17147
17273
  }
17148
- if (ts11.isParenthesizedExpression(node)) {
17274
+ if (ts12.isParenthesizedExpression(node)) {
17149
17275
  return initializerShapeIsStructural(node.expression);
17150
17276
  }
17151
- if (ts11.isAsExpression(node) || ts11.isTypeAssertionExpression(node)) {
17277
+ if (ts12.isAsExpression(node) || ts12.isTypeAssertionExpression(node)) {
17152
17278
  return initializerShapeIsStructural(node.expression);
17153
17279
  }
17154
- if (ts11.isNonNullExpression(node)) {
17280
+ if (ts12.isNonNullExpression(node)) {
17155
17281
  return initializerShapeIsStructural(node.expression);
17156
17282
  }
17157
- if (ts11.isObjectLiteralExpression(node)) {
17283
+ if (ts12.isObjectLiteralExpression(node)) {
17158
17284
  for (const prop of node.properties) {
17159
- if (ts11.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
17285
+ if (ts12.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
17160
17286
  return true;
17161
17287
  }
17162
- if (ts11.isShorthandPropertyAssignment(prop))
17288
+ if (ts12.isShorthandPropertyAssignment(prop))
17163
17289
  continue;
17164
- if (ts11.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
17290
+ if (ts12.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
17165
17291
  return true;
17166
17292
  }
17167
17293
  }
17168
17294
  return false;
17169
17295
  }
17170
- if (ts11.isArrayLiteralExpression(node)) {
17296
+ if (ts12.isArrayLiteralExpression(node)) {
17171
17297
  for (const el of node.elements) {
17172
17298
  if (initializerShapeIsStructural(el))
17173
17299
  return true;
@@ -17178,7 +17304,7 @@ var fail = (reason, detail, location) => ({
17178
17304
  }, extractArrowFieldSig = (cls) => {
17179
17305
  const entries = [];
17180
17306
  for (const member of cls.members) {
17181
- if (!ts11.isPropertyDeclaration(member))
17307
+ if (!ts12.isPropertyDeclaration(member))
17182
17308
  continue;
17183
17309
  const init = member.initializer;
17184
17310
  if (!init)
@@ -17188,12 +17314,12 @@ var fail = (reason, detail, location) => ({
17188
17314
  const name = member.name.getText();
17189
17315
  let bodyText;
17190
17316
  try {
17191
- const printer = ts11.createPrinter({
17192
- newLine: ts11.NewLineKind.LineFeed,
17317
+ const printer = ts12.createPrinter({
17318
+ newLine: ts12.NewLineKind.LineFeed,
17193
17319
  omitTrailingSemicolon: true,
17194
17320
  removeComments: true
17195
17321
  });
17196
- bodyText = printer.printNode(ts11.EmitHint.Unspecified, init, cls.getSourceFile());
17322
+ bodyText = printer.printNode(ts12.EmitHint.Unspecified, init, cls.getSourceFile());
17197
17323
  } catch {
17198
17324
  bodyText = init.getText();
17199
17325
  }
@@ -17204,9 +17330,9 @@ var fail = (reason, detail, location) => ({
17204
17330
  }, INPUT_OUTPUT_DECORATORS, extractMemberDecoratorSig = (cls) => {
17205
17331
  const entries = [];
17206
17332
  for (const member of cls.members) {
17207
- if (!ts11.canHaveDecorators(member))
17333
+ if (!ts12.canHaveDecorators(member))
17208
17334
  continue;
17209
- const decorators = ts11.getDecorators(member) ?? [];
17335
+ const decorators = ts12.getDecorators(member) ?? [];
17210
17336
  if (decorators.length === 0)
17211
17337
  continue;
17212
17338
  const memberName = member.name?.getText() ?? "<anon>";
@@ -17214,14 +17340,14 @@ var fail = (reason, detail, location) => ({
17214
17340
  const expr = decorator.expression;
17215
17341
  let decName = "<unknown>";
17216
17342
  let argText = "";
17217
- if (ts11.isCallExpression(expr)) {
17218
- if (ts11.isIdentifier(expr.expression)) {
17343
+ if (ts12.isCallExpression(expr)) {
17344
+ if (ts12.isIdentifier(expr.expression)) {
17219
17345
  decName = expr.expression.text;
17220
17346
  }
17221
17347
  if (expr.arguments.length > 0) {
17222
17348
  argText = expr.arguments.map((a) => a.getText()).join(",");
17223
17349
  }
17224
- } else if (ts11.isIdentifier(expr)) {
17350
+ } else if (ts12.isIdentifier(expr)) {
17225
17351
  decName = expr.text;
17226
17352
  }
17227
17353
  if (INPUT_OUTPUT_DECORATORS.has(decName))
@@ -17242,22 +17368,22 @@ var fail = (reason, detail, location) => ({
17242
17368
  return cached.hasProviders;
17243
17369
  let source;
17244
17370
  try {
17245
- source = readFileSync17(filePath, "utf8");
17371
+ source = readFileSync18(filePath, "utf8");
17246
17372
  } catch {
17247
17373
  return true;
17248
17374
  }
17249
- const sf = ts11.createSourceFile(filePath, source, ts11.ScriptTarget.ES2022, true, ts11.ScriptKind.TS);
17375
+ const sf = ts12.createSourceFile(filePath, source, ts12.ScriptTarget.ES2022, true, ts12.ScriptKind.TS);
17250
17376
  let hasProviders = false;
17251
17377
  const visit = (node) => {
17252
17378
  if (hasProviders)
17253
17379
  return;
17254
- if (ts11.isClassDeclaration(node)) {
17255
- for (const decorator of ts11.getDecorators(node) ?? []) {
17380
+ if (ts12.isClassDeclaration(node)) {
17381
+ for (const decorator of ts12.getDecorators(node) ?? []) {
17256
17382
  const expr = decorator.expression;
17257
- if (!ts11.isCallExpression(expr))
17383
+ if (!ts12.isCallExpression(expr))
17258
17384
  continue;
17259
17385
  const arg = expr.arguments[0];
17260
- if (!arg || !ts11.isObjectLiteralExpression(arg))
17386
+ if (!arg || !ts12.isObjectLiteralExpression(arg))
17261
17387
  continue;
17262
17388
  if (getProperty(arg, "providers") !== null) {
17263
17389
  hasProviders = true;
@@ -17265,7 +17391,7 @@ var fail = (reason, detail, location) => ({
17265
17391
  }
17266
17392
  }
17267
17393
  }
17268
- ts11.forEachChild(node, visit);
17394
+ ts12.forEachChild(node, visit);
17269
17395
  };
17270
17396
  visit(sf);
17271
17397
  providerProbeCache.set(filePath, {
@@ -17275,10 +17401,10 @@ var fail = (reason, detail, location) => ({
17275
17401
  return hasProviders;
17276
17402
  }, TS_EXTENSIONS, resolveImportSource = (identifierName, sourceFile, componentDir) => {
17277
17403
  for (const stmt of sourceFile.statements) {
17278
- if (!ts11.isImportDeclaration(stmt))
17404
+ if (!ts12.isImportDeclaration(stmt))
17279
17405
  continue;
17280
17406
  const moduleSpec = stmt.moduleSpecifier;
17281
- if (!ts11.isStringLiteral(moduleSpec))
17407
+ if (!ts12.isStringLiteral(moduleSpec))
17282
17408
  continue;
17283
17409
  const spec = moduleSpec.text;
17284
17410
  if (!spec.startsWith(".") && !spec.startsWith("/"))
@@ -17292,7 +17418,7 @@ var fail = (reason, detail, location) => ({
17292
17418
  }
17293
17419
  if (importClause.namedBindings) {
17294
17420
  const nb = importClause.namedBindings;
17295
- if (ts11.isNamespaceImport(nb)) {
17421
+ if (ts12.isNamespaceImport(nb)) {
17296
17422
  if (nb.name.text === identifierName)
17297
17423
  matches = true;
17298
17424
  } else {
@@ -17322,7 +17448,7 @@ var fail = (reason, detail, location) => ({
17322
17448
  return [];
17323
17449
  const sig = [];
17324
17450
  for (const entry of importsExpr.elements) {
17325
- if (ts11.isIdentifier(entry)) {
17451
+ if (ts12.isIdentifier(entry)) {
17326
17452
  const importPath = resolveImportSource(entry.text, sourceFile, componentDir);
17327
17453
  if (importPath) {
17328
17454
  if (fileHasModuleProviders(importPath)) {
@@ -17341,13 +17467,13 @@ var fail = (reason, detail, location) => ({
17341
17467
  }, extractPropertyFieldNames = (cls) => {
17342
17468
  const names = [];
17343
17469
  for (const member of cls.members) {
17344
- if (!ts11.isPropertyDeclaration(member) && !ts11.isMethodDeclaration(member) && !ts11.isGetAccessorDeclaration(member) && !ts11.isSetAccessorDeclaration(member)) {
17470
+ if (!ts12.isPropertyDeclaration(member) && !ts12.isMethodDeclaration(member) && !ts12.isGetAccessorDeclaration(member) && !ts12.isSetAccessorDeclaration(member)) {
17345
17471
  continue;
17346
17472
  }
17347
17473
  const name = member.name;
17348
17474
  if (name === undefined)
17349
17475
  continue;
17350
- const text = ts11.isIdentifier(name) ? name.text : ts11.isStringLiteral(name) || ts11.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
17476
+ const text = ts12.isIdentifier(name) ? name.text : ts12.isStringLiteral(name) || ts12.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
17351
17477
  if (text.length > 0)
17352
17478
  names.push(text);
17353
17479
  }
@@ -17355,7 +17481,7 @@ var fail = (reason, detail, location) => ({
17355
17481
  }, extractTopLevelImports = (sourceFile) => {
17356
17482
  const names = new Set;
17357
17483
  for (const stmt of sourceFile.statements) {
17358
- if (!ts11.isImportDeclaration(stmt))
17484
+ if (!ts12.isImportDeclaration(stmt))
17359
17485
  continue;
17360
17486
  const clause = stmt.importClause;
17361
17487
  if (!clause)
@@ -17367,9 +17493,9 @@ var fail = (reason, detail, location) => ({
17367
17493
  const bindings = clause.namedBindings;
17368
17494
  if (!bindings)
17369
17495
  continue;
17370
- if (ts11.isNamespaceImport(bindings)) {
17496
+ if (ts12.isNamespaceImport(bindings)) {
17371
17497
  names.add(bindings.name.text);
17372
- } else if (ts11.isNamedImports(bindings)) {
17498
+ } else if (ts12.isNamedImports(bindings)) {
17373
17499
  for (const el of bindings.elements) {
17374
17500
  if (el.isTypeOnly)
17375
17501
  continue;
@@ -17381,18 +17507,18 @@ var fail = (reason, detail, location) => ({
17381
17507
  }, extractFingerprint = (cls, className, decoratorMeta, inputs, outputs, sourceFile, componentDir) => {
17382
17508
  const ctorParamTypes = [];
17383
17509
  for (const member of cls.members) {
17384
- if (!ts11.isConstructorDeclaration(member))
17510
+ if (!ts12.isConstructorDeclaration(member))
17385
17511
  continue;
17386
17512
  for (const param of member.parameters) {
17387
17513
  const typeText = param.type ? param.type.getText() : "";
17388
- const decorators = ts11.getDecorators(param) ?? [];
17514
+ const decorators = ts12.getDecorators(param) ?? [];
17389
17515
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
17390
17516
  const expr = d2.expression;
17391
- if (ts11.isCallExpression(expr) && ts11.isIdentifier(expr.expression)) {
17517
+ if (ts12.isCallExpression(expr) && ts12.isIdentifier(expr.expression)) {
17392
17518
  const args = expr.arguments.map((a) => a.getText()).join(",");
17393
17519
  return `@${expr.expression.text}(${args})`;
17394
17520
  }
17395
- if (ts11.isIdentifier(expr)) {
17521
+ if (ts12.isIdentifier(expr)) {
17396
17522
  return `@${expr.text}`;
17397
17523
  }
17398
17524
  return "@<unknown>";
@@ -17408,12 +17534,12 @@ var fail = (reason, detail, location) => ({
17408
17534
  const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
17409
17535
  const topLevelImports = extractTopLevelImports(sourceFile);
17410
17536
  const propertyFieldNames = extractPropertyFieldNames(cls);
17411
- const printer = ts11.createPrinter({
17412
- newLine: ts11.NewLineKind.LineFeed,
17537
+ const printer = ts12.createPrinter({
17538
+ newLine: ts12.NewLineKind.LineFeed,
17413
17539
  omitTrailingSemicolon: true,
17414
17540
  removeComments: true
17415
17541
  });
17416
- const canonicalText = (node) => printer.printNode(ts11.EmitHint.Unspecified, node, sourceFile);
17542
+ const canonicalText = (node) => printer.printNode(ts12.EmitHint.Unspecified, node, sourceFile);
17417
17543
  const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(canonicalText(decoratorMeta.importsExpr)) : "";
17418
17544
  const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(canonicalText(decoratorMeta.hostDirectivesExpr)) : "";
17419
17545
  const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(canonicalText(decoratorMeta.animationsExpr)) : "";
@@ -17426,13 +17552,13 @@ var fail = (reason, detail, location) => ({
17426
17552
  const PAGE_EXPORT_NAMES = new Set(["providers", "routes"]);
17427
17553
  const pageExportEntries = [];
17428
17554
  for (const stmt of sourceFile.statements) {
17429
- if (!ts11.isVariableStatement(stmt))
17555
+ if (!ts12.isVariableStatement(stmt))
17430
17556
  continue;
17431
- const isExported = stmt.modifiers?.some((m) => m.kind === ts11.SyntaxKind.ExportKeyword);
17557
+ const isExported = stmt.modifiers?.some((m) => m.kind === ts12.SyntaxKind.ExportKeyword);
17432
17558
  if (!isExported)
17433
17559
  continue;
17434
17560
  for (const decl of stmt.declarationList.declarations) {
17435
- if (!ts11.isIdentifier(decl.name))
17561
+ if (!ts12.isIdentifier(decl.name))
17436
17562
  continue;
17437
17563
  if (!PAGE_EXPORT_NAMES.has(decl.name.text))
17438
17564
  continue;
@@ -17473,35 +17599,35 @@ var fail = (reason, detail, location) => ({
17473
17599
  }, buildFreshClassMethodsBlock = (classNode, className) => {
17474
17600
  const memberSources = [];
17475
17601
  let hasStatic = false;
17476
- const printer = ts11.createPrinter({ removeComments: true });
17602
+ const printer = ts12.createPrinter({ removeComments: true });
17477
17603
  for (const member of classNode.members) {
17478
- if (ts11.isPropertyDeclaration(member)) {
17479
- const modifiers = (ts11.getModifiers(member) ?? []).filter((m) => m.kind !== ts11.SyntaxKind.PrivateKeyword && m.kind !== ts11.SyntaxKind.PublicKeyword && m.kind !== ts11.SyntaxKind.ProtectedKeyword && m.kind !== ts11.SyntaxKind.ReadonlyKeyword && m.kind !== ts11.SyntaxKind.OverrideKeyword);
17480
- const cleaned = ts11.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
17481
- memberSources.push(printer.printNode(ts11.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17604
+ if (ts12.isPropertyDeclaration(member)) {
17605
+ const modifiers = (ts12.getModifiers(member) ?? []).filter((m) => m.kind !== ts12.SyntaxKind.PrivateKeyword && m.kind !== ts12.SyntaxKind.PublicKeyword && m.kind !== ts12.SyntaxKind.ProtectedKeyword && m.kind !== ts12.SyntaxKind.ReadonlyKeyword && m.kind !== ts12.SyntaxKind.OverrideKeyword);
17606
+ const cleaned = ts12.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
17607
+ memberSources.push(printer.printNode(ts12.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17482
17608
  continue;
17483
17609
  }
17484
- if (ts11.isConstructorDeclaration(member)) {
17485
- const cleanedParams = member.parameters.map((param) => ts11.factory.updateParameterDeclaration(param, (ts11.getModifiers(param) ?? []).filter((m) => m.kind !== ts11.SyntaxKind.PrivateKeyword && m.kind !== ts11.SyntaxKind.PublicKeyword && m.kind !== ts11.SyntaxKind.ProtectedKeyword && m.kind !== ts11.SyntaxKind.ReadonlyKeyword && m.kind !== ts11.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17486
- const cleaned = ts11.factory.createConstructorDeclaration([], cleanedParams, member.body);
17487
- memberSources.push(printer.printNode(ts11.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17610
+ if (ts12.isConstructorDeclaration(member)) {
17611
+ const cleanedParams = member.parameters.map((param) => ts12.factory.updateParameterDeclaration(param, (ts12.getModifiers(param) ?? []).filter((m) => m.kind !== ts12.SyntaxKind.PrivateKeyword && m.kind !== ts12.SyntaxKind.PublicKeyword && m.kind !== ts12.SyntaxKind.ProtectedKeyword && m.kind !== ts12.SyntaxKind.ReadonlyKeyword && m.kind !== ts12.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17612
+ const cleaned = ts12.factory.createConstructorDeclaration([], cleanedParams, member.body);
17613
+ memberSources.push(printer.printNode(ts12.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
17488
17614
  continue;
17489
17615
  }
17490
- if (ts11.isMethodDeclaration(member) || ts11.isGetAccessorDeclaration(member) || ts11.isSetAccessorDeclaration(member)) {
17491
- const modifiers = ts11.getModifiers(member) ?? [];
17492
- const isStatic = modifiers.some((m) => m.kind === ts11.SyntaxKind.StaticKeyword);
17616
+ if (ts12.isMethodDeclaration(member) || ts12.isGetAccessorDeclaration(member) || ts12.isSetAccessorDeclaration(member)) {
17617
+ const modifiers = ts12.getModifiers(member) ?? [];
17618
+ const isStatic = modifiers.some((m) => m.kind === ts12.SyntaxKind.StaticKeyword);
17493
17619
  if (isStatic)
17494
17620
  hasStatic = true;
17495
- const cleanedParams = member.parameters.map((param) => ts11.factory.updateParameterDeclaration(param, ts11.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17621
+ const cleanedParams = member.parameters.map((param) => ts12.factory.updateParameterDeclaration(param, ts12.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
17496
17622
  let cleaned;
17497
- if (ts11.isMethodDeclaration(member)) {
17498
- cleaned = ts11.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
17499
- } else if (ts11.isGetAccessorDeclaration(member)) {
17500
- cleaned = ts11.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
17623
+ if (ts12.isMethodDeclaration(member)) {
17624
+ cleaned = ts12.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
17625
+ } else if (ts12.isGetAccessorDeclaration(member)) {
17626
+ cleaned = ts12.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
17501
17627
  } else {
17502
- cleaned = ts11.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
17628
+ cleaned = ts12.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
17503
17629
  }
17504
- const printed = printer.printNode(ts11.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
17630
+ const printed = printer.printNode(ts12.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
17505
17631
  memberSources.push(printed);
17506
17632
  }
17507
17633
  }
@@ -17513,10 +17639,10 @@ ${memberSources.join(`
17513
17639
  }`;
17514
17640
  let transpiled;
17515
17641
  try {
17516
- transpiled = ts11.transpileModule(wrappedSource, {
17642
+ transpiled = ts12.transpileModule(wrappedSource, {
17517
17643
  compilerOptions: {
17518
- module: ts11.ModuleKind.ES2022,
17519
- target: ts11.ScriptTarget.ES2022
17644
+ module: ts12.ModuleKind.ES2022,
17645
+ target: ts12.ScriptTarget.ES2022
17520
17646
  },
17521
17647
  reportDiagnostics: false
17522
17648
  }).outputText;
@@ -17550,7 +17676,7 @@ ${transpiled}
17550
17676
  return null;
17551
17677
  const ext = extname6(abs).toLowerCase();
17552
17678
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
17553
- return readFileSync17(abs, "utf8");
17679
+ return readFileSync18(abs, "utf8");
17554
17680
  }
17555
17681
  try {
17556
17682
  const { compileStyleFileIfNeededSync: compileStyleFileIfNeededSync2 } = (init_stylePreprocessor(), __toCommonJS(exports_stylePreprocessor));
@@ -17589,8 +17715,8 @@ ${block}
17589
17715
  const opts = {};
17590
17716
  if (existsSync23(tsconfigPath)) {
17591
17717
  try {
17592
- const text = readFileSync17(tsconfigPath, "utf8");
17593
- const parsed = ts11.parseConfigFileTextToJson(tsconfigPath, text);
17718
+ const text = readFileSync18(tsconfigPath, "utf8");
17719
+ const parsed = ts12.parseConfigFileTextToJson(tsconfigPath, text);
17594
17720
  if (!parsed.error && parsed.config) {
17595
17721
  const cfg = parsed.config;
17596
17722
  const ang = cfg.angularCompilerOptions ?? {};
@@ -17623,15 +17749,15 @@ ${block}
17623
17749
  } catch (err) {
17624
17750
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
17625
17751
  }
17626
- const tsSource = readFileSync17(componentFilePath, "utf8");
17627
- const sourceFile = ts11.createSourceFile(componentFilePath, tsSource, ts11.ScriptTarget.ES2022, true, ts11.ScriptKind.TS);
17752
+ const tsSource = readFileSync18(componentFilePath, "utf8");
17753
+ const sourceFile = ts12.createSourceFile(componentFilePath, tsSource, ts12.ScriptTarget.ES2022, true, ts12.ScriptKind.TS);
17628
17754
  const classNode = findClassDeclaration(sourceFile, className);
17629
17755
  if (!classNode) {
17630
17756
  return fail("class-not-found", `${className} in ${componentFilePath}`);
17631
17757
  }
17632
17758
  const kind = params.kind ?? "component";
17633
17759
  if (kind !== "component") {
17634
- const entityId = encodeURIComponent(`${relative13(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
17760
+ const entityId = encodeURIComponent(`${relative14(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
17635
17761
  const currentEntityFingerprint = extractEntityFingerprint(classNode, className, sourceFile);
17636
17762
  const cachedEntityFingerprint = entityFingerprintCache.get(entityId);
17637
17763
  if (cachedEntityFingerprint !== undefined && !entityFingerprintsEqual(cachedEntityFingerprint, currentEntityFingerprint)) {
@@ -17673,7 +17799,7 @@ ${block}
17673
17799
  if (!existsSync23(tplAbs)) {
17674
17800
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
17675
17801
  }
17676
- templateText = readFileSync17(tplAbs, "utf8");
17802
+ templateText = readFileSync18(tplAbs, "utf8");
17677
17803
  templatePath = tplAbs;
17678
17804
  } else {
17679
17805
  return fail("unsupported-decorator-args", "missing template/templateUrl");
@@ -17715,7 +17841,7 @@ ${block}
17715
17841
  return fail("class-not-found", "anonymous class");
17716
17842
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
17717
17843
  const { inputs, outputs, hasDecoratorIO, hasSignalIO } = extractInputsAndOutputs(classNode, compiler);
17718
- const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
17844
+ const projectRelPath = relative14(projectRoot, componentFilePath).replace(/\\/g, "/");
17719
17845
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
17720
17846
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
17721
17847
  const cachedFingerprint = fingerprintCache.get(fingerprintId);
@@ -17744,7 +17870,7 @@ ${block}
17744
17870
  viewQueries: advancedMetadata.viewQueries,
17745
17871
  host: advancedMetadata.host,
17746
17872
  lifecycle: {
17747
- usesOnChanges: classNode.members.some((m) => ts11.isMethodDeclaration(m) && m.name !== undefined && ts11.isIdentifier(m.name) && m.name.text === "ngOnChanges")
17873
+ usesOnChanges: classNode.members.some((m) => ts12.isMethodDeclaration(m) && m.name !== undefined && ts12.isIdentifier(m.name) && m.name.text === "ngOnChanges")
17748
17874
  },
17749
17875
  inputs,
17750
17876
  outputs,
@@ -17800,15 +17926,15 @@ ${block}
17800
17926
  }
17801
17927
  const importGenerator = createHmrImportGenerator(namespaceMap);
17802
17928
  const tsFunctionDecl = translateStatement(sourceFile, callback, importGenerator);
17803
- const exportedDecl = ts11.factory.updateFunctionDeclaration(tsFunctionDecl, [
17804
- ts11.factory.createToken(ts11.SyntaxKind.ExportKeyword),
17805
- ts11.factory.createToken(ts11.SyntaxKind.DefaultKeyword)
17929
+ const exportedDecl = ts12.factory.updateFunctionDeclaration(tsFunctionDecl, [
17930
+ ts12.factory.createToken(ts12.SyntaxKind.ExportKeyword),
17931
+ ts12.factory.createToken(ts12.SyntaxKind.DefaultKeyword)
17806
17932
  ], tsFunctionDecl.asteriskToken, tsFunctionDecl.name, tsFunctionDecl.typeParameters, tsFunctionDecl.parameters, tsFunctionDecl.type, tsFunctionDecl.body);
17807
- const printer = ts11.createPrinter({
17808
- newLine: ts11.NewLineKind.LineFeed,
17933
+ const printer = ts12.createPrinter({
17934
+ newLine: ts12.NewLineKind.LineFeed,
17809
17935
  removeComments: false
17810
17936
  });
17811
- const fnText = printer.printNode(ts11.EmitHint.Unspecified, exportedDecl, sourceFile);
17937
+ const fnText = printer.printNode(ts12.EmitHint.Unspecified, exportedDecl, sourceFile);
17812
17938
  const provisionalMethodsBlock = buildFreshClassMethodsBlock(classNode, className) ?? "";
17813
17939
  const referencedNames = new Set;
17814
17940
  const identRe = /[A-Za-z_$][A-Za-z0-9_$]*/g;
@@ -17818,33 +17944,33 @@ ${block}
17818
17944
  }
17819
17945
  const sourceScopeNames = new Set;
17820
17946
  for (const stmt of sourceFile.statements) {
17821
- if (ts11.isImportDeclaration(stmt)) {
17822
- if (!ts11.isStringLiteral(stmt.moduleSpecifier))
17947
+ if (ts12.isImportDeclaration(stmt)) {
17948
+ if (!ts12.isStringLiteral(stmt.moduleSpecifier))
17823
17949
  continue;
17824
17950
  const clause = stmt.importClause;
17825
17951
  if (clause?.name)
17826
17952
  sourceScopeNames.add(clause.name.text);
17827
- if (clause?.namedBindings && ts11.isNamedImports(clause.namedBindings)) {
17953
+ if (clause?.namedBindings && ts12.isNamedImports(clause.namedBindings)) {
17828
17954
  for (const el of clause.namedBindings.elements) {
17829
17955
  if (el.isTypeOnly)
17830
17956
  continue;
17831
17957
  sourceScopeNames.add(el.name.text);
17832
17958
  }
17833
- } else if (clause?.namedBindings && ts11.isNamespaceImport(clause.namedBindings)) {
17959
+ } else if (clause?.namedBindings && ts12.isNamespaceImport(clause.namedBindings)) {
17834
17960
  sourceScopeNames.add(clause.namedBindings.name.text);
17835
17961
  }
17836
17962
  continue;
17837
17963
  }
17838
- if (ts11.isVariableStatement(stmt) || stmt.kind === ts11.SyntaxKind.VariableStatement) {
17964
+ if (ts12.isVariableStatement(stmt) || stmt.kind === ts12.SyntaxKind.VariableStatement) {
17839
17965
  const varStmt = stmt;
17840
17966
  for (const decl of varStmt.declarationList.declarations) {
17841
- if (ts11.isIdentifier(decl.name)) {
17967
+ if (ts12.isIdentifier(decl.name)) {
17842
17968
  sourceScopeNames.add(decl.name.text);
17843
17969
  }
17844
17970
  }
17845
17971
  continue;
17846
17972
  }
17847
- if (ts11.isFunctionDeclaration(stmt) || ts11.isClassDeclaration(stmt)) {
17973
+ if (ts12.isFunctionDeclaration(stmt) || ts12.isClassDeclaration(stmt)) {
17848
17974
  if (stmt.name)
17849
17975
  sourceScopeNames.add(stmt.name.text);
17850
17976
  }
@@ -17855,7 +17981,7 @@ ${block}
17855
17981
  }
17856
17982
  const allImportedNames = new Set;
17857
17983
  for (const stmt of sourceFile.statements) {
17858
- if (!ts11.isImportDeclaration(stmt))
17984
+ if (!ts12.isImportDeclaration(stmt))
17859
17985
  continue;
17860
17986
  const clause = stmt.importClause;
17861
17987
  if (!clause || clause.isTypeOnly)
@@ -17865,7 +17991,7 @@ ${block}
17865
17991
  const bindings = clause.namedBindings;
17866
17992
  if (!bindings)
17867
17993
  continue;
17868
- if (ts11.isNamespaceImport(bindings)) {
17994
+ if (ts12.isNamespaceImport(bindings)) {
17869
17995
  allImportedNames.add(bindings.name.text);
17870
17996
  } else {
17871
17997
  for (const el of bindings.elements) {
@@ -17877,10 +18003,10 @@ ${block}
17877
18003
  }
17878
18004
  const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n) || allImportedNames.has(n));
17879
18005
  const tsSourceText = fnText;
17880
- const transpiled = ts11.transpileModule(tsSourceText, {
18006
+ const transpiled = ts12.transpileModule(tsSourceText, {
17881
18007
  compilerOptions: {
17882
- module: ts11.ModuleKind.ES2022,
17883
- target: ts11.ScriptTarget.ES2022
18008
+ module: ts12.ModuleKind.ES2022,
18009
+ target: ts12.ScriptTarget.ES2022
17884
18010
  },
17885
18011
  fileName: componentFilePath,
17886
18012
  reportDiagnostics: false
@@ -18428,11 +18554,11 @@ __export(exports_compileEmber, {
18428
18554
  compileEmberFile: () => compileEmberFile,
18429
18555
  compileEmber: () => compileEmber,
18430
18556
  clearEmberCompilerCache: () => clearEmberCompilerCache,
18431
- basename: () => basename9
18557
+ basename: () => basename10
18432
18558
  });
18433
18559
  import { existsSync as existsSync24 } from "fs";
18434
18560
  import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
18435
- import { basename as basename9, dirname as dirname19, extname as extname7, join as join29, resolve as resolve27 } from "path";
18561
+ import { basename as basename10, dirname as dirname19, extname as extname7, join as join30, resolve as resolve27 } from "path";
18436
18562
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
18437
18563
  var cachedPreprocessor = null, getPreprocessor = async () => {
18438
18564
  if (cachedPreprocessor)
@@ -18551,7 +18677,7 @@ export const importSync = (specifier) => {
18551
18677
  build2.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
18552
18678
  if (standalonePackages.has(args.path))
18553
18679
  return;
18554
- const internal = join29(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18680
+ const internal = join30(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
18555
18681
  if (existsSync24(internal))
18556
18682
  return { path: internal };
18557
18683
  return;
@@ -18598,17 +18724,17 @@ export default PageComponent;
18598
18724
  preprocessed = rewriteTemplateEvalToScope(result.code);
18599
18725
  }
18600
18726
  const transpiled = transpiler5.transformSync(preprocessed);
18601
- const baseName = basename9(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
18602
- const tmpDir = join29(compiledRoot, "_tmp");
18603
- const serverDir = join29(compiledRoot, "server");
18604
- const clientDir = join29(compiledRoot, "client");
18727
+ const baseName = basename10(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
18728
+ const tmpDir = join30(compiledRoot, "_tmp");
18729
+ const serverDir = join30(compiledRoot, "server");
18730
+ const clientDir = join30(compiledRoot, "client");
18605
18731
  await Promise.all([
18606
18732
  mkdir6(tmpDir, { recursive: true }),
18607
18733
  mkdir6(serverDir, { recursive: true }),
18608
18734
  mkdir6(clientDir, { recursive: true })
18609
18735
  ]);
18610
- const tmpPagePath = resolve27(join29(tmpDir, `${baseName}.module.js`));
18611
- const tmpHarnessPath = resolve27(join29(tmpDir, `${baseName}.harness.js`));
18736
+ const tmpPagePath = resolve27(join30(tmpDir, `${baseName}.module.js`));
18737
+ const tmpHarnessPath = resolve27(join30(tmpDir, `${baseName}.harness.js`));
18612
18738
  await Promise.all([
18613
18739
  write4(tmpPagePath, transpiled),
18614
18740
  write4(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -18616,7 +18742,7 @@ export default PageComponent;
18616
18742
  const stagedSourceMap = new Map([
18617
18743
  [tmpPagePath, resolvedEntry]
18618
18744
  ]);
18619
- const serverPath = join29(serverDir, `${baseName}.js`);
18745
+ const serverPath = join30(serverDir, `${baseName}.js`);
18620
18746
  const buildResult = await bunBuild2({
18621
18747
  entrypoints: [tmpHarnessPath],
18622
18748
  format: "esm",
@@ -18633,7 +18759,7 @@ export default PageComponent;
18633
18759
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
18634
18760
  }
18635
18761
  await rm4(tmpDir, { force: true, recursive: true });
18636
- const clientPath = join29(clientDir, `${baseName}.js`);
18762
+ const clientPath = join30(clientDir, `${baseName}.js`);
18637
18763
  await write4(clientPath, transpiled);
18638
18764
  return { clientPath, serverPath };
18639
18765
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -18661,7 +18787,7 @@ export default PageComponent;
18661
18787
  preprocessed = rewriteTemplateEvalToScope(result.code);
18662
18788
  }
18663
18789
  return transpiler5.transformSync(preprocessed);
18664
- }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join29(getEmberCompiledRoot(emberDir), "client");
18790
+ }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join30(getEmberCompiledRoot(emberDir), "client");
18665
18791
  var init_compileEmber = __esm(() => {
18666
18792
  init_generatedDir();
18667
18793
  transpiler5 = new Transpiler4({
@@ -18683,7 +18809,7 @@ __export(exports_buildReactVendor, {
18683
18809
  buildReactVendor: () => buildReactVendor
18684
18810
  });
18685
18811
  import { existsSync as existsSync25, mkdirSync as mkdirSync10 } from "fs";
18686
- import { join as join30, resolve as resolve28 } from "path";
18812
+ import { join as join31, resolve as resolve28 } from "path";
18687
18813
  import { rm as rm5 } from "fs/promises";
18688
18814
  var {build: bunBuild3 } = globalThis.Bun;
18689
18815
  var resolveJsxDevRuntimeCompatPath = () => {
@@ -18737,14 +18863,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
18737
18863
  `)}
18738
18864
  `;
18739
18865
  }, buildReactVendor = async (buildDir) => {
18740
- const vendorDir = join30(buildDir, "react", "vendor");
18866
+ const vendorDir = join31(buildDir, "react", "vendor");
18741
18867
  mkdirSync10(vendorDir, { recursive: true });
18742
- const tmpDir = join30(buildDir, "_vendor_tmp");
18868
+ const tmpDir = join31(buildDir, "_vendor_tmp");
18743
18869
  mkdirSync10(tmpDir, { recursive: true });
18744
18870
  const specifiers = resolveVendorSpecifiers();
18745
18871
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18746
18872
  const safeName = toSafeFileName(specifier);
18747
- const entryPath = join30(tmpDir, `${safeName}.ts`);
18873
+ const entryPath = join31(tmpDir, `${safeName}.ts`);
18748
18874
  const source = await generateEntrySource(specifier);
18749
18875
  await Bun.write(entryPath, source);
18750
18876
  return entryPath;
@@ -18809,7 +18935,7 @@ __export(exports_buildAngularVendor, {
18809
18935
  buildAngularServerVendor: () => buildAngularServerVendor
18810
18936
  });
18811
18937
  import { mkdirSync as mkdirSync11 } from "fs";
18812
- import { join as join31 } from "path";
18938
+ import { join as join32 } from "path";
18813
18939
  import { rm as rm6 } from "fs/promises";
18814
18940
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
18815
18941
  var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable2 = (specifier) => {
@@ -18846,7 +18972,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18846
18972
  }
18847
18973
  return { angular, transitiveRoots };
18848
18974
  }, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
18849
- const { readFileSync: readFileSync18 } = await import("fs");
18975
+ const { readFileSync: readFileSync19 } = await import("fs");
18850
18976
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
18851
18977
  const visited = new Set;
18852
18978
  const frontier = [];
@@ -18867,7 +18993,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18867
18993
  }
18868
18994
  let content;
18869
18995
  try {
18870
- content = readFileSync18(resolved, "utf-8");
18996
+ content = readFileSync19(resolved, "utf-8");
18871
18997
  } catch {
18872
18998
  continue;
18873
18999
  }
@@ -18906,14 +19032,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18906
19032
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
18907
19033
  return Array.from(angular).filter(isResolvable2);
18908
19034
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
18909
- const vendorDir = join31(buildDir, "angular", "vendor");
19035
+ const vendorDir = join32(buildDir, "angular", "vendor");
18910
19036
  mkdirSync11(vendorDir, { recursive: true });
18911
- const tmpDir = join31(buildDir, "_angular_vendor_tmp");
19037
+ const tmpDir = join32(buildDir, "_angular_vendor_tmp");
18912
19038
  mkdirSync11(tmpDir, { recursive: true });
18913
19039
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
18914
19040
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18915
19041
  const safeName = toSafeFileName2(specifier);
18916
- const entryPath = join31(tmpDir, `${safeName}.ts`);
19042
+ const entryPath = join32(tmpDir, `${safeName}.ts`);
18917
19043
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
18918
19044
  return entryPath;
18919
19045
  }));
@@ -18944,9 +19070,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18944
19070
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
18945
19071
  return computeAngularVendorPaths(specifiers);
18946
19072
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
18947
- const vendorDir = join31(buildDir, "angular", "vendor", "server");
19073
+ const vendorDir = join32(buildDir, "angular", "vendor", "server");
18948
19074
  mkdirSync11(vendorDir, { recursive: true });
18949
- const tmpDir = join31(buildDir, "_angular_server_vendor_tmp");
19075
+ const tmpDir = join32(buildDir, "_angular_server_vendor_tmp");
18950
19076
  mkdirSync11(tmpDir, { recursive: true });
18951
19077
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
18952
19078
  const allSpecs = new Set(browserSpecs);
@@ -18957,7 +19083,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18957
19083
  const specifiers = Array.from(allSpecs);
18958
19084
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
18959
19085
  const safeName = toSafeFileName2(specifier);
18960
- const entryPath = join31(tmpDir, `${safeName}.ts`);
19086
+ const entryPath = join32(tmpDir, `${safeName}.ts`);
18961
19087
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
18962
19088
  return entryPath;
18963
19089
  }));
@@ -18979,9 +19105,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
18979
19105
  return specifiers;
18980
19106
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
18981
19107
  const paths = {};
18982
- const vendorDir = join31(buildDir, "angular", "vendor", "server");
19108
+ const vendorDir = join32(buildDir, "angular", "vendor", "server");
18983
19109
  for (const specifier of specifiers) {
18984
- paths[specifier] = join31(vendorDir, `${toSafeFileName2(specifier)}.js`);
19110
+ paths[specifier] = join32(vendorDir, `${toSafeFileName2(specifier)}.js`);
18985
19111
  }
18986
19112
  return paths;
18987
19113
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -19037,17 +19163,17 @@ __export(exports_buildVueVendor, {
19037
19163
  buildVueVendor: () => buildVueVendor
19038
19164
  });
19039
19165
  import { mkdirSync as mkdirSync12 } from "fs";
19040
- import { join as join32 } from "path";
19166
+ import { join as join33 } from "path";
19041
19167
  import { rm as rm7 } from "fs/promises";
19042
19168
  var {build: bunBuild5 } = globalThis.Bun;
19043
19169
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
19044
- const vendorDir = join32(buildDir, "vue", "vendor");
19170
+ const vendorDir = join33(buildDir, "vue", "vendor");
19045
19171
  mkdirSync12(vendorDir, { recursive: true });
19046
- const tmpDir = join32(buildDir, "_vue_vendor_tmp");
19172
+ const tmpDir = join33(buildDir, "_vue_vendor_tmp");
19047
19173
  mkdirSync12(tmpDir, { recursive: true });
19048
19174
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
19049
19175
  const safeName = toSafeFileName3(specifier);
19050
- const entryPath = join32(tmpDir, `${safeName}.ts`);
19176
+ const entryPath = join33(tmpDir, `${safeName}.ts`);
19051
19177
  await Bun.write(entryPath, `export * from '${specifier}';
19052
19178
  `);
19053
19179
  return entryPath;
@@ -19072,11 +19198,11 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
19072
19198
  console.warn("\u26A0\uFE0F Vue vendor build had errors:", result.logs);
19073
19199
  return;
19074
19200
  }
19075
- const { readFileSync: readFileSync18, writeFileSync: writeFileSync11, readdirSync: readdirSync3 } = await import("fs");
19076
- const files = readdirSync3(vendorDir).filter((f2) => f2.endsWith(".js"));
19201
+ const { readFileSync: readFileSync19, writeFileSync: writeFileSync11, readdirSync: readdirSync4 } = await import("fs");
19202
+ const files = readdirSync4(vendorDir).filter((f2) => f2.endsWith(".js"));
19077
19203
  for (const file5 of files) {
19078
- const filePath = join32(vendorDir, file5);
19079
- const content = readFileSync18(filePath, "utf-8");
19204
+ const filePath = join33(vendorDir, file5);
19205
+ const content = readFileSync19(filePath, "utf-8");
19080
19206
  if (!content.includes("__VUE_HMR_RUNTIME__"))
19081
19207
  continue;
19082
19208
  const patched = content.replace(/getGlobalThis\(\)\.__VUE_HMR_RUNTIME__\s*=\s*\{/, "getGlobalThis().__VUE_HMR_RUNTIME__ = getGlobalThis().__VUE_HMR_RUNTIME__ || {");
@@ -19102,7 +19228,7 @@ __export(exports_buildSvelteVendor, {
19102
19228
  buildSvelteVendor: () => buildSvelteVendor
19103
19229
  });
19104
19230
  import { mkdirSync as mkdirSync13 } from "fs";
19105
- import { join as join33 } from "path";
19231
+ import { join as join34 } from "path";
19106
19232
  import { rm as rm8 } from "fs/promises";
19107
19233
  var {build: bunBuild6 } = globalThis.Bun;
19108
19234
  var svelteSpecifiers, isResolvable3 = (specifier) => {
@@ -19116,13 +19242,13 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
19116
19242
  const specifiers = resolveVendorSpecifiers2();
19117
19243
  if (specifiers.length === 0)
19118
19244
  return;
19119
- const vendorDir = join33(buildDir, "svelte", "vendor");
19245
+ const vendorDir = join34(buildDir, "svelte", "vendor");
19120
19246
  mkdirSync13(vendorDir, { recursive: true });
19121
- const tmpDir = join33(buildDir, "_svelte_vendor_tmp");
19247
+ const tmpDir = join34(buildDir, "_svelte_vendor_tmp");
19122
19248
  mkdirSync13(tmpDir, { recursive: true });
19123
19249
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
19124
19250
  const safeName = toSafeFileName4(specifier);
19125
- const entryPath = join33(tmpDir, `${safeName}.ts`);
19251
+ const entryPath = join34(tmpDir, `${safeName}.ts`);
19126
19252
  await Bun.write(entryPath, `export * from '${specifier}';
19127
19253
  `);
19128
19254
  return entryPath;
@@ -19172,7 +19298,7 @@ __export(exports_rewriteImportsPlugin, {
19172
19298
  buildWithImportRewrite: () => buildWithImportRewrite
19173
19299
  });
19174
19300
  import { readdir as readdir3 } from "fs/promises";
19175
- import { join as join34 } from "path";
19301
+ import { join as join35 } from "path";
19176
19302
  var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
19177
19303
  let result = content;
19178
19304
  for (const [specifier, webPath] of replacements) {
@@ -19301,7 +19427,7 @@ ${content}`;
19301
19427
  const entries = await readdir3(dir);
19302
19428
  for (const entry of entries) {
19303
19429
  if (entry.endsWith(".js"))
19304
- allFiles.push(join34(dir, entry));
19430
+ allFiles.push(join35(dir, entry));
19305
19431
  }
19306
19432
  } catch {}
19307
19433
  }
@@ -19345,12 +19471,12 @@ import {
19345
19471
  cpSync,
19346
19472
  existsSync as existsSync26,
19347
19473
  mkdirSync as mkdirSync14,
19348
- readFileSync as readFileSync18,
19474
+ readFileSync as readFileSync19,
19349
19475
  rmSync as rmSync2,
19350
19476
  statSync as statSync3,
19351
19477
  writeFileSync as writeFileSync11
19352
19478
  } from "fs";
19353
- import { basename as basename10, dirname as dirname20, extname as extname8, join as join35, relative as relative14, resolve as resolve29 } from "path";
19479
+ import { basename as basename11, dirname as dirname20, extname as extname8, join as join36, relative as relative15, resolve as resolve29 } from "path";
19354
19480
  import { cwd, env as env3, exit } from "process";
19355
19481
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
19356
19482
  var isDev2, isBuildTraceEnabled = () => {
@@ -19428,8 +19554,8 @@ var isDev2, isBuildTraceEnabled = () => {
19428
19554
  mkdirSync14(htmxDestDir, { recursive: true });
19429
19555
  const glob = new Glob8("htmx*.min.js");
19430
19556
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
19431
- const src = join35(htmxDir, relPath);
19432
- const dest = join35(htmxDestDir, "htmx.min.js");
19557
+ const src = join36(htmxDir, relPath);
19558
+ const dest = join36(htmxDestDir, "htmx.min.js");
19433
19559
  copyFileSync2(src, dest);
19434
19560
  return;
19435
19561
  }
@@ -19457,7 +19583,7 @@ var isDev2, isBuildTraceEnabled = () => {
19457
19583
  globalThis.__absoluteVersion = pkg.version;
19458
19584
  };
19459
19585
  await resolveCandidate(candidates);
19460
- }, SKIP_DIRS3, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
19586
+ }, SKIP_DIRS4, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
19461
19587
  const absPath = resolve29(file5, "..", relPath);
19462
19588
  try {
19463
19589
  statSync3(absPath);
@@ -19473,7 +19599,7 @@ var isDev2, isBuildTraceEnabled = () => {
19473
19599
  addWorkerPathIfExists(file5, relPath, workerPaths);
19474
19600
  }
19475
19601
  }, collectWorkerPathsFromFile = (file5, patterns, workerPaths) => {
19476
- const content = readFileSync18(file5, "utf-8");
19602
+ const content = readFileSync19(file5, "utf-8");
19477
19603
  for (const pattern of patterns) {
19478
19604
  collectWorkerPathsFromContent(content, pattern, file5, workerPaths);
19479
19605
  }
@@ -19482,7 +19608,7 @@ var isDev2, isBuildTraceEnabled = () => {
19482
19608
  for await (const file5 of glob.scan({ absolute: true, cwd: dir })) {
19483
19609
  const relToDir = file5.slice(dir.length + 1);
19484
19610
  const [firstSegment] = relToDir.split("/");
19485
- if (firstSegment && SKIP_DIRS3.has(firstSegment))
19611
+ if (firstSegment && SKIP_DIRS4.has(firstSegment))
19486
19612
  continue;
19487
19613
  collectWorkerPathsFromFile(file5, patterns, workerPaths);
19488
19614
  }
@@ -19504,7 +19630,7 @@ var isDev2, isBuildTraceEnabled = () => {
19504
19630
  vuePagesPath
19505
19631
  }) => {
19506
19632
  const { readdirSync: readDir } = await import("fs");
19507
- const devIndexDir = join35(buildPath, "_src_indexes");
19633
+ const devIndexDir = join36(buildPath, "_src_indexes");
19508
19634
  mkdirSync14(devIndexDir, { recursive: true });
19509
19635
  if (reactIndexesPath && reactPagesPath) {
19510
19636
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
@@ -19520,37 +19646,37 @@ var isDev2, isBuildTraceEnabled = () => {
19520
19646
  return;
19521
19647
  }
19522
19648
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
19523
- const pagesRel = relative14(process.cwd(), resolve29(reactPagesPath)).replace(/\\/g, "/");
19649
+ const pagesRel = relative15(process.cwd(), resolve29(reactPagesPath)).replace(/\\/g, "/");
19524
19650
  for (const file5 of indexFiles) {
19525
- let content = readFileSync18(join35(reactIndexesPath, file5), "utf-8");
19651
+ let content = readFileSync19(join36(reactIndexesPath, file5), "utf-8");
19526
19652
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
19527
- writeFileSync11(join35(devIndexDir, file5), content);
19653
+ writeFileSync11(join36(devIndexDir, file5), content);
19528
19654
  }
19529
19655
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
19530
- const svelteIndexDir = join35(getFrameworkGeneratedDir("svelte"), "indexes");
19656
+ const svelteIndexDir = join36(getFrameworkGeneratedDir("svelte"), "indexes");
19531
19657
  const sveltePageEntries = svelteEntries.filter((file5) => resolve29(file5).startsWith(resolve29(sveltePagesPath)));
19532
19658
  for (const entry of sveltePageEntries) {
19533
- const name = basename10(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19534
- const indexFile = join35(svelteIndexDir, "pages", `${name}.js`);
19659
+ const name = basename11(entry).replace(/\.svelte(\.(ts|js))?$/, "");
19660
+ const indexFile = join36(svelteIndexDir, "pages", `${name}.js`);
19535
19661
  if (!existsSync26(indexFile))
19536
19662
  continue;
19537
- let content = readFileSync18(indexFile, "utf-8");
19538
- const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19663
+ let content = readFileSync19(indexFile, "utf-8");
19664
+ const srcRel = relative15(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19539
19665
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
19540
- writeFileSync11(join35(devIndexDir, `${name}.svelte.js`), content);
19666
+ writeFileSync11(join36(devIndexDir, `${name}.svelte.js`), content);
19541
19667
  }
19542
19668
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
19543
- const vueIndexDir = join35(getFrameworkGeneratedDir("vue"), "indexes");
19669
+ const vueIndexDir = join36(getFrameworkGeneratedDir("vue"), "indexes");
19544
19670
  const vuePageEntries = vueEntries.filter((file5) => resolve29(file5).startsWith(resolve29(vuePagesPath)));
19545
19671
  for (const entry of vuePageEntries) {
19546
- const name = basename10(entry, ".vue");
19547
- const indexFile = join35(vueIndexDir, `${name}.js`);
19672
+ const name = basename11(entry, ".vue");
19673
+ const indexFile = join36(vueIndexDir, `${name}.js`);
19548
19674
  if (!existsSync26(indexFile))
19549
19675
  continue;
19550
- let content = readFileSync18(indexFile, "utf-8");
19551
- const srcRel = relative14(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19676
+ let content = readFileSync19(indexFile, "utf-8");
19677
+ const srcRel = relative15(process.cwd(), resolve29(entry)).replace(/\\/g, "/");
19552
19678
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
19553
- writeFileSync11(join35(devIndexDir, `${name}.vue.js`), content);
19679
+ writeFileSync11(join36(devIndexDir, `${name}.vue.js`), content);
19554
19680
  }
19555
19681
  }, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
19556
19682
  const varIdx = content.indexOf(`var ${firstUseName} =`);
@@ -19598,7 +19724,7 @@ var isDev2, isBuildTraceEnabled = () => {
19598
19724
  }
19599
19725
  return result;
19600
19726
  }, VUE_HMR_RUNTIME, injectVueComposableTracking = (outputPath, projectRoot) => {
19601
- let content = readFileSync18(outputPath, "utf-8");
19727
+ let content = readFileSync19(outputPath, "utf-8");
19602
19728
  const usePattern = /^var\s+(use[A-Z]\w*)\s*=/gm;
19603
19729
  const useNames = [];
19604
19730
  let match;
@@ -19623,8 +19749,8 @@ ${content.slice(firstUseIdx)}`;
19623
19749
  }, buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
19624
19750
  const urlFileMap = new Map;
19625
19751
  for (const srcPath of urlReferencedFiles) {
19626
- const rel = relative14(projectRoot, srcPath).replace(/\\/g, "/");
19627
- const name = basename10(srcPath);
19752
+ const rel = relative15(projectRoot, srcPath).replace(/\\/g, "/");
19753
+ const name = basename11(srcPath);
19628
19754
  const mtime = Math.round(statSync3(srcPath).mtimeMs);
19629
19755
  const url = `/@src/${rel}?v=${mtime}`;
19630
19756
  urlFileMap.set(name, url);
@@ -19634,11 +19760,11 @@ ${content.slice(firstUseIdx)}`;
19634
19760
  }, buildProdUrlFileMap = (urlReferencedFiles, buildPath, nonReactClientOutputs) => {
19635
19761
  const urlFileMap = new Map;
19636
19762
  for (const srcPath of urlReferencedFiles) {
19637
- const srcBase = basename10(srcPath).replace(/\.[^.]+$/, "");
19638
- const output = nonReactClientOutputs.find((artifact) => basename10(artifact.path).startsWith(`${srcBase}.`));
19763
+ const srcBase = basename11(srcPath).replace(/\.[^.]+$/, "");
19764
+ const output = nonReactClientOutputs.find((artifact) => basename11(artifact.path).startsWith(`${srcBase}.`));
19639
19765
  if (!output)
19640
19766
  continue;
19641
- urlFileMap.set(basename10(srcPath), `/${relative14(buildPath, output.path).replace(/\\/g, "/")}`);
19767
+ urlFileMap.set(basename11(srcPath), `/${relative15(buildPath, output.path).replace(/\\/g, "/")}`);
19642
19768
  }
19643
19769
  return urlFileMap;
19644
19770
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -19648,10 +19774,10 @@ ${content.slice(firstUseIdx)}`;
19648
19774
  }, rewriteUrlReferences = (outputPaths, urlFileMap) => {
19649
19775
  const urlPattern = /new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g;
19650
19776
  for (const outputPath of outputPaths) {
19651
- let content = readFileSync18(outputPath, "utf-8");
19777
+ let content = readFileSync19(outputPath, "utf-8");
19652
19778
  let changed = false;
19653
19779
  content = content.replace(urlPattern, (_match, relPath) => {
19654
- const targetName = basename10(relPath);
19780
+ const targetName = basename11(relPath);
19655
19781
  const resolvedPath = urlFileMap.get(targetName);
19656
19782
  if (!resolvedPath)
19657
19783
  return _match;
@@ -19773,10 +19899,10 @@ ${content.slice(firstUseIdx)}`;
19773
19899
  restoreTracePhase();
19774
19900
  return;
19775
19901
  }
19776
- const traceDir = join35(buildPath2, ".absolute-trace");
19902
+ const traceDir = join36(buildPath2, ".absolute-trace");
19777
19903
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
19778
19904
  mkdirSync14(traceDir, { recursive: true });
19779
- writeFileSync11(join35(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
19905
+ writeFileSync11(join36(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
19780
19906
  events: traceEvents,
19781
19907
  frameworks: traceFrameworkNames,
19782
19908
  generatedAt: new Date().toISOString(),
@@ -19807,15 +19933,15 @@ ${content.slice(firstUseIdx)}`;
19807
19933
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
19808
19934
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
19809
19935
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
19810
- const reactIndexesPath = reactDir && join35(getFrameworkGeneratedDir("react"), "indexes");
19811
- const reactPagesPath = reactDir && join35(reactDir, "pages");
19812
- const htmlPagesPath = htmlDir && join35(htmlDir, "pages");
19813
- const htmlScriptsPath = htmlDir && join35(htmlDir, "scripts");
19814
- const sveltePagesPath = svelteDir && join35(svelteDir, "pages");
19815
- const vuePagesPath = vueDir && join35(vueDir, "pages");
19816
- const htmxPagesPath = htmxDir && join35(htmxDir, "pages");
19817
- const angularPagesPath = angularDir && join35(angularDir, "pages");
19818
- const emberPagesPath = emberDir && join35(emberDir, "pages");
19936
+ const reactIndexesPath = reactDir && join36(getFrameworkGeneratedDir("react"), "indexes");
19937
+ const reactPagesPath = reactDir && join36(reactDir, "pages");
19938
+ const htmlPagesPath = htmlDir && join36(htmlDir, "pages");
19939
+ const htmlScriptsPath = htmlDir && join36(htmlDir, "scripts");
19940
+ const sveltePagesPath = svelteDir && join36(svelteDir, "pages");
19941
+ const vuePagesPath = vueDir && join36(vueDir, "pages");
19942
+ const htmxPagesPath = htmxDir && join36(htmxDir, "pages");
19943
+ const angularPagesPath = angularDir && join36(angularDir, "pages");
19944
+ const emberPagesPath = emberDir && join36(emberDir, "pages");
19819
19945
  const frontends = [
19820
19946
  reactDir,
19821
19947
  htmlDir,
@@ -19874,8 +20000,8 @@ ${content.slice(firstUseIdx)}`;
19874
20000
  const [firstEntry] = serverDirMap;
19875
20001
  if (!firstEntry)
19876
20002
  throw new Error("Expected at least one server directory entry");
19877
- serverRoot = join35(firstEntry.dir, firstEntry.subdir);
19878
- serverOutDir = join35(buildPath, basename10(firstEntry.dir));
20003
+ serverRoot = join36(firstEntry.dir, firstEntry.subdir);
20004
+ serverOutDir = join36(buildPath, basename11(firstEntry.dir));
19879
20005
  } else if (serverDirMap.length > 1) {
19880
20006
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
19881
20007
  serverOutDir = buildPath;
@@ -19903,7 +20029,7 @@ ${content.slice(firstUseIdx)}`;
19903
20029
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
19904
20030
  }
19905
20031
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
19906
- await tracePhase("assets/copy", () => cpSync(assetsPath, join35(buildPath, "assets"), {
20032
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join36(buildPath, "assets"), {
19907
20033
  force: true,
19908
20034
  recursive: true
19909
20035
  }));
@@ -20013,11 +20139,11 @@ ${content.slice(firstUseIdx)}`;
20013
20139
  }
20014
20140
  }
20015
20141
  if (htmlDefaults.error || htmlDefaults.notFound || htmlDefaults.loading || Object.keys(htmlPages).length > 0) {
20016
- const htmlConventionsOutDir = join35(buildPath, "conventions", "html");
20142
+ const htmlConventionsOutDir = join36(buildPath, "conventions", "html");
20017
20143
  mkdirSync14(htmlConventionsOutDir, { recursive: true });
20018
20144
  const htmlPathRemap = new Map;
20019
20145
  for (const sourcePath of htmlConventionSources) {
20020
- const dest = join35(htmlConventionsOutDir, basename10(sourcePath));
20146
+ const dest = join36(htmlConventionsOutDir, basename11(sourcePath));
20021
20147
  cpSync(sourcePath, dest, { force: true });
20022
20148
  htmlPathRemap.set(sourcePath, dest);
20023
20149
  }
@@ -20059,8 +20185,8 @@ ${content.slice(firstUseIdx)}`;
20059
20185
  const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/html/") && (f2.endsWith(".html") || isStylePath(f2)));
20060
20186
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
20061
20187
  if (entry.startsWith(resolve29(reactIndexesPath))) {
20062
- const pageName = basename10(entry, ".tsx");
20063
- return join35(reactPagesPath, `${pageName}.tsx`);
20188
+ const pageName = basename11(entry, ".tsx");
20189
+ return join36(reactPagesPath, `${pageName}.tsx`);
20064
20190
  }
20065
20191
  return null;
20066
20192
  }) : allReactEntries;
@@ -20093,10 +20219,10 @@ ${content.slice(firstUseIdx)}`;
20093
20219
  const shouldCompileIslandSvelte = svelteDir && islandSvelteSources.length > 0;
20094
20220
  const shouldCompileIslandVue = vueDir && islandVueSources.length > 0;
20095
20221
  const shouldCompileIslandAngular = angularDir && islandAngularSources.length > 0;
20096
- if (shouldCompileAngular) {
20222
+ if (shouldCompileAngular && angularDir) {
20097
20223
  await tracePhase("scan/angular-handlers", async () => {
20098
20224
  const { runAngularHandlerScan: runAngularHandlerScan2 } = await Promise.resolve().then(() => (init_runAngularHandlerScan(), exports_runAngularHandlerScan));
20099
- runAngularHandlerScan2(projectRoot);
20225
+ runAngularHandlerScan2(projectRoot, angularDir);
20100
20226
  });
20101
20227
  }
20102
20228
  const [
@@ -20126,14 +20252,14 @@ ${content.slice(firstUseIdx)}`;
20126
20252
  try {
20127
20253
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
20128
20254
  const { readdir: readdir4 } = await import("fs/promises");
20129
- const { join: join36 } = await import("path");
20255
+ const { join: join37 } = await import("path");
20130
20256
  const walk = async (dir) => {
20131
20257
  const entries = await readdir4(dir, {
20132
20258
  withFileTypes: true
20133
20259
  });
20134
20260
  const out = [];
20135
20261
  for (const entry of entries) {
20136
- const full = join36(dir, entry.name);
20262
+ const full = join37(dir, entry.name);
20137
20263
  if (entry.isDirectory()) {
20138
20264
  out.push(...await walk(full));
20139
20265
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -20198,7 +20324,7 @@ ${content.slice(firstUseIdx)}`;
20198
20324
  const compileReactConventions = async () => {
20199
20325
  if (reactConventionSources.length === 0)
20200
20326
  return emptyStringArray;
20201
- const destDir = join35(buildPath, "conventions", "react");
20327
+ const destDir = join36(buildPath, "conventions", "react");
20202
20328
  rmSync2(destDir, { force: true, recursive: true });
20203
20329
  mkdirSync14(destDir, { recursive: true });
20204
20330
  const destPaths = [];
@@ -20242,7 +20368,7 @@ ${content.slice(firstUseIdx)}`;
20242
20368
  angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), exports_compileAngular)).then((mod) => mod.compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
20243
20369
  ]);
20244
20370
  const bundleConventionFiles = async (framework, compiledPaths) => {
20245
- const destDir = join35(buildPath, "conventions", framework);
20371
+ const destDir = join36(buildPath, "conventions", framework);
20246
20372
  rmSync2(destDir, { force: true, recursive: true });
20247
20373
  mkdirSync14(destDir, { recursive: true });
20248
20374
  const destPaths = [];
@@ -20250,7 +20376,7 @@ ${content.slice(firstUseIdx)}`;
20250
20376
  const compiledPath = compiledPaths[idx];
20251
20377
  if (!compiledPath)
20252
20378
  continue;
20253
- const name = basename10(compiledPath).replace(/\.[^.]+$/, "");
20379
+ const name = basename11(compiledPath).replace(/\.[^.]+$/, "");
20254
20380
  const result = await bunBuild7({
20255
20381
  entrypoints: [compiledPath],
20256
20382
  format: "esm",
@@ -20316,7 +20442,7 @@ ${content.slice(firstUseIdx)}`;
20316
20442
  }
20317
20443
  })) : {
20318
20444
  entries: [],
20319
- generatedRoot: join35(buildPath, "_island_entries")
20445
+ generatedRoot: join36(buildPath, "_island_entries")
20320
20446
  };
20321
20447
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
20322
20448
  if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -20352,7 +20478,7 @@ ${content.slice(firstUseIdx)}`;
20352
20478
  return {};
20353
20479
  }
20354
20480
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
20355
- const refreshEntry = join35(reactIndexesPath, "_refresh.tsx");
20481
+ const refreshEntry = join36(reactIndexesPath, "_refresh.tsx");
20356
20482
  if (!reactClientEntryPoints.includes(refreshEntry))
20357
20483
  reactClientEntryPoints.push(refreshEntry);
20358
20484
  }
@@ -20454,19 +20580,19 @@ ${content.slice(firstUseIdx)}`;
20454
20580
  throw: false
20455
20581
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
20456
20582
  if (reactDir && reactClientEntryPoints.length > 0) {
20457
- rmSync2(join35(buildPath, "react", "generated", "indexes"), {
20583
+ rmSync2(join36(buildPath, "react", "generated", "indexes"), {
20458
20584
  force: true,
20459
20585
  recursive: true
20460
20586
  });
20461
20587
  }
20462
20588
  if (angularDir && angularClientPaths.length > 0) {
20463
- rmSync2(join35(buildPath, "angular", "indexes"), {
20589
+ rmSync2(join36(buildPath, "angular", "indexes"), {
20464
20590
  force: true,
20465
20591
  recursive: true
20466
20592
  });
20467
20593
  }
20468
20594
  if (islandClientEntryPoints.length > 0) {
20469
- rmSync2(join35(buildPath, "islands"), {
20595
+ rmSync2(join36(buildPath, "islands"), {
20470
20596
  force: true,
20471
20597
  recursive: true
20472
20598
  });
@@ -20555,7 +20681,7 @@ ${content.slice(firstUseIdx)}`;
20555
20681
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
20556
20682
  entrypoints: globalCssEntries,
20557
20683
  naming: `[dir]/[name].[hash].[ext]`,
20558
- outdir: stylesDir ? join35(buildPath, basename10(stylesDir)) : buildPath,
20684
+ outdir: stylesDir ? join36(buildPath, basename11(stylesDir)) : buildPath,
20559
20685
  plugins: [stylePreprocessorPlugin2],
20560
20686
  root: stylesDir || clientRoot,
20561
20687
  target: "browser",
@@ -20564,7 +20690,7 @@ ${content.slice(firstUseIdx)}`;
20564
20690
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
20565
20691
  entrypoints: vueCssPaths,
20566
20692
  naming: `[name].[hash].[ext]`,
20567
- outdir: join35(buildPath, assetsPath ? basename10(assetsPath) : "assets", "css"),
20693
+ outdir: join36(buildPath, assetsPath ? basename11(assetsPath) : "assets", "css"),
20568
20694
  target: "browser",
20569
20695
  throw: false
20570
20696
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -20641,7 +20767,7 @@ ${content.slice(firstUseIdx)}`;
20641
20767
  const fileDir = dirname20(artifact.path);
20642
20768
  const relativePaths = {};
20643
20769
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths2)) {
20644
- const rel = relative14(fileDir, absolute);
20770
+ const rel = relative15(fileDir, absolute);
20645
20771
  relativePaths[specifier] = rel.startsWith(".") ? rel : `./${rel}`;
20646
20772
  }
20647
20773
  return relativePaths;
@@ -20697,20 +20823,20 @@ ${content.slice(firstUseIdx)}`;
20697
20823
  for (const artifact of serverOutputs) {
20698
20824
  if (extname8(artifact.path) !== ".js")
20699
20825
  continue;
20700
- const fileWithHash = basename10(artifact.path);
20826
+ const fileWithHash = basename11(artifact.path);
20701
20827
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
20702
20828
  if (!baseName)
20703
20829
  continue;
20704
20830
  manifest[toPascal(baseName)] = artifact.path;
20705
20831
  }
20706
20832
  for (const serverPath of emberServerPaths) {
20707
- const fileBase = basename10(serverPath, ".js");
20833
+ const fileBase = basename11(serverPath, ".js");
20708
20834
  manifest[toPascal(fileBase)] = serverPath;
20709
20835
  }
20710
20836
  if (skipAngularClientBundle) {
20711
20837
  for (const clientPath of angularClientPaths) {
20712
- const fileBase = basename10(clientPath, ".js");
20713
- const relFromCwd = relative14(projectRoot, clientPath).replace(/\\/g, "/");
20838
+ const fileBase = basename11(clientPath, ".js");
20839
+ const relFromCwd = relative15(projectRoot, clientPath).replace(/\\/g, "/");
20714
20840
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
20715
20841
  }
20716
20842
  }
@@ -20724,7 +20850,7 @@ ${content.slice(firstUseIdx)}`;
20724
20850
  const injectHMRIntoHTMLFile = (filePath, framework) => {
20725
20851
  if (!hmrClientBundle)
20726
20852
  return;
20727
- let html = readFileSync18(filePath, "utf-8");
20853
+ let html = readFileSync19(filePath, "utf-8");
20728
20854
  if (html.includes("data-hmr-client"))
20729
20855
  return;
20730
20856
  const tag = `<script>window.__HMR_FRAMEWORK__="${framework}";</script><script data-hmr-client>${hmrClientBundle}</script>`;
@@ -20735,7 +20861,7 @@ ${content.slice(firstUseIdx)}`;
20735
20861
  const processHtmlPages = async () => {
20736
20862
  if (!(htmlDir && htmlPagesPath))
20737
20863
  return;
20738
- const outputHtmlPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename10(htmlDir), "pages");
20864
+ const outputHtmlPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename11(htmlDir), "pages");
20739
20865
  mkdirSync14(outputHtmlPages, { recursive: true });
20740
20866
  cpSync(htmlPagesPath, outputHtmlPages, {
20741
20867
  force: true,
@@ -20750,7 +20876,7 @@ ${content.slice(firstUseIdx)}`;
20750
20876
  for (const htmlFile of htmlPageFiles) {
20751
20877
  if (hmr)
20752
20878
  injectHMRIntoHTMLFile(htmlFile, "html");
20753
- const fileName = basename10(htmlFile, ".html");
20879
+ const fileName = basename11(htmlFile, ".html");
20754
20880
  if (manifest[fileName] && manifest[fileName] !== htmlFile) {
20755
20881
  warnManifestKeyCollision(fileName, manifest[fileName], htmlFile);
20756
20882
  }
@@ -20760,14 +20886,14 @@ ${content.slice(firstUseIdx)}`;
20760
20886
  const processHtmxPages = async () => {
20761
20887
  if (!(htmxDir && htmxPagesPath))
20762
20888
  return;
20763
- const outputHtmxPages = isSingle ? join35(buildPath, "pages") : join35(buildPath, basename10(htmxDir), "pages");
20889
+ const outputHtmxPages = isSingle ? join36(buildPath, "pages") : join36(buildPath, basename11(htmxDir), "pages");
20764
20890
  mkdirSync14(outputHtmxPages, { recursive: true });
20765
20891
  cpSync(htmxPagesPath, outputHtmxPages, {
20766
20892
  force: true,
20767
20893
  recursive: true
20768
20894
  });
20769
20895
  if (shouldCopyHtmx) {
20770
- const htmxDestDir = isSingle ? buildPath : join35(buildPath, basename10(htmxDir));
20896
+ const htmxDestDir = isSingle ? buildPath : join36(buildPath, basename11(htmxDir));
20771
20897
  copyHtmxVendor(htmxDir, htmxDestDir);
20772
20898
  }
20773
20899
  if (shouldUpdateHtmxAssetPaths) {
@@ -20779,7 +20905,7 @@ ${content.slice(firstUseIdx)}`;
20779
20905
  for (const htmxFile of htmxPageFiles) {
20780
20906
  if (hmr)
20781
20907
  injectHMRIntoHTMLFile(htmxFile, "htmx");
20782
- const fileName = basename10(htmxFile, ".html");
20908
+ const fileName = basename11(htmxFile, ".html");
20783
20909
  if (manifest[fileName] && manifest[fileName] !== htmxFile) {
20784
20910
  warnManifestKeyCollision(fileName, manifest[fileName], htmxFile);
20785
20911
  }
@@ -20832,9 +20958,9 @@ ${content.slice(firstUseIdx)}`;
20832
20958
  writeBuildTrace(buildPath);
20833
20959
  return { conventions: conventionsMap, manifest };
20834
20960
  }
20835
- writeFileSync11(join35(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
20961
+ writeFileSync11(join36(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
20836
20962
  if (Object.keys(conventionsMap).length > 0) {
20837
- writeFileSync11(join35(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
20963
+ writeFileSync11(join36(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
20838
20964
  }
20839
20965
  writeBuildTrace(buildPath);
20840
20966
  if (mode === "production") {
@@ -20897,7 +21023,7 @@ var init_build = __esm(() => {
20897
21023
  init_logger();
20898
21024
  init_validateSafePath();
20899
21025
  isDev2 = env3.NODE_ENV === "development";
20900
- SKIP_DIRS3 = new Set([
21026
+ SKIP_DIRS4 = new Set([
20901
21027
  "build",
20902
21028
  "node_modules",
20903
21029
  ".absolutejs",
@@ -20956,7 +21082,7 @@ var init_build = __esm(() => {
20956
21082
 
20957
21083
  // src/build/buildEmberVendor.ts
20958
21084
  import { mkdirSync as mkdirSync15, existsSync as existsSync27 } from "fs";
20959
- import { join as join36 } from "path";
21085
+ import { join as join37 } from "path";
20960
21086
  import { rm as rm9 } from "fs/promises";
20961
21087
  var {build: bunBuild8 } = globalThis.Bun;
20962
21088
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -21008,7 +21134,7 @@ export const importSync = (specifier) => {
21008
21134
  if (standaloneSpecifiers.has(specifier)) {
21009
21135
  return { resolveTo: specifier, specifier };
21010
21136
  }
21011
- const emberInternalPath = join36(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21137
+ const emberInternalPath = join37(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
21012
21138
  if (!existsSync27(emberInternalPath)) {
21013
21139
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
21014
21140
  }
@@ -21040,7 +21166,7 @@ export const importSync = (specifier) => {
21040
21166
  if (standalonePackages.has(args.path)) {
21041
21167
  return;
21042
21168
  }
21043
- const internal = join36(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21169
+ const internal = join37(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
21044
21170
  if (existsSync27(internal)) {
21045
21171
  return { path: internal };
21046
21172
  }
@@ -21048,16 +21174,16 @@ export const importSync = (specifier) => {
21048
21174
  });
21049
21175
  }
21050
21176
  }), buildEmberVendor = async (buildDir, cwd2 = process.cwd()) => {
21051
- const vendorDir = join36(buildDir, "ember", "vendor");
21177
+ const vendorDir = join37(buildDir, "ember", "vendor");
21052
21178
  mkdirSync15(vendorDir, { recursive: true });
21053
- const tmpDir = join36(buildDir, "_ember_vendor_tmp");
21179
+ const tmpDir = join37(buildDir, "_ember_vendor_tmp");
21054
21180
  mkdirSync15(tmpDir, { recursive: true });
21055
- const macrosShimPath = join36(tmpDir, "embroider_macros_shim.js");
21181
+ const macrosShimPath = join37(tmpDir, "embroider_macros_shim.js");
21056
21182
  await Bun.write(macrosShimPath, generateMacrosShim());
21057
21183
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd2));
21058
21184
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
21059
21185
  const safeName = toSafeFileName5(resolution.specifier);
21060
- const entryPath = join36(tmpDir, `${safeName}.js`);
21186
+ const entryPath = join37(tmpDir, `${safeName}.js`);
21061
21187
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
21062
21188
  ` : generateVendorEntrySource2(resolution);
21063
21189
  await Bun.write(entryPath, source);
@@ -21110,7 +21236,7 @@ __export(exports_dependencyGraph, {
21110
21236
  buildInitialDependencyGraph: () => buildInitialDependencyGraph,
21111
21237
  addFileToGraph: () => addFileToGraph
21112
21238
  });
21113
- import { existsSync as existsSync28, readFileSync as readFileSync19 } from "fs";
21239
+ import { existsSync as existsSync28, readFileSync as readFileSync20 } from "fs";
21114
21240
  var {Glob: Glob9 } = globalThis.Bun;
21115
21241
  import { resolve as resolve30 } from "path";
21116
21242
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
@@ -21281,15 +21407,15 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
21281
21407
  const lowerPath = filePath.toLowerCase();
21282
21408
  const isSvelteOrVue = lowerPath.endsWith(".svelte") || lowerPath.endsWith(".vue");
21283
21409
  if (loader === "html") {
21284
- const content = readFileSync19(filePath, "utf-8");
21410
+ const content = readFileSync20(filePath, "utf-8");
21285
21411
  return extractHtmlDependencies(filePath, content);
21286
21412
  }
21287
21413
  if (loader === "tsx" || loader === "js") {
21288
- const content = readFileSync19(filePath, "utf-8");
21414
+ const content = readFileSync20(filePath, "utf-8");
21289
21415
  return extractJsDependencies(filePath, content, loader);
21290
21416
  }
21291
21417
  if (isSvelteOrVue) {
21292
- const content = readFileSync19(filePath, "utf-8");
21418
+ const content = readFileSync20(filePath, "utf-8");
21293
21419
  return extractSvelteVueDependencies(filePath, content);
21294
21420
  }
21295
21421
  return [];
@@ -21432,7 +21558,7 @@ var init_clientManager = __esm(() => {
21432
21558
  });
21433
21559
 
21434
21560
  // src/dev/pathUtils.ts
21435
- import { existsSync as existsSync29, readdirSync as readdirSync3, readFileSync as readFileSync20 } from "fs";
21561
+ import { existsSync as existsSync29, readdirSync as readdirSync4, readFileSync as readFileSync21 } from "fs";
21436
21562
  import { dirname as dirname21, resolve as resolve32 } from "path";
21437
21563
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21438
21564
  if (shouldIgnorePath(filePath, resolved)) {
@@ -21514,7 +21640,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21514
21640
  const walk = (dir) => {
21515
21641
  let entries;
21516
21642
  try {
21517
- entries = readdirSync3(dir, { withFileTypes: true });
21643
+ entries = readdirSync4(dir, { withFileTypes: true });
21518
21644
  } catch {
21519
21645
  return;
21520
21646
  }
@@ -21532,7 +21658,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21532
21658
  }
21533
21659
  let source;
21534
21660
  try {
21535
- source = readFileSync20(full, "utf8");
21661
+ source = readFileSync21(full, "utf8");
21536
21662
  } catch {
21537
21663
  continue;
21538
21664
  }
@@ -21610,8 +21736,8 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
21610
21736
  roots.push(abs);
21611
21737
  }
21612
21738
  try {
21613
- const { readdirSync: readdirSync4 } = __require("fs");
21614
- const entries = readdirSync4(cwd2, { withFileTypes: true });
21739
+ const { readdirSync: readdirSync5 } = __require("fs");
21740
+ const entries = readdirSync5(cwd2, { withFileTypes: true });
21615
21741
  for (const entry of entries) {
21616
21742
  if (!entry.isDirectory())
21617
21743
  continue;
@@ -21691,8 +21817,8 @@ var init_pathUtils = __esm(() => {
21691
21817
 
21692
21818
  // src/dev/fileWatcher.ts
21693
21819
  import { watch } from "fs";
21694
- import { existsSync as existsSync30, readdirSync as readdirSync4, statSync as statSync4 } from "fs";
21695
- import { dirname as dirname22, join as join37, resolve as resolve33 } from "path";
21820
+ import { existsSync as existsSync30, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
21821
+ import { dirname as dirname22, join as join38, resolve as resolve33 } from "path";
21696
21822
  var safeRemoveFromGraph = (graph, fullPath) => {
21697
21823
  try {
21698
21824
  removeFileFromGraph(graph, fullPath);
@@ -21717,7 +21843,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21717
21843
  const atomicRecoveryScan = (eventDir) => {
21718
21844
  let entries;
21719
21845
  try {
21720
- entries = readdirSync4(eventDir);
21846
+ entries = readdirSync5(eventDir);
21721
21847
  } catch {
21722
21848
  return;
21723
21849
  }
@@ -21725,7 +21851,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21725
21851
  for (const name of entries) {
21726
21852
  if (shouldSkipFilename(name, isStylesDir))
21727
21853
  continue;
21728
- const child = join37(eventDir, name).replace(/\\/g, "/");
21854
+ const child = join38(eventDir, name).replace(/\\/g, "/");
21729
21855
  let st2;
21730
21856
  try {
21731
21857
  st2 = statSync4(child);
@@ -21750,12 +21876,12 @@ var safeRemoveFromGraph = (graph, fullPath) => {
21750
21876
  return;
21751
21877
  if (shouldSkipFilename(filename, isStylesDir)) {
21752
21878
  if (event === "rename") {
21753
- const eventDir = dirname22(join37(absolutePath, filename)).replace(/\\/g, "/");
21879
+ const eventDir = dirname22(join38(absolutePath, filename)).replace(/\\/g, "/");
21754
21880
  atomicRecoveryScan(eventDir);
21755
21881
  }
21756
21882
  return;
21757
21883
  }
21758
- const fullPath = join37(absolutePath, filename).replace(/\\/g, "/");
21884
+ const fullPath = join38(absolutePath, filename).replace(/\\/g, "/");
21759
21885
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
21760
21886
  return;
21761
21887
  }
@@ -21907,10 +22033,10 @@ var init_assetStore = __esm(() => {
21907
22033
  });
21908
22034
 
21909
22035
  // src/dev/fileHashTracker.ts
21910
- import { readFileSync as readFileSync21 } from "fs";
22036
+ import { readFileSync as readFileSync22 } from "fs";
21911
22037
  var computeFileHash = (filePath) => {
21912
22038
  try {
21913
- const fileContent = readFileSync21(filePath);
22039
+ const fileContent = readFileSync22(filePath);
21914
22040
  return Number(Bun.hash(fileContent));
21915
22041
  } catch {
21916
22042
  return UNFOUND_INDEX;
@@ -22017,7 +22143,7 @@ var classifyComponent = (filePath) => {
22017
22143
  var init_reactComponentClassifier = () => {};
22018
22144
 
22019
22145
  // src/dev/moduleMapper.ts
22020
- import { basename as basename11, resolve as resolve36 } from "path";
22146
+ import { basename as basename12, resolve as resolve36 } from "path";
22021
22147
  var buildModulePaths = (moduleKeys, manifest) => {
22022
22148
  const modulePaths = {};
22023
22149
  moduleKeys.forEach((key) => {
@@ -22064,7 +22190,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
22064
22190
  return grouped;
22065
22191
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
22066
22192
  const normalizedFile = resolve36(sourceFile);
22067
- const fileName = basename11(normalizedFile);
22193
+ const fileName = basename12(normalizedFile);
22068
22194
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
22069
22195
  const pascalName = toPascal(baseName);
22070
22196
  const keys = [];
@@ -22124,15 +22250,15 @@ __export(exports_resolveOwningComponents, {
22124
22250
  resolveDescendantsOfParent: () => resolveDescendantsOfParent,
22125
22251
  invalidateResourceIndex: () => invalidateResourceIndex
22126
22252
  });
22127
- import { readdirSync as readdirSync5, readFileSync as readFileSync22, statSync as statSync5 } from "fs";
22128
- import { dirname as dirname23, extname as extname9, join as join38, resolve as resolve37 } from "path";
22129
- import ts12 from "typescript";
22253
+ import { readdirSync as readdirSync6, readFileSync as readFileSync23, statSync as statSync5 } from "fs";
22254
+ import { dirname as dirname23, extname as extname9, join as join39, resolve as resolve37 } from "path";
22255
+ import ts13 from "typescript";
22130
22256
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
22131
22257
  const out = [];
22132
22258
  const visit = (dir) => {
22133
22259
  let entries;
22134
22260
  try {
22135
- entries = readdirSync5(dir, { withFileTypes: true });
22261
+ entries = readdirSync6(dir, { withFileTypes: true });
22136
22262
  } catch {
22137
22263
  return;
22138
22264
  }
@@ -22140,7 +22266,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22140
22266
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
22141
22267
  continue;
22142
22268
  }
22143
- const full = join38(dir, entry.name);
22269
+ const full = join39(dir, entry.name);
22144
22270
  if (entry.isDirectory()) {
22145
22271
  visit(full);
22146
22272
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -22152,13 +22278,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22152
22278
  return out;
22153
22279
  }, getStringPropertyValue = (obj, name) => {
22154
22280
  for (const prop of obj.properties) {
22155
- if (!ts12.isPropertyAssignment(prop))
22281
+ if (!ts13.isPropertyAssignment(prop))
22156
22282
  continue;
22157
- const propName = ts12.isIdentifier(prop.name) ? prop.name.text : ts12.isStringLiteral(prop.name) ? prop.name.text : null;
22283
+ const propName = ts13.isIdentifier(prop.name) ? prop.name.text : ts13.isStringLiteral(prop.name) ? prop.name.text : null;
22158
22284
  if (propName !== name)
22159
22285
  continue;
22160
22286
  const init = prop.initializer;
22161
- if (ts12.isStringLiteral(init) || ts12.isNoSubstitutionTemplateLiteral(init)) {
22287
+ if (ts13.isStringLiteral(init) || ts13.isNoSubstitutionTemplateLiteral(init)) {
22162
22288
  return init.text;
22163
22289
  }
22164
22290
  }
@@ -22166,16 +22292,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22166
22292
  }, getStringArrayProperty = (obj, name) => {
22167
22293
  const out = [];
22168
22294
  for (const prop of obj.properties) {
22169
- if (!ts12.isPropertyAssignment(prop))
22295
+ if (!ts13.isPropertyAssignment(prop))
22170
22296
  continue;
22171
- const propName = ts12.isIdentifier(prop.name) ? prop.name.text : ts12.isStringLiteral(prop.name) ? prop.name.text : null;
22297
+ const propName = ts13.isIdentifier(prop.name) ? prop.name.text : ts13.isStringLiteral(prop.name) ? prop.name.text : null;
22172
22298
  if (propName !== name)
22173
22299
  continue;
22174
22300
  const init = prop.initializer;
22175
- if (!ts12.isArrayLiteralExpression(init))
22301
+ if (!ts13.isArrayLiteralExpression(init))
22176
22302
  continue;
22177
22303
  for (const element of init.elements) {
22178
- if (ts12.isStringLiteral(element) || ts12.isNoSubstitutionTemplateLiteral(element)) {
22304
+ if (ts13.isStringLiteral(element) || ts13.isNoSubstitutionTemplateLiteral(element)) {
22179
22305
  out.push(element.text);
22180
22306
  }
22181
22307
  }
@@ -22184,31 +22310,31 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22184
22310
  }, parseDecoratedClasses = (filePath) => {
22185
22311
  let source;
22186
22312
  try {
22187
- source = readFileSync22(filePath, "utf8");
22313
+ source = readFileSync23(filePath, "utf8");
22188
22314
  } catch {
22189
22315
  return [];
22190
22316
  }
22191
- const sourceFile = ts12.createSourceFile(filePath, source, ts12.ScriptTarget.ES2022, true, ts12.ScriptKind.TS);
22317
+ const sourceFile = ts13.createSourceFile(filePath, source, ts13.ScriptTarget.ES2022, true, ts13.ScriptKind.TS);
22192
22318
  const out = [];
22193
22319
  const visit = (node) => {
22194
- if (ts12.isClassDeclaration(node) && node.name) {
22195
- for (const decorator of ts12.getDecorators(node) ?? []) {
22320
+ if (ts13.isClassDeclaration(node) && node.name) {
22321
+ for (const decorator of ts13.getDecorators(node) ?? []) {
22196
22322
  const expr = decorator.expression;
22197
- if (!ts12.isCallExpression(expr))
22323
+ if (!ts13.isCallExpression(expr))
22198
22324
  continue;
22199
22325
  const fn2 = expr.expression;
22200
- if (!ts12.isIdentifier(fn2))
22326
+ if (!ts13.isIdentifier(fn2))
22201
22327
  continue;
22202
22328
  const kind = ENTITY_DECORATORS[fn2.text];
22203
22329
  if (!kind)
22204
22330
  continue;
22205
22331
  let extendsName = null;
22206
22332
  for (const heritage of node.heritageClauses ?? []) {
22207
- if (heritage.token !== ts12.SyntaxKind.ExtendsKeyword) {
22333
+ if (heritage.token !== ts13.SyntaxKind.ExtendsKeyword) {
22208
22334
  continue;
22209
22335
  }
22210
22336
  const first = heritage.types[0];
22211
- if (first && ts12.isIdentifier(first.expression)) {
22337
+ if (first && ts13.isIdentifier(first.expression)) {
22212
22338
  extendsName = first.expression.text;
22213
22339
  }
22214
22340
  break;
@@ -22221,7 +22347,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22221
22347
  extendsName
22222
22348
  };
22223
22349
  const arg = expr.arguments[0];
22224
- if (arg && ts12.isObjectLiteralExpression(arg) && kind === "component") {
22350
+ if (arg && ts13.isObjectLiteralExpression(arg) && kind === "component") {
22225
22351
  const tplUrl = getStringPropertyValue(arg, "templateUrl");
22226
22352
  if (tplUrl)
22227
22353
  entry.templateUrls.push(tplUrl);
@@ -22234,7 +22360,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22234
22360
  break;
22235
22361
  }
22236
22362
  }
22237
- ts12.forEachChild(node, visit);
22363
+ ts13.forEachChild(node, visit);
22238
22364
  };
22239
22365
  visit(sourceFile);
22240
22366
  return out;
@@ -22274,16 +22400,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22274
22400
  }, indexByRoot, resolveParentClassFile = (parentName, childFilePath, angularRoot) => {
22275
22401
  let source;
22276
22402
  try {
22277
- source = readFileSync22(childFilePath, "utf8");
22403
+ source = readFileSync23(childFilePath, "utf8");
22278
22404
  } catch {
22279
22405
  return null;
22280
22406
  }
22281
- const sf = ts12.createSourceFile(childFilePath, source, ts12.ScriptTarget.ES2022, true, ts12.ScriptKind.TS);
22407
+ const sf = ts13.createSourceFile(childFilePath, source, ts13.ScriptTarget.ES2022, true, ts13.ScriptKind.TS);
22282
22408
  const childDir = dirname23(childFilePath);
22283
22409
  for (const stmt of sf.statements) {
22284
- if (!ts12.isImportDeclaration(stmt))
22410
+ if (!ts13.isImportDeclaration(stmt))
22285
22411
  continue;
22286
- if (!ts12.isStringLiteral(stmt.moduleSpecifier))
22412
+ if (!ts13.isStringLiteral(stmt.moduleSpecifier))
22287
22413
  continue;
22288
22414
  const clause = stmt.importClause;
22289
22415
  if (!clause || clause.isTypeOnly)
@@ -22291,7 +22417,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
22291
22417
  let matchesName = false;
22292
22418
  if (clause.name && clause.name.text === parentName)
22293
22419
  matchesName = true;
22294
- if (!matchesName && clause.namedBindings && ts12.isNamedImports(clause.namedBindings)) {
22420
+ if (!matchesName && clause.namedBindings && ts13.isNamedImports(clause.namedBindings)) {
22295
22421
  for (const el of clause.namedBindings.elements) {
22296
22422
  if (el.isTypeOnly)
22297
22423
  continue;
@@ -22512,8 +22638,8 @@ __export(exports_moduleServer, {
22512
22638
  createModuleServer: () => createModuleServer,
22513
22639
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
22514
22640
  });
22515
- import { existsSync as existsSync31, readFileSync as readFileSync23, statSync as statSync6 } from "fs";
22516
- import { basename as basename12, dirname as dirname24, extname as extname10, join as join39, resolve as resolve38, relative as relative15 } from "path";
22641
+ import { existsSync as existsSync31, readFileSync as readFileSync24, statSync as statSync6 } from "fs";
22642
+ import { basename as basename13, dirname as dirname24, extname as extname10, join as join40, resolve as resolve38, relative as relative16 } from "path";
22517
22643
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
22518
22644
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
22519
22645
  const allExports = [];
@@ -22561,11 +22687,11 @@ ${stubs}
22561
22687
  }
22562
22688
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
22563
22689
  const absPath = resolve38(fileDir, relPath);
22564
- const rel = relative15(projectRoot, absPath);
22690
+ const rel = relative16(projectRoot, absPath);
22565
22691
  const extension = extname10(rel);
22566
22692
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
22567
22693
  if (extname10(srcPath) === ".svelte") {
22568
- srcPath = relative15(projectRoot, resolveSvelteModulePath(resolve38(projectRoot, srcPath)));
22694
+ srcPath = relative16(projectRoot, resolveSvelteModulePath(resolve38(projectRoot, srcPath)));
22569
22695
  }
22570
22696
  return srcUrl(srcPath, projectRoot);
22571
22697
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -22577,7 +22703,7 @@ ${stubs}
22577
22703
  "import"
22578
22704
  ]);
22579
22705
  if (fromExports)
22580
- return relative15(projectRoot, fromExports);
22706
+ return relative16(projectRoot, fromExports);
22581
22707
  try {
22582
22708
  const isScoped = specifier.startsWith("@");
22583
22709
  const parts = specifier.split("/");
@@ -22585,19 +22711,19 @@ ${stubs}
22585
22711
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
22586
22712
  if (!subpath) {
22587
22713
  const pkgDir = resolve38(projectRoot, "node_modules", packageName ?? "");
22588
- const pkgJsonPath = join39(pkgDir, "package.json");
22714
+ const pkgJsonPath = join40(pkgDir, "package.json");
22589
22715
  if (existsSync31(pkgJsonPath)) {
22590
- const pkg = JSON.parse(readFileSync23(pkgJsonPath, "utf-8"));
22716
+ const pkg = JSON.parse(readFileSync24(pkgJsonPath, "utf-8"));
22591
22717
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
22592
22718
  if (esmEntry) {
22593
22719
  const resolved = resolve38(pkgDir, esmEntry);
22594
22720
  if (existsSync31(resolved))
22595
- return relative15(projectRoot, resolved);
22721
+ return relative16(projectRoot, resolved);
22596
22722
  }
22597
22723
  }
22598
22724
  }
22599
22725
  } catch {}
22600
- return relative15(projectRoot, Bun.resolveSync(specifier, projectRoot));
22726
+ return relative16(projectRoot, Bun.resolveSync(specifier, projectRoot));
22601
22727
  } catch {
22602
22728
  return;
22603
22729
  }
@@ -22628,22 +22754,22 @@ ${stubs}
22628
22754
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}`);
22629
22755
  const rewriteAbsoluteToSrc = (_match, prefix, absPath, _ext, suffix) => {
22630
22756
  if (absPath.startsWith(projectRoot)) {
22631
- const rel2 = relative15(projectRoot, absPath).replace(/\\/g, "/");
22757
+ const rel2 = relative16(projectRoot, absPath).replace(/\\/g, "/");
22632
22758
  return `${prefix}${srcUrl(rel2, projectRoot)}${suffix}`;
22633
22759
  }
22634
- const rel = relative15(projectRoot, absPath).replace(/\\/g, "/");
22760
+ const rel = relative16(projectRoot, absPath).replace(/\\/g, "/");
22635
22761
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
22636
22762
  };
22637
22763
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
22638
22764
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
22639
22765
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
22640
22766
  const absPath = resolve38(fileDir, relPath);
22641
- const rel = relative15(projectRoot, absPath);
22767
+ const rel = relative16(projectRoot, absPath);
22642
22768
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
22643
22769
  });
22644
22770
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
22645
22771
  const absPath = resolve38(fileDir, relPath);
22646
- const rel = relative15(projectRoot, absPath);
22772
+ const rel = relative16(projectRoot, absPath);
22647
22773
  return `'${srcUrl(rel, projectRoot)}'`;
22648
22774
  });
22649
22775
  return result;
@@ -22688,7 +22814,7 @@ ${code}`;
22688
22814
  reactFastRefreshWarningEmitted = true;
22689
22815
  logWarn("React HMR is blocked: this Bun build ignores " + "`reactFastRefresh` on Bun.Transpiler, so component state " + "cannot be preserved across edits. Tracking " + "https://github.com/oven-sh/bun/pull/28312 \u2014 if it still has " + "not merged, leave a \uD83D\uDC4D on the PR so the Bun team knows it " + "is blocking you. Until then, React edits trigger a full " + "reload instead of a fast refresh.");
22690
22816
  }, transformReactFile = (filePath, projectRoot, rewriter) => {
22691
- const raw = readFileSync23(filePath, "utf-8");
22817
+ const raw = readFileSync24(filePath, "utf-8");
22692
22818
  const valueExports = tsxTranspiler.scan(raw).exports;
22693
22819
  let transpiled = reactTranspiler.transformSync(raw);
22694
22820
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
@@ -22699,12 +22825,12 @@ ${code}`;
22699
22825
  transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
22700
22826
  ` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
22701
22827
  ${transpiled}`;
22702
- const relPath = relative15(projectRoot, filePath).replace(/\\/g, "/");
22828
+ const relPath = relative16(projectRoot, filePath).replace(/\\/g, "/");
22703
22829
  transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
22704
22830
  transpiled += buildIslandMetadataExports(raw);
22705
22831
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
22706
22832
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
22707
- const raw = readFileSync23(filePath, "utf-8");
22833
+ const raw = readFileSync24(filePath, "utf-8");
22708
22834
  const ext = extname10(filePath);
22709
22835
  const isTS = ext === ".ts" || ext === ".tsx";
22710
22836
  const isTSX = ext === ".tsx" || ext === ".jsx";
@@ -22860,17 +22986,17 @@ ${code}`;
22860
22986
  if (compiled.css?.code) {
22861
22987
  const cssPath = `${filePath}.css`;
22862
22988
  svelteExternalCss.set(cssPath, compiled.css.code);
22863
- const cssUrl = srcUrl(relative15(projectRoot, cssPath), projectRoot);
22989
+ const cssUrl = srcUrl(relative16(projectRoot, cssPath), projectRoot);
22864
22990
  code = `import "${cssUrl}";
22865
22991
  ${code}`;
22866
22992
  }
22867
- const moduleUrl = `${SRC_PREFIX}${relative15(projectRoot, filePath).replace(/\\/g, "/")}`;
22993
+ const moduleUrl = `${SRC_PREFIX}${relative16(projectRoot, filePath).replace(/\\/g, "/")}`;
22868
22994
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
22869
22995
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
22870
22996
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
22871
22997
  return code.replace(/import\.meta\.hot\.accept\(/g, "__hmr_accept(");
22872
22998
  }, transformSvelteFile = async (filePath, projectRoot, rewriter, stylePreprocessors) => {
22873
- const raw = readFileSync23(filePath, "utf-8");
22999
+ const raw = readFileSync24(filePath, "utf-8");
22874
23000
  if (!svelteCompiler) {
22875
23001
  svelteCompiler = await import("svelte/compiler");
22876
23002
  }
@@ -22932,12 +23058,12 @@ export default __script__;`;
22932
23058
  return `${cssInjection}
22933
23059
  ${code}`;
22934
23060
  }, transformVueFile = async (filePath, projectRoot, rewriter, vueDir, stylePreprocessors) => {
22935
- const rawSource = readFileSync23(filePath, "utf-8");
23061
+ const rawSource = readFileSync24(filePath, "utf-8");
22936
23062
  const raw = addAutoRouterSetupApp(rawSource);
22937
23063
  if (!vueCompiler) {
22938
23064
  vueCompiler = await import("@vue/compiler-sfc");
22939
23065
  }
22940
- const fileName = basename12(filePath, ".vue");
23066
+ const fileName = basename13(filePath, ".vue");
22941
23067
  const componentId = fileName.toLowerCase();
22942
23068
  const { descriptor } = vueCompiler.parse(raw, { filename: filePath });
22943
23069
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -22956,7 +23082,7 @@ ${code}`;
22956
23082
  return rewriteImports(code, filePath, projectRoot, rewriter);
22957
23083
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
22958
23084
  const hmrBase = vueDir ? resolve38(vueDir) : projectRoot;
22959
- const hmrId = relative15(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
23085
+ const hmrId = relative16(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
22960
23086
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
22961
23087
  result += [
22962
23088
  "",
@@ -22987,7 +23113,7 @@ ${code}`;
22987
23113
  }
22988
23114
  });
22989
23115
  }, handleCssRequest = (filePath) => {
22990
- const raw = readFileSync23(filePath, "utf-8");
23116
+ const raw = readFileSync24(filePath, "utf-8");
22991
23117
  const escaped = raw.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
22992
23118
  return [
22993
23119
  `const style = document.createElement('style');`,
@@ -23418,7 +23544,7 @@ __export(exports_hmrCompiler, {
23418
23544
  getApplyMetadataModule: () => getApplyMetadataModule,
23419
23545
  encodeHmrComponentId: () => encodeHmrComponentId
23420
23546
  });
23421
- import { dirname as dirname25, relative as relative16, resolve as resolve39 } from "path";
23547
+ import { dirname as dirname25, relative as relative17, resolve as resolve39 } from "path";
23422
23548
  import { performance as performance2 } from "perf_hooks";
23423
23549
  var getApplyMetadataModule = async (encodedId) => {
23424
23550
  const decoded = decodeURIComponent(encodedId);
@@ -23428,7 +23554,7 @@ var getApplyMetadataModule = async (encodedId) => {
23428
23554
  const filePathRel = decoded.slice(0, at2);
23429
23555
  const className = decoded.slice(at2 + 1);
23430
23556
  const componentFilePath = resolve39(process.cwd(), filePathRel);
23431
- const projectRelPath = relative16(process.cwd(), componentFilePath).replace(/\\/g, "/");
23557
+ const projectRelPath = relative17(process.cwd(), componentFilePath).replace(/\\/g, "/");
23432
23558
  const cacheKey2 = encodeURIComponent(`${projectRelPath}@${className}`);
23433
23559
  const { takePendingModule: takePendingModule2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
23434
23560
  const cached = takePendingModule2(cacheKey2);
@@ -23450,7 +23576,7 @@ var getApplyMetadataModule = async (encodedId) => {
23450
23576
  }
23451
23577
  return null;
23452
23578
  }, encodeHmrComponentId = (absoluteFilePath, className) => {
23453
- const projectRel = relative16(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
23579
+ const projectRel = relative17(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
23454
23580
  return `${projectRel}@${className}`;
23455
23581
  };
23456
23582
  var init_hmrCompiler = __esm(() => {
@@ -23646,7 +23772,7 @@ var init_simpleHTMXHMR = () => {};
23646
23772
 
23647
23773
  // src/dev/rebuildTrigger.ts
23648
23774
  import { existsSync as existsSync32, rmSync as rmSync3 } from "fs";
23649
- import { basename as basename13, dirname as dirname26, join as join40, relative as relative17, resolve as resolve42, sep as sep4 } from "path";
23775
+ import { basename as basename14, dirname as dirname26, join as join41, relative as relative18, resolve as resolve42, sep as sep4 } from "path";
23650
23776
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequentially = (items, action) => items.reduce((chain, item) => chain.then(() => action(item)), Promise.resolve()), getStyleTransformConfig = (config) => createStyleTransformConfig(config.stylePreprocessors, config.postcss), recompileTailwindForFastPath = async (state, config, files) => {
23651
23777
  if (!config.tailwind)
23652
23778
  return;
@@ -23763,8 +23889,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
23763
23889
  const relJs = `${rel.slice(0, -ext[0].length)}.js`;
23764
23890
  const generatedDir = getFrameworkGeneratedDir(framework, cwd2);
23765
23891
  for (const candidate of [
23766
- join40(generatedDir, relJs),
23767
- `${join40(generatedDir, relJs)}.map`
23892
+ join41(generatedDir, relJs),
23893
+ `${join41(generatedDir, relJs)}.map`
23768
23894
  ]) {
23769
23895
  try {
23770
23896
  rmSync3(candidate, { force: true });
@@ -23976,7 +24102,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
23976
24102
  const webPath = urlPrefix ? `/${urlPrefix}/${relFromDir}` : `/${relFromDir}`;
23977
24103
  state.assetStore.set(webPath, new Uint8Array(bytes));
23978
24104
  state.fileHashes.set(absSource, currentHash);
23979
- logHmrUpdate(relative17(process.cwd(), filePath));
24105
+ logHmrUpdate(relative18(process.cwd(), filePath));
23980
24106
  broadcastToClients(state, {
23981
24107
  data: {
23982
24108
  framework: urlPrefix || "public",
@@ -23994,7 +24120,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
23994
24120
  return;
23995
24121
  if (framework === "unknown") {
23996
24122
  invalidate(resolve42(filePath));
23997
- const relPath = relative17(process.cwd(), filePath);
24123
+ const relPath = relative18(process.cwd(), filePath);
23998
24124
  logHmrUpdate(relPath);
23999
24125
  const angularDir = state.resolvedPaths.angularDir;
24000
24126
  let hasAngularDependent = false;
@@ -24150,7 +24276,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24150
24276
  if (serverDirs.length <= 1) {
24151
24277
  const dir = getFrameworkGeneratedDir2(framework, projectRoot);
24152
24278
  return {
24153
- serverOutDir: resolve42(resolvedPaths.buildDir, basename13(dir)),
24279
+ serverOutDir: resolve42(resolvedPaths.buildDir, basename14(dir)),
24154
24280
  serverRoot: resolve42(dir, "server")
24155
24281
  };
24156
24282
  }
@@ -24159,7 +24285,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24159
24285
  serverRoot: commonAncestor2(serverDirs.map((entry) => entry.dir), projectRoot)
24160
24286
  };
24161
24287
  }, updateServerManifestEntry = (state, artifact) => {
24162
- const fileWithHash = basename13(artifact.path);
24288
+ const fileWithHash = basename14(artifact.path);
24163
24289
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
24164
24290
  if (!baseName) {
24165
24291
  return;
@@ -24173,7 +24299,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24173
24299
  const prefixByDir = new Map;
24174
24300
  for (const artifact of freshOutputs) {
24175
24301
  const dir = dirname26(artifact.path);
24176
- const name = basename13(artifact.path);
24302
+ const name = basename14(artifact.path);
24177
24303
  const [prefix] = name.split(".");
24178
24304
  if (!prefix)
24179
24305
  continue;
@@ -24585,7 +24711,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24585
24711
  try {
24586
24712
  const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24587
24713
  for (const tsFile of tsFilesToRefresh) {
24588
- const rel = relative17(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
24714
+ const rel = relative18(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
24589
24715
  const compiledFile = resolve42(compiledRoot, rel);
24590
24716
  invalidateModule2(compiledFile);
24591
24717
  }
@@ -24602,12 +24728,12 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24602
24728
  try {
24603
24729
  const { primeComponentFingerprint: primeComponentFingerprint2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
24604
24730
  const { readdir: readdir5 } = await import("fs/promises");
24605
- const { join: join41 } = await import("path");
24731
+ const { join: join42 } = await import("path");
24606
24732
  const walk = async (dir) => {
24607
24733
  const entries = await readdir5(dir, { withFileTypes: true });
24608
24734
  const files = [];
24609
24735
  for (const entry of entries) {
24610
- const full = join41(dir, entry.name);
24736
+ const full = join42(dir, entry.name);
24611
24737
  if (entry.isDirectory()) {
24612
24738
  files.push(...await walk(full));
24613
24739
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -24635,7 +24761,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24635
24761
  await rewriteImports3(ssrPaths, angServerVendorPaths);
24636
24762
  }
24637
24763
  serverPaths.forEach((serverPath, idx) => {
24638
- const fileBase = basename13(serverPath, ".js");
24764
+ const fileBase = basename14(serverPath, ".js");
24639
24765
  const ssrPath = ssrPaths[idx] ?? serverPath;
24640
24766
  state.manifest[toPascal(fileBase)] = resolve42(ssrPath);
24641
24767
  });
@@ -24684,7 +24810,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24684
24810
  }, getModuleUrl = async (pageFile) => {
24685
24811
  const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
24686
24812
  invalidateModule2(pageFile);
24687
- const rel = relative17(process.cwd(), pageFile).replace(/\\/g, "/");
24813
+ const rel = relative18(process.cwd(), pageFile).replace(/\\/g, "/");
24688
24814
  const url = `${SRC_URL_PREFIX2}${rel}`;
24689
24815
  warmCache2(url);
24690
24816
  return url;
@@ -24715,7 +24841,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24715
24841
  const pageModuleUrl = await getReactModuleUrl(broadcastTarget);
24716
24842
  if (pageModuleUrl) {
24717
24843
  const serverDuration = Date.now() - startTime;
24718
- state.lastHmrPath = relative17(process.cwd(), primaryFile).replace(/\\/g, "/");
24844
+ state.lastHmrPath = relative18(process.cwd(), primaryFile).replace(/\\/g, "/");
24719
24845
  state.lastHmrFramework = "react";
24720
24846
  broadcastToClients(state, {
24721
24847
  data: {
@@ -24970,7 +25096,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
24970
25096
  const duration = Date.now() - startTime;
24971
25097
  const broadcastFiles = svelteFiles.length > 0 ? svelteFiles : filesToRebuild;
24972
25098
  broadcastFiles.forEach((sveltePagePath) => {
24973
- const fileName = basename13(sveltePagePath);
25099
+ const fileName = basename14(sveltePagePath);
24974
25100
  const baseName = fileName.replace(/\.svelte$/, "");
24975
25101
  const pascalName = toPascal(baseName);
24976
25102
  const cssKey = `${pascalName}CSS`;
@@ -25050,7 +25176,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25050
25176
  const { vueServerPaths, vueIndexPaths, vueClientPaths, vueCssPaths } = await compileVue2(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
25051
25177
  const serverEntries = [...vueServerPaths];
25052
25178
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
25053
- const cssOutDir = join40(buildDir, state.resolvedPaths.assetsDir ? basename13(state.resolvedPaths.assetsDir) : "assets", "css");
25179
+ const cssOutDir = join41(buildDir, state.resolvedPaths.assetsDir ? basename14(state.resolvedPaths.assetsDir) : "assets", "css");
25054
25180
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
25055
25181
  const [serverResult, clientResult, cssResult] = await Promise.all([
25056
25182
  serverEntries.length > 0 ? bunBuild9({
@@ -25198,7 +25324,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25198
25324
  const { compileEmber: compileEmber2 } = await Promise.resolve().then(() => (init_compileEmber(), exports_compileEmber));
25199
25325
  const { serverPaths } = await compileEmber2(allPageEntries, emberDir, process.cwd(), true);
25200
25326
  for (const serverPath of serverPaths) {
25201
- const fileBase = basename13(serverPath, ".js");
25327
+ const fileBase = basename14(serverPath, ".js");
25202
25328
  state.manifest[toPascal(fileBase)] = resolve42(serverPath);
25203
25329
  }
25204
25330
  const { invalidateEmberSsrCache: invalidateEmberSsrCache2 } = await Promise.resolve().then(() => (init_ember(), exports_ember));
@@ -25206,7 +25332,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25206
25332
  const duration = Date.now() - startTime;
25207
25333
  const [primary] = emberFiles;
25208
25334
  if (primary) {
25209
- state.lastHmrPath = relative17(process.cwd(), primary).replace(/\\/g, "/");
25335
+ state.lastHmrPath = relative18(process.cwd(), primary).replace(/\\/g, "/");
25210
25336
  state.lastHmrFramework = "ember";
25211
25337
  logHmrUpdate(primary, "ember", duration);
25212
25338
  }
@@ -25269,7 +25395,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25269
25395
  });
25270
25396
  }
25271
25397
  }, handleScriptUpdate = (state, scriptFile, manifest, framework, duration) => {
25272
- const scriptBaseName = basename13(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
25398
+ const scriptBaseName = basename14(scriptFile).replace(/\.(ts|js|tsx|jsx)$/, "");
25273
25399
  const pascalName = toPascal(scriptBaseName);
25274
25400
  const scriptPath = manifest[pascalName] || null;
25275
25401
  if (!scriptPath) {
@@ -25348,7 +25474,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25348
25474
  if (isSingle) {
25349
25475
  return resolve42(state.resolvedPaths.buildDir, "pages");
25350
25476
  }
25351
- const dirName = framework === "html" ? basename13(config.htmlDirectory ?? "html") : basename13(config.htmxDirectory ?? "htmx");
25477
+ const dirName = framework === "html" ? basename14(config.htmlDirectory ?? "html") : basename14(config.htmxDirectory ?? "htmx");
25352
25478
  return resolve42(state.resolvedPaths.buildDir, dirName, "pages");
25353
25479
  }, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
25354
25480
  try {
@@ -25387,7 +25513,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25387
25513
  const shouldRefreshAllPages = htmlPageFiles.length === 0 && shouldRefreshFromIslandChange;
25388
25514
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmlPages, "*.html") : htmlPageFiles;
25389
25515
  await runSequentially(pageFilesToUpdate, async (pageFile) => {
25390
- const htmlPageName = basename13(pageFile);
25516
+ const htmlPageName = basename14(pageFile);
25391
25517
  const builtHtmlPagePath = resolve42(outputHtmlPages, htmlPageName);
25392
25518
  await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
25393
25519
  });
@@ -25396,7 +25522,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25396
25522
  if (!cssFile) {
25397
25523
  return;
25398
25524
  }
25399
- const cssBaseName = basename13(getStyleBaseName(cssFile));
25525
+ const cssBaseName = basename14(getStyleBaseName(cssFile));
25400
25526
  const cssPascalName = toPascal(cssBaseName);
25401
25527
  const cssKey = `${cssPascalName}CSS`;
25402
25528
  const cssUrl = manifest[cssKey] || null;
@@ -25445,11 +25571,11 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25445
25571
  type: "vue-update"
25446
25572
  });
25447
25573
  }, broadcastVuePageChange = async (state, config, vuePagePath, manifest, duration) => {
25448
- const fileName = basename13(vuePagePath);
25574
+ const fileName = basename14(vuePagePath);
25449
25575
  const baseName = fileName.replace(/\.vue$/, "");
25450
25576
  const pascalName = toPascal(baseName);
25451
25577
  const vueRoot = config.vueDirectory;
25452
- const hmrId = vueRoot ? relative17(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
25578
+ const hmrId = vueRoot ? relative18(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
25453
25579
  const cssKey = `${pascalName}CSS`;
25454
25580
  const cssUrl = manifest[cssKey] || null;
25455
25581
  const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
@@ -25491,7 +25617,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25491
25617
  if (!cssFile) {
25492
25618
  return;
25493
25619
  }
25494
- const cssBaseName = basename13(getStyleBaseName(cssFile));
25620
+ const cssBaseName = basename14(getStyleBaseName(cssFile));
25495
25621
  const cssPascalName = toPascal(cssBaseName);
25496
25622
  const cssKey = `${cssPascalName}CSS`;
25497
25623
  const cssUrl = manifest[cssKey] || null;
@@ -25509,7 +25635,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25509
25635
  });
25510
25636
  }, broadcastSveltePageUpdate = (state, sveltePagePath, manifest, duration) => {
25511
25637
  try {
25512
- const fileName = basename13(sveltePagePath);
25638
+ const fileName = basename14(sveltePagePath);
25513
25639
  const baseName = fileName.replace(/\.svelte$/, "");
25514
25640
  const pascalName = toPascal(baseName);
25515
25641
  const cssKey = `${pascalName}CSS`;
@@ -25557,7 +25683,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25557
25683
  if (!cssFile) {
25558
25684
  return;
25559
25685
  }
25560
- const cssBaseName = basename13(getStyleBaseName(cssFile));
25686
+ const cssBaseName = basename14(getStyleBaseName(cssFile));
25561
25687
  const cssPascalName = toPascal(cssBaseName);
25562
25688
  const cssKey = `${cssPascalName}CSS`;
25563
25689
  const cssUrl = manifest[cssKey] || null;
@@ -25637,7 +25763,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25637
25763
  const shouldRefreshAllPages = htmxPageFiles.length === 0 && shouldRefreshFromIslandChange;
25638
25764
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmxPages, "*.html") : htmxPageFiles;
25639
25765
  await runSequentially(pageFilesToUpdate, async (htmxPageFile) => {
25640
- const htmxPageName = basename13(htmxPageFile);
25766
+ const htmxPageName = basename14(htmxPageFile);
25641
25767
  const builtHtmxPagePath = resolve42(outputHtmxPages, htmxPageName);
25642
25768
  await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
25643
25769
  });
@@ -25747,7 +25873,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
25747
25873
  html = html.slice(0, bodyClose.index) + hmrScript + html.slice(bodyClose.index);
25748
25874
  writeFs(destPath, html);
25749
25875
  }, processMarkupFileFastPath = async (state, sourceFile, outputDir, framework, startTime, updateAssetPaths2, handleUpdate, readFs, writeFs) => {
25750
- const destPath = resolve42(outputDir, basename13(sourceFile));
25876
+ const destPath = resolve42(outputDir, basename14(sourceFile));
25751
25877
  const hmrScript = extractHmrScript(destPath, readFs);
25752
25878
  const source = await Bun.file(sourceFile).text();
25753
25879
  await Bun.write(destPath, source);
@@ -26045,7 +26171,7 @@ __export(exports_buildDepVendor, {
26045
26171
  buildDepVendor: () => buildDepVendor
26046
26172
  });
26047
26173
  import { mkdirSync as mkdirSync16 } from "fs";
26048
- import { join as join41 } from "path";
26174
+ import { join as join42 } from "path";
26049
26175
  import { rm as rm10 } from "fs/promises";
26050
26176
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
26051
26177
  var toSafeFileName6 = (specifier) => {
@@ -26099,7 +26225,7 @@ var toSafeFileName6 = (specifier) => {
26099
26225
  framework: Array.from(framework).filter(isResolvable4)
26100
26226
  };
26101
26227
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
26102
- const { readFileSync: readFileSync24 } = await import("fs");
26228
+ const { readFileSync: readFileSync25 } = await import("fs");
26103
26229
  const transpiler6 = new Bun.Transpiler({ loader: "js" });
26104
26230
  const newSpecs = new Set;
26105
26231
  for (const spec of specs) {
@@ -26114,7 +26240,7 @@ var toSafeFileName6 = (specifier) => {
26114
26240
  }
26115
26241
  let content;
26116
26242
  try {
26117
- content = readFileSync24(resolved, "utf-8");
26243
+ content = readFileSync25(resolved, "utf-8");
26118
26244
  } catch {
26119
26245
  continue;
26120
26246
  }
@@ -26156,7 +26282,7 @@ var toSafeFileName6 = (specifier) => {
26156
26282
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
26157
26283
  const entries = await Promise.all(specifiers.map(async (specifier) => {
26158
26284
  const safeName = toSafeFileName6(specifier);
26159
- const entryPath = join41(tmpDir, `${safeName}.ts`);
26285
+ const entryPath = join42(tmpDir, `${safeName}.ts`);
26160
26286
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
26161
26287
  return { entryPath, specifier };
26162
26288
  }));
@@ -26217,9 +26343,9 @@ var toSafeFileName6 = (specifier) => {
26217
26343
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories);
26218
26344
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
26219
26345
  return {};
26220
- const vendorDir = join41(buildDir, "vendor");
26346
+ const vendorDir = join42(buildDir, "vendor");
26221
26347
  mkdirSync16(vendorDir, { recursive: true });
26222
- const tmpDir = join41(buildDir, "_dep_vendor_tmp");
26348
+ const tmpDir = join42(buildDir, "_dep_vendor_tmp");
26223
26349
  mkdirSync16(tmpDir, { recursive: true });
26224
26350
  const allSpecs = new Set(initialSpecs);
26225
26351
  const alreadyScanned = new Set;
@@ -26920,17 +27046,17 @@ __export(exports_devtoolsJson, {
26920
27046
  normalizeDevtoolsWorkspaceRoot: () => normalizeDevtoolsWorkspaceRoot,
26921
27047
  devtoolsJson: () => devtoolsJson
26922
27048
  });
26923
- import { existsSync as existsSync33, mkdirSync as mkdirSync17, readFileSync as readFileSync24, writeFileSync as writeFileSync12 } from "fs";
26924
- import { dirname as dirname27, join as join42, resolve as resolve44 } from "path";
27049
+ import { existsSync as existsSync33, mkdirSync as mkdirSync17, readFileSync as readFileSync25, writeFileSync as writeFileSync12 } from "fs";
27050
+ import { dirname as dirname27, join as join43, resolve as resolve44 } from "path";
26925
27051
  import { Elysia as Elysia3 } from "elysia";
26926
27052
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
26927
27053
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
26928
27054
  return uuid;
26929
- }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve44(uuidCachePath ?? join42(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
27055
+ }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve44(uuidCachePath ?? join43(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
26930
27056
  if (!existsSync33(cachePath))
26931
27057
  return null;
26932
27058
  try {
26933
- const value = readFileSync24(cachePath, "utf-8").trim();
27059
+ const value = readFileSync25(cachePath, "utf-8").trim();
26934
27060
  return isUuidV4(value) ? value : null;
26935
27061
  } catch {
26936
27062
  return null;
@@ -26965,11 +27091,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
26965
27091
  if (process.env.WSL_DISTRO_NAME) {
26966
27092
  const distro = process.env.WSL_DISTRO_NAME;
26967
27093
  const withoutLeadingSlash = root.replace(/^\//, "");
26968
- return join42("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
27094
+ return join43("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
26969
27095
  }
26970
27096
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
26971
27097
  const withoutLeadingSlash = root.replace(/^\//, "");
26972
- return join42("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
27098
+ return join43("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
26973
27099
  }
26974
27100
  return root;
26975
27101
  };
@@ -27200,15 +27326,15 @@ __export(exports_prerender, {
27200
27326
  prerender: () => prerender,
27201
27327
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
27202
27328
  });
27203
- import { mkdirSync as mkdirSync18, readFileSync as readFileSync25 } from "fs";
27204
- import { join as join43 } from "path";
27329
+ import { mkdirSync as mkdirSync18, readFileSync as readFileSync26 } from "fs";
27330
+ import { join as join44 } from "path";
27205
27331
  var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_TIMEOUT_MS = 30000, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
27206
27332
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27207
27333
  await Bun.write(metaPath, String(Date.now()));
27208
27334
  }, readTimestamp = (htmlPath) => {
27209
27335
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
27210
27336
  try {
27211
- const content = readFileSync25(metaPath, "utf-8");
27337
+ const content = readFileSync26(metaPath, "utf-8");
27212
27338
  return Number(content) || 0;
27213
27339
  } catch {
27214
27340
  return 0;
@@ -27267,7 +27393,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27267
27393
  return false;
27268
27394
  const html = await res.text();
27269
27395
  const fileName = routeToFilename(route);
27270
- const filePath = join43(prerenderDir, fileName);
27396
+ const filePath = join44(prerenderDir, fileName);
27271
27397
  await Bun.write(filePath, html);
27272
27398
  await writeTimestamp(filePath);
27273
27399
  return true;
@@ -27293,13 +27419,13 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
27293
27419
  }
27294
27420
  const html = await res.text();
27295
27421
  const fileName = routeToFilename(route);
27296
- const filePath = join43(prerenderDir, fileName);
27422
+ const filePath = join44(prerenderDir, fileName);
27297
27423
  await Bun.write(filePath, html);
27298
27424
  await writeTimestamp(filePath);
27299
27425
  result.routes.set(route, filePath);
27300
27426
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
27301
27427
  }, prerender = async (port, outDir, staticConfig, log2) => {
27302
- const prerenderDir = join43(outDir, "_prerendered");
27428
+ const prerenderDir = join44(outDir, "_prerendered");
27303
27429
  mkdirSync18(prerenderDir, { recursive: true });
27304
27430
  const baseUrl = `http://localhost:${port}`;
27305
27431
  let routes;
@@ -27401,7 +27527,7 @@ __export(exports_serverEntryWatcher, {
27401
27527
  });
27402
27528
  import { existsSync as existsSync37, statSync as statSync8, watch as watch2 } from "fs";
27403
27529
  import { createRequire as createRequire2 } from "module";
27404
- import { dirname as dirname28, join as join46, resolve as resolve47 } from "path";
27530
+ import { dirname as dirname28, join as join47, resolve as resolve47 } from "path";
27405
27531
  var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP_PATTERNS2, isAtomicWriteTemp = (filename) => filename.endsWith(".tmp") || filename.includes(".tmp.") || filename.endsWith("~") || filename.startsWith(".#") || ATOMIC_WRITE_TEMP_PATTERNS2.some((re2) => re2.test(filename)), startServerEntryWatcher = () => {
27406
27532
  if (globalThis.__absoluteEntryWatcherStarted)
27407
27533
  return;
@@ -27489,8 +27615,8 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27489
27615
  const recoveryScan = (dir) => {
27490
27616
  let entries;
27491
27617
  try {
27492
- const { readdirSync: readdirSync7 } = __require("fs");
27493
- entries = readdirSync7(dir, { withFileTypes: true });
27618
+ const { readdirSync: readdirSync8 } = __require("fs");
27619
+ entries = readdirSync8(dir, { withFileTypes: true });
27494
27620
  } catch {
27495
27621
  return;
27496
27622
  }
@@ -27504,7 +27630,7 @@ var ATOMIC_RECOVERY_WINDOW_MS = 1000, RELOAD_DEBOUNCE_MS = 80, ATOMIC_WRITE_TEMP
27504
27630
  continue;
27505
27631
  let st2;
27506
27632
  try {
27507
- st2 = statSync8(join46(dir, entry.name));
27633
+ st2 = statSync8(join47(dir, entry.name));
27508
27634
  } catch {
27509
27635
  continue;
27510
27636
  }
@@ -28059,8 +28185,8 @@ var handleHTMXPageRequest = async (pagePath) => {
28059
28185
  };
28060
28186
  // src/core/prepare.ts
28061
28187
  init_loadConfig();
28062
- import { existsSync as existsSync35, readdirSync as readdirSync6, readFileSync as readFileSync26 } from "fs";
28063
- import { basename as basename14, join as join44, relative as relative18, resolve as resolve46 } from "path";
28188
+ import { existsSync as existsSync35, readdirSync as readdirSync7, readFileSync as readFileSync27 } from "fs";
28189
+ import { basename as basename15, join as join45, relative as relative19, resolve as resolve46 } from "path";
28064
28190
  import { Elysia as Elysia5 } from "elysia";
28065
28191
 
28066
28192
  // src/core/loadIslandRegistry.ts
@@ -28433,7 +28559,7 @@ var warmPrewarmDirs = async (prewarmDirs, warmCache2, SRC_URL_PREFIX2) => {
28433
28559
  for (const file5 of files) {
28434
28560
  if (file5.includes("/node_modules/"))
28435
28561
  continue;
28436
- const rel = relative18(process.cwd(), file5).replace(/\\/g, "/");
28562
+ const rel = relative19(process.cwd(), file5).replace(/\\/g, "/");
28437
28563
  warmCache2(`${SRC_URL_PREFIX2}${rel}`);
28438
28564
  }
28439
28565
  };
@@ -28461,7 +28587,7 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
28461
28587
  const srcPath = resolve46(devIndexDir, fileName);
28462
28588
  if (!existsSync35(srcPath))
28463
28589
  continue;
28464
- const rel = relative18(process.cwd(), srcPath).replace(/\\/g, "/");
28590
+ const rel = relative19(process.cwd(), srcPath).replace(/\\/g, "/");
28465
28591
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
28466
28592
  }
28467
28593
  };
@@ -28571,16 +28697,16 @@ var loadPrerenderMap = (prerenderDir) => {
28571
28697
  return map;
28572
28698
  let entries;
28573
28699
  try {
28574
- entries = readdirSync6(prerenderDir);
28700
+ entries = readdirSync7(prerenderDir);
28575
28701
  } catch {
28576
28702
  return map;
28577
28703
  }
28578
28704
  for (const entry of entries) {
28579
28705
  if (!entry.endsWith(".html"))
28580
28706
  continue;
28581
- const name = basename14(entry, ".html");
28707
+ const name = basename15(entry, ".html");
28582
28708
  const route = name === "index" ? "/" : `/${name}`;
28583
- map.set(route, join44(prerenderDir, entry));
28709
+ map.set(route, join45(prerenderDir, entry));
28584
28710
  }
28585
28711
  return map;
28586
28712
  };
@@ -28632,7 +28758,7 @@ var prepare = async (configOrPath) => {
28632
28758
  return result;
28633
28759
  }
28634
28760
  stepStartedAt = performance.now();
28635
- const manifest = JSON.parse(readFileSync26(`${buildDir}/manifest.json`, "utf-8"));
28761
+ const manifest = JSON.parse(readFileSync27(`${buildDir}/manifest.json`, "utf-8"));
28636
28762
  setCurrentIslandManifest(manifest);
28637
28763
  if (config.islands?.registry) {
28638
28764
  setCurrentIslandRegistry(await loadIslandRegistry(config.islands.registry));
@@ -28640,9 +28766,9 @@ var prepare = async (configOrPath) => {
28640
28766
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
28641
28767
  recordStep("load production manifest and island metadata", stepStartedAt);
28642
28768
  stepStartedAt = performance.now();
28643
- const conventionsPath = join44(buildDir, "conventions.json");
28769
+ const conventionsPath = join45(buildDir, "conventions.json");
28644
28770
  if (existsSync35(conventionsPath)) {
28645
- const conventions2 = JSON.parse(readFileSync26(conventionsPath, "utf-8"));
28771
+ const conventions2 = JSON.parse(readFileSync27(conventionsPath, "utf-8"));
28646
28772
  setConventions(conventions2);
28647
28773
  }
28648
28774
  recordStep("load production conventions", stepStartedAt);
@@ -28656,7 +28782,7 @@ var prepare = async (configOrPath) => {
28656
28782
  });
28657
28783
  recordStep("create static plugin", stepStartedAt);
28658
28784
  stepStartedAt = performance.now();
28659
- const prerenderDir = join44(buildDir, "_prerendered");
28785
+ const prerenderDir = join45(buildDir, "_prerendered");
28660
28786
  const prerenderMap = loadPrerenderMap(prerenderDir);
28661
28787
  recordStep("load prerender map", stepStartedAt);
28662
28788
  if (prerenderMap.size > 0) {
@@ -28714,18 +28840,18 @@ import { argv } from "process";
28714
28840
  var {env: env4 } = globalThis.Bun;
28715
28841
 
28716
28842
  // src/dev/devCert.ts
28717
- import { existsSync as existsSync36, mkdirSync as mkdirSync19, readFileSync as readFileSync27, rmSync as rmSync4 } from "fs";
28718
- import { join as join45 } from "path";
28719
- var CERT_DIR = join45(process.cwd(), ".absolutejs");
28720
- var CERT_PATH = join45(CERT_DIR, "cert.pem");
28721
- var KEY_PATH = join45(CERT_DIR, "key.pem");
28843
+ import { existsSync as existsSync36, mkdirSync as mkdirSync19, readFileSync as readFileSync28, rmSync as rmSync4 } from "fs";
28844
+ import { join as join46 } from "path";
28845
+ var CERT_DIR = join46(process.cwd(), ".absolutejs");
28846
+ var CERT_PATH = join46(CERT_DIR, "cert.pem");
28847
+ var KEY_PATH = join46(CERT_DIR, "key.pem");
28722
28848
  var CERT_VALIDITY_DAYS = 365;
28723
28849
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
28724
28850
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
28725
28851
  var certFilesExist = () => existsSync36(CERT_PATH) && existsSync36(KEY_PATH);
28726
28852
  var isCertExpired = () => {
28727
28853
  try {
28728
- const certPem = readFileSync27(CERT_PATH, "utf-8");
28854
+ const certPem = readFileSync28(CERT_PATH, "utf-8");
28729
28855
  const proc = Bun.spawnSync(["openssl", "x509", "-enddate", "-noout"], {
28730
28856
  stdin: new TextEncoder().encode(certPem)
28731
28857
  });
@@ -28821,8 +28947,8 @@ var loadDevCert = () => {
28821
28947
  return null;
28822
28948
  try {
28823
28949
  return {
28824
- cert: readFileSync27(paths.cert, "utf-8"),
28825
- key: readFileSync27(paths.key, "utf-8")
28950
+ cert: readFileSync28(paths.cert, "utf-8"),
28951
+ key: readFileSync28(paths.key, "utf-8")
28826
28952
  };
28827
28953
  } catch {
28828
28954
  return null;
@@ -29097,7 +29223,7 @@ var generateHeadElement = ({
29097
29223
  };
29098
29224
  // src/utils/defineEnv.ts
29099
29225
  var {env: bunEnv } = globalThis.Bun;
29100
- import { existsSync as existsSync38, readFileSync as readFileSync28 } from "fs";
29226
+ import { existsSync as existsSync38, readFileSync as readFileSync29 } from "fs";
29101
29227
  import { resolve as resolve48 } from "path";
29102
29228
 
29103
29229
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
@@ -35139,13 +35265,13 @@ var checkEnvFileSecurity = (properties) => {
35139
35265
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
35140
35266
  if (sensitiveKeys.length === 0)
35141
35267
  return;
35142
- const envContent = readFileSync28(envPath, "utf-8");
35268
+ const envContent = readFileSync29(envPath, "utf-8");
35143
35269
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
35144
35270
  if (presentKeys.length === 0)
35145
35271
  return;
35146
35272
  const gitignorePath = resolve48(cwd2, ".gitignore");
35147
35273
  if (existsSync38(gitignorePath)) {
35148
- const gitignore = readFileSync28(gitignorePath, "utf-8");
35274
+ const gitignore = readFileSync29(gitignorePath, "utf-8");
35149
35275
  if (gitignore.split(`
35150
35276
  `).some((line) => line.trim() === ".env"))
35151
35277
  return;
@@ -35386,5 +35512,5 @@ export {
35386
35512
  ANGULAR_INIT_TIMEOUT_MS
35387
35513
  };
35388
35514
 
35389
- //# debugId=A426BD76DABD2B4364756E2164756E21
35515
+ //# debugId=53D6A9BEFCFCD6FB64756E2164756E21
35390
35516
  //# sourceMappingURL=index.js.map