@danielx/civet 0.10.4 → 0.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,26 @@ This changelog is generated automatically by [`build/changelog.civet`](build/cha
4
4
  For each version of Civet, it lists and links to all incorporated PRs,
5
5
  as well as a full diff and commit list.
6
6
 
7
+ ## 0.10.6 (2025-09-05, [diff](https://github.com/DanielXMoore/Civet/compare/v0.10.5...v0.10.6), [commits](https://github.com/DanielXMoore/Civet/commits/v0.10.6))
8
+ * Comment and tidy up source mapping util [[#1758](https://github.com/DanielXMoore/Civet/pull/1758)]
9
+ * Throw on esbuild emitDeclaration misconfiguration [[#1759](https://github.com/DanielXMoore/Civet/pull/1759)]
10
+ * LSP: log to `connection.console` instead of stdio for Neovim compatibility [[#1764](https://github.com/DanielXMoore/Civet/pull/1764)]
11
+ * LSP: Fix loading race condition by making `TSService` initialization async [[#1771](https://github.com/DanielXMoore/Civet/pull/1771)]
12
+ * LSP: Option to disable language server for JS/TS files [[#1773](https://github.com/DanielXMoore/Civet/pull/1773)]
13
+ * Fix typo in cheatsheet [[#1770](https://github.com/DanielXMoore/Civet/pull/1770)]
14
+ * Fix REPL handling of blank lines on Node 24 [[#1769](https://github.com/DanielXMoore/Civet/pull/1769)]
15
+ * LSP: fix and improve tests (for async TSService + removed hardcoded paths) [[#1774](https://github.com/DanielXMoore/Civet/pull/1774)]
16
+ * LSP: Handle conflicts and race conditions by rearchitecting update queue for atomic project-based changes [[#1775](https://github.com/DanielXMoore/Civet/pull/1775)]
17
+ * Fix source map's `sources` using unplugin with `outputExtension` [[#1782](https://github.com/DanielXMoore/Civet/pull/1782)]
18
+ * CoffeeScript classes support static fields/methods [[#1776](https://github.com/DanielXMoore/Civet/pull/1776)]
19
+ * LSP cleanup: improve type safety and resolve linter errors [[#1772](https://github.com/DanielXMoore/Civet/pull/1772)]
20
+ * Allow implicit object literal to end by `)`/`]`/`}` [[#1786](https://github.com/DanielXMoore/Civet/pull/1786)]
21
+
22
+ ## 0.10.5 (2025-06-30, [diff](https://github.com/DanielXMoore/Civet/compare/v0.10.4...v0.10.5), [commits](https://github.com/DanielXMoore/Civet/commits/v0.10.5))
23
+ * `this` and `@` are valid types (within classes) [[#1743](https://github.com/DanielXMoore/Civet/pull/1743)]
24
+ * Fix CoffeeScript comments getting treated as `length` shorthand [[#1750](https://github.com/DanielXMoore/Civet/pull/1750)]
25
+ * LSP: update TypeScript [[#1753](https://github.com/DanielXMoore/Civet/pull/1753)]
26
+
7
27
  ## 0.10.4 (2025-05-17, [diff](https://github.com/DanielXMoore/Civet/compare/v0.10.3...v0.10.4), [commits](https://github.com/DanielXMoore/Civet/commits/v0.10.4))
8
28
  * Fix implicit returns in IIFEs with "civet -implicitReturns" [[#1737](https://github.com/DanielXMoore/Civet/pull/1737)]
9
29
  * Typed pinned arguments such as `(^x: T) =>`; forbid implicit object literals in pinned patterns [[#1736](https://github.com/DanielXMoore/Civet/pull/1736)]
@@ -1111,7 +1131,7 @@ as well as a full diff and commit list.
1111
1131
 
1112
1132
  ## 0.5.56 (2023-01-24, [diff](https://github.com/DanielXMoore/Civet/compare/v0.5.55...v0.5.56), [commits](https://github.com/DanielXMoore/Civet/commits/v0.5.56))
1113
1133
  * `{x[y]}` shorthand for `{[y]: x[y]}` [[#284](https://github.com/DanielXMoore/Civet/pull/284)]
1114
- * Require space in JSX after identifier or ...rest attribute [[#285](https://github.com/DanielXMoore/Civet/pull/285)]
1134
+ * Require space in JSX after identifier or `...rest` attribute [[#285](https://github.com/DanielXMoore/Civet/pull/285)]
1115
1135
  * `not instanceof`, `!<?`, reserve `not` [[#286](https://github.com/DanielXMoore/Civet/pull/286)]
1116
1136
 
1117
1137
  ## 0.5.55 (2023-01-24, [diff](https://github.com/DanielXMoore/Civet/compare/v0.5.54...v0.5.55), [commits](https://github.com/DanielXMoore/Civet/commits/v0.5.55))
package/dist/browser.js CHANGED
@@ -433,6 +433,8 @@ ${body}`), super(message), this.header = header, this.body = body, this.filename
433
433
  blockWithPrefix: () => blockWithPrefix,
434
434
  braceBlock: () => braceBlock,
435
435
  bracedBlock: () => bracedBlock,
436
+ convertArrowFunctionToMethod: () => convertArrowFunctionToMethod,
437
+ convertFunctionToMethod: () => convertFunctionToMethod,
436
438
  convertNamedImportsToObject: () => convertNamedImportsToObject,
437
439
  convertObjectToJSXAttributes: () => convertObjectToJSXAttributes,
438
440
  convertWithClause: () => convertWithClause,
@@ -5071,13 +5073,13 @@ ${js}`
5071
5073
  return assignmentStatements2.length && concatAssign2(
5072
5074
  assignmentStatements2,
5073
5075
  findAssignments(assignmentStatements2.map((s) => s.children), decs2)
5074
- ), assignmentStatements2;
5076
+ ), assignmentStatements2.filter(($4) => $4.parent?.type !== "CoffeeClassPublic");
5075
5077
  }
5076
5078
  pushVar ??= (name) => (varIds.push(name), decs.add(name));
5077
5079
  let { expressions: statements } = block, decs = findDecs(statements);
5078
5080
  scopes.push(decs);
5079
5081
  let varIds = [];
5080
- findAssignments(statements, scopes).flatMap(($4) => $4?.names || []).filter((x, i, a) => {
5082
+ findAssignments(statements, scopes).flatMap(($5) => $5?.names || []).filter((x, i, a) => {
5081
5083
  if (!hasDec(x)) return a.indexOf(x) === i;
5082
5084
  }).forEach(pushVar);
5083
5085
  let fnNodes = gatherNodes(statements, isFunction), forNodes = gatherNodes(statements, (s) => s.type === "ForStatement"), blockNodes = new Set(gatherNodes(statements, (s) => s.type === "BlockStatement"));
@@ -5725,6 +5727,34 @@ ${js}`
5725
5727
  block
5726
5728
  };
5727
5729
  }
5730
+ function convertFunctionToMethod(id, exp) {
5731
+ let fnTokenIndex = exp.children.findIndex(function(c) {
5732
+ return c?.token?.startsWith("function");
5733
+ }), children = exp.children.slice();
5734
+ return exp.generator ? children.splice(fnTokenIndex, 2, children[fnTokenIndex + 1], id) : children.splice(fnTokenIndex, 1, id), {
5735
+ ...exp,
5736
+ type: "MethodDefinition",
5737
+ name: id.name,
5738
+ signature: { ...exp.signature, id, name: id.name },
5739
+ children
5740
+ };
5741
+ }
5742
+ function convertArrowFunctionToMethod(id, exp) {
5743
+ let block = { ...exp.block }, children = exp.children.filter(function(c) {
5744
+ return !(Array.isArray(c) && c[c.length - 1]?.token?.includes("=>"));
5745
+ }).map(function(c) {
5746
+ return c === exp.block ? block : c;
5747
+ });
5748
+ return children.unshift(id), exp = {
5749
+ ...exp,
5750
+ type: "MethodDefinition",
5751
+ name: id.name,
5752
+ signature: { ...exp.signature, id, name: id.name },
5753
+ block,
5754
+ children,
5755
+ autoBind: !0
5756
+ }, block.parent = exp, braceBlock(block), exp;
5757
+ }
5728
5758
  function convertNamedImportsToObject(node, pattern) {
5729
5759
  let properties = node.specifiers.map((specifier) => {
5730
5760
  if (specifier.ts)
@@ -6282,7 +6312,17 @@ ${js}`
6282
6312
  })()
6283
6313
  );
6284
6314
  }
6285
- let privates = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPrivate");
6315
+ let public_static_function_assignments = expressions.filter(($15) => $15[1]?.type === "CoffeeClassPublic" && $15[1].assignment?.expression?.type === "FunctionExpression").map(($16) => $16[1].assignment);
6316
+ for (let public_static_function_assignment of public_static_function_assignments) {
6317
+ let id = public_static_function_assignment.lhs[0][1];
6318
+ replaceNode(public_static_function_assignment, convertFunctionToMethod(id, public_static_function_assignment.expression));
6319
+ }
6320
+ let public_static_arrow_function_assignments = expressions.filter(($17) => $17[1]?.type === "CoffeeClassPublic" && $17[1].assignment?.expression?.type === "ArrowFunction").map(($18) => $18[1].assignment);
6321
+ for (let public_static_arrow_function_assignment of public_static_arrow_function_assignments) {
6322
+ let id = public_static_arrow_function_assignment.lhs[0][1];
6323
+ replaceNode(public_static_arrow_function_assignment, convertArrowFunctionToMethod(id, public_static_arrow_function_assignment.expression));
6324
+ }
6325
+ let privates = expressions.filter(($19) => $19[1]?.type === "CoffeeClassPrivate");
6286
6326
  if (!privates.length)
6287
6327
  continue;
6288
6328
  let { parent } = ce;
@@ -6319,30 +6359,30 @@ ${js}`
6319
6359
  root.expressions,
6320
6360
  root.topLevelAwait,
6321
6361
  root.topLevelYield ? "*" : void 0
6322
- ), statements = [["", rootIIFE]], root.children = root.children.map(($16) => $16 === root.expressions ? statements : $16), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6362
+ ), statements = [["", rootIIFE]], root.children = root.children.map(($20) => $20 === root.expressions ? statements : $20), root.expressions = statements), hoistRefDecs(statements), processFunctions(statements, config2), config2.coffeeClasses && processCoffeeClasses(statements), statements.unshift(...extractPreludeFor(statements)), config2.autoLet ? createConstLetDecs(statements, [], "let") : config2.autoConst ? createConstLetDecs(statements, [], "const") : config2.autoVar && createVarDecs(root, []), config2.repl && processRepl(root, rootIIFE), processBlocks(statements), populateRefs(statements), adjustAtBindings(statements), getSync() && processComptime(statements);
6323
6363
  }
6324
6364
  async function processProgramAsync(root) {
6325
6365
  let { expressions: statements } = root;
6326
6366
  await processComptime(statements);
6327
6367
  }
6328
6368
  function processRepl(root, rootIIFE) {
6329
- let topBlock = gatherRecursive(rootIIFE, ($17) => $17.type === "BlockStatement")[0], i = 0;
6330
- for (let ref23 = gatherRecursiveWithinFunction(topBlock, ($18) => $18.type === "Declaration"), i14 = 0, len11 = ref23.length; i14 < len11; i14++) {
6369
+ let topBlock = gatherRecursive(rootIIFE, ($21) => $21.type === "BlockStatement")[0], i = 0;
6370
+ for (let ref23 = gatherRecursiveWithinFunction(topBlock, ($22) => $22.type === "Declaration"), i14 = 0, len11 = ref23.length; i14 < len11; i14++) {
6331
6371
  let decl = ref23[i14];
6332
6372
  decl.names?.length && (decl.parent === topBlock || decl.decl === "var") && (decl.children.shift(), decl.bindings[0]?.pattern?.type === "ObjectBindingPattern" && (decl.children.unshift("("), decl.children.push(")")), root.expressions.splice(i++, 0, ["", `var ${decl.names.join(",")}`, ";"]));
6333
6373
  }
6334
- for (let ref24 = gatherRecursive(topBlock, ($19) => $19.type === "FunctionExpression"), i15 = 0, len12 = ref24.length; i15 < len12; i15++) {
6374
+ for (let ref24 = gatherRecursive(topBlock, ($23) => $23.type === "FunctionExpression"), i15 = 0, len12 = ref24.length; i15 < len12; i15++) {
6335
6375
  let func = ref24[i15];
6336
6376
  func.name && func.parent?.type === "BlockStatement" && (func.parent === topBlock ? (replaceNode(func, void 0), root.expressions.splice(i++, 0, ["", func]), func.parent = root) : (func.children.unshift(func.name, "="), root.expressions.splice(i++, 0, ["", `var ${func.name}`, ";"])));
6337
6377
  }
6338
- for (let ref25 = gatherRecursiveWithinFunction(topBlock, ($20) => $20.type === "ClassExpression"), i16 = 0, len13 = ref25.length; i16 < len13; i16++) {
6378
+ for (let ref25 = gatherRecursiveWithinFunction(topBlock, ($24) => $24.type === "ClassExpression"), i16 = 0, len13 = ref25.length; i16 < len13; i16++) {
6339
6379
  let classExp = ref25[i16], m8;
6340
6380
  (classExp.name && classExp.parent === topBlock || (m8 = classExp.parent, typeof m8 == "object" && m8 != null && "type" in m8 && m8.type === "ReturnStatement" && "parent" in m8 && m8.parent === topBlock)) && (classExp.children.unshift(classExp.name, "="), root.expressions.splice(i++, 0, ["", `var ${classExp.name}`, ";"]));
6341
6381
  }
6342
6382
  }
6343
6383
  function processPlaceholders(statements) {
6344
6384
  let placeholderMap = /* @__PURE__ */ new Map(), liftedIfs = /* @__PURE__ */ new Set();
6345
- for (let ref26 = gatherRecursiveAll(statements, ($21) => $21.type === "Placeholder"), i17 = 0, len14 = ref26.length; i17 < len14; i17++) {
6385
+ for (let ref26 = gatherRecursiveAll(statements, ($25) => $25.type === "Placeholder"), i17 = 0, len14 = ref26.length; i17 < len14; i17++) {
6346
6386
  let exp = ref26[i17], ancestor;
6347
6387
  if (exp.subtype === ".") {
6348
6388
  ({ ancestor } = findAncestor(
@@ -6646,6 +6686,7 @@ ${js}`
6646
6686
  AccessModifier,
6647
6687
  FieldDefinition,
6648
6688
  ThisLiteral,
6689
+ BasicThisLiteral,
6649
6690
  HashThis,
6650
6691
  LengthShorthand,
6651
6692
  AtThis,
@@ -7368,7 +7409,7 @@ ${js}`
7368
7409
  SameLineOrIndentedFurther,
7369
7410
  Dedented,
7370
7411
  PushExtraIndent1
7371
- }, $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[)}]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R34 = (0, import_lib2.$R)(new RegExp('[^;"\\s=>]+', "suy")), $R35 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R46 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R47 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R48 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R49 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R50 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R53 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R54 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R55 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R70 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R72 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R73 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\])", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R86 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R87 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R88 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R89 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7412
+ }, $L0 = (0, import_lib2.$L)(""), $L1 = (0, import_lib2.$L)("{"), $L2 = (0, import_lib2.$L)("/ "), $L3 = (0, import_lib2.$L)("="), $L4 = (0, import_lib2.$L)("("), $L5 = (0, import_lib2.$L)("... "), $L6 = (0, import_lib2.$L)("?"), $L7 = (0, import_lib2.$L)("."), $L8 = (0, import_lib2.$L)("tuple"), $L9 = (0, import_lib2.$L)("++"), $L10 = (0, import_lib2.$L)("--"), $L11 = (0, import_lib2.$L)("\u29FA"), $L12 = (0, import_lib2.$L)("\u2014"), $L13 = (0, import_lib2.$L)("=>"), $L14 = (0, import_lib2.$L)("\u21D2"), $L15 = (0, import_lib2.$L)("import"), $L16 = (0, import_lib2.$L)(":"), $L17 = (0, import_lib2.$L)(" "), $L18 = (0, import_lib2.$L)("<"), $L19 = (0, import_lib2.$L)("implements"), $L20 = (0, import_lib2.$L)("<:"), $L21 = (0, import_lib2.$L)("^"), $L22 = (0, import_lib2.$L)("<?"), $L23 = (0, import_lib2.$L)("-"), $L24 = (0, import_lib2.$L)("import.meta"), $L25 = (0, import_lib2.$L)("return.value"), $L26 = (0, import_lib2.$L)(","), $L27 = (0, import_lib2.$L)("tighter"), $L28 = (0, import_lib2.$L)("looser"), $L29 = (0, import_lib2.$L)("same"), $L30 = (0, import_lib2.$L)("left"), $L31 = (0, import_lib2.$L)("right"), $L32 = (0, import_lib2.$L)("non"), $L33 = (0, import_lib2.$L)("relational"), $L34 = (0, import_lib2.$L)("arguments"), $L35 = (0, import_lib2.$L)("->"), $L36 = (0, import_lib2.$L)("\u2192"), $L37 = (0, import_lib2.$L)("}"), $L38 = (0, import_lib2.$L)("null"), $L39 = (0, import_lib2.$L)("true"), $L40 = (0, import_lib2.$L)("false"), $L41 = (0, import_lib2.$L)("yes"), $L42 = (0, import_lib2.$L)("on"), $L43 = (0, import_lib2.$L)("no"), $L44 = (0, import_lib2.$L)("off"), $L45 = (0, import_lib2.$L)(">"), $L46 = (0, import_lib2.$L)("]"), $L47 = (0, import_lib2.$L)("\u2022"), $L48 = (0, import_lib2.$L)("//"), $L49 = (0, import_lib2.$L)("**="), $L50 = (0, import_lib2.$L)("*="), $L51 = (0, import_lib2.$L)("%/"), $L52 = (0, import_lib2.$L)("\xF7"), $L53 = (0, import_lib2.$L)("%%"), $L54 = (0, import_lib2.$L)("/="), $L55 = (0, import_lib2.$L)("%="), $L56 = (0, import_lib2.$L)("+="), $L57 = (0, import_lib2.$L)("-="), $L58 = (0, import_lib2.$L)("<<="), $L59 = (0, import_lib2.$L)("\u226A="), $L60 = (0, import_lib2.$L)(">>>="), $L61 = (0, import_lib2.$L)("\u22D9="), $L62 = (0, import_lib2.$L)(">>="), $L63 = (0, import_lib2.$L)("\u226B="), $L64 = (0, import_lib2.$L)("&&="), $L65 = (0, import_lib2.$L)("&="), $L66 = (0, import_lib2.$L)("^="), $L67 = (0, import_lib2.$L)("||="), $L68 = (0, import_lib2.$L)("\u2016="), $L69 = (0, import_lib2.$L)("|="), $L70 = (0, import_lib2.$L)("??="), $L71 = (0, import_lib2.$L)("\u2047="), $L72 = (0, import_lib2.$L)("?="), $L73 = (0, import_lib2.$L)("and="), $L74 = (0, import_lib2.$L)("or="), $L75 = (0, import_lib2.$L)("*"), $L76 = (0, import_lib2.$L)("**"), $L77 = (0, import_lib2.$L)("/"), $L78 = (0, import_lib2.$L)("%"), $L79 = (0, import_lib2.$L)("+"), $L80 = (0, import_lib2.$L)("<="), $L81 = (0, import_lib2.$L)("\u2264"), $L82 = (0, import_lib2.$L)(">="), $L83 = (0, import_lib2.$L)("\u2265"), $L84 = (0, import_lib2.$L)("!<?"), $L85 = (0, import_lib2.$L)("<<"), $L86 = (0, import_lib2.$L)("\u226A"), $L87 = (0, import_lib2.$L)(">>>"), $L88 = (0, import_lib2.$L)("\u22D9"), $L89 = (0, import_lib2.$L)(">>"), $L90 = (0, import_lib2.$L)("\u226B"), $L91 = (0, import_lib2.$L)("!=="), $L92 = (0, import_lib2.$L)("\u2262"), $L93 = (0, import_lib2.$L)("!="), $L94 = (0, import_lib2.$L)("\u2260"), $L95 = (0, import_lib2.$L)("isnt"), $L96 = (0, import_lib2.$L)("==="), $L97 = (0, import_lib2.$L)("\u2263"), $L98 = (0, import_lib2.$L)("\u2A76"), $L99 = (0, import_lib2.$L)("=="), $L100 = (0, import_lib2.$L)("\u2261"), $L101 = (0, import_lib2.$L)("\u2A75"), $L102 = (0, import_lib2.$L)("and"), $L103 = (0, import_lib2.$L)("&&"), $L104 = (0, import_lib2.$L)("or"), $L105 = (0, import_lib2.$L)("||"), $L106 = (0, import_lib2.$L)("\u2016"), $L107 = (0, import_lib2.$L)("^^"), $L108 = (0, import_lib2.$L)("xor"), $L109 = (0, import_lib2.$L)("xnor"), $L110 = (0, import_lib2.$L)("??"), $L111 = (0, import_lib2.$L)("\u2047"), $L112 = (0, import_lib2.$L)("instanceof"), $L113 = (0, import_lib2.$L)("\u2208"), $L114 = (0, import_lib2.$L)("\u220B"), $L115 = (0, import_lib2.$L)("\u220C"), $L116 = (0, import_lib2.$L)("\u2209"), $L117 = (0, import_lib2.$L)("&"), $L118 = (0, import_lib2.$L)("|"), $L119 = (0, import_lib2.$L)(";"), $L120 = (0, import_lib2.$L)("some"), $L121 = (0, import_lib2.$L)("every"), $L122 = (0, import_lib2.$L)("count"), $L123 = (0, import_lib2.$L)("first"), $L124 = (0, import_lib2.$L)("sum"), $L125 = (0, import_lib2.$L)("product"), $L126 = (0, import_lib2.$L)("min"), $L127 = (0, import_lib2.$L)("max"), $L128 = (0, import_lib2.$L)("join"), $L129 = (0, import_lib2.$L)("concat"), $L130 = (0, import_lib2.$L)("break"), $L131 = (0, import_lib2.$L)("continue"), $L132 = (0, import_lib2.$L)("debugger"), $L133 = (0, import_lib2.$L)("require"), $L134 = (0, import_lib2.$L)("with"), $L135 = (0, import_lib2.$L)("assert"), $L136 = (0, import_lib2.$L)(":="), $L137 = (0, import_lib2.$L)("\u2254"), $L138 = (0, import_lib2.$L)(".="), $L139 = (0, import_lib2.$L)("::="), $L140 = (0, import_lib2.$L)("/*"), $L141 = (0, import_lib2.$L)("*/"), $L142 = (0, import_lib2.$L)("\\"), $L143 = (0, import_lib2.$L)(")"), $L144 = (0, import_lib2.$L)("abstract"), $L145 = (0, import_lib2.$L)("as"), $L146 = (0, import_lib2.$L)("@"), $L147 = (0, import_lib2.$L)("@@"), $L148 = (0, import_lib2.$L)("async"), $L149 = (0, import_lib2.$L)("await"), $L150 = (0, import_lib2.$L)("`"), $L151 = (0, import_lib2.$L)("by"), $L152 = (0, import_lib2.$L)("case"), $L153 = (0, import_lib2.$L)("catch"), $L154 = (0, import_lib2.$L)("class"), $L155 = (0, import_lib2.$L)("#{"), $L156 = (0, import_lib2.$L)("comptime"), $L157 = (0, import_lib2.$L)("declare"), $L158 = (0, import_lib2.$L)("default"), $L159 = (0, import_lib2.$L)("delete"), $L160 = (0, import_lib2.$L)("do"), $L161 = (0, import_lib2.$L)(".."), $L162 = (0, import_lib2.$L)("\u2025"), $L163 = (0, import_lib2.$L)("..."), $L164 = (0, import_lib2.$L)("\u2026"), $L165 = (0, import_lib2.$L)("::"), $L166 = (0, import_lib2.$L)('"'), $L167 = (0, import_lib2.$L)("each"), $L168 = (0, import_lib2.$L)("else"), $L169 = (0, import_lib2.$L)("!"), $L170 = (0, import_lib2.$L)("export"), $L171 = (0, import_lib2.$L)("extends"), $L172 = (0, import_lib2.$L)("finally"), $L173 = (0, import_lib2.$L)("for"), $L174 = (0, import_lib2.$L)("from"), $L175 = (0, import_lib2.$L)("function"), $L176 = (0, import_lib2.$L)("get"), $L177 = (0, import_lib2.$L)("set"), $L178 = (0, import_lib2.$L)("#"), $L179 = (0, import_lib2.$L)("if"), $L180 = (0, import_lib2.$L)("in"), $L181 = (0, import_lib2.$L)("infer"), $L182 = (0, import_lib2.$L)("let"), $L183 = (0, import_lib2.$L)("const"), $L184 = (0, import_lib2.$L)("is"), $L185 = (0, import_lib2.$L)("var"), $L186 = (0, import_lib2.$L)("like"), $L187 = (0, import_lib2.$L)("loop"), $L188 = (0, import_lib2.$L)("new"), $L189 = (0, import_lib2.$L)("not"), $L190 = (0, import_lib2.$L)("of"), $L191 = (0, import_lib2.$L)("["), $L192 = (0, import_lib2.$L)("operator"), $L193 = (0, import_lib2.$L)("override"), $L194 = (0, import_lib2.$L)("own"), $L195 = (0, import_lib2.$L)("public"), $L196 = (0, import_lib2.$L)("private"), $L197 = (0, import_lib2.$L)("protected"), $L198 = (0, import_lib2.$L)("||>"), $L199 = (0, import_lib2.$L)("|\u25B7"), $L200 = (0, import_lib2.$L)("|>="), $L201 = (0, import_lib2.$L)("\u25B7="), $L202 = (0, import_lib2.$L)("|>"), $L203 = (0, import_lib2.$L)("\u25B7"), $L204 = (0, import_lib2.$L)("readonly"), $L205 = (0, import_lib2.$L)("return"), $L206 = (0, import_lib2.$L)("satisfies"), $L207 = (0, import_lib2.$L)("'"), $L208 = (0, import_lib2.$L)("static"), $L209 = (0, import_lib2.$L)("${"), $L210 = (0, import_lib2.$L)("super"), $L211 = (0, import_lib2.$L)("switch"), $L212 = (0, import_lib2.$L)("target"), $L213 = (0, import_lib2.$L)("then"), $L214 = (0, import_lib2.$L)("this"), $L215 = (0, import_lib2.$L)("throw"), $L216 = (0, import_lib2.$L)('"""'), $L217 = (0, import_lib2.$L)("'''"), $L218 = (0, import_lib2.$L)("///"), $L219 = (0, import_lib2.$L)("```"), $L220 = (0, import_lib2.$L)("try"), $L221 = (0, import_lib2.$L)("typeof"), $L222 = (0, import_lib2.$L)("undefined"), $L223 = (0, import_lib2.$L)("unless"), $L224 = (0, import_lib2.$L)("until"), $L225 = (0, import_lib2.$L)("using"), $L226 = (0, import_lib2.$L)("void"), $L227 = (0, import_lib2.$L)("when"), $L228 = (0, import_lib2.$L)("while"), $L229 = (0, import_lib2.$L)("yield"), $L230 = (0, import_lib2.$L)("/>"), $L231 = (0, import_lib2.$L)("</"), $L232 = (0, import_lib2.$L)("<>"), $L233 = (0, import_lib2.$L)("</>"), $L234 = (0, import_lib2.$L)("<!--"), $L235 = (0, import_lib2.$L)("-->"), $L236 = (0, import_lib2.$L)("type"), $L237 = (0, import_lib2.$L)("enum"), $L238 = (0, import_lib2.$L)("interface"), $L239 = (0, import_lib2.$L)("global"), $L240 = (0, import_lib2.$L)("module"), $L241 = (0, import_lib2.$L)("namespace"), $L242 = (0, import_lib2.$L)("asserts"), $L243 = (0, import_lib2.$L)("keyof"), $L244 = (0, import_lib2.$L)("???"), $L245 = (0, import_lib2.$L)("unique"), $L246 = (0, import_lib2.$L)("symbol"), $L247 = (0, import_lib2.$L)("[]"), $L248 = (0, import_lib2.$L)("civet"), $R0 = (0, import_lib2.$R)(new RegExp("(?=async|debugger|if|unless|comptime|do|for|loop|until|while|switch|throw|try)", "suy")), $R1 = (0, import_lib2.$R)(new RegExp("&(?=\\s)", "suy")), $R2 = (0, import_lib2.$R)(new RegExp("(as|of|by|satisfies|then|when|implements|xor|xnor)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R3 = (0, import_lib2.$R)(new RegExp("[0-9]", "suy")), $R4 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Start}|[_$0-9(\\[{])", "suy")), $R5 = (0, import_lib2.$R)(new RegExp("[ \\t]", "suy")), $R6 = (0, import_lib2.$R)(new RegExp("\\p{ID_Continue}|[\\u200C\\u200D$.#{=]", "suy")), $R7 = (0, import_lib2.$R)(new RegExp("[&=]", "suy")), $R8 = (0, import_lib2.$R)(new RegExp("(?=['\"`])", "suy")), $R9 = (0, import_lib2.$R)(new RegExp("(?=[\\/?])", "suy")), $R10 = (0, import_lib2.$R)(new RegExp("(?=[\\/\\[{?.!@#'\u2019:])", "suy")), $R11 = (0, import_lib2.$R)(new RegExp("%%?", "suy")), $R12 = (0, import_lib2.$R)(new RegExp("[.\\s]", "suy")), $R13 = (0, import_lib2.$R)(new RegExp("[)\\]}]", "suy")), $R14 = (0, import_lib2.$R)(new RegExp("[+-]", "suy")), $R15 = (0, import_lib2.$R)(new RegExp("\\+\\+|--|\u29FA|\u2014|[\\+\\-&]\\S", "suy")), $R16 = (0, import_lib2.$R)(new RegExp(`(?=[0-9.'"tfyno])`, "suy")), $R17 = (0, import_lib2.$R)(new RegExp("(?=true|false|yes|no|on|off)", "suy")), $R18 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$])", "suy")), $R19 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R20 = (0, import_lib2.$R)(new RegExp("(?=\\[|\\s*[.\u2022\\/])", "suy")), $R21 = (0, import_lib2.$R)(new RegExp("([<>])(=?)|([\u2264\u2265])", "suy")), $R22 = (0, import_lib2.$R)(new RegExp("[ \\t]*", "suy")), $R23 = (0, import_lib2.$R)(new RegExp("[ \\t]+", "suy")), $R24 = (0, import_lib2.$R)(new RegExp("[!+-]?", "suy")), $R25 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R26 = (0, import_lib2.$R)(new RegExp("[=>]", "suy")), $R27 = (0, import_lib2.$R)(new RegExp("(?=\\p{ID_Start}|[_$^\u226A\u226B\u22D9\u2264\u2265\u2208\u220B\u2209\u220C\u2263\u2261\u2262\u2260=\u2A76\u2A75\u2016\u2047&|*\\/!?%\xF7<>\u29FA+-])", "suy")), $R28 = (0, import_lib2.$R)(new RegExp("!\\^\\^?", "suy")), $R29 = (0, import_lib2.$R)(new RegExp("(?!\\+\\+|--)[!~+-](?!\\s)", "suy")), $R30 = (0, import_lib2.$R)(new RegExp("[:.]", "suy")), $R31 = (0, import_lib2.$R)(new RegExp("(?=for|if|loop|unless|until|while)", "suy")), $R32 = (0, import_lib2.$R)(new RegExp("(?:loop|while|until|for|do)(?!\\p{ID_Continue})", "suy")), $R33 = (0, import_lib2.$R)(new RegExp("(?=loop|comptime|do|for|until|while)", "suy")), $R34 = (0, import_lib2.$R)(new RegExp('[^;"\\s=>]+', "suy")), $R35 = (0, import_lib2.$R)(new RegExp("(?=[0-9.])", "suy")), $R36 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)n", "suy")), $R37 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?=\\.(?:\\p{ID_Start}|[_$]))", "suy")), $R38 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)(?:\\.(?:[0-9](?:_[0-9]|[0-9])*))?", "suy")), $R39 = (0, import_lib2.$R)(new RegExp("(?:\\.[0-9](?:_[0-9]|[0-9])*)", "suy")), $R40 = (0, import_lib2.$R)(new RegExp("(?:[eE][+-]?[0-9]+(?:_[0-9]|[0-9])*)", "suy")), $R41 = (0, import_lib2.$R)(new RegExp("0[bB][01](?:[01]|_[01])*n?", "suy")), $R42 = (0, import_lib2.$R)(new RegExp("0[oO][0-7](?:[0-7]|_[0-7])*n?", "suy")), $R43 = (0, import_lib2.$R)(new RegExp("0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_[0-9a-fA-F])*n?", "suy")), $R44 = (0, import_lib2.$R)(new RegExp("(?=[0-9])", "suy")), $R45 = (0, import_lib2.$R)(new RegExp("(?:0|[1-9](?:_[0-9]|[0-9])*)", "suy")), $R46 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|[^"])*', "suy")), $R47 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^'])*", "suy")), $R48 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|#(?!\\{)|\\\\.|[^#"])+', "suy")), $R49 = (0, import_lib2.$R)(new RegExp('(?:"(?!"")|\\\\.|[^"])+', "suy")), $R50 = (0, import_lib2.$R)(new RegExp("(?:'(?!'')|\\\\.|[^'])*", "suy")), $R51 = (0, import_lib2.$R)(new RegExp('(?:\\\\.|#(?!\\{)|[^"#])+', "suy")), $R52 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^\\]])*", "suy")), $R53 = (0, import_lib2.$R)(new RegExp("(?:\\\\.)", "suy")), $R54 = (0, import_lib2.$R)(new RegExp("[\\s]+", "suy")), $R55 = (0, import_lib2.$R)(new RegExp("\\/(?!\\/\\/)", "suy")), $R56 = (0, import_lib2.$R)(new RegExp("[^[\\/\\s#$\\\\]+|[#$]", "suy")), $R57 = (0, import_lib2.$R)(new RegExp("[*\\/\\r\\n]", "suy")), $R58 = (0, import_lib2.$R)(new RegExp("(?:\\\\.|[^[\\/\\r\\n])+", "suy")), $R59 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Continue}|[\\u200C\\u200D$])*", "suy")), $R60 = (0, import_lib2.$R)(new RegExp("(?=[`'\"])", "suy")), $R61 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|\\\\.|[^$`])+", "suy")), $R62 = (0, import_lib2.$R)(new RegExp("(?:\\$(?!\\{)|`(?!``)|\\\\.|[^$`])+", "suy")), $R63 = (0, import_lib2.$R)(new RegExp("(?:on|off|yes|no)(?!\\p{ID_Continue})", "suy")), $R64 = (0, import_lib2.$R)(new RegExp("(?:isnt)(?!\\p{ID_Continue})", "suy")), $R65 = (0, import_lib2.$R)(new RegExp("(?:by)(?!\\p{ID_Continue})", "suy")), $R66 = (0, import_lib2.$R)(new RegExp("(?:of)(?!\\p{ID_Continue})", "suy")), $R67 = (0, import_lib2.$R)(new RegExp("(?:and|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|if|import|in|instanceof|interface|is|let|loop|new|not|null|or|private|protected|public|return|static|super|switch|this|throw|true|try|typeof|unless|until|var|void|while|with|yield)(?!\\p{ID_Continue})", "suy")), $R68 = (0, import_lib2.$R)(new RegExp("(?=\\/|#)", "suy")), $R69 = (0, import_lib2.$R)(new RegExp("\\/\\/(?!\\/)[^\\r\\n]*", "suy")), $R70 = (0, import_lib2.$R)(new RegExp(".", "suy")), $R71 = (0, import_lib2.$R)(new RegExp("#(?!##(?!#))([^\\r\\n]*)", "suy")), $R72 = (0, import_lib2.$R)(new RegExp("[^]*?###", "suy")), $R73 = (0, import_lib2.$R)(new RegExp("###(?!#)", "suy")), $R74 = (0, import_lib2.$R)(new RegExp("\\/\\*(?:(?!\\*\\/)[^\\r\\n])*\\*\\/", "suy")), $R75 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\/\\\\])", "suy")), $R76 = (0, import_lib2.$R)(new RegExp("(?=\\s|\\/|#)", "suy")), $R77 = (0, import_lib2.$R)(new RegExp("(?!\\p{ID_Continue})", "suy")), $R78 = (0, import_lib2.$R)(new RegExp("[=:]", "suy")), $R79 = (0, import_lib2.$R)(new RegExp("['\u2019]s", "suy")), $R80 = (0, import_lib2.$R)(new RegExp("\\s", "suy")), $R81 = (0, import_lib2.$R)(new RegExp("(?=[<])", "suy")), $R82 = (0, import_lib2.$R)(new RegExp("(?:\\p{ID_Start}|[_$])(?:\\p{ID_Continue}|[\\u200C\\u200D$-])*", "suy")), $R83 = (0, import_lib2.$R)(new RegExp("[!+-]", "suy")), $R84 = (0, import_lib2.$R)(new RegExp("[\\s>]|\\/>", "suy")), $R85 = (0, import_lib2.$R)(new RegExp("(?:[\\w\\-:]+|\\([^()]*\\)|\\[[^\\[\\]]*\\])+", "suy")), $R86 = (0, import_lib2.$R)(new RegExp(`"[^"]*"|'[^']*'`, "suy")), $R87 = (0, import_lib2.$R)(new RegExp("[<>]", "suy")), $R88 = (0, import_lib2.$R)(new RegExp("[!~+-](?!\\s|[!~+-]*&)", "suy")), $R89 = (0, import_lib2.$R)(new RegExp("(?:-[^-]|[^-]*)*", "suy")), $R90 = (0, import_lib2.$R)(new RegExp("[^{}<>\\r\\n]+", "suy")), $R91 = (0, import_lib2.$R)(new RegExp("[+-]?", "suy")), $R92 = (0, import_lib2.$R)(new RegExp("(?=if|unless)", "suy")), $R93 = (0, import_lib2.$R)(new RegExp("[|&<!=\\-\u21D2\u2192]", "suy")), $R94 = (0, import_lib2.$R)(new RegExp("(extends|not|is)(?!\\p{ID_Continue}|[\\u200C\\u200D$])", "suy")), $R95 = (0, import_lib2.$R)(new RegExp("const|in|out", "suy")), $R96 = (0, import_lib2.$R)(new RegExp("#![^\\r\\n]*", "suy")), $R97 = (0, import_lib2.$R)(new RegExp("[\\t ]*", "suy")), $R98 = (0, import_lib2.$R)(new RegExp("[\\s]*", "suy")), $R99 = (0, import_lib2.$R)(new RegExp("\\s+([+-]?)([a-zA-Z0-9-]+)(\\s*=\\s*([\\p{ID_Continue}.,+-]*))?", "suy")), $R100 = (0, import_lib2.$R)(new RegExp("\\/\\/\\/[^\\r\\n]*", "suy")), $R101 = (0, import_lib2.$R)(new RegExp("(?=[ \\t\\r\\n\\/#]|$)", "suy")), $R102 = (0, import_lib2.$R)(new RegExp("\\r\\n|\\n|\\r|$", "suy")), $R103 = (0, import_lib2.$R)(new RegExp("[^]*", "suy")), Program$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Reset, Init, (0, import_lib2.$E)(EOS), TopLevelStatements, __), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
7372
7413
  var reset = $1, init = $2, ws1 = $3, statements = $4, ws2 = $5;
7373
7414
  let program = {
7374
7415
  type: "BlockStatement",
@@ -8348,7 +8389,14 @@ ${js}`
8348
8389
  function NestedClassElement(ctx, state2) {
8349
8390
  return (0, import_lib2.$EVENT)(ctx, state2, "NestedClassElement", NestedClassElement$0);
8350
8391
  }
8351
- var ClassElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Declare, (0, import_lib2.$E)(_))), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8392
+ var ClassElement$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, (0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Declare, (0, import_lib2.$E)(_))), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), ActualAssignment), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6, $7) {
8393
+ var decorators = $2, declare = $3, access = $4, static_ = $5, override = $6, assignment = $7;
8394
+ return {
8395
+ type: static_ ? "CoffeeClassPublic" : "CoffeeClassPrivate",
8396
+ children: [decorators, declare, access, static_, override, assignment],
8397
+ assignment
8398
+ };
8399
+ }), ClassElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(Decorators), (0, import_lib2.$E)((0, import_lib2.$S)(Declare, (0, import_lib2.$E)(_))), (0, import_lib2.$E)(AccessModifier), (0, import_lib2.$E)((0, import_lib2.$S)(Static, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Override, (0, import_lib2.$E)(_))), ClassElementDefinition), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8352
8400
  var decorators = $1, declare = $2, access = $3, static_ = $4, override = $5, definition = $6;
8353
8401
  let ts2 = definition.ts || !!declare;
8354
8402
  return definition.type === "MultiMethodDefinition" ? {
@@ -8363,12 +8411,12 @@ ${js}`
8363
8411
  ts: ts2,
8364
8412
  children: [decorators, declare, access, static_, override, ...definition.children]
8365
8413
  };
8366
- }), ClassElement$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(Static, BracedBlock), function($skip, $loc, $0, $1, $2) {
8414
+ }), ClassElement$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(Static, BracedBlock), function($skip, $loc, $0, $1, $2) {
8367
8415
  return {
8368
8416
  type: "ClassStaticBlock",
8369
8417
  children: $0
8370
8418
  };
8371
- }), ClassElement$2 = EmptyStatement, ClassElement$$ = [ClassElement$0, ClassElement$1, ClassElement$2];
8419
+ }), ClassElement$3 = EmptyStatement, ClassElement$$ = [ClassElement$0, ClassElement$1, ClassElement$2, ClassElement$3];
8372
8420
  function ClassElement(ctx, state2) {
8373
8421
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ClassElement", ClassElement$$);
8374
8422
  }
@@ -8411,28 +8459,10 @@ ${js}`
8411
8459
  var FieldDefinition$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, ClassElementName, (0, import_lib2.$E)(_), Colon, __, AssignmentExpression), function($skip, $loc, $0, $1, $2, $3, $4, $5, $6) {
8412
8460
  var id = $2, exp = $6;
8413
8461
  switch (exp.type) {
8414
- case "FunctionExpression": {
8415
- let fnTokenIndex = exp.children.findIndex((c) => c?.token?.startsWith("function")), children = exp.children.slice();
8416
- return exp.generator ? children.splice(fnTokenIndex, 2, children[fnTokenIndex + 1], id) : children.splice(fnTokenIndex, 1, id), {
8417
- ...exp,
8418
- type: "MethodDefinition",
8419
- name: id.name,
8420
- signature: { ...exp.signature, id, name: id.name },
8421
- children
8422
- };
8423
- }
8424
- case "ArrowFunction": {
8425
- let block = { ...exp.block }, children = exp.children.filter((c) => !(Array.isArray(c) && c[c.length - 1]?.token?.includes("=>"))).map((c) => c === exp.block ? block : c);
8426
- return children.unshift(id), exp = {
8427
- ...exp,
8428
- type: "MethodDefinition",
8429
- name: id.name,
8430
- signature: { ...exp.signature, id, name: id.name },
8431
- block,
8432
- children,
8433
- autoBind: !0
8434
- }, block.parent = exp, braceBlock(block), exp;
8435
- }
8462
+ case "FunctionExpression":
8463
+ return convertFunctionToMethod(id, exp);
8464
+ case "ArrowFunction":
8465
+ return convertArrowFunctionToMethod(id, exp);
8436
8466
  default:
8437
8467
  return {
8438
8468
  type: "FieldDefinition",
@@ -8452,14 +8482,7 @@ ${js}`
8452
8482
  children: $0,
8453
8483
  readonly
8454
8484
  };
8455
- }), FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(CoffeeClassesEnabled, ActualAssignment), function($skip, $loc, $0, $1, $2) {
8456
- var assignment = $2;
8457
- return {
8458
- type: "CoffeeClassPrivate",
8459
- children: [assignment],
8460
- assignment
8461
- };
8462
- }), FieldDefinition$3 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Readonly, (0, import_lib2.$E)(_))), ClassElementName, (0, import_lib2.$E)(TypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8485
+ }), FieldDefinition$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)((0, import_lib2.$S)(Abstract, (0, import_lib2.$E)(_))), (0, import_lib2.$E)((0, import_lib2.$S)(Readonly, (0, import_lib2.$E)(_))), ClassElementName, (0, import_lib2.$E)(TypeSuffix), (0, import_lib2.$E)(Initializer)), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
8463
8486
  var abstract = $1, readonly = $2, id = $3, typeSuffix = $4, initializer = $5;
8464
8487
  return {
8465
8488
  type: "FieldDefinition",
@@ -8471,13 +8494,11 @@ ${js}`
8471
8494
  readonly,
8472
8495
  initializer
8473
8496
  };
8474
- }), FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2, FieldDefinition$3];
8497
+ }), FieldDefinition$$ = [FieldDefinition$0, FieldDefinition$1, FieldDefinition$2];
8475
8498
  function FieldDefinition(ctx, state2) {
8476
8499
  return (0, import_lib2.$EVENT_C)(ctx, state2, "FieldDefinition", FieldDefinition$$);
8477
8500
  }
8478
- var ThisLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)(This), function(value) {
8479
- return { type: "Identifier", name: "this", children: [value[0]] };
8480
- }), ThisLiteral$1 = HashThis, ThisLiteral$2 = (0, import_lib2.$TS)((0, import_lib2.$S)(AtThis, (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(Hash), IdentifierName))), function($skip, $loc, $0, $1, $2) {
8501
+ var ThisLiteral$0 = HashThis, ThisLiteral$1 = (0, import_lib2.$TS)((0, import_lib2.$S)(AtThis, (0, import_lib2.$TEXT)((0, import_lib2.$S)((0, import_lib2.$E)(Hash), IdentifierName))), function($skip, $loc, $0, $1, $2) {
8481
8502
  var at = $1, id = $2;
8482
8503
  return {
8483
8504
  type: "MemberExpression",
@@ -8494,10 +8515,16 @@ ${js}`
8494
8515
  }],
8495
8516
  thisShorthand: !0
8496
8517
  };
8497
- }), ThisLiteral$3 = AtThis, ThisLiteral$$ = [ThisLiteral$0, ThisLiteral$1, ThisLiteral$2, ThisLiteral$3];
8518
+ }), ThisLiteral$2 = BasicThisLiteral, ThisLiteral$$ = [ThisLiteral$0, ThisLiteral$1, ThisLiteral$2];
8498
8519
  function ThisLiteral(ctx, state2) {
8499
8520
  return (0, import_lib2.$EVENT_C)(ctx, state2, "ThisLiteral", ThisLiteral$$);
8500
8521
  }
8522
+ var BasicThisLiteral$0 = (0, import_lib2.$T)((0, import_lib2.$S)(This), function(value) {
8523
+ return { type: "Identifier", name: "this", children: [value[0]] };
8524
+ }), BasicThisLiteral$1 = AtThis, BasicThisLiteral$$ = [BasicThisLiteral$0, BasicThisLiteral$1];
8525
+ function BasicThisLiteral(ctx, state2) {
8526
+ return (0, import_lib2.$EVENT_C)(ctx, state2, "BasicThisLiteral", BasicThisLiteral$$);
8527
+ }
8501
8528
  var HashThis$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(AtThis), LengthShorthand, (0, import_lib2.$E)((0, import_lib2.$S)((0, import_lib2.$Y)((0, import_lib2.$S)(_, (0, import_lib2.$E)((0, import_lib2.$S)(Not, __)), ActualIn)), (0, import_lib2.$EXPECT)($L0, 'HashThis ""')))), function($skip, $loc, $0, $1, $2, $3) {
8502
8529
  var at = $1, id = $2, beforeIn = $3;
8503
8530
  return beforeIn != null && at == null ? ['"', id.name, '"'] : {
@@ -8528,7 +8555,7 @@ ${js}`
8528
8555
  function HashThis(ctx, state2) {
8529
8556
  return (0, import_lib2.$EVENT_C)(ctx, state2, "HashThis", HashThis$$);
8530
8557
  }
8531
- var LengthShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)(Hash, NonIdContinue), function($skip, $loc, $0, $1, $2) {
8558
+ var LengthShorthand$0 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$N)(CoffeeCommentEnabled), Hash, NonIdContinue), function($skip, $loc, $0, $1, $2, $3) {
8532
8559
  let id = "length";
8533
8560
  return {
8534
8561
  type: "Identifier",
@@ -9048,7 +9075,7 @@ ${js}`
9048
9075
  function ParameterElement(ctx, state2) {
9049
9076
  return (0, import_lib2.$EVENT)(ctx, state2, "ParameterElement", ParameterElement$0);
9050
9077
  }
9051
- var ParameterElementDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ParameterElementDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R13, "ParameterElementDelimiter /[)}]/")))), ParameterElementDelimiter$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function(value) {
9078
+ var ParameterElementDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ParameterElementDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R13, "ParameterElementDelimiter /[)\\]}]/")))), ParameterElementDelimiter$2 = (0, import_lib2.$T)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function(value) {
9052
9079
  return value[1];
9053
9080
  }), ParameterElementDelimiter$$ = [ParameterElementDelimiter$0, ParameterElementDelimiter$1, ParameterElementDelimiter$2];
9054
9081
  function ParameterElementDelimiter(ctx, state2) {
@@ -10532,7 +10559,7 @@ ${js}`
10532
10559
  function InlineObjectPropertyDelimiter(ctx, state2) {
10533
10560
  return (0, import_lib2.$EVENT)(ctx, state2, "InlineObjectPropertyDelimiter", InlineObjectPropertyDelimiter$0);
10534
10561
  }
10535
- var ObjectPropertyDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ObjectPropertyDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$EXPECT)($L37, 'ObjectPropertyDelimiter "}"'))), ObjectPropertyDelimiter$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function($skip, $loc, $0, $1, $2) {
10562
+ var ObjectPropertyDelimiter$0 = (0, import_lib2.$S)((0, import_lib2.$E)(_), Comma), ObjectPropertyDelimiter$1 = (0, import_lib2.$Y)((0, import_lib2.$S)(__, (0, import_lib2.$R$0)((0, import_lib2.$EXPECT)($R13, "ObjectPropertyDelimiter /[)\\]}]/")))), ObjectPropertyDelimiter$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$Y)(EOS), InsertComma), function($skip, $loc, $0, $1, $2) {
10536
10563
  return { ...$2, implicit: !0 };
10537
10564
  }), ObjectPropertyDelimiter$$ = [ObjectPropertyDelimiter$0, ObjectPropertyDelimiter$1, ObjectPropertyDelimiter$2];
10538
10565
  function ObjectPropertyDelimiter(ctx, state2) {
@@ -15042,7 +15069,13 @@ ${js}`
15042
15069
  raw: [$2.name, ...$3.map(([dot, id]) => dot.token + id.name)].join(""),
15043
15070
  args
15044
15071
  };
15045
- }), TypeIdentifier$$ = [TypeIdentifier$0, TypeIdentifier$1];
15072
+ }), TypeIdentifier$2 = (0, import_lib2.$TS)((0, import_lib2.$S)((0, import_lib2.$E)(_), BasicThisLiteral), function($skip, $loc, $0, $1, $2) {
15073
+ return {
15074
+ type: "TypeIdentifier",
15075
+ children: $0,
15076
+ raw: $2.name
15077
+ };
15078
+ }), TypeIdentifier$$ = [TypeIdentifier$0, TypeIdentifier$1, TypeIdentifier$2];
15046
15079
  function TypeIdentifier(ctx, state2) {
15047
15080
  return (0, import_lib2.$EVENT_C)(ctx, state2, "TypeIdentifier", TypeIdentifier$$);
15048
15081
  }
@@ -16119,6 +16152,7 @@ ${js}`
16119
16152
  __export(sourcemap_civet_exports, {
16120
16153
  SourceMap: () => SourceMap,
16121
16154
  base64Encode: () => base64Encode,
16155
+ decodeVLQ: () => decodeVLQ,
16122
16156
  locationTable: () => locationTable,
16123
16157
  lookupLineColumn: () => lookupLineColumn
16124
16158
  });
@@ -16141,11 +16175,10 @@ ${js}`
16141
16175
  // relative to previous entry
16142
16176
  srcLine;
16143
16177
  srcColumn;
16144
- srcOffset;
16145
16178
  srcTable;
16146
16179
  source;
16147
16180
  constructor(source1) {
16148
- this.source = source1, this.lines = [[]], this.line = 0, this.colOffset = 0, this.srcLine = 0, this.srcColumn = 0, this.srcOffset = 0, this.srcTable = locationTable(this.source);
16181
+ this.source = source1, this.lines = [[]], this.line = 0, this.colOffset = 0, this.srcLine = 0, this.srcColumn = 0, this.srcTable = locationTable(this.source);
16149
16182
  }
16150
16183
  renderMappings() {
16151
16184
  let lastSourceLine = 0, lastSourceColumn = 0;
@@ -16182,9 +16215,13 @@ ${js}`
16182
16215
  }
16183
16216
  };
16184
16217
  }
16218
+ /** Generate a comment with the source mapping URL. */
16219
+ comment(srcFileName, outFileName) {
16220
+ return `//# sourceMappingURL=data:application/json;base64,${base64Encode(JSON.stringify(this.json(srcFileName, outFileName)))}`;
16221
+ }
16185
16222
  updateSourceMap(outputStr, inputPos, colOffset = 0) {
16186
16223
  let outLines = outputStr.split(EOL2), srcLine, srcCol;
16187
- inputPos != null && ([srcLine, srcCol] = lookupLineColumn(this.srcTable, inputPos), srcCol += colOffset, this.srcLine = srcLine, this.srcColumn = srcCol, this.srcOffset = inputPos + outputStr.length);
16224
+ inputPos != null && ([srcLine, srcCol] = lookupLineColumn(this.srcTable, inputPos), srcCol += colOffset, this.srcLine = srcLine, this.srcColumn = srcCol);
16188
16225
  for (let i3 = 0, len22 = outLines.length; i3 < len22; i3++) {
16189
16226
  let i = i3, line = outLines[i3];
16190
16227
  i > 0 && (this.line++, this.srcLine++, this.colOffset = 0, this.lines[this.line] = [], this.srcColumn = srcCol = colOffset);
@@ -16192,17 +16229,24 @@ ${js}`
16192
16229
  this.colOffset = line.length, this.srcColumn += line.length, inputPos != null ? this.lines[this.line].push([l, 0, srcLine + i, srcCol]) : l != 0 && this.lines[this.line].push([l]);
16193
16230
  }
16194
16231
  }
16195
- }, smRegexp = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([+a-zA-Z0-9\/]*=?=?)$/, remap = function(codeWithSourceMap, upstreamMap, sourcePath, targetPath) {
16196
- let sourceMapText, codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, (match, sm) => (sourceMapText = sm, ""));
16197
- if (sourceMapText) {
16198
- let parsed = parseWithLines(sourceMapText), composedLines = composeLines(upstreamMap.lines, parsed.lines);
16199
- upstreamMap.lines = composedLines;
16200
- }
16201
- let remappedSourceMapJSON = upstreamMap.json(sourcePath, targetPath), newSourceMap = `sourceMappingURL=data:application/json;charset=utf-8;base64,${base64Encode(JSON.stringify(remappedSourceMapJSON))}`;
16202
- return `${codeWithoutSourceMap}
16203
- //# ${newSourceMap}`;
16204
- }, composeLines = function(upstreamMapping, lines) {
16205
- return lines.map((line) => line.map((entry) => {
16232
+ /**
16233
+ Remap a string with compiled code and a source map to use a new source map
16234
+ referencing upstream source files.
16235
+ This modifies the upstream map in place.
16236
+ */
16237
+ static remap = (codeWithSourceMap, upstreamMap, sourcePath, targetPath) => {
16238
+ let sourceMapText, codeWithoutSourceMap = codeWithSourceMap.replace(smRegexp, (_match, sm) => (sourceMapText = sm, ""));
16239
+ if (sourceMapText) {
16240
+ let parsed = this.parseWithLines(sourceMapText), composedLines = this.composeLines(upstreamMap.lines, parsed.lines);
16241
+ upstreamMap.lines = composedLines;
16242
+ }
16243
+ return `${codeWithoutSourceMap}
16244
+ ${upstreamMap.comment(sourcePath, targetPath)}`;
16245
+ };
16246
+ /**
16247
+ Compose lines from an upstream source map with lines from a downstream source map.
16248
+ */
16249
+ static composeLines = (upstreamMapping, lines) => lines.map((line) => line.map((entry) => {
16206
16250
  if (entry.length === 1)
16207
16251
  return entry;
16208
16252
  let [colDelta, sourceFileIndex, srcLine, srcCol] = entry, srcPos = remapPosition([srcLine, srcCol], upstreamMapping);
@@ -16211,38 +16255,44 @@ ${js}`
16211
16255
  let [upstreamLine, upstreamCol] = srcPos;
16212
16256
  return entry.length === 4 ? [colDelta, sourceFileIndex, upstreamLine, upstreamCol] : [colDelta, sourceFileIndex, upstreamLine, upstreamCol, entry[4]];
16213
16257
  }));
16214
- }, parseWithLines = function(base64encodedJSONstr) {
16215
- let json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8")), sourceLine = 0, sourceColumn = 0, lines = json.mappings.split(";").map((line) => line.length === 0 ? [] : line.split(",").map((entry) => {
16216
- let result = decodeVLQ(entry);
16217
- switch (result.length) {
16218
- case 1:
16219
- return [result[0]];
16220
- case 4:
16221
- return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3]];
16222
- case 5:
16223
- return [result[0], result[1], sourceLine += result[2], sourceColumn += result[3], result[4]];
16224
- default:
16225
- throw new Error("Unknown source map entry", result);
16226
- }
16227
- }));
16228
- return json.lines = lines, json;
16229
- };
16230
- Object.assign(SourceMap, { remap, parseWithLines, composeLines });
16258
+ /**
16259
+ Parse a base64 encoded source map string into a SourceMapJSON object with lines.
16260
+ */
16261
+ static parseWithLines = (base64encodedJSONstr) => {
16262
+ let json = JSON.parse(Buffer.from(base64encodedJSONstr, "base64").toString("utf8")), sourceLine = 0, sourceColumn = 0, lines = json.mappings.split(";").map((line) => line.length === 0 ? [] : line.split(",").map((entry) => {
16263
+ let result = decodeVLQ(entry);
16264
+ switch (result.length) {
16265
+ case 1:
16266
+ break;
16267
+ case 4:
16268
+ case 5: {
16269
+ sourceLine += result[2], result[2] = sourceLine, sourceColumn += result[3], result[3] = sourceColumn;
16270
+ break;
16271
+ }
16272
+ default:
16273
+ throw new Error(`Unknown source map entry ${JSON.stringify(result)}`);
16274
+ }
16275
+ return result;
16276
+ }));
16277
+ return { ...json, lines };
16278
+ };
16279
+ }, smRegexp = /(?:\r?\n|\r)\/\/# sourceMappingURL=data:application\/json;(?:charset=[^;]*;)?base64,([+a-zA-Z0-9\/]*=?=?)(?:\s*)$/;
16231
16280
  var VLQ_SHIFT = 5, VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT, VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1, encodeVlq = function(value) {
16232
16281
  let answer = "", ref2;
16233
16282
  value < 0 ? ref2 = 1 : ref2 = 0;
16234
16283
  let signBit = ref2, valueToEncode = (Math.abs(value) << 1) + signBit;
16235
16284
  for (; valueToEncode || !answer; ) {
16236
16285
  let nextChunk = valueToEncode & VLQ_VALUE_MASK;
16237
- valueToEncode = valueToEncode >> VLQ_SHIFT, valueToEncode && (nextChunk |= VLQ_CONTINUATION_BIT), answer += encodeBase64(nextChunk);
16286
+ valueToEncode = valueToEncode >> VLQ_SHIFT, valueToEncode && (nextChunk |= VLQ_CONTINUATION_BIT), answer += BASE64_CHARS[nextChunk];
16238
16287
  }
16239
16288
  return answer;
16240
- }, BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", encodeBase64 = function(value) {
16241
- return BASE64_CHARS[value] || (() => {
16242
- throw new Error("Cannot Base64 encode value: ${value}");
16243
- })();
16244
- }, base64Encode = function(src) {
16245
- return typeof Buffer < "u" ? Buffer.from(src).toString("base64") : btoa(src);
16289
+ }, BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", base64Encode = function(src) {
16290
+ if (typeof Buffer < "u")
16291
+ return Buffer.from(src).toString("base64");
16292
+ {
16293
+ let bytes = new TextEncoder().encode(src), binaryString = String.fromCodePoint(...bytes);
16294
+ return btoa(binaryString);
16295
+ }
16246
16296
  }, vlqTable = new Uint8Array(128), vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
16247
16297
  {
16248
16298
  let i = 0, l = vlqTable.length;
@@ -16253,22 +16303,22 @@ ${js}`
16253
16303
  }
16254
16304
  var decodeError = function(message) {
16255
16305
  throw new Error(message);
16256
- }, decodeVLQ = function(mapping) {
16306
+ }, decodeVLQ = (mapping) => {
16257
16307
  let i = 0, l = mapping.length, result = [];
16258
16308
  for (; i < l; ) {
16259
16309
  let shift = 0, vlq = 0, v = 0;
16260
16310
  for (; ; ) {
16261
16311
  i >= l && decodeError("Unexpected early end of mapping data");
16262
16312
  let c = mapping.charCodeAt(i);
16263
- (c & 127) != c && decodeError("Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}");
16313
+ (c & 127) != c && decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`);
16264
16314
  let index = vlqTable[c & 127];
16265
- if (index === 255 && decodeError("Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}"), i++, vlq |= (index & 31) << shift, shift += 5, !(index & 32))
16315
+ if (index === 255 && decodeError(`Invalid mapping character: ${JSON.stringify(String.fromCharCode(c))}`), i++, vlq |= (index & 31) << shift, shift += 5, !(index & 32))
16266
16316
  break;
16267
16317
  }
16268
16318
  vlq & 1 ? v = -(vlq >> 1) : v = vlq >> 1, result.push(v);
16269
16319
  }
16270
16320
  return result;
16271
- }, remapPosition = function(position, sourcemapLines) {
16321
+ }, remapPosition = (position, sourcemapLines) => {
16272
16322
  let [line, character] = position, textLine = sourcemapLines[line];
16273
16323
  if (!textLine?.length)
16274
16324
  return;
@@ -16413,7 +16463,8 @@ ${counts}`;
16413
16463
  if (options.sourceMap || options.inlineMap) {
16414
16464
  options.sourceMap = new SourceMap2(src);
16415
16465
  let code = generate_civet_default(ast2, options);
16416
- return checkErrors(), options.inlineMap ? SourceMap2.remap(code, options.sourceMap, filename2, filename2 + ".tsx") : {
16466
+ return checkErrors(), options.inlineMap ? `${code}
16467
+ ${options.sourceMap.comment(filename2, filename2 + ".tsx")}` : {
16417
16468
  code,
16418
16469
  sourceMap: options.sourceMap
16419
16470
  };
package/dist/civet CHANGED
@@ -368,6 +368,7 @@ async function repl(args, options) {
368
368
  return;
369
369
  })(),
370
370
  eval: async function(input, context, filename, callback) {
371
+ input = input.replace(/\r/g, "\n");
371
372
  if (input === "\n") {
372
373
  return callback(null, void 0);
373
374
  } else if (input in ["quit\n", "exit\n", "quit()\n", "exit()\n"]) {