@absolutejs/absolute 0.19.0-beta.930 → 0.19.0-beta.931

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
@@ -7553,100 +7553,6 @@ var init_svelteServerModule = __esm(() => {
7553
7553
  });
7554
7554
  });
7555
7555
 
7556
- // src/core/vueServerModule.ts
7557
- import { mkdir as mkdir3 } from "fs/promises";
7558
- import { dirname as dirname6, join as join7, relative as relative3, resolve as resolve6 } from "path";
7559
- var {Transpiler } = globalThis.Bun;
7560
- var ISLAND_COMPONENT_ID_LENGTH = 8, serverCacheRoot2, compiledModuleCache2, transpiler2, ensureRelativeImportPath2 = (from, target) => {
7561
- const importPath = relative3(dirname6(from), target).replace(/\\/g, "/");
7562
- return importPath.startsWith(".") ? importPath : `./${importPath}`;
7563
- }, getCachedModulePath2 = (sourcePath) => {
7564
- const relativeSourcePath = relative3(process.cwd(), sourcePath).replace(/\\/g, "/");
7565
- const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
7566
- return join7(serverCacheRoot2, `${normalizedSourcePath}.server.js`);
7567
- }, writeIfChanged2 = async (path, content) => {
7568
- const targetFile = Bun.file(path);
7569
- if (await targetFile.exists()) {
7570
- const currentContent = await targetFile.text();
7571
- if (currentContent === content)
7572
- return;
7573
- }
7574
- await Bun.write(path, content);
7575
- }, stripExports = (code) => code.replace(/export\s+default/, "const script ="), mergeVueImports = (code) => {
7576
- const lines = code.split(`
7577
- `);
7578
- const specifierSet = new Set;
7579
- const vueImportRegex = /^import\s+{([^}]+)}\s+from\s+['"]vue['"];?$/;
7580
- lines.forEach((line) => {
7581
- const match = line.match(vueImportRegex);
7582
- if (match?.[1])
7583
- match[1].split(",").forEach((importSpecifier) => specifierSet.add(importSpecifier.trim()));
7584
- });
7585
- const nonVueLines = lines.filter((line) => !vueImportRegex.test(line));
7586
- return specifierSet.size ? [
7587
- `import { ${[...specifierSet].join(", ")} } from "vue";`,
7588
- ...nonVueLines
7589
- ].join(`
7590
- `) : nonVueLines.join(`
7591
- `);
7592
- }, extractRelativeVueImports = (sourceCode) => Array.from(sourceCode.matchAll(/import\s+[\s\S]+?['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((importPath) => typeof importPath === "string" && importPath.startsWith(".") && importPath.endsWith(".vue")), compileVueServerModule = async (sourcePath) => {
7593
- const cachedModulePath = compiledModuleCache2.get(sourcePath);
7594
- if (cachedModulePath)
7595
- return cachedModulePath;
7596
- const compiler = await import("@vue/compiler-sfc");
7597
- const source = await Bun.file(sourcePath).text();
7598
- const { descriptor } = compiler.parse(source, { filename: sourcePath });
7599
- const componentId = Bun.hash(sourcePath).toString(BASE_36_RADIX).slice(0, ISLAND_COMPONENT_ID_LENGTH);
7600
- const hasScript = descriptor.script || descriptor.scriptSetup;
7601
- const compiledScript = hasScript ? compiler.compileScript(descriptor, {
7602
- id: componentId,
7603
- inlineTemplate: false
7604
- }) : { bindings: {}, content: "export default {};" };
7605
- const renderCode = descriptor.template ? compiler.compileTemplate({
7606
- compilerOptions: {
7607
- bindingMetadata: compiledScript.bindings,
7608
- expressionPlugins: ["typescript"],
7609
- prefixIdentifiers: true,
7610
- isCustomElement: (tag) => tag === "absolute-island"
7611
- },
7612
- filename: sourcePath,
7613
- id: componentId,
7614
- scoped: descriptor.styles.some((styleBlock) => styleBlock.scoped),
7615
- source: descriptor.template.content,
7616
- ssr: true,
7617
- ssrCssVars: descriptor.cssVars
7618
- }).code : "const ssrRender = () => {};";
7619
- const childImportPaths = extractRelativeVueImports(compiledScript.content);
7620
- const compiledChildren = await Promise.all(childImportPaths.map(async (relativeImport) => ({
7621
- compiledPath: await compileVueServerModule(resolve6(dirname6(sourcePath), relativeImport)),
7622
- spec: relativeImport
7623
- })));
7624
- const strippedScript = stripExports(compiledScript.content);
7625
- const transpiledScript = transpiler2.transformSync(strippedScript);
7626
- const assembled = mergeVueImports([
7627
- transpiledScript,
7628
- renderCode,
7629
- "script.ssrRender = ssrRender;",
7630
- "export default script;"
7631
- ].join(`
7632
- `));
7633
- const compiledModulePath = getCachedModulePath2(sourcePath);
7634
- let rewritten = assembled;
7635
- for (const child of compiledChildren) {
7636
- rewritten = rewritten.replaceAll(child.spec, ensureRelativeImportPath2(compiledModulePath, child.compiledPath));
7637
- }
7638
- await mkdir3(dirname6(compiledModulePath), { recursive: true });
7639
- await writeIfChanged2(compiledModulePath, rewritten);
7640
- compiledModuleCache2.set(sourcePath, compiledModulePath);
7641
- return compiledModulePath;
7642
- };
7643
- var init_vueServerModule = __esm(() => {
7644
- init_constants();
7645
- serverCacheRoot2 = join7(process.cwd(), ".absolutejs", "islands", "vue");
7646
- compiledModuleCache2 = new Map;
7647
- transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
7648
- });
7649
-
7650
7556
  // src/core/islandMarkupAttributes.ts
7651
7557
  var getIslandMarkerAttributes = (props, islandId) => ({
7652
7558
  "data-component": props.component,
@@ -7682,17 +7588,9 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
7682
7588
  const loadPromise = loadAndCompileServerBuildComponent(buildReferencePath);
7683
7589
  resolvedServerBuildComponentCache.set(buildReferencePath, loadPromise);
7684
7590
  return loadPromise;
7685
- }, resolveRuntimeImportTarget = async (resolvedModulePath) => {
7686
- if (resolvedModulePath.endsWith(".svelte")) {
7687
- return compileSvelteServerModule(resolvedModulePath);
7688
- }
7689
- if (resolvedModulePath.endsWith(".vue")) {
7690
- return compileVueServerModule(resolvedModulePath);
7691
- }
7692
- return resolvedModulePath;
7693
7591
  }, loadServerImportComponent = async (resolvedComponent, exportName) => {
7694
7592
  const resolvedModulePath = resolvedComponent.startsWith(".") ? new URL(resolvedComponent, import.meta.url).pathname : resolvedComponent;
7695
- const importTarget = await resolveRuntimeImportTarget(resolvedModulePath);
7593
+ const importTarget = resolvedModulePath.endsWith(".svelte") ? await compileSvelteServerModule(resolvedModulePath) : resolvedModulePath;
7696
7594
  const loadedModule = await import(importTarget);
7697
7595
  if (exportName && exportName !== "default" && exportName in loadedModule) {
7698
7596
  return loadedModule[exportName];
@@ -7796,7 +7694,6 @@ var islandSequence = 0, resolvedServerComponentCache, resolvedServerBuildCompone
7796
7694
  var init_renderIslandMarkup = __esm(() => {
7797
7695
  init_islandSsr();
7798
7696
  init_svelteServerModule();
7799
- init_vueServerModule();
7800
7697
  init_islandMarkupAttributes();
7801
7698
  init_islands();
7802
7699
  resolvedServerComponentCache = new Map;
@@ -7805,7 +7702,7 @@ var init_renderIslandMarkup = __esm(() => {
7805
7702
 
7806
7703
  // src/build/islandEntries.ts
7807
7704
  import { mkdirSync, rmSync, writeFileSync as writeFileSync2 } from "fs";
7808
- import { dirname as dirname7, extname as extname3, join as join8, relative as relative4, resolve as resolve7 } from "path";
7705
+ import { dirname as dirname6, extname as extname3, join as join7, relative as relative3, resolve as resolve6 } from "path";
7809
7706
  import ts from "typescript";
7810
7707
  var frameworks, isRecord4 = (value) => typeof value === "object" && value !== null, resolveRegistryExport = (mod) => {
7811
7708
  if (isRecord4(mod.islandRegistry))
@@ -7814,13 +7711,13 @@ var frameworks, isRecord4 = (value) => typeof value === "object" && value !== nu
7814
7711
  return mod.default;
7815
7712
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
7816
7713
  }, hasSvelteImport = (source) => /from\s+['"][^'"]+\.svelte['"]/.test(source), normalizeImportPath = (wrapperPath, targetPath) => {
7817
- const importPath = relative4(dirname7(wrapperPath), targetPath).replace(/\\/g, "/");
7714
+ const importPath = relative3(dirname6(wrapperPath), targetPath).replace(/\\/g, "/");
7818
7715
  return importPath.startsWith(".") ? importPath : `./${importPath}`;
7819
7716
  }, isIdentifier = (value) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value), resolveIslandSourcePath = (registryPath, sourcePath) => {
7820
7717
  if (sourcePath.startsWith("file://")) {
7821
7718
  return new URL(sourcePath).pathname;
7822
7719
  }
7823
- return resolve7(dirname7(registryPath), sourcePath);
7720
+ return resolve6(dirname6(registryPath), sourcePath);
7824
7721
  }, getObjectPropertyName = (name) => {
7825
7722
  if (ts.isIdentifier(name) || ts.isStringLiteral(name)) {
7826
7723
  return name.text;
@@ -8038,16 +7935,16 @@ export default component;
8038
7935
  buildPath,
8039
7936
  clientPathMaps = {}
8040
7937
  }) => {
8041
- const generatedRoot = join8(buildPath, "_island_entries");
7938
+ const generatedRoot = join7(buildPath, "_island_entries");
8042
7939
  rmSync(generatedRoot, { force: true, recursive: true });
8043
7940
  const entries = [];
8044
7941
  for (const definition of buildInfo.definitions) {
8045
- const entryPath = join8(generatedRoot, "islands", definition.framework, `${definition.component}.ts`);
7942
+ const entryPath = join7(generatedRoot, "islands", definition.framework, `${definition.component}.ts`);
8046
7943
  const { buildReference } = definition;
8047
7944
  const source = buildReference ? resolveIslandSourcePath(buildInfo.resolvedRegistryPath, buildReference.source) : null;
8048
7945
  const compiledSourcePath = source && shouldUseCompiledClientPath(definition.framework, source) ? clientPathMaps[definition.framework]?.get(source) : undefined;
8049
7946
  const entrySource = source && (compiledSourcePath || !shouldUseCompiledClientPath(definition.framework, source)) ? createDirectEntrySource(entryPath, compiledSourcePath ?? source, compiledSourcePath ? undefined : buildReference?.export) : createRegistryEntrySource(entryPath, buildInfo.resolvedRegistryPath, buildInfo.hasNamedExport, definition.framework, definition.component);
8050
- mkdirSync(dirname7(entryPath), { recursive: true });
7947
+ mkdirSync(dirname6(entryPath), { recursive: true });
8051
7948
  writeFileSync2(entryPath, entrySource);
8052
7949
  entries.push({
8053
7950
  component: definition.component,
@@ -8060,7 +7957,7 @@ export default component;
8060
7957
  generatedRoot
8061
7958
  };
8062
7959
  }, loadIslandRegistryBuildInfo = async (registryPath) => {
8063
- const resolvedRegistryPath = resolve7(registryPath);
7960
+ const resolvedRegistryPath = resolve6(registryPath);
8064
7961
  const registrySource = Bun.file(resolvedRegistryPath);
8065
7962
  const registrySourceText = await registrySource.text();
8066
7963
  const parsedInfo = parseIslandRegistryBuildInfo(registrySourceText, resolvedRegistryPath);
@@ -8413,7 +8310,7 @@ var init_sourceMetadata = __esm(() => {
8413
8310
 
8414
8311
  // src/islands/pageMetadata.ts
8415
8312
  import { readFileSync as readFileSync7 } from "fs";
8416
- import { dirname as dirname8, resolve as resolve10 } from "path";
8313
+ import { dirname as dirname7, resolve as resolve9 } from "path";
8417
8314
  var pagePatterns, getPageDirs = (config) => [
8418
8315
  { dir: config.angularDirectory, framework: "angular" },
8419
8316
  { dir: config.emberDirectory, framework: "ember" },
@@ -8433,15 +8330,15 @@ var pagePatterns, getPageDirs = (config) => [
8433
8330
  const source = definition.buildReference?.source;
8434
8331
  if (!source)
8435
8332
  continue;
8436
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve10(dirname8(buildInfo.resolvedRegistryPath), source);
8437
- lookup.set(`${definition.framework}:${definition.component}`, resolve10(resolvedSource));
8333
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve9(dirname7(buildInfo.resolvedRegistryPath), source);
8334
+ lookup.set(`${definition.framework}:${definition.component}`, resolve9(resolvedSource));
8438
8335
  }
8439
8336
  return lookup;
8440
8337
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, metadataUsesSource = (metadata2, target) => metadata2.islands.some((usage) => {
8441
8338
  const candidate = usage.source;
8442
- return candidate ? resolve10(candidate) === target : false;
8339
+ return candidate ? resolve9(candidate) === target : false;
8443
8340
  }), getPagesUsingIslandSource = (sourcePath) => {
8444
- const target = resolve10(sourcePath);
8341
+ const target = resolve9(sourcePath);
8445
8342
  return [...getCurrentPageIslandMetadata().values()].filter((metadata2) => metadataUsesSource(metadata2, target)).map((metadata2) => metadata2.pagePath);
8446
8343
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
8447
8344
  const sourcePath = islandSourceLookup.get(`${usage.framework}:${usage.component}`);
@@ -8453,13 +8350,13 @@ var pagePatterns, getPageDirs = (config) => [
8453
8350
  const pattern = pagePatterns[entry.framework];
8454
8351
  if (!pattern)
8455
8352
  return;
8456
- const files = await scanEntryPoints(resolve10(entry.dir), pattern);
8353
+ const files = await scanEntryPoints(resolve9(entry.dir), pattern);
8457
8354
  for (const filePath of files) {
8458
8355
  const source = readFileSync7(filePath, "utf-8");
8459
8356
  const islands = extractIslandUsagesFromSource(source);
8460
- pageMetadata.set(resolve10(filePath), {
8357
+ pageMetadata.set(resolve9(filePath), {
8461
8358
  islands: resolveIslandUsages(islands, islandSourceLookup),
8462
- pagePath: resolve10(filePath)
8359
+ pagePath: resolve9(filePath)
8463
8360
  });
8464
8361
  }
8465
8362
  }, loadPageIslandMetadata = async (config) => {
@@ -8664,12 +8561,12 @@ var init_startupBanner = __esm(() => {
8664
8561
  // src/utils/logger.ts
8665
8562
  var colors2, frameworkColors, formatPath = (filePath) => {
8666
8563
  const cwd = process.cwd();
8667
- let relative5 = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
8668
- relative5 = relative5.replace(/\\/g, "/");
8669
- if (!relative5.startsWith("/")) {
8670
- relative5 = `/${relative5}`;
8564
+ let relative4 = filePath.startsWith(cwd) ? filePath.slice(cwd.length + 1) : filePath;
8565
+ relative4 = relative4.replace(/\\/g, "/");
8566
+ if (!relative4.startsWith("/")) {
8567
+ relative4 = `/${relative4}`;
8671
8568
  }
8672
- return relative5;
8569
+ return relative4;
8673
8570
  }, getFrameworkColor = (framework) => frameworkColors[framework] || colors2.white, log = (action, options) => {
8674
8571
  const timestamp = `${colors2.dim}${formatTimestamp()}${colors2.reset}`;
8675
8572
  const tag = `${colors2.cyan}[hmr]${colors2.reset}`;
@@ -8772,9 +8669,9 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8772
8669
  }, generateManifest = (outputs, buildPath) => outputs.reduce((manifest, artifact) => {
8773
8670
  const normalizedArtifactPath = normalizePath(artifact.path);
8774
8671
  const normalizedBuildPath = normalizePath(buildPath);
8775
- let relative5 = normalizedArtifactPath.startsWith(normalizedBuildPath) ? normalizedArtifactPath.slice(normalizedBuildPath.length) : normalizedArtifactPath;
8776
- relative5 = relative5.replace(/^\/+/, "");
8777
- const segments = relative5.split("/");
8672
+ let relative4 = normalizedArtifactPath.startsWith(normalizedBuildPath) ? normalizedArtifactPath.slice(normalizedBuildPath.length) : normalizedArtifactPath;
8673
+ relative4 = relative4.replace(/^\/+/, "");
8674
+ const segments = relative4.split("/");
8778
8675
  const fileWithHash = segments.pop();
8779
8676
  if (!fileWithHash)
8780
8677
  return manifest;
@@ -8788,15 +8685,15 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8788
8685
  if (segments.includes("server"))
8789
8686
  return manifest;
8790
8687
  const cssKey = getCssKey(pascalName, segments);
8791
- if (manifest[cssKey] && manifest[cssKey] !== `/${relative5}`)
8792
- logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative5}". Use unique page names across frameworks.`);
8793
- manifest[cssKey] = `/${relative5}`;
8688
+ if (manifest[cssKey] && manifest[cssKey] !== `/${relative4}`)
8689
+ logWarn(`Duplicate manifest key "${cssKey}" \u2014 "${manifest[cssKey]}" will be overwritten by "/${relative4}". Use unique page names across frameworks.`);
8690
+ manifest[cssKey] = `/${relative4}`;
8794
8691
  return manifest;
8795
8692
  }
8796
8693
  const frameworkSegment = islandIndex > UNFOUND_INDEX ? segments[islandIndex + 1] : undefined;
8797
8694
  if (frameworkSegment === "react" || frameworkSegment === "svelte" || frameworkSegment === "vue" || frameworkSegment === "angular") {
8798
8695
  const manifestKey2 = getIslandManifestKey(frameworkSegment, pascalName);
8799
- manifest[manifestKey2] = `/${relative5}`;
8696
+ manifest[manifestKey2] = `/${relative4}`;
8800
8697
  return manifest;
8801
8698
  }
8802
8699
  const idx = segments.findIndex((seg) => seg === "indexes" || seg === "pages" || seg === "client");
@@ -8807,10 +8704,10 @@ var getManifestKey = (folder, pascalName, isClientComponent, isReact, isVue, isS
8807
8704
  const isAngular = segments.some((seg) => seg === "angular");
8808
8705
  const isClientComponent = segments.includes("client");
8809
8706
  const manifestKey = getManifestKey(folder, pascalName, isClientComponent, isReact, isVue, isSvelte, isAngular);
8810
- if (manifest[manifestKey] && manifest[manifestKey] !== `/${relative5}`) {
8811
- logWarn(`Duplicate manifest key "${manifestKey}" \u2014 "${manifest[manifestKey]}" will be overwritten by "/${relative5}". Use unique page names across frameworks.`);
8707
+ if (manifest[manifestKey] && manifest[manifestKey] !== `/${relative4}`) {
8708
+ logWarn(`Duplicate manifest key "${manifestKey}" \u2014 "${manifest[manifestKey]}" will be overwritten by "/${relative4}". Use unique page names across frameworks.`);
8812
8709
  }
8813
- manifest[manifestKey] = `/${relative5}`;
8710
+ manifest[manifestKey] = `/${relative4}`;
8814
8711
  return manifest;
8815
8712
  }, {});
8816
8713
  var init_generateManifest = __esm(() => {
@@ -8819,7 +8716,7 @@ var init_generateManifest = __esm(() => {
8819
8716
  });
8820
8717
 
8821
8718
  // src/build/verifyAngularCoreUniqueness.ts
8822
- import { resolve as resolve11 } from "path";
8719
+ import { resolve as resolve10 } from "path";
8823
8720
  var ANGULAR_CORE_IMPORT_RE, ANGULAR_CORE_PACKAGE_RE, classifySpecifier = (specifier, artifactPath, serverOutDir) => {
8824
8721
  if (!ANGULAR_CORE_PACKAGE_RE.test(specifier))
8825
8722
  return null;
@@ -8829,9 +8726,9 @@ var ANGULAR_CORE_IMPORT_RE, ANGULAR_CORE_PACKAGE_RE, classifySpecifier = (specif
8829
8726
  if (specifier.startsWith("/")) {
8830
8727
  absolute = specifier;
8831
8728
  } else if (specifier.startsWith(".")) {
8832
- absolute = resolve11(artifactPath, "..", specifier);
8729
+ absolute = resolve10(artifactPath, "..", specifier);
8833
8730
  } else {
8834
- absolute = serverOutDir ? resolve11(serverOutDir, specifier) : resolve11(artifactPath, "..", specifier);
8731
+ absolute = serverOutDir ? resolve10(serverOutDir, specifier) : resolve10(artifactPath, "..", specifier);
8835
8732
  }
8836
8733
  return {
8837
8734
  kind: "resolved",
@@ -8896,18 +8793,18 @@ var init_verifyAngularCoreUniqueness = __esm(() => {
8896
8793
  // src/build/generateReactIndexes.ts
8897
8794
  import { existsSync as existsSync7, mkdirSync as mkdirSync2 } from "fs";
8898
8795
  import { readdir as readdir2, rm, writeFile } from "fs/promises";
8899
- import { basename as basename3, join as join9, relative as relative5, resolve as resolve12, sep } from "path";
8796
+ import { basename as basename3, join as join8, relative as relative4, resolve as resolve11, sep } from "path";
8900
8797
  var {Glob: Glob2 } = globalThis.Bun;
8901
8798
  var indexContentCache, resolveDevClientDir = () => {
8902
8799
  const projectRoot = process.cwd();
8903
- const fromSource = resolve12(import.meta.dir, "../dev/client");
8800
+ const fromSource = resolve11(import.meta.dir, "../dev/client");
8904
8801
  if (existsSync7(fromSource) && fromSource.startsWith(projectRoot)) {
8905
8802
  return fromSource;
8906
8803
  }
8907
- const fromNodeModules = resolve12(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
8804
+ const fromNodeModules = resolve11(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
8908
8805
  if (existsSync7(fromNodeModules))
8909
8806
  return fromNodeModules;
8910
- return resolve12(import.meta.dir, "./dev/client");
8807
+ return resolve11(import.meta.dir, "./dev/client");
8911
8808
  }, devClientDir, errorOverlayPath, hmrClientPath, refreshSetupPath, generateReactIndexFiles = async (reactPagesDirectory, reactIndexesDirectory, isDev2 = false) => {
8912
8809
  if (!existsSync7(reactIndexesDirectory)) {
8913
8810
  mkdirSync2(reactIndexesDirectory, { recursive: true });
@@ -8929,13 +8826,13 @@ var indexContentCache, resolveDevClientDir = () => {
8929
8826
  });
8930
8827
  if (staleIndexes.length > 0) {
8931
8828
  await Promise.all(staleIndexes.map((indexFile) => {
8932
- indexContentCache.delete(join9(reactIndexesDirectory, indexFile));
8933
- return rm(join9(reactIndexesDirectory, indexFile), {
8829
+ indexContentCache.delete(join8(reactIndexesDirectory, indexFile));
8830
+ return rm(join8(reactIndexesDirectory, indexFile), {
8934
8831
  force: true
8935
8832
  });
8936
8833
  }));
8937
8834
  }
8938
- const pagesRelPath = relative5(resolve12(reactIndexesDirectory), resolve12(reactPagesDirectory)).split(sep).join("/");
8835
+ const pagesRelPath = relative4(resolve11(reactIndexesDirectory), resolve11(reactPagesDirectory)).split(sep).join("/");
8939
8836
  const promises = files.map(async (file2) => {
8940
8837
  const fileName = basename3(file2);
8941
8838
  const componentName = fileName.split(".")[0];
@@ -9209,11 +9106,11 @@ var indexContentCache, resolveDevClientDir = () => {
9209
9106
  `
9210
9107
  // Pre-warm: import the page module from the module server`,
9211
9108
  `// immediately so the browser caches all /@src/ URLs.`,
9212
- `import('/@src/${relative5(process.cwd(), resolve12(reactPagesDirectory, `${componentName}.tsx`)).replace(/\\/g, "/")}').catch(() => {});`
9109
+ `import('/@src/${relative4(process.cwd(), resolve11(reactPagesDirectory, `${componentName}.tsx`)).replace(/\\/g, "/")}').catch(() => {});`
9213
9110
  ] : []
9214
9111
  ].join(`
9215
9112
  `);
9216
- const indexPath = join9(reactIndexesDirectory, `${componentName}.tsx`);
9113
+ const indexPath = join8(reactIndexesDirectory, `${componentName}.tsx`);
9217
9114
  const hasher = new Bun.CryptoHasher("md5");
9218
9115
  hasher.update(content);
9219
9116
  const contentHash = hasher.digest("hex");
@@ -9227,7 +9124,7 @@ var indexContentCache, resolveDevClientDir = () => {
9227
9124
  if (!isDev2) {
9228
9125
  return;
9229
9126
  }
9230
- const refreshPath = join9(reactIndexesDirectory, "_refresh.tsx");
9127
+ const refreshPath = join8(reactIndexesDirectory, "_refresh.tsx");
9231
9128
  if (!existsSync7(refreshPath)) {
9232
9129
  await writeFile(refreshPath, `import '${refreshSetupPath}';
9233
9130
  import 'react';
@@ -9238,9 +9135,9 @@ import 'react-dom/client';
9238
9135
  var init_generateReactIndexes = __esm(() => {
9239
9136
  indexContentCache = new Map;
9240
9137
  devClientDir = resolveDevClientDir();
9241
- errorOverlayPath = join9(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
9242
- hmrClientPath = join9(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
9243
- refreshSetupPath = join9(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
9138
+ errorOverlayPath = join8(devClientDir, "errorOverlay.ts").replace(/\\/g, "/");
9139
+ hmrClientPath = join8(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
9140
+ refreshSetupPath = join8(devClientDir, "reactRefreshSetup.ts").replace(/\\/g, "/");
9244
9141
  });
9245
9142
 
9246
9143
  // src/build/wrapHTMLScript.ts
@@ -9377,7 +9274,7 @@ var init_scanCssEntryPoints = __esm(() => {
9377
9274
 
9378
9275
  // src/utils/imageProcessing.ts
9379
9276
  import { existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync8, writeFileSync as writeFileSync4 } from "fs";
9380
- import { join as join10, resolve as resolve13 } from "path";
9277
+ import { join as join9, resolve as resolve12 } from "path";
9381
9278
  var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
9382
9279
  for (const size of sizes) {
9383
9280
  if (size >= target)
@@ -9432,7 +9329,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
9432
9329
  const image2 = config?.imageSizes ?? DEFAULT_IMAGE_SIZES;
9433
9330
  return [...device, ...image2].sort((left, right) => left - right);
9434
9331
  }, getCacheDir = (buildDir) => {
9435
- const dir = join10(buildDir, ".cache", "images");
9332
+ const dir = join9(buildDir, ".cache", "images");
9436
9333
  if (!existsSync10(dir))
9437
9334
  mkdirSync3(dir, { recursive: true });
9438
9335
  return dir;
@@ -9489,8 +9386,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
9489
9386
  return toBuffer(buffer);
9490
9387
  }
9491
9388
  }, readFromCache = (cacheDir, cacheKey) => {
9492
- const metaPath = join10(cacheDir, `${cacheKey}.meta`);
9493
- const dataPath = join10(cacheDir, `${cacheKey}.data`);
9389
+ const metaPath = join9(cacheDir, `${cacheKey}.meta`);
9390
+ const dataPath = join9(cacheDir, `${cacheKey}.data`);
9494
9391
  if (!existsSync10(metaPath) || !existsSync10(dataPath))
9495
9392
  return null;
9496
9393
  try {
@@ -9505,7 +9402,7 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
9505
9402
  return sharpModule;
9506
9403
  sharpLoaded = true;
9507
9404
  try {
9508
- const sharpPath = resolve13(process.cwd(), "node_modules/sharp");
9405
+ const sharpPath = resolve12(process.cwd(), "node_modules/sharp");
9509
9406
  const mod = await import(sharpPath);
9510
9407
  sharpModule = mod.default ?? mod;
9511
9408
  return sharpModule;
@@ -9517,8 +9414,8 @@ var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY, OPTIMIZATION_END
9517
9414
  return null;
9518
9415
  }
9519
9416
  }, writeToCache = (cacheDir, cacheKey, buffer, meta) => {
9520
- const metaPath = join10(cacheDir, `${cacheKey}.meta`);
9521
- const dataPath = join10(cacheDir, `${cacheKey}.data`);
9417
+ const metaPath = join9(cacheDir, `${cacheKey}.meta`);
9418
+ const dataPath = join9(cacheDir, `${cacheKey}.data`);
9522
9419
  writeFileSync4(dataPath, buffer);
9523
9420
  writeFileSync4(metaPath, JSON.stringify(meta));
9524
9421
  };
@@ -9606,7 +9503,7 @@ var init_optimizeHtmlImages = __esm(() => {
9606
9503
  // src/cli/scripts/telemetry.ts
9607
9504
  import { existsSync as existsSync11, mkdirSync as mkdirSync4, readFileSync as readFileSync9, writeFileSync as writeFileSync5 } from "fs";
9608
9505
  import { homedir } from "os";
9609
- import { join as join11 } from "path";
9506
+ import { join as join10 } from "path";
9610
9507
  var configDir, configPath, getTelemetryConfig = () => {
9611
9508
  try {
9612
9509
  if (!existsSync11(configPath))
@@ -9619,14 +9516,14 @@ var configDir, configPath, getTelemetryConfig = () => {
9619
9516
  }
9620
9517
  };
9621
9518
  var init_telemetry = __esm(() => {
9622
- configDir = join11(homedir(), ".absolutejs");
9623
- configPath = join11(configDir, "telemetry.json");
9519
+ configDir = join10(homedir(), ".absolutejs");
9520
+ configPath = join10(configDir, "telemetry.json");
9624
9521
  });
9625
9522
 
9626
9523
  // src/cli/telemetryEvent.ts
9627
9524
  import { existsSync as existsSync12, readFileSync as readFileSync10 } from "fs";
9628
9525
  import { arch, platform } from "os";
9629
- import { dirname as dirname9, join as join12, parse } from "path";
9526
+ import { dirname as dirname8, join as join11, parse } from "path";
9630
9527
  var checkCandidate = (candidate) => {
9631
9528
  if (!existsSync12(candidate)) {
9632
9529
  return null;
@@ -9646,12 +9543,12 @@ var checkCandidate = (candidate) => {
9646
9543
  }, findPackageVersion = () => {
9647
9544
  let { dir } = import.meta;
9648
9545
  while (dir !== parse(dir).root) {
9649
- const candidate = join12(dir, "package.json");
9546
+ const candidate = join11(dir, "package.json");
9650
9547
  const version = checkCandidate(candidate);
9651
9548
  if (version) {
9652
9549
  return version;
9653
9550
  }
9654
- dir = dirname9(dir);
9551
+ dir = dirname8(dir);
9655
9552
  }
9656
9553
  return "unknown";
9657
9554
  }, sendTelemetryEvent = (event, payload) => {
@@ -9737,18 +9634,18 @@ var init_updateAssetPaths = __esm(() => {
9737
9634
 
9738
9635
  // src/dev/buildHMRClient.ts
9739
9636
  import { existsSync as existsSync13 } from "fs";
9740
- import { resolve as resolve14 } from "path";
9637
+ import { resolve as resolve13 } from "path";
9741
9638
  var {build: bunBuild } = globalThis.Bun;
9742
9639
  var resolveHmrClientPath = () => {
9743
9640
  const projectRoot = process.cwd();
9744
- const fromSource = resolve14(import.meta.dir, "client/hmrClient.ts");
9641
+ const fromSource = resolve13(import.meta.dir, "client/hmrClient.ts");
9745
9642
  if (existsSync13(fromSource) && fromSource.startsWith(projectRoot)) {
9746
9643
  return fromSource;
9747
9644
  }
9748
- const fromNodeModules = resolve14(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
9645
+ const fromNodeModules = resolve13(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client/hmrClient.ts");
9749
9646
  if (existsSync13(fromNodeModules))
9750
9647
  return fromNodeModules;
9751
- return resolve14(import.meta.dir, "dev/client/hmrClient.ts");
9648
+ return resolve13(import.meta.dir, "dev/client/hmrClient.ts");
9752
9649
  }, hmrClientPath2, buildHMRClient = async () => {
9753
9650
  const entryPoint = hmrClientPath2;
9754
9651
  const result = await bunBuild({
@@ -9778,7 +9675,7 @@ var init_buildHMRClient = __esm(() => {
9778
9675
  // src/build/nativeRewrite.ts
9779
9676
  import { dlopen, FFIType, ptr } from "bun:ffi";
9780
9677
  import { platform as platform2, arch as arch2 } from "os";
9781
- import { resolve as resolve15 } from "path";
9678
+ import { resolve as resolve14 } from "path";
9782
9679
  var ffiDefinition, nativeLib = null, loadNative = () => {
9783
9680
  if (nativeLib !== null)
9784
9681
  return nativeLib;
@@ -9796,7 +9693,7 @@ var ffiDefinition, nativeLib = null, loadNative = () => {
9796
9693
  if (!libPath)
9797
9694
  return null;
9798
9695
  try {
9799
- const fullPath = resolve15(import.meta.dir, "../../native/packages", libPath);
9696
+ const fullPath = resolve14(import.meta.dir, "../../native/packages", libPath);
9800
9697
  const lib = dlopen(fullPath, ffiDefinition);
9801
9698
  nativeLib = lib.symbols;
9802
9699
  return nativeLib;
@@ -9942,7 +9839,7 @@ var devVendorPaths = null, getDevVendorPaths = () => devVendorPaths, setDevVendo
9942
9839
 
9943
9840
  // src/build/angularLinkerPlugin.ts
9944
9841
  import { existsSync as existsSync14, mkdirSync as mkdirSync5, readFileSync as readFileSync11, writeFileSync as writeFileSync6 } from "fs";
9945
- import { dirname as dirname10, join as join13, relative as relative6, resolve as resolve16 } from "path";
9842
+ import { dirname as dirname9, join as join12, relative as relative5, resolve as resolve15 } from "path";
9946
9843
  import { createHash as createHash3 } from "crypto";
9947
9844
  var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
9948
9845
  name: "angular-linker",
@@ -9950,7 +9847,7 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
9950
9847
  let needsLinking;
9951
9848
  let babelTransform;
9952
9849
  let linkerPlugin;
9953
- const cacheDir = join13(CACHE_ROOT, linkerJitMode ? "jit" : "aot");
9850
+ const cacheDir = join12(CACHE_ROOT, linkerJitMode ? "jit" : "aot");
9954
9851
  bld.onLoad({ filter: /[\\/]@angular[\\/].*\.m?js$/ }, async (args) => {
9955
9852
  const source = await Bun.file(args.path).text();
9956
9853
  if (!needsLinking) {
@@ -9963,7 +9860,7 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
9963
9860
  return;
9964
9861
  }
9965
9862
  const hash = createHash3("md5").update(source).digest("hex");
9966
- const cachePath = join13(cacheDir, `${hash}.js`);
9863
+ const cachePath = join12(cacheDir, `${hash}.js`);
9967
9864
  if (existsSync14(cachePath)) {
9968
9865
  return {
9969
9866
  contents: readFileSync11(cachePath, "utf-8"),
@@ -9980,11 +9877,11 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
9980
9877
  const mod = await import(linkerSpecifier);
9981
9878
  linkerPlugin = mod.createEs2015LinkerPlugin({
9982
9879
  fileSystem: {
9983
- dirname: dirname10,
9880
+ dirname: dirname9,
9984
9881
  exists: existsSync14,
9985
9882
  readFile: readFileSync11,
9986
- relative: relative6,
9987
- resolve: resolve16
9883
+ relative: relative5,
9884
+ resolve: resolve15
9988
9885
  },
9989
9886
  linkerJitMode,
9990
9887
  logger: {
@@ -10015,7 +9912,7 @@ var CACHE_ROOT, createAngularLinkerPlugin = (linkerJitMode) => ({
10015
9912
  }
10016
9913
  }), angularLinkerPlugin;
10017
9914
  var init_angularLinkerPlugin = __esm(() => {
10018
- CACHE_ROOT = resolve16(".absolutejs", "cache", "angular-linker");
9915
+ CACHE_ROOT = resolve15(".absolutejs", "cache", "angular-linker");
10019
9916
  angularLinkerPlugin = createAngularLinkerPlugin(false);
10020
9917
  });
10021
9918
 
@@ -10026,7 +9923,7 @@ __export(exports_hmrInjectionPlugin, {
10026
9923
  applyAngularHmrInjection: () => applyAngularHmrInjection
10027
9924
  });
10028
9925
  import { readFile as readFile5 } from "fs/promises";
10029
- import { relative as relative7, resolve as resolve17 } from "path";
9926
+ import { relative as relative6, resolve as resolve16 } from "path";
10030
9927
  var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames = (jsSource) => {
10031
9928
  const names = new Set;
10032
9929
  IMPORT_RE.lastIndex = 0;
@@ -10189,7 +10086,7 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
10189
10086
  }
10190
10087
  `, applyAngularHmrInjection = (jsSource, componentJsAbsPath, params) => {
10191
10088
  const { generatedAngularRoot, userAngularRoot, projectRoot } = params;
10192
- const normalizedGenRoot = resolve17(generatedAngularRoot).replace(/\\/g, "/");
10089
+ const normalizedGenRoot = resolve16(generatedAngularRoot).replace(/\\/g, "/");
10193
10090
  const normalizedPath = componentJsAbsPath.replace(/\\/g, "/");
10194
10091
  if (!normalizedPath.startsWith(normalizedGenRoot + "/"))
10195
10092
  return;
@@ -10206,9 +10103,9 @@ var ENTITY_DECORATOR_RE, IMPORT_RE, TOP_LEVEL_DECL_RE, extractAllTopLevelNames =
10206
10103
  }
10207
10104
  if (classNames.length === 0)
10208
10105
  return;
10209
- const relFromGenRoot = relative7(generatedAngularRoot, componentJsAbsPath).replace(/\\/g, "/");
10210
- const userTsPath = resolve17(userAngularRoot, relFromGenRoot.replace(/\.js$/, ".ts"));
10211
- const projectRel = relative7(projectRoot, userTsPath).replace(/\\/g, "/");
10106
+ const relFromGenRoot = relative6(generatedAngularRoot, componentJsAbsPath).replace(/\\/g, "/");
10107
+ const userTsPath = resolve16(userAngularRoot, relFromGenRoot.replace(/\.js$/, ".ts"));
10108
+ const projectRel = relative6(projectRoot, userTsPath).replace(/\\/g, "/");
10212
10109
  const tail = classNames.map((className) => {
10213
10110
  const id = `${projectRel}@${className}`;
10214
10111
  return buildHmrTail(className, JSON.stringify(id));
@@ -10242,17 +10139,17 @@ var init_hmrInjectionPlugin = __esm(() => {
10242
10139
 
10243
10140
  // src/utils/cleanStaleOutputs.ts
10244
10141
  import { rm as rm2 } from "fs/promises";
10245
- import { resolve as resolve18 } from "path";
10142
+ import { resolve as resolve17 } from "path";
10246
10143
  var {Glob: Glob5 } = globalThis.Bun;
10247
10144
  var HASHED_FILE_PATTERN, cleanStaleOutputs = async (buildPath, currentOutputPaths) => {
10248
- const currentPaths = new Set(currentOutputPaths.map((path) => resolve18(path)));
10145
+ const currentPaths = new Set(currentOutputPaths.map((path) => resolve17(path)));
10249
10146
  const glob = new Glob5("**/*");
10250
10147
  const removals = [];
10251
- for (const relative8 of glob.scanSync({ cwd: buildPath })) {
10252
- const absolute = resolve18(buildPath, relative8);
10148
+ for (const relative7 of glob.scanSync({ cwd: buildPath })) {
10149
+ const absolute = resolve17(buildPath, relative7);
10253
10150
  if (currentPaths.has(absolute))
10254
10151
  continue;
10255
- if (!HASHED_FILE_PATTERN.test(relative8))
10152
+ if (!HASHED_FILE_PATTERN.test(relative7))
10256
10153
  continue;
10257
10154
  removals.push(rm2(absolute, { force: true }));
10258
10155
  }
@@ -10268,20 +10165,20 @@ __export(exports_generatedDir, {
10268
10165
  getGeneratedRoot: () => getGeneratedRoot,
10269
10166
  getFrameworkGeneratedDir: () => getFrameworkGeneratedDir
10270
10167
  });
10271
- import { join as join14 } from "path";
10272
- var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join14(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join14(getGeneratedRoot(projectRoot), framework);
10168
+ import { join as join13 } from "path";
10169
+ var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", getGeneratedRoot = (projectRoot = process.cwd()) => join13(projectRoot, ABSOLUTE_CACHE_DIR_NAME, GENERATED_DIR_NAME), getFrameworkGeneratedDir = (framework, projectRoot = process.cwd()) => join13(getGeneratedRoot(projectRoot), framework);
10273
10170
  var init_generatedDir = () => {};
10274
10171
 
10275
10172
  // src/utils/cleanup.ts
10276
10173
  import { rm as rm3 } from "fs/promises";
10277
- import { join as join15 } from "path";
10174
+ import { join as join14 } from "path";
10278
10175
  var removeIfExists = (path) => rm3(path, { force: true, recursive: true }), cleanFramework = (framework, frameworkDir, skipGenerated = false) => {
10279
10176
  const tasks = [];
10280
10177
  if (!skipGenerated) {
10281
10178
  tasks.push(removeIfExists(getFrameworkGeneratedDir(framework)));
10282
10179
  }
10283
10180
  if (frameworkDir)
10284
- tasks.push(removeIfExists(join15(frameworkDir, "generated")));
10181
+ tasks.push(removeIfExists(join14(frameworkDir, "generated")));
10285
10182
  return Promise.all(tasks);
10286
10183
  }, cleanup = async ({
10287
10184
  angularDir,
@@ -10320,7 +10217,7 @@ var init_commonAncestor = () => {};
10320
10217
 
10321
10218
  // src/utils/buildDirectoryLock.ts
10322
10219
  import { mkdirSync as mkdirSync6, unlinkSync, writeFileSync as writeFileSync7, readFileSync as readFileSync12 } from "fs";
10323
- import { dirname as dirname11, join as join16 } from "path";
10220
+ import { dirname as dirname10, join as join15 } from "path";
10324
10221
  var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandlersRegistered = false, registerExitHandlersOnce = () => {
10325
10222
  if (exitHandlersRegistered)
10326
10223
  return;
@@ -10346,7 +10243,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
10346
10243
  releaseAllSync();
10347
10244
  throw err;
10348
10245
  });
10349
- }, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join16(dirname11(buildDirectory), ".absolutejs", "build.lock"), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
10246
+ }, isAlreadyExistsError = (error) => error instanceof Error && ("code" in error) && error.code === "EEXIST", lockPathForBuildDirectory = (buildDirectory) => join15(dirname10(buildDirectory), ".absolutejs", "build.lock"), readHeldLockEnv = () => new Set((process.env[HELD_LOCKS_ENV] ?? "").split(`
10350
10247
  `).filter((entry) => entry.length > 0)), writeHeldLockEnv = (locks) => {
10351
10248
  if (locks.size === 0) {
10352
10249
  delete process.env[HELD_LOCKS_ENV];
@@ -10363,7 +10260,7 @@ var heldLocks, HELD_LOCKS_ENV = "ABSOLUTE_HELD_BUILD_DIRECTORY_LOCKS", exitHandl
10363
10260
  locks.delete(buildDirectory);
10364
10261
  writeHeldLockEnv(locks);
10365
10262
  }, writeLockFileSync = (lockPath, metadata2) => {
10366
- mkdirSync6(dirname11(lockPath), { recursive: true });
10263
+ mkdirSync6(dirname10(lockPath), { recursive: true });
10367
10264
  writeFileSync7(lockPath, JSON.stringify(metadata2, null, 2), { flag: "wx" });
10368
10265
  }, readLockMetadata = (lockPath) => {
10369
10266
  try {
@@ -10483,11 +10380,11 @@ var init_buildDirectoryLock = __esm(() => {
10483
10380
  });
10484
10381
 
10485
10382
  // src/utils/validateSafePath.ts
10486
- import { resolve as resolve19, relative as relative8 } from "path";
10383
+ import { resolve as resolve18, relative as relative7 } from "path";
10487
10384
  var validateSafePath = (targetPath, baseDirectory) => {
10488
- const absoluteBase = resolve19(baseDirectory);
10489
- const absoluteTarget = resolve19(baseDirectory, targetPath);
10490
- const relativePath = normalizePath(relative8(absoluteBase, absoluteTarget));
10385
+ const absoluteBase = resolve18(baseDirectory);
10386
+ const absoluteTarget = resolve18(baseDirectory, targetPath);
10387
+ const relativePath = normalizePath(relative7(absoluteBase, absoluteTarget));
10491
10388
  if (relativePath.startsWith("../") || relativePath === "..") {
10492
10389
  throw new Error(`Unsafe path: ${targetPath}`);
10493
10390
  }
@@ -10558,32 +10455,32 @@ __export(exports_compileSvelte, {
10558
10455
  clearSvelteCompilerCache: () => clearSvelteCompilerCache
10559
10456
  });
10560
10457
  import { existsSync as existsSync15 } from "fs";
10561
- import { mkdir as mkdir4, stat as stat2 } from "fs/promises";
10458
+ import { mkdir as mkdir3, stat as stat2 } from "fs/promises";
10562
10459
  import {
10563
- dirname as dirname12,
10564
- join as join17,
10460
+ dirname as dirname11,
10461
+ join as join16,
10565
10462
  basename as basename5,
10566
10463
  extname as extname5,
10567
- resolve as resolve20,
10568
- relative as relative9,
10464
+ resolve as resolve19,
10465
+ relative as relative8,
10569
10466
  sep as sep2
10570
10467
  } from "path";
10571
10468
  import { env as env2 } from "process";
10572
- var {write, file: file2, Transpiler: Transpiler2 } = globalThis.Bun;
10469
+ var {write, file: file2, Transpiler } = globalThis.Bun;
10573
10470
  var resolveDevClientDir2 = () => {
10574
10471
  const projectRoot = process.cwd();
10575
- const fromSource = resolve20(import.meta.dir, "../dev/client");
10472
+ const fromSource = resolve19(import.meta.dir, "../dev/client");
10576
10473
  if (existsSync15(fromSource) && fromSource.startsWith(projectRoot)) {
10577
10474
  return fromSource;
10578
10475
  }
10579
- const fromNodeModules = resolve20(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
10476
+ const fromNodeModules = resolve19(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
10580
10477
  if (existsSync15(fromNodeModules))
10581
10478
  return fromNodeModules;
10582
- return resolve20(import.meta.dir, "./dev/client");
10479
+ return resolve19(import.meta.dir, "./dev/client");
10583
10480
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, clearSvelteCompilerCache = () => {
10584
10481
  persistentCache.clear();
10585
10482
  sourceHashCache.clear();
10586
- }, transpiler3, removeUnusedRequireHelper = (code) => {
10483
+ }, transpiler2, removeUnusedRequireHelper = (code) => {
10587
10484
  const helperStart = code.indexOf("var __require = /* @__PURE__ */");
10588
10485
  if (helperStart === -1) {
10589
10486
  return code;
@@ -10609,7 +10506,7 @@ var resolveDevClientDir2 = () => {
10609
10506
  }, resolveRelativeModule2 = async (spec, from) => {
10610
10507
  if (!spec.startsWith("."))
10611
10508
  return null;
10612
- const basePath = resolve20(dirname12(from), spec);
10509
+ const basePath = resolve19(dirname11(from), spec);
10613
10510
  const candidates = [
10614
10511
  basePath,
10615
10512
  `${basePath}.ts`,
@@ -10620,14 +10517,14 @@ var resolveDevClientDir2 = () => {
10620
10517
  `${basePath}.svelte`,
10621
10518
  `${basePath}.svelte.ts`,
10622
10519
  `${basePath}.svelte.js`,
10623
- join17(basePath, "index.ts"),
10624
- join17(basePath, "index.js"),
10625
- join17(basePath, "index.mjs"),
10626
- join17(basePath, "index.cjs"),
10627
- join17(basePath, "index.json"),
10628
- join17(basePath, "index.svelte"),
10629
- join17(basePath, "index.svelte.ts"),
10630
- join17(basePath, "index.svelte.js")
10520
+ join16(basePath, "index.ts"),
10521
+ join16(basePath, "index.js"),
10522
+ join16(basePath, "index.mjs"),
10523
+ join16(basePath, "index.cjs"),
10524
+ join16(basePath, "index.json"),
10525
+ join16(basePath, "index.svelte"),
10526
+ join16(basePath, "index.svelte.ts"),
10527
+ join16(basePath, "index.svelte.js")
10631
10528
  ];
10632
10529
  const checks = await Promise.all(candidates.map(exists));
10633
10530
  return candidates.find((_2, index) => checks[index]) ?? null;
@@ -10636,7 +10533,7 @@ var resolveDevClientDir2 = () => {
10636
10533
  const resolved = resolvePackageImport(spec);
10637
10534
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
10638
10535
  }
10639
- const basePath = resolve20(dirname12(from), spec);
10536
+ const basePath = resolve19(dirname11(from), spec);
10640
10537
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
10641
10538
  if (!explicit) {
10642
10539
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -10657,8 +10554,8 @@ var resolveDevClientDir2 = () => {
10657
10554
  return jsPath;
10658
10555
  return null;
10659
10556
  }, addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
10660
- const toServer = relative9(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
10661
- const toClient = relative9(clientOutputDir, resolvedModule).replace(/\\/g, "/");
10557
+ const toServer = relative8(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
10558
+ const toClient = relative8(clientOutputDir, resolvedModule).replace(/\\/g, "/");
10662
10559
  rewrites.set(rawSpec, {
10663
10560
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
10664
10561
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -10666,10 +10563,10 @@ var resolveDevClientDir2 = () => {
10666
10563
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev2 = false, stylePreprocessors) => {
10667
10564
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
10668
10565
  const generatedDir = getFrameworkGeneratedDir("svelte");
10669
- const clientDir = join17(generatedDir, "client");
10670
- const indexDir = join17(generatedDir, "indexes");
10671
- const serverDir = join17(generatedDir, "server");
10672
- await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir4(dir, { recursive: true })));
10566
+ const clientDir = join16(generatedDir, "client");
10567
+ const indexDir = join16(generatedDir, "indexes");
10568
+ const serverDir = join16(generatedDir, "server");
10569
+ await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir3(dir, { recursive: true })));
10673
10570
  const dev = env2.NODE_ENV !== "production";
10674
10571
  const build2 = async (src) => {
10675
10572
  const memoized = cache.get(src);
@@ -10694,10 +10591,10 @@ var resolveDevClientDir2 = () => {
10694
10591
  const svelteStylePreprocessor = createSvelteStylePreprocessor(stylePreprocessors);
10695
10592
  const preprocessedServer = isModule ? loweredServerSource.code : (await preprocess(loweredServerSource.code, svelteStylePreprocessor)).code;
10696
10593
  const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
10697
- const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedServer) : preprocessedServer;
10698
- const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedClient) : preprocessedClient;
10699
- const rawRel = dirname12(relative9(svelteRoot, src)).replace(/\\/g, "/");
10700
- const relDir = rawRel.startsWith("..") ? `_ext/${relative9(process.cwd(), dirname12(src)).replace(/\\/g, "/")}` : rawRel;
10594
+ const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler2.transformSync(preprocessedServer) : preprocessedServer;
10595
+ const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler2.transformSync(preprocessedClient) : preprocessedClient;
10596
+ const rawRel = dirname11(relative8(svelteRoot, src)).replace(/\\/g, "/");
10597
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative8(process.cwd(), dirname11(src)).replace(/\\/g, "/")}` : rawRel;
10701
10598
  const baseName = basename5(src).replace(/\.svelte(\.(ts|js))?$/, "");
10702
10599
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
10703
10600
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
@@ -10706,8 +10603,8 @@ var resolveDevClientDir2 = () => {
10706
10603
  const childBuilt = await Promise.all(childSources.map((child) => build2(child)));
10707
10604
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
10708
10605
  const externalRewrites = new Map;
10709
- const ssrOutputDir = dirname12(join17(serverDir, relDir, `${baseName}.js`));
10710
- const clientOutputDir = dirname12(join17(clientDir, relDir, `${baseName}.js`));
10606
+ const ssrOutputDir = dirname11(join16(serverDir, relDir, `${baseName}.js`));
10607
+ const clientOutputDir = dirname11(join16(clientDir, relDir, `${baseName}.js`));
10711
10608
  for (let idx = 0;idx < importPaths.length; idx++) {
10712
10609
  const rawSpec = importPaths[idx];
10713
10610
  if (!rawSpec)
@@ -10718,15 +10615,15 @@ var resolveDevClientDir2 = () => {
10718
10615
  addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
10719
10616
  if (!resolved)
10720
10617
  continue;
10721
- const childRel = relative9(svelteRoot, resolved).replace(/\\/g, "/");
10618
+ const childRel = relative8(svelteRoot, resolved).replace(/\\/g, "/");
10722
10619
  if (!childRel.startsWith(".."))
10723
10620
  continue;
10724
10621
  const childBuilt2 = cache.get(resolved);
10725
10622
  if (!childBuilt2)
10726
10623
  continue;
10727
10624
  const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
10728
- const toServer = relative9(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
10729
- const toClient = relative9(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
10625
+ const toServer = relative8(ssrOutputDir, childBuilt2.ssr).replace(/\\/g, "/");
10626
+ const toClient = relative8(clientOutputDir, childBuilt2.client).replace(/\\/g, "/");
10730
10627
  externalRewrites.set(origSpec, {
10731
10628
  client: toClient.startsWith(".") ? toClient : `./${toClient}`,
10732
10629
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -10760,7 +10657,7 @@ var resolveDevClientDir2 = () => {
10760
10657
  }).js.code;
10761
10658
  let code = compiled.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
10762
10659
  if (mode === "client" && isDev2) {
10763
- const moduleKey = `/@src/${relative9(process.cwd(), src).replace(/\\/g, "/")}`;
10660
+ const moduleKey = `/@src/${relative8(process.cwd(), src).replace(/\\/g, "/")}`;
10764
10661
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
10765
10662
  if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
10766
10663
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
@@ -10772,11 +10669,11 @@ var resolveDevClientDir2 = () => {
10772
10669
  code += islandMetadataExports;
10773
10670
  return code;
10774
10671
  };
10775
- const ssrPath = join17(serverDir, relDir, `${baseName}.js`);
10776
- const clientPath = join17(clientDir, relDir, `${baseName}.js`);
10672
+ const ssrPath = join16(serverDir, relDir, `${baseName}.js`);
10673
+ const clientPath = join16(clientDir, relDir, `${baseName}.js`);
10777
10674
  await Promise.all([
10778
- mkdir4(dirname12(ssrPath), { recursive: true }),
10779
- mkdir4(dirname12(clientPath), { recursive: true })
10675
+ mkdir3(dirname11(ssrPath), { recursive: true }),
10676
+ mkdir3(dirname11(clientPath), { recursive: true })
10780
10677
  ]);
10781
10678
  if (isModule) {
10782
10679
  const bundle = rewriteExternalImports(generate("client"), "client");
@@ -10803,10 +10700,10 @@ var resolveDevClientDir2 = () => {
10803
10700
  };
10804
10701
  const roots = await Promise.all(entryPoints.map(build2));
10805
10702
  await Promise.all(roots.map(async ({ client: client2, hasAwaitSlot }) => {
10806
- const relClientDir = dirname12(relative9(clientDir, client2));
10703
+ const relClientDir = dirname11(relative8(clientDir, client2));
10807
10704
  const name = basename5(client2, extname5(client2));
10808
- const indexPath = join17(indexDir, relClientDir, `${name}.js`);
10809
- const importRaw = relative9(dirname12(indexPath), client2).split(sep2).join("/");
10705
+ const indexPath = join16(indexDir, relClientDir, `${name}.js`);
10706
+ const importRaw = relative8(dirname11(indexPath), client2).split(sep2).join("/");
10810
10707
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
10811
10708
  const hmrImports = isDev2 ? `window.__HMR_FRAMEWORK__ = "svelte";
10812
10709
  import "${hmrClientPath3}";
@@ -10877,14 +10774,14 @@ if (typeof window !== "undefined") {
10877
10774
  setTimeout(releaseStreamingSlots, 0);
10878
10775
  }
10879
10776
  }`;
10880
- await mkdir4(dirname12(indexPath), { recursive: true });
10777
+ await mkdir3(dirname11(indexPath), { recursive: true });
10881
10778
  return write(indexPath, bootstrap);
10882
10779
  }));
10883
10780
  return {
10884
10781
  svelteClientPaths: roots.map(({ client: client2 }) => client2),
10885
10782
  svelteIndexPaths: roots.map(({ client: client2 }) => {
10886
- const rel = dirname12(relative9(clientDir, client2));
10887
- return join17(indexDir, rel, basename5(client2));
10783
+ const rel = dirname11(relative8(clientDir, client2));
10784
+ return join16(indexDir, rel, basename5(client2));
10888
10785
  }),
10889
10786
  svelteServerPaths: roots.map(({ ssr }) => ssr)
10890
10787
  };
@@ -10899,10 +10796,10 @@ var init_compileSvelte = __esm(() => {
10899
10796
  init_lowerAwaitSlotSyntax();
10900
10797
  init_renderToReadableStream();
10901
10798
  devClientDir2 = resolveDevClientDir2();
10902
- hmrClientPath3 = join17(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
10799
+ hmrClientPath3 = join16(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
10903
10800
  persistentCache = new Map;
10904
10801
  sourceHashCache = new Map;
10905
- transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
10802
+ transpiler2 = new Transpiler({ loader: "ts", target: "browser" });
10906
10803
  });
10907
10804
 
10908
10805
  // src/build/vueAutoRouterTransform.ts
@@ -10966,27 +10863,27 @@ __export(exports_compileVue, {
10966
10863
  clearVueHmrCaches: () => clearVueHmrCaches
10967
10864
  });
10968
10865
  import { existsSync as existsSync16 } from "fs";
10969
- import { mkdir as mkdir5 } from "fs/promises";
10866
+ import { mkdir as mkdir4 } from "fs/promises";
10970
10867
  import {
10971
10868
  basename as basename6,
10972
- dirname as dirname13,
10869
+ dirname as dirname12,
10973
10870
  isAbsolute as isAbsolute3,
10974
- join as join18,
10975
- relative as relative10,
10976
- resolve as resolve21
10871
+ join as join17,
10872
+ relative as relative9,
10873
+ resolve as resolve20
10977
10874
  } from "path";
10978
- var {file: file3, write: write2, Transpiler: Transpiler3 } = globalThis.Bun;
10875
+ var {file: file3, write: write2, Transpiler: Transpiler2 } = globalThis.Bun;
10979
10876
  var resolveDevClientDir3 = () => {
10980
10877
  const projectRoot = process.cwd();
10981
- const fromSource = resolve21(import.meta.dir, "../dev/client");
10878
+ const fromSource = resolve20(import.meta.dir, "../dev/client");
10982
10879
  if (existsSync16(fromSource) && fromSource.startsWith(projectRoot)) {
10983
10880
  return fromSource;
10984
10881
  }
10985
- const fromNodeModules = resolve21(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
10882
+ const fromNodeModules = resolve20(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
10986
10883
  if (existsSync16(fromNodeModules))
10987
10884
  return fromNodeModules;
10988
- return resolve21(import.meta.dir, "./dev/client");
10989
- }, devClientDir3, hmrClientPath4, transpiler4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
10885
+ return resolve20(import.meta.dir, "./dev/client");
10886
+ }, devClientDir3, hmrClientPath4, transpiler3, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, clearVueHmrCaches = () => {
10990
10887
  scriptCache.clear();
10991
10888
  scriptSetupCache.clear();
10992
10889
  templateCache.clear();
@@ -11024,19 +10921,19 @@ var resolveDevClientDir3 = () => {
11024
10921
  return "template-only";
11025
10922
  }
11026
10923
  return "full";
11027
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative10(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) => {
10924
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative9(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) => {
11028
10925
  if (filePath.endsWith(".vue"))
11029
10926
  return filePath.replace(/\.vue$/, ".js");
11030
10927
  if (filePath.endsWith(".ts"))
11031
10928
  return filePath.replace(/\.ts$/, ".js");
11032
10929
  if (isStylePath(filePath)) {
11033
10930
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
11034
- return resolve21(sourceDir, filePath);
10931
+ return resolve20(sourceDir, filePath);
11035
10932
  }
11036
10933
  return filePath;
11037
10934
  }
11038
10935
  return `${filePath}.js`;
11039
- }, stripExports2 = (code) => code.replace(/export\s+default/, "const script ="), mergeVueImports2 = (code) => {
10936
+ }, stripExports = (code) => code.replace(/export\s+default/, "const script ="), mergeVueImports = (code) => {
11040
10937
  const lines = code.split(`
11041
10938
  `);
11042
10939
  const specifierSet = new Set;
@@ -11057,7 +10954,7 @@ var resolveDevClientDir3 = () => {
11057
10954
  const cachedResult = cacheMap.get(sourceFilePath);
11058
10955
  if (cachedResult)
11059
10956
  return cachedResult;
11060
- const relativeFilePath = relative10(vueRootDir, sourceFilePath).replace(/\\/g, "/");
10957
+ const relativeFilePath = relative9(vueRootDir, sourceFilePath).replace(/\\/g, "/");
11061
10958
  const relativeWithoutExtension = relativeFilePath.replace(/\.vue$/, "");
11062
10959
  const fileBaseName = basename6(sourceFilePath, ".vue");
11063
10960
  const componentId = toKebab(fileBaseName);
@@ -11095,12 +10992,12 @@ var resolveDevClientDir3 = () => {
11095
10992
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
11096
10993
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
11097
10994
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
11098
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute3(path)) && isStylePath(path)).map((path) => isAbsolute3(path) ? path : resolve21(dirname13(sourceFilePath), path));
10995
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute3(path)) && isStylePath(path)).map((path) => isAbsolute3(path) ? path : resolve20(dirname12(sourceFilePath), path));
11099
10996
  for (const stylePath of stylePathsImported) {
11100
10997
  addStyleImporter(sourceFilePath, stylePath);
11101
10998
  }
11102
10999
  const childBuildResults = await Promise.all([
11103
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve21(dirname13(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
11000
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve20(dirname12(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors)),
11104
11001
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, stylePreprocessors))
11105
11002
  ]);
11106
11003
  const hasScript = descriptor.script || descriptor.scriptSetup;
@@ -11108,9 +11005,9 @@ var resolveDevClientDir3 = () => {
11108
11005
  id: componentId,
11109
11006
  inlineTemplate: false
11110
11007
  }) : { bindings: {}, content: "export default {};" };
11111
- const strippedScript = stripExports2(compiledScript.content);
11112
- const sourceDir = dirname13(sourceFilePath);
11113
- const transpiledScript = transpiler4.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
11008
+ const strippedScript = stripExports(compiledScript.content);
11009
+ const sourceDir = dirname12(sourceFilePath);
11010
+ const transpiledScript = transpiler3.transformSync(strippedScript).replace(/(['"])(\.{1,2}\/[^'"]+)(['"])/g, (_2, quoteStart, relativeImport, quoteEnd) => `${quoteStart}${toJs(relativeImport, sourceDir)}${quoteEnd}`);
11114
11011
  const packageImportRewrites = new Map;
11115
11012
  for (const [bareImport, absolutePath] of packageComponentPaths) {
11116
11013
  const childResult = cacheMap.get(absolutePath);
@@ -11124,8 +11021,6 @@ var resolveDevClientDir3 = () => {
11124
11021
  const generateRenderFunction = (ssr) => compiler.compileTemplate({
11125
11022
  compilerOptions: {
11126
11023
  bindingMetadata: compiledScript.bindings,
11127
- expressionPlugins: ["typescript"],
11128
- isCustomElement: (tag) => tag === "absolute-island",
11129
11024
  prefixIdentifiers: true
11130
11025
  },
11131
11026
  filename: sourceFilePath,
@@ -11148,8 +11043,8 @@ var resolveDevClientDir3 = () => {
11148
11043
  ];
11149
11044
  let cssOutputPaths = [];
11150
11045
  if (isEntryPoint && allCss.length) {
11151
- const cssOutputFile = join18(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
11152
- await mkdir5(dirname13(cssOutputFile), { recursive: true });
11046
+ const cssOutputFile = join17(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`);
11047
+ await mkdir4(dirname12(cssOutputFile), { recursive: true });
11153
11048
  await write2(cssOutputFile, allCss.join(`
11154
11049
  `));
11155
11050
  cssOutputPaths = [cssOutputFile];
@@ -11167,7 +11062,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11167
11062
  window.__VUE_HMR_COMPONENTS__[script.__hmrId] = script;
11168
11063
  }
11169
11064
  }` : "";
11170
- return mergeVueImports2([
11065
+ return mergeVueImports([
11171
11066
  transpiledScript,
11172
11067
  renderCode,
11173
11068
  `script.${renderFnName} = ${renderFnName};`,
@@ -11179,9 +11074,9 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11179
11074
  };
11180
11075
  const clientCode = assembleModule(generateRenderFunction(false), "render", true) + islandMetadataExports;
11181
11076
  const serverCode = assembleModule(generateRenderFunction(true), "ssrRender", false) + islandMetadataExports;
11182
- const clientOutputPath = join18(outputDirs.client, `${relativeWithoutExtension}.js`);
11183
- const serverOutputPath = join18(outputDirs.server, `${relativeWithoutExtension}.js`);
11184
- const relDir = dirname13(relativeFilePath);
11077
+ const clientOutputPath = join17(outputDirs.client, `${relativeWithoutExtension}.js`);
11078
+ const serverOutputPath = join17(outputDirs.server, `${relativeWithoutExtension}.js`);
11079
+ const relDir = dirname12(relativeFilePath);
11185
11080
  const relDepth = relDir === "." ? 0 : relDir.split("/").length;
11186
11081
  const adjustImports = (code) => code.replace(/(from\s+['"])(\.\.\/(?:\.\.\/)*)/g, (_2, prefix, dots) => {
11187
11082
  const upCount = dots.split("/").length - 1;
@@ -11193,15 +11088,15 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11193
11088
  let result2 = code;
11194
11089
  for (const [bareImport, paths] of packageImportRewrites) {
11195
11090
  const targetPath = mode === "server" ? paths.server : paths.client;
11196
- let rel = relative10(dirname13(outputPath), targetPath).replace(/\\/g, "/");
11091
+ let rel = relative9(dirname12(outputPath), targetPath).replace(/\\/g, "/");
11197
11092
  if (!rel.startsWith("."))
11198
11093
  rel = `./${rel}`;
11199
11094
  result2 = result2.replaceAll(bareImport, rel);
11200
11095
  }
11201
11096
  return result2;
11202
11097
  };
11203
- await mkdir5(dirname13(clientOutputPath), { recursive: true });
11204
- await mkdir5(dirname13(serverOutputPath), { recursive: true });
11098
+ await mkdir4(dirname12(clientOutputPath), { recursive: true });
11099
+ await mkdir4(dirname12(serverOutputPath), { recursive: true });
11205
11100
  await write2(clientOutputPath, rewritePackageImports(adjustImports(clientCode), clientOutputPath, "client"));
11206
11101
  await write2(serverOutputPath, rewritePackageImports(adjustImports(serverCode), serverOutputPath, "server"));
11207
11102
  const result = {
@@ -11211,7 +11106,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11211
11106
  hmrId,
11212
11107
  serverPath: serverOutputPath,
11213
11108
  tsHelperPaths: [
11214
- ...helperModulePaths.map((helper) => resolve21(dirname13(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
11109
+ ...helperModulePaths.map((helper) => resolve20(dirname12(sourceFilePath), helper.endsWith(".ts") ? helper : `${helper}.ts`)),
11215
11110
  ...childBuildResults.flatMap((child) => child.tsHelperPaths)
11216
11111
  ]
11217
11112
  };
@@ -11221,36 +11116,36 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11221
11116
  }, compileVue = async (entryPoints, vueRootDir, isDev2 = false, stylePreprocessors) => {
11222
11117
  const compiler = await import("@vue/compiler-sfc");
11223
11118
  const generatedDir = getFrameworkGeneratedDir("vue");
11224
- const clientOutputDir = join18(generatedDir, "client");
11225
- const indexOutputDir = join18(generatedDir, "indexes");
11226
- const serverOutputDir = join18(generatedDir, "server");
11227
- const cssOutputDir = join18(generatedDir, "compiled");
11119
+ const clientOutputDir = join17(generatedDir, "client");
11120
+ const indexOutputDir = join17(generatedDir, "indexes");
11121
+ const serverOutputDir = join17(generatedDir, "server");
11122
+ const cssOutputDir = join17(generatedDir, "compiled");
11228
11123
  await Promise.all([
11229
- mkdir5(clientOutputDir, { recursive: true }),
11230
- mkdir5(indexOutputDir, { recursive: true }),
11231
- mkdir5(serverOutputDir, { recursive: true }),
11232
- mkdir5(cssOutputDir, { recursive: true })
11124
+ mkdir4(clientOutputDir, { recursive: true }),
11125
+ mkdir4(indexOutputDir, { recursive: true }),
11126
+ mkdir4(serverOutputDir, { recursive: true }),
11127
+ mkdir4(cssOutputDir, { recursive: true })
11233
11128
  ]);
11234
11129
  const buildCache = new Map;
11235
11130
  const allTsHelperPaths = new Set;
11236
11131
  const compiledPages = await Promise.all(entryPoints.map(async (entryPath) => {
11237
- const result = await compileVueFile(resolve21(entryPath), {
11132
+ const result = await compileVueFile(resolve20(entryPath), {
11238
11133
  client: clientOutputDir,
11239
11134
  css: cssOutputDir,
11240
11135
  server: serverOutputDir
11241
11136
  }, buildCache, true, vueRootDir, compiler, stylePreprocessors);
11242
11137
  result.tsHelperPaths.forEach((path) => allTsHelperPaths.add(path));
11243
11138
  const entryBaseName = basename6(entryPath, ".vue");
11244
- const indexOutputFile = join18(indexOutputDir, `${entryBaseName}.js`);
11245
- const clientOutputFile = join18(clientOutputDir, relative10(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
11246
- await mkdir5(dirname13(indexOutputFile), { recursive: true });
11139
+ const indexOutputFile = join17(indexOutputDir, `${entryBaseName}.js`);
11140
+ const clientOutputFile = join17(clientOutputDir, relative9(vueRootDir, entryPath).replace(/\\/g, "/").replace(/\.vue$/, ".js"));
11141
+ await mkdir4(dirname12(indexOutputFile), { recursive: true });
11247
11142
  const vueHmrImports = isDev2 ? [
11248
11143
  `window.__HMR_FRAMEWORK__ = "vue";`,
11249
11144
  `import "${hmrClientPath4}";`
11250
11145
  ] : [];
11251
11146
  await write2(indexOutputFile, [
11252
11147
  ...vueHmrImports,
11253
- `import Comp, * as PageModule from "${relative10(dirname13(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
11148
+ `import Comp, * as PageModule from "${relative9(dirname12(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
11254
11149
  'import { createSSRApp, createApp } from "vue";',
11255
11150
  "",
11256
11151
  "// HMR State Preservation: Check for preserved state from HMR",
@@ -11393,12 +11288,12 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
11393
11288
  }));
11394
11289
  await Promise.all(Array.from(allTsHelperPaths).map(async (tsPath) => {
11395
11290
  const sourceCode = await file3(tsPath).text();
11396
- const transpiledCode = transpiler4.transformSync(sourceCode);
11397
- const relativeJsPath = relative10(vueRootDir, tsPath).replace(/\.ts$/, ".js");
11398
- const outClientPath = join18(clientOutputDir, relativeJsPath);
11399
- const outServerPath = join18(serverOutputDir, relativeJsPath);
11400
- await mkdir5(dirname13(outClientPath), { recursive: true });
11401
- await mkdir5(dirname13(outServerPath), { recursive: true });
11291
+ const transpiledCode = transpiler3.transformSync(sourceCode);
11292
+ const relativeJsPath = relative9(vueRootDir, tsPath).replace(/\.ts$/, ".js");
11293
+ const outClientPath = join17(clientOutputDir, relativeJsPath);
11294
+ const outServerPath = join17(serverOutputDir, relativeJsPath);
11295
+ await mkdir4(dirname12(outClientPath), { recursive: true });
11296
+ await mkdir4(dirname12(outServerPath), { recursive: true });
11402
11297
  await write2(outClientPath, transpiledCode);
11403
11298
  await write2(outServerPath, transpiledCode);
11404
11299
  }));
@@ -11418,8 +11313,8 @@ var init_compileVue = __esm(() => {
11418
11313
  init_vueAutoRouterTransform();
11419
11314
  init_stylePreprocessor();
11420
11315
  devClientDir3 = resolveDevClientDir3();
11421
- hmrClientPath4 = join18(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
11422
- transpiler4 = new Transpiler3({ loader: "ts", target: "browser" });
11316
+ hmrClientPath4 = join17(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
11317
+ transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
11423
11318
  scriptCache = new Map;
11424
11319
  scriptSetupCache = new Map;
11425
11320
  templateCache = new Map;
@@ -11899,17 +11794,17 @@ __export(exports_compileAngular, {
11899
11794
  compileAngular: () => compileAngular
11900
11795
  });
11901
11796
  import { existsSync as existsSync17, readFileSync as readFileSync13, promises as fs } from "fs";
11902
- import { join as join19, basename as basename7, sep as sep3, dirname as dirname14, resolve as resolve22, relative as relative11 } from "path";
11797
+ import { join as join18, basename as basename7, sep as sep3, dirname as dirname13, resolve as resolve21, relative as relative10 } from "path";
11903
11798
  import ts2 from "typescript";
11904
11799
  var traceAngularPhase = async (name, fn2, metadata2) => {
11905
11800
  const tracePhase = globalThis.__absoluteBuildTracePhase;
11906
11801
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
11907
11802
  }, readTsconfigPathAliases = () => {
11908
11803
  try {
11909
- const configPath2 = resolve22(process.cwd(), "tsconfig.json");
11804
+ const configPath2 = resolve21(process.cwd(), "tsconfig.json");
11910
11805
  const config = ts2.readConfigFile(configPath2, ts2.sys.readFile).config;
11911
11806
  const compilerOptions = config?.compilerOptions ?? {};
11912
- const baseUrl = resolve22(process.cwd(), compilerOptions.baseUrl ?? ".");
11807
+ const baseUrl = resolve21(process.cwd(), compilerOptions.baseUrl ?? ".");
11913
11808
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
11914
11809
  return { aliases, baseUrl };
11915
11810
  } catch {
@@ -11929,7 +11824,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
11929
11824
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
11930
11825
  for (const replacement of alias.replacements) {
11931
11826
  const candidate = replacement.replace("*", wildcardValue);
11932
- const resolved = resolveSourceFile(resolve22(baseUrl, candidate));
11827
+ const resolved = resolveSourceFile(resolve21(baseUrl, candidate));
11933
11828
  if (resolved)
11934
11829
  return resolved;
11935
11830
  }
@@ -11941,20 +11836,20 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
11941
11836
  `${candidate}.tsx`,
11942
11837
  `${candidate}.js`,
11943
11838
  `${candidate}.jsx`,
11944
- join19(candidate, "index.ts"),
11945
- join19(candidate, "index.tsx"),
11946
- join19(candidate, "index.js"),
11947
- join19(candidate, "index.jsx")
11839
+ join18(candidate, "index.ts"),
11840
+ join18(candidate, "index.tsx"),
11841
+ join18(candidate, "index.js"),
11842
+ join18(candidate, "index.jsx")
11948
11843
  ];
11949
11844
  return candidates.find((file4) => existsSync17(file4));
11950
11845
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
11951
- const baseDir = resolve22(rootDir);
11846
+ const baseDir = resolve21(rootDir);
11952
11847
  const tsconfigAliases = readTsconfigPathAliases();
11953
- const transpiler5 = new Bun.Transpiler({ loader: "tsx" });
11848
+ const transpiler4 = new Bun.Transpiler({ loader: "tsx" });
11954
11849
  const scanCache = new Map;
11955
11850
  const resolveLocalImport = (specifier, fromDir) => {
11956
11851
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
11957
- return resolveSourceFile(resolve22(fromDir, specifier));
11852
+ return resolveSourceFile(resolve21(fromDir, specifier));
11958
11853
  }
11959
11854
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
11960
11855
  if (aliased)
@@ -11963,7 +11858,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
11963
11858
  const resolved = Bun.resolveSync(specifier, fromDir);
11964
11859
  if (resolved.includes("/node_modules/"))
11965
11860
  return;
11966
- const absolute = resolve22(resolved);
11861
+ const absolute = resolve21(resolved);
11967
11862
  if (!absolute.startsWith(baseDir))
11968
11863
  return;
11969
11864
  return resolveSourceFile(absolute);
@@ -11979,7 +11874,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
11979
11874
  usesLegacyAnimations: false
11980
11875
  });
11981
11876
  }
11982
- const resolved = resolve22(actualPath);
11877
+ const resolved = resolve21(actualPath);
11983
11878
  const cached = scanCache.get(resolved);
11984
11879
  if (cached)
11985
11880
  return cached;
@@ -11992,7 +11887,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
11992
11887
  }
11993
11888
  let imports;
11994
11889
  try {
11995
- imports = transpiler5.scanImports(sourceCode);
11890
+ imports = transpiler4.scanImports(sourceCode);
11996
11891
  } catch {
11997
11892
  return { imports: [], usesLegacyAnimations: false };
11998
11893
  }
@@ -12008,7 +11903,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12008
11903
  const actualPath = resolveSourceFile(filePath);
12009
11904
  if (!actualPath)
12010
11905
  return false;
12011
- const resolved = resolve22(actualPath);
11906
+ const resolved = resolve21(actualPath);
12012
11907
  if (visited.has(resolved))
12013
11908
  return false;
12014
11909
  visited.add(resolved);
@@ -12016,7 +11911,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12016
11911
  if (scan.usesLegacyAnimations)
12017
11912
  return true;
12018
11913
  for (const specifier of scan.imports) {
12019
- const importedPath = resolveLocalImport(specifier, dirname14(resolved));
11914
+ const importedPath = resolveLocalImport(specifier, dirname13(resolved));
12020
11915
  if (importedPath && await visit(importedPath, visited)) {
12021
11916
  return true;
12022
11917
  }
@@ -12026,14 +11921,14 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12026
11921
  return (entryPath) => visit(entryPath);
12027
11922
  }, resolveDevClientDir4 = () => {
12028
11923
  const projectRoot = process.cwd();
12029
- const fromSource = resolve22(import.meta.dir, "../dev/client");
11924
+ const fromSource = resolve21(import.meta.dir, "../dev/client");
12030
11925
  if (existsSync17(fromSource) && fromSource.startsWith(projectRoot)) {
12031
11926
  return fromSource;
12032
11927
  }
12033
- const fromNodeModules = resolve22(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
11928
+ const fromNodeModules = resolve21(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
12034
11929
  if (existsSync17(fromNodeModules))
12035
11930
  return fromNodeModules;
12036
- return resolve22(import.meta.dir, "./dev/client");
11931
+ return resolve21(import.meta.dir, "./dev/client");
12037
11932
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
12038
11933
  try {
12039
11934
  return ts2.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -12075,12 +11970,12 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12075
11970
  return `${path.replace(/\.ts$/, ".js")}${query}`;
12076
11971
  if (hasJsLikeExtension(path))
12077
11972
  return `${path}${query}`;
12078
- const importerDir = dirname14(importerOutputPath);
12079
- const fileCandidate = resolve22(importerDir, `${path}.js`);
11973
+ const importerDir = dirname13(importerOutputPath);
11974
+ const fileCandidate = resolve21(importerDir, `${path}.js`);
12080
11975
  if (outputFiles?.has(fileCandidate) || existsSync17(fileCandidate)) {
12081
11976
  return `${path}.js${query}`;
12082
11977
  }
12083
- const indexCandidate = resolve22(importerDir, path, "index.js");
11978
+ const indexCandidate = resolve21(importerDir, path, "index.js");
12084
11979
  if (outputFiles?.has(indexCandidate) || existsSync17(indexCandidate)) {
12085
11980
  return `${path}/index.js${query}`;
12086
11981
  }
@@ -12108,18 +12003,18 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12108
12003
  }, resolveLocalTsImport = (fromFile, specifier) => {
12109
12004
  if (!isRelativeModuleSpecifier(specifier))
12110
12005
  return null;
12111
- const basePath = resolve22(dirname14(fromFile), specifier);
12006
+ const basePath = resolve21(dirname13(fromFile), specifier);
12112
12007
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
12113
12008
  `${basePath}.ts`,
12114
12009
  `${basePath}.tsx`,
12115
12010
  `${basePath}.mts`,
12116
12011
  `${basePath}.cts`,
12117
- join19(basePath, "index.ts"),
12118
- join19(basePath, "index.tsx"),
12119
- join19(basePath, "index.mts"),
12120
- join19(basePath, "index.cts")
12012
+ join18(basePath, "index.ts"),
12013
+ join18(basePath, "index.tsx"),
12014
+ join18(basePath, "index.mts"),
12015
+ join18(basePath, "index.cts")
12121
12016
  ];
12122
- return candidates.map((candidate) => resolve22(candidate)).find((candidate) => existsSync17(candidate) && !candidate.endsWith(".d.ts")) ?? null;
12017
+ return candidates.map((candidate) => resolve21(candidate)).find((candidate) => existsSync17(candidate) && !candidate.endsWith(".d.ts")) ?? null;
12123
12018
  }, readFileForAotTransform = async (fileName, readFile6) => {
12124
12019
  const hostSource = readFile6?.(fileName);
12125
12020
  if (typeof hostSource === "string")
@@ -12143,18 +12038,18 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12143
12038
  const paths = [];
12144
12039
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
12145
12040
  if (templateUrlMatch?.[1])
12146
- paths.push(join19(fileDir, templateUrlMatch[1]));
12041
+ paths.push(join18(fileDir, templateUrlMatch[1]));
12147
12042
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
12148
12043
  if (styleUrlMatch?.[1])
12149
- paths.push(join19(fileDir, styleUrlMatch[1]));
12044
+ paths.push(join18(fileDir, styleUrlMatch[1]));
12150
12045
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
12151
12046
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
12152
12047
  if (urlMatches) {
12153
12048
  for (const urlMatch of urlMatches) {
12154
- paths.push(join19(fileDir, urlMatch.replace(/['"]/g, "")));
12049
+ paths.push(join18(fileDir, urlMatch.replace(/['"]/g, "")));
12155
12050
  }
12156
12051
  }
12157
- return paths.map((path) => resolve22(path));
12052
+ return paths.map((path) => resolve21(path));
12158
12053
  }, readResourceCacheFile = async (cachePath) => {
12159
12054
  try {
12160
12055
  const entry = JSON.parse(await fs.readFile(cachePath, "utf-8"));
@@ -12166,13 +12061,13 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12166
12061
  return null;
12167
12062
  }
12168
12063
  }, writeResourceCacheFile = async (cachePath, source) => {
12169
- await fs.mkdir(dirname14(cachePath), { recursive: true });
12064
+ await fs.mkdir(dirname13(cachePath), { recursive: true });
12170
12065
  await fs.writeFile(cachePath, JSON.stringify({
12171
12066
  source,
12172
12067
  version: 1
12173
12068
  }), "utf-8");
12174
12069
  }, resolveResourceTransformCachePath = async (filePath, source, stylePreprocessors) => {
12175
- const resourcePaths = collectAngularResourcePaths(source, dirname14(filePath));
12070
+ const resourcePaths = collectAngularResourcePaths(source, dirname13(filePath));
12176
12071
  const resourceContents = await Promise.all(resourcePaths.map(async (resourcePath) => {
12177
12072
  const content = await fs.readFile(resourcePath, "utf-8");
12178
12073
  return `${resourcePath}\x00${content}`;
@@ -12185,7 +12080,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12185
12080
  safeStableStringify(stylePreprocessors ?? null)
12186
12081
  ].join("\x00");
12187
12082
  const cacheKey2 = Bun.hash(cacheInput).toString(BASE_36_RADIX);
12188
- return join19(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
12083
+ return join18(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey2}.json`);
12189
12084
  }, precomputeAotResourceTransforms = async (inputPaths, readFile6, stylePreprocessors) => {
12190
12085
  const transformedSources = new Map;
12191
12086
  const visited = new Set;
@@ -12196,7 +12091,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12196
12091
  transformedFiles: 0
12197
12092
  };
12198
12093
  const transformFile = async (filePath) => {
12199
- const resolvedPath = resolve22(filePath);
12094
+ const resolvedPath = resolve21(filePath);
12200
12095
  if (visited.has(resolvedPath))
12201
12096
  return;
12202
12097
  visited.add(resolvedPath);
@@ -12212,7 +12107,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12212
12107
  transformedSource = cached.source;
12213
12108
  } else {
12214
12109
  stats.cacheMisses += 1;
12215
- const transformed = await inlineResources(source, dirname14(resolvedPath), stylePreprocessors);
12110
+ const transformed = await inlineResources(source, dirname13(resolvedPath), stylePreprocessors);
12216
12111
  transformedSource = transformed.source;
12217
12112
  await writeResourceCacheFile(cachePath, transformedSource);
12218
12113
  }
@@ -12231,7 +12126,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12231
12126
  return { stats, transformedSources };
12232
12127
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
12233
12128
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
12234
- const outputPath = resolve22(join19(outDir, relative11(process.cwd(), resolve22(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
12129
+ const outputPath = resolve21(join18(outDir, relative10(process.cwd(), resolve21(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
12235
12130
  return [
12236
12131
  outputPath,
12237
12132
  buildIslandMetadataExports(readFileSync13(inputPath, "utf-8"))
@@ -12241,8 +12136,8 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12241
12136
  const { readConfiguration, performCompilation, EmitFlags } = await traceAngularPhase("aot/import-compiler-cli", () => import("@angular/compiler-cli"));
12242
12137
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
12243
12138
  const tsPath = __require.resolve("typescript");
12244
- const tsRootDir = dirname14(tsPath);
12245
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve22(tsRootDir, "lib");
12139
+ const tsRootDir = dirname13(tsPath);
12140
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve21(tsRootDir, "lib");
12246
12141
  });
12247
12142
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
12248
12143
  const options = {
@@ -12278,13 +12173,13 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12278
12173
  const originalGetSourceFile = host.getSourceFile;
12279
12174
  host.getSourceFile = (fileName, languageVersion, onError) => {
12280
12175
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
12281
- const resolvedPath = join19(tsLibDir, fileName);
12176
+ const resolvedPath = join18(tsLibDir, fileName);
12282
12177
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
12283
12178
  }
12284
12179
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
12285
12180
  };
12286
12181
  const emitted = {};
12287
- const resolvedOutDir = resolve22(outDir);
12182
+ const resolvedOutDir = resolve21(outDir);
12288
12183
  host.writeFile = (fileName, text) => {
12289
12184
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
12290
12185
  emitted[relativePath] = text;
@@ -12306,12 +12201,12 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12306
12201
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
12307
12202
  return source;
12308
12203
  }
12309
- const resolvedPath = resolve22(fileName);
12204
+ const resolvedPath = resolve21(fileName);
12310
12205
  return transformedSources.get(resolvedPath) ?? source;
12311
12206
  };
12312
12207
  const originalGetSourceFileForCompile = host.getSourceFile;
12313
12208
  host.getSourceFile = (fileName, languageVersion, onError) => {
12314
- const source = transformedSources.get(resolve22(fileName));
12209
+ const source = transformedSources.get(resolve21(fileName));
12315
12210
  if (source) {
12316
12211
  return ts2.createSourceFile(fileName, source, languageVersion, true);
12317
12212
  }
@@ -12333,9 +12228,9 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12333
12228
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
12334
12229
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
12335
12230
  content,
12336
- target: join19(outDir, fileName)
12231
+ target: join18(outDir, fileName)
12337
12232
  }));
12338
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve22(target)));
12233
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve21(target)));
12339
12234
  return rawEntries.map(({ content, target }) => {
12340
12235
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
12341
12236
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -12350,12 +12245,12 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12350
12245
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
12351
12246
  });
12352
12247
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
12353
- processedContent += islandMetadataByOutputPath.get(resolve22(target)) ?? "";
12248
+ processedContent += islandMetadataByOutputPath.get(resolve21(target)) ?? "";
12354
12249
  return { content: processedContent, target };
12355
12250
  });
12356
12251
  });
12357
12252
  await traceAngularPhase("aot/write-output", () => Promise.all(entries.map(async ({ target, content }) => {
12358
- await fs.mkdir(dirname14(target), { recursive: true });
12253
+ await fs.mkdir(dirname13(target), { recursive: true });
12359
12254
  await fs.writeFile(target, content, "utf-8");
12360
12255
  })), { outputs: entries.length });
12361
12256
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
@@ -12371,7 +12266,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
12371
12266
  }
12372
12267
  return null;
12373
12268
  }, resolveAngularDeferImportSpecifier = () => {
12374
- const sourceEntry = resolve22(import.meta.dir, "../angular/components/index.ts");
12269
+ const sourceEntry = resolve21(import.meta.dir, "../angular/components/index.ts");
12375
12270
  if (existsSync17(sourceEntry)) {
12376
12271
  return sourceEntry.replace(/\\/g, "/");
12377
12272
  }
@@ -12508,7 +12403,7 @@ ${fields}
12508
12403
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
12509
12404
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
12510
12405
  if (templateUrlMatch?.[1]) {
12511
- const templatePath = join19(fileDir, templateUrlMatch[1]);
12406
+ const templatePath = join18(fileDir, templateUrlMatch[1]);
12512
12407
  if (!existsSync17(templatePath)) {
12513
12408
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
12514
12409
  }
@@ -12539,7 +12434,7 @@ ${fields}
12539
12434
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
12540
12435
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
12541
12436
  if (templateUrlMatch?.[1]) {
12542
- const templatePath = join19(fileDir, templateUrlMatch[1]);
12437
+ const templatePath = join18(fileDir, templateUrlMatch[1]);
12543
12438
  if (!existsSync17(templatePath)) {
12544
12439
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
12545
12440
  }
@@ -12576,7 +12471,7 @@ ${fields}
12576
12471
  return source;
12577
12472
  const stylePromises = urlMatches.map((urlMatch) => {
12578
12473
  const styleUrl = urlMatch.replace(/['"]/g, "");
12579
- return readAndEscapeFile(join19(fileDir, styleUrl), stylePreprocessors);
12474
+ return readAndEscapeFile(join18(fileDir, styleUrl), stylePreprocessors);
12580
12475
  });
12581
12476
  const results = await Promise.all(stylePromises);
12582
12477
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -12587,7 +12482,7 @@ ${fields}
12587
12482
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
12588
12483
  if (!styleUrlMatch?.[1])
12589
12484
  return source;
12590
- const escaped = await readAndEscapeFile(join19(fileDir, styleUrlMatch[1]), stylePreprocessors);
12485
+ const escaped = await readAndEscapeFile(join18(fileDir, styleUrlMatch[1]), stylePreprocessors);
12591
12486
  if (!escaped)
12592
12487
  return source;
12593
12488
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -12601,10 +12496,10 @@ ${fields}
12601
12496
  source: result
12602
12497
  };
12603
12498
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
12604
- const entryPath = resolve22(inputPath);
12499
+ const entryPath = resolve21(inputPath);
12605
12500
  const allOutputs = [];
12606
12501
  const visited = new Set;
12607
- const baseDir = resolve22(rootDir ?? process.cwd());
12502
+ const baseDir = resolve21(rootDir ?? process.cwd());
12608
12503
  let usesLegacyAnimations = false;
12609
12504
  const angularTranspiler = new Bun.Transpiler({
12610
12505
  loader: "ts",
@@ -12622,16 +12517,16 @@ ${fields}
12622
12517
  `${candidate}.tsx`,
12623
12518
  `${candidate}.js`,
12624
12519
  `${candidate}.jsx`,
12625
- join19(candidate, "index.ts"),
12626
- join19(candidate, "index.tsx"),
12627
- join19(candidate, "index.js"),
12628
- join19(candidate, "index.jsx")
12520
+ join18(candidate, "index.ts"),
12521
+ join18(candidate, "index.tsx"),
12522
+ join18(candidate, "index.js"),
12523
+ join18(candidate, "index.jsx")
12629
12524
  ];
12630
12525
  return candidates.find((file4) => existsSync17(file4));
12631
12526
  };
12632
12527
  const resolveLocalImport = (specifier, fromDir) => {
12633
12528
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
12634
- return resolveSourceFile2(resolve22(fromDir, specifier));
12529
+ return resolveSourceFile2(resolve21(fromDir, specifier));
12635
12530
  }
12636
12531
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile2);
12637
12532
  if (aliased)
@@ -12640,7 +12535,7 @@ ${fields}
12640
12535
  const resolved = Bun.resolveSync(specifier, fromDir);
12641
12536
  if (resolved.includes("/node_modules/"))
12642
12537
  return;
12643
- const absolute = resolve22(resolved);
12538
+ const absolute = resolve21(resolved);
12644
12539
  if (!absolute.startsWith(baseDir))
12645
12540
  return;
12646
12541
  return resolveSourceFile2(absolute);
@@ -12649,10 +12544,10 @@ ${fields}
12649
12544
  }
12650
12545
  };
12651
12546
  const toOutputPath = (sourcePath) => {
12652
- const inputDir = dirname14(sourcePath);
12547
+ const inputDir = dirname13(sourcePath);
12653
12548
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
12654
12549
  const fileBase = basename7(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
12655
- return join19(outDir, relativeDir, fileBase);
12550
+ return join18(outDir, relativeDir, fileBase);
12656
12551
  };
12657
12552
  const withCacheBuster = (specifier) => {
12658
12553
  if (!cacheBuster)
@@ -12689,13 +12584,13 @@ ${fields}
12689
12584
  return `${prefix}${dots}`;
12690
12585
  return `${prefix}../${dots}`;
12691
12586
  });
12692
- if (resolve22(actualPath) === entryPath) {
12587
+ if (resolve21(actualPath) === entryPath) {
12693
12588
  processedContent += buildIslandMetadataExports(sourceCode);
12694
12589
  }
12695
12590
  return processedContent;
12696
12591
  };
12697
12592
  const transpileFile = async (filePath) => {
12698
- const resolved = resolve22(filePath);
12593
+ const resolved = resolve21(filePath);
12699
12594
  if (visited.has(resolved))
12700
12595
  return;
12701
12596
  visited.add(resolved);
@@ -12705,12 +12600,12 @@ ${fields}
12705
12600
  if (!existsSync17(actualPath))
12706
12601
  return;
12707
12602
  let sourceCode = await fs.readFile(actualPath, "utf-8");
12708
- const inlined = await inlineResources(sourceCode, dirname14(actualPath), stylePreprocessors);
12709
- sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname14(actualPath)).source;
12710
- const inputDir = dirname14(actualPath);
12603
+ const inlined = await inlineResources(sourceCode, dirname13(actualPath), stylePreprocessors);
12604
+ sourceCode = inlineTemplateAndLowerDeferSync(inlined.source, dirname13(actualPath)).source;
12605
+ const inputDir = dirname13(actualPath);
12711
12606
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
12712
12607
  const fileBase = basename7(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
12713
- const targetDir = join19(outDir, relativeDir);
12608
+ const targetDir = join18(outDir, relativeDir);
12714
12609
  const targetPath = toOutputPath(actualPath);
12715
12610
  const localImports = [];
12716
12611
  const importRewrites = new Map;
@@ -12732,12 +12627,12 @@ ${fields}
12732
12627
  const resolved2 = resolveLocalImport(specifier, inputDir);
12733
12628
  if (!resolved2)
12734
12629
  return null;
12735
- const relativeImport = relative11(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
12630
+ const relativeImport = relative10(targetDir, toOutputPath(resolved2)).replace(/\\/g, "/").replace(/\.js$/, "");
12736
12631
  const relativeRewrite = relativeImport.startsWith(".") ? relativeImport : `./${relativeImport}`;
12737
12632
  importRewrites.set(specifier, relativeRewrite);
12738
12633
  return resolved2;
12739
12634
  }).filter((path) => Boolean(path));
12740
- const isEntry = resolve22(actualPath) === resolve22(entryPath);
12635
+ const isEntry = resolve21(actualPath) === resolve21(entryPath);
12741
12636
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
12742
12637
  const cacheKey2 = actualPath;
12743
12638
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey2) !== contentHash || !existsSync17(targetPath);
@@ -12771,13 +12666,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12771
12666
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
12772
12667
  }
12773
12668
  const compiledRoot = compiledParent;
12774
- const indexesDir = join19(compiledParent, "indexes");
12669
+ const indexesDir = join18(compiledParent, "indexes");
12775
12670
  await traceAngularPhase("setup/create-indexes-dir", () => fs.mkdir(indexesDir, { recursive: true }));
12776
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve22(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
12671
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve21(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
12777
12672
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
12778
12673
  const compileTasks = entryPoints.map(async (entry) => {
12779
- const resolvedEntry = resolve22(entry);
12780
- const relativeEntry = relative11(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
12674
+ const resolvedEntry = resolve21(entry);
12675
+ const relativeEntry = relative10(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
12781
12676
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
12782
12677
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
12783
12678
  entry: resolvedEntry
@@ -12785,13 +12680,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12785
12680
  const fileBase = basename7(resolvedEntry).replace(/\.[tj]s$/, "");
12786
12681
  const jsName = `${fileBase}.js`;
12787
12682
  const compiledFallbackPaths = [
12788
- join19(compiledRoot, relativeEntry),
12789
- join19(compiledRoot, "pages", jsName),
12790
- join19(compiledRoot, jsName)
12791
- ].map((file4) => resolve22(file4));
12683
+ join18(compiledRoot, relativeEntry),
12684
+ join18(compiledRoot, "pages", jsName),
12685
+ join18(compiledRoot, jsName)
12686
+ ].map((file4) => resolve21(file4));
12792
12687
  const resolveRawServerFile = (candidatePaths) => {
12793
12688
  const normalizedCandidates = [
12794
- ...candidatePaths.map((file4) => resolve22(file4)),
12689
+ ...candidatePaths.map((file4) => resolve21(file4)),
12795
12690
  ...compiledFallbackPaths
12796
12691
  ];
12797
12692
  let candidate = normalizedCandidates.find((file4) => existsSync17(file4) && file4.endsWith(`${sep3}pages${sep3}${jsName}`));
@@ -12832,7 +12727,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12832
12727
  const usesLegacyAnimations = await traceAngularPhase("wrapper/detect-legacy-animations", () => usesLegacyAngularAnimations(resolvedEntry), { entry: resolvedEntry });
12833
12728
  const serverContentHash = Bun.hash(original).toString(BASE_36_RADIX);
12834
12729
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
12835
- const clientFile = join19(indexesDir, jsName);
12730
+ const clientFile = join18(indexesDir, jsName);
12836
12731
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync17(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
12837
12732
  return {
12838
12733
  clientPath: clientFile,
@@ -12859,7 +12754,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
12859
12754
  `;
12860
12755
  }
12861
12756
  await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
12862
- const relativePath = relative11(indexesDir, rawServerFile).replace(/\\/g, "/");
12757
+ const relativePath = relative10(indexesDir, rawServerFile).replace(/\\/g, "/");
12863
12758
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
12864
12759
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
12865
12760
  import "${hmrClientPath5}";
@@ -13063,14 +12958,14 @@ var init_compileAngular = __esm(() => {
13063
12958
  init_stylePreprocessor();
13064
12959
  init_generatedDir();
13065
12960
  devClientDir4 = resolveDevClientDir4();
13066
- hmrClientPath5 = join19(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
12961
+ hmrClientPath5 = join18(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
13067
12962
  jitContentCache = new Map;
13068
12963
  wrapperOutputCache = new Map;
13069
12964
  });
13070
12965
 
13071
12966
  // node_modules/content-tag/pkg/node/content_tag.cjs
13072
12967
  var require_content_tag = __commonJS((exports, module) => {
13073
- var __dirname = "/home/alexkahn/abs/absolutejs/node_modules/content-tag/pkg/node";
12968
+ var __dirname = "/tmp/absolutejs-clean/node_modules/content-tag/pkg/node";
13074
12969
  var imports = {};
13075
12970
  imports["__wbindgen_placeholder__"] = exports;
13076
12971
  var wasm;
@@ -13508,7 +13403,7 @@ __export(exports_compileEmber, {
13508
13403
  getEmberServerCompiledDir: () => getEmberServerCompiledDir,
13509
13404
  getEmberCompiledRoot: () => getEmberCompiledRoot,
13510
13405
  getEmberClientCompiledDir: () => getEmberClientCompiledDir,
13511
- dirname: () => dirname15,
13406
+ dirname: () => dirname14,
13512
13407
  compileEmberFileSource: () => compileEmberFileSource,
13513
13408
  compileEmberFile: () => compileEmberFile,
13514
13409
  compileEmber: () => compileEmber,
@@ -13516,16 +13411,16 @@ __export(exports_compileEmber, {
13516
13411
  basename: () => basename8
13517
13412
  });
13518
13413
  import { existsSync as existsSync18 } from "fs";
13519
- import { mkdir as mkdir6, rm as rm4 } from "fs/promises";
13520
- import { basename as basename8, dirname as dirname15, extname as extname6, join as join20, resolve as resolve23 } from "path";
13521
- var {build: bunBuild2, Transpiler: Transpiler4, write: write3, file: file4 } = globalThis.Bun;
13414
+ import { mkdir as mkdir5, rm as rm4 } from "fs/promises";
13415
+ import { basename as basename8, dirname as dirname14, extname as extname6, join as join19, resolve as resolve22 } from "path";
13416
+ var {build: bunBuild2, Transpiler: Transpiler3, write: write3, file: file4 } = globalThis.Bun;
13522
13417
  var cachedPreprocessor = null, getPreprocessor = async () => {
13523
13418
  if (cachedPreprocessor)
13524
13419
  return cachedPreprocessor;
13525
13420
  const module = await Promise.resolve().then(() => __toESM(require_node(), 1));
13526
13421
  cachedPreprocessor = new module.Preprocessor;
13527
13422
  return cachedPreprocessor;
13528
- }, transpiler5, isTemplateTagFile = (entry) => {
13423
+ }, transpiler4, isTemplateTagFile = (entry) => {
13529
13424
  const ext = extname6(entry);
13530
13425
  return ext === ".gjs" || ext === ".gts";
13531
13426
  }, rewriteTemplateEvalToScope = (source) => {
@@ -13613,7 +13508,7 @@ export const importSync = (specifier) => {
13613
13508
  const originalImporter = stagedSourceMap.get(args.importer);
13614
13509
  if (!originalImporter)
13615
13510
  return;
13616
- const candidateBase = resolve23(dirname15(originalImporter), args.path);
13511
+ const candidateBase = resolve22(dirname14(originalImporter), args.path);
13617
13512
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
13618
13513
  for (const ext of extensionsToTry) {
13619
13514
  const candidate = candidateBase + ext;
@@ -13630,13 +13525,13 @@ export const importSync = (specifier) => {
13630
13525
  filename: args.path
13631
13526
  });
13632
13527
  const rewritten = rewriteTemplateEvalToScope(result.code);
13633
- const transpiled = transpiler5.transformSync(rewritten);
13528
+ const transpiled = transpiler4.transformSync(rewritten);
13634
13529
  return { contents: transpiled, loader: "js" };
13635
13530
  });
13636
13531
  build2.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
13637
13532
  if (standalonePackages.has(args.path))
13638
13533
  return;
13639
- const internal = join20(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
13534
+ const internal = join19(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
13640
13535
  if (existsSync18(internal))
13641
13536
  return { path: internal };
13642
13537
  return;
@@ -13672,7 +13567,7 @@ export const renderToHTML = (props = {}) => {
13672
13567
  export { PageComponent };
13673
13568
  export default PageComponent;
13674
13569
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
13675
- const resolvedEntry = resolve23(entry);
13570
+ const resolvedEntry = resolve22(entry);
13676
13571
  const source = await file4(resolvedEntry).text();
13677
13572
  let preprocessed = source;
13678
13573
  if (isTemplateTagFile(resolvedEntry)) {
@@ -13682,18 +13577,18 @@ export default PageComponent;
13682
13577
  });
13683
13578
  preprocessed = rewriteTemplateEvalToScope(result.code);
13684
13579
  }
13685
- const transpiled = transpiler5.transformSync(preprocessed);
13580
+ const transpiled = transpiler4.transformSync(preprocessed);
13686
13581
  const baseName = basename8(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
13687
- const tmpDir = join20(compiledRoot, "_tmp");
13688
- const serverDir = join20(compiledRoot, "server");
13689
- const clientDir = join20(compiledRoot, "client");
13582
+ const tmpDir = join19(compiledRoot, "_tmp");
13583
+ const serverDir = join19(compiledRoot, "server");
13584
+ const clientDir = join19(compiledRoot, "client");
13690
13585
  await Promise.all([
13691
- mkdir6(tmpDir, { recursive: true }),
13692
- mkdir6(serverDir, { recursive: true }),
13693
- mkdir6(clientDir, { recursive: true })
13586
+ mkdir5(tmpDir, { recursive: true }),
13587
+ mkdir5(serverDir, { recursive: true }),
13588
+ mkdir5(clientDir, { recursive: true })
13694
13589
  ]);
13695
- const tmpPagePath = resolve23(join20(tmpDir, `${baseName}.module.js`));
13696
- const tmpHarnessPath = resolve23(join20(tmpDir, `${baseName}.harness.js`));
13590
+ const tmpPagePath = resolve22(join19(tmpDir, `${baseName}.module.js`));
13591
+ const tmpHarnessPath = resolve22(join19(tmpDir, `${baseName}.harness.js`));
13697
13592
  await Promise.all([
13698
13593
  write3(tmpPagePath, transpiled),
13699
13594
  write3(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -13701,7 +13596,7 @@ export default PageComponent;
13701
13596
  const stagedSourceMap = new Map([
13702
13597
  [tmpPagePath, resolvedEntry]
13703
13598
  ]);
13704
- const serverPath = join20(serverDir, `${baseName}.js`);
13599
+ const serverPath = join19(serverDir, `${baseName}.js`);
13705
13600
  const buildResult = await bunBuild2({
13706
13601
  entrypoints: [tmpHarnessPath],
13707
13602
  format: "esm",
@@ -13718,7 +13613,7 @@ export default PageComponent;
13718
13613
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
13719
13614
  }
13720
13615
  await rm4(tmpDir, { force: true, recursive: true });
13721
- const clientPath = join20(clientDir, `${baseName}.js`);
13616
+ const clientPath = join19(clientDir, `${baseName}.js`);
13722
13617
  await write3(clientPath, transpiled);
13723
13618
  return { clientPath, serverPath };
13724
13619
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -13735,7 +13630,7 @@ export default PageComponent;
13735
13630
  serverPaths: outputs.map((o) => o.serverPath)
13736
13631
  };
13737
13632
  }, compileEmberFileSource = async (entry) => {
13738
- const resolvedEntry = resolve23(entry);
13633
+ const resolvedEntry = resolve22(entry);
13739
13634
  const source = await file4(resolvedEntry).text();
13740
13635
  let preprocessed = source;
13741
13636
  if (isTemplateTagFile(resolvedEntry)) {
@@ -13745,11 +13640,11 @@ export default PageComponent;
13745
13640
  });
13746
13641
  preprocessed = rewriteTemplateEvalToScope(result.code);
13747
13642
  }
13748
- return transpiler5.transformSync(preprocessed);
13749
- }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join20(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join20(getEmberCompiledRoot(emberDir), "client");
13643
+ return transpiler4.transformSync(preprocessed);
13644
+ }, clearEmberCompilerCache = () => {}, getEmberCompiledRoot = (_emberDir) => getFrameworkGeneratedDir("ember"), getEmberServerCompiledDir = (emberDir) => join19(getEmberCompiledRoot(emberDir), "server"), getEmberClientCompiledDir = (emberDir) => join19(getEmberCompiledRoot(emberDir), "client");
13750
13645
  var init_compileEmber = __esm(() => {
13751
13646
  init_generatedDir();
13752
- transpiler5 = new Transpiler4({
13647
+ transpiler4 = new Transpiler3({
13753
13648
  loader: "ts",
13754
13649
  target: "browser",
13755
13650
  tsconfig: JSON.stringify({
@@ -13768,24 +13663,24 @@ __export(exports_buildReactVendor, {
13768
13663
  buildReactVendor: () => buildReactVendor
13769
13664
  });
13770
13665
  import { existsSync as existsSync19, mkdirSync as mkdirSync7 } from "fs";
13771
- import { join as join21, resolve as resolve24 } from "path";
13666
+ import { join as join20, resolve as resolve23 } from "path";
13772
13667
  import { rm as rm5 } from "fs/promises";
13773
13668
  var {build: bunBuild3 } = globalThis.Bun;
13774
13669
  var resolveJsxDevRuntimeCompatPath = () => {
13775
13670
  const candidates = [
13776
- resolve24(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
13777
- resolve24(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
13778
- resolve24(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
13779
- resolve24(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
13780
- resolve24(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
13781
- resolve24(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
13671
+ resolve23(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
13672
+ resolve23(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
13673
+ resolve23(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
13674
+ resolve23(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
13675
+ resolve23(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
13676
+ resolve23(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
13782
13677
  ];
13783
13678
  for (const candidate of candidates) {
13784
13679
  if (existsSync19(candidate)) {
13785
13680
  return candidate.replace(/\\/g, "/");
13786
13681
  }
13787
13682
  }
13788
- return (candidates[0] ?? resolve24(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
13683
+ return (candidates[0] ?? resolve23(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
13789
13684
  }, jsxDevRuntimeCompatPath, reactSpecifiers, isResolvable = (specifier) => {
13790
13685
  try {
13791
13686
  Bun.resolveSync(specifier, process.cwd());
@@ -13822,14 +13717,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
13822
13717
  `)}
13823
13718
  `;
13824
13719
  }, buildReactVendor = async (buildDir) => {
13825
- const vendorDir = join21(buildDir, "react", "vendor");
13720
+ const vendorDir = join20(buildDir, "react", "vendor");
13826
13721
  mkdirSync7(vendorDir, { recursive: true });
13827
- const tmpDir = join21(buildDir, "_vendor_tmp");
13722
+ const tmpDir = join20(buildDir, "_vendor_tmp");
13828
13723
  mkdirSync7(tmpDir, { recursive: true });
13829
13724
  const specifiers = resolveVendorSpecifiers();
13830
13725
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
13831
13726
  const safeName = toSafeFileName(specifier);
13832
- const entryPath = join21(tmpDir, `${safeName}.ts`);
13727
+ const entryPath = join20(tmpDir, `${safeName}.ts`);
13833
13728
  const source = await generateEntrySource(specifier);
13834
13729
  await Bun.write(entryPath, source);
13835
13730
  return entryPath;
@@ -13894,7 +13789,7 @@ __export(exports_buildAngularVendor, {
13894
13789
  buildAngularServerVendor: () => buildAngularServerVendor
13895
13790
  });
13896
13791
  import { mkdirSync as mkdirSync8 } from "fs";
13897
- import { join as join22 } from "path";
13792
+ import { join as join21 } from "path";
13898
13793
  import { rm as rm6 } from "fs/promises";
13899
13794
  var {build: bunBuild4, Glob: Glob6 } = globalThis.Bun;
13900
13795
  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) => {
@@ -13907,7 +13802,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
13907
13802
  }, isBareSpecifier = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAngularBrowserSpecifier = (spec) => spec.startsWith("@angular/") && !SERVER_ONLY_ANGULAR_SPECIFIERS.has(spec) && !isBuildOnlyAngularSpecifier(spec), scanSourceImports = async (directories) => {
13908
13803
  const angular = new Set;
13909
13804
  const transitiveRoots = new Set;
13910
- const transpiler6 = new Bun.Transpiler({ loader: "tsx" });
13805
+ const transpiler5 = new Bun.Transpiler({ loader: "tsx" });
13911
13806
  const glob = new Glob6("**/*.{ts,tsx,js,jsx}");
13912
13807
  for (const dir of directories) {
13913
13808
  try {
@@ -13918,7 +13813,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
13918
13813
  continue;
13919
13814
  try {
13920
13815
  const content = await Bun.file(file5).text();
13921
- for (const imp of transpiler6.scanImports(content)) {
13816
+ for (const imp of transpiler5.scanImports(content)) {
13922
13817
  if (isAngularBrowserSpecifier(imp.path)) {
13923
13818
  angular.add(imp.path);
13924
13819
  } else if (isBareSpecifier(imp.path)) {
@@ -13932,7 +13827,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
13932
13827
  return { angular, transitiveRoots };
13933
13828
  }, PARTIAL_DECL_MARKERS, containsPartialDeclarations = (source) => PARTIAL_DECL_MARKERS.some((marker) => source.includes(marker)), collectTransitiveAngularSpecs = async (roots, angularFound) => {
13934
13829
  const { readFileSync: readFileSync14 } = await import("fs");
13935
- const transpiler6 = new Bun.Transpiler({ loader: "js" });
13830
+ const transpiler5 = new Bun.Transpiler({ loader: "js" });
13936
13831
  const visited = new Set;
13937
13832
  const frontier = [];
13938
13833
  for (const r of roots)
@@ -13961,7 +13856,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
13961
13856
  }
13962
13857
  let imports;
13963
13858
  try {
13964
- imports = transpiler6.scanImports(content);
13859
+ imports = transpiler5.scanImports(content);
13965
13860
  } catch {
13966
13861
  continue;
13967
13862
  }
@@ -13991,14 +13886,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
13991
13886
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
13992
13887
  return Array.from(angular).filter(isResolvable2);
13993
13888
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
13994
- const vendorDir = join22(buildDir, "angular", "vendor");
13889
+ const vendorDir = join21(buildDir, "angular", "vendor");
13995
13890
  mkdirSync8(vendorDir, { recursive: true });
13996
- const tmpDir = join22(buildDir, "_angular_vendor_tmp");
13891
+ const tmpDir = join21(buildDir, "_angular_vendor_tmp");
13997
13892
  mkdirSync8(tmpDir, { recursive: true });
13998
13893
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
13999
13894
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
14000
13895
  const safeName = toSafeFileName2(specifier);
14001
- const entryPath = join22(tmpDir, `${safeName}.ts`);
13896
+ const entryPath = join21(tmpDir, `${safeName}.ts`);
14002
13897
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
14003
13898
  return entryPath;
14004
13899
  }));
@@ -14029,9 +13924,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
14029
13924
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
14030
13925
  return computeAngularVendorPaths(specifiers);
14031
13926
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
14032
- const vendorDir = join22(buildDir, "angular", "vendor", "server");
13927
+ const vendorDir = join21(buildDir, "angular", "vendor", "server");
14033
13928
  mkdirSync8(vendorDir, { recursive: true });
14034
- const tmpDir = join22(buildDir, "_angular_server_vendor_tmp");
13929
+ const tmpDir = join21(buildDir, "_angular_server_vendor_tmp");
14035
13930
  mkdirSync8(tmpDir, { recursive: true });
14036
13931
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
14037
13932
  const allSpecs = new Set(browserSpecs);
@@ -14042,7 +13937,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
14042
13937
  const specifiers = Array.from(allSpecs);
14043
13938
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
14044
13939
  const safeName = toSafeFileName2(specifier);
14045
- const entryPath = join22(tmpDir, `${safeName}.ts`);
13940
+ const entryPath = join21(tmpDir, `${safeName}.ts`);
14046
13941
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
14047
13942
  return entryPath;
14048
13943
  }));
@@ -14064,9 +13959,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
14064
13959
  return specifiers;
14065
13960
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
14066
13961
  const paths = {};
14067
- const vendorDir = join22(buildDir, "angular", "vendor", "server");
13962
+ const vendorDir = join21(buildDir, "angular", "vendor", "server");
14068
13963
  for (const specifier of specifiers) {
14069
- paths[specifier] = join22(vendorDir, `${toSafeFileName2(specifier)}.js`);
13964
+ paths[specifier] = join21(vendorDir, `${toSafeFileName2(specifier)}.js`);
14070
13965
  }
14071
13966
  return paths;
14072
13967
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -14122,17 +14017,17 @@ __export(exports_buildVueVendor, {
14122
14017
  buildVueVendor: () => buildVueVendor
14123
14018
  });
14124
14019
  import { mkdirSync as mkdirSync9 } from "fs";
14125
- import { join as join23 } from "path";
14020
+ import { join as join22 } from "path";
14126
14021
  import { rm as rm7 } from "fs/promises";
14127
14022
  var {build: bunBuild5 } = globalThis.Bun;
14128
14023
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
14129
- const vendorDir = join23(buildDir, "vue", "vendor");
14024
+ const vendorDir = join22(buildDir, "vue", "vendor");
14130
14025
  mkdirSync9(vendorDir, { recursive: true });
14131
- const tmpDir = join23(buildDir, "_vue_vendor_tmp");
14026
+ const tmpDir = join22(buildDir, "_vue_vendor_tmp");
14132
14027
  mkdirSync9(tmpDir, { recursive: true });
14133
14028
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
14134
14029
  const safeName = toSafeFileName3(specifier);
14135
- const entryPath = join23(tmpDir, `${safeName}.ts`);
14030
+ const entryPath = join22(tmpDir, `${safeName}.ts`);
14136
14031
  await Bun.write(entryPath, `export * from '${specifier}';
14137
14032
  `);
14138
14033
  return entryPath;
@@ -14160,7 +14055,7 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
14160
14055
  const { readFileSync: readFileSync14, writeFileSync: writeFileSync8, readdirSync } = await import("fs");
14161
14056
  const files = readdirSync(vendorDir).filter((f2) => f2.endsWith(".js"));
14162
14057
  for (const file5 of files) {
14163
- const filePath = join23(vendorDir, file5);
14058
+ const filePath = join22(vendorDir, file5);
14164
14059
  const content = readFileSync14(filePath, "utf-8");
14165
14060
  if (!content.includes("__VUE_HMR_RUNTIME__"))
14166
14061
  continue;
@@ -14187,7 +14082,7 @@ __export(exports_buildSvelteVendor, {
14187
14082
  buildSvelteVendor: () => buildSvelteVendor
14188
14083
  });
14189
14084
  import { mkdirSync as mkdirSync10 } from "fs";
14190
- import { join as join24 } from "path";
14085
+ import { join as join23 } from "path";
14191
14086
  import { rm as rm8 } from "fs/promises";
14192
14087
  var {build: bunBuild6 } = globalThis.Bun;
14193
14088
  var svelteSpecifiers, isResolvable3 = (specifier) => {
@@ -14201,13 +14096,13 @@ var svelteSpecifiers, isResolvable3 = (specifier) => {
14201
14096
  const specifiers = resolveVendorSpecifiers2();
14202
14097
  if (specifiers.length === 0)
14203
14098
  return;
14204
- const vendorDir = join24(buildDir, "svelte", "vendor");
14099
+ const vendorDir = join23(buildDir, "svelte", "vendor");
14205
14100
  mkdirSync10(vendorDir, { recursive: true });
14206
- const tmpDir = join24(buildDir, "_svelte_vendor_tmp");
14101
+ const tmpDir = join23(buildDir, "_svelte_vendor_tmp");
14207
14102
  mkdirSync10(tmpDir, { recursive: true });
14208
14103
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
14209
14104
  const safeName = toSafeFileName4(specifier);
14210
- const entryPath = join24(tmpDir, `${safeName}.ts`);
14105
+ const entryPath = join23(tmpDir, `${safeName}.ts`);
14211
14106
  await Bun.write(entryPath, `export * from '${specifier}';
14212
14107
  `);
14213
14108
  return entryPath;
@@ -14257,7 +14152,7 @@ __export(exports_rewriteImportsPlugin, {
14257
14152
  buildWithImportRewrite: () => buildWithImportRewrite
14258
14153
  });
14259
14154
  import { readdir as readdir3 } from "fs/promises";
14260
- import { join as join25 } from "path";
14155
+ import { join as join24 } from "path";
14261
14156
  var escapeRegex2 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), jsRewriteImports = (content, replacements) => {
14262
14157
  let result = content;
14263
14158
  for (const [specifier, webPath] of replacements) {
@@ -14386,7 +14281,7 @@ ${content}`;
14386
14281
  const entries = await readdir3(dir);
14387
14282
  for (const entry of entries) {
14388
14283
  if (entry.endsWith(".js"))
14389
- allFiles.push(join25(dir, entry));
14284
+ allFiles.push(join24(dir, entry));
14390
14285
  }
14391
14286
  } catch {}
14392
14287
  }
@@ -14435,7 +14330,7 @@ import {
14435
14330
  statSync,
14436
14331
  writeFileSync as writeFileSync8
14437
14332
  } from "fs";
14438
- import { basename as basename9, dirname as dirname16, extname as extname7, join as join26, relative as relative12, resolve as resolve25 } from "path";
14333
+ import { basename as basename9, dirname as dirname15, extname as extname7, join as join25, relative as relative11, resolve as resolve24 } from "path";
14439
14334
  import { cwd, env as env3, exit } from "process";
14440
14335
  var {build: bunBuild7, Glob: Glob7 } = globalThis.Bun;
14441
14336
  var isDev2, isBuildTraceEnabled = () => {
@@ -14513,8 +14408,8 @@ var isDev2, isBuildTraceEnabled = () => {
14513
14408
  mkdirSync11(htmxDestDir, { recursive: true });
14514
14409
  const glob = new Glob7("htmx*.min.js");
14515
14410
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
14516
- const src = join26(htmxDir, relPath);
14517
- const dest = join26(htmxDestDir, "htmx.min.js");
14411
+ const src = join25(htmxDir, relPath);
14412
+ const dest = join25(htmxDestDir, "htmx.min.js");
14518
14413
  copyFileSync(src, dest);
14519
14414
  return;
14520
14415
  }
@@ -14526,8 +14421,8 @@ var isDev2, isBuildTraceEnabled = () => {
14526
14421
  }
14527
14422
  }, resolveAbsoluteVersion = async () => {
14528
14423
  const candidates = [
14529
- resolve25(import.meta.dir, "..", "..", "package.json"),
14530
- resolve25(import.meta.dir, "..", "package.json")
14424
+ resolve24(import.meta.dir, "..", "..", "package.json"),
14425
+ resolve24(import.meta.dir, "..", "package.json")
14531
14426
  ];
14532
14427
  const resolveCandidate = async (remaining) => {
14533
14428
  const [candidate, ...rest] = remaining;
@@ -14543,7 +14438,7 @@ var isDev2, isBuildTraceEnabled = () => {
14543
14438
  };
14544
14439
  await resolveCandidate(candidates);
14545
14440
  }, SKIP_DIRS, addWorkerPathIfExists = (file5, relPath, workerPaths) => {
14546
- const absPath = resolve25(file5, "..", relPath);
14441
+ const absPath = resolve24(file5, "..", relPath);
14547
14442
  try {
14548
14443
  statSync(absPath);
14549
14444
  workerPaths.add(absPath);
@@ -14589,7 +14484,7 @@ var isDev2, isBuildTraceEnabled = () => {
14589
14484
  vuePagesPath
14590
14485
  }) => {
14591
14486
  const { readdirSync: readDir } = await import("fs");
14592
- const devIndexDir = join26(buildPath, "_src_indexes");
14487
+ const devIndexDir = join25(buildPath, "_src_indexes");
14593
14488
  mkdirSync11(devIndexDir, { recursive: true });
14594
14489
  if (reactIndexesPath && reactPagesPath) {
14595
14490
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
@@ -14605,37 +14500,37 @@ var isDev2, isBuildTraceEnabled = () => {
14605
14500
  return;
14606
14501
  }
14607
14502
  const indexFiles = readDir(reactIndexesPath).filter((file5) => file5.endsWith(".tsx"));
14608
- const pagesRel = relative12(process.cwd(), resolve25(reactPagesPath)).replace(/\\/g, "/");
14503
+ const pagesRel = relative11(process.cwd(), resolve24(reactPagesPath)).replace(/\\/g, "/");
14609
14504
  for (const file5 of indexFiles) {
14610
- let content = readFileSync14(join26(reactIndexesPath, file5), "utf-8");
14505
+ let content = readFileSync14(join25(reactIndexesPath, file5), "utf-8");
14611
14506
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
14612
- writeFileSync8(join26(devIndexDir, file5), content);
14507
+ writeFileSync8(join25(devIndexDir, file5), content);
14613
14508
  }
14614
14509
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
14615
- const svelteIndexDir = join26(getFrameworkGeneratedDir("svelte"), "indexes");
14616
- const sveltePageEntries = svelteEntries.filter((file5) => resolve25(file5).startsWith(resolve25(sveltePagesPath)));
14510
+ const svelteIndexDir = join25(getFrameworkGeneratedDir("svelte"), "indexes");
14511
+ const sveltePageEntries = svelteEntries.filter((file5) => resolve24(file5).startsWith(resolve24(sveltePagesPath)));
14617
14512
  for (const entry of sveltePageEntries) {
14618
14513
  const name = basename9(entry).replace(/\.svelte(\.(ts|js))?$/, "");
14619
- const indexFile = join26(svelteIndexDir, "pages", `${name}.js`);
14514
+ const indexFile = join25(svelteIndexDir, "pages", `${name}.js`);
14620
14515
  if (!existsSync20(indexFile))
14621
14516
  continue;
14622
14517
  let content = readFileSync14(indexFile, "utf-8");
14623
- const srcRel = relative12(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
14518
+ const srcRel = relative11(process.cwd(), resolve24(entry)).replace(/\\/g, "/");
14624
14519
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
14625
- writeFileSync8(join26(devIndexDir, `${name}.svelte.js`), content);
14520
+ writeFileSync8(join25(devIndexDir, `${name}.svelte.js`), content);
14626
14521
  }
14627
14522
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
14628
- const vueIndexDir = join26(getFrameworkGeneratedDir("vue"), "indexes");
14629
- const vuePageEntries = vueEntries.filter((file5) => resolve25(file5).startsWith(resolve25(vuePagesPath)));
14523
+ const vueIndexDir = join25(getFrameworkGeneratedDir("vue"), "indexes");
14524
+ const vuePageEntries = vueEntries.filter((file5) => resolve24(file5).startsWith(resolve24(vuePagesPath)));
14630
14525
  for (const entry of vuePageEntries) {
14631
14526
  const name = basename9(entry, ".vue");
14632
- const indexFile = join26(vueIndexDir, `${name}.js`);
14527
+ const indexFile = join25(vueIndexDir, `${name}.js`);
14633
14528
  if (!existsSync20(indexFile))
14634
14529
  continue;
14635
14530
  let content = readFileSync14(indexFile, "utf-8");
14636
- const srcRel = relative12(process.cwd(), resolve25(entry)).replace(/\\/g, "/");
14531
+ const srcRel = relative11(process.cwd(), resolve24(entry)).replace(/\\/g, "/");
14637
14532
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
14638
- writeFileSync8(join26(devIndexDir, `${name}.vue.js`), content);
14533
+ writeFileSync8(join25(devIndexDir, `${name}.vue.js`), content);
14639
14534
  }
14640
14535
  }, resolveVueRuntimeId = (content, firstUseName, outputPath, projectRoot) => {
14641
14536
  const varIdx = content.indexOf(`var ${firstUseName} =`);
@@ -14646,7 +14541,7 @@ var isDev2, isBuildTraceEnabled = () => {
14646
14541
  const last = allComments[allComments.length - 1];
14647
14542
  if (!last?.[1])
14648
14543
  return JSON.stringify(outputPath);
14649
- const srcPath = resolve25(projectRoot, last[1].replace("/client/", "/").replace(/\.js$/, ".ts"));
14544
+ const srcPath = resolve24(projectRoot, last[1].replace("/client/", "/").replace(/\.js$/, ".ts"));
14650
14545
  return JSON.stringify(srcPath);
14651
14546
  }, QUOTE_CHARS, OPEN_BRACES, CLOSE_BRACES, findFunctionExpressionEnd = (content, startPos) => {
14652
14547
  let depth = 0;
@@ -14708,7 +14603,7 @@ ${content.slice(firstUseIdx)}`;
14708
14603
  }, buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
14709
14604
  const urlFileMap = new Map;
14710
14605
  for (const srcPath of urlReferencedFiles) {
14711
- const rel = relative12(projectRoot, srcPath).replace(/\\/g, "/");
14606
+ const rel = relative11(projectRoot, srcPath).replace(/\\/g, "/");
14712
14607
  const name = basename9(srcPath);
14713
14608
  const mtime = Math.round(statSync(srcPath).mtimeMs);
14714
14609
  const url = `/@src/${rel}?v=${mtime}`;
@@ -14723,7 +14618,7 @@ ${content.slice(firstUseIdx)}`;
14723
14618
  const output = nonReactClientOutputs.find((artifact) => basename9(artifact.path).startsWith(`${srcBase}.`));
14724
14619
  if (!output)
14725
14620
  continue;
14726
- urlFileMap.set(basename9(srcPath), `/${relative12(buildPath, output.path).replace(/\\/g, "/")}`);
14621
+ urlFileMap.set(basename9(srcPath), `/${relative11(buildPath, output.path).replace(/\\/g, "/")}`);
14727
14622
  }
14728
14623
  return urlFileMap;
14729
14624
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -14857,10 +14752,10 @@ ${content.slice(firstUseIdx)}`;
14857
14752
  restoreTracePhase();
14858
14753
  return;
14859
14754
  }
14860
- const traceDir = join26(buildPath2, ".absolute-trace");
14755
+ const traceDir = join25(buildPath2, ".absolute-trace");
14861
14756
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
14862
14757
  mkdirSync11(traceDir, { recursive: true });
14863
- writeFileSync8(join26(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
14758
+ writeFileSync8(join25(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
14864
14759
  events: traceEvents,
14865
14760
  frameworks: traceFrameworkNames,
14866
14761
  generatedAt: new Date().toISOString(),
@@ -14891,15 +14786,15 @@ ${content.slice(firstUseIdx)}`;
14891
14786
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
14892
14787
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
14893
14788
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
14894
- const reactIndexesPath = reactDir && join26(getFrameworkGeneratedDir("react"), "indexes");
14895
- const reactPagesPath = reactDir && join26(reactDir, "pages");
14896
- const htmlPagesPath = htmlDir && join26(htmlDir, "pages");
14897
- const htmlScriptsPath = htmlDir && join26(htmlDir, "scripts");
14898
- const sveltePagesPath = svelteDir && join26(svelteDir, "pages");
14899
- const vuePagesPath = vueDir && join26(vueDir, "pages");
14900
- const htmxPagesPath = htmxDir && join26(htmxDir, "pages");
14901
- const angularPagesPath = angularDir && join26(angularDir, "pages");
14902
- const emberPagesPath = emberDir && join26(emberDir, "pages");
14789
+ const reactIndexesPath = reactDir && join25(getFrameworkGeneratedDir("react"), "indexes");
14790
+ const reactPagesPath = reactDir && join25(reactDir, "pages");
14791
+ const htmlPagesPath = htmlDir && join25(htmlDir, "pages");
14792
+ const htmlScriptsPath = htmlDir && join25(htmlDir, "scripts");
14793
+ const sveltePagesPath = svelteDir && join25(svelteDir, "pages");
14794
+ const vuePagesPath = vueDir && join25(vueDir, "pages");
14795
+ const htmxPagesPath = htmxDir && join25(htmxDir, "pages");
14796
+ const angularPagesPath = angularDir && join25(angularDir, "pages");
14797
+ const emberPagesPath = emberDir && join25(emberDir, "pages");
14903
14798
  const frontends = [
14904
14799
  reactDir,
14905
14800
  htmlDir,
@@ -14930,7 +14825,7 @@ ${content.slice(firstUseIdx)}`;
14930
14825
  const sourceClientRoots = [
14931
14826
  htmlDir,
14932
14827
  htmxDir,
14933
- islandBootstrapPath && dirname16(islandBootstrapPath)
14828
+ islandBootstrapPath && dirname15(islandBootstrapPath)
14934
14829
  ].filter((dir) => Boolean(dir));
14935
14830
  const usesGenerated = Boolean(reactDir) || Boolean(svelteDir) || Boolean(vueDir) || Boolean(angularDir);
14936
14831
  if (usesGenerated)
@@ -14958,8 +14853,8 @@ ${content.slice(firstUseIdx)}`;
14958
14853
  const [firstEntry] = serverDirMap;
14959
14854
  if (!firstEntry)
14960
14855
  throw new Error("Expected at least one server directory entry");
14961
- serverRoot = join26(firstEntry.dir, firstEntry.subdir);
14962
- serverOutDir = join26(buildPath, basename9(firstEntry.dir));
14856
+ serverRoot = join25(firstEntry.dir, firstEntry.subdir);
14857
+ serverOutDir = join25(buildPath, basename9(firstEntry.dir));
14963
14858
  } else if (serverDirMap.length > 1) {
14964
14859
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
14965
14860
  serverOutDir = buildPath;
@@ -14971,13 +14866,13 @@ ${content.slice(firstUseIdx)}`;
14971
14866
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
14972
14867
  if (!isIncremental || !incrementalFiles)
14973
14868
  return entryPoints;
14974
- const normalizedIncremental = new Set(incrementalFiles.map((f2) => resolve25(f2)));
14869
+ const normalizedIncremental = new Set(incrementalFiles.map((f2) => resolve24(f2)));
14975
14870
  const matchingEntries = [];
14976
14871
  for (const entry of entryPoints) {
14977
14872
  const sourceFile = mapToSource(entry);
14978
14873
  if (!sourceFile)
14979
14874
  continue;
14980
- if (!normalizedIncremental.has(resolve25(sourceFile)))
14875
+ if (!normalizedIncremental.has(resolve24(sourceFile)))
14981
14876
  continue;
14982
14877
  matchingEntries.push(entry);
14983
14878
  }
@@ -14987,7 +14882,7 @@ ${content.slice(firstUseIdx)}`;
14987
14882
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
14988
14883
  }
14989
14884
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/assets/")))) {
14990
- await tracePhase("assets/copy", () => cpSync(assetsPath, join26(buildPath, "assets"), {
14885
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join25(buildPath, "assets"), {
14991
14886
  force: true,
14992
14887
  recursive: true
14993
14888
  }));
@@ -15039,9 +14934,9 @@ ${content.slice(firstUseIdx)}`;
15039
14934
  }
15040
14935
  const shouldIncludeHtmlAssets = !isIncremental || normalizedIncrementalFiles?.some((f2) => f2.includes("/html/") && (f2.endsWith(".html") || isStylePath(f2)));
15041
14936
  const reactEntries = isIncremental && reactIndexesPath && reactPagesPath ? filterToIncrementalEntries(allReactEntries, (entry) => {
15042
- if (entry.startsWith(resolve25(reactIndexesPath))) {
14937
+ if (entry.startsWith(resolve24(reactIndexesPath))) {
15043
14938
  const pageName = basename9(entry, ".tsx");
15044
- return join26(reactPagesPath, `${pageName}.tsx`);
14939
+ return join25(reactPagesPath, `${pageName}.tsx`);
15045
14940
  }
15046
14941
  return null;
15047
14942
  }) : allReactEntries;
@@ -15118,7 +15013,7 @@ ${content.slice(firstUseIdx)}`;
15118
15013
  const clientPath = islandSvelteClientPaths[idx];
15119
15014
  if (!sourcePath || !clientPath)
15120
15015
  continue;
15121
- islandSvelteClientPathMap.set(resolve25(sourcePath), clientPath);
15016
+ islandSvelteClientPathMap.set(resolve24(sourcePath), clientPath);
15122
15017
  }
15123
15018
  const islandVueClientPathMap = new Map;
15124
15019
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -15126,7 +15021,7 @@ ${content.slice(firstUseIdx)}`;
15126
15021
  const clientPath = islandVueClientPaths[idx];
15127
15022
  if (!sourcePath || !clientPath)
15128
15023
  continue;
15129
- islandVueClientPathMap.set(resolve25(sourcePath), clientPath);
15024
+ islandVueClientPathMap.set(resolve24(sourcePath), clientPath);
15130
15025
  }
15131
15026
  const islandAngularClientPathMap = new Map;
15132
15027
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -15134,7 +15029,7 @@ ${content.slice(firstUseIdx)}`;
15134
15029
  const clientPath = islandAngularClientPaths[idx];
15135
15030
  if (!sourcePath || !clientPath)
15136
15031
  continue;
15137
- islandAngularClientPathMap.set(resolve25(sourcePath), clientPath);
15032
+ islandAngularClientPathMap.set(resolve24(sourcePath), clientPath);
15138
15033
  }
15139
15034
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
15140
15035
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -15145,7 +15040,7 @@ ${content.slice(firstUseIdx)}`;
15145
15040
  const compileReactConventions = async () => {
15146
15041
  if (reactConventionSources.length === 0)
15147
15042
  return emptyStringArray;
15148
- const destDir = join26(buildPath, "conventions", "react");
15043
+ const destDir = join25(buildPath, "conventions", "react");
15149
15044
  rmSync2(destDir, { force: true, recursive: true });
15150
15045
  mkdirSync11(destDir, { recursive: true });
15151
15046
  const destPaths = [];
@@ -15161,7 +15056,7 @@ ${content.slice(firstUseIdx)}`;
15161
15056
  naming: `${idx}-[name].[ext]`,
15162
15057
  outdir: destDir,
15163
15058
  plugins: [stylePreprocessorPlugin2],
15164
- root: dirname16(source),
15059
+ root: dirname15(source),
15165
15060
  target: "bun",
15166
15061
  throw: false,
15167
15062
  tsconfig: "./tsconfig.json"
@@ -15189,7 +15084,7 @@ ${content.slice(firstUseIdx)}`;
15189
15084
  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 }
15190
15085
  ]);
15191
15086
  const bundleConventionFiles = async (framework, compiledPaths) => {
15192
- const destDir = join26(buildPath, "conventions", framework);
15087
+ const destDir = join25(buildPath, "conventions", framework);
15193
15088
  rmSync2(destDir, { force: true, recursive: true });
15194
15089
  mkdirSync11(destDir, { recursive: true });
15195
15090
  const destPaths = [];
@@ -15263,7 +15158,7 @@ ${content.slice(firstUseIdx)}`;
15263
15158
  }
15264
15159
  })) : {
15265
15160
  entries: [],
15266
- generatedRoot: join26(buildPath, "_island_entries")
15161
+ generatedRoot: join25(buildPath, "_island_entries")
15267
15162
  };
15268
15163
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
15269
15164
  if (serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -15299,7 +15194,7 @@ ${content.slice(firstUseIdx)}`;
15299
15194
  return {};
15300
15195
  }
15301
15196
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
15302
- const refreshEntry = join26(reactIndexesPath, "_refresh.tsx");
15197
+ const refreshEntry = join25(reactIndexesPath, "_refresh.tsx");
15303
15198
  if (!reactClientEntryPoints.includes(refreshEntry))
15304
15199
  reactClientEntryPoints.push(refreshEntry);
15305
15200
  }
@@ -15398,19 +15293,19 @@ ${content.slice(firstUseIdx)}`;
15398
15293
  throw: false
15399
15294
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
15400
15295
  if (reactDir && reactClientEntryPoints.length > 0) {
15401
- rmSync2(join26(buildPath, "react", "generated", "indexes"), {
15296
+ rmSync2(join25(buildPath, "react", "generated", "indexes"), {
15402
15297
  force: true,
15403
15298
  recursive: true
15404
15299
  });
15405
15300
  }
15406
15301
  if (angularDir && angularClientPaths.length > 0) {
15407
- rmSync2(join26(buildPath, "angular", "indexes"), {
15302
+ rmSync2(join25(buildPath, "angular", "indexes"), {
15408
15303
  force: true,
15409
15304
  recursive: true
15410
15305
  });
15411
15306
  }
15412
15307
  if (islandClientEntryPoints.length > 0) {
15413
- rmSync2(join26(buildPath, "islands"), {
15308
+ rmSync2(join25(buildPath, "islands"), {
15414
15309
  force: true,
15415
15310
  recursive: true
15416
15311
  });
@@ -15493,7 +15388,7 @@ ${content.slice(firstUseIdx)}`;
15493
15388
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
15494
15389
  entrypoints: globalCssEntries,
15495
15390
  naming: `[dir]/[name].[hash].[ext]`,
15496
- outdir: stylesDir ? join26(buildPath, basename9(stylesDir)) : buildPath,
15391
+ outdir: stylesDir ? join25(buildPath, basename9(stylesDir)) : buildPath,
15497
15392
  plugins: [stylePreprocessorPlugin2],
15498
15393
  root: stylesDir || clientRoot,
15499
15394
  target: "browser",
@@ -15502,7 +15397,7 @@ ${content.slice(firstUseIdx)}`;
15502
15397
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
15503
15398
  entrypoints: vueCssPaths,
15504
15399
  naming: `[name].[hash].[ext]`,
15505
- outdir: join26(buildPath, assetsPath ? basename9(assetsPath) : "assets", "css"),
15400
+ outdir: join25(buildPath, assetsPath ? basename9(assetsPath) : "assets", "css"),
15506
15401
  target: "browser",
15507
15402
  throw: false
15508
15403
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -15569,10 +15464,10 @@ ${content.slice(firstUseIdx)}`;
15569
15464
  if (serverOutputs.length > 0 && angularServerVendorPaths2 && Object.keys(angularServerVendorPaths2).length > 0) {
15570
15465
  const { rewriteBuildOutputsWith: rewriteBuildOutputsWith2 } = await Promise.resolve().then(() => (init_rewriteImportsPlugin(), exports_rewriteImportsPlugin));
15571
15466
  await tracePhase("postprocess/server-angular-vendor-imports", () => rewriteBuildOutputsWith2(serverOutputs, (artifact) => {
15572
- const fileDir = dirname16(artifact.path);
15467
+ const fileDir = dirname15(artifact.path);
15573
15468
  const relativePaths = {};
15574
15469
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths2)) {
15575
- const rel = relative12(fileDir, absolute);
15470
+ const rel = relative11(fileDir, absolute);
15576
15471
  relativePaths[specifier] = rel.startsWith(".") ? rel : `./${rel}`;
15577
15472
  }
15578
15473
  return relativePaths;
@@ -15641,7 +15536,7 @@ ${content.slice(firstUseIdx)}`;
15641
15536
  if (skipAngularClientBundle) {
15642
15537
  for (const clientPath of angularClientPaths) {
15643
15538
  const fileBase = basename9(clientPath, ".js");
15644
- const relFromCwd = relative12(projectRoot, clientPath).replace(/\\/g, "/");
15539
+ const relFromCwd = relative11(projectRoot, clientPath).replace(/\\/g, "/");
15645
15540
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
15646
15541
  }
15647
15542
  }
@@ -15663,7 +15558,7 @@ ${content.slice(firstUseIdx)}`;
15663
15558
  const processHtmlPages = async () => {
15664
15559
  if (!(htmlDir && htmlPagesPath))
15665
15560
  return;
15666
- const outputHtmlPages = isSingle ? join26(buildPath, "pages") : join26(buildPath, basename9(htmlDir), "pages");
15561
+ const outputHtmlPages = isSingle ? join25(buildPath, "pages") : join25(buildPath, basename9(htmlDir), "pages");
15667
15562
  mkdirSync11(outputHtmlPages, { recursive: true });
15668
15563
  cpSync(htmlPagesPath, outputHtmlPages, {
15669
15564
  force: true,
@@ -15685,14 +15580,14 @@ ${content.slice(firstUseIdx)}`;
15685
15580
  const processHtmxPages = async () => {
15686
15581
  if (!(htmxDir && htmxPagesPath))
15687
15582
  return;
15688
- const outputHtmxPages = isSingle ? join26(buildPath, "pages") : join26(buildPath, basename9(htmxDir), "pages");
15583
+ const outputHtmxPages = isSingle ? join25(buildPath, "pages") : join25(buildPath, basename9(htmxDir), "pages");
15689
15584
  mkdirSync11(outputHtmxPages, { recursive: true });
15690
15585
  cpSync(htmxPagesPath, outputHtmxPages, {
15691
15586
  force: true,
15692
15587
  recursive: true
15693
15588
  });
15694
15589
  if (shouldCopyHtmx) {
15695
- const htmxDestDir = isSingle ? buildPath : join26(buildPath, basename9(htmxDir));
15590
+ const htmxDestDir = isSingle ? buildPath : join25(buildPath, basename9(htmxDir));
15696
15591
  copyHtmxVendor(htmxDir, htmxDestDir);
15697
15592
  }
15698
15593
  if (shouldUpdateHtmxAssetPaths) {
@@ -15754,9 +15649,9 @@ ${content.slice(firstUseIdx)}`;
15754
15649
  writeBuildTrace(buildPath);
15755
15650
  return { conventions: conventionsMap, manifest };
15756
15651
  }
15757
- writeFileSync8(join26(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
15652
+ writeFileSync8(join25(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
15758
15653
  if (Object.keys(conventionsMap).length > 0) {
15759
- writeFileSync8(join26(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
15654
+ writeFileSync8(join25(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
15760
15655
  }
15761
15656
  writeBuildTrace(buildPath);
15762
15657
  if (tailwind && mode === "production") {
@@ -15857,7 +15752,7 @@ var init_build = __esm(() => {
15857
15752
 
15858
15753
  // src/build/buildEmberVendor.ts
15859
15754
  import { mkdirSync as mkdirSync12, existsSync as existsSync21 } from "fs";
15860
- import { join as join27 } from "path";
15755
+ import { join as join26 } from "path";
15861
15756
  import { rm as rm9 } from "fs/promises";
15862
15757
  var {build: bunBuild8 } = globalThis.Bun;
15863
15758
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -15909,7 +15804,7 @@ export const importSync = (specifier) => {
15909
15804
  if (standaloneSpecifiers.has(specifier)) {
15910
15805
  return { resolveTo: specifier, specifier };
15911
15806
  }
15912
- const emberInternalPath = join27(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
15807
+ const emberInternalPath = join26(cwd2, "node_modules/ember-source/dist/packages", specifier, "index.js");
15913
15808
  if (!existsSync21(emberInternalPath)) {
15914
15809
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
15915
15810
  }
@@ -15941,7 +15836,7 @@ export const importSync = (specifier) => {
15941
15836
  if (standalonePackages.has(args.path)) {
15942
15837
  return;
15943
15838
  }
15944
- const internal = join27(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
15839
+ const internal = join26(cwd2, "node_modules/ember-source/dist/packages", args.path, "index.js");
15945
15840
  if (existsSync21(internal)) {
15946
15841
  return { path: internal };
15947
15842
  }
@@ -15949,16 +15844,16 @@ export const importSync = (specifier) => {
15949
15844
  });
15950
15845
  }
15951
15846
  }), buildEmberVendor = async (buildDir, cwd2 = process.cwd()) => {
15952
- const vendorDir = join27(buildDir, "ember", "vendor");
15847
+ const vendorDir = join26(buildDir, "ember", "vendor");
15953
15848
  mkdirSync12(vendorDir, { recursive: true });
15954
- const tmpDir = join27(buildDir, "_ember_vendor_tmp");
15849
+ const tmpDir = join26(buildDir, "_ember_vendor_tmp");
15955
15850
  mkdirSync12(tmpDir, { recursive: true });
15956
- const macrosShimPath = join27(tmpDir, "embroider_macros_shim.js");
15851
+ const macrosShimPath = join26(tmpDir, "embroider_macros_shim.js");
15957
15852
  await Bun.write(macrosShimPath, generateMacrosShim());
15958
15853
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd2));
15959
15854
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
15960
15855
  const safeName = toSafeFileName5(resolution.specifier);
15961
- const entryPath = join27(tmpDir, `${safeName}.js`);
15856
+ const entryPath = join26(tmpDir, `${safeName}.js`);
15962
15857
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
15963
15858
  ` : generateVendorEntrySource2(resolution);
15964
15859
  await Bun.write(entryPath, source);
@@ -16004,7 +15899,7 @@ var init_buildEmberVendor = __esm(() => {
16004
15899
  // src/dev/dependencyGraph.ts
16005
15900
  import { existsSync as existsSync22, readFileSync as readFileSync15 } from "fs";
16006
15901
  var {Glob: Glob8 } = globalThis.Bun;
16007
- import { resolve as resolve26 } from "path";
15902
+ import { resolve as resolve25 } from "path";
16008
15903
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
16009
15904
  const lower = filePath.toLowerCase();
16010
15905
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -16018,8 +15913,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16018
15913
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
16019
15914
  return null;
16020
15915
  }
16021
- const fromDir = resolve26(fromFile, "..");
16022
- const normalized = resolve26(fromDir, importPath);
15916
+ const fromDir = resolve25(fromFile, "..");
15917
+ const normalized = resolve25(fromDir, importPath);
16023
15918
  const extensions = [
16024
15919
  ".ts",
16025
15920
  ".tsx",
@@ -16049,7 +15944,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16049
15944
  dependents.delete(normalizedPath);
16050
15945
  }
16051
15946
  }, addFileToGraph = (graph, filePath) => {
16052
- const normalizedPath = resolve26(filePath);
15947
+ const normalizedPath = resolve25(filePath);
16053
15948
  if (!existsSync22(normalizedPath))
16054
15949
  return;
16055
15950
  const dependencies = extractDependencies(normalizedPath);
@@ -16066,10 +15961,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16066
15961
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
16067
15962
  const processedFiles = new Set;
16068
15963
  const glob = new Glob8("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
16069
- const resolvedDirs = directories.map((dir) => resolve26(dir)).filter((dir) => existsSync22(dir));
15964
+ const resolvedDirs = directories.map((dir) => resolve25(dir)).filter((dir) => existsSync22(dir));
16070
15965
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
16071
15966
  for (const file5 of allFiles) {
16072
- const fullPath = resolve26(file5);
15967
+ const fullPath = resolve25(file5);
16073
15968
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
16074
15969
  continue;
16075
15970
  if (processedFiles.has(fullPath))
@@ -16124,8 +16019,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16124
16019
  resolveRegexMatches(styleUrlSingularRegex, content, filePath, dependencies);
16125
16020
  extractStyleUrlsDependencies(content, filePath, dependencies);
16126
16021
  }, extractJsDependencies = (filePath, content, loader) => {
16127
- const transpiler6 = loader === "tsx" ? tsTranspiler : jsTranspiler;
16128
- const imports = transpiler6.scanImports(content);
16022
+ const transpiler5 = loader === "tsx" ? tsTranspiler : jsTranspiler;
16023
+ const imports = transpiler5.scanImports(content);
16129
16024
  const dependencies = [];
16130
16025
  for (const imp of imports) {
16131
16026
  const resolved = resolveImportPath2(imp.path, filePath);
@@ -16182,7 +16077,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16182
16077
  return [];
16183
16078
  }
16184
16079
  }, getAffectedFiles = (graph, changedFile) => {
16185
- const normalizedPath = resolve26(changedFile);
16080
+ const normalizedPath = resolve25(changedFile);
16186
16081
  const affected = new Set;
16187
16082
  const toProcess = [normalizedPath];
16188
16083
  const processNode = (current) => {
@@ -16222,7 +16117,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
16222
16117
  }
16223
16118
  graph.dependents.delete(normalizedPath);
16224
16119
  }, removeFileFromGraph = (graph, filePath) => {
16225
- const normalizedPath = resolve26(filePath);
16120
+ const normalizedPath = resolve25(filePath);
16226
16121
  removeDepsForFile(graph, normalizedPath);
16227
16122
  removeDependentsForFile(graph, normalizedPath);
16228
16123
  };
@@ -16265,12 +16160,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
16265
16160
  };
16266
16161
 
16267
16162
  // src/dev/configResolver.ts
16268
- import { resolve as resolve27 } from "path";
16163
+ import { resolve as resolve26 } from "path";
16269
16164
  var resolveBuildPaths = (config) => {
16270
16165
  const cwd2 = process.cwd();
16271
16166
  const normalize = (path) => path.replace(/\\/g, "/");
16272
- const withDefault = (value, fallback) => normalize(resolve27(cwd2, value ?? fallback));
16273
- const optional = (value) => value ? normalize(resolve27(cwd2, value)) : undefined;
16167
+ const withDefault = (value, fallback) => normalize(resolve26(cwd2, value ?? fallback));
16168
+ const optional = (value) => value ? normalize(resolve26(cwd2, value)) : undefined;
16274
16169
  return {
16275
16170
  angularDir: optional(config.angularDirectory),
16276
16171
  assetsDir: optional(config.assetsDirectory),
@@ -16323,7 +16218,7 @@ var init_clientManager = __esm(() => {
16323
16218
 
16324
16219
  // src/dev/pathUtils.ts
16325
16220
  import { existsSync as existsSync23, readdirSync, readFileSync as readFileSync16 } from "fs";
16326
- import { dirname as dirname17, resolve as resolve28 } from "path";
16221
+ import { dirname as dirname16, resolve as resolve27 } from "path";
16327
16222
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16328
16223
  if (shouldIgnorePath(filePath, resolved)) {
16329
16224
  return "ignored";
@@ -16399,7 +16294,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16399
16294
  return "unknown";
16400
16295
  }, collectAngularResourceDirs = (angularDir) => {
16401
16296
  const out = new Set;
16402
- const angularRoot = resolve28(angularDir);
16297
+ const angularRoot = resolve27(angularDir);
16403
16298
  const angularRootNormalized = normalizePath(angularRoot);
16404
16299
  const walk = (dir) => {
16405
16300
  let entries;
@@ -16412,7 +16307,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16412
16307
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
16413
16308
  continue;
16414
16309
  }
16415
- const full = resolve28(dir, entry.name);
16310
+ const full = resolve27(dir, entry.name);
16416
16311
  if (entry.isDirectory()) {
16417
16312
  walk(full);
16418
16313
  continue;
@@ -16451,10 +16346,10 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16451
16346
  refs.push(strMatch[1]);
16452
16347
  }
16453
16348
  }
16454
- const componentDir = dirname17(full);
16349
+ const componentDir = dirname16(full);
16455
16350
  for (const ref of refs) {
16456
- const refAbs = normalizePath(resolve28(componentDir, ref));
16457
- const refDir = normalizePath(dirname17(refAbs));
16351
+ const refAbs = normalizePath(resolve27(componentDir, ref));
16352
+ const refDir = normalizePath(dirname16(refAbs));
16458
16353
  if (refDir === angularRootNormalized || refDir.startsWith(angularRootNormalized + "/")) {
16459
16354
  continue;
16460
16355
  }
@@ -16470,7 +16365,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16470
16365
  const push = (path) => {
16471
16366
  if (!path)
16472
16367
  return;
16473
- const abs = normalizePath(resolve28(cwd2, path));
16368
+ const abs = normalizePath(resolve27(cwd2, path));
16474
16369
  if (!roots.includes(abs))
16475
16370
  roots.push(abs);
16476
16371
  };
@@ -16495,7 +16390,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
16495
16390
  push(cfg.assetsDir);
16496
16391
  push(cfg.stylesDir);
16497
16392
  for (const candidate of ["src", "db", "assets", "styles"]) {
16498
- const abs = normalizePath(resolve28(cwd2, candidate));
16393
+ const abs = normalizePath(resolve27(cwd2, candidate));
16499
16394
  if (existsSync23(abs) && !roots.includes(abs))
16500
16395
  roots.push(abs);
16501
16396
  }
@@ -16566,7 +16461,7 @@ var init_pathUtils = __esm(() => {
16566
16461
  // src/dev/fileWatcher.ts
16567
16462
  import { watch } from "fs";
16568
16463
  import { existsSync as existsSync24 } from "fs";
16569
- import { join as join28, resolve as resolve29 } from "path";
16464
+ import { join as join27, resolve as resolve28 } from "path";
16570
16465
  var safeRemoveFromGraph = (graph, fullPath) => {
16571
16466
  try {
16572
16467
  removeFileFromGraph(graph, fullPath);
@@ -16593,7 +16488,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
16593
16488
  if (shouldSkipFilename(filename, isStylesDir)) {
16594
16489
  return;
16595
16490
  }
16596
- const fullPath = join28(absolutePath, filename).replace(/\\/g, "/");
16491
+ const fullPath = join27(absolutePath, filename).replace(/\\/g, "/");
16597
16492
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
16598
16493
  return;
16599
16494
  }
@@ -16611,7 +16506,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
16611
16506
  }, addFileWatchers = (state, paths, onFileChange) => {
16612
16507
  const stylesDir = state.resolvedPaths?.stylesDir;
16613
16508
  paths.forEach((path) => {
16614
- const absolutePath = resolve29(path).replace(/\\/g, "/");
16509
+ const absolutePath = resolve28(path).replace(/\\/g, "/");
16615
16510
  if (!existsSync24(absolutePath)) {
16616
16511
  return;
16617
16512
  }
@@ -16622,7 +16517,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
16622
16517
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
16623
16518
  const stylesDir = state.resolvedPaths?.stylesDir;
16624
16519
  watchPaths.forEach((path) => {
16625
- const absolutePath = resolve29(path).replace(/\\/g, "/");
16520
+ const absolutePath = resolve28(path).replace(/\\/g, "/");
16626
16521
  if (!existsSync24(absolutePath)) {
16627
16522
  return;
16628
16523
  }
@@ -16637,13 +16532,13 @@ var init_fileWatcher = __esm(() => {
16637
16532
  });
16638
16533
 
16639
16534
  // src/dev/assetStore.ts
16640
- import { resolve as resolve30 } from "path";
16535
+ import { resolve as resolve29 } from "path";
16641
16536
  import { readdir as readdir4, unlink } from "fs/promises";
16642
16537
  var mimeTypes, getMimeType = (filePath) => {
16643
16538
  const ext = filePath.slice(filePath.lastIndexOf("."));
16644
16539
  return mimeTypes[ext] ?? "application/octet-stream";
16645
16540
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
16646
- const fullPath = resolve30(dir, entry.name);
16541
+ const fullPath = resolve29(dir, entry.name);
16647
16542
  if (entry.isDirectory()) {
16648
16543
  return walkAndClean(fullPath);
16649
16544
  }
@@ -16659,10 +16554,10 @@ var mimeTypes, getMimeType = (filePath) => {
16659
16554
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
16660
16555
  const liveByIdentity = new Map;
16661
16556
  for (const webPath of store.keys()) {
16662
- const diskPath = resolve30(buildDir, webPath.slice(1));
16557
+ const diskPath = resolve29(buildDir, webPath.slice(1));
16663
16558
  liveByIdentity.set(stripHash(diskPath), diskPath);
16664
16559
  }
16665
- const absBuildDir = resolve30(buildDir);
16560
+ const absBuildDir = resolve29(buildDir);
16666
16561
  Object.values(manifest).forEach((val) => {
16667
16562
  if (!HASHED_FILE_RE.test(val))
16668
16563
  return;
@@ -16680,7 +16575,7 @@ var mimeTypes, getMimeType = (filePath) => {
16680
16575
  } catch {}
16681
16576
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
16682
16577
  if (entry.isDirectory()) {
16683
- return scanDir(resolve30(dir, entry.name), `${prefix}${entry.name}/`);
16578
+ return scanDir(resolve29(dir, entry.name), `${prefix}${entry.name}/`);
16684
16579
  }
16685
16580
  if (!entry.name.startsWith("chunk-")) {
16686
16581
  return null;
@@ -16689,7 +16584,7 @@ var mimeTypes, getMimeType = (filePath) => {
16689
16584
  if (store.has(webPath)) {
16690
16585
  return null;
16691
16586
  }
16692
- return Bun.file(resolve30(dir, entry.name)).bytes().then((bytes) => {
16587
+ return Bun.file(resolve29(dir, entry.name)).bytes().then((bytes) => {
16693
16588
  store.set(webPath, bytes);
16694
16589
  return;
16695
16590
  }).catch(() => {});
@@ -16711,7 +16606,7 @@ var mimeTypes, getMimeType = (filePath) => {
16711
16606
  for (const webPath of newIdentities.values()) {
16712
16607
  if (store.has(webPath))
16713
16608
  continue;
16714
- loadPromises.push(Bun.file(resolve30(buildDir, webPath.slice(1))).bytes().then((bytes) => {
16609
+ loadPromises.push(Bun.file(resolve29(buildDir, webPath.slice(1))).bytes().then((bytes) => {
16715
16610
  store.set(webPath, bytes);
16716
16611
  return;
16717
16612
  }).catch(() => {}));
@@ -16837,9 +16732,9 @@ var init_transformCache = __esm(() => {
16837
16732
  });
16838
16733
 
16839
16734
  // src/dev/reactComponentClassifier.ts
16840
- import { resolve as resolve31 } from "path";
16735
+ import { resolve as resolve30 } from "path";
16841
16736
  var classifyComponent = (filePath) => {
16842
- const normalizedPath = resolve31(filePath);
16737
+ const normalizedPath = resolve30(filePath);
16843
16738
  if (normalizedPath.includes("/react/pages/")) {
16844
16739
  return "server";
16845
16740
  }
@@ -16851,7 +16746,7 @@ var classifyComponent = (filePath) => {
16851
16746
  var init_reactComponentClassifier = () => {};
16852
16747
 
16853
16748
  // src/dev/moduleMapper.ts
16854
- import { basename as basename10, resolve as resolve32 } from "path";
16749
+ import { basename as basename10, resolve as resolve31 } from "path";
16855
16750
  var buildModulePaths = (moduleKeys, manifest) => {
16856
16751
  const modulePaths = {};
16857
16752
  moduleKeys.forEach((key) => {
@@ -16861,7 +16756,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
16861
16756
  });
16862
16757
  return modulePaths;
16863
16758
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
16864
- const normalizedFile = resolve32(sourceFile);
16759
+ const normalizedFile = resolve31(sourceFile);
16865
16760
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
16866
16761
  if (processedFiles.has(normalizedFile)) {
16867
16762
  return null;
@@ -16897,7 +16792,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
16897
16792
  });
16898
16793
  return grouped;
16899
16794
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
16900
- const normalizedFile = resolve32(sourceFile);
16795
+ const normalizedFile = resolve31(sourceFile);
16901
16796
  const fileName = basename10(normalizedFile);
16902
16797
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
16903
16798
  const pascalName = toPascal(baseName);
@@ -17072,7 +16967,7 @@ __export(exports_moduleServer, {
17072
16967
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
17073
16968
  });
17074
16969
  import { existsSync as existsSync25, readFileSync as readFileSync18, statSync as statSync2 } from "fs";
17075
- import { basename as basename11, dirname as dirname18, extname as extname8, join as join29, resolve as resolve33, relative as relative13 } from "path";
16970
+ import { basename as basename11, dirname as dirname17, extname as extname8, join as join28, resolve as resolve32, relative as relative12 } from "path";
17076
16971
  var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
17077
16972
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
17078
16973
  const allExports = [];
@@ -17092,7 +16987,7 @@ var SRC_PREFIX = "/@src/", jsTranspiler2, tsTranspiler2, tsxTranspiler, TRANSPIL
17092
16987
  ${stubs}
17093
16988
  `;
17094
16989
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
17095
- const found = extensions.find((ext) => existsSync25(resolve33(projectRoot, srcPath + ext)));
16990
+ const found = extensions.find((ext) => existsSync25(resolve32(projectRoot, srcPath + ext)));
17096
16991
  return found ? srcPath + found : srcPath;
17097
16992
  }, IMPORT_EXTENSIONS, SIDE_EFFECT_EXTENSIONS, MODULE_EXTENSIONS, RESOLVED_MODULE_EXTENSIONS, REACT_EXTENSIONS, escapeRegex3 = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), buildImportRewriter = (vendorPaths) => {
17098
16993
  const entries = Object.entries(vendorPaths).sort(([a], [b2]) => b2.length - a.length);
@@ -17107,7 +17002,7 @@ ${stubs}
17107
17002
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
17108
17003
  }, srcUrl = (relPath, projectRoot) => {
17109
17004
  const base = `${SRC_PREFIX}${relPath.replace(/\\/g, "/")}`;
17110
- const absPath = resolve33(projectRoot, relPath);
17005
+ const absPath = resolve32(projectRoot, relPath);
17111
17006
  const cached = mtimeCache.get(absPath);
17112
17007
  if (cached !== undefined)
17113
17008
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -17119,12 +17014,12 @@ ${stubs}
17119
17014
  return base;
17120
17015
  }
17121
17016
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
17122
- const absPath = resolve33(fileDir, relPath);
17123
- const rel = relative13(projectRoot, absPath);
17017
+ const absPath = resolve32(fileDir, relPath);
17018
+ const rel = relative12(projectRoot, absPath);
17124
17019
  const extension = extname8(rel);
17125
17020
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
17126
17021
  if (extname8(srcPath) === ".svelte") {
17127
- srcPath = relative13(projectRoot, resolveSvelteModulePath(resolve33(projectRoot, srcPath)));
17022
+ srcPath = relative12(projectRoot, resolveSvelteModulePath(resolve32(projectRoot, srcPath)));
17128
17023
  }
17129
17024
  return srcUrl(srcPath, projectRoot);
17130
17025
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -17136,27 +17031,27 @@ ${stubs}
17136
17031
  "import"
17137
17032
  ]);
17138
17033
  if (fromExports)
17139
- return relative13(projectRoot, fromExports);
17034
+ return relative12(projectRoot, fromExports);
17140
17035
  try {
17141
17036
  const isScoped = specifier.startsWith("@");
17142
17037
  const parts = specifier.split("/");
17143
17038
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
17144
17039
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
17145
17040
  if (!subpath) {
17146
- const pkgDir = resolve33(projectRoot, "node_modules", packageName ?? "");
17147
- const pkgJsonPath = join29(pkgDir, "package.json");
17041
+ const pkgDir = resolve32(projectRoot, "node_modules", packageName ?? "");
17042
+ const pkgJsonPath = join28(pkgDir, "package.json");
17148
17043
  if (existsSync25(pkgJsonPath)) {
17149
17044
  const pkg = JSON.parse(readFileSync18(pkgJsonPath, "utf-8"));
17150
17045
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
17151
17046
  if (esmEntry) {
17152
- const resolved = resolve33(pkgDir, esmEntry);
17047
+ const resolved = resolve32(pkgDir, esmEntry);
17153
17048
  if (existsSync25(resolved))
17154
- return relative13(projectRoot, resolved);
17049
+ return relative12(projectRoot, resolved);
17155
17050
  }
17156
17051
  }
17157
17052
  }
17158
17053
  } catch {}
17159
- return relative13(projectRoot, Bun.resolveSync(specifier, projectRoot));
17054
+ return relative12(projectRoot, Bun.resolveSync(specifier, projectRoot));
17160
17055
  } catch {
17161
17056
  return;
17162
17057
  }
@@ -17181,28 +17076,28 @@ ${stubs}
17181
17076
  };
17182
17077
  result = result.replace(/^((?:import\s+[\s\S]+?\s+from|export\s+[\s\S]+?\s+from|import)\s*["'])([^"'./][^"']*)(["'])/gm, stubReplace);
17183
17078
  result = result.replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g, stubReplace);
17184
- const fileDir = dirname18(filePath);
17079
+ const fileDir = dirname17(filePath);
17185
17080
  result = result.replace(/(from\s*["'])(\.\.?\/[^"']+)(["'])/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
17186
17081
  result = result.replace(/(import\s*\(\s*["'])(\.\.?\/[^"']+)(["']\s*\))/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, IMPORT_EXTENSIONS)}${suffix}`);
17187
17082
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}`);
17188
17083
  const rewriteAbsoluteToSrc = (_match, prefix, absPath, _ext, suffix) => {
17189
17084
  if (absPath.startsWith(projectRoot)) {
17190
- const rel2 = relative13(projectRoot, absPath).replace(/\\/g, "/");
17085
+ const rel2 = relative12(projectRoot, absPath).replace(/\\/g, "/");
17191
17086
  return `${prefix}${srcUrl(rel2, projectRoot)}${suffix}`;
17192
17087
  }
17193
- const rel = relative13(projectRoot, absPath).replace(/\\/g, "/");
17088
+ const rel = relative12(projectRoot, absPath).replace(/\\/g, "/");
17194
17089
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
17195
17090
  };
17196
17091
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
17197
17092
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
17198
17093
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
17199
- const absPath = resolve33(fileDir, relPath);
17200
- const rel = relative13(projectRoot, absPath);
17094
+ const absPath = resolve32(fileDir, relPath);
17095
+ const rel = relative12(projectRoot, absPath);
17201
17096
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
17202
17097
  });
17203
17098
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
17204
- const absPath = resolve33(fileDir, relPath);
17205
- const rel = relative13(projectRoot, absPath);
17099
+ const absPath = resolve32(fileDir, relPath);
17100
+ const rel = relative12(projectRoot, absPath);
17206
17101
  return `'${srcUrl(rel, projectRoot)}'`;
17207
17102
  });
17208
17103
  return result;
@@ -17258,7 +17153,7 @@ ${code}`;
17258
17153
  transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
17259
17154
  ` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
17260
17155
  ${transpiled}`;
17261
- const relPath = relative13(projectRoot, filePath).replace(/\\/g, "/");
17156
+ const relPath = relative12(projectRoot, filePath).replace(/\\/g, "/");
17262
17157
  transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
17263
17158
  transpiled += buildIslandMetadataExports(raw);
17264
17159
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
@@ -17267,13 +17162,13 @@ ${transpiled}`;
17267
17162
  const ext = extname8(filePath);
17268
17163
  const isTS = ext === ".ts" || ext === ".tsx";
17269
17164
  const isTSX = ext === ".tsx" || ext === ".jsx";
17270
- let transpiler6 = jsTranspiler2;
17165
+ let transpiler5 = jsTranspiler2;
17271
17166
  if (isTSX)
17272
- transpiler6 = tsxTranspiler;
17167
+ transpiler5 = tsxTranspiler;
17273
17168
  else if (isTS)
17274
- transpiler6 = tsTranspiler2;
17275
- const valueExports = isTS ? transpiler6.scan(raw).exports : [];
17276
- let transpiled = transpiler6.transformSync(raw);
17169
+ transpiler5 = tsTranspiler2;
17170
+ const valueExports = isTS ? transpiler5.scan(raw).exports : [];
17171
+ let transpiled = transpiler5.transformSync(raw);
17277
17172
  if (isTS) {
17278
17173
  transpiled = preserveTypeExports(raw, transpiled, valueExports);
17279
17174
  }
@@ -17419,11 +17314,11 @@ ${code}`;
17419
17314
  if (compiled.css?.code) {
17420
17315
  const cssPath = `${filePath}.css`;
17421
17316
  svelteExternalCss.set(cssPath, compiled.css.code);
17422
- const cssUrl = srcUrl(relative13(projectRoot, cssPath), projectRoot);
17317
+ const cssUrl = srcUrl(relative12(projectRoot, cssPath), projectRoot);
17423
17318
  code = `import "${cssUrl}";
17424
17319
  ${code}`;
17425
17320
  }
17426
- const moduleUrl = `${SRC_PREFIX}${relative13(projectRoot, filePath).replace(/\\/g, "/")}`;
17321
+ const moduleUrl = `${SRC_PREFIX}${relative12(projectRoot, filePath).replace(/\\/g, "/")}`;
17427
17322
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
17428
17323
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
17429
17324
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
@@ -17449,8 +17344,6 @@ ${code}`;
17449
17344
  const templateResult = compiler.compileTemplate({
17450
17345
  compilerOptions: {
17451
17346
  bindingMetadata: compiledScript.bindings,
17452
- expressionPlugins: ["typescript"],
17453
- isCustomElement: (tag) => tag === "absolute-island",
17454
17347
  prefixIdentifiers: true
17455
17348
  },
17456
17349
  filename: filePath,
@@ -17514,8 +17407,8 @@ ${code}`;
17514
17407
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
17515
17408
  return rewriteImports(code, filePath, projectRoot, rewriter);
17516
17409
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
17517
- const hmrBase = vueDir ? resolve33(vueDir) : projectRoot;
17518
- const hmrId = relative13(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
17410
+ const hmrBase = vueDir ? resolve32(vueDir) : projectRoot;
17411
+ const hmrId = relative12(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
17519
17412
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
17520
17413
  result += [
17521
17414
  "",
@@ -17678,7 +17571,7 @@ export default {};
17678
17571
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
17679
17572
  return jsResponse(`var s=document.createElement('style');s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
17680
17573
  }, resolveSourcePath = (relPath, projectRoot) => {
17681
- const filePath = resolve33(projectRoot, relPath);
17574
+ const filePath = resolve32(projectRoot, relPath);
17682
17575
  const ext = extname8(filePath);
17683
17576
  if (ext === ".svelte")
17684
17577
  return { ext, filePath: resolveSvelteModulePath(filePath) };
@@ -17705,7 +17598,7 @@ export default {};
17705
17598
  if (!TRANSPILABLE.has(ext))
17706
17599
  return;
17707
17600
  const stat3 = statSync2(filePath);
17708
- const resolvedVueDir = vueDir ? resolve33(vueDir) : undefined;
17601
+ const resolvedVueDir = vueDir ? resolve32(vueDir) : undefined;
17709
17602
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
17710
17603
  const isComponentJs = ext === ".js" && filePath.endsWith(".component.js") && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
17711
17604
  if (isComponentJs) {
@@ -17764,7 +17657,7 @@ export default {};
17764
17657
  const relPath = pathname.slice(SRC_PREFIX.length);
17765
17658
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
17766
17659
  return handleBunWrapRequest();
17767
- const virtualCssResponse = handleVirtualSvelteCss(resolve33(projectRoot, relPath));
17660
+ const virtualCssResponse = handleVirtualSvelteCss(resolve32(projectRoot, relPath));
17768
17661
  if (virtualCssResponse)
17769
17662
  return virtualCssResponse;
17770
17663
  const { filePath, ext } = resolveSourcePath(relPath, projectRoot);
@@ -17780,11 +17673,11 @@ export default {};
17780
17673
  SRC_IMPORT_RE.lastIndex = 0;
17781
17674
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
17782
17675
  if (match[1])
17783
- files.push(resolve33(projectRoot, match[1]));
17676
+ files.push(resolve32(projectRoot, match[1]));
17784
17677
  }
17785
17678
  return files;
17786
17679
  }, invalidateModule = (filePath) => {
17787
- const resolved = resolve33(filePath);
17680
+ const resolved = resolve32(filePath);
17788
17681
  invalidate(filePath);
17789
17682
  if (resolved !== filePath)
17790
17683
  invalidate(resolved);
@@ -17931,7 +17824,7 @@ __export(exports_resolveOwningComponents, {
17931
17824
  invalidateResourceIndex: () => invalidateResourceIndex
17932
17825
  });
17933
17826
  import { readdirSync as readdirSync2, readFileSync as readFileSync19, statSync as statSync3 } from "fs";
17934
- import { dirname as dirname19, extname as extname9, join as join30, resolve as resolve34 } from "path";
17827
+ import { dirname as dirname18, extname as extname9, join as join29, resolve as resolve33 } from "path";
17935
17828
  import ts3 from "typescript";
17936
17829
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
17937
17830
  const out = [];
@@ -17946,7 +17839,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
17946
17839
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
17947
17840
  continue;
17948
17841
  }
17949
- const full = join30(dir, entry.name);
17842
+ const full = join29(dir, entry.name);
17950
17843
  if (entry.isDirectory()) {
17951
17844
  visit(full);
17952
17845
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -18044,7 +17937,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
18044
17937
  };
18045
17938
  visit(sourceFile);
18046
17939
  return out;
18047
- }, safeNormalize = (path) => resolve34(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
17940
+ }, safeNormalize = (path) => resolve33(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
18048
17941
  const { changedFilePath, userAngularRoot } = params;
18049
17942
  const changedAbs = safeNormalize(changedFilePath);
18050
17943
  const out = [];
@@ -18085,7 +17978,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
18085
17978
  return null;
18086
17979
  }
18087
17980
  const sf = ts3.createSourceFile(childFilePath, source, ts3.ScriptTarget.ES2022, true, ts3.ScriptKind.TS);
18088
- const childDir = dirname19(childFilePath);
17981
+ const childDir = dirname18(childFilePath);
18089
17982
  for (const stmt of sf.statements) {
18090
17983
  if (!ts3.isImportDeclaration(stmt))
18091
17984
  continue;
@@ -18113,7 +18006,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
18113
18006
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
18114
18007
  return null;
18115
18008
  }
18116
- const base = resolve34(childDir, spec);
18009
+ const base = resolve33(childDir, spec);
18117
18010
  const candidates = [
18118
18011
  `${base}.ts`,
18119
18012
  `${base}.tsx`,
@@ -18142,7 +18035,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
18142
18035
  const parentFile = new Map;
18143
18036
  for (const tsPath of walkAngularSourceFiles(userAngularRoot)) {
18144
18037
  const classes = parseDecoratedClasses(tsPath);
18145
- const componentDir = dirname19(tsPath);
18038
+ const componentDir = dirname18(tsPath);
18146
18039
  for (const cls of classes) {
18147
18040
  const entity = {
18148
18041
  className: cls.className,
@@ -18151,7 +18044,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
18151
18044
  };
18152
18045
  if (cls.kind === "component") {
18153
18046
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
18154
- const abs = safeNormalize(resolve34(componentDir, url));
18047
+ const abs = safeNormalize(resolve33(componentDir, url));
18155
18048
  const existing = resource.get(abs);
18156
18049
  if (existing)
18157
18050
  existing.push(entity);
@@ -18231,6 +18124,8 @@ class Context {
18231
18124
  }
18232
18125
 
18233
18126
  // src/dev/angular/vendor/translator/translator.ts
18127
+ import * as o from "@angular/compiler";
18128
+
18234
18129
  class ExpressionTranslatorVisitor {
18235
18130
  factory;
18236
18131
  imports;
@@ -18521,16 +18416,8 @@ function createRange(span) {
18521
18416
  end: { offset: end.offset, line: end.line, column: end.col }
18522
18417
  };
18523
18418
  }
18524
- var o, UNARY_OPERATORS, BINARY_OPERATORS;
18419
+ var UNARY_OPERATORS, BINARY_OPERATORS;
18525
18420
  var init_translator = __esm(() => {
18526
- o = (() => {
18527
- try {
18528
- return __require("@angular/compiler");
18529
- } catch {
18530
- const stub = new Proxy(function() {}, { apply: () => stub, construct: () => stub, get: () => stub });
18531
- return stub;
18532
- }
18533
- })();
18534
18421
  UNARY_OPERATORS = /* @__PURE__ */ new Map([
18535
18422
  [o.UnaryOperator.Minus, "-"],
18536
18423
  [o.UnaryOperator.Plus, "+"]
@@ -18868,18 +18755,9 @@ var init_typescript_ast_factory = __esm(() => {
18868
18755
  function translateStatement(contextFile, statement, imports, options = {}) {
18869
18756
  return statement.visitStatement(new ExpressionTranslatorVisitor(new TypeScriptAstFactory(options.annotateForClosureCompiler === true), imports, contextFile, options), new Context(true));
18870
18757
  }
18871
- var o2;
18872
18758
  var init_typescript_translator = __esm(() => {
18873
18759
  init_translator();
18874
18760
  init_typescript_ast_factory();
18875
- o2 = (() => {
18876
- try {
18877
- return __require("@angular/compiler");
18878
- } catch {
18879
- const stub = new Proxy(function() {}, { apply: () => stub, construct: () => stub, get: () => stub });
18880
- return stub;
18881
- }
18882
- })();
18883
18761
  });
18884
18762
 
18885
18763
  // src/dev/angular/fastHmrCompiler.ts
@@ -18891,7 +18769,7 @@ __export(exports_fastHmrCompiler, {
18891
18769
  invalidateFingerprintCache: () => invalidateFingerprintCache
18892
18770
  });
18893
18771
  import { existsSync as existsSync26, readFileSync as readFileSync20, statSync as statSync4 } from "fs";
18894
- import { dirname as dirname20, extname as extname10, relative as relative14, resolve as resolve35 } from "path";
18772
+ import { dirname as dirname19, extname as extname10, relative as relative13, resolve as resolve34 } from "path";
18895
18773
  import ts7 from "typescript";
18896
18774
  var fail = (reason, detail, location) => ({
18897
18775
  ok: false,
@@ -19113,7 +18991,7 @@ var fail = (reason, detail, location) => ({
19113
18991
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
19114
18992
  return true;
19115
18993
  }
19116
- const base = resolve35(componentDir, spec);
18994
+ const base = resolve34(componentDir, spec);
19117
18995
  const candidates = [
19118
18996
  `${base}.ts`,
19119
18997
  `${base}.tsx`,
@@ -19876,7 +19754,7 @@ var fail = (reason, detail, location) => ({
19876
19754
  });
19877
19755
  if (!names.includes(className))
19878
19756
  continue;
19879
- const nextDts = resolveDtsFromSpec(fromPath, dirname20(startDtsPath));
19757
+ const nextDts = resolveDtsFromSpec(fromPath, dirname19(startDtsPath));
19880
19758
  if (!nextDts)
19881
19759
  continue;
19882
19760
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -19886,7 +19764,7 @@ var fail = (reason, detail, location) => ({
19886
19764
  const starReExportRe = /export\s*\*\s*from\s*["']([^"']+)["']/g;
19887
19765
  while ((m = starReExportRe.exec(content)) !== null) {
19888
19766
  const fromPath = m[1] || "";
19889
- const nextDts = resolveDtsFromSpec(fromPath, dirname20(startDtsPath));
19767
+ const nextDts = resolveDtsFromSpec(fromPath, dirname19(startDtsPath));
19890
19768
  if (!nextDts)
19891
19769
  continue;
19892
19770
  const found = findDtsContainingClass(nextDts, className, visited);
@@ -19896,7 +19774,7 @@ var fail = (reason, detail, location) => ({
19896
19774
  return null;
19897
19775
  }, resolveDtsFromSpec = (spec, fromDir) => {
19898
19776
  const stripped = spec.replace(/\.[mc]?js$/, "");
19899
- const base = resolve35(fromDir, stripped);
19777
+ const base = resolve34(fromDir, stripped);
19900
19778
  const candidates = [
19901
19779
  `${base}.d.ts`,
19902
19780
  `${base}.d.mts`,
@@ -19920,7 +19798,7 @@ var fail = (reason, detail, location) => ({
19920
19798
  return null;
19921
19799
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
19922
19800
  if (spec.startsWith(".") || spec.startsWith("/")) {
19923
- const base = resolve35(componentDir, spec);
19801
+ const base = resolve34(componentDir, spec);
19924
19802
  const candidates = [
19925
19803
  `${base}.ts`,
19926
19804
  `${base}.tsx`,
@@ -20090,13 +19968,13 @@ var fail = (reason, detail, location) => ({
20090
19968
  }
20091
19969
  if (!matches)
20092
19970
  continue;
20093
- const resolved = resolve35(componentDir, spec);
19971
+ const resolved = resolve34(componentDir, spec);
20094
19972
  for (const ext of TS_EXTENSIONS) {
20095
19973
  const candidate = resolved + ext;
20096
19974
  if (existsSync26(candidate))
20097
19975
  return candidate;
20098
19976
  }
20099
- const indexCandidate = resolve35(resolved, "index.ts");
19977
+ const indexCandidate = resolve34(resolved, "index.ts");
20100
19978
  if (existsSync26(indexCandidate))
20101
19979
  return indexCandidate;
20102
19980
  }
@@ -20283,7 +20161,7 @@ ${transpiled}
20283
20161
  }
20284
20162
  }${staticPatch}`;
20285
20163
  }, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
20286
- const abs = resolve35(componentDir, url);
20164
+ const abs = resolve34(componentDir, url);
20287
20165
  if (!existsSync26(abs))
20288
20166
  return null;
20289
20167
  const ext = extname10(abs).toLowerCase();
@@ -20323,7 +20201,7 @@ ${block}
20323
20201
  const cached = projectOptionsCache.get(projectRoot);
20324
20202
  if (cached !== undefined)
20325
20203
  return cached;
20326
- const tsconfigPath = resolve35(projectRoot, "tsconfig.json");
20204
+ const tsconfigPath = resolve34(projectRoot, "tsconfig.json");
20327
20205
  const opts = {};
20328
20206
  if (existsSync26(tsconfigPath)) {
20329
20207
  try {
@@ -20369,7 +20247,7 @@ ${block}
20369
20247
  }
20370
20248
  const kind = params.kind ?? "component";
20371
20249
  if (kind !== "component") {
20372
- const entityId = encodeURIComponent(`${relative14(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
20250
+ const entityId = encodeURIComponent(`${relative13(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
20373
20251
  const currentEntityFingerprint = extractEntityFingerprint(classNode, className, sourceFile);
20374
20252
  const cachedEntityFingerprint = entityFingerprintCache.get(entityId);
20375
20253
  if (cachedEntityFingerprint !== undefined && !entityFingerprintsEqual(cachedEntityFingerprint, currentEntityFingerprint)) {
@@ -20387,7 +20265,7 @@ ${block}
20387
20265
  ok: true
20388
20266
  };
20389
20267
  }
20390
- if (inheritsDecoratedClass(classNode, sourceFile, dirname20(componentFilePath), projectRoot)) {
20268
+ if (inheritsDecoratedClass(classNode, sourceFile, dirname19(componentFilePath), projectRoot)) {
20391
20269
  return fail("inherits-decorated-class");
20392
20270
  }
20393
20271
  const decorator = findComponentDecorator(classNode);
@@ -20399,14 +20277,14 @@ ${block}
20399
20277
  const projectDefaults = readProjectAngularCompilerOptions(projectRoot);
20400
20278
  const decoratorMeta = readDecoratorMeta(decoratorArgs, projectDefaults);
20401
20279
  const advancedMetadata = extractAdvancedMetadata(classNode, decoratorArgs, compiler);
20402
- const componentDir = dirname20(componentFilePath);
20280
+ const componentDir = dirname19(componentFilePath);
20403
20281
  let templateText;
20404
20282
  let templatePath;
20405
20283
  if (decoratorMeta.template !== null) {
20406
20284
  templateText = decoratorMeta.template;
20407
20285
  templatePath = componentFilePath;
20408
20286
  } else if (decoratorMeta.templateUrl) {
20409
- const tplAbs = resolve35(componentDir, decoratorMeta.templateUrl);
20287
+ const tplAbs = resolve34(componentDir, decoratorMeta.templateUrl);
20410
20288
  if (!existsSync26(tplAbs)) {
20411
20289
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
20412
20290
  }
@@ -20457,7 +20335,7 @@ ${block}
20457
20335
  hasDecoratorIO,
20458
20336
  hasSignalIO
20459
20337
  } = extractInputsAndOutputs(classNode, compiler);
20460
- const projectRelPath = relative14(projectRoot, componentFilePath).replace(/\\/g, "/");
20338
+ const projectRelPath = relative13(projectRoot, componentFilePath).replace(/\\/g, "/");
20461
20339
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
20462
20340
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
20463
20341
  const cachedFingerprint = fingerprintCache.get(fingerprintId);
@@ -20711,7 +20589,7 @@ __export(exports_hmrCompiler, {
20711
20589
  getApplyMetadataModule: () => getApplyMetadataModule,
20712
20590
  encodeHmrComponentId: () => encodeHmrComponentId
20713
20591
  });
20714
- import { dirname as dirname21, relative as relative15, resolve as resolve36 } from "path";
20592
+ import { dirname as dirname20, relative as relative14, resolve as resolve35 } from "path";
20715
20593
  import { performance as performance2 } from "perf_hooks";
20716
20594
  var getApplyMetadataModule = async (encodedId) => {
20717
20595
  const decoded = decodeURIComponent(encodedId);
@@ -20720,8 +20598,8 @@ var getApplyMetadataModule = async (encodedId) => {
20720
20598
  return null;
20721
20599
  const filePathRel = decoded.slice(0, at2);
20722
20600
  const className = decoded.slice(at2 + 1);
20723
- const componentFilePath = resolve36(process.cwd(), filePathRel);
20724
- const projectRelPath = relative15(process.cwd(), componentFilePath).replace(/\\/g, "/");
20601
+ const componentFilePath = resolve35(process.cwd(), filePathRel);
20602
+ const projectRelPath = relative14(process.cwd(), componentFilePath).replace(/\\/g, "/");
20725
20603
  const cacheKey2 = encodeURIComponent(`${projectRelPath}@${className}`);
20726
20604
  const { takePendingModule: takePendingModule2 } = await Promise.resolve().then(() => (init_fastHmrCompiler(), exports_fastHmrCompiler));
20727
20605
  const cached = takePendingModule2(cacheKey2);
@@ -20731,9 +20609,9 @@ var getApplyMetadataModule = async (encodedId) => {
20731
20609
  const { resolveOwningComponents: resolveOwningComponents2 } = await Promise.resolve().then(() => (init_resolveOwningComponents(), exports_resolveOwningComponents));
20732
20610
  const owners = resolveOwningComponents2({
20733
20611
  changedFilePath: componentFilePath,
20734
- userAngularRoot: dirname21(componentFilePath)
20612
+ userAngularRoot: dirname20(componentFilePath)
20735
20613
  });
20736
- const owner = owners.find((o3) => o3.className === className);
20614
+ const owner = owners.find((o2) => o2.className === className);
20737
20615
  const kind = owner?.kind ?? "component";
20738
20616
  const fastStart = performance2.now();
20739
20617
  const fast = await tryFastHmr({ className, componentFilePath, kind });
@@ -20743,7 +20621,7 @@ var getApplyMetadataModule = async (encodedId) => {
20743
20621
  }
20744
20622
  return null;
20745
20623
  }, encodeHmrComponentId = (absoluteFilePath, className) => {
20746
- const projectRel = relative15(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
20624
+ const projectRel = relative14(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
20747
20625
  return `${projectRel}@${className}`;
20748
20626
  };
20749
20627
  var init_hmrCompiler = __esm(() => {
@@ -20882,11 +20760,11 @@ var exports_simpleHTMLHMR = {};
20882
20760
  __export(exports_simpleHTMLHMR, {
20883
20761
  handleHTMLUpdate: () => handleHTMLUpdate
20884
20762
  });
20885
- import { resolve as resolve37 } from "path";
20763
+ import { resolve as resolve36 } from "path";
20886
20764
  var handleHTMLUpdate = async (htmlFilePath) => {
20887
20765
  let htmlContent;
20888
20766
  try {
20889
- const resolvedPath = resolve37(htmlFilePath);
20767
+ const resolvedPath = resolve36(htmlFilePath);
20890
20768
  const file5 = Bun.file(resolvedPath);
20891
20769
  if (!await file5.exists()) {
20892
20770
  return null;
@@ -20912,11 +20790,11 @@ var exports_simpleHTMXHMR = {};
20912
20790
  __export(exports_simpleHTMXHMR, {
20913
20791
  handleHTMXUpdate: () => handleHTMXUpdate
20914
20792
  });
20915
- import { resolve as resolve38 } from "path";
20793
+ import { resolve as resolve37 } from "path";
20916
20794
  var handleHTMXUpdate = async (htmxFilePath) => {
20917
20795
  let htmlContent;
20918
20796
  try {
20919
- const resolvedPath = resolve38(htmxFilePath);
20797
+ const resolvedPath = resolve37(htmxFilePath);
20920
20798
  const file5 = Bun.file(resolvedPath);
20921
20799
  if (!await file5.exists()) {
20922
20800
  return null;
@@ -20939,7 +20817,7 @@ var init_simpleHTMXHMR = () => {};
20939
20817
 
20940
20818
  // src/dev/rebuildTrigger.ts
20941
20819
  import { existsSync as existsSync27 } from "fs";
20942
- import { basename as basename12, dirname as dirname22, relative as relative16, resolve as resolve39, sep as sep4 } from "path";
20820
+ import { basename as basename12, dirname as dirname21, relative as relative15, resolve as resolve38, sep as sep4 } from "path";
20943
20821
  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) => {
20944
20822
  if (!config.tailwind)
20945
20823
  return;
@@ -21031,7 +20909,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21031
20909
  state.fileHashes.delete(filePathInSet);
21032
20910
  try {
21033
20911
  const affectedFiles = getAffectedFiles(state.dependencyGraph, filePathInSet);
21034
- const deletedPathResolved = resolve39(filePathInSet);
20912
+ const deletedPathResolved = resolve38(filePathInSet);
21035
20913
  affectedFiles.forEach((affectedFile) => {
21036
20914
  if (isValidDeletedAffectedFile(affectedFile, deletedPathResolved, processedFiles)) {
21037
20915
  validFiles.push(affectedFile);
@@ -21075,7 +20953,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21075
20953
  if (storedHash !== undefined && storedHash === fileHash) {
21076
20954
  return;
21077
20955
  }
21078
- const normalizedFilePath = resolve39(filePathInSet);
20956
+ const normalizedFilePath = resolve38(filePathInSet);
21079
20957
  if (!processedFiles.has(normalizedFilePath)) {
21080
20958
  validFiles.push(normalizedFilePath);
21081
20959
  processedFiles.add(normalizedFilePath);
@@ -21179,8 +21057,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21179
21057
  return;
21180
21058
  }
21181
21059
  if (framework === "unknown") {
21182
- invalidate(resolve39(filePath));
21183
- const relPath = relative16(process.cwd(), filePath);
21060
+ invalidate(resolve38(filePath));
21061
+ const relPath = relative15(process.cwd(), filePath);
21184
21062
  logHmrUpdate(relPath);
21185
21063
  return;
21186
21064
  }
@@ -21206,7 +21084,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21206
21084
  const userEditedFiles = new Set;
21207
21085
  state.fileChangeQueue.forEach((filePaths) => {
21208
21086
  for (const filePath2 of filePaths) {
21209
- userEditedFiles.add(resolve39(filePath2));
21087
+ userEditedFiles.add(resolve38(filePath2));
21210
21088
  }
21211
21089
  });
21212
21090
  state.lastUserEditedFiles = userEditedFiles;
@@ -21235,7 +21113,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21235
21113
  }
21236
21114
  if (!graph)
21237
21115
  return componentFile;
21238
- const dependents = graph.dependents.get(resolve39(componentFile));
21116
+ const dependents = graph.dependents.get(resolve38(componentFile));
21239
21117
  if (!dependents)
21240
21118
  return componentFile;
21241
21119
  for (const dep of dependents) {
@@ -21244,7 +21122,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21244
21122
  }
21245
21123
  return componentFile;
21246
21124
  }, resolveAngularPageEntries = (state, angularFiles, angularPagesPath) => {
21247
- const pageEntries = angularFiles.filter((file5) => file5.endsWith(".ts") && resolve39(file5).startsWith(angularPagesPath));
21125
+ const pageEntries = angularFiles.filter((file5) => file5.endsWith(".ts") && resolve38(file5).startsWith(angularPagesPath));
21248
21126
  if (pageEntries.length > 0 || !state.dependencyGraph) {
21249
21127
  return pageEntries;
21250
21128
  }
@@ -21253,7 +21131,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21253
21131
  const lookupFile = resolveComponentLookupFile(componentFile, state.dependencyGraph);
21254
21132
  const affected = getAffectedFiles(state.dependencyGraph, lookupFile);
21255
21133
  affected.forEach((file5) => {
21256
- if (file5.endsWith(".ts") && resolve39(file5).startsWith(angularPagesPath)) {
21134
+ if (file5.endsWith(".ts") && resolve38(file5).startsWith(angularPagesPath)) {
21257
21135
  resolvedPages.add(file5);
21258
21136
  }
21259
21137
  });
@@ -21525,16 +21403,16 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21525
21403
  };
21526
21404
  const fire = () => {
21527
21405
  ctx.debounceTimer = null;
21528
- const resolve40 = ctx.debouncedResolve;
21406
+ const resolve39 = ctx.debouncedResolve;
21529
21407
  ctx.debouncedResolve = null;
21530
21408
  ctx.debouncedPromise = null;
21531
21409
  if (ctx.inFlight) {
21532
21410
  ctx.pending = true;
21533
- ctx.inFlight.finally(() => resolve40?.());
21411
+ ctx.inFlight.finally(() => resolve39?.());
21534
21412
  return;
21535
21413
  }
21536
21414
  ctx.inFlight = drive();
21537
- ctx.inFlight.finally(() => resolve40?.());
21415
+ ctx.inFlight.finally(() => resolve39?.());
21538
21416
  };
21539
21417
  return ({ immediate = false } = {}) => {
21540
21418
  if (!ctx.debouncedPromise) {
@@ -21561,9 +21439,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21561
21439
  const diskRefreshPromise = (async () => {
21562
21440
  if (!angularDir || editedFiles.size === 0)
21563
21441
  return;
21564
- const angularDirAbs = resolve39(angularDir);
21442
+ const angularDirAbs = resolve38(angularDir);
21565
21443
  const filesUnderAngular = Array.from(editedFiles).filter((file5) => {
21566
- const abs = resolve39(file5);
21444
+ const abs = resolve38(file5);
21567
21445
  return abs === angularDirAbs || abs.startsWith(angularDirAbs + sep4);
21568
21446
  });
21569
21447
  if (filesUnderAngular.length === 0)
@@ -21585,7 +21463,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21585
21463
  if (!ext)
21586
21464
  continue;
21587
21465
  if (ext === ".ts" || ext === ".tsx") {
21588
- tsFilesToRefresh.add(resolve39(file5));
21466
+ tsFilesToRefresh.add(resolve38(file5));
21589
21467
  continue;
21590
21468
  }
21591
21469
  const owners = resolveOwningComponents2({
@@ -21593,7 +21471,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21593
21471
  userAngularRoot: angularDirAbs
21594
21472
  });
21595
21473
  for (const owner of owners) {
21596
- tsFilesToRefresh.add(resolve39(owner.componentFilePath));
21474
+ tsFilesToRefresh.add(resolve38(owner.componentFilePath));
21597
21475
  }
21598
21476
  }
21599
21477
  if (tsFilesToRefresh.size === 0)
@@ -21604,8 +21482,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21604
21482
  try {
21605
21483
  const { invalidateModule: invalidateModule2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
21606
21484
  for (const tsFile of tsFilesToRefresh) {
21607
- const rel = relative16(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
21608
- const compiledFile = resolve39(compiledRoot, rel);
21485
+ const rel = relative15(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
21486
+ const compiledFile = resolve38(compiledRoot, rel);
21609
21487
  invalidateModule2(compiledFile);
21610
21488
  }
21611
21489
  } catch {}
@@ -21634,7 +21512,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21634
21512
  serverPaths.forEach((serverPath, idx) => {
21635
21513
  const fileBase = basename12(serverPath, ".js");
21636
21514
  const ssrPath = ssrPaths[idx] ?? serverPath;
21637
- state.manifest[toPascal(fileBase)] = resolve39(ssrPath);
21515
+ state.manifest[toPascal(fileBase)] = resolve38(ssrPath);
21638
21516
  });
21639
21517
  if (clientPaths.length > 0) {
21640
21518
  await bundleAngularClient(state, clientPaths, state.resolvedPaths.buildDir, angularDir);
@@ -21643,9 +21521,9 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21643
21521
  const angularDir = config.angularDirectory ?? "";
21644
21522
  const angularFiles = filesToRebuild.filter((file5) => detectFramework(file5, state.resolvedPaths) === "angular");
21645
21523
  for (const file5 of angularFiles) {
21646
- state.fileHashes.set(resolve39(file5), computeFileHash(file5));
21524
+ state.fileHashes.set(resolve38(file5), computeFileHash(file5));
21647
21525
  }
21648
- const angularPagesPath = resolve39(angularDir, "pages");
21526
+ const angularPagesPath = resolve38(angularDir, "pages");
21649
21527
  const pageEntries = resolveAngularPageEntries(state, angularFiles, angularPagesPath);
21650
21528
  const tierStart = performance.now();
21651
21529
  const verdict = await decideAngularTier(state, angularDir);
@@ -21675,7 +21553,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21675
21553
  }, getModuleUrl = async (pageFile) => {
21676
21554
  const { invalidateModule: invalidateModule2, warmCache: warmCache2, SRC_URL_PREFIX: SRC_URL_PREFIX2 } = await Promise.resolve().then(() => (init_moduleServer(), exports_moduleServer));
21677
21555
  invalidateModule2(pageFile);
21678
- const rel = relative16(process.cwd(), pageFile).replace(/\\/g, "/");
21556
+ const rel = relative15(process.cwd(), pageFile).replace(/\\/g, "/");
21679
21557
  const url = `${SRC_URL_PREFIX2}${rel}`;
21680
21558
  warmCache2(url);
21681
21559
  return url;
@@ -21684,11 +21562,11 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21684
21562
  if (isComponentFile2)
21685
21563
  return primaryFile;
21686
21564
  const { findNearestComponent: findNearestComponent2 } = await Promise.resolve().then(() => (init_transformCache(), exports_transformCache));
21687
- const nearest = findNearestComponent2(resolve39(primaryFile));
21565
+ const nearest = findNearestComponent2(resolve38(primaryFile));
21688
21566
  return nearest ?? primaryFile;
21689
21567
  }, handleReactModuleServerPath = async (state, reactFiles, startTime, onRebuildComplete) => {
21690
21568
  for (const file5 of reactFiles) {
21691
- state.fileHashes.set(resolve39(file5), computeFileHash(file5));
21569
+ state.fileHashes.set(resolve38(file5), computeFileHash(file5));
21692
21570
  }
21693
21571
  markSsrCacheDirty("react");
21694
21572
  const primaryFile = reactFiles.find((file5) => !file5.replace(/\\/g, "/").includes("/pages/")) ?? reactFiles[0];
@@ -21707,7 +21585,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21707
21585
  const pageModuleUrl = await getReactModuleUrl(broadcastTarget);
21708
21586
  if (pageModuleUrl) {
21709
21587
  const serverDuration = Date.now() - startTime;
21710
- state.lastHmrPath = relative16(process.cwd(), primaryFile).replace(/\\/g, "/");
21588
+ state.lastHmrPath = relative15(process.cwd(), primaryFile).replace(/\\/g, "/");
21711
21589
  state.lastHmrFramework = "react";
21712
21590
  broadcastToClients(state, {
21713
21591
  data: {
@@ -21770,7 +21648,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21770
21648
  });
21771
21649
  }, handleSvelteModuleServerPath = async (state, svelteFiles, startTime, onRebuildComplete) => {
21772
21650
  for (const file5 of svelteFiles) {
21773
- state.fileHashes.set(resolve39(file5), computeFileHash(file5));
21651
+ state.fileHashes.set(resolve38(file5), computeFileHash(file5));
21774
21652
  }
21775
21653
  markSsrCacheDirty("svelte");
21776
21654
  const serverDuration = Date.now() - startTime;
@@ -21795,8 +21673,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21795
21673
  const serverEntries = [...svelteServerPaths];
21796
21674
  const clientEntries = [...svelteIndexPaths, ...svelteClientPaths];
21797
21675
  const { getFrameworkGeneratedDir: getFrameworkGeneratedDir2 } = await Promise.resolve().then(() => (init_generatedDir(), exports_generatedDir));
21798
- const serverRoot = resolve39(getFrameworkGeneratedDir2("svelte"), "server");
21799
- const serverOutDir = resolve39(buildDir, basename12(svelteDir));
21676
+ const serverRoot = resolve38(getFrameworkGeneratedDir2("svelte"), "server");
21677
+ const serverOutDir = resolve38(buildDir, basename12(svelteDir));
21800
21678
  const [serverResult, clientResult] = await Promise.all([
21801
21679
  serverEntries.length > 0 ? bunBuild9({
21802
21680
  entrypoints: serverEntries,
@@ -21893,7 +21771,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21893
21771
  });
21894
21772
  }, handleVueModuleServerPath = async (state, vueFiles, nonVueFiles, startTime, onRebuildComplete) => {
21895
21773
  for (const file5 of [...vueFiles, ...nonVueFiles]) {
21896
- state.fileHashes.set(resolve39(file5), computeFileHash(file5));
21774
+ state.fileHashes.set(resolve38(file5), computeFileHash(file5));
21897
21775
  }
21898
21776
  markSsrCacheDirty("vue");
21899
21777
  await invalidateNonVueModules(nonVueFiles);
@@ -21921,7 +21799,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21921
21799
  recursive: true,
21922
21800
  withFileTypes: true
21923
21801
  });
21924
- return entries.filter((entry) => entry.isFile() && EMBER_PAGE_EXTENSIONS.some((ext) => entry.name.endsWith(ext))).map((entry) => resolve39(emberPagesPath, entry.name));
21802
+ return entries.filter((entry) => entry.isFile() && EMBER_PAGE_EXTENSIONS.some((ext) => entry.name.endsWith(ext))).map((entry) => resolve38(emberPagesPath, entry.name));
21925
21803
  } catch {
21926
21804
  return [];
21927
21805
  }
@@ -21933,10 +21811,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21933
21811
  return state.manifest;
21934
21812
  }
21935
21813
  for (const file5 of emberFiles) {
21936
- state.fileHashes.set(resolve39(file5), computeFileHash(file5));
21814
+ state.fileHashes.set(resolve38(file5), computeFileHash(file5));
21937
21815
  }
21938
- const emberPagesPath = resolve39(emberDir, "pages");
21939
- const directPageEntries = emberFiles.filter((file5) => resolve39(file5).startsWith(emberPagesPath));
21816
+ const emberPagesPath = resolve38(emberDir, "pages");
21817
+ const directPageEntries = emberFiles.filter((file5) => resolve38(file5).startsWith(emberPagesPath));
21940
21818
  const allPageEntries = directPageEntries.length > 0 ? directPageEntries : await collectAllEmberPages(emberPagesPath);
21941
21819
  if (allPageEntries.length === 0) {
21942
21820
  onRebuildComplete({ hmrState: state, manifest: state.manifest });
@@ -21946,14 +21824,14 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
21946
21824
  const { serverPaths } = await compileEmber2(allPageEntries, emberDir, process.cwd(), true);
21947
21825
  for (const serverPath of serverPaths) {
21948
21826
  const fileBase = basename12(serverPath, ".js");
21949
- state.manifest[toPascal(fileBase)] = resolve39(serverPath);
21827
+ state.manifest[toPascal(fileBase)] = resolve38(serverPath);
21950
21828
  }
21951
21829
  const { invalidateEmberSsrCache: invalidateEmberSsrCache2 } = await Promise.resolve().then(() => (init_ember(), exports_ember));
21952
21830
  invalidateEmberSsrCache2();
21953
21831
  const duration = Date.now() - startTime;
21954
21832
  const [primary] = emberFiles;
21955
21833
  if (primary) {
21956
- state.lastHmrPath = relative16(process.cwd(), primary).replace(/\\/g, "/");
21834
+ state.lastHmrPath = relative15(process.cwd(), primary).replace(/\\/g, "/");
21957
21835
  state.lastHmrFramework = "ember";
21958
21836
  logHmrUpdate(primary, "ember", duration);
21959
21837
  }
@@ -22038,8 +21916,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22038
21916
  if (!buildReference?.source) {
22039
21917
  return;
22040
21918
  }
22041
- const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve39(dirname22(buildInfo.resolvedRegistryPath), buildReference.source);
22042
- islandFiles.add(resolve39(sourcePath));
21919
+ const sourcePath = buildReference.source.startsWith("file://") ? new URL(buildReference.source).pathname : resolve38(dirname21(buildInfo.resolvedRegistryPath), buildReference.source);
21920
+ islandFiles.add(resolve38(sourcePath));
22043
21921
  }, resolveIslandSourceFiles = async (config) => {
22044
21922
  const registryPath = config.islands?.registry;
22045
21923
  if (!registryPath) {
@@ -22047,7 +21925,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22047
21925
  }
22048
21926
  const buildInfo = await loadIslandRegistryBuildInfo(registryPath);
22049
21927
  const islandFiles = new Set([
22050
- resolve39(buildInfo.resolvedRegistryPath)
21928
+ resolve38(buildInfo.resolvedRegistryPath)
22051
21929
  ]);
22052
21930
  for (const definition of buildInfo.definitions) {
22053
21931
  resolveIslandDefinitionSource(definition, buildInfo, islandFiles);
@@ -22058,7 +21936,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22058
21936
  if (islandFiles.size === 0) {
22059
21937
  return false;
22060
21938
  }
22061
- return filesToRebuild.some((file5) => islandFiles.has(resolve39(file5)));
21939
+ return filesToRebuild.some((file5) => islandFiles.has(resolve38(file5)));
22062
21940
  }, handleIslandSourceReload = async (state, config, filesToRebuild, manifest) => {
22063
21941
  const shouldReload = await didStaticPagesNeedIslandRefresh(config, filesToRebuild);
22064
21942
  if (!shouldReload) {
@@ -22093,10 +21971,10 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22093
21971
  }, computeOutputPagesDir = (state, config, framework) => {
22094
21972
  const isSingle = !config.reactDirectory && !config.svelteDirectory && !config.vueDirectory && (framework === "html" ? !config.htmxDirectory : !config.htmlDirectory);
22095
21973
  if (isSingle) {
22096
- return resolve39(state.resolvedPaths.buildDir, "pages");
21974
+ return resolve38(state.resolvedPaths.buildDir, "pages");
22097
21975
  }
22098
21976
  const dirName = framework === "html" ? basename12(config.htmlDirectory ?? "html") : basename12(config.htmxDirectory ?? "htmx");
22099
- return resolve39(state.resolvedPaths.buildDir, dirName, "pages");
21977
+ return resolve38(state.resolvedPaths.buildDir, dirName, "pages");
22100
21978
  }, processHtmlPageUpdate = async (state, pageFile, builtHtmlPagePath, manifest, duration) => {
22101
21979
  try {
22102
21980
  const { handleHTMLUpdate: handleHTMLUpdate2 } = await Promise.resolve().then(() => (init_simpleHTMLHMR(), exports_simpleHTMLHMR));
@@ -22135,7 +22013,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22135
22013
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmlPages, "*.html") : htmlPageFiles;
22136
22014
  await runSequentially(pageFilesToUpdate, async (pageFile) => {
22137
22015
  const htmlPageName = basename12(pageFile);
22138
- const builtHtmlPagePath = resolve39(outputHtmlPages, htmlPageName);
22016
+ const builtHtmlPagePath = resolve38(outputHtmlPages, htmlPageName);
22139
22017
  await processHtmlPageUpdate(state, pageFile, builtHtmlPagePath, manifest, duration);
22140
22018
  });
22141
22019
  }, handleVueCssOnlyUpdate = (state, vueCssFiles, manifest, duration) => {
@@ -22196,11 +22074,11 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22196
22074
  const baseName = fileName.replace(/\.vue$/, "");
22197
22075
  const pascalName = toPascal(baseName);
22198
22076
  const vueRoot = config.vueDirectory;
22199
- const hmrId = vueRoot ? relative16(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
22077
+ const hmrId = vueRoot ? relative15(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
22200
22078
  const cssKey = `${pascalName}CSS`;
22201
22079
  const cssUrl = manifest[cssKey] || null;
22202
22080
  const { vueHmrMetadata: vueHmrMetadata2 } = await Promise.resolve().then(() => (init_compileVue(), exports_compileVue));
22203
- const hmrMeta = vueHmrMetadata2.get(resolve39(vuePagePath));
22081
+ const hmrMeta = vueHmrMetadata2.get(resolve38(vuePagePath));
22204
22082
  const changeType = hmrMeta?.changeType ?? "full";
22205
22083
  if (changeType === "style-only") {
22206
22084
  broadcastVueStyleOnly(state, vuePagePath, baseName, cssUrl, hmrId, manifest, duration);
@@ -22385,7 +22263,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22385
22263
  const pageFilesToUpdate = shouldRefreshAllPages ? await scanEntryPoints(outputHtmxPages, "*.html") : htmxPageFiles;
22386
22264
  await runSequentially(pageFilesToUpdate, async (htmxPageFile) => {
22387
22265
  const htmxPageName = basename12(htmxPageFile);
22388
- const builtHtmxPagePath = resolve39(outputHtmxPages, htmxPageName);
22266
+ const builtHtmxPagePath = resolve38(outputHtmxPages, htmxPageName);
22389
22267
  await processHtmxPageUpdate(state, htmxPageFile, builtHtmxPagePath, manifest, duration);
22390
22268
  });
22391
22269
  }, collectUpdatedModulePaths = (allModuleUpdates) => {
@@ -22494,7 +22372,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, runSequent
22494
22372
  html = html.slice(0, bodyClose.index) + hmrScript + html.slice(bodyClose.index);
22495
22373
  writeFs(destPath, html);
22496
22374
  }, processMarkupFileFastPath = async (state, sourceFile, outputDir, framework, startTime, updateAssetPaths2, handleUpdate, readFs, writeFs) => {
22497
- const destPath = resolve39(outputDir, basename12(sourceFile));
22375
+ const destPath = resolve38(outputDir, basename12(sourceFile));
22498
22376
  const hmrScript = extractHmrScript(destPath, readFs);
22499
22377
  const source = await Bun.file(sourceFile).text();
22500
22378
  await Bun.write(destPath, source);
@@ -22784,7 +22662,7 @@ __export(exports_buildDepVendor, {
22784
22662
  buildDepVendor: () => buildDepVendor
22785
22663
  });
22786
22664
  import { mkdirSync as mkdirSync13 } from "fs";
22787
- import { join as join31 } from "path";
22665
+ import { join as join30 } from "path";
22788
22666
  import { rm as rm10 } from "fs/promises";
22789
22667
  var {build: bunBuild9, Glob: Glob9 } = globalThis.Bun;
22790
22668
  var toSafeFileName6 = (specifier) => {
@@ -22797,12 +22675,12 @@ var toSafeFileName6 = (specifier) => {
22797
22675
  } catch {
22798
22676
  return false;
22799
22677
  }
22800
- }, isBareSpecifier2 = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file5) => file5.includes("node_modules") || file5.includes("/build/") || file5.includes("/dist/") || file5.includes("/indexes/"), isDepSpecifier = (path) => isBareSpecifier2(path) && !isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), isFrameworkRootCandidate = (path) => isBareSpecifier2(path) && isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), readFileSpecifiers = async (file5, transpiler6) => {
22678
+ }, isBareSpecifier2 = (spec) => !spec.startsWith(".") && !spec.startsWith("/") && !spec.startsWith("@src/"), isAbsolutePackageSpecifier = (spec) => spec === "@absolutejs/absolute" || spec.startsWith("@absolutejs/absolute/"), FRAMEWORK_SPECIFIERS, FRAMEWORK_NAMESPACE_PREFIXES, isFrameworkSpecifier = (spec) => FRAMEWORK_SPECIFIERS.has(spec) || FRAMEWORK_NAMESPACE_PREFIXES.some((prefix) => spec.startsWith(prefix)), FRAMEWORK_EXTERNALS, isSkippedFile = (file5) => file5.includes("node_modules") || file5.includes("/build/") || file5.includes("/dist/") || file5.includes("/indexes/"), isDepSpecifier = (path) => isBareSpecifier2(path) && !isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), isFrameworkRootCandidate = (path) => isBareSpecifier2(path) && isFrameworkSpecifier(path) && !isAbsolutePackageSpecifier(path), readFileSpecifiers = async (file5, transpiler5) => {
22801
22679
  const dep = [];
22802
22680
  const framework = [];
22803
22681
  try {
22804
22682
  const content = await Bun.file(file5).text();
22805
- for (const imp of transpiler6.scanImports(content)) {
22683
+ for (const imp of transpiler5.scanImports(content)) {
22806
22684
  if (isDepSpecifier(imp.path))
22807
22685
  dep.push(imp.path);
22808
22686
  else if (isFrameworkRootCandidate(imp.path))
@@ -22819,9 +22697,9 @@ var toSafeFileName6 = (specifier) => {
22819
22697
  } catch {
22820
22698
  return empty;
22821
22699
  }
22822
- }, collectDirSpecifiers = async (dir, transpiler6, dep, framework) => {
22700
+ }, collectDirSpecifiers = async (dir, transpiler5, dep, framework) => {
22823
22701
  const files = await scanDirFiles(dir);
22824
- const results = await Promise.all(files.map((file5) => readFileSpecifiers(file5, transpiler6)));
22702
+ const results = await Promise.all(files.map((file5) => readFileSpecifiers(file5, transpiler5)));
22825
22703
  for (const result of results) {
22826
22704
  for (const spec of result.dep)
22827
22705
  dep.add(spec);
@@ -22831,15 +22709,15 @@ var toSafeFileName6 = (specifier) => {
22831
22709
  }, scanBareImports = async (directories) => {
22832
22710
  const dep = new Set;
22833
22711
  const framework = new Set;
22834
- const transpiler6 = new Bun.Transpiler({ loader: "tsx" });
22835
- await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler6, dep, framework)));
22712
+ const transpiler5 = new Bun.Transpiler({ loader: "tsx" });
22713
+ await Promise.all(directories.map((dir) => collectDirSpecifiers(dir, transpiler5, dep, framework)));
22836
22714
  return {
22837
22715
  dep: Array.from(dep).filter(isResolvable4),
22838
22716
  framework: Array.from(framework).filter(isResolvable4)
22839
22717
  };
22840
22718
  }, collectTransitiveImports = async (specs, alreadyVendored, alreadyScanned) => {
22841
22719
  const { readFileSync: readFileSync21 } = await import("fs");
22842
- const transpiler6 = new Bun.Transpiler({ loader: "js" });
22720
+ const transpiler5 = new Bun.Transpiler({ loader: "js" });
22843
22721
  const newSpecs = new Set;
22844
22722
  for (const spec of specs) {
22845
22723
  if (alreadyScanned.has(spec))
@@ -22859,7 +22737,7 @@ var toSafeFileName6 = (specifier) => {
22859
22737
  }
22860
22738
  let imports;
22861
22739
  try {
22862
- imports = transpiler6.scanImports(content);
22740
+ imports = transpiler5.scanImports(content);
22863
22741
  } catch {
22864
22742
  continue;
22865
22743
  }
@@ -22895,7 +22773,7 @@ var toSafeFileName6 = (specifier) => {
22895
22773
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
22896
22774
  const entries = await Promise.all(specifiers.map(async (specifier) => {
22897
22775
  const safeName = toSafeFileName6(specifier);
22898
- const entryPath = join31(tmpDir, `${safeName}.ts`);
22776
+ const entryPath = join30(tmpDir, `${safeName}.ts`);
22899
22777
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
22900
22778
  return { entryPath, specifier };
22901
22779
  }));
@@ -22956,9 +22834,9 @@ var toSafeFileName6 = (specifier) => {
22956
22834
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories);
22957
22835
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
22958
22836
  return {};
22959
- const vendorDir = join31(buildDir, "vendor");
22837
+ const vendorDir = join30(buildDir, "vendor");
22960
22838
  mkdirSync13(vendorDir, { recursive: true });
22961
- const tmpDir = join31(buildDir, "_dep_vendor_tmp");
22839
+ const tmpDir = join30(buildDir, "_dep_vendor_tmp");
22962
22840
  mkdirSync13(tmpDir, { recursive: true });
22963
22841
  const allSpecs = new Set(initialSpecs);
22964
22842
  const alreadyScanned = new Set;
@@ -23041,7 +22919,7 @@ __export(exports_devBuild, {
23041
22919
  });
23042
22920
  import { readdir as readdir5 } from "fs/promises";
23043
22921
  import { statSync as statSync5 } from "fs";
23044
- import { resolve as resolve40 } from "path";
22922
+ import { resolve as resolve39 } from "path";
23045
22923
  var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23046
22924
  const configuredDirs = [
23047
22925
  config.reactDirectory,
@@ -23064,7 +22942,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23064
22942
  return Object.keys(config).length > 0 ? config : null;
23065
22943
  }, reloadConfig = async () => {
23066
22944
  try {
23067
- const configPath2 = resolve40(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
22945
+ const configPath2 = resolve39(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
23068
22946
  const source = await Bun.file(configPath2).text();
23069
22947
  return parseDirectoryConfig(source);
23070
22948
  } catch {
@@ -23149,7 +23027,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23149
23027
  state.fileChangeQueue.clear();
23150
23028
  }
23151
23029
  }, handleCachedReload = async () => {
23152
- const serverMtime = statSync5(resolve40(Bun.main)).mtimeMs;
23030
+ const serverMtime = statSync5(resolve39(Bun.main)).mtimeMs;
23153
23031
  const lastMtime = globalThis.__hmrServerMtime;
23154
23032
  globalThis.__hmrServerMtime = serverMtime;
23155
23033
  const cached = globalThis.__hmrDevResult;
@@ -23186,8 +23064,8 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23186
23064
  return true;
23187
23065
  }, resolveAbsoluteVersion2 = async () => {
23188
23066
  const candidates = [
23189
- resolve40(import.meta.dir, "..", "..", "package.json"),
23190
- resolve40(import.meta.dir, "..", "package.json")
23067
+ resolve39(import.meta.dir, "..", "..", "package.json"),
23068
+ resolve39(import.meta.dir, "..", "package.json")
23191
23069
  ];
23192
23070
  const [candidate, ...remaining] = candidates;
23193
23071
  if (!candidate) {
@@ -23213,7 +23091,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23213
23091
  const entries = await readdir5(vendorDir).catch(() => emptyStringArray);
23214
23092
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
23215
23093
  const webPath = `/${framework}/vendor/${entry}`;
23216
- const bytes = await Bun.file(resolve40(vendorDir, entry)).bytes();
23094
+ const bytes = await Bun.file(resolve39(vendorDir, entry)).bytes();
23217
23095
  assetStore.set(webPath, bytes);
23218
23096
  }));
23219
23097
  }, devBuild = async (config) => {
@@ -23281,11 +23159,11 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23281
23159
  cleanStaleAssets(state.assetStore, manifest, state.resolvedPaths.buildDir);
23282
23160
  recordStep("populate asset store", stepStartedAt);
23283
23161
  stepStartedAt = performance.now();
23284
- const reactVendorDir = resolve40(state.resolvedPaths.buildDir, "react", "vendor");
23285
- const angularVendorDir = resolve40(state.resolvedPaths.buildDir, "angular", "vendor");
23286
- const svelteVendorDir = resolve40(state.resolvedPaths.buildDir, "svelte", "vendor");
23287
- const vueVendorDir = resolve40(state.resolvedPaths.buildDir, "vue", "vendor");
23288
- const depVendorDir = resolve40(state.resolvedPaths.buildDir, "vendor");
23162
+ const reactVendorDir = resolve39(state.resolvedPaths.buildDir, "react", "vendor");
23163
+ const angularVendorDir = resolve39(state.resolvedPaths.buildDir, "angular", "vendor");
23164
+ const svelteVendorDir = resolve39(state.resolvedPaths.buildDir, "svelte", "vendor");
23165
+ const vueVendorDir = resolve39(state.resolvedPaths.buildDir, "vue", "vendor");
23166
+ const depVendorDir = resolve39(state.resolvedPaths.buildDir, "vendor");
23289
23167
  const { buildDepVendor: buildDepVendor2 } = await Promise.resolve().then(() => (init_buildDepVendor(), exports_buildDepVendor));
23290
23168
  const [, angularSpecs, , , , , depPaths] = await Promise.all([
23291
23169
  config.reactDirectory ? buildReactVendor(state.resolvedPaths.buildDir) : Promise.resolve(undefined),
@@ -23363,7 +23241,7 @@ var FRAMEWORK_DIR_KEYS, collectDepVendorSourceDirs = (config) => {
23363
23241
  manifest
23364
23242
  };
23365
23243
  globalThis.__hmrDevResult = result;
23366
- globalThis.__hmrServerMtime = statSync5(resolve40(Bun.main)).mtimeMs;
23244
+ globalThis.__hmrServerMtime = statSync5(resolve39(Bun.main)).mtimeMs;
23367
23245
  return result;
23368
23246
  };
23369
23247
  var init_devBuild = __esm(() => {
@@ -23508,8 +23386,8 @@ var STORE_KEY = "__elysiaStore", getGlobalValue = (key) => Reflect.get(globalThi
23508
23386
  return null;
23509
23387
  if (!pathname.startsWith("/"))
23510
23388
  return null;
23511
- const { resolve: resolve41, normalize } = await import("path");
23512
- const candidate = resolve41(buildDir, pathname.slice(1));
23389
+ const { resolve: resolve40, normalize } = await import("path");
23390
+ const candidate = resolve40(buildDir, pathname.slice(1));
23513
23391
  const normalizedBuild = normalize(buildDir);
23514
23392
  if (!candidate.startsWith(normalizedBuild))
23515
23393
  return null;
@@ -23593,12 +23471,12 @@ __export(exports_devtoolsJson, {
23593
23471
  devtoolsJson: () => devtoolsJson
23594
23472
  });
23595
23473
  import { existsSync as existsSync28, mkdirSync as mkdirSync14, readFileSync as readFileSync21, writeFileSync as writeFileSync9 } from "fs";
23596
- import { dirname as dirname23, join as join32, resolve as resolve41 } from "path";
23474
+ import { dirname as dirname22, join as join31, resolve as resolve40 } from "path";
23597
23475
  import { Elysia as Elysia3 } from "elysia";
23598
23476
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
23599
23477
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
23600
23478
  return uuid;
23601
- }, 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) => resolve41(uuidCachePath ?? join32(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
23479
+ }, 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) => resolve40(uuidCachePath ?? join31(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
23602
23480
  if (!existsSync28(cachePath))
23603
23481
  return null;
23604
23482
  try {
@@ -23620,11 +23498,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
23620
23498
  if (cachedUuid)
23621
23499
  return setGlobalUuid(cachedUuid);
23622
23500
  const uuid = crypto.randomUUID();
23623
- mkdirSync14(dirname23(cachePath), { recursive: true });
23501
+ mkdirSync14(dirname22(cachePath), { recursive: true });
23624
23502
  writeFileSync9(cachePath, uuid, "utf-8");
23625
23503
  return setGlobalUuid(uuid);
23626
23504
  }, devtoolsJson = (buildDir, options = {}) => {
23627
- const rootPath = resolve41(options.projectRoot ?? process.cwd());
23505
+ const rootPath = resolve40(options.projectRoot ?? process.cwd());
23628
23506
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
23629
23507
  const uuid = getOrCreateUuid(buildDir, options);
23630
23508
  return new Elysia3({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
@@ -23637,11 +23515,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
23637
23515
  if (process.env.WSL_DISTRO_NAME) {
23638
23516
  const distro = process.env.WSL_DISTRO_NAME;
23639
23517
  const withoutLeadingSlash = root.replace(/^\//, "");
23640
- return join32("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
23518
+ return join31("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
23641
23519
  }
23642
23520
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
23643
23521
  const withoutLeadingSlash = root.replace(/^\//, "");
23644
- return join32("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
23522
+ return join31("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
23645
23523
  }
23646
23524
  return root;
23647
23525
  };
@@ -23653,7 +23531,7 @@ __export(exports_imageOptimizer, {
23653
23531
  imageOptimizer: () => imageOptimizer
23654
23532
  });
23655
23533
  import { existsSync as existsSync29 } from "fs";
23656
- import { resolve as resolve42 } from "path";
23534
+ import { resolve as resolve41 } from "path";
23657
23535
  import { Elysia as Elysia4 } from "elysia";
23658
23536
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
23659
23537
  try {
@@ -23666,7 +23544,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
23666
23544
  }
23667
23545
  }, resolveLocalImage = (url, buildDir) => {
23668
23546
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
23669
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve42(process.cwd()));
23547
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve41(process.cwd()));
23670
23548
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
23671
23549
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
23672
23550
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -23958,7 +23836,7 @@ __export(exports_prerender, {
23958
23836
  PRERENDER_BYPASS_HEADER: () => PRERENDER_BYPASS_HEADER
23959
23837
  });
23960
23838
  import { mkdirSync as mkdirSync15, readFileSync as readFileSync22 } from "fs";
23961
- import { join as join33 } from "path";
23839
+ import { join as join32 } from "path";
23962
23840
  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) => {
23963
23841
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
23964
23842
  await Bun.write(metaPath, String(Date.now()));
@@ -24024,7 +23902,7 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
24024
23902
  return false;
24025
23903
  const html = await res.text();
24026
23904
  const fileName = routeToFilename(route);
24027
- const filePath = join33(prerenderDir, fileName);
23905
+ const filePath = join32(prerenderDir, fileName);
24028
23906
  await Bun.write(filePath, html);
24029
23907
  await writeTimestamp(filePath);
24030
23908
  return true;
@@ -24050,13 +23928,13 @@ var SERVER_OUTPUT_LIMIT = 4000, STARTUP_POLL_INTERVAL_MS = 100, DEFAULT_STARTUP_
24050
23928
  }
24051
23929
  const html = await res.text();
24052
23930
  const fileName = routeToFilename(route);
24053
- const filePath = join33(prerenderDir, fileName);
23931
+ const filePath = join32(prerenderDir, fileName);
24054
23932
  await Bun.write(filePath, html);
24055
23933
  await writeTimestamp(filePath);
24056
23934
  result.routes.set(route, filePath);
24057
23935
  log2?.(` Pre-rendered ${route} \u2192 ${fileName} (${html.length} bytes)`);
24058
23936
  }, prerender = async (port, outDir, staticConfig, log2) => {
24059
- const prerenderDir = join33(outDir, "_prerendered");
23937
+ const prerenderDir = join32(outDir, "_prerendered");
24060
23938
  mkdirSync15(prerenderDir, { recursive: true });
24061
23939
  const baseUrl = `http://localhost:${port}`;
24062
23940
  let routes;
@@ -24655,11 +24533,11 @@ var handleHTMXPageRequest = async (pagePath) => {
24655
24533
  };
24656
24534
  // src/core/prepare.ts
24657
24535
  import { existsSync as existsSync30, readdirSync as readdirSync3, readFileSync as readFileSync23 } from "fs";
24658
- import { basename as basename13, join as join34, relative as relative17, resolve as resolve43 } from "path";
24536
+ import { basename as basename13, join as join33, relative as relative16, resolve as resolve42 } from "path";
24659
24537
  import { Elysia as Elysia5 } from "elysia";
24660
24538
 
24661
24539
  // src/utils/loadConfig.ts
24662
- import { resolve as resolve8 } from "path";
24540
+ import { resolve as resolve7 } from "path";
24663
24541
  var RESERVED_TOP_LEVEL_KEYS = new Set([
24664
24542
  "assetsDirectory",
24665
24543
  "astroDirectory",
@@ -24752,7 +24630,7 @@ var loadConfig = async (configPath) => {
24752
24630
  return config;
24753
24631
  };
24754
24632
  var loadRawConfig = async (configPath) => {
24755
- const resolved = resolve8(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
24633
+ const resolved = resolve7(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
24756
24634
  const mod = await import(resolved);
24757
24635
  const config = mod.default ?? mod.config;
24758
24636
  if (!config) {
@@ -24767,7 +24645,7 @@ Expected: export default defineConfig({ ... })`);
24767
24645
 
24768
24646
  // src/core/loadIslandRegistry.ts
24769
24647
  init_islandEntries();
24770
- import { resolve as resolve9 } from "path";
24648
+ import { resolve as resolve8 } from "path";
24771
24649
  var isRecord6 = (value) => typeof value === "object" && value !== null;
24772
24650
  var resolveRegistryExport2 = (mod) => {
24773
24651
  if (isRecord6(mod.islandRegistry))
@@ -24779,7 +24657,7 @@ var resolveRegistryExport2 = (mod) => {
24779
24657
  var isRegistryModuleExport = (value) => isRecord6(value);
24780
24658
  var isIslandRegistryInput = (value) => isRecord6(value);
24781
24659
  var loadIslandRegistry = async (registryPath) => {
24782
- const resolvedRegistryPath = resolve9(registryPath);
24660
+ const resolvedRegistryPath = resolve8(registryPath);
24783
24661
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
24784
24662
  if (buildInfo.definitions.length > 0) {
24785
24663
  return buildInfo.registry;
@@ -25078,7 +24956,7 @@ var collectPrewarmFiles = async (prewarmDirs) => {
25078
24956
  for (const { dir, pattern } of prewarmDirs) {
25079
24957
  const glob = new Glob10(pattern);
25080
24958
  const matches = [
25081
- ...glob.scanSync({ absolute: true, cwd: resolve43(dir) })
24959
+ ...glob.scanSync({ absolute: true, cwd: resolve42(dir) })
25082
24960
  ];
25083
24961
  files.push(...matches);
25084
24962
  }
@@ -25089,7 +24967,7 @@ var warmPrewarmDirs = async (prewarmDirs, warmCache2, SRC_URL_PREFIX2) => {
25089
24967
  for (const file5 of files) {
25090
24968
  if (file5.includes("/node_modules/"))
25091
24969
  continue;
25092
- const rel = relative17(process.cwd(), file5).replace(/\\/g, "/");
24970
+ const rel = relative16(process.cwd(), file5).replace(/\\/g, "/");
25093
24971
  warmCache2(`${SRC_URL_PREFIX2}${rel}`);
25094
24972
  }
25095
24973
  };
@@ -25114,10 +24992,10 @@ var patchManifestIndexes = (manifest, devIndexDir, SRC_URL_PREFIX2) => {
25114
24992
  const fileName = resolveDevIndexFileName(manifest[key], baseName);
25115
24993
  if (!fileName)
25116
24994
  continue;
25117
- const srcPath = resolve43(devIndexDir, fileName);
24995
+ const srcPath = resolve42(devIndexDir, fileName);
25118
24996
  if (!existsSync30(srcPath))
25119
24997
  continue;
25120
- const rel = relative17(process.cwd(), srcPath).replace(/\\/g, "/");
24998
+ const rel = relative16(process.cwd(), srcPath).replace(/\\/g, "/");
25121
24999
  manifest[key] = `${SRC_URL_PREFIX2}${rel}`;
25122
25000
  }
25123
25001
  };
@@ -25187,7 +25065,7 @@ var prepareDev = async (config, buildDir) => {
25187
25065
  stepStartedAt = performance.now();
25188
25066
  const hmrPlugin = hmr2(result.hmrState, result.manifest, moduleHandler);
25189
25067
  const { devtoolsJson: devtoolsJson2 } = await Promise.resolve().then(() => (init_devtoolsJson(), exports_devtoolsJson));
25190
- const devIndexDir = resolve43(buildDir, "_src_indexes");
25068
+ const devIndexDir = resolve42(buildDir, "_src_indexes");
25191
25069
  patchManifestIndexes(result.manifest, devIndexDir, SRC_URL_PREFIX2);
25192
25070
  recordStep("configure dev plugins", stepStartedAt);
25193
25071
  stepStartedAt = performance.now();
@@ -25236,7 +25114,7 @@ var loadPrerenderMap = (prerenderDir) => {
25236
25114
  continue;
25237
25115
  const name = basename13(entry, ".html");
25238
25116
  const route = name === "index" ? "/" : `/${name}`;
25239
- map.set(route, join34(prerenderDir, entry));
25117
+ map.set(route, join33(prerenderDir, entry));
25240
25118
  }
25241
25119
  return map;
25242
25120
  };
@@ -25268,7 +25146,7 @@ var prepare = async (configOrPath) => {
25268
25146
  recordStep("load config", stepStartedAt);
25269
25147
  const nodeEnv = process.env["NODE_ENV"];
25270
25148
  const isDev3 = nodeEnv === "development";
25271
- const buildDir = resolve43(process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
25149
+ const buildDir = resolve42(process.env.ABSOLUTE_BUILD_DIR ?? config.buildDirectory ?? "build");
25272
25150
  if (isDev3) {
25273
25151
  stepStartedAt = performance.now();
25274
25152
  const result = await prepareDev(config, buildDir);
@@ -25285,7 +25163,7 @@ var prepare = async (configOrPath) => {
25285
25163
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
25286
25164
  recordStep("load production manifest and island metadata", stepStartedAt);
25287
25165
  stepStartedAt = performance.now();
25288
- const conventionsPath = join34(buildDir, "conventions.json");
25166
+ const conventionsPath = join33(buildDir, "conventions.json");
25289
25167
  if (existsSync30(conventionsPath)) {
25290
25168
  const conventions2 = JSON.parse(readFileSync23(conventionsPath, "utf-8"));
25291
25169
  setConventions(conventions2);
@@ -25301,7 +25179,7 @@ var prepare = async (configOrPath) => {
25301
25179
  });
25302
25180
  recordStep("create static plugin", stepStartedAt);
25303
25181
  stepStartedAt = performance.now();
25304
- const prerenderDir = join34(buildDir, "_prerendered");
25182
+ const prerenderDir = join33(buildDir, "_prerendered");
25305
25183
  const prerenderMap = loadPrerenderMap(prerenderDir);
25306
25184
  recordStep("load prerender map", stepStartedAt);
25307
25185
  if (prerenderMap.size > 0) {
@@ -25360,10 +25238,10 @@ var {env: env4 } = globalThis.Bun;
25360
25238
 
25361
25239
  // src/dev/devCert.ts
25362
25240
  import { existsSync as existsSync31, mkdirSync as mkdirSync16, readFileSync as readFileSync24, rmSync as rmSync3 } from "fs";
25363
- import { join as join35 } from "path";
25364
- var CERT_DIR = join35(process.cwd(), ".absolutejs");
25365
- var CERT_PATH = join35(CERT_DIR, "cert.pem");
25366
- var KEY_PATH = join35(CERT_DIR, "key.pem");
25241
+ import { join as join34 } from "path";
25242
+ var CERT_DIR = join34(process.cwd(), ".absolutejs");
25243
+ var CERT_PATH = join34(CERT_DIR, "cert.pem");
25244
+ var KEY_PATH = join34(CERT_DIR, "key.pem");
25367
25245
  var CERT_VALIDITY_DAYS = 365;
25368
25246
  var devLog = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[36m[dev]\x1B[0m ${msg}`);
25369
25247
  var devWarn = (msg) => console.log(`\x1B[2m${new Date().toLocaleTimeString()}\x1B[0m \x1B[33m[dev]\x1B[0m \x1B[33m${msg}\x1B[0m`);
@@ -25696,7 +25574,7 @@ var jsonLd2 = (schema) => {
25696
25574
  // src/utils/defineEnv.ts
25697
25575
  var {env: bunEnv } = globalThis.Bun;
25698
25576
  import { existsSync as existsSync32, readFileSync as readFileSync25 } from "fs";
25699
- import { resolve as resolve44 } from "path";
25577
+ import { resolve as resolve43 } from "path";
25700
25578
 
25701
25579
  // node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
25702
25580
  var exports_value = {};
@@ -31731,7 +31609,7 @@ ${lines.join(`
31731
31609
  };
31732
31610
  var checkEnvFileSecurity = (properties) => {
31733
31611
  const cwd2 = process.cwd();
31734
- const envPath = resolve44(cwd2, ".env");
31612
+ const envPath = resolve43(cwd2, ".env");
31735
31613
  if (!existsSync32(envPath))
31736
31614
  return;
31737
31615
  const sensitiveKeys = Object.keys(properties).filter(isSensitive);
@@ -31741,7 +31619,7 @@ var checkEnvFileSecurity = (properties) => {
31741
31619
  const presentKeys = sensitiveKeys.filter((key) => envContent.includes(`${key}=`));
31742
31620
  if (presentKeys.length === 0)
31743
31621
  return;
31744
- const gitignorePath = resolve44(cwd2, ".gitignore");
31622
+ const gitignorePath = resolve43(cwd2, ".gitignore");
31745
31623
  if (existsSync32(gitignorePath)) {
31746
31624
  const gitignore = readFileSync25(gitignorePath, "utf-8");
31747
31625
  if (gitignore.split(`
@@ -31981,5 +31859,5 @@ export {
31981
31859
  ANGULAR_INIT_TIMEOUT_MS
31982
31860
  };
31983
31861
 
31984
- //# debugId=A2D4D12BDB3411EB64756E2164756E21
31862
+ //# debugId=01ED83B435DEDF0664756E2164756E21
31985
31863
  //# sourceMappingURL=index.js.map