weapp-tailwindcss 5.2.11 → 5.2.13

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.
Files changed (71) hide show
  1. package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +6 -0
  2. package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -1
  3. package/dist/bundlers/shared/hmr-timing.d.ts +1 -0
  4. package/dist/bundlers/shared/source-candidates/scan-root.d.ts +2 -0
  5. package/dist/bundlers/vite/css-finalizer/generic-web-fast-path.d.ts +16 -0
  6. package/dist/bundlers/vite/css-finalizer/options.d.ts +5 -0
  7. package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -0
  8. package/dist/bundlers/vite/shared/generic-web-production-fast-path.d.ts +28 -0
  9. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -0
  10. package/dist/cli.cjs +372 -293
  11. package/dist/cli.js +20 -11
  12. package/dist/{context-DbL0d-zB.js → context-CKQKq4Mv.js} +19 -8
  13. package/dist/{context-C3TryIjF.cjs → context-vWlNv-Cf.cjs} +17 -11
  14. package/dist/core.cjs +1 -1
  15. package/dist/core.js +1 -1
  16. package/dist/{css-imports-DfNC3e6a.cjs → css-imports-BFMU7Hpd.cjs} +1 -1
  17. package/dist/css-macro/postcss.cjs +1 -1
  18. package/dist/css-macro.cjs +1 -1
  19. package/dist/defaults.cjs +2 -0
  20. package/dist/defaults.js +2 -0
  21. package/dist/framework.cjs +1 -1
  22. package/dist/{generator-BLpOsd5O.js → generator-BP4WmgIo.js} +36 -15
  23. package/dist/{generator-B0dCFlP1.cjs → generator-BXrWA7Sj.cjs} +43 -22
  24. package/dist/generator.cjs +1 -1
  25. package/dist/generator.js +1 -1
  26. package/dist/{gulp-DSrcDQsA.cjs → gulp-DxKLSgXX.cjs} +16 -13
  27. package/dist/{gulp-BLaGc0MJ.js → gulp-G--cGMcR.js} +12 -9
  28. package/dist/gulp.cjs +1 -1
  29. package/dist/gulp.js +1 -1
  30. package/dist/{hmr-timing-BnGBBJ6S.cjs → hmr-timing-BtqnyxAO.cjs} +5 -5
  31. package/dist/{hmr-timing-DXyGw6jp.js → hmr-timing-iTua_Z55.js} +47 -16
  32. package/dist/index.cjs +4 -4
  33. package/dist/index.js +4 -4
  34. package/dist/{object-Bvy6-w9r.js → object-B-8IHefx.js} +4 -4
  35. package/dist/{object-C_Vr6_S5.cjs → object-DbHtAXRk.cjs} +4 -4
  36. package/dist/{options-zpZez7qe.cjs → options-DbYws6lr.cjs} +8 -17
  37. package/dist/{pipeline-helpers-B5CzvTUJ.cjs → pipeline-helpers-DnYpfbat.cjs} +25 -10
  38. package/dist/postcss-html-transform.cjs +1 -1
  39. package/dist/postcss.cjs +1 -1
  40. package/dist/postcss.js +1 -1
  41. package/dist/presets.cjs +6 -5
  42. package/dist/presets.js +4 -3
  43. package/dist/reset.cjs +1 -1
  44. package/dist/{rolldown-runtime-CVvi-lCc.cjs → rolldown-runtime-Ctb5zv51.cjs} +1 -1
  45. package/dist/rspack.cjs +2 -2
  46. package/dist/rspack.js +1 -1
  47. package/dist/{runtime-registry-Y7NrD2WH.cjs → runtime-registry-BlIjpImP.cjs} +10 -0
  48. package/dist/{source-candidate-scan-signature-GjsLzP8Z.cjs → source-candidate-scan-signature-Ggn8fzkT.cjs} +6 -5
  49. package/dist/{source-candidate-scan-signature-xgmxO8_F.js → source-candidate-scan-signature-TKJIs7VF.js} +5 -4
  50. package/dist/{style-options-COpQc8fr.cjs → style-options-Cta1OP3i.cjs} +9 -4
  51. package/dist/{tailwindcss-2zdmASlM.js → tailwindcss-C2K-vjJv.js} +20 -20
  52. package/dist/{tailwindcss-LtnGCxF0.cjs → tailwindcss-D1M2xj5O.cjs} +17 -13
  53. package/dist/{transform-BlsDWgjt.js → transform-52FLRu-0.js} +2 -2
  54. package/dist/{transform-9wbmvHcC.cjs → transform-BiHG42Rp.cjs} +2 -2
  55. package/dist/types/user-defined-options/general.d.ts +2 -0
  56. package/dist/{v4-generation-core-D4zQcQqW.cjs → v4-generation-core-D-zVR2mt.cjs} +53 -16
  57. package/dist/{vite-BWmBFzgf.js → vite-B577QMUl.js} +317 -82
  58. package/dist/{vite-DTDbD-95.cjs → vite-BFWJAH16.cjs} +322 -87
  59. package/dist/vite.cjs +1 -1
  60. package/dist/vite.js +1 -1
  61. package/dist/{watch-dependencies-BZGubvuJ.cjs → watch-dependencies-DLZDrWdH.cjs} +1 -1
  62. package/dist/weapp-tw-css-generation-loader.cjs +1 -1
  63. package/dist/weapp-tw-css-import-rewrite-loader.cjs +14 -12
  64. package/dist/weapp-tw-runtime-classset-loader.cjs +5 -4
  65. package/dist/{webpack-CtUyQNqC.js → webpack-DLJkStre.js} +41 -22
  66. package/dist/{webpack-Bpovb6YE.cjs → webpack-DTqFKvcE.cjs} +46 -36
  67. package/dist/webpack.cjs +1 -1
  68. package/dist/webpack.js +1 -1
  69. package/dist/{wxml-CWJc0yY-.js → wxml-B7OAVpXJ.js} +10 -6
  70. package/dist/{wxml-DUIdXCVa.cjs → wxml-CQmBCjOR.cjs} +386 -311
  71. package/package.json +6 -6
package/dist/cli.cjs CHANGED
@@ -25,7 +25,7 @@ var __copyProps = (to, from, except, desc) => {
25
25
  }
26
26
  return to;
27
27
  };
28
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
29
29
  value: mod,
30
30
  enumerable: true
31
31
  }) : target, mod));
@@ -83,13 +83,15 @@ new lru_cache.LRUCache({ max: 8 });
83
83
  new lru_cache.LRUCache({ max: 32 });
84
84
  (0, _weapp_tailwindcss_postcss.createStyleHandler)({
85
85
  cssChildCombinatorReplaceValue: ["view", "text"],
86
+ cssRemoveActivePseudoClass: true,
86
87
  cssRemoveHoverPseudoClass: true,
88
+ cssRemoveFocusPseudoClass: true,
87
89
  isMainChunk: true,
88
90
  majorVersion: 4
89
91
  });
90
92
  (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
91
93
  //#endregion
92
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/typeof.js
94
+ //#region \0@oxc-project+runtime@0.143.0/helpers/esm/typeof.js
93
95
  function _typeof(o) {
94
96
  "@babel/helpers - typeof";
95
97
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -99,7 +101,7 @@ function _typeof(o) {
99
101
  }, _typeof(o);
100
102
  }
101
103
  //#endregion
102
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPrimitive.js
104
+ //#region \0@oxc-project+runtime@0.143.0/helpers/esm/toPrimitive.js
103
105
  function toPrimitive(t, r) {
104
106
  if ("object" != _typeof(t) || !t) return t;
105
107
  var e = t[Symbol.toPrimitive];
@@ -111,13 +113,13 @@ function toPrimitive(t, r) {
111
113
  return ("string" === r ? String : Number)(t);
112
114
  }
113
115
  //#endregion
114
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/toPropertyKey.js
116
+ //#region \0@oxc-project+runtime@0.143.0/helpers/esm/toPropertyKey.js
115
117
  function toPropertyKey(t) {
116
118
  var i = toPrimitive(t, "string");
117
119
  return "symbol" == _typeof(i) ? i : i + "";
118
120
  }
119
121
  //#endregion
120
- //#region \0@oxc-project+runtime@0.140.0/helpers/esm/defineProperty.js
122
+ //#region \0@oxc-project+runtime@0.143.0/helpers/esm/defineProperty.js
121
123
  function _defineProperty(e, r, t) {
122
124
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
123
125
  value: t,
@@ -203,6 +205,8 @@ createDebug$2("[tailwindcss:runtime] ");
203
205
  const runtimeLogDedupeHolder = globalThis;
204
206
  runtimeLogDedupeHolder.__WEAPP_TW_RUNTIME_LOG_DEDUPE__ ?? (runtimeLogDedupeHolder.__WEAPP_TW_RUNTIME_LOG_DEDUPE__ = /* @__PURE__ */ new Set());
205
207
  (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
208
+ //#endregion
209
+ //#region src/context/compiler-context-cache.ts
206
210
  const globalCacheHolder = globalThis;
207
211
  globalCacheHolder.__WEAPP_TW_COMPILER_CONTEXT_CACHE__ ?? (globalCacheHolder.__WEAPP_TW_COMPILER_CONTEXT_CACHE__ = /* @__PURE__ */ new Map());
208
212
  //#endregion
@@ -521,9 +525,10 @@ function getMarkerLines(loc, source, opts, startLineBaseZero) {
521
525
  else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
522
526
  else markerLines[lineNumber] = [0, source[lineNumber - 1].length];
523
527
  }
524
- else if (startColumn === endColumn) if (startColumn != null) markerLines[startLine] = [startColumn, 0];
525
- else markerLines[startLine] = true;
526
- else {
528
+ else if (startColumn === endColumn) {
529
+ if (startColumn != null) markerLines[startLine] = [startColumn, 0];
530
+ else markerLines[startLine] = true;
531
+ } else {
527
532
  const safeStart = startColumn ?? 0;
528
533
  markerLines[startLine] = [safeStart, (endColumn ?? safeStart) - safeStart];
529
534
  }
@@ -1325,14 +1330,15 @@ function readStringContents$1(type, input, pos, lineStart, curLine, errors) {
1325
1330
  ++pos;
1326
1331
  ++curLine;
1327
1332
  lineStart = pos;
1328
- } else if (ch === 10 || ch === 13) if (type === "template") {
1329
- out += input.slice(chunkStart, pos) + "\n";
1330
- ++pos;
1331
- if (ch === 13 && input.charCodeAt(pos) === 10) ++pos;
1332
- ++curLine;
1333
- chunkStart = lineStart = pos;
1334
- } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
1335
- else ++pos;
1333
+ } else if (ch === 10 || ch === 13) {
1334
+ if (type === "template") {
1335
+ out += input.slice(chunkStart, pos) + "\n";
1336
+ ++pos;
1337
+ if (ch === 13 && input.charCodeAt(pos) === 10) ++pos;
1338
+ ++curLine;
1339
+ chunkStart = lineStart = pos;
1340
+ } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
1341
+ } else ++pos;
1336
1342
  }
1337
1343
  return {
1338
1344
  pos,
@@ -1393,8 +1399,10 @@ function readEscapedChar$1(input, pos, lineStart, curLine, inTemplate, errors) {
1393
1399
  }
1394
1400
  pos += octalStr.length - 1;
1395
1401
  const next = input.charCodeAt(pos);
1396
- if (octalStr !== "0" || next === 56 || next === 57) if (inTemplate) return res(null);
1397
- else errors.strictNumericEscape(startPos, lineStart, curLine);
1402
+ if (octalStr !== "0" || next === 56 || next === 57) {
1403
+ if (inTemplate) return res(null);
1404
+ else errors.strictNumericEscape(startPos, lineStart, curLine);
1405
+ }
1398
1406
  return res(String.fromCharCode(octal));
1399
1407
  }
1400
1408
  return res(String.fromCharCode(ch));
@@ -1404,8 +1412,10 @@ function readHexChar$1(input, pos, lineStart, curLine, len, forceLen, throwOnInv
1404
1412
  const initialPos = pos;
1405
1413
  let n;
1406
1414
  ({n, pos} = readInt$1(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
1407
- if (n === null) if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
1408
- else pos = initialPos - 1;
1415
+ if (n === null) {
1416
+ if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
1417
+ else pos = initialPos - 1;
1418
+ }
1409
1419
  return {
1410
1420
  code: n,
1411
1421
  pos
@@ -1443,15 +1453,17 @@ function readInt$1(input, pos, lineStart, curLine, radix, len, forceLen, allowNu
1443
1453
  else if (code >= 65) val = code - 65 + 10;
1444
1454
  else if (_isDigit$1(code)) val = code - 48;
1445
1455
  else val = Infinity;
1446
- if (val >= radix) if (val <= 9 && bailOnError) return {
1447
- n: null,
1448
- pos
1449
- };
1450
- else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
1451
- else if (forceLen) {
1452
- val = 0;
1453
- invalid = true;
1454
- } else break;
1456
+ if (val >= radix) {
1457
+ if (val <= 9 && bailOnError) return {
1458
+ n: null,
1459
+ pos
1460
+ };
1461
+ else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
1462
+ else if (forceLen) {
1463
+ val = 0;
1464
+ invalid = true;
1465
+ } else break;
1466
+ }
1455
1467
  ++pos;
1456
1468
  total = total * radix + val;
1457
1469
  }
@@ -1471,11 +1483,13 @@ function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors)
1471
1483
  ++pos;
1472
1484
  ({code, pos} = readHexChar$1(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
1473
1485
  ++pos;
1474
- if (code !== null && code > 1114111) if (throwOnInvalid) errors.invalidCodePoint(pos, lineStart, curLine);
1475
- else return {
1476
- code: null,
1477
- pos
1478
- };
1486
+ if (code !== null && code > 1114111) {
1487
+ if (throwOnInvalid) errors.invalidCodePoint(pos, lineStart, curLine);
1488
+ else return {
1489
+ code: null,
1490
+ pos
1491
+ };
1492
+ }
1479
1493
  } else ({code, pos} = readHexChar$1(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
1480
1494
  return {
1481
1495
  code,
@@ -6326,9 +6340,10 @@ defineType$4("VariableDeclaration", {
6326
6340
  if (parentIsForX) {
6327
6341
  if (declarations.length !== 1) throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
6328
6342
  }
6329
- for (const decl of declarations) if (kind === "const" || kind === "let" || kind === "var") if (!parentIsForX && !decl.init) withoutInit(decl, "id", decl.id);
6330
- else constOrLetOrVar(decl, "id", decl.id);
6331
- else usingOrAwaitUsing(decl, "id", decl.id);
6343
+ for (const decl of declarations) if (kind === "const" || kind === "let" || kind === "var") {
6344
+ if (!parentIsForX && !decl.init) withoutInit(decl, "id", decl.id);
6345
+ else constOrLetOrVar(decl, "id", decl.id);
6346
+ } else usingOrAwaitUsing(decl, "id", decl.id);
6332
6347
  };
6333
6348
  })()
6334
6349
  });
@@ -6778,9 +6793,7 @@ defineType$4("MetaProperty", {
6778
6793
  case "new":
6779
6794
  property = "target";
6780
6795
  break;
6781
- case "import":
6782
- property = "meta";
6783
- break;
6796
+ case "import": property = "meta";
6784
6797
  }
6785
6798
  if (!is("Identifier", node.property, { name: property })) throw new TypeError("Unrecognised MetaProperty");
6786
6799
  }, { oneOfNodeTypes: ["Identifier"] })) },
@@ -12794,10 +12807,14 @@ function cloneNodeInternal(node, deep = true, withoutLoc = false, commentsCache)
12794
12807
  if (hasOwn(node, "typeAnnotation")) newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc, commentsCache) : node.typeAnnotation;
12795
12808
  if (hasOwn(node, "decorators")) newNode.decorators = deep ? cloneIfNodeOrArray(node.decorators, true, withoutLoc, commentsCache) : node.decorators;
12796
12809
  } else if (!hasOwn(NODE_FIELDS$1, type)) throw new Error(`Unknown node type: "${type}"`);
12797
- else for (const field of Object.keys(NODE_FIELDS$1[type])) if (hasOwn(node, field)) if (deep) newNode[field] = isFile(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
12798
- else newNode[field] = node[field];
12799
- if (hasOwn(node, "loc")) if (withoutLoc) newNode.loc = null;
12800
- else newNode.loc = node.loc;
12810
+ else for (const field of Object.keys(NODE_FIELDS$1[type])) if (hasOwn(node, field)) {
12811
+ if (deep) newNode[field] = isFile(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
12812
+ else newNode[field] = node[field];
12813
+ }
12814
+ if (hasOwn(node, "loc")) {
12815
+ if (withoutLoc) newNode.loc = null;
12816
+ else newNode.loc = node.loc;
12817
+ }
12801
12818
  if (hasOwn(node, "leadingComments")) newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc, commentsCache);
12802
12819
  if (hasOwn(node, "innerComments")) newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc, commentsCache);
12803
12820
  if (hasOwn(node, "trailingComments")) newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc, commentsCache);
@@ -12835,9 +12852,10 @@ function cloneWithoutLoc(node) {
12835
12852
  function addComments$1(node, type, comments) {
12836
12853
  if (!comments || !node) return node;
12837
12854
  const key = `${type}Comments`;
12838
- if (node[key]) if (type === "leading") node[key] = comments.concat(node[key]);
12839
- else node[key].push(...comments);
12840
- else node[key] = comments;
12855
+ if (node[key]) {
12856
+ if (type === "leading") node[key] = comments.concat(node[key]);
12857
+ else node[key].push(...comments);
12858
+ } else node[key] = comments;
12841
12859
  return node;
12842
12860
  }
12843
12861
  function addComment$1(node, type, content, line) {
@@ -12931,8 +12949,10 @@ function toBlock(node, parent) {
12931
12949
  let blockNodes;
12932
12950
  if (isEmptyStatement$1(node)) blockNodes = [];
12933
12951
  else {
12934
- if (!isStatement$6(node)) if (isFunction$3(parent)) node = returnStatement$2(node);
12935
- else node = expressionStatement$5(node);
12952
+ if (!isStatement$6(node)) {
12953
+ if (isFunction$3(parent)) node = returnStatement$2(node);
12954
+ else node = expressionStatement$5(node);
12955
+ }
12936
12956
  blockNodes = [node];
12937
12957
  }
12938
12958
  return blockStatement$4(blockNodes);
@@ -13046,8 +13066,10 @@ function toStatement(node, ignore) {
13046
13066
  newType = "FunctionDeclaration";
13047
13067
  } else if (isAssignmentExpression$1(node)) return expressionStatement$5(node);
13048
13068
  if (mustHaveId && !node.id) newType = false;
13049
- if (!newType) if (ignore) return false;
13050
- else throw new Error(`cannot turn ${node.type} to a statement`);
13069
+ if (!newType) {
13070
+ if (ignore) return false;
13071
+ else throw new Error(`cannot turn ${node.type} to a statement`);
13072
+ }
13051
13073
  node.type = newType;
13052
13074
  return node;
13053
13075
  }
@@ -13077,8 +13099,10 @@ function valueToNode(value) {
13077
13099
  if (value < 0 || Object.is(value, -0)) result = unaryExpression$1("-", result);
13078
13100
  return result;
13079
13101
  }
13080
- if (typeof value === "bigint") if (value < 0) return unaryExpression$1("-", bigIntLiteral(-value));
13081
- else return bigIntLiteral(value);
13102
+ if (typeof value === "bigint") {
13103
+ if (value < 0) return unaryExpression$1("-", bigIntLiteral(-value));
13104
+ else return bigIntLiteral(value);
13105
+ }
13082
13106
  if (isRegExp(value)) {
13083
13107
  const pattern = value.source;
13084
13108
  const flags = /\/([a-z]*)$/.exec(value.toString())[1];
@@ -13089,11 +13113,12 @@ function valueToNode(value) {
13089
13113
  const props = [];
13090
13114
  for (const key of Object.keys(value)) {
13091
13115
  let nodeKey, computed = false;
13092
- if (isValidIdentifier(key)) if (key === "__proto__") {
13093
- computed = true;
13094
- nodeKey = stringLiteral$2(key);
13095
- } else nodeKey = identifier$5(key);
13096
- else nodeKey = stringLiteral$2(key);
13116
+ if (isValidIdentifier(key)) {
13117
+ if (key === "__proto__") {
13118
+ computed = true;
13119
+ nodeKey = stringLiteral$2(key);
13120
+ } else nodeKey = identifier$5(key);
13121
+ } else nodeKey = stringLiteral$2(key);
13097
13122
  props.push(objectProperty(nodeKey, valueToNode(value[key]), computed));
13098
13123
  }
13099
13124
  return objectExpression$1(props);
@@ -13148,9 +13173,7 @@ function getAssignmentIdentifiers$2(node) {
13148
13173
  case "UnaryExpression":
13149
13174
  if (id.operator === "delete") search.push(id.argument);
13150
13175
  break;
13151
- case "Identifier":
13152
- ids[id.name] = id;
13153
- break;
13176
+ case "Identifier": ids[id.name] = id;
13154
13177
  }
13155
13178
  }
13156
13179
  return ids;
@@ -13181,8 +13204,10 @@ function getBindingIdentifiers$3(node, duplicates, outerOnly, newBindingsOnly) {
13181
13204
  const keys = getBindingIdentifiers$3.keys[id.type];
13182
13205
  if (keys) for (let i = 0; i < keys.length; i++) {
13183
13206
  const nodes = id[keys[i]];
13184
- if (nodes) if (Array.isArray(nodes)) search.push(...nodes);
13185
- else search.push(nodes);
13207
+ if (nodes) {
13208
+ if (Array.isArray(nodes)) search.push(...nodes);
13209
+ else search.push(nodes);
13210
+ }
13186
13211
  }
13187
13212
  }
13188
13213
  return ids;
@@ -13320,8 +13345,10 @@ function isBlockScoped$1(node) {
13320
13345
  }
13321
13346
  function isImmutable(node) {
13322
13347
  if (isType$1(node.type, "Immutable")) return true;
13323
- if (isIdentifier$7(node)) if (node.name === "undefined") return true;
13324
- else return false;
13348
+ if (isIdentifier$7(node)) {
13349
+ if (node.name === "undefined") return true;
13350
+ else return false;
13351
+ }
13325
13352
  return false;
13326
13353
  }
13327
13354
  function isNodesEquivalent(a, b) {
@@ -14027,12 +14054,10 @@ const estree = (superClass) => class ESTreeParserMixin extends superClass {
14027
14054
  node.exported = node.specifiers[0].exported;
14028
14055
  delete node.specifiers;
14029
14056
  }
14030
- case "ExportDefaultDeclaration":
14031
- {
14032
- const { declaration } = node;
14033
- if (declaration?.type === "ClassDeclaration" && declaration.decorators?.length > 0 && declaration.start === node.start) this.resetStartLocation(node, exportStartLoc);
14034
- }
14035
- break;
14057
+ case "ExportDefaultDeclaration": {
14058
+ const { declaration } = node;
14059
+ if (declaration?.type === "ClassDeclaration" && declaration.decorators?.length > 0 && declaration.start === node.start) this.resetStartLocation(node, exportStartLoc);
14060
+ }
14036
14061
  }
14037
14062
  return node;
14038
14063
  }
@@ -15008,12 +15033,13 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
15008
15033
  if (this.match(76)) return this.flowParseDeclareClass(node);
15009
15034
  else if (this.match(64)) return this.flowParseDeclareFunction(node);
15010
15035
  else if (this.match(70)) return this.flowParseDeclareVariable(node);
15011
- else if (this.eatContextual(123)) if (this.match(12)) return this.flowParseDeclareModuleExports(node);
15012
- else {
15013
- if (insideModule) this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc);
15014
- return this.flowParseDeclareModule(node);
15015
- }
15016
- else if (this.isContextual(126)) return this.flowParseDeclareTypeAlias(node);
15036
+ else if (this.eatContextual(123)) {
15037
+ if (this.match(12)) return this.flowParseDeclareModuleExports(node);
15038
+ else {
15039
+ if (insideModule) this.raise(FlowErrors.NestedDeclareModule, this.state.lastTokStartLoc);
15040
+ return this.flowParseDeclareModule(node);
15041
+ }
15042
+ } else if (this.isContextual(126)) return this.flowParseDeclareTypeAlias(node);
15017
15043
  else if (this.isContextual(127)) return this.flowParseDeclareOpaqueType(node);
15018
15044
  else if (this.isContextual(125)) return this.flowParseDeclareInterface(node);
15019
15045
  else if (this.match(78)) return this.flowParseDeclareExportDeclaration(node, insideModule);
@@ -15625,10 +15651,12 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
15625
15651
  case 6: {
15626
15652
  const node = this.startNode();
15627
15653
  this.next();
15628
- if (!this.match(7) && !this.match(17)) if (tokenIsIdentifier(this.state.type) || this.match(74)) {
15629
- const token = this.lookahead().type;
15630
- isGroupedType = token !== 13 && token !== 10;
15631
- } else isGroupedType = true;
15654
+ if (!this.match(7) && !this.match(17)) {
15655
+ if (tokenIsIdentifier(this.state.type) || this.match(74)) {
15656
+ const token = this.lookahead().type;
15657
+ isGroupedType = token !== 13 && token !== 10;
15658
+ } else isGroupedType = true;
15659
+ }
15632
15660
  if (isGroupedType) {
15633
15661
  this.state.noAnonFunctionType = false;
15634
15662
  type = this.flowParseType();
@@ -16034,9 +16062,10 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
16034
16062
  const next = this.input.charCodeAt(this.state.pos + 1);
16035
16063
  if (code === 123 && next === 124) this.finishOp(3, 2);
16036
16064
  else if (this.state.inType && (code === 62 || code === 60)) this.finishOp(code === 62 ? 44 : 43, 1);
16037
- else if (this.state.inType && code === 63) if (next === 46) this.finishOp(14, 2);
16038
- else this.finishOp(13, 1);
16039
- else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) {
16065
+ else if (this.state.inType && code === 63) {
16066
+ if (next === 46) this.finishOp(14, 2);
16067
+ else this.finishOp(13, 1);
16068
+ } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) {
16040
16069
  this.state.pos += 2;
16041
16070
  this.readIterator();
16042
16071
  } else super.getTokenFromCode(code);
@@ -17439,8 +17468,10 @@ var TypeScriptScopeHandler = class extends ScopeHandler {
17439
17468
  if (bindingType & 256) return (bindingType & 512) > 0 !== (type & 4) > 0;
17440
17469
  return true;
17441
17470
  }
17442
- if (bindingType & 128 && (type & 8) > 0) if (scope.names.get(name) & 2) return !!(bindingType & 1);
17443
- else return false;
17471
+ if (bindingType & 128 && (type & 8) > 0) {
17472
+ if (scope.names.get(name) & 2) return !!(bindingType & 1);
17473
+ else return false;
17474
+ }
17444
17475
  if (bindingType & 2 && (type & 1) > 0) return true;
17445
17476
  return super.isRedeclaredInScope(scope, name, bindingType);
17446
17477
  }
@@ -17829,14 +17860,15 @@ function readStringContents(type, input, pos, lineStart, curLine, errors) {
17829
17860
  ++pos;
17830
17861
  ++curLine;
17831
17862
  lineStart = pos;
17832
- } else if (ch === 10 || ch === 13) if (type === "template") {
17833
- out += input.slice(chunkStart, pos) + "\n";
17834
- ++pos;
17835
- if (ch === 13 && input.charCodeAt(pos) === 10) ++pos;
17836
- ++curLine;
17837
- chunkStart = lineStart = pos;
17838
- } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
17839
- else ++pos;
17863
+ } else if (ch === 10 || ch === 13) {
17864
+ if (type === "template") {
17865
+ out += input.slice(chunkStart, pos) + "\n";
17866
+ ++pos;
17867
+ if (ch === 13 && input.charCodeAt(pos) === 10) ++pos;
17868
+ ++curLine;
17869
+ chunkStart = lineStart = pos;
17870
+ } else errors.unterminated(initialPos, initialLineStart, initialCurLine);
17871
+ } else ++pos;
17840
17872
  }
17841
17873
  return {
17842
17874
  pos,
@@ -17897,8 +17929,10 @@ function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
17897
17929
  }
17898
17930
  pos += octalStr.length - 1;
17899
17931
  const next = input.charCodeAt(pos);
17900
- if (octalStr !== "0" || next === 56 || next === 57) if (inTemplate) return res(null);
17901
- else errors.strictNumericEscape(startPos, lineStart, curLine);
17932
+ if (octalStr !== "0" || next === 56 || next === 57) {
17933
+ if (inTemplate) return res(null);
17934
+ else errors.strictNumericEscape(startPos, lineStart, curLine);
17935
+ }
17902
17936
  return res(String.fromCharCode(octal));
17903
17937
  }
17904
17938
  return res(String.fromCharCode(ch));
@@ -17908,8 +17942,10 @@ function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInval
17908
17942
  const initialPos = pos;
17909
17943
  let n;
17910
17944
  ({n, pos} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
17911
- if (n === null) if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
17912
- else pos = initialPos - 1;
17945
+ if (n === null) {
17946
+ if (throwOnInvalid) errors.invalidEscapeSequence(initialPos, lineStart, curLine);
17947
+ else pos = initialPos - 1;
17948
+ }
17913
17949
  return {
17914
17950
  code: n,
17915
17951
  pos
@@ -17947,15 +17983,17 @@ function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumS
17947
17983
  else if (code >= 65) val = code - 65 + 10;
17948
17984
  else if (_isDigit(code)) val = code - 48;
17949
17985
  else val = Infinity;
17950
- if (val >= radix) if (val <= 9 && bailOnError) return {
17951
- n: null,
17952
- pos
17953
- };
17954
- else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
17955
- else if (forceLen) {
17956
- val = 0;
17957
- invalid = true;
17958
- } else break;
17986
+ if (val >= radix) {
17987
+ if (val <= 9 && bailOnError) return {
17988
+ n: null,
17989
+ pos
17990
+ };
17991
+ else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) val = 0;
17992
+ else if (forceLen) {
17993
+ val = 0;
17994
+ invalid = true;
17995
+ } else break;
17996
+ }
17959
17997
  ++pos;
17960
17998
  total = total * radix + val;
17961
17999
  }
@@ -17975,11 +18013,13 @@ function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
17975
18013
  ++pos;
17976
18014
  ({code, pos} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
17977
18015
  ++pos;
17978
- if (code !== null && code > 1114111) if (throwOnInvalid) errors.invalidCodePoint(pos, lineStart, curLine);
17979
- else return {
17980
- code: null,
17981
- pos
17982
- };
18016
+ if (code !== null && code > 1114111) {
18017
+ if (throwOnInvalid) errors.invalidCodePoint(pos, lineStart, curLine);
18018
+ else return {
18019
+ code: null,
18020
+ pos
18021
+ };
18022
+ }
17983
18023
  } else ({code, pos} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
17984
18024
  return {
17985
18025
  code,
@@ -18443,9 +18483,10 @@ var Tokenizer$1 = class extends CommentsParser {
18443
18483
  readToken_question() {
18444
18484
  const next = this.input.charCodeAt(this.state.pos + 1);
18445
18485
  const next2 = this.input.charCodeAt(this.state.pos + 2);
18446
- if (next === 63) if (next2 === 61) this.finishOp(26, 3);
18447
- else this.finishOp(36, 2);
18448
- else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
18486
+ if (next === 63) {
18487
+ if (next2 === 61) this.finishOp(26, 3);
18488
+ else this.finishOp(36, 2);
18489
+ } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
18449
18490
  this.state.pos += 2;
18450
18491
  this.finishToken(14);
18451
18492
  } else {
@@ -19318,9 +19359,7 @@ var LValParser = class extends NodeUtils {
19318
19359
  if (node.left.type === "VoidPattern") this.raise(Errors.VoidPatternInitializer, node.left);
19319
19360
  this.toAssignable(node.left, isLHS);
19320
19361
  break;
19321
- case "ParenthesizedExpression":
19322
- this.toAssignable(parenthesized, isLHS);
19323
- break;
19362
+ case "ParenthesizedExpression": this.toAssignable(parenthesized, isLHS);
19324
19363
  }
19325
19364
  }
19326
19365
  toAssignableObjectExpressionProp(prop, isLast, isLHS) {
@@ -19511,8 +19550,10 @@ var LValParser = class extends NodeUtils {
19511
19550
  if (type === "Identifier") {
19512
19551
  this.checkIdentifier(expression, binding, strictModeChanged);
19513
19552
  const { name } = expression;
19514
- if (checkClashes) if (checkClashes.has(name)) this.raise(Errors.ParamDupe, expression);
19515
- else checkClashes.add(name);
19553
+ if (checkClashes) {
19554
+ if (checkClashes.has(name)) this.raise(Errors.ParamDupe, expression);
19555
+ else checkClashes.add(name);
19556
+ }
19516
19557
  return;
19517
19558
  } else if (type === "VoidPattern" && ancestor.type === "CatchClause") this.raise(Errors.VoidPatternCatchClauseParam, expression);
19518
19559
  const unwrappedExpression = unwrapParenthesizedExpression(expression);
@@ -19536,8 +19577,10 @@ var LValParser = class extends NodeUtils {
19536
19577
  } else if (val) this.checkLVal(val, nextAncestor, binding, checkClashes, strictModeChanged, isParenthesizedExpression, disallowCallExpression);
19537
19578
  }
19538
19579
  checkIdentifier(at, bindingType, strictModeChanged = false) {
19539
- if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) if (bindingType === 64) this.raise(Errors.StrictEvalArguments, at, { referenceName: at.name });
19540
- else this.raise(Errors.StrictEvalArgumentsBinding, at, { bindingName: at.name });
19580
+ if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(at.name, this.inModule) : isStrictBindOnlyReservedWord(at.name))) {
19581
+ if (bindingType === 64) this.raise(Errors.StrictEvalArguments, at, { referenceName: at.name });
19582
+ else this.raise(Errors.StrictEvalArgumentsBinding, at, { bindingName: at.name });
19583
+ }
19541
19584
  if (bindingType & 8192 && at.name === "let") this.raise(Errors.LetInLexicalBinding, at);
19542
19585
  if (!(bindingType & 64)) this.declareNameFromIdentifier(at, bindingType);
19543
19586
  }
@@ -19567,9 +19610,11 @@ var ExpressionParser = class extends LValParser {
19567
19610
  if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) return sawProto;
19568
19611
  const key = prop.key;
19569
19612
  if ((key.type === "Identifier" ? key.name : key.value) === "__proto__") {
19570
- if (sawProto) if (refExpressionErrors) {
19571
- if (refExpressionErrors.doubleProtoLoc === null) refExpressionErrors.doubleProtoLoc = this.getLoc(key.start);
19572
- } else this.raise(Errors.DuplicateProto, key);
19613
+ if (sawProto) {
19614
+ if (refExpressionErrors) {
19615
+ if (refExpressionErrors.doubleProtoLoc === null) refExpressionErrors.doubleProtoLoc = this.getLoc(key.start);
19616
+ } else this.raise(Errors.DuplicateProto, key);
19617
+ }
19573
19618
  return true;
19574
19619
  }
19575
19620
  return sawProto;
@@ -19964,9 +20009,10 @@ var ExpressionParser = class extends LValParser {
19964
20009
  node = this.startNode();
19965
20010
  this.next();
19966
20011
  if (this.match(12)) return this.parseImportMetaPropertyOrPhaseCall(node);
19967
- if (this.match(6)) if (this.optionFlags & 1024) return this.parseImportCall(node);
19968
- else return this.finishNode(node, "Import");
19969
- else {
20012
+ if (this.match(6)) {
20013
+ if (this.optionFlags & 1024) return this.parseImportCall(node);
20014
+ else return this.finishNode(node, "Import");
20015
+ } else {
19970
20016
  this.raise(Errors.UnsupportedImport, this.state.lastTokStartLoc);
19971
20017
  return this.finishNode(node, "Import");
19972
20018
  }
@@ -20035,9 +20081,10 @@ var ExpressionParser = class extends LValParser {
20035
20081
  this.resetPreviousNodeTrailingComments(id);
20036
20082
  this.next();
20037
20083
  return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
20038
- } else if (tokenIsIdentifier(type)) if (canStartArrow && this.lookaheadCharCode() === 61) return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
20039
- else return id;
20040
- else if (type === 86) {
20084
+ } else if (tokenIsIdentifier(type)) {
20085
+ if (canStartArrow && this.lookaheadCharCode() === 61) return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
20086
+ else return id;
20087
+ } else if (type === 86) {
20041
20088
  this.resetPreviousNodeTrailingComments(id);
20042
20089
  return this.parseDo(this.startNodeAtNode(id), true);
20043
20090
  }
@@ -20687,8 +20734,10 @@ var ExpressionParser = class extends LValParser {
20687
20734
  const node = this.startNodeAt(startLoc);
20688
20735
  this.expressionScope.recordParameterInitializerError(Errors.AwaitExpressionFormalParameter, startIndex);
20689
20736
  if (this.eat(51)) this.raise(Errors.ObsoleteAwaitStar, startLoc);
20690
- if (!this.scope.inFunction && !(this.optionFlags & 1)) if (this.isAmbiguousPrefixOrIdentifier()) this.ambiguousScriptDifferentAst = true;
20691
- else this.sawUnambiguousESM = true;
20737
+ if (!this.scope.inFunction && !(this.optionFlags & 1)) {
20738
+ if (this.isAmbiguousPrefixOrIdentifier()) this.ambiguousScriptDifferentAst = true;
20739
+ else this.sawUnambiguousESM = true;
20740
+ }
20692
20741
  if (!soloAwait) node.argument = this.parseMaybeUnary(null, true);
20693
20742
  return this.finishNode(node, "AwaitExpression");
20694
20743
  }
@@ -21613,9 +21662,10 @@ var StatementParser = class extends ExpressionParser {
21613
21662
  allowsDirectSuper = state.hadSuperClass;
21614
21663
  }
21615
21664
  this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
21616
- } else if (this.isClassProperty()) if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
21617
- else this.pushClassProperty(classBody, publicProp);
21618
- else if (maybeContextualKw === "async" && !this.isLineTerminator()) {
21665
+ } else if (this.isClassProperty()) {
21666
+ if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
21667
+ else this.pushClassProperty(classBody, publicProp);
21668
+ } else if (maybeContextualKw === "async" && !this.isLineTerminator()) {
21619
21669
  this.resetPreviousNodeTrailingComments(key);
21620
21670
  const isGenerator = this.eat(51);
21621
21671
  if (publicMember.optional) this.unexpected(maybeQuestionTokenStartLoc);
@@ -21645,9 +21695,10 @@ var StatementParser = class extends ExpressionParser {
21645
21695
  const isPrivate = this.match(134);
21646
21696
  this.parseClassElementName(publicProp);
21647
21697
  this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);
21648
- } else if (this.isLineTerminator()) if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
21649
- else this.pushClassProperty(classBody, publicProp);
21650
- else this.unexpected();
21698
+ } else if (this.isLineTerminator()) {
21699
+ if (isPrivate) this.pushClassPrivateProperty(classBody, privateProp);
21700
+ else this.pushClassProperty(classBody, publicProp);
21701
+ } else this.unexpected();
21651
21702
  }
21652
21703
  parseClassElementName(member) {
21653
21704
  const { type, value } = this.state;
@@ -21947,8 +21998,10 @@ var StatementParser = class extends ExpressionParser {
21947
21998
  else if (node.type === "AssignmentPattern") this.checkDeclaration(node.left);
21948
21999
  }
21949
22000
  checkDuplicateExports(node, exportName) {
21950
- if (this.exportedIdentifiers.has(exportName)) if (exportName === "default") this.raise(Errors.DuplicateDefaultExport, node);
21951
- else this.raise(Errors.DuplicateExport, node, { exportName });
22001
+ if (this.exportedIdentifiers.has(exportName)) {
22002
+ if (exportName === "default") this.raise(Errors.DuplicateDefaultExport, node);
22003
+ else this.raise(Errors.DuplicateExport, node, { exportName });
22004
+ }
21952
22005
  this.exportedIdentifiers.add(exportName);
21953
22006
  }
21954
22007
  parseExportSpecifiers(isInTypeExport) {
@@ -22340,14 +22393,15 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
22340
22393
  const { startLoc } = this.state;
22341
22394
  const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers ?? []), stopOnStartOfClassStaticBlock, modified.static);
22342
22395
  if (!modifier) break;
22343
- if (tsIsAccessModifier(modifier)) if (modified.accessibility) this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { modifier });
22344
- else {
22345
- enforceOrder(startLoc, modifier, modifier, "override");
22346
- enforceOrder(startLoc, modifier, modifier, "static");
22347
- enforceOrder(startLoc, modifier, modifier, "readonly");
22348
- modified.accessibility = modifier;
22349
- }
22350
- else if (tsIsVarianceAnnotations(modifier)) {
22396
+ if (tsIsAccessModifier(modifier)) {
22397
+ if (modified.accessibility) this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { modifier });
22398
+ else {
22399
+ enforceOrder(startLoc, modifier, modifier, "override");
22400
+ enforceOrder(startLoc, modifier, modifier, "static");
22401
+ enforceOrder(startLoc, modifier, modifier, "readonly");
22402
+ modified.accessibility = modifier;
22403
+ }
22404
+ } else if (tsIsVarianceAnnotations(modifier)) {
22351
22405
  if (modified[modifier]) this.raise(TSErrors.DuplicateModifier, startLoc, { modifier });
22352
22406
  modified[modifier] = true;
22353
22407
  enforceOrder(startLoc, modifier, "in", "out");
@@ -22404,8 +22458,10 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
22404
22458
  return result;
22405
22459
  }
22406
22460
  tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) {
22407
- if (!skipFirstToken) if (bracket) this.expect(0);
22408
- else this.expect(43);
22461
+ if (!skipFirstToken) {
22462
+ if (bracket) this.expect(0);
22463
+ else this.expect(43);
22464
+ }
22409
22465
  const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos);
22410
22466
  if (bracket) this.expect(1);
22411
22467
  else this.expect(44);
@@ -22459,13 +22515,14 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
22459
22515
  }
22460
22516
  tsParseEntityName(flags) {
22461
22517
  let entity;
22462
- if (flags & 1 && this.match(74)) if (flags & 2) entity = this.parseIdentifier(true);
22463
- else {
22464
- const node = this.startNode();
22465
- this.next();
22466
- entity = this.finishNode(node, "ThisExpression");
22467
- }
22468
- else entity = this.parseIdentifier(!!(flags & 1));
22518
+ if (flags & 1 && this.match(74)) {
22519
+ if (flags & 2) entity = this.parseIdentifier(true);
22520
+ else {
22521
+ const node = this.startNode();
22522
+ this.next();
22523
+ entity = this.finishNode(node, "ThisExpression");
22524
+ }
22525
+ } else entity = this.parseIdentifier(!!(flags & 1));
22469
22526
  while (this.eat(12)) {
22470
22527
  const node = this.startNodeAtNode(entity);
22471
22528
  node.left = entity;
@@ -23364,9 +23421,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
23364
23421
  return this.tsParseNamespaceDeclaration(node);
23365
23422
  }
23366
23423
  break;
23367
- case 126:
23368
- if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) return this.tsParseTypeAliasDeclaration(node);
23369
- break;
23424
+ case 126: if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) return this.tsParseTypeAliasDeclaration(node);
23370
23425
  }
23371
23426
  }
23372
23427
  tsCheckLineTerminator(next) {
@@ -23753,14 +23808,12 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
23753
23808
  return this.tsParseDeclaration(node, 124, false, decorators);
23754
23809
  }
23755
23810
  break;
23756
- case 126:
23757
- if (this.nextTokenIsIdentifierOnSameLine()) {
23758
- const node = this.startNode();
23759
- if (!allowDeclaration) this.raise(TSErrors.UnexpectedTypeDeclaration, node, "type");
23760
- this.next();
23761
- return this.tsParseTypeAliasDeclaration(node);
23762
- }
23763
- break;
23811
+ case 126: if (this.nextTokenIsIdentifierOnSameLine()) {
23812
+ const node = this.startNode();
23813
+ if (!allowDeclaration) this.raise(TSErrors.UnexpectedTypeDeclaration, node, "type");
23814
+ this.next();
23815
+ return this.tsParseTypeAliasDeclaration(node);
23816
+ }
23764
23817
  }
23765
23818
  return super.parseStatementContent(flags, decorators);
23766
23819
  }
@@ -24262,11 +24315,13 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
24262
24315
  if (this.match(76)) {
24263
24316
  node.abstract = true;
24264
24317
  return this.maybeTakeDecorators(decorators, this.parseClass(node, true, false));
24265
- } else if (this.isContextual(125)) if (!this.hasFollowingLineBreak()) {
24266
- node.abstract = true;
24267
- this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
24268
- return this.tsParseInterfaceDeclaration(node);
24269
- } else return null;
24318
+ } else if (this.isContextual(125)) {
24319
+ if (!this.hasFollowingLineBreak()) {
24320
+ node.abstract = true;
24321
+ this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifier, node);
24322
+ return this.tsParseInterfaceDeclaration(node);
24323
+ } else return null;
24324
+ }
24270
24325
  throw this.unexpected(null, 76);
24271
24326
  }
24272
24327
  parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope) {
@@ -24603,13 +24658,14 @@ const placeholders = (superClass) => class PlaceholdersParserMixin extends super
24603
24658
  this.next();
24604
24659
  const oldStrict = this.state.strict;
24605
24660
  const placeholder = this.parsePlaceholder("Identifier");
24606
- if (placeholder) if (this.match(77) || this.match(129) || this.match(2)) node.id = placeholder;
24607
- else if (optionalId || !isStatement) {
24608
- node.id = null;
24609
- node.body = this.finishPlaceholder(placeholder, "ClassBody");
24610
- return this.finishNode(node, type);
24611
- } else throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc);
24612
- else this.parseClassId(node, isStatement, optionalId);
24661
+ if (placeholder) {
24662
+ if (this.match(77) || this.match(129) || this.match(2)) node.id = placeholder;
24663
+ else if (optionalId || !isStatement) {
24664
+ node.id = null;
24665
+ node.body = this.finishPlaceholder(placeholder, "ClassBody");
24666
+ return this.finishNode(node, type);
24667
+ } else throw this.raise(PlaceholderErrors.ClassNameIsRequired, this.state.startLoc);
24668
+ } else this.parseClassId(node, isStatement, optionalId);
24613
24669
  super.parseClassSuper(node);
24614
24670
  node.body = this.parsePlaceholder("ClassBody") || super.parseClassBody(!!node.superClass, oldStrict);
24615
24671
  return this.finishNode(node, type);
@@ -24959,7 +25015,7 @@ function hasMoreVlq(reader, max) {
24959
25015
  if (reader.pos >= max) return false;
24960
25016
  return reader.peek() !== comma;
24961
25017
  }
24962
- var bufLength = 1024 * 16;
25018
+ var bufLength = 16384;
24963
25019
  var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
24964
25020
  return Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength).toString();
24965
25021
  } } : { decode(buf) {
@@ -25798,22 +25854,24 @@ var SourceMap$1 = class {
25798
25854
  mark(generated, generatedIdentifierName, line, column, identifierName, identifierNamePos, filename) {
25799
25855
  this._rawMappings = void 0;
25800
25856
  let originalMapping;
25801
- if (line != null) if (this._inputMap) {
25802
- originalMapping = originalPositionFor(this._inputMap, {
25857
+ if (line != null) {
25858
+ if (this._inputMap) {
25859
+ originalMapping = originalPositionFor(this._inputMap, {
25860
+ line,
25861
+ column
25862
+ });
25863
+ if (originalMapping.name && (identifierNamePos || identifierName != null && originalMapping.column === column)) identifierName = originalMapping.name;
25864
+ else if (identifierNamePos) {
25865
+ const originalIdentifierMapping = originalPositionFor(this._inputMap, identifierNamePos);
25866
+ if (originalIdentifierMapping.name) identifierName = originalIdentifierMapping.name;
25867
+ }
25868
+ } else originalMapping = {
25869
+ name: null,
25870
+ source: filename?.replace(/\\/g, "/") || this._sourceFileName,
25803
25871
  line,
25804
25872
  column
25805
- });
25806
- if (originalMapping.name && (identifierNamePos || identifierName != null && originalMapping.column === column)) identifierName = originalMapping.name;
25807
- else if (identifierNamePos) {
25808
- const originalIdentifierMapping = originalPositionFor(this._inputMap, identifierNamePos);
25809
- if (originalIdentifierMapping.name) identifierName = originalIdentifierMapping.name;
25810
- }
25811
- } else originalMapping = {
25812
- name: null,
25813
- source: filename?.replace(/\\/g, "/") || this._sourceFileName,
25814
- line,
25815
- column
25816
- };
25873
+ };
25874
+ }
25817
25875
  if (identifierName != null && identifierName === generatedIdentifierName) identifierName = null;
25818
25876
  maybeAddMapping(this._map, {
25819
25877
  name: identifierName,
@@ -29470,11 +29528,13 @@ var Printer = class {
29470
29528
  let oldNoLineTerminatorAfterNode;
29471
29529
  if (!shouldPrintParens) {
29472
29530
  noLineTerminatorAfter || (noLineTerminatorAfter = !!parent && this._noLineTerminatorAfterNode === parent && isLastChild(parent, node));
29473
- if (noLineTerminatorAfter) if (node.trailingComments?.some(commentIsNewline)) {
29474
- if (isExpression$4(node)) shouldPrintParens = true;
29475
- } else {
29476
- oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode;
29477
- this._noLineTerminatorAfterNode = node;
29531
+ if (noLineTerminatorAfter) {
29532
+ if (node.trailingComments?.some(commentIsNewline)) {
29533
+ if (isExpression$4(node)) shouldPrintParens = true;
29534
+ } else {
29535
+ oldNoLineTerminatorAfterNode = this._noLineTerminatorAfterNode;
29536
+ this._noLineTerminatorAfterNode = node;
29537
+ }
29478
29538
  }
29479
29539
  }
29480
29540
  if (shouldPrintParens) {
@@ -29552,17 +29612,19 @@ var Printer = class {
29552
29612
  if (i < len - 1) separator.call(this, i, false);
29553
29613
  else if (printTrailingSeparator) separator.call(this, i, true);
29554
29614
  }
29555
- if (statement) if (i + 1 === len) this.newline(1, flags);
29556
- else {
29557
- const lastCommentLine = this._lastCommentLine;
29558
- if (lastCommentLine > 0) {
29559
- const offset = (nodes[i + 1].loc?.start.line || 0) - lastCommentLine;
29560
- if (offset >= 0) {
29561
- this.newline(offset || 1, flags);
29562
- continue;
29615
+ if (statement) {
29616
+ if (i + 1 === len) this.newline(1, flags);
29617
+ else {
29618
+ const lastCommentLine = this._lastCommentLine;
29619
+ if (lastCommentLine > 0) {
29620
+ const offset = (nodes[i + 1].loc?.start.line || 0) - lastCommentLine;
29621
+ if (offset >= 0) {
29622
+ this.newline(offset || 1, flags);
29623
+ continue;
29624
+ }
29563
29625
  }
29626
+ this.newline(1, flags);
29564
29627
  }
29565
- this.newline(1, flags);
29566
29628
  }
29567
29629
  }
29568
29630
  if (indent) this.dedent(flags);
@@ -30031,10 +30093,11 @@ function applyReplacement(placeholder, ast, replacement) {
30031
30093
  set(parent, key, replacement);
30032
30094
  } else {
30033
30095
  const items = parent[key].slice();
30034
- if (placeholder.type === "statement" || placeholder.type === "param") if (replacement == null) items.splice(index, 1);
30035
- else if (Array.isArray(replacement)) items.splice(index, 1, ...replacement);
30036
- else set(items, index, replacement);
30037
- else set(items, index, replacement);
30096
+ if (placeholder.type === "statement" || placeholder.type === "param") {
30097
+ if (replacement == null) items.splice(index, 1);
30098
+ else if (Array.isArray(replacement)) items.splice(index, 1, ...replacement);
30099
+ else set(items, index, replacement);
30100
+ } else set(items, index, replacement);
30038
30101
  validate$2(parent, key, items);
30039
30102
  parent[key] = items;
30040
30103
  }
@@ -30195,8 +30258,10 @@ var TraversalContext = class {
30195
30258
  this.opts = opts;
30196
30259
  }
30197
30260
  maybeQueue(path, notPriority) {
30198
- if (this.queue) if (notPriority) this.queue.push(path);
30199
- else this.priorityQueue.push(path);
30261
+ if (this.queue) {
30262
+ if (notPriority) this.queue.push(path);
30263
+ else this.priorityQueue.push(path);
30264
+ }
30200
30265
  }
30201
30266
  };
30202
30267
  const { VISITOR_KEYS: VISITOR_KEYS$4 } = lib_exports;
@@ -30852,7 +30917,6 @@ function gatherNodeParts(node, parts) {
30852
30917
  case "JSXNamespacedName":
30853
30918
  gatherNodeParts(node.namespace, parts);
30854
30919
  gatherNodeParts(node.name, parts);
30855
- break;
30856
30920
  }
30857
30921
  }
30858
30922
  function resetScope(scope) {
@@ -31324,9 +31388,10 @@ var Scope = class Scope {
31324
31388
  let previousPath;
31325
31389
  do {
31326
31390
  const binding = scope.getOwnBinding(name);
31327
- if (binding) if (previousPath?.isPattern() && binding.kind !== "param" && binding.kind !== "local");
31328
- else return binding;
31329
- else if (!binding && name === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
31391
+ if (binding) {
31392
+ if (previousPath?.isPattern() && binding.kind !== "param" && binding.kind !== "local");
31393
+ else return binding;
31394
+ } else if (!binding && name === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) break;
31330
31395
  previousPath = scope.path;
31331
31396
  } while (scope = scope.parent);
31332
31397
  }
@@ -31482,9 +31547,10 @@ function getDeepestCommonAncestorFrom(paths, filter) {
31482
31547
  lastCommonIndex = i;
31483
31548
  lastCommon = shouldMatch;
31484
31549
  }
31485
- if (lastCommon) if (filter) return filter(lastCommon, lastCommonIndex, ancestries);
31486
- else return lastCommon;
31487
- else throw new Error("Couldn't find intersection");
31550
+ if (lastCommon) {
31551
+ if (filter) return filter(lastCommon, lastCommonIndex, ancestries);
31552
+ else return lastCommon;
31553
+ } else throw new Error("Couldn't find intersection");
31488
31554
  }
31489
31555
  function getAncestry() {
31490
31556
  let path = this;
@@ -31517,8 +31583,10 @@ const { BOOLEAN_NUMBER_BINARY_OPERATORS, createTypeAnnotationBasedOnTypeof, numb
31517
31583
  function infererReference(node) {
31518
31584
  if (!this.isReferenced()) return;
31519
31585
  const binding = this.scope.getBinding(node.name);
31520
- if (binding) if (binding.identifier.typeAnnotation) return binding.identifier.typeAnnotation;
31521
- else return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
31586
+ if (binding) {
31587
+ if (binding.identifier.typeAnnotation) return binding.identifier.typeAnnotation;
31588
+ else return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
31589
+ }
31522
31590
  if (node.name === "undefined") return voidTypeAnnotation$2();
31523
31591
  else if (node.name === "NaN" || node.name === "Infinity") return numberTypeAnnotation$1();
31524
31592
  else if (node.name === "arguments");
@@ -31722,9 +31790,10 @@ function resolveCall(callee) {
31722
31790
  callee = callee.resolve();
31723
31791
  if (callee.isFunction()) {
31724
31792
  const { node } = callee;
31725
- if (node.async) if (node.generator) return genericTypeAnnotation(identifier$2("AsyncIterator"));
31726
- else return genericTypeAnnotation(identifier$2("Promise"));
31727
- else if (node.generator) return genericTypeAnnotation(identifier$2("Iterator"));
31793
+ if (node.async) {
31794
+ if (node.generator) return genericTypeAnnotation(identifier$2("AsyncIterator"));
31795
+ else return genericTypeAnnotation(identifier$2("Promise"));
31796
+ } else if (node.generator) return genericTypeAnnotation(identifier$2("Iterator"));
31728
31797
  else if (callee.node.returnType) return callee.node.returnType;
31729
31798
  }
31730
31799
  }
@@ -31773,13 +31842,15 @@ function getTypeAnnotation() {
31773
31842
  const typeAnnotationInferringNodes = /* @__PURE__ */ new WeakSet();
31774
31843
  function _getTypeAnnotation() {
31775
31844
  const node = this.node;
31776
- if (!node) if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
31777
- const declar = this.parentPath.parentPath;
31778
- const declarParent = declar.parentPath;
31779
- if (declar.key === "left" && declarParent.isForInStatement()) return stringTypeAnnotation();
31780
- if (declar.key === "left" && declarParent.isForOfStatement()) return anyTypeAnnotation();
31781
- return voidTypeAnnotation();
31782
- } else return;
31845
+ if (!node) {
31846
+ if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
31847
+ const declar = this.parentPath.parentPath;
31848
+ const declarParent = declar.parentPath;
31849
+ if (declar.key === "left" && declarParent.isForInStatement()) return stringTypeAnnotation();
31850
+ if (declar.key === "left" && declarParent.isForOfStatement()) return anyTypeAnnotation();
31851
+ return voidTypeAnnotation();
31852
+ } else return;
31853
+ }
31783
31854
  if (node.typeAnnotation) return node.typeAnnotation;
31784
31855
  if (typeAnnotationInferringNodes.has(node)) return;
31785
31856
  typeAnnotationInferringNodes.add(node);
@@ -32185,13 +32256,14 @@ function gatherSequenceExpressions(nodes, declars) {
32185
32256
  }
32186
32257
  function replaceInline(nodes) {
32187
32258
  resync.call(this);
32188
- if (Array.isArray(nodes)) if (Array.isArray(this.container)) {
32189
- nodes = _verifyNodeList.call(this, nodes);
32190
- const paths = _containerInsertAfter.call(this, nodes);
32191
- this.remove();
32192
- return paths;
32193
- } else return this.replaceWithMultiple(nodes);
32194
- else return this.replaceWith(nodes);
32259
+ if (Array.isArray(nodes)) {
32260
+ if (Array.isArray(this.container)) {
32261
+ nodes = _verifyNodeList.call(this, nodes);
32262
+ const paths = _containerInsertAfter.call(this, nodes);
32263
+ this.remove();
32264
+ return paths;
32265
+ } else return this.replaceWithMultiple(nodes);
32266
+ } else return this.replaceWith(nodes);
32195
32267
  }
32196
32268
  const VALID_OBJECT_CALLEES = [
32197
32269
  "Number",
@@ -32568,11 +32640,13 @@ function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow =
32568
32640
  return p.isFunction() || p.isProgram() || p.isClassProperty({ static: false }) || p.isClassPrivateProperty({ static: false });
32569
32641
  });
32570
32642
  const inConstructor = thisEnvFn.isClassMethod({ kind: "constructor" });
32571
- if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) if (arrowParent) thisEnvFn = arrowParent;
32572
- else if (allowInsertArrow) {
32573
- thisEnvFn = fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []))[0].get("callee");
32574
- fnPath = thisEnvFn.get("body");
32575
- } else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
32643
+ if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {
32644
+ if (arrowParent) thisEnvFn = arrowParent;
32645
+ else if (allowInsertArrow) {
32646
+ thisEnvFn = fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []))[0].get("callee");
32647
+ fnPath = thisEnvFn.get("body");
32648
+ } else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
32649
+ }
32576
32650
  const { thisPaths, argumentsPaths, newTargetPaths, superProps, superCalls } = getScopeInformation(fnPath);
32577
32651
  if (inConstructor && superCalls.length > 0) {
32578
32652
  if (!allowInsertArrow) throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");
@@ -33183,8 +33257,10 @@ function normalCompletionToBreak(completions) {
33183
33257
  }
33184
33258
  function replaceBreakStatementInBreakCompletion(completions, reachable) {
33185
33259
  completions.forEach((c) => {
33186
- if (c.path.isBreakStatement({ label: null })) if (reachable) c.path.replaceWith(buildUndefinedNode());
33187
- else c.path.remove();
33260
+ if (c.path.isBreakStatement({ label: null })) {
33261
+ if (reachable) c.path.replaceWith(buildUndefinedNode());
33262
+ else c.path.remove();
33263
+ }
33188
33264
  });
33189
33265
  }
33190
33266
  function getStatementListCompletion(paths, context) {
@@ -33824,9 +33900,10 @@ function createNameMatcher(list, { exact = false } = {}) {
33824
33900
  const exactStrings = exact ? /* @__PURE__ */ new Set() : void 0;
33825
33901
  const fuzzyStrings = [];
33826
33902
  const regexList = [];
33827
- for (const item of list) if (typeof item === "string") if (exact) exactStrings.add(item);
33828
- else fuzzyStrings.push(item);
33829
- else regexList.push(normaliseRegex(item));
33903
+ for (const item of list) if (typeof item === "string") {
33904
+ if (exact) exactStrings.add(item);
33905
+ else fuzzyStrings.push(item);
33906
+ } else regexList.push(normaliseRegex(item));
33830
33907
  if (exact) {
33831
33908
  const exactStringCount = exactStrings?.size ?? 0;
33832
33909
  if (exactStringCount === 1 && regexList.length === 0) {
@@ -33899,7 +33976,7 @@ function babelParse(code, opts = {}) {
33899
33976
  return result;
33900
33977
  }
33901
33978
  //#endregion
33902
- //#region ../../node_modules/.pnpm/magic-string@1.0.0/node_modules/magic-string/dist/index.mjs
33979
+ //#region ../../node_modules/.pnpm/magic-string@1.1.0/node_modules/magic-string/dist/index.mjs
33903
33980
  var BitSet = class BitSet {
33904
33981
  constructor(arg) {
33905
33982
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -34010,10 +34087,8 @@ var Chunk = class Chunk {
34010
34087
  if (this.outro.length) return true;
34011
34088
  const trimmed = this.content.replace(rx, "");
34012
34089
  if (trimmed.length) {
34013
- if (trimmed !== this.content) {
34014
- this.split(this.start + trimmed.length).edit("", void 0, true);
34015
- if (this.edited) this.edit(trimmed, this.storeName, true);
34016
- }
34090
+ if (trimmed !== this.content) if (this.edited) this.edit(trimmed, this.storeName, true);
34091
+ else this.split(this.start + trimmed.length).edit("", void 0, true);
34017
34092
  return true;
34018
34093
  } else {
34019
34094
  this.edit("", void 0, true);
@@ -34026,9 +34101,9 @@ var Chunk = class Chunk {
34026
34101
  if (this.intro.length) return true;
34027
34102
  const trimmed = this.content.replace(rx, "");
34028
34103
  if (trimmed.length) {
34029
- if (trimmed !== this.content) {
34030
- const newChunk = this.split(this.end - trimmed.length);
34031
- if (this.edited) newChunk.edit(trimmed, this.storeName, true);
34104
+ if (trimmed !== this.content) if (this.edited) this.edit(trimmed, this.storeName, true);
34105
+ else {
34106
+ this.split(this.end - trimmed.length);
34032
34107
  this.edit("", void 0, true);
34033
34108
  }
34034
34109
  return true;
@@ -34296,8 +34371,8 @@ var MagicString = class MagicString {
34296
34371
  value: options.offset || 0
34297
34372
  }
34298
34373
  });
34299
- this.byStart[0] = chunk;
34300
- this.byEnd[string.length] = chunk;
34374
+ this.byStart = /* @__PURE__ */ new Map([[0, chunk]]);
34375
+ this.byEnd = /* @__PURE__ */ new Map([[string.length, chunk]]);
34301
34376
  }
34302
34377
  /**
34303
34378
  * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
@@ -34322,7 +34397,7 @@ var MagicString = class MagicString {
34322
34397
  index = index + this.offset;
34323
34398
  if (typeof content !== "string") throw new TypeError("inserted content must be a string");
34324
34399
  this._split(index);
34325
- const chunk = this.byEnd[index];
34400
+ const chunk = this.byEnd.get(index);
34326
34401
  if (chunk) chunk.appendLeft(content);
34327
34402
  else this.intro += content;
34328
34403
  return this;
@@ -34336,7 +34411,7 @@ var MagicString = class MagicString {
34336
34411
  index = index + this.offset;
34337
34412
  if (typeof content !== "string") throw new TypeError("inserted content must be a string");
34338
34413
  this._split(index);
34339
- const chunk = this.byStart[index];
34414
+ const chunk = this.byStart.get(index);
34340
34415
  if (chunk) chunk.appendRight(content);
34341
34416
  else this.outro += content;
34342
34417
  return this;
@@ -34352,8 +34427,8 @@ var MagicString = class MagicString {
34352
34427
  let originalChunk = this.firstChunk;
34353
34428
  let clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone();
34354
34429
  while (originalChunk) {
34355
- cloned.byStart[clonedChunk.start] = clonedChunk;
34356
- cloned.byEnd[clonedChunk.end] = clonedChunk;
34430
+ cloned.byStart.set(clonedChunk.start, clonedChunk);
34431
+ cloned.byEnd.set(clonedChunk.end, clonedChunk);
34357
34432
  const nextOriginalChunk = originalChunk.next;
34358
34433
  const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
34359
34434
  if (nextClonedChunk) {
@@ -34526,11 +34601,11 @@ var MagicString = class MagicString {
34526
34601
  this._split(start);
34527
34602
  this._split(end);
34528
34603
  this._split(index);
34529
- const first = this.byStart[start];
34530
- const last = this.byEnd[end];
34604
+ const first = this.byStart.get(start);
34605
+ const last = this.byEnd.get(end);
34531
34606
  const oldLeft = first.previous;
34532
34607
  const oldRight = last.next;
34533
- const newRight = this.byStart[index];
34608
+ const newRight = this.byStart.get(index);
34534
34609
  if (!newRight && last === this.lastChunk) return this;
34535
34610
  const newLeft = newRight ? newRight.previous : this.lastChunk;
34536
34611
  if (oldLeft) oldLeft.next = oldRight;
@@ -34602,12 +34677,12 @@ var MagicString = class MagicString {
34602
34677
  enumerable: true
34603
34678
  });
34604
34679
  }
34605
- const first = this.byStart[start];
34606
- const last = this.byEnd[end];
34680
+ const first = this.byStart.get(start);
34681
+ const last = this.byEnd.get(end);
34607
34682
  if (first) {
34608
34683
  let chunk = first;
34609
34684
  while (chunk !== last) {
34610
- if (chunk.next !== this.byStart[chunk.end]) throw new Error("Cannot overwrite across a split point");
34685
+ if (chunk.next !== this.byStart.get(chunk.end)) throw new Error("Cannot overwrite across a split point");
34611
34686
  chunk = chunk.next;
34612
34687
  chunk.edit("", false);
34613
34688
  }
@@ -34634,7 +34709,7 @@ var MagicString = class MagicString {
34634
34709
  index = index + this.offset;
34635
34710
  if (typeof content !== "string") throw new TypeError("inserted content must be a string");
34636
34711
  this._split(index);
34637
- const chunk = this.byEnd[index];
34712
+ const chunk = this.byEnd.get(index);
34638
34713
  if (chunk) chunk.prependLeft(content);
34639
34714
  else this.intro = content + this.intro;
34640
34715
  return this;
@@ -34646,7 +34721,7 @@ var MagicString = class MagicString {
34646
34721
  index = index + this.offset;
34647
34722
  if (typeof content !== "string") throw new TypeError("inserted content must be a string");
34648
34723
  this._split(index);
34649
- const chunk = this.byStart[index];
34724
+ const chunk = this.byStart.get(index);
34650
34725
  if (chunk) chunk.prependRight(content);
34651
34726
  else this.outro = content + this.outro;
34652
34727
  return this;
@@ -34667,12 +34742,12 @@ var MagicString = class MagicString {
34667
34742
  if (start > end) throw new Error("end must be greater than start");
34668
34743
  this._split(start);
34669
34744
  this._split(end);
34670
- let chunk = this.byStart[start];
34745
+ let chunk = this.byStart.get(start);
34671
34746
  while (chunk) {
34672
34747
  chunk.intro = "";
34673
34748
  chunk.outro = "";
34674
34749
  chunk.edit("");
34675
- chunk = end > chunk.end ? this.byStart[chunk.end] : null;
34750
+ chunk = end > chunk.end ? this.byStart.get(chunk.end) : null;
34676
34751
  }
34677
34752
  return this;
34678
34753
  }
@@ -34691,10 +34766,10 @@ var MagicString = class MagicString {
34691
34766
  if (start > end) throw new Error("end must be greater than start");
34692
34767
  this._split(start);
34693
34768
  this._split(end);
34694
- let chunk = this.byStart[start];
34769
+ let chunk = this.byStart.get(start);
34695
34770
  while (chunk) {
34696
34771
  chunk.reset();
34697
- chunk = end > chunk.end ? this.byStart[chunk.end] : null;
34772
+ chunk = end > chunk.end ? this.byStart.get(chunk.end) : null;
34698
34773
  }
34699
34774
  return this;
34700
34775
  }
@@ -34780,13 +34855,13 @@ var MagicString = class MagicString {
34780
34855
  }
34781
34856
  /** @internal */
34782
34857
  _split(index) {
34783
- if (this.byStart[index] || this.byEnd[index]) return;
34858
+ if (this.byStart.get(index) || this.byEnd.get(index)) return;
34784
34859
  let chunk = this.lastSearchedChunk;
34785
34860
  let previousChunk = chunk;
34786
34861
  const searchForward = index > chunk.end;
34787
34862
  while (chunk) {
34788
34863
  if (chunk.contains(index)) return this._splitChunk(chunk, index);
34789
- chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
34864
+ chunk = searchForward ? this.byStart.get(chunk.end) : this.byEnd.get(chunk.start);
34790
34865
  if (chunk === previousChunk) return;
34791
34866
  previousChunk = chunk;
34792
34867
  }
@@ -34798,9 +34873,9 @@ var MagicString = class MagicString {
34798
34873
  throw new Error(`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
34799
34874
  }
34800
34875
  const newChunk = chunk.split(index);
34801
- this.byEnd[index] = chunk;
34802
- this.byStart[index] = newChunk;
34803
- this.byEnd[newChunk.end] = newChunk;
34876
+ this.byEnd.set(index, chunk);
34877
+ this.byStart.set(index, newChunk);
34878
+ this.byEnd.set(newChunk.end, newChunk);
34804
34879
  if (chunk === this.lastChunk) this.lastChunk = newChunk;
34805
34880
  this.lastSearchedChunk = chunk;
34806
34881
  return true;
@@ -34860,9 +34935,9 @@ var MagicString = class MagicString {
34860
34935
  const aborted = chunk.trimEnd(rx);
34861
34936
  if (chunk.end !== end) {
34862
34937
  if (this.lastChunk === chunk) this.lastChunk = chunk.next;
34863
- this.byEnd[chunk.end] = chunk;
34864
- this.byStart[chunk.next.start] = chunk.next;
34865
- this.byEnd[chunk.next.end] = chunk.next;
34938
+ this.byEnd.set(chunk.end, chunk);
34939
+ this.byStart.set(chunk.next.start, chunk.next);
34940
+ this.byEnd.set(chunk.next.end, chunk.next);
34866
34941
  }
34867
34942
  if (aborted) return true;
34868
34943
  chunk = chunk.previous;
@@ -34887,9 +34962,9 @@ var MagicString = class MagicString {
34887
34962
  const aborted = chunk.trimStart(rx);
34888
34963
  if (chunk.end !== end) {
34889
34964
  if (chunk === this.lastChunk) this.lastChunk = chunk.next;
34890
- this.byEnd[chunk.end] = chunk;
34891
- this.byStart[chunk.next.start] = chunk.next;
34892
- this.byEnd[chunk.next.end] = chunk.next;
34965
+ this.byEnd.set(chunk.end, chunk);
34966
+ this.byStart.set(chunk.next.start, chunk.next);
34967
+ this.byEnd.set(chunk.next.end, chunk.next);
34893
34968
  }
34894
34969
  if (aborted) return true;
34895
34970
  chunk = chunk.next;
@@ -36177,7 +36252,7 @@ function analyzeSource(ast, options, handler, collectModuleMetadata = true) {
36177
36252
  const exportDeclarations = collectModuleMetadata ? /* @__PURE__ */ new Set() : EMPTY_EXPORT_DECLARATIONS;
36178
36253
  const requireCallPaths = collectModuleMetadata ? [] : EMPTY_REQUIRE_CALL_PATHS;
36179
36254
  const evalHandler = handler ?? getDefaultEvalHandler();
36180
- traverse(ast, {
36255
+ const traverseOptions = {
36181
36256
  StringLiteral: { enter(p) {
36182
36257
  if (isEvalPath(p.parentPath)) return;
36183
36258
  targetPaths.push(p);
@@ -36225,7 +36300,10 @@ function analyzeSource(ast, options, handler, collectModuleMetadata = true) {
36225
36300
  ExportDeclaration: { enter(p) {
36226
36301
  exportDeclarations.add(p);
36227
36302
  } }
36228
- } : {},
36303
+ } : {}
36304
+ };
36305
+ traverse(ast, {
36306
+ ...traverseOptions,
36229
36307
  noScope: !needScope
36230
36308
  });
36231
36309
  return {
@@ -36843,7 +36921,7 @@ async function generateVscodeIntellisenseEntry(options) {
36843
36921
  const formattedSources = (options.sources && options.sources.length > 0 ? options.sources : DEFAULT_VSCODE_SOURCES).map(formatSource).filter((statement) => Boolean(statement));
36844
36922
  const cssImport = toRelativeImport(outputPath, cssEntryPath);
36845
36923
  const separator = formattedSources.length > 0 ? [""] : [];
36846
- await (0, node_fs_promises.writeFile)(outputPath, `${[
36924
+ const content = [
36847
36925
  "/*",
36848
36926
  " * Auto-generated by weapp-tailwindcss.",
36849
36927
  " * This file exists solely to activate Tailwind CSS IntelliSense in VS Code.",
@@ -36855,7 +36933,8 @@ async function generateVscodeIntellisenseEntry(options) {
36855
36933
  ...separator,
36856
36934
  `@import '${cssImport}';`,
36857
36935
  ""
36858
- ].filter((line, idx, arr) => !(line === "" && arr[idx - 1] === "")).join("\n")}\n`, "utf8");
36936
+ ].filter((line, idx, arr) => !(line === "" && arr[idx - 1] === "")).join("\n");
36937
+ await (0, node_fs_promises.writeFile)(outputPath, `${content}\n`, "utf8");
36859
36938
  return {
36860
36939
  outputPath,
36861
36940
  cssEntryPath