layermap 0.1.4 → 0.1.5

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.
@@ -7882,22 +7882,22 @@ function createImportSpecifier(isTypeOnly = false, propertyName, name) {
7882
7882
  name
7883
7883
  });
7884
7884
  }
7885
- function createJSDocLink(name, text) {
7885
+ function createJSDocLink(name, text2) {
7886
7886
  return new NodeObject(SyntaxKind.JSDocLink, {
7887
7887
  name,
7888
- text
7888
+ text: text2
7889
7889
  });
7890
7890
  }
7891
- function createJSDocLinkPlain(name, text) {
7891
+ function createJSDocLinkPlain(name, text2) {
7892
7892
  return new NodeObject(SyntaxKind.JSDocLinkPlain, {
7893
7893
  name,
7894
- text
7894
+ text: text2
7895
7895
  });
7896
7896
  }
7897
- function createJSDocLinkCode(name, text) {
7897
+ function createJSDocLinkCode(name, text2) {
7898
7898
  return new NodeObject(SyntaxKind.JSDocLinkCode, {
7899
7899
  name,
7900
- text
7900
+ text: text2
7901
7901
  });
7902
7902
  }
7903
7903
  function createTypeParameterDeclaration(modifiers, name, constraint, expression, defaultType) {
@@ -8680,31 +8680,31 @@ var unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 18
8680
8680
  var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
8681
8681
  var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
8682
8682
  var jsDocTagTerminators = /* @__PURE__ */ new Set([" ", " ", "\n", "\r", "}", "*"]);
8683
- function hasJSDocTag(text, offset, ...tags) {
8683
+ function hasJSDocTag(text2, offset, ...tags) {
8684
8684
  for (const tag of tags) {
8685
- if (text.startsWith(tag, offset)) {
8686
- if (offset + tag.length === text.length) {
8685
+ if (text2.startsWith(tag, offset)) {
8686
+ if (offset + tag.length === text2.length) {
8687
8687
  return true;
8688
8688
  }
8689
- if (jsDocTagTerminators.has(text[offset + tag.length])) {
8689
+ if (jsDocTagTerminators.has(text2[offset + tag.length])) {
8690
8690
  return true;
8691
8691
  }
8692
8692
  }
8693
8693
  }
8694
8694
  return false;
8695
8695
  }
8696
- function scanJSDocCommentForTags(text, tokenFlags) {
8696
+ function scanJSDocCommentForTags(text2, tokenFlags) {
8697
8697
  let offset = 0;
8698
8698
  while (true) {
8699
- const i = text.indexOf("@", offset);
8699
+ const i = text2.indexOf("@", offset);
8700
8700
  if (i < 0) {
8701
8701
  return tokenFlags;
8702
8702
  }
8703
8703
  offset = i + 1;
8704
- if (!(tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) && hasJSDocTag(text, offset, "deprecated")) {
8704
+ if (!(tokenFlags & TokenFlags.PrecedingJSDocWithDeprecated) && hasJSDocTag(text2, offset, "deprecated")) {
8705
8705
  tokenFlags |= TokenFlags.PrecedingJSDocWithDeprecated;
8706
8706
  }
8707
- if (!(tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) && hasJSDocTag(text, offset, "see", "link", "linkcode", "linkplain")) {
8707
+ if (!(tokenFlags & TokenFlags.PrecedingJSDocWithSeeOrLink) && hasJSDocTag(text2, offset, "see", "link", "linkcode", "linkplain")) {
8708
8708
  tokenFlags |= TokenFlags.PrecedingJSDocWithSeeOrLink;
8709
8709
  }
8710
8710
  if ((tokenFlags & (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) === (TokenFlags.PrecedingJSDocWithDeprecated | TokenFlags.PrecedingJSDocWithSeeOrLink)) {
@@ -8750,16 +8750,16 @@ var tokenStrings = makeReverseMap(textToToken);
8750
8750
  function characterCodeToRegularExpressionFlag(ch) {
8751
8751
  return charCodeToRegExpFlag.get(ch);
8752
8752
  }
8753
- function computeLineStarts(text) {
8753
+ function computeLineStarts(text2) {
8754
8754
  const result = [];
8755
8755
  let pos = 0;
8756
8756
  let lineStart = 0;
8757
- while (pos < text.length) {
8758
- const ch = text.charCodeAt(pos);
8757
+ while (pos < text2.length) {
8758
+ const ch = text2.charCodeAt(pos);
8759
8759
  pos++;
8760
8760
  switch (ch) {
8761
8761
  case CharacterCodes.carriageReturn:
8762
- if (text.charCodeAt(pos) === CharacterCodes.lineFeed) {
8762
+ if (text2.charCodeAt(pos) === CharacterCodes.lineFeed) {
8763
8763
  pos++;
8764
8764
  }
8765
8765
  // falls through
@@ -8796,16 +8796,16 @@ function isHexDigit(ch) {
8796
8796
  function isOctalDigit(ch) {
8797
8797
  return ch >= CharacterCodes._0 && ch <= CharacterCodes._7;
8798
8798
  }
8799
- function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8799
+ function skipTrivia(text2, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8800
8800
  if (pos < 0) {
8801
8801
  return pos;
8802
8802
  }
8803
8803
  let canConsumeStar = false;
8804
8804
  while (true) {
8805
- const ch = text.charCodeAt(pos);
8805
+ const ch = text2.charCodeAt(pos);
8806
8806
  switch (ch) {
8807
8807
  case CharacterCodes.carriageReturn:
8808
- if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) {
8808
+ if (text2.charCodeAt(pos + 1) === CharacterCodes.lineFeed) {
8809
8809
  pos++;
8810
8810
  }
8811
8811
  // falls through
@@ -8826,10 +8826,10 @@ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8826
8826
  if (stopAtComments) {
8827
8827
  break;
8828
8828
  }
8829
- if (text.charCodeAt(pos + 1) === CharacterCodes.slash) {
8829
+ if (text2.charCodeAt(pos + 1) === CharacterCodes.slash) {
8830
8830
  pos += 2;
8831
- while (pos < text.length) {
8832
- if (isLineBreak(text.charCodeAt(pos))) {
8831
+ while (pos < text2.length) {
8832
+ if (isLineBreak(text2.charCodeAt(pos))) {
8833
8833
  break;
8834
8834
  }
8835
8835
  pos++;
@@ -8837,10 +8837,10 @@ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8837
8837
  canConsumeStar = false;
8838
8838
  continue;
8839
8839
  }
8840
- if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
8840
+ if (text2.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
8841
8841
  pos += 2;
8842
- while (pos < text.length) {
8843
- if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) {
8842
+ while (pos < text2.length) {
8843
+ if (text2.charCodeAt(pos) === CharacterCodes.asterisk && text2.charCodeAt(pos + 1) === CharacterCodes.slash) {
8844
8844
  pos += 2;
8845
8845
  break;
8846
8846
  }
@@ -8854,15 +8854,15 @@ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8854
8854
  case CharacterCodes.bar:
8855
8855
  case CharacterCodes.equals:
8856
8856
  case CharacterCodes.greaterThan:
8857
- if (isConflictMarkerTrivia(text, pos)) {
8858
- pos = scanConflictMarkerTrivia(text, pos);
8857
+ if (isConflictMarkerTrivia(text2, pos)) {
8858
+ pos = scanConflictMarkerTrivia(text2, pos);
8859
8859
  canConsumeStar = false;
8860
8860
  continue;
8861
8861
  }
8862
8862
  break;
8863
8863
  case CharacterCodes.hash:
8864
- if (pos === 0 && isShebangTrivia(text, pos)) {
8865
- pos = scanShebangTrivia(text, pos);
8864
+ if (pos === 0 && isShebangTrivia(text2, pos)) {
8865
+ pos = scanShebangTrivia(text2, pos);
8866
8866
  continue;
8867
8867
  }
8868
8868
  break;
@@ -8883,35 +8883,35 @@ function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
8883
8883
  return pos;
8884
8884
  }
8885
8885
  }
8886
- function isConflictMarkerTrivia(text, pos) {
8887
- if (pos >= text.length) {
8886
+ function isConflictMarkerTrivia(text2, pos) {
8887
+ if (pos >= text2.length) {
8888
8888
  return false;
8889
8889
  }
8890
- const ch = text.charCodeAt(pos);
8891
- if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) {
8890
+ const ch = text2.charCodeAt(pos);
8891
+ if (pos === 0 || isLineBreak(text2.charCodeAt(pos - 1))) {
8892
8892
  if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan || ch === CharacterCodes.equals) {
8893
- if (pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) {
8894
- return ch === CharacterCodes.equals || text.charCodeAt(pos + 7) === CharacterCodes.space;
8893
+ if (pos + 6 < text2.length && text2.charCodeAt(pos + 1) === ch && text2.charCodeAt(pos + 2) === ch && text2.charCodeAt(pos + 3) === ch && text2.charCodeAt(pos + 4) === ch && text2.charCodeAt(pos + 5) === ch && text2.charCodeAt(pos + 6) === ch) {
8894
+ return ch === CharacterCodes.equals || text2.charCodeAt(pos + 7) === CharacterCodes.space;
8895
8895
  }
8896
8896
  }
8897
- if (ch === CharacterCodes.bar && pos + 6 < text.length && text.charCodeAt(pos + 1) === ch && text.charCodeAt(pos + 2) === ch && text.charCodeAt(pos + 3) === ch && text.charCodeAt(pos + 4) === ch && text.charCodeAt(pos + 5) === ch && text.charCodeAt(pos + 6) === ch) {
8897
+ if (ch === CharacterCodes.bar && pos + 6 < text2.length && text2.charCodeAt(pos + 1) === ch && text2.charCodeAt(pos + 2) === ch && text2.charCodeAt(pos + 3) === ch && text2.charCodeAt(pos + 4) === ch && text2.charCodeAt(pos + 5) === ch && text2.charCodeAt(pos + 6) === ch) {
8898
8898
  return true;
8899
8899
  }
8900
8900
  }
8901
8901
  return false;
8902
8902
  }
8903
- function scanConflictMarkerTrivia(text, pos) {
8904
- const ch = text.charCodeAt(pos);
8905
- const len = text.length;
8903
+ function scanConflictMarkerTrivia(text2, pos) {
8904
+ const ch = text2.charCodeAt(pos);
8905
+ const len = text2.length;
8906
8906
  if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) {
8907
- while (pos < len && !isLineBreak(text.charCodeAt(pos))) {
8907
+ while (pos < len && !isLineBreak(text2.charCodeAt(pos))) {
8908
8908
  pos++;
8909
8909
  }
8910
8910
  } else {
8911
8911
  pos += 7;
8912
8912
  while (pos < len) {
8913
- const currentChar = text.charCodeAt(pos);
8914
- if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && isConflictMarkerTrivia(text, pos)) {
8913
+ const currentChar = text2.charCodeAt(pos);
8914
+ if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && isConflictMarkerTrivia(text2, pos)) {
8915
8915
  break;
8916
8916
  }
8917
8917
  pos++;
@@ -8919,13 +8919,13 @@ function scanConflictMarkerTrivia(text, pos) {
8919
8919
  }
8920
8920
  return pos;
8921
8921
  }
8922
- function isShebangTrivia(text, pos) {
8923
- return pos === 0 && text.charCodeAt(0) === CharacterCodes.hash && text.charCodeAt(1) === CharacterCodes.exclamation;
8922
+ function isShebangTrivia(text2, pos) {
8923
+ return pos === 0 && text2.charCodeAt(0) === CharacterCodes.hash && text2.charCodeAt(1) === CharacterCodes.exclamation;
8924
8924
  }
8925
- function scanShebangTrivia(text, pos) {
8925
+ function scanShebangTrivia(text2, pos) {
8926
8926
  pos += 2;
8927
- while (pos < text.length) {
8928
- if (isLineBreak(text.charCodeAt(pos))) {
8927
+ while (pos < text2.length) {
8928
+ if (isLineBreak(text2.charCodeAt(pos))) {
8929
8929
  break;
8930
8930
  }
8931
8931
  pos++;
@@ -9012,7 +9012,7 @@ function parsePseudoBigInt(stringValue) {
9012
9012
  return base10Value;
9013
9013
  }
9014
9014
  function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard, textInitial, start, length) {
9015
- var text = textInitial;
9015
+ var text2 = textInitial;
9016
9016
  var pos;
9017
9017
  var end;
9018
9018
  var fullStartPos;
@@ -9022,13 +9022,13 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9022
9022
  var tokenFlags;
9023
9023
  var commentDirectives;
9024
9024
  var skipJsDocLeadingAsterisks = 0;
9025
- setText(text, start, length);
9025
+ setText(text2, start, length);
9026
9026
  var scanner = {
9027
9027
  getTokenFullStart: () => fullStartPos,
9028
9028
  getTokenEnd: () => pos,
9029
9029
  getToken: () => token,
9030
9030
  getTokenStart: () => tokenStart,
9031
- getTokenText: () => text.substring(tokenStart, pos),
9031
+ getTokenText: () => text2.substring(tokenStart, pos),
9032
9032
  getTokenValue: () => tokenValue,
9033
9033
  hasUnicodeEscape: () => (tokenFlags & TokenFlags.UnicodeEscape) !== 0,
9034
9034
  hasExtendedUnicodeEscape: () => (tokenFlags & TokenFlags.ExtendedUnicodeEscape) !== 0,
@@ -9072,13 +9072,13 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9072
9072
  };
9073
9073
  return scanner;
9074
9074
  function codePointUnchecked(pos2) {
9075
- return codePointAt(text, pos2);
9075
+ return codePointAt(text2, pos2);
9076
9076
  }
9077
9077
  function codePointChecked(pos2) {
9078
9078
  return pos2 >= 0 && pos2 < end ? codePointUnchecked(pos2) : CharacterCodes.EOF;
9079
9079
  }
9080
9080
  function charCodeUnchecked(pos2) {
9081
- return text.charCodeAt(pos2);
9081
+ return text2.charCodeAt(pos2);
9082
9082
  }
9083
9083
  function charCodeChecked(pos2) {
9084
9084
  return pos2 >= 0 && pos2 < end ? charCodeUnchecked(pos2) : CharacterCodes.EOF;
@@ -9095,7 +9095,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9095
9095
  if (allowSeparator) {
9096
9096
  allowSeparator = false;
9097
9097
  isPreviousTokenSeparator = true;
9098
- result += text.substring(start2, pos);
9098
+ result += text2.substring(start2, pos);
9099
9099
  } else {
9100
9100
  tokenFlags |= TokenFlags.ContainsInvalidSeparator;
9101
9101
  }
@@ -9114,7 +9114,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9114
9114
  if (charCodeUnchecked(pos - 1) === CharacterCodes._) {
9115
9115
  tokenFlags |= TokenFlags.ContainsInvalidSeparator;
9116
9116
  }
9117
- return result + text.substring(start2, pos);
9117
+ return result + text2.substring(start2, pos);
9118
9118
  }
9119
9119
  function scanNumber() {
9120
9120
  let start2 = pos;
@@ -9157,7 +9157,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9157
9157
  const preNumericPart = pos;
9158
9158
  const finalFragment = scanNumberFragment();
9159
9159
  if (finalFragment) {
9160
- scientificFragment = text.substring(end2, preNumericPart) + finalFragment;
9160
+ scientificFragment = text2.substring(end2, preNumericPart) + finalFragment;
9161
9161
  end2 = pos;
9162
9162
  }
9163
9163
  }
@@ -9171,7 +9171,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9171
9171
  result += scientificFragment;
9172
9172
  }
9173
9173
  } else {
9174
- result = text.substring(start2, end2);
9174
+ result = text2.substring(start2, end2);
9175
9175
  }
9176
9176
  if (tokenFlags & TokenFlags.ContainsLeadingZero) {
9177
9177
  tokenValue = "" + +result;
@@ -9194,7 +9194,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9194
9194
  }
9195
9195
  const identifierStart = pos;
9196
9196
  const { length: length2 } = scanIdentifierParts();
9197
- if (!(length2 === 1 && text[identifierStart] === "n")) {
9197
+ if (!(length2 === 1 && text2[identifierStart] === "n")) {
9198
9198
  pos = identifierStart;
9199
9199
  }
9200
9200
  }
@@ -9207,7 +9207,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9207
9207
  }
9208
9208
  pos++;
9209
9209
  }
9210
- tokenValue = text.substring(start2, pos);
9210
+ tokenValue = text2.substring(start2, pos);
9211
9211
  return isOctal;
9212
9212
  }
9213
9213
  function scanExactNumberOfHexDigits(count, canHaveSeparators) {
@@ -9261,24 +9261,24 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9261
9261
  let start2 = pos;
9262
9262
  while (true) {
9263
9263
  if (pos >= end) {
9264
- result += text.substring(start2, pos);
9264
+ result += text2.substring(start2, pos);
9265
9265
  tokenFlags |= TokenFlags.Unterminated;
9266
9266
  break;
9267
9267
  }
9268
9268
  const ch = charCodeUnchecked(pos);
9269
9269
  if (ch === quote) {
9270
- result += text.substring(start2, pos);
9270
+ result += text2.substring(start2, pos);
9271
9271
  pos++;
9272
9272
  break;
9273
9273
  }
9274
9274
  if (ch === CharacterCodes.backslash && !jsxAttributeString) {
9275
- result += text.substring(start2, pos);
9275
+ result += text2.substring(start2, pos);
9276
9276
  result += scanEscapeSequence(EscapeSequenceScanningFlags.String | EscapeSequenceScanningFlags.ReportErrors);
9277
9277
  start2 = pos;
9278
9278
  continue;
9279
9279
  }
9280
9280
  if ((ch === CharacterCodes.lineFeed || ch === CharacterCodes.carriageReturn) && !jsxAttributeString) {
9281
- result += text.substring(start2, pos);
9281
+ result += text2.substring(start2, pos);
9282
9282
  tokenFlags |= TokenFlags.Unterminated;
9283
9283
  break;
9284
9284
  }
@@ -9294,32 +9294,32 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9294
9294
  let resultingToken;
9295
9295
  while (true) {
9296
9296
  if (pos >= end) {
9297
- contents += text.substring(start2, pos);
9297
+ contents += text2.substring(start2, pos);
9298
9298
  tokenFlags |= TokenFlags.Unterminated;
9299
9299
  resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail;
9300
9300
  break;
9301
9301
  }
9302
9302
  const currChar = charCodeUnchecked(pos);
9303
9303
  if (currChar === CharacterCodes.backtick) {
9304
- contents += text.substring(start2, pos);
9304
+ contents += text2.substring(start2, pos);
9305
9305
  pos++;
9306
9306
  resultingToken = startedWithBacktick ? SyntaxKind.NoSubstitutionTemplateLiteral : SyntaxKind.TemplateTail;
9307
9307
  break;
9308
9308
  }
9309
9309
  if (currChar === CharacterCodes.$ && pos + 1 < end && charCodeUnchecked(pos + 1) === CharacterCodes.openBrace) {
9310
- contents += text.substring(start2, pos);
9310
+ contents += text2.substring(start2, pos);
9311
9311
  pos += 2;
9312
9312
  resultingToken = startedWithBacktick ? SyntaxKind.TemplateHead : SyntaxKind.TemplateMiddle;
9313
9313
  break;
9314
9314
  }
9315
9315
  if (currChar === CharacterCodes.backslash) {
9316
- contents += text.substring(start2, pos);
9316
+ contents += text2.substring(start2, pos);
9317
9317
  contents += scanEscapeSequence(EscapeSequenceScanningFlags.String | (shouldEmitInvalidEscapeError ? EscapeSequenceScanningFlags.ReportErrors : 0));
9318
9318
  start2 = pos;
9319
9319
  continue;
9320
9320
  }
9321
9321
  if (currChar === CharacterCodes.carriageReturn) {
9322
- contents += text.substring(start2, pos);
9322
+ contents += text2.substring(start2, pos);
9323
9323
  pos++;
9324
9324
  if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) {
9325
9325
  pos++;
@@ -9363,17 +9363,17 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9363
9363
  }
9364
9364
  tokenFlags |= TokenFlags.ContainsInvalidEscape;
9365
9365
  if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) {
9366
- const code = parseInt(text.substring(start2 + 1, pos), 8);
9366
+ const code = parseInt(text2.substring(start2 + 1, pos), 8);
9367
9367
  return String.fromCharCode(code);
9368
9368
  }
9369
- return text.substring(start2, pos);
9369
+ return text2.substring(start2, pos);
9370
9370
  case CharacterCodes._8:
9371
9371
  case CharacterCodes._9:
9372
9372
  tokenFlags |= TokenFlags.ContainsInvalidEscape;
9373
9373
  if (flags & EscapeSequenceScanningFlags.ReportInvalidEscapeErrors) {
9374
9374
  return String.fromCharCode(ch);
9375
9375
  }
9376
- return text.substring(start2, pos);
9376
+ return text2.substring(start2, pos);
9377
9377
  case CharacterCodes.b:
9378
9378
  return "\b";
9379
9379
  case CharacterCodes.t:
@@ -9402,14 +9402,14 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9402
9402
  for (; pos < start2 + 6; pos++) {
9403
9403
  if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {
9404
9404
  tokenFlags |= TokenFlags.ContainsInvalidEscape;
9405
- return text.substring(start2, pos);
9405
+ return text2.substring(start2, pos);
9406
9406
  }
9407
9407
  }
9408
9408
  tokenFlags |= TokenFlags.UnicodeEscape;
9409
9409
  {
9410
- const escapedValue = parseInt(text.substring(start2 + 2, pos), 16);
9410
+ const escapedValue = parseInt(text2.substring(start2 + 2, pos), 16);
9411
9411
  const escapedValueString = String.fromCharCode(escapedValue);
9412
- if (flags & EscapeSequenceScanningFlags.AnyUnicodeMode && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text.substring(pos, pos + 2) === "\\u" && charCodeUnchecked(pos + 2) !== CharacterCodes.openBrace) {
9412
+ if (flags & EscapeSequenceScanningFlags.AnyUnicodeMode && escapedValue >= 55296 && escapedValue <= 56319 && pos + 6 < end && text2.substring(pos, pos + 2) === "\\u" && charCodeUnchecked(pos + 2) !== CharacterCodes.openBrace) {
9413
9413
  const nextStart = pos;
9414
9414
  let nextPos = pos + 2;
9415
9415
  for (; nextPos < nextStart + 6; nextPos++) {
@@ -9417,7 +9417,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9417
9417
  return escapedValueString;
9418
9418
  }
9419
9419
  }
9420
- const nextEscapedValue = parseInt(text.substring(nextStart + 2, nextPos), 16);
9420
+ const nextEscapedValue = parseInt(text2.substring(nextStart + 2, nextPos), 16);
9421
9421
  if (nextEscapedValue >= 56320 && nextEscapedValue <= 57343) {
9422
9422
  pos = nextPos;
9423
9423
  return escapedValueString + String.fromCharCode(nextEscapedValue);
@@ -9429,11 +9429,11 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9429
9429
  for (; pos < start2 + 4; pos++) {
9430
9430
  if (!(pos < end && isHexDigit(charCodeUnchecked(pos)))) {
9431
9431
  tokenFlags |= TokenFlags.ContainsInvalidEscape;
9432
- return text.substring(start2, pos);
9432
+ return text2.substring(start2, pos);
9433
9433
  }
9434
9434
  }
9435
9435
  tokenFlags |= TokenFlags.HexEscape;
9436
- return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));
9436
+ return String.fromCharCode(parseInt(text2.substring(start2 + 2, pos), 16));
9437
9437
  case CharacterCodes.carriageReturn:
9438
9438
  if (pos < end && charCodeUnchecked(pos) === CharacterCodes.lineFeed) {
9439
9439
  pos++;
@@ -9471,7 +9471,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9471
9471
  }
9472
9472
  if (isInvalidExtendedEscape) {
9473
9473
  tokenFlags |= TokenFlags.ContainsInvalidEscape;
9474
- return text.substring(start2, pos);
9474
+ return text2.substring(start2, pos);
9475
9475
  }
9476
9476
  tokenFlags |= TokenFlags.ExtendedUnicodeEscape;
9477
9477
  return utf16EncodeAsString(escapedValue);
@@ -9524,7 +9524,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9524
9524
  break;
9525
9525
  }
9526
9526
  tokenFlags |= TokenFlags.UnicodeEscape;
9527
- result += text.substring(start2, pos);
9527
+ result += text2.substring(start2, pos);
9528
9528
  result += utf16EncodeAsString(ch);
9529
9529
  pos += 6;
9530
9530
  start2 = pos;
@@ -9532,7 +9532,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9532
9532
  break;
9533
9533
  }
9534
9534
  }
9535
- result += text.substring(start2, pos);
9535
+ result += text2.substring(start2, pos);
9536
9536
  return result;
9537
9537
  }
9538
9538
  function getIdentifierToken() {
@@ -9567,7 +9567,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9567
9567
  if (!isDigit(ch) || ch - CharacterCodes._0 >= base) {
9568
9568
  break;
9569
9569
  }
9570
- value += text[pos];
9570
+ value += text2[pos];
9571
9571
  pos++;
9572
9572
  isPreviousTokenSeparator = false;
9573
9573
  }
@@ -9597,8 +9597,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9597
9597
  }
9598
9598
  const ch = codePointUnchecked(pos);
9599
9599
  if (pos === 0) {
9600
- if (ch === CharacterCodes.hash && isShebangTrivia(text, pos)) {
9601
- pos = scanShebangTrivia(text, pos);
9600
+ if (ch === CharacterCodes.hash && isShebangTrivia(text2, pos)) {
9601
+ pos = scanShebangTrivia(text2, pos);
9602
9602
  if (skipTrivia2) {
9603
9603
  continue;
9604
9604
  } else {
@@ -9750,7 +9750,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9750
9750
  }
9751
9751
  pos++;
9752
9752
  }
9753
- commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(tokenStart, pos), commentDirectiveRegExSingleLine, tokenStart);
9753
+ commentDirectives = appendIfCommentDirective(commentDirectives, text2.slice(tokenStart, pos), commentDirectiveRegExSingleLine, tokenStart);
9754
9754
  if (skipTrivia2) {
9755
9755
  continue;
9756
9756
  } else {
@@ -9777,9 +9777,9 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9777
9777
  }
9778
9778
  if (isJSDoc2) {
9779
9779
  tokenFlags |= TokenFlags.PrecedingJSDocComment;
9780
- tokenFlags = scanJSDocCommentForTags(text.slice(tokenStart, pos), tokenFlags);
9780
+ tokenFlags = scanJSDocCommentForTags(text2.slice(tokenStart, pos), tokenFlags);
9781
9781
  }
9782
- commentDirectives = appendIfCommentDirective(commentDirectives, text.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
9782
+ commentDirectives = appendIfCommentDirective(commentDirectives, text2.slice(lastLineStart, pos), commentDirectiveRegExMultiLine, lastLineStart);
9783
9783
  if (skipTrivia2) {
9784
9784
  continue;
9785
9785
  } else {
@@ -9845,8 +9845,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9845
9845
  pos++;
9846
9846
  return token = SyntaxKind.SemicolonToken;
9847
9847
  case CharacterCodes.lessThan:
9848
- if (isConflictMarkerTrivia(text, pos)) {
9849
- pos = scanConflictMarkerTrivia(text, pos);
9848
+ if (isConflictMarkerTrivia(text2, pos)) {
9849
+ pos = scanConflictMarkerTrivia(text2, pos);
9850
9850
  if (skipTrivia2) {
9851
9851
  continue;
9852
9852
  } else {
@@ -9868,8 +9868,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9868
9868
  pos++;
9869
9869
  return token = SyntaxKind.LessThanToken;
9870
9870
  case CharacterCodes.equals:
9871
- if (isConflictMarkerTrivia(text, pos)) {
9872
- pos = scanConflictMarkerTrivia(text, pos);
9871
+ if (isConflictMarkerTrivia(text2, pos)) {
9872
+ pos = scanConflictMarkerTrivia(text2, pos);
9873
9873
  if (skipTrivia2) {
9874
9874
  continue;
9875
9875
  } else {
@@ -9888,8 +9888,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9888
9888
  pos++;
9889
9889
  return token = SyntaxKind.EqualsToken;
9890
9890
  case CharacterCodes.greaterThan:
9891
- if (isConflictMarkerTrivia(text, pos)) {
9892
- pos = scanConflictMarkerTrivia(text, pos);
9891
+ if (isConflictMarkerTrivia(text2, pos)) {
9892
+ pos = scanConflictMarkerTrivia(text2, pos);
9893
9893
  if (skipTrivia2) {
9894
9894
  continue;
9895
9895
  } else {
@@ -9926,8 +9926,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9926
9926
  pos++;
9927
9927
  return token = SyntaxKind.OpenBraceToken;
9928
9928
  case CharacterCodes.bar:
9929
- if (isConflictMarkerTrivia(text, pos)) {
9930
- pos = scanConflictMarkerTrivia(text, pos);
9929
+ if (isConflictMarkerTrivia(text2, pos)) {
9930
+ pos = scanConflictMarkerTrivia(text2, pos);
9931
9931
  if (skipTrivia2) {
9932
9932
  continue;
9933
9933
  } else {
@@ -9971,7 +9971,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
9971
9971
  return token = SyntaxKind.Unknown;
9972
9972
  }
9973
9973
  case CharacterCodes.hash:
9974
- if (pos !== 0 && text[pos + 1] === "!") {
9974
+ if (pos !== 0 && text2[pos + 1] === "!") {
9975
9975
  pos++;
9976
9976
  return token = SyntaxKind.Unknown;
9977
9977
  }
@@ -10040,7 +10040,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10040
10040
  pos += charSize(ch);
10041
10041
  while (pos < end && isIdentifierPart(ch = codePointUnchecked(pos)))
10042
10042
  pos += charSize(ch);
10043
- tokenValue = text.substring(tokenStart, pos);
10043
+ tokenValue = text2.substring(tokenStart, pos);
10044
10044
  if (ch === CharacterCodes.backslash) {
10045
10045
  tokenValue += scanIdentifierParts();
10046
10046
  }
@@ -10149,13 +10149,13 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10149
10149
  pos += size;
10150
10150
  }
10151
10151
  }
10152
- tokenValue = text.substring(tokenStart, pos);
10152
+ tokenValue = text2.substring(tokenStart, pos);
10153
10153
  token = SyntaxKind.RegularExpressionLiteral;
10154
10154
  }
10155
10155
  return token;
10156
10156
  }
10157
- function appendIfCommentDirective(commentDirectives2, text2, commentDirectiveRegEx, lineStart) {
10158
- const type = getDirectiveFromComment(text2.trimStart(), commentDirectiveRegEx);
10157
+ function appendIfCommentDirective(commentDirectives2, text3, commentDirectiveRegEx, lineStart) {
10158
+ const type = getDirectiveFromComment(text3.trimStart(), commentDirectiveRegEx);
10159
10159
  if (type === void 0) {
10160
10160
  return commentDirectives2;
10161
10161
  }
@@ -10168,8 +10168,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10168
10168
  });
10169
10169
  return commentDirectives2;
10170
10170
  }
10171
- function getDirectiveFromComment(text2, commentDirectiveRegEx) {
10172
- const match = commentDirectiveRegEx.exec(text2);
10171
+ function getDirectiveFromComment(text3, commentDirectiveRegEx) {
10172
+ const match = commentDirectiveRegEx.exec(text3);
10173
10173
  if (!match) {
10174
10174
  return void 0;
10175
10175
  }
@@ -10239,8 +10239,8 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10239
10239
  break;
10240
10240
  }
10241
10241
  if (char === CharacterCodes.lessThan) {
10242
- if (isConflictMarkerTrivia(text, pos)) {
10243
- pos = scanConflictMarkerTrivia(text, pos);
10242
+ if (isConflictMarkerTrivia(text2, pos)) {
10243
+ pos = scanConflictMarkerTrivia(text2, pos);
10244
10244
  return token = SyntaxKind.ConflictMarkerTrivia;
10245
10245
  }
10246
10246
  break;
@@ -10254,7 +10254,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10254
10254
  }
10255
10255
  pos++;
10256
10256
  }
10257
- tokenValue = text.substring(fullStartPos, pos);
10257
+ tokenValue = text2.substring(fullStartPos, pos);
10258
10258
  return firstNonWhitespace === -1 ? SyntaxKind.JsxTextAllWhiteSpaces : SyntaxKind.JsxText;
10259
10259
  }
10260
10260
  function scanJsxIdentifier() {
@@ -10312,7 +10312,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10312
10312
  if (pos === tokenStart) {
10313
10313
  return scanJsDocToken();
10314
10314
  }
10315
- tokenValue = text.substring(tokenStart, pos);
10315
+ tokenValue = text2.substring(tokenStart, pos);
10316
10316
  return token = SyntaxKind.JSDocCommentTextToken;
10317
10317
  }
10318
10318
  function scanJsDocToken() {
@@ -10393,7 +10393,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10393
10393
  let char = ch;
10394
10394
  while (pos < end && isIdentifierPart(char = codePointUnchecked(pos)) || char === CharacterCodes.minus)
10395
10395
  pos += charSize(char);
10396
- tokenValue = text.substring(tokenStart, pos);
10396
+ tokenValue = text2.substring(tokenStart, pos);
10397
10397
  if (char === CharacterCodes.backslash) {
10398
10398
  tokenValue += scanIdentifierParts();
10399
10399
  }
@@ -10429,7 +10429,7 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10429
10429
  const saveTokenValue = tokenValue;
10430
10430
  const saveTokenFlags = tokenFlags;
10431
10431
  const saveErrorExpectations = commentDirectives;
10432
- setText(text, start2, length2);
10432
+ setText(text2, start2, length2);
10433
10433
  const result = callback();
10434
10434
  end = saveEnd;
10435
10435
  pos = savePos;
@@ -10456,14 +10456,14 @@ function createScanner(skipTrivia2, languageVariant = LanguageVariant.Standard,
10456
10456
  );
10457
10457
  }
10458
10458
  function getText() {
10459
- return text;
10459
+ return text2;
10460
10460
  }
10461
10461
  function clearCommentDirectives() {
10462
10462
  commentDirectives = void 0;
10463
10463
  }
10464
10464
  function setText(newText, start2, length2) {
10465
- text = newText || "";
10466
- end = length2 === void 0 ? text.length : start2 + length2;
10465
+ text2 = newText || "";
10466
+ end = length2 === void 0 ? text2.length : start2 + length2;
10467
10467
  resetTokenState(start2 || 0);
10468
10468
  }
10469
10469
  function setLanguageVariant(variant) {
@@ -11567,12 +11567,12 @@ var StringTable = class {
11567
11567
  this.byteLen = 0;
11568
11568
  this.offsets = [];
11569
11569
  }
11570
- add(text) {
11570
+ add(text2) {
11571
11571
  const index = this.offsets.length;
11572
11572
  const encoder2 = cachedEncoder();
11573
- const encodedLength = encoder2.encode(text).length;
11573
+ const encodedLength = encoder2.encode(text2).length;
11574
11574
  const offset = this.byteLen;
11575
- this.parts.push(text);
11575
+ this.parts.push(text2);
11576
11576
  this.byteLen += encodedLength;
11577
11577
  this.offsets.push(offset, offset + encodedLength);
11578
11578
  return index;
@@ -11653,17 +11653,17 @@ function recordExtendedData(node, strs, extendedData, structuredWriter) {
11653
11653
  extendedData.push(textIndex, fileNameIndex, pathIndex, sf.languageVariant, sf.scriptKind, referencedFilesOffset, typeRefDirectivesOffset, libRefDirectivesOffset, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, NO_STRUCTURED_DATA, 0);
11654
11654
  } else if (node.kind === SyntaxKind.TemplateHead || node.kind === SyntaxKind.TemplateMiddle || node.kind === SyntaxKind.TemplateTail) {
11655
11655
  const tmpl = node;
11656
- const text = tmpl.text ?? "";
11656
+ const text2 = tmpl.text ?? "";
11657
11657
  const rawText = tmpl.rawText ?? "";
11658
11658
  const templateFlags = tmpl.templateFlags ?? 0;
11659
- const textIndex = strs.add(text);
11659
+ const textIndex = strs.add(text2);
11660
11660
  const rawTextIndex = strs.add(rawText);
11661
11661
  extendedData.push(textIndex, rawTextIndex, templateFlags);
11662
11662
  } else {
11663
11663
  const n = node;
11664
- const text = n.text ?? "";
11664
+ const text2 = n.text ?? "";
11665
11665
  const tokenFlags = n.tokenFlags ?? 0;
11666
- const textIndex = strs.add(text);
11666
+ const textIndex = strs.add(text2);
11667
11667
  extendedData.push(textIndex, tokenFlags);
11668
11668
  }
11669
11669
  return offset;
@@ -12178,8 +12178,8 @@ var RemoteNode = class _RemoteNode extends RemoteNodeBase {
12178
12178
  const start = this.view.getUint32(offsetStringTableOffsets + index * 4, true);
12179
12179
  const end = this.view.getUint32(offsetStringTableOffsets + (index + 1) * 4, true);
12180
12180
  const offsetStringTable = this.sourceFile._offsetStringTable;
12181
- const text = new Uint8Array(this.view.buffer, this.view.byteOffset + offsetStringTable + start, end - start);
12182
- return this.sourceFile._decoder.decode(text);
12181
+ const text2 = new Uint8Array(this.view.buffer, this.view.byteOffset + offsetStringTable + start, end - start);
12182
+ return this.sourceFile._decoder.decode(text2);
12183
12183
  }
12184
12184
  getOrCreateChildAtNodeIndex(index) {
12185
12185
  let child = this.sourceFile.nodes[index];
@@ -12887,9 +12887,9 @@ var RemoteSourceFile = class extends RemoteNode {
12887
12887
  get text() {
12888
12888
  if (this._cachedText !== void 0)
12889
12889
  return this._cachedText;
12890
- const text = super.text;
12891
- this._cachedText = text;
12892
- return text;
12890
+ const text2 = super.text;
12891
+ this._cachedText = text2;
12892
+ return text2;
12893
12893
  }
12894
12894
  // ═══ Line/character position mapping ═══
12895
12895
  getLineStarts() {
@@ -14540,10 +14540,10 @@ var Checker = class {
14540
14540
  return data ? this.objectRegistry.getOrCreateSymbol(data) : void 0;
14541
14541
  }
14542
14542
  async getResolvedSymbol(node) {
14543
- const text = node.text;
14544
- if (!text)
14543
+ const text2 = node.text;
14544
+ if (!text2)
14545
14545
  return void 0;
14546
- return this.resolveName(text, SymbolFlags.Value | SymbolFlags.ExportValue, node);
14546
+ return this.resolveName(text2, SymbolFlags.Value | SymbolFlags.ExportValue, node);
14547
14547
  }
14548
14548
  async getContextualType(node) {
14549
14549
  const data = await this.client.apiRequest("getContextualType", {
@@ -15465,14 +15465,14 @@ var mapRelativePath = (absolute) => absolute.startsWith(MAP_WORKSPACE) ? absolut
15465
15465
  var MapVirtualFiles = class {
15466
15466
  constructor(input) {
15467
15467
  this.input = input;
15468
- for (const [relative, text] of Object.entries(input.files))
15469
- this.files.set(mapVirtualPath(relative), text);
15468
+ for (const [relative, text2] of Object.entries(input.files))
15469
+ this.files.set(mapVirtualPath(relative), text2);
15470
15470
  for (const relative of input.inventory) this.inventory.set(mapVirtualPath(relative), relative);
15471
15471
  const libraryDirectory = path2.dirname(input.compilerPath);
15472
15472
  for (const name of readdirSync(libraryDirectory)) {
15473
15473
  if (!/^lib(?:\.[a-z0-9_-]+)*\.d\.ts$/u.test(name)) continue;
15474
- const text = readFileSync(path2.join(libraryDirectory, name), "utf8");
15475
- this.files.set(path2.join(libraryDirectory, name), text);
15474
+ const text2 = readFileSync(path2.join(libraryDirectory, name), "utf8");
15475
+ this.files.set(path2.join(libraryDirectory, name), text2);
15476
15476
  }
15477
15477
  for (const file2 of /* @__PURE__ */ new Set([...this.files.keys(), ...this.inventory.keys()]))
15478
15478
  this.addPath(file2);
@@ -15485,8 +15485,8 @@ var MapVirtualFiles = class {
15485
15485
  inventory = /* @__PURE__ */ new Map();
15486
15486
  directories = /* @__PURE__ */ new Map();
15487
15487
  aliases = /* @__PURE__ */ new Map();
15488
- set(relative, text) {
15489
- this.files.set(mapVirtualPath(relative), text);
15488
+ set(relative, text2) {
15489
+ this.files.set(mapVirtualPath(relative), text2);
15490
15490
  this.addPath(mapVirtualPath(relative));
15491
15491
  }
15492
15492
  alias(relative, target) {
@@ -15548,8 +15548,8 @@ var MapVirtualFiles = class {
15548
15548
 
15549
15549
  // src/project-map-workspace-membership.ts
15550
15550
  import path3 from "node:path";
15551
- function pnpmPackages(text) {
15552
- const lines = text.replace(/^\uFEFF/u, "").split(/\r?\n/u).filter((line) => line.trim() && !line.trimStart().startsWith("#"));
15551
+ function pnpmPackages(text2) {
15552
+ const lines = text2.replace(/^\uFEFF/u, "").split(/\r?\n/u).filter((line) => line.trim() && !line.trimStart().startsWith("#"));
15553
15553
  if (!/^packages:\s*(?:#.*)?$/u.test(lines[0] ?? "")) return void 0;
15554
15554
  const patterns = [];
15555
15555
  for (const line of lines.slice(1)) {
@@ -15604,11 +15604,11 @@ var packageName = /^(?:@[a-z0-9_.-]+\/)?[a-z0-9_.-]+$/u;
15604
15604
  var inside = (root, file2) => file2.startsWith(`${root}/`);
15605
15605
  async function discoverMapConfiguration(api, files) {
15606
15606
  const manifests = /* @__PURE__ */ new Map();
15607
- for (const [file2, text] of Object.entries(files.input.files)) {
15607
+ for (const [file2, text2] of Object.entries(files.input.files)) {
15608
15608
  if (!packagePath.test(file2)) continue;
15609
15609
  files.configurations.add(file2);
15610
15610
  try {
15611
- const value = JSON.parse(text);
15611
+ const value = JSON.parse(text2);
15612
15612
  if (typeof value?.name !== "string" || !packageName.test(value.name)) continue;
15613
15613
  const into = manifests.get(value.name);
15614
15614
  if (into) into.push({ path: file2, value });
@@ -16130,6 +16130,109 @@ var MapTargetResolver = class {
16130
16130
  }
16131
16131
  };
16132
16132
 
16133
+ // src/project-map-routes.ts
16134
+ var HTTP_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"]);
16135
+ var PATH = /^(?:[A-Z]+ +)?\/\S*$/u;
16136
+ var text = (node) => node && (isStringLiteral(node) || isNoSubstitutionTemplateLiteral(node)) ? node.text : void 0;
16137
+ var pathText = (node) => {
16138
+ const value = text(node);
16139
+ return value !== void 0 && value.length <= 256 && PATH.test(value) ? value : void 0;
16140
+ };
16141
+ var isFunction = (node) => node.kind === SyntaxKind.ArrowFunction || node.kind === SyntaxKind.FunctionExpression;
16142
+ var isDeclaration = (node) => node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.SourceFile;
16143
+ function joinRoute(prefix, path6) {
16144
+ const joined = !prefix ? path6 : !path6 ? prefix : `${prefix.replace(/\/+$/u, "")}/${path6.replace(/^\/+/u, "")}`;
16145
+ return joined.startsWith("/") || joined.startsWith("$") ? joined : `/${joined}`;
16146
+ }
16147
+ var httpMethod = (name) => HTTP_METHODS.has(name.toUpperCase()) ? name.toUpperCase() : void 0;
16148
+ function registeredRoute(node, kind) {
16149
+ for (let child = node, parent = node.parent; parent; child = parent, parent = parent.parent) {
16150
+ if (isCallExpression(parent) && parent.arguments.includes(child)) {
16151
+ const registration = routeOf(parent, parent.arguments.indexOf(child));
16152
+ const direct = child === node && (kind === "REFERENCES" || registration?.method);
16153
+ if (registration && (isFunction(child) || direct)) return registration.label;
16154
+ }
16155
+ if (isDeclaration(parent)) return void 0;
16156
+ }
16157
+ return void 0;
16158
+ }
16159
+ function routeOf(call, index) {
16160
+ const callee = call.expression;
16161
+ const name = isPropertyAccessExpression(callee) ? callee.name.text : void 0;
16162
+ let path6;
16163
+ let receiver = isPropertyAccessExpression(callee) ? callee.expression : void 0;
16164
+ const at = call.arguments.findIndex((argument) => pathText(argument) !== void 0);
16165
+ if (at >= 0) {
16166
+ if (index <= at) return void 0;
16167
+ path6 = pathText(call.arguments[at]);
16168
+ } else if (name && httpMethod(name) && receiver && isCallExpression(receiver) && isPropertyAccessExpression(receiver.expression) && receiver.arguments.length === 1) {
16169
+ path6 = pathText(receiver.arguments[0]);
16170
+ receiver = receiver.expression.expression;
16171
+ }
16172
+ if (path6 === void 0) return void 0;
16173
+ let method;
16174
+ const space = path6.indexOf(" ");
16175
+ if (space > 0) [method, path6] = [path6.slice(0, space), path6.slice(space).trimStart()];
16176
+ method ??= name ? httpMethod(name) : void 0;
16177
+ if (path6 === "/" && !method) return void 0;
16178
+ const full = joinRoute(receiver ? routerPrefix(receiver, 0) : "", path6);
16179
+ const label = method ? `${method} ${full}` : full;
16180
+ return label.length <= 256 ? { label, ...method ? { method } : {} } : { label: path6 };
16181
+ }
16182
+ function routerPrefix(expression, depth) {
16183
+ if (depth > 8) return "";
16184
+ if (isCallExpression(expression)) {
16185
+ const callee = expression.expression;
16186
+ if (!isPropertyAccessExpression(callee)) return "";
16187
+ const base = routerPrefix(callee.expression, depth + 1);
16188
+ const path6 = expression.arguments.length === 1 ? pathText(expression.arguments[0]) : void 0;
16189
+ return path6 === void 0 || path6.includes(" ") ? base : joinRoute(base, path6);
16190
+ }
16191
+ if (isIdentifier(expression)) {
16192
+ const declaration = constDeclaration(expression);
16193
+ return declaration ? routerPrefix(declaration, depth + 1) : "";
16194
+ }
16195
+ return "";
16196
+ }
16197
+ function constDeclaration(name) {
16198
+ for (let scope = name.parent; scope; scope = scope.parent) {
16199
+ const statements = scope.statements;
16200
+ for (const statement of statements ?? []) {
16201
+ if (statement.kind !== SyntaxKind.VariableStatement) continue;
16202
+ const list = statement.declarationList;
16203
+ if (!(list.flags & NodeFlags.Const)) continue;
16204
+ for (const declaration of list.declarations) {
16205
+ const { name: bound, initializer: initializer3 } = declaration;
16206
+ if (isIdentifier(bound) && bound.text === name.text && initializer3) return initializer3;
16207
+ }
16208
+ }
16209
+ }
16210
+ return void 0;
16211
+ }
16212
+ function decoratorRoute(decorator, argument) {
16213
+ const call = isCallExpression(decorator.expression) ? decorator.expression : void 0;
16214
+ const callee = call ? call.expression : decorator.expression;
16215
+ const name = isIdentifier(callee) ? callee.text : isPropertyAccessExpression(callee) ? callee.name.text : void 0;
16216
+ const method = name && (name === name.toUpperCase() || /^[A-Z][a-z]+$/u.test(name)) ? httpMethod(name) : void 0;
16217
+ if (!method) return void 0;
16218
+ const member = decorator.parent;
16219
+ const owner = member?.parent;
16220
+ let prefix = "";
16221
+ if (owner?.kind === SyntaxKind.ClassDeclaration || owner?.kind === SyntaxKind.ClassExpression)
16222
+ for (const modifier of owner.modifiers ?? []) {
16223
+ if (modifier.kind !== SyntaxKind.Decorator) continue;
16224
+ const expression = modifier.expression;
16225
+ const value = isCallExpression(expression) ? text(expression.arguments[0]) : void 0;
16226
+ if (value !== void 0 && value.length <= 256) {
16227
+ prefix = value;
16228
+ break;
16229
+ }
16230
+ }
16231
+ const path6 = argument ?? (call && text(call.arguments[0])) ?? "";
16232
+ const route = `${method} ${joinRoute(prefix, path6)}`;
16233
+ return route.length <= 256 ? route : void 0;
16234
+ }
16235
+
16133
16236
  // src/project-map-source-files.ts
16134
16237
  async function* mapSourceFiles(project, input, trace) {
16135
16238
  const owned = new Set(input.rootFiles ?? Object.keys(input.files));
@@ -16172,14 +16275,14 @@ var MapSourcePositions = class {
16172
16275
  lines = /* @__PURE__ */ new Map();
16173
16276
  anchor(node, file2) {
16174
16277
  const relative = file2.fileName.slice(MAP_WORKSPACE.length);
16175
- const text = this.files[relative];
16176
- if (text === void 0) throw new Error("PROJECT_MAP_LOCATION_OUTSIDE_INPUT");
16177
- return this.span(relative, node === file2 ? 0 : skipTrivia(text, node.pos), node.end);
16278
+ const text2 = this.files[relative];
16279
+ if (text2 === void 0) throw new Error("PROJECT_MAP_LOCATION_OUTSIDE_INPUT");
16280
+ return this.span(relative, node === file2 ? 0 : skipTrivia(text2, node.pos), node.end);
16178
16281
  }
16179
16282
  span(relative, start, end) {
16180
- const text = this.files[relative];
16181
- if (text === void 0) throw new Error("PROJECT_MAP_LOCATION_OUTSIDE_INPUT");
16182
- const lines = this.lines.get(relative) ?? computeLineStarts(text);
16283
+ const text2 = this.files[relative];
16284
+ if (text2 === void 0) throw new Error("PROJECT_MAP_LOCATION_OUTSIDE_INPUT");
16285
+ const lines = this.lines.get(relative) ?? computeLineStarts(text2);
16183
16286
  this.lines.set(relative, lines);
16184
16287
  const lineAt = (offset) => {
16185
16288
  let low = 0;
@@ -23839,8 +23942,8 @@ function ko_default() {
23839
23942
  }
23840
23943
 
23841
23944
  // node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/locales/lt.js
23842
- var capitalizeFirstCharacter = (text) => {
23843
- return text.charAt(0).toUpperCase() + text.slice(1);
23945
+ var capitalizeFirstCharacter = (text2) => {
23946
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
23844
23947
  };
23845
23948
  function getUnitTypeFromNumber(number4) {
23846
23949
  const abs = Math.abs(number4);
@@ -30826,8 +30929,11 @@ var MapRelationSchema = external_exports.object({
30826
30929
  anchor: MapAnchorSchema,
30827
30930
  target: external_exports.string(),
30828
30931
  // A literal the relation carries: a decorator's first argument on the declaration itself, or
30829
- // the path a call or value is registered under; both are usually routes.
30932
+ // the route a call or value is registered under (its methods, if named, then its path).
30830
30933
  argument: external_exports.string().min(1).max(256).optional(),
30934
+ // The full route a decorator registers its declaration under, when it says more than the
30935
+ // argument: the HTTP methods, then the class's path joined with the member's.
30936
+ route: external_exports.string().min(1).max(256).optional(),
30831
30937
  basis: external_exports.enum(["TYPE_RESOLVED", "SYNTAX_DECLARED", "UNRESOLVED"]),
30832
30938
  unresolvedReason: external_exports.enum([
30833
30939
  "SYNTAX_ONLY",
@@ -31099,23 +31205,27 @@ async function extractProjectMap(project, input, trace) {
31099
31205
  target: moduleSpecifier.text
31100
31206
  };
31101
31207
  } else if (isCallExpression(node) || isNewExpression(node)) {
31208
+ const route = registeredRoute(node, "CALLS");
31102
31209
  reference = {
31103
31210
  node,
31104
31211
  lookup: node.expression,
31105
31212
  kind: "CALLS",
31106
- target: mapNodeLabel(node.expression)
31213
+ target: mapNodeLabel(node.expression),
31214
+ ...route ? { argument: route } : {}
31107
31215
  };
31108
31216
  } else if (isDecorator(node)) {
31109
31217
  const call = isCallExpression(node.expression) ? node.expression : void 0;
31110
31218
  const expression = call ? call.expression : node.expression;
31111
31219
  const first = call?.arguments[0];
31112
31220
  const argument = node.parent.kind !== SyntaxKind.Parameter && first && (isStringLiteral(first) || isNoSubstitutionTemplateLiteral(first)) && first.text.length > 0 && first.text.length <= 256 ? first.text : void 0;
31221
+ const route = node.parent.kind !== SyntaxKind.Parameter ? decoratorRoute(node, argument) : void 0;
31113
31222
  reference = {
31114
31223
  node,
31115
31224
  lookup: expression,
31116
31225
  kind: "DECORATED_BY",
31117
31226
  target: mapNodeLabel(expression),
31118
- ...argument ? { argument } : {}
31227
+ ...argument ? { argument } : {},
31228
+ ...route && route !== argument ? { route } : {}
31119
31229
  };
31120
31230
  } else if (isPropertyAccessExpression(node) || isElementAccessExpression(node)) {
31121
31231
  const writes = isMapWrite(node);
@@ -31127,12 +31237,14 @@ async function extractProjectMap(project, input, trace) {
31127
31237
  target: mapNodeLabel(node)
31128
31238
  };
31129
31239
  } else if (isPropertyAccessExpression(node) && mapValueUse(node)) {
31240
+ const route = registeredRoute(node, "REFERENCES");
31130
31241
  reference = {
31131
31242
  node,
31132
31243
  lookup: node.name,
31133
31244
  kind: "REFERENCES",
31134
31245
  target: node.name.text,
31135
- holder: mapValueProperty(node)
31246
+ holder: mapValueProperty(node),
31247
+ ...route ? { argument: route } : {}
31136
31248
  };
31137
31249
  }
31138
31250
  } else if (isIdentifier(node) && mapDeclarationName(node.parent) !== node) {
@@ -31140,14 +31252,17 @@ async function extractProjectMap(project, input, trace) {
31140
31252
  if (!((isCallExpression(parent) || isNewExpression(parent)) && parent.expression === node)) {
31141
31253
  const writes = isMapWrite(node);
31142
31254
  if (writes) reference = { node, lookup: node, kind: "WRITES", target: mapNodeLabel(node) };
31143
- else if (mapValueUse(node))
31255
+ else if (mapValueUse(node)) {
31256
+ const route = registeredRoute(node, "REFERENCES");
31144
31257
  reference = {
31145
31258
  node,
31146
31259
  lookup: node,
31147
31260
  kind: "REFERENCES",
31148
31261
  target: node.text,
31149
- holder: mapValueProperty(node)
31262
+ holder: mapValueProperty(node),
31263
+ ...route ? { argument: route } : {}
31150
31264
  };
31265
+ }
31151
31266
  }
31152
31267
  } else if (isShorthandPropertyAssignment(node)) {
31153
31268
  reference = {
@@ -31292,6 +31407,7 @@ async function extractProjectMap(project, input, trace) {
31292
31407
  kind: item.kind,
31293
31408
  anchor: item.anchor,
31294
31409
  target: item.target,
31410
+ ...item.argument ? { argument: item.argument } : {},
31295
31411
  basis: "TYPE_RESOLVED"
31296
31412
  });
31297
31413
  continue;
@@ -31307,6 +31423,7 @@ async function extractProjectMap(project, input, trace) {
31307
31423
  anchor: item.anchor,
31308
31424
  target: item.target,
31309
31425
  ...item.argument ? { argument: item.argument } : {},
31426
+ ...item.route ? { route: item.route } : {},
31310
31427
  basis: directObject ? "SYNTAX_DECLARED" : destination ? "TYPE_RESOLVED" : "UNRESOLVED",
31311
31428
  ...!destination ? { unresolvedReason: resolved.unresolvedReason } : {}
31312
31429
  });