@absolutejs/absolute 0.19.0-beta.1121 → 0.19.0-beta.1122

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
@@ -22158,6 +22158,81 @@ var init_angularLinkerPlugin = __esm(() => {
22158
22158
  angularLinkerPlugin = createAngularLinkerPlugin(false);
22159
22159
  });
22160
22160
 
22161
+ // src/build/bunStringRawUnicodePlugin.ts
22162
+ import { extname as extname6 } from "path";
22163
+ import ts6 from "typescript";
22164
+ var NON_ASCII, getScriptKind2 = (filePath) => {
22165
+ if (/\.[cm]?tsx$/.test(filePath))
22166
+ return ts6.ScriptKind.TSX;
22167
+ if (/\.[cm]?jsx$/.test(filePath))
22168
+ return ts6.ScriptKind.JSX;
22169
+ if (/\.[cm]?ts$/.test(filePath))
22170
+ return ts6.ScriptKind.TS;
22171
+ return ts6.ScriptKind.JS;
22172
+ }, getLoader = (filePath) => {
22173
+ const extension = extname6(filePath);
22174
+ if (extension === ".tsx")
22175
+ return "tsx";
22176
+ if (extension === ".jsx")
22177
+ return "jsx";
22178
+ if (extension === ".ts" || extension === ".mts" || extension === ".cts") {
22179
+ return "ts";
22180
+ }
22181
+ return "js";
22182
+ }, isStringRawTag = (node) => ts6.isPropertyAccessExpression(node.tag) && ts6.isIdentifier(node.tag.expression) && node.tag.expression.text === "String" && node.tag.name.text === "raw", getRawText = (node) => node.rawText ?? node.text, rewriteBunStringRawUnicode = (source, filePath = "input.ts") => {
22183
+ if (!source.includes("String.raw") || !NON_ASCII.test(source))
22184
+ return source;
22185
+ const sourceFile = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, getScriptKind2(filePath));
22186
+ const replacements = [];
22187
+ const visit = (node) => {
22188
+ if (ts6.isTaggedTemplateExpression(node) && isStringRawTag(node)) {
22189
+ const rawSegments = ts6.isNoSubstitutionTemplateLiteral(node.template) ? [getRawText(node.template)] : [
22190
+ getRawText(node.template.head),
22191
+ ...node.template.templateSpans.map((span) => getRawText(span.literal))
22192
+ ];
22193
+ if (rawSegments.some((segment) => NON_ASCII.test(segment))) {
22194
+ const expressions = ts6.isTemplateExpression(node.template) ? node.template.templateSpans.map((span) => {
22195
+ const expression = source.slice(span.expression.getStart(sourceFile), span.expression.end);
22196
+ return rewriteBunStringRawUnicode(expression, filePath);
22197
+ }) : [];
22198
+ const args = [
22199
+ `{ raw: [${rawSegments.map((text) => JSON.stringify(text)).join(", ")}] }`,
22200
+ ...expressions
22201
+ ];
22202
+ replacements.push({
22203
+ end: node.end,
22204
+ start: node.getStart(sourceFile),
22205
+ value: `String.raw(${args.join(", ")})`
22206
+ });
22207
+ return;
22208
+ }
22209
+ }
22210
+ ts6.forEachChild(node, visit);
22211
+ };
22212
+ visit(sourceFile);
22213
+ let result = source;
22214
+ for (const replacement of replacements.sort((a, b2) => b2.start - a.start)) {
22215
+ result = result.slice(0, replacement.start) + replacement.value + result.slice(replacement.end);
22216
+ }
22217
+ return result;
22218
+ }, createBunStringRawUnicodePlugin = () => ({
22219
+ name: "absolute-bun-string-raw-unicode",
22220
+ setup(build2) {
22221
+ build2.onLoad({ filter: /\.[cm]?[jt]sx?$/ }, async (args) => {
22222
+ if (args.path.includes("/node_modules/"))
22223
+ return;
22224
+ const source = await Bun.file(args.path).text();
22225
+ const contents = rewriteBunStringRawUnicode(source, args.path);
22226
+ if (contents === source)
22227
+ return;
22228
+ return { contents, loader: getLoader(args.path) };
22229
+ });
22230
+ }
22231
+ });
22232
+ var init_bunStringRawUnicodePlugin = __esm(() => {
22233
+ NON_ASCII = /[^\x00-\x7f]/;
22234
+ });
22235
+
22161
22236
  // src/build/externalAssetPlugin.ts
22162
22237
  import { copyFileSync, existsSync as existsSync22, mkdirSync as mkdirSync6, statSync } from "fs";
22163
22238
  import { basename as basename7, dirname as dirname13, join as join24, resolve as resolve19 } from "path";
@@ -22199,25 +22274,25 @@ var init_externalAssetPlugin = () => {};
22199
22274
 
22200
22275
  // src/build/islandRegistryTransform.ts
22201
22276
  import { basename as basename8 } from "path";
22202
- import ts6 from "typescript";
22203
- var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name) || ts6.isStringLiteral(name) ? name.text : null, isIslandRegistryHelperImport2 = (source) => source === "@absolutejs/absolute/islands" || source.endsWith("/islands") || source.endsWith("/core/islands"), collectRegistryFactory = (sourceFile) => {
22277
+ import ts7 from "typescript";
22278
+ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts7.isIdentifier(name) || ts7.isStringLiteral(name) ? name.text : null, isIslandRegistryHelperImport2 = (source) => source === "@absolutejs/absolute/islands" || source.endsWith("/islands") || source.endsWith("/core/islands"), collectRegistryFactory = (sourceFile) => {
22204
22279
  const factoryNames = new Set;
22205
22280
  const namespaceNames = new Set;
22206
22281
  for (const statement of sourceFile.statements) {
22207
- if (!ts6.isImportDeclaration(statement))
22282
+ if (!ts7.isImportDeclaration(statement))
22208
22283
  continue;
22209
- if (!ts6.isStringLiteral(statement.moduleSpecifier))
22284
+ if (!ts7.isStringLiteral(statement.moduleSpecifier))
22210
22285
  continue;
22211
22286
  if (!isIslandRegistryHelperImport2(statement.moduleSpecifier.text))
22212
22287
  continue;
22213
22288
  const bindings = statement.importClause?.namedBindings;
22214
22289
  if (!bindings)
22215
22290
  continue;
22216
- if (ts6.isNamespaceImport(bindings)) {
22291
+ if (ts7.isNamespaceImport(bindings)) {
22217
22292
  namespaceNames.add(bindings.name.text);
22218
22293
  continue;
22219
22294
  }
22220
- if (!ts6.isNamedImports(bindings))
22295
+ if (!ts7.isNamedImports(bindings))
22221
22296
  continue;
22222
22297
  for (const element of bindings.elements) {
22223
22298
  const imported = element.propertyName?.text ?? element.name.text;
@@ -22228,20 +22303,20 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22228
22303
  }
22229
22304
  return { factoryNames, namespaceNames };
22230
22305
  }, isDefineIslandRegistryCall2 = (expression, factoryNames, namespaceNames) => {
22231
- if (ts6.isIdentifier(expression))
22306
+ if (ts7.isIdentifier(expression))
22232
22307
  return factoryNames.has(expression.text);
22233
- return ts6.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && ts6.isIdentifier(expression.expression) && namespaceNames.has(expression.expression.text);
22308
+ return ts7.isPropertyAccessExpression(expression) && expression.name.text === "defineIslandRegistry" && ts7.isIdentifier(expression.expression) && namespaceNames.has(expression.expression.text);
22234
22309
  }, findDefineIslandRegistryCall = (sourceFile, factoryNames, namespaceNames) => {
22235
22310
  let found = null;
22236
22311
  const visit = (node) => {
22237
22312
  if (found)
22238
22313
  return;
22239
- const [firstArg] = ts6.isCallExpression(node) ? node.arguments : [];
22240
- if (ts6.isCallExpression(node) && isDefineIslandRegistryCall2(node.expression, factoryNames, namespaceNames) && firstArg && ts6.isObjectLiteralExpression(firstArg)) {
22314
+ const [firstArg] = ts7.isCallExpression(node) ? node.arguments : [];
22315
+ if (ts7.isCallExpression(node) && isDefineIslandRegistryCall2(node.expression, factoryNames, namespaceNames) && firstArg && ts7.isObjectLiteralExpression(firstArg)) {
22241
22316
  found = node;
22242
22317
  return;
22243
22318
  }
22244
- ts6.forEachChild(node, visit);
22319
+ ts7.forEachChild(node, visit);
22245
22320
  };
22246
22321
  visit(sourceFile);
22247
22322
  return found;
@@ -22251,8 +22326,8 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22251
22326
  }, transformIslandRegistrySource = (source, filePath, info) => {
22252
22327
  if (!source.includes("defineIslandRegistry"))
22253
22328
  return null;
22254
- const scriptKind = filePath.endsWith(".tsx") || filePath.endsWith(".jsx") ? ts6.ScriptKind.TSX : ts6.ScriptKind.TS;
22255
- const sourceFile = ts6.createSourceFile(filePath, source, ts6.ScriptTarget.Latest, true, scriptKind);
22329
+ const scriptKind = filePath.endsWith(".tsx") || filePath.endsWith(".jsx") ? ts7.ScriptKind.TSX : ts7.ScriptKind.TS;
22330
+ const sourceFile = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, scriptKind);
22256
22331
  const { factoryNames, namespaceNames } = collectRegistryFactory(sourceFile);
22257
22332
  if (factoryNames.size === 0 && namespaceNames.size === 0)
22258
22333
  return null;
@@ -22260,7 +22335,7 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22260
22335
  if (!call)
22261
22336
  return null;
22262
22337
  const [objectLiteral] = call.arguments;
22263
- if (!objectLiteral || !ts6.isObjectLiteralExpression(objectLiteral)) {
22338
+ if (!objectLiteral || !ts7.isObjectLiteralExpression(objectLiteral)) {
22264
22339
  return null;
22265
22340
  }
22266
22341
  const definitionLookup = new Map;
@@ -22275,20 +22350,20 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22275
22350
  const edits = [];
22276
22351
  const replacedLocals = new Set;
22277
22352
  for (const frameworkProperty of objectLiteral.properties) {
22278
- if (!ts6.isPropertyAssignment(frameworkProperty))
22353
+ if (!ts7.isPropertyAssignment(frameworkProperty))
22279
22354
  continue;
22280
22355
  const frameworkName = getObjectPropertyName2(frameworkProperty.name);
22281
22356
  const framework = VALID_FRAMEWORKS.find((f2) => f2 === frameworkName);
22282
22357
  if (!framework)
22283
22358
  continue;
22284
- if (!ts6.isObjectLiteralExpression(frameworkProperty.initializer))
22359
+ if (!ts7.isObjectLiteralExpression(frameworkProperty.initializer))
22285
22360
  continue;
22286
22361
  for (const componentProperty of frameworkProperty.initializer.properties) {
22287
22362
  let componentKey = null;
22288
22363
  let localName = null;
22289
22364
  let replaceNode = null;
22290
22365
  let replacementText = "";
22291
- if (ts6.isShorthandPropertyAssignment(componentProperty)) {
22366
+ if (ts7.isShorthandPropertyAssignment(componentProperty)) {
22292
22367
  componentKey = componentProperty.name.text;
22293
22368
  localName = componentProperty.name.text;
22294
22369
  const reference = definitionLookup.get(`${framework}:${componentKey}`);
@@ -22296,7 +22371,7 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22296
22371
  continue;
22297
22372
  replaceNode = componentProperty;
22298
22373
  replacementText = `${quoteKey(componentKey)}: ${definitionLiteral(reference)}`;
22299
- } else if (ts6.isPropertyAssignment(componentProperty) && ts6.isIdentifier(componentProperty.initializer)) {
22374
+ } else if (ts7.isPropertyAssignment(componentProperty) && ts7.isIdentifier(componentProperty.initializer)) {
22300
22375
  componentKey = getObjectPropertyName2(componentProperty.name);
22301
22376
  localName = componentProperty.initializer.text;
22302
22377
  if (!componentKey)
@@ -22320,7 +22395,7 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22320
22395
  if (edits.length === 0)
22321
22396
  return null;
22322
22397
  for (const statement of sourceFile.statements) {
22323
- if (!ts6.isImportDeclaration(statement))
22398
+ if (!ts7.isImportDeclaration(statement))
22324
22399
  continue;
22325
22400
  const clause = statement.importClause;
22326
22401
  if (!clause)
@@ -22329,11 +22404,11 @@ var VALID_FRAMEWORKS, getObjectPropertyName2 = (name) => ts6.isIdentifier(name)
22329
22404
  if (clause.name)
22330
22405
  localNames.push(clause.name.text);
22331
22406
  const bindings = clause.namedBindings;
22332
- if (bindings && ts6.isNamedImports(bindings)) {
22407
+ if (bindings && ts7.isNamedImports(bindings)) {
22333
22408
  for (const element of bindings.elements) {
22334
22409
  localNames.push(element.name.text);
22335
22410
  }
22336
- } else if (bindings && ts6.isNamespaceImport(bindings)) {
22411
+ } else if (bindings && ts7.isNamespaceImport(bindings)) {
22337
22412
  localNames.push(bindings.name.text);
22338
22413
  }
22339
22414
  if (localNames.length === 0)
@@ -22643,9 +22718,18 @@ var GENERATED_DIR_NAME = "generated", ABSOLUTE_CACHE_DIR_NAME = ".absolutejs", g
22643
22718
  var init_generatedDir = () => {};
22644
22719
 
22645
22720
  // src/utils/cleanup.ts
22646
- import { rm as rm3 } from "fs/promises";
22721
+ import { lstat, rm as rm3 } from "fs/promises";
22647
22722
  import { join as join26 } from "path";
22648
- var removeIfExists = (path) => rm3(path, { force: true, recursive: true }), cleanFramework = (framework, frameworkDir, skipGenerated = false) => {
22723
+ var isNotFoundError = (error) => error instanceof Error && ("code" in error) && Reflect.get(error, "code") === "ENOENT", removeIfExists = async (path) => {
22724
+ try {
22725
+ await lstat(path);
22726
+ } catch (error) {
22727
+ if (isNotFoundError(error))
22728
+ return;
22729
+ throw error;
22730
+ }
22731
+ await rm3(path, { force: true, recursive: true });
22732
+ }, cleanFramework = (framework, frameworkDir, skipGenerated = false) => {
22649
22733
  const tasks = [];
22650
22734
  if (!skipGenerated) {
22651
22735
  tasks.push(removeIfExists(getFrameworkGeneratedDir(framework)));
@@ -22882,11 +22966,11 @@ __export(exports_scanVueSsrOnlyPages, {
22882
22966
  });
22883
22967
  import { readdirSync as readdirSync2, readFileSync as readFileSync17 } from "fs";
22884
22968
  import { join as join28 } from "path";
22885
- import ts7 from "typescript";
22886
- var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
22969
+ import ts8 from "typescript";
22970
+ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind3 = (filePath) => {
22887
22971
  if (filePath.endsWith(".tsx"))
22888
- return ts7.ScriptKind.TSX;
22889
- return ts7.ScriptKind.TS;
22972
+ return ts8.ScriptKind.TSX;
22973
+ return ts8.ScriptKind.TS;
22890
22974
  }, hasSourceExtension2 = (filePath) => {
22891
22975
  const idx = filePath.lastIndexOf(".");
22892
22976
  if (idx === -1)
@@ -22922,27 +23006,27 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
22922
23006
  }
22923
23007
  return out;
22924
23008
  }, fileMayContainVueHandler = (source) => source.includes("handleVuePageRequest"), isHandleVuePageRequestCallee = (expression) => {
22925
- if (ts7.isIdentifier(expression)) {
23009
+ if (ts8.isIdentifier(expression)) {
22926
23010
  return expression.text === "handleVuePageRequest";
22927
23011
  }
22928
- if (ts7.isPropertyAccessExpression(expression) && ts7.isIdentifier(expression.name)) {
23012
+ if (ts8.isPropertyAccessExpression(expression) && ts8.isIdentifier(expression.name)) {
22929
23013
  return expression.name.text === "handleVuePageRequest";
22930
23014
  }
22931
23015
  return false;
22932
23016
  }, getPropertyName = (name) => {
22933
- if (ts7.isIdentifier(name) || ts7.isStringLiteral(name)) {
23017
+ if (ts8.isIdentifier(name) || ts8.isStringLiteral(name)) {
22934
23018
  return name.text;
22935
23019
  }
22936
23020
  return null;
22937
23021
  }, readStringLiteralValue = (node) => {
22938
- if (ts7.isStringLiteral(node) || ts7.isNoSubstitutionTemplateLiteral(node)) {
23022
+ if (ts8.isStringLiteral(node) || ts8.isNoSubstitutionTemplateLiteral(node)) {
22939
23023
  return node.text;
22940
23024
  }
22941
23025
  return null;
22942
23026
  }, isAssetCall = (node) => {
22943
- if (!ts7.isCallExpression(node))
23027
+ if (!ts8.isCallExpression(node))
22944
23028
  return false;
22945
- if (!ts7.isIdentifier(node.expression))
23029
+ if (!ts8.isIdentifier(node.expression))
22946
23030
  return false;
22947
23031
  return node.expression.text === "asset";
22948
23032
  }, extractAssetLiteralKey = (call) => {
@@ -22955,14 +23039,14 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
22955
23039
  }, extractPagePathAssetKey = (initializer3) => {
22956
23040
  if (!isAssetCall(initializer3))
22957
23041
  return null;
22958
- if (!ts7.isCallExpression(initializer3))
23042
+ if (!ts8.isCallExpression(initializer3))
22959
23043
  return null;
22960
23044
  return extractAssetLiteralKey(initializer3);
22961
23045
  }, extractSsrOnlyPageName = (objectLiteral) => {
22962
23046
  let hasClientNone = false;
22963
23047
  let pageAssetKey = null;
22964
23048
  for (const property of objectLiteral.properties) {
22965
- if (!ts7.isPropertyAssignment(property))
23049
+ if (!ts8.isPropertyAssignment(property))
22966
23050
  continue;
22967
23051
  const name = getPropertyName(property.name);
22968
23052
  if (!name)
@@ -22989,19 +23073,19 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS2, getScriptKind2 = (filePath) => {
22989
23073
  }
22990
23074
  if (!fileMayContainVueHandler(source))
22991
23075
  return;
22992
- const sourceFile = ts7.createSourceFile(filePath, source, ts7.ScriptTarget.Latest, true, getScriptKind2(filePath));
23076
+ const sourceFile = ts8.createSourceFile(filePath, source, ts8.ScriptTarget.Latest, true, getScriptKind3(filePath));
22993
23077
  const visit = (node) => {
22994
- if (ts7.isCallExpression(node) && isHandleVuePageRequestCallee(node.expression)) {
23078
+ if (ts8.isCallExpression(node) && isHandleVuePageRequestCallee(node.expression)) {
22995
23079
  const firstArg = node.arguments[0];
22996
- if (firstArg && ts7.isObjectLiteralExpression(firstArg)) {
23080
+ if (firstArg && ts8.isObjectLiteralExpression(firstArg)) {
22997
23081
  const pageName = extractSsrOnlyPageName(firstArg);
22998
23082
  if (pageName)
22999
23083
  out.add(pageName);
23000
23084
  }
23001
23085
  }
23002
- ts7.forEachChild(node, visit);
23086
+ ts8.forEachChild(node, visit);
23003
23087
  };
23004
- ts7.forEachChild(sourceFile, visit);
23088
+ ts8.forEachChild(sourceFile, visit);
23005
23089
  }, scanVueSsrOnlyPages = (projectRoot) => {
23006
23090
  const files = collectSourceFiles2(projectRoot);
23007
23091
  const ssrOnlyPageNames = new Set;
@@ -23029,11 +23113,11 @@ var init_scanVueSsrOnlyPages = __esm(() => {
23029
23113
  // src/build/scanAngularHandlerCalls.ts
23030
23114
  import { readdirSync as readdirSync3, readFileSync as readFileSync18 } from "fs";
23031
23115
  import { join as join29 } from "path";
23032
- import ts8 from "typescript";
23033
- var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PREFIX = ".absolutejs-hmr-", getScriptKind3 = (filePath) => {
23116
+ import ts9 from "typescript";
23117
+ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PREFIX = ".absolutejs-hmr-", getScriptKind4 = (filePath) => {
23034
23118
  if (filePath.endsWith(".tsx"))
23035
- return ts8.ScriptKind.TSX;
23036
- return ts8.ScriptKind.TS;
23119
+ return ts9.ScriptKind.TSX;
23120
+ return ts9.ScriptKind.TS;
23037
23121
  }, hasSourceExtension3 = (filePath) => {
23038
23122
  const idx = filePath.lastIndexOf(".");
23039
23123
  if (idx === -1)
@@ -23069,25 +23153,25 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PRE
23069
23153
  }
23070
23154
  return out;
23071
23155
  }, fileMayContainAngularHandler = (source) => source.includes("handleAngularPageRequest"), extractManifestKey = (pagePathValue) => {
23072
- if (!ts8.isCallExpression(pagePathValue))
23156
+ if (!ts9.isCallExpression(pagePathValue))
23073
23157
  return null;
23074
23158
  const callee = pagePathValue.expression;
23075
- if (!ts8.isIdentifier(callee) || callee.text !== "asset")
23159
+ if (!ts9.isIdentifier(callee) || callee.text !== "asset")
23076
23160
  return null;
23077
23161
  const [, second] = pagePathValue.arguments;
23078
23162
  if (!second)
23079
23163
  return null;
23080
- if (!ts8.isStringLiteral(second))
23164
+ if (!ts9.isStringLiteral(second))
23081
23165
  return null;
23082
23166
  return second.text;
23083
23167
  }, findEnclosingMountPath = (node) => {
23084
23168
  let cursor = node.parent;
23085
23169
  while (cursor) {
23086
- if (ts8.isCallExpression(cursor)) {
23170
+ if (ts9.isCallExpression(cursor)) {
23087
23171
  const callee = cursor.expression;
23088
- if (ts8.isPropertyAccessExpression(callee) && ts8.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
23172
+ if (ts9.isPropertyAccessExpression(callee) && ts9.isIdentifier(callee.name) && ELYSIA_ROUTE_METHODS2.has(callee.name.text)) {
23089
23173
  const firstArg = cursor.arguments[0];
23090
- if (firstArg && ts8.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
23174
+ if (firstArg && ts9.isStringLiteral(firstArg) && firstArg.text.startsWith("/")) {
23091
23175
  return firstArg.text;
23092
23176
  }
23093
23177
  }
@@ -23104,27 +23188,27 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PRE
23104
23188
  }
23105
23189
  if (!fileMayContainAngularHandler(source))
23106
23190
  return;
23107
- const sf = ts8.createSourceFile(filePath, source, ts8.ScriptTarget.Latest, true, getScriptKind3(filePath));
23191
+ const sf = ts9.createSourceFile(filePath, source, ts9.ScriptTarget.Latest, true, getScriptKind4(filePath));
23108
23192
  const visit = (node) => {
23109
- if (ts8.isCallExpression(node) && ts8.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
23193
+ if (ts9.isCallExpression(node) && ts9.isIdentifier(node.expression) && node.expression.text === "handleAngularPageRequest") {
23110
23194
  const [arg] = node.arguments;
23111
- if (arg && ts8.isObjectLiteralExpression(arg)) {
23195
+ if (arg && ts9.isObjectLiteralExpression(arg)) {
23112
23196
  let manifestKey = null;
23113
23197
  for (const prop of arg.properties) {
23114
- if (ts8.isPropertyAssignment(prop)) {
23198
+ if (ts9.isPropertyAssignment(prop)) {
23115
23199
  if (!prop.name)
23116
23200
  continue;
23117
- const name = ts8.isIdentifier(prop.name) ? prop.name.text : ts8.isStringLiteral(prop.name) ? prop.name.text : null;
23201
+ const name = ts9.isIdentifier(prop.name) ? prop.name.text : ts9.isStringLiteral(prop.name) ? prop.name.text : null;
23118
23202
  if (name === "pagePath") {
23119
23203
  manifestKey = extractManifestKey(prop.initializer);
23120
23204
  }
23121
- } else if (ts8.isSpreadAssignment(prop)) {
23205
+ } else if (ts9.isSpreadAssignment(prop)) {
23122
23206
  if (manifestKey)
23123
23207
  continue;
23124
23208
  const spreadExpr = prop.expression;
23125
- if (ts8.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
23209
+ if (ts9.isCallExpression(spreadExpr) && spreadExpr.arguments.length > 0) {
23126
23210
  const [firstArg] = spreadExpr.arguments;
23127
- if (firstArg && ts8.isStringLiteral(firstArg)) {
23211
+ if (firstArg && ts9.isStringLiteral(firstArg)) {
23128
23212
  manifestKey = firstArg.text;
23129
23213
  }
23130
23214
  }
@@ -23139,9 +23223,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS3, SERVER_ENTRY_COPY_PRE
23139
23223
  }
23140
23224
  }
23141
23225
  }
23142
- ts8.forEachChild(node, visit);
23226
+ ts9.forEachChild(node, visit);
23143
23227
  };
23144
- ts8.forEachChild(sf, visit);
23228
+ ts9.forEachChild(sf, visit);
23145
23229
  }, scanAngularHandlerCalls = (projectRoot) => {
23146
23230
  const files = collectSourceFiles3(projectRoot);
23147
23231
  const collected = [];
@@ -23179,7 +23263,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
23179
23263
  // src/build/scanAngularPageRoutes.ts
23180
23264
  import { readdirSync as readdirSync4, readFileSync as readFileSync19 } from "fs";
23181
23265
  import { basename as basename9, join as join30 } from "path";
23182
- import ts9 from "typescript";
23266
+ import ts10 from "typescript";
23183
23267
  var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
23184
23268
  const idx = filePath.lastIndexOf(".");
23185
23269
  if (idx === -1)
@@ -23228,15 +23312,15 @@ var SOURCE_EXTENSIONS4, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
23228
23312
  }, hasTopLevelRoutesExport = (source, filePath) => {
23229
23313
  if (!source.includes("routes"))
23230
23314
  return false;
23231
- const sf = ts9.createSourceFile(filePath, source, ts9.ScriptTarget.Latest, true, ts9.ScriptKind.TS);
23315
+ const sf = ts10.createSourceFile(filePath, source, ts10.ScriptTarget.Latest, true, ts10.ScriptKind.TS);
23232
23316
  for (const statement of sf.statements) {
23233
- if (!ts9.isVariableStatement(statement))
23317
+ if (!ts10.isVariableStatement(statement))
23234
23318
  continue;
23235
- const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts9.SyntaxKind.ExportKeyword);
23319
+ const isExported = statement.modifiers?.some((modifier) => modifier.kind === ts10.SyntaxKind.ExportKeyword);
23236
23320
  if (!isExported)
23237
23321
  continue;
23238
23322
  for (const declaration of statement.declarationList.declarations) {
23239
- if (!ts9.isIdentifier(declaration.name))
23323
+ if (!ts10.isIdentifier(declaration.name))
23240
23324
  continue;
23241
23325
  if (declaration.name.text === "routes")
23242
23326
  return true;
@@ -23298,44 +23382,44 @@ __export(exports_parseAngularConfigImports, {
23298
23382
  });
23299
23383
  import { existsSync as existsSync23, readFileSync as readFileSync20 } from "fs";
23300
23384
  import { dirname as dirname15, isAbsolute as isAbsolute3, join as join31 } from "path";
23301
- import ts10 from "typescript";
23385
+ import ts11 from "typescript";
23302
23386
  var findDefineConfigCall = (sf) => {
23303
23387
  let result = null;
23304
23388
  const visit = (node) => {
23305
23389
  if (result)
23306
23390
  return;
23307
- if (ts10.isCallExpression(node) && ts10.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
23391
+ if (ts11.isCallExpression(node) && ts11.isIdentifier(node.expression) && node.expression.text === "defineConfig") {
23308
23392
  const [arg] = node.arguments;
23309
- if (arg && ts10.isObjectLiteralExpression(arg)) {
23393
+ if (arg && ts11.isObjectLiteralExpression(arg)) {
23310
23394
  result = arg;
23311
23395
  return;
23312
23396
  }
23313
23397
  }
23314
- ts10.forEachChild(node, visit);
23398
+ ts11.forEachChild(node, visit);
23315
23399
  };
23316
- ts10.forEachChild(sf, visit);
23400
+ ts11.forEachChild(sf, visit);
23317
23401
  return result;
23318
23402
  }, findPropertyInitializer = (object, name) => {
23319
23403
  for (const prop of object.properties) {
23320
- if (!ts10.isPropertyAssignment(prop))
23404
+ if (!ts11.isPropertyAssignment(prop))
23321
23405
  continue;
23322
23406
  if (!prop.name)
23323
23407
  continue;
23324
- const key = ts10.isIdentifier(prop.name) ? prop.name.text : ts10.isStringLiteral(prop.name) ? prop.name.text : null;
23408
+ const key = ts11.isIdentifier(prop.name) ? prop.name.text : ts11.isStringLiteral(prop.name) ? prop.name.text : null;
23325
23409
  if (key === name)
23326
23410
  return prop.initializer;
23327
23411
  }
23328
23412
  return null;
23329
23413
  }, findImportForBinding = (sf, binding) => {
23330
23414
  for (const statement of sf.statements) {
23331
- if (!ts10.isImportDeclaration(statement))
23415
+ if (!ts11.isImportDeclaration(statement))
23332
23416
  continue;
23333
- if (!ts10.isStringLiteral(statement.moduleSpecifier))
23417
+ if (!ts11.isStringLiteral(statement.moduleSpecifier))
23334
23418
  continue;
23335
23419
  if (statement.importClause?.isTypeOnly)
23336
23420
  continue;
23337
23421
  const named = statement.importClause?.namedBindings;
23338
- if (!named || !ts10.isNamedImports(named))
23422
+ if (!named || !ts11.isNamedImports(named))
23339
23423
  continue;
23340
23424
  for (const element of named.elements) {
23341
23425
  if (element.isTypeOnly)
@@ -23376,17 +23460,17 @@ var findDefineConfigCall = (sf) => {
23376
23460
  return null;
23377
23461
  if (!source.includes("providers"))
23378
23462
  return null;
23379
- const sf = ts10.createSourceFile(configPath2, source, ts10.ScriptTarget.Latest, true, ts10.ScriptKind.TS);
23463
+ const sf = ts11.createSourceFile(configPath2, source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
23380
23464
  const configObject = findDefineConfigCall(sf);
23381
23465
  if (!configObject)
23382
23466
  return null;
23383
23467
  const angularField = findPropertyInitializer(configObject, "angular");
23384
- if (!angularField || !ts10.isObjectLiteralExpression(angularField))
23468
+ if (!angularField || !ts11.isObjectLiteralExpression(angularField))
23385
23469
  return null;
23386
23470
  const providersField = findPropertyInitializer(angularField, "providers");
23387
23471
  if (!providersField)
23388
23472
  return null;
23389
- if (!ts10.isIdentifier(providersField))
23473
+ if (!ts11.isIdentifier(providersField))
23390
23474
  return null;
23391
23475
  const binding = providersField.text;
23392
23476
  const importInfo = findImportForBinding(sf, binding);
@@ -23470,7 +23554,7 @@ import {
23470
23554
  dirname as dirname16,
23471
23555
  join as join32,
23472
23556
  basename as basename10,
23473
- extname as extname6,
23557
+ extname as extname7,
23474
23558
  resolve as resolve23,
23475
23559
  relative as relative11,
23476
23560
  sep as sep2
@@ -23719,7 +23803,7 @@ var resolveDevClientDir2 = () => {
23719
23803
  const componentRoots = roots.filter((root) => !root.isModule);
23720
23804
  await Promise.all(componentRoots.map(async ({ client: client2, hasAwaitSlot }) => {
23721
23805
  const relClientDir = dirname16(relative11(clientDir, client2));
23722
- const name = basename10(client2, extname6(client2));
23806
+ const name = basename10(client2, extname7(client2));
23723
23807
  const indexPath = join32(indexDir, relClientDir, `${name}.js`);
23724
23808
  const importRaw = relative11(dirname16(indexPath), client2).split(sep2).join("/");
23725
23809
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
@@ -23829,27 +23913,27 @@ var init_compileSvelte = __esm(() => {
23829
23913
  });
23830
23914
 
23831
23915
  // src/build/parseVueSpaRoutes.ts
23832
- import ts11 from "typescript";
23833
- var propertyName = (node) => ts11.isIdentifier(node) || ts11.isStringLiteralLike(node) ? node.text : null, stringValue = (node) => ts11.isStringLiteralLike(node) ? node.text : null, findVueImport = (node) => {
23834
- if (ts11.isCallExpression(node) && node.expression.kind === ts11.SyntaxKind.ImportKeyword) {
23916
+ import ts12 from "typescript";
23917
+ var propertyName = (node) => ts12.isIdentifier(node) || ts12.isStringLiteralLike(node) ? node.text : null, stringValue = (node) => ts12.isStringLiteralLike(node) ? node.text : null, findVueImport = (node) => {
23918
+ if (ts12.isCallExpression(node) && node.expression.kind === ts12.SyntaxKind.ImportKeyword) {
23835
23919
  const [specifier] = node.arguments;
23836
- if (specifier && ts11.isStringLiteralLike(specifier)) {
23920
+ if (specifier && ts12.isStringLiteralLike(specifier)) {
23837
23921
  return specifier.text.endsWith(".vue") ? specifier.text : null;
23838
23922
  }
23839
23923
  }
23840
23924
  let found = null;
23841
- ts11.forEachChild(node, (child) => {
23925
+ ts12.forEachChild(node, (child) => {
23842
23926
  if (found === null)
23843
23927
  found = findVueImport(child);
23844
23928
  });
23845
23929
  return found;
23846
23930
  }, parseRoute = (node) => {
23847
- if (!ts11.isObjectLiteralExpression(node))
23931
+ if (!ts12.isObjectLiteralExpression(node))
23848
23932
  return null;
23849
23933
  let path = null;
23850
23934
  let importPath = null;
23851
23935
  for (const property of node.properties) {
23852
- if (!ts11.isPropertyAssignment(property))
23936
+ if (!ts12.isPropertyAssignment(property))
23853
23937
  continue;
23854
23938
  const name = propertyName(property.name);
23855
23939
  if (name === "path")
@@ -23859,12 +23943,12 @@ var propertyName = (node) => ts11.isIdentifier(node) || ts11.isStringLiteralLike
23859
23943
  }
23860
23944
  return path && importPath ? { importPath, path } : null;
23861
23945
  }, parseVueSpaRoutes = (source) => {
23862
- const sourceFile = ts11.createSourceFile("absolute-vue-routes.ts", source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
23946
+ const sourceFile = ts12.createSourceFile("absolute-vue-routes.ts", source, ts12.ScriptTarget.Latest, true, ts12.ScriptKind.TS);
23863
23947
  const entries = [];
23864
23948
  const visit = (node) => {
23865
- if (ts11.isCallExpression(node) && ts11.isIdentifier(node.expression) && node.expression.text === "defineRoutes") {
23949
+ if (ts12.isCallExpression(node) && ts12.isIdentifier(node.expression) && node.expression.text === "defineRoutes") {
23866
23950
  const [routes] = node.arguments;
23867
- if (routes && ts11.isArrayLiteralExpression(routes)) {
23951
+ if (routes && ts12.isArrayLiteralExpression(routes)) {
23868
23952
  for (const element of routes.elements) {
23869
23953
  const route = parseRoute(element);
23870
23954
  if (route)
@@ -23872,9 +23956,9 @@ var propertyName = (node) => ts11.isIdentifier(node) || ts11.isStringLiteralLike
23872
23956
  }
23873
23957
  }
23874
23958
  }
23875
- ts11.forEachChild(node, visit);
23959
+ ts12.forEachChild(node, visit);
23876
23960
  };
23877
- ts11.forEachChild(sourceFile, visit);
23961
+ ts12.forEachChild(sourceFile, visit);
23878
23962
  return entries;
23879
23963
  };
23880
23964
  var init_parseVueSpaRoutes = () => {};
@@ -25364,14 +25448,14 @@ __export(exports_compileAngular, {
25364
25448
  import { existsSync as existsSync26, readFileSync as readFileSync23, promises as fs5 } from "fs";
25365
25449
  import { join as join34, basename as basename12, sep as sep3, dirname as dirname18, resolve as resolve25, relative as relative13 } from "path";
25366
25450
  var {Glob: Glob6 } = globalThis.Bun;
25367
- import ts12 from "typescript";
25451
+ import ts13 from "typescript";
25368
25452
  var traceAngularPhase = async (name, fn2, metadata2) => {
25369
25453
  const tracePhase = globalThis.__absoluteBuildTracePhase;
25370
25454
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata2) : await fn2();
25371
25455
  }, readTsconfigPathAliases = () => {
25372
25456
  try {
25373
25457
  const configPath2 = resolve25(process.cwd(), "tsconfig.json");
25374
- const config2 = ts12.readConfigFile(configPath2, ts12.sys.readFile).config;
25458
+ const config2 = ts13.readConfigFile(configPath2, ts13.sys.readFile).config;
25375
25459
  const compilerOptions = config2?.compilerOptions ?? {};
25376
25460
  const baseUrl = resolve25(process.cwd(), compilerOptions.baseUrl ?? ".");
25377
25461
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
@@ -25500,7 +25584,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25500
25584
  return resolve25(import.meta.dir, "./dev/client");
25501
25585
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
25502
25586
  try {
25503
- return ts12.flattenDiagnosticMessageText(diagnostic.messageText, `
25587
+ return ts13.flattenDiagnosticMessageText(diagnostic.messageText, `
25504
25588
  `);
25505
25589
  } catch {
25506
25590
  return String(diagnostic.messageText || "Unknown error");
@@ -25508,7 +25592,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25508
25592
  }, throwOnCompilationErrors = (diagnostics) => {
25509
25593
  if (!diagnostics?.length)
25510
25594
  return;
25511
- const errors = diagnostics.filter((diag) => diag.category === ts12.DiagnosticCategory.Error);
25595
+ const errors = diagnostics.filter((diag) => diag.category === ts13.DiagnosticCategory.Error);
25512
25596
  if (!errors.length)
25513
25597
  return;
25514
25598
  const fullMessage = errors.map(formatDiagnosticMessage).join(`
@@ -25550,22 +25634,22 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25550
25634
  }
25551
25635
  return `${path}.js${query}`;
25552
25636
  }, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
25553
- const sourceFile = ts12.createSourceFile(fileName, source, ts12.ScriptTarget.Latest, true, ts12.ScriptKind.TS);
25637
+ const sourceFile = ts13.createSourceFile(fileName, source, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.TS);
25554
25638
  const specifiers = [];
25555
25639
  const addSpecifier = (node) => {
25556
- if (!node || !ts12.isStringLiteralLike(node))
25640
+ if (!node || !ts13.isStringLiteralLike(node))
25557
25641
  return;
25558
25642
  const specifier = node.text;
25559
25643
  if (isRelativeModuleSpecifier(specifier))
25560
25644
  specifiers.push(specifier);
25561
25645
  };
25562
25646
  const visit = (node) => {
25563
- if (ts12.isImportDeclaration(node) || ts12.isExportDeclaration(node)) {
25647
+ if (ts13.isImportDeclaration(node) || ts13.isExportDeclaration(node)) {
25564
25648
  addSpecifier(node.moduleSpecifier);
25565
- } else if (ts12.isCallExpression(node) && node.expression.kind === ts12.SyntaxKind.ImportKeyword) {
25649
+ } else if (ts13.isCallExpression(node) && node.expression.kind === ts13.SyntaxKind.ImportKeyword) {
25566
25650
  addSpecifier(node.arguments[0]);
25567
25651
  }
25568
- ts12.forEachChild(node, visit);
25652
+ ts13.forEachChild(node, visit);
25569
25653
  };
25570
25654
  visit(sourceFile);
25571
25655
  return specifiers;
@@ -25713,25 +25797,25 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25713
25797
  emitDecoratorMetadata: true,
25714
25798
  esModuleInterop: true,
25715
25799
  experimentalDecorators: true,
25716
- module: ts12.ModuleKind.ESNext,
25717
- moduleResolution: ts12.ModuleResolutionKind.Bundler,
25718
- newLine: ts12.NewLineKind.LineFeed,
25800
+ module: ts13.ModuleKind.ESNext,
25801
+ moduleResolution: ts13.ModuleResolutionKind.Bundler,
25802
+ newLine: ts13.NewLineKind.LineFeed,
25719
25803
  noLib: false,
25720
25804
  outDir,
25721
25805
  skipLibCheck: true,
25722
- target: ts12.ScriptTarget.ES2022,
25806
+ target: ts13.ScriptTarget.ES2022,
25723
25807
  ...config2.options
25724
25808
  };
25725
- options.target = ts12.ScriptTarget.ES2022;
25809
+ options.target = ts13.ScriptTarget.ES2022;
25726
25810
  options.experimentalDecorators = true;
25727
25811
  options.emitDecoratorMetadata = true;
25728
- options.newLine = ts12.NewLineKind.LineFeed;
25812
+ options.newLine = ts13.NewLineKind.LineFeed;
25729
25813
  options.outDir = outDir;
25730
25814
  options.noEmit = false;
25731
25815
  options.incremental = false;
25732
25816
  options.tsBuildInfoFile = undefined;
25733
25817
  options.rootDir = process.cwd();
25734
- const host = await traceAngularPhase("aot/create-compiler-host", () => ts12.createCompilerHost(options));
25818
+ const host = await traceAngularPhase("aot/create-compiler-host", () => ts13.createCompilerHost(options));
25735
25819
  const originalGetDefaultLibLocation = host.getDefaultLibLocation;
25736
25820
  host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
25737
25821
  const originalGetDefaultLibFileName = host.getDefaultLibFileName;
@@ -25777,7 +25861,7 @@ var traceAngularPhase = async (name, fn2, metadata2) => {
25777
25861
  host.getSourceFile = (fileName, languageVersion, onError) => {
25778
25862
  const source = transformedSources.get(resolve25(fileName));
25779
25863
  if (source) {
25780
- return ts12.createSourceFile(fileName, source, languageVersion, true);
25864
+ return ts13.createSourceFile(fileName, source, languageVersion, true);
25781
25865
  }
25782
25866
  return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
25783
25867
  };
@@ -26675,18 +26759,18 @@ var init_compileAngular = __esm(() => {
26675
26759
  });
26676
26760
 
26677
26761
  // src/dev/angular/hmrImportGenerator.ts
26678
- import ts13 from "typescript";
26762
+ import ts14 from "typescript";
26679
26763
  var createHmrImportGenerator = (namespaceMap) => ({
26680
26764
  addImport(request) {
26681
26765
  const namespace = namespaceMap.get(request.exportModuleSpecifier);
26682
26766
  if (!namespace) {
26683
26767
  throw new Error(`HMR import generator has no namespace mapping for ${request.exportModuleSpecifier}. ` + `Add it to namespaceDependencies before calling compileHmrUpdateCallback.`);
26684
26768
  }
26685
- const namespaceId = ts13.factory.createIdentifier(namespace);
26769
+ const namespaceId = ts14.factory.createIdentifier(namespace);
26686
26770
  if (request.exportSymbolName === null) {
26687
26771
  return namespaceId;
26688
26772
  }
26689
- return ts13.factory.createPropertyAccessExpression(namespaceId, ts13.factory.createIdentifier(request.exportSymbolName));
26773
+ return ts14.factory.createPropertyAccessExpression(namespaceId, ts14.factory.createIdentifier(request.exportSymbolName));
26690
26774
  }
26691
26775
  });
26692
26776
  var init_hmrImportGenerator = () => {};
@@ -27059,13 +27143,13 @@ var init_translator = __esm(() => {
27059
27143
  });
27060
27144
 
27061
27145
  // src/dev/angular/vendor/translator/ts_util.ts
27062
- import ts14 from "typescript";
27146
+ import ts15 from "typescript";
27063
27147
  function tsNumericExpression(value) {
27064
27148
  if (value < 0) {
27065
- const operand = ts14.factory.createNumericLiteral(Math.abs(value));
27066
- return ts14.factory.createPrefixUnaryExpression(ts14.SyntaxKind.MinusToken, operand);
27149
+ const operand = ts15.factory.createNumericLiteral(Math.abs(value));
27150
+ return ts15.factory.createPrefixUnaryExpression(ts15.SyntaxKind.MinusToken, operand);
27067
27151
  }
27068
- return ts14.factory.createNumericLiteral(value);
27152
+ return ts15.factory.createNumericLiteral(value);
27069
27153
  }
27070
27154
  var init_ts_util = __esm(() => {
27071
27155
  /*!
@@ -27078,142 +27162,142 @@ var init_ts_util = __esm(() => {
27078
27162
  });
27079
27163
 
27080
27164
  // src/dev/angular/vendor/translator/typescript_ast_factory.ts
27081
- import ts15 from "typescript";
27165
+ import ts16 from "typescript";
27082
27166
 
27083
27167
  class TypeScriptAstFactory {
27084
27168
  annotateForClosureCompiler;
27085
27169
  externalSourceFiles = new Map;
27086
27170
  UNARY_OPERATORS = /* @__PURE__ */ (() => ({
27087
- "+": ts15.SyntaxKind.PlusToken,
27088
- "-": ts15.SyntaxKind.MinusToken,
27089
- "!": ts15.SyntaxKind.ExclamationToken
27171
+ "+": ts16.SyntaxKind.PlusToken,
27172
+ "-": ts16.SyntaxKind.MinusToken,
27173
+ "!": ts16.SyntaxKind.ExclamationToken
27090
27174
  }))();
27091
27175
  BINARY_OPERATORS = /* @__PURE__ */ (() => ({
27092
- "&&": ts15.SyntaxKind.AmpersandAmpersandToken,
27093
- ">": ts15.SyntaxKind.GreaterThanToken,
27094
- ">=": ts15.SyntaxKind.GreaterThanEqualsToken,
27095
- "&": ts15.SyntaxKind.AmpersandToken,
27096
- "|": ts15.SyntaxKind.BarToken,
27097
- "/": ts15.SyntaxKind.SlashToken,
27098
- "==": ts15.SyntaxKind.EqualsEqualsToken,
27099
- "===": ts15.SyntaxKind.EqualsEqualsEqualsToken,
27100
- "<": ts15.SyntaxKind.LessThanToken,
27101
- "<=": ts15.SyntaxKind.LessThanEqualsToken,
27102
- "-": ts15.SyntaxKind.MinusToken,
27103
- "%": ts15.SyntaxKind.PercentToken,
27104
- "*": ts15.SyntaxKind.AsteriskToken,
27105
- "**": ts15.SyntaxKind.AsteriskAsteriskToken,
27106
- "!=": ts15.SyntaxKind.ExclamationEqualsToken,
27107
- "!==": ts15.SyntaxKind.ExclamationEqualsEqualsToken,
27108
- "||": ts15.SyntaxKind.BarBarToken,
27109
- "+": ts15.SyntaxKind.PlusToken,
27110
- "??": ts15.SyntaxKind.QuestionQuestionToken,
27111
- "=": ts15.SyntaxKind.EqualsToken,
27112
- "+=": ts15.SyntaxKind.PlusEqualsToken,
27113
- "-=": ts15.SyntaxKind.MinusEqualsToken,
27114
- "*=": ts15.SyntaxKind.AsteriskEqualsToken,
27115
- "/=": ts15.SyntaxKind.SlashEqualsToken,
27116
- "%=": ts15.SyntaxKind.PercentEqualsToken,
27117
- "**=": ts15.SyntaxKind.AsteriskAsteriskEqualsToken,
27118
- "&&=": ts15.SyntaxKind.AmpersandAmpersandEqualsToken,
27119
- "||=": ts15.SyntaxKind.BarBarEqualsToken,
27120
- "??=": ts15.SyntaxKind.QuestionQuestionEqualsToken,
27121
- in: ts15.SyntaxKind.InKeyword,
27122
- instanceof: ts15.SyntaxKind.InstanceOfKeyword
27176
+ "&&": ts16.SyntaxKind.AmpersandAmpersandToken,
27177
+ ">": ts16.SyntaxKind.GreaterThanToken,
27178
+ ">=": ts16.SyntaxKind.GreaterThanEqualsToken,
27179
+ "&": ts16.SyntaxKind.AmpersandToken,
27180
+ "|": ts16.SyntaxKind.BarToken,
27181
+ "/": ts16.SyntaxKind.SlashToken,
27182
+ "==": ts16.SyntaxKind.EqualsEqualsToken,
27183
+ "===": ts16.SyntaxKind.EqualsEqualsEqualsToken,
27184
+ "<": ts16.SyntaxKind.LessThanToken,
27185
+ "<=": ts16.SyntaxKind.LessThanEqualsToken,
27186
+ "-": ts16.SyntaxKind.MinusToken,
27187
+ "%": ts16.SyntaxKind.PercentToken,
27188
+ "*": ts16.SyntaxKind.AsteriskToken,
27189
+ "**": ts16.SyntaxKind.AsteriskAsteriskToken,
27190
+ "!=": ts16.SyntaxKind.ExclamationEqualsToken,
27191
+ "!==": ts16.SyntaxKind.ExclamationEqualsEqualsToken,
27192
+ "||": ts16.SyntaxKind.BarBarToken,
27193
+ "+": ts16.SyntaxKind.PlusToken,
27194
+ "??": ts16.SyntaxKind.QuestionQuestionToken,
27195
+ "=": ts16.SyntaxKind.EqualsToken,
27196
+ "+=": ts16.SyntaxKind.PlusEqualsToken,
27197
+ "-=": ts16.SyntaxKind.MinusEqualsToken,
27198
+ "*=": ts16.SyntaxKind.AsteriskEqualsToken,
27199
+ "/=": ts16.SyntaxKind.SlashEqualsToken,
27200
+ "%=": ts16.SyntaxKind.PercentEqualsToken,
27201
+ "**=": ts16.SyntaxKind.AsteriskAsteriskEqualsToken,
27202
+ "&&=": ts16.SyntaxKind.AmpersandAmpersandEqualsToken,
27203
+ "||=": ts16.SyntaxKind.BarBarEqualsToken,
27204
+ "??=": ts16.SyntaxKind.QuestionQuestionEqualsToken,
27205
+ in: ts16.SyntaxKind.InKeyword,
27206
+ instanceof: ts16.SyntaxKind.InstanceOfKeyword
27123
27207
  }))();
27124
27208
  VAR_TYPES = /* @__PURE__ */ (() => ({
27125
- const: ts15.NodeFlags.Const,
27126
- let: ts15.NodeFlags.Let,
27127
- var: ts15.NodeFlags.None
27209
+ const: ts16.NodeFlags.Const,
27210
+ let: ts16.NodeFlags.Let,
27211
+ var: ts16.NodeFlags.None
27128
27212
  }))();
27129
27213
  constructor(annotateForClosureCompiler) {
27130
27214
  this.annotateForClosureCompiler = annotateForClosureCompiler;
27131
27215
  }
27132
27216
  attachComments = attachComments;
27133
- createArrayLiteral = ts15.factory.createArrayLiteralExpression;
27217
+ createArrayLiteral = ts16.factory.createArrayLiteralExpression;
27134
27218
  createAssignment(target, operator, value) {
27135
- return ts15.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
27219
+ return ts16.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
27136
27220
  }
27137
27221
  createBinaryExpression(leftOperand, operator, rightOperand) {
27138
- return ts15.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
27222
+ return ts16.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
27139
27223
  }
27140
27224
  createBlock(body) {
27141
- return ts15.factory.createBlock(body);
27225
+ return ts16.factory.createBlock(body);
27142
27226
  }
27143
27227
  createCallExpression(callee, args, pure) {
27144
- const call = ts15.factory.createCallExpression(callee, undefined, args);
27228
+ const call = ts16.factory.createCallExpression(callee, undefined, args);
27145
27229
  if (pure) {
27146
- ts15.addSyntheticLeadingComment(call, ts15.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
27230
+ ts16.addSyntheticLeadingComment(call, ts16.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
27147
27231
  }
27148
27232
  return call;
27149
27233
  }
27150
27234
  createConditional(condition, whenTrue, whenFalse) {
27151
- return ts15.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
27235
+ return ts16.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
27152
27236
  }
27153
- createElementAccess = ts15.factory.createElementAccessExpression;
27154
- createExpressionStatement = ts15.factory.createExpressionStatement;
27237
+ createElementAccess = ts16.factory.createElementAccessExpression;
27238
+ createExpressionStatement = ts16.factory.createExpressionStatement;
27155
27239
  createDynamicImport(url2) {
27156
- return ts15.factory.createCallExpression(ts15.factory.createToken(ts15.SyntaxKind.ImportKeyword), undefined, [
27157
- typeof url2 === "string" ? ts15.factory.createStringLiteral(url2) : url2
27240
+ return ts16.factory.createCallExpression(ts16.factory.createToken(ts16.SyntaxKind.ImportKeyword), undefined, [
27241
+ typeof url2 === "string" ? ts16.factory.createStringLiteral(url2) : url2
27158
27242
  ]);
27159
27243
  }
27160
27244
  createFunctionDeclaration(functionName, parameters, body) {
27161
- if (!ts15.isBlock(body)) {
27162
- throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27245
+ if (!ts16.isBlock(body)) {
27246
+ throw new Error(`Invalid syntax, expected a block, but got ${ts16.SyntaxKind[body.kind]}.`);
27163
27247
  }
27164
- return ts15.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27248
+ return ts16.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27165
27249
  }
27166
27250
  createFunctionExpression(functionName, parameters, body) {
27167
- if (!ts15.isBlock(body)) {
27168
- throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27251
+ if (!ts16.isBlock(body)) {
27252
+ throw new Error(`Invalid syntax, expected a block, but got ${ts16.SyntaxKind[body.kind]}.`);
27169
27253
  }
27170
- return ts15.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27254
+ return ts16.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
27171
27255
  }
27172
27256
  createArrowFunctionExpression(parameters, body) {
27173
- if (ts15.isStatement(body) && !ts15.isBlock(body)) {
27174
- throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
27257
+ if (ts16.isStatement(body) && !ts16.isBlock(body)) {
27258
+ throw new Error(`Invalid syntax, expected a block, but got ${ts16.SyntaxKind[body.kind]}.`);
27175
27259
  }
27176
- return ts15.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
27260
+ return ts16.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
27177
27261
  }
27178
27262
  createParameter(param) {
27179
- return ts15.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
27263
+ return ts16.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
27180
27264
  }
27181
- createIdentifier = ts15.factory.createIdentifier;
27265
+ createIdentifier = ts16.factory.createIdentifier;
27182
27266
  createIfStatement(condition, thenStatement, elseStatement) {
27183
- return ts15.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
27267
+ return ts16.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
27184
27268
  }
27185
27269
  createLiteral(value) {
27186
27270
  if (value === undefined) {
27187
- return ts15.factory.createIdentifier("undefined");
27271
+ return ts16.factory.createIdentifier("undefined");
27188
27272
  } else if (value === null) {
27189
- return ts15.factory.createNull();
27273
+ return ts16.factory.createNull();
27190
27274
  } else if (typeof value === "boolean") {
27191
- return value ? ts15.factory.createTrue() : ts15.factory.createFalse();
27275
+ return value ? ts16.factory.createTrue() : ts16.factory.createFalse();
27192
27276
  } else if (typeof value === "number") {
27193
27277
  return tsNumericExpression(value);
27194
27278
  } else {
27195
- return ts15.factory.createStringLiteral(value);
27279
+ return ts16.factory.createStringLiteral(value);
27196
27280
  }
27197
27281
  }
27198
27282
  createNewExpression(expression, args) {
27199
- return ts15.factory.createNewExpression(expression, undefined, args);
27283
+ return ts16.factory.createNewExpression(expression, undefined, args);
27200
27284
  }
27201
27285
  createObjectLiteral(properties) {
27202
- return ts15.factory.createObjectLiteralExpression(properties.map((prop) => {
27286
+ return ts16.factory.createObjectLiteralExpression(properties.map((prop) => {
27203
27287
  if (prop.kind === "spread") {
27204
- return ts15.factory.createSpreadAssignment(prop.expression);
27288
+ return ts16.factory.createSpreadAssignment(prop.expression);
27205
27289
  }
27206
- return ts15.factory.createPropertyAssignment(prop.quoted ? ts15.factory.createStringLiteral(prop.propertyName) : ts15.factory.createIdentifier(prop.propertyName), prop.value);
27290
+ return ts16.factory.createPropertyAssignment(prop.quoted ? ts16.factory.createStringLiteral(prop.propertyName) : ts16.factory.createIdentifier(prop.propertyName), prop.value);
27207
27291
  }));
27208
27292
  }
27209
- createParenthesizedExpression = ts15.factory.createParenthesizedExpression;
27210
- createPropertyAccess = ts15.factory.createPropertyAccessExpression;
27211
- createSpreadElement = ts15.factory.createSpreadElement;
27293
+ createParenthesizedExpression = ts16.factory.createParenthesizedExpression;
27294
+ createPropertyAccess = ts16.factory.createPropertyAccessExpression;
27295
+ createSpreadElement = ts16.factory.createSpreadElement;
27212
27296
  createReturnStatement(expression) {
27213
- return ts15.factory.createReturnStatement(expression ?? undefined);
27297
+ return ts16.factory.createReturnStatement(expression ?? undefined);
27214
27298
  }
27215
27299
  createTaggedTemplate(tag, template) {
27216
- return ts15.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
27300
+ return ts16.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
27217
27301
  }
27218
27302
  createTemplateLiteral(template) {
27219
27303
  let templateLiteral;
@@ -27223,7 +27307,7 @@ class TypeScriptAstFactory {
27223
27307
  throw new Error("createTemplateLiteral: template has no elements");
27224
27308
  }
27225
27309
  if (length === 1) {
27226
- templateLiteral = ts15.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
27310
+ templateLiteral = ts16.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
27227
27311
  } else {
27228
27312
  const spans = [];
27229
27313
  for (let i = 1;i < length - 1; i++) {
@@ -27237,7 +27321,7 @@ class TypeScriptAstFactory {
27237
27321
  if (range !== null) {
27238
27322
  this.setSourceMapRange(middle, range);
27239
27323
  }
27240
- spans.push(ts15.factory.createTemplateSpan(expression, middle));
27324
+ spans.push(ts16.factory.createTemplateSpan(expression, middle));
27241
27325
  }
27242
27326
  const resolvedExpression = template.expressions[length - 2];
27243
27327
  const templatePart = template.elements[length - 1];
@@ -27248,27 +27332,27 @@ class TypeScriptAstFactory {
27248
27332
  if (templatePart.range !== null) {
27249
27333
  this.setSourceMapRange(templateTail, templatePart.range);
27250
27334
  }
27251
- spans.push(ts15.factory.createTemplateSpan(resolvedExpression, templateTail));
27252
- templateLiteral = ts15.factory.createTemplateExpression(ts15.factory.createTemplateHead(head.cooked, head.raw), spans);
27335
+ spans.push(ts16.factory.createTemplateSpan(resolvedExpression, templateTail));
27336
+ templateLiteral = ts16.factory.createTemplateExpression(ts16.factory.createTemplateHead(head.cooked, head.raw), spans);
27253
27337
  }
27254
27338
  if (head.range !== null) {
27255
27339
  this.setSourceMapRange(templateLiteral, head.range);
27256
27340
  }
27257
27341
  return templateLiteral;
27258
27342
  }
27259
- createThrowStatement = ts15.factory.createThrowStatement;
27260
- createTypeOfExpression = ts15.factory.createTypeOfExpression;
27261
- createVoidExpression = ts15.factory.createVoidExpression;
27343
+ createThrowStatement = ts16.factory.createThrowStatement;
27344
+ createTypeOfExpression = ts16.factory.createTypeOfExpression;
27345
+ createVoidExpression = ts16.factory.createVoidExpression;
27262
27346
  createUnaryExpression(operator, operand) {
27263
- return ts15.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
27347
+ return ts16.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
27264
27348
  }
27265
27349
  createVariableDeclaration(variableName, initializer3, variableType, type) {
27266
- return ts15.factory.createVariableStatement(undefined, ts15.factory.createVariableDeclarationList([
27267
- ts15.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer3 ?? undefined)
27350
+ return ts16.factory.createVariableStatement(undefined, ts16.factory.createVariableDeclarationList([
27351
+ ts16.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer3 ?? undefined)
27268
27352
  ], this.VAR_TYPES[variableType]));
27269
27353
  }
27270
27354
  createRegularExpressionLiteral(body, flags) {
27271
- return ts15.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
27355
+ return ts16.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
27272
27356
  }
27273
27357
  setSourceMapRange(node, sourceMapRange) {
27274
27358
  if (sourceMapRange === null) {
@@ -27276,10 +27360,10 @@ class TypeScriptAstFactory {
27276
27360
  }
27277
27361
  const url2 = sourceMapRange.url;
27278
27362
  if (!this.externalSourceFiles.has(url2)) {
27279
- this.externalSourceFiles.set(url2, ts15.createSourceMapSource(url2, sourceMapRange.content, (pos) => pos));
27363
+ this.externalSourceFiles.set(url2, ts16.createSourceMapSource(url2, sourceMapRange.content, (pos) => pos));
27280
27364
  }
27281
27365
  const source = this.externalSourceFiles.get(url2);
27282
- ts15.setSourceMapRange(node, {
27366
+ ts16.setSourceMapRange(node, {
27283
27367
  pos: sourceMapRange.start.offset,
27284
27368
  end: sourceMapRange.end.offset,
27285
27369
  source
@@ -27289,77 +27373,77 @@ class TypeScriptAstFactory {
27289
27373
  createBuiltInType(type) {
27290
27374
  switch (type) {
27291
27375
  case "any":
27292
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.AnyKeyword);
27376
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.AnyKeyword);
27293
27377
  case "boolean":
27294
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.BooleanKeyword);
27378
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.BooleanKeyword);
27295
27379
  case "number":
27296
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NumberKeyword);
27380
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.NumberKeyword);
27297
27381
  case "string":
27298
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword);
27382
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.StringKeyword);
27299
27383
  case "function":
27300
- return ts15.factory.createTypeReferenceNode(ts15.factory.createIdentifier("Function"));
27384
+ return ts16.factory.createTypeReferenceNode(ts16.factory.createIdentifier("Function"));
27301
27385
  case "never":
27302
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NeverKeyword);
27386
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.NeverKeyword);
27303
27387
  case "unknown":
27304
- return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.UnknownKeyword);
27388
+ return ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.UnknownKeyword);
27305
27389
  }
27306
27390
  }
27307
27391
  createExpressionType(expression, typeParams) {
27308
27392
  const typeName = getEntityTypeFromExpression(expression);
27309
- return ts15.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
27393
+ return ts16.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
27310
27394
  }
27311
27395
  createArrayType(elementType) {
27312
- return ts15.factory.createArrayTypeNode(elementType);
27396
+ return ts16.factory.createArrayTypeNode(elementType);
27313
27397
  }
27314
27398
  createMapType(valueType) {
27315
- return ts15.factory.createTypeLiteralNode([
27316
- ts15.factory.createIndexSignature(undefined, [
27317
- ts15.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword))
27399
+ return ts16.factory.createTypeLiteralNode([
27400
+ ts16.factory.createIndexSignature(undefined, [
27401
+ ts16.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts16.factory.createKeywordTypeNode(ts16.SyntaxKind.StringKeyword))
27318
27402
  ], valueType)
27319
27403
  ]);
27320
27404
  }
27321
27405
  transplantType(type) {
27322
- if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts15.isTypeNode(type)) {
27406
+ if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts16.isTypeNode(type)) {
27323
27407
  return type;
27324
27408
  }
27325
27409
  throw new Error("Attempting to transplant a type node from a non-TypeScript AST: " + type);
27326
27410
  }
27327
27411
  }
27328
27412
  function createTemplateMiddle(cooked, raw) {
27329
- const node = ts15.factory.createTemplateHead(cooked, raw);
27330
- node.kind = ts15.SyntaxKind.TemplateMiddle;
27413
+ const node = ts16.factory.createTemplateHead(cooked, raw);
27414
+ node.kind = ts16.SyntaxKind.TemplateMiddle;
27331
27415
  return node;
27332
27416
  }
27333
27417
  function createTemplateTail(cooked, raw) {
27334
- const node = ts15.factory.createTemplateHead(cooked, raw);
27335
- node.kind = ts15.SyntaxKind.TemplateTail;
27418
+ const node = ts16.factory.createTemplateHead(cooked, raw);
27419
+ node.kind = ts16.SyntaxKind.TemplateTail;
27336
27420
  return node;
27337
27421
  }
27338
27422
  function attachComments(statement, leadingComments) {
27339
27423
  for (const comment of leadingComments) {
27340
- const commentKind = comment.multiline ? ts15.SyntaxKind.MultiLineCommentTrivia : ts15.SyntaxKind.SingleLineCommentTrivia;
27424
+ const commentKind = comment.multiline ? ts16.SyntaxKind.MultiLineCommentTrivia : ts16.SyntaxKind.SingleLineCommentTrivia;
27341
27425
  if (comment.multiline) {
27342
- ts15.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
27426
+ ts16.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
27343
27427
  } else {
27344
27428
  for (const line of comment.toString().split(`
27345
27429
  `)) {
27346
- ts15.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
27430
+ ts16.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
27347
27431
  }
27348
27432
  }
27349
27433
  }
27350
27434
  }
27351
27435
  function getEntityTypeFromExpression(expression) {
27352
- if (ts15.isIdentifier(expression)) {
27436
+ if (ts16.isIdentifier(expression)) {
27353
27437
  return expression;
27354
27438
  }
27355
- if (ts15.isPropertyAccessExpression(expression)) {
27439
+ if (ts16.isPropertyAccessExpression(expression)) {
27356
27440
  const left = getEntityTypeFromExpression(expression.expression);
27357
- if (!ts15.isIdentifier(expression.name)) {
27441
+ if (!ts16.isIdentifier(expression.name)) {
27358
27442
  throw new Error(`Unsupported property access for type reference: ${expression.name.text}`);
27359
27443
  }
27360
- return ts15.factory.createQualifiedName(left, expression.name);
27444
+ return ts16.factory.createQualifiedName(left, expression.name);
27361
27445
  }
27362
- throw new Error(`Unsupported expression for type reference: ${ts15.SyntaxKind[expression.kind]}`);
27446
+ throw new Error(`Unsupported expression for type reference: ${ts16.SyntaxKind[expression.kind]}`);
27363
27447
  }
27364
27448
  var init_typescript_ast_factory = __esm(() => {
27365
27449
  init_ts_util();
@@ -27393,8 +27477,8 @@ __export(exports_fastHmrCompiler, {
27393
27477
  invalidateFingerprintCache: () => invalidateFingerprintCache
27394
27478
  });
27395
27479
  import { existsSync as existsSync27, readFileSync as readFileSync24, statSync as statSync2 } from "fs";
27396
- import { dirname as dirname19, extname as extname7, relative as relative14, resolve as resolve26 } from "path";
27397
- import ts16 from "typescript";
27480
+ import { dirname as dirname19, extname as extname8, relative as relative14, resolve as resolve26 } from "path";
27481
+ import ts17 from "typescript";
27398
27482
  var fail = (reason, detail, location) => ({
27399
27483
  detail,
27400
27484
  ok: false,
@@ -27402,10 +27486,10 @@ var fail = (reason, detail, location) => ({
27402
27486
  ...location ?? {}
27403
27487
  }), fingerprintCache, pendingModuleCache, ANGULAR_DECORATOR_NAMES, findAngularDecoratorName = (decorators) => {
27404
27488
  for (const decorator of decorators) {
27405
- if (!ts16.isCallExpression(decorator.expression))
27489
+ if (!ts17.isCallExpression(decorator.expression))
27406
27490
  continue;
27407
27491
  const { expression } = decorator.expression;
27408
- if (!ts16.isIdentifier(expression))
27492
+ if (!ts17.isIdentifier(expression))
27409
27493
  continue;
27410
27494
  if (ANGULAR_DECORATOR_NAMES.has(expression.text)) {
27411
27495
  return expression.text;
@@ -27491,17 +27575,17 @@ var fail = (reason, detail, location) => ({
27491
27575
  }
27492
27576
  let sourceFile;
27493
27577
  try {
27494
- sourceFile = ts16.createSourceFile(componentFilePath, source, ts16.ScriptTarget.Latest, true, ts16.ScriptKind.TS);
27578
+ sourceFile = ts17.createSourceFile(componentFilePath, source, ts17.ScriptTarget.Latest, true, ts17.ScriptKind.TS);
27495
27579
  } catch {
27496
27580
  return;
27497
27581
  }
27498
27582
  for (const stmt of sourceFile.statements) {
27499
- if (!ts16.isClassDeclaration(stmt))
27583
+ if (!ts17.isClassDeclaration(stmt))
27500
27584
  continue;
27501
27585
  const className = stmt.name?.text;
27502
27586
  if (!className)
27503
27587
  continue;
27504
- const decorators = ts16.getDecorators(stmt) ?? [];
27588
+ const decorators = ts17.getDecorators(stmt) ?? [];
27505
27589
  const decoratorName = findAngularDecoratorName(decorators);
27506
27590
  if (!decoratorName)
27507
27591
  continue;
@@ -27509,17 +27593,17 @@ var fail = (reason, detail, location) => ({
27509
27593
  const id = encodeURIComponent(`${projectRel}@${className}`);
27510
27594
  if (decoratorName === "Component") {
27511
27595
  const componentDecorator = decorators.find((d2) => {
27512
- if (!ts16.isCallExpression(d2.expression))
27596
+ if (!ts17.isCallExpression(d2.expression))
27513
27597
  return false;
27514
27598
  const expr = d2.expression.expression;
27515
- return ts16.isIdentifier(expr) && expr.text === "Component";
27599
+ return ts17.isIdentifier(expr) && expr.text === "Component";
27516
27600
  });
27517
27601
  if (!componentDecorator)
27518
27602
  continue;
27519
- if (!ts16.isCallExpression(componentDecorator.expression))
27603
+ if (!ts17.isCallExpression(componentDecorator.expression))
27520
27604
  continue;
27521
27605
  const [args] = componentDecorator.expression.arguments;
27522
- if (!args || !ts16.isObjectLiteralExpression(args))
27606
+ if (!args || !ts17.isObjectLiteralExpression(args))
27523
27607
  continue;
27524
27608
  const decoratorMeta = readDecoratorMeta(args);
27525
27609
  const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
@@ -27552,11 +27636,11 @@ var fail = (reason, detail, location) => ({
27552
27636
  return false;
27553
27637
  return true;
27554
27638
  }, ENTITY_DECORATOR_NAMES, findEntityDecorator = (cls) => {
27555
- for (const dec of ts16.getDecorators(cls) ?? []) {
27639
+ for (const dec of ts17.getDecorators(cls) ?? []) {
27556
27640
  const expr = dec.expression;
27557
- if (!ts16.isCallExpression(expr))
27641
+ if (!ts17.isCallExpression(expr))
27558
27642
  continue;
27559
- if (!ts16.isIdentifier(expr.expression))
27643
+ if (!ts17.isIdentifier(expr.expression))
27560
27644
  continue;
27561
27645
  if (ENTITY_DECORATOR_NAMES.has(expr.expression.text))
27562
27646
  return dec;
@@ -27566,7 +27650,7 @@ var fail = (reason, detail, location) => ({
27566
27650
  const decorator = findEntityDecorator(cls);
27567
27651
  let decoratorArgsText = "";
27568
27652
  if (decorator !== null) {
27569
- if (!ts16.isCallExpression(decorator.expression)) {
27653
+ if (!ts17.isCallExpression(decorator.expression)) {
27570
27654
  return {
27571
27655
  arrowFieldSig: extractArrowFieldSig(cls),
27572
27656
  className,
@@ -27584,18 +27668,18 @@ var fail = (reason, detail, location) => ({
27584
27668
  }
27585
27669
  const ctorParamTypes = [];
27586
27670
  for (const member of cls.members) {
27587
- if (!ts16.isConstructorDeclaration(member))
27671
+ if (!ts17.isConstructorDeclaration(member))
27588
27672
  continue;
27589
27673
  for (const param of member.parameters) {
27590
27674
  const typeText = param.type ? param.type.getText() : "";
27591
- const decorators = ts16.getDecorators(param) ?? [];
27675
+ const decorators = ts17.getDecorators(param) ?? [];
27592
27676
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
27593
27677
  const e = d2.expression;
27594
- if (ts16.isCallExpression(e) && ts16.isIdentifier(e.expression)) {
27678
+ if (ts17.isCallExpression(e) && ts17.isIdentifier(e.expression)) {
27595
27679
  const args = e.arguments.map((a) => a.getText()).join(",");
27596
27680
  return `@${e.expression.text}(${args})`;
27597
27681
  }
27598
- if (ts16.isIdentifier(e))
27682
+ if (ts17.isIdentifier(e))
27599
27683
  return `@${e.text}`;
27600
27684
  return "@<unknown>";
27601
27685
  }).join("");
@@ -27617,23 +27701,23 @@ var fail = (reason, detail, location) => ({
27617
27701
  const walk = (node) => {
27618
27702
  if (found)
27619
27703
  return;
27620
- if (ts16.isClassDeclaration(node) && node.name?.text === className) {
27704
+ if (ts17.isClassDeclaration(node) && node.name?.text === className) {
27621
27705
  found = node;
27622
27706
  return;
27623
27707
  }
27624
- ts16.forEachChild(node, walk);
27708
+ ts17.forEachChild(node, walk);
27625
27709
  };
27626
27710
  walk(sourceFile);
27627
27711
  return found;
27628
27712
  }, getClassDecorators = (cls) => {
27629
- const modifiers = ts16.getDecorators(cls) ?? [];
27713
+ const modifiers = ts17.getDecorators(cls) ?? [];
27630
27714
  return [...modifiers];
27631
27715
  }, findComponentDecorator = (cls) => {
27632
27716
  for (const decorator of getClassDecorators(cls)) {
27633
27717
  const expr = decorator.expression;
27634
- if (ts16.isCallExpression(expr)) {
27718
+ if (ts17.isCallExpression(expr)) {
27635
27719
  const functionNode = expr.expression;
27636
- if (ts16.isIdentifier(functionNode) && functionNode.text === "Component") {
27720
+ if (ts17.isIdentifier(functionNode) && functionNode.text === "Component") {
27637
27721
  return decorator;
27638
27722
  }
27639
27723
  }
@@ -27641,15 +27725,15 @@ var fail = (reason, detail, location) => ({
27641
27725
  return null;
27642
27726
  }, getDecoratorArgsObject = (decorator) => {
27643
27727
  const call = decorator.expression;
27644
- if (!ts16.isCallExpression(call))
27728
+ if (!ts17.isCallExpression(call))
27645
27729
  return null;
27646
27730
  const [arg] = call.arguments;
27647
- if (!arg || !ts16.isObjectLiteralExpression(arg))
27731
+ if (!arg || !ts17.isObjectLiteralExpression(arg))
27648
27732
  return null;
27649
27733
  return arg;
27650
27734
  }, getProperty = (obj, name) => {
27651
27735
  for (const prop of obj.properties) {
27652
- if (ts16.isPropertyAssignment(prop) && (ts16.isIdentifier(prop.name) && prop.name.text === name || ts16.isStringLiteral(prop.name) && prop.name.text === name)) {
27736
+ if (ts17.isPropertyAssignment(prop) && (ts17.isIdentifier(prop.name) && prop.name.text === name || ts17.isStringLiteral(prop.name) && prop.name.text === name)) {
27653
27737
  return prop.initializer;
27654
27738
  }
27655
27739
  }
@@ -27658,7 +27742,7 @@ var fail = (reason, detail, location) => ({
27658
27742
  const expr = getProperty(obj, name);
27659
27743
  if (!expr)
27660
27744
  return null;
27661
- if (ts16.isStringLiteral(expr) || ts16.isNoSubstitutionTemplateLiteral(expr)) {
27745
+ if (ts17.isStringLiteral(expr) || ts17.isNoSubstitutionTemplateLiteral(expr)) {
27662
27746
  return expr.text;
27663
27747
  }
27664
27748
  return null;
@@ -27666,22 +27750,22 @@ var fail = (reason, detail, location) => ({
27666
27750
  const expr = getProperty(obj, name);
27667
27751
  if (!expr)
27668
27752
  return null;
27669
- if (expr.kind === ts16.SyntaxKind.TrueKeyword)
27753
+ if (expr.kind === ts17.SyntaxKind.TrueKeyword)
27670
27754
  return true;
27671
- if (expr.kind === ts16.SyntaxKind.FalseKeyword)
27755
+ if (expr.kind === ts17.SyntaxKind.FalseKeyword)
27672
27756
  return false;
27673
27757
  return null;
27674
27758
  }, isAngularDecoratorIdentifier = (name) => name === "Component" || name === "Directive" || name === "Pipe" || name === "Injectable", classHasAngularDecorator = (cls) => {
27675
- for (const dec of ts16.getDecorators(cls) ?? []) {
27759
+ for (const dec of ts17.getDecorators(cls) ?? []) {
27676
27760
  const expr = dec.expression;
27677
- if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
27761
+ if (ts17.isCallExpression(expr) && ts17.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
27678
27762
  return true;
27679
27763
  }
27680
27764
  }
27681
27765
  return false;
27682
27766
  }, findClassInSourceFile = (sourceFile, className) => {
27683
27767
  for (const stmt of sourceFile.statements) {
27684
- if (ts16.isClassDeclaration(stmt) && stmt.name?.text === className) {
27768
+ if (ts17.isClassDeclaration(stmt) && stmt.name?.text === className) {
27685
27769
  return stmt;
27686
27770
  }
27687
27771
  }
@@ -27691,15 +27775,15 @@ var fail = (reason, detail, location) => ({
27691
27775
  if (sameFile)
27692
27776
  return classHasAngularDecorator(sameFile);
27693
27777
  for (const stmt of sourceFile.statements) {
27694
- if (!ts16.isImportDeclaration(stmt))
27778
+ if (!ts17.isImportDeclaration(stmt))
27695
27779
  continue;
27696
- if (!ts16.isStringLiteral(stmt.moduleSpecifier))
27780
+ if (!ts17.isStringLiteral(stmt.moduleSpecifier))
27697
27781
  continue;
27698
27782
  const clause = stmt.importClause;
27699
27783
  if (!clause || clause.isTypeOnly)
27700
27784
  continue;
27701
27785
  const named = clause.namedBindings;
27702
- if (!named || !ts16.isNamedImports(named))
27786
+ if (!named || !ts17.isNamedImports(named))
27703
27787
  continue;
27704
27788
  const found = named.elements.find((element) => element.name.text === parentClassName);
27705
27789
  if (!found)
@@ -27724,7 +27808,7 @@ var fail = (reason, detail, location) => ({
27724
27808
  } catch {
27725
27809
  continue;
27726
27810
  }
27727
- const parentSf = ts16.createSourceFile(candidate, content, ts16.ScriptTarget.Latest, true);
27811
+ const parentSf = ts17.createSourceFile(candidate, content, ts17.ScriptTarget.Latest, true);
27728
27812
  const parentCls = findClassInSourceFile(parentSf, parentClassName);
27729
27813
  if (!parentCls)
27730
27814
  continue;
@@ -27736,11 +27820,11 @@ var fail = (reason, detail, location) => ({
27736
27820
  }, inheritsDecoratedClass = (cls, sourceFile, componentDir, projectRoot) => {
27737
27821
  const heritage = cls.heritageClauses ?? [];
27738
27822
  for (const clause of heritage) {
27739
- if (clause.token !== ts16.SyntaxKind.ExtendsKeyword)
27823
+ if (clause.token !== ts17.SyntaxKind.ExtendsKeyword)
27740
27824
  continue;
27741
27825
  for (const typeNode of clause.types) {
27742
27826
  const expr = typeNode.expression;
27743
- if (!ts16.isIdentifier(expr)) {
27827
+ if (!ts17.isIdentifier(expr)) {
27744
27828
  return true;
27745
27829
  }
27746
27830
  if (parentHasAngularDecoratorAcrossFiles(expr.text, sourceFile, componentDir, projectRoot)) {
@@ -27751,18 +27835,18 @@ var fail = (reason, detail, location) => ({
27751
27835
  return false;
27752
27836
  }, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
27753
27837
  for (const member of cls.members) {
27754
- if (!ts16.isMethodDeclaration(member))
27838
+ if (!ts17.isMethodDeclaration(member))
27755
27839
  continue;
27756
- if (member.modifiers?.some((item) => item.kind === ts16.SyntaxKind.StaticKeyword))
27840
+ if (member.modifiers?.some((item) => item.kind === ts17.SyntaxKind.StaticKeyword))
27757
27841
  continue;
27758
27842
  const { name } = member;
27759
27843
  if (name === undefined)
27760
27844
  continue;
27761
- const nameText = ts16.isIdentifier(name) ? name.text : name.getText();
27845
+ const nameText = ts17.isIdentifier(name) ? name.text : name.getText();
27762
27846
  if (nameText !== CONTROL_CREATE_METHOD_NAME)
27763
27847
  continue;
27764
27848
  const [firstParam] = member.parameters;
27765
- if (firstParam === undefined || firstParam.type === undefined || !ts16.isTypeReferenceNode(firstParam.type)) {
27849
+ if (firstParam === undefined || firstParam.type === undefined || !ts17.isTypeReferenceNode(firstParam.type)) {
27766
27850
  return { passThroughInput: null };
27767
27851
  }
27768
27852
  const typeArgs = firstParam.type.typeArguments;
@@ -27770,16 +27854,16 @@ var fail = (reason, detail, location) => ({
27770
27854
  return { passThroughInput: null };
27771
27855
  }
27772
27856
  const [arg] = typeArgs;
27773
- if (arg === undefined || !ts16.isLiteralTypeNode(arg) || !ts16.isStringLiteral(arg.literal)) {
27857
+ if (arg === undefined || !ts17.isLiteralTypeNode(arg) || !ts17.isStringLiteral(arg.literal)) {
27774
27858
  return { passThroughInput: null };
27775
27859
  }
27776
27860
  return { passThroughInput: arg.literal.text };
27777
27861
  }
27778
27862
  return null;
27779
27863
  }, resolveEnumPropertyAccess = (expr, enumName, values) => {
27780
- if (!ts16.isPropertyAccessExpression(expr))
27864
+ if (!ts17.isPropertyAccessExpression(expr))
27781
27865
  return null;
27782
- if (!ts16.isIdentifier(expr.expression))
27866
+ if (!ts17.isIdentifier(expr.expression))
27783
27867
  return null;
27784
27868
  if (expr.expression.text !== enumName)
27785
27869
  return null;
@@ -27798,21 +27882,21 @@ var fail = (reason, detail, location) => ({
27798
27882
  const hostExpr = getProperty(args, "host");
27799
27883
  const schemasExpr = getProperty(args, "schemas");
27800
27884
  const styleUrls = [];
27801
- if (styleUrlsExpr && ts16.isArrayLiteralExpression(styleUrlsExpr)) {
27885
+ if (styleUrlsExpr && ts17.isArrayLiteralExpression(styleUrlsExpr)) {
27802
27886
  for (const element of styleUrlsExpr.elements) {
27803
- if (ts16.isStringLiteral(element))
27887
+ if (ts17.isStringLiteral(element))
27804
27888
  styleUrls.push(element.text);
27805
27889
  }
27806
27890
  }
27807
27891
  const styles = [];
27808
27892
  if (stylesExpr) {
27809
- if (ts16.isArrayLiteralExpression(stylesExpr)) {
27893
+ if (ts17.isArrayLiteralExpression(stylesExpr)) {
27810
27894
  for (const element of stylesExpr.elements) {
27811
- if (ts16.isStringLiteral(element) || ts16.isNoSubstitutionTemplateLiteral(element)) {
27895
+ if (ts17.isStringLiteral(element) || ts17.isNoSubstitutionTemplateLiteral(element)) {
27812
27896
  styles.push(element.text);
27813
27897
  }
27814
27898
  }
27815
- } else if (ts16.isStringLiteral(stylesExpr) || ts16.isNoSubstitutionTemplateLiteral(stylesExpr)) {
27899
+ } else if (ts17.isStringLiteral(stylesExpr) || ts17.isNoSubstitutionTemplateLiteral(stylesExpr)) {
27816
27900
  styles.push(stylesExpr.text);
27817
27901
  }
27818
27902
  }
@@ -27821,19 +27905,19 @@ var fail = (reason, detail, location) => ({
27821
27905
  const changeDetectionExpr = getProperty(args, "changeDetection");
27822
27906
  const changeDetection = changeDetectionExpr ? resolveEnumPropertyAccess(changeDetectionExpr, "ChangeDetectionStrategy", CHANGE_DETECTION_VALUES) : null;
27823
27907
  return {
27824
- animationsExpr: animationsExpr && ts16.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
27908
+ animationsExpr: animationsExpr && ts17.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
27825
27909
  changeDetection,
27826
27910
  encapsulation,
27827
27911
  hasProviders: getProperty(args, "providers") !== null,
27828
27912
  hasViewProviders: getProperty(args, "viewProviders") !== null,
27829
- hostDirectivesExpr: hostDirectivesExpr && ts16.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
27830
- hostExpr: hostExpr && ts16.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
27831
- importsExpr: importsExpr && ts16.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
27832
- inputsArrayExpr: inputsArrayExpr && ts16.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
27833
- outputsArrayExpr: outputsArrayExpr && ts16.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
27913
+ hostDirectivesExpr: hostDirectivesExpr && ts17.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
27914
+ hostExpr: hostExpr && ts17.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
27915
+ importsExpr: importsExpr && ts17.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
27916
+ inputsArrayExpr: inputsArrayExpr && ts17.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
27917
+ outputsArrayExpr: outputsArrayExpr && ts17.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
27834
27918
  preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
27835
- providersExpr: providersExpr && ts16.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
27836
- schemasExpr: schemasExpr && ts16.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
27919
+ providersExpr: providersExpr && ts17.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
27920
+ schemasExpr: schemasExpr && ts17.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
27837
27921
  selector: getStringProperty(args, "selector"),
27838
27922
  standalone: getBooleanProperty(args, "standalone") ?? true,
27839
27923
  styles,
@@ -27841,16 +27925,16 @@ var fail = (reason, detail, location) => ({
27841
27925
  styleUrls,
27842
27926
  template: getStringProperty(args, "template"),
27843
27927
  templateUrl: getStringProperty(args, "templateUrl"),
27844
- viewProvidersExpr: viewProvidersExpr && ts16.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null
27928
+ viewProvidersExpr: viewProvidersExpr && ts17.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null
27845
27929
  };
27846
27930
  }, extractDecoratorInput = (prop, compiler) => {
27847
- const decorators = ts16.getDecorators(prop) ?? [];
27931
+ const decorators = ts17.getDecorators(prop) ?? [];
27848
27932
  for (const decorator of decorators) {
27849
27933
  const expr = decorator.expression;
27850
- if (!ts16.isCallExpression(expr))
27934
+ if (!ts17.isCallExpression(expr))
27851
27935
  continue;
27852
27936
  const functionNode = expr.expression;
27853
- if (!ts16.isIdentifier(functionNode) || functionNode.text !== "Input")
27937
+ if (!ts17.isIdentifier(functionNode) || functionNode.text !== "Input")
27854
27938
  continue;
27855
27939
  const classPropertyName = prop.name.getText();
27856
27940
  let bindingPropertyName = classPropertyName;
@@ -27858,9 +27942,9 @@ var fail = (reason, detail, location) => ({
27858
27942
  let transformFunction = null;
27859
27943
  const [arg] = expr.arguments;
27860
27944
  if (arg) {
27861
- if (ts16.isStringLiteral(arg)) {
27945
+ if (ts17.isStringLiteral(arg)) {
27862
27946
  bindingPropertyName = arg.text;
27863
- } else if (ts16.isObjectLiteralExpression(arg)) {
27947
+ } else if (ts17.isObjectLiteralExpression(arg)) {
27864
27948
  const aliasNode = getStringProperty(arg, "alias");
27865
27949
  if (aliasNode !== null)
27866
27950
  bindingPropertyName = aliasNode;
@@ -27884,11 +27968,11 @@ var fail = (reason, detail, location) => ({
27884
27968
  }
27885
27969
  return null;
27886
27970
  }, isInputSignalCall = (init) => {
27887
- if (ts16.isCallExpression(init)) {
27971
+ if (ts17.isCallExpression(init)) {
27888
27972
  const functionNode = init.expression;
27889
- if (ts16.isIdentifier(functionNode) && functionNode.text === "input")
27973
+ if (ts17.isIdentifier(functionNode) && functionNode.text === "input")
27890
27974
  return true;
27891
- if (ts16.isPropertyAccessExpression(functionNode) && ts16.isIdentifier(functionNode.expression) && functionNode.expression.text === "input") {
27975
+ if (ts17.isPropertyAccessExpression(functionNode) && ts17.isIdentifier(functionNode.expression) && functionNode.expression.text === "input") {
27892
27976
  return true;
27893
27977
  }
27894
27978
  }
@@ -27896,18 +27980,18 @@ var fail = (reason, detail, location) => ({
27896
27980
  }, extractSignalInput = (prop, compiler) => {
27897
27981
  if (!prop.initializer || !isInputSignalCall(prop.initializer))
27898
27982
  return null;
27899
- if (!ts16.isCallExpression(prop.initializer))
27983
+ if (!ts17.isCallExpression(prop.initializer))
27900
27984
  return null;
27901
27985
  const classPropertyName = prop.name.getText();
27902
27986
  const call = prop.initializer;
27903
27987
  let required2 = false;
27904
- if (ts16.isPropertyAccessExpression(call.expression) && ts16.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
27988
+ if (ts17.isPropertyAccessExpression(call.expression) && ts17.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
27905
27989
  required2 = true;
27906
27990
  }
27907
27991
  let bindingPropertyName = classPropertyName;
27908
27992
  let transformFunction = null;
27909
27993
  const optsArg = call.arguments[required2 ? 0 : 1];
27910
- if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
27994
+ if (optsArg && ts17.isObjectLiteralExpression(optsArg)) {
27911
27995
  const aliasNode = getStringProperty(optsArg, "alias");
27912
27996
  if (aliasNode !== null)
27913
27997
  bindingPropertyName = aliasNode;
@@ -27927,28 +28011,28 @@ var fail = (reason, detail, location) => ({
27927
28011
  }
27928
28012
  };
27929
28013
  }, extractDecoratorOutput = (prop) => {
27930
- const decorators = ts16.getDecorators(prop) ?? [];
28014
+ const decorators = ts17.getDecorators(prop) ?? [];
27931
28015
  for (const decorator of decorators) {
27932
28016
  const expr = decorator.expression;
27933
- if (!ts16.isCallExpression(expr))
28017
+ if (!ts17.isCallExpression(expr))
27934
28018
  continue;
27935
28019
  const functionNode = expr.expression;
27936
- if (!ts16.isIdentifier(functionNode) || functionNode.text !== "Output")
28020
+ if (!ts17.isIdentifier(functionNode) || functionNode.text !== "Output")
27937
28021
  continue;
27938
28022
  const classPropertyName = prop.name.getText();
27939
28023
  let bindingName = classPropertyName;
27940
28024
  const [arg] = expr.arguments;
27941
- if (arg && ts16.isStringLiteral(arg))
28025
+ if (arg && ts17.isStringLiteral(arg))
27942
28026
  bindingName = arg.text;
27943
28027
  return { bindingName, classPropertyName };
27944
28028
  }
27945
28029
  return null;
27946
28030
  }, isOutputSignalCall = (init) => {
27947
- if (ts16.isCallExpression(init)) {
28031
+ if (ts17.isCallExpression(init)) {
27948
28032
  const functionNode = init.expression;
27949
- if (ts16.isIdentifier(functionNode) && functionNode.text === "output")
28033
+ if (ts17.isIdentifier(functionNode) && functionNode.text === "output")
27950
28034
  return true;
27951
- if (ts16.isPropertyAccessExpression(functionNode) && ts16.isIdentifier(functionNode.expression) && functionNode.expression.text === "output") {
28035
+ if (ts17.isPropertyAccessExpression(functionNode) && ts17.isIdentifier(functionNode.expression) && functionNode.expression.text === "output") {
27952
28036
  return true;
27953
28037
  }
27954
28038
  }
@@ -27956,13 +28040,13 @@ var fail = (reason, detail, location) => ({
27956
28040
  }, extractSignalOutput = (prop) => {
27957
28041
  if (!prop.initializer || !isOutputSignalCall(prop.initializer))
27958
28042
  return null;
27959
- if (!ts16.isCallExpression(prop.initializer))
28043
+ if (!ts17.isCallExpression(prop.initializer))
27960
28044
  return null;
27961
28045
  const classPropertyName = prop.name.getText();
27962
28046
  const call = prop.initializer;
27963
28047
  let bindingName = classPropertyName;
27964
28048
  const [optsArg] = call.arguments;
27965
- if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
28049
+ if (optsArg && ts17.isObjectLiteralExpression(optsArg)) {
27966
28050
  const aliasNode = getStringProperty(optsArg, "alias");
27967
28051
  if (aliasNode !== null)
27968
28052
  bindingName = aliasNode;
@@ -27974,7 +28058,7 @@ var fail = (reason, detail, location) => ({
27974
28058
  let hasDecoratorIO = false;
27975
28059
  let hasSignalIO = false;
27976
28060
  for (const member of cls.members) {
27977
- if (!ts16.isPropertyDeclaration(member))
28061
+ if (!ts17.isPropertyDeclaration(member))
27978
28062
  continue;
27979
28063
  const decoratorIn = extractDecoratorInput(member, compiler);
27980
28064
  if (decoratorIn) {
@@ -28008,21 +28092,21 @@ var fail = (reason, detail, location) => ({
28008
28092
  specialAttributes: {}
28009
28093
  }), parseHostObjectInto = (host, args, hostExprNode, compiler) => {
28010
28094
  const hostNode = getProperty(args, "host");
28011
- if (!hostNode || !ts16.isObjectLiteralExpression(hostNode)) {
28095
+ if (!hostNode || !ts17.isObjectLiteralExpression(hostNode)) {
28012
28096
  if (!hostExprNode)
28013
28097
  return;
28014
28098
  }
28015
- const obj = hostNode && ts16.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
28099
+ const obj = hostNode && ts17.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
28016
28100
  if (!obj)
28017
28101
  return;
28018
28102
  for (const prop of obj.properties) {
28019
- if (!ts16.isPropertyAssignment(prop))
28103
+ if (!ts17.isPropertyAssignment(prop))
28020
28104
  continue;
28021
28105
  const keyNode = prop.name;
28022
28106
  let key;
28023
- if (ts16.isStringLiteral(keyNode) || ts16.isNoSubstitutionTemplateLiteral(keyNode)) {
28107
+ if (ts17.isStringLiteral(keyNode) || ts17.isNoSubstitutionTemplateLiteral(keyNode)) {
28024
28108
  key = keyNode.text;
28025
- } else if (ts16.isIdentifier(keyNode)) {
28109
+ } else if (ts17.isIdentifier(keyNode)) {
28026
28110
  key = keyNode.text;
28027
28111
  } else {
28028
28112
  continue;
@@ -28039,39 +28123,39 @@ var fail = (reason, detail, location) => ({
28039
28123
  }
28040
28124
  }, mergeMemberHostDecorators = (host, cls) => {
28041
28125
  for (const member of cls.members) {
28042
- if (!ts16.canHaveDecorators(member))
28126
+ if (!ts17.canHaveDecorators(member))
28043
28127
  continue;
28044
- const decorators = ts16.getDecorators(member) ?? [];
28128
+ const decorators = ts17.getDecorators(member) ?? [];
28045
28129
  for (const dec of decorators) {
28046
28130
  const expr = dec.expression;
28047
- if (!ts16.isCallExpression(expr))
28131
+ if (!ts17.isCallExpression(expr))
28048
28132
  continue;
28049
28133
  const functionNode = expr.expression;
28050
- if (!ts16.isIdentifier(functionNode))
28134
+ if (!ts17.isIdentifier(functionNode))
28051
28135
  continue;
28052
28136
  if (functionNode.text === "HostBinding") {
28053
- if (!ts16.isPropertyDeclaration(member) && !ts16.isGetAccessor(member))
28137
+ if (!ts17.isPropertyDeclaration(member) && !ts17.isGetAccessor(member))
28054
28138
  continue;
28055
- if (!ts16.isIdentifier(member.name))
28139
+ if (!ts17.isIdentifier(member.name))
28056
28140
  continue;
28057
28141
  const propertyName2 = member.name.text;
28058
28142
  const [target] = expr.arguments;
28059
- const key = target && ts16.isStringLiteral(target) ? target.text : propertyName2;
28143
+ const key = target && ts17.isStringLiteral(target) ? target.text : propertyName2;
28060
28144
  host.properties[key] = propertyName2;
28061
28145
  } else if (functionNode.text === "HostListener") {
28062
- if (!ts16.isMethodDeclaration(member))
28146
+ if (!ts17.isMethodDeclaration(member))
28063
28147
  continue;
28064
- if (!ts16.isIdentifier(member.name))
28148
+ if (!ts17.isIdentifier(member.name))
28065
28149
  continue;
28066
28150
  const methodName = member.name.text;
28067
28151
  const [eventArg, argsArg] = expr.arguments;
28068
- if (!eventArg || !ts16.isStringLiteral(eventArg))
28152
+ if (!eventArg || !ts17.isStringLiteral(eventArg))
28069
28153
  continue;
28070
28154
  const event = eventArg.text;
28071
28155
  const argsList = [];
28072
- if (argsArg && ts16.isArrayLiteralExpression(argsArg)) {
28156
+ if (argsArg && ts17.isArrayLiteralExpression(argsArg)) {
28073
28157
  for (const element of argsArg.elements) {
28074
- if (ts16.isStringLiteral(element))
28158
+ if (ts17.isStringLiteral(element))
28075
28159
  argsList.push(element.text);
28076
28160
  }
28077
28161
  }
@@ -28084,14 +28168,14 @@ var fail = (reason, detail, location) => ({
28084
28168
  let descendants = true;
28085
28169
  let emitDistinctChangesOnly = true;
28086
28170
  const [, opts] = args;
28087
- if (opts && ts16.isObjectLiteralExpression(opts)) {
28171
+ if (opts && ts17.isObjectLiteralExpression(opts)) {
28088
28172
  static_ = getBooleanProperty(opts, "static") ?? false;
28089
28173
  descendants = getBooleanProperty(opts, "descendants") ?? true;
28090
28174
  emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
28091
28175
  }
28092
28176
  return { descendants, emitDistinctChangesOnly, static_ };
28093
28177
  }, queryPredicateFromArg = (arg, compiler) => {
28094
- if (ts16.isStringLiteral(arg)) {
28178
+ if (ts17.isStringLiteral(arg)) {
28095
28179
  return arg.text.split(",").map((item) => item.trim()).filter(Boolean);
28096
28180
  }
28097
28181
  return {
@@ -28102,17 +28186,17 @@ var fail = (reason, detail, location) => ({
28102
28186
  const contentQueries = [];
28103
28187
  const viewQueries = [];
28104
28188
  for (const member of cls.members) {
28105
- if (!ts16.isPropertyDeclaration(member))
28189
+ if (!ts17.isPropertyDeclaration(member))
28106
28190
  continue;
28107
- const decorators = ts16.getDecorators(member) ?? [];
28191
+ const decorators = ts17.getDecorators(member) ?? [];
28108
28192
  for (const dec of decorators) {
28109
28193
  const expr = dec.expression;
28110
- if (!ts16.isCallExpression(expr))
28194
+ if (!ts17.isCallExpression(expr))
28111
28195
  continue;
28112
28196
  const functionNode = expr.expression;
28113
- if (!ts16.isIdentifier(functionNode) || !QUERY_DECORATORS.has(functionNode.text))
28197
+ if (!ts17.isIdentifier(functionNode) || !QUERY_DECORATORS.has(functionNode.text))
28114
28198
  continue;
28115
- if (!ts16.isIdentifier(member.name))
28199
+ if (!ts17.isIdentifier(member.name))
28116
28200
  continue;
28117
28201
  const propertyName2 = member.name.text;
28118
28202
  const [tokenArg, opts] = expr.arguments;
@@ -28123,7 +28207,7 @@ var fail = (reason, detail, location) => ({
28123
28207
  continue;
28124
28208
  const { static_, descendants, emitDistinctChangesOnly } = parseQueryDecoratorOptions(expr.arguments);
28125
28209
  let read = null;
28126
- if (opts && ts16.isObjectLiteralExpression(opts)) {
28210
+ if (opts && ts17.isObjectLiteralExpression(opts)) {
28127
28211
  const readNode = getProperty(opts, "read");
28128
28212
  if (readNode) {
28129
28213
  read = new compiler.WrappedNodeExpr(readNode);
@@ -28151,15 +28235,15 @@ var fail = (reason, detail, location) => ({
28151
28235
  const contentQueries = [];
28152
28236
  const viewQueries = [];
28153
28237
  for (const member of cls.members) {
28154
- if (!ts16.isPropertyDeclaration(member) || !member.initializer)
28238
+ if (!ts17.isPropertyDeclaration(member) || !member.initializer)
28155
28239
  continue;
28156
28240
  const init = member.initializer;
28157
- if (!ts16.isCallExpression(init))
28241
+ if (!ts17.isCallExpression(init))
28158
28242
  continue;
28159
28243
  let queryName;
28160
- if (ts16.isIdentifier(init.expression)) {
28244
+ if (ts17.isIdentifier(init.expression)) {
28161
28245
  queryName = init.expression.text;
28162
- } else if (ts16.isPropertyAccessExpression(init.expression) && ts16.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
28246
+ } else if (ts17.isPropertyAccessExpression(init.expression) && ts17.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
28163
28247
  queryName = init.expression.expression.text;
28164
28248
  } else {
28165
28249
  continue;
@@ -28167,7 +28251,7 @@ var fail = (reason, detail, location) => ({
28167
28251
  const runtime = SIGNAL_QUERY_TO_RUNTIME[queryName];
28168
28252
  if (!runtime)
28169
28253
  continue;
28170
- if (!ts16.isIdentifier(member.name))
28254
+ if (!ts17.isIdentifier(member.name))
28171
28255
  continue;
28172
28256
  const propertyName2 = member.name.text;
28173
28257
  const [tokenArg, opts] = init.arguments;
@@ -28178,7 +28262,7 @@ var fail = (reason, detail, location) => ({
28178
28262
  continue;
28179
28263
  let descendants = true;
28180
28264
  let read = null;
28181
- if (opts && ts16.isObjectLiteralExpression(opts)) {
28265
+ if (opts && ts17.isObjectLiteralExpression(opts)) {
28182
28266
  descendants = getBooleanProperty(opts, "descendants") ?? true;
28183
28267
  const readNode = getProperty(opts, "read");
28184
28268
  if (readNode)
@@ -28204,13 +28288,13 @@ var fail = (reason, detail, location) => ({
28204
28288
  const node = getProperty(args, "exportAs");
28205
28289
  if (!node)
28206
28290
  return null;
28207
- if (ts16.isStringLiteral(node)) {
28291
+ if (ts17.isStringLiteral(node)) {
28208
28292
  return node.text.split(",").map((item) => item.trim()).filter(Boolean);
28209
28293
  }
28210
- if (ts16.isArrayLiteralExpression(node)) {
28294
+ if (ts17.isArrayLiteralExpression(node)) {
28211
28295
  const out = [];
28212
28296
  for (const element of node.elements) {
28213
- if (ts16.isStringLiteral(element))
28297
+ if (ts17.isStringLiteral(element))
28214
28298
  out.push(element.text);
28215
28299
  }
28216
28300
  return out.length > 0 ? out : null;
@@ -28218,11 +28302,11 @@ var fail = (reason, detail, location) => ({
28218
28302
  return null;
28219
28303
  }, extractHostDirectives = (args, compiler) => {
28220
28304
  const node = getProperty(args, "hostDirectives");
28221
- if (!node || !ts16.isArrayLiteralExpression(node))
28305
+ if (!node || !ts17.isArrayLiteralExpression(node))
28222
28306
  return null;
28223
28307
  const out = [];
28224
28308
  for (const element of node.elements) {
28225
- if (ts16.isIdentifier(element)) {
28309
+ if (ts17.isIdentifier(element)) {
28226
28310
  out.push({
28227
28311
  directive: {
28228
28312
  type: new compiler.WrappedNodeExpr(element),
@@ -28234,7 +28318,7 @@ var fail = (reason, detail, location) => ({
28234
28318
  });
28235
28319
  continue;
28236
28320
  }
28237
- if (!ts16.isObjectLiteralExpression(element))
28321
+ if (!ts17.isObjectLiteralExpression(element))
28238
28322
  continue;
28239
28323
  const directiveNode = getProperty(element, "directive");
28240
28324
  if (!directiveNode)
@@ -28242,11 +28326,11 @@ var fail = (reason, detail, location) => ({
28242
28326
  const inputsNode = getProperty(element, "inputs");
28243
28327
  const outputsNode = getProperty(element, "outputs");
28244
28328
  const collectMap = (expression) => {
28245
- if (!expression || !ts16.isArrayLiteralExpression(expression))
28329
+ if (!expression || !ts17.isArrayLiteralExpression(expression))
28246
28330
  return null;
28247
28331
  const map3 = {};
28248
28332
  for (const mappingElement of expression.elements) {
28249
- if (!ts16.isStringLiteral(mappingElement))
28333
+ if (!ts17.isStringLiteral(mappingElement))
28250
28334
  continue;
28251
28335
  const [name, alias] = mappingElement.text.split(":").map((segment) => segment.trim());
28252
28336
  if (name)
@@ -28316,10 +28400,10 @@ var fail = (reason, detail, location) => ({
28316
28400
  });
28317
28401
  return null;
28318
28402
  }
28319
- const sourceFile = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.Latest, true);
28403
+ const sourceFile = ts17.createSourceFile(filePath, source, ts17.ScriptTarget.Latest, true);
28320
28404
  let info = null;
28321
28405
  for (const stmt of sourceFile.statements) {
28322
- if (!ts16.isClassDeclaration(stmt))
28406
+ if (!ts17.isClassDeclaration(stmt))
28323
28407
  continue;
28324
28408
  if (!stmt.name || stmt.name.text !== className)
28325
28409
  continue;
@@ -28457,9 +28541,9 @@ var fail = (reason, detail, location) => ({
28457
28541
  }, buildClassToSpecMap = (sourceFile) => {
28458
28542
  const result = new Map;
28459
28543
  for (const stmt of sourceFile.statements) {
28460
- if (!ts16.isImportDeclaration(stmt))
28544
+ if (!ts17.isImportDeclaration(stmt))
28461
28545
  continue;
28462
- if (!ts16.isStringLiteral(stmt.moduleSpecifier))
28546
+ if (!ts17.isStringLiteral(stmt.moduleSpecifier))
28463
28547
  continue;
28464
28548
  const spec = stmt.moduleSpecifier.text;
28465
28549
  const clause = stmt.importClause;
@@ -28468,7 +28552,7 @@ var fail = (reason, detail, location) => ({
28468
28552
  if (clause.name)
28469
28553
  result.set(clause.name.text, spec);
28470
28554
  const named = clause.namedBindings;
28471
- if (named && ts16.isNamedImports(named)) {
28555
+ if (named && ts17.isNamedImports(named)) {
28472
28556
  for (const element of named.elements) {
28473
28557
  if (element.isTypeOnly)
28474
28558
  continue;
@@ -28581,7 +28665,7 @@ var fail = (reason, detail, location) => ({
28581
28665
  return result;
28582
28666
  const classToSpec = buildClassToSpecMap(sourceFile);
28583
28667
  for (const element of importsExpr.elements) {
28584
- if (!ts16.isIdentifier(element))
28668
+ if (!ts17.isIdentifier(element))
28585
28669
  continue;
28586
28670
  const className = element.text;
28587
28671
  const spec = classToSpec.get(className);
@@ -28600,35 +28684,35 @@ var fail = (reason, detail, location) => ({
28600
28684
  }
28601
28685
  return (hash >>> 0).toString(36);
28602
28686
  }, initializerShapeIsStructural = (node) => {
28603
- if (ts16.isArrowFunction(node) || ts16.isFunctionExpression(node) || ts16.isCallExpression(node) || ts16.isNewExpression(node)) {
28687
+ if (ts17.isArrowFunction(node) || ts17.isFunctionExpression(node) || ts17.isCallExpression(node) || ts17.isNewExpression(node)) {
28604
28688
  return true;
28605
28689
  }
28606
- if (ts16.isConditionalExpression(node)) {
28690
+ if (ts17.isConditionalExpression(node)) {
28607
28691
  return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
28608
28692
  }
28609
- if (ts16.isParenthesizedExpression(node)) {
28693
+ if (ts17.isParenthesizedExpression(node)) {
28610
28694
  return initializerShapeIsStructural(node.expression);
28611
28695
  }
28612
- if (ts16.isAsExpression(node) || ts16.isTypeAssertionExpression(node)) {
28696
+ if (ts17.isAsExpression(node) || ts17.isTypeAssertionExpression(node)) {
28613
28697
  return initializerShapeIsStructural(node.expression);
28614
28698
  }
28615
- if (ts16.isNonNullExpression(node)) {
28699
+ if (ts17.isNonNullExpression(node)) {
28616
28700
  return initializerShapeIsStructural(node.expression);
28617
28701
  }
28618
- if (ts16.isObjectLiteralExpression(node)) {
28702
+ if (ts17.isObjectLiteralExpression(node)) {
28619
28703
  for (const prop of node.properties) {
28620
- if (ts16.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
28704
+ if (ts17.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
28621
28705
  return true;
28622
28706
  }
28623
- if (ts16.isShorthandPropertyAssignment(prop))
28707
+ if (ts17.isShorthandPropertyAssignment(prop))
28624
28708
  continue;
28625
- if (ts16.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
28709
+ if (ts17.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
28626
28710
  return true;
28627
28711
  }
28628
28712
  }
28629
28713
  return false;
28630
28714
  }
28631
- if (ts16.isArrayLiteralExpression(node)) {
28715
+ if (ts17.isArrayLiteralExpression(node)) {
28632
28716
  for (const element of node.elements) {
28633
28717
  if (initializerShapeIsStructural(element))
28634
28718
  return true;
@@ -28639,7 +28723,7 @@ var fail = (reason, detail, location) => ({
28639
28723
  }, extractArrowFieldSig = (cls) => {
28640
28724
  const entries = [];
28641
28725
  for (const member of cls.members) {
28642
- if (!ts16.isPropertyDeclaration(member))
28726
+ if (!ts17.isPropertyDeclaration(member))
28643
28727
  continue;
28644
28728
  const init = member.initializer;
28645
28729
  if (!init)
@@ -28649,12 +28733,12 @@ var fail = (reason, detail, location) => ({
28649
28733
  const name = member.name.getText();
28650
28734
  let bodyText;
28651
28735
  try {
28652
- const printer = ts16.createPrinter({
28653
- newLine: ts16.NewLineKind.LineFeed,
28736
+ const printer = ts17.createPrinter({
28737
+ newLine: ts17.NewLineKind.LineFeed,
28654
28738
  omitTrailingSemicolon: true,
28655
28739
  removeComments: true
28656
28740
  });
28657
- bodyText = printer.printNode(ts16.EmitHint.Unspecified, init, cls.getSourceFile());
28741
+ bodyText = printer.printNode(ts17.EmitHint.Unspecified, init, cls.getSourceFile());
28658
28742
  } catch {
28659
28743
  bodyText = init.getText();
28660
28744
  }
@@ -28665,9 +28749,9 @@ var fail = (reason, detail, location) => ({
28665
28749
  }, INPUT_OUTPUT_DECORATORS, extractMemberDecoratorSig = (cls) => {
28666
28750
  const entries = [];
28667
28751
  for (const member of cls.members) {
28668
- if (!ts16.canHaveDecorators(member))
28752
+ if (!ts17.canHaveDecorators(member))
28669
28753
  continue;
28670
- const decorators = ts16.getDecorators(member) ?? [];
28754
+ const decorators = ts17.getDecorators(member) ?? [];
28671
28755
  if (decorators.length === 0)
28672
28756
  continue;
28673
28757
  const memberName = member.name?.getText() ?? "<anon>";
@@ -28675,14 +28759,14 @@ var fail = (reason, detail, location) => ({
28675
28759
  const expr = decorator.expression;
28676
28760
  let decName = "<unknown>";
28677
28761
  let argText = "";
28678
- if (ts16.isCallExpression(expr)) {
28679
- if (ts16.isIdentifier(expr.expression)) {
28762
+ if (ts17.isCallExpression(expr)) {
28763
+ if (ts17.isIdentifier(expr.expression)) {
28680
28764
  decName = expr.expression.text;
28681
28765
  }
28682
28766
  if (expr.arguments.length > 0) {
28683
28767
  argText = expr.arguments.map((leftValue) => leftValue.getText()).join(",");
28684
28768
  }
28685
- } else if (ts16.isIdentifier(expr)) {
28769
+ } else if (ts17.isIdentifier(expr)) {
28686
28770
  decName = expr.text;
28687
28771
  }
28688
28772
  if (INPUT_OUTPUT_DECORATORS.has(decName))
@@ -28707,18 +28791,18 @@ var fail = (reason, detail, location) => ({
28707
28791
  } catch {
28708
28792
  return true;
28709
28793
  }
28710
- const sourceFile = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
28794
+ const sourceFile = ts17.createSourceFile(filePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
28711
28795
  let hasProviders = false;
28712
28796
  const visit = (node) => {
28713
28797
  if (hasProviders)
28714
28798
  return;
28715
- if (ts16.isClassDeclaration(node)) {
28716
- for (const decorator of ts16.getDecorators(node) ?? []) {
28799
+ if (ts17.isClassDeclaration(node)) {
28800
+ for (const decorator of ts17.getDecorators(node) ?? []) {
28717
28801
  const expr = decorator.expression;
28718
- if (!ts16.isCallExpression(expr))
28802
+ if (!ts17.isCallExpression(expr))
28719
28803
  continue;
28720
28804
  const [arg] = expr.arguments;
28721
- if (!arg || !ts16.isObjectLiteralExpression(arg))
28805
+ if (!arg || !ts17.isObjectLiteralExpression(arg))
28722
28806
  continue;
28723
28807
  if (getProperty(arg, "providers") !== null) {
28724
28808
  hasProviders = true;
@@ -28726,7 +28810,7 @@ var fail = (reason, detail, location) => ({
28726
28810
  }
28727
28811
  }
28728
28812
  }
28729
- ts16.forEachChild(node, visit);
28813
+ ts17.forEachChild(node, visit);
28730
28814
  };
28731
28815
  visit(sourceFile);
28732
28816
  providerProbeCache.set(filePath, {
@@ -28736,10 +28820,10 @@ var fail = (reason, detail, location) => ({
28736
28820
  return hasProviders;
28737
28821
  }, TS_EXTENSIONS, resolveImportSource = (identifierName, sourceFile, componentDir) => {
28738
28822
  for (const stmt of sourceFile.statements) {
28739
- if (!ts16.isImportDeclaration(stmt))
28823
+ if (!ts17.isImportDeclaration(stmt))
28740
28824
  continue;
28741
28825
  const moduleSpec = stmt.moduleSpecifier;
28742
- if (!ts16.isStringLiteral(moduleSpec))
28826
+ if (!ts17.isStringLiteral(moduleSpec))
28743
28827
  continue;
28744
28828
  const spec = moduleSpec.text;
28745
28829
  if (!spec.startsWith(".") && !spec.startsWith("/"))
@@ -28753,7 +28837,7 @@ var fail = (reason, detail, location) => ({
28753
28837
  }
28754
28838
  if (importClause.namedBindings) {
28755
28839
  const item = importClause.namedBindings;
28756
- if (ts16.isNamespaceImport(item)) {
28840
+ if (ts17.isNamespaceImport(item)) {
28757
28841
  if (item.name.text === identifierName)
28758
28842
  matches = true;
28759
28843
  } else {
@@ -28783,7 +28867,7 @@ var fail = (reason, detail, location) => ({
28783
28867
  return [];
28784
28868
  const sig = [];
28785
28869
  for (const entry of importsExpr.elements) {
28786
- if (ts16.isIdentifier(entry)) {
28870
+ if (ts17.isIdentifier(entry)) {
28787
28871
  const importPath = resolveImportSource(entry.text, sourceFile, componentDir);
28788
28872
  if (importPath) {
28789
28873
  if (fileHasModuleProviders(importPath)) {
@@ -28800,14 +28884,14 @@ var fail = (reason, detail, location) => ({
28800
28884
  }
28801
28885
  return sig.sort();
28802
28886
  }, getPropertyNameText = (name) => {
28803
- if (ts16.isIdentifier(name) || ts16.isStringLiteral(name) || ts16.isNoSubstitutionTemplateLiteral(name)) {
28887
+ if (ts17.isIdentifier(name) || ts17.isStringLiteral(name) || ts17.isNoSubstitutionTemplateLiteral(name)) {
28804
28888
  return name.text;
28805
28889
  }
28806
28890
  return name.getText();
28807
28891
  }, extractPropertyFieldNames = (cls) => {
28808
28892
  const names = [];
28809
28893
  for (const member of cls.members) {
28810
- if (!ts16.isPropertyDeclaration(member) && !ts16.isMethodDeclaration(member) && !ts16.isGetAccessorDeclaration(member) && !ts16.isSetAccessorDeclaration(member)) {
28894
+ if (!ts17.isPropertyDeclaration(member) && !ts17.isMethodDeclaration(member) && !ts17.isGetAccessorDeclaration(member) && !ts17.isSetAccessorDeclaration(member)) {
28811
28895
  continue;
28812
28896
  }
28813
28897
  const { name } = member;
@@ -28821,7 +28905,7 @@ var fail = (reason, detail, location) => ({
28821
28905
  }, extractTopLevelImports = (sourceFile) => {
28822
28906
  const names = new Set;
28823
28907
  for (const stmt of sourceFile.statements) {
28824
- if (!ts16.isImportDeclaration(stmt))
28908
+ if (!ts17.isImportDeclaration(stmt))
28825
28909
  continue;
28826
28910
  const clause = stmt.importClause;
28827
28911
  if (!clause)
@@ -28833,9 +28917,9 @@ var fail = (reason, detail, location) => ({
28833
28917
  const bindings = clause.namedBindings;
28834
28918
  if (!bindings)
28835
28919
  continue;
28836
- if (ts16.isNamespaceImport(bindings)) {
28920
+ if (ts17.isNamespaceImport(bindings)) {
28837
28921
  names.add(bindings.name.text);
28838
- } else if (ts16.isNamedImports(bindings)) {
28922
+ } else if (ts17.isNamedImports(bindings)) {
28839
28923
  for (const element of bindings.elements) {
28840
28924
  if (element.isTypeOnly)
28841
28925
  continue;
@@ -28847,18 +28931,18 @@ var fail = (reason, detail, location) => ({
28847
28931
  }, extractFingerprint = (cls, className, decoratorMeta, inputs, outputs, sourceFile, componentDir) => {
28848
28932
  const ctorParamTypes = [];
28849
28933
  for (const member of cls.members) {
28850
- if (!ts16.isConstructorDeclaration(member))
28934
+ if (!ts17.isConstructorDeclaration(member))
28851
28935
  continue;
28852
28936
  for (const param of member.parameters) {
28853
28937
  const typeText = param.type ? param.type.getText() : "";
28854
- const decorators = ts16.getDecorators(param) ?? [];
28938
+ const decorators = ts17.getDecorators(param) ?? [];
28855
28939
  const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
28856
28940
  const expr = d2.expression;
28857
- if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression)) {
28941
+ if (ts17.isCallExpression(expr) && ts17.isIdentifier(expr.expression)) {
28858
28942
  const args = expr.arguments.map((a) => a.getText()).join(",");
28859
28943
  return `@${expr.expression.text}(${args})`;
28860
28944
  }
28861
- if (ts16.isIdentifier(expr)) {
28945
+ if (ts17.isIdentifier(expr)) {
28862
28946
  return `@${expr.text}`;
28863
28947
  }
28864
28948
  return "@<unknown>";
@@ -28874,12 +28958,12 @@ var fail = (reason, detail, location) => ({
28874
28958
  const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
28875
28959
  const topLevelImports = extractTopLevelImports(sourceFile);
28876
28960
  const propertyFieldNames = extractPropertyFieldNames(cls);
28877
- const printer = ts16.createPrinter({
28878
- newLine: ts16.NewLineKind.LineFeed,
28961
+ const printer = ts17.createPrinter({
28962
+ newLine: ts17.NewLineKind.LineFeed,
28879
28963
  omitTrailingSemicolon: true,
28880
28964
  removeComments: true
28881
28965
  });
28882
- const canonicalText = (node) => printer.printNode(ts16.EmitHint.Unspecified, node, sourceFile);
28966
+ const canonicalText = (node) => printer.printNode(ts17.EmitHint.Unspecified, node, sourceFile);
28883
28967
  const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(canonicalText(decoratorMeta.importsExpr)) : "";
28884
28968
  const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(canonicalText(decoratorMeta.hostDirectivesExpr)) : "";
28885
28969
  const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(canonicalText(decoratorMeta.animationsExpr)) : "";
@@ -28892,13 +28976,13 @@ var fail = (reason, detail, location) => ({
28892
28976
  const PAGE_EXPORT_NAMES = new Set(["providers", "routes"]);
28893
28977
  const pageExportEntries = [];
28894
28978
  for (const stmt of sourceFile.statements) {
28895
- if (!ts16.isVariableStatement(stmt))
28979
+ if (!ts17.isVariableStatement(stmt))
28896
28980
  continue;
28897
- const isExported = stmt.modifiers?.some((item) => item.kind === ts16.SyntaxKind.ExportKeyword);
28981
+ const isExported = stmt.modifiers?.some((item) => item.kind === ts17.SyntaxKind.ExportKeyword);
28898
28982
  if (!isExported)
28899
28983
  continue;
28900
28984
  for (const decl of stmt.declarationList.declarations) {
28901
- if (!ts16.isIdentifier(decl.name))
28985
+ if (!ts17.isIdentifier(decl.name))
28902
28986
  continue;
28903
28987
  if (!PAGE_EXPORT_NAMES.has(decl.name.text))
28904
28988
  continue;
@@ -28939,35 +29023,35 @@ var fail = (reason, detail, location) => ({
28939
29023
  }, buildFreshClassMethodsBlock = (classNode, className) => {
28940
29024
  const memberSources = [];
28941
29025
  let hasStatic = false;
28942
- const printer = ts16.createPrinter({ removeComments: true });
29026
+ const printer = ts17.createPrinter({ removeComments: true });
28943
29027
  for (const member of classNode.members) {
28944
- if (ts16.isPropertyDeclaration(member)) {
28945
- const modifiers = (ts16.getModifiers(member) ?? []).filter((m) => m.kind !== ts16.SyntaxKind.PrivateKeyword && m.kind !== ts16.SyntaxKind.PublicKeyword && m.kind !== ts16.SyntaxKind.ProtectedKeyword && m.kind !== ts16.SyntaxKind.ReadonlyKeyword && m.kind !== ts16.SyntaxKind.OverrideKeyword);
28946
- const cleaned = ts16.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
28947
- memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
29028
+ if (ts17.isPropertyDeclaration(member)) {
29029
+ const modifiers = (ts17.getModifiers(member) ?? []).filter((m) => m.kind !== ts17.SyntaxKind.PrivateKeyword && m.kind !== ts17.SyntaxKind.PublicKeyword && m.kind !== ts17.SyntaxKind.ProtectedKeyword && m.kind !== ts17.SyntaxKind.ReadonlyKeyword && m.kind !== ts17.SyntaxKind.OverrideKeyword);
29030
+ const cleaned = ts17.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
29031
+ memberSources.push(printer.printNode(ts17.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
28948
29032
  continue;
28949
29033
  }
28950
- if (ts16.isConstructorDeclaration(member)) {
28951
- const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, (ts16.getModifiers(param) ?? []).filter((item) => item.kind !== ts16.SyntaxKind.PrivateKeyword && item.kind !== ts16.SyntaxKind.PublicKeyword && item.kind !== ts16.SyntaxKind.ProtectedKeyword && item.kind !== ts16.SyntaxKind.ReadonlyKeyword && item.kind !== ts16.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
28952
- const cleaned = ts16.factory.createConstructorDeclaration([], cleanedParams, member.body);
28953
- memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
29034
+ if (ts17.isConstructorDeclaration(member)) {
29035
+ const cleanedParams = member.parameters.map((param) => ts17.factory.updateParameterDeclaration(param, (ts17.getModifiers(param) ?? []).filter((item) => item.kind !== ts17.SyntaxKind.PrivateKeyword && item.kind !== ts17.SyntaxKind.PublicKeyword && item.kind !== ts17.SyntaxKind.ProtectedKeyword && item.kind !== ts17.SyntaxKind.ReadonlyKeyword && item.kind !== ts17.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
29036
+ const cleaned = ts17.factory.createConstructorDeclaration([], cleanedParams, member.body);
29037
+ memberSources.push(printer.printNode(ts17.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
28954
29038
  continue;
28955
29039
  }
28956
- if (ts16.isMethodDeclaration(member) || ts16.isGetAccessorDeclaration(member) || ts16.isSetAccessorDeclaration(member)) {
28957
- const modifiers = ts16.getModifiers(member) ?? [];
28958
- const isStatic = modifiers.some((m) => m.kind === ts16.SyntaxKind.StaticKeyword);
29040
+ if (ts17.isMethodDeclaration(member) || ts17.isGetAccessorDeclaration(member) || ts17.isSetAccessorDeclaration(member)) {
29041
+ const modifiers = ts17.getModifiers(member) ?? [];
29042
+ const isStatic = modifiers.some((m) => m.kind === ts17.SyntaxKind.StaticKeyword);
28959
29043
  if (isStatic)
28960
29044
  hasStatic = true;
28961
- const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, ts16.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
29045
+ const cleanedParams = member.parameters.map((param) => ts17.factory.updateParameterDeclaration(param, ts17.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
28962
29046
  let cleaned;
28963
- if (ts16.isMethodDeclaration(member)) {
28964
- cleaned = ts16.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
28965
- } else if (ts16.isGetAccessorDeclaration(member)) {
28966
- cleaned = ts16.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
29047
+ if (ts17.isMethodDeclaration(member)) {
29048
+ cleaned = ts17.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
29049
+ } else if (ts17.isGetAccessorDeclaration(member)) {
29050
+ cleaned = ts17.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
28967
29051
  } else {
28968
- cleaned = ts16.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
29052
+ cleaned = ts17.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
28969
29053
  }
28970
- const printed = printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
29054
+ const printed = printer.printNode(ts17.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
28971
29055
  memberSources.push(printed);
28972
29056
  }
28973
29057
  }
@@ -28979,10 +29063,10 @@ ${memberSources.join(`
28979
29063
  }`;
28980
29064
  let transpiled;
28981
29065
  try {
28982
- transpiled = ts16.transpileModule(wrappedSource, {
29066
+ transpiled = ts17.transpileModule(wrappedSource, {
28983
29067
  compilerOptions: {
28984
- module: ts16.ModuleKind.ES2022,
28985
- target: ts16.ScriptTarget.ES2022
29068
+ module: ts17.ModuleKind.ES2022,
29069
+ target: ts17.ScriptTarget.ES2022
28986
29070
  },
28987
29071
  reportDiagnostics: false
28988
29072
  }).outputText;
@@ -29014,7 +29098,7 @@ ${transpiled}
29014
29098
  const abs = resolve26(componentDir, url2);
29015
29099
  if (!existsSync27(abs))
29016
29100
  return null;
29017
- const ext = extname7(abs).toLowerCase();
29101
+ const ext = extname8(abs).toLowerCase();
29018
29102
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
29019
29103
  return readFileSync24(abs, "utf8");
29020
29104
  }
@@ -29055,7 +29139,7 @@ ${block}
29055
29139
  if (existsSync27(tsconfigPath)) {
29056
29140
  try {
29057
29141
  const text = readFileSync24(tsconfigPath, "utf8");
29058
- const parsed = ts16.parseConfigFileTextToJson(tsconfigPath, text);
29142
+ const parsed = ts17.parseConfigFileTextToJson(tsconfigPath, text);
29059
29143
  if (!parsed.error && parsed.config) {
29060
29144
  const cfg = parsed.config;
29061
29145
  const ang = cfg.angularCompilerOptions ?? {};
@@ -29089,7 +29173,7 @@ ${block}
29089
29173
  return fail("unexpected-error", `import @angular/compiler: ${err}`);
29090
29174
  }
29091
29175
  const tsSource = readFileSync24(componentFilePath, "utf8");
29092
- const sourceFile = ts16.createSourceFile(componentFilePath, tsSource, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
29176
+ const sourceFile = ts17.createSourceFile(componentFilePath, tsSource, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
29093
29177
  const classNode = findClassDeclaration(sourceFile, className);
29094
29178
  if (!classNode) {
29095
29179
  return fail("class-not-found", `${className} in ${componentFilePath}`);
@@ -29216,7 +29300,7 @@ ${block}
29216
29300
  isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((item) => item.isSignal) || advancedMetadata.viewQueries.some((item) => item.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((item) => !item.isSignal) && !advancedMetadata.viewQueries.some((item) => !item.isSignal),
29217
29301
  isStandalone: decoratorMeta.standalone,
29218
29302
  lifecycle: {
29219
- usesOnChanges: classNode.members.some((m) => ts16.isMethodDeclaration(m) && m.name !== undefined && ts16.isIdentifier(m.name) && m.name.text === "ngOnChanges")
29303
+ usesOnChanges: classNode.members.some((m) => ts17.isMethodDeclaration(m) && m.name !== undefined && ts17.isIdentifier(m.name) && m.name.text === "ngOnChanges")
29220
29304
  },
29221
29305
  name: className,
29222
29306
  outputs,
@@ -29265,18 +29349,18 @@ ${block}
29265
29349
  }
29266
29350
  const importGenerator = createHmrImportGenerator(namespaceMap);
29267
29351
  const tsFunctionDecl = translateStatement(sourceFile, callback, importGenerator);
29268
- if (!ts16.isFunctionDeclaration(tsFunctionDecl)) {
29352
+ if (!ts17.isFunctionDeclaration(tsFunctionDecl)) {
29269
29353
  return fail("unexpected-error", "Angular HMR callback did not translate to a function declaration");
29270
29354
  }
29271
- const exportedDecl = ts16.factory.updateFunctionDeclaration(tsFunctionDecl, [
29272
- ts16.factory.createToken(ts16.SyntaxKind.ExportKeyword),
29273
- ts16.factory.createToken(ts16.SyntaxKind.DefaultKeyword)
29355
+ const exportedDecl = ts17.factory.updateFunctionDeclaration(tsFunctionDecl, [
29356
+ ts17.factory.createToken(ts17.SyntaxKind.ExportKeyword),
29357
+ ts17.factory.createToken(ts17.SyntaxKind.DefaultKeyword)
29274
29358
  ], tsFunctionDecl.asteriskToken, tsFunctionDecl.name, tsFunctionDecl.typeParameters, tsFunctionDecl.parameters, tsFunctionDecl.type, tsFunctionDecl.body);
29275
- const printer = ts16.createPrinter({
29276
- newLine: ts16.NewLineKind.LineFeed,
29359
+ const printer = ts17.createPrinter({
29360
+ newLine: ts17.NewLineKind.LineFeed,
29277
29361
  removeComments: false
29278
29362
  });
29279
- const fnText = printer.printNode(ts16.EmitHint.Unspecified, exportedDecl, sourceFile);
29363
+ const fnText = printer.printNode(ts17.EmitHint.Unspecified, exportedDecl, sourceFile);
29280
29364
  const provisionalMethodsBlock = buildFreshClassMethodsBlock(classNode, className) ?? "";
29281
29365
  const referencedNames = new Set;
29282
29366
  const identRe = /[A-Za-z_$][A-Za-z0-9_$]*/g;
@@ -29286,32 +29370,32 @@ ${block}
29286
29370
  }
29287
29371
  const sourceScopeNames = new Set;
29288
29372
  for (const stmt of sourceFile.statements) {
29289
- if (ts16.isImportDeclaration(stmt)) {
29290
- if (!ts16.isStringLiteral(stmt.moduleSpecifier))
29373
+ if (ts17.isImportDeclaration(stmt)) {
29374
+ if (!ts17.isStringLiteral(stmt.moduleSpecifier))
29291
29375
  continue;
29292
29376
  const clause = stmt.importClause;
29293
29377
  if (clause?.name)
29294
29378
  sourceScopeNames.add(clause.name.text);
29295
- if (clause?.namedBindings && ts16.isNamedImports(clause.namedBindings)) {
29379
+ if (clause?.namedBindings && ts17.isNamedImports(clause.namedBindings)) {
29296
29380
  for (const element of clause.namedBindings.elements) {
29297
29381
  if (element.isTypeOnly)
29298
29382
  continue;
29299
29383
  sourceScopeNames.add(element.name.text);
29300
29384
  }
29301
- } else if (clause?.namedBindings && ts16.isNamespaceImport(clause.namedBindings)) {
29385
+ } else if (clause?.namedBindings && ts17.isNamespaceImport(clause.namedBindings)) {
29302
29386
  sourceScopeNames.add(clause.namedBindings.name.text);
29303
29387
  }
29304
29388
  continue;
29305
29389
  }
29306
- if (ts16.isVariableStatement(stmt)) {
29390
+ if (ts17.isVariableStatement(stmt)) {
29307
29391
  for (const decl of stmt.declarationList.declarations) {
29308
- if (ts16.isIdentifier(decl.name)) {
29392
+ if (ts17.isIdentifier(decl.name)) {
29309
29393
  sourceScopeNames.add(decl.name.text);
29310
29394
  }
29311
29395
  }
29312
29396
  continue;
29313
29397
  }
29314
- if (ts16.isFunctionDeclaration(stmt) || ts16.isClassDeclaration(stmt)) {
29398
+ if (ts17.isFunctionDeclaration(stmt) || ts17.isClassDeclaration(stmt)) {
29315
29399
  if (stmt.name)
29316
29400
  sourceScopeNames.add(stmt.name.text);
29317
29401
  }
@@ -29322,7 +29406,7 @@ ${block}
29322
29406
  }
29323
29407
  const allImportedNames = new Set;
29324
29408
  for (const stmt of sourceFile.statements) {
29325
- if (!ts16.isImportDeclaration(stmt))
29409
+ if (!ts17.isImportDeclaration(stmt))
29326
29410
  continue;
29327
29411
  const clause = stmt.importClause;
29328
29412
  if (!clause || clause.isTypeOnly)
@@ -29332,7 +29416,7 @@ ${block}
29332
29416
  const bindings = clause.namedBindings;
29333
29417
  if (!bindings)
29334
29418
  continue;
29335
- if (ts16.isNamespaceImport(bindings)) {
29419
+ if (ts17.isNamespaceImport(bindings)) {
29336
29420
  allImportedNames.add(bindings.name.text);
29337
29421
  } else {
29338
29422
  for (const element of bindings.elements) {
@@ -29344,10 +29428,10 @@ ${block}
29344
29428
  }
29345
29429
  const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n) || allImportedNames.has(n));
29346
29430
  const tsSourceText = fnText;
29347
- const transpiled = ts16.transpileModule(tsSourceText, {
29431
+ const transpiled = ts17.transpileModule(tsSourceText, {
29348
29432
  compilerOptions: {
29349
- module: ts16.ModuleKind.ES2022,
29350
- target: ts16.ScriptTarget.ES2022
29433
+ module: ts17.ModuleKind.ES2022,
29434
+ target: ts17.ScriptTarget.ES2022
29351
29435
  },
29352
29436
  fileName: componentFilePath,
29353
29437
  reportDiagnostics: false
@@ -29906,7 +29990,7 @@ __export(exports_compileEmber, {
29906
29990
  });
29907
29991
  import { existsSync as existsSync28 } from "fs";
29908
29992
  import { mkdir as mkdir7, rm as rm4 } from "fs/promises";
29909
- import { basename as basename13, dirname as dirname20, extname as extname8, join as join35, resolve as resolve27 } from "path";
29993
+ import { basename as basename13, dirname as dirname20, extname as extname9, join as join35, resolve as resolve27 } from "path";
29910
29994
  var {build: bunBuild2, Transpiler: Transpiler4, write: write4, file: file4 } = globalThis.Bun;
29911
29995
  var cachedPreprocessor = null, getPreprocessor = async () => {
29912
29996
  if (cachedPreprocessor)
@@ -29915,7 +29999,7 @@ var cachedPreprocessor = null, getPreprocessor = async () => {
29915
29999
  cachedPreprocessor = new module.Preprocessor;
29916
30000
  return cachedPreprocessor;
29917
30001
  }, transpiler5, isTemplateTagFile = (entry) => {
29918
- const ext = extname8(entry);
30002
+ const ext = extname9(entry);
29919
30003
  return ext === ".gjs" || ext === ".gts";
29920
30004
  }, rewriteTemplateEvalToScope = (source) => {
29921
30005
  const importedNames = new Set;
@@ -30641,7 +30725,7 @@ import {
30641
30725
  statSync as statSync3,
30642
30726
  writeFileSync as writeFileSync9
30643
30727
  } from "fs";
30644
- import { basename as basename14, dirname as dirname21, extname as extname9, join as join40, relative as relative15, resolve as resolve29 } from "path";
30728
+ import { basename as basename14, dirname as dirname21, extname as extname10, join as join40, relative as relative15, resolve as resolve29 } from "path";
30645
30729
  import { cwd, env as env3, exit } from "process";
30646
30730
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
30647
30731
  var isDev2, isBuildTraceEnabled = () => {
@@ -31631,7 +31715,10 @@ ${content.slice(firstUseIdx)}`;
31631
31715
  minify: !isDev2,
31632
31716
  naming: `${idx}-[name].[ext]`,
31633
31717
  outdir: destDir,
31634
- plugins: [stylePreprocessorPlugin2],
31718
+ plugins: [
31719
+ stylePreprocessorPlugin2,
31720
+ createBunStringRawUnicodePlugin()
31721
+ ],
31635
31722
  root: dirname21(source),
31636
31723
  target: "bun",
31637
31724
  throw: false,
@@ -31671,6 +31758,7 @@ ${content.slice(firstUseIdx)}`;
31671
31758
  minify: !isDev2,
31672
31759
  naming: `${idx}-${name}.[ext]`,
31673
31760
  outdir: destDir,
31761
+ plugins: [createBunStringRawUnicodePlugin()],
31674
31762
  splitting: false,
31675
31763
  target: "bun",
31676
31764
  throw: false
@@ -31913,7 +32001,8 @@ ${content.slice(firstUseIdx)}`;
31913
32001
  ...islandRegistryPlugins,
31914
32002
  ...serverOutDir ? [
31915
32003
  createExternalAssetPlugin(serverOutDir, allFrameworkDirs)
31916
- ] : []
32004
+ ] : [],
32005
+ createBunStringRawUnicodePlugin()
31917
32006
  ],
31918
32007
  root: serverRoot,
31919
32008
  sourcemap: isDev2 ? "inline" : "none",
@@ -32165,7 +32254,7 @@ ${content.slice(firstUseIdx)}`;
32165
32254
  ], buildPath)
32166
32255
  };
32167
32256
  for (const artifact of serverOutputs) {
32168
- if (extname9(artifact.path) !== ".js")
32257
+ if (extname10(artifact.path) !== ".js")
32169
32258
  continue;
32170
32259
  const fileWithHash = basename14(artifact.path);
32171
32260
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
@@ -32185,7 +32274,7 @@ ${content.slice(firstUseIdx)}`;
32185
32274
  };
32186
32275
  const cssByName = new Map;
32187
32276
  for (const artifact of cssOutputs) {
32188
- if (extname9(artifact.path) !== ".css")
32277
+ if (extname10(artifact.path) !== ".css")
32189
32278
  continue;
32190
32279
  const cssName = stripHash(basename14(artifact.path), artifact.hash);
32191
32280
  if (cssName)
@@ -32195,7 +32284,7 @@ ${content.slice(firstUseIdx)}`;
32195
32284
  const siblingCssPaths = [];
32196
32285
  const serverJsByPascalName = new Map;
32197
32286
  await Promise.all(serverOutputs.map(async (artifact) => {
32198
- if (extname9(artifact.path) !== ".js")
32287
+ if (extname10(artifact.path) !== ".js")
32199
32288
  return;
32200
32289
  const pascalName = stripHash(basename14(artifact.path), artifact.hash);
32201
32290
  if (!pascalName)
@@ -32434,6 +32523,7 @@ var init_build = __esm(() => {
32434
32523
  init_maskLiterals();
32435
32524
  init_telemetryEvent();
32436
32525
  init_angularLinkerPlugin();
32526
+ init_bunStringRawUnicodePlugin();
32437
32527
  init_externalAssetPlugin();
32438
32528
  init_islandRegistryTransform();
32439
32529
  init_hmrInjectionPlugin();
@@ -33914,8 +34004,8 @@ __export(exports_resolveOwningComponents, {
33914
34004
  invalidateResourceIndex: () => invalidateResourceIndex
33915
34005
  });
33916
34006
  import { readdirSync as readdirSync8, readFileSync as readFileSync29, statSync as statSync5 } from "fs";
33917
- import { dirname as dirname25, extname as extname10, join as join43, resolve as resolve38 } from "path";
33918
- import ts17 from "typescript";
34007
+ import { dirname as dirname25, extname as extname11, join as join43, resolve as resolve38 } from "path";
34008
+ import ts18 from "typescript";
33919
34009
  var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") || file5.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
33920
34010
  const out = [];
33921
34011
  const visit = (dir) => {
@@ -33941,13 +34031,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33941
34031
  return out;
33942
34032
  }, getStringPropertyValue = (obj, name) => {
33943
34033
  for (const prop of obj.properties) {
33944
- if (!ts17.isPropertyAssignment(prop))
34034
+ if (!ts18.isPropertyAssignment(prop))
33945
34035
  continue;
33946
- const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
34036
+ const propName = ts18.isIdentifier(prop.name) || ts18.isStringLiteral(prop.name) ? prop.name.text : null;
33947
34037
  if (propName !== name)
33948
34038
  continue;
33949
34039
  const init = prop.initializer;
33950
- if (ts17.isStringLiteral(init) || ts17.isNoSubstitutionTemplateLiteral(init)) {
34040
+ if (ts18.isStringLiteral(init) || ts18.isNoSubstitutionTemplateLiteral(init)) {
33951
34041
  return init.text;
33952
34042
  }
33953
34043
  }
@@ -33955,16 +34045,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33955
34045
  }, getStringArrayProperty = (obj, name) => {
33956
34046
  const out = [];
33957
34047
  for (const prop of obj.properties) {
33958
- if (!ts17.isPropertyAssignment(prop))
34048
+ if (!ts18.isPropertyAssignment(prop))
33959
34049
  continue;
33960
- const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
34050
+ const propName = ts18.isIdentifier(prop.name) || ts18.isStringLiteral(prop.name) ? prop.name.text : null;
33961
34051
  if (propName !== name)
33962
34052
  continue;
33963
34053
  const init = prop.initializer;
33964
- if (!ts17.isArrayLiteralExpression(init))
34054
+ if (!ts18.isArrayLiteralExpression(init))
33965
34055
  continue;
33966
34056
  for (const element of init.elements) {
33967
- if (ts17.isStringLiteral(element) || ts17.isNoSubstitutionTemplateLiteral(element)) {
34057
+ if (ts18.isStringLiteral(element) || ts18.isNoSubstitutionTemplateLiteral(element)) {
33968
34058
  out.push(element.text);
33969
34059
  }
33970
34060
  }
@@ -33977,27 +34067,27 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
33977
34067
  } catch {
33978
34068
  return [];
33979
34069
  }
33980
- const sourceFile = ts17.createSourceFile(filePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
34070
+ const sourceFile = ts18.createSourceFile(filePath, source, ts18.ScriptTarget.ES2022, true, ts18.ScriptKind.TS);
33981
34071
  const out = [];
33982
34072
  const visit = (node) => {
33983
- if (ts17.isClassDeclaration(node) && node.name) {
33984
- for (const decorator of ts17.getDecorators(node) ?? []) {
34073
+ if (ts18.isClassDeclaration(node) && node.name) {
34074
+ for (const decorator of ts18.getDecorators(node) ?? []) {
33985
34075
  const expr = decorator.expression;
33986
- if (!ts17.isCallExpression(expr))
34076
+ if (!ts18.isCallExpression(expr))
33987
34077
  continue;
33988
34078
  const functionNode = expr.expression;
33989
- if (!ts17.isIdentifier(functionNode))
34079
+ if (!ts18.isIdentifier(functionNode))
33990
34080
  continue;
33991
34081
  const kind = ENTITY_DECORATORS[functionNode.text];
33992
34082
  if (!kind)
33993
34083
  continue;
33994
34084
  let extendsName = null;
33995
34085
  for (const heritage of node.heritageClauses ?? []) {
33996
- if (heritage.token !== ts17.SyntaxKind.ExtendsKeyword) {
34086
+ if (heritage.token !== ts18.SyntaxKind.ExtendsKeyword) {
33997
34087
  continue;
33998
34088
  }
33999
34089
  const [first] = heritage.types;
34000
- if (first && ts17.isIdentifier(first.expression)) {
34090
+ if (first && ts18.isIdentifier(first.expression)) {
34001
34091
  extendsName = first.expression.text;
34002
34092
  }
34003
34093
  break;
@@ -34010,7 +34100,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
34010
34100
  templateUrls: []
34011
34101
  };
34012
34102
  const [arg] = expr.arguments;
34013
- if (arg && ts17.isObjectLiteralExpression(arg) && kind === "component") {
34103
+ if (arg && ts18.isObjectLiteralExpression(arg) && kind === "component") {
34014
34104
  const tplUrl = getStringPropertyValue(arg, "templateUrl");
34015
34105
  if (tplUrl)
34016
34106
  entry.templateUrls.push(tplUrl);
@@ -34023,7 +34113,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
34023
34113
  break;
34024
34114
  }
34025
34115
  }
34026
- ts17.forEachChild(node, visit);
34116
+ ts18.forEachChild(node, visit);
34027
34117
  };
34028
34118
  visit(sourceFile);
34029
34119
  return out;
@@ -34031,7 +34121,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
34031
34121
  const { changedFilePath, userAngularRoot } = params;
34032
34122
  const changedAbs = safeNormalize(changedFilePath);
34033
34123
  const out = [];
34034
- const ext = extname10(changedAbs).toLowerCase();
34124
+ const ext = extname11(changedAbs).toLowerCase();
34035
34125
  if (ext === ".ts" || ext === ".tsx") {
34036
34126
  const classes = parseDecoratedClasses(changedAbs);
34037
34127
  for (const cls of classes) {
@@ -34067,12 +34157,12 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
34067
34157
  } catch {
34068
34158
  return null;
34069
34159
  }
34070
- const sourceFile = ts17.createSourceFile(childFilePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
34160
+ const sourceFile = ts18.createSourceFile(childFilePath, source, ts18.ScriptTarget.ES2022, true, ts18.ScriptKind.TS);
34071
34161
  const childDir = dirname25(childFilePath);
34072
34162
  for (const stmt of sourceFile.statements) {
34073
- if (!ts17.isImportDeclaration(stmt))
34163
+ if (!ts18.isImportDeclaration(stmt))
34074
34164
  continue;
34075
- if (!ts17.isStringLiteral(stmt.moduleSpecifier))
34165
+ if (!ts18.isStringLiteral(stmt.moduleSpecifier))
34076
34166
  continue;
34077
34167
  const clause = stmt.importClause;
34078
34168
  if (!clause || clause.isTypeOnly)
@@ -34080,7 +34170,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file5) => file5.endsWith(".ts") ||
34080
34170
  let matchesName = false;
34081
34171
  if (clause.name && clause.name.text === parentName)
34082
34172
  matchesName = true;
34083
- if (!matchesName && clause.namedBindings && ts17.isNamedImports(clause.namedBindings)) {
34173
+ if (!matchesName && clause.namedBindings && ts18.isNamedImports(clause.namedBindings)) {
34084
34174
  for (const element of clause.namedBindings.elements) {
34085
34175
  if (element.isTypeOnly)
34086
34176
  continue;
@@ -34321,7 +34411,7 @@ __export(exports_moduleServer, {
34321
34411
  SRC_URL_PREFIX: () => SRC_URL_PREFIX
34322
34412
  });
34323
34413
  import { existsSync as existsSync35, readFileSync as readFileSync30, realpathSync as realpathSync3, statSync as statSync6 } from "fs";
34324
- import { basename as basename16, dirname as dirname26, extname as extname11, join as join44, resolve as resolve39, relative as relative16 } from "path";
34414
+ import { basename as basename16, dirname as dirname26, extname as extname12, join as join44, resolve as resolve39, relative as relative16 } from "path";
34325
34415
  var SRC_PREFIX = "/@src/", jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
34326
34416
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
34327
34417
  const allExports = [];
@@ -34375,9 +34465,9 @@ ${stubs}
34375
34465
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
34376
34466
  const absPath = resolve39(fileDir, relPath);
34377
34467
  const rel = relative16(projectRoot, absPath);
34378
- const extension = extname11(rel);
34468
+ const extension = extname12(rel);
34379
34469
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
34380
- if (extname11(srcPath) === ".svelte") {
34470
+ if (extname12(srcPath) === ".svelte") {
34381
34471
  srcPath = relative16(projectRoot, resolveSvelteModulePath(resolve39(projectRoot, srcPath)));
34382
34472
  }
34383
34473
  return srcUrl(srcPath, projectRoot);
@@ -34518,7 +34608,7 @@ ${transpiled}`;
34518
34608
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
34519
34609
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
34520
34610
  const raw = readFileSync30(filePath, "utf-8");
34521
- const ext = extname11(filePath);
34611
+ const ext = extname12(filePath);
34522
34612
  const isTS = ext === ".ts" || ext === ".tsx";
34523
34613
  const isTSX = ext === ".tsx" || ext === ".jsx";
34524
34614
  let transpiler6 = jsTranspiler2;
@@ -34942,7 +35032,7 @@ export default {};
34942
35032
  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);`);
34943
35033
  }, resolveSourcePath = (relPath, projectRoot) => {
34944
35034
  const filePath = resolve39(projectRoot, relPath);
34945
- const ext = extname11(filePath);
35035
+ const ext = extname12(filePath);
34946
35036
  if (ext === ".svelte")
34947
35037
  return { ext, filePath: resolveSvelteModulePath(filePath) };
34948
35038
  if (ext)
@@ -47929,5 +48019,5 @@ export {
47929
48019
  ANGULAR_INIT_TIMEOUT_MS
47930
48020
  };
47931
48021
 
47932
- //# debugId=63188E855055C82564756E2164756E21
48022
+ //# debugId=4BF023440E294B0964756E2164756E21
47933
48023
  //# sourceMappingURL=index.js.map